/*
 * GoJS v1.8.12 JavaScript Library for HTML Diagrams
 * Northwoods Software, https://www.nwoods.com/
 * GoJS and Northwoods Software are registered trademarks of Northwoods Software Corporation.
 * Copyright (C) 1998-2018 by Northwoods Software Corporation.  All Rights Reserved.
 * THIS SOFTWARE IS LICENSED.  THE LICENSE AGREEMENT IS AT: https://gojs.net/1.8.12/doc/license.html.
 */
(function(window) {
	var g, ca = {};
	if (!window.document || void 0 === window.document.createElement("canvas").getContext) throw window.console && window.console.log("The HTML Canvas element is not supported in this browser,or this browser is in Compatibility mode."), Error("The HTML Canvas element is not supported in this browser,or this browser is in Compatibility mode.");
	if (!Object.defineProperty) throw Error("GoJS requires a newer version of JavaScript");
	Function.prototype.bind || (Function.prototype.bind = function(a) {
		function b() {
			return f.apply(a, e.concat(d.call(arguments)))
		}

		function c() {}
		var d = Array.prototype.slice,
			e = d.call(arguments, 1),
			f = this;
		c.prototype = this.prototype;
		b.prototype = new c;
		return b
	});
	(function() {
		for (var a = 0, b = ["ms", "moz", "webkit", "o"], c = 0; c < b.length && !window.requestAnimationFrame; ++c) window.requestAnimationFrame = window[b[c] + "RequestAnimationFrame"], window.cancelAnimationFrame = window[b[c] + "CancelAnimationFrame"] || window[b[c] + "CancelRequestAnimationFrame"];
		window.requestAnimationFrame || (window.requestAnimationFrame = function(b) {
			var c = (new Date).getTime(),
				f = Math.max(8, 16 - (c - a)),
				h = window.setTimeout(function() {
					b(c + f)
				}, f);
			a = c + f;
			return h
		});
		window.cancelAnimationFrame || (window.cancelAnimationFrame =
			function(a) {
				window.clearTimeout(a)
			})
	})();
	ca.Debug = null;
	var w = {
		od: 1,
		Tc: 2,
		fd: 4,
		ed: 8,
		Dn: void 0 !== window.navigator && 0 < window.navigator.userAgent.indexOf("534.30") && 0 < window.navigator.userAgent.indexOf("Android"),
		ru: void 0 !== window.navigator && 0 < window.navigator.userAgent.indexOf("MSIE 9.0"),
		aq: void 0 !== window.navigator && 0 < window.navigator.userAgent.indexOf("MSIE 10.0"),
		bq: void 0 !== window.navigator && 0 < window.navigator.userAgent.indexOf("Trident/7"),
		PA: void 0 !== window.navigator && 0 < window.navigator.userAgent.indexOf("Edge/"),
		yh: void 0 !== window.navigator && void 0 !==
			window.navigator.platform && 0 <= window.navigator.platform.toUpperCase().indexOf("MAC"),
		BF: void 0 !== window.navigator && void 0 !== window.navigator.platform && null !== window.navigator.platform.match(/(iPhone|iPod|iPad)/i),
		NE: function(a, b, c) {
			var d = -1;
			return function() {
				var e = this,
					f = arguments; - 1 !== d && w.clearTimeout(d);
				d = w.setTimeout(function() {
					d = -1;
					c || a.apply(e, f)
				}, b);
				c && !d && a.apply(e, f)
			}
		},
		setTimeout: function(a, b) {
			return window.setTimeout(a, b)
		},
		clearTimeout: function(a) {
			window.clearTimeout(a)
		},
		createElement: function(a) {
			return window.document.createElement(a)
		},
		k: function(a) {
			throw Error(a);
		},
		ma: function(a, b) {
			var c = "The object is frozen, so its properties cannot be set: " + a.toString();
			void 0 !== b && (c += "  to value: " + b);
			w.k(c)
		},
		G: function(a, b, c, d) {
			a instanceof b || (c = w.getTypeName(c), void 0 !== d && (c += "." + d), w.Ed(a, b, c))
		},
		j: function(a, b, c, d) {
			typeof a !== b && (c = w.getTypeName(c), void 0 !== d && (c += "." + d), w.Ed(a, b, c))
		},
		zd: function(a, b, c) {
			"number" === typeof a && isFinite(a) || (b = w.getTypeName(b), void 0 !== c && (b += "." + c), w.k(b + " must be a real number type, and not NaN or Infinity: " +
				a))
		},
		ob: function(a, b, c, d) {
			a instanceof da && a.Ge === b || (c = w.getTypeName(c), void 0 !== d && (c += "." + d), w.Ed(a, "a constant of class " + w.of(b), c))
		},
		GK: function(a, b) {
			"string" === typeof a ? ea(a) || w.k('Color "' + a + '" is not a valid color string for ' + b) : a instanceof ga || w.k("Value for " + b + " must be a color string or a Brush, not " + a)
		},
		Ed: function(a, b, c, d) {
			b = w.getTypeName(b);
			c = w.getTypeName(c);
			void 0 !== d && (c += "." + d);
			"string" === typeof a ? w.k(c + " value is not an instance of " + b + ': "' + a + '"') : w.k(c + " value is not an instance of " +
				b + ": " + a)
		},
		Fa: function(a, b, c, d) {
			c = w.getTypeName(c);
			void 0 !== d && (c += "." + d);
			w.k(c + " is not in the range " + b + ": " + a)
		},
		nd: function(a) {
			w.k(w.of(a) + " constructor cannot take any arguments.")
		},
		Na: function(a) {
			w.k("Collection was modified during iteration: " + a.toString() + "\n  Perhaps you should iterate over a copy of the collection,\n  or you could collect items to be removed from the collection after the iteration.")
		},
		Ij: function(a, b) {
			w.k("No property to set for this enum value: " + b + " on " + a.toString())
		},
		trace: function(a) {
			window.console && window.console.log(a)
		},
		tx: {},
		Qt: function(a, b) {
			!0 !== w.tx[a] && (w.tx[a] = !0, window.console && window.console.log(a + " is deprecated in " + b + ", see the GoJS change log for more information."))
		},
		Pa: function(a) {
			return "object" === typeof a && null !== a
		},
		isArray: function(a) {
			return Array.isArray(a) || a instanceof NodeList || a instanceof HTMLCollection
		},
		AI: function(a) {
			return Array.isArray(a)
		},
		gA: function(a, b, c) {
			w.isArray(a) || w.Ed(a, "Array or NodeList or HTMLCollection", b, c)
		},
		Za: function(a) {
			return a.length
		},
		Ol: function(a) {
			return Array.prototype.slice.call(a)
		},
		Ba: function(a, b) {
			Array.isArray(a);
			return a[b]
		},
		DE: function(a, b, c) {
			Array.isArray(a) ? a[b] = c : w.k("Cannot replace an object in an HTMLCollection or NodeList at " + b)
		},
		Ll: function(a, b) {
			if (Array.isArray(a)) return a.indexOf(b);
			for (var c = a.length, d = 0; d < c; d++)
				if (a[d] === b) return d;
			return -1
		},
		qh: function(a, b, c) {
			Array.isArray(a) ? b >= a.length ? a.push(c) : a.splice(b, 0, c) : w.k("Cannot insert an object into an HTMLCollection or NodeList: " + c + " at " + b)
		},
		Jg: function(a,
			b) {
			Array.isArray(a) ? b >= a.length ? a.pop() : a.splice(b, 1) : w.k("Cannot remove an object from an HTMLCollection or NodeList at " + b)
		},
		Hy: [],
		K: function() {
			var a = w.Hy.pop();
			return void 0 === a ? new y : a
		},
		xb: function(a, b) {
			var c = w.Hy.pop();
			if (void 0 === c) return new y(a, b);
			c.x = a;
			c.y = b;
			return c
		},
		v: function(a) {
			w.Hy.push(a)
		},
		aC: [],
		mm: function() {
			var a = w.aC.pop();
			return void 0 === a ? new ia : a
		},
		Hk: function(a) {
			w.aC.push(a)
		},
		Iy: [],
		Kf: function() {
			var a = w.Iy.pop();
			return void 0 === a ? new B : a
		},
		lg: function(a, b, c, d) {
			var e = w.Iy.pop();
			if (void 0 === e) return new B(a, b, c, d);
			e.x = a;
			e.y = b;
			e.width = c;
			e.height = d;
			return e
		},
		Eb: function(a) {
			w.Iy.push(a)
		},
		bC: [],
		Wg: function() {
			var a = w.bC.pop();
			return void 0 === a ? new ka : a
		},
		af: function(a) {
			w.bC.push(a)
		},
		Jy: null,
		s: function() {
			var a = w.Jy;
			return null !== a ? (w.Jy = null, a) : new la
		},
		q: function(a) {
			a.reset();
			w.Jy = a
		},
		$B: [],
		cb: function() {
			var a = w.$B.pop();
			return void 0 === a ? [] : a
		},
		ta: function(a) {
			a.length = 0;
			w.$B.push(a)
		},
		fo: Object.freeze([]),
		qm: 1,
		oc: function(a) {
			a.__gohashid = w.qm++
		},
		Wp: function(a) {
			var b = a.__gohashid;
			void 0 === b && (b = w.qm++, a.__gohashid = b);
			return b
		},
		Pd: function(a) {
			return a.__gohashid
		},
		ga: function(a, b) {
			b.Ty = a;
			ca[a] = b
		},
		La: function(a, b) {
			function c() {}
			c.prototype = b.prototype;
			a.prototype = new c;
			a.prototype.constructor = a
		},
		mi: function(a) {
			a.cH = !0
		},
		defineProperty: function(a, b, c, d, e) {
			w.j(a, "function", "Util.defineProperty:classfunc");
			w.j(b, "object", "Util.defineProperty:propobj");
			w.j(c, "function", "Util.defineProperty:getter");
			w.j(d, "function", "Util.defineProperty:setter");
			for (var f in b) {
				b = b[f];
				c = {
					get: c,
					set: d,
					enumerable: !0
				};
				if (void 0 !== e)
					for (var h in e) c[h] = e[h];
				Object.defineProperty(a.prototype, f, c);
				e = Object.getOwnPropertyDescriptor(a.prototype, f);
				b && e && Object.defineProperty(a.prototype, b, e);
				break
			}
		},
		dK: !1,
		u: function(a, b, c, d) {
			w.j(a, "function", "Util.defineReadOnlyProperty:classfunc");
			w.j(b, "object", "Util.defineReadOnlyProperty:propobj");
			w.j(c, "function", "Util.defineReadOnlyProperty:getter");
			for (var e in b) {
				var f = b[e];
				b = {
					get: c,
					set: function(a) {
						w.k('The property "' + f + '" is read-only and cannot be set to ' +
							a)
					},
					enumerable: !0
				};
				if (void 0 !== d)
					for (var h in d) b[h] = d[h];
				Object.defineProperty(a.prototype, e, b);
				d = Object.getOwnPropertyDescriptor(a.prototype, e);
				f && d && Object.defineProperty(a.prototype, f, d);
				break
			}
		},
		be: function(a, b) {
			for (var c in b) b[c] = !0;
			a.prototype.ZG = b
		},
		getTypeName: function(a) {
			return void 0 === a ? "" : "string" === typeof a ? a : "function" === typeof a ? w.of(a) : null === a ? "*" : ""
		},
		of: function(a) {
			if ("function" === typeof a) {
				if (a.Ty) return a.Ty;
				if (a.name) return a.name;
				var b = a.toString(),
					c = b.indexOf("("),
					b = b.substring(9,
						c).trim();
				if ("" !== b) return a.Ty = b
			} else if (w.Pa(a) && a.constructor) return w.of(a.constructor);
			return typeof a
		},
		p: function(a, b, c) {
			w.j(a, "function", "Util.defineEnumValue:classfunc");
			w.j(b, "string", "Util.defineEnumValue:name");
			w.j(c, "number", "Util.defineEnumValue:num");
			c = new da(a, b, c);
			Object.freeze(c);
			a[b] = c;
			var d = a.fv;
			d instanceof ma || (d = new ma("string", da), a.fv = d);
			d.add(b, c);
			return c
		},
		ub: function(a, b) {
			if (!a || !b) return null;
			var c = void 0;
			try {
				"function" === typeof b ? c = b(a) : "function" === typeof a.getAttribute ?
					(c = a.getAttribute(b), null === c && (c = void 0)) : c = a[b]
			} catch (d) {}
			return c
		},
		Ma: function(a, b, c) {
			if (a && b) try {
				"function" === typeof b ? b(a, c) : "function" === typeof a.setAttribute ? a.setAttribute(b, c) : a[b] = c
			} catch (d) {}
		},
		Vu: function(a, b) {
			w.j(a, "object", "Setting properties requires Objects as arguments");
			w.j(b, "object", "Setting properties requires Objects as arguments");
			var c = a instanceof C,
				d = a instanceof D,
				e;
			for (e in b) {
				"" === e && w.k("Setting properties requires non-empty property names");
				var f = a,
					h = e;
				if (c || d) {
					var k =
						e.indexOf(".");
					if (0 < k) {
						var l = e.substring(0, k);
						if (c) f = a.Bd(l);
						else if (f = a[l], void 0 === f || null === f) f = a.eb[l];
						w.Pa(f) ? h = e.substr(k + 1) : w.k("Unable to find object named: " + l + " in " + a.toString() + " when trying to set property: " + e)
					}
				}
				if ("_" !== h[0] && !w.sF(f, h))
					if (d && "ModelChanged" === h) {
						a.mH(b[h]);
						continue
					} else if (d && "Changed" === h) {
					a.gn(b[h]);
					continue
				} else if (d && w.sF(a.eb, h)) f = a.eb;
				else if (d && oa(a, h)) {
					a.Yw(h, b[h]);
					continue
				} else if (a instanceof F && "Changed" === h) {
					a.gn(b[h]);
					continue
				} else w.k('Trying to set undefined property "' +
					h + '" on object: ' + f.toString());
				f[h] = b[e];
				"_" === h[0] && f instanceof G && f.jH(h)
			}
		},
		sF: function(a, b) {
			if (a.hasOwnProperty(b)) return !0;
			for (var c = Object.getPrototypeOf(a); c && c !== Function;) {
				if (c.hasOwnProperty(b)) return !0;
				var d = c.ZG;
				if (d && d[b]) return !0;
				c = Object.getPrototypeOf(c)
			}
			return !1
		},
		nJ: function(a) {
			for (var b = [], c = 0; 256 > c; c++) b[c] = c;
			for (var d = 0, e = 0, c = 0; 256 > c; c++) d = (d + b[c] + 119) % 256, e = b[c], b[c] = b[d], b[d] = e;
			for (var d = c = 0, f = "", h = 0; h < a.length; h++) c = (c + 1) % 256, d = (d + b[c]) % 256, e = b[c], b[c] = b[d], b[d] = e, f += String.fromCharCode(a.charCodeAt(h) ^
				b[(b[c] + b[d]) % 256]);
			return f
		},
		nI: function(a) {
			for (var b = {}, c = 0; 256 > c; c++) b["0123456789abcdef".charAt(c >> 4) + "0123456789abcdef".charAt(c & 15)] = String.fromCharCode(c);
			a.length % 2 && (a = "0" + a);
			for (var d = [], e = 0, c = 0; c < a.length; c += 2) d[e++] = b[a.substr(c, 2)];
			a = d.join("");
			return "" === a ? "0" : a
		},
		Kg: function(a) {
			return w.nJ(w.nI(a))
		},
		om: null,
		adym: "7da71ca0ad381e90",
		vfo: "2be64efdb264",
		IK: "@COLOR1",
		JK: "@COLOR2",
		OE: !1,
		Nt: null,
		Ot: null
	};
	w.om = function() {
		var a = window.document.createElement("canvas"),
			b = a.getContext("2d");
		b[w.Kg("7ca11abfd022028846")] = w.Kg("398c3597c01238");
		for (var c = ["5da73c80a36755dc038e4972187c3cae51fd22", "32ab5ff3b26f42dc0ed90f22432913b54ae6247590da4bb21c324ba3a84e385776", "54a702f3e53909c447824c6706603faf4cfb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387", "74bf19bce72555874c86"], d = 1; 5 > d; d++) b[w.Kg("7ca11abfd7330390")](w.Kg(c[d - 1]), 10, 15 * d + 0);
		b[w.Kg("7ca11abfd022028846")] = w.Kg("39f046ebb36e4b");
		for (d = 1; 5 > d; d++) b[w.Kg("7ca11abfd7330390")](w.Kg(c[d -
			1]), 10, 15 * d + 0);
		if (4 !== c.length || "5" !== c[0][0] || "7" !== c[3][0]) w.p = function(a, b) {
			var c = new da(a, b, 2);
			Object.freeze(c);
			a[b] = c;
			var d = a.fv;
			d instanceof ma || (d = new ma("string", da), a.fv = d);
			d.add(b, c);
			return c
		};
		return a
	}();

	function da(a, b, c) {
		w.oc(this);
		this.pC = a;
		this.Rb = b;
		this.gH = c
	}
	w.ga("EnumValue", da);
	da.prototype.toString = function() {
		return w.of(this.pC) + "." + this.Rb
	};
	w.u(da, {
		Ge: "classType"
	}, function() {
		return this.pC
	});
	w.u(da, {
		name: "name"
	}, function() {
		return this.Rb
	});
	w.u(da, {
		value: "value"
	}, function() {
		return this.gH
	});
	var pa;
	da.findName = pa = function(a, b) {
		if (void 0 === b || null === b || "" === b) return null;
		w.j(a, "function", "findName:classfunc");
		w.j(b, "string", "EnumValue.findName:name");
		var c = a.fv;
		return c instanceof ma ? c.ka(b) : null
	};

	function qa() {
		this.nC = []
	}
	qa.prototype.toString = function() {
		return this.nC.join("")
	};
	qa.prototype.add = function(a) {
		"" !== a && this.nC.push(a)
	};

	function ra() {}

	function sa(a) {
		void 0 === a && (a = 42);
		this.seed = a;
		this.Dy = 48271;
		this.ev = 2147483647;
		this.ZB = this.ev / this.Dy;
		this.OG = this.ev % this.Dy;
		this.NG = 1 / this.ev;
		this.random()
	}
	sa.prototype.random = function() {
		var a = this.seed % this.ZB * this.Dy - this.seed / this.ZB * this.OG;
		this.seed = 0 < a ? a : a + this.ev;
		return this.seed * this.NG
	};

	function ta() {}
	w.u(ta, {
		i: "iterator"
	}, function() {
		return this
	});
	ta.prototype.reset = ta.prototype.reset = function() {};
	ta.prototype.next = ta.prototype.next = function() {
		return !1
	};
	ta.prototype.hasNext = function() {
		return !1
	};
	ta.prototype.first = ta.prototype.first = function() {
		return null
	};
	ta.prototype.any = function() {
		return !1
	};
	ta.prototype.all = function() {
		return !0
	};
	ta.prototype.each = function() {
		return this
	};
	ta.prototype.map = function() {
		return this
	};
	ta.prototype.filter = function() {
		return this
	};
	ta.prototype.concat = function(a) {
		return a.i
	};
	w.u(ta, {
		count: "count"
	}, function() {
		return 0
	});
	ta.prototype.Nf = function() {};
	ta.prototype.toString = function() {
		return "EmptyIterator"
	};
	var ua = new ta;

	function va(a) {
		this.key = -1;
		this.value = a
	}
	w.be(va, {
		key: !0,
		value: !0
	});
	w.u(va, {
		i: "iterator"
	}, function() {
		return this
	});
	va.prototype.reset = va.prototype.reset = function() {
		this.key = -1
	};
	va.prototype.next = va.prototype.next = function() {
		return -1 === this.key ? (this.key = 0, !0) : !1
	};
	va.prototype.hasNext = function() {
		return this.next()
	};
	va.prototype.first = va.prototype.first = function() {
		this.key = 0;
		return this.value
	};
	va.prototype.any = function(a) {
		this.key = -1;
		return a(this.value)
	};
	va.prototype.all = function(a) {
		this.key = -1;
		return a(this.value)
	};
	va.prototype.each = function(a) {
		this.key = -1;
		a(this.value);
		return this
	};
	va.prototype.map = function(a) {
		return new va(a(this.value))
	};
	va.prototype.filter = function(a) {
		return a(this.value) ? new va(this.value) : ua
	};
	va.prototype.concat = function(a) {
		return new xa(this, a.i)
	};
	w.u(va, {
		count: "count"
	}, function() {
		return 1
	});
	va.prototype.Nf = function() {
		this.value = null
	};
	va.prototype.toString = function() {
		return "SingletonIterator(" + this.value + ")"
	};

	function xa(a, b) {
		this.ql = a;
		this.rl = b;
		this.gv = !1
	}
	w.be(xa, {
		key: !0,
		value: !0
	});
	w.u(xa, {
		i: "iterator"
	}, function() {
		return this
	});
	xa.prototype.reset = xa.prototype.reset = function() {
		this.ql.reset();
		this.rl.reset();
		this.gv = !1
	};
	xa.prototype.next = xa.prototype.next = function() {
		if (!this.gv) {
			var a = this.ql;
			if (a.next()) return this.key = a.key, this.value = a.value, !0;
			this.gv = !0
		}
		return this.gv && (a = this.rl, a.next()) ? (this.key = a.key, this.value = a.value, !0) : !1
	};
	xa.prototype.hasNext = function() {
		return this.next()
	};
	xa.prototype.first = xa.prototype.first = function() {
		this.reset();
		return this.next() ? this.value : null
	};
	xa.prototype.any = function(a) {
		return this.ql.any(a) || this.rl.any(a) ? !0 : !1
	};
	xa.prototype.all = function(a) {
		return this.ql.all(a) && this.rl.all(a) ? !0 : !1
	};
	xa.prototype.each = function(a) {
		this.ql.each(a);
		this.rl.each(a);
		return this
	};
	xa.prototype.map = function(a) {
		return new xa(this.ql.map(a), this.rl.map(a))
	};
	xa.prototype.filter = function(a) {
		return new xa(this.ql.filter(a), this.rl.filter(a))
	};
	xa.prototype.concat = function(a) {
		return new xa(this, a.i)
	};
	w.u(xa, {
		count: "count"
	}, function() {
		return this.ql.count + this.rl.count
	});
	xa.prototype.Nf = function() {
		this.value = this.key = null
	};
	xa.prototype.toString = function() {
		return "ConcatIterator()"
	};

	function za(a) {
		this.Ac = a;
		this.Zh = null;
		a.Qb = null;
		this.Sa = a.F;
		this.zc = -1
	}
	w.be(za, {
		key: !0,
		value: !0
	});
	w.u(za, {
		i: "iterator"
	}, function() {
		return this
	});
	w.defineProperty(za, {
		pq: "predicate"
	}, function() {
		return this.Zh
	}, function(a) {
		this.Zh = a
	});
	za.prototype.reset = za.prototype.reset = function() {
		var a = this.Ac;
		a.Qb = null;
		this.Sa = a.F;
		this.zc = -1
	};
	za.prototype.next = za.prototype.next = function() {
		var a = this.Ac;
		if (a.F !== this.Sa) {
			if (0 > this.key) return !1;
			w.Na(a)
		}
		var a = a.n,
			b = a.length,
			c = ++this.zc,
			d = this.Zh;
		if (null !== d)
			for (; c < b;) {
				var e = a[c];
				if (d(e)) return this.key = this.zc = c, this.value = e, !0;
				c++
			} else {
				if (c < b) return this.key = c, this.value = a[c], !0;
				this.Nf()
			}
		return !1
	};
	za.prototype.hasNext = function() {
		return this.next()
	};
	za.prototype.first = za.prototype.first = function() {
		var a = this.Ac;
		this.Sa = a.F;
		this.zc = 0;
		var a = a.n,
			b = a.length,
			c = this.Zh;
		if (null !== c) {
			for (var d = 0; d < b;) {
				var e = a[d];
				if (c(e)) return this.key = this.zc = d, this.value = e;
				d++
			}
			return null
		}
		return 0 < b ? (e = a[0], this.key = 0, this.value = e) : null
	};
	za.prototype.any = function(a) {
		var b = this.Ac;
		b.Qb = null;
		var c = b.F;
		this.zc = -1;
		for (var d = b.n, e = d.length, f = this.Zh, h = 0; h < e; h++) {
			var k = d[h];
			if (null === f || f(k)) {
				if (a(k)) return !0;
				b.F !== c && w.Na(b)
			}
		}
		return !1
	};
	za.prototype.all = function(a) {
		var b = this.Ac;
		b.Qb = null;
		var c = b.F;
		this.zc = -1;
		for (var d = b.n, e = d.length, f = this.Zh, h = 0; h < e; h++) {
			var k = d[h];
			if (null === f || f(k)) {
				if (!a(k)) return !1;
				b.F !== c && w.Na(b)
			}
		}
		return !0
	};
	za.prototype.each = function(a) {
		var b = this.Ac;
		b.Qb = null;
		var c = b.F;
		this.zc = -1;
		for (var d = b.n, e = d.length, f = this.Zh, h = 0; h < e; h++) {
			var k = d[h];
			if (null === f || f(k)) a(k), b.F !== c && w.Na(b)
		}
		return this
	};
	za.prototype.map = function(a) {
		var b = this.Ac;
		b.Qb = null;
		var c = b.F;
		this.zc = -1;
		for (var d = [], e = b.n, f = e.length, h = this.Zh, k = 0; k < f; k++) {
			var l = e[k];
			if (null === h || h(l)) d.push(a(l)), b.F !== c && w.Na(b)
		}
		a = new H;
		a.n = d;
		a.Lc();
		return a.i
	};
	za.prototype.filter = function(a) {
		var b = this.Ac;
		b.Qb = null;
		var c = b.F;
		this.zc = -1;
		for (var d = [], e = b.n, f = e.length, h = this.Zh, k = 0; k < f; k++) {
			var l = e[k];
			if (null === h || h(l)) a(l) && d.push(l), b.F !== c && w.Na(b)
		}
		a = new H(b.na);
		a.n = d;
		a.Lc();
		return a.i
	};
	za.prototype.concat = function(a) {
		this.Ac.Qb = null;
		return new xa(this, a.i)
	};
	w.u(za, {
		count: "count"
	}, function() {
		var a = this.Zh;
		if (null !== a) {
			for (var b = 0, c = this.Ac.n, d = c.length, e = 0; e < d; e++) a(c[e]) && b++;
			return b
		}
		return this.Ac.n.length
	});
	za.prototype.Nf = function() {
		this.key = -1;
		this.value = null;
		this.Sa = -1;
		this.Zh = null;
		this.Ac.Qb = this
	};
	za.prototype.toString = function() {
		return "ListIterator@" + this.zc + "/" + this.Ac.count
	};

	function Aa(a) {
		this.Ac = a;
		a.Pi = null;
		this.Sa = a.F;
		this.zc = a.n.length
	}
	w.be(Aa, {
		key: !0,
		value: !0
	});
	w.u(Aa, {
		i: "iterator"
	}, function() {
		return this
	});
	Aa.prototype.reset = Aa.prototype.reset = function() {
		var a = this.Ac;
		a.Pi = null;
		this.Sa = a.F;
		this.zc = a.n.length
	};
	Aa.prototype.next = Aa.prototype.next = function() {
		var a = this.Ac;
		if (a.F !== this.Sa) {
			if (0 > this.key) return !1;
			w.Na(a)
		}
		var b = --this.zc;
		if (0 <= b) return this.key = b, this.value = a.n[b], !0;
		this.Nf();
		return !1
	};
	Aa.prototype.hasNext = function() {
		return this.next()
	};
	Aa.prototype.first = Aa.prototype.first = function() {
		var a = this.Ac;
		this.Sa = a.F;
		var b = a.n;
		this.zc = a = b.length - 1;
		return 0 <= a ? (b = b[a], this.key = a, this.value = b) : null
	};
	Aa.prototype.any = function(a) {
		var b = this.Ac;
		b.Pi = null;
		var c = b.F,
			d = b.n,
			e = d.length;
		this.zc = e;
		for (e -= 1; 0 <= e; e--) {
			if (a(d[e])) return !0;
			b.F !== c && w.Na(b)
		}
		return !1
	};
	Aa.prototype.all = function(a) {
		var b = this.Ac;
		b.Pi = null;
		var c = b.F,
			d = b.n,
			e = d.length;
		this.zc = e;
		for (e -= 1; 0 <= e; e--) {
			if (!a(d[e])) return !1;
			b.F !== c && w.Na(b)
		}
		return !0
	};
	Aa.prototype.each = function(a) {
		var b = this.Ac;
		b.Pi = null;
		var c = b.F,
			d = b.n,
			e = d.length;
		this.zc = e;
		for (e -= 1; 0 <= e; e--) a(d[e]), b.F !== c && w.Na(b);
		return this
	};
	Aa.prototype.map = function(a) {
		var b = this.Ac;
		b.Pi = null;
		var c = b.F,
			d = [],
			e = b.n,
			f = e.length;
		this.zc = f;
		for (f -= 1; 0 <= f; f--) d.push(a(e[f])), b.F !== c && w.Na(b);
		a = new H;
		a.n = d;
		a.Lc();
		return a.i
	};
	Aa.prototype.filter = function(a) {
		var b = this.Ac;
		b.Pi = null;
		var c = b.F,
			d = [],
			e = b.n,
			f = e.length;
		this.zc = f;
		for (f -= 1; 0 <= f; f--) {
			var h = e[f];
			a(h) && d.push(h);
			b.F !== c && w.Na(b)
		}
		a = new H(b.na);
		a.n = d;
		a.Lc();
		return a.i
	};
	Aa.prototype.concat = function(a) {
		this.Ac.Pi = null;
		return new xa(this, a.i)
	};
	w.u(Aa, {
		count: "count"
	}, function() {
		return this.Ac.n.length
	});
	Aa.prototype.Nf = function() {
		this.key = -1;
		this.value = null;
		this.Sa = -1;
		this.Ac.Pi = this
	};
	Aa.prototype.toString = function() {
		return "ListIteratorBackwards(" + this.zc + "/" + this.Ac.count + ")"
	};

	function H(a) {
		w.oc(this);
		this.P = !1;
		this.n = [];
		this.F = 0;
		this.Pi = this.Qb = null;
		void 0 === a || null === a ? this.na = null : "string" === typeof a ? "object" === a || "string" === a || "number" === a || "boolean" === a || "function" === a ? this.na = a : w.Fa(a, "the string 'object', 'number', 'string', 'boolean', or 'function'", "List constructor: type") : "function" === typeof a ? this.na = a === Object ? "object" : a === String ? "string" : a === Number ? "number" : a === Boolean ? "boolean" : a === Function ? "function" : a : w.Fa(a, "null, a primitive type name, or a class type",
			"List constructor: type")
	}
	w.ga("List", H);
	H.prototype.Lc = function() {
		var a = this.F;
		a++;
		999999999 < a && (a = 0);
		this.F = a
	};
	H.prototype.freeze = H.prototype.freeze = function() {
		this.P = !0;
		return this
	};
	H.prototype.thaw = H.prototype.Qa = function() {
		this.P = !1;
		return this
	};
	H.prototype.toString = function() {
		return "List(" + w.getTypeName(this.na) + ")#" + w.Pd(this)
	};
	H.prototype.add = H.prototype.add = function(a) {
		null !== a && (this.P && w.ma(this, a), this.n.push(a), this.Lc())
	};
	H.prototype.push = H.prototype.push = function(a) {
		this.add(a)
	};
	H.prototype.addAll = H.prototype.Nc = function(a) {
		if (null === a) return this;
		this.P && w.ma(this);
		var b = this.n;
		if (w.isArray(a))
			for (var c = w.Za(a), d = 0; d < c; d++) {
				var e = w.Ba(a, d);
				b.push(e)
			} else
				for (a = a.i; a.next();) e = a.value, b.push(e);
		this.Lc();
		return this
	};
	H.prototype.clear = H.prototype.clear = function() {
		this.P && w.ma(this);
		this.n.length = 0;
		this.Lc()
	};
	H.prototype.contains = H.prototype.contains = function(a) {
		return null === a ? !1 : -1 !== this.n.indexOf(a)
	};
	H.prototype.has = H.prototype.has = function(a) {
		return this.contains(a)
	};
	H.prototype.indexOf = H.prototype.indexOf = function(a) {
		return null === a ? -1 : this.n.indexOf(a)
	};
	H.prototype.elt = H.prototype.ea = function(a) {
		var b = this.n;
		(0 > a || a >= b.length) && w.Fa(a, "0 <= i < length", H, "elt:i");
		return b[a]
	};
	H.prototype.get = H.prototype.get = function(a) {
		return this.ea(a)
	};
	H.prototype.setElt = H.prototype.kg = function(a, b) {
		var c = this.n;
		(0 > a || a >= c.length) && w.Fa(a, "0 <= i < length", H, "setElt:i");
		this.P && w.ma(this, a);
		c[a] = b
	};
	H.prototype.set = H.prototype.set = function(a, b) {
		this.kg(a, b)
	};
	H.prototype.first = H.prototype.first = function() {
		var a = this.n;
		return 0 === a.length ? null : a[0]
	};
	H.prototype.last = H.prototype.ge = function() {
		var a = this.n,
			b = a.length;
		return 0 < b ? a[b - 1] : null
	};
	H.prototype.pop = H.prototype.pop = function() {
		this.P && w.ma(this);
		var a = this.n;
		return 0 < a.length ? a.pop() : null
	};
	H.prototype.any = function(a) {
		for (var b = this.n, c = this.F, d = b.length, e = 0; e < d; e++) {
			if (a(b[e])) return !0;
			this.F !== c && w.Na(this)
		}
		return !1
	};
	H.prototype.all = function(a) {
		for (var b = this.n, c = this.F, d = b.length, e = 0; e < d; e++) {
			if (!a(b[e])) return !1;
			this.F !== c && w.Na(this)
		}
		return !0
	};
	H.prototype.each = function(a) {
		for (var b = this.n, c = this.F, d = b.length, e = 0; e < d; e++) a(b[e]), this.F !== c && w.Na(this);
		return this
	};
	H.prototype.map = function(a) {
		for (var b = new H, c = [], d = this.n, e = this.F, f = d.length, h = 0; h < f; h++) c.push(a(d[h])), this.F !== e && w.Na(this);
		b.n = c;
		b.Lc();
		return b
	};
	H.prototype.filter = function(a) {
		for (var b = new H(this.na), c = [], d = this.n, e = this.F, f = d.length, h = 0; h < f; h++) {
			var k = d[h];
			a(k) && c.push(k);
			this.F !== e && w.Na(this)
		}
		b.n = c;
		b.Lc();
		return b
	};
	H.prototype.concat = function(a) {
		return this.copy().Nc(a)
	};
	H.prototype.insertAt = H.prototype.Rd = function(a, b) {
		0 > a && w.Fa(a, ">= 0", H, "insertAt:i");
		this.P && w.ma(this, a);
		var c = this.n;
		a >= c.length ? c.push(b) : c.splice(a, 0, b);
		this.Lc();
		return !0
	};
	H.prototype.remove = H.prototype["delete"] = H.prototype.remove = function(a) {
		if (null === a) return !1;
		this.P && w.ma(this, a);
		var b = this.n;
		a = b.indexOf(a);
		if (-1 === a) return !1;
		a === b.length - 1 ? b.pop() : b.splice(a, 1);
		this.Lc();
		return !0
	};
	H.prototype.removeAt = H.prototype.dd = function(a) {
		var b = this.n;
		(0 > a || a >= b.length) && w.Fa(a, "0 <= i < length", H, "removeAt:i");
		this.P && w.ma(this, a);
		a === b.length - 1 ? b.pop() : b.splice(a, 1);
		this.Lc()
	};
	H.prototype.removeRange = H.prototype.removeRange = function(a, b) {
		var c = this.n,
			d = c.length;
		if (0 > a) a = 0;
		else if (a >= d) return this;
		if (0 > b) return this;
		b >= d && (b = d - 1);
		if (a > b) return this;
		this.P && w.ma(this);
		for (var e = a, f = b + 1; f < d;) c[e++] = c[f++];
		c.length = d - (b - a + 1);
		this.Lc();
		return this
	};
	H.prototype.copy = function() {
		var a = new H(this.na),
			b = this.n;
		0 < b.length && (a.n = Array.prototype.slice.call(b));
		return a
	};
	H.prototype.toArray = H.prototype.xc = function() {
		for (var a = this.n, b = this.count, c = Array(b), d = 0; d < b; d++) c[d] = a[d];
		return c
	};
	H.prototype.toSet = H.prototype.CG = function() {
		for (var a = new I(this.na), b = this.n, c = this.count, d = 0; d < c; d++) a.add(b[d]);
		return a
	};
	H.prototype.sort = H.prototype.sort = function(a) {
		this.P && w.ma(this);
		this.n.sort(a);
		this.Lc();
		return this
	};
	H.prototype.sortRange = H.prototype.Bq = function(a, b, c) {
		var d = this.n,
			e = d.length;
		void 0 === b && (b = 0);
		void 0 === c && (c = e);
		this.P && w.ma(this);
		var f = c - b;
		if (1 >= f) return this;
		(0 > b || b >= e - 1) && w.Fa(b, "0 <= from < length", H, "sortRange:from");
		if (2 === f) return c = d[b], e = d[b + 1], 0 < a(c, e) && (d[b] = e, d[b + 1] = c, this.Lc()), this;
		if (0 === b)
			if (c >= e) d.sort(a);
			else
				for (f = d.slice(0, c), f.sort(a), a = 0; a < c; a++) d[a] = f[a];
		else if (c >= e)
			for (f = d.slice(b), f.sort(a), a = b; a < e; a++) d[a] = f[a - b];
		else
			for (f = d.slice(b, c), f.sort(a), a = b; a < c; a++) d[a] = f[a -
				b];
		this.Lc();
		return this
	};
	H.prototype.reverse = H.prototype.reverse = function() {
		this.P && w.ma(this);
		this.n.reverse();
		this.Lc();
		return this
	};
	w.u(H, {
		count: "count"
	}, function() {
		return this.n.length
	});
	w.u(H, {
		size: "size"
	}, function() {
		return this.n.length
	});
	w.u(H, {
		length: "length"
	}, function() {
		return this.n.length
	});
	w.u(H, {
		i: "iterator"
	}, function() {
		if (0 >= this.n.length) return ua;
		var a = this.Qb;
		return null !== a ? (a.reset(), a) : new za(this)
	});
	w.u(H, {
		Gn: "iteratorBackwards"
	}, function() {
		if (0 >= this.n.length) return ua;
		var a = this.Pi;
		return null !== a ? (a.reset(), a) : new Aa(this)
	});

	function Ba(a) {
		this.ai = a;
		a.Qb = null;
		this.Sa = a.F;
		this.Va = null
	}
	w.be(Ba, {
		key: !0,
		value: !0
	});
	w.u(Ba, {
		i: "iterator"
	}, function() {
		return this
	});
	Ba.prototype.reset = Ba.prototype.reset = function() {
		var a = this.ai;
		a.Qb = null;
		this.Sa = a.F;
		this.Va = null
	};
	Ba.prototype.next = Ba.prototype.next = function() {
		var a = this.ai;
		if (a.F !== this.Sa) {
			if (null === this.key) return !1;
			w.Na(a)
		}
		var b = this.Va,
			b = null === b ? a.Ea : b.Xa;
		if (null !== b) return this.Va = b, this.value = b.value, this.key = b.key, !0;
		this.Nf();
		return !1
	};
	Ba.prototype.hasNext = function() {
		return this.next()
	};
	Ba.prototype.first = Ba.prototype.first = function() {
		var a = this.ai;
		this.Sa = a.F;
		a = a.Ea;
		if (null !== a) {
			this.Va = a;
			var b = a.value;
			this.key = a.key;
			return this.value = b
		}
		return null
	};
	Ba.prototype.any = function(a) {
		var b = this.ai;
		b.Qb = null;
		var c = b.F;
		this.Va = null;
		for (var d = b.Ea; null !== d;) {
			if (a(d.value)) return !0;
			b.F !== c && w.Na(b);
			d = d.Xa
		}
		return !1
	};
	Ba.prototype.all = function(a) {
		var b = this.ai;
		b.Qb = null;
		var c = b.F;
		this.Va = null;
		for (var d = b.Ea; null !== d;) {
			if (!a(d.value)) return !1;
			b.F !== c && w.Na(b);
			d = d.Xa
		}
		return !0
	};
	Ba.prototype.each = function(a) {
		var b = this.ai;
		b.Qb = null;
		var c = b.F;
		this.Va = null;
		for (var d = b.Ea; null !== d;) a(d.value), b.F !== c && w.Na(b), d = d.Xa;
		return this
	};
	Ba.prototype.map = function(a) {
		var b = this.ai;
		b.Qb = null;
		for (var c = new H, d = b.F, e = b.Ea; null !== e;) c.add(a(e.value)), b.F !== d && w.Na(b), e = e.Xa;
		return c.i
	};
	Ba.prototype.filter = function(a) {
		var b = this.ai;
		b.Qb = null;
		for (var c = new H(b.na), d = b.F, e = b.Ea; null !== e;) {
			var f = e.value;
			a(f) && c.add(f);
			b.F !== d && w.Na(b);
			e = e.Xa
		}
		return c.i
	};
	Ba.prototype.concat = function(a) {
		this.ai.Qb = null;
		return new xa(this, a.i)
	};
	w.u(Ba, {
		count: "count"
	}, function() {
		return this.ai.rd
	});
	Ba.prototype.Nf = function() {
		this.value = this.key = null;
		this.Sa = -1;
		this.ai.Qb = this
	};
	Ba.prototype.toString = function() {
		return null !== this.Va ? "SetIterator@" + this.Va.value : "SetIterator"
	};

	function I(a) {
		w.oc(this);
		this.P = !1;
		void 0 === a || null === a ? this.na = null : "string" === typeof a ? "object" === a || "string" === a || "number" === a ? this.na = a : w.Fa(a, "the string 'object', 'number' or 'string'", "Set constructor: type") : "function" === typeof a ? this.na = a === Object ? "object" : a === String ? "string" : a === Number ? "number" : a : w.Fa(a, "null, a primitive type name, or a class type", "Set constructor: type");
		this.sd = {};
		this.rd = 0;
		this.Qb = null;
		this.F = 0;
		this.Th = this.Ea = null
	}
	w.ga("Set", I);
	I.prototype.Lc = function() {
		var a = this.F;
		a++;
		999999999 < a && (a = 0);
		this.F = a
	};
	I.prototype.freeze = I.prototype.freeze = function() {
		this.P = !0;
		return this
	};
	I.prototype.thaw = I.prototype.Qa = function() {
		this.P = !1;
		return this
	};
	I.prototype.toString = function() {
		return "Set(" + w.getTypeName(this.na) + ")#" + w.Pd(this)
	};
	I.prototype.add = I.prototype.add = function(a) {
		if (null === a) return !1;
		this.P && w.ma(this, a);
		var b = a;
		w.Pa(a) && (b = w.Wp(a));
		return void 0 === this.sd[b] ? (this.rd++, a = new Ca(a, a), this.sd[b] = a, b = this.Th, null === b ? this.Ea = a : (a.fp = b, b.Xa = a), this.Th = a, this.Lc(), !0) : !1
	};
	I.prototype.addAll = I.prototype.Nc = function(a) {
		if (null === a) return this;
		this.P && w.ma(this);
		if (w.isArray(a))
			for (var b = w.Za(a), c = 0; c < b; c++) this.add(w.Ba(a, c));
		else
			for (a = a.i; a.next();) this.add(a.value);
		return this
	};
	I.prototype.contains = I.prototype.contains = function(a) {
		if (null === a) return !1;
		var b = a;
		return w.Pa(a) && (b = w.Pd(a), void 0 === b) ? !1 : void 0 !== this.sd[b]
	};
	I.prototype.has = I.prototype.has = function(a) {
		return this.contains(a)
	};
	I.prototype.containsAll = function(a) {
		if (null === a) return !0;
		for (a = a.i; a.next();)
			if (!this.contains(a.value)) return !1;
		return !0
	};
	I.prototype.containsAny = function(a) {
		if (null === a) return !0;
		for (a = a.i; a.next();)
			if (this.contains(a.value)) return !0;
		return !1
	};
	I.prototype.first = I.prototype.first = function() {
		var a = this.Ea;
		return null === a ? null : a.value
	};
	I.prototype.any = function(a) {
		for (var b = this.F, c = this.Ea; null !== c;) {
			if (a(c.value)) return !0;
			this.F !== b && w.Na(this);
			c = c.Xa
		}
		return !1
	};
	I.prototype.all = function(a) {
		for (var b = this.F, c = this.Ea; null !== c;) {
			if (!a(c.value)) return !1;
			this.F !== b && w.Na(this);
			c = c.Xa
		}
		return !0
	};
	I.prototype.each = function(a) {
		for (var b = this.F, c = this.Ea; null !== c;) a(c.value), this.F !== b && w.Na(this), c = c.Xa;
		return this
	};
	I.prototype.map = function(a) {
		for (var b = new I, c = this.F, d = this.Ea; null !== d;) b.add(a(d.value)), this.F !== c && w.Na(this), d = d.Xa;
		return b
	};
	I.prototype.filter = function(a) {
		for (var b = new I(this.na), c = this.F, d = this.Ea; null !== d;) {
			var e = d.value;
			a(e) && b.add(e);
			this.F !== c && w.Na(this);
			d = d.Xa
		}
		return b
	};
	I.prototype.concat = function(a) {
		return this.copy().Nc(a)
	};
	I.prototype.remove = I.prototype["delete"] = I.prototype.remove = function(a) {
		if (null === a) return !1;
		this.P && w.ma(this, a);
		var b = a;
		if (w.Pa(a) && (b = w.Pd(a), void 0 === b)) return !1;
		a = this.sd[b];
		if (void 0 === a) return !1;
		var c = a.Xa,
			d = a.fp;
		null !== c && (c.fp = d);
		null !== d && (d.Xa = c);
		this.Ea === a && (this.Ea = c);
		this.Th === a && (this.Th = d);
		delete this.sd[b];
		this.rd--;
		this.Lc();
		return !0
	};
	I.prototype.removeAll = I.prototype.jy = function(a) {
		if (null === a) return this;
		this.P && w.ma(this);
		if (w.isArray(a))
			for (var b = w.Za(a), c = 0; c < b; c++) this.remove(w.Ba(a, c));
		else
			for (a = a.i; a.next();) this.remove(a.value);
		return this
	};
	I.prototype.retainAll = function(a) {
		if (null === a || 0 === this.count) return this;
		this.P && w.ma(this);
		var b = new I(this.na);
		b.Nc(a);
		a = [];
		for (var c = this.i; c.next();) {
			var d = c.value;
			b.contains(d) || a.push(d)
		}
		this.jy(a);
		return this
	};
	I.prototype.clear = I.prototype.clear = function() {
		this.P && w.ma(this);
		this.sd = {};
		this.rd = 0;
		this.Th = this.Ea = null;
		this.Lc()
	};
	I.prototype.copy = function() {
		var a = new I(this.na),
			b = this.sd,
			c;
		for (c in b) a.add(b[c].value);
		return a
	};
	I.prototype.toArray = I.prototype.xc = function() {
		var a = Array(this.rd),
			b = this.sd,
			c = 0,
			d;
		for (d in b) a[c] = b[d].value, c++;
		return a
	};
	I.prototype.toList = function() {
		var a = new H(this.na),
			b = this.sd,
			c;
		for (c in b) a.add(b[c].value);
		return a
	};
	w.u(I, {
		count: "count"
	}, function() {
		return this.rd
	});
	w.u(I, {
		size: "size"
	}, function() {
		return this.rd
	});
	w.u(I, {
		i: "iterator"
	}, function() {
		if (0 >= this.rd) return ua;
		var a = this.Qb;
		return null !== a ? (a.reset(), a) : new Ba(this)
	});

	function Da(a) {
		this.Ga = a;
		this.Sa = a.F;
		this.Va = null
	}
	w.be(Da, {
		key: !0,
		value: !0
	});
	w.u(Da, {
		i: "iterator"
	}, function() {
		return this
	});
	Da.prototype.reset = Da.prototype.reset = function() {
		this.Sa = this.Ga.F;
		this.Va = null
	};
	Da.prototype.next = Da.prototype.next = function() {
		var a = this.Ga;
		if (a.F !== this.Sa) {
			if (null === this.key) return !1;
			w.Na(a)
		}
		var b = this.Va,
			b = null === b ? a.Ea : b.Xa;
		if (null !== b) return this.Va = b, this.value = this.key = a = b.key, !0;
		this.Nf();
		return !1
	};
	Da.prototype.hasNext = function() {
		return this.next()
	};
	Da.prototype.first = Da.prototype.first = function() {
		var a = this.Ga;
		this.Sa = a.F;
		a = a.Ea;
		return null !== a ? (this.Va = a, this.value = this.key = a = a.key) : null
	};
	Da.prototype.any = function(a) {
		var b = this.Ga,
			c = b.F;
		this.Va = null;
		for (var d = b.Ea; null !== d;) {
			if (a(d.key)) return !0;
			b.F !== c && w.Na(b);
			d = d.Xa
		}
		return !1
	};
	Da.prototype.all = function(a) {
		var b = this.Ga,
			c = b.F;
		this.Va = null;
		for (var d = b.Ea; null !== d;) {
			if (!a(d.key)) return !1;
			b.F !== c && w.Na(b);
			d = d.Xa
		}
		return !0
	};
	Da.prototype.each = function(a) {
		var b = this.Ga,
			c = b.F;
		this.Va = null;
		for (var d = b.Ea; null !== d;) a(d.key), b.F !== c && w.Na(b), d = d.Xa;
		return this
	};
	Da.prototype.map = function(a) {
		var b = this.Ga,
			c = b.F;
		this.Va = null;
		for (var d = new H, e = b.Ea; null !== e;) d.add(a(e.key)), b.F !== c && w.Na(b), e = e.Xa;
		return d.i
	};
	Da.prototype.filter = function(a) {
		var b = this.Ga,
			c = b.F;
		this.Va = null;
		for (var d = new H(b.Sh), e = b.Ea; null !== e;) {
			var f = e.key;
			a(f) && d.add(f);
			b.F !== c && w.Na(b);
			e = e.Xa
		}
		return d.i
	};
	Da.prototype.concat = function(a) {
		return new xa(this, a.i)
	};
	w.u(Da, {
		count: "count"
	}, function() {
		return this.Ga.rd
	});
	Da.prototype.Nf = function() {
		this.value = this.key = null;
		this.Sa = -1
	};
	Da.prototype.toString = function() {
		return null !== this.Va ? "MapKeySetIterator@" + this.Va.value : "MapKeySetIterator"
	};

	function Ea(a) {
		w.oc(this);
		this.P = !0;
		this.Ga = a
	}
	w.La(Ea, I);
	Ea.prototype.freeze = function() {
		return this
	};
	Ea.prototype.Qa = function() {
		return this
	};
	Ea.prototype.toString = function() {
		return "MapKeySet(" + this.Ga.toString() + ")"
	};
	Ea.prototype.add = Ea.prototype.add = function() {
		w.k("This Set is read-only: " + this.toString());
		return !1
	};
	Ea.prototype.set = Ea.prototype.set = function() {
		w.k("This Set is read-only: " + this.toString());
		return !1
	};
	Ea.prototype.contains = Ea.prototype.contains = function(a) {
		return this.Ga.contains(a)
	};
	Ea.prototype.has = Ea.prototype.has = function(a) {
		return this.contains(a)
	};
	Ea.prototype.remove = Ea.prototype["delete"] = Ea.prototype.remove = function() {
		w.k("This Set is read-only: " + this.toString());
		return !1
	};
	Ea.prototype.clear = Ea.prototype.clear = function() {
		w.k("This Set is read-only: " + this.toString())
	};
	Ea.prototype.first = Ea.prototype.first = function() {
		var a = this.Ga.Ea;
		return null !== a ? a.key : null
	};
	Ea.prototype.any = function(a) {
		for (var b = this.Ga.Ea; null !== b;) {
			if (a(b.key)) return !0;
			b = b.Xa
		}
		return !1
	};
	Ea.prototype.all = function(a) {
		for (var b = this.Ga.Ea; null !== b;) {
			if (!a(b.key)) return !1;
			b = b.Xa
		}
		return !0
	};
	Ea.prototype.each = function(a) {
		for (var b = this.Ga.Ea; null !== b;) a(b.key), b = b.Xa;
		return this
	};
	Ea.prototype.map = function(a) {
		for (var b = new I, c = this.Ga.Ea; null !== c;) b.add(a(c.key)), c = c.Xa;
		return b
	};
	Ea.prototype.filter = function(a) {
		for (var b = new I(this.Ga.Sh), c = this.Ga.Ea; null !== c;) {
			var d = c.key;
			a(d) && b.add(d);
			c = c.Xa
		}
		return b
	};
	Ea.prototype.concat = function(a) {
		return this.CG().Nc(a)
	};
	Ea.prototype.copy = function() {
		return new Ea(this.Ga)
	};
	Ea.prototype.toSet = Ea.prototype.CG = function() {
		var a = new I(this.Ga.Sh),
			b = this.Ga.sd,
			c;
		for (c in b) a.add(b[c].key);
		return a
	};
	Ea.prototype.toArray = Ea.prototype.xc = function() {
		var a = this.Ga.sd,
			b = Array(this.Ga.rd),
			c = 0,
			d;
		for (d in a) b[c] = a[d].key, c++;
		return b
	};
	Ea.prototype.toList = function() {
		var a = new H(this.Ga.Sh),
			b = this.Ga.sd,
			c;
		for (c in b) a.add(b[c].key);
		return a
	};
	w.u(Ea, {
		count: "count"
	}, function() {
		return this.Ga.rd
	});
	w.u(Ea, {
		size: "size"
	}, function() {
		return this.Ga.rd
	});
	w.u(Ea, {
		i: "iterator"
	}, function() {
		return 0 >= this.Ga.rd ? ua : new Da(this.Ga)
	});

	function Fa(a) {
		this.Ga = a;
		a.Qi = null;
		this.Sa = a.F;
		this.Va = null
	}
	w.be(Fa, {
		key: !0,
		value: !0
	});
	w.u(Fa, {
		i: "iterator"
	}, function() {
		return this
	});
	Fa.prototype.reset = Fa.prototype.reset = function() {
		var a = this.Ga;
		a.Qi = null;
		this.Sa = a.F;
		this.Va = null
	};
	Fa.prototype.next = Fa.prototype.next = function() {
		var a = this.Ga;
		if (a.F !== this.Sa) {
			if (null === this.key) return !1;
			w.Na(a)
		}
		var b = this.Va,
			b = null === b ? a.Ea : b.Xa;
		if (null !== b) return this.Va = b, this.value = b.value, this.key = b.key, !0;
		this.Nf();
		return !1
	};
	Fa.prototype.hasNext = function() {
		return this.next()
	};
	Fa.prototype.first = Fa.prototype.first = function() {
		var a = this.Ga;
		this.Sa = a.F;
		a = a.Ea;
		if (null !== a) {
			this.Va = a;
			var b = a.value;
			this.key = a.key;
			return this.value = b
		}
		return null
	};
	Fa.prototype.any = function(a) {
		var b = this.Ga;
		b.Qi = null;
		var c = b.F;
		this.Va = null;
		for (var d = b.Ea; null !== d;) {
			if (a(d.value)) return !0;
			b.F !== c && w.Na(b);
			d = d.Xa
		}
		return !1
	};
	Fa.prototype.all = function(a) {
		var b = this.Ga;
		b.Qi = null;
		var c = b.F;
		this.Va = null;
		for (var d = b.Ea; null !== d;) {
			if (!a(d.value)) return !1;
			b.F !== c && w.Na(b);
			d = d.Xa
		}
		return !0
	};
	Fa.prototype.each = function(a) {
		var b = this.Ga;
		b.Qi = null;
		var c = b.F;
		this.Va = null;
		for (var d = b.Ea; null !== d;) a(d.value), b.F !== c && w.Na(b), d = d.Xa;
		return this
	};
	Fa.prototype.map = function(a) {
		var b = this.Ga;
		b.Qi = null;
		var c = b.F;
		this.Va = null;
		for (var d = new H, e = b.Ea; null !== e;) d.add(a(e.value)), b.F !== c && w.Na(b), e = e.Xa;
		return d.i
	};
	Fa.prototype.filter = function(a) {
		var b = this.Ga;
		b.Qi = null;
		var c = b.F;
		this.Va = null;
		for (var d = new H(b.Sh), e = b.Ea; null !== e;) {
			var f = e.value;
			a(f) && d.add(f);
			b.F !== c && w.Na(b);
			e = e.Xa
		}
		return d.i
	};
	Fa.prototype.concat = function(a) {
		this.Ga.Qi = null;
		return new xa(this, a.i)
	};
	w.u(Fa, {
		count: "count"
	}, function() {
		return this.Ga.rd
	});
	Fa.prototype.Nf = function() {
		this.value = this.key = null;
		this.Sa = -1;
		this.Ga.Qi = this
	};
	Fa.prototype.toString = function() {
		return null !== this.Va ? "MapValueSetIterator@" + this.Va.value : "MapValueSetIterator"
	};

	function Ca(a, b) {
		this.key = a;
		this.value = b;
		this.fp = this.Xa = null
	}
	w.be(Ca, {
		key: !0,
		value: !0
	});
	Ca.prototype.toString = function() {
		return "{" + this.key + ":" + this.value + "}"
	};

	function Ha(a) {
		this.Ga = a;
		a.Qb = null;
		this.Sa = a.F;
		this.Va = null
	}
	w.be(Ha, {
		key: !0,
		value: !0
	});
	w.u(Ha, {
		i: "iterator"
	}, function() {
		return this
	});
	Ha.prototype.reset = Ha.prototype.reset = function() {
		var a = this.Ga;
		a.Qb = null;
		this.Sa = a.F;
		this.Va = null
	};
	Ha.prototype.next = Ha.prototype.next = function() {
		var a = this.Ga;
		if (a.F !== this.Sa) {
			if (null === this.key) return !1;
			w.Na(a)
		}
		var b = this.Va,
			b = null === b ? a.Ea : b.Xa;
		if (null !== b) return this.Va = b, this.key = b.key, this.value = b.value, !0;
		this.Nf();
		return !1
	};
	Ha.prototype.hasNext = function() {
		return this.next()
	};
	Ha.prototype.first = Ha.prototype.first = function() {
		var a = this.Ga;
		this.Sa = a.F;
		a = a.Ea;
		return null !== a ? (this.Va = a, this.key = a.key, this.value = a.value, a) : null
	};
	Ha.prototype.any = function(a) {
		var b = this.Ga;
		b.Qb = null;
		var c = b.F;
		this.Va = null;
		for (var d = b.Ea; null !== d;) {
			if (a(d)) return !0;
			b.F !== c && w.Na(b);
			d = d.Xa
		}
		return !1
	};
	Ha.prototype.all = function(a) {
		var b = this.Ga;
		b.Qb = null;
		var c = b.F;
		this.Va = null;
		for (var d = b.Ea; null !== d;) {
			if (!a(d)) return !1;
			b.F !== c && w.Na(b);
			d = d.Xa
		}
		return !0
	};
	Ha.prototype.each = function(a) {
		var b = this.Ga;
		b.Qb = null;
		var c = b.F;
		this.Va = null;
		for (var d = b.Ea; null !== d;) a(d), b.F !== c && w.Na(b), d = d.Xa;
		return this
	};
	Ha.prototype.map = function(a) {
		var b = this.Ga;
		b.Qb = null;
		var c = b.F;
		this.Va = null;
		for (var d = new H, e = b.Ea; null !== e;) d.add(a(e)), b.F !== c && w.Na(b), e = e.Xa;
		return d.i
	};
	Ha.prototype.filter = function(a) {
		var b = this.Ga;
		b.Qb = null;
		var c = b.F;
		this.Va = null;
		for (var d = new H, e = b.Ea; null !== e;) a(e) && d.add(e), b.F !== c && w.Na(b), e = e.Xa;
		return d.i
	};
	Ha.prototype.concat = function(a) {
		this.Ga.Qb = null;
		return new xa(this, a.i)
	};
	w.u(Ha, {
		count: "count"
	}, function() {
		return this.Ga.rd
	});
	Ha.prototype.Nf = function() {
		this.value = this.key = null;
		this.Sa = -1;
		this.Ga.Qb = this
	};
	Ha.prototype.toString = function() {
		return null !== this.Va ? "MapIterator@" + this.Va : "MapIterator"
	};

	function ma(a, b) {
		w.oc(this);
		this.P = !1;
		void 0 === a || null === a ? this.Sh = null : "string" === typeof a ? "object" === a || "string" === a || "number" === a ? this.Sh = a : w.Fa(a, "the string 'object', 'number' or 'string'", "Map constructor: keytype") : "function" === typeof a ? this.Sh = a === Object ? "object" : a === String ? "string" : a === Number ? "number" : a : w.Fa(a, "null, a primitive type name, or a class type", "Map constructor: keytype");
		void 0 === b || null === b ? this.At = null : "string" === typeof b ? "object" === b || "string" === b || "boolean" === b || "number" ===
			b || "function" === b ? this.At = b : w.Fa(b, "the string 'object', 'number', 'string', 'boolean', or 'function'", "Map constructor: valtype") : "function" === typeof b ? this.At = b === Object ? "object" : b === String ? "string" : b === Number ? "number" : b === Boolean ? "boolean" : b === Function ? "function" : b : w.Fa(b, "null, a primitive type name, or a class type", "Map constructor: valtype");
		this.sd = {};
		this.rd = 0;
		this.Qi = this.Qb = null;
		this.F = 0;
		this.Th = this.Ea = null
	}
	w.ga("Map", ma);
	ma.prototype.Lc = function() {
		var a = this.F;
		a++;
		999999999 < a && (a = 0);
		this.F = a
	};
	ma.prototype.freeze = ma.prototype.freeze = function() {
		this.P = !0;
		return this
	};
	ma.prototype.thaw = ma.prototype.Qa = function() {
		this.P = !1;
		return this
	};
	ma.prototype.toString = function() {
		return "Map(" + w.getTypeName(this.Sh) + "," + w.getTypeName(this.At) + ")#" + w.Pd(this)
	};
	ma.prototype.add = ma.prototype.add = function(a, b) {
		this.P && w.ma(this, a);
		var c = a;
		w.Pa(a) && (c = w.Wp(a));
		var d = this.sd[c];
		if (void 0 === d) return this.rd++, d = new Ca(a, b), this.sd[c] = d, c = this.Th, null === c ? this.Ea = d : (d.fp = c, c.Xa = d), this.Th = d, this.Lc(), !0;
		d.value = b;
		return !1
	};
	ma.prototype.set = ma.prototype.set = function(a, b) {
		return this.add(a, b)
	};
	ma.prototype.addAll = ma.prototype.Nc = function(a) {
		if (null === a) return this;
		if (w.isArray(a))
			for (var b = w.Za(a), c = 0; c < b; c++) {
				var d = w.Ba(a, c);
				this.add(d.key, d.value)
			} else
				for (a = a.i; a.next();) this.add(a.key, a.value);
		return this
	};
	ma.prototype.first = ma.prototype.first = function() {
		return this.Ea
	};
	ma.prototype.any = function(a) {
		for (var b = this.F, c = this.Ea; null !== c;) {
			if (a(c)) return !0;
			this.F !== b && w.Na(this);
			c = c.Xa
		}
		return !1
	};
	ma.prototype.all = function(a) {
		for (var b = this.F, c = this.Ea; null !== c;) {
			if (!a(c)) return !1;
			this.F !== b && w.Na(this);
			c = c.Xa
		}
		return !0
	};
	ma.prototype.each = function(a) {
		for (var b = this.F, c = this.Ea; null !== c;) a(c), this.F !== b && w.Na(this), c = c.Xa;
		return this
	};
	ma.prototype.map = function(a) {
		for (var b = new ma(this.Sh), c = this.F, d = this.Ea; null !== d;) b.add(d.key, a(d)), this.F !== c && w.Na(this), d = d.Xa;
		return b
	};
	ma.prototype.filter = function(a) {
		for (var b = new ma(this.Sh, this.At), c = this.F, d = this.Ea; null !== d;) a(d) && b.add(d.key, d.value), this.F !== c && w.Na(this), d = d.Xa;
		return b
	};
	ma.prototype.concat = function(a) {
		return this.copy().Nc(a)
	};
	ma.prototype.contains = ma.prototype.contains = function(a) {
		var b = a;
		return w.Pa(a) && (b = w.Pd(a), void 0 === b) ? !1 : void 0 !== this.sd[b]
	};
	ma.prototype.has = ma.prototype.has = function(a) {
		return this.contains(a)
	};
	ma.prototype.getValue = ma.prototype.ka = function(a) {
		var b = a;
		if (w.Pa(a) && (b = w.Pd(a), void 0 === b)) return null;
		a = this.sd[b];
		return void 0 === a ? null : a.value
	};
	ma.prototype.get = ma.prototype.get = function(a) {
		return this.ka(a)
	};
	ma.prototype.remove = ma.prototype["delete"] = ma.prototype.remove = function(a) {
		if (null === a) return !1;
		this.P && w.ma(this, a);
		var b = a;
		if (w.Pa(a) && (b = w.Pd(a), void 0 === b)) return !1;
		a = this.sd[b];
		if (void 0 === a) return !1;
		var c = a.Xa,
			d = a.fp;
		null !== c && (c.fp = d);
		null !== d && (d.Xa = c);
		this.Ea === a && (this.Ea = c);
		this.Th === a && (this.Th = d);
		delete this.sd[b];
		this.rd--;
		this.Lc();
		return !0
	};
	ma.prototype.clear = ma.prototype.clear = function() {
		this.P && w.ma(this);
		this.sd = {};
		this.rd = 0;
		this.Th = this.Ea = null;
		this.Lc()
	};
	ma.prototype.copy = function() {
		var a = new ma(this.Sh, this.At),
			b = this.sd,
			c;
		for (c in b) {
			var d = b[c];
			a.add(d.key, d.value)
		}
		return a
	};
	ma.prototype.toArray = ma.prototype.xc = function() {
		var a = this.sd,
			b = Array(this.rd),
			c = 0,
			d;
		for (d in a) {
			var e = a[d];
			b[c] = new Ca(e.key, e.value);
			c++
		}
		return b
	};
	ma.prototype.toKeySet = ma.prototype.Jj = function() {
		return new Ea(this)
	};
	w.u(ma, {
		count: "count"
	}, function() {
		return this.rd
	});
	w.u(ma, {
		size: "size"
	}, function() {
		return this.rd
	});
	w.u(ma, {
		i: "iterator"
	}, function() {
		if (0 >= this.count) return ua;
		var a = this.Qb;
		return null !== a ? (a.reset(), a) : new Ha(this)
	});
	w.u(ma, {
		IF: "iteratorKeys"
	}, function() {
		return 0 >= this.count ? ua : new Da(this)
	});
	w.u(ma, {
		JF: "iteratorValues"
	}, function() {
		if (0 >= this.count) return ua;
		var a = this.Qi;
		return null !== a ? (a.reset(), a) : new Fa(this)
	});

	function y(a, b) {
		void 0 === a ? this.y = this.x = 0 : (this.x = a, this.y = b)
	}
	w.ga("Point", y);
	w.mi(y);
	w.be(y, {
		x: !0,
		y: !0
	});
	y.prototype.assign = function(a) {
		this.x = a.x;
		this.y = a.y
	};
	y.prototype.setTo = y.prototype.m = function(a, b) {
		this.x = a;
		this.y = b;
		return this
	};
	y.prototype.set = y.prototype.set = function(a) {
		this.x = a.x;
		this.y = a.y;
		return this
	};
	y.prototype.copy = function() {
		var a = new y;
		a.x = this.x;
		a.y = this.y;
		return a
	};
	y.prototype.Ha = function() {
		Object.freeze(this);
		return this
	};
	y.prototype.S = function() {
		return Object.isFrozen(this) ? this : this.copy().freeze()
	};
	y.prototype.freeze = function() {
		return this
	};
	y.prototype.Qa = function() {
		Object.isFrozen(this) && w.k("cannot thaw constant: " + this);
		return this
	};
	y.parse = function(a) {
		if ("string" === typeof a) {
			a = a.split(" ");
			for (var b = 0, c = 0;
				"" === a[b];) b++;
			var d = a[b++];
			d && (c = parseFloat(d));
			for (var e = 0;
				"" === a[b];) b++;
			(d = a[b++]) && (e = parseFloat(d));
			return new y(c, e)
		}
		return new y
	};
	y.stringify = function(a) {
		return a.x.toString() + " " + a.y.toString()
	};
	y.prototype.toString = function() {
		return "Point(" + this.x + "," + this.y + ")"
	};
	y.prototype.equals = y.prototype.L = function(a) {
		return a instanceof y ? this.x === a.x && this.y === a.y : !1
	};
	y.prototype.equalTo = y.prototype.wx = function(a, b) {
		return this.x === a && this.y === b
	};
	y.prototype.equalsApprox = y.prototype.Oc = function(a) {
		return J(this.x, a.x) && J(this.y, a.y)
	};
	y.prototype.add = y.prototype.add = function(a) {
		this.x += a.x;
		this.y += a.y;
		return this
	};
	y.prototype.subtract = y.prototype.Hj = function(a) {
		this.x -= a.x;
		this.y -= a.y;
		return this
	};
	y.prototype.offset = y.prototype.offset = function(a, b) {
		this.x += a;
		this.y += b;
		return this
	};
	y.prototype.rotate = y.prototype.rotate = function(a) {
		if (0 === a) return this;
		var b = this.x,
			c = this.y;
		if (0 === b && 0 === c) return this;
		var d = 0,
			e = 0;
		360 <= a ? a -= 360 : 0 > a && (a += 360);
		90 === a ? (d = 0, e = 1) : 180 === a ? (d = -1, e = 0) : 270 === a ? (d = 0, e = -1) : (a = a * Math.PI / 180, d = Math.cos(a), e = Math.sin(a));
		this.x = d * b - e * c;
		this.y = e * b + d * c;
		return this
	};
	y.prototype.scale = y.prototype.scale = function(a, b) {
		this.x *= a;
		this.y *= b;
		return this
	};
	y.prototype.distanceSquaredPoint = y.prototype.Bf = function(a) {
		var b = a.x - this.x;
		a = a.y - this.y;
		return b * b + a * a
	};
	y.prototype.distanceSquared = y.prototype.Qp = function(a, b) {
		var c = a - this.x,
			d = b - this.y;
		return c * c + d * d
	};
	y.prototype.normalize = y.prototype.normalize = function() {
		var a = this.x,
			b = this.y,
			c = Math.sqrt(a * a + b * b);
		0 < c && (this.x = a / c, this.y = b / c);
		return this
	};
	y.prototype.directionPoint = y.prototype.Pb = function(a) {
		return Ka(a.x - this.x, a.y - this.y)
	};
	y.prototype.direction = y.prototype.direction = function(a, b) {
		return Ka(a - this.x, b - this.y)
	};

	function Ka(a, b) {
		if (0 === a) return 0 < b ? 90 : 0 > b ? 270 : 0;
		if (0 === b) return 0 < a ? 0 : 180;
		if (isNaN(a) || isNaN(b)) return 0;
		var c = 180 * Math.atan(Math.abs(b / a)) / Math.PI;
		0 > a ? c = 0 > b ? c + 180 : 180 - c : 0 > b && (c = 360 - c);
		return c
	}
	y.prototype.projectOntoLineSegment = function(a, b, c, d) {
		La(a, b, c, d, this.x, this.y, this);
		return this
	};
	y.prototype.projectOntoLineSegmentPoint = function(a, b) {
		La(a.x, a.y, b.x, b.y, this.x, this.y, this);
		return this
	};
	y.prototype.snapToGrid = function(a, b, c, d) {
		Na(this.x, this.y, a, b, c, d, this);
		return this
	};
	y.prototype.snapToGridPoint = function(a, b) {
		Na(this.x, this.y, a.x, a.y, b.width, b.height, this);
		return this
	};
	y.prototype.setRectSpot = y.prototype.Wn = function(a, b) {
		this.x = a.x + b.x * a.width + b.offsetX;
		this.y = a.y + b.y * a.height + b.offsetY;
		return this
	};
	y.prototype.setSpot = y.prototype.Xu = function(a, b, c, d, e) {
		this.x = a + e.x * c + e.offsetX;
		this.y = b + e.y * d + e.offsetY;
		return this
	};
	y.prototype.transform = function(a) {
		a.nb(this);
		return this
	};

	function Pa(a, b) {
		b.wh(a);
		return a
	}
	var Ra;
	y.distanceLineSegmentSquared = Ra = function(a, b, c, d, e, f) {
		var h = e - c,
			k = f - d,
			l = h * h + k * k;
		c -= a;
		d -= b;
		var m = -c * h - d * k;
		if (0 >= m || m >= l) return h = e - a, k = f - b, Math.min(c * c + d * d, h * h + k * k);
		a = h * d - k * c;
		return a * a / l
	};
	var Sa;
	y.distanceSquared = Sa = function(a, b, c, d) {
		a = c - a;
		b = d - b;
		return a * a + b * b
	};
	var Ta;
	y.direction = Ta = function(a, b, c, d) {
		a = c - a;
		b = d - b;
		if (0 === a) return 0 < b ? 90 : 0 > b ? 270 : 0;
		if (0 === b) return 0 < a ? 0 : 180;
		if (isNaN(a) || isNaN(b)) return 0;
		d = 180 * Math.atan(Math.abs(b / a)) / Math.PI;
		0 > a ? d = 0 > b ? d + 180 : 180 - d : 0 > b && (d = 360 - d);
		return d
	};
	y.prototype.isReal = y.prototype.I = function() {
		return isFinite(this.x) && isFinite(this.y)
	};

	function ia(a, b) {
		void 0 === a ? this.height = this.width = 0 : (this.width = a, this.height = b)
	}
	w.ga("Size", ia);
	w.mi(ia);
	w.be(ia, {
		width: !0,
		height: !0
	});
	ia.prototype.assign = function(a) {
		this.width = a.width;
		this.height = a.height
	};
	ia.prototype.setTo = ia.prototype.m = function(a, b) {
		this.width = a;
		this.height = b;
		return this
	};
	ia.prototype.set = ia.prototype.set = function(a) {
		this.width = a.width;
		this.height = a.height;
		return this
	};
	ia.prototype.copy = function() {
		var a = new ia;
		a.width = this.width;
		a.height = this.height;
		return a
	};
	ia.prototype.Ha = function() {
		Object.freeze(this);
		return this
	};
	ia.prototype.S = function() {
		return Object.isFrozen(this) ? this : this.copy().freeze()
	};
	ia.prototype.freeze = function() {
		return this
	};
	ia.prototype.Qa = function() {
		Object.isFrozen(this) && w.k("cannot thaw constant: " + this);
		return this
	};
	ia.parse = function(a) {
		if ("string" === typeof a) {
			a = a.split(" ");
			for (var b = 0, c = 0;
				"" === a[b];) b++;
			var d = a[b++];
			d && (c = parseFloat(d));
			for (var e = 0;
				"" === a[b];) b++;
			(d = a[b++]) && (e = parseFloat(d));
			return new ia(c, e)
		}
		return new ia
	};
	ia.stringify = function(a) {
		return a.width.toString() + " " + a.height.toString()
	};
	ia.prototype.toString = function() {
		return "Size(" + this.width + "," + this.height + ")"
	};
	ia.prototype.equals = ia.prototype.L = function(a) {
		return a instanceof ia ? this.width === a.width && this.height === a.height : !1
	};
	ia.prototype.equalTo = ia.prototype.wx = function(a, b) {
		return this.width === a && this.height === b
	};
	ia.prototype.equalsApprox = ia.prototype.Oc = function(a) {
		return J(this.width, a.width) && J(this.height, a.height)
	};
	ia.prototype.isReal = ia.prototype.I = function() {
		return isFinite(this.width) && isFinite(this.height)
	};

	function B(a, b, c, d) {
		void 0 === a ? this.height = this.width = this.y = this.x = 0 : a instanceof y ? b instanceof y ? (this.x = Math.min(a.x, b.x), this.y = Math.min(a.y, b.y), this.width = Math.abs(a.x - b.x), this.height = Math.abs(a.y - b.y)) : b instanceof ia ? (this.x = a.x, this.y = a.y, this.width = b.width, this.height = b.height) : w.k("Incorrect arguments supplied to Rect constructor") : (this.x = a, this.y = b, this.width = c, this.height = d)
	}
	w.ga("Rect", B);
	w.mi(B);
	w.be(B, {
		x: !0,
		y: !0,
		width: !0,
		height: !0
	});
	B.prototype.assign = function(a) {
		this.x = a.x;
		this.y = a.y;
		this.width = a.width;
		this.height = a.height
	};

	function Ua(a, b, c) {
		a.width = b;
		a.height = c
	}
	B.prototype.setTo = B.prototype.m = function(a, b, c, d) {
		this.x = a;
		this.y = b;
		this.width = c;
		this.height = d;
		return this
	};
	B.prototype.set = B.prototype.set = function(a) {
		this.x = a.x;
		this.y = a.y;
		this.width = a.width;
		this.height = a.height;
		return this
	};
	B.prototype.setPoint = B.prototype.Vg = function(a) {
		this.x = a.x;
		this.y = a.y;
		return this
	};
	B.prototype.setSize = function(a) {
		this.width = a.width;
		this.height = a.height;
		return this
	};
	B.prototype.copy = function() {
		var a = new B;
		a.x = this.x;
		a.y = this.y;
		a.width = this.width;
		a.height = this.height;
		return a
	};
	B.prototype.Ha = function() {
		Object.freeze(this);
		return this
	};
	B.prototype.S = function() {
		return Object.isFrozen(this) ? this : this.copy().freeze()
	};
	B.prototype.freeze = function() {
		return this
	};
	B.prototype.Qa = function() {
		Object.isFrozen(this) && w.k("cannot thaw constant: " + this);
		return this
	};
	B.parse = function(a) {
		if ("string" === typeof a) {
			a = a.split(" ");
			for (var b = 0, c = 0;
				"" === a[b];) b++;
			var d = a[b++];
			d && (c = parseFloat(d));
			for (var e = 0;
				"" === a[b];) b++;
			(d = a[b++]) && (e = parseFloat(d));
			for (var f = 0;
				"" === a[b];) b++;
			(d = a[b++]) && (f = parseFloat(d));
			for (var h = 0;
				"" === a[b];) b++;
			(d = a[b++]) && (h = parseFloat(d));
			return new B(c, e, f, h)
		}
		return new B
	};
	B.stringify = function(a) {
		return a.x.toString() + " " + a.y.toString() + " " + a.width.toString() + " " + a.height.toString()
	};
	B.prototype.toString = function() {
		return "Rect(" + this.x + "," + this.y + "," + this.width + "," + this.height + ")"
	};
	B.prototype.equals = B.prototype.L = function(a) {
		return a instanceof B ? this.x === a.x && this.y === a.y && this.width === a.width && this.height === a.height : !1
	};
	B.prototype.equalTo = B.prototype.wx = function(a, b, c, d) {
		return this.x === a && this.y === b && this.width === c && this.height === d
	};
	B.prototype.equalsApprox = B.prototype.Oc = function(a) {
		return J(this.x, a.x) && J(this.y, a.y) && J(this.width, a.width) && J(this.height, a.height)
	};

	function Va(a, b) {
		return Wa(a.x, b.x) && Wa(a.y, b.y) && Wa(a.width, b.width) && Wa(a.height, b.height)
	}
	B.prototype.containsPoint = B.prototype.Ia = function(a) {
		return this.x <= a.x && this.x + this.width >= a.x && this.y <= a.y && this.y + this.height >= a.y
	};
	B.prototype.containsRect = B.prototype.Ak = function(a) {
		return this.x <= a.x && a.x + a.width <= this.x + this.width && this.y <= a.y && a.y + a.height <= this.y + this.height
	};
	B.prototype.contains = B.prototype.contains = function(a, b, c, d) {
		void 0 === c && (c = 0);
		void 0 === d && (d = 0);
		return this.x <= a && a + c <= this.x + this.width && this.y <= b && b + d <= this.y + this.height
	};
	B.prototype.reset = function() {
		this.height = this.width = this.y = this.x = 0
	};
	B.prototype.offset = B.prototype.offset = function(a, b) {
		this.x += a;
		this.y += b;
		return this
	};
	B.prototype.inflate = B.prototype.Yf = function(a, b) {
		return Xa(this, b, a, b, a)
	};
	B.prototype.addMargin = B.prototype.Zw = function(a) {
		return Xa(this, a.top, a.right, a.bottom, a.left)
	};
	B.prototype.subtractMargin = B.prototype.PJ = function(a) {
		return Xa(this, -a.top, -a.right, -a.bottom, -a.left)
	};
	B.prototype.grow = function(a, b, c, d) {
		return Xa(this, a, b, c, d)
	};

	function Xa(a, b, c, d, e) {
		var f = a.width;
		c + e <= -f ? (a.x += f / 2, a.width = 0) : (a.x -= e, a.width += c + e);
		c = a.height;
		b + d <= -c ? (a.y += c / 2, a.height = 0) : (a.y -= b, a.height += b + d);
		return a
	}
	B.prototype.intersectRect = function(a) {
		return Ya(this, a.x, a.y, a.width, a.height)
	};
	B.prototype.intersect = B.prototype.uF = function(a, b, c, d) {
		return Ya(this, a, b, c, d)
	};

	function Ya(a, b, c, d, e) {
		var f = Math.max(a.x, b),
			h = Math.max(a.y, c);
		b = Math.min(a.x + a.width, b + d);
		c = Math.min(a.y + a.height, c + e);
		a.x = f;
		a.y = h;
		a.width = Math.max(0, b - f);
		a.height = Math.max(0, c - h);
		return a
	}
	B.prototype.intersectsRect = B.prototype.Zf = function(a) {
		return this.vF(a.x, a.y, a.width, a.height)
	};
	B.prototype.intersects = B.prototype.vF = function(a, b, c, d) {
		var e = this.width,
			f = this.x;
		if (Infinity !== e && Infinity !== c && (e += f, c += a, isNaN(c) || isNaN(e) || f > c || a > e)) return !1;
		a = this.height;
		c = this.y;
		return Infinity !== a && Infinity !== d && (a += c, d += b, isNaN(d) || isNaN(a) || c > d || b > a) ? !1 : !0
	};

	function $a(a, b) {
		var c = a.width,
			d = b.width + 10 + 10,
			e = a.x,
			f = b.x - 10;
		if (e > d + f || f > c + e) return !1;
		c = a.height;
		d = b.height + 10 + 10;
		e = a.y;
		f = b.y - 10;
		return e > d + f || f > c + e ? !1 : !0
	}
	B.prototype.unionPoint = B.prototype.vi = function(a) {
		return ab(this, a.x, a.y, 0, 0)
	};
	B.prototype.unionRect = B.prototype.Ih = function(a) {
		return ab(this, a.x, a.y, a.width, a.height)
	};
	B.prototype.union = B.prototype.HG = function(a, b, c, d) {
		void 0 === c && (c = 0);
		void 0 === d && (d = 0);
		return ab(this, a, b, c, d)
	};

	function ab(a, b, c, d, e) {
		var f = Math.min(a.x, b),
			h = Math.min(a.y, c);
		b = Math.max(a.x + a.width, b + d);
		c = Math.max(a.y + a.height, c + e);
		a.x = f;
		a.y = h;
		a.width = b - f;
		a.height = c - h;
		return a
	}
	B.prototype.setSpot = B.prototype.Xu = function(a, b, c) {
		this.x = a - c.offsetX - c.x * this.width;
		this.y = b - c.offsetY - c.y * this.height;
		return this
	};
	var db;
	B.contains = db = function(a, b, c, d, e, f, h, k) {
		void 0 === h && (h = 0);
		void 0 === k && (k = 0);
		return a <= e && e + h <= a + c && b <= f && f + k <= b + d
	};
	B.intersects = function(a, b, c, d, e, f, h, k) {
		c += a;
		h += e;
		if (a > h || e > c) return !1;
		a = d + b;
		k += f;
		return b > k || f > a ? !1 : !0
	};
	w.defineProperty(B, {
		left: "left"
	}, function() {
		return this.x
	}, function(a) {
		this.x = a
	});
	w.defineProperty(B, {
		top: "top"
	}, function() {
		return this.y
	}, function(a) {
		this.y = a
	});
	w.defineProperty(B, {
		right: "right"
	}, function() {
		return this.x + this.width
	}, function(a) {
		this.x += a - (this.x + this.width)
	});
	w.defineProperty(B, {
		bottom: "bottom"
	}, function() {
		return this.y + this.height
	}, function(a) {
		this.y += a - (this.y + this.height)
	});
	w.defineProperty(B, {
		position: "position"
	}, function() {
		return new y(this.x, this.y)
	}, function(a) {
		this.x = a.x;
		this.y = a.y
	});
	w.defineProperty(B, {
		size: "size"
	}, function() {
		return new ia(this.width, this.height)
	}, function(a) {
		this.width = a.width;
		this.height = a.height
	});
	w.defineProperty(B, {
		Nl: "center"
	}, function() {
		return new y(this.x + this.width / 2, this.y + this.height / 2)
	}, function(a) {
		this.x = a.x - this.width / 2;
		this.y = a.y - this.height / 2
	});
	w.defineProperty(B, {
		la: "centerX"
	}, function() {
		return this.x + this.width / 2
	}, function(a) {
		this.x = a - this.width / 2
	});
	w.defineProperty(B, {
		ra: "centerY"
	}, function() {
		return this.y + this.height / 2
	}, function(a) {
		this.y = a - this.height / 2
	});
	B.prototype.isReal = B.prototype.I = function() {
		return isFinite(this.x) && isFinite(this.y) && isFinite(this.width) && isFinite(this.height)
	};
	B.prototype.isEmpty = function() {
		return 0 === this.width && 0 === this.height
	};

	function hb(a, b, c, d) {
		void 0 === a ? this.left = this.bottom = this.right = this.top = 0 : void 0 === b ? this.left = this.bottom = this.right = this.top = a : void 0 === c ? (d = b, this.top = a, this.right = b, this.bottom = a, this.left = d) : void 0 !== d ? (this.top = a, this.right = b, this.bottom = c, this.left = d) : w.k("Invalid arguments to Margin constructor")
	}
	w.ga("Margin", hb);
	w.mi(hb);
	w.be(hb, {
		top: !0,
		right: !0,
		bottom: !0,
		left: !0
	});
	hb.prototype.assign = function(a) {
		this.top = a.top;
		this.right = a.right;
		this.bottom = a.bottom;
		this.left = a.left
	};
	hb.prototype.setTo = hb.prototype.m = function(a, b, c, d) {
		this.top = a;
		this.right = b;
		this.bottom = c;
		this.left = d;
		return this
	};
	hb.prototype.set = hb.prototype.set = function(a) {
		this.top = a.top;
		this.right = a.right;
		this.bottom = a.bottom;
		this.left = a.left;
		return this
	};
	hb.prototype.copy = function() {
		var a = new hb;
		a.top = this.top;
		a.right = this.right;
		a.bottom = this.bottom;
		a.left = this.left;
		return a
	};
	hb.prototype.Ha = function() {
		Object.freeze(this);
		return this
	};
	hb.prototype.S = function() {
		return Object.isFrozen(this) ? this : this.copy().freeze()
	};
	hb.prototype.freeze = function() {
		return this
	};
	hb.prototype.Qa = function() {
		Object.isFrozen(this) && w.k("cannot thaw constant: " + this);
		return this
	};
	hb.parse = function(a) {
		if ("string" === typeof a) {
			a = a.split(" ");
			for (var b = 0, c = NaN;
				"" === a[b];) b++;
			var d = a[b++];
			d && (c = parseFloat(d));
			if (isNaN(c)) return new hb;
			for (var e = NaN;
				"" === a[b];) b++;
			(d = a[b++]) && (e = parseFloat(d));
			if (isNaN(e)) return new hb(c);
			for (var f = NaN;
				"" === a[b];) b++;
			(d = a[b++]) && (f = parseFloat(d));
			if (isNaN(f)) return new hb(c, e);
			for (var h = NaN;
				"" === a[b];) b++;
			(d = a[b++]) && (h = parseFloat(d));
			return isNaN(h) ? new hb(c, e) : new hb(c, e, f, h)
		}
		return new hb
	};
	hb.stringify = function(a) {
		return a.top.toString() + " " + a.right.toString() + " " + a.bottom.toString() + " " + a.left.toString()
	};
	hb.prototype.toString = function() {
		return "Margin(" + this.top + "," + this.right + "," + this.bottom + "," + this.left + ")"
	};
	hb.prototype.equals = hb.prototype.L = function(a) {
		return a instanceof hb ? this.top === a.top && this.right === a.right && this.bottom === a.bottom && this.left === a.left : !1
	};
	hb.prototype.equalTo = hb.prototype.wx = function(a, b, c, d) {
		return this.top === a && this.right === b && this.bottom === c && this.left === d
	};
	hb.prototype.equalsApprox = hb.prototype.Oc = function(a) {
		return J(this.top, a.top) && J(this.right, a.right) && J(this.bottom, a.bottom) && J(this.left, a.left)
	};
	hb.prototype.isReal = hb.prototype.I = function() {
		return isFinite(this.top) && isFinite(this.right) && isFinite(this.bottom) && isFinite(this.left)
	};

	function ka() {
		this.m11 = 1;
		this.m21 = this.m12 = 0;
		this.m22 = 1;
		this.dy = this.dx = 0
	}
	w.mi(ka);
	w.be(ka, {
		m11: !0,
		m12: !0,
		m21: !0,
		m22: !0,
		dx: !0,
		dy: !0
	});
	ka.prototype.set = ka.prototype.set = function(a) {
		this.m11 = a.m11;
		this.m12 = a.m12;
		this.m21 = a.m21;
		this.m22 = a.m22;
		this.dx = a.dx;
		this.dy = a.dy;
		return this
	};
	ka.prototype.copy = function() {
		var a = new ka;
		a.m11 = this.m11;
		a.m12 = this.m12;
		a.m21 = this.m21;
		a.m22 = this.m22;
		a.dx = this.dx;
		a.dy = this.dy;
		return a
	};
	ka.prototype.toString = function() {
		return "Transform(" + this.m11 + "," + this.m12 + "," + this.m21 + "," + this.m22 + "," + this.dx + "," + this.dy + ")"
	};
	ka.prototype.equals = ka.prototype.L = function(a) {
		return a instanceof ka ? this.m11 === a.m11 && this.m12 === a.m12 && this.m21 === a.m21 && this.m22 === a.m22 && this.dx === a.dx && this.dy === a.dy : !1
	};
	ka.prototype.isIdentity = ka.prototype.su = function() {
		return 1 === this.m11 && 0 === this.m12 && 0 === this.m21 && 1 === this.m22 && 0 === this.dx && 0 === this.dy
	};
	ka.prototype.reset = ka.prototype.reset = function() {
		this.m11 = 1;
		this.m21 = this.m12 = 0;
		this.m22 = 1;
		this.dy = this.dx = 0;
		return this
	};
	ka.prototype.multiply = ka.prototype.multiply = function(a) {
		var b = this.m12 * a.m11 + this.m22 * a.m12,
			c = this.m11 * a.m21 + this.m21 * a.m22,
			d = this.m12 * a.m21 + this.m22 * a.m22,
			e = this.m11 * a.dx + this.m21 * a.dy + this.dx,
			f = this.m12 * a.dx + this.m22 * a.dy + this.dy;
		this.m11 = this.m11 * a.m11 + this.m21 * a.m12;
		this.m12 = b;
		this.m21 = c;
		this.m22 = d;
		this.dx = e;
		this.dy = f;
		return this
	};
	ka.prototype.multiplyInverted = ka.prototype.RF = function(a) {
		var b = 1 / (a.m11 * a.m22 - a.m12 * a.m21),
			c = a.m22 * b,
			d = -a.m12 * b,
			e = -a.m21 * b,
			f = a.m11 * b,
			h = b * (a.m21 * a.dy - a.m22 * a.dx),
			k = b * (a.m12 * a.dx - a.m11 * a.dy);
		a = this.m12 * c + this.m22 * d;
		b = this.m11 * e + this.m21 * f;
		e = this.m12 * e + this.m22 * f;
		f = this.m11 * h + this.m21 * k + this.dx;
		h = this.m12 * h + this.m22 * k + this.dy;
		this.m11 = this.m11 * c + this.m21 * d;
		this.m12 = a;
		this.m21 = b;
		this.m22 = e;
		this.dx = f;
		this.dy = h;
		return this
	};
	ka.prototype.invert = ka.prototype.NA = function() {
		var a = 1 / (this.m11 * this.m22 - this.m12 * this.m21),
			b = -this.m12 * a,
			c = -this.m21 * a,
			d = this.m11 * a,
			e = a * (this.m21 * this.dy - this.m22 * this.dx),
			f = a * (this.m12 * this.dx - this.m11 * this.dy);
		this.m11 = this.m22 * a;
		this.m12 = b;
		this.m21 = c;
		this.m22 = d;
		this.dx = e;
		this.dy = f;
		return this
	};
	ka.prototype.rotate = ka.prototype.rotate = function(a, b, c) {
		360 <= a ? a -= 360 : 0 > a && (a += 360);
		if (0 === a) return this;
		this.translate(b, c);
		var d = 0,
			e = 0;
		90 === a ? (d = 0, e = 1) : 180 === a ? (d = -1, e = 0) : 270 === a ? (d = 0, e = -1) : (e = a * Math.PI / 180, d = Math.cos(e), e = Math.sin(e));
		a = this.m12 * d + this.m22 * e;
		var f = this.m11 * -e + this.m21 * d,
			h = this.m12 * -e + this.m22 * d;
		this.m11 = this.m11 * d + this.m21 * e;
		this.m12 = a;
		this.m21 = f;
		this.m22 = h;
		this.translate(-b, -c);
		return this
	};
	ka.prototype.translate = ka.prototype.translate = function(a, b) {
		this.dx += this.m11 * a + this.m21 * b;
		this.dy += this.m12 * a + this.m22 * b;
		return this
	};
	ka.prototype.scale = ka.prototype.scale = function(a, b) {
		void 0 === b && (b = a);
		this.m11 *= a;
		this.m12 *= a;
		this.m21 *= b;
		this.m22 *= b;
		return this
	};
	ka.prototype.transformPoint = ka.prototype.nb = function(a) {
		var b = a.x,
			c = a.y;
		a.x = b * this.m11 + c * this.m21 + this.dx;
		a.y = b * this.m12 + c * this.m22 + this.dy;
		return a
	};
	ka.prototype.invertedTransformPoint = ka.prototype.wh = function(a) {
		var b = 1 / (this.m11 * this.m22 - this.m12 * this.m21),
			c = -this.m12 * b,
			d = this.m11 * b,
			e = b * (this.m12 * this.dx - this.m11 * this.dy),
			f = a.x,
			h = a.y;
		a.x = f * this.m22 * b + h * -this.m21 * b + b * (this.m21 * this.dy - this.m22 * this.dx);
		a.y = f * c + h * d + e;
		return a
	};
	ka.prototype.transformRect = ka.prototype.GG = function(a) {
		var b = a.x,
			c = a.y,
			d = b + a.width,
			e = c + a.height,
			f = this.m11,
			h = this.m12,
			k = this.m21,
			l = this.m22,
			m = this.dx,
			n = this.dy,
			p = b * f + c * k + m,
			q = b * h + c * l + n,
			r = d * f + c * k + m,
			c = d * h + c * l + n,
			s = b * f + e * k + m,
			b = b * h + e * l + n,
			f = d * f + e * k + m,
			d = d * h + e * l + n,
			e = p,
			h = q,
			p = Math.min(p, r),
			e = Math.max(e, r),
			h = Math.min(h, c),
			q = Math.max(q, c),
			p = Math.min(p, s),
			e = Math.max(e, s),
			h = Math.min(h, b),
			q = Math.max(q, b),
			p = Math.min(p, f),
			e = Math.max(e, f),
			h = Math.min(h, d),
			q = Math.max(q, d);
		a.x = p;
		a.y = h;
		a.width = e - p;
		a.height = q - h;
		return a
	};

	function K(a, b, c, d) {
		void 0 === a ? this.offsetY = this.offsetX = this.y = this.x = 0 : (void 0 === b && (b = 0), void 0 === c && (c = 0), void 0 === d && (d = 0), this.x = a, this.y = b, this.offsetX = c, this.offsetY = d)
	}
	w.ga("Spot", K);
	w.mi(K);
	w.be(K, {
		x: !0,
		y: !0,
		offsetX: !0,
		offsetY: !0
	});
	K.prototype.assign = function(a) {
		this.x = a.x;
		this.y = a.y;
		this.offsetX = a.offsetX;
		this.offsetY = a.offsetY
	};
	K.prototype.setTo = K.prototype.m = function(a, b, c, d) {
		this.x = a;
		this.y = b;
		this.offsetX = c;
		this.offsetY = d;
		return this
	};
	K.prototype.set = K.prototype.set = function(a) {
		this.x = a.x;
		this.y = a.y;
		this.offsetX = a.offsetX;
		this.offsetY = a.offsetY;
		return this
	};
	K.prototype.copy = function() {
		var a = new K;
		a.x = this.x;
		a.y = this.y;
		a.offsetX = this.offsetX;
		a.offsetY = this.offsetY;
		return a
	};
	K.prototype.Ha = function() {
		Object.freeze(this);
		return this
	};
	K.prototype.S = function() {
		return Object.isFrozen(this) ? this : this.copy().freeze()
	};
	K.prototype.freeze = function() {
		return this
	};
	K.prototype.Qa = function() {
		Object.isFrozen(this) && w.k("cannot thaw constant: " + this);
		return this
	};

	function ib(a, b) {
		a.x = NaN;
		a.y = NaN;
		a.offsetX = b;
		return a
	}
	var xb;
	K.parse = xb = function(a) {
		if ("string" === typeof a) {
			a = a.trim();
			if ("None" === a) return yb;
			if ("TopLeft" === a) return zb;
			if ("Top" === a || "TopCenter" === a || "MiddleTop" === a) return Bb;
			if ("TopRight" === a) return Gb;
			if ("Left" === a || "LeftCenter" === a || "MiddleLeft" === a) return Ib;
			if ("Center" === a) return Jb;
			if ("Right" === a || "RightCenter" === a || "MiddleRight" === a) return Pb;
			if ("BottomLeft" === a) return Qb;
			if ("Bottom" === a || "BottomCenter" === a || "MiddleBottom" === a) return Rb;
			if ("BottomRight" === a) return Sb;
			if ("TopSide" === a) return Xb;
			if ("LeftSide" ===
				a) return Yb;
			if ("RightSide" === a) return Zb;
			if ("BottomSide" === a) return $b;
			if ("TopBottomSides" === a) return ac;
			if ("LeftRightSides" === a) return bc;
			if ("TopLeftSides" === a) return ec;
			if ("TopRightSides" === a) return fc;
			if ("BottomLeftSides" === a) return gc;
			if ("BottomRightSides" === a) return hc;
			if ("NotTopSide" === a) return ic;
			if ("NotLeftSide" === a) return jc;
			if ("NotRightSide" === a) return nc;
			if ("NotBottomSide" === a) return oc;
			if ("AllSides" === a) return pc;
			if ("Default" === a) return qc;
			a = a.split(" ");
			for (var b = 0, c = 0;
				"" === a[b];) b++;
			var d = a[b++];
			void 0 !== d && 0 < d.length && (c = parseFloat(d));
			for (var e = 0;
				"" === a[b];) b++;
			d = a[b++];
			void 0 !== d && 0 < d.length && (e = parseFloat(d));
			for (var f = 0;
				"" === a[b];) b++;
			d = a[b++];
			void 0 !== d && 0 < d.length && (f = parseFloat(d));
			for (var h = 0;
				"" === a[b];) b++;
			d = a[b++];
			void 0 !== d && 0 < d.length && (h = parseFloat(d));
			return new K(c, e, f, h)
		}
		return new K
	};
	K.stringify = function(a) {
		return a.$c() ? a.x.toString() + " " + a.y.toString() + " " + a.offsetX.toString() + " " + a.offsetY.toString() : a.toString()
	};
	K.prototype.toString = function() {
		return this.$c() ? 0 === this.offsetX && 0 === this.offsetY ? "Spot(" + this.x + "," + this.y + ")" : "Spot(" + this.x + "," + this.y + "," + this.offsetX + "," + this.offsetY + ")" : this.L(yb) ? "None" : this.L(zb) ? "TopLeft" : this.L(Bb) ? "Top" : this.L(Gb) ? "TopRight" : this.L(Ib) ? "Left" : this.L(Jb) ? "Center" : this.L(Pb) ? "Right" : this.L(Qb) ? "BottomLeft" : this.L(Rb) ? "Bottom" : this.L(Sb) ? "BottomRight" : this.L(Xb) ? "TopSide" : this.L(Yb) ? "LeftSide" : this.L(Zb) ? "RightSide" : this.L($b) ? "BottomSide" : this.L(ac) ? "TopBottomSides" : this.L(bc) ?
			"LeftRightSides" : this.L(ec) ? "TopLeftSides" : this.L(fc) ? "TopRightSides" : this.L(gc) ? "BottomLeftSides" : this.L(hc) ? "BottomRightSides" : this.L(ic) ? "NotTopSide" : this.L(jc) ? "NotLeftSide" : this.L(nc) ? "NotRightSide" : this.L(oc) ? "NotBottomSide" : this.L(pc) ? "AllSides" : this.L(qc) ? "Default" : "None"
	};
	K.prototype.equals = K.prototype.L = function(a) {
		return a instanceof K ? (this.x === a.x || isNaN(this.x) && isNaN(a.x)) && (this.y === a.y || isNaN(this.y) && isNaN(a.y)) && this.offsetX === a.offsetX && this.offsetY === a.offsetY : !1
	};
	K.prototype.opposite = K.prototype.VF = function() {
		return new K(.5 - (this.x - .5), .5 - (this.y - .5), -this.offsetX, -this.offsetY)
	};
	K.prototype.includesSide = K.prototype.vj = function(a) {
		if (!this.xj()) return !1;
		if (!a.xj())
			if (a.L(rc)) a = Yb;
			else if (a.L(sc)) a = Zb;
		else if (a.L(yc)) a = Xb;
		else if (a.L(zc)) a = $b;
		else return !1;
		a = a.offsetY;
		return (this.offsetY & a) === a
	};
	K.prototype.isSpot = K.prototype.$c = function() {
		return !isNaN(this.x) && !isNaN(this.y)
	};
	K.prototype.isNoSpot = K.prototype.Td = function() {
		return isNaN(this.x) || isNaN(this.y)
	};
	K.prototype.isSide = K.prototype.xj = function() {
		return isNaN(this.x) && isNaN(this.y) && 1 === this.offsetX && 0 !== this.offsetY
	};
	K.prototype.isNone = K.prototype.CI = function() {
		return isNaN(this.x) && isNaN(this.y) && 0 === this.offsetX && 0 === this.offsetY
	};
	K.prototype.isDefault = K.prototype.Zc = function() {
		return isNaN(this.x) && isNaN(this.y) && -1 === this.offsetX && 0 === this.offsetY
	};
	var yb;
	K.None = yb = ib(new K(0, 0, 0, 0), 0).Ha();
	var qc;
	K.Default = qc = ib(new K(0, 0, -1, 0), -1).Ha();
	var zb;
	K.TopLeft = zb = (new K(0, 0, 0, 0)).Ha();
	var Bb;
	K.TopCenter = Bb = (new K(.5, 0, 0, 0)).Ha();
	var Gb;
	K.TopRight = Gb = (new K(1, 0, 0, 0)).Ha();
	var Ib;
	K.LeftCenter = Ib = (new K(0, .5, 0, 0)).Ha();
	var Jb;
	K.Center = Jb = (new K(.5, .5, 0, 0)).Ha();
	var Pb;
	K.RightCenter = Pb = (new K(1, .5, 0, 0)).Ha();
	var Qb;
	K.BottomLeft = Qb = (new K(0, 1, 0, 0)).Ha();
	var Rb;
	K.BottomCenter = Rb = (new K(.5, 1, 0, 0)).Ha();
	var Sb;
	K.BottomRight = Sb = (new K(1, 1, 0, 0)).Ha();
	var Gc;
	K.MiddleTop = Gc = Bb;
	var Hc;
	K.MiddleLeft = Hc = Ib;
	var Ic;
	K.MiddleRight = Ic = Pb;
	var Jc;
	K.MiddleBottom = Jc = Rb;
	var yc;
	K.Top = yc = Bb;
	var rc;
	K.Left = rc = Ib;
	var sc;
	K.Right = sc = Pb;
	var zc;
	K.Bottom = zc = Rb;
	var Xb;
	K.TopSide = Xb = ib(new K(0, 0, 1, w.od), 1).Ha();
	var Yb;
	K.LeftSide = Yb = ib(new K(0, 0, 1, w.Tc), 1).Ha();
	var Zb;
	K.RightSide = Zb = ib(new K(0, 0, 1, w.fd), 1).Ha();
	var $b;
	K.BottomSide = $b = ib(new K(0, 0, 1, w.ed), 1).Ha();
	var ac;
	K.TopBottomSides = ac = ib(new K(0, 0, 1, w.od | w.ed), 1).Ha();
	var bc;
	K.LeftRightSides = bc = ib(new K(0, 0, 1, w.Tc | w.fd), 1).Ha();
	var ec;
	K.TopLeftSides = ec = ib(new K(0, 0, 1, w.od | w.Tc), 1).Ha();
	var fc;
	K.TopRightSides = fc = ib(new K(0, 0, 1, w.od | w.fd), 1).Ha();
	var gc;
	K.BottomLeftSides = gc = ib(new K(0, 0, 1, w.ed | w.Tc), 1).Ha();
	var hc;
	K.BottomRightSides = hc = ib(new K(0, 0, 1, w.ed | w.fd), 1).Ha();
	var ic;
	K.NotTopSide = ic = ib(new K(0, 0, 1, w.Tc | w.fd | w.ed), 1).Ha();
	var jc;
	K.NotLeftSide = jc = ib(new K(0, 0, 1, w.od | w.fd | w.ed), 1).Ha();
	var nc;
	K.NotRightSide = nc = ib(new K(0, 0, 1, w.od | w.Tc | w.ed), 1).Ha();
	var oc;
	K.NotBottomSide = oc = ib(new K(0, 0, 1, w.od | w.Tc | w.fd), 1).Ha();
	var pc;
	K.AllSides = pc = ib(new K(0, 0, 1, w.od | w.Tc | w.fd | w.ed), 1).Ha();

	function Kc() {
		this.Tb = [1, 0, 0, 1, 0, 0]
	}
	Kc.prototype.copy = function() {
		var a = new Kc;
		a.Tb[0] = this.Tb[0];
		a.Tb[1] = this.Tb[1];
		a.Tb[2] = this.Tb[2];
		a.Tb[3] = this.Tb[3];
		a.Tb[4] = this.Tb[4];
		a.Tb[5] = this.Tb[5];
		return a
	};
	Kc.prototype.translate = function(a, b) {
		this.Tb[4] += this.Tb[0] * a + this.Tb[2] * b;
		this.Tb[5] += this.Tb[1] * a + this.Tb[3] * b
	};
	Kc.prototype.scale = function(a, b) {
		this.Tb[0] *= a;
		this.Tb[1] *= a;
		this.Tb[2] *= b;
		this.Tb[3] *= b
	};

	function Nc(a) {
		this.type = a;
		this.r2 = this.y2 = this.x2 = this.r1 = this.y1 = this.x1 = 0;
		this.HE = [];
		this.pattern = null
	}
	Nc.prototype.addColorStop = function(a, b) {
		this.HE.push({
			offset: a,
			color: b
		})
	};

	function Oc(a, b, c) {
		this.fillStyle = "#000000";
		this.font = "10px sans-serif";
		this.globalAlpha = 1;
		this.lineCap = "butt";
		this.Hn = 0;
		this.lineJoin = "miter";
		this.lineWidth = 1;
		this.miterLimit = 10;
		this.shadowBlur = 0;
		this.shadowColor = "rgba(0, 0, 0, 0)";
		this.shadowOffsetY = this.shadowOffsetX = 0;
		this.strokeStyle = "#000000";
		this.textAlign = "start";
		this.Ip = !1;
		this.Eg = this.jt = this.it = 0;
		this.document = b || document;
		this.VE = c;
		this.Nx = null;
		this.path = [];
		this.uh = new Kc;
		this.stack = [];
		this.pf = [];
		this.ux = a;
		this.iJ = "http://www.w3.org/2000/svg";
		this.width = this.ux.width;
		this.height = this.ux.height;
		this.km = Pc(this, "svg", {
			width: this.width + "px",
			height: this.height + "px",
			viewBox: "0 0 " + this.ux.width + " " + this.ux.height
		});
		this.km.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns", "http://www.w3.org/2000/svg");
		this.km.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xlink", "http://www.w3.org/1999/xlink");
		Qc(this, 1, 0, 0, 1, 0, 0);
		a = w.qm++;
		b = Pc(this, "clipPath", {
			id: "mainClip" + a
		});
		b.appendChild(Pc(this, "rect", {
			x: 0,
			y: 0,
			width: this.width,
			height: this.height
		}));
		this.km.appendChild(b);
		this.pf[0].setAttributeNS(null, "clip-path", "url(#mainClip" + a + ")")
	}
	g = Oc.prototype;
	g.arc = function(a, b, c, d, e, f) {
		Rc(this, a, b, c, d, e, f)
	};
	g.beginPath = function() {
		this.path = []
	};
	g.bezierCurveTo = function(a, b, c, d, e, f) {
		this.path.push(["C", a, b, c, d, e, f])
	};
	g.clearRect = function() {};
	g.clip = function() {
		Sc(this, "clipPath", this.path, new Kc)
	};
	g.closePath = function() {
		this.path.push(["z"])
	};
	g.createLinearGradient = function(a, b, c, d) {
		var e = new Nc("linear");
		e.x1 = a;
		e.y1 = b;
		e.x2 = c;
		e.y2 = d;
		return e
	};
	g.createPattern = function() {
		return null
	};
	g.createRadialGradient = function(a, b, c, d, e, f) {
		var h = new Nc("radial");
		h.x1 = a;
		h.y1 = b;
		h.r1 = c;
		h.x2 = d;
		h.y2 = e;
		h.r2 = f;
		return h
	};
	g.drawImage = function(a, b, c, d, e, f, h, k, l) {
		var m = "";
		a instanceof HTMLCanvasElement && (m = a.toDataURL());
		a instanceof HTMLImageElement && (m = a.src);
		void 0 === d && (f = b, h = c, k = d = a.naturalWidth, l = e = a.naturalHeight);
		d = d || 0;
		e = e || 0;
		f = f || 0;
		h = h || 0;
		k = k || 0;
		l = l || 0;
		m = {
			x: 0,
			y: 0,
			width: a.naturalWidth,
			height: a.naturalHeight,
			href: m,
			preserveAspectRatio: "xMidYMid slice"
		};
		Wa(d, k) && Wa(e, l) || (m.preserveAspectRatio = "none");
		var n = "";
		k /= d;
		l /= e;
		if (0 !== f || 0 !== h) n += " translate(" + f + ", " + h + ")";
		if (1 !== k || 1 !== l) n += " scale(" + k + ", " + l + ")";
		if (0 !==
			b || 0 !== c) n += " translate(" + -b + ", " + -c + ")";
		if (0 !== b || 0 !== c || d !== a.naturalWidth || e !== a.naturalHeight) a = "CLIP" + w.qm++, f = Pc(this, "clipPath", {
			id: a
		}), f.appendChild(Pc(this, "rect", {
			x: b,
			y: c,
			width: d,
			height: e
		})), this.km.appendChild(f), m["clip-path"] = "url(#" + a + ")";
		Tc(this, "image", m, this.uh, n);
		this.addElement("image", m)
	};
	g.fill = function() {
		Sc(this, "fill", this.path, this.uh)
	};
	g.Lg = function() {
		this.Ip ? this.clip() : this.fill()
	};
	g.fillRect = function(a, b, c, d) {
		Uc(this, "fill", [a, b, c, d], this.uh)
	};
	g.fillText = function(a, b, c) {
		a = [a, b, c];
		b = this.textAlign;
		"left" === b ? b = "start" : "right" === b ? b = "end" : "center" === b && (b = "middle");
		b = {
			x: a[1],
			y: a[2],
			style: "font: " + this.font,
			"text-anchor": b
		};
		Tc(this, "fill", b, this.uh);
		this.addElement("text", b, a[0])
	};
	g.lineTo = function(a, b) {
		this.path.push(["L", a, b])
	};
	g.moveTo = function(a, b) {
		this.path.push(["M", a, b])
	};
	g.quadraticCurveTo = function(a, b, c, d) {
		this.path.push(["Q", a, b, c, d])
	};
	g.rect = function(a, b, c, d) {
		this.path.push(["M", a, b], ["L", a + c, b], ["L", a + c, b + d], ["L", a, b + d], ["z"])
	};
	g.restore = function() {
		this.uh = this.stack.pop();
		this.path = this.stack.pop();
		var a = this.stack.pop();
		this.fillStyle = a.fillStyle;
		this.font = a.font;
		this.globalAlpha = a.globalAlpha;
		this.lineCap = a.lineCap;
		this.Hn = a.Hn;
		this.lineJoin = a.lineJoin;
		this.lineWidth = a.lineWidth;
		this.miterLimit = a.miterLimit;
		this.shadowBlur = a.shadowBlur;
		this.shadowColor = a.shadowColor;
		this.shadowOffsetX = a.shadowOffsetX;
		this.shadowOffsetY = a.shadowOffsetY;
		this.strokeStyle = a.strokeStyle;
		this.textAlign = a.textAlign
	};
	g.save = function() {
		this.stack.push({
			fillStyle: this.fillStyle,
			font: this.font,
			globalAlpha: this.globalAlpha,
			lineCap: this.lineCap,
			Hn: this.Hn,
			lineJoin: this.lineJoin,
			lineWidth: this.lineWidth,
			miterLimit: this.miterLimit,
			shadowBlur: this.shadowBlur,
			shadowColor: this.shadowColor,
			shadowOffsetX: this.shadowOffsetX,
			shadowOffsetY: this.shadowOffsetY,
			strokeStyle: this.strokeStyle,
			textAlign: this.textAlign
		});
		for (var a = [], b = 0; b < this.path.length; b++) a.push(this.path[b]);
		this.stack.push(a);
		this.stack.push(this.uh.copy())
	};
	g.setTransform = function(a, b, c, d, e, f) {
		1 === a && 0 === b && 0 === c && 1 === d && 0 === e && 0 === f || Qc(this, a, b, c, d, e, f)
	};
	g.scale = function(a, b) {
		this.uh.scale(a, b)
	};
	g.translate = function(a, b) {
		this.uh.translate(a, b)
	};
	g.transform = function() {};
	g.stroke = function() {
		Sc(this, "stroke", this.path, this.uh)
	};
	g.Gj = function() {
		this.Ip || this.stroke()
	};
	g.strokeRect = function(a, b, c, d) {
		Uc(this, "stroke", [a, b, c, d], this.uh)
	};

	function Pc(a, b, c, d) {
		a = a.document.createElementNS(a.iJ, b);
		if (w.Pa(c))
			for (var e in c) a.setAttributeNS("href" === e ? "http://www.w3.org/1999/xlink" : "", e, c[e]);
		void 0 !== d && (a.textContent = d);
		return a
	}
	g.addElement = function(a, b, c) {
		a = Pc(this, a, b, c);
		0 < this.pf.length ? this.pf[this.pf.length - 1].appendChild(a) : this.km.appendChild(a);
		return this.Nx = a
	};

	function Tc(a, b, c, d, e) {
		1 !== a.globalAlpha && (c.opacity = a.globalAlpha);
		"fill" === b ? (a.fillStyle instanceof Nc ? c.fill = Vc(a, a.fillStyle) : (/^rgba\(/.test(a.fillStyle) && (b = /^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle), c.fill = "rgb(" + b[1] + "," + b[2] + "," + b[3] + ")", c["fill-opacity"] = b[4]), c.fill = a.fillStyle), c.stroke = "none") : "stroke" === b && (c.fill = "none", a.strokeStyle instanceof Nc ? c.stroke = Vc(a, a.strokeStyle) : (/^rgba\(/.test(a.strokeStyle) && (b = /^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.strokeStyle),
			c.stroke = "rgb(" + b[1] + "," + b[2] + "," + b[3] + ")", c["stroke-opacity"] = b[4]), c.stroke = a.strokeStyle), c["stroke-width"] = a.lineWidth, c["stroke-linecap"] = a.lineCap, c["stroke-linejoin"] = a.lineJoin, c["stroke-miterlimit"] = a.miterLimit);
		a = d.Tb;
		a = "matrix(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ", " + a[4] + ", " + a[5] + ")";
		void 0 !== e && (a += e);
		c.transform = a
	}

	function Vc(a, b) {
		var c = "GRAD" + w.qm++,
			d;
		if ("linear" === b.type) d = Pc(a, "linearGradient", {
			x1: b.x1,
			x2: b.x2,
			y1: b.y1,
			y2: b.y2,
			id: c,
			gradientUnits: "userSpaceOnUse"
		});
		else if ("radial" === b.type) d = Pc(a, "radialGradient", {
			x1: b.x1,
			x2: b.x2,
			y1: b.y1,
			y2: b.y2,
			r1: b.r1,
			r2: b.r2,
			id: c
		});
		else if ("pattern" === b.type) {
			var e = b.pattern;
			d = {
				width: e.width,
				height: e.height,
				id: c,
				patternUnits: "userSpaceOnUse"
			};
			var f = "";
			e instanceof HTMLCanvasElement && (f = e.toDataURL());
			e instanceof HTMLImageElement && (f = e.src);
			e = {
				x: 0,
				y: 0,
				width: e.width,
				height: e.height,
				href: f
			};
			d = Pc(a, "pattern", d);
			d.appendChild(Pc(a, "image", e))
		} else throw Error("invalid gradient");
		for (var e = b.HE, f = e.length, h = [], k = 0; k < f; k++) {
			var l = e[k],
				m = l.color,
				l = {
					offset: l.offset,
					"stop-color": m
				};
			/^rgba\(/.test(m) && (m = /^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(m), l["stop-color"] = "rgb(" + m[1] + "," + m[2] + "," + m[3] + ")", l["stop-opacity"] = m[4]);
			h.push(l)
		}
		h.sort(function(a, b) {
			return a.offset > b.offset ? 1 : -1
		});
		for (k = 0; k < f; k++) d.appendChild(Pc(a, "stop", h[k]));
		a.km.appendChild(d);
		return "url(#" + c + ")"
	}

	function Uc(a, b, c, d) {
		c = {
			x: c[0],
			y: c[1],
			width: c[2],
			height: c[3]
		};
		Tc(a, b, c, d);
		a.addElement("rect", c)
	}

	function Sc(a, b, c, d) {
		for (var e = [], f = 0; f < c.length; f++) {
			var h = w.Ol(c[f]),
				k = [h.shift()];
			if ("A" === k[0]) k.push(h.shift() + "," + h.shift(), h.shift(), h.shift() + "," + h.shift(), h.shift() + "," + h.shift());
			else
				for (; h.length;) k.push(h.shift() + "," + h.shift());
			e.push(k.join(" "))
		}
		c = {
			d: e.join(" ")
		};
		Tc(a, b, c, d);
		"clipPath" === b ? (b = "CLIP" + w.qm++, d = Pc(a, "clipPath", {
			id: b
		}), d.appendChild(Pc(a, "path", c)), a.km.appendChild(d), 0 < a.pf.length && a.pf[a.pf.length - 1].setAttributeNS(null, "clip-path", "url(#" + b + ")")) : a.addElement("path",
			c)
	}

	function Rc(a, b, c, d, e, f, h) {
		var k = Math.abs(e - f);
		if (e !== f) {
			var l = b + d * Math.cos(f);
			f = c + d * Math.sin(f);
			k >= 2 * Math.PI ? (Rc(a, b, c, d, e, e + Math.PI, h), Rc(a, b, c, d, e + Math.PI, e + 2 * Math.PI, h), a.path.push(["M", l, f])) : (b += d * Math.cos(e), c += d * Math.sin(e), k = 180 * k / Math.PI, e = h ? 0 : 1, h = 180 <= k === !!h ? 0 : 1, 0 !== a.path.length ? a.path.push(["L", b, c]) : a.path.push(["M", b, c]), a.path.push(["A", d, d, k, h, e, l, f]))
		}
	}

	function Qc(a, b, c, d, e, f, h) {
		var k = new Kc;
		k.Tb = [b, c, d, e, f, h];
		b = {};
		Tc(a, "g", b, k);
		k = a.addElement("g", b);
		a.pf.push(k)
	}
	g.ab = function() {
		if (0 !== this.shadowOffsetX || 0 !== this.shadowOffsetY || 0 !== this.shadowBlur) {
			var a = "SHADOW" + w.qm++,
				b = this.addElement("filter", {
					id: a,
					x: "-100%",
					y: "-100%",
					width: "300%",
					height: "300%"
				}, null),
				c, d, e, f, h;
			c = Pc(this, "feGaussianBlur", {
				"in": "SourceAlpha",
				result: "blur",
				TL: this.shadowBlur / 2
			});
			d = Pc(this, "feFlood", {
				"in": "blur",
				result: "flood",
				"flood-color": this.shadowColor
			});
			e = Pc(this, "feComposite", {
				"in": "flood",
				in2: "blur",
				operator: "in",
				result: "comp"
			});
			f = Pc(this, "feOffset", {
				"in": "comp",
				result: "offsetBlur",
				dx: this.shadowOffsetX,
				dy: this.shadowOffsetY
			});
			h = Pc(this, "feMerge", {});
			h.appendChild(Pc(this, "feMergeNode", {
				"in": "offsetBlur"
			}));
			h.appendChild(Pc(this, "feMergeNode", {
				"in": "SourceGraphic"
			}));
			b.appendChild(c);
			b.appendChild(d);
			b.appendChild(e);
			b.appendChild(f);
			b.appendChild(h);
			0 < this.pf.length && this.pf[this.pf.length - 1].setAttributeNS(null, "filter", "url(#" + a + ")")
		}
	};
	g.EB = function(a, b, c) {
		this.it = a;
		this.jt = b;
		this.Eg = c
	};
	g.im = function() {
		this.shadowBlur = this.shadowOffsetY = this.shadowOffsetX = 0
	};
	g.Yn = function() {
		this.shadowOffsetX = this.it;
		this.shadowOffsetY = this.jt;
		this.shadowBlur = this.Eg
	};
	g.vA = function() {
		return !1
	};
	g.sA = function() {};
	g.He = function() {};
	g.ty = function() {};
	Oc.prototype.rotate = function() {};

	function Wc(a, b) {
		this.ownerDocument = void 0 === b ? document : b;
		var c = this.ownerDocument.createElement("canvas");
		c.tabIndex = 0;
		this.Od = c;
		this.Bk = new Xc(c);
		c.aa = a;
		Object.seal(this)
	}
	g = Wc.prototype;
	g.toDataURL = function(a, b) {
		return this.Od.toDataURL(a, b)
	};
	g.getBoundingClientRect = function() {
		return this.Od.getBoundingClientRect()
	};
	g.focus = function() {
		return this.Od.focus()
	};
	g.addEventListener = function(a, b, c) {
		this.Od.addEventListener(a, b, c)
	};
	g.removeEventListener = function(a, b, c) {
		this.Od.removeEventListener(a, b, c)
	};
	w.defineProperty(Wc, {
		width: "width"
	}, function() {
		return this.Od.width
	}, function(a) {
		this.Od.width = a
	});
	w.defineProperty(Wc, {
		height: "height"
	}, function() {
		return this.Od.height
	}, function(a) {
		this.Od.height = a
	});
	w.u(Wc, {
		style: "style"
	}, function() {
		return this.Od.style
	});

	function Xc(a) {
		a.getContext && a.getContext("2d") || w.k("Browser does not support HTML Canvas Element");
		this.ua = a.getContext("2d");
		this.Qy = this.Sy = this.Ry = "";
		this.Yq = !1;
		this.Eg = this.jt = this.it = 0;
		Object.seal(this)
	}
	Xc.prototype.ty = function(a) {
		this.ua.JA = a
	};
	w.defineProperty(Xc, {
		fillStyle: "fillStyle"
	}, function() {
		return this.ua.fillStyle
	}, function(a) {
		this.Qy !== a && (this.Qy = this.ua.fillStyle = a)
	});
	w.defineProperty(Xc, {
		font: "font"
	}, function() {
		return this.ua.font
	}, function(a) {
		this.Ry !== a && (this.Ry = this.ua.font = a)
	});
	w.defineProperty(Xc, {
		globalAlpha: "globalAlpha"
	}, function() {
		return this.ua.globalAlpha
	}, function(a) {
		this.ua.globalAlpha = a
	});
	w.defineProperty(Xc, {
		lineCap: "lineCap"
	}, function() {
		return this.ua.lineCap
	}, function(a) {
		this.ua.lineCap = a
	});
	w.defineProperty(Xc, {
		Hn: "lineDashOffset"
	}, function() {
		return this.ua.Hn
	}, function(a) {
		this.ua.Hn = a
	});
	w.defineProperty(Xc, {
		lineJoin: "lineJoin"
	}, function() {
		return this.ua.lineJoin
	}, function(a) {
		this.ua.lineJoin = a
	});
	w.defineProperty(Xc, {
		lineWidth: "lineWidth"
	}, function() {
		return this.ua.lineWidth
	}, function(a) {
		this.ua.lineWidth = a
	});
	w.defineProperty(Xc, {
		miterLimit: "miterLimit"
	}, function() {
		return this.ua.miterLimit
	}, function(a) {
		this.ua.miterLimit = a
	});
	w.defineProperty(Xc, {
		shadowBlur: "shadowBlur"
	}, function() {
		return this.ua.shadowBlur
	}, function(a) {
		this.ua.shadowBlur = a
	});
	w.defineProperty(Xc, {
		shadowColor: "shadowColor"
	}, function() {
		return this.ua.shadowColor
	}, function(a) {
		this.ua.shadowColor = a
	});
	w.defineProperty(Xc, {
		shadowOffsetX: "shadowOffsetX"
	}, function() {
		return this.ua.shadowOffsetX
	}, function(a) {
		this.ua.shadowOffsetX = a
	});
	w.defineProperty(Xc, {
		shadowOffsetY: "shadowOffsetY"
	}, function() {
		return this.ua.shadowOffsetY
	}, function(a) {
		this.ua.shadowOffsetY = a
	});
	w.defineProperty(Xc, {
		strokeStyle: "strokeStyle"
	}, function() {
		return this.ua.strokeStyle
	}, function(a) {
		this.Sy !== a && (this.Sy = this.ua.strokeStyle = a)
	});
	w.defineProperty(Xc, {
		textAlign: "textAlign"
	}, function() {
		return this.ua.textAlign
	}, function(a) {
		this.ua.textAlign = a
	});
	w.defineProperty(Xc, {
		JA: "imageSmoothingEnabled"
	}, function() {
		return this.ua.JA
	}, function(a) {
		this.ua.JA = a
	});
	g = Xc.prototype;
	g.arc = function(a, b, c, d, e, f) {
		this.ua.arc(a, b, c, d, e, f)
	};
	g.beginPath = function() {
		this.ua.beginPath()
	};
	g.bezierCurveTo = function(a, b, c, d, e, f) {
		this.ua.bezierCurveTo(a, b, c, d, e, f)
	};
	g.clearRect = function(a, b, c, d) {
		this.ua.clearRect(a, b, c, d)
	};
	g.clip = function() {
		this.ua.clip()
	};
	g.closePath = function() {
		this.ua.closePath()
	};
	g.createLinearGradient = function(a, b, c, d) {
		return this.ua.createLinearGradient(a, b, c, d)
	};
	g.createPattern = function(a, b) {
		return this.ua.createPattern(a, b)
	};
	g.createRadialGradient = function(a, b, c, d, e, f) {
		return this.ua.createRadialGradient(a, b, c, d, e, f)
	};
	g.drawImage = function(a, b, c, d, e, f, h, k, l) {
		void 0 === d ? this.ua.drawImage(a, b, c) : this.ua.drawImage(a, b, c, d, e, f, h, k, l)
	};
	g.fill = function() {
		this.ua.fill()
	};
	g.fillRect = function(a, b, c, d) {
		this.ua.fillRect(a, b, c, d)
	};
	g.fillText = function(a, b, c) {
		this.ua.fillText(a, b, c)
	};
	g.getImageData = function(a, b, c, d) {
		return this.ua.getImageData(a, b, c, d)
	};
	g.lineTo = function(a, b) {
		this.ua.lineTo(a, b)
	};
	g.measureText = function(a) {
		return this.ua.measureText(a)
	};
	g.moveTo = function(a, b) {
		this.ua.moveTo(a, b)
	};
	g.quadraticCurveTo = function(a, b, c, d) {
		this.ua.quadraticCurveTo(a, b, c, d)
	};
	g.rect = function(a, b, c, d) {
		this.ua.rect(a, b, c, d)
	};
	g.restore = function() {
		this.ua.restore()
	};
	Xc.prototype.rotate = function(a) {
		this.ua.rotate(a)
	};
	g = Xc.prototype;
	g.save = function() {
		this.ua.save()
	};
	g.setTransform = function(a, b, c, d, e, f) {
		this.ua.setTransform(a, b, c, d, e, f)
	};
	g.scale = function(a, b) {
		this.ua.scale(a, b)
	};
	g.stroke = function() {
		this.ua.stroke()
	};
	g.transform = function(a, b, c, d, e, f) {
		1 === a && 0 === b && 0 === c && 1 === d && 0 === e && 0 === f || this.ua.transform(a, b, c, d, e, f)
	};
	g.translate = function(a, b) {
		this.ua.translate(a, b)
	};
	g.Lg = function(a) {
		if (a instanceof ga && a.type === bd) {
			var b = a.po;
			a = a.Vy;
			a > b ? (this.scale(b / a, 1), this.translate((a - b) / 2, 0)) : b > a && (this.scale(1, a / b), this.translate(0, (b - a) / 2));
			this.Yq ? this.clip() : this.fill();
			a > b ? (this.translate(-(a - b) / 2, 0), this.scale(1 / (b / a), 1)) : b > a && (this.translate(0, -(b - a) / 2), this.scale(1, 1 / (a / b)))
		} else this.Yq ? this.clip() : this.fill()
	};
	g.Gj = function() {
		this.Yq || this.stroke()
	};
	w.defineProperty(Xc, {
		Ip: "clipInsteadOfFill"
	}, function() {
		return this.Yq
	}, function(a) {
		this.Yq = a
	});
	g = Xc.prototype;
	g.EB = function(a, b, c) {
		this.it = a;
		this.jt = b;
		this.Eg = c
	};
	g.im = function() {
		this.shadowBlur = this.shadowOffsetY = this.shadowOffsetX = 0
	};
	g.Yn = function() {
		this.shadowOffsetX = this.it;
		this.shadowOffsetY = this.jt;
		this.shadowBlur = this.Eg
	};
	g.vA = function(a, b) {
		var c = this.ua;
		if (void 0 !== c.setLineDash) c.setLineDash(a), c.lineDashOffset = b;
		else if (void 0 !== c.webkitLineDash) c.webkitLineDash = a, c.webkitLineDashOffset = b;
		else return !1;
		return !0
	};
	g.sA = function() {
		var a = this.ua;
		void 0 !== a.setLineDash ? (a.setLineDash(w.fo), a.lineDashOffset = 0) : void 0 !== a.webkitLineDash && (a.webkitLineDash = w.fo, a.webkitLineDashOffset = 0)
	};
	g.He = function(a) {
		a && (this.Ry = "");
		this.Qy = this.Sy = ""
	};
	var cd = (Math.sqrt(2) - 1) / 3 * 4,
		dd = (new y(0, 0)).Ha(),
		ed = (new B(0, 0, 0, 0)).Ha(),
		fd = (new hb(0, 0, 0, 0)).Ha(),
		nd = (new hb(2, 2, 2, 2)).Ha(),
		od = (new y(6, 6)).Ha(),
		pd = (new y(-Infinity, -Infinity)).Ha(),
		qd = (new y(Infinity, Infinity)).Ha(),
		rd = (new ia(0, 0)).Ha(),
		Ad = (new ia(1, 1)).Ha(),
		Bd = (new ia(6, 6)).Ha(),
		Cd = (new ia(8, 8)).Ha(),
		Dd = (new ia(10, 10)).Ha(),
		Ed = (new ia(Infinity, Infinity)).Ha(),
		Fd = (new y(NaN, NaN)).Ha(),
		Gd = (new ia(NaN, NaN)).Ha(),
		Nd = (new B(NaN, NaN, NaN, NaN)).Ha(),
		Od = (new K(.156, .156)).Ha(),
		Pd = (new K(.844, .844)).Ha(),
		Qd = new ra,
		Rd = new ra,
		Sd = null;

	function Td(a) {
		if (0 >= a) return 0;
		var b = Sd;
		if (null === b) {
			for (var b = [], c = 0; 2E3 >= c; c++) b[c] = Math.sqrt(c);
			Sd = b
		}
		return 1 > a ? (c = 1 / a, 2E3 >= c ? 1 / b[c | 0] : Math.sqrt(a)) : 2E3 >= a ? b[a | 0] : Math.sqrt(a)
	}

	function J(a, b) {
		var c = a - b;
		return .5 > c && -.5 < c
	}

	function Wa(a, b) {
		var c = a - b;
		return 5E-8 > c && -5E-8 < c
	}

	function Ud(a, b, c, d, e, f, h) {
		0 >= e && (e = 1E-6);
		var k = 0,
			l = 0,
			m = 0,
			n = 0;
		a < c ? (l = a, k = c) : (l = c, k = a);
		b < d ? (n = b, m = d) : (n = d, m = b);
		if (a === c) return n <= h && h <= m && a - e <= f && f <= a + e;
		if (b === d) return l <= f && f <= k && b - e <= h && h <= b + e;
		k += e;
		l -= e;
		if (l <= f && f <= k && (m += e, n -= e, n <= h && h <= m))
			if (k - l > m - n)
				if (a - c > e || c - a > e) {
					if (f = (d - b) / (c - a) * (f - a) + b, f - e <= h && h <= f + e) return !0
				} else return !0;
		else if (b - d > e || d - b > e) {
			if (h = (c - a) / (d - b) * (h - b) + a, h - e <= f && f <= h + e) return !0
		} else return !0;
		return !1
	}

	function Vd(a, b, c, d, e, f, h, k, l, m, n, p) {
		if (Ud(a, b, h, k, p, c, d) && Ud(a, b, h, k, p, e, f)) return Ud(a, b, h, k, p, m, n);
		var q = (a + c) / 2,
			r = (b + d) / 2,
			s = (c + e) / 2,
			u = (d + f) / 2;
		e = (e + h) / 2;
		f = (f + k) / 2;
		d = (q + s) / 2;
		c = (r + u) / 2;
		var s = (s + e) / 2,
			u = (u + f) / 2,
			t = (d + s) / 2,
			x = (c + u) / 2;
		return Vd(a, b, q, r, d, c, t, x, l, m, n, p) || Vd(t, x, s, u, e, f, h, k, l, m, n, p)
	}

	function Wd(a, b, c, d, e, f, h, k, l, m) {
		if (Ud(a, b, h, k, l, c, d) && Ud(a, b, h, k, l, e, f)) ab(m, a, b, 0, 0), ab(m, h, k, 0, 0);
		else {
			var n = (a + c) / 2,
				p = (b + d) / 2,
				q = (c + e) / 2,
				r = (d + f) / 2;
			e = (e + h) / 2;
			f = (f + k) / 2;
			d = (n + q) / 2;
			c = (p + r) / 2;
			var q = (q + e) / 2,
				r = (r + f) / 2,
				s = (d + q) / 2,
				u = (c + r) / 2;
			Wd(a, b, n, p, d, c, s, u, l, m);
			Wd(s, u, q, r, e, f, h, k, l, m)
		}
	}

	function Xd(a, b, c, d, e, f, h, k, l, m) {
		if (Ud(a, b, h, k, l, c, d) && Ud(a, b, h, k, l, e, f)) 0 === m.length && (m.push(a), m.push(b)), m.push(h), m.push(k);
		else {
			var n = (a + c) / 2,
				p = (b + d) / 2,
				q = (c + e) / 2,
				r = (d + f) / 2;
			e = (e + h) / 2;
			f = (f + k) / 2;
			d = (n + q) / 2;
			c = (p + r) / 2;
			var q = (q + e) / 2,
				r = (r + f) / 2,
				s = (d + q) / 2,
				u = (c + r) / 2;
			Xd(a, b, n, p, d, c, s, u, l, m);
			Xd(s, u, q, r, e, f, h, k, l, m)
		}
	}

	function ee(a, b, c, d, e, f, h, k, l, m, n, p, q, r) {
		var s = 1 - l;
		a = a * s + c * l;
		b = b * s + d * l;
		c = c * s + e * l;
		d = d * s + f * l;
		e = e * s + h * l;
		f = f * s + k * l;
		k = a * s + c * l;
		h = b * s + d * l;
		c = c * s + e * l;
		d = d * s + f * l;
		m.x = a;
		m.y = b;
		n.x = k;
		n.y = h;
		p.x = k * s + c * l;
		p.y = h * s + d * l;
		q.x = c;
		q.y = d;
		r.x = e;
		r.y = f
	}

	function fe(a, b, c, d, e, f, h, k, l, m) {
		if (Ud(a, b, e, f, m, c, d)) return Ud(a, b, e, f, m, k, l);
		var n = (a + c) / 2,
			p = (b + d) / 2;
		c = (c + e) / 2;
		d = (d + f) / 2;
		var q = (n + c) / 2,
			r = (p + d) / 2;
		return fe(a, b, n, p, q, r, h, k, l, m) || fe(q, r, c, d, e, f, h, k, l, m)
	}

	function ge(a, b, c, d, e, f, h, k) {
		if (Ud(a, b, e, f, h, c, d)) ab(k, a, b, 0, 0), ab(k, e, f, 0, 0);
		else {
			var l = (a + c) / 2,
				m = (b + d) / 2;
			c = (c + e) / 2;
			d = (d + f) / 2;
			var n = (l + c) / 2,
				p = (m + d) / 2;
			ge(a, b, l, m, n, p, h, k);
			ge(n, p, c, d, e, f, h, k)
		}
	}

	function he(a, b, c, d, e, f, h, k) {
		if (Ud(a, b, e, f, h, c, d)) 0 === k.length && (k.push(a), k.push(b)), k.push(e), k.push(f);
		else {
			var l = (a + c) / 2,
				m = (b + d) / 2;
			c = (c + e) / 2;
			d = (d + f) / 2;
			var n = (l + c) / 2,
				p = (m + d) / 2;
			he(a, b, l, m, n, p, h, k);
			he(n, p, c, d, e, f, h, k)
		}
	}

	function ie(a, b, c, d, e, f, h, k, l, m, n, p, q, r) {
		0 >= q && (q = 1E-6);
		if (Ud(a, b, h, k, q, c, d) && Ud(a, b, h, k, q, e, f)) {
			var s = (a - h) * (m - p) - (b - k) * (l - n);
			if (0 === s) return !1;
			q = ((a * k - b * h) * (l - n) - (a - h) * (l * p - m * n)) / s;
			s = ((a * k - b * h) * (m - p) - (b - k) * (l * p - m * n)) / s;
			if ((l > n ? l - n : n - l) < (m > p ? m - p : p - m)) {
				if (h = l = 0, b < k ? (l = b, h = k) : (l = k, h = b), s < l || s > h) return !1
			} else if (a < h ? l = a : (l = h, h = a), q < l || q > h) return !1;
			r.x = q;
			r.y = s;
			return !0
		}
		var s = (a + c) / 2,
			u = (b + d) / 2;
		c = (c + e) / 2;
		d = (d + f) / 2;
		e = (e + h) / 2;
		f = (f + k) / 2;
		var t = (s + c) / 2,
			x = (u + d) / 2;
		c = (c + e) / 2;
		d = (d + f) / 2;
		var v = (t + c) / 2,
			z = (x + d) / 2,
			A = (n - l) * (n - l) + (p - m) * (p - m),
			L = !1;
		ie(a, b, s, u, t, x, v, z, l, m, n, p, q, r) && (b = (r.x - l) * (r.x - l) + (r.y - m) * (r.y - m), b < A && (A = b, L = !0));
		a = r.x;
		s = r.y;
		ie(v, z, c, d, e, f, h, k, l, m, n, p, q, r) && (b = (r.x - l) * (r.x - l) + (r.y - m) * (r.y - m), b < A ? L = !0 : (r.x = a, r.y = s));
		return L
	}

	function je(a, b, c, d, e, f, h, k, l, m, n, p, q) {
		var r = 0;
		0 >= q && (q = 1E-6);
		if (Ud(a, b, h, k, q, c, d) && Ud(a, b, h, k, q, e, f)) {
			q = (a - h) * (m - p) - (b - k) * (l - n);
			if (0 === q) return r;
			var s = ((a * k - b * h) * (l - n) - (a - h) * (l * p - m * n)) / q,
				u = ((a * k - b * h) * (m - p) - (b - k) * (l * p - m * n)) / q;
			if (s >= n) return r;
			if ((l > n ? l - n : n - l) < (m > p ? m - p : p - m)) {
				if (a = l = 0, b < k ? (l = b, a = k) : (l = k, a = b), u < l || u > a) return r
			} else if (a < h ? (l = a, a = h) : l = h, s < l || s > a) return r;
			0 < q ? r++ : 0 > q && r--
		} else {
			var s = (a + c) / 2,
				u = (b + d) / 2,
				t = (c + e) / 2,
				x = (d + f) / 2;
			e = (e + h) / 2;
			f = (f + k) / 2;
			d = (s + t) / 2;
			c = (u + x) / 2;
			var t = (t + e) / 2,
				x = (x + f) / 2,
				v = (d + t) / 2,
				z = (c + x) / 2,
				r = r + je(a, b, s, u, d, c, v, z, l, m, n, p, q),
				r = r + je(v, z, t, x, e, f, h, k, l, m, n, p, q)
		}
		return r
	}

	function La(a, b, c, d, e, f, h) {
		if (Wa(a, c)) {
			var k = 0;
			c = 0;
			b < d ? (k = b, c = d) : (k = d, c = b);
			d = f;
			if (d < k) return h.x = a, h.y = k, !1;
			if (d > c) return h.x = a, h.y = c, !1;
			h.x = a;
			h.y = d;
			return !0
		}
		if (Wa(b, d)) {
			a < c ? k = a : (k = c, c = a);
			d = e;
			if (d < k) return h.x = k, h.y = b, !1;
			if (d > c) return h.x = c, h.y = b, !1;
			h.x = d;
			h.y = b;
			return !0
		}
		k = ((a - e) * (a - c) + (b - f) * (b - d)) / ((c - a) * (c - a) + (d - b) * (d - b));
		if (-5E-6 > k) return h.x = a, h.y = b, !1;
		if (1.000005 < k) return h.x = c, h.y = d, !1;
		h.x = a + k * (c - a);
		h.y = b + k * (d - b);
		return !0
	}

	function ke(a, b, c, d, e, f, h, k, l) {
		if (J(a, c) && J(b, d)) return l.x = a, l.y = b, !1;
		if (Wa(e, h)) {
			if (Wa(a, c)) return La(a, b, c, d, e, f, l), !1;
			f = (d - b) / (c - a) * (e - a) + b;
			return La(a, b, c, d, e, f, l)
		}
		k = (k - f) / (h - e);
		if (Wa(a, c)) {
			f = k * (a - e) + f;
			c = h = 0;
			b < d ? (h = b, c = d) : (h = d, c = b);
			if (f < h) return l.x = a, l.y = h, !1;
			if (f > c) return l.x = a, l.y = c, !1;
			l.x = a;
			l.y = f;
			return !0
		}
		h = (d - b) / (c - a);
		if (Wa(k, h)) return La(a, b, c, d, e, f, l), !1;
		e = (h * a - k * e + f - b) / (h - k);
		if (Wa(h, 0)) {
			a < c ? h = a : (h = c, c = a);
			if (e < h) return l.x = h, l.y = b, !1;
			if (e > c) return l.x = c, l.y = b, !1;
			l.x = e;
			l.y = b;
			return !0
		}
		f =
			h * (e - a) + b;
		return La(a, b, c, d, e, f, l)
	}

	function le(a, b, c, d, e, f, h, k, l) {
		var m = 1E21,
			n = a,
			p = b;
		if (ke(a, b, a, d, e, f, h, k, l)) {
			var q = (l.x - e) * (l.x - e) + (l.y - f) * (l.y - f);
			q < m && (m = q, n = l.x, p = l.y)
		}
		ke(c, b, c, d, e, f, h, k, l) && (q = (l.x - e) * (l.x - e) + (l.y - f) * (l.y - f), q < m && (m = q, n = l.x, p = l.y));
		ke(a, b, c, b, e, f, h, k, l) && (q = (l.x - e) * (l.x - e) + (l.y - f) * (l.y - f), q < m && (m = q, n = l.x, p = l.y));
		ke(a, d, c, d, e, f, h, k, l) && (q = (l.x - e) * (l.x - e) + (l.y - f) * (l.y - f), q < m && (m = q, n = l.x, p = l.y));
		l.x = n;
		l.y = p;
		return 1E21 > m
	}

	function me(a, b, c, d, e, f, h, k, l) {
		c = a - c;
		var m = e - h,
			n = h = 0;
		0 === c || 0 === m ? 0 === c ? (k = (f - k) / m, h = a, n = k * h + (f - k * e)) : (d = (b - d) / c, h = e, n = d * h + (b - d * a)) : (d = (b - d) / c, k = (f - k) / m, a = b - d * a, h = (f - k * e - a) / (d - k), n = d * h + a);
		l.m(h, n);
		return l
	}

	function ne(a, b, c) {
		var d = b.x,
			e = b.y,
			f = c.x,
			h = c.y,
			k = a.left,
			l = a.right,
			m = a.top,
			n = a.bottom;
		return d === f ? (f = a = 0, e < h ? (a = e, f = h) : (a = h, f = e), k <= d && d <= l && a <= n && f >= m) : e === h ? (d < f ? a = d : (a = f, f = d), m <= e && e <= n && a <= l && f >= k) : a.Ia(b) || a.Ia(c) || oe(k, m, l, m, d, e, f, h) || oe(l, m, l, n, d, e, f, h) || oe(l, n, k, n, d, e, f, h) || oe(k, n, k, m, d, e, f, h) ? !0 : !1
	}

	function oe(a, b, c, d, e, f, h, k) {
		return 0 >= pe(a, b, c, d, e, f) * pe(a, b, c, d, h, k) && 0 >= pe(e, f, h, k, a, b) * pe(e, f, h, k, c, d)
	}

	function pe(a, b, c, d, e, f) {
		c -= a;
		d -= b;
		a = e - a;
		b = f - b;
		f = a * d - b * c;
		0 === f && (f = a * c + b * d, 0 < f && (f = (a - c) * c + (b - d) * d, 0 > f && (f = 0)));
		return 0 > f ? -1 : 0 < f ? 1 : 0
	}

	function ye(a) {
		0 > a && (a += 360);
		360 <= a && (a -= 360);
		return a
	}

	function ze(a, b, c, d) {
		var e = Math.PI;
		d || (b *= e / 180, c *= e / 180);
		var f = b > c ? -1 : 1;
		d = [];
		var h = e / 2,
			k = b;
		c = Math.min(2 * e, Math.abs(c - b));
		if (1E-5 > c) return b = k + f * Math.min(c, h), f = 0 + a * Math.cos(k), k = 0 + a * Math.sin(k), h = 0 + a * Math.cos(b), a = 0 + a * Math.sin(b), b = (f + h) / 2, c = (k + a) / 2, d.push([f, k, b, c, b, c, h, a]), d;
		for (; 1E-5 < c;) {
			b = k + f * Math.min(c, h);
			var e = (b - k) / 2,
				l = a * Math.cos(e),
				m = a * Math.sin(e),
				n = -m,
				p = l * l + n * n,
				q = p + l * l + n * m,
				p = 4 / 3 * (Math.sqrt(2 * p * q) - q) / (l * m - n * l),
				m = l - p * n,
				l = n + p * l,
				n = -l,
				p = e + k,
				e = Math.cos(p),
				p = Math.sin(p);
			d.push([0 + a * Math.cos(k),
				0 + a * Math.sin(k), 0 + m * e - l * p, 0 + m * p + l * e, 0 + m * e - n * p, 0 + m * p + n * e, 0 + a * Math.cos(b), 0 + a * Math.sin(b)
			]);
			c -= Math.abs(b - k);
			k = b
		}
		return d
	}

	function Na(a, b, c, d, e, f, h) {
		c = Math.floor((a - c) / e) * e + c;
		d = Math.floor((b - d) / f) * f + d;
		var k = c;
		c + e - a < e / 2 && (k = c + e);
		a = d;
		d + f - b < f / 2 && (a = d + f);
		h.m(k, a)
	}

	function Ae(a, b) {
		var c = Math.max(a, b),
			d = Math.min(a, b),
			e = 1,
			f = 1;
		do e = c % d, c = f = d, d = e; while (0 < e);
		return f
	}

	function Be(a, b, c, d) {
		var e = 0 > c,
			f = 0 > d,
			h = 0,
			k = h = 0;
		a < b ? (h = 1, k = 0) : (h = 0, k = 1);
		var l = 0,
			m = 0,
			n = 0,
			p = 0,
			l = 0 === h ? a : b,
			n = 0 === h ? c : d;
		if (0 === h ? e : f) n = -n;
		h = k;
		m = 0 === h ? a : b;
		p = 0 === h ? c : d;
		if (0 === h ? e : f) p = -p;
		a = a = 0;
		if (0 < p)
			if (0 < n) {
				b = l * l;
				a = m * m;
				l *= n;
				c = m * p;
				d = -a + c;
				e = -a + Math.sqrt(l * l + c * c);
				m = d;
				for (f = 0; 9999999999 > f; ++f) {
					m = .5 * (d + e);
					if (m === d || m === e) break;
					k = l / (m + b);
					h = c / (m + a);
					k = k * k + h * h - 1;
					if (0 < k) d = m;
					else if (0 > k) e = m;
					else break
				}
				n = b * n / (m + b) - n;
				p = a * p / (m + a) - p;
				a = Math.sqrt(n * n + p * p)
			} else a = Math.abs(p - m);
		else p = l * l - m * m, a = l * n, a < p ? (p = a / p, a = m * Math.sqrt(Math.abs(1 -
			p * p)), n = l * p - n, a = Math.sqrt(n * n + a * a)) : a = Math.abs(n - l);
		return a
	}

	function Ce(a) {
		1 < arguments.length && w.k("Geometry constructor can take at most one optional argument, the Geometry type.");
		w.oc(this);
		this.P = !1;
		void 0 === a && (a = De);
		this.na = a;
		this.Gb = this.yb = this.Mc = this.Cc = 0;
		this.Rj = new H(Ee);
		this.Kv = this.Rj.F;
		this.vv = (new B).freeze();
		this.fb = !0;
		this.Nq = this.jo = null;
		this.Oq = NaN;
		this.gi = zb;
		this.hi = Sb;
		this.Lo = this.No = NaN;
		this.Gi = Fe
	}
	w.ga("Geometry", Ce);
	w.mi(Ce);
	Ce.prototype.copy = function() {
		var a = new Ce;
		a.na = this.na;
		a.Cc = this.Cc;
		a.Mc = this.Mc;
		a.yb = this.yb;
		a.Gb = this.Gb;
		for (var b = this.Rj.n, c = b.length, d = a.Rj, e = 0; e < c; e++) {
			var f = b[e].copy();
			d.add(f)
		}
		a.Kv = this.Kv;
		a.vv.assign(this.vv);
		a.fb = this.fb;
		a.jo = this.jo;
		a.Nq = this.Nq;
		a.Oq = this.Oq;
		a.gi = this.gi.S();
		a.hi = this.hi.S();
		a.No = this.No;
		a.Lo = this.Lo;
		a.Gi = this.Gi;
		return a
	};
	var Ge;
	Ce.Line = Ge = w.p(Ce, "Line", 0);
	var He;
	Ce.Rectangle = He = w.p(Ce, "Rectangle", 1);
	var Ie;
	Ce.Ellipse = Ie = w.p(Ce, "Ellipse", 2);
	var De;
	Ce.Path = De = w.p(Ce, "Path", 3);
	Ce.prototype.Ha = function() {
		this.freeze();
		Object.freeze(this);
		return this
	};
	Ce.prototype.freeze = function() {
		this.P = !0;
		var a = this.gc;
		a.freeze();
		for (var a = a.n, b = a.length, c = 0; c < b; c++) a[c].freeze();
		return this
	};
	Ce.prototype.Qa = function() {
		Object.isFrozen(this) && w.k("cannot thaw constant: " + this);
		this.P = !1;
		var a = this.gc;
		a.Qa();
		for (var a = a.n, b = a.length, c = 0; c < b; c++) a[c].Qa();
		return this
	};
	Ce.prototype.equalsApprox = Ce.prototype.Oc = function(a) {
		if (!(a instanceof Ce)) return !1;
		if (this.type !== a.type) return this.type === Ge && a.type === De ? Me(this, a) : a.type === Ge && this.type === De ? Me(a, this) : !1;
		if (this.type === De) {
			var b = this.gc.n;
			a = a.gc.n;
			var c = b.length;
			if (c !== a.length) return !1;
			for (var d = 0; d < c; d++)
				if (!b[d].Oc(a[d])) return !1;
			return !0
		}
		return J(this.ha, a.ha) && J(this.fa, a.fa) && J(this.C, a.C) && J(this.D, a.D)
	};

	function Me(a, b) {
		if (a.type !== Ge || b.type !== De) return !1;
		if (1 === b.gc.count) {
			var c = b.gc.ea(0);
			if (1 === c.wb.count && J(a.ha, c.ha) && J(a.fa, c.fa) && (c = c.wb.ea(0), c.type === Ne && J(a.C, c.C) && J(a.D, c.D))) return !0
		}
		return !1
	}
	var Oe;
	Ce.stringify = Oe = function(a) {
		return a.toString()
	};
	Ce.prototype.ic = function(a) {
		a.Ge === Ce ? this.type = a : w.Ij(this, a)
	};
	Ce.prototype.toString = function(a) {
		void 0 === a && (a = -1);
		switch (this.type) {
			case Ge:
				return 0 > a ? "M" + this.ha.toString() + " " + this.fa.toString() + "L" + this.C.toString() + " " + this.D.toString() : "M" + this.ha.toFixed(a) + " " + this.fa.toFixed(a) + "L" + this.C.toFixed(a) + " " + this.D.toFixed(a);
			case He:
				var b = new B(this.ha, this.fa, 0, 0);
				b.HG(this.C, this.D, 0, 0);
				return 0 > a ? "M" + b.x.toString() + " " + b.y.toString() + "H" + b.right.toString() + "V" + b.bottom.toString() + "H" + b.left.toString() + "z" : "M" + b.x.toFixed(a) + " " + b.y.toFixed(a) + "H" + b.right.toFixed(a) +
					"V" + b.bottom.toFixed(a) + "H" + b.left.toFixed(a) + "z";
			case Ie:
				b = new B(this.ha, this.fa, 0, 0);
				b.HG(this.C, this.D, 0, 0);
				if (0 > a) {
					var c = b.left.toString() + " " + (b.y + b.height / 2).toString(),
						d = b.right.toString() + " " + (b.y + b.height / 2).toString();
					return "M" + c + "A" + (b.width / 2).toString() + " " + (b.height / 2).toString() + " 0 0 1 " + d + "A" + (b.width / 2).toString() + " " + (b.height / 2).toString() + " 0 0 1 " + c
				}
				c = b.left.toFixed(a) + " " + (b.y + b.height / 2).toFixed(a);
				d = b.right.toFixed(a) + " " + (b.y + b.height / 2).toFixed(a);
				return "M" + c + "A" + (b.width /
					2).toFixed(a) + " " + (b.height / 2).toFixed(a) + " 0 0 1 " + d + "A" + (b.width / 2).toFixed(a) + " " + (b.height / 2).toFixed(a) + " 0 0 1 " + c;
			case De:
				for (var b = "", c = this.gc.n, d = c.length, e = 0; e < d; e++) {
					var f = c[e];
					0 < e && (b += " x ");
					f.pu && (b += "F ");
					b += f.toString(a)
				}
				return b;
			default:
				return this.type.toString()
		}
	};
	Ce.fillPath = function(a) {
		"string" !== typeof a && w.Ed(a, "string", Ce, "fillPath:str");
		a = a.split(/[Xx]/);
		for (var b = a.length, c = "", d = 0; d < b; d++) var e = a[d],
			c = null !== e.match(/[Ff]/) ? 0 === d ? c + e : c + ("X" + (" " === e[0] ? "" : " ") + e) : c + ((0 === d ? "" : "X ") + "F" + (" " === e[0] ? "" : " ") + e);
		return c
	};
	var Pe;
	Ce.parse = Pe = function(a, b) {
		function c() {
			return t >= L - 1 ? !0 : null !== l[t + 1].match(/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/)
		}

		function d() {
			t++;
			return l[t]
		}

		function e() {
			var a = new y(parseFloat(d()), parseFloat(d()));
			x === x.toLowerCase() && (a.x = A.x + a.x, a.y = A.y + a.y);
			return a
		}

		function f() {
			return A = e()
		}

		function h() {
			return z = e()
		}

		function k() {
			return "c" !== v.toLowerCase() && "s" !== v.toLowerCase() ? A : new y(2 * A.x - z.x, 2 * A.y - z.y)
		}
		void 0 === b && (b = !1);
		"string" !== typeof a && w.Ed(a, "string", Ce, "parse:str");
		a = a.replace(/,/gm, " ");
		a = a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,
			"$1 $2");
		a = a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm, "$1 $2");
		a = a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^\s])/gm, "$1 $2");
		a = a.replace(/([^\s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm, "$1 $2");
		a = a.replace(/([0-9])([+\-])/gm, "$1 $2");
		a = a.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm, "$1 $3 $4 ");
		a = a.replace(/[\s\r\t\n]+/gm, " ");
		a = a.replace(/^\s+|\s+$/g, "");
		for (var l = a.split(" "), m = 0; m < l.length; m++) {
			var n = l[m];
			if (null !== n.match(/(\.[0-9]*)(\.)/gm)) {
				for (var p =
						[], q = "", r = !1, s = 0; s < n.length; s++) {
					var u = n[s];
					"." !== u || r ? "." === u ? (p.push(q), q = ".") : q += u : (r = !0, q += u)
				}
				p.push(q);
				l.splice(m, 1);
				for (n = 0; n < p.length; n++) l.splice(m + n, 0, p[n]);
				m += p.length - 1
			}
		}
		for (var t = -1, x = "", v = "", n = new y(0, 0), z = new y(0, 0), A = new y(0, 0), L = l.length, p = w.s(), r = q = !1, s = !0, m = null; !(t >= L - 1);)
			if (v = x, x = d(), "" !== x) switch (x.toUpperCase()) {
				case "X":
					s = !0;
					r = q = !1;
					break;
				case "M":
					m = f();
					null === p.Xb || !0 === s ? (M(p, m.x, m.y, q, !1, !r), s = !1) : p.moveTo(m.x, m.y);
					for (n = A; !c();) m = f(), p.lineTo(m.x, m.y);
					break;
				case "L":
					for (; !c();) m =
						f(), p.lineTo(m.x, m.y);
					break;
				case "H":
					for (; !c();) A = m = new y((x === x.toLowerCase() ? A.x : 0) + parseFloat(d()), A.y), p.lineTo(A.x, A.y);
					break;
				case "V":
					for (; !c();) A = m = new y(A.x, (x === x.toLowerCase() ? A.y : 0) + parseFloat(d())), p.lineTo(A.x, A.y);
					break;
				case "C":
					for (; !c();) {
						var u = e(),
							E = h(),
							m = f();
						N(p, u.x, u.y, E.x, E.y, m.x, m.y)
					}
					break;
				case "S":
					for (; !c();) u = k(), E = h(), m = f(), N(p, u.x, u.y, E.x, E.y, m.x, m.y);
					break;
				case "Q":
					for (; !c();) E = h(), m = f(), Qe(p, E.x, E.y, m.x, m.y);
					break;
				case "T":
					for (; !c();) z = E = k(), m = f(), Qe(p, E.x, E.y, m.x, m.y);
					break;
				case "B":
					for (; !c();) {
						var m = parseFloat(d()),
							u = parseFloat(d()),
							E = parseFloat(d()),
							P = parseFloat(d()),
							$ = parseFloat(d()),
							S = $,
							ba = !1;
						c() || (S = parseFloat(d()), c() || (ba = 0 !== parseFloat(d())));
						x === x.toLowerCase() && (E += A.x, P += A.y);
						p.arcTo(m, u, E, P, $, S, ba)
					}
					break;
				case "A":
					for (; !c();) u = Math.abs(parseFloat(d())), E = Math.abs(parseFloat(d())), P = parseFloat(d()), $ = !!parseFloat(d()), S = !!parseFloat(d()), m = f(), Re(p, u, E, P, $, S, m.x, m.y);
					break;
				case "Z":
					m = p.o.gc.n[p.o.gc.length - 1];
					O(p);
					A = n;
					break;
				case "F":
					u = "";
					for (m = 1; l[t +
							m];)
						if (null !== l[t + m].match(/[Uu]/)) m++;
						else if (null === l[t + m].match(/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/)) m++;
					else {
						u = l[t + m];
						break
					}
					u.match(/[Mm]/) ? q = !0 : Se(p);
					break;
				case "U":
					u = "";
					for (m = 1; l[t + m];)
						if (null !== l[t + m].match(/[Ff]/)) m++;
						else if (null === l[t + m].match(/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/)) m++;
					else {
						u = l[t + m];
						break
					}
					u.match(/[Mm]/) ? r = !0 : p.ab(!1)
			}
		n = p.o;
		w.q(p);
		if (b)
			for (p = n.gc.i; p.next();) m = p.value, m.pu = !0;
		return n
	};

	function Te(a, b) {
		for (var c = a.length, d = w.K(), e = 0; e < c; e++) {
			var f = a[e];
			d.x = f[0];
			d.y = f[1];
			b.nb(d);
			f[0] = d.x;
			f[1] = d.y;
			d.x = f[2];
			d.y = f[3];
			b.nb(d);
			f[2] = d.x;
			f[3] = d.y;
			d.x = f[4];
			d.y = f[5];
			b.nb(d);
			f[4] = d.x;
			f[5] = d.y;
			d.x = f[6];
			d.y = f[7];
			b.nb(d);
			f[6] = d.x;
			f[7] = d.y
		}
		w.v(d)
	}
	Ce.prototype.Ix = function() {
		if (this.fb || this.Kv !== this.gc.F) return !0;
		for (var a = this.gc.n, b = a.length, c = 0; c < b; c++)
			if (a[c].Ix()) return !0;
		return !1
	};
	Ce.prototype.Ay = function() {
		this.fb = !1;
		this.Nq = this.jo = null;
		this.Oq = NaN;
		this.Kv = this.gc.F;
		for (var a = this.gc.n, b = a.length, c = 0; c < b; c++) a[c].Ay()
	};
	Ce.prototype.sh = function() {
		var a = this.vv;
		a.Qa();
		isNaN(this.No) || isNaN(this.Lo) ? a.m(0, 0, 0, 0) : a.m(0, 0, this.No, this.Lo);
		Ue(this, a, !1);
		ab(a, 0, 0, 0, 0);
		a.freeze()
	};
	Ce.prototype.computeBoundsWithoutOrigin = Ce.prototype.AH = function() {
		var a = new B;
		Ue(this, a, !0);
		return a
	};

	function Ue(a, b, c) {
		switch (a.type) {
			case Ge:
			case He:
			case Ie:
				c ? b.m(a.Cc, a.Mc, 0, 0) : ab(b, a.Cc, a.Mc, 0, 0);
				ab(b, a.yb, a.Gb, 0, 0);
				break;
			case De:
				var d = a.gc;
				a = d.n;
				for (var d = d.length, e = 0; e < d; e++) {
					var f = a[e];
					c && 0 === e ? b.m(f.ha, f.fa, 0, 0) : ab(b, f.ha, f.fa, 0, 0);
					for (var h = f.wb.n, k = h.length, l = f.ha, m = f.fa, n = 0; n < k; n++) {
						var p = h[n];
						switch (p.type) {
							case Ne:
							case Ve:
								l = p.C;
								m = p.D;
								ab(b, l, m, 0, 0);
								break;
							case We:
								Wd(l, m, p.wc, p.Rc, p.Ch, p.Dh, p.C, p.D, .5, b);
								l = p.C;
								m = p.D;
								break;
							case pf:
								ge(l, m, p.wc, p.Rc, p.C, p.D, .5, b);
								l = p.C;
								m = p.D;
								break;
							case qf:
							case rf:
								var q =
									p.type === qf ? sf(p, f) : tf(p, f, l, m),
									r = q.length;
								if (0 === r) {
									l = p.la;
									m = p.ra;
									ab(b, l, m, 0, 0);
									break
								}
								for (var p = null, s = 0; s < r; s++) p = q[s], Wd(p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7], .5, b);
								null !== p && (l = p[6], m = p[7]);
								break;
							default:
								w.k("Unknown Segment type: " + p.type)
						}
					}
				}
				break;
			default:
				w.k("Unknown Geometry type: " + a.type)
		}
	}
	Ce.prototype.normalize = Ce.prototype.normalize = function() {
		this.P && w.ma(this);
		var a = this.AH();
		this.offset(-a.x, -a.y);
		return new y(-a.x, -a.y)
	};
	Ce.prototype.offset = Ce.prototype.offset = function(a, b) {
		this.P && w.ma(this);
		this.transform(1, 0, 0, 1, a, b);
		return this
	};
	Ce.prototype.scale = Ce.prototype.scale = function(a, b) {
		this.P && w.ma(this);
		this.transform(a, 0, 0, b, 0, 0);
		return this
	};
	Ce.prototype.rotate = Ce.prototype.rotate = function(a, b, c) {
		this.P && w.ma(this);
		void 0 === b && (b = 0);
		void 0 === c && (c = 0);
		var d = w.Wg();
		d.reset();
		d.rotate(a, b, c);
		this.transform(d.m11, d.m12, d.m21, d.m22, d.dx, d.dy);
		w.af(d);
		return this
	};
	Ce.prototype.transform = Ce.prototype.transform = function(a, b, c, d, e, f) {
		var h = 0,
			k = 0;
		switch (this.type) {
			case Ge:
			case He:
			case Ie:
				h = this.Cc;
				k = this.Mc;
				this.Cc = h * a + k * c + e;
				this.Mc = h * b + k * d + f;
				h = this.yb;
				k = this.Gb;
				this.yb = h * a + k * c + e;
				this.Gb = h * b + k * d + f;
				break;
			case De:
				for (var l = this.gc.n, m = l.length, n = 0; n < m; n++) {
					var p = l[n],
						h = p.ha,
						k = p.fa;
					p.ha = h * a + k * c + e;
					p.fa = h * b + k * d + f;
					for (var p = p.wb.n, q = p.length, r = 0; r < q; r++) {
						var s = p[r];
						switch (s.type) {
							case Ne:
							case Ve:
								h = s.C;
								k = s.D;
								s.C = h * a + k * c + e;
								s.D = h * b + k * d + f;
								break;
							case We:
								h = s.wc;
								k = s.Rc;
								s.wc =
									h * a + k * c + e;
								s.Rc = h * b + k * d + f;
								h = s.Ch;
								k = s.Dh;
								s.Ch = h * a + k * c + e;
								s.Dh = h * b + k * d + f;
								h = s.C;
								k = s.D;
								s.C = h * a + k * c + e;
								s.D = h * b + k * d + f;
								break;
							case pf:
								h = s.wc;
								k = s.Rc;
								s.wc = h * a + k * c + e;
								s.Rc = h * b + k * d + f;
								h = s.C;
								k = s.D;
								s.C = h * a + k * c + e;
								s.D = h * b + k * d + f;
								break;
							case qf:
								h = s.la;
								k = s.ra;
								s.la = h * a + k * c + e;
								s.ra = h * b + k * d + f;
								0 !== b && (h = 180 * Math.atan2(b, a) / Math.PI, 0 > h && (h += 360), s.ze += h);
								0 > a && (s.ze = 180 - s.ze, s.tf = -s.tf);
								0 > d && (s.ze = -s.ze, s.tf = -s.tf);
								s.radiusX *= Math.sqrt(a * a + c * c);
								void 0 !== s.radiusY && (s.radiusY *= Math.sqrt(b * b + d * d));
								break;
							case rf:
								h = s.C;
								k = s.D;
								s.C = h *
									a + k * c + e;
								s.D = h * b + k * d + f;
								0 !== b && (h = 180 * Math.atan2(b, a) / Math.PI, 0 > h && (h += 360), s.Kj += h);
								0 > a && (s.Kj = 180 - s.Kj, s.$l = !s.$l);
								0 > d && (s.Kj = -s.Kj, s.$l = !s.$l);
								s.radiusX *= Math.sqrt(a * a + c * c);
								s.radiusY *= Math.sqrt(b * b + d * d);
								break;
							default:
								w.k("Unknown Segment type: " + s.type)
						}
					}
				}
		}
		this.fb = !0;
		return this
	};
	Ce.prototype.Ia = function(a, b, c, d) {
		var e = a.x,
			f = a.y,
			h = this.gb.x - 20;
		a = a.y;
		for (var k = 0, l = 0, m = 0, n = 0, p = 0, q = 0, r = this.gc.n, s = r.length, u = 0; u < s; u++) {
			var t = r[u];
			if (t.pu) {
				if (c && t.Ia(e, f, b)) return !0;
				for (var x = t.wb, l = t.ha, m = t.fa, v = l, z = m, A = x.n, L = 0; L <= x.length; L++) {
					var E, P;
					L !== x.length ? (E = A[L], P = E.type, p = E.C, q = E.D) : (P = Ne, p = v, q = z);
					switch (P) {
						case Ve:
							n = uf(e, f, h, a, l, m, v, z);
							if (isNaN(n)) return !0;
							k += n;
							v = p;
							z = q;
							break;
						case Ne:
							n = uf(e, f, h, a, l, m, p, q);
							if (isNaN(n)) return !0;
							k += n;
							break;
						case We:
							n = je(l, m, E.wc, E.Rc, E.Ch, E.Dh, p, q, h,
								a, e, f, .5);
							k += n;
							break;
						case pf:
							n = je(l, m, (l + 2 * E.wc) / 3, (m + 2 * E.Rc) / 3, (2 * E.wc + p) / 3, (2 * E.Rc + q) / 3, p, q, h, a, e, f, .5);
							k += n;
							break;
						case qf:
						case rf:
							P = E.type === qf ? sf(E, t) : tf(E, t, l, m);
							var $ = P.length;
							if (0 === $) {
								n = uf(e, f, h, a, l, m, E.la, E.ra);
								if (isNaN(n)) return !0;
								k += n;
								break
							}
							for (var S = null, ba = 0; ba < $; ba++) {
								S = P[ba];
								if (0 === ba) {
									n = uf(e, f, h, a, l, m, S[0], S[1]);
									if (isNaN(n)) return !0;
									k += n
								}
								n = je(S[0], S[1], S[2], S[3], S[4], S[5], S[6], S[7], h, a, e, f, .5);
								k += n
							}
							null !== S && (p = S[6], q = S[7]);
							break;
						default:
							w.k("Unknown Segment type: " + E.type)
					}
					l = p;
					m =
						q
				}
				if (0 !== k) return !0;
				k = 0
			} else if (t.Ia(e, f, d ? b : b + 2)) return !0
		}
		return 0 !== k
	};

	function uf(a, b, c, d, e, f, h, k) {
		if (Ud(e, f, h, k, .05, a, b)) return NaN;
		var l = (a - c) * (f - k);
		if (0 === l) return 0;
		var m = ((a * d - b * c) * (e - h) - (a - c) * (e * k - f * h)) / l;
		b = (a * d - b * c) * (f - k) / l;
		if (m >= a) return 0;
		if ((e > h ? e - h : h - e) < (f > k ? f - k : k - f)) {
			if (e = a = 0, f < k ? (a = f, e = k) : (a = k, e = f), b < a || b > e) return 0
		} else if (e < h ? (a = e, e = h) : a = h, m < a || m > e) return 0;
		return 0 < l ? 1 : -1
	}

	function vf(a, b, c, d) {
		a = a.gc.n;
		for (var e = a.length, f = 0; f < e; f++)
			if (a[f].Ia(b, c, d)) return !0;
		return !1
	}
	Ce.prototype.getPointAlongPath = Ce.prototype.fI = function(a, b) {
		0 > a ? a = 0 : 1 < a && (a = 1);
		void 0 === b && (b = new y);
		if (this.type === Ge) return b.m(this.ha + a * (this.C - this.ha), this.fa + a * (this.D - this.fa)), b;
		for (var c = this.Cx, d = this.Zt, e = c.length, f = this.$t * a, h = 0, k = 0; k < e; k++)
			for (var l = d[k], m = l.length, n = 0; n < m; n++) {
				var p = l[n];
				if (h + p >= f) return d = (f - h) / p, c = c[k], k = c[2 * n], e = c[2 * n + 1], b.m(k + (c[2 * n + 2] - k) * d, e + (c[2 * n + 3] - e) * d), b;
				h += p
			}
		b.m(NaN, NaN);
		return b
	};
	Ce.prototype.getAngleAlongPath = Ce.prototype.hF = function(a) {
		0 > a ? a = 0 : 1 < a && (a = 1);
		var b = 0;
		if (this.type === Ge) return b = 180 * Math.atan2(this.D - this.fa, this.C - this.ha) / Math.PI;
		for (var b = this.Cx, c = this.Zt, d = b.length, e = this.$t * a, f = 0, h = 0; h < d; h++) {
			var k = c[h],
				l = k.length;
			for (a = 0; a < l; a++) {
				var m = k[a];
				if (f + m >= e) return b = b[h], b = 180 * Math.atan2(b[2 * a + 3] - b[2 * a + 1], b[2 * a + 2] - b[2 * a]) / Math.PI;
				f += m
			}
		}
		return NaN
	};
	Ce.prototype.getFractionForPoint = Ce.prototype.bI = function(a) {
		if (this.type === Ge) {
			var b = this.ha,
				c = this.fa,
				d = this.C,
				e = this.D;
			if (b !== d || c !== e) {
				var f = a.x;
				a = a.y;
				var h = 0,
					k = 0;
				return b === d ? (c < e ? (h = c, k = e) : (h = e, k = c), a <= h ? h === c ? 0 : 1 : a >= k ? k === c ? 0 : 1 : Math.abs(a - c) / (k - h)) : c === e ? (b < d ? (h = b, k = d) : (h = d, k = b), f <= h ? h === b ? 0 : 1 : f >= k ? k === b ? 0 : 1 : Math.abs(f - b) / (k - h)) : ((f - b) * (f - b) + (a - c) * (a - c)) / ((d - b) * (d - b) + (e - c) * (e - c))
			}
		} else if (this.type === He) {
			if (b = this.ha, c = this.fa, d = this.C, e = this.D, b !== d || c !== e) {
				var h = d - b,
					k = e - c,
					l = 2 * h + 2 * k,
					f = a.x;
				a = a.y;
				f = Math.min(Math.max(f, b), d);
				a = Math.min(Math.max(a, c), e);
				var b = Math.abs(f - b),
					d = Math.abs(f - d),
					c = Math.abs(a - c),
					e = Math.abs(a - e),
					m = Math.min(b, d, c, e);
				if (m === c) return f / l;
				if (m === d) return (h + a) / l;
				if (m === e) return (2 * h + k - f) / l;
				if (m === b) return (2 * h + 2 * k - a) / l
			}
		} else {
			for (var e = this.Cx, h = this.Zt, k = this.$t, l = w.K(), c = Infinity, b = d = 0, f = e.length, n = m = 0, p = 0; p < f; p++)
				for (var q = e[p], r = h[p], s = q.length, u = 0; u < s; u += 2) {
					var t = q[u],
						x = q[u + 1];
					if (0 !== u) {
						La(m, n, t, x, a.x, a.y, l);
						var v = (l.x - a.x) * (l.x - a.x) + (l.y - a.y) * (l.y - a.y);
						v < c && (c = v,
							d = b, d += Math.sqrt((l.x - m) * (l.x - m) + (l.y - n) * (l.y - n)));
						b += r[(u - 2) / 2]
					}
					m = t;
					n = x
				}
			w.v(l);
			a = d / k;
			return 0 > a ? 0 : 1 < a ? 1 : a
		}
		return 0
	};
	w.u(Ce, {
		Cx: null
	}, function() {
		wf(this);
		return this.jo
	});

	function wf(a) {
		if (null === a.jo) {
			a.Ix() && a.Ay();
			var b = a.jo = [],
				c = a.Nq = [],
				d = [],
				e = [];
			if (a.type === Ge) d.push(a.ha), d.push(a.fa), d.push(a.C), d.push(a.D), b.push(d), e.push(Math.sqrt((a.ha - a.C) * (a.ha - a.C) + (a.fa - a.D) * (a.fa - a.D))), c.push(e);
			else if (a.type === He) d.push(a.ha), d.push(a.fa), d.push(a.C), d.push(a.fa), d.push(a.C), d.push(a.D), d.push(a.ha), d.push(a.D), d.push(a.ha), d.push(a.fa), b.push(d), e.push(Math.abs(a.ha - a.C)), e.push(Math.abs(a.fa - a.D)), e.push(Math.abs(a.ha - a.C)), e.push(Math.abs(a.fa - a.D)), c.push(e);
			else if (a.type === Ie) {
				var f = new Ee;
				f.ha = a.C;
				f.fa = (a.fa + a.D) / 2;
				var h = new xf(qf);
				h.ze = 0;
				h.tf = 360;
				h.la = (a.ha + a.C) / 2;
				h.ra = (a.fa + a.D) / 2;
				h.radiusX = Math.abs(a.ha - a.C) / 2;
				h.radiusY = Math.abs(a.fa - a.D) / 2;
				f.add(h);
				a = sf(h, f);
				e = a.length;
				if (0 === e) d.push(h.la), d.push(h.ra);
				else
					for (var h = f.ha, f = f.fa, k = 0; k < e; k++) {
						var l = a[k];
						Xd(h, f, l[2], l[3], l[4], l[5], l[6], l[7], .5, d);
						h = l[6];
						f = l[7]
					}
				b.push(d);
				c.push(yf(d))
			} else
				for (var m = a.gc.i; m.next();) {
					var n = m.value,
						d = [];
					d.push(n.ha);
					d.push(n.fa);
					for (var h = n.ha, f = n.fa, p = h, q = f, r = n.wb.n,
							s = r.length, u = 0; u < s; u++) {
						var t = r[u];
						switch (t.na) {
							case Ve:
								4 <= d.length && (b.push(d), c.push(yf(d)));
								d = [];
								d.push(t.C);
								d.push(t.D);
								h = t.C;
								f = t.D;
								p = h;
								q = f;
								break;
							case Ne:
								d.push(t.C);
								d.push(t.D);
								h = t.C;
								f = t.D;
								break;
							case We:
								Xd(h, f, t.Jd, t.We, t.mh, t.Dg, t.yb, t.Gb, .5, d);
								h = t.C;
								f = t.D;
								break;
							case pf:
								he(h, f, t.Jd, t.We, t.yb, t.Gb, .5, d);
								h = t.C;
								f = t.D;
								break;
							case qf:
								a = sf(t, n);
								e = a.length;
								if (0 === e) {
									d.push(t.la);
									d.push(t.ra);
									h = t.la;
									f = t.ra;
									break
								}
								for (k = 0; k < e; k++) l = a[k], Xd(h, f, l[2], l[3], l[4], l[5], l[6], l[7], .5, d), h = l[6], f = l[7];
								break;
							case rf:
								a =
									tf(t, n, h, f);
								e = a.length;
								if (0 === e) {
									d.push(t.la);
									d.push(t.ra);
									h = t.la;
									f = t.ra;
									break
								}
								for (k = 0; k < e; k++) l = a[k], Xd(h, f, l[2], l[3], l[4], l[5], l[6], l[7], .5, d), h = l[6], f = l[7];
								break;
							default:
								w.k("Segment not of valid type: " + t.na)
						}
						t.Rh && (d.push(p), d.push(q))
					}
					4 <= d.length && (b.push(d), c.push(yf(d)))
				}
		}
	}
	w.u(Ce, {
		Zt: null
	}, function() {
		wf(this);
		return this.Nq
	});
	w.u(Ce, {
		$t: null
	}, function() {
		var a = this.Oq;
		if (isNaN(a)) {
			if (this.type === Ge) var a = Math.abs(this.C - this.ha),
				b = Math.abs(this.D - this.fa),
				a = Math.sqrt(a * a + b * b);
			else if (this.type === He) a = Math.abs(this.C - this.ha), b = Math.abs(this.D - this.fa), a = 2 * a + 2 * b;
			else
				for (var b = this.Zt, c = b.length, d = a = 0; d < c; d++)
					for (var e = b[d], f = e.length, h = 0; h < f; h++) a += e[h];
			this.Oq = a
		}
		return a
	});

	function yf(a) {
		for (var b = [], c = 0, d = 0, e = a.length, f = 0; f < e; f += 2) {
			var h = a[f],
				k = a[f + 1];
			0 !== f && (c = Math.sqrt(Sa(c, d, h, k)), b.push(c));
			c = h;
			d = k
		}
		return b
	}
	w.defineProperty(Ce, {
		type: "type"
	}, function() {
		return this.na
	}, function(a) {
		this.na !== a && (this.P && w.ma(this, a), this.na = a, this.fb = !0)
	});
	w.defineProperty(Ce, {
		ha: "startX"
	}, function() {
		return this.Cc
	}, function(a) {
		this.Cc !== a && (this.P && w.ma(this, a), this.Cc = a, this.fb = !0)
	});
	w.defineProperty(Ce, {
		fa: "startY"
	}, function() {
		return this.Mc
	}, function(a) {
		this.Mc !== a && (this.P && w.ma(this, a), this.Mc = a, this.fb = !0)
	});
	w.defineProperty(Ce, {
		C: "endX"
	}, function() {
		return this.yb
	}, function(a) {
		this.yb !== a && (this.P && w.ma(this, a), this.yb = a, this.fb = !0)
	});
	w.defineProperty(Ce, {
		D: "endY"
	}, function() {
		return this.Gb
	}, function(a) {
		this.Gb !== a && (this.P && w.ma(this, a), this.Gb = a, this.fb = !0)
	});
	w.defineProperty(Ce, {
		gc: "figures"
	}, function() {
		return this.Rj
	}, function(a) {
		this.Rj !== a && (this.P && w.ma(this, a), this.Rj = a, this.fb = !0)
	});
	Ce.prototype.add = Ce.prototype.add = function(a) {
		this.Rj.add(a);
		return this
	};
	Ce.prototype.setSpots = function(a, b, c, d, e, f, h, k) {
		this.P && w.ma(this);
		this.gi = (new K(a, b, e, f)).freeze();
		this.hi = (new K(c, d, h, k)).freeze();
		return this
	};
	w.defineProperty(Ce, {
		A: "spot1"
	}, function() {
		return this.gi
	}, function(a) {
		this.P && w.ma(this, a);
		this.gi = a.S()
	});
	w.defineProperty(Ce, {
		B: "spot2"
	}, function() {
		return this.hi
	}, function(a) {
		this.P && w.ma(this, a);
		this.hi = a.S()
	});
	w.defineProperty(Ce, {
		ae: "defaultStretch"
	}, function() {
		return this.Gi
	}, function(a) {
		this.P && w.ma(this, a);
		this.Gi = a
	});
	w.u(Ce, {
		gb: "bounds"
	}, function() {
		this.Ix() && (this.Ay(), this.sh());
		return this.vv
	});

	function Ee(a, b, c, d) {
		w.oc(this);
		this.P = !1;
		void 0 === c && (c = !0);
		this.Fm = c;
		void 0 === d && (d = !0);
		this.Oo = d;
		this.Cc = void 0 !== a ? a : 0;
		this.Mc = void 0 !== b ? b : 0;
		this.jp = new H(xf);
		this.Jw = this.jp.F;
		this.fb = !0
	}
	w.ga("PathFigure", Ee);
	w.mi(Ee);
	Ee.prototype.copy = function() {
		var a = new Ee;
		a.Fm = this.Fm;
		a.Oo = this.Oo;
		a.Cc = this.Cc;
		a.Mc = this.Mc;
		for (var b = this.jp.n, c = b.length, d = a.jp, e = 0; e < c; e++) {
			var f = b[e].copy();
			d.add(f)
		}
		a.Jw = this.Jw;
		a.fb = this.fb;
		return a
	};
	Ee.prototype.equalsApprox = Ee.prototype.Oc = function(a) {
		if (!(a instanceof Ee && J(this.ha, a.ha) && J(this.fa, a.fa))) return !1;
		var b = this.wb.n;
		a = a.wb.n;
		var c = b.length;
		if (c !== a.length) return !1;
		for (var d = 0; d < c; d++)
			if (!b[d].Oc(a[d])) return !1;
		return !0
	};
	g = Ee.prototype;
	g.toString = function(a) {
		void 0 === a && (a = -1);
		for (var b = 0 > a ? "M" + this.ha.toString() + " " + this.fa.toString() : "M" + this.ha.toFixed(a) + " " + this.fa.toFixed(a), c = this.wb.n, d = c.length, e = 0; e < d; e++) b += " " + c[e].toString(a);
		return b
	};
	g.freeze = function() {
		this.P = !0;
		var a = this.wb;
		a.freeze();
		for (var b = a.n, a = a.length, c = 0; c < a; c++) b[c].freeze();
		return this
	};
	g.Qa = function() {
		this.P = !1;
		var a = this.wb;
		a.Qa();
		for (var a = a.n, b = a.length, c = 0; c < b; c++) a[c].Qa();
		return this
	};
	g.Ix = function() {
		if (this.fb) return !0;
		var a = this.wb;
		if (this.Jw !== a.F) return !0;
		for (var a = a.n, b = a.length, c = 0; c < b; c++)
			if (a[c].fb) return !0;
		return !1
	};
	g.Ay = function() {
		this.fb = !1;
		var a = this.wb;
		this.Jw = a.F;
		for (var a = a.n, b = a.length, c = 0; c < b; c++) {
			var d = a[c];
			d.fb = !1;
			d.Jh = null
		}
	};
	w.defineProperty(Ee, {
		pu: "isFilled"
	}, function() {
		return this.Fm
	}, function(a) {
		this.P && w.ma(this, a);
		this.Fm = a
	});
	w.defineProperty(Ee, {
		cm: "isShadowed"
	}, function() {
		return this.Oo
	}, function(a) {
		this.P && w.ma(this, a);
		this.Oo = a
	});
	w.defineProperty(Ee, {
		ha: "startX"
	}, function() {
		return this.Cc
	}, function(a) {
		this.P && w.ma(this, a);
		this.Cc = a;
		this.fb = !0
	});
	w.defineProperty(Ee, {
		fa: "startY"
	}, function() {
		return this.Mc
	}, function(a) {
		this.P && w.ma(this, a);
		this.Mc = a;
		this.fb = !0
	});
	w.defineProperty(Ee, {
		wb: "segments"
	}, function() {
		return this.jp
	}, function(a) {
		this.P && w.ma(this, a);
		this.jp = a;
		this.fb = !0
	});
	Ee.prototype.add = Ee.prototype.add = function(a) {
		this.jp.add(a);
		return this
	};
	Ee.prototype.Ia = function(a, b, c) {
		for (var d = this.ha, e = this.fa, f = d, h = e, k = this.wb.n, l = k.length, m = 0; m < l; m++) {
			var n = k[m];
			switch (n.type) {
				case Ve:
					f = n.C;
					h = n.D;
					d = n.C;
					e = n.D;
					break;
				case Ne:
					if (Ud(d, e, n.C, n.D, c, a, b)) return !0;
					d = n.C;
					e = n.D;
					break;
				case We:
					if (Vd(d, e, n.wc, n.Rc, n.Ch, n.Dh, n.C, n.D, .5, a, b, c)) return !0;
					d = n.C;
					e = n.D;
					break;
				case pf:
					if (fe(d, e, n.wc, n.Rc, n.C, n.D, .5, a, b, c)) return !0;
					d = n.C;
					e = n.D;
					break;
				case qf:
				case rf:
					var p = n.type === qf ? sf(n, this) : tf(n, this, d, e),
						q = p.length;
					if (0 === q) {
						if (Ud(d, e, n.la, n.ra, c, a, b)) return !0;
						d = n.la;
						e = n.ra;
						break
					}
					for (var r = null, s = 0; s < q; s++)
						if (r = p[s], 0 === s && Ud(d, e, r[0], r[1], c, a, b) || Vd(r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], .5, a, b, c)) return !0;
					null !== r && (d = r[6], e = r[7]);
					break;
				default:
					w.k("Unknown Segment type: " + n.type)
			}
			if (n.Gx && (d !== f || e !== h) && Ud(d, e, f, h, c, a, b)) return !0
		}
		return !1
	};

	function xf(a, b, c, d, e, f, h, k) {
		w.oc(this);
		this.P = !1;
		void 0 === a && (a = Ne);
		this.na = a;
		this.yb = void 0 !== b ? b : 0;
		this.Gb = void 0 !== c ? c : 0;
		void 0 === d && (d = 0);
		void 0 === e && (e = 0);
		void 0 === f && (f = 0);
		void 0 === h && (h = 0);
		a === rf ? (a = f % 360, 0 > a && (a += 360), this.Jd = a, this.We = 0, this.mh = Math.max(d, 0), this.Dg = Math.max(e, 0), this.So = "boolean" === typeof h ? !!h : !1, this.no = !!k) : (this.Jd = d, this.We = e, a === qf && (f = Math.max(f, 0)), this.mh = f, "number" === typeof h ? (a === qf && (h = Math.max(h, 0)), this.Dg = h) : this.Dg = 0, this.no = this.So = !1);
		this.Rh = !1;
		this.fb = !0;
		this.Jh = null
	}
	w.ga("PathSegment", xf);
	w.mi(xf);
	xf.prototype.copy = function() {
		var a = new xf;
		a.na = this.na;
		a.yb = this.yb;
		a.Gb = this.Gb;
		a.Jd = this.Jd;
		a.We = this.We;
		a.mh = this.mh;
		a.Dg = this.Dg;
		a.So = this.So;
		a.no = this.no;
		a.Rh = this.Rh;
		a.fb = this.fb;
		return a
	};
	xf.prototype.equalsApprox = xf.prototype.Oc = function(a) {
		if (!(a instanceof xf) || this.type !== a.type || this.Gx !== a.Gx) return !1;
		switch (this.type) {
			case Ve:
			case Ne:
				return J(this.C, a.C) && J(this.D, a.D);
			case We:
				return J(this.C, a.C) && J(this.D, a.D) && J(this.wc, a.wc) && J(this.Rc, a.Rc) && J(this.Ch, a.Ch) && J(this.Dh, a.Dh);
			case pf:
				return J(this.C, a.C) && J(this.D, a.D) && J(this.wc, a.wc) && J(this.Rc, a.Rc);
			case qf:
				return J(this.ze, a.ze) && J(this.tf, a.tf) && J(this.la, a.la) && J(this.ra, a.ra) && J(this.radiusX, a.radiusX) && J(this.radiusY,
					a.radiusY);
			case rf:
				return this.$l === a.$l && this.Jx === a.Jx && J(this.Kj, a.Kj) && J(this.C, a.C) && J(this.D, a.D) && J(this.radiusX, a.radiusX) && J(this.radiusY, a.radiusY);
			default:
				return !1
		}
	};
	xf.prototype.ic = function(a) {
		a.Ge === xf ? this.type = a : w.Ij(this, a)
	};
	xf.prototype.toString = function(a) {
		void 0 === a && (a = -1);
		var b = "";
		switch (this.type) {
			case Ve:
				b = 0 > a ? "M" + this.C.toString() + " " + this.D.toString() : "M" + this.C.toFixed(a) + " " + this.D.toFixed(a);
				break;
			case Ne:
				b = 0 > a ? "L" + this.C.toString() + " " + this.D.toString() : "L" + this.C.toFixed(a) + " " + this.D.toFixed(a);
				break;
			case We:
				b = 0 > a ? "C" + this.wc.toString() + " " + this.Rc.toString() + " " + this.Ch.toString() + " " + this.Dh.toString() + " " + this.C.toString() + " " + this.D.toString() : "C" + this.wc.toFixed(a) + " " + this.Rc.toFixed(a) + " " + this.Ch.toFixed(a) +
					" " + this.Dh.toFixed(a) + " " + this.C.toFixed(a) + " " + this.D.toFixed(a);
				break;
			case pf:
				b = 0 > a ? "Q" + this.wc.toString() + " " + this.Rc.toString() + " " + this.C.toString() + " " + this.D.toString() : "Q" + this.wc.toFixed(a) + " " + this.Rc.toFixed(a) + " " + this.C.toFixed(a) + " " + this.D.toFixed(a);
				break;
			case qf:
				b = 0 > a ? "B" + this.ze.toString() + " " + this.tf.toString() + " " + this.la.toString() + " " + this.ra.toString() + " " + this.radiusX : "B" + this.ze.toFixed(a) + " " + this.tf.toFixed(a) + " " + this.la.toFixed(a) + " " + this.ra.toFixed(a) + " " + this.radiusX;
				break;
			case rf:
				b = 0 > a ? "A" + this.radiusX.toString() + " " + this.radiusY.toString() + " " + this.Kj.toString() + " " + (this.Jx ? 1 : 0) + " " + (this.$l ? 1 : 0) + " " + this.C.toString() + " " + this.D.toString() : "A" + this.radiusX.toFixed(a) + " " + this.radiusY.toFixed(a) + " " + this.Kj.toFixed(a) + " " + (this.Jx ? 1 : 0) + " " + (this.$l ? 1 : 0) + " " + this.C.toFixed(a) + " " + this.D.toFixed(a);
				break;
			default:
				b = this.type.toString()
		}
		return b + (this.Rh ? "z" : "")
	};
	var Ve;
	xf.Move = Ve = w.p(xf, "Move", 0);
	var Ne;
	xf.Line = Ne = w.p(xf, "Line", 1);
	var We;
	xf.Bezier = We = w.p(xf, "Bezier", 2);
	var pf;
	xf.QuadraticBezier = pf = w.p(xf, "QuadraticBezier", 3);
	var qf;
	xf.Arc = qf = w.p(xf, "Arc", 4);
	var rf;
	xf.SvgArc = rf = w.p(xf, "SvgArc", 4);
	xf.prototype.freeze = function() {
		this.P = !0;
		return this
	};
	xf.prototype.Qa = function() {
		this.P = !1;
		return this
	};
	xf.prototype.close = xf.prototype.close = function() {
		this.Rh = !0;
		return this
	};

	function sf(a, b) {
		if (null !== a.Jh && !1 === b.fb) return a.Jh;
		var c = a.radiusX,
			d = a.radiusY;
		void 0 === d && (d = c);
		if (0 === c || 0 === d) return a.Jh = [], a.Jh;
		var e = a.Jd,
			f = a.We,
			h = ze(c < d ? c : d, a.ze, a.ze + a.tf, !1);
		if (c !== d) {
			var k = w.Wg();
			k.reset();
			c < d ? k.scale(1, d / c) : k.scale(c / d, 1);
			Te(h, k);
			w.af(k)
		}
		c = h.length;
		for (d = 0; d < c; d++) k = h[d], k[0] += e, k[1] += f, k[2] += e, k[3] += f, k[4] += e, k[5] += f, k[6] += e, k[7] += f;
		a.Jh = h;
		return a.Jh
	}

	function tf(a, b, c, d) {
		function e(a, b, c, d) {
			return (a * d < b * c ? -1 : 1) * Math.acos((a * c + b * d) / (Math.sqrt(a * a + b * b) * Math.sqrt(c * c + d * d)))
		}
		if (null !== a.Jh && !1 === b.fb) return a.Jh;
		b = a.mh;
		var f = a.Dg;
		0 === b && (b = 1E-4);
		0 === f && (f = 1E-4);
		var h = Math.PI / 180 * a.Jd,
			k = a.So,
			l = a.no,
			m = a.yb,
			n = a.Gb,
			p = Math.cos(h),
			q = Math.sin(h),
			r = p * (c - m) / 2 + q * (d - n) / 2,
			h = -q * (c - m) / 2 + p * (d - n) / 2,
			s = r * r / (b * b) + h * h / (f * f);
		1 < s && (b *= Math.sqrt(s), f *= Math.sqrt(s));
		s = (k === l ? -1 : 1) * Math.sqrt((b * b * f * f - b * b * h * h - f * f * r * r) / (b * b * h * h + f * f * r * r));
		isNaN(s) && (s = 0);
		k = s * b * h / f;
		s = s * -f * r /
			b;
		isNaN(k) && (k = 0);
		isNaN(s) && (s = 0);
		c = (c + m) / 2 + p * k - q * s;
		d = (d + n) / 2 + q * k + p * s;
		n = e(1, 0, (r - k) / b, (h - s) / f);
		p = (r - k) / b;
		m = (h - s) / f;
		r = (-r - k) / b;
		k = (-h - s) / f;
		h = e(p, m, r, k);
		r = (p * r + m * k) / (Math.sqrt(p * p + m * m) * Math.sqrt(r * r + k * k)); - 1 >= r ? h = Math.PI : 1 <= r && (h = 0);
		!l && 0 < h && (h -= 2 * Math.PI);
		l && 0 > h && (h += 2 * Math.PI);
		l = b > f ? 1 : b / f;
		r = b > f ? f / b : 1;
		b = ze(b > f ? b : f, n, n + h, !0);
		f = w.Wg();
		f.reset();
		f.translate(c, d);
		f.rotate(a.Jd, 0, 0);
		f.scale(l, r);
		Te(b, f);
		w.af(f);
		a.Jh = b;
		return a.Jh
	}
	w.defineProperty(xf, {
		Gx: "isClosed"
	}, function() {
		return this.Rh
	}, function(a) {
		this.Rh !== a && (this.Rh = a, this.fb = !0)
	});
	w.defineProperty(xf, {
		type: "type"
	}, function() {
		return this.na
	}, function(a) {
		this.P && w.ma(this, a);
		this.na = a;
		this.fb = !0
	});
	w.defineProperty(xf, {
		C: "endX"
	}, function() {
		return this.yb
	}, function(a) {
		this.P && w.ma(this, a);
		this.yb = a;
		this.fb = !0
	});
	w.defineProperty(xf, {
		D: "endY"
	}, function() {
		return this.Gb
	}, function(a) {
		this.P && w.ma(this, a);
		this.Gb = a;
		this.fb = !0
	});
	w.defineProperty(xf, {
		wc: "point1X"
	}, function() {
		return this.Jd
	}, function(a) {
		this.P && w.ma(this, a);
		this.Jd = a;
		this.fb = !0
	});
	w.defineProperty(xf, {
		Rc: "point1Y"
	}, function() {
		return this.We
	}, function(a) {
		this.P && w.ma(this, a);
		this.We = a;
		this.fb = !0
	});
	w.defineProperty(xf, {
		Ch: "point2X"
	}, function() {
		return this.mh
	}, function(a) {
		this.P && w.ma(this, a);
		this.mh = a;
		this.fb = !0
	});
	w.defineProperty(xf, {
		Dh: "point2Y"
	}, function() {
		return this.Dg
	}, function(a) {
		this.P && w.ma(this, a);
		this.Dg = a;
		this.fb = !0
	});
	w.defineProperty(xf, {
		la: "centerX"
	}, function() {
		return this.Jd
	}, function(a) {
		this.P && w.ma(this, a);
		this.Jd = a;
		this.fb = !0
	});
	w.defineProperty(xf, {
		ra: "centerY"
	}, function() {
		return this.We
	}, function(a) {
		this.P && w.ma(this, a);
		this.We = a;
		this.fb = !0
	});
	w.defineProperty(xf, {
		radiusX: "radiusX"
	}, function() {
		return this.mh
	}, function(a) {
		0 > a && w.Fa(a, ">= zero", xf, "radiusX");
		this.P && w.ma(this, a);
		this.mh = a;
		this.fb = !0
	});
	w.defineProperty(xf, {
		radiusY: "radiusY"
	}, function() {
		return this.Dg
	}, function(a) {
		0 > a && w.Fa(a, ">= zero", xf, "radiusY");
		this.P && w.ma(this, a);
		this.Dg = a;
		this.fb = !0
	});
	w.defineProperty(xf, {
		ze: "startAngle"
	}, function() {
		return this.yb
	}, function(a) {
		this.yb !== a && (this.P && w.ma(this, a), a %= 360, 0 > a && (a += 360), this.yb = a, this.fb = !0)
	});
	w.defineProperty(xf, {
		tf: "sweepAngle"
	}, function() {
		return this.Gb
	}, function(a) {
		this.P && w.ma(this, a);
		360 < a && (a = 360); - 360 > a && (a = -360);
		this.Gb = a;
		this.fb = !0
	});
	w.defineProperty(xf, {
		$l: "isClockwiseArc"
	}, function() {
		return this.no
	}, function(a) {
		this.P && w.ma(this, a);
		this.no = a;
		this.fb = !0
	});
	w.defineProperty(xf, {
		Jx: "isLargeArc"
	}, function() {
		return this.So
	}, function(a) {
		this.P && w.ma(this, a);
		this.So = a;
		this.fb = !0
	});
	w.defineProperty(xf, {
		Kj: "xAxisRotation"
	}, function() {
		return this.Jd
	}, function(a) {
		a %= 360;
		0 > a && (a += 360);
		this.P && w.ma(this, a);
		this.Jd = a;
		this.fb = !0
	});

	function zf() {
		this.aa = null;
		this.Zz = (new y(0, 0)).freeze();
		this.dz = (new y(0, 0)).freeze();
		this.sv = this.ow = 0;
		this.tv = 1;
		this.cw = "";
		this.Tw = this.Gv = !1;
		this.Ev = this.uv = 0;
		this.Mj = this.Pv = this.Zv = !1;
		this.Br = null;
		this.Rw = 0;
		this.Gg = this.Qw = null
	}
	w.ga("InputEvent", zf);
	zf.prototype.copy = function() {
		var a = new zf;
		a.aa = this.aa;
		a.Zz.assign(this.gf);
		a.dz.assign(this.da);
		a.ow = this.ow;
		a.sv = this.sv;
		a.tv = this.tv;
		a.cw = this.cw;
		a.Gv = this.Gv;
		a.Tw = this.Tw;
		a.uv = this.uv;
		a.Ev = this.Ev;
		a.Zv = this.Zv;
		a.Pv = this.Pv;
		a.Mj = this.Mj;
		a.Br = this.Br;
		a.Rw = this.Rw;
		a.Qw = this.Qw;
		a.Gg = this.Gg;
		return a
	};
	zf.prototype.toString = function() {
		var a = "^";
		0 !== this.md && (a += "M:" + this.md);
		0 !== this.button && (a += "B:" + this.button);
		"" !== this.key && (a += "K:" + this.key);
		0 !== this.re && (a += "C:" + this.re);
		0 !== this.Ck && (a += "D:" + this.Ck);
		this.tc && (a += "h");
		this.bubbles && (a += "b");
		null !== this.da && (a += "@" + this.da.toString());
		return a
	};
	w.defineProperty(zf, {
		g: "diagram"
	}, function() {
		return this.aa
	}, function(a) {
		this.aa = a
	});
	w.defineProperty(zf, {
		gf: "viewPoint"
	}, function() {
		return this.Zz
	}, function(a) {
		w.G(a, y, zf, "viewPoint");
		this.Zz.assign(a)
	});
	w.defineProperty(zf, {
		da: "documentPoint"
	}, function() {
		return this.dz
	}, function(a) {
		w.G(a, y, zf, "documentPoint");
		this.dz.assign(a)
	});
	zf.prototype.getMultiTouchViewPoint = zf.prototype.Dx = function(a, b) {
		var c = this.g;
		if (null === c) return b;
		Af(c, this.event, a, b);
		return b
	};
	zf.prototype.getMultiTouchDocumentPoint = function(a, b) {
		var c = this.g;
		if (null === c) return b;
		Af(c, this.event, a, b);
		b.assign(c.OB(b));
		return b
	};
	w.defineProperty(zf, {
		md: "modifiers"
	}, function() {
		return this.ow
	}, function(a) {
		this.ow = a
	});
	w.defineProperty(zf, {
		button: "button"
	}, function() {
		return this.sv
	}, function(a) {
		this.sv = a;
		if (null === this.event) switch (a) {
			case 0:
				this.buttons = 1;
				break;
			case 1:
				this.buttons = 4;
				break;
			case 2:
				this.buttons = 2
		}
	});
	w.defineProperty(zf, {
		buttons: "buttons"
	}, function() {
		return this.tv
	}, function(a) {
		this.tv = a
	});
	w.defineProperty(zf, {
		key: "key"
	}, function() {
		return this.cw
	}, function(a) {
		this.cw = a
	});
	w.defineProperty(zf, {
		Dk: "down"
	}, function() {
		return this.Gv
	}, function(a) {
		this.Gv = a
	});
	w.defineProperty(zf, {
		up: "up"
	}, function() {
		return this.Tw
	}, function(a) {
		this.Tw = a
	});
	w.defineProperty(zf, {
		re: "clickCount"
	}, function() {
		return this.uv
	}, function(a) {
		this.uv = a
	});
	w.defineProperty(zf, {
		Ck: "delta"
	}, function() {
		return this.Ev
	}, function(a) {
		this.Ev = a
	});
	w.defineProperty(zf, {
		tu: "isMultiTouch"
	}, function() {
		return this.Zv
	}, function(a) {
		this.Zv = a
	});
	w.defineProperty(zf, {
		tc: "handled"
	}, function() {
		return this.Pv
	}, function(a) {
		this.Pv = a
	});
	w.defineProperty(zf, {
		bubbles: "bubbles"
	}, function() {
		return this.Mj
	}, function(a) {
		this.Mj = a
	});
	w.defineProperty(zf, {
		event: "event"
	}, function() {
		return this.Br
	}, function(a) {
		this.Br = a
	});
	w.u(zf, {
		yj: "isTouchEvent"
	}, function() {
		var a = window.TouchEvent,
			b = this.event;
		return a && b instanceof a ? !0 : (a = window.PointerEvent) && b instanceof a && ("touch" === b.pointerType || "pen" === b.pointerType)
	});
	w.u(zf, {
		yh: "isMac"
	}, function() {
		return w.yh
	});
	w.defineProperty(zf, {
		timestamp: "timestamp"
	}, function() {
		return this.Rw
	}, function(a) {
		this.Rw = a
	});
	w.defineProperty(zf, {
		If: "targetDiagram"
	}, function() {
		return this.Qw
	}, function(a) {
		this.Qw = a
	});
	w.defineProperty(zf, {
		Ae: "targetObject"
	}, function() {
		return this.Gg
	}, function(a) {
		this.Gg = a
	});
	w.defineProperty(zf, {
		control: "control"
	}, function() {
		return 0 !== (this.md & 1)
	}, function(a) {
		this.md = a ? this.md | 1 : this.md & -2
	});
	w.defineProperty(zf, {
		shift: "shift"
	}, function() {
		return 0 !== (this.md & 4)
	}, function(a) {
		this.md = a ? this.md | 4 : this.md & -5
	});
	w.defineProperty(zf, {
		alt: "alt"
	}, function() {
		return 0 !== (this.md & 2)
	}, function(a) {
		this.md = a ? this.md | 2 : this.md & -3
	});
	w.defineProperty(zf, {
		Cu: "meta"
	}, function() {
		return 0 !== (this.md & 8)
	}, function(a) {
		this.md = a ? this.md | 8 : this.md & -9
	});
	w.defineProperty(zf, {
		left: "left"
	}, function() {
		var a = this.event;
		return null === a || "mousedown" !== a.type && "mouseup" !== a.type && "pointerdown" !== a.type && "pointerup" !== a.type ? 0 !== (this.buttons & 1) : 0 === this.button
	}, function(a) {
		this.buttons = a ? this.buttons | 1 : this.buttons & -2
	});
	w.defineProperty(zf, {
		right: "right"
	}, function() {
		var a = this.event;
		return null === a || "mousedown" !== a.type && "mouseup" !== a.type && "pointerdown" !== a.type && "pointerup" !== a.type ? 0 !== (this.buttons & 2) : 2 === this.button
	}, function(a) {
		this.buttons = a ? this.buttons | 2 : this.buttons & -3
	});
	w.defineProperty(zf, {
		xL: "middle"
	}, function() {
		var a = this.event;
		return null === a || "mousedown" !== a.type && "mouseup" !== a.type && "pointerdown" !== a.type && "pointerup" !== a.type ? 0 !== (this.buttons & 4) : 1 === this.button
	}, function(a) {
		this.buttons = a ? this.buttons | 4 : this.buttons & -5
	});

	function Bf() {
		this.aa = null;
		this.Rb = "";
		this.xw = this.Ow = null;
		this.Vq = !1
	}
	w.ga("DiagramEvent", Bf);
	Bf.prototype.copy = function() {
		var a = new Bf;
		a.aa = this.aa;
		a.Rb = this.Rb;
		a.Ow = this.Ow;
		a.xw = this.xw;
		a.Vq = this.Vq;
		return a
	};
	Bf.prototype.toString = function() {
		var a = "*" + this.name;
		null !== this.GB && (a += ":" + this.GB.toString());
		null !== this.iB && (a += "(" + this.iB.toString() + ")");
		return a
	};
	w.defineProperty(Bf, {
		g: "diagram"
	}, function() {
		return this.aa
	}, function(a) {
		this.aa = a
	});
	w.defineProperty(Bf, {
		name: "name"
	}, function() {
		return this.Rb
	}, function(a) {
		this.Rb = a
	});
	w.defineProperty(Bf, {
		GB: "subject"
	}, function() {
		return this.Ow
	}, function(a) {
		this.Ow = a
	});
	w.defineProperty(Bf, {
		iB: "parameter"
	}, function() {
		return this.xw
	}, function(a) {
		this.xw = a
	});
	w.defineProperty(Bf, {
		cancel: "cancel"
	}, function() {
		return this.Vq
	}, function(a) {
		this.Vq !== a && w.Qt("DiagramEvent.cancel", "2.0");
		this.Vq = a
	});

	function Cf() {
		this.Wq = Df;
		this.Vm = this.nw = "";
		this.As = this.Bs = this.Gs = this.Hs = this.Es = this.aa = this.ne = null
	}
	w.ga("ChangedEvent", Cf);
	var Ef;
	Cf.Transaction = Ef = w.p(Cf, "Transaction", -1);
	var Df;
	Cf.Property = Df = w.p(Cf, "Property", 0);
	var Ff;
	Cf.Insert = Ff = w.p(Cf, "Insert", 1);
	var Qf;
	Cf.Remove = Qf = w.p(Cf, "Remove", 2);
	Cf.prototype.clear = Cf.prototype.clear = function() {
		this.As = this.Bs = this.Gs = this.Hs = this.Es = this.aa = this.ne = null
	};
	Cf.prototype.copy = function() {
		var a = new Cf;
		a.Wq = this.Wq;
		a.nw = this.nw;
		a.Vm = this.Vm;
		a.ne = this.ne;
		a.aa = this.aa;
		a.Es = this.Es;
		var b = this.Hs;
		a.Hs = w.Pa(b) && "function" === typeof b.S ? b.S() : b;
		b = this.Gs;
		a.Gs = w.Pa(b) && "function" === typeof b.S ? b.S() : b;
		b = this.Bs;
		a.Bs = w.Pa(b) && "function" === typeof b.S ? b.S() : b;
		b = this.As;
		a.As = w.Pa(b) && "function" === typeof b.S ? b.S() : b;
		return a
	};
	Cf.prototype.ic = function(a) {
		a.Ge === Cf ? this.Dc = a : w.Ij(this, a)
	};
	Cf.prototype.toString = function() {
		var a = "",
			a = this.Dc === Ef ? a + "* " : this.Dc === Df ? a + (null !== this.$ ? "!m" : "!d") : a + ((null !== this.$ ? "!m" : "!d") + this.Dc);
		this.propertyName && "string" === typeof this.propertyName && (a += " " + this.propertyName);
		this.sf && this.sf !== this.propertyName && (a += " " + this.sf);
		a += ": ";
		this.Dc === Ef ? null !== this.oldValue && (a += " " + this.oldValue) : (null !== this.object && (a += Rf(this.object)), null !== this.oldValue && (a += "  old: " + Rf(this.oldValue)), null !== this.Dj && (a += " " + this.Dj), null !== this.newValue && (a +=
			"  new: " + Rf(this.newValue)), null !== this.Cj && (a += " " + this.Cj));
		return a
	};
	Cf.prototype.getValue = Cf.prototype.ka = function(a) {
		return a ? this.oldValue : this.newValue
	};
	Cf.prototype.getParam = function(a) {
		return a ? this.Dj : this.Cj
	};
	Cf.prototype.canUndo = Cf.prototype.canUndo = function() {
		return null !== this.$ || null !== this.g ? !0 : !1
	};
	Cf.prototype.undo = Cf.prototype.undo = function() {
		this.canUndo() && (null !== this.$ ? this.$.mn(this, !0) : null !== this.g && this.g.mn(this, !0))
	};
	Cf.prototype.canRedo = Cf.prototype.canRedo = function() {
		return null !== this.$ || null !== this.g ? !0 : !1
	};
	Cf.prototype.redo = Cf.prototype.redo = function() {
		this.canRedo() && (null !== this.$ ? this.$.mn(this, !1) : null !== this.g && this.g.mn(this, !1))
	};
	w.defineProperty(Cf, {
		$: "model"
	}, function() {
		return this.ne
	}, function(a) {
		this.ne = a
	});
	w.defineProperty(Cf, {
		g: "diagram"
	}, function() {
		return this.aa
	}, function(a) {
		this.aa = a
	});
	w.defineProperty(Cf, {
		Dc: "change"
	}, function() {
		return this.Wq
	}, function(a) {
		this.Wq = a
	});
	w.defineProperty(Cf, {
		sf: "modelChange"
	}, function() {
		return this.nw
	}, function(a) {
		this.nw = a
	});
	w.defineProperty(Cf, {
		propertyName: "propertyName"
	}, function() {
		return this.Vm
	}, function(a) {
		this.Vm = a
	});
	w.u(Cf, {
		HF: "isTransactionFinished"
	}, function() {
		return this.Wq === Ef && ("CommittedTransaction" === this.Vm || "FinishedUndo" === this.Vm || "FinishedRedo" === this.Vm)
	});
	w.defineProperty(Cf, {
		object: "object"
	}, function() {
		return this.Es
	}, function(a) {
		this.Es = a
	});
	w.defineProperty(Cf, {
		oldValue: "oldValue"
	}, function() {
		return this.Hs
	}, function(a) {
		this.Hs = a
	});
	w.defineProperty(Cf, {
		Dj: "oldParam"
	}, function() {
		return this.Gs
	}, function(a) {
		this.Gs = a
	});
	w.defineProperty(Cf, {
		newValue: "newValue"
	}, function() {
		return this.Bs
	}, function(a) {
		this.Bs = a
	});
	w.defineProperty(Cf, {
		Cj: "newParam"
	}, function() {
		return this.As
	}, function(a) {
		this.As = a
	});

	function F(a) {
		1 < arguments.length && w.k("Model constructor can only take one optional argument, the Array of node data.");
		w.oc(this);
		this.kr = this.Rb = "";
		this.Oi = !1;
		this.Cz = {};
		this.Fe = [];
		this.Kc = new ma(null, Object);
		this.kk = "key";
		this.so = this.Wo = null;
		this.br = this.cr = !1;
		this.Mq = null;
		this.Qm = "category";
		this.Hi = new ma(null, I);
		this.gk = null;
		this.fj = !1;
		this.Yz = null;
		this.ja = new Sf;
		void 0 !== a && (this.hg = a)
	}
	w.ga("Model", F);
	F.prototype.cloneProtected = function(a) {
		a.Rb = this.Rb;
		a.kr = this.kr;
		a.Oi = this.Oi;
		a.kk = this.kk;
		a.Wo = this.Wo;
		a.so = this.so;
		a.cr = this.cr;
		a.br = this.br;
		a.Mq = this.Mq;
		a.Qm = this.Qm
	};
	F.prototype.copy = function() {
		var a = new this.constructor;
		this.cloneProtected(a);
		return a
	};
	F.prototype.clear = F.prototype.clear = function() {
		this.Fe = [];
		this.Kc.clear();
		this.Hi.clear();
		this.ja.clear()
	};
	g = F.prototype;
	g.toString = function(a) {
		void 0 === a && (a = 0);
		if (1 < a) return this.JB();
		var b = ("" !== this.name ? this.name : "") + " Model";
		if (0 < a) {
			b += "\n node data:";
			a = this.hg;
			for (var c = w.Za(a), d = 0; d < c; d++) var e = w.Ba(a, d),
				b = b + (" " + this.qb(e) + ":" + Rf(e))
		}
		return b
	};
	g.bo = function() {
		var a = "";
		"" !== this.name && (a += ',\n  "name": ' + this.quote(this.name));
		"" !== this.Rl && (a += ',\n  "dataFormat": ' + this.quote(this.Rl));
		this.hb && (a += ',\n  "isReadOnly": ' + this.hb);
		"key" !== this.dm && "string" === typeof this.dm && (a += ',\n  "nodeKeyProperty": ' + this.quote(this.dm));
		this.oA && (a += ',\n  "copiesArrays": true');
		this.nA && (a += ',\n  "copiesArrayObjects": true');
		"category" !== this.Sn && "string" === typeof this.Sn && (a += ',\n  "nodeCategoryProperty": ' + this.quote(this.Sn));
		return a
	};
	g.Lu = function(a) {
		a.name && (this.name = a.name);
		a.dataFormat && (this.Rl = a.dataFormat);
		a.isReadOnly && (this.hb = a.isReadOnly);
		a.nodeKeyProperty && (this.dm = a.nodeKeyProperty);
		a.copiesArrays && (this.oA = a.copiesArrays);
		a.copiesArrayObjects && (this.nA = a.copiesArrayObjects);
		a.nodeCategoryProperty && (this.Sn = a.nodeCategoryProperty)
	};

	function Tf(a) {
		return ',\n  "modelData": ' + Uf(a, a.Mk)
	}

	function Vf(a, b) {
		var c = b.modelData;
		w.Pa(c) && (a.Pu(c), a.Mk = c)
	}
	g.VB = function() {
		var a = this.Mk,
			b = !1,
			c;
		for (c in a)
			if (!Wf(c, a[c])) {
				b = !0;
				break
			}
		a = "";
		b && (a = Tf(this));
		return a + ',\n  "nodeDataArray": ' + Xf(this, this.hg, !0)
	};
	g.lB = function(a) {
		Vf(this, a);
		a = a.nodeDataArray;
		w.isArray(a) && (this.Pu(a), this.hg = a)
	};

	function Yf(a, b, c, d) {
		if (b === c) return !0;
		if (typeof b !== typeof c || "function" === typeof b || "function" === typeof c) return !1;
		if (Array.isArray(b) && Array.isArray(c)) {
			if (d.ka(b) === c) return !0;
			d.add(b, c);
			if (b.length !== c.length) return !1;
			for (var e = 0; e < b.length; e++)
				if (!Yf(a, b[e], c[e], d)) return !1;
			return !0
		}
		if (w.Pa(b) && w.Pa(c)) {
			if (d.ka(b) === c) return !0;
			d.add(b, c);
			for (e in b) {
				var f = b[e];
				if (!Wf(e, f)) {
					var h = c[e];
					if (void 0 === h || !Yf(a, f, h, d)) return !1
				}
			}
			for (var k in c)
				if (h = c[k], !Wf(k, h) && (f = b[k], void 0 === f || !Yf(a, f, h, d))) return !1;
			return !0
		}
		return !1
	}

	function Zf(a, b, c) {
		a[c] !== b[c] && w.k("Model.computeJsonDifference: Model." + c + ' is not the same in both models: "' + a[c] + '" and "' + b[c] + '"')
	}
	g.WB = function(a) {
		Zf(this, a, "nodeKeyProperty");
		this instanceof $f && Zf(this, a, "nodeParentKeyProperty");
		for (var b = new I, c = new I, d = (new I).Nc(this.Kc.IF), e = new ma, f = a.hg, h = 0; h < f.length; h++) {
			var k = f[h],
				l = a.qb(k);
			if (void 0 !== l) {
				d.remove(l);
				var m = this.we(l);
				null === m ? (b.add(l), c.add(k)) : Yf(this, m, k, e) || c.add(k)
			} else this.YA(k), l = this.qb(k), b.add(l), c.add(k)
		}
		f = "";
		Yf(this, this.Mk, a.Mk, e) || (f += Tf(this));
		0 < b.count && (f += this.Ly + Xf(this, b.xc(), !0));
		0 < c.count && (f += this.dC + Xf(this, c.xc(), !0));
		0 < d.count && (f += this.Ny +
			Xf(this, d.xc(), !0));
		return f
	};
	F.prototype.computeJsonDifference = F.prototype.computeJSONDifference = function(a, b) {
		w.G(a, F, F, "computeJsonDifference:newmodel");
		void 0 === b && (b = this.constructor === F ? "go.Model" : this.constructor === Q ? "go.GraphLinksModel" : this.constructor === $f ? "go.TreeModel" : w.of(this));
		return '{ "class": ' + this.quote(b) + ', "incremental": 1' + this.bo() + this.WB(a) + "}"
	};
	g = F.prototype;
	g.Ly = ',\n  "insertedNodeKeys": ';
	g.dC = ',\n  "modifiedNodeData": ';
	g.Ny = ',\n  "removedNodeKeys": ';
	g.UB = function(a, b) {
		var c = this,
			d = !1,
			e = new I,
			f = new I,
			h = new I;
		a.Wf.each(function(a) {
			a.$ === c && ("nodeDataArray" === a.sf ? a.Dc === Ff ? e.add(a.newValue) : a.Dc === Qf && h.add(a.oldValue) : c.Ie(a.object) ? f.add(a.object) : c.Mk === a.object && a.Dc === Df && (d = !0))
		});
		var k = new I;
		e.each(function(a) {
			k.add(c.qb(a));
			b || f.add(a)
		});
		var l = new I;
		h.each(function(a) {
			l.add(c.qb(a));
			b && f.add(a)
		});
		var m = "";
		d && (m += Tf(this));
		0 < k.count && (m += (b ? this.Ny : this.Ly) + Xf(this, k.xc(), !0));
		0 < f.count && (m += this.dC + Xf(this, f.xc(), !0));
		0 < l.count && (m += (b ?
			this.Ly : this.Ny) + Xf(this, l.xc(), !0));
		return m
	};
	g.kB = function(a) {
		Vf(this, a);
		var b = a.insertedNodeKeys,
			c = a.modifiedNodeData,
			d = new ma;
		if (w.isArray(c))
			for (var e = 0; e < c.length; e++) {
				var f = w.Ba(c, e),
					h = this.qb(f);
				void 0 !== h && null !== h && d.set(h, f)
			}
		if (w.isArray(b))
			for (var e = w.Za(b), k = 0; k < e; k++) f = w.Ba(b, k), h = this.we(f), null === h && (h = (h = d.get(f)) ? h : this.copyNodeData({}), this.uy(h, f), this.Il(h));
		if (w.isArray(c))
			for (e = w.Za(c), k = 0; k < e; k++)
				if (f = w.Ba(c, k), h = this.qb(f), h = this.we(h), null !== h)
					for (var l in f) "__gohashid" !== l && l !== this.dm && l !== this.kq && this.setDataProperty(h,
						l, f[l]);
		a = a.removedNodeKeys;
		if (w.isArray(a))
			for (e = w.Za(a), k = 0; k < e; k++) f = w.Ba(a, k), h = this.we(f), null !== h && this.ly(h)
	};
	F.prototype.toIncrementalJson = F.prototype.toIncrementalJSON = function(a, b) {
		w.G(a, Cf, F, "toIncrementalJson:e");
		a.Dc !== Ef && w.k("Model.toIncrementalJson argument is not a Transaction ChangedEvent:" + a.toString());
		var c = a.object;
		if (!(a.HF && c instanceof ag)) return '{ "incremental": 0 }';
		void 0 === b && (b = this.constructor === F ? "go.Model" : this.constructor === Q ? "go.GraphLinksModel" : this.constructor === $f ? "go.TreeModel" : w.of(this));
		return '{ "class": ' + this.quote(b) + ', "incremental": 1' + this.bo() + this.UB(c, "FinishedUndo" ===
			a.propertyName) + "}"
	};
	F.prototype.toJson = F.prototype.toJSON = F.prototype.JB = function(a) {
		void 0 === a && (a = this.constructor === F ? "go.Model" : this.constructor === Q ? "go.GraphLinksModel" : this.constructor === $f ? "go.TreeModel" : w.of(this));
		return '{ "class": ' + this.quote(a) + this.bo() + this.VB() + "}"
	};
	F.prototype.applyIncrementalJson = F.prototype.applyIncrementalJSON = function(a) {
		var b = null;
		if ("string" === typeof a)
			if (window.JSON && window.JSON.parse) try {
				b = window.JSON.parse(a)
			} catch (c) {} else w.trace("WARNING: no JSON.parse available");
			else "object" === typeof a ? b = a : w.k("Unable to modify a Model from: " + a);
		var d = b.incremental;
		"number" !== typeof d && w.k("Unable to apply non-incremental changes to Model: " + a);
		0 !== d && (this.Hb("applyIncrementalJson"), this.kB(b), this.Yc("applyIncrementalJson"))
	};
	F.fromJson = F.fromJSON = function(a, b) {
		void 0 === b && (b = null);
		null !== b && w.G(b, F, F, "fromJson:model");
		var c = null;
		if ("string" === typeof a)
			if (window.JSON && window.JSON.parse) try {
				c = window.JSON.parse(a)
			} catch (d) {} else w.trace("WARNING: no JSON.parse available");
			else "object" === typeof a ? c = a : w.k("Unable to construct a Model from: " + a);
		if (null === b) {
			var e;
			e = null;
			var f = c["class"];
			if ("string" === typeof f) try {
				var h = null;
				0 === f.indexOf("go.") ? (f = f.substr(3), h = ca[f]) : (h = ca[f], void 0 === h && (h = window[f]));
				"function" === typeof h &&
					(e = new h)
			} catch (k) {}
			null === e || e instanceof F ? b = e : w.k("Unable to construct a Model of declared class: " + c["class"])
		}
		null === b && (b = new Q);
		b.Lu(c);
		b.lB(c);
		return b
	};
	F.prototype.replaceJsonObjects = F.prototype.Pu = function(a) {
		if (w.isArray(a))
			for (var b = w.Za(a), c = 0; c < b; c++) {
				var d = w.Ba(a, c);
				w.Pa(d) && w.DE(a, c, this.Pu(d))
			} else if (w.Pa(a)) {
				for (c in a)
					if (d = a[c], w.Pa(d) && (d = this.Pu(d), a[c] = d, "points" === c && Array.isArray(d))) {
						for (var e = 0 === d.length % 2, f = 0; f < d.length; f++)
							if ("number" !== typeof d[f]) {
								e = !1;
								break
							}
						if (e) {
							e = new H(y);
							for (f = 0; f < d.length / 2; f++) e.add(new y(d[2 * f], d[2 * f + 1]));
							e.freeze();
							a[c] = e
						}
					}
				if ("object" === typeof a) {
					c = a;
					d = a["class"];
					if ("NaN" === d) c = NaN;
					else if ("Date" ===
						d) c = new Date(a.value);
					else if ("go.Point" === d) c = new y(bg(a.x), bg(a.y));
					else if ("go.Size" === d) c = new ia(bg(a.width), bg(a.height));
					else if ("go.Rect" === d) c = new B(bg(a.x), bg(a.y), bg(a.width), bg(a.height));
					else if ("go.Margin" === d) c = new hb(bg(a.top), bg(a.right), bg(a.bottom), bg(a.left));
					else if ("go.Spot" === d) c = "string" === typeof a["enum"] ? xb(a["enum"]) : new K(bg(a.x), bg(a.y), bg(a.offsetX), bg(a.offsetY));
					else if ("go.Brush" === d) {
						if (c = new ga, c.type = pa(ga, a.type), "string" === typeof a.color && (c.color = a.color), a.start instanceof K && (c.start = a.start), a.end instanceof K && (c.end = a.end), "number" === typeof a.startRadius && (c.$u = bg(a.startRadius)), "number" === typeof a.endRadius && (c.St = bg(a.endRadius)), a = a.colorStops, w.Pa(a))
							for (b in a) c.addColorStop(parseFloat(b), a[b])
					} else "go.Geometry" === d ? (b = null, b = "string" === typeof a.path ? Pe(a.path) : new Ce, b.type = pa(Ce, a.type), "number" === typeof a.startX && (b.ha = bg(a.startX)), "number" === typeof a.startY && (b.fa = bg(a.startY)), "number" === typeof a.endX && (b.C = bg(a.endX)), "number" === typeof a.endY && (b.D =
						bg(a.endY)), a.spot1 instanceof K && (b.A = a.spot1), a.spot2 instanceof K && (b.B = a.spot2), c = b) : "go.EnumValue" === d && (b = a.classType, 0 === b.indexOf("go.") && (b = b.substr(3)), c = pa(ca[b], a.name));
					a = c
				}
			}
		return a
	};
	F.prototype.quote = function(a) {
		for (var b = "", c = a.length, d = 0; d < c; d++) {
			var e = a[d];
			if ('"' === e || "\\" === e) b += "\\" + e;
			else if ("\b" === e) b += "\\b";
			else if ("\f" === e) b += "\\f";
			else if ("\n" === e) b += "\\n";
			else if ("\r" === e) b += "\\r";
			else if ("\t" === e) b += "\\t";
			else var f = a.charCodeAt(d),
				b = 16 > f ? b + ("\\u000" + a.charCodeAt(d).toString(16)) : 32 > f ? b + ("\\u00" + a.charCodeAt(d).toString(16)) : 8232 === f ? b + "\\u2028" : 8233 === f ? b + "\\u2029" : b + e
		}
		return '"' + b + '"'
	};
	F.prototype.writeJsonValue = F.prototype.dv = function(a) {
		return void 0 === a ? "undefined" : null === a ? "null" : !0 === a ? "true" : !1 === a ? "false" : "string" === typeof a ? this.quote(a) : "number" === typeof a ? Infinity === a ? "9e9999" : -Infinity === a ? "-9e9999" : isNaN(a) ? '{"class":"NaN"}' : a.toString() : a instanceof Date ? '{"class":"Date", "value":"' + a.toJSON() + '"}' : a instanceof Number ? this.dv(a.valueOf()) : w.isArray(a) ? Xf(this, a) : w.Pa(a) ? Uf(this, a) : "function" === typeof a ? "null" : a.toString()
	};

	function Xf(a, b, c) {
		void 0 === c && (c = !1);
		var d = w.Za(b);
		if (0 >= d) return "[]";
		var e = new qa;
		e.add("[ ");
		c && 1 < d && e.add("\n");
		for (var f = 0; f < d; f++) {
			var h = w.Ba(b, f);
			void 0 !== h && (0 < f && (e.add(","), c && e.add("\n")), e.add(a.dv(h)))
		}
		c && 1 < d && e.add("\n");
		e.add(" ]");
		return e.toString()
	}

	function Wf(a, b) {
		return void 0 === b || "__gohashid" === a || "_" === a[0] || "function" === typeof b ? !0 : !1
	}

	function cg(a) {
		return isNaN(a) ? "NaN" : Infinity === a ? "9e9999" : -Infinity === a ? "-9e9999" : a
	}

	function Uf(a, b) {
		var c = b;
		if (c instanceof y) b = {
			"class": "go.Point",
			x: cg(c.x),
			y: cg(c.y)
		};
		else if (c instanceof ia) b = {
			"class": "go.Size",
			width: cg(c.width),
			height: cg(c.height)
		};
		else if (c instanceof B) b = {
			"class": "go.Rect",
			x: cg(c.x),
			y: cg(c.y),
			width: cg(c.width),
			height: cg(c.height)
		};
		else if (c instanceof hb) b = {
			"class": "go.Margin",
			top: cg(c.top),
			right: cg(c.right),
			bottom: cg(c.bottom),
			left: cg(c.left)
		};
		else if (c instanceof K) b = c.$c() ? {
			"class": "go.Spot",
			x: cg(c.x),
			y: cg(c.y),
			offsetX: cg(c.offsetX),
			offsetY: cg(c.offsetY)
		} : {
			"class": "go.Spot",
			"enum": c.toString()
		};
		else if (c instanceof ga) {
			b = {
				"class": "go.Brush",
				type: c.type.name
			};
			if (c.type === og) b.color = c.color;
			else if (c.type === pg || c.type === bd) b.start = c.start, b.end = c.end, c.type === bd && (0 !== c.$u && (b.startRadius = cg(c.$u)), isNaN(c.St) || (b.endRadius = cg(c.St)));
			if (null !== c.yk) {
				for (var d = {}, c = c.yk.i; c.next();) d[c.key] = c.value;
				b.colorStops = d
			}
		} else if (c instanceof Ce) b = {
			"class": "go.Geometry",
			type: c.type.name
		}, 0 !== c.ha && (b.startX = cg(c.ha)), 0 !== c.fa && (b.startY = cg(c.fa)), 0 !== c.C && (b.endX =
			cg(c.C)), 0 !== c.D && (b.endY = cg(c.D)), c.A.L(zb) || (b.spot1 = c.A), c.B.L(Sb) || (b.spot2 = c.B), c.type === De && (b.path = Oe(c));
		else if (c instanceof da) b = {
			"class": "go.EnumValue",
			classType: w.of(c.Ge),
			name: c.name
		};
		else if (c instanceof G || c instanceof D || c instanceof qg || c instanceof F || c instanceof rg || c instanceof sg || c instanceof tg || c instanceof ug || c instanceof Sf || c instanceof ag) return w.trace("ERROR: trying to convert a GraphObject or Diagram or Model or Tool or Layout or UndoManager into JSON text: " + c.toString()),
			"{}";
		var d = "{",
			c = !0,
			e;
		for (e in b) {
			var f = w.ub(b, e);
			if (!Wf(e, f))
				if (c ? c = !1 : d += ", ", d += '"' + e + '":', "points" === e && f instanceof H && f.na === y) {
					for (var h = "[", f = f.i; f.next();) {
						var k = f.value;
						1 < h.length && (h += ",");
						h += a.dv(k.x);
						h += ",";
						h += a.dv(k.y)
					}
					h += "]";
					d += h
				} else d += a.dv(f)
		}
		return d + "}"
	}

	function bg(a) {
		return "number" === typeof a ? a : "NaN" === a ? NaN : "9e9999" === a ? Infinity : "-9e9999" === a ? -Infinity : parseFloat(a)
	}
	w.defineProperty(F, {
		name: "name"
	}, function() {
		return this.Rb
	}, function(a) {
		var b = this.Rb;
		b !== a && (w.j(a, "string", F, "name"), this.Rb = a, this.h("name", b, a))
	});
	w.defineProperty(F, {
		Rl: "dataFormat"
	}, function() {
		return this.kr
	}, function(a) {
		var b = this.kr;
		b !== a && (w.j(a, "string", F, "dataFormat"), this.kr = a, this.h("dataFormat", b, a))
	});
	w.defineProperty(F, {
		hb: "isReadOnly"
	}, function() {
		return this.Oi
	}, function(a) {
		var b = this.Oi;
		b !== a && (w.j(a, "boolean", F, "isReadOnly"), this.Oi = a, this.h("isReadOnly", b, a))
	});
	w.defineProperty(F, {
		Mk: "modelData"
	}, function() {
		return this.Cz
	}, function(a) {
		var b = this.Cz;
		b !== a && (w.j(a, "object", F, "modelData"), this.Cz = a, this.h("modelData", b, a), this.Ib(a))
	});
	F.prototype.addChangedListener = F.prototype.gn = function(a) {
		w.j(a, "function", F, "addChangedListener:listener");
		null === this.gk && (this.gk = new H("function"));
		this.gk.add(a)
	};
	F.prototype.removeChangedListener = F.prototype.Nu = function(a) {
		w.j(a, "function", F, "removeChangedListener:listener");
		null !== this.gk && (this.gk.remove(a), 0 === this.gk.count && (this.gk = null))
	};
	F.prototype.jx = function(a) {
		this.bb || this.ja.rF(a);
		if (null !== this.gk)
			for (var b = this.gk, c = b.length, d = 0; d < c; d++) b.ea(d)(a)
	};
	F.prototype.raiseChangedEvent = F.prototype.cd = function(a, b, c, d, e, f, h) {
		vg(this, "", a, b, c, d, e, f, h)
	};
	F.prototype.raiseChanged = F.prototype.h = function(a, b, c, d, e) {
		vg(this, "", Df, a, this, b, c, d, e)
	};
	F.prototype.raiseDataChanged = F.prototype.jB = function(a, b, c, d, e, f) {
		vg(this, "", Df, b, a, c, d, e, f)
	};

	function vg(a, b, c, d, e, f, h, k, l) {
		void 0 === k && (k = null);
		void 0 === l && (l = null);
		var m = new Cf;
		m.$ = a;
		m.Dc = c;
		m.sf = b;
		m.propertyName = d;
		m.object = e;
		m.oldValue = f;
		m.Dj = k;
		m.newValue = h;
		m.Cj = l;
		a.jx(m)
	}
	w.defineProperty(F, {
		ja: "undoManager"
	}, function() {
		return this.Yz
	}, function(a) {
		var b = this.Yz;
		b !== a && (w.G(a, Sf, F, "undoManager"), null !== b && b.rJ(this), this.Yz = a, null !== a && a.lH(this))
	});
	w.defineProperty(F, {
		bb: "skipsUndoManager"
	}, function() {
		return this.fj
	}, function(a) {
		w.j(a, "boolean", F, "skipsUndoManager");
		this.fj = a
	});
	F.prototype.mn = function(a, b) {
		if (null !== a && a.$ === this)
			if (a.Dc === Df) {
				var c = a.object,
					d = a.propertyName,
					e = a.ka(b);
				w.Ma(c, d, e)
			} else a.Dc === Ff ? (c = a.Cj, "nodeDataArray" === a.sf ? (d = a.newValue, w.Pa(d) && "number" === typeof c && (e = this.qb(d), b ? (w.Ba(this.Fe, c) === d && w.Jg(this.Fe, c), void 0 !== e && this.Kc.remove(e)) : (w.Ba(this.Fe, c) !== d && w.qh(this.Fe, c, d), void 0 !== e && this.Kc.add(e, d)))) : "" === a.sf ? (d = a.object, !w.isArray(d) && a.propertyName && (d = w.ub(a.object, a.propertyName)), w.isArray(d) && "number" === typeof c && (e = a.newValue,
				b ? w.Jg(d, c) : w.qh(d, c, e))) : w.k("unknown ChangedEvent.Insert modelChange: " + a.toString())) : a.Dc === Qf ? (c = a.Dj, "nodeDataArray" === a.sf ? (d = a.oldValue, w.Pa(d) && "number" === typeof c && (e = this.qb(d), b ? (w.Ba(this.Fe, c) !== d && w.qh(this.Fe, c, d), void 0 !== e && this.Kc.add(e, d)) : (w.Ba(this.Fe, c) === d && w.Jg(this.Fe, c), void 0 !== e && this.Kc.remove(e)))) : "" === a.sf ? (d = a.object, !w.isArray(d) && a.propertyName && (d = w.ub(a.object, a.propertyName)), w.isArray(d) && "number" === typeof c && (e = a.oldValue, b ? w.qh(d, c, e) : w.Jg(d, c))) : w.k("unknown ChangedEvent.Remove modelChange: " +
				a.toString())) : a.Dc !== Ef && w.k("unknown ChangedEvent: " + a.toString())
	};
	F.prototype.startTransaction = F.prototype.Hb = function(a) {
		return this.ja.Hb(a)
	};
	F.prototype.commitTransaction = F.prototype.Yc = function(a) {
		return this.ja.Yc(a)
	};
	F.prototype.rollbackTransaction = F.prototype.fm = function() {
		return this.ja.fm()
	};
	F.prototype.commit = function(a, b) {
		var c = b;
		void 0 === c && (c = "");
		var d = this.bb;
		null === c && (this.bb = !0, c = "");
		this.ja.Hb(c);
		var e = !1;
		try {
			a(this), e = !0
		} finally {
			e ? this.ja.Yc(c) : this.ja.fm(), this.bb = d
		}
	};
	F.prototype.updateTargetBindings = F.prototype.Ib = function(a, b) {
		void 0 === b && (b = "");
		vg(this, "SourceChanged", Ef, b, a, null, null)
	};
	w.defineProperty(F, {
		dm: "nodeKeyProperty"
	}, function() {
		return this.kk
	}, function(a) {
		var b = this.kk;
		b !== a && (wg(a, F, "nodeKeyProperty"), "" === a && w.k("Model.nodeKeyProperty may not be the empty string"), 0 < this.Kc.count && w.k("Cannot set Model.nodeKeyProperty when there is existing node data"), this.kk = a, this.h("nodeKeyProperty", b, a))
	});

	function wg(a, b, c) {
		"string" !== typeof a && "function" !== typeof a && w.Ed(a, "string or function", b, c)
	}
	F.prototype.getKeyForNodeData = F.prototype.qb = function(a) {
		if (null !== a) {
			var b = this.kk;
			if ("" !== b && (b = w.ub(a, b), void 0 !== b)) {
				if (xg(b)) return b;
				w.k("Key value for node data " + a + " is not a number or a string: " + b)
			}
		}
	};
	F.prototype.setKeyForNodeData = F.prototype.uy = function(a, b) {
		void 0 !== b && null !== b && xg(b) || w.Ed(b, "number or string", F, "setKeyForNodeData:key");
		if (null !== a) {
			var c = this.kk;
			if ("" !== c)
				if (this.Ie(a)) {
					var d = w.ub(a, c);
					d !== b && null === this.we(b) && (w.Ma(a, c, b), this.Kc.remove(d), this.Kc.add(b, a), vg(this, "nodeKey", Df, c, a, d, b), "string" === typeof c && this.Ib(a, c), this.Ou(d, b))
				} else w.Ma(a, c, b)
		}
	};
	w.defineProperty(F, {
		qL: "makeUniqueKeyFunction"
	}, function() {
		return this.Wo
	}, function(a) {
		var b = this.Wo;
		b !== a && (null !== a && w.j(a, "function", F, "makeUniqueKeyFunction"), this.Wo = a, this.h("makeUniqueKeyFunction", b, a))
	});

	function xg(a) {
		return "number" === typeof a || "string" === typeof a
	}
	F.prototype.containsNodeData = F.prototype.Ie = function(a) {
		var b = this.qb(a);
		return void 0 === b ? !1 : this.Kc.ka(b) === a
	};
	F.prototype.findNodeDataForKey = F.prototype.we = function(a) {
		null === a && w.k("Model.findNodeDataForKey:key must not be null");
		return void 0 !== a && xg(a) ? this.Kc.ka(a) : null
	};
	w.defineProperty(F, {
		hg: "nodeDataArray"
	}, function() {
		return this.Fe
	}, function(a) {
		var b = this.Fe;
		if (b !== a) {
			w.gA(a, F, "nodeDataArray");
			this.Kc.clear();
			this.QB();
			for (var c = w.Za(a), d = 0; d < c; d++) {
				var e = w.Ba(a, d);
				if (!w.Pa(e)) {
					w.k("Model.nodeDataArray must only contain Objects, not: " + e);
					return
				}
				w.Wp(e)
			}
			this.Fe = a;
			for (var f = new H(Object), d = 0; d < c; d++) {
				var e = w.Ba(a, d),
					h = this.qb(e);
				void 0 === h ? f.add(e) : null !== this.Kc.ka(h) ? f.add(e) : this.Kc.add(h, e)
			}
			for (d = f.i; d.next();) e = d.value, this.YA(e), f = this.qb(e), void 0 !== f &&
				this.Kc.add(f, e);
			vg(this, "nodeDataArray", Df, "nodeDataArray", this, b, a);
			for (d = 0; d < c; d++) e = w.Ba(a, d), this.sq(e), this.rq(e);
			this.GE();
			w.AI(a) || (this.hb = !0)
		}
	});
	F.prototype.makeNodeDataKeyUnique = F.prototype.YA = function(a) {
		if (null !== a) {
			var b = this.kk;
			if ("" !== b) {
				var c = this.qb(a);
				if (void 0 === c || this.Kc.contains(c)) {
					var d = this.Wo;
					if (null !== d && (c = d(this, a), void 0 !== c && null !== c && !this.Kc.contains(c))) {
						w.Ma(a, b, c);
						return
					}
					if ("string" === typeof c) {
						for (d = 2; this.Kc.contains(c + d);) d++;
						w.Ma(a, b, c + d)
					} else if (void 0 === c || "number" === typeof c) {
						for (d = -this.Kc.count - 1; this.Kc.contains(d);) d--;
						w.Ma(a, b, d)
					} else w.k("Model.getKeyForNodeData returned something other than a string or a number: " +
						c)
				}
			}
		}
	};
	F.prototype.addNodeData = F.prototype.Il = function(a) {
		null !== a && (w.Wp(a), this.Ie(a) || yg(this, a, !0))
	};

	function yg(a, b, c) {
		var d = a.qb(b);
		if (void 0 === d || a.Kc.ka(d) !== b) a.YA(b), d = a.qb(b), void 0 === d ? w.k("Model.makeNodeDataKeyUnique failed on " + b + ".  Data not added to Model.") : (a.Kc.add(d, b), d = null, c && (d = w.Za(a.Fe), w.qh(a.Fe, d, b)), vg(a, "nodeDataArray", Ff, "nodeDataArray", a, null, b, null, d), a.sq(b), a.rq(b))
	}
	F.prototype.addNodeDataCollection = function(a) {
		if (w.isArray(a))
			for (var b = w.Za(a), c = 0; c < b; c++) this.Il(w.Ba(a, c));
		else
			for (a = a.i; a.next();) this.Il(a.value)
	};
	F.prototype.removeNodeData = F.prototype.ly = function(a) {
		null !== a && zg(this, a, !0)
	};

	function zg(a, b, c) {
		var d = a.qb(b);
		void 0 !== d && a.Kc.remove(d);
		d = null;
		if (c) {
			d = w.Ll(a.Fe, b);
			if (0 > d) return;
			w.Jg(a.Fe, d)
		}
		vg(a, "nodeDataArray", Qf, "nodeDataArray", a, b, null, d, null);
		a.cv(b)
	}
	F.prototype.removeNodeDataCollection = function(a) {
		if (w.isArray(a))
			for (var b = w.Za(a), c = 0; c < b; c++) this.ly(w.Ba(a, c));
		else
			for (a = a.i; a.next();) this.ly(a.value)
	};
	g = F.prototype;
	g.Ou = function(a, b) {
		var c = Ag(this, a);
		c instanceof I && this.Hi.add(b, c)
	};
	g.QB = function() {};
	g.sq = function() {};
	g.rq = function() {};
	g.cv = function() {};

	function Bg(a, b, c) {
		if (void 0 !== b) {
			var d = a.Hi.ka(b);
			null === d && (d = new I(Object), a.Hi.add(b, d));
			d.add(c)
		}
	}

	function Cg(a, b, c) {
		if (void 0 !== b) {
			var d = a.Hi.ka(b);
			d instanceof I && (void 0 === c || null === c ? a.Hi.remove(b) : (d.remove(c), 0 === d.count && a.Hi.remove(b)))
		}
	}

	function Ag(a, b) {
		if (void 0 === b) return null;
		var c = a.Hi.ka(b);
		return c instanceof I ? c : null
	}
	F.prototype.clearUnresolvedReferences = F.prototype.GE = function(a) {
		void 0 === a ? this.Hi.clear() : this.Hi.remove(a)
	};
	w.defineProperty(F, {
		MK: "copyNodeDataFunction"
	}, function() {
		return this.so
	}, function(a) {
		var b = this.so;
		b !== a && (null !== a && w.j(a, "function", F, "copyNodeDataFunction"), this.so = a, this.h("copyNodeDataFunction", b, a))
	});
	w.defineProperty(F, {
		oA: "copiesArrays"
	}, function() {
		return this.cr
	}, function(a) {
		var b = this.cr;
		b !== a && (null !== a && w.j(a, "boolean", F, "copiesArrays"), this.cr = a, this.h("copiesArrays", b, a))
	});
	w.defineProperty(F, {
		nA: "copiesArrayObjects"
	}, function() {
		return this.br
	}, function(a) {
		var b = this.br;
		b !== a && (null !== a && w.j(a, "boolean", F, "copiesArrayObjects"), this.br = a, this.h("copiesArrayObjects", b, a))
	});
	F.prototype.copyNodeData = function(a) {
		if (null === a) return null;
		var b = null,
			b = this.so,
			b = null !== b ? b(a, this) : Vg(this, a, !0);
		w.Pa(b) && w.oc(b);
		return b
	};

	function Vg(a, b, c) {
		if (a.oA && Array.isArray(b)) {
			var d = [];
			for (c = 0; c < b.length; c++) {
				var e = Vg(a, b[c], a.nA);
				d.push(e)
			}
			w.oc(d);
			return d
		}
		if (c && w.Pa(b)) {
			c = (c = b.constructor) ? new c : {};
			for (d in b)
				if ("__gohashid" !== d) {
					var e = w.ub(b, d),
						f;
					f = e;
					f instanceof G || f instanceof D || f instanceof qg || f instanceof Wg || f instanceof Xg || f instanceof rg || f instanceof sg || f instanceof tg || f instanceof zf || f instanceof Bf ? ("_" !== d[0] && w.trace('Warning: found GraphObject or Diagram reference when copying model data on property "' +
						d + '" of data object: ' + b.toString() + "  \nModel data should not have any references to a Diagram or any part of a diagram, such as: " + f.toString()), f = !0) : f = f instanceof F || f instanceof Sf || f instanceof ag || f instanceof Cf ? !0 : !1;
					f || (e = Vg(a, e, !1));
					w.Ma(c, d, e)
				}
			w.oc(c);
			return c
		}
		return b instanceof y ? b.copy() : b instanceof ia ? b.copy() : b instanceof B ? b.copy() : b instanceof K ? b.copy() : b instanceof hb ? b.copy() : b
	}
	w.defineProperty(F, {
		nH: "afterCopyFunction"
	}, function() {
		return this.Mq
	}, function(a) {
		var b = this.Mq;
		b !== a && (null !== a && w.j(a, "function", F, "afterCopyFunction"), this.Mq = a, this.h("afterCopyFunction", b, a))
	});
	var Yg = !1;
	F.prototype.set = function(a, b, c) {
		this.setDataProperty(a, b, c)
	};
	F.prototype.set = F.prototype.setDataProperty = function(a, b, c) {
		if (this.Ie(a))
			if (b === this.dm) this.uy(a, c);
			else {
				if (b === this.Sn) {
					this.sy(a, c);
					return
				}
			}
		else !Yg && a instanceof G && (Yg = !0, w.trace('Model.setDataProperty is modifying a GraphObject, "' + a.toString() + '"'), w.trace("  Is that really your intent?"));
		var d = w.ub(a, b);
		d !== c && (w.Ma(a, b, c), this.jB(a, b, d, c))
	};
	F.prototype.addArrayItem = function(a, b) {
		this.KA(a, -1, b)
	};
	F.prototype.insertArrayItem = F.prototype.KA = function(a, b, c) {
		a === this.Fe && w.k("Model.insertArrayItem or Model.addArrayItem should not be called on the Model.nodeDataArray");
		0 > b && (b = w.Za(a));
		w.qh(a, b, c);
		vg(this, "", Ff, "", a, null, c, null, b)
	};
	F.prototype.removeArrayItem = F.prototype.$F = function(a, b) {
		void 0 === b && (b = -1);
		a === this.Fe && w.k("Model.removeArrayItem should not be called on the Model.nodeDataArray"); - 1 === b && (b = w.Za(a) - 1);
		var c = w.Ba(a, b);
		w.Jg(a, b);
		vg(this, "", Qf, "", a, c, null, b, null)
	};
	w.defineProperty(F, {
		Sn: "nodeCategoryProperty"
	}, function() {
		return this.Qm
	}, function(a) {
		var b = this.Qm;
		b !== a && (wg(a, F, "nodeCategoryProperty"), this.Qm = a, this.h("nodeCategoryProperty", b, a))
	});
	F.prototype.getCategoryForNodeData = F.prototype.CA = function(a) {
		if (null === a) return "";
		var b = this.Qm;
		if ("" === b) return "";
		b = w.ub(a, b);
		if (void 0 === b) return "";
		if ("string" === typeof b) return b;
		w.k("getCategoryForNodeData found a non-string category for " + a + ": " + b);
		return ""
	};
	F.prototype.setCategoryForNodeData = F.prototype.sy = function(a, b) {
		w.j(b, "string", F, "setCategoryForNodeData:cat");
		if (null !== a) {
			var c = this.Qm;
			if ("" !== c)
				if (this.Ie(a)) {
					var d = w.ub(a, c);
					void 0 === d && (d = "");
					d !== b && (w.Ma(a, c, b), vg(this, "nodeCategory", Df, c, a, d, b))
				} else w.Ma(a, c, b)
		}
	};

	function Q(a, b) {
		F.call(this);
		2 < arguments.length && w.k("GraphLinksModel constructor can only take two optional arguments, the Array of node data and the Array of link data.");
		this.kf = [];
		this.Si = new I(Object);
		this.gd = new ma(null, Object);
		this.tl = "";
		this.um = this.ro = this.Xo = null;
		this.Vh = "from";
		this.Wh = "to";
		this.Mm = this.Lm = "";
		this.Km = "category";
		this.zg = "";
		this.ap = "isGroup";
		this.kh = "group";
		this.dr = !1;
		void 0 !== a && (this.hg = a);
		void 0 !== b && (this.Pg = b)
	}
	w.La(Q, F);
	w.ga("GraphLinksModel", Q);
	Q.prototype.cloneProtected = function(a) {
		F.prototype.cloneProtected.call(this, a);
		a.tl = this.tl;
		a.Xo = this.Xo;
		a.ro = this.ro;
		a.Vh = this.Vh;
		a.Wh = this.Wh;
		a.Lm = this.Lm;
		a.Mm = this.Mm;
		a.Km = this.Km;
		a.zg = this.zg;
		a.ap = this.ap;
		a.kh = this.kh;
		a.dr = this.dr
	};
	Q.prototype.clear = Q.prototype.clear = function() {
		F.prototype.clear.call(this);
		this.kf = [];
		this.gd.clear();
		this.Si.clear()
	};
	g = Q.prototype;
	g.toString = function(a) {
		void 0 === a && (a = 0);
		if (2 <= a) return this.JB();
		var b = ("" !== this.name ? this.name : "") + " GraphLinksModel";
		if (0 < a) {
			b += "\n node data:";
			a = this.hg;
			for (var c = w.Za(a), d = 0, d = 0; d < c; d++) var e = w.Ba(a, d),
				b = b + (" " + this.qb(e) + ":" + Rf(e));
			b += "\n link data:";
			a = this.Pg;
			c = w.Za(a);
			for (d = 0; d < c; d++) e = w.Ba(a, d), b += " " + this.Wl(e) + "--\x3e" + this.Xl(e)
		}
		return b
	};
	g.bo = function() {
		var a = F.prototype.bo.call(this),
			b = "";
		"category" !== this.xu && "string" === typeof this.xu && (b += ',\n  "linkCategoryProperty": ' + this.quote(this.xu));
		"" !== this.Bj && "string" === typeof this.Bj && (b += ',\n  "linkKeyProperty": ' + this.quote(this.Bj));
		"from" !== this.In && "string" === typeof this.In && (b += ',\n  "linkFromKeyProperty": ' + this.quote(this.In));
		"to" !== this.Jn && "string" === typeof this.Jn && (b += ',\n  "linkToKeyProperty": ' + this.quote(this.Jn));
		"" !== this.yu && "string" === typeof this.yu && (b += ',\n  "linkFromPortIdProperty": ' +
			this.quote(this.yu));
		"" !== this.Au && "string" === typeof this.Au && (b += ',\n  "linkToPortIdProperty": ' + this.quote(this.Au));
		"" !== this.zu && "string" === typeof this.zu && (b += ',\n  "linkLabelKeysProperty": ' + this.quote(this.zu));
		"isGroup" !== this.kq && "string" === typeof this.kq && (b += ',\n  "nodeIsGroupProperty": ' + this.quote(this.kq));
		"group" !== this.Hu && "string" === typeof this.Hu && (b += ',\n  "nodeGroupKeyProperty": ' + this.quote(this.Hu));
		return a + b
	};
	g.Lu = function(a) {
		F.prototype.Lu.call(this, a);
		a.linkKeyProperty && (this.Bj = a.linkKeyProperty);
		a.linkFromKeyProperty && (this.In = a.linkFromKeyProperty);
		a.linkToKeyProperty && (this.Jn = a.linkToKeyProperty);
		a.linkFromPortIdProperty && (this.yu = a.linkFromPortIdProperty);
		a.linkToPortIdProperty && (this.Au = a.linkToPortIdProperty);
		a.linkCategoryProperty && (this.xu = a.linkCategoryProperty);
		a.linkLabelKeysProperty && (this.zu = a.linkLabelKeysProperty);
		a.nodeIsGroupProperty && (this.kq = a.nodeIsGroupProperty);
		a.nodeGroupKeyProperty &&
			(this.Hu = a.nodeGroupKeyProperty)
	};
	g.VB = function() {
		var a = F.prototype.VB.call(this),
			b = ',\n  "linkDataArray": ' + Xf(this, this.Pg, !0);
		return a + b
	};
	g.lB = function(a) {
		F.prototype.lB.call(this, a);
		a = a.linkDataArray;
		w.isArray(a) && (this.Pu(a), this.Pg = a)
	};
	g.WB = function(a) {
		if (!(a instanceof Q)) return w.k("Model.computeJsonDifference: newmodel must be a GraphLinksModel"), "";
		"" === this.Bj && w.k("GraphLinksModel.linkKeyProperty must not be an empty string for .computeJsonDifference() to succeed.");
		var b = F.prototype.WB.call(this, a);
		Zf(this, a, "linkKeyProperty");
		Zf(this, a, "linkFromKeyProperty");
		Zf(this, a, "linkToKeyProperty");
		Zf(this, a, "linkLabelKeysProperty");
		Zf(this, a, "nodeIsGroupProperty");
		Zf(this, a, "nodeGroupKeyProperty");
		for (var c = new I, d = new I, e = (new I).Nc(this.gd.IF),
				f = new ma, h = a.Pg, k = 0; k < h.length; k++) {
			var l = h[k],
				m = a.bf(l);
			if (void 0 !== m) {
				e.remove(m);
				var n = this.Sp(m);
				null === n ? (c.add(m), d.add(l)) : Yf(this, n, l, f) || d.add(l)
			} else this.Ux(l), m = this.bf(l), c.add(m), d.add(l)
		}
		a = b;
		0 < c.count && (a += this.Ky + Xf(this, c.xc(), !0));
		0 < d.count && (a += this.cC + Xf(this, d.xc(), !0));
		0 < e.count && (a += this.My + Xf(this, e.xc(), !0));
		return a
	};
	g.Ky = ',\n  "insertedLinkKeys": ';
	g.cC = ',\n  "modifiedLinkData": ';
	g.My = ',\n  "removedLinkKeys": ';
	g.UB = function(a, b) {
		"" === this.Bj && w.k("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");
		var c = F.prototype.UB.call(this, a, b),
			d = this,
			e = new I,
			f = new I,
			h = new I;
		a.Wf.each(function(a) {
			a.$ === d && ("linkDataArray" === a.sf ? a.Dc === Ff ? e.add(a.newValue) : a.Dc === Qf && h.add(a.oldValue) : d.th(a.object) && f.add(a.object))
		});
		var k = new I;
		e.each(function(a) {
			k.add(d.bf(a));
			b || f.add(a)
		});
		var l = new I;
		h.each(function(a) {
			l.add(d.bf(a));
			b && f.add(a)
		});
		0 < k.count && (c += (b ? this.My : this.Ky) +
			Xf(this, k.xc(), !0));
		0 < f.count && (c += this.cC + Xf(this, f.xc(), !0));
		0 < l.count && (c += (b ? this.Ky : this.My) + Xf(this, l.xc(), !0));
		return c
	};
	g.kB = function(a) {
		F.prototype.kB.call(this, a);
		var b = a.insertedLinkKeys,
			c = a.modifiedLinkData,
			d = new ma;
		if (w.isArray(c))
			for (var e = 0; e < c.length; e++) {
				var f = w.Ba(c, e),
					h = this.bf(f);
				void 0 !== h && null !== h && d.set(h, f)
			}
		if (w.isArray(b))
			for (var e = w.Za(b), k = 0; k < e; k++) f = w.Ba(b, k), h = this.Sp(f), null === h && (h = (h = d.get(f)) ? h : this.mx({}), this.qG(h, f), this.Ft(h));
		if (w.isArray(c))
			for (e = w.Za(c), k = 0; k < e; k++)
				if (f = w.Ba(c, k), h = this.bf(f), h = this.Sp(h), null !== h)
					for (var l in f) "__gohashid" !== l && l !== this.Bj && this.setDataProperty(h,
						l, f[l]);
		a = a.removedLinkKeys;
		if (w.isArray(a))
			for (e = w.Za(a), k = 0; k < e; k++) f = w.Ba(a, k), h = this.Sp(f), null !== h && this.ky(h)
	};
	g.mn = function(a, b) {
		if (a.Dc === Ff) {
			var c = a.Cj;
			if ("linkDataArray" === a.sf) {
				var d = a.newValue;
				if (w.Pa(d) && "number" === typeof c) {
					var e = this.bf(d);
					b ? (this.Si.remove(d), w.Ba(this.kf, c) === d && w.Jg(this.kf, c), void 0 !== e && this.gd.remove(e)) : (this.Si.add(d), w.Ba(this.kf, c) !== d && w.qh(this.kf, c, d), void 0 !== e && this.gd.add(e, d))
				}
				return
			}
			if ("linkLabelKeys" === a.sf) {
				d = this.Ik(a.object);
				w.isArray(d) && "number" === typeof c && (b ? (c = w.Ll(d, a.newValue), 0 <= c && w.Jg(d, c)) : 0 > w.Ll(d, a.newValue) && w.qh(d, c, a.newValue));
				return
			}
		} else if (a.Dc ===
			Qf) {
			c = a.Dj;
			if ("linkDataArray" === a.sf) {
				d = a.oldValue;
				w.Pa(d) && "number" === typeof c && (e = this.bf(d), b ? (this.Si.add(d), w.Ba(this.kf, c) !== d && w.qh(this.kf, c, d), void 0 !== e && this.gd.add(e, d)) : (this.Si.remove(d), w.Ba(this.kf, c) === d && w.Jg(this.kf, c), void 0 !== e && this.gd.remove(e)));
				return
			}
			if ("linkLabelKeys" === a.sf) {
				d = this.Ik(a.object);
				w.isArray(d) && "number" === typeof c && (b ? 0 > w.Ll(d, a.newValue) && w.qh(d, c, a.newValue) : (c = w.Ll(d, a.newValue), 0 <= c && w.Jg(d, c)));
				return
			}
		}
		F.prototype.mn.call(this, a, b)
	};
	w.defineProperty(Q, {
		eA: "archetypeNodeData"
	}, function() {
		return this.um
	}, function(a) {
		var b = this.um;
		b !== a && (null !== a && w.G(a, Object, Q, "archetypeNodeData"), this.um = a, this.h("archetypeNodeData", b, a))
	});
	Q.prototype.Kn = function(a) {
		if (void 0 !== a) {
			var b = this.um;
			if (null !== b) {
				var c = this.we(a);
				null === c && (c = this.copyNodeData(b), w.Ma(c, this.kk, a), this.Il(c))
			}
			return a
		}
	};
	w.defineProperty(Q, {
		In: "linkFromKeyProperty"
	}, function() {
		return this.Vh
	}, function(a) {
		var b = this.Vh;
		b !== a && (wg(a, Q, "linkFromKeyProperty"), this.Vh = a, this.h("linkFromKeyProperty", b, a))
	});
	Q.prototype.getFromKeyForLinkData = Q.prototype.Wl = function(a) {
		if (null !== a) {
			var b = this.Vh;
			if ("" !== b && (b = w.ub(a, b), void 0 !== b)) {
				if (xg(b)) return b;
				w.k("FromKey value for link data " + a + " is not a number or a string: " + b)
			}
		}
	};
	Q.prototype.setFromKeyForLinkData = Q.prototype.wB = function(a, b) {
		null === b && (b = void 0);
		void 0 === b || xg(b) || w.Ed(b, "number or string", Q, "setFromKeyForLinkData:key");
		if (null !== a) {
			var c = this.Vh;
			if ("" !== c)
				if (b = this.Kn(b), this.th(a)) {
					var d = w.ub(a, c);
					d !== b && (Cg(this, d, a), w.Ma(a, c, b), null === this.we(b) && Bg(this, b, a), vg(this, "linkFromKey", Df, c, a, d, b), "string" === typeof c && this.Ib(a, c))
				} else w.Ma(a, c, b)
		}
	};
	w.defineProperty(Q, {
		Jn: "linkToKeyProperty"
	}, function() {
		return this.Wh
	}, function(a) {
		var b = this.Wh;
		b !== a && (wg(a, Q, "linkToKeyProperty"), this.Wh = a, this.h("linkToKeyProperty", b, a))
	});
	Q.prototype.getToKeyForLinkData = Q.prototype.Xl = function(a) {
		if (null !== a) {
			var b = this.Wh;
			if ("" !== b && (b = w.ub(a, b), void 0 !== b)) {
				if (xg(b)) return b;
				w.k("ToKey value for link data " + a + " is not a number or a string: " + b)
			}
		}
	};
	Q.prototype.setToKeyForLinkData = Q.prototype.CB = function(a, b) {
		null === b && (b = void 0);
		void 0 === b || xg(b) || w.Ed(b, "number or string", Q, "setToKeyForLinkData:key");
		if (null !== a) {
			var c = this.Wh;
			if ("" !== c)
				if (b = this.Kn(b), this.th(a)) {
					var d = w.ub(a, c);
					d !== b && (Cg(this, d, a), w.Ma(a, c, b), null === this.we(b) && Bg(this, b, a), vg(this, "linkToKey", Df, c, a, d, b), "string" === typeof c && this.Ib(a, c))
				} else w.Ma(a, c, b)
		}
	};
	w.defineProperty(Q, {
		yu: "linkFromPortIdProperty"
	}, function() {
		return this.Lm
	}, function(a) {
		var b = this.Lm;
		b !== a && (wg(a, Q, "linkFromPortIdProperty"), a !== this.In && a !== this.Jn || w.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: " + a), this.Lm = a, this.h("linkFromPortIdProperty", b, a))
	});
	Q.prototype.getFromPortIdForLinkData = Q.prototype.cI = function(a) {
		if (null === a) return "";
		var b = this.Lm;
		if ("" === b) return "";
		a = w.ub(a, b);
		return void 0 === a ? "" : a
	};
	Q.prototype.setFromPortIdForLinkData = Q.prototype.xB = function(a, b) {
		w.j(b, "string", Q, "setFromPortIdForLinkData:portname");
		if (null !== a) {
			var c = this.Lm;
			if ("" !== c)
				if (this.th(a)) {
					var d = w.ub(a, c);
					void 0 === d && (d = "");
					d !== b && (w.Ma(a, c, b), vg(this, "linkFromPortId", Df, c, a, d, b), "string" === typeof c && this.Ib(a, c))
				} else w.Ma(a, c, b)
		}
	};
	w.defineProperty(Q, {
		Au: "linkToPortIdProperty"
	}, function() {
		return this.Mm
	}, function(a) {
		var b = this.Mm;
		b !== a && (wg(a, Q, "linkToPortIdProperty"), a !== this.In && a !== this.Jn || w.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: " + a), this.Mm = a, this.h("linkToPortIdProperty", b, a))
	});
	Q.prototype.getToPortIdForLinkData = Q.prototype.gI = function(a) {
		if (null === a) return "";
		var b = this.Mm;
		if ("" === b) return "";
		a = w.ub(a, b);
		return void 0 === a ? "" : a
	};
	Q.prototype.setToPortIdForLinkData = Q.prototype.DB = function(a, b) {
		w.j(b, "string", Q, "setToPortIdForLinkData:portname");
		if (null !== a) {
			var c = this.Mm;
			if ("" !== c)
				if (this.th(a)) {
					var d = w.ub(a, c);
					void 0 === d && (d = "");
					d !== b && (w.Ma(a, c, b), vg(this, "linkToPortId", Df, c, a, d, b), "string" === typeof c && this.Ib(a, c))
				} else w.Ma(a, c, b)
		}
	};
	w.defineProperty(Q, {
		zu: "linkLabelKeysProperty"
	}, function() {
		return this.zg
	}, function(a) {
		var b = this.zg;
		b !== a && (wg(a, Q, "linkLabelKeysProperty"), this.zg = a, this.h("linkLabelKeysProperty", b, a))
	});
	Q.prototype.getLabelKeysForLinkData = Q.prototype.Ik = function(a) {
		if (null === a) return w.fo;
		var b = this.zg;
		if ("" === b) return w.fo;
		a = w.ub(a, b);
		return void 0 === a ? w.fo : a
	};
	Q.prototype.setLabelKeysForLinkData = Q.prototype.rG = function(a, b) {
		w.gA(b, Q, "setLabelKeysForLinkData:arr");
		if (null !== a) {
			var c = this.zg;
			if ("" !== c)
				if (this.th(a)) {
					var d = w.ub(a, c);
					void 0 === d && (d = w.fo);
					if (d !== b) {
						for (var e = w.Za(d), f = 0; f < e; f++) {
							var h = w.Ba(d, f);
							Cg(this, h, a)
						}
						w.Ma(a, c, b);
						e = w.Za(b);
						for (f = 0; f < e; f++) h = w.Ba(b, f), null === this.we(h) && Bg(this, h, a);
						vg(this, "linkLabelKeys", Df, c, a, d, b);
						"string" === typeof c && this.Ib(a, c)
					}
				} else w.Ma(a, c, b)
		}
	};
	Q.prototype.addLabelKeyForLinkData = Q.prototype.vE = function(a, b) {
		if (null !== b && void 0 !== b && (xg(b) || w.Ed(b, "number or string", Q, "addLabelKeyForLinkData:key"), null !== a)) {
			var c = this.zg;
			if ("" !== c) {
				var d = w.ub(a, c);
				if (void 0 === d) c = [], c.push(b), this.rG(a, c);
				else if (w.isArray(d)) {
					var e = w.Ll(d, b);
					0 <= e || (e = w.Za(d), w.qh(d, Infinity, b), this.th(a) && (null === this.we(b) && Bg(this, b, a), vg(this, "linkLabelKeys", Ff, c, a, null, b, null, e)))
				} else w.k(c + " property is not an Array; cannot addLabelKeyForLinkData: " + a)
			}
		}
	};
	Q.prototype.removeLabelKeyForLinkData = Q.prototype.qJ = function(a, b) {
		if (null !== b && void 0 !== b && (xg(b) || w.Ed(b, "number or string", Q, "removeLabelKeyForLinkData:key"), null !== a)) {
			var c = this.zg;
			if ("" !== c) {
				var d = w.ub(a, c);
				if (w.isArray(d)) {
					var e = w.Ll(d, b);
					0 > e || (w.Jg(d, e), this.th(a) && (Cg(this, b, a), vg(this, "linkLabelKeys", Qf, c, a, b, null, e, null)))
				} else void 0 !== d && w.k(c + " property is not an Array; cannot removeLabelKeyforLinkData: " + a)
			}
		}
	};
	w.defineProperty(Q, {
		Pg: "linkDataArray"
	}, function() {
		return this.kf
	}, function(a) {
		var b = this.kf;
		if (b !== a) {
			w.gA(a, Q, "linkDataArray");
			this.gd.clear();
			for (var c = w.Za(a), d = 0; d < c; d++) {
				var e = w.Ba(a, d);
				if (!w.Pa(e)) {
					w.k("GraphLinksModel.linkDataArray must only contain Objects, not: " + e);
					return
				}
				w.Wp(e)
			}
			this.kf = a;
			if ("" !== this.Bj) {
				for (var f = new H(Object), d = 0; d < c; d++) {
					var e = w.Ba(a, d),
						h = this.bf(e);
					void 0 === h ? f.add(e) : null !== this.gd.ka(h) ? f.add(e) : this.gd.add(h, e)
				}
				for (d = f.i; d.next();) e = d.value, this.Ux(e), f = this.bf(e),
					void 0 !== f && this.gd.add(f, e)
			}
			f = new I(Object);
			for (d = 0; d < c; d++) e = w.Ba(a, d), f.add(e);
			this.Si = f;
			vg(this, "linkDataArray", Df, "linkDataArray", this, b, a);
			for (d = 0; d < c; d++) e = w.Ba(a, d), Zg(this, e)
		}
	});
	w.defineProperty(Q, {
		Bj: "linkKeyProperty"
	}, function() {
		return this.tl
	}, function(a) {
		var b = this.tl;
		if (b !== a) {
			wg(a, Q, "linkKeyProperty");
			this.tl = a;
			this.gd.clear();
			for (var c = w.Za(this.Pg), d = 0; d < c; d++) {
				var e = w.Ba(this.Pg, d),
					f = this.bf(e);
				void 0 === f && (this.Ux(e), f = this.bf(e));
				void 0 !== f && this.gd.add(f, e)
			}
			this.h("linkKeyProperty", b, a)
		}
	});
	Q.prototype.getKeyForLinkData = Q.prototype.bf = function(a) {
		if (null !== a) {
			var b = this.tl;
			if ("" !== b && (b = w.ub(a, b), void 0 !== b)) {
				if (xg(b)) return b;
				w.k("Key value for link data " + a + " is not a number or a string: " + b)
			}
		}
	};
	Q.prototype.setKeyForLinkData = Q.prototype.qG = function(a, b) {
		void 0 !== b && null !== b && xg(b) || w.Ed(b, "number or string", Q, "setKeyForLinkData:key");
		if (null !== a) {
			var c = this.tl;
			if ("" !== c)
				if (this.th(a)) {
					var d = w.ub(a, c);
					d !== b && null === this.Sp(b) && (w.Ma(a, c, b), this.gd.remove(d), this.gd.add(b, a), vg(this, "linkKey", Df, c, a, d, b), "string" === typeof c && this.Ib(a, c))
				} else w.Ma(a, c, b)
		}
	};
	w.defineProperty(Q, {
		rL: "makeUniqueLinkKeyFunction"
	}, function() {
		return this.Xo
	}, function(a) {
		var b = this.Xo;
		b !== a && (null !== a && w.j(a, "function", Q, "makeUniqueLinkKeyFunction"), this.Xo = a, this.h("makeUniqueLinkKeyFunction", b, a))
	});
	Q.prototype.findLinkDataForKey = Q.prototype.Sp = function(a) {
		null === a && w.k("GraphLinksModel.findLinkDataForKey:key must not be null");
		return void 0 !== a && xg(a) ? this.gd.ka(a) : null
	};
	Q.prototype.makeLinkDataKeyUnique = Q.prototype.Ux = function(a) {
		if (null !== a) {
			var b = this.tl;
			if ("" !== b) {
				var c = this.bf(a);
				if (void 0 === c || this.gd.contains(c)) {
					var d = this.Xo;
					if (null !== d && (c = d(this, a), void 0 !== c && null !== c && !this.gd.contains(c))) {
						w.Ma(a, b, c);
						return
					}
					if ("string" === typeof c) {
						for (d = 2; this.gd.contains(c + d);) d++;
						w.Ma(a, b, c + d)
					} else if (void 0 === c || "number" === typeof c) {
						for (d = -this.gd.count - 1; this.gd.contains(d);) d--;
						w.Ma(a, b, d)
					} else w.k("GraphLinksModel.getKeyForLinkData returned something other than a string or a number: " +
						c)
				}
			}
		}
	};
	Q.prototype.containsLinkData = Q.prototype.th = function(a) {
		return null === a ? !1 : this.Si.contains(a)
	};
	Q.prototype.addLinkData = Q.prototype.Ft = function(a) {
		null !== a && (w.Wp(a), this.th(a) || $g(this, a, !0))
	};

	function $g(a, b, c) {
		if ("" !== a.Bj) {
			var d = a.bf(b);
			if (void 0 !== d && a.gd.ka(d) === b) return;
			a.Ux(b);
			d = a.bf(b);
			if (void 0 === d) {
				w.k("GraphLinksModel.makeLinkDataKeyUnique failed on " + b + ". Data not added to model.");
				return
			}
			a.gd.add(d, b)
		}
		a.Si.add(b);
		d = null;
		c && (d = w.Za(a.kf), w.qh(a.kf, d, b));
		vg(a, "linkDataArray", Ff, "linkDataArray", a, null, b, null, d);
		Zg(a, b)
	}
	Q.prototype.addLinkDataCollection = function(a) {
		if (w.isArray(a))
			for (var b = w.Za(a), c = 0; c < b; c++) this.Ft(w.Ba(a, c));
		else
			for (a = a.i; a.next();) this.Ft(a.value)
	};
	Q.prototype.removeLinkData = Q.prototype.ky = function(a) {
		null !== a && ah(this, a, !0)
	};

	function ah(a, b, c) {
		a.Si.remove(b);
		var d = a.bf(b);
		void 0 !== d && a.gd.remove(d);
		d = null;
		if (c) {
			d = w.Ll(a.kf, b);
			if (0 > d) return;
			w.Jg(a.kf, d)
		}
		vg(a, "linkDataArray", Qf, "linkDataArray", a, b, null, d, null);
		c = a.Wl(b);
		Cg(a, c, b);
		c = a.Xl(b);
		Cg(a, c, b);
		d = a.Ik(b);
		if (w.isArray(d))
			for (var e = w.Za(d), f = 0; f < e; f++) c = w.Ba(d, f), Cg(a, c, b)
	}
	Q.prototype.removeLinkDataCollection = function(a) {
		if (w.isArray(a))
			for (var b = w.Za(a), c = 0; c < b; c++) this.ky(w.Ba(a, c));
		else
			for (a = a.i; a.next();) this.ky(a.value)
	};

	function Zg(a, b) {
		var c = a.Wl(b),
			c = a.Kn(c);
		null === a.we(c) && Bg(a, c, b);
		c = a.Xl(b);
		c = a.Kn(c);
		null === a.we(c) && Bg(a, c, b);
		var d = a.Ik(b);
		if (w.isArray(d))
			for (var e = w.Za(d), f = 0; f < e; f++) c = w.Ba(d, f), null === a.we(c) && Bg(a, c, b)
	}
	w.defineProperty(Q, {
		LK: "copyLinkDataFunction"
	}, function() {
		return this.ro
	}, function(a) {
		var b = this.ro;
		b !== a && (null !== a && w.j(a, "function", Q, "copyLinkDataFunction"), this.ro = a, this.h("copyLinkDataFunction", b, a))
	});
	Q.prototype.copyLinkData = Q.prototype.mx = function(a) {
		if (null === a) return null;
		var b = null,
			b = this.ro,
			b = null !== b ? b(a, this) : Vg(this, a, !0);
		w.Pa(b) && (w.oc(b), "" !== this.Vh && w.Ma(b, this.Vh, void 0), "" !== this.Wh && w.Ma(b, this.Wh, void 0), "" !== this.zg && w.Ma(b, this.zg, []));
		return b
	};
	w.defineProperty(Q, {
		kq: "nodeIsGroupProperty"
	}, function() {
		return this.ap
	}, function(a) {
		var b = this.ap;
		b !== a && (wg(a, Q, "nodeIsGroupProperty"), this.ap = a, this.h("nodeIsGroupProperty", b, a))
	});
	Q.prototype.isGroupForNodeData = Q.prototype.QA = function(a) {
		if (null === a) return !1;
		var b = this.ap;
		return "" === b ? !1 : w.ub(a, b) ? !0 : !1
	};
	w.defineProperty(Q, {
		Hu: "nodeGroupKeyProperty"
	}, function() {
		return this.kh
	}, function(a) {
		var b = this.kh;
		b !== a && (wg(a, Q, "nodeGroupKeyProperty"), this.kh = a, this.h("nodeGroupKeyProperty", b, a))
	});
	w.defineProperty(Q, {
		qn: "copiesGroupKeyOfNodeData"
	}, function() {
		return this.dr
	}, function(a) {
		this.dr !== a && (w.j(a, "boolean", Q, "copiesGroupKeyOfNodeData"), this.dr = a)
	});
	Q.prototype.getGroupKeyForNodeData = Q.prototype.yn = function(a) {
		if (null !== a) {
			var b = this.kh;
			if ("" !== b && (b = w.ub(a, b), void 0 !== b)) {
				if (xg(b)) return b;
				w.k("GroupKey value for node data " + a + " is not a number or a string: " + b)
			}
		}
	};
	Q.prototype.setGroupKeyForNodeData = Q.prototype.yB = function(a, b) {
		null === b && (b = void 0);
		void 0 === b || xg(b) || w.Ed(b, "number or string", Q, "setGroupKeyForNodeData:key");
		if (null !== a) {
			var c = this.kh;
			if ("" !== c)
				if (this.Ie(a)) {
					var d = w.ub(a, c);
					d !== b && (Cg(this, d, a), w.Ma(a, c, b), null === this.we(b) && Bg(this, b, a), vg(this, "nodeGroupKey", Df, c, a, d, b), "string" === typeof c && this.Ib(a, c))
				} else w.Ma(a, c, b)
		}
	};
	Q.prototype.copyNodeData = function(a) {
		if (null === a) return null;
		a = F.prototype.copyNodeData.call(this, a);
		this.qn || "" === this.kh || void 0 === w.ub(a, this.kh) || w.Ma(a, this.kh, void 0);
		return a
	};
	Q.prototype.setDataProperty = function(a, b, c) {
		if (this.Ie(a))
			if (b === this.dm) this.uy(a, c);
			else {
				if (b === this.Sn) {
					this.sy(a, c);
					return
				}
				if (b === this.Hu) {
					this.yB(a, c);
					return
				}
				b === this.kq && w.k("GraphLinksModel.setDataProperty: property name must not be the nodeIsGroupProperty: " + b)
			}
		else if (this.th(a)) {
			if (b === this.In) {
				this.wB(a, c);
				return
			}
			if (b === this.Jn) {
				this.CB(a, c);
				return
			}
			if (b === this.yu) {
				this.xB(a, c);
				return
			}
			if (b === this.Au) {
				this.DB(a, c);
				return
			}
			if (b === this.Bj) {
				this.qG(a, c);
				return
			}
			if (b === this.xu) {
				this.pG(a, c);
				return
			}
			if (b ===
				this.zu) {
				this.rG(a, c);
				return
			}
		} else !Yg && a instanceof G && (Yg = !0, w.trace('GraphLinksModel.setDataProperty is modifying a GraphObject, "' + a.toString() + '"'), w.trace("  Is that really your intent?"));
		var d = w.ub(a, b);
		d !== c && (w.Ma(a, b, c), this.jB(a, b, d, c))
	};
	g = Q.prototype;
	g.Ou = function(a, b) {
		F.prototype.Ou.call(this, a, b);
		for (var c = this.Kc.i; c.next();) this.pB(c.value, a, b);
		for (c = this.Si.i; c.next();) {
			var d = c.value,
				e = a,
				f = b;
			if (this.Wl(d) === e) {
				var h = this.Vh;
				w.Ma(d, h, f);
				vg(this, "linkFromKey", Df, h, d, e, f);
				"string" === typeof h && this.Ib(d, h)
			}
			this.Xl(d) === e && (h = this.Wh, w.Ma(d, h, f), vg(this, "linkToKey", Df, h, d, e, f), "string" === typeof h && this.Ib(d, h));
			h = this.Ik(d);
			if (w.isArray(h))
				for (var k = w.Za(h), l = this.zg, m = 0; m < k; m++) w.Ba(h, m) === e && (w.DE(h, m, f), vg(this, "linkLabelKeys", Ff, l, d, e, f, m,
					m))
		}
	};
	g.pB = function(a, b, c) {
		if (this.yn(a) === b) {
			var d = this.kh;
			w.Ma(a, d, c);
			vg(this, "nodeGroupKey", Df, d, a, b, c);
			"string" === typeof d && this.Ib(a, d)
		}
	};
	g.QB = function() {
		F.prototype.QB.call(this);
		for (var a = this.Pg, b = w.Za(a), c = 0; c < b; c++) {
			var d = w.Ba(a, c);
			Zg(this, d)
		}
	};
	g.sq = function(a) {
		F.prototype.sq.call(this, a);
		a = this.qb(a);
		var b = Ag(this, a);
		if (null !== b) {
			for (var c = new H(Object), b = b.i; b.next();) {
				var d = b.value;
				if (this.Ie(d)) {
					if (this.yn(d) === a) {
						var e = this.kh;
						vg(this, "nodeGroupKey", Df, e, d, a, a);
						"string" === typeof e && this.Ib(d, e);
						c.add(d)
					}
				} else if (this.Wl(d) === a && (e = this.Vh, vg(this, "linkFromKey", Df, e, d, a, a), "string" === typeof e && this.Ib(d, e), c.add(d)), this.Xl(d) === a && (e = this.Wh, vg(this, "linkToKey", Df, e, d, a, a), "string" === typeof e && this.Ib(d, e), c.add(d)), e = this.Ik(d), w.isArray(e))
					for (var f =
							w.Za(e), h = this.zg, k = 0; k < f; k++) w.Ba(e, k) === a && (vg(this, "linkLabelKeys", Ff, h, d, a, a, k, k), c.add(d))
			}
			for (c = c.i; c.next();) Cg(this, a, c.value)
		}
	};
	g.rq = function(a) {
		F.prototype.rq.call(this, a);
		var b = this.yn(a);
		null === this.we(b) && Bg(this, b, a)
	};
	g.cv = function(a) {
		F.prototype.cv.call(this, a);
		var b = this.yn(a);
		Cg(this, b, a)
	};
	w.defineProperty(Q, {
		xu: "linkCategoryProperty"
	}, function() {
		return this.Km
	}, function(a) {
		var b = this.Km;
		b !== a && (wg(a, Q, "linkCategoryProperty"), this.Km = a, this.h("linkCategoryProperty", b, a))
	});
	Q.prototype.getCategoryForLinkData = Q.prototype.fu = function(a) {
		if (null === a) return "";
		var b = this.Km;
		if ("" === b) return "";
		b = w.ub(a, b);
		if (void 0 === b) return "";
		if ("string" === typeof b) return b;
		w.k("getCategoryForLinkData found a non-string category for " + a + ": " + b);
		return ""
	};
	Q.prototype.setCategoryForLinkData = Q.prototype.pG = function(a, b) {
		w.j(b, "string", Q, "setCategoryForLinkData:cat");
		if (null !== a) {
			var c = this.Km;
			if ("" !== c)
				if (this.th(a)) {
					var d = w.ub(a, c);
					void 0 === d && (d = "");
					d !== b && (w.Ma(a, c, b), vg(this, "linkCategory", Df, c, a, d, b), "string" === typeof c && this.Ib(a, c))
				} else w.Ma(a, c, b)
		}
	};

	function $f(a) {
		1 < arguments.length && w.k("TreeModel constructor can only take one optional argument, the Array of node data.");
		F.call(this);
		this.lh = "parent";
		this.er = !1;
		this.Tm = "parentLinkCategory";
		void 0 !== a && (this.hg = a)
	}
	w.La($f, F);
	w.ga("TreeModel", $f);
	$f.prototype.cloneProtected = function(a) {
		F.prototype.cloneProtected.call(this, a);
		a.lh = this.lh;
		a.er = this.er;
		a.Tm = this.Tm
	};
	$f.prototype.toString = function(a) {
		void 0 === a && (a = 0);
		if (2 <= a) return this.JB();
		var b = ("" !== this.name ? this.name : "") + " TreeModel";
		if (0 < a) {
			b += "\n node data:";
			a = this.hg;
			for (var c = w.Za(a), d = 0; d < c; d++) var e = w.Ba(a, d),
				b = b + (" " + this.qb(e) + ":" + Rf(e))
		}
		return b
	};
	$f.prototype.bo = function() {
		var a = F.prototype.bo.call(this),
			b = "";
		"parent" !== this.Iu && "string" === typeof this.Iu && (b += ',\n  "nodeParentKeyProperty": ' + this.quote(this.Iu));
		return a + b
	};
	$f.prototype.Lu = function(a) {
		F.prototype.Lu.call(this, a);
		a.nodeParentKeyProperty && (this.Iu = a.nodeParentKeyProperty)
	};
	$f.prototype.Kn = function(a) {
		return a
	};
	w.defineProperty($f, {
		Iu: "nodeParentKeyProperty"
	}, function() {
		return this.lh
	}, function(a) {
		var b = this.lh;
		b !== a && (wg(a, $f, "nodeParentKeyProperty"), this.lh = a, this.h("nodeParentKeyProperty", b, a))
	});
	w.defineProperty($f, {
		rn: "copiesParentKeyOfNodeData"
	}, function() {
		return this.er
	}, function(a) {
		this.er !== a && (w.j(a, "boolean", $f, "copiesParentKeyOfNodeData"), this.er = a)
	});
	$f.prototype.getParentKeyForNodeData = $f.prototype.An = function(a) {
		if (null !== a) {
			var b = this.lh;
			if ("" !== b && (b = w.ub(a, b), void 0 !== b)) {
				if (xg(b)) return b;
				w.k("ParentKey value for node data " + a + " is not a number or a string: " + b)
			}
		}
	};
	$f.prototype.setParentKeyForNodeData = $f.prototype.ri = function(a, b) {
		null === b && (b = void 0);
		void 0 === b || xg(b) || w.Ed(b, "number or string", $f, "setParentKeyForNodeData:key");
		if (null !== a) {
			var c = this.lh;
			if ("" !== c)
				if (b = this.Kn(b), this.Ie(a)) {
					var d = w.ub(a, c);
					d !== b && (Cg(this, d, a), w.Ma(a, c, b), null === this.we(b) && Bg(this, b, a), vg(this, "nodeParentKey", Df, c, a, d, b), "string" === typeof c && this.Ib(a, c))
				} else w.Ma(a, c, b)
		}
	};
	w.defineProperty($f, {
		IL: "parentLinkCategoryProperty"
	}, function() {
		return this.Tm
	}, function(a) {
		var b = this.Tm;
		b !== a && (wg(a, $f, "parentLinkCategoryProperty"), this.Tm = a, this.h("parentLinkCategoryProperty", b, a))
	});
	$f.prototype.getParentLinkCategoryForNodeData = $f.prototype.eI = function(a) {
		if (null === a) return "";
		var b = this.Tm;
		if ("" === b) return "";
		b = w.ub(a, b);
		if (void 0 === b) return "";
		if ("string" === typeof b) return b;
		w.k("getParentLinkCategoryForNodeData found a non-string category for " + a + ": " + b);
		return ""
	};
	$f.prototype.setParentLinkCategoryForNodeData = $f.prototype.HJ = function(a, b) {
		w.j(b, "string", $f, "setParentLinkCategoryForNodeData:cat");
		if (null !== a) {
			var c = this.Tm;
			if ("" !== c)
				if (this.Ie(a)) {
					var d = w.ub(a, c);
					void 0 === d && (d = "");
					d !== b && (w.Ma(a, c, b), vg(this, "parentLinkCategory", Df, c, a, d, b), "string" === typeof c && this.Ib(a, c))
				} else w.Ma(a, c, b)
		}
	};
	$f.prototype.copyNodeData = function(a) {
		if (null === a) return null;
		a = F.prototype.copyNodeData.call(this, a);
		this.rn || "" === this.lh || void 0 === w.ub(a, this.lh) || w.Ma(a, this.lh, void 0);
		return a
	};
	$f.prototype.setDataProperty = function(a, b, c) {
		if (this.Ie(a))
			if (b === this.dm) this.uy(a, c);
			else {
				if (b === this.Sn) {
					this.sy(a, c);
					return
				}
				if (b === this.Iu) {
					this.ri(a, c);
					return
				}
			}
		else !Yg && a instanceof G && (Yg = !0, w.trace('TreeModel.setDataProperty is modifying a GraphObject, "' + a.toString() + '"'), w.trace("  Is that really your intent?"));
		var d = w.ub(a, b);
		d !== c && (w.Ma(a, b, c), this.jB(a, b, d, c))
	};
	g = $f.prototype;
	g.Ou = function(a, b) {
		F.prototype.Ou.call(this, a, b);
		for (var c = this.Kc.i; c.next();) this.pB(c.value, a, b)
	};
	g.pB = function(a, b, c) {
		if (this.An(a) === b) {
			var d = this.lh;
			w.Ma(a, d, c);
			vg(this, "nodeParentKey", Df, d, a, b, c);
			"string" === typeof d && this.Ib(a, d)
		}
	};
	g.sq = function(a) {
		F.prototype.sq.call(this, a);
		a = this.qb(a);
		var b = Ag(this, a);
		if (null !== b) {
			for (var c = new H(Object), b = b.i; b.next();) {
				var d = b.value;
				if (this.Ie(d) && this.An(d) === a) {
					var e = this.lh;
					vg(this, "nodeParentKey", Df, e, d, a, a);
					"string" === typeof e && this.Ib(d, e);
					c.add(d)
				}
			}
			for (c = c.i; c.next();) Cg(this, a, c.value)
		}
	};
	g.rq = function(a) {
		F.prototype.rq.call(this, a);
		var b = this.An(a),
			b = this.Kn(b);
		null === this.we(b) && Bg(this, b, a)
	};
	g.cv = function(a) {
		F.prototype.cv.call(this, a);
		var b = this.An(a);
		Cg(this, b, a)
	};

	function bh(a, b, c) {
		w.oc(this);
		this.P = !1;
		void 0 === a ? a = "" : w.j(a, "string", bh, "constructor:targetprop");
		void 0 === b ? b = a : w.j(b, "string", bh, "constructor:sourceprop");
		void 0 === c ? c = null : null !== c && w.j(c, "function", bh, "constructor:conv");
		this.YD = -1;
		this.Gg = null;
		this.wp = a;
		this.vp = this.st = 0;
		this.Lw = null;
		this.Xr = !1;
		this.lp = b;
		this.ar = c;
		this.rs = ch;
		this.Uq = null;
		this.mz = new I
	}
	w.ga("Binding", bh);
	bh.prototype.copy = function() {
		var a = new bh;
		a.wp = this.wp;
		a.st = this.st;
		a.vp = this.vp;
		a.Lw = this.Lw;
		a.Xr = this.Xr;
		a.lp = this.lp;
		a.ar = this.ar;
		a.rs = this.rs;
		a.Uq = this.Uq;
		return a
	};
	var ch;
	bh.OneWay = ch = w.p(bh, "OneWay", 1);
	var dh;
	bh.TwoWay = dh = w.p(bh, "TwoWay", 2);
	bh.parseEnum = function(a, b) {
		w.j(a, "function", bh, "parseEnum:ctor");
		w.ob(b, a, bh, "parseEnum:defval");
		return function(c) {
			c = pa(a, c);
			return null === c ? b : c
		}
	};
	bh.prototype.ic = function(a) {
		a.Ge === bh ? this.mode = a : w.Ij(this, a)
	};
	var Rf;
	bh.toString = Rf = function(a) {
		var b = a;
		w.Pa(a) && (a.text ? b = a.text : a.name ? b = a.name : void 0 !== a.key ? b = a.key : void 0 !== a.id ? b = a.id : a.constructor === Object && (a.Text ? b = a.Text : a.Name ? b = a.Name : void 0 !== a.Key ? b = a.Key : void 0 !== a.Id ? b = a.Id : void 0 !== a.ID && (b = a.ID)));
		return void 0 === b ? "undefined" : null === b ? "null" : b.toString()
	};
	bh.prototype.toString = function() {
		return "Binding(" + this.xy + ":" + this.uG + (-1 !== this.lm ? " " + this.lm : "") + " " + this.mode.name + ")"
	};
	bh.prototype.freeze = function() {
		this.P = !0;
		return this
	};
	bh.prototype.Qa = function() {
		this.P = !1;
		return this
	};
	w.defineProperty(bh, {
		lm: null
	}, function() {
		return this.YD
	}, function(a) {
		this.P && w.ma(this);
		w.j(a, "number", bh, "targetId");
		this.YD = a
	});
	w.defineProperty(bh, {
		xy: "targetProperty"
	}, function() {
		return this.wp
	}, function(a) {
		this.P && w.ma(this);
		w.j(a, "string", bh, "targetProperty");
		this.wp = a
	});
	w.defineProperty(bh, {
		Cq: "sourceName"
	}, function() {
		return this.Lw
	}, function(a) {
		this.P && w.ma(this);
		null !== a && w.j(a, "string", bh, "sourceName");
		this.Lw = a;
		null !== a && (this.Xr = !1)
	});
	w.defineProperty(bh, {
		Lx: "isToModel"
	}, function() {
		return this.Xr
	}, function(a) {
		this.P && w.ma(this);
		w.j(a, "boolean", bh, "isToModel");
		this.Xr = a
	});
	w.defineProperty(bh, {
		uG: "sourceProperty"
	}, function() {
		return this.lp
	}, function(a) {
		this.P && w.ma(this);
		w.j(a, "string", bh, "sourceProperty");
		this.lp = a
	});
	w.defineProperty(bh, {
		DH: "converter"
	}, function() {
		return this.ar
	}, function(a) {
		this.P && w.ma(this);
		null !== a && w.j(a, "function", bh, "converter");
		this.ar = a
	});
	w.defineProperty(bh, {
		sH: "backConverter"
	}, function() {
		return this.Uq
	}, function(a) {
		this.P && w.ma(this);
		null !== a && w.j(a, "function", bh, "backConverter");
		this.Uq = a
	});
	w.defineProperty(bh, {
		mode: "mode"
	}, function() {
		return this.rs
	}, function(a) {
		this.P && w.ma(this);
		w.ob(a, bh, bh, "mode");
		this.rs = a
	});
	bh.prototype.makeTwoWay = bh.prototype.RI = function(a) {
		void 0 === a && (a = null);
		null !== a && w.j(a, "function", bh, "makeTwoWay");
		this.mode = dh;
		this.sH = a;
		return this
	};
	bh.prototype.ofObject = bh.prototype.Xx = function(a) {
		void 0 === a && (a = "");
		this.Cq = a;
		this.Lx = !1;
		return this
	};
	bh.prototype.ofModel = function() {
		this.Cq = null;
		this.Lx = !0;
		return this
	};

	function eh(a, b, c) {
		a = a.Cq;
		var d = null;
		return d = null === a || "" === a ? b : "/" === a ? c.U : "." === a ? c : ".." === a ? c.Q : b.Bd(a)
	}
	bh.prototype.updateTarget = bh.prototype.JG = function(a, b, c) {
		var d = this.lp;
		if (void 0 === c || "" === d || d === c) {
			c = this.wp;
			var e = this.ar;
			if (null === e && "" === c) w.trace("Binding error: target property is the empty string: " + this.toString());
			else {
				var f = b;
				"" !== d && (f = w.ub(b, d));
				if (void 0 !== f)
					if (null === e) "" !== c && w.Ma(a, c, f);
					else try {
						if ("" !== c) {
							var h = e(f, a);
							w.Ma(a, c, h)
						} else e(f, a)
					} catch (k) {}
			}
		}
	};
	bh.prototype.updateSource = bh.prototype.yy = function(a, b, c, d) {
		if (this.rs === dh) {
			var e = this.wp;
			if (void 0 === c || e === c) {
				c = this.lp;
				var f = this.Uq,
					h = a;
				"" !== e && (h = w.ub(a, e));
				if (void 0 !== h && !this.mz.contains(a)) try {
					this.mz.add(a);
					var k = null !== d ? d.g : null,
						l = null !== k ? k.$ : null;
					if (null === f)
						if ("" !== c) null !== l ? l.setDataProperty(b, c, h) : w.Ma(b, c, h);
						else {
							if (null !== l && null !== d && 0 <= d.vu && null !== d.Q && Array.isArray(d.Q.fq)) {
								var m = d.vu,
									n = d.Q.fq;
								l.$F(n, m);
								l.KA(n, m, h)
							}
						}
					else try {
						if ("" !== c) {
							var p = f(h, b, l);
							null !== l ? l.setDataProperty(b,
								c, p) : w.Ma(b, c, p)
						} else p = f(h, b, l), void 0 !== p && null !== l && null !== d && 0 <= d.vu && null !== d.Q && Array.isArray(d.Q.fq) && (m = d.vu, n = d.Q.fq, l.$F(n, m), l.KA(n, m, p))
					} catch (q) {}
				} finally {
					this.mz.remove(a)
				}
			}
		}
	};

	function ag() {
		this.PG = (new H(Cf)).freeze();
		this.Rb = "";
		this.dD = !1
	}
	w.ga("Transaction", ag);
	ag.prototype.toString = function(a) {
		var b = "Transaction: " + this.name + " " + this.Wf.count.toString() + (this.nu ? "" : ", incomplete");
		if (void 0 !== a && 0 < a) {
			a = this.Wf.count;
			for (var c = 0; c < a; c++) {
				var d = this.Wf.ea(c);
				null !== d && (b += "\n  " + d.toString())
			}
		}
		return b
	};
	ag.prototype.clear = ag.prototype.clear = function() {
		var a = this.Wf;
		a.Qa();
		for (var b = a.count - 1; 0 <= b; b--) {
			var c = a.ea(b);
			null !== c && c.clear()
		}
		a.clear();
		a.freeze()
	};
	ag.prototype.canUndo = ag.prototype.canUndo = function() {
		return this.nu
	};
	ag.prototype.undo = ag.prototype.undo = function() {
		if (this.canUndo())
			for (var a = this.Wf.count - 1; 0 <= a; a--) {
				var b = this.Wf.ea(a);
				null !== b && b.undo()
			}
	};
	ag.prototype.canRedo = ag.prototype.canRedo = function() {
		return this.nu
	};
	ag.prototype.redo = ag.prototype.redo = function() {
		if (this.canRedo())
			for (var a = this.Wf.count, b = 0; b < a; b++) {
				var c = this.Wf.ea(b);
				null !== c && c.redo()
			}
	};
	w.u(ag, {
		Wf: "changes"
	}, function() {
		return this.PG
	});
	w.defineProperty(ag, {
		name: "name"
	}, function() {
		return this.Rb
	}, function(a) {
		this.Rb = a
	});
	w.defineProperty(ag, {
		nu: "isComplete"
	}, function() {
		return this.dD
	}, function(a) {
		this.dD = a
	});

	function Sf() {
		this.Dz = new I(F);
		this.jf = !1;
		this.TG = (new H(ag)).freeze();
		this.bh = -1;
		this.rD = 999;
		this.fh = !1;
		this.Dv = null;
		this.Fl = 0;
		this.oC = !1;
		this.jh = (new H("string")).freeze();
		this.$o = new H("number");
		this.nz = !0;
		this.yz = !1
	}
	w.ga("UndoManager", Sf);
	Sf.prototype.toString = function(a) {
		for (var b = "UndoManager " + this.uj + "<" + this.history.count + "<=" + this.NF, b = b + "[", c = this.SF.count, d = 0; d < c; d++) 0 < d && (b += " "), b += this.SF.ea(d);
		b += "]";
		if (void 0 !== a && 0 < a)
			for (c = this.history.count, d = 0; d < c; d++) b += "\n " + this.history.ea(d).toString(a - 1);
		return b
	};
	Sf.prototype.clear = Sf.prototype.clear = function() {
		var a = this.history;
		a.Qa();
		for (var b = a.count - 1; 0 <= b; b--) {
			var c = a.ea(b);
			null !== c && c.clear()
		}
		a.clear();
		this.bh = -1;
		a.freeze();
		this.fh = !1;
		this.Dv = null;
		this.Fl = 0;
		this.jh.Qa();
		this.jh.clear();
		this.jh.freeze();
		this.$o.clear()
	};
	Sf.prototype.addModel = Sf.prototype.lH = function(a) {
		this.Dz.add(a)
	};
	Sf.prototype.removeModel = Sf.prototype.rJ = function(a) {
		this.Dz.remove(a)
	};
	Sf.prototype.startTransaction = Sf.prototype.Hb = function(a) {
		void 0 === a && (a = "");
		null === a && (a = "");
		if (this.lb) return !1;
		!0 === this.nz && (this.nz = !1, this.Fl++, this.jd("StartingFirstTransaction", a, this.pj), 0 < this.Fl && this.Fl--);
		this.isEnabled && (this.jh.Qa(), this.jh.add(a), this.jh.freeze(), null === this.pj ? this.$o.add(0) : this.$o.add(this.pj.Wf.count));
		this.Fl++;
		var b = 1 === this.ti;
		b && this.jd("StartedTransaction", a, this.pj);
		return b
	};
	Sf.prototype.commitTransaction = Sf.prototype.Yc = function(a) {
		void 0 === a && (a = "");
		return fh(this, !0, a)
	};
	Sf.prototype.rollbackTransaction = Sf.prototype.fm = function() {
		return fh(this, !1, "")
	};

	function fh(a, b, c) {
		if (a.lb) return !1;
		a.hA && 1 > a.ti && w.trace("Ending transaction without having started a transaction: " + c);
		var d = 1 === a.ti;
		d && b && a.jd("CommittingTransaction", c, a.pj);
		var e = 0;
		if (0 < a.ti && (a.Fl--, a.isEnabled)) {
			var f = a.jh.count;
			0 < f && ("" === c && (c = a.jh.ea(0)), a.jh.Qa(), a.jh.dd(f - 1), a.jh.freeze());
			f = a.$o.count;
			0 < f && (e = a.$o.ea(f - 1), a.$o.dd(f - 1))
		}
		f = a.pj;
		if (d) {
			if (b) {
				a.yz = !1;
				if (a.isEnabled && null !== f) {
					b = f;
					b.nu = !0;
					b.name = c;
					d = a.history;
					d.Qa();
					for (e = d.count - 1; e > a.uj; e--) f = d.ea(e), null !== f && f.clear(),
						d.dd(e), a.yz = !0;
					e = a.NF;
					0 === e && (e = 1);
					0 < e && d.count >= e && (f = d.ea(0), null !== f && f.clear(), d.dd(0), a.bh--);
					d.add(b);
					a.bh++;
					d.freeze();
					f = b
				}
				a.jd("CommittedTransaction", c, f)
			} else {
				a.fh = !0;
				try {
					a.isEnabled && null !== f && (f.nu = !0, f.undo())
				} finally {
					a.jd("RolledBackTransaction", c, f), a.fh = !1
				}
				null !== f && f.clear()
			}
			a.Dv = null;
			return !0
		}
		if (a.isEnabled && !b && null !== f) {
			a = e;
			c = f.Wf;
			for (b = c.count - 1; b >= a; b--) d = c.ea(b), null !== d && d.undo(), c.Qa(), c.dd(b);
			c.freeze()
		}
		return !1
	}
	Sf.prototype.canUndo = Sf.prototype.canUndo = function() {
		if (!this.isEnabled || 0 < this.ti) return !1;
		var a = this.EG;
		return null !== a && a.canUndo() ? !0 : !1
	};
	Sf.prototype.undo = Sf.prototype.undo = function() {
		if (this.canUndo()) {
			var a = this.EG;
			try {
				this.fh = !0, this.jd("StartingUndo", "Undo", a), this.bh--, a.undo()
			} catch (b) {
				w.trace("undo error: " + b.toString())
			} finally {
				this.jd("FinishedUndo", "Undo", a), this.fh = !1
			}
		}
	};
	Sf.prototype.canRedo = Sf.prototype.canRedo = function() {
		if (!this.isEnabled || 0 < this.ti) return !1;
		var a = this.DG;
		return null !== a && a.canRedo() ? !0 : !1
	};
	Sf.prototype.redo = Sf.prototype.redo = function() {
		if (this.canRedo()) {
			var a = this.DG;
			try {
				this.fh = !0, this.jd("StartingRedo", "Redo", a), this.bh++, a.redo()
			} catch (b) {
				w.trace("redo error: " + b.toString())
			} finally {
				this.jd("FinishedRedo", "Redo", a), this.fh = !1
			}
		}
	};
	Sf.prototype.jd = function(a, b, c) {
		void 0 === c && (c = null);
		var d = new Cf;
		d.Dc = Ef;
		d.propertyName = a;
		d.object = c;
		d.oldValue = b;
		for (a = this.aJ; a.next();) b = a.value, d.$ = b, b.jx(d)
	};
	Sf.prototype.handleChanged = Sf.prototype.rF = function(a) {
		if (this.isEnabled && !this.lb && !this.skipsEvent(a)) {
			var b = this.pj;
			null === b && (this.Dv = b = new ag);
			var c = a.copy(),
				b = b.Wf;
			b.Qa();
			b.add(c);
			b.freeze();
			this.hA && 0 >= this.ti && !this.nz && (a = a.g, null !== a && !1 === a.Fn || w.trace("Change not within a transaction: " + c.toString()))
		}
	};
	Sf.prototype.skipsEvent = function(a) {
		if (null === a || 0 > a.Dc.value) return !0;
		a = a.object;
		if (a instanceof G) {
			if (a = a.layer, null !== a && a.Pc) return !0
		} else if (a instanceof qg && a.Pc) return !0;
		return !1
	};
	w.u(Sf, {
		aJ: "models"
	}, function() {
		return this.Dz.i
	});
	w.defineProperty(Sf, {
		isEnabled: "isEnabled"
	}, function() {
		return this.jf
	}, function(a) {
		this.jf = a
	});
	w.u(Sf, {
		EG: "transactionToUndo"
	}, function() {
		return 0 <= this.uj && this.uj <= this.history.count - 1 ? this.history.ea(this.uj) : null
	});
	w.u(Sf, {
		DG: "transactionToRedo"
	}, function() {
		return this.uj < this.history.count - 1 ? this.history.ea(this.uj + 1) : null
	});
	w.u(Sf, {
		lb: "isUndoingRedoing"
	}, function() {
		return this.fh
	});
	w.u(Sf, {
		history: "history"
	}, function() {
		return this.TG
	});
	w.defineProperty(Sf, {
		NF: "maxHistoryLength"
	}, function() {
		return this.rD
	}, function(a) {
		this.rD = a
	});
	w.u(Sf, {
		uj: "historyIndex"
	}, function() {
		return this.bh
	});
	w.u(Sf, {
		pj: "currentTransaction"
	}, function() {
		return this.Dv
	});
	w.u(Sf, {
		ti: "transactionLevel"
	}, function() {
		return this.Fl
	});
	w.u(Sf, {
		CF: "isInTransaction"
	}, function() {
		return 0 < this.Fl
	});
	w.defineProperty(Sf, {
		hA: "checksTransactionLevel"
	}, function() {
		return this.oC
	}, function(a) {
		this.oC = a
	});
	w.u(Sf, {
		SF: "nestedTransactionNames"
	}, function() {
		return this.jh
	});

	function sg() {
		0 < arguments.length && w.nd(sg);
		w.oc(this);
		this.aa = null;
		this.rC = !1;
		this.MC = this.sC = !0;
		this.uC = this.vC = this.NC = this.wC = !1;
		this.wl = this.hC = null;
		this.pE = 1.05;
		this.JC = 1;
		this.zz = NaN;
		this.oD = null;
		this.bA = NaN;
		this.aA = ed;
		this.ej = null;
		this.OD = 0
	}
	w.ga("CommandHandler", sg);
	var gh = null,
		hh = "";
	sg.prototype.toString = function() {
		return "CommandHandler"
	};
	w.u(sg, {
		g: "diagram"
	}, function() {
		return this.aa
	});
	sg.prototype.Sc = function(a) {
		this.aa = a
	};
	sg.prototype.doKeyDown = function() {
		var a = this.g;
		if (null !== a) {
			var b = a.R,
				c = w.yh ? b.Cu : b.control,
				d = b.shift,
				e = b.alt,
				f = b.key;
			!c || "C" !== f && "Insert" !== f ? c && "X" === f || d && "Del" === f ? this.canCutSelection() && this.cutSelection() : c && "V" === f || d && "Insert" === f ? this.canPasteSelection() && this.pasteSelection() : c && "Y" === f || e && d && "Backspace" === f ? this.canRedo() && this.redo() : c && "Z" === f || e && "Backspace" === f ? this.canUndo() && this.undo() : "Del" === f || "Backspace" === f ? this.canDeleteSelection() && this.deleteSelection() : c && "A" === f ? this.canSelectAll() &&
				this.selectAll() : "Esc" === f ? this.canStopCommand() && this.stopCommand() : "Up" === f ? a.qe && (c ? a.scroll("pixel", "up") : a.scroll("line", "up")) : "Down" === f ? a.qe && (c ? a.scroll("pixel", "down") : a.scroll("line", "down")) : "Left" === f ? a.pe && (c ? a.scroll("pixel", "left") : a.scroll("line", "left")) : "Right" === f ? a.pe && (c ? a.scroll("pixel", "right") : a.scroll("line", "right")) : "PageUp" === f ? d && a.pe ? a.scroll("page", "left") : a.qe && a.scroll("page", "up") : "PageDown" === f ? d && a.pe ? a.scroll("page", "right") : a.qe && a.scroll("page", "down") : "Home" ===
				f ? c && a.qe ? a.scroll("document", "up") : !c && a.pe && a.scroll("document", "left") : "End" === f ? c && a.qe ? a.scroll("document", "down") : !c && a.pe && a.scroll("document", "right") : " " === f ? this.canScrollToPart() && this.scrollToPart() : "Subtract" === f ? this.canDecreaseZoom() && this.decreaseZoom() : "Add" === f ? this.canIncreaseZoom() && this.increaseZoom() : c && "0" === f ? this.canResetZoom() && this.resetZoom() : d && "Z" === f ? this.canZoomToFit() && this.zoomToFit() : c && !d && "G" === f ? this.canGroupSelection() && this.groupSelection() : c && d && "G" === f ? this.canUngroupSelection() &&
				this.ungroupSelection() : b.event && 113 === b.event.which ? this.canEditTextBlock() && this.editTextBlock() : b.event && 93 === b.event.which ? this.canShowContextMenu() && this.showContextMenu() : b.bubbles = !0 : this.canCopySelection() && this.copySelection()
		}
	};
	sg.prototype.doKeyUp = function() {
		var a = this.g;
		null !== a && (a.R.bubbles = !0)
	};
	sg.prototype.stopCommand = function() {
		var a = this.g;
		if (null !== a) {
			var b = a.$a;
			b instanceof ih && a.Af && a.kx();
			null !== b && b.doCancel()
		}
	};
	sg.prototype.canStopCommand = function() {
		return !0
	};
	sg.prototype.selectAll = function() {
		var a = this.g;
		if (null !== a) {
			a.oa();
			try {
				a.fc = "wait";
				a.Aa("ChangingSelection");
				for (var b = a.Pk; b.next();) b.value.ib = !0;
				for (var c = a.ig; c.next();) c.value.ib = !0;
				for (var d = a.links; d.next();) d.value.ib = !0
			} finally {
				a.Aa("ChangedSelection"), a.fc = ""
			}
		}
	};
	sg.prototype.canSelectAll = function() {
		var a = this.g;
		return null !== a && a.Af
	};
	sg.prototype.deleteSelection = function() {
		var a = this.g;
		if (null !== a && !a.Aa("SelectionDeleting", a.selection)) try {
			a.fc = "wait";
			a.Hb("Delete");
			a.Aa("ChangingSelection");
			for (var b = new I(R), c = a.selection.i; c.next();) jh(b, c.value, !0, this.OH ? Infinity : 0, this.TE, function(a) {
				return a.canDelete()
			});
			a.oB(b, !0);
			a.Aa("SelectionDeleted", b)
		} finally {
			a.Aa("ChangedSelection"), a.Yc("Delete"), a.fc = ""
		}
	};
	sg.prototype.canDeleteSelection = function() {
		var a = this.g;
		return null === a || a.hb || a.Df || !a.hn || 0 === a.selection.count ? !1 : !0
	};

	function jh(a, b, c, d, e, f) {
		void 0 === f && (f = null);
		if (!(a.contains(b) || null !== f && !f(b) || b instanceof kh))
			if (a.add(b), b instanceof T) {
				if (c && b instanceof V)
					for (var h = b.vc; h.next();) jh(a, h.value, c, d, e, f);
				if (e)
					for (h = b.he; h.next();) {
						var k = h.value;
						if (!a.contains(k)) {
							var l = k.W,
								m = k.Z;
							null !== l && a.contains(l) && null !== m && a.contains(m) ? jh(a, k, c, d, e, f) : null !== l && null !== m || jh(a, k, c, d, e, f)
						}
					}
				if (1 < d)
					for (b = b.dF(); b.next();) jh(a, b.value, c, d - 1, e, f)
			} else if (b instanceof W)
			for (b = b.Ef; b.next();) jh(a, b.value, c, d, e, f)
	}
	sg.prototype.Lp = function(a, b, c) {
		var d = new ma(R, R);
		for (a = a.i; a.next();) lh(this, a.value, b, d, c);
		if (null !== b) {
			c = b.$;
			a = !1;
			null !== b.eb.ue && (a = b.eb.ue.rj);
			for (var e = new I(W), f = new ma(W, W), h = d.i; h.next();) {
				var k = h.value;
				if (k instanceof W) {
					var l = k;
					a || null !== l.W && null !== l.Z || e.add(l)
				} else if (c instanceof $f && k instanceof T && null !== k.data) {
					var l = c,
						m = k,
						k = h.key,
						n = k.Gk();
					null !== n && (n = d.ka(n), null !== n ? (l.ri(m.data, l.qb(n.data)), l = b.Xf(m.data), k = k.wn(), null !== k && null !== l && f.add(k, l)) : l.ri(m.data, void 0))
				}
			}
			0 < e.count &&
				b.oB(e, !1);
			if (0 < f.count)
				for (c = f.i; c.next();) d.add(c.key, c.value)
		}
		if (null !== b && null !== this.g && (b = b.$, c = b.nH, null !== c)) {
			var p = new ma;
			d.each(function(a) {
				null !== a.key.data && p.add(a.key.data, a.value.data)
			});
			c(p, b, this.g.$)
		}
		for (b = d.i; b.next();) b.value.Ib();
		return d
	};

	function lh(a, b, c, d, e) {
		if (null === b || e && !b.canCopy()) return null;
		if (d.contains(b)) return d.ka(b);
		var f = null,
			h = b.data;
		if (null !== h && null !== c) {
			var k = c.$;
			b instanceof W ? k instanceof Q && (h = k.mx(h), w.Pa(h) && (k.Ft(h), f = c.Xf(h))) : (h = k.copyNodeData(h), w.Pa(h) && (k.Il(h), f = c.vh(h)))
		} else mh(b), f = b.copy(), null !== f && (null !== c ? c.add(f) : null !== h && null !== a.g && a.EH && (k = a.g.$, h = f instanceof W && k instanceof Q ? k.mx(h) : k.copyNodeData(h), w.Pa(h) && (f.data = h)));
		if (!(f instanceof R)) return null;
		f.ib = !1;
		f.Og = !1;
		d.add(b, f);
		if (b instanceof T) {
			for (h = b.he; h.next();) {
				k = h.value;
				if (k.W === b) {
					var l = d.ka(k);
					null !== l && (l.W = f)
				}
				k.Z === b && (l = d.ka(k), null !== l && (l.Z = f))
			}
			if (b instanceof V && f instanceof V)
				for (h = f, b = b.vc; b.next();) k = lh(a, b.value, c, d, e), k instanceof W || null === k || (k.Da = h)
		} else if (b instanceof W && f instanceof W)
			for (h = b.W, null !== h && (h = d.ka(h), null !== h && (f.W = h)), h = b.Z, null !== h && (h = d.ka(h), null !== h && (f.Z = h)), b = b.Ef; b.next();) h = lh(a, b.value, c, d, e), null !== h && h instanceof T && (h.Wb = f);
		return f
	}
	sg.prototype.copySelection = function() {
		var a = this.g;
		if (null !== a) {
			for (var b = new I(R), a = a.selection.i; a.next();) jh(b, a.value, !0, this.HH ? Infinity : 0, this.FH, function(a) {
				return a.canCopy()
			});
			this.copyToClipboard(b)
		}
	};
	sg.prototype.canCopySelection = function() {
		var a = this.g;
		return null !== a && a.xk && a.cA && 0 !== a.selection.count ? !0 : !1
	};
	sg.prototype.cutSelection = function() {
		this.copySelection();
		this.deleteSelection()
	};
	sg.prototype.canCutSelection = function() {
		var a = this.g;
		return null !== a && !a.hb && !a.Df && a.xk && a.hn && a.cA && 0 !== a.selection.count ? !0 : !1
	};
	sg.prototype.copyToClipboard = function(a) {
		var b = this.g;
		if (null !== b) {
			var c = null;
			if (null === a) gh = null, hh = "";
			else {
				var c = b.$,
					d = !1,
					e = !1,
					f = null;
				try {
					if (c instanceof $f) {
						var h = c,
							d = h.rn;
						h.rn = this.ME
					}
					c instanceof Q && (h = c, e = h.qn, h.qn = this.LE);
					f = b.Lp(a, null, !0)
				} finally {
					c instanceof $f && (c.rn = d), c instanceof Q && (c.qn = e), c = new H(R), c.Nc(f), gh = c, hh = b.$.Rl
				}
			}
			b.Aa("ClipboardChanged", c)
		}
	};
	sg.prototype.pasteFromClipboard = function() {
		var a = new I(R),
			b = gh;
		if (null === b) return a;
		var c = this.g;
		if (null === c || hh !== c.$.Rl) return a;
		var d = c.$,
			e = !1,
			f = !1,
			h = null;
		try {
			if (d instanceof $f) {
				var k = d,
					e = k.rn;
				k.rn = this.ME
			}
			d instanceof Q && (k = d, f = k.qn, k.qn = this.LE);
			h = c.Lp(b, c, !1)
		} finally {
			for (d instanceof $f && (d.rn = e), d instanceof Q && (d.qn = f), b = h.i; b.next();) c = b.value, d = b.key, c.location.I() || (d.location.I() ? c.location = d.location : !c.position.I() && d.position.I() && (c.position = d.position)), a.add(c)
		}
		return a
	};
	sg.prototype.pasteSelection = function(a) {
		void 0 === a && (a = null);
		var b = this.g;
		if (null !== b) try {
			b.fc = "wait";
			b.Hb("Paste");
			b.Aa("ChangingSelection");
			var c = this.pasteFromClipboard();
			0 < c.count && nh(b);
			for (var d = c.i; d.next();) d.value.ib = !0;
			b.Aa("ChangedSelection");
			if (null !== a) {
				var e = b.computePartsBounds(b.selection);
				if (e.I()) {
					var f = b.eb.ue;
					null === f && (f = new oh, f.Sc(b));
					var h = f.computeEffectiveCollection(b.selection);
					f.moveParts(h, new y(a.x - e.la, a.y - e.ra), !1)
				}
			}
			b.Aa("ClipboardPasted", c)
		} finally {
			b.Yc("Paste"), b.fc =
				""
		}
	};
	sg.prototype.canPasteSelection = function() {
		var a = this.g;
		return null === a || a.hb || a.Df || !a.Cp || !a.cA || null === gh || hh !== a.$.Rl ? !1 : !0
	};
	sg.prototype.undo = function() {
		var a = this.g;
		null !== a && a.ja.undo()
	};
	sg.prototype.canUndo = function() {
		var a = this.g;
		return null === a || a.hb || a.Df ? !1 : a.yE && a.ja.canUndo()
	};
	sg.prototype.redo = function() {
		var a = this.g;
		null !== a && a.ja.redo()
	};
	sg.prototype.canRedo = function() {
		var a = this.g;
		return null === a || a.hb || a.Df ? !1 : a.yE && a.ja.canRedo()
	};
	sg.prototype.decreaseZoom = function(a) {
		void 0 === a && (a = 1 / this.Cy);
		w.zd(a, sg, "decreaseZoom:factor");
		var b = this.g;
		null !== b && b.Ml === ph && (a *= b.scale, a < b.Ah || a > b.zh || (b.scale = a))
	};
	sg.prototype.canDecreaseZoom = function(a) {
		void 0 === a && (a = 1 / this.Cy);
		w.zd(a, sg, "canDecreaseZoom:factor");
		var b = this.g;
		if (null === b || b.Ml !== ph) return !1;
		a *= b.scale;
		return a < b.Ah || a > b.zh ? !1 : b.ix
	};
	sg.prototype.increaseZoom = function(a) {
		void 0 === a && (a = this.Cy);
		w.zd(a, sg, "increaseZoom:factor");
		var b = this.g;
		null !== b && b.Ml === ph && (a *= b.scale, a < b.Ah || a > b.zh || (b.scale = a))
	};
	sg.prototype.canIncreaseZoom = function(a) {
		void 0 === a && (a = this.Cy);
		w.zd(a, sg, "canIncreaseZoom:factor");
		var b = this.g;
		if (null === b || b.Ml !== ph) return !1;
		a *= b.scale;
		return a < b.Ah || a > b.zh ? !1 : b.ix
	};
	sg.prototype.resetZoom = function(a) {
		void 0 === a && (a = this.qx);
		w.zd(a, sg, "resetZoom:newscale");
		var b = this.g;
		null === b || a < b.Ah || a > b.zh || (b.scale = a)
	};
	sg.prototype.canResetZoom = function(a) {
		void 0 === a && (a = this.qx);
		w.zd(a, sg, "canResetZoom:newscale");
		var b = this.g;
		return null === b || a < b.Ah || a > b.zh ? !1 : b.ix
	};
	sg.prototype.zoomToFit = function() {
		var a = this.g;
		if (null !== a) {
			var b = a.scale,
				c = a.position;
			b === this.bA && !isNaN(this.zz) && a.te.L(this.aA) ? (a.scale = this.zz, a.position = this.oD, this.bA = NaN, this.aA = ed) : (this.zz = b, this.oD = c.copy(), a.zoomToFit(), this.bA = a.scale, this.aA = a.te.copy())
		}
	};
	sg.prototype.canZoomToFit = function() {
		var a = this.g;
		return null === a ? !1 : a.ix
	};
	sg.prototype.scrollToPart = function(a) {
		void 0 === a && (a = null);
		null !== a && w.G(a, R, sg, "part");
		var b = this.g;
		if (null !== b) {
			if (null === a) {
				try {
					null !== this.ej && (this.ej.next() ? a = this.ej.value : this.ej = null)
				} catch (c) {
					this.ej = null
				}
				null === a && (0 < b.Yl.count ? this.ej = b.Yl.i : 0 < b.selection.count && (this.ej = b.selection.i), null !== this.ej && this.ej.next() && (a = this.ej.value))
			}
			if (null !== a) {
				var d = b.Ka;
				d.Tn("Scroll To Part");
				var e = this.CJ;
				if (0 < e) {
					var f = Jh(this, a, [a]),
						h = function() {
							b.Hb();
							for (var a = f.pop(); 0 < f.length && a instanceof T && a.uc && (!(a instanceof V) || a.ad);) a = f.pop();
							0 < f.length ? (a instanceof R && b.kG(a.Y), a instanceof T && !a.uc && (a.uc = !0), a instanceof V && !a.ad && (a.ad = !0)) : (a instanceof R && b.FE(a.Y), b.nB("LayoutCompleted", k));
							b.Yc("Scroll To Part")
						},
						k = function() {
							setTimeout(h, (d.isEnabled ? d.duration : 0) + e)
						};
					b.Yw("LayoutCompleted", k);
					h()
				} else {
					var l = b.position.copy();
					b.FE(a.Y);
					l.Oc(b.position) && d.Gh()
				}
			}
		}
	};

	function Jh(a, b, c) {
		if (b.isVisible()) return c;
		if (b instanceof kh) Jh(a, b.zf, c);
		else if (b instanceof W) {
			var d = b.W;
			null !== d && Jh(a, d, c);
			b = b.Z;
			null !== b && Jh(a, b, c)
		} else b instanceof T && (d = b.Wb, null !== d && Jh(a, d, c), d = b.Gk(), null !== d && (d.uc || d.Eq || c.push(d), Jh(a, d, c))), b = b.Da, null !== b && (b.ad || b.By || c.push(b), Jh(a, b, c));
		return c
	}
	sg.prototype.canScrollToPart = function(a) {
		void 0 === a && (a = null);
		if (null !== a && !(a instanceof R)) return !1;
		a = this.g;
		return null === a || 0 === a.selection.count && 0 === a.Yl.count ? !1 : a.pe && a.qe
	};
	sg.prototype.collapseTree = function(a) {
		void 0 === a && (a = null);
		var b = this.g;
		if (null !== b) try {
			b.Hb("Collapse Tree");
			b.Ka.Tn("Collapse Tree");
			var c = new H(T);
			if (null !== a && a.uc) a.collapseTree(), c.add(a);
			else
				for (var d = b.selection.i; d.next();) {
					var e = d.value;
					e instanceof T && (a = e, a.uc && (a.collapseTree(), c.add(a)))
				}
			b.Aa("TreeCollapsed", c)
		} finally {
			b.Yc("Collapse Tree")
		}
	};
	sg.prototype.canCollapseTree = function(a) {
		void 0 === a && (a = null);
		var b = this.g;
		if (null === b || b.hb) return !1;
		if (null !== a) {
			if (!(a instanceof T && a.uc)) return !1;
			if (0 < a.Bx().count) return !0
		} else
			for (a = b.selection.i; a.next();)
				if (b = a.value, b instanceof T && b.uc && 0 < b.Bx().count) return !0;
		return !1
	};
	sg.prototype.expandTree = function(a) {
		void 0 === a && (a = null);
		var b = this.g;
		if (null !== b) try {
			b.Hb("Expand Tree");
			b.Ka.Tn("Expand Tree");
			var c = new H(T);
			if (null === a || a.uc)
				for (var d = b.selection.i; d.next();) {
					var e = d.value;
					e instanceof T && (a = e, a.uc || (a.expandTree(), c.add(a)))
				} else a.expandTree(), c.add(a);
			b.Aa("TreeExpanded", c)
		} finally {
			b.Yc("Expand Tree")
		}
	};
	sg.prototype.canExpandTree = function(a) {
		void 0 === a && (a = null);
		var b = this.g;
		if (null === b || b.hb) return !1;
		if (null !== a) {
			if (!(a instanceof T) || a.uc) return !1;
			if (0 < a.Bx().count) return !0
		} else
			for (a = b.selection.i; a.next();)
				if (b = a.value, b instanceof T && !b.uc && 0 < b.Bx().count) return !0;
		return !1
	};
	sg.prototype.groupSelection = function() {
		var a = this.g;
		if (null !== a) {
			var b = a.$;
			if (b instanceof Q) {
				var c = this.zE;
				if (null !== c) {
					var d = null;
					try {
						a.fc = "wait";
						a.Hb("Group");
						a.Aa("ChangingSelection");
						for (var e = new H(R), f = a.selection.i; f.next();) {
							var h = f.value;
							h.fe() && h.canGroup() && e.add(h)
						}
						for (var k = new H(R), l = e.i; l.next();) {
							for (var m = l.value, f = !1, n = e.i; n.next();)
								if (m.oi(n.value)) {
									f = !0;
									break
								}
							f || k.add(m)
						}
						if (0 < k.count) {
							var p = k.first().Da;
							if (null !== p)
								for (; null !== p;) {
									for (var e = !1, q = k.i; q.next();)
										if (!q.value.oi(p)) {
											e = !0;
											break
										}
									if (e) p = p.Da;
									else break
								}
							if (c instanceof V) mh(c), d = c.copy(), null !== d && a.add(d);
							else if (b.QA(c)) {
								var r = b.copyNodeData(c);
								w.Pa(r) && (b.Il(r), d = a.Ax(r))
							}
							if (null !== d) {
								null !== p && this.isValidMember(p, d) && (d.Da = p);
								for (var s = k.i; s.next();) {
									var u = s.value;
									this.isValidMember(d, u) && (u.Da = d)
								}
								a.select(d)
							}
						}
						a.Aa("ChangedSelection");
						a.Aa("SelectionGrouped", d)
					} finally {
						a.Yc("Group"), a.fc = ""
					}
				}
			}
		}
	};
	sg.prototype.canGroupSelection = function() {
		var a = this.g;
		if (null === a || a.hb || a.Df || !a.Cp || !a.ax || !(a.$ instanceof Q) || null === this.zE) return !1;
		for (a = a.selection.i; a.next();) {
			var b = a.value;
			if (b.fe() && b.canGroup()) return !0
		}
		return !1
	};

	function Kh(a) {
		var b = w.cb();
		for (a = a.i; a.next();) {
			var c = a.value;
			c instanceof W || b.push(c)
		}
		a = new I(R);
		for (var c = b.length, d = 0; d < c; d++) {
			for (var e = b[d], f = !0, h = 0; h < c; h++)
				if (e.oi(b[h])) {
					f = !1;
					break
				}
			f && a.add(e)
		}
		w.ta(b);
		return a
	}
	sg.prototype.isValidMember = function(a, b) {
		if (null === b || a === b || b instanceof W) return !1;
		if (null !== a) {
			if (a === b || a.oi(b)) return !1;
			var c = a.$A;
			if (null !== c && !c(a, b) || null === a.data && null !== b.data || null !== a.data && null === b.data) return !1
		}
		c = this.$A;
		return null !== c ? c(a, b) : !0
	};
	sg.prototype.ungroupSelection = function(a) {
		void 0 === a && (a = null);
		var b = this.g;
		if (null !== b) {
			var c = b.$;
			if (c instanceof Q) try {
				b.fc = "wait";
				b.Hb("Ungroup");
				b.Aa("ChangingSelection");
				var d = new H(V);
				if (null !== a) d.add(a);
				else
					for (var e = b.selection.i; e.next();) {
						var f = e.value;
						f instanceof V && (a = f, a.canUngroup() && d.add(a))
					}
				if (0 < d.count) {
					b.kx();
					for (var h = d.i; h.next();) {
						var k = h.value;
						k.expandSubGraph();
						var l = k.Da,
							m = null !== l && null !== l.data ? c.qb(l.data) : void 0,
							n = new H(R);
						n.Nc(k.vc);
						for (var p = n.i; p.next();) {
							var q =
								p.value;
							q.ib = !0;
							if (!(q instanceof W)) {
								var r = q.data;
								null !== r ? c.yB(r, m) : q.Da = l
							}
						}
						b.remove(k)
					}
				}
				b.Aa("ChangedSelection");
				b.Aa("SelectionUngrouped", d, n)
			} finally {
				b.Yc("Ungroup"), b.fc = ""
			}
		}
	};
	sg.prototype.canUngroupSelection = function(a) {
		void 0 === a && (a = null);
		var b = this.g;
		if (null === b || b.hb || b.Df || !b.hn || !b.hx || !(b.$ instanceof Q)) return !1;
		if (null !== a) {
			if (!(a instanceof V)) return !1;
			if (a.canUngroup()) return !0
		} else
			for (a = b.selection.i; a.next();)
				if (b = a.value, b instanceof V && b.canUngroup()) return !0;
		return !1
	};
	sg.prototype.addTopLevelParts = function(a, b) {
		for (var c = !0, d = Kh(a).i; d.next();) {
			var e = d.value;
			null !== e.Da && (!b || this.isValidMember(null, e) ? e.Da = null : c = !1)
		}
		return c
	};
	sg.prototype.collapseSubGraph = function(a) {
		void 0 === a && (a = null);
		var b = this.g;
		if (null !== b) try {
			b.Hb("Collapse SubGraph");
			b.Ka.Tn("Collapse SubGraph");
			var c = new H(V);
			if (null !== a && a.ad) a.collapseSubGraph(), c.add(a);
			else
				for (var d = b.selection.i; d.next();) {
					var e = d.value;
					e instanceof V && (a = e, a.ad && (a.collapseSubGraph(), c.add(a)))
				}
			b.Aa("SubGraphCollapsed", c)
		} finally {
			b.Yc("Collapse SubGraph")
		}
	};
	sg.prototype.canCollapseSubGraph = function(a) {
		void 0 === a && (a = null);
		var b = this.g;
		if (null === b || b.hb) return !1;
		if (null !== a) return a instanceof V && a.ad ? !0 : !1;
		for (a = b.selection.i; a.next();)
			if (b = a.value, b instanceof V && b.ad) return !0;
		return !1
	};
	sg.prototype.expandSubGraph = function(a) {
		void 0 === a && (a = null);
		var b = this.g;
		if (null !== b) try {
			b.Hb("Expand SubGraph");
			b.Ka.Tn("Expand SubGraph");
			var c = new H(V);
			if (null === a || a.ad)
				for (var d = b.selection.i; d.next();) {
					var e = d.value;
					e instanceof V && (a = e, a.ad || (a.expandSubGraph(), c.add(a)))
				} else a.expandSubGraph(), c.add(a);
			b.Aa("SubGraphExpanded", c)
		} finally {
			b.Yc("Expand SubGraph")
		}
	};
	sg.prototype.canExpandSubGraph = function(a) {
		void 0 === a && (a = null);
		var b = this.g;
		if (null === b || b.hb) return !1;
		if (null !== a) return a instanceof V && !a.ad ? !0 : !1;
		for (a = b.selection.i; a.next();)
			if (b = a.value, b instanceof V && !b.ad) return !0;
		return !1
	};
	sg.prototype.editTextBlock = function(a) {
		void 0 === a && (a = null);
		null !== a && w.G(a, Lh, sg, "editTextBlock");
		var b = this.g;
		if (null !== b) {
			var c = b.eb.HB;
			if (null !== c) {
				if (null === a) {
					a = null;
					for (var d = b.selection.i; d.next();) {
						var e = d.value;
						if (e.canEdit()) {
							a = e;
							break
						}
					}
					if (null === a) return;
					a = a.Ut(function(a) {
						return a instanceof Lh && a.uA
					})
				}
				null !== a && (b.$a = null, c.Xg = a, b.$a = c)
			}
		}
	};
	sg.prototype.canEditTextBlock = function(a) {
		void 0 === a && (a = null);
		var b = this.g;
		if (null === b || b.hb || b.Df || !b.gx || null === b.eb.HB) return !1;
		if (null !== a) {
			if (!(a instanceof Lh)) return !1;
			a = a.U;
			if (null !== a && a.canEdit()) return !0
		} else
			for (b = b.selection.i; b.next();)
				if (a = b.value, a.canEdit() && (a = a.Ut(function(a) {
						return a instanceof Lh && a.uA
					}), null !== a)) return !0;
		return !1
	};
	sg.prototype.showContextMenu = function(a) {
		var b = this.g;
		if (null !== b) {
			var c = b.eb.mA;
			if (null !== c && (void 0 === a && (a = 0 < b.selection.count ? b.selection.first() : b), a = c.findObjectWithContextMenu(a), null !== a)) {
				var d = new zf,
					e = null;
				a instanceof G ? e = a.Wa(Jb) : b.BI || (e = b.rb, e = new y(e.x + e.width / 2, e.y + e.height / 2));
				null !== e && (d.g = b, d.gf = b.FG(e), d.da = e, d.left = !1, d.right = !0, d.up = !0, b.R = d);
				b.$a = c;
				Mh(c, !1, a)
			}
		}
	};
	sg.prototype.canShowContextMenu = function(a) {
		var b = this.g;
		if (null === b) return !1;
		var c = b.eb.mA;
		if (null === c) return !1;
		void 0 === a && (a = 0 < b.selection.count ? b.selection.first() : b);
		return null === c.findObjectWithContextMenu(a) ? !1 : !0
	};
	w.defineProperty(sg, {
		EH: "copiesClipboardData"
	}, function() {
		return this.rC
	}, function(a) {
		w.j(a, "boolean", sg, "copiesClipboardData");
		this.rC = a
	});
	w.defineProperty(sg, {
		FH: "copiesConnectedLinks"
	}, function() {
		return this.sC
	}, function(a) {
		w.j(a, "boolean", sg, "copiesConnectedLinks");
		this.sC = a
	});
	w.defineProperty(sg, {
		TE: "deletesConnectedLinks"
	}, function() {
		return this.MC
	}, function(a) {
		w.j(a, "boolean", sg, "deletesConnectedLinks");
		this.MC = a
	});
	w.defineProperty(sg, {
		HH: "copiesTree"
	}, function() {
		return this.wC
	}, function(a) {
		w.j(a, "boolean", sg, "copiesTree");
		this.wC = a
	});
	w.defineProperty(sg, {
		OH: "deletesTree"
	}, function() {
		return this.NC
	}, function(a) {
		w.j(a, "boolean", sg, "deletesTree");
		this.NC = a
	});
	w.defineProperty(sg, {
		ME: "copiesParentKey"
	}, function() {
		return this.vC
	}, function(a) {
		w.j(a, "boolean", sg, "copiesParentKey");
		this.vC = a
	});
	w.defineProperty(sg, {
		LE: "copiesGroupKey"
	}, function() {
		return this.uC
	}, function(a) {
		w.j(a, "boolean", sg, "copiesGroupKey");
		this.uC = a
	});
	w.defineProperty(sg, {
		zE: "archetypeGroupData"
	}, function() {
		return this.hC
	}, function(a) {
		null !== a && w.G(a, Object, sg, "archetypeGroupData");
		var b = this.g;
		null !== b && (b = b.$, b instanceof Q && (a instanceof V || b.QA(a) || w.k("CommandHandler.archetypeGroupData must be either a Group or a data object for which GraphLinksModel.isGroupForNodeData is true: " + a)));
		this.hC = a
	});
	w.defineProperty(sg, {
		$A: "memberValidation"
	}, function() {
		return this.wl
	}, function(a) {
		null !== a && w.j(a, "function", sg, "memberValidation");
		this.wl = a
	});
	w.defineProperty(sg, {
		qx: "defaultScale"
	}, function() {
		return this.JC
	}, function(a) {
		w.zd(a, sg, "defaultScale");
		0 < a || w.k("defaultScale must be larger than zero, not: " + a);
		this.JC = a
	});
	w.defineProperty(sg, {
		Cy: "zoomFactor"
	}, function() {
		return this.pE
	}, function(a) {
		w.zd(a, sg, "zoomFactor");
		1 < a || w.k("zoomFactor must be larger than 1.0, not: " + a);
		this.pE = a
	});
	w.defineProperty(sg, {
		CJ: "scrollToPartPause"
	}, function() {
		return this.OD
	}, function(a) {
		w.zd(a, sg, "scrollToPartPause");
		this.OD = a
	});

	function rg() {
		0 < arguments.length && w.nd(rg);
		w.oc(this);
		this.aa = null;
		this.Rb = "";
		this.jf = !0;
		this.bD = !1;
		this.jE = null;
		this.Ww = -1
	}
	w.ga("Tool", rg);
	rg.prototype.Sc = function(a) {
		this.aa = a
	};
	rg.prototype.toString = function() {
		return "" !== this.name ? this.name + " Tool" : w.of(Object.getPrototypeOf(this))
	};
	rg.prototype.updateAdornments = function() {};
	rg.prototype.canStart = function() {
		return this.isEnabled
	};
	rg.prototype.doStart = function() {};
	rg.prototype.doActivate = function() {
		this.sa = !0
	};
	rg.prototype.doDeactivate = function() {
		this.sa = !1
	};
	rg.prototype.doStop = function() {};
	rg.prototype.doCancel = function() {
		this.stopTool()
	};
	rg.prototype.stopTool = function() {
		var a = this.g;
		null !== a && a.$a === this && (a.$a = null, a.fc = "")
	};
	rg.prototype.doMouseDown = function() {
		!this.sa && this.canStart() && this.doActivate()
	};
	rg.prototype.doMouseMove = function() {};
	rg.prototype.doMouseUp = function() {
		this.stopTool()
	};
	rg.prototype.doMouseWheel = function() {};
	rg.prototype.canStartMultiTouch = function() {
		return !0
	};
	rg.prototype.standardPinchZoomStart = function() {
		var a = this.g;
		if (null !== a) {
			var b = a.R,
				c = b.Dx(0, w.xb(NaN, NaN)),
				d = b.Dx(1, w.xb(NaN, NaN));
			if (c.I() && d.I() && (this.doCancel(), a.gu("hasGestureZoom"))) {
				a.AD = a.scale;
				var e = d.x - c.x,
					f = d.y - c.y;
				a.TD = Math.sqrt(e * e + f * f);
				b.bubbles = !1
			}
			w.v(c);
			w.v(d)
		}
	};
	rg.prototype.standardPinchZoomMove = function() {
		var a = this.g;
		if (null !== a) {
			var b = a.R,
				c = b.Dx(0, w.xb(NaN, NaN)),
				d = b.Dx(1, w.xb(NaN, NaN));
			if (c.I() && d.I() && (this.doCancel(), a.gu("hasGestureZoom"))) {
				var e = d.x - c.x,
					f = d.y - c.y,
					f = Math.sqrt(e * e + f * f) / a.TD,
					e = new y((Math.min(d.x, c.x) + Math.max(d.x, c.x)) / 2, (Math.min(d.y, c.y) + Math.max(d.y, c.y)) / 2),
					f = a.AD * f,
					h = a.pb;
				if (f !== a.scale && h.canResetZoom(f)) {
					var k = a.pm;
					a.pm = e;
					h.resetZoom(f);
					a.pm = k
				}
				b.bubbles = !1
			}
			w.v(c);
			w.v(d)
		}
	};
	rg.prototype.doKeyDown = function() {
		var a = this.g;
		null !== a && "Esc" === a.R.key && this.doCancel()
	};
	rg.prototype.doKeyUp = function() {};
	rg.prototype.startTransaction = rg.prototype.Hb = function(a) {
		void 0 === a && (a = this.name);
		this.Lf = null;
		var b = this.g;
		return null === b ? !1 : b.Hb(a)
	};
	rg.prototype.stopTransaction = rg.prototype.Rk = function() {
		var a = this.g;
		return null === a ? !1 : null === this.Lf ? a.fm() : a.Yc(this.Lf)
	};
	rg.prototype.standardMouseSelect = function() {
		var a = this.g;
		if (null !== a && a.Af) {
			var b = a.R,
				c = a.Xt(b.da, !1);
			if (null !== c)
				if (w.yh ? b.Cu : b.control) {
					a.Aa("ChangingSelection");
					for (b = c; null !== b && !b.canSelect();) b = b.Da;
					null !== b && (b.ib = !b.ib);
					a.Aa("ChangedSelection")
				} else if (b.shift) {
				if (!c.ib) {
					a.Aa("ChangingSelection");
					for (b = c; null !== b && !b.canSelect();) b = b.Da;
					null !== b && (b.ib = !0);
					a.Aa("ChangedSelection")
				}
			} else {
				if (!c.ib) {
					for (b = c; null !== b && !b.canSelect();) b = b.Da;
					null !== b && a.select(b)
				}
			} else !b.left || (w.yh ? b.Cu : b.control) ||
				b.shift || a.kx()
		}
	};
	rg.prototype.standardMouseClick = function(a, b) {
		void 0 === a && (a = null);
		void 0 === b && (b = function(a) {
			return !a.layer.Pc
		});
		var c = this.g;
		if (null === c) return !1;
		var d = c.R,
			e = c.Le(d.da, a, b);
		d.Ae = e;
		Nh(e, d, c);
		return d.tc
	};

	function Nh(a, b, c) {
		b.tc = !1;
		if (null === a || a.ou()) {
			var d = 0;
			b.left ? d = 1 === b.re ? 1 : 2 === b.re ? 2 : 1 : b.right && 1 === b.re && (d = 3);
			var e = "";
			if (null !== a) {
				switch (d) {
					case 1:
						e = "ObjectSingleClicked";
						break;
					case 2:
						e = "ObjectDoubleClicked";
						break;
					case 3:
						e = "ObjectContextClicked"
				}
				0 !== d && c.Aa(e, a)
			} else {
				switch (d) {
					case 1:
						e = "BackgroundSingleClicked";
						break;
					case 2:
						e = "BackgroundDoubleClicked";
						break;
					case 3:
						e = "BackgroundContextClicked"
				}
				0 !== d && c.Aa(e)
			}
			if (null !== a)
				for (; null !== a;) {
					c = null;
					switch (d) {
						case 1:
							c = a.click;
							break;
						case 2:
							c = a.Rt ? a.Rt :
								a.click;
							break;
						case 3:
							c = a.lA
					}
					if (null !== c && (c(b, a), b.tc)) break;
					a = a.Q
				} else {
					a = null;
					switch (d) {
						case 1:
							a = c.click;
							break;
						case 2:
							a = c.Rt ? c.Rt : c.click;
							break;
						case 3:
							a = c.lA
					}
					null !== a && a(b)
				}
		}
	}
	rg.prototype.standardMouseOver = function() {
		var a = this.g;
		if (null !== a) {
			var b = a.R;
			if (null !== b.g && !0 !== a.Ka.rc) {
				var c = a.bb;
				a.bb = !0;
				var d = a.eh ? a.Le(b.da, null, null) : null;
				b.Ae = d;
				var e = !1;
				if (d !== a.to) {
					var f = a.to,
						h = f;
					a.to = d;
					this.doCurrentObjectChanged(f, d);
					for (b.tc = !1; null !== f;) {
						var k = f.Eu;
						if (null !== k) {
							if (d === f) break;
							if (null !== d && d.am(f)) break;
							k(b, f, d);
							e = !0;
							if (b.tc) break
						}
						f = f.Q
					}
					f = h;
					for (b.tc = !1; null !== d;) {
						k = d.Du;
						if (null !== k) {
							if (f === d) break;
							if (null !== f && f.am(d)) break;
							k(b, d, f);
							e = !0;
							if (b.tc) break
						}
						d = d.Q
					}
					d = a.to
				}
				if (null !==
					d) {
					f = d;
					for (h = ""; null !== f;) {
						h = f.cursor;
						if ("" !== h) break;
						f = f.Q
					}
					a.fc = h;
					b.tc = !1;
					for (f = d; null !== f;) {
						d = f.dB;
						if (null !== d && (d(b, f), e = !0, b.tc)) break;
						f = f.Q
					}
				} else a.fc = "", d = a.dB, null !== d && (d(b), e = !0);
				e && a.Ne();
				a.bb = c
			}
		}
	};
	rg.prototype.doCurrentObjectChanged = function() {};
	rg.prototype.standardMouseWheel = function() {
		var a = this.g;
		if (null !== a) {
			var b = a.R,
				c = b.Ck;
			if (0 !== c && a.te.I()) {
				var d = a.pb,
					e = a.eb.Fu;
				if ((e === Oh && !b.shift || e === Ph && b.control) && (0 < c ? d.canIncreaseZoom() : d.canDecreaseZoom())) e = a.pm, a.pm = b.gf, 0 < c ? d.increaseZoom() : d.decreaseZoom(), a.pm = e, b.bubbles = !1;
				else if (e === Oh && b.shift || e === Ph && !b.control) {
					var d = a.position.copy(),
						e = 0 < c ? c : -c,
						f = b.event.deltaMode,
						h = b.event.deltaX,
						k = b.event.deltaY,
						l = "pixel";
					if (w.aq || w.bq || w.PA) f = 1, 0 < h && (h = 3), 0 > h && (h = -3), 0 < k && (k = 3), 0 > k && (k = -3);
					if (void 0 === f || void 0 === h || void 0 === k || 0 === h && 0 === k || b.shift) !b.shift && a.qe ? (f = a.Tu, e = 3 * e * f, 0 < c ? a.scroll("pixel", "up", e) : a.scroll("pixel", "down", e)) : b.shift && a.pe && (f = a.Su, e = 3 * e * f, 0 < c ? a.scroll("pixel", "left", e) : a.scroll("pixel", "right", e));
					else {
						switch (f) {
							case 0:
								l = "pixel";
								break;
							case 1:
								l = "line";
								break;
							case 2:
								l = "page";
								break;
							default:
								l = "pixel"
						}
						0 !== h && a.pe && (0 < h ? a.scroll(l, "left", -h) : a.scroll(l, "right", h));
						0 !== k && a.qe && (0 < k ? a.scroll(l, "up", -k) : a.scroll(l, "down", k))
					}
					a.position.L(d) || (b.bubbles = !1)
				}
			}
		}
	};
	rg.prototype.standardWaitAfter = function(a, b) {
		w.j(a, "number", rg, "standardWaitAfter:delay");
		this.cancelWaitAfter();
		var c = this,
			d = b.copy();
		this.Ww = w.setTimeout(function() {
			c.doWaitAfter(d)
		}, a)
	};
	rg.prototype.cancelWaitAfter = function() {
		-1 !== this.Ww && w.clearTimeout(this.Ww);
		this.Ww = -1
	};
	rg.prototype.doWaitAfter = function() {};
	rg.prototype.findToolHandleAt = function(a, b) {
		var c = this.g;
		if (null === c) return null;
		c = c.Le(a, function(a) {
			for (; null !== a && !(a.Q instanceof kh);) a = a.Q;
			return a
		});
		return null === c ? null : c.U.yd === b ? c : null
	};
	rg.prototype.isBeyondDragSize = function(a, b) {
		var c = this.g;
		if (null === c) return !1;
		void 0 === a && (a = c.Ec.gf);
		void 0 === b && (b = c.R.gf);
		var d = c.eb.SH,
			e = d.width,
			d = d.height;
		c.Ec.yj && (e += 6, d += 6);
		return Math.abs(b.x - a.x) > e || Math.abs(b.y - a.y) > d
	};
	w.u(rg, {
		g: "diagram"
	}, function() {
		return this.aa
	});
	w.defineProperty(rg, {
		name: "name"
	}, function() {
		return this.Rb
	}, function(a) {
		w.j(a, "string", rg, "name");
		this.Rb = a
	});
	w.defineProperty(rg, {
		isEnabled: "isEnabled"
	}, function() {
		return this.jf
	}, function(a) {
		w.j(a, "boolean", rg, "isEnabled");
		this.jf = a
	});
	w.defineProperty(rg, {
		sa: "isActive"
	}, function() {
		return this.bD
	}, function(a) {
		w.j(a, "boolean", rg, "isActive");
		this.bD = a
	});
	w.defineProperty(rg, {
		Lf: "transactionResult"
	}, function() {
		return this.jE
	}, function(a) {
		null !== a && w.j(a, "string", rg, "transactionResult");
		this.jE = a
	});

	function oh() {
		rg.call(this);
		0 < arguments.length && w.nd(oh);
		this.name = "Dragging";
		this.tC = this.fD = !0;
		this.Rr = this.SC = !1;
		this.jD = !0;
		this.oz = (new ia(NaN, NaN)).freeze();
		this.pz = zb;
		this.qz = (new y(NaN, NaN)).freeze();
		this.RC = !1;
		this.sw = this.rw = this.ez = this.qC = this.QC = this.BC = this.cj = null;
		this.wr = this.hD = !1;
		this.op = new y(NaN, NaN);
		this.Mw = new y;
		this.Pw = !1;
		this.eD = !0;
		this.zo = 100;
		this.Qj = [];
		this.SG = (new I(R)).freeze()
	}
	w.La(oh, rg);
	w.ga("DraggingTool", oh);
	w.defineProperty(oh, {
		zF: "isCopyEnabled"
	}, function() {
		return this.fD
	}, function(a) {
		w.j(a, "boolean", oh, "isCopyEnabled");
		this.fD = a
	});
	w.defineProperty(oh, {
		GH: "copiesEffectiveCollection"
	}, function() {
		return this.tC
	}, function(a) {
		w.j(a, "boolean", oh, "copiesEffectiveCollection");
		this.tC = a
	});
	w.defineProperty(oh, {
		TH: "dragsTree"
	}, function() {
		return this.SC
	}, function(a) {
		w.j(a, "boolean", oh, "dragsTree");
		this.SC = a
	});
	w.defineProperty(oh, {
		qu: "isGridSnapEnabled"
	}, function() {
		return this.Rr
	}, function(a) {
		w.j(a, "boolean", oh, "isGridSnapEnabled");
		this.Rr = a
	});
	w.defineProperty(oh, {
		wI: "isComplexRoutingRealtime"
	}, function() {
		return this.eD
	}, function(a) {
		w.j(a, "boolean", oh, "isComplexRoutingRealtime");
		this.eD = a
	});
	w.defineProperty(oh, {
		yI: "isGridSnapRealtime"
	}, function() {
		return this.jD
	}, function(a) {
		w.j(a, "boolean", oh, "isGridSnapRealtime");
		this.jD = a
	});
	w.defineProperty(oh, {
		qF: "gridSnapCellSize"
	}, function() {
		return this.oz
	}, function(a) {
		w.G(a, ia, oh, "gridSnapCellSize");
		this.oz.L(a) || (this.oz = a = a.S())
	});
	w.defineProperty(oh, {
		hI: "gridSnapCellSpot"
	}, function() {
		return this.pz
	}, function(a) {
		w.G(a, K, oh, "gridSnapCellSpot");
		this.pz.L(a) || (this.pz = a = a.S())
	});
	w.defineProperty(oh, {
		iI: "gridSnapOrigin"
	}, function() {
		return this.qz
	}, function(a) {
		w.G(a, y, oh, "gridSnapOrigin");
		this.qz.L(a) || (this.qz = a = a.S())
	});
	w.defineProperty(oh, {
		rj: "dragsLink"
	}, function() {
		return this.RC
	}, function(a) {
		w.j(a, "boolean", oh, "dragsLink");
		this.RC = a
	});
	w.defineProperty(oh, {
		tn: "currentPart"
	}, function() {
		return this.BC
	}, function(a) {
		null !== a && w.G(a, R, oh, "currentPart");
		this.BC = a
	});
	w.defineProperty(oh, {
		ec: "copiedParts"
	}, function() {
		return this.qC
	}, function(a) {
		this.qC = a
	});
	w.defineProperty(oh, {
		$b: "draggedParts"
	}, function() {
		return this.QC
	}, function(a) {
		this.QC = a
	});
	w.u(oh, {
		aL: "draggingParts"
	}, function() {
		return null !== this.ec ? this.ec.Jj() : null !== this.$b ? this.$b.Jj() : this.SG
	});
	w.defineProperty(oh, {
		ld: "draggedLink"
	}, function() {
		return this.ez
	}, function(a) {
		null !== a && w.G(a, W, oh, "draggedLink");
		this.ez !== a && (this.ez = a, null !== a ? (this.rw = a.lc, this.sw = a.Ic) : this.sw = this.rw = null)
	});
	w.defineProperty(oh, {
		Hx: "isDragOutStarted"
	}, function() {
		return this.hD
	}, function(a) {
		this.hD = a
	});
	w.defineProperty(oh, {
		Qk: "startPoint"
	}, function() {
		return this.Mw
	}, function(a) {
		w.G(a, y, oh, "startPoint");
		this.Mw.L(a) || (this.Mw = a = a.S())
	});
	w.defineProperty(oh, {
		PE: "delay"
	}, function() {
		return this.zo
	}, function(a) {
		w.j(a, "number", oh, "delay");
		this.zo = a
	});
	oh.prototype.canStart = function() {
		if (!this.isEnabled) return !1;
		var a = this.g;
		if (null === a || a.hb && !a.Jt || !a.Kl && !a.xk && !a.Jt || !a.Af) return !1;
		var b = a.R;
		return !b.left || a.$a !== this && (!this.isBeyondDragSize() || b.yj && b.timestamp - a.Ec.timestamp < this.zo) ? !1 : null !== this.findDraggablePart()
	};
	oh.prototype.findDraggablePart = function() {
		var a = this.g;
		if (null === a) return null;
		a = a.Xt(a.Ec.da, !1);
		if (null === a) return null;
		for (; null !== a && !a.canSelect();) a = a.Da;
		return null !== a && (a.canMove() || a.canCopy()) ? a : null
	};
	oh.prototype.standardMouseSelect = function() {
		var a = this.g;
		if (null !== a && a.Af) {
			var b = a.Xt(a.Ec.da, !1);
			if (null !== b) {
				for (; null !== b && !b.canSelect();) b = b.Da;
				this.tn = b;
				this.tn.ib || (a.Aa("ChangingSelection"), b = a.R, (w.yh ? b.Cu : b.control) || b.shift || nh(a), this.tn.ib = !0, a.Aa("ChangedSelection"))
			}
		}
	};
	oh.prototype.doActivate = function() {
		var a = this.g;
		if (null !== a) {
			null === this.tn && this.standardMouseSelect();
			var b = this.tn;
			null !== b && (b.canMove() || b.canCopy()) && (this.sa = !0, this.op.set(a.position), Qh(this, a.selection), this.Qj.length = 0, this.$b = this.computeEffectiveCollection(a.selection), a.Zu = !0, Rh(this, this.$b), this.Hb("Drag"), this.Qk = a.Ec.da, a.df = !0, a.Jt && (this.Hx = !0, this.wr = !1, Sh = this, Th = this.g, this.doSimulatedDragOut()))
		}
	};

	function Qh(a, b) {
		if (a.rj) {
			var c = a.g;
			null !== c && c.jn && (c.$ instanceof Q && 1 === b.count && b.first() instanceof W ? (a.ld = b.first(), a.ld.canRelinkFrom() && a.ld.canRelinkTo() && a.ld.Mt(), a.cj = c.eb.ZF, null === a.cj && (a.cj = new Uh, a.cj.Sc(c))) : (a.ld = null, a.cj = null))
		}
	}
	oh.prototype.computeEffectiveCollection = function(a) {
		var b = null !== this.g && this.g.$a === this,
			c = new ma(R);
		if (null === a) return c;
		for (var d = a.i; d.next();) Vh(this, c, d.value, b);
		if (null !== this.ld && this.rj) return c;
		for (d = a.i; d.next();) a = d.value, a instanceof W && (b = a.W, null === b || c.contains(b) ? (b = a.Z, null === b || c.contains(b) || c.remove(a)) : c.remove(a));
		return c
	};

	function Wh(a, b) {
		return void 0 === b ? new Xh(dd) : a.qu ? new Xh(new y(Math.round(b.x), Math.round(b.y))) : new Xh(b.copy())
	}

	function Vh(a, b, c, d) {
		if (!b.contains(c) && (!d || c.canMove() || c.canCopy()))
			if (c instanceof T) {
				b.add(c, Wh(a, c.location));
				if (c instanceof V)
					for (var e = c.vc; e.next();) Vh(a, b, e.value, d);
				for (e = c.he; e.next();) {
					var f = e.value;
					if (!b.contains(f)) {
						var h = f.W,
							k = f.Z;
						null !== h && b.contains(h) && null !== k && b.contains(k) && Vh(a, b, f, d)
					}
				}
				if (a.TH)
					for (c = c.dF(); c.next();) Vh(a, b, c.value, d)
			} else if (c instanceof W)
			for (f = c, b.add(f, Wh(a)), c = f.Ef; c.next();) Vh(a, b, c.value, d);
		else c instanceof kh || b.add(c, Wh(a, c.location))
	}
	oh.prototype.doDeactivate = function() {
		this.sa = !1;
		var a = this.g;
		null !== a && Yh(a);
		Zh(this);
		$h(this, this.$b);
		this.$b = this.tn = null;
		this.wr = this.Hx = !1;
		if (0 < ai.count) {
			for (var b = ai.length, c = 0; c < b; c++) {
				var d = ai.ea(c);
				bi(d);
				ci(d);
				Zh(d);
				null !== d.g && Yh(d.g)
			}
			ai.clear()
		}
		bi(this);
		this.op.m(NaN, NaN);
		Sh = Th = null;
		ci(this);
		a.df = !1;
		a.fc = "";
		a.Zu = !1;
		this.Rk()
	};

	function Zh(a) {
		var b = a.g;
		if (null !== b) {
			var c = b.bb;
			b.bb = !0;
			di(a, b.R, null);
			b.bb = c
		}
		a.Qj.length = 0
	}

	function ei() {
		var a = Sh;
		ci(a);
		oi(a);
		var b = a.g;
		null !== b && a.op.I() && (b.position = a.op);
		null !== b && Yh(b)
	}
	oh.prototype.doCancel = function() {
		ci(this);
		oi(this);
		var a = this.g;
		null !== a && this.op.I() && (a.position = this.op);
		this.stopTool()
	};

	function Rh(a, b) {
		if (null !== b) {
			a.Pw = !0;
			for (var c = b.i; c.next();) {
				var d = c.key;
				d instanceof W && (d.si = !0)
			}
		}
	}

	function $h(a, b) {
		if (null !== b) {
			for (var c = b.i; c.next();) {
				var d = c.key;
				d instanceof W && (d.si = !1, Bi(d) && d.Vb())
			}
			a.Pw = !1
		}
	}
	oh.prototype.doKeyDown = function() {
		var a = this.g;
		null !== a && (a = a.R, null !== a && this.sa && ("Esc" === a.key ? this.doCancel() : this.doMouseMove()))
	};
	oh.prototype.doKeyUp = function() {
		var a = this.g;
		null !== a && null !== a.R && this.sa && this.doMouseMove()
	};

	function Ci(a, b) {
		for (var c = Infinity, d = Infinity, e = -Infinity, f = -Infinity, h = a.i; h.next();) {
			var k = h.value;
			if (k.fe() && k.isVisible()) {
				var l = k.location,
					k = l.x,
					l = l.y;
				isNaN(k) || isNaN(l) || (k < c && (c = k), l < d && (d = l), k > e && (e = k), l > f && (f = l))
			}
		}
		Infinity === c ? b.m(0, 0, 0, 0) : b.m(c, d, e - c, f - d)
	}

	function Di(a, b) {
		if (null === a.ec) {
			var c = a.g;
			if (!(null === c || b && (c.hb || c.Df)) && null !== a.$b) {
				var d = c.ja;
				d.isEnabled && d.CF ? null !== d.pj && 0 < d.pj.Wf.count && (c.ja.fm(), c.Hb("Drag")) : oi(a);
				c.bb = !b;
				c.Kq = !b;
				a.Qk = c.Ec.da;
				d = a.GH ? a.$b.Jj() : c.selection;
				d = c.Lp(d, c, !0);
				for (c = d.i; c.next();) c.value.location = c.key.location;
				c = w.Kf();
				Ci(d, c);
				w.Eb(c);
				for (var c = new ma(R), e = a.$b.i; e.next();) {
					var f = e.key;
					f.fe() && f.canCopy() && (f = d.ka(f), null !== f && (f.$e(), c.add(f, Wh(a, f.location))))
				}
				for (d = d.i; d.next();) e = d.value, e instanceof
				W && e.canCopy() && c.add(e, Wh(a));
				a.ec = c;
				Qh(a, c.Jj());
				null !== a.ld && (c = a.ld, d = c.Vn, c.Nk(a.Qk.x - (d.x + d.width / 2), a.Qk.y - (d.y + d.height / 2)))
			}
		}
	}

	function ci(a) {
		var b = a.g;
		if (null !== b) {
			if (null !== a.ec && (b.oB(a.ec.Jj(), !1), a.ec = null, null !== a.$b))
				for (var c = a.$b.i; c.next();) c.key instanceof W && (c.value.point = new y(0, 0));
			b.bb = !1;
			b.Kq = !1;
			a.Qk = b.Ec.da
		}
	}

	function bi(a) {
		if (null !== a.ld) {
			if (a.rj && null !== a.cj) {
				var b = a.cj;
				null !== b.g && (b.g.remove(b.Wd), b.g.remove(b.Xd))
			}
			a.ld = null;
			a.cj = null
		}
	}

	function Ei(a, b, c) {
		var d = a.g;
		if (null !== d) {
			var e = a.Qk,
				f = w.K();
			f.assign(d.R.da);
			a.moveParts(b, f.Hj(e), c);
			w.v(f)
		}
	}
	oh.prototype.moveParts = function(a, b, c) {
		if (null !== a && (w.G(a, ma, oh, "moveParts:parts"), 0 !== a.count)) {
			var d = w.K(),
				e = w.K();
			e.assign(b);
			isNaN(e.x) && (e.x = 0);
			isNaN(e.y) && (e.y = 0);
			(b = this.Pw) || Rh(this, a);
			for (var f = new H(Fi), h = new H(Ca), k = a.i; k.next();) {
				var l = k.key;
				if (l.fe()) {
					var m = Gi(this, l, a);
					if (null !== m) f.add(new Fi(l, k.value, m));
					else if (!c || l.canMove()) {
						m = k.value.point;
						d.assign(m);
						var n = new y,
							p = this.computeMove(l, d.add(e), a, n);
						l.location = p;
						k.value.sG = n.Hj(m)
					}
				} else k.key instanceof W && h.add(k.Va)
			}
			for (c = f.i; c.next();) f =
				c.value, m = f.info.point, d.assign(m), f.Qc.location = d.add(f.jI.sG);
			c = w.K();
			m = w.K();
			for (h = h.i; h.next();)
				if (k = h.value, f = k.key, f instanceof W)
					if (f.si) l = f.W, n = f.Z, null !== this.ld && this.rj ? (k = k.value.point, a.add(f, Wh(this, e)), l = e.x - k.x, k = e.y - k.y, f.Nk(l, k)) : (null !== l && (c.assign(l.location), p = a.ka(l), null !== p && c.Hj(p.point)), null !== n && (m.assign(n.location), p = a.ka(n), null !== p && m.Hj(p.point)), null !== l && null !== n ? c.Oc(m) ? (k = k.value.point, l = d, l.assign(c), l.Hj(k), a.add(f, Wh(this, c)), f.Nk(l.x, l.y)) : (f.si = !1, f.Vb()) :
						(k = k.value.point, n = null !== l ? c : null !== n ? m : e, a.add(f, Wh(this, n)), l = n.x - k.x, k = n.y - k.y, f.Nk(l, k)));
					else if (null === f.W || null === f.Z) k = k.value.point, a.add(f, Wh(this, e)), l = e.x - k.x, k = e.y - k.y, f.Nk(l, k);
			w.v(d);
			w.v(e);
			w.v(c);
			w.v(m);
			b || (Hi(this.g), $h(this, a))
		}
	};

	function Gi(a, b, c) {
		b = b.Da;
		if (null !== b) {
			a = Gi(a, b, c);
			if (null !== a) return a;
			a = c.ka(b);
			if (null !== a) return a
		}
		return null
	}

	function oi(a) {
		if (null !== a.$b) {
			for (var b = a.g, c = a.$b.i; c.next();) {
				var d = c.key;
				d.fe() && (d.location = c.value.point)
			}
			for (c = a.$b.i; c.next();)
				if (d = c.key, d instanceof W && d.si) {
					var e = c.value.point;
					a.$b.add(d, Wh(a));
					d.Nk(-e.x, -e.y)
				}
			b.cg()
		}
	}
	oh.prototype.computeMove = function(a, b, c, d) {
		void 0 === d && (d = new y);
		d.assign(b);
		if (null === a) return d;
		void 0 === c && (c = null);
		var e = b;
		if (this.qu && (this.yI || null === c || null !== this.g && this.g.R.up) && (e = w.K(), c = e, c.assign(b), null !== a)) {
			var f = this.g;
			if (null !== f) {
				var h = f.Bn,
					k = this.qF,
					f = k.width,
					k = k.height,
					l = this.iI,
					m = l.x,
					l = l.y,
					n = this.hI;
				if (null !== h) {
					var p = h.Ex;
					isNaN(f) && (f = p.width);
					isNaN(k) && (k = p.height);
					h = h.pF;
					isNaN(m) && (m = h.x);
					isNaN(l) && (l = h.y)
				}
				h = w.xb(0, 0);
				h.Xu(0, 0, f, k, n);
				Na(b.x, b.y, m + h.x, l + h.y, f, k, c);
				w.v(h)
			}
		}
		c =
			null !== a.UE ? a.UE(a, b, e) : e;
		k = a.$I;
		f = k.x;
		isNaN(f) && (f = a.location.x);
		k = k.y;
		isNaN(k) && (k = a.location.y);
		h = a.UI;
		m = h.x;
		isNaN(m) && (m = a.location.x);
		h = h.y;
		isNaN(h) && (h = a.location.y);
		d.m(Math.max(f, Math.min(c.x, m)), Math.max(k, Math.min(c.y, h)));
		e !== b && w.v(e);
		return d
	};

	function Ii(a, b) {
		if (null === b) return !0;
		var c = b.U;
		return null === c || c instanceof kh || c.layer.Pc || a.$b && a.$b.contains(c) || a.ec && a.ec.contains(c) ? !0 : !1
	}

	function Ji(a, b) {
		var c = a.g;
		if (null !== c) {
			a.rj && (null !== a.ld && (a.ld.W = null, a.ld.Z = null), Ki(a, !1));
			var d = Li(c, b, null, function(b) {
					return !Ii(a, b)
				}),
				e = c.R;
			e.Ae = d;
			var f = c.bb,
				h = !1;
			try {
				c.bb = !0;
				h = di(a, e, d);
				if (!a.sa && null === Sh) return;
				if (null === d) {
					var k = c.dJ;
					null !== k && (k(e), h = !0)
				}
				if (!a.sa && null === Sh) return;
				a.doDragOver(b, d);
				if (!a.sa && null === Sh) return
			} finally {
				c.bb = f, h && c.cg()
			}(c.pe || c.qe) && c.tA(e.gf)
		}
	}

	function di(a, b, c) {
		var d = !1,
			e = a.Qj.length,
			f = 0 < e ? a.Qj[0] : null;
		if (c === f) return !1;
		b.tc = !1;
		for (var h = 0; h < e; h++) {
			var k = a.Qj[h],
				l = k.cJ;
			if (null !== l && (l(b, k, c), d = !0, b.tc)) break
		}
		a.Qj.length = 0;
		if (!a.sa && null === Sh || null === c) return d;
		for (b.tc = !1; null !== c;) a.Qj.push(c), c = Mi(c);
		e = a.Qj.length;
		for (h = 0; h < e && (k = a.Qj[h], l = k.bJ, null === l || (l(b, k, f), d = !0, !b.tc)); h++);
		return d
	}

	function Mi(a) {
		var b = a.Q;
		return null !== b ? b : a instanceof R && !(a instanceof V) && (a = a.Da, null !== a && a.mI) ? a : null
	}

	function Ni(a, b, c) {
		var d = a.cj;
		if (null === d) return null;
		var e = a.g.vn(b, d.XF, function(a) {
			return d.findValidLinkablePort(a, c)
		});
		a = w.K();
		for (var f = Infinity, h = null, e = e.i; e.next();) {
			var k = e.value;
			if (null !== k.U) {
				var l = k.Wa(Jb, a),
					l = b.Bf(l);
				l < f && (h = k, f = l)
			}
		}
		w.v(a);
		return h
	}

	function Ki(a, b) {
		var c = a.ld;
		if (null !== c && !(2 > c.qa)) {
			var d = a.g;
			if (null !== d && !d.hb) {
				var e = a.cj;
				if (null !== e) {
					var f = null,
						h = null;
					null === c.W && (f = Ni(a, c.l(0), !1), null !== f && (h = f.U));
					var k = null,
						l = null;
					null === c.Z && (k = Ni(a, c.l(c.qa - 1), !0), null !== k && (l = k.U));
					e.isValidLink(h, f, l, k) ? b ? (c.Mp = c.l(0), c.Np = c.l(c.qa - 1), c.si = !1, c.W = h, null !== f && (c.Ng = f.Vd), c.Z = l, null !== k && (c.Hh = k.Vd), c.lc !== a.rw && d.Aa("LinkRelinked", c, a.rw), c.Ic !== a.sw && d.Aa("LinkRelinked", c, a.sw)) : Oi(e, h, f, l, k) : Oi(e, null, null, null, null)
				}
			}
		}
	}
	oh.prototype.doDragOver = function() {};

	function Pi(a, b) {
		var c = a.g;
		if (null !== c) {
			a.rj && Ki(a, !0);
			Zh(a);
			var d = Li(c, b, null, function(b) {
					return !Ii(a, b)
				}),
				e = c.R;
			e.Ae = d;
			if (null !== d) {
				e.tc = !1;
				for (var f = d; null !== f;) {
					var h = f.aB;
					if (null !== h && (h(e, f), e.tc)) break;
					f = Mi(f)
				}
			} else f = c.aB, null !== f && f(e);
			if (a.sa || null !== Sh) {
				for (e = (a.ec || a.$b).i; e.next();) f = e.key, f instanceof T && f.he.each(function(a) {
					a.si = !1
				});
				a.doDropOnto(b, d);
				if (a.sa || null !== Sh) {
					d = w.Kf();
					for (e = c.selection.i; e.next();) f = e.value, f instanceof T && Qi(c, f.getAvoidableRect(d));
					w.Eb(d)
				}
			}
		}
	}

	function Qi(a, b) {
		var c = !1;
		a.rb.Ak(b) && (c = !0);
		c = a.xA(b, function(a) {
			return a.U
		}, function(a) {
			return a instanceof W
		}, !0, function(a) {
			return a instanceof W
		}, c);
		if (0 !== c.count)
			for (c = c.i; c.next();) {
				var d = c.value;
				d.Zl && d.Vb()
			}
	}
	oh.prototype.doDropOnto = function() {};
	oh.prototype.doMouseMove = function() {
		if (this.sa) {
			var a = this.g;
			null !== a && null !== this.tn && null !== this.$b && (this.mayCopy() ? (a.fc = "copy", Di(this, !1), Rh(this, this.ec), Ei(this, this.ec, !1), $h(this, this.ec)) : this.mayMove() ? (a.fc = "default", ci(this), Ei(this, this.$b, !0)) : this.mayDragOut() ? (a.fc = "no-drop", Di(this, !1), Ei(this, this.ec, !1)) : ci(this), Ji(this, a.R.da))
		}
	};
	oh.prototype.doMouseUp = function() {
		if (this.sa) {
			var a = this.g;
			if (null !== a) {
				var b = !1,
					c = this.mayCopy();
				c && null !== this.ec ? (ci(this), Di(this, !0), Rh(this, this.ec), Ei(this, this.ec, !1), $h(this, this.ec), null !== this.ec && a.nG(this.ec.Jj())) : (b = !0, ci(this), this.mayMove() && (Ei(this, this.$b, !0), Ji(this, a.R.da)));
				this.wr = !0;
				Pi(this, a.R.da);
				if (this.sa) {
					this.ec = null;
					if (b && null !== this.$b)
						for (b = this.$b.i; b.next();) {
							var d = b.key;
							d instanceof T && (d = d.Da, null === d || null === d.placeholder || this.$b.contains(d) || d.placeholder.H())
						}
					a.Fc();
					$h(this, this.$b);
					this.Lf = c ? "Copy" : "Move";
					a.Aa(c ? "SelectionCopied" : "SelectionMoved", a.selection)
				}
				this.stopTool()
			}
		}
	};
	oh.prototype.mayCopy = function() {
		if (!this.zF) return !1;
		var a = this.g;
		if (null === a || a.hb || a.Df || !a.Cp || !a.xk || (w.yh ? !a.R.alt : !a.R.control)) return !1;
		for (a = a.selection.i; a.next();) {
			var b = a.value;
			if (b.fe() && b.canCopy()) return !0
		}
		return null !== this.ld && this.rj && this.ld.canCopy() ? !0 : !1
	};
	oh.prototype.mayDragOut = function() {
		if (!this.zF) return !1;
		var a = this.g;
		if (null === a || !a.Jt || !a.xk || a.Kl) return !1;
		for (a = a.selection.i; a.next();) {
			var b = a.value;
			if (b.fe() && b.canCopy()) return !0
		}
		return null !== this.ld && this.rj && this.ld.canCopy() ? !0 : !1
	};
	oh.prototype.mayMove = function() {
		var a = this.g;
		if (null === a || a.hb || !a.Kl) return !1;
		for (a = a.selection.i; a.next();) {
			var b = a.value;
			if (b.fe() && b.canMove()) return !0
		}
		return null !== this.ld && this.rj && this.ld.canMove() ? !0 : !1
	};
	var ai = new H(oh),
		Sh = null,
		Th = null;
	oh.prototype.getDraggingSource = function() {
		return Sh
	};
	oh.prototype.mayDragIn = function() {
		var a = this.g;
		if (null === a || !a.xE || a.hb || a.Df || !a.Cp) return !1;
		var b = Sh;
		return null === b || null === b.g || b.g.$.Rl !== a.$.Rl ? !1 : !0
	};
	oh.prototype.doSimulatedDragEnter = function() {
		if (this.mayDragIn()) {
			var a = this.g;
			a.Ka.Gh();
			Ri(a);
			a.Ka.Gh();
			a = Sh;
			null !== a && null !== a.g && (a.g.fc = "copy")
		}
	};
	oh.prototype.doSimulatedDragLeave = function() {
		var a = Sh;
		null !== a && a.doSimulatedDragOut();
		this.doCancel()
	};
	oh.prototype.doSimulatedDragOver = function() {
		var a = this.g;
		if (null !== a) {
			var b = Sh;
			null !== b && null !== b.$b && this.mayDragIn() && (a.fc = "copy", Si(this, b.$b.Jj(), !1), Ei(this, this.ec, !1), Ji(this, a.R.da))
		}
	};
	oh.prototype.doSimulatedDrop = function() {
		var a = this.g;
		if (null !== a) {
			var b = Sh;
			if (null !== b) {
				var c = b.g;
				b.wr = !0;
				ci(this);
				this.mayDragIn() && (this.Hb("Drop"), Si(this, b.$b.Jj(), !0), Ei(this, this.ec, !1), null !== this.ec && a.nG(this.ec.Jj()), Pi(this, a.R.da), a.Fc(), b = a.selection, null !== this.ec ? this.Lf = "ExternalCopy" : b = new I(R), this.ec = null, a.doFocus(), a.Aa("ExternalObjectsDropped", b, c), this.Rk())
			}
		}
	};

	function Si(a, b, c) {
		if (null === a.ec) {
			var d = a.g;
			if (null !== d && !d.hb && !d.Df) {
				d.bb = !c;
				d.Kq = !c;
				a.Qk = d.R.da;
				c = d.Lp(b, d, !0);
				var e = w.Kf();
				Ci(b, e);
				var d = e.x + e.width / 2,
					f = e.y + e.height / 2;
				w.Eb(e);
				var e = a.Mw,
					h = new ma(R),
					k = w.K();
				for (b = b.i; b.next();) {
					var l = b.value,
						m = c.ka(l);
					l.fe() && l.canCopy() ? (l = l.location, k.m(e.x - (d - l.x), e.y - (f - l.y)), m.location = k, m.$e(), h.add(m, Wh(a, k))) : l instanceof W && l.canCopy() && (m.Nk(e.x - d, e.y - f), h.add(m, Wh(a)))
				}
				w.v(k);
				a.ec = h;
				Qh(a, h.Jj());
				null !== a.ld && (c = a.ld, d = c.Vn, c.Nk(a.Qk.x - (d.x + d.width /
					2), a.Qk.y - (d.y + d.height / 2)))
			}
		}
	}
	oh.prototype.doSimulatedDragOut = function() {
		var a = this.g;
		null !== a && (this.mayCopy() || this.mayMove() ? a.fc = "" : a.fc = "no-drop")
	};

	function Xh(a) {
		this.point = a;
		this.sG = dd
	}
	w.ga("DraggingInfo", Xh);

	function Fi(a, b, c) {
		this.Qc = a;
		this.info = b;
		this.jI = c
	}

	function Ti() {
		0 < arguments.length && w.nd(Ti);
		rg.call(this);
		this.KD = 100;
		this.mD = !1;
		var a = new W,
			b = new X;
		b.ef = !0;
		b.stroke = "blue";
		a.add(b);
		b = new X;
		b.Dq = "Standard";
		b.fill = "blue";
		b.stroke = "blue";
		a.add(b);
		a.ag = "Tool";
		this.dE = a;
		a = new T;
		b = new X;
		b.Vd = "";
		b.Db = "Rectangle";
		b.fill = null;
		b.stroke = "magenta";
		b.mb = 2;
		b.Ca = Ad;
		a.add(b);
		a.gm = !1;
		a.ag = "Tool";
		this.bE = a;
		this.cE = b;
		a = new T;
		b = new X;
		b.Vd = "";
		b.Db = "Rectangle";
		b.fill = null;
		b.stroke = "magenta";
		b.mb = 2;
		b.Ca = Ad;
		a.add(b);
		a.gm = !1;
		a.ag = "Tool";
		this.eE = a;
		this.fE = b;
		this.JD = this.HD =
			this.DD = this.CD = this.ED = null;
		this.iD = !0;
		this.fH = new ma(G, "boolean");
		this.LD = this.ul = this.ZD = null
	}
	w.La(Ti, rg);
	w.ga("LinkingBaseTool", Ti);
	Ti.prototype.doStop = function() {
		var a = this.g;
		null !== a && Yh(a);
		this.Tg = this.Sg = this.Rg = this.Qg = this.mc = null;
		this.zy.clear();
		this.Jf = null
	};
	w.defineProperty(Ti, {
		XF: "portGravity"
	}, function() {
		return this.KD
	}, function(a) {
		w.j(a, "number", Ti, "portGravity");
		0 <= a && (this.KD = a)
	});
	w.defineProperty(Ti, {
		dq: "isUnconnectedLinkValid"
	}, function() {
		return this.mD
	}, function(a) {
		w.j(a, "boolean", Ti, "isUnconnectedLinkValid");
		this.mD = a
	});
	w.defineProperty(Ti, {
		uf: "temporaryLink"
	}, function() {
		return this.dE
	}, function(a) {
		w.G(a, W, Ti, "temporaryLink");
		this.dE = a
	});
	w.defineProperty(Ti, {
		Wd: "temporaryFromNode"
	}, function() {
		return this.bE
	}, function(a) {
		w.G(a, T, Ti, "temporaryFromNode");
		this.bE = a
	});
	w.defineProperty(Ti, {
		Zn: "temporaryFromPort"
	}, function() {
		return this.cE
	}, function(a) {
		w.G(a, G, Ti, "temporaryFromPort");
		this.cE = a
	});
	w.defineProperty(Ti, {
		Xd: "temporaryToNode"
	}, function() {
		return this.eE
	}, function(a) {
		w.G(a, T, Ti, "temporaryToNode");
		this.eE = a
	});
	w.defineProperty(Ti, {
		$n: "temporaryToPort"
	}, function() {
		return this.fE
	}, function(a) {
		w.G(a, G, Ti, "temporaryToPort");
		this.fE = a
	});
	w.defineProperty(Ti, {
		mc: "originalLink"
	}, function() {
		return this.ED
	}, function(a) {
		null !== a && w.G(a, W, Ti, "originalLink");
		this.ED = a
	});
	w.defineProperty(Ti, {
		Qg: "originalFromNode"
	}, function() {
		return this.CD
	}, function(a) {
		null !== a && w.G(a, T, Ti, "originalFromNode");
		this.CD = a
	});
	w.defineProperty(Ti, {
		Rg: "originalFromPort"
	}, function() {
		return this.DD
	}, function(a) {
		null !== a && w.G(a, G, Ti, "originalFromPort");
		this.DD = a
	});
	w.defineProperty(Ti, {
		Sg: "originalToNode"
	}, function() {
		return this.HD
	}, function(a) {
		null !== a && w.G(a, T, Ti, "originalToNode");
		this.HD = a
	});
	w.defineProperty(Ti, {
		Tg: "originalToPort"
	}, function() {
		return this.JD
	}, function(a) {
		null !== a && w.G(a, G, Ti, "originalToPort");
		this.JD = a
	});
	w.defineProperty(Ti, {
		Sd: "isForwards"
	}, function() {
		return this.iD
	}, function(a) {
		w.j(a, "boolean", Ti, "isForwards");
		this.iD = a
	});
	w.u(Ti, {
		zy: "validPortsCache"
	}, function() {
		return this.fH
	});
	w.defineProperty(Ti, {
		Jf: "targetPort"
	}, function() {
		return this.ZD
	}, function(a) {
		null !== a && w.G(a, G, Ti, "targetPort");
		this.ZD = a
	});
	Ti.prototype.copyPortProperties = function(a, b, c, d, e) {
		if (null !== a && null !== b && null !== c && null !== d) {
			d.Ca = b.Y.size;
			e ? (d.Bb = b.Bb, d.nm = b.nm) : (d.Ab = b.Ab, d.Ul = b.Ul);
			c.Ff = Jb;
			var f = w.K();
			c.location = b.Wa(Jb, f);
			w.v(f);
			d.angle = b.Vl();
			null !== this.ey && this.ey(a, b, c, d, e)
		}
	};
	Ti.prototype.setNoTargetPortProperties = function(a, b, c) {
		null !== b && (b.Ca = Ad, b.Ab = yb, b.Bb = yb);
		null !== a && null !== this.g && (a.location = this.g.R.da);
		null !== this.ey && this.ey(null, null, a, b, c)
	};
	Ti.prototype.doMouseDown = function() {
		this.sa && this.doMouseMove()
	};
	Ti.prototype.doMouseMove = function() {
		if (this.sa) {
			var a = this.g;
			if (null !== a) {
				this.Jf = this.findTargetPort(this.Sd);
				if (null !== this.Jf && this.Jf.U instanceof T) {
					var b = this.Jf.U;
					this.Sd ? this.copyPortProperties(b, this.Jf, this.Xd, this.$n, !0) : this.copyPortProperties(b, this.Jf, this.Wd, this.Zn, !1)
				} else this.Sd ? this.setNoTargetPortProperties(this.Xd, this.$n, !0) : this.setNoTargetPortProperties(this.Wd, this.Zn, !1);
				(a.pe || a.qe) && a.tA(a.R.gf)
			}
		}
	};
	Ti.prototype.findValidLinkablePort = function(a, b) {
		if (null === a) return null;
		var c = a.U;
		if (!(c instanceof T)) return null;
		for (; null !== a;) {
			var d = b ? a.AG : a.fF;
			if (!0 === d && (null !== a.Vd || a instanceof T) && (b ? this.isValidTo(c, a) : this.isValidFrom(c, a))) return a;
			if (!1 === d) break;
			a = a.Q
		}
		return null
	};
	Ti.prototype.findTargetPort = function(a) {
		var b = this.g,
			c = b.R.da,
			d = this.XF;
		0 >= d && (d = .1);
		for (var e = this, f = b.vn(c, d, function(b) {
				return e.findValidLinkablePort(b, a)
			}, null, !0), d = Infinity, b = null, f = f.i; f.next();) {
			var h = f.value,
				k = h.U;
			if (k instanceof T) {
				var l = h.Wa(Jb, w.K()),
					m = c.x - l.x,
					n = c.y - l.y;
				w.v(l);
				l = m * m + n * n;
				l < d && (m = this.zy.ka(h), null !== m ? m && (b = h, d = l) : a && this.isValidLink(this.Qg, this.Rg, k, h) || !a && this.isValidLink(k, h, this.Sg, this.Tg) ? (this.zy.add(h, !0), b = h, d = l) : this.zy.add(h, !1))
			}
		}
		return null !== b && (c = b.U,
			c instanceof T && (null === c.layer || c.layer.Kt)) ? b : null
	};
	Ti.prototype.isValidFrom = function(a, b) {
		if (null === a || null === b) return this.dq;
		if (null !== this.g && this.g.$a === this && (null !== a.layer && !a.layer.Kt || !0 !== b.fF)) return !1;
		var c = b.AA;
		if (Infinity > c) {
			if (null !== this.mc && a === this.Qg && b === this.Rg) return !0;
			var d = b.Vd;
			null === d && (d = "");
			if (a.zx(d).count >= c) return !1
		}
		return !0
	};
	Ti.prototype.isValidTo = function(a, b) {
		if (null === a || null === b) return this.dq;
		if (null !== this.g && this.g.$a === this && (null !== a.layer && !a.layer.Kt || !0 !== b.AG)) return !1;
		var c = b.VJ;
		if (Infinity > c) {
			if (null !== this.mc && a === this.Sg && b === this.Tg) return !0;
			var d = b.Vd;
			null === d && (d = "");
			if (a.Mg(d).count >= c) return !1
		}
		return !0
	};
	Ti.prototype.isInSameNode = function(a, b) {
		if (null === a || null === b) return !1;
		if (a === b) return !0;
		var c = a.U,
			d = b.U;
		return null !== c && c === d
	};
	Ti.prototype.isLinked = function(a, b) {
		if (null === a || null === b) return !1;
		var c = a.U;
		if (!(c instanceof T)) return !1;
		var d = a.Vd;
		null === d && (d = "");
		var e = b.U;
		if (!(e instanceof T)) return !1;
		var f = b.Vd;
		null === f && (f = "");
		for (e = e.Mg(f); e.next();)
			if (f = e.value, f.W === c && f.Ng === d) return !0;
		return !1
	};
	Ti.prototype.isValidLink = function(a, b, c, d) {
		if (!this.isValidFrom(a, b) || !this.isValidTo(c, d) || !(null === b || null === d || (b.$H && d.UJ || !this.isInSameNode(b, d)) && (b.ZH && d.TJ || !this.isLinked(b, d))) || null !== this.mc && (null !== a && this.isLabelDependentOnLink(a, this.mc) || null !== c && this.isLabelDependentOnLink(c, this.mc)) || null !== a && null !== c && (null === a.data && null !== c.data || null !== a.data && null === c.data) || !this.isValidCycle(a, c, this.mc)) return !1;
		if (null !== a) {
			var e = a.Sx;
			if (null !== e && !e(a, b, c, d, this.mc)) return !1
		}
		if (null !==
			c && (e = c.Sx, null !== e && !e(a, b, c, d, this.mc))) return !1;
		e = this.Sx;
		return null !== e ? e(a, b, c, d, this.mc) : !0
	};
	Ti.prototype.isLabelDependentOnLink = function(a, b) {
		if (null === a) return !1;
		var c = a.Wb;
		if (null === c) return !1;
		if (c === b) return !0;
		var d = new I(T);
		d.add(a);
		return Ui(this, c, b, d)
	};

	function Ui(a, b, c, d) {
		if (b === c) return !0;
		var e = b.W;
		if (null !== e && e.Cf && (d.add(e), Ui(a, e.Wb, c, d))) return !0;
		b = b.Z;
		return null !== b && b.Cf && (d.add(b), Ui(a, b.Wb, c, d)) ? !0 : !1
	}
	Ti.prototype.isValidCycle = function(a, b, c) {
		void 0 === c && (c = null);
		if (null === a || null === b) return this.dq;
		var d = null !== this.g ? this.g.aK : Vi;
		if (d !== Vi) {
			if (d === Wi) {
				d = c || this.uf;
				if (null !== d && !d.bc) return !0;
				for (d = b.he; d.next();) {
					var e = d.value;
					if (e !== c && e.bc && e.Z === b) return !1
				}
				return !Xi(this, a, b, c, !0)
			}
			if (d === Yi) {
				d = c || this.uf;
				if (null !== d && !d.bc) return !0;
				for (d = a.he; d.next();)
					if (e = d.value, e !== c && e.bc && e.W === a) return !1;
				return !Xi(this, a, b, c, !0)
			}
			if (d === Zi) return a === b ? a = !0 : (d = new I(T), d.add(b), a = $i(this, d, a, b, c)), !a;
			if (d === aj) return !Xi(this, a, b, c, !1);
			if (d === bj) return a === b ? a = !0 : (d = new I(T), d.add(b), a = cj(this, d, a, b, c)), !a
		}
		return !0
	};

	function Xi(a, b, c, d, e) {
		if (b === c) return !0;
		if (null === b || null === c) return !1;
		for (var f = b.he; f.next();) {
			var h = f.value;
			if (h !== d && (!e || h.bc) && h.Z === b && (h = h.W, h !== b && Xi(a, h, c, d, e))) return !0
		}
		return !1
	}

	function $i(a, b, c, d, e) {
		if (c === d) return !0;
		if (null === c || null === d || b.contains(c)) return !1;
		b.add(c);
		for (var f = c.he; f.next();) {
			var h = f.value;
			if (h !== e && h.Z === c && (h = h.W, h !== c && $i(a, b, h, d, e))) return !0
		}
		return !1
	}

	function cj(a, b, c, d, e) {
		if (c === d) return !0;
		if (null === c || null === d || b.contains(c)) return !1;
		b.add(c);
		for (var f = c.he; f.next();) {
			var h = f.value;
			if (h !== e) {
				var k = h.W,
					h = h.Z,
					k = k === c ? h : k;
				if (k !== c && cj(a, b, k, d, e)) return !0
			}
		}
		return !1
	}
	w.defineProperty(Ti, {
		Sx: "linkValidation"
	}, function() {
		return this.ul
	}, function(a) {
		null !== a && w.j(a, "function", Ti, "linkValidation");
		this.ul = a
	});
	w.defineProperty(Ti, {
		ey: "portTargeted"
	}, function() {
		return this.LD
	}, function(a) {
		null !== a && w.j(a, "function", Ti, "portTargeted");
		this.LD = a
	});

	function dj() {
		0 < arguments.length && w.nd(dj);
		Ti.call(this);
		this.name = "Linking";
		this.jC = {};
		this.iC = null;
		this.ba = ej;
		this.UD = null
	}
	w.La(dj, Ti);
	w.ga("LinkingTool", dj);
	var ej;
	dj.Either = ej = w.p(dj, "Either", 0);
	var fj;
	dj.ForwardsOnly = fj = w.p(dj, "ForwardsOnly", 0);
	var gj;
	dj.BackwardsOnly = gj = w.p(dj, "BackwardsOnly", 0);
	w.defineProperty(dj, {
		BE: "archetypeLinkData"
	}, function() {
		return this.jC
	}, function(a) {
		null !== a && w.G(a, Object, dj, "archetypeLinkData");
		a instanceof G && w.G(a, W, dj, "archetypeLinkData");
		this.jC = a
	});
	w.defineProperty(dj, {
		AE: "archetypeLabelNodeData"
	}, function() {
		return this.iC
	}, function(a) {
		null !== a && w.G(a, Object, dj, "archetypeLabelNodeData");
		a instanceof G && w.G(a, T, dj, "archetypeLabelNodeData");
		this.iC = a
	});
	w.defineProperty(dj, {
		direction: "direction"
	}, function() {
		return this.ba
	}, function(a) {
		w.ob(a, dj, dj, "direction");
		this.ba = a
	});
	w.defineProperty(dj, {
		vG: "startObject"
	}, function() {
		return this.UD
	}, function(a) {
		null !== a && w.G(a, G, dj, "startObject");
		this.UD = a
	});
	dj.prototype.canStart = function() {
		if (!this.isEnabled) return !1;
		var a = this.g;
		if (null === a || a.hb || a.Df || !a.Kt) return !1;
		var b = a.$;
		return (b instanceof Q || b instanceof $f) && a.R.left && (a.$a === this || this.isBeyondDragSize()) ? null !== this.findLinkablePort() : !1
	};
	dj.prototype.findLinkablePort = function() {
		var a = this.g;
		if (null === a) return null;
		var b = this.vG;
		null === b && (b = a.Le(a.Ec.da, null, null));
		if (null === b || !(b.U instanceof T)) return null;
		a = this.direction;
		if (a === ej || a === fj) {
			var c = this.findValidLinkablePort(b, !1);
			if (null !== c) return this.Sd = !0, c
		}
		if (a === ej || a === gj)
			if (c = this.findValidLinkablePort(b, !0), null !== c) return this.Sd = !1, c;
		return null
	};
	dj.prototype.doActivate = function() {
		var a = this.g;
		if (null !== a) {
			var b = this.findLinkablePort();
			null !== b && (this.Hb(this.name), a.df = !0, a.fc = "pointer", this.Sd ? (null === this.Xd || this.Xd.location.I() || (this.Xd.location = a.R.da), this.Rg = b, b = this.Rg.U, b instanceof T && (this.Qg = b), this.copyPortProperties(this.Qg, this.Rg, this.Wd, this.Zn, !1)) : (null === this.Wd || this.Wd.location.I() || (this.Wd.location = a.R.da), this.Tg = b, b = this.Tg.U, b instanceof T && (this.Sg = b), this.copyPortProperties(this.Sg, this.Tg, this.Xd, this.$n, !0)),
				a.add(this.Wd), a.add(this.Xd), null !== this.uf && (null !== this.Wd && (this.uf.W = this.Wd), null !== this.Xd && (this.uf.Z = this.Xd), this.uf.bc = this.isNewTreeLink(), this.uf.Vb(), a.add(this.uf)), this.sa = !0)
		}
	};
	dj.prototype.doDeactivate = function() {
		this.sa = !1;
		var a = this.g;
		null !== a && (a.remove(this.uf), a.remove(this.Wd), a.remove(this.Xd), a.df = !1, a.fc = "", this.Rk())
	};
	dj.prototype.doStop = function() {
		Ti.prototype.doStop.call(this);
		this.vG = null
	};
	dj.prototype.doMouseUp = function() {
		if (this.sa) {
			var a = this.g;
			if (null === a) return;
			var b = this.Lf = null,
				c = null,
				d = null,
				e = null,
				f = this.Jf = this.findTargetPort(this.Sd);
			if (null !== f) {
				var h = f.U;
				h instanceof T && (this.Sd ? (null !== this.Qg && (b = this.Qg, c = this.Rg), d = h, e = f) : (b = h, c = f, null !== this.Sg && (d = this.Sg, e = this.Tg)))
			} else this.Sd ? null !== this.Qg && this.dq && (b = this.Qg, c = this.Rg) : null !== this.Sg && this.dq && (d = this.Sg, e = this.Tg);
			null !== b || null !== d ? (h = this.insertLink(b, c, d, e), null !== h ? (null === f && (this.Sd ? h.Np = a.R.da : h.Mp =
				a.R.da), a.Af && a.select(h), this.Lf = this.name, a.Aa("LinkDrawn", h)) : (a.$.GE(), this.doNoLink(b, c, d, e))) : this.Sd ? this.doNoLink(this.Qg, this.Rg, null, null) : this.doNoLink(null, null, this.Sg, this.Tg)
		}
		this.stopTool()
	};
	dj.prototype.isNewTreeLink = function() {
		var a = this.BE;
		if (null === a) return !0;
		if (a instanceof W) return a.bc;
		var b = this.g;
		if (null === b) return !0;
		a = b.fu(a);
		b = hj(b, a);
		return null !== b ? b.bc : !0
	};
	dj.prototype.insertLink = function(a, b, c, d) {
		var e = this.g;
		if (null === e) return null;
		var f = e.$;
		if (f instanceof $f) {
			var h = a;
			b = c;
			e.Ud || (h = c, b = a);
			if (null !== h && null !== b) return f.ri(b.data, f.qb(h.data)), b.wn()
		} else if (f instanceof Q)
			if (h = "", null !== a && (null === b && (b = a), h = b.Vd, null === h && (h = "")), b = "", null !== c && (null === d && (d = c), b = d.Vd, null === b && (b = "")), d = this.BE, d instanceof W) {
				if (mh(d), f = d.copy(), null !== f) return f.W = a, f.Ng = h, f.Z = c, f.Hh = b, e.add(f), a = this.AE, a instanceof T && (mh(a), a = a.copy(), null !== a && (a.Wb = f, e.add(a))),
					f
			} else if (null !== d && (d = f.mx(d), w.Pa(d))) return null !== a && f.wB(d, f.qb(a.data)), f.xB(d, h), null !== c && f.CB(d, f.qb(c.data)), f.DB(d, b), f.Ft(d), a = this.AE, null === a || a instanceof T || (a = f.copyNodeData(a), w.Pa(a) && (f.Il(a), a = f.qb(a), void 0 !== a && f.vE(d, a))), f = e.Xf(d);
		return null
	};
	dj.prototype.doNoLink = function() {};

	function Uh() {
		0 < arguments.length && w.nd(Uh);
		Ti.call(this);
		this.name = "Relinking";
		var a = new X;
		a.Db = "Diamond";
		a.Ca = Cd;
		a.fill = "lightblue";
		a.stroke = "dodgerblue";
		a.cursor = "pointer";
		a.Oe = 0;
		this.WC = a;
		a = new X;
		a.Db = "Diamond";
		a.Ca = Cd;
		a.fill = "lightblue";
		a.stroke = "dodgerblue";
		a.cursor = "pointer";
		a.Oe = -1;
		this.gE = a;
		this.hc = null;
		this.FD = new B
	}
	w.La(Uh, Ti);
	w.ga("RelinkingTool", Uh);
	Uh.prototype.updateAdornments = function(a) {
		if (null !== a && a instanceof W) {
			var b = "RelinkFrom",
				c = null;
			if (a.ib && null !== this.g && !this.g.hb) {
				var d = a.Uu;
				null !== d && a.canRelinkFrom() && a.Y.I() && a.isVisible() && d.Y.I() && d.Aj() && (c = a.Rp(b), null === c && (c = this.makeAdornment(d, !1), a.Hl(b, c)))
			}
			null === c && a.Ej(b);
			b = "RelinkTo";
			c = null;
			a.ib && null !== this.g && !this.g.hb && (d = a.Uu, null !== d && a.canRelinkTo() && a.Y.I() && a.isVisible() && d.Y.I() && d.Aj() && (c = a.Rp(b), null === c && (c = this.makeAdornment(d, !0), a.Hl(b, c))));
			null === c && a.Ej(b)
		}
	};
	Uh.prototype.makeAdornment = function(a, b) {
		var c = new kh;
		c.type = ij;
		var d = b ? this.SJ : this.YH;
		null !== d && c.add(d.copy());
		c.tb = a;
		return c
	};
	w.defineProperty(Uh, {
		YH: "fromHandleArchetype"
	}, function() {
		return this.WC
	}, function(a) {
		null !== a && w.G(a, G, Uh, "fromHandleArchetype");
		this.WC = a
	});
	w.defineProperty(Uh, {
		SJ: "toHandleArchetype"
	}, function() {
		return this.gE
	}, function(a) {
		null !== a && w.G(a, G, Uh, "toHandleArchetype");
		this.gE = a
	});
	w.u(Uh, {
		handle: "handle"
	}, function() {
		return this.hc
	});
	Uh.prototype.canStart = function() {
		if (!this.isEnabled) return !1;
		var a = this.g;
		if (null === a || a.hb || a.Df || !a.jn) return !1;
		var b = a.$;
		if (!(b instanceof Q || b instanceof $f) || !a.R.left) return !1;
		b = this.findToolHandleAt(a.Ec.da, "RelinkFrom");
		null === b && (b = this.findToolHandleAt(a.Ec.da, "RelinkTo"));
		return null !== b
	};
	Uh.prototype.doActivate = function() {
		var a = this.g;
		if (null !== a) {
			if (null === this.mc) {
				var b = this.findToolHandleAt(a.Ec.da, "RelinkFrom");
				null === b && (b = this.findToolHandleAt(a.Ec.da, "RelinkTo"));
				if (null === b) return;
				var c = b.U;
				if (!(c instanceof kh && c.zf instanceof W)) return;
				this.hc = b;
				this.Sd = null === c || "RelinkTo" === c.yd;
				this.mc = c.zf
			}
			this.Hb(this.name);
			a.df = !0;
			a.fc = "pointer";
			this.Rg = this.mc.lc;
			this.Qg = this.mc.W;
			this.Tg = this.mc.Ic;
			this.Sg = this.mc.Z;
			this.FD.set(this.mc.Y);
			null !== this.mc && 0 < this.mc.qa && (null === this.mc.W &&
				(null !== this.Zn && (this.Zn.Ca = rd), null !== this.Wd && (this.Wd.location = this.mc.l(0))), null === this.mc.Z && (null !== this.$n && (this.$n.Ca = rd), null !== this.Xd && (this.Xd.location = this.mc.l(this.mc.qa - 1))));
			this.copyPortProperties(this.Qg, this.Rg, this.Wd, this.Zn, !1);
			this.copyPortProperties(this.Sg, this.Tg, this.Xd, this.$n, !0);
			a.add(this.Wd);
			a.add(this.Xd);
			null !== this.uf && (null !== this.Wd && (this.uf.W = this.Wd), null !== this.Xd && (this.uf.Z = this.Xd), this.copyLinkProperties(this.mc, this.uf), this.uf.Vb(), a.add(this.uf));
			this.sa = !0
		}
	};
	Uh.prototype.copyLinkProperties = function(a, b) {
		if (null !== a && null !== b) {
			b.Ht = a.Ht;
			b.pA = a.pA;
			var c = a.Ze;
			if (c === jj || c === kj) c = lj;
			b.Ze = c;
			b.px = a.px;
			b.bc = a.bc;
			b.points = a.points;
			b.ny = a.ny;
			b.Aq = a.Aq;
			b.Ab = a.Ab;
			b.Ul = a.Ul;
			b.du = a.du;
			b.eu = a.eu;
			b.Bb = a.Bb;
			b.nm = a.nm;
			b.av = a.av;
			b.bv = a.bv
		}
	};
	Uh.prototype.doDeactivate = function() {
		this.sa = !1;
		var a = this.g;
		null !== a && (a.remove(this.uf), a.remove(this.Wd), a.remove(this.Xd), a.df = !1, a.fc = "", this.Rk())
	};
	Uh.prototype.doStop = function() {
		Ti.prototype.doStop.call(this);
		this.hc = null
	};
	Uh.prototype.doMouseUp = function() {
		if (this.sa) {
			var a = this.g;
			if (null === a) return;
			this.Lf = null;
			var b = this.Qg,
				c = this.Rg,
				d = this.Sg,
				e = this.Tg,
				f = this.mc;
			this.Jf = this.findTargetPort(this.Sd);
			if (null !== this.Jf) {
				var h = this.Jf.U;
				h instanceof T && (this.Sd ? (d = h, e = this.Jf) : (b = h, c = this.Jf))
			} else this.dq ? this.Sd ? e = d = null : c = b = null : f = null;
			null !== f ? (this.reconnectLink(f, this.Sd ? d : b, this.Sd ? e : c, this.Sd), null === this.Jf && (this.Sd ? f.Np = a.R.da : f.Mp = a.R.da, f.Vb()), a.Af && (f.ib = !0), this.Lf = this.name, a.Aa("LinkRelinked", f, this.Sd ?
				this.Tg : this.Rg)) : this.doNoRelink(this.mc, this.Sd);
			mj(this.mc, this.FD)
		}
		this.stopTool()
	};
	Uh.prototype.reconnectLink = function(a, b, c, d) {
		if (null === this.g) return !1;
		c = null !== c && null !== c.Vd ? c.Vd : "";
		d ? (a.Z = b, a.Hh = c) : (a.W = b, a.Ng = c);
		return !0
	};
	Uh.prototype.doNoRelink = function() {};

	function Oi(a, b, c, d, e) {
		null !== a.g && (null !== b ? (a.copyPortProperties(b, c, a.Wd, a.Zn, !1), a.g.add(a.Wd)) : a.g.remove(a.Wd), null !== d ? (a.copyPortProperties(d, e, a.Xd, a.$n, !0), a.g.add(a.Xd)) : a.g.remove(a.Xd))
	}

	function nj() {
		0 < arguments.length && w.nd(nj);
		rg.call(this);
		this.name = "LinkReshaping";
		var a = new X;
		a.Db = "Rectangle";
		a.Ca = Bd;
		a.fill = "lightblue";
		a.stroke = "dodgerblue";
		this.kl = a;
		a = new X;
		a.Db = "Diamond";
		a.Ca = Bd;
		a.fill = "lightblue";
		a.stroke = "dodgerblue";
		this.sD = a;
		this.MD = 3;
		this.Oy = this.hc = null;
		this.cp = new y;
		this.uw = null
	}
	w.La(nj, rg);
	w.ga("LinkReshapingTool", nj);
	var oj;
	nj.None = oj = w.p(nj, "None", 0);
	var pj;
	nj.Horizontal = pj = w.p(nj, "Horizontal", 1);
	var qj;
	nj.Vertical = qj = w.p(nj, "Vertical", 2);
	var Jj;
	nj.All = Jj = w.p(nj, "All", 3);
	nj.prototype.getReshapingBehavior = nj.prototype.kF = function(a) {
		return a && a.Jz ? a.Jz : oj
	};
	nj.prototype.setReshapingBehavior = nj.prototype.Wu = function(a, b) {
		w.G(a, G, nj, "setReshapingBehavior:obj");
		w.ob(b, nj, nj, "setReshapingBehavior:behavior");
		a.Jz = b
	};
	nj.prototype.updateAdornments = function(a) {
		if (null !== a && a instanceof W) {
			if (a.ib && null !== this.g && !this.g.hb) {
				var b = a.path;
				if (null !== b && a.canReshape() && a.Y.I() && a.isVisible() && b.Y.I() && b.Aj()) {
					var c = a.Rp(this.name);
					if (null === c || c.zD !== a.qa || c.oE !== a.Qu) c = this.makeAdornment(b), null !== c && (c.zD = a.qa, c.oE = a.Qu, a.Hl(this.name, c));
					if (null !== c) {
						c.location = a.position;
						return
					}
				}
			}
			a.Ej(this.name)
		}
	};
	nj.prototype.makeAdornment = function(a) {
		var b = a.U,
			c = b.qa,
			d = b.ac,
			e = null;
		if (null !== b.points && 1 < c) {
			e = new kh;
			e.type = ij;
			var c = b.Yt,
				f = b.Ox,
				h = d ? 1 : 0;
			if (b.Qu && b.Ze !== Kj)
				for (var k = c + h; k < f - h; k++) {
					var l = this.makeResegmentHandle(a, k);
					null !== l && (l.Oe = k, l.tB = .5, l.AA = 999, e.add(l))
				}
			for (k = c + 1; k < f; k++)
				if (l = this.makeHandle(a, k), null !== l) {
					l.Oe = k;
					if (k !== c)
						if (k === c + 1 && d) {
							var h = b.l(c),
								m = b.l(c + 1);
							J(h.x, m.x) && J(h.y, m.y) && (m = b.l(c - 1));
							J(h.x, m.x) ? (this.Wu(l, qj), l.cursor = "n-resize") : J(h.y, m.y) && (this.Wu(l, pj), l.cursor = "w-resize")
						} else k ===
							f - 1 && d ? (h = b.l(f - 1), m = b.l(f), J(h.x, m.x) && J(h.y, m.y) && (h = b.l(f + 1)), J(h.x, m.x) ? (this.Wu(l, qj), l.cursor = "n-resize") : J(h.y, m.y) && (this.Wu(l, pj), l.cursor = "w-resize")) : k !== f && (this.Wu(l, Jj), l.cursor = "move");
					e.add(l)
				}
			e.tb = a
		}
		return e
	};
	nj.prototype.makeHandle = function() {
		var a = this.iu;
		return null === a ? null : a.copy()
	};
	w.defineProperty(nj, {
		iu: "handleArchetype"
	}, function() {
		return this.kl
	}, function(a) {
		null !== a && w.G(a, G, nj, "handleArchetype");
		this.kl = a
	});
	nj.prototype.makeResegmentHandle = function() {
		var a = this.ZI;
		return null === a ? null : a.copy()
	};
	w.defineProperty(nj, {
		ZI: "midHandleArchetype"
	}, function() {
		return this.sD
	}, function(a) {
		null !== a && w.G(a, G, nj, "midHandleArchetype");
		this.sD = a
	});
	w.u(nj, {
		handle: "handle"
	}, function() {
		return this.hc
	});
	w.u(nj, {
		It: "adornedLink"
	}, function() {
		return this.Oy
	});
	nj.prototype.canStart = function() {
		if (!this.isEnabled) return !1;
		var a = this.g;
		return null !== a && !a.hb && a.bx && a.R.left ? null !== this.findToolHandleAt(a.Ec.da, this.name) : !1
	};
	nj.prototype.doActivate = function() {
		var a = this.g;
		if (null !== a && (this.hc = this.findToolHandleAt(a.Ec.da, this.name), null !== this.hc)) {
			var b = this.hc.U.zf;
			if (b instanceof W) {
				this.Oy = b;
				a.df = !0;
				this.Hb(this.name);
				if (b.Qu && 999 === this.hc.AA) {
					var c = b.points.copy(),
						d = this.hc.Wa(Jb);
					c.Rd(this.hc.Oe + 1, d);
					b.ac && c.Rd(this.hc.Oe + 1, d);
					b.points = c;
					b.ee();
					this.hc = this.findToolHandleAt(a.Ec.da, this.name);
					if (null === this.hc) {
						this.doDeactivate();
						return
					}
				}
				this.cp = b.l(this.hc.Oe);
				this.uw = b.points.copy();
				this.sa = !0
			}
		}
	};
	nj.prototype.doDeactivate = function() {
		this.Rk();
		this.Oy = this.hc = null;
		var a = this.g;
		null !== a && (a.df = !1);
		this.sa = !1
	};
	nj.prototype.doCancel = function() {
		var a = this.It;
		null !== a && (a.points = this.uw);
		this.stopTool()
	};
	nj.prototype.doMouseMove = function() {
		var a = this.g;
		this.sa && null !== a && (a = this.computeReshape(a.R.da), this.reshape(a))
	};
	nj.prototype.doMouseUp = function() {
		var a = this.g;
		if (this.sa && null !== a) {
			var b = this.computeReshape(a.R.da);
			this.reshape(b);
			b = this.It;
			if (null !== b && b.Qu) {
				var c = this.handle.Oe,
					d = b.l(c - 1),
					e = b.l(c),
					f = b.l(c + 1);
				if (b.ac) {
					if (c > b.Yt + 1 && c < b.Ox - 1) {
						var h = b.l(c - 2);
						if (Math.abs(d.x - e.x) < this.Eh && Math.abs(d.y - e.y) < this.Eh && (Lj(this, h, d, e, f, !0) || Lj(this, h, d, e, f, !1))) {
							var k = b.points.copy();
							Lj(this, h, d, e, f, !0) ? (k.kg(c - 2, new y(h.x, (f.y + h.y) / 2)), k.kg(c + 1, new y(f.x, (f.y + h.y) / 2))) : (k.kg(c - 2, new y((f.x + h.x) / 2, h.y)), k.kg(c + 1,
								new y((f.x + h.x) / 2, f.y)));
							k.dd(c);
							k.dd(c - 1);
							b.points = k;
							b.ee()
						} else h = b.l(c + 2), Math.abs(e.x - f.x) < this.Eh && Math.abs(e.y - f.y) < this.Eh && (Lj(this, d, e, f, h, !0) || Lj(this, d, e, f, h, !1)) && (k = b.points.copy(), Lj(this, d, e, f, h, !0) ? (k.kg(c - 1, new y(d.x, (d.y + h.y) / 2)), k.kg(c + 2, new y(h.x, (d.y + h.y) / 2))) : (k.kg(c - 1, new y((d.x + h.x) / 2, d.y)), k.kg(c + 2, new y((d.x + h.x) / 2, h.y))), k.dd(c + 1), k.dd(c), b.points = k, b.ee())
					}
				} else h = w.K(), La(d.x, d.y, f.x, f.y, e.x, e.y, h) && h.Bf(e) < this.Eh * this.Eh && (k = b.points.copy(), k.dd(c), b.points = k, b.ee()),
					w.v(h)
			}
			a.Fc();
			this.Lf = this.name;
			a.Aa("LinkReshaped", this.It, this.uw)
		}
		this.stopTool()
	};

	function Lj(a, b, c, d, e, f) {
		return f ? Math.abs(b.y - c.y) < a.Eh && Math.abs(c.y - d.y) < a.Eh && Math.abs(d.y - e.y) < a.Eh : Math.abs(b.x - c.x) < a.Eh && Math.abs(c.x - d.x) < a.Eh && Math.abs(d.x - e.x) < a.Eh
	}
	w.defineProperty(nj, {
		Eh: "resegmentingDistance"
	}, function() {
		return this.MD
	}, function(a) {
		w.j(a, "number", nj, "resegmentingDistance");
		this.MD = a
	});
	nj.prototype.reshape = function(a) {
		var b = this.It;
		b.jm();
		var c = this.handle.Oe,
			d = this.kF(this.handle);
		if (b.ac)
			if (c === b.Yt + 1) c = b.Yt + 1, d === qj ? (b.ca(c, b.l(c - 1).x, a.y), b.ca(c + 1, b.l(c + 2).x, a.y)) : d === pj && (b.ca(c, a.x, b.l(c - 1).y), b.ca(c + 1, a.x, b.l(c + 2).y));
			else if (c === b.Ox - 1) c = b.Ox - 1, d === qj ? (b.ca(c - 1, b.l(c - 2).x, a.y), b.ca(c, b.l(c + 1).x, a.y)) : d === pj && (b.ca(c - 1, a.x, b.l(c - 2).y), b.ca(c, a.x, b.l(c + 1).y));
		else {
			var d = c,
				e = b.l(d),
				f = b.l(d - 1),
				h = b.l(d + 1);
			J(f.x, e.x) && J(e.y, h.y) ? (J(f.x, b.l(d - 2).x) && !J(f.y, b.l(d - 2).y) ? (b.w(d, a.x,
				f.y), c++, d++) : b.ca(d - 1, a.x, f.y), J(h.y, b.l(d + 2).y) && !J(h.x, b.l(d + 2).x) ? b.w(d + 1, h.x, a.y) : b.ca(d + 1, h.x, a.y)) : J(f.y, e.y) && J(e.x, h.x) ? (J(f.y, b.l(d - 2).y) && !J(f.x, b.l(d - 2).x) ? (b.w(d, f.x, a.y), c++, d++) : b.ca(d - 1, f.x, a.y), J(h.x, b.l(d + 2).x) && !J(h.y, b.l(d + 2).y) ? b.w(d + 1, a.x, h.y) : b.ca(d + 1, a.x, h.y)) : J(f.x, e.x) && J(e.x, h.x) ? (J(f.x, b.l(d - 2).x) && !J(f.y, b.l(d - 2).y) ? (b.w(d, a.x, f.y), c++, d++) : b.ca(d - 1, a.x, f.y), J(h.x, b.l(d + 2).x) && !J(h.y, b.l(d + 2).y) ? b.w(d + 1, a.x, h.y) : b.ca(d + 1, a.x, h.y)) : J(f.y, e.y) && J(e.y, h.y) && (J(f.y, b.l(d -
				2).y) && !J(f.x, b.l(d - 2).x) ? (b.w(d, f.x, a.y), c++, d++) : b.ca(d - 1, f.x, a.y), J(h.y, b.l(d + 2).y) && !J(h.x, b.l(d + 2).x) ? b.w(d + 1, h.x, a.y) : b.ca(d + 1, h.x, a.y));
			b.ca(c, a.x, a.y)
		} else b.ca(c, a.x, a.y), e = b.W, f = b.lc, null !== e && (d = e.findVisibleNode(), null !== d && d !== e && (e = d, f = e.port)), 1 === c && b.computeSpot(!0, f).Td() && (d = f.Wa(Jb, w.K()), e = b.getLinkPointFromPoint(e, f, d, a, !0, w.K()), b.ca(0, e.x, e.y), w.v(d), w.v(e)), e = b.Z, f = b.Ic, null !== e && (d = e.findVisibleNode(), null !== d && d !== e && (e = d, f = e.port)), c === b.qa - 2 && b.computeSpot(!1, f).Td() &&
			(d = f.Wa(Jb, w.K()), e = b.getLinkPointFromPoint(e, f, d, a, !1, w.K()), b.ca(b.qa - 1, e.x, e.y), w.v(d), w.v(e));
		b.nj()
	};
	nj.prototype.computeReshape = function(a) {
		var b = this.It,
			c = this.handle.Oe;
		switch (this.kF(this.handle)) {
			case Jj:
				return a;
			case qj:
				return b = b.l(c), new y(b.x, a.y);
			case pj:
				return b = b.l(c), new y(a.x, b.y);
			default:
			case oj:
				return b.l(c)
		}
	};
	w.u(nj, {
		EL: "originalPoint"
	}, function() {
		return this.cp
	});
	w.u(nj, {
		FL: "originalPoints"
	}, function() {
		return this.uw
	});

	function Mj() {
		0 < arguments.length && w.nd(Mj);
		rg.call(this);
		this.name = "Resizing";
		this.Yh = (new ia(1, 1)).freeze();
		this.Xh = (new ia(9999, 9999)).freeze();
		this.Nj = (new ia(NaN, NaN)).freeze();
		this.Rr = !1;
		this.Jc = null;
		var a = new X;
		a.oh = Jb;
		a.Db = "Rectangle";
		a.Ca = Bd;
		a.fill = "lightblue";
		a.stroke = "dodgerblue";
		a.mb = 1;
		a.cursor = "pointer";
		this.kl = a;
		this.hc = null;
		this.cp = new y;
		this.BD = new ia;
		this.GD = new y;
		this.lz = new ia(0, 0);
		this.kz = new ia(Infinity, Infinity);
		this.jz = new ia(1, 1);
		this.yD = !0
	}
	w.La(Mj, rg);
	w.ga("ResizingTool", Mj);
	Mj.prototype.updateAdornments = function(a) {
		if (!(null === a || a instanceof W)) {
			if (a.ib && null !== this.g && !this.g.hb) {
				var b = a.gG;
				if (null !== b && a.canResize() && a.Y.I() && a.isVisible() && b.Y.I() && b.Aj()) {
					var c = a.Rp(this.name);
					if (null === c || c.tb !== b) c = this.makeAdornment(b);
					if (null !== c) {
						var d = b.Vl();
						c.angle = d;
						var e = b.Wa(c.Ff, w.K()),
							f = b.sj();
						c.location = e;
						w.v(e);
						e = c.placeholder;
						if (null !== e) {
							var b = b.Ja,
								h = w.mm();
							h.m(b.width * f, b.height * f);
							e.Ca = h;
							w.Hk(h)
						}
						this.updateResizeHandles(c, d);
						a.Hl(this.name, c);
						return
					}
				}
			}
			a.Ej(this.name)
		}
	};
	Mj.prototype.makeAdornment = function(a) {
		var b = null,
			b = a.U.fG;
		if (null === b) {
			b = new kh;
			b.type = Nj;
			b.Ff = Jb;
			var c = new Oj;
			c.ef = !0;
			b.add(c);
			b.add(this.makeHandle(a, zb));
			b.add(this.makeHandle(a, Gb));
			b.add(this.makeHandle(a, Sb));
			b.add(this.makeHandle(a, Qb));
			b.add(this.makeHandle(a, Gc));
			b.add(this.makeHandle(a, Ic));
			b.add(this.makeHandle(a, Jc));
			b.add(this.makeHandle(a, Hc))
		} else if (mh(b), b = b.copy(), null === b) return null;
		b.tb = a;
		return b
	};
	Mj.prototype.makeHandle = function(a, b) {
		var c = this.iu;
		if (null === c) return null;
		c = c.copy();
		c.alignment = b;
		return c
	};
	Mj.prototype.updateResizeHandles = function(a, b) {
		if (null !== a)
			if (!a.alignment.Zc() && ("pointer" === a.cursor || 0 < a.cursor.indexOf("resize"))) a: {
				var c = a.alignment;c.Td() && (c = Jb);
				var d = b;
				if (0 >= c.x) d = 0 >= c.y ? d + 225 : 1 <= c.y ? d + 135 : d + 180;
				else if (1 <= c.x) 0 >= c.y ? d += 315 : 1 <= c.y && (d += 45);
				else if (0 >= c.y) d += 270;
				else if (1 <= c.y) d += 90;
				else break a;0 > d ? d += 360 : 360 <= d && (d -= 360);a.cursor = 22.5 > d ? "e-resize" : 67.5 > d ? "se-resize" : 112.5 > d ? "s-resize" : 157.5 > d ? "sw-resize" : 202.5 > d ? "w-resize" : 247.5 > d ? "nw-resize" : 292.5 > d ? "n-resize" : 337.5 > d ?
					"ne-resize" : "e-resize"
			}
		else if (a instanceof C)
			for (c = a.elements; c.next();) this.updateResizeHandles(c.value, b)
	};
	w.defineProperty(Mj, {
		iu: "handleArchetype"
	}, function() {
		return this.kl
	}, function(a) {
		null !== a && w.G(a, G, Mj, "handleArchetype");
		this.kl = a
	});
	w.u(Mj, {
		handle: "handle"
	}, function() {
		return this.hc
	});
	w.defineProperty(Mj, {
		tb: "adornedObject"
	}, function() {
		return this.Jc
	}, function(a) {
		null !== a && w.G(a, G, Mj, "adornedObject");
		this.Jc = a
	});
	Mj.prototype.canStart = function() {
		if (!this.isEnabled) return !1;
		var a = this.g;
		return null !== a && !a.hb && a.Lt && a.R.left ? null !== this.findToolHandleAt(a.Ec.da, this.name) : !1
	};
	Mj.prototype.doActivate = function() {
		var a = this.g;
		null !== a && (this.hc = this.findToolHandleAt(a.Ec.da, this.name), null !== this.hc && (this.Jc = this.hc.U.tb, this.cp.set(this.tb.Wa(this.handle.alignment.VF())), this.GD.set(this.Jc.U.location), this.BD.set(this.Jc.Ca), this.jz = this.computeCellSize(), this.lz = this.computeMinSize(), this.kz = this.computeMaxSize(), a.df = !0, this.yD = a.Ka.isEnabled, a.Ka.isEnabled = !1, this.Hb(this.name), this.sa = !0))
	};
	Mj.prototype.doDeactivate = function() {
		var a = this.g;
		null !== a && (this.Rk(), this.Jc = this.hc = null, this.sa = a.df = !1, a.Ka.isEnabled = this.yD)
	};
	Mj.prototype.doCancel = function() {
		null !== this.tb && (this.tb.Ca = this.WF, this.tb.U.location = this.jJ);
		this.stopTool()
	};
	Mj.prototype.doMouseMove = function() {
		var a = this.g;
		if (this.sa && null !== a) {
			var b = this.lz,
				c = this.kz,
				d = this.jz,
				e = this.tb.iF(a.R.da, w.K()),
				f = this.computeReshape(),
				b = this.computeResize(e, this.handle.alignment, b, c, d, f);
			this.resize(b);
			a.cg();
			w.v(e)
		}
	};
	Mj.prototype.doMouseUp = function() {
		var a = this.g;
		if (this.sa && null !== a) {
			var b = this.lz,
				c = this.kz,
				d = this.jz,
				e = this.tb.iF(a.R.da, w.K()),
				f = this.computeReshape(),
				b = this.computeResize(e, this.handle.alignment, b, c, d, f);
			this.resize(b);
			w.v(e);
			a.Fc();
			this.Lf = this.name;
			a.Aa("PartResized", this.tb, this.WF)
		}
		this.stopTool()
	};
	Mj.prototype.resize = function(a) {
		var b = this.g;
		if (null !== b) {
			var c = this.tb,
				d = c.U;
			c.Ca = a.size;
			d.$e();
			a = this.tb.Wa(this.handle.alignment.VF());
			d instanceof V ? (c = new H(R), c.add(d), b.moveParts(c, this.cp.copy().Hj(a), !0)) : d.location = d.location.copy().Hj(a).add(this.cp)
		}
	};
	Mj.prototype.computeResize = function(a, b, c, d, e, f) {
		b.Td() && (b = Jb);
		var h = this.tb.Ja,
			k = h.x,
			l = h.y,
			m = h.x + h.width,
			n = h.y + h.height,
			p = 1;
		if (!f) {
			var p = h.width,
				q = h.height;
			0 >= p && (p = 1);
			0 >= q && (q = 1);
			p = q / p
		}
		q = w.K();
		Na(a.x, a.y, k, l, e.width, e.height, q);
		a = h.copy();
		0 >= b.x ? 0 >= b.y ? (a.x = Math.max(q.x, m - d.width), a.x = Math.min(a.x, m - c.width), a.width = Math.max(m - a.x, c.width), a.y = Math.max(q.y, n - d.height), a.y = Math.min(a.y, n - c.height), a.height = Math.max(n - a.y, c.height), f || (b = a.height / a.width, p < b ? (a.height = p * a.width, a.y = n - a.height) : (a.width =
			a.height / p, a.x = m - a.width))) : 1 <= b.y ? (a.x = Math.max(q.x, m - d.width), a.x = Math.min(a.x, m - c.width), a.width = Math.max(m - a.x, c.width), a.height = Math.max(Math.min(q.y - l, d.height), c.height), f || (b = a.height / a.width, p < b ? a.height = p * a.width : (a.width = a.height / p, a.x = m - a.width))) : (a.x = Math.max(q.x, m - d.width), a.x = Math.min(a.x, m - c.width), a.width = m - a.x, f || (a.height = p * a.width, a.y = l + .5 * (n - l - a.height))) : 1 <= b.x ? 0 >= b.y ? (a.width = Math.max(Math.min(q.x - k, d.width), c.width), a.y = Math.max(q.y, n - d.height), a.y = Math.min(a.y, n - c.height),
			a.height = Math.max(n - a.y, c.height), f || (b = a.height / a.width, p < b ? (a.height = p * a.width, a.y = n - a.height) : a.width = a.height / p)) : 1 <= b.y ? (a.width = Math.max(Math.min(q.x - k, d.width), c.width), a.height = Math.max(Math.min(q.y - l, d.height), c.height), f || (b = a.height / a.width, p < b ? a.height = p * a.width : a.width = a.height / p)) : (a.width = Math.max(Math.min(q.x - k, d.width), c.width), f || (a.height = p * a.width, a.y = l + .5 * (n - l - a.height))) : 0 >= b.y ? (a.y = Math.max(q.y, n - d.height), a.y = Math.min(a.y, n - c.height), a.height = n - a.y, f || (a.width = a.height / p, a.x =
			k + .5 * (m - k - a.width))) : 1 <= b.y && (a.height = Math.max(Math.min(q.y - l, d.height), c.height), f || (a.width = a.height / p, a.x = k + .5 * (m - k - a.width)));
		w.v(q);
		return a
	};
	Mj.prototype.computeReshape = function() {
		var a = Pj;
		this.tb instanceof X && (a = Qj(this.tb));
		return !(a === Rj || a === Sj || null !== this.g && this.g.R.shift)
	};
	Mj.prototype.computeMinSize = function() {
		var a = this.tb.qi.copy(),
			b = this.qi;
		!isNaN(b.width) && b.width > a.width && (a.width = b.width);
		!isNaN(b.height) && b.height > a.height && (a.height = b.height);
		return a
	};
	Mj.prototype.computeMaxSize = function() {
		var a = this.tb.Gf.copy(),
			b = this.Gf;
		!isNaN(b.width) && b.width < a.width && (a.width = b.width);
		!isNaN(b.height) && b.height < a.height && (a.height = b.height);
		return a
	};
	Mj.prototype.computeCellSize = function() {
		var a = new ia(NaN, NaN),
			b = this.tb.U;
		if (null !== b) {
			var c = b.uJ;
			!isNaN(c.width) && 0 < c.width && (a.width = c.width);
			!isNaN(c.height) && 0 < c.height && (a.height = c.height)
		}
		c = this.Fp;
		isNaN(a.width) && !isNaN(c.width) && 0 < c.width && (a.width = c.width);
		isNaN(a.height) && !isNaN(c.height) && 0 < c.height && (a.height = c.height);
		b = this.g;
		(isNaN(a.width) || isNaN(a.height)) && b && (c = b.eb.ue, null !== c && c.qu && (c = c.qF, isNaN(a.width) && !isNaN(c.width) && 0 < c.width && (a.width = c.width), isNaN(a.height) && !isNaN(c.height) &&
			0 < c.height && (a.height = c.height)), b = b.Bn, null !== b && b.visible && this.qu && (c = b.Ex, isNaN(a.width) && !isNaN(c.width) && 0 < c.width && (a.width = c.width), isNaN(a.height) && !isNaN(c.height) && 0 < c.height && (a.height = c.height)));
		if (isNaN(a.width) || 0 === a.width || Infinity === a.width) a.width = 1;
		if (isNaN(a.height) || 0 === a.height || Infinity === a.height) a.height = 1;
		return a
	};
	w.defineProperty(Mj, {
		qi: "minSize"
	}, function() {
		return this.Yh
	}, function(a) {
		w.G(a, ia, Mj, "minSize");
		if (!this.Yh.L(a)) {
			var b = a.width;
			isNaN(b) && (b = 0);
			a = a.height;
			isNaN(a) && (a = 0);
			this.Yh.m(b, a)
		}
	});
	w.defineProperty(Mj, {
		Gf: "maxSize"
	}, function() {
		return this.Xh
	}, function(a) {
		w.G(a, ia, Mj, "maxSize");
		if (!this.Xh.L(a)) {
			var b = a.width;
			isNaN(b) && (b = Infinity);
			a = a.height;
			isNaN(a) && (a = Infinity);
			this.Xh.m(b, a)
		}
	});
	w.defineProperty(Mj, {
		Fp: "cellSize"
	}, function() {
		return this.Nj
	}, function(a) {
		w.G(a, ia, Mj, "cellSize");
		this.Nj.L(a) || this.Nj.assign(a)
	});
	w.defineProperty(Mj, {
		qu: "isGridSnapEnabled"
	}, function() {
		return this.Rr
	}, function(a) {
		w.j(a, "boolean", Mj, "isGridSnapEnabled");
		this.Rr = a
	});
	w.u(Mj, {
		WF: "originalDesiredSize"
	}, function() {
		return this.BD
	});
	w.u(Mj, {
		jJ: "originalLocation"
	}, function() {
		return this.GD
	});

	function Tj() {
		0 < arguments.length && w.nd(Tj);
		rg.call(this);
		this.name = "Rotating";
		this.SD = 45;
		this.RD = 2;
		this.Jc = null;
		var a = new X;
		a.Db = "Ellipse";
		a.Ca = Cd;
		a.fill = "lightblue";
		a.stroke = "dodgerblue";
		a.mb = 1;
		a.cursor = "pointer";
		this.kl = a;
		this.hc = null;
		this.tw = 0;
		this.ND = new y
	}
	w.La(Tj, rg);
	w.ga("RotatingTool", Tj);
	Tj.prototype.updateAdornments = function(a) {
		if (null !== a) {
			if (a instanceof W) {
				var b = a.qB;
				if (b === a || b === a.path || b.ef) return
			}
			if (a.ib && null !== this.g && !this.g.hb && (b = a.qB, null !== b && a.canRotate() && a.Y.I() && a.isVisible() && b.Y.I() && b.Aj())) {
				var c = a.Rp(this.name);
				if (null === c || c.tb !== b) c = this.makeAdornment(b);
				if (null !== c) {
					c.angle = b.Vl();
					var d = null,
						e = null;
					b === a || b === a.bg ? (d = a.bg, e = a.Ff) : (d = b, e = Jb);
					for (var f = d.Ja, e = w.xb(f.width * e.x + e.offsetX, f.height * e.y + e.offsetY); null !== d && d !== b;) d.transform.nb(e), d = d.Q;
					var d =
						e.y,
						f = Math.max(e.x - b.Ja.width, 0),
						h = w.K();
					c.location = b.Wa(new K(1, 0, 50 + f, d), h);
					w.v(h);
					w.v(e);
					a.Hl(this.name, c);
					return
				}
			}
			a.Ej(this.name)
		}
	};
	Tj.prototype.makeAdornment = function(a) {
		var b = null,
			b = a.U.xJ;
		if (null === b) {
			b = new kh;
			b.type = Uj;
			b.Ff = Jb;
			var c = this.iu;
			null !== c && b.add(c.copy())
		} else if (mh(b), b = b.copy(), null === b) return null;
		b.tb = a;
		return b
	};
	w.defineProperty(Tj, {
		iu: "handleArchetype"
	}, function() {
		return this.kl
	}, function(a) {
		null !== a && w.G(a, G, Tj, "handleArchetype");
		this.kl = a
	});
	w.u(Tj, {
		handle: "handle"
	}, function() {
		return this.hc
	});
	w.defineProperty(Tj, {
		tb: "adornedObject"
	}, function() {
		return this.Jc
	}, function(a) {
		null !== a && w.G(a, G, Tj, "adornedObject");
		this.Jc = a
	});
	Tj.prototype.canStart = function() {
		if (!this.isEnabled) return !1;
		var a = this.g;
		return null !== a && !a.hb && a.ex && a.R.left ? null !== this.findToolHandleAt(a.Ec.da, this.name) : !1
	};
	Tj.prototype.doActivate = function() {
		var a = this.g;
		if (null !== a && (this.hc = this.findToolHandleAt(a.Ec.da, this.name), null !== this.hc)) {
			this.Jc = this.hc.U.tb;
			var b = this.Jc.U,
				c = b.bg;
			this.ND = this.Jc === b || this.Jc === c ? c.Wa(b.Ff) : this.Jc.Wa(Jb);
			this.tw = this.Jc.angle;
			a.df = !0;
			a.rA = !0;
			this.Hb(this.name);
			this.sa = !0
		}
	};
	Tj.prototype.doDeactivate = function() {
		var a = this.g;
		null !== a && (this.Rk(), this.Jc = this.hc = null, this.sa = a.df = !1)
	};
	Tj.prototype.doCancel = function() {
		var a = this.g;
		null !== a && (a.rA = !1);
		this.rotate(this.tw);
		this.stopTool()
	};
	Tj.prototype.doMouseMove = function() {
		var a = this.g;
		this.sa && null !== a && (a = this.computeRotate(a.R.da), this.rotate(a))
	};
	Tj.prototype.doMouseUp = function() {
		var a = this.g;
		if (this.sa && null !== a) {
			a.rA = !1;
			var b = this.computeRotate(a.R.da);
			this.rotate(b);
			a.Fc();
			this.Lf = this.name;
			a.Aa("PartRotated", this.Jc, this.tw)
		}
		this.stopTool()
	};
	Tj.prototype.rotate = function(a) {
		null !== this.Jc && (this.Jc.angle = a)
	};
	Tj.prototype.computeRotate = function(a) {
		a = this.ND.Pb(a);
		var b = this.Jc.Q;
		null !== b && (a -= b.Vl(), 360 <= a ? a -= 360 : 0 > a && (a += 360));
		var b = Math.min(Math.abs(this.LJ), 180),
			c = Math.min(Math.abs(this.KJ), b / 2);
		(null === this.g || !this.g.R.shift) && 0 < b && 0 < c && (a % b < c ? a = Math.floor(a / b) * b : a % b > b - c && (a = (Math.floor(a / b) + 1) * b));
		360 <= a ? a -= 360 : 0 > a && (a += 360);
		return a
	};
	w.defineProperty(Tj, {
		LJ: "snapAngleMultiple"
	}, function() {
		return this.SD
	}, function(a) {
		w.j(a, "number", Tj, "snapAngleMultiple");
		this.SD = a
	});
	w.defineProperty(Tj, {
		KJ: "snapAngleEpsilon"
	}, function() {
		return this.RD
	}, function(a) {
		w.j(a, "number", Tj, "snapAngleEpsilon");
		this.RD = a
	});
	w.u(Tj, {
		DL: "originalAngle"
	}, function() {
		return this.tw
	});

	function Vj() {
		rg.call(this);
		0 < arguments.length && w.nd(Vj);
		this.name = "ClickSelecting"
	}
	w.La(Vj, rg);
	w.ga("ClickSelectingTool", Vj);
	Vj.prototype.canStart = function() {
		return !this.isEnabled || null === this.g || this.isBeyondDragSize() ? !1 : !0
	};
	Vj.prototype.doMouseUp = function() {
		this.sa && (this.standardMouseSelect(), !this.standardMouseClick() && null !== this.g && this.g.R.yj && this.g.eb.doToolTip());
		this.stopTool()
	};

	function Wj() {
		rg.call(this);
		0 < arguments.length && w.nd(Wj);
		this.name = "Action";
		this.ho = null
	}
	w.La(Wj, rg);
	w.ga("ActionTool", Wj);
	Wj.prototype.canStart = function() {
		if (!this.isEnabled) return !1;
		var a = this.g;
		if (null === a) return !1;
		var b = a.R,
			c = a.Le(b.da, function(a) {
				for (; null !== a.Q && !a.Fx;) a = a.Q;
				return a
			});
		if (null !== c) {
			if (!c.Fx) return !1;
			this.ho = c;
			a.to = a.Le(b.da, null, null);
			return !0
		}
		return !1
	};
	Wj.prototype.doMouseDown = function() {
		if (this.sa) {
			var a = this.g.R,
				b = this.ho;
			null !== b && (a.Ae = b, null !== b.rE && b.rE(a, b))
		} else this.canStart() && this.doActivate()
	};
	Wj.prototype.doMouseMove = function() {
		if (this.sa) {
			var a = this.g.R,
				b = this.ho;
			null !== b && (a.Ae = b, null !== b.sE && b.sE(a, b))
		}
	};
	Wj.prototype.doMouseUp = function() {
		if (this.sa) {
			var a = this.g,
				b = a.R,
				c = this.ho;
			if (null === c) return;
			b.Ae = c;
			null !== c.tE && c.tE(b, c);
			this.isBeyondDragSize() || Nh(c, b, a)
		}
		this.stopTool()
	};
	Wj.prototype.doCancel = function() {
		var a = this.g;
		if (null !== a) {
			var a = a.R,
				b = this.ho;
			if (null === b) return;
			a.Ae = b;
			null !== b.qE && b.qE(a, b)
		}
		this.stopTool()
	};
	Wj.prototype.doStop = function() {
		this.ho = null
	};

	function Xj() {
		rg.call(this);
		0 < arguments.length && w.nd(Xj);
		this.name = "ClickCreating";
		this.um = null;
		this.gD = !0;
		this.VC = new y(0, 0)
	}
	w.La(Xj, rg);
	w.ga("ClickCreatingTool", Xj);
	Xj.prototype.canStart = function() {
		if (!this.isEnabled || null === this.eA) return !1;
		var a = this.g;
		if (null === a || a.hb || a.Df || !a.Cp || !a.R.left || this.isBeyondDragSize()) return !1;
		if (this.xI) {
			if (1 === a.R.re && (this.VC = a.R.gf.copy()), 2 !== a.R.re || this.isBeyondDragSize(this.VC)) return !1
		} else if (1 !== a.R.re) return !1;
		return a.$a !== this && null !== a.Xt(a.R.da, !0) ? !1 : !0
	};
	Xj.prototype.doMouseUp = function() {
		var a = this.g;
		this.sa && null !== a && this.insertPart(a.R.da);
		this.stopTool()
	};
	Xj.prototype.insertPart = function(a) {
		var b = this.g;
		if (null === b) return null;
		var c = this.eA;
		if (null === c) return null;
		this.Hb(this.name);
		var d = null;
		c instanceof R ? c.fe() && (mh(c), d = c.copy(), null !== d && b.add(d)) : null !== c && (c = b.$.copyNodeData(c), w.Pa(c) && (b.$.Il(c), d = b.vh(c)));
		null !== d && (d.location = a, b.Af && b.select(d));
		b.Fc();
		this.Lf = this.name;
		b.Aa("PartCreated", d);
		this.Rk();
		return d
	};
	w.defineProperty(Xj, {
		eA: "archetypeNodeData"
	}, function() {
		return this.um
	}, function(a) {
		null !== a && w.G(a, Object, Xj, "archetypeNodeData");
		this.um = a
	});
	w.defineProperty(Xj, {
		xI: "isDoubleClick"
	}, function() {
		return this.gD
	}, function(a) {
		w.j(a, "boolean", Xj, "isDoubleClick");
		this.gD = a
	});

	function Yj() {
		this.lE = this.qD = this.sz = this.Pz = null
	}
	w.ga("HTMLInfo", Yj);
	w.defineProperty(Yj, {
		XA: "mainElement"
	}, function() {
		return this.qD
	}, function(a) {
		null !== a && w.G(a, HTMLElement, Yj, "mainElement");
		this.qD = a
	});
	w.defineProperty(Yj, {
		show: "show"
	}, function() {
		return this.Pz
	}, function(a) {
		this.Pz !== a && (null !== a && w.j(a, "function", Yj, "show"), this.Pz = a)
	});
	w.defineProperty(Yj, {
		Cn: "hide"
	}, function() {
		return this.sz
	}, function(a) {
		this.sz !== a && (null !== a && w.j(a, "function", Yj, "hide"), this.sz = a)
	});
	w.defineProperty(Yj, {
		SB: "valueFunction"
	}, function() {
		return this.lE
	}, function(a) {
		this.lE = a
	});

	function Zj(a, b, c) {
		this.text = a;
		this.IE = b;
		this.visible = c
	}

	function ak() {
		rg.call(this);
		0 < arguments.length && w.nd(ak);
		this.name = "ContextMenu";
		this.AC = this.Wy = this.xC = null;
		this.wD = new y;
		this.Yy = this.Am = null;
		var a = this;
		this.Wz = function() {
			a.stopTool()
		};
		bk(this)
	}
	w.La(ak, rg);
	w.ga("ContextMenuTool", ak);

	function bk(a) {
		var b = new Yj;
		b.show = function(a, b, c) {
			c.showDefaultContextMenu()
		};
		b.Cn = function(a, b) {
			b.hideDefaultContextMenu()
		};
		a.Am = b;
		a.Wz = function() {
			a.stopTool()
		};
		if (!1 === w.OE) {
			var b = w.createElement("div"),
				c = w.createElement("div");
			b.style.cssText = "top: 0px;z-index:10002;position: fixed;display: none;text-align: center;left: 25%;width: 50%;background-color: #F5F5F5;padding: 16px;border: 16px solid #444;border-radius: 10px;margin-top: 10px";
			c.style.cssText = "z-index:10001;position: fixed;display: none;top: 0;left: 0;width: 100%;height: 100%;background-color: black;opacity: 0.8;";
			var d = w.createElement("style");
			window.document.getElementsByTagName("head")[0].appendChild(d);
			d.sheet.insertRule(".goCXul { list-style: none; }", 0);
			d.sheet.insertRule(".goCXli {font:700 1.5em Helvetica, Arial, sans-serif;position: relative;min-width: 60px; }", 0);
			d.sheet.insertRule(".goCXa {color: #444;display: inline-block;padding: 4px;text-decoration: none;margin: 2px;border: 1px solid gray;border-radius: 10px; }", 0);
			b.addEventListener("contextmenu", ck, !1);
			b.addEventListener("selectstart", ck, !1);
			c.addEventListener("contextmenu", ck, !1);
			window.document.body && (window.document.body.appendChild(b), window.document.body.appendChild(c));
			w.Ot = b;
			w.Nt = c;
			w.OE = !0
		}
	}

	function ck(a) {
		a.preventDefault();
		return !1
	}
	ak.prototype.canStart = function() {
		if (!this.isEnabled) return !1;
		var a = this.g;
		return null === a || this.isBeyondDragSize() || !a.R.right ? !1 : null !== this.Am && a.R.yj || null !== this.findObjectWithContextMenu() ? !0 : !1
	};
	ak.prototype.doStart = function() {
		var a = this.g;
		null !== a && this.wD.set(a.Ec.da)
	};
	ak.prototype.doStop = function() {
		this.hideContextMenu();
		this.ox = null
	};
	ak.prototype.findObjectWithContextMenu = function(a) {
		void 0 === a && (a = null);
		var b = this.g;
		if (null === b) return null;
		var c = b.R,
			d = null;
		a instanceof D || (d = a instanceof G ? a : b.Le(c.da, null, function(a) {
			return !a.layer.Pc
		}));
		if (null !== d) {
			for (a = d; null !== a;) {
				if (null !== a.contextMenu) return a;
				a = a.Q
			}
			if (null !== this.Am && b.R.yj) return d.U
		} else if (null !== b.contextMenu) return b;
		return null
	};
	ak.prototype.doActivate = function() {};
	ak.prototype.doMouseDown = function() {
		rg.prototype.doMouseDown.call(this);
		null !== this.g && this.g.eb.ff.contains(this) && dk(this)
	};
	ak.prototype.doMouseUp = function() {
		dk(this)
	};

	function dk(a) {
		var b = a.g;
		if (null !== b)
			if (a.sa) {
				var c = a.Pl;
				if (null !== c) {
					if (!(c instanceof Yj)) {
						var d = b.Le(b.R.da, null, null);
						null !== d && d.am(c) && a.standardMouseClick(null, null)
					}
					a.stopTool();
					a.canStart() && (b.$a = a, a.doMouseUp())
				}
			} else a.canStart() && (Mh(a, !0), a.sa || a.stopTool())
	}

	function Mh(a, b, c) {
		void 0 === c && (c = null);
		b && a.standardMouseSelect();
		if (!a.standardMouseClick())
			if (a.sa = !0, b = a.Am, null === c && (c = a.findObjectWithContextMenu()), null !== c) {
				var d = c.contextMenu;
				null !== d ? (a.ox = c instanceof G ? c : null, a.showContextMenu(d, a.ox)) : null !== b && a.showContextMenu(b, a.ox)
			} else null !== b && a.showContextMenu(b, null)
	}
	ak.prototype.doMouseMove = function() {
		this.sa && null !== this.g && this.g.eb.doMouseMove()
	};
	ak.prototype.showContextMenu = function(a, b) {
		null !== b && w.G(b, G, ak, "showContextMenu:obj");
		var c = this.g;
		if (null !== c) {
			a !== this.Pl && this.hideContextMenu();
			if (a instanceof kh) {
				a.ag = "Tool";
				a.gm = !1;
				a.scale = 1 / c.scale;
				a.yd = this.name;
				null !== a.placeholder && (a.placeholder.scale = c.scale);
				c.add(a);
				if (null !== b) {
					var c = null,
						d = b.Tl();
					null !== d && (c = d.data);
					a.tb = b;
					a.data = c
				} else a.data = c.$;
				a.$e();
				this.positionContextMenu(a, b)
			} else a instanceof Yj && a.show(b, c, this);
			this.Pl = a
		}
	};
	ak.prototype.positionContextMenu = function(a) {
		if (null === a.placeholder) {
			var b = this.g;
			if (null !== b) {
				var c = b.R.da.copy(),
					d = a.za,
					e = b.rb;
				b.R.yj && (c.x -= d.width);
				c.x + d.width > e.right && (c.x -= d.width + 5);
				c.x < e.x && (c.x = e.x);
				c.y + d.height > e.bottom && (c.y -= d.height + 5);
				c.y < e.y && (c.y = e.y);
				a.position = c
			}
		}
	};
	ak.prototype.hideContextMenu = function() {
		var a = this.g;
		if (null !== a) {
			var b = this.Pl;
			null !== b && (b instanceof kh ? (a.remove(b), null !== this.Wy && this.Wy.Ej(b.yd), b.data = null, b.tb = null) : b instanceof Yj && (null !== b.Cn ? b.Cn(a, this) : null !== b.XA && (b.XA.style.display = "none")), this.Pl = null, this.standardMouseOver())
		}
	};

	function ek(a) {
		if (null === a.g) return null;
		a = new H(Zj);
		a.add(new Zj("Copy", function(a) {
			a.pb.copySelection()
		}, function(a) {
			return a.pb.canCopySelection()
		}));
		a.add(new Zj("Cut", function(a) {
			a.pb.cutSelection()
		}, function(a) {
			return a.pb.canCutSelection()
		}));
		a.add(new Zj("Delete", function(a) {
			a.pb.deleteSelection()
		}, function(a) {
			return a.pb.canDeleteSelection()
		}));
		a.add(new Zj("Paste", function(a) {
			a.pb.pasteSelection(a.R.da)
		}, function(a) {
			return a.pb.canPasteSelection()
		}));
		a.add(new Zj("Select All", function(a) {
				a.pb.selectAll()
			},
			function(a) {
				return a.pb.canSelectAll()
			}));
		a.add(new Zj("Undo", function(a) {
			a.pb.undo()
		}, function(a) {
			return a.pb.canUndo()
		}));
		a.add(new Zj("Redo", function(a) {
			a.pb.redo()
		}, function(a) {
			return a.pb.canRedo()
		}));
		a.add(new Zj("Scroll To Part", function(a) {
			a.pb.scrollToPart()
		}, function(a) {
			return a.pb.canScrollToPart()
		}));
		a.add(new Zj("Zoom To Fit", function(a) {
			a.pb.zoomToFit()
		}, function(a) {
			return a.pb.canZoomToFit()
		}));
		a.add(new Zj("Reset Zoom", function(a) {
			a.pb.resetZoom()
		}, function(a) {
			return a.pb.canResetZoom()
		}));
		a.add(new Zj("Group Selection", function(a) {
			a.pb.groupSelection()
		}, function(a) {
			return a.pb.canGroupSelection()
		}));
		a.add(new Zj("Ungroup Selection", function(a) {
			a.pb.ungroupSelection()
		}, function(a) {
			return a.pb.canUngroupSelection()
		}));
		a.add(new Zj("Edit Text", function(a) {
			a.pb.editTextBlock()
		}, function(a) {
			return a.pb.canEditTextBlock()
		}));
		return a
	}
	ak.prototype.showDefaultContextMenu = function() {
		var a = this.g;
		if (null !== a) {
			null === this.Yy && (this.Yy = ek(this));
			w.Ot.innerHTML = "";
			w.Nt.addEventListener("click", this.Wz, !1);
			var b = this,
				c = w.createElement("ul");
			c.className = "goCXul";
			w.Ot.appendChild(c);
			c.innerHTML = "";
			for (var d = this.Yy.i; d.next();) {
				var e = d.value,
					f = e.visible;
				if ("function" === typeof e.IE && ("function" !== typeof f || f(a))) {
					f = w.createElement("li");
					f.className = "goCXli";
					var h = w.createElement("a");
					h.className = "goCXa";
					h.href = "#";
					h.QG = e.IE;
					h.addEventListener("click",
						function(c) {
							this.QG(a);
							b.stopTool();
							c.preventDefault();
							return !1
						}, !1);
					h.textContent = e.text;
					f.appendChild(h);
					c.appendChild(f)
				}
			}
			w.Ot.style.display = "block";
			w.Nt.style.display = "block"
		}
	};
	ak.prototype.hideDefaultContextMenu = function() {
		null !== this.Pl && this.Pl === this.Am && (w.Ot.style.display = "none", w.Nt.style.display = "none", w.Nt.removeEventListener("click", this.Wz, !1), this.Pl = null)
	};
	w.defineProperty(ak, {
		Pl: "currentContextMenu"
	}, function() {
		return this.xC
	}, function(a) {
		this.xC = a;
		this.Wy = a instanceof kh ? a.zf : null
	});
	w.defineProperty(ak, {
		$K: "defaultTouchContextMenu"
	}, function() {
		return this.Am
	}, function(a) {
		this.Am = a
	});
	w.defineProperty(ak, {
		ox: "currentObject"
	}, function() {
		return this.AC
	}, function(a) {
		null !== a && w.G(a, G, ak, "currentObject");
		this.AC = a
	});
	w.u(ak, {
		zL: "mouseDownPoint"
	}, function() {
		return this.wD
	});

	function fk() {
		rg.call(this);
		0 < arguments.length && w.nd(fk);
		this.name = "DragSelecting";
		this.zo = 175;
		this.lD = !1;
		var a = new R;
		a.ag = "Tool";
		a.gm = !1;
		var b = new X;
		b.name = "SHAPE";
		b.Db = "Rectangle";
		b.fill = null;
		b.stroke = "magenta";
		a.add(b);
		this.wm = a
	}
	w.La(fk, rg);
	w.ga("DragSelectingTool", fk);
	fk.prototype.canStart = function() {
		if (!this.isEnabled) return !1;
		var a = this.g;
		if (null === a || !a.Af) return !1;
		var b = a.R;
		return !b.left || a.$a !== this && (!this.isBeyondDragSize() || b.timestamp - a.Ec.timestamp < this.PE || null !== a.Xt(b.da, !0)) ? !1 : !0
	};
	fk.prototype.doActivate = function() {
		var a = this.g;
		null !== a && (this.sa = !0, a.df = !0, a.bb = !0, a.add(this.rh), this.doMouseMove())
	};
	fk.prototype.doDeactivate = function() {
		var a = this.g;
		null !== a && (Yh(a), a.remove(this.rh), a.bb = !1, this.sa = a.df = !1)
	};
	fk.prototype.doMouseMove = function() {
		var a = this.g;
		if (null !== a && this.sa && null !== this.rh) {
			var b = this.computeBoxBounds(),
				c = this.rh.Bd("SHAPE");
			null === c && (c = this.rh.Ad());
			c.Ca = b.size;
			this.rh.position = b.position;
			(a.pe || a.qe) && a.tA(a.R.gf)
		}
	};
	fk.prototype.doMouseUp = function() {
		if (this.sa) {
			var a = this.g;
			a.remove(this.rh);
			try {
				a.fc = "wait", this.selectInRect(this.computeBoxBounds())
			} finally {
				a.fc = ""
			}
		}
		this.stopTool()
	};
	fk.prototype.computeBoxBounds = function() {
		var a = this.g;
		return null === a ? new B(0, 0, 0, 0) : new B(a.Ec.da, a.R.da)
	};
	fk.prototype.selectInRect = function(a) {
		var b = this.g;
		if (null !== b) {
			var c = b.R;
			b.Aa("ChangingSelection");
			a = b.Fk(a, null, function(a) {
				return a instanceof R ? a.canSelect() : !1
			}, this.EI);
			if (w.yh ? c.Cu : c.control)
				if (c.shift)
					for (a = a.i; a.next();) c = a.value, c.ib && (c.ib = !1);
				else
					for (a = a.i; a.next();) c = a.value, c.ib = !c.ib;
			else {
				if (!c.shift) {
					for (var c = new H(R), d = b.selection.i; d.next();) {
						var e = d.value;
						a.contains(e) || c.add(e)
					}
					for (c = c.i; c.next();) c.value.ib = !1
				}
				for (a = a.i; a.next();) c = a.value, c.ib || (c.ib = !0)
			}
			b.Aa("ChangedSelection")
		}
	};
	w.defineProperty(fk, {
		PE: "delay"
	}, function() {
		return this.zo
	}, function(a) {
		w.j(a, "number", fk, "delay");
		this.zo = a
	});
	w.defineProperty(fk, {
		EI: "isPartialInclusion"
	}, function() {
		return this.lD
	}, function(a) {
		w.j(a, "boolean", fk, "isPartialInclusion");
		this.lD = a
	});
	w.defineProperty(fk, {
		rh: "box"
	}, function() {
		return this.wm
	}, function(a) {
		null !== a && w.G(a, R, fk, "box");
		this.wm = a
	});

	function gk() {
		rg.call(this);
		0 < arguments.length && w.nd(gk);
		this.name = "Panning";
		this.Gz = new y;
		this.Mj = !1;
		var a = this;
		this.WD = function() {
			window.document.removeEventListener("scroll", a.WD, !1);
			a.stopTool()
		}
	}
	w.La(gk, rg);
	w.ga("PanningTool", gk);
	gk.prototype.canStart = function() {
		if (!this.isEnabled) return !1;
		var a = this.g;
		return null === a || !a.pe && !a.qe || !a.R.left || a.$a !== this && !this.isBeyondDragSize() ? !1 : !0
	};
	gk.prototype.doActivate = function() {
		var a = this.g;
		null !== a && (this.Mj ? (a.R.bubbles = !0, window.document.addEventListener("scroll", this.WD, !1)) : (a.fc = "move", a.df = !0, this.Gz = a.position.copy()), this.sa = !0)
	};
	gk.prototype.doDeactivate = function() {
		var a = this.g;
		null !== a && (a.fc = "", this.sa = a.df = !1)
	};
	gk.prototype.doCancel = function() {
		var a = this.g;
		null !== a && (a.position = this.Gz, a.df = !1);
		this.stopTool()
	};
	gk.prototype.doMouseMove = function() {
		this.move()
	};
	gk.prototype.doMouseUp = function() {
		this.move();
		this.stopTool()
	};
	gk.prototype.move = function() {
		var a = this.g;
		if (this.sa && a)
			if (this.Mj) a.R.bubbles = !0;
			else {
				var b = a.position,
					c = a.Ec.da,
					d = a.R.da,
					e = b.x + c.x - d.x,
					c = b.y + c.y - d.y;
				a.pe || (e = b.x);
				a.qe || (c = b.y);
				a.position = new y(e, c)
			}
	};
	w.defineProperty(gk, {
		bubbles: "bubbles"
	}, function() {
		return this.Mj
	}, function(a) {
		w.j(a, "boolean", gk, "bubbles");
		this.Mj = a
	});
	w.u(gk, {
		GL: "originalPosition"
	}, function() {
		return this.Gz
	});

	function hk() {
		0 < arguments.length && w.nd(hk);
		rg.call(this);
		this.name = "TextEditing";
		this.Uz = this.qk = null;
		this.VD = ik;
		this.Dl = null;
		this.Sa = jk;
		this.Fs = null;
		this.tD = 1;
		this.PD = !0;
		var a = new Yj;
		this.CC = null;
		this.KC = a;
		this.Zy = null;
		kk(this, a)
	}
	w.ga("TextEditingTool", hk);
	w.La(hk, rg);
	var lk;
	hk.LostFocus = lk = w.p(hk, "LostFocus", 0);
	var mk;
	hk.MouseDown = mk = w.p(hk, "MouseDown", 1);
	var nk;
	hk.Tab = nk = w.p(hk, "Tab", 2);
	var ok;
	hk.Enter = ok = w.p(hk, "Enter", 3);
	hk.SingleClick = w.p(hk, "SingleClick", 0);
	var ik;
	hk.SingleClickSelected = ik = w.p(hk, "SingleClickSelected", 1);
	var pk;
	hk.DoubleClick = pk = w.p(hk, "DoubleClick", 2);
	var jk;
	hk.StateNone = jk = w.p(hk, "StateNone", 0);
	var qk;
	hk.StateActive = qk = w.p(hk, "StateActive", 1);
	var rk;
	hk.StateEditing = rk = w.p(hk, "StateEditing", 2);
	var sk;
	hk.StateValidating = sk = w.p(hk, "StateValidating", 3);
	var tk;
	hk.StateInvalid = tk = w.p(hk, "StateInvalid", 4);
	var uk;
	hk.StateValidated = uk = w.p(hk, "StateValidated", 5);

	function kk(a, b) {
		var c = w.createElement("textarea");
		a.Zy = c;
		c.addEventListener("input", function() {
			if (null !== a.Xg) {
				var b = a.WI(this.value),
					c = this.RJ;
				this.style.width = 20 + b.za.width * c + "px";
				this.style.height = 10 + b.za.height * c + "px";
				this.rows = b.UA
			}
		}, !1);
		c.addEventListener("keydown", function(b) {
			if (null !== a.Xg) {
				var c = b.which;
				13 === c ? (!1 === a.Xg.Kx && b.preventDefault(), a.acceptText(ok)) : 9 === c ? (a.acceptText(nk), b.preventDefault()) : 27 === c && (a.doCancel(), null !== a.g && a.g.doFocus())
			}
		}, !1);
		c.addEventListener("focus", function() {
			vk(a)
		}, !1);
		c.addEventListener("blur", function() {
			wk(a)
		}, !1);
		b.SB = function() {
			return c.value
		};
		b.XA = c;
		b.show = function(a, b, f) {
			if (f.state === tk) c.style.border = "3px solid red", c.focus();
			else {
				var h = a.Wa(Jb),
					k = b.position,
					l = b.scale,
					m = a.sj() * l;
				m < f.QF && (m = f.QF);
				var n = a.Ja.width * m + 6,
					p = a.Ja.height * m + 2,
					q = (h.x - k.x) * l,
					h = (h.y - k.y) * l;
				c.value = a.text;
				b.qj.style.font = a.font;
				c.style.cssText = "position: absolute;z-index: 100;font: inherit;fontSize: " + 100 * m + "%;lineHeight: normal;width: " + n + "px;height: " + p + "px;left: " + ((q - n / 2 | 0) - 1) +
					"px;top: " + ((h - p / 2 | 0) - 1) + "px;text-align: " + a.textAlign + ";margin: 0;padding: 1px;border: 0;outline: none;white-space: pre-wrap;overflow: hidden;";
				c.RJ = m;
				b.qj.appendChild(c);
				c.focus();
				f.qy && (c.select(), c.setSelectionRange(0, 9999))
			}
		};
		b.Cn = function(a) {
			a.qj.removeChild(c)
		}
	}
	w.defineProperty(hk, {
		Xg: "textBlock"
	}, function() {
		return this.Uz
	}, function(a) {
		null !== a && w.G(a, Lh, hk, "textBlock");
		this.Uz = a
	});
	w.defineProperty(hk, {
		oj: "currentTextEditor"
	}, function() {
		return this.CC
	}, function(a) {
		this.CC = a
	});
	w.defineProperty(hk, {
		MH: "defaultTextEditor"
	}, function() {
		return this.KC
	}, function(a) {
		this.KC = a
	});
	w.defineProperty(hk, {
		wG: "starting"
	}, function() {
		return this.VD
	}, function(a) {
		w.ob(a, hk, hk, "starting");
		this.VD = a
	});
	hk.prototype.canStart = function() {
		if (!this.isEnabled) return !1;
		var a = this.g;
		if (null === a || a.hb || !a.R.left || this.isBeyondDragSize()) return !1;
		var b = a.Le(a.R.da);
		if (!(null !== b && b instanceof Lh && b.uA && b.U.canEdit())) return !1;
		b = b.U;
		return null === b || this.wG === ik && !b.ib || this.wG === pk && 2 > a.R.re ? !1 : !0
	};
	hk.prototype.doStart = function() {
		this.sa || null === this.Xg || this.doActivate()
	};
	hk.prototype.doActivate = function() {
		if (!this.sa) {
			var a = this.g;
			if (null !== a) {
				var b = this.Xg;
				null === b && (b = a.Le(a.R.da));
				if (null !== b && b instanceof Lh && (this.Xg = b, null !== b.U)) {
					this.sa = !0;
					this.Sa = qk;
					var c = this.MH;
					null !== b.zG && (c = b.zG);
					this.qk = this.Xg.copy();
					var d = new B(this.Xg.Wa(zb), this.Xg.Wa(Sb));
					a.kG(d);
					if (c instanceof Yj) c.show(b, a, this);
					else {
						c.style.position = "absolute";
						c.style.zIndex = "100";
						c.textEditingTool = this;
						if ("function" === typeof c.onActivate) c.onActivate();
						a.qj.appendChild(c);
						"function" === typeof c.focus &&
							c.focus();
						"function" === typeof c.select && this.qy && (c.select(), c.setSelectionRange(0, 9999))
					}
					this.oj = c
				}
			}
		}
	};
	hk.prototype.doCancel = function() {
		null !== this.Fs && this.oj instanceof HTMLElement && (this.oj.style.border = this.Fs, this.Fs = null);
		this.stopTool()
	};
	hk.prototype.doMouseUp = function() {
		!this.sa && this.canStart() && this.doActivate()
	};
	hk.prototype.doMouseDown = function() {
		this.sa && this.acceptText(mk)
	};
	hk.prototype.acceptText = function(a) {
		switch (a) {
			case mk:
				if (this.Sa === uk) this.oj instanceof HTMLElement && this.oj.focus();
				else if (this.Sa === qk || this.Sa === tk || this.Sa === rk) this.Sa = sk, xk(this);
				break;
			case lk:
			case ok:
			case nk:
				if (ok === a && !0 === this.Uz.Kx) break;
				if (this.Sa === qk || this.Sa === tk || this.Sa === rk) this.Sa = sk, xk(this)
		}
	};

	function xk(a) {
		var b = a.Xg,
			c = a.g,
			d = a.oj;
		if (null !== b && null !== d) {
			var e = b.text,
				f = "";
			d instanceof Yj ? null !== d.SB && (f = d.SB()) : (f = d.value, f = "function" === typeof f ? f() : f);
			a.isValidText(b, e, f) ? (a.Hb(a.name), a.Sa = uk, a.Lf = a.name, b.text = f, null !== b.yG && b.yG(b, e, f), null !== c && c.Aa("TextEdited", b, e), a.Rk(), a.stopTool(), null !== c && c.doFocus()) : (a.Sa = tk, null !== b.wA && b.wA(a, e, f), d instanceof Yj ? d.show(b, c, a) : (null === a.Fs && (a.Fs = d.style.border, d.style.border = "3px solid red"), "function" === typeof d.focus && d.focus()))
		}
	}
	hk.prototype.doDeactivate = function() {
		var a = this.g;
		if (null !== a) {
			this.Sa = jk;
			this.Xg = null;
			if (null !== this.oj) {
				var b = this.oj;
				if (b instanceof Yj) b.Cn(a, this);
				else {
					if ("function" === typeof b.onDeactivate) b.onDeactivate();
					null !== b && a.qj.removeChild(b)
				}
			}
			this.sa = !1
		}
	};
	hk.prototype.doFocus = function() {
		vk(this)
	};
	hk.prototype.doBlur = function() {
		wk(this)
	};

	function vk(a) {
		if (null !== a.oj && a.state !== jk) {
			var b = a.Zy;
			a.Sa === qk && (a.Sa = rk);
			"function" === typeof b.select && a.qy && (b.select(), b.setSelectionRange(0, 9999))
		}
	}

	function wk(a) {
		if (null !== a.oj && a.state !== jk) {
			var b = a.Zy;
			"function" === typeof b.focus && b.focus();
			"function" === typeof b.select && a.qy && (b.select(), b.setSelectionRange(0, 9999))
		}
	}
	hk.prototype.isValidText = function(a, b, c) {
		w.G(a, Lh, hk, "isValidText:textblock");
		var d = this.IB;
		if (null !== d && !d(a, b, c)) return !1;
		d = a.IB;
		return null === d || d(a, b, c) ? !0 : !1
	};
	w.defineProperty(hk, {
		IB: "textValidation"
	}, function() {
		return this.Dl
	}, function(a) {
		null !== a && w.j(a, "function", hk, "textValidation");
		this.Dl = a
	});
	w.defineProperty(hk, {
		QF: "minimumEditorScale"
	}, function() {
		return this.tD
	}, function(a) {
		null !== a && w.j(a, "number", hk, "minimumEditorScale");
		this.tD = a
	});
	w.defineProperty(hk, {
		qy: "selectsTextOnActivate"
	}, function() {
		return this.PD
	}, function(a) {
		null !== a && w.j(a, "boolean", hk, "selectsTextOnActivate");
		this.PD = a
	});
	w.defineProperty(hk, {
		state: "state"
	}, function() {
		return this.Sa
	}, function(a) {
		this.Sa !== a && (w.ob(a, hk, hk, "starting"), this.Sa = a)
	});
	hk.prototype.measureTemporaryTextBlock = hk.prototype.WI = function(a) {
		var b = this.qk;
		b.text = a;
		yk(b, this.Xg.To, Infinity);
		return b
	};

	function ih() {
		rg.call(this);
		this.name = "ToolManager";
		this.VG = new H(rg);
		this.WG = new H(rg);
		this.XG = new H(rg);
		this.ZC = this.$C = 850;
		this.PC = (new ia(2, 2)).Ha();
		this.hE = 5E3;
		this.xD = Ph;
		this.XC = zk;
		this.Cv = this.DC = null;
		this.fn = -1
	}
	w.La(ih, rg);
	w.ga("ToolManager", ih);
	var Ph;
	ih.WheelScroll = Ph = w.p(ih, "WheelScroll", 0);
	var Oh;
	ih.WheelZoom = Oh = w.p(ih, "WheelZoom", 1);
	ih.WheelNone = w.p(ih, "WheelNone", 2);
	var zk;
	ih.GestureZoom = zk = w.p(ih, "GestureZoom", 3);
	var Ak;
	ih.GestureCancel = Ak = w.p(ih, "GestureCancel", 4);
	var Bk;
	ih.GestureNone = Bk = w.p(ih, "GestureNone", 5);
	w.defineProperty(ih, {
		Fu: "mouseWheelBehavior"
	}, function() {
		return this.xD
	}, function(a) {
		w.ob(a, ih, ih, "mouseWheelBehavior");
		this.xD = a
	});
	w.defineProperty(ih, {
		Vp: "gestureBehavior"
	}, function() {
		return this.XC
	}, function(a) {
		w.ob(a, ih, ih, "gestureBehavior");
		this.XC = a
	});
	ih.prototype.initializeStandardTools = function() {
		this.hH = new Wj;
		this.ZF = new Uh;
		this.NI = new nj;
		this.iG = new Mj;
		this.zJ = new Tj;
		this.MF = new dj;
		this.ue = new oh;
		this.RH = new fk;
		this.kJ = new gk;
		this.mA = new ak;
		this.HB = new hk;
		this.uH = new Xj;
		this.vH = new Vj
	};
	ih.prototype.updateAdornments = function(a) {
		var b = this.Ql;
		if (b instanceof kh && this.Cv === a) {
			var c = b.tb;
			(null !== a ? c.U === a : null === c) ? this.showToolTip(b, c): this.hideToolTip()
		}
	};
	ih.prototype.doMouseDown = function() {
		var a = this.g;
		if (null !== a) {
			var b = a.R;
			b.yj && this.Vp === Ak && (b.bubbles = !1);
			if (b.tu) {
				this.cancelWaitAfter();
				if (this.Vp === Bk) {
					b.bubbles = !0;
					return
				}
				if (this.Vp === Ak) return;
				if (a.$a.canStartMultiTouch()) {
					a.$a.standardPinchZoomStart();
					return
				}
			}
			var c = a.ja;
			c.hA && 0 !== c.ti && w.trace("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");
			for (var c = this.ff.length, d = 0; d < c; d++) {
				var e = this.ff.ea(d);
				null === e.g && e.Sc(this.g);
				if (e.canStart()) {
					a.doFocus();
					a.$a = e;
					a.$a === e && (e.sa || e.doActivate(), e.doMouseDown());
					return
				}
			}
			1 === a.R.button && (this.Fu === Ph ? this.Fu = Oh : this.Fu === Oh && (this.Fu = Ph));
			this.doActivate();
			this.standardWaitAfter(this.tF, b)
		}
	};
	ih.prototype.doMouseMove = function() {
		var a = this.g;
		if (null !== a) {
			var b = a.R;
			if (b.tu) {
				if (this.Vp === Bk) {
					b.bubbles = !0;
					return
				}
				if (this.Vp === Ak) return;
				if (a.$a.canStartMultiTouch()) {
					a.$a.standardPinchZoomMove();
					return
				}
			}
			if (this.sa)
				for (var c = this.dg.length, d = 0; d < c; d++) {
					var e = this.dg.ea(d);
					null === e.g && e.Sc(this.g);
					if (e.canStart()) {
						a.doFocus();
						a.$a = e;
						a.$a === e && (e.sa || e.doActivate(), e.doMouseMove());
						return
					}
				}
			Ck(this, a);
			a = b.event;
			null === a || "mousemove" !== a.type && "pointermove" !== a.type && a.cancelable || (b.bubbles = !0)
		}
	};

	function Ck(a, b) {
		a.standardMouseOver();
		a.isBeyondDragSize() && a.standardWaitAfter(a.sa ? a.tF : a.pI, b.R)
	}
	ih.prototype.doCurrentObjectChanged = function(a, b) {
		var c = this.Ql;
		null === c || null !== b && c instanceof kh && (b === c || b.am(c)) || this.hideToolTip()
	};
	ih.prototype.doWaitAfter = function(a) {
		var b = this.g;
		null !== b && b.Cb && (this.doMouseHover(), this.sa || this.doToolTip(), a.yj && !b.R.tc && (a = a.copy(), a.button = 2, a.buttons = 2, b.R = a, b.tp = !0, b.doMouseUp()))
	};
	ih.prototype.doMouseHover = function() {
		var a = this.g;
		if (null !== a) {
			var b = a.R;
			null === b.Ae && (b.Ae = a.Le(b.da, null, null));
			var c = b.Ae;
			if (null !== c)
				for (b.tc = !1; null !== c;) {
					a = this.sa ? c.bB : c.cB;
					if (null !== a && (a(b, c), b.tc)) break;
					c = c.Q
				} else c = this.sa ? a.bB : a.cB, null !== c && c(b)
		}
	};
	ih.prototype.doToolTip = function() {
		var a = this.g;
		if (null !== a) {
			var b = a.R;
			null === b.Ae && (b.Ae = a.Le(b.da, null, null));
			b = b.Ae;
			if (null !== b) {
				if (a = this.Ql, !(a instanceof kh) || b !== a && !b.am(a)) {
					for (; null !== b;) {
						a = b.KB;
						if (null !== a) {
							this.showToolTip(a, b);
							return
						}
						b = b.Q
					}
					this.hideToolTip()
				}
			} else a = a.KB, null !== a ? this.showToolTip(a, null) : this.hideToolTip()
		}
	};
	ih.prototype.showToolTip = function(a, b) {
		null !== b && w.G(b, G, ih, "showToolTip:obj");
		var c = this.g;
		if (null !== c) {
			a !== this.Ql && this.hideToolTip();
			if (a instanceof kh) {
				a.ag = "Tool";
				a.gm = !1;
				a.scale = 1 / c.scale;
				a.yd = "ToolTip";
				null !== a.placeholder && (a.placeholder.scale = c.scale);
				c.add(a);
				if (null !== b) {
					var c = null,
						d = b.Tl();
					null !== d && (c = d.data);
					a.tb = b;
					a.data = c
				} else a.data = c.$;
				a.$e();
				this.positionToolTip(a, b)
			} else a instanceof Yj && a !== this.Ql && a.show(b, c, this);
			this.Ql = a; - 1 !== this.fn && (w.clearTimeout(this.fn), this.fn = -1);
			c = this.WJ;
			if (0 < c && Infinity !== c) {
				var e = this;
				this.fn = w.setTimeout(function() {
					e.hideToolTip()
				}, c)
			}
		}
	};
	ih.prototype.positionToolTip = function(a) {
		if (null === a.placeholder) {
			var b = this.g;
			if (null !== b) {
				var c = b.R.da.copy(),
					d = a.za,
					e = b.rb;
				b.R.yj && (c.x -= d.width);
				c.x + d.width > e.right && (c.x -= d.width + 5);
				c.x < e.x && (c.x = e.x);
				c.y = c.y + 20 + d.height > e.bottom ? c.y - (d.height + 5) : c.y + 20;
				c.y < e.y && (c.y = e.y);
				a.position = c
			}
		}
	};
	ih.prototype.hideToolTip = function() {
		-1 !== this.fn && (w.clearTimeout(this.fn), this.fn = -1);
		var a = this.g;
		if (null !== a) {
			var b = this.Ql;
			null !== b && (b instanceof kh ? (a.remove(b), null !== this.Cv && this.Cv.Ej(b.yd), b.data = null, b.tb = null) : b instanceof Yj && null !== b.Cn && b.Cn(a, this), this.Ql = null)
		}
	};
	w.defineProperty(ih, {
		Ql: "currentToolTip"
	}, function() {
		return this.DC
	}, function(a) {
		this.DC = a;
		this.Cv = null !== a && a instanceof kh ? a.zf : null
	});
	ih.prototype.doMouseUp = function() {
		this.cancelWaitAfter();
		var a = this.g;
		if (null !== a) {
			if (this.sa)
				for (var b = this.eg.length, c = 0; c < b; c++) {
					var d = this.eg.ea(c);
					null === d.g && d.Sc(this.g);
					if (d.canStart()) {
						a.doFocus();
						a.$a = d;
						a.$a === d && (d.sa || d.doActivate(), d.doMouseUp());
						return
					}
				}
			a.doFocus();
			this.doDeactivate()
		}
	};
	ih.prototype.doMouseWheel = function() {
		this.standardMouseWheel()
	};
	ih.prototype.doKeyDown = function() {
		var a = this.g;
		null !== a && a.pb.doKeyDown()
	};
	ih.prototype.doKeyUp = function() {
		var a = this.g;
		null !== a && a.pb.doKeyUp()
	};
	ih.prototype.doCancel = function() {
		null !== Sh && Sh.doCancel();
		rg.prototype.doCancel.call(this)
	};
	ih.prototype.findTool = function(a) {
		w.j(a, "string", ih, "findTool:name");
		for (var b = this.ff.length, c = 0; c < b; c++) {
			var d = this.ff.ea(c);
			if (d.name === a) return d
		}
		b = this.dg.length;
		for (c = 0; c < b; c++)
			if (d = this.dg.ea(c), d.name === a) return d;
		b = this.eg.length;
		for (c = 0; c < b; c++)
			if (d = this.eg.ea(c), d.name === a) return d;
		return null
	};
	ih.prototype.replaceTool = function(a, b) {
		w.j(a, "string", ih, "replaceTool:name");
		null !== b && (w.G(b, rg, ih, "replaceTool:newtool"), b.g && b.g !== this.g && w.k("Cannot share tools between Diagrams: " + b.toString()), b.Sc(this.g));
		for (var c = this.ff.length, d = 0; d < c; d++) {
			var e = this.ff.ea(d);
			if (e.name === a) return null !== b ? this.ff.kg(d, b) : this.ff.dd(d), e
		}
		c = this.dg.length;
		for (d = 0; d < c; d++)
			if (e = this.dg.ea(d), e.name === a) return null !== b ? this.dg.kg(d, b) : this.dg.dd(d), e;
		c = this.eg.length;
		for (d = 0; d < c; d++)
			if (e = this.eg.ea(d), e.name ===
				a) return null !== b ? this.eg.kg(d, b) : this.eg.dd(d), e;
		return null
	};

	function Dk(a, b, c, d) {
		w.j(b, "string", ih, "replaceStandardTool:name");
		w.G(d, H, ih, "replaceStandardTool:list");
		null !== c && (w.G(c, rg, ih, "replaceStandardTool:newtool"), c.g && c.g !== a.g && w.k("Cannot share tools between Diagrams: " + c.toString()), c.name = b, c.Sc(a.g));
		a.findTool(b) ? a.replaceTool(b, c) : null !== c && d.add(c)
	}
	w.u(ih, {
		ff: "mouseDownTools"
	}, function() {
		return this.VG
	});
	w.u(ih, {
		dg: "mouseMoveTools"
	}, function() {
		return this.WG
	});
	w.u(ih, {
		eg: "mouseUpTools"
	}, function() {
		return this.XG
	});
	w.defineProperty(ih, {
		pI: "hoverDelay"
	}, function() {
		return this.$C
	}, function(a) {
		w.j(a, "number", ih, "hoverDelay");
		this.$C = a
	});
	w.defineProperty(ih, {
		tF: "holdDelay"
	}, function() {
		return this.ZC
	}, function(a) {
		w.j(a, "number", ih, "holdDelay");
		this.ZC = a
	});
	w.defineProperty(ih, {
		SH: "dragSize"
	}, function() {
		return this.PC
	}, function(a) {
		w.G(a, ia, ih, "dragSize");
		this.PC = a.S()
	});
	w.defineProperty(ih, {
		WJ: "toolTipDuration"
	}, function() {
		return this.hE
	}, function(a) {
		w.j(a, "number", ih, "toolTipDuration");
		this.hE = a
	});
	w.defineProperty(ih, {
		hH: "actionTool"
	}, function() {
		return this.findTool("Action")
	}, function(a) {
		Dk(this, "Action", a, this.ff)
	});
	w.defineProperty(ih, {
		ZF: "relinkingTool"
	}, function() {
		return this.findTool("Relinking")
	}, function(a) {
		Dk(this, "Relinking", a, this.ff)
	});
	w.defineProperty(ih, {
		NI: "linkReshapingTool"
	}, function() {
		return this.findTool("LinkReshaping")
	}, function(a) {
		Dk(this, "LinkReshaping", a, this.ff)
	});
	w.defineProperty(ih, {
		iG: "resizingTool"
	}, function() {
		return this.findTool("Resizing")
	}, function(a) {
		Dk(this, "Resizing", a, this.ff)
	});
	w.defineProperty(ih, {
		zJ: "rotatingTool"
	}, function() {
		return this.findTool("Rotating")
	}, function(a) {
		Dk(this, "Rotating", a, this.ff)
	});
	w.defineProperty(ih, {
		MF: "linkingTool"
	}, function() {
		return this.findTool("Linking")
	}, function(a) {
		Dk(this, "Linking", a, this.dg)
	});
	w.defineProperty(ih, {
		ue: "draggingTool"
	}, function() {
		return this.findTool("Dragging")
	}, function(a) {
		Dk(this, "Dragging", a, this.dg)
	});
	w.defineProperty(ih, {
		RH: "dragSelectingTool"
	}, function() {
		return this.findTool("DragSelecting")
	}, function(a) {
		Dk(this, "DragSelecting", a, this.dg)
	});
	w.defineProperty(ih, {
		kJ: "panningTool"
	}, function() {
		return this.findTool("Panning")
	}, function(a) {
		Dk(this, "Panning", a, this.dg)
	});
	w.defineProperty(ih, {
		mA: "contextMenuTool"
	}, function() {
		return this.findTool("ContextMenu")
	}, function(a) {
		Dk(this, "ContextMenu", a, this.eg)
	});
	w.defineProperty(ih, {
		HB: "textEditingTool"
	}, function() {
		return this.findTool("TextEditing")
	}, function(a) {
		Dk(this, "TextEditing", a, this.eg)
	});
	w.defineProperty(ih, {
		uH: "clickCreatingTool"
	}, function() {
		return this.findTool("ClickCreating")
	}, function(a) {
		Dk(this, "ClickCreating", a, this.eg)
	});
	w.defineProperty(ih, {
		vH: "clickSelectingTool"
	}, function() {
		return this.findTool("ClickSelecting")
	}, function(a) {
		Dk(this, "ClickSelecting", a, this.eg)
	});

	function Xg() {
		this.EC = Ek;
		this.pr = this.qr = this.aa = null;
		this.tm = this.rr = this.sr = 0;
		this.ko = this.rc = this.Po = this.$j = !1;
		this.pl = this.jf = !0;
		this.Av = this.zv = this.zC = null;
		this.yC = 0;
		this.Bv = null;
		this.pv = new I("string");
		this.gz = 600;
		this.YG = new y(0, 0);
		this.mC = this.lC = this.kE = !1;
		this.Rm = new ma(G, Fk)
	}
	w.ga("AnimationManager", Xg);
	Xg.prototype.Sc = function(a) {
		this.aa = a
	};

	function Ek(a, b, c, d) {
		a /= d / 2;
		return 1 > a ? c / 2 * a * a + b : -c / 2 * (--a * (a - 2) - 1) + b
	}
	w.u(Xg, {
		CK: "animationReasons"
	}, function() {
		return this.pv
	});
	Xg.prototype.canStart = function() {
		return !0
	};
	Xg.prototype.prepareAutomaticAnimation = Xg.prototype.Tn = function(a) {
		this.jf && (this.pl || this.aa.Fn) && (this.pv.add(a), this.canStart(a) && (this.$j && this.Gh(), this.rc = !0))
	};

	function Sk(a) {
		if (a.jf && (a.pv.clear(), a.rc))
			if (!a.ko) a.rc = !1;
			else if (0 === a.tm) {
			var b = +new Date;
			a.tm = b;
			requestAnimationFrame(function() {
				if (!1 !== a.rc && !a.$j && a.tm === b) {
					var c = a.aa;
					c.tj("temporaryPixelRatio") && (c.pk = 1);
					Tk(c);
					a.rc = !1;
					c.Aa("AnimationStarting");
					Uk(a, b)
				}
			})
		}
	}

	function Vk(a, b, c, d, e, f) {
		if (!(!a.rc || "position" === c && d.L(e) || b instanceof R && !b.xF)) {
			var h = a.Rm;
			if (h.contains(b)) {
				var h = h.ka(b),
					k = h.start,
					l = h.end;
				void 0 === k[c] && (k[c] = $k(d));
				h.nx && void 0 !== l[c] ? h.Tt[c] = $k(e) : (f || (h.Tt[c] = $k(e)), l[c] = $k(e));
				f && 0 === c.indexOf("position:") && b instanceof R && (h.Tt.location = $k(b.location))
			} else k = new ra, l = new ra, k[c] = $k(d), l[c] = $k(e), d = l, e = k.position, e instanceof y && !e.I() && a.pv.contains("Expand SubGraph") && e.assign(d.position), k = new Fk(k, l, f), f && 0 === c.indexOf("position:") &&
				b instanceof R && (k.Tt.location = $k(b.location)), h.add(b, k);
			a.ko = !0
		}
	}

	function $k(a) {
		return a instanceof y ? a.copy() : a instanceof ia ? a.copy() : a
	}

	function Uk(a, b) {
		var c;

		function d() {
			if (!1 !== f.$j && f.tm === b) {
				var a = +new Date,
					c = a > s ? m : a - r;
				al(f);
				bl(f, e, q, h, c, m);
				f.zv && f.zv();
				Ri(e);
				cl(f);
				a > s ? dl(f) : requestAnimationFrame(d)
			}
		}
		void 0 === c && (c = new ra);
		var e = a.aa;
		if (null !== e) {
			var f = a,
				h = c.cL || a.EC,
				k = c.BL || null,
				l = c.CL || null,
				m = c.duration || a.gz,
				n = a.YG;
			for (c = a.Rm.i; c.next();) {
				var p = c.value.start.position;
				p instanceof y && (p.I() || p.assign(n))
			}
			a.zC = h;
			a.zv = k;
			a.Av = l;
			a.yC = m;
			a.Bv = a.Rm;
			var q = a.Bv;
			for (c = q.i; c.next();) k = c.value.end, k["position:placeholder"] && (l = c.key.findVisibleNode(),
				l instanceof V && null !== l.placeholder && (l = l.placeholder, n = l.Wa(zb), n.x += l.padding.left, n.y += l.padding.top, k["position:placeholder"] = n));
			a.$j = !0;
			al(a);
			bl(a, e, q, h, 0, m);
			Ri(a.aa);
			cl(a);
			var r = +new Date,
				s = r + m;
			f.tm === b && requestAnimationFrame(function() {
				d()
			})
		}
	}

	function al(a) {
		if (!a.Po) {
			var b = a.aa;
			a.kE = b.bb;
			a.lC = b.Pe;
			a.mC = b.Zu;
			b.bb = !0;
			b.Pe = !0;
			b.Zu = !0;
			a.Po = !0
		}
	}

	function cl(a) {
		var b = a.aa;
		b.bb = a.kE;
		b.Pe = a.lC;
		b.Zu = a.mC;
		a.Po = !1
	}

	function bl(a, b, c, d, e, f) {
		for (c = c.i; c.next();) {
			var h = c.key,
				k = c.value,
				l = k.start,
				k = k.end,
				m;
			for (m in k)
				if (("position" !== m || !k["position:placeholder"] && !k["position:node"]) && void 0 !== el[m]) el[m](h, l[m], k[m], d, e, f)
		}
		d = b.OA;
		b.OA = !0;
		m = a.EC;
		0 !== a.sr && 0 !== a.rr && (c = a.sr, b.vb = m(e, c, a.rr - c, f));
		null !== a.qr && null !== a.pr && (c = a.qr, a = a.pr, b.jb = new y(m(e, c.x, a.x - c.x, f), m(e, c.y, a.y - c.y, f)));
		b.OA = d
	}
	Xg.prototype.stopAnimation = Xg.prototype.Gh = function() {
		!0 === this.rc && (this.rc = !1, this.tm = 0, this.ko && this.aa.Ne());
		this.$j && this.jf && dl(this)
	};

	function dl(a) {
		a.$j = !1;
		a.ko = !1;
		al(a);
		for (var b = a.aa, c = a.zC, d = a.yC, e = a.Bv.i; e.next();) {
			var f = e.key,
				h = e.value,
				k = h.start,
				l = h.end,
				m = h.Tt,
				n;
			for (n in l)
				if (void 0 !== el[n]) {
					var p = n;
					!h.nx || "position:node" !== p && "position:placeholder" !== p || (p = "position");
					el[p](f, k[n], void 0 !== m[n] ? m[n] : h.nx ? k[n] : l[n], c, d, d)
				}
			h.nx && void 0 !== m.location && f instanceof R && (f.location = m.location);
			h.iy && f instanceof R && f.Cd(!1)
		}
		for (c = a.aa.links; c.next();) d = c.value, null !== d.ip && (d.points = d.ip, d.ip = null);
		b.Tx.clear();
		b.pk = null;
		b.Fc();
		b.oa();
		b.cg();
		fl(b);
		cl(a);
		a.Av && a.Av();
		a.tm = 0;
		a.Bv = null;
		a.Av = null;
		a.zv = null;
		a.qr = null;
		a.pr = null;
		a.sr = 0;
		a.rr = 0;
		a.Rm = new ma(G, Fk);
		b.Aa("AnimationFinished");
		b.Ne()
	}

	function gl(a, b, c) {
		var d = b.Y,
			e = c.Y,
			f = null;
		c instanceof V && (f = c.placeholder);
		null !== f ? (d = f.Wa(zb), d.x += f.padding.left, d.y += f.padding.top, Vk(a, b, "position", d, b.position, !1)) : Vk(a, b, "position", new y(e.x + e.width / 2 - d.width / 2, e.y + e.height / 2 - d.height / 2), b.position, !1);
		Vk(a, b, "scale", .01, b.scale, !1);
		if (b instanceof V)
			for (b = b.vc; b.next();) f = b.value, f instanceof T && gl(a, f, c)
	}

	function hl(a, b, c) {
		if (b.isVisible()) {
			var d = null;
			c instanceof V && (d = c.placeholder);
			null !== d ? Vk(a, b, "position:placeholder", b.position, d, !0) : Vk(a, b, "position:node", b.position, c, !0);
			Vk(a, b, "scale", b.scale, .01, !0);
			a.rc && (d = a.Rm, d.contains(b) && (d.ka(b).iy = !0));
			if (b instanceof V)
				for (b = b.vc; b.next();) d = b.value, d instanceof T && hl(a, d, c)
		}
	}

	function il(a, b, c) {
		a.rc && (null === a.qr && b.I() && null === a.pr && (a.qr = b.copy()), a.pr = c.copy(), a.ko = !0)
	}

	function jl(a, b, c) {
		a.rc && a.aa.Fn && (0 === a.sr && 0 === a.rr && (a.sr = b), a.rr = c, a.ko = !0)
	}
	w.defineProperty(Xg, {
		isEnabled: "isEnabled"
	}, function() {
		return this.jf
	}, function(a) {
		w.j(a, "boolean", Xg, "isEnabled");
		this.jf = a
	});
	w.defineProperty(Xg, {
		duration: "duration"
	}, function() {
		return this.gz
	}, function(a) {
		w.j(a, "number", Xg, "duration");
		1 > a && w.Fa(a, ">= 1", Xg, "duration");
		this.gz = a
	});
	w.u(Xg, {
		cf: "isAnimating"
	}, function() {
		return this.$j
	});
	w.u(Xg, {
		FI: "isTicking"
	}, function() {
		return this.Po
	});
	w.defineProperty(Xg, {
		DF: "isInitial"
	}, function() {
		return this.pl
	}, function(a) {
		w.j(a, "boolean", Xg, "isInitial");
		this.pl = a
	});

	function Fk(a, b, c) {
		this.start = a;
		this.end = b;
		this.Tt = new ra;
		this.nx = c;
		this.iy = !1
	}
	var el = {
		opacity: function(a, b, c, d, e, f) {
			a.opacity = d(e, b, c - b, f)
		},
		position: function(a, b, c, d, e, f) {
			e !== f ? a.vy(d(e, b.x, c.x - b.x, f), d(e, b.y, c.y - b.y, f)) : a.position = new y(d(e, b.x, c.x - b.x, f), d(e, b.y, c.y - b.y, f))
		},
		"position:node": function(a, b, c, d, e, f) {
			var h = a.Y,
				k = c.Y;
			c = k.x + k.width / 2 - h.width / 2;
			h = k.y + k.height / 2 - h.height / 2;
			e !== f ? a.vy(d(e, b.x, c - b.x, f), d(e, b.y, h - b.y, f)) : a.position = new y(d(e, b.x, c - b.x, f), d(e, b.y, h - b.y, f))
		},
		"position:placeholder": function(a, b, c, d, e, f) {
			e !== f ? a.vy(d(e, b.x, c.x - b.x, f), d(e, b.y, c.y - b.y, f)) :
				a.position = new y(d(e, b.x, c.x - b.x, f), d(e, b.y, c.y - b.y, f))
		},
		scale: function(a, b, c, d, e, f) {
			a.scale = d(e, b, c - b, f)
		},
		visible: function(a, b, c, d, e, f) {
			a.visible = e !== f ? b : c
		}
	};

	function qg() {
		0 < arguments.length && w.nd(qg);
		w.oc(this);
		this.aa = null;
		this.zb = new H(R);
		this.Rb = "";
		this.Bc = 1;
		this.xz = !1;
		this.yl = this.$z = this.al = this.$k = this.Zk = this.Yk = this.Wk = this.Xk = this.Vk = this.cl = this.Uk = this.bl = this.Tk = this.Sk = !0;
		this.uz = !1;
		this.vw = []
	}
	w.ga("Layer", qg);
	qg.prototype.Sc = function(a) {
		this.aa = a
	};
	qg.prototype.toString = function(a) {
		void 0 === a && (a = 0);
		var b = 'Layer "' + this.name + '"';
		if (0 >= a) return b;
		for (var c = 0, d = 0, e = 0, f = 0, h = 0, k = this.zb.i; k.next();) {
			var l = k.value;
			l instanceof V ? e++ : l instanceof T ? d++ : l instanceof W ? f++ : l instanceof kh ? h++ : c++
		}
		k = "";
		0 < c && (k += c + " Parts ");
		0 < d && (k += d + " Nodes ");
		0 < e && (k += e + " Groups ");
		0 < f && (k += f + " Links ");
		0 < h && (k += h + " Adornments ");
		if (1 < a)
			for (a = this.zb.i; a.next();) c = a.value, k += "\n    " + c.toString(), d = c.data, null !== d && w.Pd(d) && (k += " #" + w.Pd(d)), c instanceof T ? k += " " +
				Rf(d) : c instanceof W && (k += " " + Rf(c.W) + " " + Rf(c.Z));
		return b + " " + this.zb.count + ": " + k
	};
	qg.prototype.findObjectAt = qg.prototype.Le = function(a, b, c) {
		void 0 === b && (b = null);
		void 0 === c && (c = null);
		if (!1 === this.yl) return null;
		var d = !1;
		null !== this.g && this.g.rb.Ia(a) && (d = !0);
		for (var e = w.K(), f = this.zb.n, h = f.length; h--;) {
			var k = f[h];
			if ((!0 !== d || !1 !== kl(k)) && k.isVisible() && (e.assign(a), Pa(e, k.ph), k = k.Le(e, b, c), null !== k && (null !== b && (k = b(k)), null !== k && (null === c || c(k))))) return w.v(e), k
		}
		w.v(e);
		return null
	};
	qg.prototype.findObjectsAt = qg.prototype.Wt = function(a, b, c, d) {
		void 0 === b && (b = null);
		void 0 === c && (c = null);
		d instanceof H || d instanceof I || (d = new I(G));
		if (!1 === this.yl) return d;
		var e = !1;
		null !== this.g && this.g.rb.Ia(a) && (e = !0);
		for (var f = w.K(), h = this.zb.n, k = h.length; k--;) {
			var l = h[k];
			if ((!0 !== e || !1 !== kl(l)) && l.isVisible()) {
				f.assign(a);
				Pa(f, l.ph);
				var m = l;
				l.Wt(f, b, c, d) && (null !== b && (m = b(m)), null === m || null !== c && !c(m) || (d instanceof I && d.add(m), d instanceof H && d.add(m)))
			}
		}
		w.v(f);
		return d
	};
	qg.prototype.findObjectsIn = qg.prototype.Fk = function(a, b, c, d, e) {
		void 0 === b && (b = null);
		void 0 === c && (c = null);
		void 0 === d && (d = !1);
		e instanceof H || e instanceof I || (e = new I(G));
		if (!1 === this.yl) return e;
		var f = !1;
		null !== this.g && this.g.rb.Ak(a) && (f = !0);
		for (var h = this.zb.n, k = h.length; k--;) {
			var l = h[k];
			if ((!0 !== f || !1 !== kl(l)) && l.isVisible()) {
				var m = l;
				l.Fk(a, b, c, d, e) && (null !== b && (m = b(m)), null === m || null !== c && !c(m) || (e instanceof I && e.add(m), e instanceof H && e.add(m)))
			}
		}
		return e
	};
	qg.prototype.xA = function(a, b, c, d, e, f, h) {
		if (!1 === this.yl) return e;
		for (var k = this.zb.n, l = k.length; l--;) {
			var m = k[l];
			if ((!0 !== h || !1 !== kl(m)) && f(m) && m.isVisible()) {
				var n = m;
				m.Fk(a, b, c, d, e) && (null !== b && (n = b(n)), null === n || null !== c && !c(n) || (e instanceof I && e.add(n), e instanceof H && e.add(n)))
			}
		}
		return e
	};
	qg.prototype.findObjectsNear = qg.prototype.vn = function(a, b, c, d, e, f) {
		void 0 === c && (c = null);
		void 0 === d && (d = null);
		void 0 === e && (e = !0);
		if (!1 !== e && !0 !== e) {
			if (e instanceof H || e instanceof I) f = e;
			e = !0
		}
		f instanceof H || f instanceof I || (f = new I(G));
		if (!1 === this.yl) return f;
		var h = !1;
		null !== this.g && this.g.rb.Ia(a) && (h = !0);
		for (var k = w.K(), l = w.K(), m = this.zb.n, n = m.length; n--;) {
			var p = m[n];
			if ((!0 !== h || !1 !== kl(p)) && p.isVisible()) {
				k.assign(a);
				Pa(k, p.ph);
				l.m(a.x + b, a.y);
				Pa(l, p.ph);
				var q = p;
				p.vn(k, l, c, d, e, f) && (null !== c && (q =
					c(q)), null === q || null !== d && !d(q) || (f instanceof I && f.add(q), f instanceof H && f.add(q)))
			}
		}
		w.v(k);
		w.v(l);
		return f
	};
	g = qg.prototype;
	g.Hf = function(a, b) {
		if (this.visible) {
			var c;
			c = void 0 === b ? a.rb : b;
			for (var d = this.zb.n, e = d.length, f = 0; f < e; f++) {
				var h = d[f];
				h.pD = f;
				if (!(h instanceof W && !1 === h.Mf)) {
					if (h instanceof kh) {
						var k = h;
						if (null !== k.zf) continue
					}
					if ($a(h.Y, c))
						for (h.Hf(!0), ll(h), h = h.$w; h.next();) k = h.value, yk(k, Infinity, Infinity), k.jc(), k.Hf(!0);
					else h.Hf(!1), null !== h.$w && 0 < h.$w.count && ll(h)
				}
			}
		}
	};
	g.ve = function(a, b, c) {
		if (this.visible && 0 !== this.Bc && (void 0 === c && (c = !0), c || !this.Pc)) {
			c = this.zb.n;
			var d = c.length;
			if (0 !== d) {
				1 !== this.Bc && (a.globalAlpha = this.Bc);
				var e = this.vw;
				e.length = 0;
				for (var f = b.scale, h = 0; h < d; h++) {
					var k = c[h];
					if (kl(k)) {
						if (k instanceof W) {
							var l = k;
							l.ac && e.push(l);
							if (!1 === l.Mf) continue
						}
						l = k.Y;
						1 < l.width * f || 1 < l.height * f ? k.ve(a, b) : ml(k, a)
					}
				}
				a.globalAlpha = 1
			}
		}
	};

	function nl(a, b, c, d) {
		if (a.visible && 0 !== a.Bc) {
			1 !== a.Bc && (b.globalAlpha = a.Bc);
			var e = a.vw;
			e.length = 0;
			var f = c.scale;
			a = a.zb.n;
			for (var h = a.length, k = d.length, l = 0; l < h; l++) {
				var m = a[l];
				if (kl(m)) {
					if (m instanceof W) {
						var n = m;
						n.ac && e.push(n);
						if (!1 === n.Mf) continue
					}
					var n = ol(m, m.Y),
						p;
					a: {
						p = n;
						for (var q = d, r = k, s = 2 / f, u = 4 / f, t = 0; t < r; t++) {
							var x = q[t];
							if (0 !== x.width && 0 !== x.height && p.vF(x.x - s, x.y - s, x.width + u, x.height + u)) {
								p = !0;
								break a
							}
						}
						p = !1
					}
					p && (1 < n.width * f || 1 < n.height * f ? m.ve(b, c) : ml(m, b))
				}
			}
			b.globalAlpha = 1
		}
	}
	g.h = function(a, b, c, d, e) {
		var f = this.g;
		null !== f && f.cd(Df, a, this, b, c, d, e)
	};
	g.Yp = function(a, b, c) {
		var d = this.zb;
		b.ew = this;
		if (a >= d.count) a = d.count;
		else if (d.ea(a) === b) return -1;
		d.Rd(a, b);
		b.ju(c);
		d = this.g;
		null !== d && (c ? d.oa() : d.Yp(b));
		pl(this, a, b);
		return a
	};
	g.qf = function(a, b, c) {
		if (!c && b.layer !== this && null !== b.layer) return b.layer.qf(a, b, c);
		var d = this.zb;
		if (0 > a || a >= d.length) {
			if (a = d.indexOf(b), 0 > a) return -1
		} else if (d.ea(a) !== b && (a = d.indexOf(b), 0 > a)) return -1;
		b.ku(c);
		d.dd(a);
		d = this.g;
		null !== d && (c ? d.oa() : d.qf(b));
		b.ew = null;
		return a
	};

	function pl(a, b, c) {
		b = ql(a, b, c);
		if (c instanceof V && null !== c && isNaN(c.eo)) {
			if (0 !== c.vc.count) {
				for (var d = -1, e = a.zb.n, f = e.length, h = 0; h < f; h++) {
					var k = e[h];
					if (k === c && (b = h, 0 <= d)) break;
					if (0 > d && k.Da === c && (d = h, 0 <= b)) break
				}!(0 > d) && d < b && (e = a.zb, e.dd(b), e.Rd(d, c))
			}
			c = c.Da;
			null !== c && pl(a, -1, c)
		}
	}

	function ql(a, b, c) {
		var d = c.eo;
		if (isNaN(d)) return b;
		a = a.zb;
		var e = a.count;
		if (1 >= e) return b;
		0 > b && (b = a.indexOf(c));
		if (0 > b) return -1;
		for (var f = b - 1, h = NaN; 0 <= f;) {
			h = a.ea(f).eo;
			if (!isNaN(h)) break;
			f--
		}
		for (var k = b + 1, l = NaN; k < e;) {
			l = a.ea(k).eo;
			if (!isNaN(l)) break;
			k++
		}
		if (!isNaN(h) && h > d)
			for (;;) {
				if (-1 === f || h <= d) {
					f++;
					if (f === b) break;
					a.dd(b);
					a.Rd(f, c);
					return f
				}
				for (h = NaN; 0 <= --f && (h = a.ea(f).eo, isNaN(h)););
			} else if (!isNaN(l) && l < d)
				for (;;) {
					if (k === e || l >= d) {
						k--;
						if (k === b) break;
						a.dd(b);
						a.Rd(k, c);
						return k
					}
					for (l = NaN; ++k < e && (l = a.ea(k).eo,
							isNaN(l)););
				}
		return b
	}
	g.clear = function() {
		for (var a = this.zb.xc(), b = a.length, c = 0; c < b; c++) a[c].Hf(!1), this.qf(-1, a[c], !1)
	};
	w.u(qg, {
		Pk: "parts"
	}, function() {
		return this.zb.i
	});
	w.u(qg, {
		JL: "partsBackwards"
	}, function() {
		return this.zb.Gn
	});
	w.u(qg, {
		g: "diagram"
	}, function() {
		return this.aa
	});
	w.defineProperty(qg, {
		name: "name"
	}, function() {
		return this.Rb
	}, function(a) {
		w.j(a, "string", qg, "name");
		var b = this.Rb;
		if (b !== a) {
			var c = this.g;
			if (null !== c)
				for ("" === b && w.k("Cannot rename default Layer to: " + a), c = c.Qx; c.next();) c.value.name === a && w.k("Layer.name is already present in this diagram: " + a);
			this.Rb = a;
			this.h("name", b, a);
			for (a = this.zb.i; a.next();) a.value.ag = this.Rb
		}
	});
	w.defineProperty(qg, {
		opacity: "opacity"
	}, function() {
		return this.Bc
	}, function(a) {
		var b = this.Bc;
		b !== a && (w.j(a, "number", qg, "opacity"), (0 > a || 1 < a) && w.Fa(a, "0 <= value <= 1", qg, "opacity"), this.Bc = a, this.h("opacity", b, a), a = this.g, null !== a && a.oa())
	});
	w.defineProperty(qg, {
		Pc: "isTemporary"
	}, function() {
		return this.xz
	}, function(a) {
		var b = this.xz;
		b !== a && (w.j(a, "boolean", qg, "isTemporary"), this.xz = a, this.h("isTemporary", b, a))
	});
	w.defineProperty(qg, {
		visible: "visible"
	}, function() {
		return this.$z
	}, function(a) {
		var b = this.$z;
		if (b !== a) {
			w.j(a, "boolean", qg, "visible");
			this.$z = a;
			this.h("visible", b, a);
			for (b = this.zb.i; b.next();) b.value.Cd(a);
			a = this.g;
			null !== a && a.oa()
		}
	});
	w.defineProperty(qg, {
		Ug: "pickable"
	}, function() {
		return this.yl
	}, function(a) {
		var b = this.yl;
		b !== a && (w.j(a, "boolean", qg, "pickable"), this.yl = a, this.h("pickable", b, a))
	});
	w.defineProperty(qg, {
		yF: "isBoundsIncluded"
	}, function() {
		return this.uz
	}, function(a) {
		this.uz !== a && (this.uz = a, null !== this.g && this.g.Fc())
	});
	w.defineProperty(qg, {
		xk: "allowCopy"
	}, function() {
		return this.Sk
	}, function(a) {
		var b = this.Sk;
		b !== a && (w.j(a, "boolean", qg, "allowCopy"), this.Sk = a, this.h("allowCopy", b, a))
	});
	w.defineProperty(qg, {
		hn: "allowDelete"
	}, function() {
		return this.Tk
	}, function(a) {
		var b = this.Tk;
		b !== a && (w.j(a, "boolean", qg, "allowDelete"), this.Tk = a, this.h("allowDelete", b, a))
	});
	w.defineProperty(qg, {
		gx: "allowTextEdit"
	}, function() {
		return this.bl
	}, function(a) {
		var b = this.bl;
		b !== a && (w.j(a, "boolean", qg, "allowTextEdit"), this.bl = a, this.h("allowTextEdit", b, a))
	});
	w.defineProperty(qg, {
		ax: "allowGroup"
	}, function() {
		return this.Uk
	}, function(a) {
		var b = this.Uk;
		b !== a && (w.j(a, "boolean", qg, "allowGroup"), this.Uk = a, this.h("allowGroup", b, a))
	});
	w.defineProperty(qg, {
		hx: "allowUngroup"
	}, function() {
		return this.cl
	}, function(a) {
		var b = this.cl;
		b !== a && (w.j(a, "boolean", qg, "allowUngroup"), this.cl = a, this.h("allowUngroup", b, a))
	});
	w.defineProperty(qg, {
		Kt: "allowLink"
	}, function() {
		return this.Vk
	}, function(a) {
		var b = this.Vk;
		b !== a && (w.j(a, "boolean", qg, "allowLink"), this.Vk = a, this.h("allowLink", b, a))
	});
	w.defineProperty(qg, {
		jn: "allowRelink"
	}, function() {
		return this.Xk
	}, function(a) {
		var b = this.Xk;
		b !== a && (w.j(a, "boolean", qg, "allowRelink"), this.Xk = a, this.h("allowRelink", b, a))
	});
	w.defineProperty(qg, {
		Kl: "allowMove"
	}, function() {
		return this.Wk
	}, function(a) {
		var b = this.Wk;
		b !== a && (w.j(a, "boolean", qg, "allowMove"), this.Wk = a, this.h("allowMove", b, a))
	});
	w.defineProperty(qg, {
		bx: "allowReshape"
	}, function() {
		return this.Yk
	}, function(a) {
		var b = this.Yk;
		b !== a && (w.j(a, "boolean", qg, "allowReshape"), this.Yk = a, this.h("allowReshape", b, a))
	});
	w.defineProperty(qg, {
		Lt: "allowResize"
	}, function() {
		return this.Zk
	}, function(a) {
		var b = this.Zk;
		b !== a && (w.j(a, "boolean", qg, "allowResize"), this.Zk = a, this.h("allowResize", b, a))
	});
	w.defineProperty(qg, {
		ex: "allowRotate"
	}, function() {
		return this.$k
	}, function(a) {
		var b = this.$k;
		b !== a && (w.j(a, "boolean", qg, "allowRotate"), this.$k = a, this.h("allowRotate", b, a))
	});
	w.defineProperty(qg, {
		Af: "allowSelect"
	}, function() {
		return this.al
	}, function(a) {
		var b = this.al;
		b !== a && (w.j(a, "boolean", qg, "allowSelect"), this.al = a, this.h("allowSelect", b, a))
	});

	function D(a) {
		function b() {
			window.document.removeEventListener("DOMContentLoaded", b, !1);
			rl(c)
		}
		1 < arguments.length && w.k("Diagram constructor can only take one optional argument, the DIV HTML element or its id.");
		w.oc(this);
		sl = [];
		this.Vc = !0;
		this.gC = new Xg;
		this.gC.Sc(this);
		this.Ld = 17;
		this.Ur = !1;
		this.Kz = "default";
		var c = this;
		null !== window.document.body ? rl(this) : window.document.addEventListener("DOMContentLoaded", b, !1);
		this.dc = new H(qg);
		this.Mb = this.Jb = 0;
		this.mk = this.Nb = this.hf = this.Cb = null;
		this.eG();
		this.Mo =
			null;
		this.dG();
		this.jb = (new y(NaN, NaN)).freeze();
		this.vb = 1;
		this.Uv = (new y(NaN, NaN)).freeze();
		this.Vv = NaN;
		this.mw = 1E-4;
		this.kw = 100;
		this.kd = new ka;
		this.Xw = (new y(NaN, NaN)).freeze();
		this.Mv = (new B(NaN, NaN, NaN, NaN)).freeze();
		this.Ew = (new hb(0, 0, 0, 0)).freeze();
		this.Fw = tl;
		this.Iw = !0;
		this.Bw = this.zw = null;
		this.vm = ph;
		this.qo = qc;
		this.nl = ph;
		this.Jo = qc;
		this.Wv = this.Tv = zb;
		this.De = !0;
		this.Pr = !1;
		this.vg = new I(R);
		this.hl = new ma(W, B);
		this.vr = !0;
		this.Sq = 250;
		this.lo = -1;
		this.rv = (new hb(16, 16, 16, 16)).freeze();
		this.tr =
			this.Tf = !1;
		this.Eo = !0;
		this.Li = new zf;
		this.wd = new zf;
		this.Yb = new zf;
		this.hh = this.zi = null;
		this.tp = !1;
		this.bz = this.cz = null;
		this.Py = window.PointerEvent && (w.aq || w.bq || w.PA) && window.navigator && !1 !== window.navigator.msPointerEnabled;
		ul(this);
		this.bp = new I(T);
		this.El = new I(V);
		this.Vo = new I(W);
		this.zb = new I(R);
		this.aw = !0;
		this.Sw = vl;
		this.cD = !1;
		this.Uw = Vi;
		this.Xy = this.$y = this.Vz = null;
		this.yv = "";
		this.or = "auto";
		this.Di = this.gj = this.Vi = this.pw = this.Wi = this.Xi = this.Yi = this.Ci = this.Ii = this.Ai = null;
		this.Ez = !1;
		this.Iz = {};
		this.ep = [null, null];
		this.Uy = null;
		this.Kq = this.az = this.Qz = this.QD = this.fj = !1;
		this.nD = !0;
		this.wz = this.$d = !1;
		this.ne = null;
		var d = this;
		this.uD = function(a) {
			if (a.$ === d.$ && d.Ta) {
				d.Ta = !1;
				try {
					var b = a.Dc;
					"" === a.sf && b === Df && wl(d, a.object, a.propertyName)
				} finally {
					d.Ta = !0
				}
			}
		};
		this.vD = function(a) {
			xl(d, a)
		};
		this.nE = !0;
		this.bh = -2;
		this.Ei = new ma(Object, R);
		this.Oj = new ma(Object, W);
		this.Hm = new ma(Object, Array);
		this.dp = new ma("string", Array);
		this.Hz = new H(yl);
		this.Oi = !1;
		this.Tk = this.Sk = this.hv = this.jf = !0;
		this.jv = this.iv = !1;
		this.ov = this.mv = this.al = this.$k = this.Zk = this.Yk = this.Wk = this.Xk = this.Vk = this.lv = this.cl = this.Uk = this.bl = !0;
		this.eh = this.kD = !1;
		this.nv = this.kv = this.Rv = this.Qv = !0;
		this.Hw = this.Dw = 16;
		this.Mz = this.Cw = !1;
		this.bt = this.Gw = null;
		this.Nz = this.Oz = 0;
		this.lf = (new hb(5)).freeze();
		this.Kw = (new I(R)).freeze();
		this.lw = 999999999;
		this.Sv = (new I(R)).freeze();
		this.ol = this.Em = this.Zj = !0;
		this.ll = this.Yj = !1;
		this.le = null;
		this.dl = !0;
		this.dh = !1;
		this.UG = new I(W);
		this.aD = new I(zl);
		this.Kd = null;
		this.AD = 1;
		this.TD = 0;
		this.nh = {
			scale: 1,
			position: new y,
			bounds: new B,
			isScroll: !1
		};
		this.mE = (new B(NaN, NaN, NaN, NaN)).freeze();
		this.Fv = (new B(NaN, NaN, NaN, NaN)).freeze();
		this.bw = !1;
		this.Hv = null;
		this.ww = new I(Al);
		Bl(this);
		this.gw = this.Ov = this.qw = this.HC = this.GC = this.IC = this.fk = this.jl = this.Zi = null;
		Cl(this);
		this.td = null;
		this.Nv = !1;
		this.to = null;
		this.eb = new ih;
		this.eb.initializeStandardTools();
		this.$a = this.Pt = this.eb;
		this.pb = new sg;
		this.$ = new Q;
		this.fj = !0;
		this.Sb = new tg;
		this.fj = !1;
		this.TC = this.fz = null;
		this.Hd = 1;
		this.pk = null;
		var e = w.vfo.split(".");
		!0 !== w.tx.licenseKey && "1" === e[0] && 7 > parseInt(e[1], 10) && (w.trace("Warning: You have entered a license key for GoJS version 1.7 or later, but this library is version " + w.vfo + ". This license key will do nothing until you upgrade to GoJS 1.7 or later."), w.tx.licenseKey = !0);
		this.Uh = 1;
		this.ek = 0;
		this.dw = new y;
		this.Xz = 500;
		this.qv = new y;
		this.kt = null;
		this.bk = !1;
		this.preventDefault = this.hy = this.nq = this.oq = this.mq = this.lq = this.On = this.Qn = this.Pn = this.Mn = this.Nn = this.TB = this.LB = this.MB = this.NB = this.Al = this.Ys =
			this.zl = this.Xs = null;
		this.Yv = !1;
		this.ml = new Dl;
		void 0 !== a && El(this, a);
		this.Vc = !1
	}
	w.ga("Diagram", D);
	D.prototype.clear = D.prototype.clear = function() {
		var a = null;
		null !== this.td && (a = this.td.U);
		this.$.clear();
		for (var b = this.dc.length, c = 0; c < b; c++) this.dc.n[c].clear();
		this.vg.clear();
		this.hl.clear();
		this.bp.clear();
		this.El.clear();
		this.Vo.clear();
		this.zb.clear();
		this.Ei.clear();
		this.Oj.clear();
		this.Hm.clear();
		this.Kw.Qa();
		this.Kw.clear();
		this.Kw.freeze();
		this.Sv.Qa();
		this.Sv.clear();
		this.Sv.freeze();
		gh = this.to = null;
		hh = "";
		this.Fv = (new B(NaN, NaN, NaN, NaN)).freeze();
		null !== a && (this.add(a), this.zb.remove(a));
		this.oa()
	};
	D.prototype.reset = D.prototype.reset = function() {
		this.Vc = !0;
		this.clear();
		this.dc = new H(qg);
		this.eG();
		this.dG();
		this.jb = (new y(NaN, NaN)).freeze();
		this.vb = 1;
		this.Uv = (new y(NaN, NaN)).freeze();
		this.Vv = NaN;
		this.mw = 1E-4;
		this.kw = 100;
		this.Xw = (new y(NaN, NaN)).freeze();
		this.Mv = (new B(NaN, NaN, NaN, NaN)).freeze();
		this.Ew = (new hb(0, 0, 0, 0)).freeze();
		this.Fw = tl;
		this.Iw = !0;
		this.Bw = this.zw = null;
		this.vm = ph;
		this.qo = qc;
		this.nl = ph;
		this.Jo = qc;
		this.Wv = this.Tv = zb;
		this.Sq = 250;
		this.rv = (new hb(16, 16, 16, 16)).freeze();
		this.aw = !0;
		this.Sw = vl;
		this.Uw = Vi;
		this.or = "auto";
		this.Di = this.gj = this.Vi = this.pw = this.Wi = this.Xi = this.Yi = this.Ci = this.Ii = this.Ai = null;
		this.Oi = !1;
		this.Tk = this.Sk = this.hv = this.jf = !0;
		this.jv = this.iv = !1;
		this.nv = this.kv = this.Rv = this.Qv = this.ov = this.mv = this.al = this.$k = this.Zk = this.Yk = this.Wk = this.Xk = this.Vk = this.lv = this.cl = this.Uk = this.bl = !0;
		this.Hw = this.Dw = 16;
		this.lf = (new hb(5)).freeze();
		this.lw = 999999999;
		this.le = null;
		this.bw = !1;
		Cl(this);
		this.td = null;
		this.eb = new ih;
		this.eb.initializeStandardTools();
		this.$a = this.Pt =
			this.eb;
		this.pb = new sg;
		this.fj = !0;
		Bl(this);
		this.Sb = new tg;
		this.fj = !1;
		this.$ = new Q;
		this.dh = !1;
		this.Eo = !0;
		this.Vc = this.Tf = !1;
		this.oa();
		this.hh = this.zi = null;
		ul(this);
		this.yv = ""
	};

	function Cl(a) {
		a.Zi = new ma("string", R);
		var b = new T,
			c = new Lh;
		c.bind(new bh("text", "", Rf));
		b.add(c);
		a.IC = b;
		a.Zi.add("", b);
		b = new T;
		c = new Lh;
		c.stroke = "brown";
		c.bind(new bh("text", "", Rf));
		b.add(c);
		a.Zi.add("Comment", b);
		b = new T;
		b.gm = !1;
		b.fA = !1;
		c = new X;
		c.Db = "Ellipse";
		c.fill = "black";
		c.stroke = null;
		c.Ca = (new ia(3, 3)).Ha();
		b.add(c);
		a.Zi.add("LinkLabel", b);
		a.jl = new ma("string", V);
		b = new V;
		b.vB = "GROUPPANEL";
		b.type = Fl;
		c = new Lh;
		c.font = "bold 12pt sans-serif";
		c.bind(new bh("text", "", Rf));
		b.add(c);
		c = new C(Gl);
		c.name =
			"GROUPPANEL";
		var d = new X;
		d.Db = "Rectangle";
		d.fill = "rgba(128,128,128,0.2)";
		d.stroke = "black";
		c.add(d);
		d = new Oj;
		d.padding = (new hb(5, 5, 5, 5)).Ha();
		c.add(d);
		b.add(c);
		a.GC = b;
		a.jl.add("", b);
		a.fk = new ma("string", W);
		b = new W;
		c = new X;
		c.ef = !0;
		b.add(c);
		c = new X;
		c.Dq = "Standard";
		c.fill = "black";
		c.stroke = null;
		c.mb = 0;
		b.add(c);
		a.HC = b;
		a.fk.add("", b);
		b = new W;
		c = new X;
		c.ef = !0;
		c.stroke = "brown";
		b.add(c);
		a.fk.add("Comment", b);
		b = new kh;
		b.type = Gl;
		c = new X;
		c.fill = null;
		c.stroke = "dodgerblue";
		c.mb = 3;
		b.add(c);
		c = new Oj;
		c.margin = (new hb(1.5,
			1.5, 1.5, 1.5)).Ha();
		b.add(c);
		a.qw = b;
		a.Ov = b;
		b = new kh;
		b.type = ij;
		c = new X;
		c.ef = !0;
		c.fill = null;
		c.stroke = "dodgerblue";
		c.mb = 3;
		b.add(c);
		a.gw = b
	}

	function rl(a) {
		var b = w.createElement("p");
		b.style.width = "100%";
		b.style.height = "200px";
		b.style.boxSizing = "content-box";
		var c = w.createElement("div");
		c.style.position = "absolute";
		c.style.visibility = "hidden";
		c.style.width = "200px";
		c.style.height = "150px";
		c.style.overflow = "hidden";
		c.style.boxSizing = "content-box";
		c.appendChild(b);
		window.document.body.appendChild(c);
		var d = b.offsetWidth;
		c.style.overflow = "scroll";
		b = b.offsetWidth;
		d === b && (b = c.clientWidth);
		window.document.body.removeChild(c);
		c = d - b;
		0 !== c || w.BF ||
			(c = 11);
		a.Ld = c;
		c = w.createElement("div");
		c.dir = "rtl";
		c.style.cssText = "font-size: 14px; width: 1px; height: 1px; position: absolute; top: -1000px; overflow: scroll;";
		c.textContent = "A";
		window.document.body.appendChild(c);
		d = "reverse";
		0 < c.scrollLeft ? d = "default" : (c.scrollLeft = 1, 0 === c.scrollLeft && (d = "negative"));
		window.document.body.removeChild(c);
		a.Kz = d
	}
	D.prototype.ic = function(a) {
		a.Ge === D ? this.Ml = a : w.Ij(this, a)
	};
	D.prototype.toString = function(a) {
		void 0 === a && (a = 0);
		var b = "";
		this.qj && this.qj.id && (b = this.qj.id);
		b = 'Diagram "' + b + '"';
		if (0 >= a) return b;
		for (var c = this.dc.i; c.next();) b += "\n  " + c.value.toString(a - 1);
		return b
	};
	D.fromDiv = function(a) {
		var b = a;
		"string" === typeof a && (b = window.document.getElementById(a));
		return b instanceof HTMLDivElement && b.aa instanceof D ? b.aa : null
	};
	w.defineProperty(D, {
		qj: "div"
	}, function() {
		return this.Nb
	}, function(a) {
		null !== a && w.G(a, HTMLDivElement, D, "div");
		if (this.Nb !== a) {
			sl = [];
			var b = this.Nb;
			null !== b ? (b.aa = void 0, b.innerHTML = "", null !== this.Cb && (this.Cb.removeEventListener("touchstart", this.NB, !1), this.Cb.removeEventListener("touchmove", this.MB, !1), this.Cb.removeEventListener("touchend", this.LB, !1), this.Cb.Od.aa = null), b = this.eb, null !== b && (b.ff.each(function(a) {
					a.cancelWaitAfter()
				}), b.dg.each(function(a) {
					a.cancelWaitAfter()
				}), b.eg.each(function(a) {
					a.cancelWaitAfter()
				})),
				b.cancelWaitAfter(), this.$a.doCancel(), this.hf = this.Cb = null, window.removeEventListener("resize", this.TB, !1), window.removeEventListener("mousemove", this.Nn, !0), window.removeEventListener("mousedown", this.Mn, !0), window.removeEventListener("mouseup", this.Pn, !0), window.removeEventListener("wheel", this.Qn, !0), window.removeEventListener("mouseout", this.On, !0)) : this.dh = !1;
			this.Nb = null;
			if (null !== a) {
				if (b = a.aa) b.qj = null;
				El(this, a);
				this.Mu()
			}
		}
	});

	function Hl(a) {
		var b = a.Cb;
		a.Py ? (b.addEventListener("pointerdown", a.lq, !1), b.addEventListener("pointermove", a.mq, !1), b.addEventListener("pointerup", a.oq, !1), b.addEventListener("pointerout", a.nq, !1)) : (b.addEventListener("touchstart", a.NB, !1), b.addEventListener("touchmove", a.MB, !1), b.addEventListener("touchend", a.LB, !1), b.addEventListener("mousemove", a.Nn, !1), b.addEventListener("mousedown", a.Mn, !1), b.addEventListener("mouseup", a.Pn, !1), b.addEventListener("mouseout", a.On, !1));
		b.addEventListener("wheel",
			a.Qn, !1);
		b.addEventListener("keydown", a.HI, !1);
		b.addEventListener("keyup", a.II, !1);
		b.addEventListener("selectstart", function(a) {
			a.preventDefault();
			return !1
		}, !1);
		b.addEventListener("contextmenu", function(a) {
			a.preventDefault();
			return !1
		}, !1);
		b.addEventListener("gesturechange", function(b) {
			a.eb.Vp === Ak && b.preventDefault()
		}, !1);
		window.addEventListener("resize", a.TB, !1)
	}
	D.prototype.computePixelRatio = function() {
		if (null !== this.pk) return this.pk;
		var a = this.hf;
		return (window.devicePixelRatio || 1) / (a.ua.webkitBackingStorePixelRatio || a.ua.mozBackingStorePixelRatio || a.ua.msBackingStorePixelRatio || a.ua.oBackingStorePixelRatio || a.ua.backingStorePixelRatio || 1)
	};
	D.prototype.doMouseMove = function() {
		this.$a.doMouseMove()
	};
	D.prototype.doMouseDown = function() {
		this.$a.doMouseDown()
	};
	D.prototype.doMouseUp = function() {
		this.$a.doMouseUp()
	};
	D.prototype.doMouseWheel = function() {
		this.$a.doMouseWheel()
	};
	D.prototype.doKeyDown = function() {
		this.$a.doKeyDown()
	};
	D.prototype.doKeyUp = function() {
		this.$a.doKeyUp()
	};
	D.prototype.doFocus = function() {
		this.focus()
	};
	D.prototype.focus = D.prototype.focus = function() {
		if (this.Cb)
			if (this.DJ) this.Cb.focus();
			else {
				var a = window.scrollX || window.pageXOffset,
					b = window.scrollY || window.pageYOffset;
				this.Cb.focus();
				window.scrollTo(a, b)
			}
	};

	function Tk(a) {
		if (null !== a.Cb) {
			var b = a.Nb;
			if (0 !== b.clientWidth && 0 !== b.clientHeight) {
				var c = a.ll ? a.Ld : 0,
					d = a.Yj ? a.Ld : 0,
					e = a.Hd;
				a.Hd = a.computePixelRatio();
				a.Hd !== e && (a.Pr = !0, a.Ne());
				if (b.clientWidth !== a.Jb + c || b.clientHeight !== a.Mb + d) a.Em = !0, a.De = !0, b = a.Sb, null !== b && b.Mx && a.Ml === ph && (a.tr = !0, b.J()), a.$d || a.Ne()
			}
		}
	}

	function Bl(a) {
		var b = new qg;
		b.name = "Background";
		a.Et(b);
		b = new qg;
		b.name = "";
		a.Et(b);
		b = new qg;
		b.name = "Foreground";
		a.Et(b);
		b = new qg;
		b.name = "Adornment";
		b.Pc = !0;
		a.Et(b);
		b = new qg;
		b.name = "Tool";
		b.Pc = !0;
		b.yF = !0;
		a.Et(b);
		b = new qg;
		b.name = "Grid";
		b.Af = !1;
		b.Ug = !1;
		b.Pc = !0;
		a.kH(b, a.Vt("Background"))
	}

	function Il(a) {
		a.td = new C(Jl);
		a.td.name = "GRID";
		var b = new X;
		b.Db = "LineH";
		b.stroke = "lightgray";
		b.mb = .5;
		b.interval = 1;
		a.td.add(b);
		b = new X;
		b.Db = "LineH";
		b.stroke = "gray";
		b.mb = .5;
		b.interval = 5;
		a.td.add(b);
		b = new X;
		b.Db = "LineH";
		b.stroke = "gray";
		b.mb = 1;
		b.interval = 10;
		a.td.add(b);
		b = new X;
		b.Db = "LineV";
		b.stroke = "lightgray";
		b.mb = .5;
		b.interval = 1;
		a.td.add(b);
		b = new X;
		b.Db = "LineV";
		b.stroke = "gray";
		b.mb = .5;
		b.interval = 5;
		a.td.add(b);
		b = new X;
		b.Db = "LineV";
		b.stroke = "gray";
		b.mb = 1;
		b.interval = 10;
		a.td.add(b);
		b = new R;
		b.add(a.td);
		b.ag = "Grid";
		b.eo = 0;
		b.RA = !1;
		b.xF = !1;
		b.Ug = !1;
		b.WA = "GRID";
		a.add(b);
		a.zb.remove(b);
		a.td.visible = !1
	}

	function Kl() {
		this.aa.isEnabled ? this.aa.QH(this) : Ll(this.aa)
	}

	function Ml(a) {
		this.aa.isEnabled ? (this.aa.Mz = !0, this.aa.Oz = a.target.scrollTop, this.aa.Nz = a.target.scrollLeft) : Ll(this.aa)
	}
	D.prototype.diagramScroll = D.prototype.QH = function(a) {
		if (this.Mz && null !== this.Cb) {
			this.Cw = !0;
			var b = this.te,
				c = this.rb,
				d = this.oy,
				e = b.x - d.left,
				f = b.y - d.top,
				h = b.width + d.left + d.right,
				k = b.height + d.top + d.bottom,
				l = b.right + d.right,
				d = b.bottom + d.bottom,
				m = c.x,
				b = c.y,
				n = c.width,
				p = c.height,
				q = c.right,
				r = c.bottom,
				c = this.scale,
				s;
			s = a.scrollLeft;
			if (this.Ur) switch (this.Kz) {
				case "negative":
					s = s + a.scrollWidth - a.clientWidth;
					break;
				case "reverse":
					s = a.scrollWidth - s - a.clientWidth
			}
			var u = s;
			n < h || p < k ? (s = w.xb(this.position.x, this.position.y),
				this.pe && this.Nz !== u && (s.x = u / c + e, this.Nz = u), this.qe && this.Oz !== a.scrollTop && (s.y = a.scrollTop / c + f, this.Oz = a.scrollTop), this.position = s, w.v(s), this.Em = this.Cw = !1) : (s = w.K(), a.aH && this.pe && (e < m && (this.position = s.m(u + e, this.position.y)), l > q && (this.position = s.m(-(this.Gw.scrollWidth - this.Jb) + u - this.Jb / c + l, this.position.y))), a.bH && this.qe && (f < b && (this.position = s.m(this.position.x, a.scrollTop + f)), d > r && (this.position = s.m(this.position.x, -(this.Gw.scrollHeight - this.Mb) + a.scrollTop - this.Mb / c + d))), w.v(s), Nl(this),
				this.Em = this.Cw = !1, b = this.te, c = this.rb, l = b.right, q = c.right, d = b.bottom, r = c.bottom, e = b.x, m = c.x, f = b.y, b = c.y, n >= h && e >= m && l <= q && (this.bt.style.width = "1px"), p >= k && f >= b && d <= r && (this.bt.style.height = "1px"))
		}
	};
	D.prototype.computeBounds = D.prototype.sh = function() {
		0 < this.vg.count && Hi(this);
		return Ol(this)
	};

	function Ol(a) {
		if (a.eF.I()) {
			var b = a.eF.copy();
			b.Zw(a.padding);
			return b
		}
		for (var c = !0, d = a.dc.n, e = d.length, f = 0; f < e; f++) {
			var h = d[f];
			if (h.visible && (!h.Pc || h.yF))
				for (var h = h.zb.n, k = h.length, l = 0; l < k; l++) {
					var m = h[l];
					m.RA && m.isVisible() && (m = m.Y, m.I() && (c ? (c = !1, b = m.copy()) : b.Ih(m)))
				}
		}
		c && (b = new B(0, 0, 0, 0));
		b.Zw(a.padding);
		return b
	}
	D.prototype.computePartsBounds = function(a, b) {
		void 0 === b && (b = !1);
		for (var c = null, d = a.i; d.next();) {
			var e = d.value;
			!b && e instanceof W || (e.$e(), null === c ? c = e.Y.copy() : c.Ih(e.Y))
		}
		return null === c ? new B(NaN, NaN, 0, 0) : c
	};

	function Pl(a, b) {
		if ((b || a.dh) && !a.Vc && null !== a.Cb && !a.Ka.cf && a.te.I()) {
			a.Vc = !0;
			var c = a.vm;
			b && a.nl !== ph && (c = a.nl);
			var d = c !== ph ? Ql(a, c) : a.scale,
				c = a.rb.copy(),
				e = a.Jb / d,
				f = a.Mb / d,
				h = null,
				k = a.Ka;
			k.rc && (h = a.jb.copy());
			a.position.Qa();
			var l = a.qo;
			b && !l.$c() && a.Jo.$c() && (l = a.Jo);
			Rl(a, a.jb, a.te, e, f, l, b);
			a.position.freeze();
			null !== h && il(k, h, a.jb);
			e = a.scale;
			a.scale = d;
			a.Vc = !1;
			d = a.rb;
			d.Oc(c) || a.Ju(c, d, e, a.scale, !1)
		}
	}

	function Ql(a, b) {
		var c = a.pb.qx;
		if (null === a.Cb) return c;
		a.Zj && Sl(a, a.sh());
		var d = a.te;
		if (!d.I()) return c;
		var e = d.width,
			d = d.height,
			f = a.Jb,
			h = a.Mb,
			k = f / e,
			l = h / d;
		return b === Tl ? (e = Math.min(l, k), e > c && (e = c), e < a.Ah && (e = a.Ah), e > a.zh && (e = a.zh), e) : b === Ul ? (e = l > k ? (h - a.Ld) / d : (f - a.Ld) / e, e > c && (e = c), e < a.Ah && (e = a.Ah), e > a.zh && (e = a.zh), e) : a.scale
	}
	D.prototype.zoomToFit = D.prototype.zoomToFit = function() {
		this.scale = Ql(this, Tl)
	};
	D.prototype.zoomToRect = function(a, b) {
		void 0 === b && (b = Tl);
		var c = a.width,
			d = a.height;
		if (!(0 === c || 0 === d || isNaN(c) && isNaN(d))) {
			var e = 1;
			if (b === Tl || b === Ul)
				if (isNaN(c)) e = this.rb.height * this.scale / d;
				else if (isNaN(d)) e = this.rb.width * this.scale / c;
			else var e = this.Jb,
				f = this.Mb,
				e = b === Ul ? f / d > e / c ? (f - (this.Yj ? this.Ld : 0)) / d : (e - (this.ll ? this.Ld : 0)) / c : Math.min(f / d, e / c);
			this.scale = e;
			this.position = new y(a.x, a.y)
		}
	};
	w.defineProperty(D, {
		OA: null
	}, function() {
		return this.Vc
	}, function(a) {
		this.Vc = a
	});
	D.prototype.alignDocument = function(a, b) {
		this.Zj && Sl(this, this.sh());
		var c = this.te,
			d = this.rb;
		this.position = new y(c.x + (a.x * c.width + a.offsetX) - (b.x * d.width - b.offsetX), c.y + (a.y * c.height + a.offsetY) - (b.y * d.height - b.offsetY))
	};

	function Rl(a, b, c, d, e, f, h) {
		var k = b.x,
			l = b.y;
		if (h || a.sB === tl) f.$c() && (d > c.width && (k = c.x + (f.x * c.width + f.offsetX) - (f.x * d - f.offsetX)), e > c.height && (l = c.y + (f.y * c.height + f.offsetY) - (f.y * e - f.offsetY))), f = a.oy, h = d - c.width, d < c.width + f.left + f.right ? (k = Math.min(k + d / 2, c.right + Math.max(h, f.right) - d / 2), k = Math.max(k, c.left - Math.max(h, f.left) + d / 2), k -= d / 2) : k > c.left ? k = c.left : k < c.right - d && (k = c.right - d), d = e - c.height, e < c.height + f.top + f.bottom ? (l = Math.min(l + e / 2, c.bottom + Math.max(d, f.bottom) - e / 2), l = Math.max(l, c.top - Math.max(d,
			f.top) + e / 2), l -= e / 2) : l > c.top ? l = c.top : l < c.bottom - e && (l = c.bottom - e);
		b.x = isFinite(k) ? k : -a.padding.left;
		b.y = isFinite(l) ? l : -a.padding.top;
		null !== a.YF && (a = a.YF(a, b), b.x = a.x, b.y = a.y)
	}
	D.prototype.findPartAt = D.prototype.Xt = function(a, b) {
		var c = b ? Li(this, a, function(a) {
			return a.U
		}, function(a) {
			return a.canSelect()
		}) : Li(this, a, function(a) {
			return a.U
		});
		return c instanceof R ? c : null
	};
	D.prototype.findObjectAt = D.prototype.Le = function(a, b, c) {
		void 0 === b && (b = null);
		void 0 === c && (c = null);
		Hi(this);
		for (var d = this.dc.Gn; d.next();) {
			var e = d.value;
			if (e.visible && (e = e.Le(a, b, c), null !== e)) return e
		}
		return null
	};

	function Li(a, b, c, d) {
		void 0 === c && (c = null);
		void 0 === d && (d = null);
		Hi(a);
		for (a = a.dc.Gn; a.next();) {
			var e = a.value;
			if (e.visible && !e.Pc && (e = e.Le(b, c, d), null !== e)) return e
		}
		return null
	}
	D.prototype.findObjectsAt = D.prototype.Wt = function(a, b, c, d) {
		void 0 === b && (b = null);
		void 0 === c && (c = null);
		d instanceof H || d instanceof I || (d = new I(G));
		Hi(this);
		for (var e = this.dc.Gn; e.next();) {
			var f = e.value;
			f.visible && f.Wt(a, b, c, d)
		}
		return d
	};
	D.prototype.findObjectsIn = D.prototype.Fk = function(a, b, c, d, e) {
		void 0 === b && (b = null);
		void 0 === c && (c = null);
		void 0 === d && (d = !1);
		e instanceof H || e instanceof I || (e = new I(G));
		Hi(this);
		for (var f = this.dc.Gn; f.next();) {
			var h = f.value;
			h.visible && h.Fk(a, b, c, d, e)
		}
		return e
	};
	D.prototype.xA = function(a, b, c, d, e, f) {
		var h = new I(G);
		Hi(this);
		for (var k = this.dc.Gn; k.next();) {
			var l = k.value;
			l.visible && l.xA(a, b, c, d, h, e, f)
		}
		return h
	};
	D.prototype.findObjectsNear = D.prototype.vn = function(a, b, c, d, e, f) {
		void 0 === c && (c = null);
		void 0 === d && (d = null);
		void 0 === e && (e = !0);
		if (!1 !== e && !0 !== e) {
			if (e instanceof H || e instanceof I) f = e;
			e = !0
		}
		f instanceof H || f instanceof I || (f = new I(G));
		Hi(this);
		for (var h = this.dc.Gn; h.next();) {
			var k = h.value;
			k.visible && k.vn(a, b, c, d, e, f)
		}
		return f
	};
	D.prototype.acceptEvent = function(a) {
		var b = this.wd;
		this.wd = this.Yb;
		this.Yb = b;
		Vl(this, this, a, b, a instanceof MouseEvent);
		return b
	};

	function Vl(a, b, c, d, e) {
		d.g = b;
		d.event = c;
		e ? Wl(a, c, d) : (d.gf = b.Yb.gf, d.da = b.Yb.da);
		a = 0;
		c.ctrlKey && (a += 1);
		c.altKey && (a += 2);
		c.shiftKey && (a += 4);
		c.metaKey && (a += 8);
		d.md = a;
		d.button = c.button;
		void 0 === c.buttons || w.ru || (d.buttons = c.buttons);
		w.yh && 0 === c.button && c.ctrlKey && (d.button = 2);
		d.Dk = !1;
		d.up = !1;
		d.re = 1;
		d.Ck = 0;
		d.tc = !1;
		d.bubbles = !1;
		d.timestamp = Date.now();
		d.tu = !1;
		d.If = Xl(c);
		d.Ae = null
	}

	function Xl(a) {
		var b = a.target.aa;
		if (!b) {
			var c = a.path;
			c || "function" !== typeof a.zH || (c = a.zH());
			c && c[0] && (b = c[0].aa)
		}
		return b ? b : null
	}

	function Yl(a, b, c, d) {
		var e = a.wd;
		a.wd = a.Yb;
		a.Yb = e;
		e.g = a;
		Wl(a, c, e);
		e.button = 0;
		e.buttons = 1;
		c = 0;
		b.ctrlKey && (c += 1);
		b.altKey && (c += 2);
		b.shiftKey && (c += 4);
		b.metaKey && (c += 8);
		e.md = c;
		e.Dk = !0;
		e.up = !1;
		e.re = 1;
		e.Ck = 0;
		e.tc = !1;
		e.bubbles = !0;
		e.event = b;
		e.timestamp = Date.now();
		e.tu = d;
		e.If = Xl(b);
		e.Ae = null;
		d || (a.Li = e.copy());
		Sh = null;
		return e
	}

	function Zl(a, b, c, d) {
		var e = a.wd;
		a.wd = a.Yb;
		a.Yb = e;
		var f = null;
		e.g = a;
		null !== c ? ((f = window.document.elementFromPoint(c.clientX, c.clientY)) && f.aa ? f = f.aa : (c = void 0 !== b.targetTouches ? b.targetTouches[0] : b, f = a), e.If = f, Wl(a, c, e)) : null !== a.wd ? (e.da = a.wd.da, e.gf = a.wd.gf, e.If = a.wd.If) : null !== a.Li && (e.da = a.Li.da, e.gf = a.Li.gf, e.If = a.Li.If);
		e.button = 0;
		e.buttons = 1;
		a = 0;
		b.ctrlKey && (a += 1);
		b.altKey && (a += 2);
		b.shiftKey && (a += 4);
		b.metaKey && (a += 8);
		e.md = a;
		e.Dk = !1;
		e.up = !1;
		e.re = 1;
		e.Ck = 0;
		e.tc = !1;
		e.bubbles = !1;
		e.event = b;
		e.timestamp =
			Date.now();
		e.tu = d;
		e.Ae = null;
		return e
	}

	function $l(a, b) {
		if (a.bubbles) return !0;
		void 0 !== b.stopPropagation && b.stopPropagation();
		b.preventDefault();
		b.cancelBubble = !0;
		return !1
	}
	D.prototype.HI = function(a) {
		if (!this.aa.isEnabled) return !1;
		var b = this.aa.Yb;
		Vl(this.aa, this.aa, a, b, !1);
		b.key = String.fromCharCode(a.which);
		b.Dk = !0;
		switch (a.which) {
			case 8:
				b.key = "Backspace";
				break;
			case 33:
				b.key = "PageUp";
				break;
			case 34:
				b.key = "PageDown";
				break;
			case 35:
				b.key = "End";
				break;
			case 36:
				b.key = "Home";
				break;
			case 37:
				b.key = "Left";
				break;
			case 38:
				b.key = "Up";
				break;
			case 39:
				b.key = "Right";
				break;
			case 40:
				b.key = "Down";
				break;
			case 45:
				b.key = "Insert";
				break;
			case 46:
				b.key = "Del";
				break;
			case 48:
				b.key = "0";
				break;
			case 187:
			case 61:
			case 107:
				b.key =
					"Add";
				break;
			case 189:
			case 173:
			case 109:
				b.key = "Subtract";
				break;
			case 27:
				b.key = "Esc"
		}
		this.aa.doKeyDown();
		return $l(b, a)
	};
	D.prototype.II = function(a) {
		if (!this.aa.isEnabled) return !1;
		var b = this.aa.Yb;
		Vl(this.aa, this.aa, a, b, !1);
		b.key = String.fromCharCode(a.which);
		b.up = !0;
		switch (a.which) {
			case 8:
				b.key = "Backspace";
				break;
			case 33:
				b.key = "PageUp";
				break;
			case 34:
				b.key = "PageDown";
				break;
			case 35:
				b.key = "End";
				break;
			case 36:
				b.key = "Home";
				break;
			case 37:
				b.key = "Left";
				break;
			case 38:
				b.key = "Up";
				break;
			case 39:
				b.key = "Right";
				break;
			case 40:
				b.key = "Down";
				break;
			case 45:
				b.key = "Insert";
				break;
			case 46:
				b.key = "Del"
		}
		this.aa.doKeyUp();
		return $l(b, a)
	};
	D.prototype.Gr = function(a) {
		var b = this.Cb;
		if (null === b) return new y(0, 0);
		var c = this.Jb,
			d = this.Mb,
			b = b.getBoundingClientRect(),
			c = a.clientX - c / b.width * b.left;
		a = a.clientY - d / b.height * b.top;
		return null !== this.kd ? (a = new y(c, a), Pa(a, this.kd), a) : new y(c, a)
	};

	function Wl(a, b, c) {
		var d = a.Cb,
			e = a.Jb,
			f = a.Mb,
			h = 0,
			k = 0;
		null !== d && (d = d.getBoundingClientRect(), h = b.clientX - e / d.width * d.left, k = b.clientY - f / d.height * d.top);
		c.gf.m(h, k);
		null !== a.kd ? (b = w.xb(h, k), a.kd.wh(b), c.da.assign(b), w.v(b)) : c.da.m(h, k)
	}

	function Af(a, b, c, d) {
		var e = null;
		if (void 0 !== b.targetTouches) {
			if (2 > b.targetTouches.length) return;
			e = b.targetTouches[c]
		} else if (null !== a.ep[0]) e = a.ep[c];
		else return;
		c = a.Cb;
		b = a.Jb;
		a = a.Mb;
		var f = 0,
			h = 0;
		null !== c && null !== e && (c = c.getBoundingClientRect(), f = e.clientX - b / c.width * c.left, h = e.clientY - a / c.height * c.top);
		d.m(f, h)
	}
	D.prototype.invalidateDocumentBounds = D.prototype.Fc = function() {
		this.Zj || (this.Zj = !0, this.Ne(!0))
	};

	function fl(a) {
		a.$d || Hi(a);
		a.Zj && Sl(a, a.sh())
	}
	D.prototype.redraw = D.prototype.Mu = function() {
		this.Vc || this.$d || (this.oa(), am(this), Nl(this), this.Fc(), this.cg())
	};
	D.prototype.isUpdateRequested = function() {
		return this.Tf
	};
	D.prototype.delayInitialization = function(a) {
		void 0 === a && (a = null);
		var b = this.Ka,
			c = b.isEnabled;
		b.Gh();
		b.isEnabled = !1;
		Ri(this);
		this.dh = !1;
		b.isEnabled = c;
		null !== a && w.setTimeout(a, 1)
	};
	D.prototype.requestUpdate = D.prototype.Ne = function(a) {
		void 0 === a && (a = !1);
		if (!0 !== this.Tf && !(this.Vc || !1 === a && this.$d)) {
			this.Tf = !0;
			var b = this;
			requestAnimationFrame(function() {
				b.Tf && b.cg()
			})
		}
	};
	D.prototype.maybeUpdate = D.prototype.cg = function() {
		if (!this.Eo || this.Tf) this.Eo && (this.Eo = !1), Ri(this)
	};

	function bm(a, b) {
		a.Ka.cf || a.Vc || !a.Em || Ll(a) || (b && Hi(a), Pl(a, !1))
	}

	function Ri(a) {
		if (!a.$d && (a.Tf = !1, null !== a.Nb)) {
			a.$d = !0;
			var b = a.Ka,
				c = a.Hz;
			if (!b.Po && 0 !== c.length) {
				for (var d = c.n, e = d.length, f = 0; f < e; f++) {
					var h = d[f];
					cm(h, !1);
					h.H()
				}
				c.clear()
			}
			c = a.aD;
			0 < c.count && (c.each(function(a) {
				a.RB()
			}), c.clear());
			d = c = !1;
			b.cf && (d = !0, c = a.bb, a.bb = !0);
			b.rc || Tk(a);
			bm(a, !1);
			null !== a.td && (a.td.visible && !a.Nv && (dm(a), a.Nv = !0), !a.td.visible && a.Nv && (a.Nv = !1));
			Hi(a);
			e = !1;
			if (!a.dh || a.dl) a.dh ? em(a, !a.tr) : (a.Hb("Initial Layout"), !1 === b.isEnabled && b.Gh(), em(a, !1)), e = !0;
			a.tr = !1;
			Hi(a);
			a.Qz || b.cf ||
				fl(a);
			bm(a, !0);
			e && (a.dh || fm(a), a.Aa("LayoutCompleted"));
			Hi(a);
			e && !a.dh && (a.dh = !0, a.Yc("Initial Layout"), a.bb || a.ja.clear(), w.setTimeout(function() {
				a.pi = !1
			}, 1));
			im(a);
			Sk(b);
			a.ve(a.hf);
			d && (a.bb = c);
			a.$d = !1
		}
	}
	w.u(D, {
		Fn: null
	}, function() {
		return this.dh
	});

	function fm(a) {
		var b = a.dc.n;
		a.Hf(b, b.length, a);
		a.nl !== ph ? a.scale = Ql(a, a.nl) : a.vm !== ph ? a.scale = Ql(a, a.vm) : (b = a.tI, isFinite(b) && 0 < b && (a.scale = b));
		b = a.sI;
		if (b.I()) a.position = b;
		else {
			b = w.K();
			b.Wn(a.te, a.rI);
			var c = a.rb,
				c = w.lg(0, 0, c.width, c.height),
				d = w.K();
			d.Wn(c, a.uI);
			d.m(b.x - d.x, b.y - d.y);
			a.position = d;
			w.Eb(c);
			w.v(d);
			w.v(b);
			am(a);
			bm(a, !0);
			Pl(a, !0)
		}
		a.Aa("InitialLayoutCompleted");
		dm(a)
	}

	function Hi(a) {
		if ((a.$d || !a.Ka.cf) && 0 !== a.vg.count) {
			for (var b = 0; 23 > b; b++) {
				var c = a.vg.i;
				if (null === c || 0 === a.vg.count) break;
				a.vg = new I(R);
				a.RB(c, a.vg)
			}
			a.ig.each(function(a) {
				a instanceof V && 0 !== (a.ya & 65536) !== !1 && (a.ya ^= 65536)
			})
		}
	}
	D.prototype.RB = function(a, b) {
		for (a.reset(); a.next();) {
			var c = a.value;
			!c.fe() || c instanceof V || (c.bm() ? (yk(c, Infinity, Infinity), c.jc()) : b.add(c))
		}
		for (a.reset(); a.next();) c = a.value, c instanceof V && c.isVisible() && qm(this, c);
		for (a.reset(); a.next();) c = a.value, c instanceof W && c.isVisible() && (c.bm() ? (yk(c, Infinity, Infinity), c.jc()) : b.add(c));
		for (a.reset(); a.next();) c = a.value, c instanceof kh && c.isVisible() && (c.bm() ? (yk(c, Infinity, Infinity), c.jc()) : b.add(c))
	};

	function qm(a, b) {
		for (var c = w.cb(), d = w.cb(), e = b.vc; e.next();) {
			var f = e.value;
			f.isVisible() && (f instanceof V ? (Em(f) || Fm(f) || Gm(f)) && qm(a, f) : f instanceof W ? f.W === b || f.Z === b ? d.push(f) : c.push(f) : (yk(f, Infinity, Infinity), f.jc()))
		}
		for (var e = c.length, h = 0; h < e; h++) f = c[h], yk(f, Infinity, Infinity), f.jc();
		w.ta(c);
		yk(b, Infinity, Infinity);
		b.jc();
		e = d.length;
		for (h = 0; h < e; h++) f = d[h], yk(f, Infinity, Infinity), f.jc();
		w.ta(d)
	}
	D.prototype.Hf = function(a, b, c, d) {
		var e = this.Ka;
		if (this.ol || e.cf)
			for (e = 0; e < b; e++) a[e].Hf(c, d)
	};
	D.prototype.ve = function(a, b) {
		void 0 === b && (b = null);
		null === this.Nb && w.k("No div specified");
		var c = this.Cb;
		null === c && w.k("No canvas specified");
		var d = this.Ka;
		if (!d.rc && (Hm(this), "0" !== this.Nb.style.opacity)) {
			var e = a !== this.hf,
				f = this.dc.n,
				h = f.length,
				k = this;
			this.Hf(f, h, k);
			if (e) a.He(!0), Nl(this);
			else if (!this.De && null === b && !d.$j) return;
			var h = this.jb,
				l = this.vb,
				m = Math.round(h.x * l) / l,
				n = Math.round(h.y * l) / l,
				d = this.kd;
			d.reset();
			1 !== l && d.scale(l);
			0 === h.x && 0 === h.y || d.translate(-m, -n);
			l = this.Hd;
			w.Dn ? (c.width = c.width,
				a.He(!0), a.scale(l, l)) : (a.setTransform(1, 0, 0, 1, 0, 0), a.scale(l, l), a.clearRect(0, 0, this.Jb, this.Mb));
			a.setTransform(1, 0, 0, 1, 0, 0);
			a.scale(l, l);
			a.transform(d.m11, d.m12, d.m21, d.m22, d.dx, d.dy);
			c = null !== b ? function(c) {
				var d = b;
				if (c.visible && 0 !== c.Bc) {
					var e = c.zb.n,
						f = e.length;
					if (0 !== f) {
						1 !== c.Bc && (a.globalAlpha = c.Bc);
						c = c.vw;
						c.length = 0;
						for (var h = k.scale, l = 0; l < f; l++) {
							var m = e[l];
							if (kl(m) && !d.contains(m)) {
								if (m instanceof W) {
									var n = m;
									n.ac && c.push(n);
									if (!1 === n.Mf) continue
								}
								n = m.Y;
								1 < n.width * h || 1 < n.height * h ? m.ve(a, k) : ml(m,
									a)
							}
						}
						a.globalAlpha = 1
					}
				}
			} : function(b) {
				b.ve(a, k)
			};
			Im(this, a);
			h = f.length;
			for (m = 0; m < h; m++) a.setTransform(1, 0, 0, 1, 0, 0), a.scale(l, l), a.transform(d.m11, d.m12, d.m21, d.m22, d.dx, d.dy), c(f[m]);
			this.ml ? this.ml.om(this) && this.Hv() : this.Gr = function() {
				return new y(0, 0)
			};
			e ? (this.hf.He(!0), Nl(this)) : this.De = this.ol = !1
		}
	};

	function Jm(a, b, c, d, e) {
		null === a.Nb && w.k("No div specified");
		var f = a.Cb;
		null === f && w.k("No canvas specified");
		if (!a.Ka.rc) {
			var h = a.hf;
			if (a.De) {
				Hm(a);
				var k = a.Hd;
				w.Dn ? (f.width = f.width, h.He(!0)) : (h.setTransform(1, 0, 0, 1, 0, 0), h.clearRect(0, 0, a.Jb * k, a.Mb * k));
				h.ty(!1);
				h.drawImage(a.fz.Od, 0 < d ? 0 : Math.round(-d), 0 < e ? 0 : Math.round(-e));
				e = a.jb;
				var f = a.vb,
					l = Math.round(e.x * f) / f,
					m = Math.round(e.y * f) / f;
				d = a.kd;
				d.reset();
				1 !== f && d.scale(f);
				0 === e.x && 0 === e.y || d.translate(-l, -m);
				h.save();
				h.beginPath();
				e = c.length;
				for (f = 0; f <
					e; f++) l = c[f], 0 !== l.width && 0 !== l.height && h.rect(Math.floor(l.x), Math.floor(l.y), Math.ceil(l.width), Math.ceil(l.height));
				h.clip();
				h.setTransform(1, 0, 0, 1, 0, 0);
				h.scale(k, k);
				h.transform(d.m11, d.m12, d.m21, d.m22, d.dx, d.dy);
				c = a.dc.n;
				e = c.length;
				a.Hf(c, e, a);
				Im(a, h);
				for (f = 0; f < e; f++) nl(c[f], h, a, b);
				h.restore();
				h.He(!0);
				a.ml ? a.ml.om(a) && a.Hv() : a.Gr = function() {
					return new y(0, 0)
				};
				a.ol = !1;
				a.De = !1;
				a.hy()
			}
		}
	}

	function Km(a, b, c, d, e, f, h, k, l, m) {
		null === a.Nb && w.k("No div specified");
		null === a.Cb && w.k("No canvas specified");
		void 0 === h && (h = null);
		void 0 === k && (k = null);
		void 0 === l && (l = !1);
		void 0 === m && (m = !1);
		Hm(a);
		a.hf.He(!0);
		Nl(a);
		a.wz = !0;
		var n = a.vb;
		a.vb = e;
		var p = a.dc.n,
			q = p.length;
		try {
			var r = new B(f.x, f.y, d.width / e, d.height / e),
				s = r.copy();
			s.Zw(c);
			dm(a, s);
			Hi(a);
			a.Hf(p, q, a, r);
			var u = a.Hd;
			b.setTransform(1, 0, 0, 1, 0, 0);
			b.scale(u, u);
			b.clearRect(0, 0, d.width, d.height);
			null !== k && "" !== k && (b.fillStyle = k, b.fillRect(0, 0, d.width, d.height));
			var t = w.Wg();
			t.reset();
			t.translate(c.left, c.top);
			t.scale(e);
			0 === f.x && 0 === f.y || t.translate(-f.x, -f.y);
			b.setTransform(t.m11, t.m12, t.m21, t.m22, t.dx, t.dy);
			w.af(t);
			Im(a, b);
			var x;
			if (null !== h) {
				var v = new I(R),
					z = h.i;
				for (z.reset(); z.next();) {
					var A = z.value;
					!1 === m && "Grid" === A.layer.name || null === A || v.add(A)
				}
				x = function(c) {
					var d = l;
					if (c.visible && 0 !== c.Bc && (void 0 === d && (d = !0), d || !c.Pc)) {
						var d = c.zb.n,
							e = d.length;
						if (0 !== e) {
							1 !== c.Bc && (b.globalAlpha = c.Bc);
							c = c.vw;
							c.length = 0;
							for (var f = a.scale, h = 0; h < e; h++) {
								var k = d[h];
								if (kl(k) &&
									v.contains(k)) {
									if (k instanceof W) {
										var m = k;
										m.ac && c.push(m);
										if (!1 === m.Mf) continue
									}
									m = k.Y;
									1 < m.width * f || 1 < m.height * f ? k.ve(b, a) : ml(k, b)
								}
							}
							b.globalAlpha = 1
						}
					}
				}
			} else if (!l && m) {
				var L = a.Bn.U,
					E = L.layer;
				x = function(c) {
					c === E ? L.ve(b, a) : c.ve(b, a, l)
				}
			} else x = function(c) {
				c.ve(b, a, l)
			};
			for (c = 0; c < q; c++) x(p[c]);
			a.wz = !1;
			a.ml ? a.ml.om(a) && a.Hv() : a.Gr = function() {
				return new y(0, 0)
			}
		} finally {
			a.vb = n, a.hf.He(!0), Nl(a), a.Hf(p, q, a), dm(a)
		}
	}
	D.prototype.getRenderingHint = D.prototype.tj = function(a) {
		return this.mk[a]
	};
	D.prototype.setRenderingHint = D.prototype.IJ = function(a, b) {
		this.mk[a] = b;
		this.Mu()
	};
	D.prototype.resetRenderingHints = D.prototype.eG = function() {
		this.mk = new ra;
		this.mk.drawShadows = !0;
		this.mk.textGreeking = !0;
		this.mk.viewportOptimizations = w.BF || w.aq || w.bq ? !1 : !0;
		this.mk.temporaryPixelRatio = !0;
		this.mk.pictureRatioOptimization = !0
	};

	function Im(a, b) {
		var c = a.mk;
		null !== c && (void 0 !== c.imageSmoothingEnabled && b.ty(!!c.imageSmoothingEnabled), c = c.defaultFont, void 0 !== c && null !== c && (b.font = c))
	}
	D.prototype.getInputOption = D.prototype.gu = function(a) {
		return this.Mo[a]
	};
	D.prototype.setInputOption = function(a, b) {
		this.Mo[a] = b
	};
	D.prototype.resetInputOptions = D.prototype.dG = function() {
		this.Mo = new ra;
		this.Mo.extraTouchArea = 10;
		this.Mo.extraTouchThreshold = 10;
		this.Mo.hasGestureZoom = !0
	};
	D.prototype.setProperties = function(a) {
		w.Vu(this, a)
	};

	function im(a) {
		if (0 === a.ja.ti && 0 !== a.hl.count) {
			for (; 0 < a.hl.count;) {
				var b = a.hl;
				a.hl = new ma(W, B);
				for (b = b.i; b.next();) {
					var c = b.key;
					mj(c, b.value);
					c.Me()
				}
			}
			a.oa()
		}
	}
	D.prototype.oa = function(a) {
		void 0 === a && (a = null);
		if (null === a) this.De = !0, this.Ne();
		else {
			var b = this.rb;
			null !== a && a.I() && b.Zf(a) && (this.De = !0, this.Ne())
		}
		for (b = this.ww.i; b.next();) b.value.oa(a)
	};
	D.prototype.wF = function(a, b) {
		if (!0 !== this.De) {
			this.De = !0;
			var c = !0 === this.tj("temporaryPixelRatio");
			if (!0 === this.tj("viewportOptimizations") && this.sB !== Lm && this.oy.wx(0, 0, 0, 0) && b.width === a.width && b.height === a.height) {
				var d = this.scale,
					e = w.Kf(),
					f = Math.max(a.x, b.x),
					h = Math.max(a.y, b.y),
					k = Math.min(a.x + a.width, b.x + b.width),
					l = Math.min(a.y + a.height, b.y + b.height);
				e.x = f;
				e.y = h;
				e.width = Math.max(0, k - f) * d;
				e.height = Math.max(0, l - h) * d;
				if (0 < e.width && 0 < e.height) {
					if (!this.$d && (this.Tf = !1, null !== this.Nb)) {
						this.$d = !0;
						im(this);
						this.te.I() || Sl(this, this.sh());
						var m = this.Cb;
						if (null !== m) {
							var n = this.Hd,
								h = this.Jb * n,
								k = this.Mb * n,
								f = this.scale * n,
								d = Math.round(Math.round(b.x * f) - Math.round(a.x * f)),
								f = Math.round(Math.round(b.y * f) - Math.round(a.y * f)),
								l = this.fz,
								p = this.TC;
							l.width !== h && (l.width = h);
							l.height !== k && (l.height = k);
							p.clearRect(0, 0, h, k);
							var l = 190 * this.Hd,
								q = 70 * this.Hd,
								r = Math.max(d, 0),
								s = Math.max(f, 0),
								u = Math.floor(h - r),
								t = Math.floor(k - s);
							p.ty(!1);
							p.drawImage(m.Od, r, s, u, t, 0, 0, u, t);
							this.ml.om(this) && p.clearRect(0, 0, l, q);
							var m = w.cb(),
								p =
								w.cb(),
								t = Math.abs(d),
								u = Math.abs(f),
								x = 0 === r ? 0 : h - t,
								r = w.xb(x, 0),
								t = w.xb(t + x, k);
							p.push(new B(Math.min(r.x, t.x), Math.min(r.y, t.y), Math.abs(r.x - t.x), Math.abs(r.y - t.y)));
							var v = this.kd;
							v.reset();
							v.scale(n, n);
							1 !== this.vb && v.scale(this.vb);
							n = this.jb;
							(0 !== n.x || 0 !== n.y) && isFinite(n.x) && isFinite(n.y) && v.translate(-n.x, -n.y);
							Pa(r, v);
							Pa(t, v);
							m.push(new B(Math.min(r.x, t.x), Math.min(r.y, t.y), Math.abs(r.x - t.x), Math.abs(r.y - t.y)));
							x = 0 === s ? 0 : k - u;
							r.m(0, x);
							t.m(h, u + x);
							p.push(new B(Math.min(r.x, t.x), Math.min(r.y, t.y), Math.abs(r.x -
								t.x), Math.abs(r.y - t.y)));
							Pa(r, v);
							Pa(t, v);
							m.push(new B(Math.min(r.x, t.x), Math.min(r.y, t.y), Math.abs(r.x - t.x), Math.abs(r.y - t.y)));
							this.ml.om(this) && (h = 0 < d ? 0 : -d, k = 0 < f ? 0 : -f, r.m(h, k), t.m(l + h, q + k), p.push(new B(Math.min(r.x, t.x), Math.min(r.y, t.y), Math.abs(r.x - t.x), Math.abs(r.y - t.y))), Pa(r, v), Pa(t, v), m.push(new B(Math.min(r.x, t.x), Math.min(r.y, t.y), Math.abs(r.x - t.x), Math.abs(r.y - t.y))));
							w.v(r);
							w.v(t);
							bm(this, !1);
							Jm(this, m, p, d, f);
							w.ta(m);
							w.ta(p);
							this.$d = !1
						}
					}
				} else this.cg();
				w.Eb(e);
				c && (this.pk = 1, this.cg(),
					this.pk = null, this.hy())
			} else c ? (this.pk = 1, this.cg(), this.pk = null, this.hy()) : this.cg()
		}
	};

	function am(a) {
		!1 === a.Em && (a.Em = !0)
	}

	function Nl(a) {
		!1 === a.ol && (a.ol = !0)
	}

	function Hm(a) {
		!1 !== a.Pr && (a.Pr = !1, Mm(a, a.Jb, a.Mb))
	}

	function Mm(a, b, c) {
		var d = a.Cb,
			e = a.Hd,
			f = b * e,
			e = c * e;
		if (d.width !== f || d.height !== e) d.width = f, d.height = e, d.style.width = b + "px", d.style.height = c + "px", a.De = !0, a.hf.He(!0)
	}

	function Ll(a) {
		var b = a.Cb;
		if (null === b) return !0;
		var c = a.Nb,
			d = a.Jb,
			e = a.Mb,
			f = a.mE.copy();
		if (!f.I()) return !0;
		var h = !1,
			k = a.ll ? a.Ld : 0,
			l = a.Yj ? a.Ld : 0,
			m = c.clientWidth || d + k,
			c = c.clientHeight || e + l;
		if (m !== d + k || c !== e + l) a.ll = !1, a.Yj = !1, l = k = 0, a.Jb = m, a.Mb = c, h = a.Pr = !0;
		a.Em = !1;
		var n = a.rb,
			p = a.te,
			q = 0,
			r = 0,
			s = 0,
			u = 0,
			m = n.width,
			c = n.height,
			t = a.oy;
		a.kA.$c() ? (p.width > m && (q = t.left, r = t.right), p.height > c && (s = t.top, u = t.bottom)) : (q = t.left, r = t.right, s = t.top, u = t.bottom);
		var t = p.width + q + r,
			x = p.height + s + u,
			q = p.x - q,
			v = n.x,
			r = p.right + r,
			z = n.right +
			k,
			s = p.y - s,
			A = n.y,
			u = p.bottom + u,
			n = n.bottom + l,
			L = "1px",
			E = "1px",
			p = a.scale,
			P = !(t < m + k),
			$ = !(x < c + l);
		a.sB === tl && (P || $) && (P && a.HA && a.pe && (L = 1, q + 1 < v && (L = Math.max((v - q) * p + a.Jb, L)), r > z + 1 && (L = Math.max((r - z) * p + a.Jb, L)), m + k + 1 < t && (L = Math.max((t - m + k) * p + a.Jb, L)), L = L.toString() + "px"), $ && a.IA && a.qe && (E = 1, s + 1 < A && (E = Math.max((A - s) * p + a.Mb, E)), u > n + 1 && (E = Math.max((u - n) * p + a.Mb, E)), c + l + 1 < x && (E = Math.max((x - c + l) * p + a.Mb, E)), E = E.toString() + "px"));
		var P = "1px" !== L,
			S = "1px" !== E;
		P && S || !P && !S || ($ = !(x < c + l), S && (z -= a.Ld), P && (n -= a.Ld), t < m +
			k || !a.HA || !a.pe || (L = 1, q + 1 < v && (L = Math.max((v - q) * p + a.Jb, L)), r > z + 1 && (L = Math.max((r - z) * p + a.Jb, L)), m + 1 < t && (L = Math.max((t - m) * p + a.Jb, L)), L = L.toString() + "px"), P = "1px" !== L, k = P !== a.Yj ? a.Mb - a.Ld : a.Mb, $ && a.IA && a.qe && (E = 1, s + 1 < A && (E = Math.max((A - s) * p + k, E)), u > n + 1 && (E = Math.max((u - n) * p + k, E)), c + 1 < x && (E = Math.max((x - c) * p + k, E)), E = E.toString() + "px"), S = "1px" !== E);
		if (a.Cw && P === a.Yj && S === a.ll) return d === a.Jb && e === a.Mb || a.cg(), !1;
		P !== a.Yj && (a.Mb = "1px" === L ? a.Mb + a.Ld : Math.max(a.Mb - a.Ld, 1), h = !0);
		a.Yj = P;
		a.bt.style.width = L;
		S !==
			a.ll && (a.Jb = "1px" === E ? a.Jb + a.Ld : Math.max(a.Jb - a.Ld, 1), h = !0, a.Ur && (k = w.K(), S ? (b.style.left = a.Ld + "px", a.position = k.m(a.jb.x + a.Ld / a.scale, a.jb.y)) : (b.style.left = "0px", a.position = k.m(a.jb.x - a.Ld / a.scale, a.jb.y)), w.v(k)));
		a.ll = S;
		a.bt.style.height = E;
		b = a.Gw;
		k = b.scrollLeft;
		a.HA && a.pe && (m + 1 < t ? k = (a.position.x - q) * p : q + 1 < v ? k = b.scrollWidth - b.clientWidth : r > z + 1 && (k = a.position.x * p));
		if (a.Ur) switch (a.Kz) {
			case "negative":
				k = -(b.scrollWidth - k - b.clientWidth);
				break;
			case "reverse":
				k = b.scrollWidth - k - b.clientWidth
		}
		b.scrollLeft =
			k;
		a.IA && a.qe && (c + 1 < x ? b.scrollTop = (a.position.y - s) * p : s + 1 < A ? b.scrollTop = b.scrollHeight - b.clientHeight : u > n + 1 && (b.scrollTop = a.position.y * p));
		h && (a.Pr = !0);
		m = a.Jb;
		c = a.Mb;
		b.style.width = m + (a.ll ? a.Ld : 0) + "px";
		b.style.height = c + (a.Yj ? a.Ld : 0) + "px";
		a.Mz = !1;
		return d !== m || e !== c || a.Ka.rc ? (n = a.rb, a.Ju(f, n, p, a.scale, h), !1) : !0
	}
	D.prototype.add = D.prototype.add = function(a) {
		w.G(a, R, D, "add:part");
		var b = a.g;
		if (b !== this) {
			null !== b && w.k("Cannot add part " + a.toString() + " to " + this.toString() + ". It is already a part of " + b.toString());
			this.Kq && (a.sl = "Tool");
			var c = a.ag,
				b = this.Vt(c);
			null === b && (b = this.Vt(""));
			null === b && w.k('Cannot add a Part when unable find a Layer named "' + c + '" and there is no default Layer');
			a.layer !== b && (c = b.Yp(99999999, a, a.g === this), 0 <= c && this.cd(Ff, "parts", b, null, a, null, c), b.Pc || this.Fc(), a.J(Nm), c = a.Px, null !==
				c && c(a, null, b))
		}
	};
	D.prototype.Yp = function(a) {
		if (a instanceof T) {
			if (this.bp.add(a), a instanceof V) {
				var b = a.Da;
				null === b ? this.El.add(a) : b.Zo.add(a);
				b = a.Sb;
				null !== b && (b.g = this)
			}
		} else a instanceof W ? this.Vo.add(a) : a instanceof kh || this.zb.add(a);
		var c = this;
		Om(a, function(a) {
			Pm(c, a)
		});
		(a instanceof kh || a instanceof V && null !== a.Lb) && a.H();
		b = a.data;
		null !== b && (a instanceof kh || (a instanceof W ? this.Oj.add(b, a) : this.Ei.add(b, a)), Om(a, function(a) {
			Qm(c, a)
		}));
		!0 !== Fm(a) && !0 !== Gm(a) || this.vg.add(a);
		Rm(a, !0, this);
		Sm(a) ? (a.Y.I() && this.oa(ol(a,
			a.Y)), this.Fc()) : a.isVisible() && a.Y.I() && this.oa(ol(a, a.Y));
		this.Ne()
	};
	D.prototype.qf = function(a) {
		a.Mt();
		if (a instanceof T) {
			if (this.bp.remove(a), a instanceof V) {
				var b = a.Da;
				null === b ? this.El.remove(a) : b.Zo.remove(a);
				b = a.Sb;
				null !== b && (b.g = null)
			}
		} else a instanceof W ? this.Vo.remove(a) : a instanceof kh || this.zb.remove(a);
		var c = this;
		Om(a, function(a) {
			Tm(c, a)
		});
		b = a.data;
		null !== b && (a instanceof kh || (a instanceof W ? this.Oj.remove(b) : this.Ei.remove(b)), Om(a, function(a) {
			Um(c, a)
		}));
		this.vg.remove(a);
		Sm(a) ? (a.Y.I() && this.oa(ol(a, a.Y)), this.Fc()) : a.isVisible() && a.Y.I() && this.oa(ol(a,
			a.Y));
		this.Ne()
	};
	D.prototype.remove = D.prototype.remove = function(a) {
		w.G(a, R, D, "remove:part");
		Vm(this, a, !0)
	};

	function Vm(a, b, c) {
		var d = b.layer;
		null !== d && d.g === a && (b.ib = !1, b.Og = !1, b.J(Wm), c && b.un(), c = d.qf(-1, b, !1), 0 <= c && a.cd(Qf, "parts", d, b, null, c, null), a = b.Px, null !== a && a(b, d, null))
	}
	D.prototype.removeParts = D.prototype.oB = function(a, b) {
		if (w.isArray(a))
			for (var c = w.Za(a), d = 0; d < c; d++) {
				var e = w.Ba(a, d);
				b && !e.canDelete() || this.remove(e)
			} else
				for (e = new I(R), e.Nc(a), c = e.i; c.next();) e = c.value, b && !e.canDelete() || this.remove(e)
	};
	D.prototype.copyParts = D.prototype.Lp = function(a, b, c) {
		return this.pb.Lp(a, b, c)
	};
	D.prototype.moveParts = D.prototype.moveParts = function(a, b, c) {
		w.G(b, y, D, "moveParts:offset");
		var d = this.eb;
		if (null !== d) {
			d = d.ue;
			null === d && (d = new oh, d.Sc(this));
			var e = new ma(R);
			if (null !== a) a = a.i;
			else {
				for (a = this.Pk; a.next();) Vh(d, e, a.value, c);
				for (a = this.ig; a.next();) Vh(d, e, a.value, c);
				a = this.links
			}
			for (; a.next();) Vh(d, e, a.value, c);
			d.moveParts(e, b, c)
		}
	};

	function Xm(a, b, c) {
		w.G(b, qg, D, "addLayer:layer");
		null !== b.g && b.g !== a && w.k("Cannot share a Layer with another Diagram: " + b + " of " + b.g);
		null === c ? null !== b.g && w.k("Cannot add an existing Layer to this Diagram again: " + b) : (w.G(c, qg, D, "addLayer:existingLayer"), c.g !== a && w.k("Existing Layer must be in this Diagram: " + c + " not in " + c.g), b === c && w.k("Cannot move a Layer before or after itself: " + b));
		if (b.g !== a) {
			b = b.name;
			a = a.dc;
			c = a.count;
			for (var d = 0; d < c; d++) a.ea(d).name === b && w.k("Cannot add Layer with the name '" +
				b + "'; a Layer with the same name is already present in this Diagram.")
		}
	}
	D.prototype.addLayer = D.prototype.Et = function(a) {
		Xm(this, a, null);
		a.Sc(this);
		var b = this.dc,
			c = b.count - 1;
		if (!a.Pc)
			for (; 0 <= c && b.ea(c).Pc;) c--;
		b.Rd(c + 1, a);
		null !== this.ne && this.cd(Ff, "layers", this, null, a, null, c + 1);
		this.oa();
		this.Fc()
	};
	D.prototype.addLayerBefore = D.prototype.kH = function(a, b) {
		Xm(this, a, b);
		a.Sc(this);
		var c = this.dc,
			d = c.indexOf(a);
		0 <= d && (c.remove(a), null !== this.ne && this.cd(Qf, "layers", this, a, null, d, null));
		for (var e = c.count, f = 0; f < e; f++)
			if (c.ea(f) === b) {
				c.Rd(f, a);
				break
			}
		null !== this.ne && this.cd(Ff, "layers", this, null, a, null, f);
		this.oa();
		0 > d && this.Fc()
	};
	D.prototype.addLayerAfter = function(a, b) {
		Xm(this, a, b);
		a.Sc(this);
		var c = this.dc,
			d = c.indexOf(a);
		0 <= d && (c.remove(a), null !== this.ne && this.cd(Qf, "layers", this, a, null, d, null));
		for (var e = c.count, f = 0; f < e; f++)
			if (c.ea(f) === b) {
				c.Rd(f + 1, a);
				break
			}
		null !== this.ne && this.cd(Ff, "layers", this, null, a, null, f + 1);
		this.oa();
		0 > d && this.Fc()
	};
	D.prototype.removeLayer = function(a) {
		w.G(a, qg, D, "removeLayer:layer");
		a.g !== this && w.k("Cannot remove a Layer from another Diagram: " + a + " of " + a.g);
		if ("" !== a.name) {
			var b = this.dc,
				c = b.indexOf(a);
			if (b.remove(a)) {
				for (b = a.zb.copy().i; b.next();) {
					var d = b.value,
						e = d.ag;
					d.ag = e !== a.name ? e : ""
				}
				null !== this.ne && this.cd(Qf, "layers", this, a, null, c, null);
				this.oa();
				this.Fc()
			}
		}
	};
	D.prototype.findLayer = D.prototype.Vt = function(a) {
		for (var b = this.Qx; b.next();) {
			var c = b.value;
			if (c.name === a) return c
		}
		return null
	};
	D.prototype.addModelChangedListener = D.prototype.mH = function(a) {
		w.j(a, "function", D, "addModelChangedListener:listener");
		null === this.hh && (this.hh = new H("function"));
		this.hh.add(a);
		this.$.gn(a)
	};
	D.prototype.removeModelChangedListener = function(a) {
		w.j(a, "function", D, "removeModelChangedListener:listener");
		null !== this.hh && (this.hh.remove(a), 0 === this.hh.count && (this.hh = null));
		this.$.Nu(a)
	};
	D.prototype.addChangedListener = D.prototype.gn = function(a) {
		w.j(a, "function", D, "addChangedListener:listener");
		null === this.zi && (this.zi = new H("function"));
		this.zi.add(a)
	};
	D.prototype.removeChangedListener = D.prototype.Nu = function(a) {
		w.j(a, "function", D, "removeChangedListener:listener");
		null !== this.zi && (this.zi.remove(a), 0 === this.zi.count && (this.zi = null))
	};
	D.prototype.jx = function(a) {
		this.bb || this.ja.rF(a);
		a.Dc !== Ef && (this.pi = !0);
		if (null !== this.zi)
			for (var b = this.zi, c = b.length, d = 0; d < c; d++) b.ea(d)(a)
	};
	D.prototype.raiseChangedEvent = D.prototype.cd = function(a, b, c, d, e, f, h) {
		void 0 === f && (f = null);
		void 0 === h && (h = null);
		var k = new Cf;
		k.g = this;
		k.Dc = a;
		k.propertyName = b;
		k.object = c;
		k.oldValue = d;
		k.Dj = f;
		k.newValue = e;
		k.Cj = h;
		this.jx(k)
	};
	D.prototype.raiseChanged = D.prototype.h = function(a, b, c, d, e) {
		this.cd(Df, a, this, b, c, d, e)
	};
	w.u(D, {
		Ka: "animationManager"
	}, function() {
		return this.gC
	});
	w.u(D, {
		ja: "undoManager"
	}, function() {
		return this.ne.ja
	});
	w.defineProperty(D, {
		bb: "skipsUndoManager"
	}, function() {
		return this.fj
	}, function(a) {
		w.j(a, "boolean", D, "skipsUndoManager");
		this.fj = a;
		this.ne.fj = a
	});
	w.defineProperty(D, {
		rA: "delaysLayout"
	}, function() {
		return this.az
	}, function(a) {
		this.az = a
	});
	D.prototype.mn = function(a, b) {
		if (null !== a && a.g === this) {
			var c = this.Pe;
			try {
				this.Pe = !0;
				var d = a.Dc,
					e;
				if (d === Df) {
					var f = a.object,
						h = a.propertyName,
						k = a.ka(b);
					w.Ma(f, h, k);
					if (f instanceof G) {
						var l, m = f.U;
						null !== m && m.ee()
					}
					this.pi = !0
				} else if (d === Ff) {
					var n = a.object,
						p = a.Cj,
						f = a.newValue;
					if (n instanceof C)
						if ("number" === typeof p && f instanceof G) {
							l = f;
							var q = n;
							b ? q.qf(p) : q.Rd(p, l);
							m = n.U;
							null !== m && m.ee()
						} else {
							if ("number" === typeof p && f instanceof Wg) {
								var r = f,
									q = n;
								b ? r.xe ? q.cG(p) : q.aG(p) : (e = r.xe ? q.de(r.index) : q.ce(r.index),
									e.Kp(r))
							}
						}
					else if (n instanceof qg) {
						var s = !0 === a.Dj;
						if ("number" === typeof p && f instanceof R) {
							var m = f,
								u = n;
							b ? (m.ib = !1, m.Og = !1, m.ee(), u.qf(s ? p : -1, m, s)) : u.Yp(p, m, s)
						}
					} else if (n instanceof D) {
						if ("number" === typeof p && f instanceof qg) {
							var t = f;
							b ? this.dc.dd(p) : (d = t, d.Sc(this), this.dc.Rd(p, d))
						}
					} else w.k("unknown ChangedEvent.Insert object: " + a.toString());
					this.pi = !0
				} else d === Qf ? (n = a.object, p = a.Dj, f = a.oldValue, n instanceof C ? "number" === typeof p && f instanceof G ? (q = n, b ? q.Rd(p, f) : q.qf(p)) : "number" === typeof p && f instanceof Wg && (r = f, q = n, b ? (e = r.xe ? q.de(r.index) : q.ce(r.index), e.Kp(r)) : r.xe ? q.cG(p) : q.aG(p)) : n instanceof qg ? (s = !0 === a.Cj, "number" === typeof p && f instanceof R && (m = f, u = n, b ? u.Yp(p, m, s) : (m.ib = !1, m.Og = !1, m.ee(), u.qf(s ? p : -1, m, s)))) : n instanceof D ? "number" === typeof p && f instanceof qg && (t = f, b ? (d = t, d.Sc(this), this.dc.Rd(p, d)) : this.dc.dd(p)) : w.k("unknown ChangedEvent.Remove object: " + a.toString()), this.pi = !0) : d !== Ef && w.k("unknown ChangedEvent: " + a.toString())
			} finally {
				this.Pe = c
			}
		}
	};
	D.prototype.startTransaction = D.prototype.Hb = function(a) {
		return this.ja.Hb(a)
	};
	D.prototype.commitTransaction = D.prototype.Yc = function(a) {
		return this.ja.Yc(a)
	};
	D.prototype.rollbackTransaction = D.prototype.fm = function() {
		return this.ja.fm()
	};
	D.prototype.commit = function(a, b) {
		var c = b;
		void 0 === c && (c = "");
		var d = this.bb;
		null === c && (this.bb = !0, c = "");
		this.ja.Hb(c);
		var e = !1;
		try {
			a(this), e = !0
		} finally {
			e ? this.ja.Yc(c) : this.ja.fm(), this.bb = d
		}
	};
	D.prototype.updateAllTargetBindings = D.prototype.IG = function(a) {
		void 0 === a && (a = "");
		for (var b = this.Pk; b.next();) b.value.Ib(a);
		for (b = this.ig; b.next();) b.value.Ib(a);
		for (b = this.links; b.next();) b.value.Ib(a)
	};
	D.prototype.updateAllRelationshipsFromData = D.prototype.$J = function() {
		for (var a = this.$, b = new I, c = a.hg, d = 0; d < c.length; d++) {
			var e = c[d];
			b.add(e)
		}
		var f = [];
		this.ig.each(function(a) {
			null === a.data || b.contains(a.data) || f.push(a.data)
		});
		this.Pk.each(function(a) {
			null === a.data || b.contains(a.data) || f.push(a.data)
		});
		f.forEach(function(b) {
			zg(a, b, !1)
		});
		for (d = 0; d < c.length; d++) {
			var e = c[d],
				h = this.vh(e);
			null === h && yg(a, e, !1)
		}
		if (a instanceof Q) {
			for (var k = new I, c = a.Pg, d = 0; d < c.length; d++) e = c[d], k.add(e);
			var l = [];
			this.links.each(function(a) {
				null ===
					a.data || k.contains(a.data) || l.push(a.data)
			});
			l.forEach(function(b) {
				ah(a, b, !1)
			});
			for (d = 0; d < c.length; d++) e = c[d], h = this.Xf(e), null === h && $g(a, e, !1)
		}
		for (d = this.Pk; d.next();) h = d.value, h.updateRelationshipsFromData();
		for (d = this.ig; d.next();) d.value.updateRelationshipsFromData();
		for (d = this.links; d.next();) h = d.value, h.updateRelationshipsFromData()
	};

	function Ym(a, b, c) {
		if (a.Vc || a.$d) a.vb = c, c = a.Ka, c.rc && jl(c, b, a.vb);
		else if (a.Vc = !0, null === a.Cb) a.vb = c;
		else {
			var d = a.rb.copy(),
				e = a.Jb,
				f = a.Mb;
			d.width = a.Jb / b;
			d.height = a.Mb / b;
			var h = a.pm.x,
				k = a.pm.y,
				l = a.kA;
			isNaN(h) && (l.xj() ? l.vj(Yb) ? h = 0 : l.vj(Zb) && (h = e - 1) : h = l.$c() ? l.x * (e - 1) : e / 2);
			isNaN(k) && (l.xj() ? l.vj(Xb) ? k = 0 : l.vj($b) && (k = f - 1) : k = l.$c() ? l.y * (f - 1) : f / 2);
			null !== a.jG && (c = a.jG(a, c));
			c < a.Ah && (c = a.Ah);
			c > a.zh && (c = a.zh);
			e = w.xb(a.jb.x + h / b - h / c, a.jb.y + k / b - k / c);
			a.position = e;
			w.v(e);
			a.vb = c;
			a.Ju(d, a.rb, b, c, !1);
			a.Vc = !1;
			Pl(a, !1);
			c = a.Ka;
			c.rc && jl(c, b, a.vb);
			a.oa();
			am(a)
		}
	}
	D.prototype.Ju = function(a, b, c, d, e) {
		a.L(b) || (void 0 === e && (e = !1), e || am(this), Nl(this), d = this.Sb, null === d || !d.Mx || this.Ml !== ph || e || a.width === b.width && a.height === b.height || d.J(), d = this.$a, !0 === this.eh && d instanceof ih && (this.R.da = this.OB(this.R.gf), Ck(d, this)), this.Vc || this.wF(a, b), dm(this), this.nh.scale = c, this.nh.position.x = a.x, this.nh.position.y = a.y, this.nh.bounds.set(a), this.nh.isScroll = e, this.Aa("ViewportBoundsChanged", this.nh, a), this.SA && this.links.each(function(a) {
			a.Zl && a.Y.Zf(b) && a.Vb()
		}))
	};

	function dm(a, b) {
		void 0 === b && (b = null);
		var c = a.td;
		if (null !== c && c.visible) {
			for (var d = w.mm(), e = 1, f = 1, h = c.xa.n, k = h.length, l = 0; l < k; l++) {
				var m = h[l],
					n = m.interval;
				2 > n || (Zm(m.Db) ? f = f * n / Ae(f, n) : e = e * n / Ae(e, n))
			}
			h = c.Ex;
			d.m(f * h.width, e * h.height);
			h = f = l = k = 0;
			if (null !== b) k = b.width, l = b.height, f = b.x, h = b.y;
			else {
				e = w.Kf();
				f = a.rb;
				e.m(f.x, f.y, f.width, f.height);
				for (h = a.ww.i; h.next();) f = h.value.rb, f.I() && ab(e, f.x, f.y, f.width, f.height);
				if (!e.I()) {
					w.Eb(e);
					return
				}
				k = e.width;
				l = e.height;
				f = e.x;
				h = e.y;
				w.Eb(e)
			}
			c.width = k + 2 * d.width;
			c.height =
				l + 2 * d.height;
			e = w.K();
			Na(f, h, 0, 0, d.width, d.height, e);
			e.offset(-d.width, -d.height);
			w.Hk(d);
			c.U.location = e;
			w.v(e)
		}
	}
	D.prototype.clearSelection = D.prototype.kx = function() {
		var a = 0 < this.selection.count;
		a && this.Aa("ChangingSelection");
		nh(this);
		a && this.Aa("ChangedSelection")
	};

	function nh(a) {
		a = a.selection;
		if (0 < a.count) {
			for (var b = a.xc(), c = b.length, d = 0; d < c; d++) b[d].ib = !1;
			a.Qa();
			a.clear();
			a.freeze()
		}
	}
	D.prototype.select = D.prototype.select = function(a) {
		null !== a && (w.G(a, R, D, "select:part"), a.layer.g === this && (!a.ib || 1 < this.selection.count) && (this.Aa("ChangingSelection"), nh(this), a.ib = !0, this.Aa("ChangedSelection")))
	};
	D.prototype.selectCollection = D.prototype.nG = function(a) {
		this.Aa("ChangingSelection");
		nh(this);
		if (w.isArray(a))
			for (var b = w.Za(a), c = 0; c < b; c++) {
				var d = w.Ba(a, c);
				d instanceof R || w.k("Diagram.selectCollection given something that is not a Part: " + d);
				d.ib = !0
			} else
				for (a = a.i; a.next();) d = a.value, d instanceof R || w.k("Diagram.selectCollection given something that is not a Part: " + d), d.ib = !0;
		this.Aa("ChangedSelection")
	};
	D.prototype.clearHighlighteds = D.prototype.tH = function() {
		var a = this.Yl;
		if (0 < a.count) {
			for (var b = a.xc(), c = b.length, d = 0; d < c; d++) b[d].Og = !1;
			a.Qa();
			a.clear();
			a.freeze()
		}
	};
	D.prototype.highlight = function(a) {
		null !== a && a.layer.g === this && (w.G(a, R, D, "highlight:part"), !a.Og || 1 < this.Yl.count) && (this.tH(), a.Og = !0)
	};
	D.prototype.highlightCollection = function(a) {
		for (var b = (new I(R)).Nc(a), c = this.Yl.copy().jy(b).i; c.next();) a = c.value, a.Og = !1;
		for (b = b.i; b.next();) a = b.value, a instanceof R || w.k("Diagram.highlightCollection given something that is not a Part: " + a), a.Og = !0
	};
	D.prototype.scroll = D.prototype.scroll = function(a, b, c) {
		void 0 === c && (c = 1);
		var d = "up" === b || "down" === b,
			e = 0;
		if ("pixel" === a) e = c;
		else if ("line" === a) e = c * (d ? this.Tu : this.Su);
		else if ("page" === a) a = d ? this.rb.height : this.rb.width, a *= this.scale, 0 !== a && (e = Math.max(a - (d ? this.Tu : this.Su), 0), e *= c);
		else {
			if ("document" === a) {
				e = this.te;
				d = this.rb;
				c = w.K();
				"up" === b ? this.position = c.m(d.x, e.y) : "left" === b ? this.position = c.m(e.x, d.y) : "down" === b ? this.position = c.m(d.x, e.bottom - d.height) : "right" === b && (this.position = c.m(e.right - d.width,
					d.y));
				w.v(c);
				return
			}
			w.k("scrolling unit must be 'pixel', 'line', 'page', or 'document', not: " + a)
		}
		e /= this.scale;
		c = this.position.copy();
		"up" === b ? c.y = this.position.y - e : "down" === b ? c.y = this.position.y + e : "left" === b ? c.x = this.position.x - e : "right" === b ? c.x = this.position.x + e : w.k("scrolling direction must be 'up', 'down', 'left', or 'right', not: " + b);
		this.position = c
	};
	D.prototype.scrollToRect = D.prototype.kG = function(a) {
		var b = this.rb;
		b.Ak(a) || (a = a.Nl, a.x -= b.width / 2, a.y -= b.height / 2, this.position = a)
	};
	D.prototype.centerRect = D.prototype.FE = function(a) {
		var b = this.rb;
		a = a.Nl;
		a.x -= b.width / 2;
		a.y -= b.height / 2;
		this.position = a
	};
	D.prototype.transformDocToView = D.prototype.FG = function(a) {
		var b = this.kd;
		b.reset();
		1 !== this.vb && b.scale(this.vb);
		var c = this.jb;
		(0 !== c.x || 0 !== c.y) && isFinite(c.x) && isFinite(c.y) && b.translate(-c.x, -c.y);
		return a.copy().transform(this.kd)
	};
	D.prototype.transformViewToDoc = D.prototype.OB = function(a) {
		var b = this.kd;
		b.reset();
		1 !== this.vb && b.scale(this.vb);
		var c = this.jb;
		(0 !== c.x || 0 !== c.y) && isFinite(c.x) && isFinite(c.y) && b.translate(-c.x, -c.y);
		return Pa(a.copy(), this.kd)
	};
	var ph;
	D.None = ph = w.p(D, "None", 0);
	var Tl;
	D.Uniform = Tl = w.p(D, "Uniform", 1);
	var Ul;
	D.UniformToFill = Ul = w.p(D, "UniformToFill", 2);
	var Vi;
	D.CycleAll = Vi = w.p(D, "CycleAll", 10);
	var Zi;
	D.CycleNotDirected = Zi = w.p(D, "CycleNotDirected", 11);
	var aj;
	D.CycleNotDirectedFast = aj = w.p(D, "CycleNotDirectedFast", 12);
	var bj;
	D.CycleNotUndirected = bj = w.p(D, "CycleNotUndirected", 13);
	var Wi;
	D.CycleDestinationTree = Wi = w.p(D, "CycleDestinationTree", 14);
	var Yi;
	D.CycleSourceTree = Yi = w.p(D, "CycleSourceTree", 15);
	var tl;
	D.DocumentScroll = tl = w.p(D, "DocumentScroll", 1);
	var Lm;
	D.InfiniteScroll = Lm = w.p(D, "InfiniteScroll", 2);
	var vl;
	D.TreeParentCollapsed = vl = w.p(D, "TreeParentCollapsed", 21);
	var $m;
	D.AllParentsCollapsed = $m = w.p(D, "AllParentsCollapsed", 22);
	var an;
	D.AnyParentsCollapsed = an = w.p(D, "AnyParentsCollapsed", 23);
	w.defineProperty(D, {
		aK: "validCycle"
	}, function() {
		return this.Uw
	}, function(a) {
		var b = this.Uw;
		b !== a && (w.ob(a, D, D, "validCycle"), this.Uw = a, this.h("validCycle", b, a))
	});
	w.u(D, {
		Qx: "layers"
	}, function() {
		return this.dc.i
	});
	w.defineProperty(D, {
		Df: "isModelReadOnly"
	}, function() {
		var a = this.ne;
		return null === a ? !1 : a.hb
	}, function(a) {
		var b = this.ne;
		null !== b && (b.hb = a)
	});
	w.defineProperty(D, {
		hb: "isReadOnly"
	}, function() {
		return this.Oi
	}, function(a) {
		var b = this.Oi;
		b !== a && (w.j(a, "boolean", D, "isReadOnly"), this.Oi = a, this.h("isReadOnly", b, a))
	});
	w.defineProperty(D, {
		isEnabled: "isEnabled"
	}, function() {
		return this.jf
	}, function(a) {
		var b = this.jf;
		b !== a && (w.j(a, "boolean", D, "isEnabled"), this.jf = a, this.h("isEnabled", b, a))
	});
	w.defineProperty(D, {
		cA: "allowClipboard"
	}, function() {
		return this.hv
	}, function(a) {
		var b = this.hv;
		b !== a && (w.j(a, "boolean", D, "allowClipboard"), this.hv = a, this.h("allowClipboard", b, a))
	});
	w.defineProperty(D, {
		xk: "allowCopy"
	}, function() {
		return this.Sk
	}, function(a) {
		var b = this.Sk;
		b !== a && (w.j(a, "boolean", D, "allowCopy"), this.Sk = a, this.h("allowCopy", b, a))
	});
	w.defineProperty(D, {
		hn: "allowDelete"
	}, function() {
		return this.Tk
	}, function(a) {
		var b = this.Tk;
		b !== a && (w.j(a, "boolean", D, "allowDelete"), this.Tk = a, this.h("allowDelete", b, a))
	});
	w.defineProperty(D, {
		Jt: "allowDragOut"
	}, function() {
		return this.iv
	}, function(a) {
		var b = this.iv;
		b !== a && (w.j(a, "boolean", D, "allowDragOut"), this.iv = a, this.h("allowDragOut", b, a))
	});
	w.defineProperty(D, {
		xE: "allowDrop"
	}, function() {
		return this.jv
	}, function(a) {
		var b = this.jv;
		b !== a && (w.j(a, "boolean", D, "allowDrop"), this.jv = a, this.h("allowDrop", b, a))
	});
	w.defineProperty(D, {
		gx: "allowTextEdit"
	}, function() {
		return this.bl
	}, function(a) {
		var b = this.bl;
		b !== a && (w.j(a, "boolean", D, "allowTextEdit"), this.bl = a, this.h("allowTextEdit", b, a))
	});
	w.defineProperty(D, {
		ax: "allowGroup"
	}, function() {
		return this.Uk
	}, function(a) {
		var b = this.Uk;
		b !== a && (w.j(a, "boolean", D, "allowGroup"), this.Uk = a, this.h("allowGroup", b, a))
	});
	w.defineProperty(D, {
		hx: "allowUngroup"
	}, function() {
		return this.cl
	}, function(a) {
		var b = this.cl;
		b !== a && (w.j(a, "boolean", D, "allowUngroup"), this.cl = a, this.h("allowUngroup", b, a))
	});
	w.defineProperty(D, {
		Cp: "allowInsert"
	}, function() {
		return this.lv
	}, function(a) {
		var b = this.lv;
		b !== a && (w.j(a, "boolean", D, "allowInsert"), this.lv = a, this.h("allowInsert", b, a))
	});
	w.defineProperty(D, {
		Kt: "allowLink"
	}, function() {
		return this.Vk
	}, function(a) {
		var b = this.Vk;
		b !== a && (w.j(a, "boolean", D, "allowLink"), this.Vk = a, this.h("allowLink", b, a))
	});
	w.defineProperty(D, {
		jn: "allowRelink"
	}, function() {
		return this.Xk
	}, function(a) {
		var b = this.Xk;
		b !== a && (w.j(a, "boolean", D, "allowRelink"), this.Xk = a, this.h("allowRelink", b, a))
	});
	w.defineProperty(D, {
		Kl: "allowMove"
	}, function() {
		return this.Wk
	}, function(a) {
		var b = this.Wk;
		b !== a && (w.j(a, "boolean", D, "allowMove"), this.Wk = a, this.h("allowMove", b, a))
	});
	w.defineProperty(D, {
		bx: "allowReshape"
	}, function() {
		return this.Yk
	}, function(a) {
		var b = this.Yk;
		b !== a && (w.j(a, "boolean", D, "allowReshape"), this.Yk = a, this.h("allowReshape", b, a))
	});
	w.defineProperty(D, {
		Lt: "allowResize"
	}, function() {
		return this.Zk
	}, function(a) {
		var b = this.Zk;
		b !== a && (w.j(a, "boolean", D, "allowResize"), this.Zk = a, this.h("allowResize", b, a))
	});
	w.defineProperty(D, {
		ex: "allowRotate"
	}, function() {
		return this.$k
	}, function(a) {
		var b = this.$k;
		b !== a && (w.j(a, "boolean", D, "allowRotate"), this.$k = a, this.h("allowRotate", b, a))
	});
	w.defineProperty(D, {
		Af: "allowSelect"
	}, function() {
		return this.al
	}, function(a) {
		var b = this.al;
		b !== a && (w.j(a, "boolean", D, "allowSelect"), this.al = a, this.h("allowSelect", b, a))
	});
	w.defineProperty(D, {
		yE: "allowUndo"
	}, function() {
		return this.mv
	}, function(a) {
		var b = this.mv;
		b !== a && (w.j(a, "boolean", D, "allowUndo"), this.mv = a, this.h("allowUndo", b, a))
	});
	w.defineProperty(D, {
		ix: "allowZoom"
	}, function() {
		return this.ov
	}, function(a) {
		var b = this.ov;
		b !== a && (w.j(a, "boolean", D, "allowZoom"), this.ov = a, this.h("allowZoom", b, a))
	});
	w.defineProperty(D, {
		IA: "hasVerticalScrollbar"
	}, function() {
		return this.Rv
	}, function(a) {
		var b = this.Rv;
		b !== a && (w.j(a, "boolean", D, "hasVerticalScrollbar"), this.Rv = a, am(this), this.oa(), this.h("hasVerticalScrollbar", b, a), Pl(this, !1))
	});
	w.defineProperty(D, {
		HA: "hasHorizontalScrollbar"
	}, function() {
		return this.Qv
	}, function(a) {
		var b = this.Qv;
		b !== a && (w.j(a, "boolean", D, "hasHorizontalScrollbar"), this.Qv = a, am(this), this.oa(), this.h("hasHorizontalScrollbar", b, a), Pl(this, !1))
	});
	w.defineProperty(D, {
		pe: "allowHorizontalScroll"
	}, function() {
		return this.kv
	}, function(a) {
		var b = this.kv;
		b !== a && (w.j(a, "boolean", D, "allowHorizontalScroll"), this.kv = a, this.h("allowHorizontalScroll", b, a), Pl(this, !1))
	});
	w.defineProperty(D, {
		qe: "allowVerticalScroll"
	}, function() {
		return this.nv
	}, function(a) {
		var b = this.nv;
		b !== a && (w.j(a, "boolean", D, "allowVerticalScroll"), this.nv = a, this.h("allowVerticalScroll", b, a), Pl(this, !1))
	});
	w.defineProperty(D, {
		Su: "scrollHorizontalLineChange"
	}, function() {
		return this.Dw
	}, function(a) {
		var b = this.Dw;
		b !== a && (w.j(a, "number", D, "scrollHorizontalLineChange"), 0 > a && w.Fa(a, ">= 0", D, "scrollHorizontalLineChange"), this.Dw = a, this.h("scrollHorizontalLineChange", b, a))
	});
	w.defineProperty(D, {
		Tu: "scrollVerticalLineChange"
	}, function() {
		return this.Hw
	}, function(a) {
		var b = this.Hw;
		b !== a && (w.j(a, "number", D, "scrollVerticalLineChange"), 0 > a && w.Fa(a, ">= 0", D, "scrollVerticalLineChange"), this.Hw = a, this.h("scrollVerticalLineChange", b, a))
	});
	w.defineProperty(D, {
		R: "lastInput"
	}, function() {
		return this.Yb
	}, function(a) {
		this.Yb = a
	});
	w.defineProperty(D, {
		Ec: "firstInput"
	}, function() {
		return this.Li
	}, function(a) {
		this.Li = a
	});
	w.defineProperty(D, {
		fc: "currentCursor"
	}, function() {
		return this.yv
	}, function(a) {
		"" === a && (a = this.or);
		var b = this.yv;
		if (b !== a) {
			w.j(a, "string", D, "currentCursor");
			var c = this.Cb,
				d = this.Nb;
			null !== c && (this.yv = a, c.style.cursor = a, d.style.cursor = a, c.style.cursor === b && (c.style.cursor = "-webkit-" + a, d.style.cursor = "-webkit-" + a, c.style.cursor === b && (c.style.cursor = "-moz-" + a, d.style.cursor = "-moz-" + a, c.style.cursor === b && (c.style.cursor = a, d.style.cursor = a))))
		}
	});
	w.defineProperty(D, {
		RK: "defaultCursor"
	}, function() {
		return this.or
	}, function(a) {
		"" === a && (a = "auto");
		var b = this.or;
		b !== a && (w.j(a, "string", D, "defaultCursor"), this.or = a, this.h("defaultCursor", b, a))
	});
	w.defineProperty(D, {
		click: "click"
	}, function() {
		return this.Ai
	}, function(a) {
		var b = this.Ai;
		b !== a && (null !== a && w.j(a, "function", D, "click"), this.Ai = a, this.h("click", b, a))
	});
	w.defineProperty(D, {
		Rt: "doubleClick"
	}, function() {
		return this.Ii
	}, function(a) {
		var b = this.Ii;
		b !== a && (null !== a && w.j(a, "function", D, "doubleClick"), this.Ii = a, this.h("doubleClick", b, a))
	});
	w.defineProperty(D, {
		lA: "contextClick"
	}, function() {
		return this.Ci
	}, function(a) {
		var b = this.Ci;
		b !== a && (null !== a && w.j(a, "function", D, "contextClick"), this.Ci = a, this.h("contextClick", b, a))
	});
	w.defineProperty(D, {
		dB: "mouseOver"
	}, function() {
		return this.Yi
	}, function(a) {
		var b = this.Yi;
		b !== a && (null !== a && w.j(a, "function", D, "mouseOver"), this.Yi = a, this.h("mouseOver", b, a))
	});
	w.defineProperty(D, {
		cB: "mouseHover"
	}, function() {
		return this.Xi
	}, function(a) {
		var b = this.Xi;
		b !== a && (null !== a && w.j(a, "function", D, "mouseHover"), this.Xi = a, this.h("mouseHover", b, a))
	});
	w.defineProperty(D, {
		bB: "mouseHold"
	}, function() {
		return this.Wi
	}, function(a) {
		var b = this.Wi;
		b !== a && (null !== a && w.j(a, "function", D, "mouseHold"), this.Wi = a, this.h("mouseHold", b, a))
	});
	w.defineProperty(D, {
		dJ: "mouseDragOver"
	}, function() {
		return this.pw
	}, function(a) {
		var b = this.pw;
		b !== a && (null !== a && w.j(a, "function", D, "mouseDragOver"), this.pw = a, this.h("mouseDragOver", b, a))
	});
	w.defineProperty(D, {
		aB: "mouseDrop"
	}, function() {
		return this.Vi
	}, function(a) {
		var b = this.Vi;
		b !== a && (null !== a && w.j(a, "function", D, "mouseDrop"), this.Vi = a, this.h("mouseDrop", b, a))
	});
	w.defineProperty(D, {
		KB: "toolTip"
	}, function() {
		return this.gj
	}, function(a) {
		var b = this.gj;
		b !== a && (this.gj = a, this.h("toolTip", b, a))
	});
	w.defineProperty(D, {
		contextMenu: "contextMenu"
	}, function() {
		return this.Di
	}, function(a) {
		var b = this.Di;
		b !== a && (this.Di = a, this.h("contextMenu", b, a))
	});
	w.defineProperty(D, {
		pb: "commandHandler"
	}, function() {
		return this.Uy
	}, function(a) {
		var b = this.Uy;
		b !== a && (w.G(a, sg, D, "commandHandler"), null !== a.g && w.k("Cannot share CommandHandlers between Diagrams: " + a.toString()), null !== b && b.Sc(null), this.Uy = a, a.Sc(this))
	});
	w.defineProperty(D, {
		eb: "toolManager"
	}, function() {
		return this.Vz
	}, function(a) {
		var b = this.Vz;
		b !== a && (w.G(a, ih, D, "toolManager"), null !== a.g && w.k("Cannot share ToolManagers between Diagrams: " + a.toString()), null !== b && b.Sc(null), this.Vz = a, a.Sc(this))
	});
	w.defineProperty(D, {
		Pt: "defaultTool"
	}, function() {
		return this.$y
	}, function(a) {
		var b = this.$y;
		b !== a && (w.G(a, rg, D, "defaultTool"), this.$y = a, this.$a === b && (this.$a = a))
	});
	w.defineProperty(D, {
		$a: "currentTool"
	}, function() {
		return this.Xy
	}, function(a) {
		var b = this.Xy;
		null !== b && (b.sa && b.doDeactivate(), b.cancelWaitAfter(), b.doStop());
		null === a && (a = this.Pt);
		null !== a && (w.G(a, rg, D, "currentTool"), this.Xy = a, a.Sc(this), a.doStart())
	});
	w.u(D, {
		selection: "selection"
	}, function() {
		return this.Kw
	});
	w.defineProperty(D, {
		VI: "maxSelectionCount"
	}, function() {
		return this.lw
	}, function(a) {
		var b = this.lw;
		if (b !== a)
			if (w.j(a, "number", D, "maxSelectionCount"), 0 <= a && !isNaN(a)) {
				if (this.lw = a, this.h("maxSelectionCount", b, a), !this.ja.lb && (a = this.selection.count - a, 0 < a)) {
					this.Aa("ChangingSelection");
					for (var b = this.selection.xc(), c = 0; c < a; c++) b[c].ib = !1;
					this.Aa("ChangedSelection")
				}
			} else w.Fa(a, ">= 0", D, "maxSelectionCount")
	});
	w.defineProperty(D, {
		hJ: "nodeSelectionAdornmentTemplate"
	}, function() {
		return this.qw
	}, function(a) {
		var b = this.qw;
		b !== a && (w.G(a, kh, D, "nodeSelectionAdornmentTemplate"), this.qw = a, this.h("nodeSelectionAdornmentTemplate", b, a))
	});
	w.defineProperty(D, {
		kI: "groupSelectionAdornmentTemplate"
	}, function() {
		return this.Ov
	}, function(a) {
		var b = this.Ov;
		b !== a && (w.G(a, kh, D, "groupSelectionAdornmentTemplate"), this.Ov = a, this.h("groupSelectionAdornmentTemplate", b, a))
	});
	w.defineProperty(D, {
		OI: "linkSelectionAdornmentTemplate"
	}, function() {
		return this.gw
	}, function(a) {
		var b = this.gw;
		b !== a && (w.G(a, kh, D, "linkSelectionAdornmentTemplate"), this.gw = a, this.h("linkSelectionAdornmentTemplate", b, a))
	});
	w.u(D, {
		Yl: "highlighteds"
	}, function() {
		return this.Sv
	});
	w.defineProperty(D, {
		pi: "isModified"
	}, function() {
		var a = this.ja;
		return a.isEnabled ? null !== a.pj ? !0 : this.Yv && this.bh !== a.uj : this.Yv
	}, function(a) {
		if (this.Yv !== a) {
			w.j(a, "boolean", D, "isModified");
			this.Yv = a;
			var b = this.ja;
			!a && b.isEnabled && (this.bh = b.uj);
			a || bn(this)
		}
	});

	function bn(a) {
		var b = a.pi;
		a.nE !== b && (a.nE = b, a.Aa("Modified"))
	}
	w.defineProperty(D, {
		$: "model"
	}, function() {
		return this.ne
	}, function(a) {
		var b = this.ne;
		if (b !== a) {
			w.G(a, F, D, "model");
			this.$a.doCancel();
			null !== b && b.ja !== a.ja && b.ja.CF && w.k("Do not replace a Diagram.model while a transaction is in progress.");
			this.Ka.Gh();
			this.kx();
			this.dh = !1;
			this.Eo = !0;
			this.bh = -2;
			this.Tf = !1;
			var c = this.$d;
			this.$d = !0;
			this.Ka.Tn("Model");
			null !== b && (null !== this.hh && this.hh.each(function(a) {
				b.Nu(a)
			}), b.Nu(this.vD), b instanceof Q && cn(this, b.Pg), cn(this, b.hg));
			this.ne = a;
			a.gn(this.uD);
			dn(this,
				a.hg);
			a instanceof Q && en(this, a.Pg);
			a.Nu(this.uD);
			a.gn(this.vD);
			null !== this.hh && this.hh.each(function(b) {
				a.gn(b)
			});
			this.$d = c;
			this.Vc || this.oa();
			null !== b && (a.ja.isEnabled = b.ja.isEnabled)
		}
	});
	w.defineProperty(D, {
		Ta: null
	}, function() {
		return this.nD
	}, function(a) {
		this.nD = a
	});
	w.u(D, {
		Tx: null
	}, function() {
		return this.UG
	});

	function xl(a, b) {
		if (b.$ === a.$) {
			var c = b.Dc,
				d = b.propertyName;
			if (c === Ef && "S" === d[0])
				if ("StartingFirstTransaction" === d) c = a.eb, c.ff.each(function(b) {
					b.Sc(a)
				}), c.dg.each(function(b) {
					b.Sc(a)
				}), c.eg.each(function(b) {
					b.Sc(a)
				}), a.$d || a.dh || (a.tr = !0, a.Eo && (a.Tf = !0));
				else if ("StartingUndo" === d || "StartingRedo" === d) {
				var e = a.Ka;
				e.cf && !a.bb && e.Gh();
				a.Aa("ChangingSelection")
			} else "StartedTransaction" === d && (e = a.Ka, e.cf && !a.bb && e.Gh());
			else if (a.Ta) {
				a.Ta = !1;
				try {
					var f = b.sf;
					if ("" !== f)
						if (c === Df) {
							if ("linkFromKey" === f) {
								var h =
									b.object,
									k = a.Xf(h);
								if (null !== k) {
									var l = b.newValue,
										m = a.Ke(l);
									k.W = m
								}
							} else if ("linkToKey" === f) h = b.object, k = a.Xf(h), null !== k && (l = b.newValue, m = a.Ke(l), k.Z = m);
							else if ("linkFromPortId" === f) {
								if (h = b.object, k = a.Xf(h), null !== k) {
									var n = b.newValue;
									"string" === typeof n && (k.Ng = n)
								}
							} else if ("linkToPortId" === f) h = b.object, k = a.Xf(h), null !== k && (n = b.newValue, "string" === typeof n && (k.Hh = n));
							else if ("nodeGroupKey" === f) {
								var h = b.object,
									p = a.vh(h);
								if (null !== p) {
									var q = b.newValue;
									if (void 0 !== q) {
										var r = a.Ke(q);
										p.Da = r instanceof V ? r :
											null
									} else p.Da = null
								}
							} else if ("linkLabelKeys" === f) {
								if (h = b.object, k = a.Xf(h), null !== k) {
									var s = b.oldValue,
										u = b.newValue;
									if (w.isArray(s))
										for (var t = w.Za(s), x = 0; x < t; x++) {
											var v = w.Ba(s, x),
												m = a.Ke(v);
											null !== m && (m.Wb = null)
										}
									if (w.isArray(u))
										for (t = w.Za(u), x = 0; x < t; x++) v = w.Ba(u, x), m = a.Ke(v), null !== m && (m.Wb = k)
								}
							} else if ("nodeParentKey" === f) {
								var z = b.object,
									A = a.Ke(b.newValue),
									L = a.Ax(z);
								if (null !== L) {
									var E = L.wn();
									null !== E ? null === A ? a.remove(E) : a.Ud ? E.W = A : E.Z = A : fn(a, A, L)
								}
							} else if ("parentLinkCategory" === f) {
								var z = b.object,
									L =
									a.Ax(z),
									P = b.newValue;
								null !== L && "string" === typeof P && (E = L.wn(), null !== E && (E.yd = P))
							} else if ("nodeCategory" === f) {
								var h = b.object,
									$ = a.vh(h),
									P = b.newValue;
								null !== $ && "string" === typeof P && ($.yd = P)
							} else if ("linkCategory" === f) {
								var h = b.object,
									S = a.Xf(h),
									P = b.newValue;
								null !== S && "string" === typeof P && (S.yd = P)
							} else if ("nodeDataArray" === f) {
								var ba = b.oldValue;
								cn(a, ba);
								var ha = b.newValue;
								dn(a, ha)
							} else "linkDataArray" === f && (ba = b.oldValue, cn(a, ba), ha = b.newValue, en(a, ha));
							a.pi = !0
						} else c === Ff ? (ha = b.newValue, "nodeDataArray" ===
							f && w.Pa(ha) ? gn(a, ha) : "linkDataArray" === f && w.Pa(ha) ? hn(a, ha) : "linkLabelKeys" === f && xg(ha) && (k = a.Xf(b.object), m = a.Ke(ha), null !== k && null !== m && (m.Wb = k)), a.pi = !0) : c === Qf ? (ba = b.oldValue, "nodeDataArray" === f && w.Pa(ba) ? jn(a, ba) : "linkDataArray" === f && w.Pa(ba) ? jn(a, ba) : "linkLabelKeys" === f && xg(ba) && (m = a.Ke(ba), null !== m && (m.Wb = null)), a.pi = !0) : c === Ef && ("SourceChanged" === f ? null !== b.object ? wl(a, b.object, b.propertyName) : (a.$J(), a.IG()) : "ModelDisplaced" === f && a.em());
					else if (c === Df) {
						var ya = b.propertyName,
							h = b.object;
						if (h ===
							a.$) {
							if ("nodeKeyProperty" === ya || "nodeCategoryProperty" === ya || "linkFromKeyProperty" === ya || "linkToKeyProperty" === ya || "linkFromPortIdProperty" === ya || "linkToPortIdProperty" === ya || "linkLabelKeysProperty" === ya || "nodeIsGroupProperty" === ya || "nodeGroupKeyProperty" === ya || "nodeParentKeyProperty" === ya || "linkCategoryProperty" === ya) a.ja.lb || a.em()
						} else wl(a, h, ya);
						a.pi = !0
					} else if (c === Ff || c === Qf) kn(a, b), a.pi = !0;
					else if (c === Ef) {
						if ("FinishedUndo" === d || "FinishedRedo" === d) a.Aa("ChangedSelection"), Hi(a);
						e = a.Ka;
						"RolledBackTransaction" ===
						d && e.Gh();
						a.tr = !0;
						a.cg();
						0 === a.ja.ti && Sk(e);
						"CommittedTransaction" === d && a.ja.yz && (a.bh = Math.min(a.bh, a.ja.uj - 1));
						var Ga = b.HF;
						Ga && (bn(a), a.Tx.clear());
						!a.Ez && Ga && (a.Ez = !0, w.setTimeout(function() {
							a.$a.standardMouseOver();
							a.Ez = !1
						}, 10))
					}
				} finally {
					a.Ta = !0
				}
			}
		}
	}

	function wl(a, b, c) {
		if ("string" === typeof c) {
			var d = a.vh(b);
			if (null !== d) d.Ib(c), a.$ instanceof $f && (d = a.Xf(b), null !== d && d.Ib(c));
			else {
				for (var d = null, e = a.Hm.i; e.next();) {
					for (var f = e.value, h = 0; h < f.length; h++) {
						var k = f[h].WH(b);
						null !== k && (null === d && (d = w.cb()), d.push(k))
					}
					if (null !== d) break
				}
				if (null !== d) {
					for (e = 0; e < d.length; e++) d[e].Ib(c);
					w.ta(d)
				}
			}
			b === a.$.Mk && a.IG(c)
		}
	}
	w.defineProperty(D, {
		Pe: "skipsModelSourceBindings"
	}, function() {
		return this.QD
	}, function(a) {
		this.QD = a
	});
	w.defineProperty(D, {
		Zu: null
	}, function() {
		return this.Qz
	}, function(a) {
		this.Qz = a
	});

	function kn(a, b) {
		var c = b.Dc === Ff,
			d = c ? b.Cj : b.Dj,
			e = c ? b.newValue : b.oldValue,
			f = a.Hm.ka(b.object);
		if (Array.isArray(f))
			for (var h = 0; h < f.length; h++) {
				var k = f[h];
				if (c) ln(k, e, d);
				else {
					var l = d;
					if (!(0 > l)) {
						var m = l;
						mn(k) && m++;
						k.qf(m, !0);
						nn(k, m, l)
					}
				}
			}
	}

	function Qm(a, b) {
		var c = b.dk;
		if (w.isArray(c)) {
			var d = a.Hm.ka(c);
			if (null === d) d = [], d.push(b), a.Hm.add(c, d);
			else {
				for (c = 0; c < d.length; c++)
					if (d[c] === b) return;
				d.push(b)
			}
		}
	}

	function Um(a, b) {
		var c = b.dk;
		if (w.isArray(c)) {
			var d = a.Hm.ka(c);
			if (null !== d)
				for (var e = 0; e < d.length; e++)
					if (d[e] === b) {
						d.splice(e, 1);
						0 === d.length && a.Hm.remove(c);
						break
					}
		}
	}

	function Pm(a, b) {
		for (var c = b.xa.n, d = c.length, e = 0; e < d; e++) {
			var f = c[e];
			f instanceof yl && on(a, f)
		}
	}

	function on(a, b) {
		var c = b.element;
		if (null !== c && c instanceof HTMLImageElement) {
			var d = b.Te;
			null !== d && (d.Go instanceof Event && null !== b.Ue && b.Ue(b, d.Go), !0 === d.Sr && (null !== b.ji && b.ji(b, d.Lz), null !== b.g && b.g.Hz.add(b)));
			c = c.src;
			d = a.dp.ka(c);
			if (null === d) d = [], d.push(b), a.dp.add(c, d);
			else {
				for (c = 0; c < d.length; c++)
					if (d[c] === b) return;
				d.push(b)
			}
		}
	}

	function Tm(a, b) {
		for (var c = b.xa.n, d = c.length, e = 0; e < d; e++) {
			var f = c[e];
			f instanceof yl && pn(a, f)
		}
	}

	function pn(a, b) {
		var c = b.element;
		if (null !== c && c instanceof HTMLImageElement) {
			var c = c.src,
				d = a.dp.ka(c);
			if (null !== d)
				for (var e = 0; e < d.length; e++)
					if (d[e] === b) {
						d.splice(e, 1);
						0 === d.length && a.dp.remove(c);
						break
					}
		}
	}
	D.prototype.rebuildParts = D.prototype.em = function() {
		for (var a = this.gB.i; a.next();) {
			var b = a.value,
				c = a.key;
			(!b.fe() || b instanceof V) && w.k('Invalid node template in Diagram.nodeTemplateMap: template for "' + c + '" must be a Node or a simple Part, not a Group or Link: ' + b)
		}
		for (a = this.GA.i; a.next();) b = a.value, c = a.key, b instanceof V || w.k('Invalid group template in Diagram.groupTemplateMap: template for "' + c + '" must be a Group, not a normal Node or Link: ' + b);
		for (a = this.VA.i; a.next();) b = a.value, c = a.key, b instanceof
		W || w.k('Invalid link template in Diagram.linkTemplateMap: template for "' + c + '" must be a Link, not a normal Node or simple Part: ' + b);
		a = w.cb();
		for (b = this.selection.i; b.next();)(c = b.value.data) && a.push(c);
		for (var b = w.cb(), d = this.Yl.i; d.next();)(c = d.value.data) && b.push(c);
		c = w.cb();
		for (d = this.ig.i; d.next();) {
			var e = d.value;
			null !== e.data && (c.push(e.data), c.push(e.location))
		}
		for (d = this.links.i; d.next();) e = d.value, null !== e.data && (c.push(e.data), c.push(e.location));
		for (d = this.Pk.i; d.next();) e = d.value, null !==
			e.data && (c.push(e.data), c.push(e.location));
		d = this.$;
		d instanceof Q && cn(this, d.Pg);
		cn(this, d.hg);
		dn(this, d.hg);
		d instanceof Q && en(this, d.Pg);
		for (d = 0; d < a.length; d++) e = this.vh(a[d]), null !== e && (e.ib = !0);
		for (d = 0; d < b.length; d++) e = this.vh(b[d]), null !== e && (e.Og = !0);
		for (d = 0; d < c.length; d += 2) e = this.vh(c[d]), null !== e && (e.location = c[d + 1]);
		w.ta(a);
		w.ta(b);
		w.ta(c)
	};

	function dn(a, b) {
		if (null !== b) {
			for (var c = a.$, d = c instanceof Q, e = w.Za(b), f = 0; f < e; f++) {
				var h = w.Ba(b, f);
				c.Ie(h) ? gn(a, h, !1) : d && hn(a, h)
			}
			if (d || c instanceof $f) {
				for (f = 0; f < e; f++) h = w.Ba(b, f), c.Ie(h) && qn(a, h);
				if (d)
					for (c = a.links; c.next();) rn(c.value)
			}
			sn(a, !1)
		}
	}

	function gn(a, b, c) {
		if (void 0 !== b && null !== b && !a.ja.lb && !a.Ei.contains(b)) {
			void 0 === c && (c = !0);
			var d = a.CA(b),
				e = tn(a, b, d);
			if (null !== e && (mh(e), e = e.copy(), null !== e)) {
				var f = a.Pe;
				a.Pe = !0;
				e.yi = d;
				e.Zd = b;
				a.add(e);
				e.Zd = null;
				e.data = b;
				c && qn(a, b);
				a.Pe = f
			}
		}
	}
	D.prototype.CA = function(a) {
		return this.$.CA(a)
	};
	var un = !1,
		vn = !1;

	function tn(a, b, c) {
		var d = !1,
			e = a.$;
		e instanceof Q && (d = e.QA(b));
		d ? (b = a.GA.ka(c), null === b && (b = a.GA.ka(""), null === b && (vn || (vn = !0, w.trace('No Group template found for category "' + c + '"'), w.trace("  Using default group template")), b = a.GC))) : (b = a.gB.ka(c), null === b && (b = a.gB.ka(""), null === b && (un || (un = !0, w.trace('No Node template found for category "' + c + '"'), w.trace("  Using default node template")), b = a.IC)));
		return b
	}

	function qn(a, b) {
		var c = a.$;
		if (c instanceof Q || c instanceof $f) {
			var d = c.qb(b);
			if (void 0 !== d) {
				var e = Ag(c, d),
					f = a.vh(b);
				if (null !== e && null !== f) {
					for (e = e.i; e.next();) {
						var h = e.value;
						if (c instanceof Q) {
							var k = c;
							if (k.Ie(h)) {
								if (f instanceof V && k.yn(h) === d) {
									var l = f,
										h = a.vh(h);
									null !== h && (h.Da = l)
								}
							} else {
								var m = a.Xf(h);
								if (null !== m && f instanceof T && (l = f, k.Wl(h) === d && (m.W = l), k.Xl(h) === d && (m.Z = l), h = k.Ik(h), w.isArray(h)))
									for (k = 0; k < w.Za(h); k++)
										if (w.Ba(h, k) === d) {
											l.Wb = m;
											break
										}
							}
						} else c instanceof $f && (m = c, m.Ie(h) && f instanceof T && (l = f, m.An(h) === d && (h = a.Ax(h), fn(a, l, h))))
					}
					Cg(c, d)
				}
				c instanceof Q ? (c = c.yn(b), void 0 !== c && (c = a.Ke(c), c instanceof V && (f.Da = c))) : c instanceof $f && (c = c.An(b), void 0 !== c && f instanceof T && (l = f, f = a.Ke(c), fn(a, f, l)))
			}
		}
	}

	function fn(a, b, c) {
		if (null !== b && null !== c) {
			var d = a.eb.MF,
				e = b,
				f = c;
			if (a.Ud)
				for (b = f.he; b.next();) {
					if (b.value.Z === f) return
				} else
					for (e = c, f = b, b = e.he; b.next();)
						if (b.value.W === e) return;
			if (null === d || !Xi(d, e, f, null, !0))
				if (d = a.fu(c.data), b = hj(a, d), null !== b && (mh(b), b = b.copy(), null !== b)) {
					var h = a.Pe;
					a.Pe = !0;
					b.yi = d;
					b.Zd = c.data;
					b.W = e;
					b.Z = f;
					a.add(b);
					b.Zd = null;
					b.data = c.data;
					a.Pe = h
				}
		}
	}

	function en(a, b) {
		if (null !== b) {
			for (var c = w.Za(b), d = 0; d < c; d++) {
				var e = w.Ba(b, d);
				hn(a, e)
			}
			sn(a, !1)
		}
	}

	function hn(a, b) {
		if (void 0 !== b && null !== b && !a.ja.lb && !a.Oj.contains(b)) {
			var c = a.fu(b),
				d = hj(a, c);
			if (null !== d && (mh(d), d = d.copy(), null !== d)) {
				var e = a.Pe;
				a.Pe = !0;
				d.yi = c;
				d.Zd = b;
				var c = a.$,
					f = c.cI(b);
				"" !== f && (d.Ng = f);
				f = c.Wl(b);
				void 0 !== f && (f = a.Ke(f), f instanceof T && (d.W = f));
				f = c.gI(b);
				"" !== f && (d.Hh = f);
				f = c.Xl(b);
				void 0 !== f && (f = a.Ke(f), f instanceof T && (d.Z = f));
				c = c.Ik(b);
				if (w.isArray(c))
					for (var f = w.Za(c), h = 0; h < f; h++) {
						var k = w.Ba(c, h),
							k = a.Ke(k);
						null !== k && (k.Wb = d)
					}
				a.add(d);
				d.Zd = null;
				d.data = b;
				a.Pe = e
			}
		}
	}
	D.prototype.fu = function(a) {
		var b = this.$,
			c = "";
		b instanceof Q ? c = b.fu(a) : b instanceof $f && (c = b.eI(a));
		return c
	};
	var wn = !1;

	function hj(a, b) {
		var c = a.VA.ka(b);
		null === c && (c = a.VA.ka(""), null === c && (wn || (wn = !0, w.trace('No Link template found for category "' + b + '"'), w.trace("  Using default link template")), c = a.HC));
		return c
	}

	function cn(a, b) {
		for (var c = w.Za(b), d = 0; d < c; d++) {
			var e = w.Ba(b, d);
			jn(a, e)
		}
	}

	function jn(a, b) {
		if (void 0 !== b && null !== b) {
			var c = a.vh(b);
			if (null !== c) {
				Vm(a, c, !1);
				var d = a.$;
				if (d instanceof Q && c instanceof T) {
					var e = d.qb(c.data);
					if (void 0 !== e) {
						for (var f = c.he; f.next();) Bg(d, e, f.value.data);
						c.Cf && (f = c.Wb, null !== f && Bg(d, e, f.data));
						if (c instanceof V)
							for (c = c.vc; c.next();) f = c.value.data, d.Ie(f) && Bg(d, e, f)
					}
				} else if (d instanceof $f && c instanceof T) {
					f = a.Xf(c.data);
					if (null !== f) {
						f.ib = !1;
						f.Og = !1;
						var h = f.layer;
						if (null !== h) {
							var k = h.qf(-1, f, !1);
							0 <= k && a.cd(Qf, "parts", h, f, null, k, null);
							k = f.Px;
							null !==
								k && k(f, h, null)
						}
					}
					f = a.Ud;
					for (c = c.he; c.next();) h = c.value, h = (f ? h.Z : h.W).data, d.Ie(h) && Bg(d, e, h)
				}
			}
		}
	}
	D.prototype.findPartForKey = D.prototype.XH = function(a) {
		if (null === a || void 0 === a) return null;
		var b = this.$.we(a);
		return null !== b ? this.Ei.ka(b) : this.$ instanceof Q && (b = this.$.Sp(a), null !== b) ? this.Oj.ka(b) : null
	};
	D.prototype.findNodeForKey = D.prototype.Ke = function(a) {
		if (null === a || void 0 === a) return null;
		a = this.$.we(a);
		if (null === a) return null;
		a = this.Ei.ka(a);
		return a instanceof T ? a : null
	};
	D.prototype.findPartForData = D.prototype.vh = function(a) {
		if (null === a) return null;
		var b = this.Ei.ka(a);
		return null !== b ? b : b = this.Oj.ka(a)
	};
	D.prototype.findNodeForData = D.prototype.Ax = function(a) {
		if (null === a) return null;
		a = this.Ei.ka(a);
		return a instanceof T ? a : null
	};
	D.prototype.findLinkForData = D.prototype.Xf = function(a) {
		return null === a ? null : this.Oj.ka(a)
	};
	D.prototype.findNodesByExample = function(a) {
		for (var b = new I(T), c = this.bp.i; c.next();) {
			var d = c.value,
				e = d.data;
			if (null !== e)
				for (var f = 0; f < arguments.length; f++) {
					var h = arguments[f];
					if (w.Pa(h) && xn(this, e, h)) {
						b.add(d);
						break
					}
				}
		}
		return b.i
	};
	D.prototype.findLinksByExample = function(a) {
		for (var b = new I(W), c = this.Vo.i; c.next();) {
			var d = c.value,
				e = d.data;
			if (null !== e)
				for (var f = 0; f < arguments.length; f++) {
					var h = arguments[f];
					if (w.Pa(h) && xn(this, e, h)) {
						b.add(d);
						break
					}
				}
		}
		return b.i
	};

	function xn(a, b, c) {
		for (var d in c) {
			var e = b[d],
				f = c[d];
			if (w.isArray(f)) {
				if (!w.isArray(e) || e.length < f.length) return !1;
				for (var h = 0; h < e.length; h++) {
					var k = e[h],
						l = f[h];
					if (void 0 !== l && !yn(a, k, l)) return !1
				}
			} else if (!yn(a, e, f)) return !1
		}
		return !0
	}

	function yn(a, b, c) {
		if ("function" === typeof c) {
			if (!c(b)) return !1
		} else if (c instanceof RegExp) {
			if (!b || !c.test(b.toString())) return !1
		} else if (w.Pa(b) && w.Pa(c)) {
			if (!xn(a, b, c)) return !1
		} else if (b !== c) return !1;
		return !0
	}
	w.defineProperty(D, {
		AL: "nodeTemplate"
	}, function() {
		return this.Zi.ka("")
	}, function(a) {
		var b = this.Zi.ka("");
		b !== a && (w.G(a, R, D, "nodeTemplate"), this.Zi.add("", a), this.h("nodeTemplate", b, a), this.ja.lb || this.em())
	});
	w.defineProperty(D, {
		gB: "nodeTemplateMap"
	}, function() {
		return this.Zi
	}, function(a) {
		var b = this.Zi;
		b !== a && (w.G(a, ma, D, "nodeTemplateMap"), this.Zi = a, this.h("nodeTemplateMap", b, a), this.ja.lb || this.em())
	});
	w.defineProperty(D, {
		eL: "groupTemplate"
	}, function() {
		return this.jl.ka("")
	}, function(a) {
		var b = this.jl.ka("");
		b !== a && (w.G(a, V, D, "groupTemplate"), this.jl.add("", a), this.h("groupTemplate", b, a), this.ja.lb || this.em())
	});
	w.defineProperty(D, {
		GA: "groupTemplateMap"
	}, function() {
		return this.jl
	}, function(a) {
		var b = this.jl;
		b !== a && (w.G(a, ma, D, "groupTemplateMap"), this.jl = a, this.h("groupTemplateMap", b, a), this.ja.lb || this.em())
	});
	w.defineProperty(D, {
		pL: "linkTemplate"
	}, function() {
		return this.fk.ka("")
	}, function(a) {
		var b = this.fk.ka("");
		b !== a && (w.G(a, W, D, "linkTemplate"), this.fk.add("", a), this.h("linkTemplate", b, a), this.ja.lb || this.em())
	});
	w.defineProperty(D, {
		VA: "linkTemplateMap"
	}, function() {
		return this.fk
	}, function(a) {
		var b = this.fk;
		b !== a && (w.G(a, ma, D, "linkTemplateMap"), this.fk = a, this.h("linkTemplateMap", b, a), this.ja.lb || this.em())
	});
	w.defineProperty(D, {
		BI: null
	}, function() {
		return this.eh
	}, function(a) {
		this.eh = a
	});
	w.defineProperty(D, {
		df: "isMouseCaptured"
	}, function() {
		return this.kD
	}, function(a) {
		var b = this.Cb;
		null !== b && (a ? (this.R.bubbles = !1, this.Py ? (b.removeEventListener("pointermove", this.mq, !1), b.removeEventListener("pointerdown", this.lq, !1), b.removeEventListener("pointerup", this.oq, !1), b.removeEventListener("pointerout", this.nq, !1), window.addEventListener("pointermove", this.mq, !0), window.addEventListener("pointerdown", this.lq, !0), window.addEventListener("pointerup", this.oq, !0), window.addEventListener("pointerout",
			this.nq, !0)) : (b.removeEventListener("mousemove", this.Nn, !1), b.removeEventListener("mousedown", this.Mn, !1), b.removeEventListener("mouseup", this.Pn, !1), b.removeEventListener("mouseout", this.On, !1), window.addEventListener("mousemove", this.Nn, !0), window.addEventListener("mousedown", this.Mn, !0), window.addEventListener("mouseup", this.Pn, !0), window.addEventListener("mouseout", this.On, !0)), b.removeEventListener("wheel", this.Qn, !1), window.addEventListener("wheel", this.Qn, !0), window.addEventListener("selectstart",
			this.preventDefault, !1)) : (this.Py ? (window.removeEventListener("pointermove", this.mq, !0), window.removeEventListener("pointerdown", this.lq, !0), window.removeEventListener("pointerup", this.oq, !0), window.removeEventListener("pointerout", this.nq, !0), b.addEventListener("pointermove", this.mq, !1), b.addEventListener("pointerdown", this.lq, !1), b.addEventListener("pointerup", this.oq, !1), b.addEventListener("pointerout", this.nq, !1)) : (window.removeEventListener("mousemove", this.Nn, !0), window.removeEventListener("mousedown",
			this.Mn, !0), window.removeEventListener("mouseup", this.Pn, !0), window.removeEventListener("mouseout", this.On, !0), b.addEventListener("mousemove", this.Nn, !1), b.addEventListener("mousedown", this.Mn, !1), b.addEventListener("mouseup", this.Pn, !1), b.addEventListener("mouseout", this.On, !1)), window.removeEventListener("wheel", this.Qn, !0), window.removeEventListener("selectstart", this.preventDefault, !1), b.addEventListener("wheel", this.Qn, !1)), this.kD = a)
	});
	w.defineProperty(D, {
		position: "position"
	}, function() {
		return this.jb
	}, function(a) {
		var b = this.jb;
		if (!b.L(a)) {
			w.G(a, y, D, "position");
			var c = this.rb.copy();
			a = a.copy();
			if (!this.Vc && null !== this.Cb) {
				this.Vc = !0;
				var d = this.scale;
				Rl(this, a, this.te, this.Jb / d, this.Mb / d, this.qo, !1);
				this.Vc = !1
			}
			this.jb = a.S();
			a = this.Ka;
			a.rc && il(a, b, this.jb);
			this.Vc || this.Ju(c, this.rb, this.vb, this.vb, !1)
		}
	});
	w.defineProperty(D, {
		sI: "initialPosition"
	}, function() {
		return this.Uv
	}, function(a) {
		this.Uv.L(a) || (w.G(a, y, D, "initialPosition"), this.Uv = a.S())
	});
	w.defineProperty(D, {
		tI: "initialScale"
	}, function() {
		return this.Vv
	}, function(a) {
		this.Vv !== a && (w.j(a, "number", D, "initialScale"), this.Vv = a)
	});
	w.defineProperty(D, {
		Bn: "grid"
	}, function() {
		null === this.td && Il(this);
		return this.td
	}, function(a) {
		var b = this.td;
		if (b !== a) {
			null === b && (Il(this), b = this.td);
			w.G(a, C, D, "grid");
			a.type !== Jl && w.k("Diagram.grid must be a Panel of type Panel.Grid");
			var c = b.Q;
			null !== c && c.remove(b);
			this.td = a;
			a.name = "GRID";
			null !== c && c.add(a);
			dm(this);
			this.oa();
			this.h("grid", b, a)
		}
	});
	w.u(D, {
		rb: "viewportBounds"
	}, function() {
		var a = this.mE;
		if (null === this.Cb) return a;
		var b = this.jb,
			c = this.vb;
		a.m(b.x, b.y, Math.max(this.Jb, 0) / c, Math.max(this.Mb, 0) / c);
		return a
	});
	w.defineProperty(D, {
		eF: "fixedBounds"
	}, function() {
		return this.Mv
	}, function(a) {
		var b = this.Mv;
		b.L(a) || (w.G(a, B, D, "fixedBounds"), -Infinity !== a.width && Infinity !== a.height && -Infinity !== a.height || w.k("fixedBounds width/height must not be Infinity"), this.Mv = a = a.S(), this.Fc(), this.h("fixedBounds", b, a))
	});
	w.defineProperty(D, {
		oy: "scrollMargin"
	}, function() {
		return this.Ew
	}, function(a) {
		"number" === typeof a ? a = new hb(a) : w.G(a, hb, D, "scrollMargin");
		var b = this.Ew;
		b.L(a) || (this.Ew = a = a.S(), this.h("scrollMargin", b, a), this.Mu())
	});
	w.defineProperty(D, {
		sB: "scrollMode"
	}, function() {
		return this.Fw
	}, function(a) {
		var b = this.Fw;
		b !== a && (w.ob(a, D, D, "scrollMode"), this.Fw = a, a === tl && Pl(this, !1), this.h("scrollMode", b, a))
	});
	w.defineProperty(D, {
		DJ: "scrollsPageOnFocus"
	}, function() {
		return this.Iw
	}, function(a) {
		var b = this.Iw;
		b !== a && (w.j(a, "boolean", D, "scrollsPageOnFocus"), this.Iw = a, this.h("scrollsPageOnFocus", b, a))
	});
	w.defineProperty(D, {
		YF: "positionComputation"
	}, function() {
		return this.zw
	}, function(a) {
		var b = this.zw;
		b !== a && (null !== a && w.j(a, "function", D, "positionComputation"), this.zw = a, Pl(this, !1), this.h("positionComputation", b, a))
	});
	w.defineProperty(D, {
		jG: "scaleComputation"
	}, function() {
		return this.Bw
	}, function(a) {
		var b = this.Bw;
		b !== a && (null !== a && w.j(a, "function", D, "scaleComputation"), this.Bw = a, Ym(this, this.scale, this.scale), this.h("scaleComputation", b, a))
	});
	w.u(D, {
		te: "documentBounds"
	}, function() {
		return this.Fv
	});

	function Sl(a, b) {
		a.Zj = !1;
		var c = a.Fv;
		c.L(b) || (b = b.S(), a.Fv = b, Pl(a, !1), a.Aa("DocumentBoundsChanged", null, c.copy()), am(a))
	}
	w.defineProperty(D, {
		SA: "isVirtualized"
	}, function() {
		return this.bw
	}, function(a) {
		var b = this.bw;
		b !== a && (w.j(a, "boolean", D, "isVirtualized"), this.bw = a, this.h("isVirtualized", b, a))
	});
	w.defineProperty(D, {
		scale: "scale"
	}, function() {
		return this.vb
	}, function(a) {
		var b = this.vb;
		w.zd(a, D, "scale");
		b !== a && Ym(this, b, a)
	});
	w.defineProperty(D, {
		Ml: "autoScale"
	}, function() {
		return this.vm
	}, function(a) {
		var b = this.vm;
		b !== a && (w.ob(a, D, D, "autoScale"), this.vm = a, this.h("autoScale", b, a), a !== ph && Pl(this, !1))
	});
	w.defineProperty(D, {
		hL: "initialAutoScale"
	}, function() {
		return this.nl
	}, function(a) {
		var b = this.nl;
		b !== a && (w.ob(a, D, D, "initialAutoScale"), this.nl = a, this.h("initialAutoScale", b, a))
	});
	w.defineProperty(D, {
		uI: "initialViewportSpot"
	}, function() {
		return this.Wv
	}, function(a) {
		var b = this.Wv;
		b !== a && (w.G(a, K, D, "initialViewportSpot"), a.$c() || w.k("initialViewportSpot must be a specific Spot: " + a), this.Wv = a, this.h("initialViewportSpot", b, a))
	});
	w.defineProperty(D, {
		rI: "initialDocumentSpot"
	}, function() {
		return this.Tv
	}, function(a) {
		var b = this.Tv;
		b !== a && (w.G(a, K, D, "initialDocumentSpot"), a.$c() || w.k("initialViewportSpot must be a specific Spot: " + a), this.Tv = a, this.h("initialDocumentSpot", b, a))
	});
	w.defineProperty(D, {
		Ah: "minScale"
	}, function() {
		return this.mw
	}, function(a) {
		w.zd(a, D, "minScale");
		var b = this.mw;
		b !== a && (0 < a ? (this.mw = a, this.h("minScale", b, a), a > this.scale && (this.scale = a)) : w.Fa(a, "> 0", D, "minScale"))
	});
	w.defineProperty(D, {
		zh: "maxScale"
	}, function() {
		return this.kw
	}, function(a) {
		w.zd(a, D, "maxScale");
		var b = this.kw;
		b !== a && (0 < a ? (this.kw = a, this.h("maxScale", b, a), a < this.scale && (this.scale = a)) : w.Fa(a, "> 0", D, "maxScale"))
	});
	w.defineProperty(D, {
		pm: "zoomPoint"
	}, function() {
		return this.Xw
	}, function(a) {
		this.Xw.L(a) || (w.G(a, y, D, "zoomPoint"), this.Xw = a = a.S())
	});
	w.defineProperty(D, {
		kA: "contentAlignment"
	}, function() {
		return this.qo
	}, function(a) {
		var b = this.qo;
		b.L(a) || (w.G(a, K, D, "contentAlignment"), this.qo = a = a.S(), this.h("contentAlignment", b, a), Pl(this, !1))
	});
	w.defineProperty(D, {
		iL: "initialContentAlignment"
	}, function() {
		return this.Jo
	}, function(a) {
		var b = this.Jo;
		b.L(a) || (w.G(a, K, D, "initialContentAlignment"), this.Jo = a = a.S(), this.h("initialContentAlignment", b, a))
	});
	w.defineProperty(D, {
		padding: "padding"
	}, function() {
		return this.lf
	}, function(a) {
		"number" === typeof a ? a = new hb(a) : w.G(a, hb, D, "padding");
		var b = this.lf;
		b.L(a) || (this.lf = a = a.S(), this.Fc(), this.h("padding", b, a))
	});
	w.u(D, {
		ig: "nodes"
	}, function() {
		return this.bp.i
	});
	w.u(D, {
		links: "links"
	}, function() {
		return this.Vo.i
	});
	w.u(D, {
		Pk: "parts"
	}, function() {
		return this.zb.i
	});
	D.prototype.findTopLevelNodesAndLinks = function() {
		for (var a = new I(R), b = this.bp.i; b.next();) {
			var c = b.value;
			c.cq && a.add(c)
		}
		for (b = this.Vo.i; b.next();) c = b.value, c.cq && a.add(c);
		return a.i
	};
	D.prototype.findTopLevelGroups = function() {
		return this.El.i
	};
	w.defineProperty(D, {
		Sb: "layout"
	}, function() {
		return this.le
	}, function(a) {
		var b = this.le;
		b !== a && (w.G(a, tg, D, "layout"), null !== b && (b.g = null, b.group = null), this.le = a, a.g = this, a.group = null, this.dl = !0, this.h("layout", b, a), this.Ne())
	});
	D.prototype.layoutDiagram = function(a) {
		Hi(this);
		a && sn(this, !0);
		em(this, !1)
	};

	function sn(a, b) {
		for (var c = a.El.i; c.next();) zn(a, c.value, b);
		null !== a.Sb && (b ? a.Sb.rf = !1 : a.Sb.J())
	}

	function zn(a, b, c) {
		if (null !== b) {
			for (var d = b.Zo.i; d.next();) zn(a, d.value, c);
			null !== b.Sb && (c ? b.Sb.rf = !1 : b.Sb.J())
		}
	}

	function em(a, b) {
		if (a.dl && !a.az) {
			var c = a.Ta;
			a.Ta = !0;
			try {
				var d = a.ja.ti;
				0 === d && a.Hb("Layout");
				var e = a.Ka;
				1 >= d && !e.cf && !e.rc && (b || e.Tn("Layout"));
				a.dl = !1;
				for (var f = a.El.i; f.next();) An(a, f.value, b, d);
				var h = a.Sb;
				h.rf || (!b || h.GF || 0 === d ? (h.doLayout(a), Hi(a), h.rf = !0) : a.dl = !0)
			} finally {
				0 === d && a.Yc("Layout"), a.dl = !h.rf, a.Ta = c
			}
		}
	}

	function An(a, b, c, d) {
		if (null !== b) {
			for (var e = b.Zo.i; e.next();) An(a, e.value, c, d);
			e = b.Sb;
			null === e || e.rf || (!c || e.GF || 0 === d ? (b.Rn = !b.location.I(), e.doLayout(b), b.J(Bn), qm(a, b), e.rf = !0) : a.dl = !0)
		}
	}
	w.defineProperty(D, {
		Ud: "isTreePathToChildren"
	}, function() {
		return this.aw
	}, function(a) {
		var b = this.aw;
		if (b !== a && (w.j(a, "boolean", D, "isTreePathToChildren"), this.aw = a, this.h("isTreePathToChildren", b, a), !this.ja.lb))
			for (a = this.ig; a.next();) Cn(a.value)
	});
	D.prototype.findTreeRoots = function() {
		for (var a = new H(T), b = this.ig; b.next();) {
			var c = b.value;
			c.cq && null === c.wn() && a.add(c)
		}
		return a.i
	};
	w.defineProperty(D, {
		PB: "treeCollapsePolicy"
	}, function() {
		return this.Sw
	}, function(a) {
		var b = this.Sw;
		b !== a && (a !== vl && a !== $m && a !== an && w.k("Unknown Diagram.treeCollapsePolicy: " + a), this.Sw = a, this.h("treeCollapsePolicy", b, a))
	});
	w.defineProperty(D, {
		xh: null
	}, function() {
		return this.cD
	}, function(a) {
		this.cD = a
	});

	function ul(a) {
		function b(a) {
			var b = a.toLowerCase(),
				h = new H("function");
			c.add(a, h);
			c.add(b, h);
			d.add(a, a);
			d.add(b, a)
		}
		var c = new ma("string", H),
			d = new ma("string", "string");
		b("AnimationStarting");
		b("AnimationFinished");
		b("BackgroundSingleClicked");
		b("BackgroundDoubleClicked");
		b("BackgroundContextClicked");
		b("ClipboardChanged");
		b("ClipboardPasted");
		b("DocumentBoundsChanged");
		b("ExternalObjectsDropped");
		b("InitialLayoutCompleted");
		b("LayoutCompleted");
		b("LinkDrawn");
		b("LinkRelinked");
		b("LinkReshaped");
		b("Modified");
		b("ObjectSingleClicked");
		b("ObjectDoubleClicked");
		b("ObjectContextClicked");
		b("PartCreated");
		b("PartResized");
		b("PartRotated");
		b("SelectionMoved");
		b("SelectionCopied");
		b("SelectionDeleting");
		b("SelectionDeleted");
		b("SelectionGrouped");
		b("SelectionUngrouped");
		b("ChangingSelection");
		b("ChangedSelection");
		b("SubGraphCollapsed");
		b("SubGraphExpanded");
		b("TextEdited");
		b("TreeCollapsed");
		b("TreeExpanded");
		b("ViewportBoundsChanged");
		a.cz = c;
		a.bz = d
	}

	function oa(a, b) {
		var c = a.bz.ka(b);
		return null !== c ? c : a.bz.ka(b.toLowerCase())
	}

	function Dn(a, b) {
		var c = a.cz.ka(b);
		if (null !== c) return c;
		c = a.cz.ka(b.toLowerCase());
		if (null !== c) return c;
		w.k("Unknown DiagramEvent name: " + b);
		return null
	}
	D.prototype.addDiagramListener = D.prototype.Yw = function(a, b) {
		w.j(a, "string", D, "addDiagramListener:name");
		w.j(b, "function", D, "addDiagramListener:listener");
		var c = Dn(this, a);
		null !== c && c.add(b)
	};
	D.prototype.removeDiagramListener = D.prototype.nB = function(a, b) {
		w.j(a, "string", D, "removeDiagramListener:name");
		w.j(b, "function", D, "addDiagramListener:listener");
		var c = Dn(this, a);
		null !== c && c.remove(b)
	};
	D.prototype.raiseDiagramEvent = D.prototype.Aa = function(a, b, c) {
		var d = Dn(this, a),
			e = new Bf;
		e.g = this;
		a = oa(this, a);
		null !== a && (e.name = a);
		void 0 !== b && (e.GB = b);
		void 0 !== c && (e.iB = c);
		b = d.length;
		if (1 === b) d = d.ea(0), d(e);
		else if (0 !== b)
			for (c = d.xc(), a = 0; a < b; a++) d = c[a], d(e);
		return e.cancel
	};
	D.prototype.isUnoccupied = D.prototype.eq = function(a, b) {
		void 0 === b && (b = null);
		return En(this, !1, null, b).eq(a.x, a.y, a.width, a.height)
	};
	D.prototype.computeOccupiedArea = function() {
		return this.SA ? this.rb.copy() : this.Zj ? Ol(this) : this.te.copy()
	};

	function En(a, b, c, d) {
		null === a.Kd && (a.Kd = new Fn);
		if (a.Kd.lu || a.Kd.group !== c || a.Kd.FB !== d) {
			if (null === c) {
				b = a.computeOccupiedArea();
				b.Yf(100, 100);
				a.Kd.initialize(b);
				b = w.Kf();
				for (var e = a.ig; e.next();) {
					var f = e.value,
						h = f.layer;
					null !== h && h.visible && !h.Pc && Gn(a, f, d, b)
				}
			} else
				for (0 < c.vc.count && (b = a.computePartsBounds(c.vc, !1), b.Yf(20, 20), a.Kd.initialize(b)), b = w.Kf(), e = c.vc; e.next();) f = e.value, f instanceof T && Gn(a, f, d, b);
			w.Eb(b);
			a.Kd.group = c;
			a.Kd.FB = d;
			a.Kd.lu = !1
		} else b && Hn(a.Kd);
		return a.Kd
	}

	function Gn(a, b, c, d) {
		if (b !== c)
			if (b.isVisible() && b.fA && !b.Cf) {
				c = b.getAvoidableRect(d);
				d = a.Kd.Gp;
				b = a.Kd.Ep;
				for (var e = c.x + c.width, f = c.y + c.height, h = c.x; h < e; h += d) {
					for (var k = c.y; k < f; k += b) In(a.Kd, h, k);
					In(a.Kd, h, f)
				}
				for (k = c.y; k < f; k += b) In(a.Kd, e, k);
				In(a.Kd, e, f)
			} else if (b instanceof V)
			for (b = b.vc; b.next();) e = b.value, e instanceof T && Gn(a, e, c, d)
	}
	D.invalidatePositionArray = D.prototype.MA = function(a) {
		null !== this.Kd && !this.Kd.lu && (void 0 === a && (a = null), null === a || a.fA && !a.Cf) && (this.Kd.lu = !0)
	};
	D.prototype.simulatedMouseMove = function(a, b, c) {
		if (null !== Sh) {
			var d = Sh.g;
			c instanceof D || (c = null);
			var e = Th;
			c !== e && (null !== e && e !== d && null !== e.eb.ue && (Yh(e), Sh.Hx = !1, e.eb.ue.doSimulatedDragLeave()), Th = c, null !== c && c !== d && null !== c.eb.ue && (ei(), e = c.eb.ue, ai.contains(e) || ai.add(e), c.eb.ue.doSimulatedDragEnter()));
			if (null === c || c === d || !c.xE || c.hb || !c.Cp) return !1;
			d = c.eb.ue;
			null !== d && (null !== a ? b = c.Gr(a) : null === b && (b = new y), c.Yb.da = b, c.Yb.Dk = !1, c.Yb.up = !1, d.doSimulatedDragOver());
			return !0
		}
		return !1
	};
	D.prototype.simulatedMouseUp = function(a, b, c, d) {
		if (null !== Sh) {
			null === d && (d = b);
			b = Th;
			var e = Sh.g;
			if (d !== b) {
				if (null !== b && b !== e && null !== b.eb.ue) return Yh(b), Sh.Hx = !1, b.eb.ue.doSimulatedDragLeave(), !1;
				Th = d;
				null !== d && null !== d.eb.ue && (ei(), b = d.eb.ue, ai.contains(b) || ai.add(b), d.eb.ue.doSimulatedDragEnter())
			}
			if (null === d) return Sh.doCancel(), !0;
			if (d !== this) return null !== a && (c = d.Gr(a)), d.Yb.da = c, d.Yb.Dk = !1, d.Yb.up = !0, a = d.eb.ue, null !== a && a.doSimulatedDrop(), a = Sh, null !== a && (d = a.mayCopy(), a.Lf = d ? "Copy" : "Move", a.stopTool()), !0
		}
		return !1
	};
	w.defineProperty(D, {
		FK: "autoScrollInterval"
	}, function() {
		return this.Sq
	}, function(a) {
		var b = this.Sq;
		w.zd(a, D, "scale");
		b !== a && (this.Sq = a, this.h("autoScrollInterval", b, a))
	});
	w.defineProperty(D, {
		EE: "autoScrollRegion"
	}, function() {
		return this.rv
	}, function(a) {
		"number" === typeof a ? a = new hb(a) : w.G(a, hb, D, "autoScrollRegion");
		var b = this.rv;
		b.L(a) || (this.rv = a = a.S(), this.Fc(), this.h("autoScrollRegion", b, a))
	});
	D.prototype.doAutoScroll = D.prototype.tA = function(a) {
		this.qv.assign(a);
		Jn(this, this.qv).Oc(this.position) ? Yh(this) : Kn(this)
	};

	function Kn(a) {
		-1 === a.lo && (a.lo = w.setTimeout(function() {
			if (-1 !== a.lo) {
				Yh(a);
				var b = a.R.event;
				if (null !== b) {
					var c = Jn(a, a.qv);
					c.Oc(a.position) || (a.position = c, a.R.da = a.OB(a.qv), c = Xl(b), a.simulatedMouseMove(b, null, c) || a.doMouseMove(), a.Zj = !0, Sl(a, a.sh()), a.De = !0, a.cg(), Kn(a))
				}
			}
		}, a.Sq))
	}

	function Yh(a) {
		-1 !== a.lo && (w.clearTimeout(a.lo), a.lo = -1)
	}

	function Jn(a, b) {
		var c = a.position,
			d = a.EE;
		if (0 >= d.top && 0 >= d.left && 0 >= d.right && 0 >= d.bottom) return c;
		var e = a.rb,
			f = a.scale,
			e = w.lg(0, 0, e.width * f, e.height * f),
			h = w.xb(0, 0);
		if (b.x >= e.x && b.x < e.x + d.left) {
			var k = Math.max(a.Su, 1),
				k = k | 0;
			h.x -= k;
			b.x < e.x + d.left / 2 && (h.x -= k);
			b.x < e.x + d.left / 4 && (h.x -= 4 * k)
		} else b.x <= e.x + e.width && b.x > e.x + e.width - d.right && (k = Math.max(a.Su, 1), k |= 0, h.x += k, b.x > e.x + e.width - d.right / 2 && (h.x += k), b.x > e.x + e.width - d.right / 4 && (h.x += 4 * k));
		b.y >= e.y && b.y < e.y + d.top ? (k = Math.max(a.Tu, 1), k |= 0, h.y -= k, b.y < e.y +
			d.top / 2 && (h.y -= k), b.y < e.y + d.top / 4 && (h.y -= 4 * k)) : b.y <= e.y + e.height && b.y > e.y + e.height - d.bottom && (k = Math.max(a.Tu, 1), k |= 0, h.y += k, b.y > e.y + e.height - d.bottom / 2 && (h.y += k), b.y > e.y + e.height - d.bottom / 4 && (h.y += 4 * k));
		h.Oc(dd) || (c = new y(c.x + h.x / f, c.y + h.y / f));
		w.Eb(e);
		w.v(h);
		return c
	}
	D.prototype.makeSvg = D.prototype.makeSVG = function(a) {
		void 0 === a && (a = new ra);
		a.context = "svg";
		a = Ln(this, a);
		return null !== a ? a.km : null
	};
	D.prototype.makeImage = function(a) {
		void 0 === a && (a = new ra);
		var b = (a.document || document).createElement("img");
		b.src = this.QI(a);
		return b
	};
	D.prototype.makeImageData = D.prototype.QI = function(a) {
		void 0 === a && (a = new ra);
		var b = Ln(this, a);
		if (null !== b) {
			var c = a.returnType,
				c = void 0 === c ? "string" : c.toLowerCase();
			switch (c) {
				case "imagedata":
					return b.Bk.getImageData(0, 0, b.width, b.height);
				case "blob":
					b = b.Od;
					c = a.callback;
					if ("function" !== typeof c) {
						w.k('Error: Diagram.makeImageData called with "returnType: toBlob", but no "callback" function property defined.');
						break
					}
					if ("function" === typeof b.toBlob) return b.toBlob(c, a.type, a.details), "toBlob";
					if ("function" ===
						typeof b.msToBlob) return c(b.msToBlob()), "msToBlob";
					c(null);
					break;
				default:
					return b.toDataURL(a.type, a.details)
			}
		}
		return ""
	};
	var Mn = !1;

	function Ln(a, b) {
		a.Ka.Gh();
		a.cg();
		if (null === a.Cb) return null;
		"object" !== typeof b && w.k("properties argument must be an Object.");
		var c = !1,
			d = b.size || null,
			e = b.scale || null;
		void 0 !== b.scale && isNaN(b.scale) && (e = "NaN");
		var f = b.maxSize;
		void 0 === b.maxSize && (c = !0, f = "svg" === b.context ? new ia(Infinity, Infinity) : new ia(2E3, 2E3));
		var h = b.position || null,
			k = b.parts || null,
			l = void 0 === b.padding ? 1 : b.padding,
			m = b.background || null,
			n = b.omitTemporary;
		void 0 === n && (n = !0);
		var p = b.document || document,
			q = b.elementFinished || null,
			r =
			b.showTemporary;
		void 0 === r && (r = !n);
		n = b.showGrid;
		void 0 === n && (n = r);
		null !== d && isNaN(d.width) && isNaN(d.height) && (d = null);
		"number" === typeof l ? l = new hb(l) : l instanceof hb || (l = new hb(0));
		l.left = Math.max(l.left, 0);
		l.right = Math.max(l.right, 0);
		l.top = Math.max(l.top, 0);
		l.bottom = Math.max(l.bottom, 0);
		a.hf.He(!0);
		var s = new Wc(null, p),
			u = s.Bk;
		if (!(d || e || k || h)) {
			s.width = a.Jb + Math.ceil(l.left + l.right);
			s.height = a.Mb + Math.ceil(l.top + l.bottom);
			if ("svg" === b.context) return u = new Oc(s.Od, p, q), Km(a, u, l, new ia(s.width, s.height),
				a.vb, a.jb, k, m, r, n), u;
			a.vr = !1;
			Km(a, u, l, new ia(s.width, s.height), a.vb, a.jb, k, m, r, n);
			a.vr = !0;
			return s
		}
		var t = a.pb.qx,
			x = new y(0, 0),
			v = a.te.copy();
		v.PJ(a.padding);
		if (r)
			for (var z = !0, z = a.dc.n, A = z.length, L = 0; L < A; L++) {
				var E = z[L];
				if (E.visible && E.Pc)
					for (var E = E.zb.n, P = E.length, $ = 0; $ < P; $++) {
						var S = E[$];
						S.RA && S.isVisible() && (S = S.Y, S.I() && v.Ih(S))
					}
			}
		x.x = v.x;
		x.y = v.y;
		if (null !== k) {
			var ba, z = !0,
				A = k.i;
			for (A.reset(); A.next();) S = A.value, S instanceof R && (E = S.layer, null !== E && !E.visible || null !== E && !r && E.Pc || !S.isVisible() || (S =
				S.Y, S.I() && (z ? (z = !1, ba = S.copy()) : ba.Ih(S))));
			z && (ba = new B(0, 0, 0, 0));
			v.width = ba.width;
			v.height = ba.height;
			x.x = ba.x;
			x.y = ba.y
		}
		null !== h && h.I() && (x = h, e || (e = t));
		z = S = 0;
		null !== l && (S = l.left + l.right, z = l.top + l.bottom);
		L = A = 0;
		null !== d && (A = d.width, L = d.height, isFinite(A) && (A = Math.max(0, A - S)), isFinite(L) && (L = Math.max(0, L - z)));
		ba = h = 0;
		null !== d && null !== e ? ("NaN" === e && (e = t), d.I() ? (h = A, ba = L) : isNaN(L) ? (h = A, ba = v.height * e) : (h = v.width * e, ba = L)) : null !== d ? d.I() ? (e = Math.min(A / v.width, L / v.height), h = A, ba = L) : isNaN(L) ? (e = A / v.width,
			h = A, ba = v.height * e) : (e = L / v.height, h = v.width * e, ba = L) : null !== e ? "NaN" === e && f.I() ? (e = Math.min((f.width - S) / v.width, (f.height - z) / v.height), e > t ? (e = t, h = v.width, ba = v.height) : (h = f.width, ba = f.height)) : (h = v.width * e, ba = v.height * e) : (e = t, h = v.width, ba = v.height);
		null !== l ? (h += S, ba += z) : l = new hb(0);
		null !== f && (d = f.width, f = f.height, "svg" !== b.context && c && !Mn && (h > d || ba > f) && (w.trace("Diagram.makeImage(data): Diagram width or height is larger than the default max size. (" + Math.ceil(h) + "x" + Math.ceil(ba) + " vs 2000x2000) Consider increasing the max size."),
			Mn = !0), isNaN(d) && (d = 2E3), isNaN(f) && (f = 2E3), isFinite(d) && (h = Math.min(h, d)), isFinite(f) && (ba = Math.min(ba, f)));
		s.width = Math.ceil(h);
		s.height = Math.ceil(ba);
		if ("svg" === b.context) return u = new Oc(s.Od, p, q), Km(a, u, l, new ia(Math.ceil(h), Math.ceil(ba)), e, x, k, m, r, n), u;
		a.vr = !1;
		Km(a, u, l, new ia(Math.ceil(h), Math.ceil(ba)), e, x, k, m, r, n);
		a.vr = !0;
		return s
	}
	D.inherit = function(a, b) {
		w.j(a, "function", D, "inherit");
		w.j(b, "function", D, "inherit");
		b.cH && w.k("Cannot inherit from " + w.of(b));
		w.La(a, b)
	};

	function Dl() {
		this.XD = null;
		this.eH = "63ad05bbe23a1786468a4c741b6d2";
		this.Ji = this.eH === this._tk ? !0 : null
	}
	Dl.prototype.om = function(a) {
		a.hf.setTransform(a.Hd, 0, 0, a.Hd, 0, 0);
		if (null === this.Ji) {
			var b = "f",
				c = window[w.Kg("76a715b2f73f148a")][w.Kg("72ba13b5")];
			a = w.Kg;
			this.Ji = !0;
			if (window[a("7da7")] && window[a("7da7")][a("76a115b6ed251eaf4692")]) {
				var d = window[a("7da7")][a("76a115b6ed251eaf4692")],
					d = a(d).split(a("39e9"));
				if (!(6 > d.length)) {
					var e = a(d[1]).split(".");
					if ("7da71ca0" === d[4]) {
						var f = a(w[a("6cae19")]).split(".");
						if (e[0] > f[0] || e[0] === f[0] && e[1] >= f[1]) {
							f = c[a("76ad18b4f73e")];
							for (e = c[a("73a612b6fb191d")](a("35e7")) +
								2; e < f; e++) b += c[e];
							c = b[a("73a612b6fb191d")](a(d[2]));
							0 > c && a(d[2]) !== a("7da71ca0ad381e90") && (c = b[a("73a612b6fb191d")](a("76a715b2ef3e149757")));
							0 > c && (c = b[a("73a612b6fb191d")](a("76a715b2ef3e149757")));
							if (this.Ji = !(0 <= c && c < b[a("73a612b6fb191d")](a("35"))))
								if (b = a(d[2]), "#" === b[0]) {
									c = window.document[a("79ba13b2f7333e8846865a7d00")]("div");
									for (e = d[0].replace(/[A-Za-z]/g, ""); 4 > e.length;) e += "9";
									e = e.substr(e.length - 4);
									d = "" + ["gsh", "gsf"][parseInt(e.substr(0, 1), 10) % 2];
									d += ["Header", "Background", "Display", "Feedback"][parseInt(e.substr(0,
										1), 10) % 4];
									c[a("79a417a0f0181a8946")] = d;
									if (window.document[a("78a712aa")]) {
										if (window.document[a("78a712aa")][a("7bb806b6ed32388c4a875b")](c), e = window[a("7dad0290ec3b0b91578e5b40007031bf")](c)[a("7dad0283f1390b81519f4645156528bf")](a("78a704b7e62456904c9b12701b6532a8")), window.document[a("78a712aa")][a("68ad1bbcf533388c4a875b")](c), e)
											if (-1 !== e.indexOf(parseInt(b[1] + b[2], 16)) && -1 !== e.indexOf(parseInt(b[3] + b[4], 16))) this.Ji = !1;
											else if (w.ru || w.aq || w.bq || w.PA)
											for (d = "." + d, e = 0; e < document.styleSheets.length; e++) {
												a =
													document.styleSheets[e].rules || document.styleSheets[e].cssRules;
												for (var h in a)
													if (d === a[h].selectorText) {
														this.Ji = !1;
														break
													}
											}
									} else this.Ji = null, this.Ji = !1
								}
						}
					}
				}
			} else {
				f = c[a("76ad18b4f73e")];
				for (e = c[a("73a612b6fb191d")](a("35e7")) + 2; e < f; e++) b += c[e];
				c = b[a("73a612b6fb191d")](a("7da71ca0ad381e90"));
				this.Ji = !(0 <= c && c < b[a("73a612b6fb191d")](a("35")))
			}
		}
		return 0 < this.Ji && this !== this.XD ? !0 : !1
	};
	Dl.prototype.t = function() {
		this.XD = null
	};

	function El(a, b) {
		void 0 !== b && null !== b || w.k("Diagram setup requires an argument DIV.");
		null !== a.Nb && w.k("Diagram has already completed setup.");
		"string" === typeof b ? a.Nb = window.document.getElementById(b) : b instanceof HTMLDivElement ? a.Nb = b : w.k("No DIV or DIV id supplied: " + b);
		null === a.Nb && w.k("Invalid DIV id; could not get element with id: " + b);
		void 0 !== a.Nb.aa && w.k("Invalid div id; div already has a Diagram associated with it.");
		"static" === window.getComputedStyle(a.Nb, null).position && (a.Nb.style.position =
			"relative");
		a.Nb.style["-webkit-tap-highlight-color"] = "rgba(255, 255, 255, 0)";
		a.Nb.style["-ms-touch-action"] = "none";
		a.Nb.innerHTML = "";
		a.Nb.aa = a;
		var c = new Wc(a);
		c.Od.innerHTML = "This text is displayed if your browser does not support the Canvas HTML element.";
		void 0 !== c.style && (c.style.position = "absolute", c.style.top = "0px", c.style.left = "0px", "rtl" === window.getComputedStyle(a.Nb, null).getPropertyValue("direction") && (a.Ur = !0), c.style.zIndex = "2", c.style.bM = "none", c.style.webkitUserSelect = "none", c.style.MozUserSelect =
			"none");
		a.Jb = a.Nb.clientWidth || 1;
		a.Mb = a.Nb.clientHeight || 1;
		a.Cb = c;
		a.hf = c.Bk;
		var d = a.hf;
		a.Hd = a.computePixelRatio();
		Mm(a, a.Jb, a.Mb);
		//a.Hv = d[w.Kg("7eba17a4ca3b1a8346")][w.Kg("78a118b7")](d, w.om, 4, 4);
		a.Hv = function(){return true;}
		a.Nb.insertBefore(c.Od, a.Nb.firstChild);
		c = new Wc(null);
		c.width = 1;
		c.height = 1;
		a.fz = c;
		a.TC = c.Bk;
		var c = w.createElement("div"),
			e = w.createElement("div");
		c.style.position = "absolute";
		c.style.overflow = "auto";
		c.style.width = a.Jb + "px";
		c.style.height = a.Mb + "px";
		c.style.zIndex = "1";
		e.style.position = "absolute";
		e.style.width =
			"1px";
		e.style.height = "1px";
		a.Nb.appendChild(c);
		c.appendChild(e);
		c.onscroll = Kl;
		c.onmousedown = Ml;
		c.ontouchstart = Ml;
		c.aa = a;
		c.aH = !0;
		c.bH = !0;
		a.Gw = c;
		a.bt = e;
		a.hy = w.NE(function() {
			a.pk = null;
			a.oa()
		}, 300, !1);
		a.TB = w.NE(function() {
			Tk(a)
		}, 250, !1);
		a.preventDefault = function(a) {
			a.preventDefault();
			return !1
		};
		a.Nn = function(b) {
			if (a.isEnabled) {
				a.eh = !0;
				var c = a.wd;
				w.Dn && c.yj ? (b.preventDefault(), b.simulated = !0, a.kt = b) : (a.wd = a.Yb, a.Yb = c, Vl(a, a, b, c, !0), a.simulatedMouseMove(b, null, b.target.aa) || (a.doMouseMove(), a.$a.isBeyondDragSize() &&
					(a.Uh = 0), $l(c, b)))
			}
		};
		a.Mn = function(b) {
			if (a.isEnabled) {
				a.eh = !0;
				var c = a.wd;
				if (w.Dn && null !== a.kt) a.kt = b, b.preventDefault();
				else if (w.Dn && 400 > b.timeStamp - a.ek) b.preventDefault();
				else if (a.bk) b.preventDefault();
				else {
					a.wd = a.Yb;
					a.Yb = c;
					Vl(a, a, b, c, !0);
					c.Dk = !0;
					c.re = b.detail;
					if (w.aq || w.bq) b.timeStamp - a.ek < a.Xz && !a.$a.isBeyondDragSize() ? a.Uh++ : a.Uh = 1, a.ek = b.timeStamp, c.re = a.Uh;
					a.Li = c;
					!0 === c.Br.simulated ? (b.preventDefault(), b.simulated = !0) : (Sh = null, a.doMouseDown(), a.Li = a.Li.copy(), 1 === b.button ? b.preventDefault() :
						$l(c, b))
				}
			}
		};
		a.Pn = function(b) {
			if (a.isEnabled)
				if (a.bk && 2 === b.button) b.preventDefault();
				else if (a.bk && 0 === b.button && (a.bk = !1), a.tp) b.preventDefault();
			else {
				a.eh = !0;
				var c = a.wd;
				if (w.Dn) {
					if (400 > b.timeStamp - a.ek) {
						b.preventDefault();
						return
					}
					a.ek = b.timeStamp
				}
				if (w.Dn && null !== a.kt) a.kt = null, b.preventDefault();
				else {
					a.wd = a.Yb;
					a.Yb = c;
					Vl(a, a, b, c, !0);
					c.up = !0;
					c.re = b.detail;
					if (w.aq || w.bq) c.re = a.Uh;
					c.bubbles = b.bubbles;
					c.If = Xl(b);
					a.simulatedMouseUp(b, null, new y, c.If) || (a.doMouseUp(), Yh(a), $l(c, b))
				}
			}
		};
		a.Qn = function(b) {
			if (a.isEnabled) {
				var c =
					a.wd;
				a.wd = a.Yb;
				a.Yb = c;
				Vl(a, a, b, c, !0);
				c.bubbles = !0;
				var d = 0,
					e = 0;
				void 0 !== b.wheelDelta && (e = 0 < b.wheelDelta ? 1 : -1);
				void 0 !== b.wheelDeltaY && (e = 0 < b.wheelDeltaY ? 1 : -1);
				void 0 !== b.wheelDeltaX && (d = 0 < b.wheelDeltaX ? 1 : -1);
				void 0 !== b.deltaY && (e = 0 < b.deltaY ? 1 : -1);
				void 0 !== b.deltaX && (d = 0 < b.deltaX ? 1 : -1);
				c.Ck = 0 === e ? -d : -e;
				a.doMouseWheel();
				$l(c, b)
			}
		};
		a.On = function() {
			if (a.isEnabled) {
				a.eh = !1;
				var b = a.$a;
				b.cancelWaitAfter();
				b.standardMouseOver()
			}
		};
		a.NB = function(b) {
			if (a.isEnabled) {
				a.tp = !1;
				a.bk = !0;
				var c = Yl(a, b, b.targetTouches[0],
					1 < b.touches.length);
				a.doMouseDown();
				$l(c, b)
			}
		};
		a.MB = function(b) {
			if (a.isEnabled) {
				var c = null;
				0 < b.targetTouches.length ? c = b.targetTouches[0] : 0 < b.changedTouches.length && (c = b.changedTouches[0]);
				var d = Zl(a, b, c, 1 < b.touches.length);
				a.simulatedMouseMove(c ? c : b, null, d.If) || a.doMouseMove();
				$l(d, b)
			}
		};
		a.LB = function(b) {
			if (a.isEnabled)
				if (a.tp) b.preventDefault();
				else if (!(1 < b.touches.length)) {
				var c = null,
					d = null;
				0 < b.targetTouches.length ? d = b.targetTouches[0] : 0 < b.changedTouches.length && (d = b.changedTouches[0]);
				var e = a.wd;
				a.wd = a.Yb;
				a.Yb = e;
				e.g = a;
				e.re = 1;
				if (null !== d) {
					c = window.document.elementFromPoint(d.clientX, d.clientY);
					null !== c && c.aa instanceof D && c.aa !== a && Wl(c.aa, d, e);
					Wl(a, d, e);
					var m = d.screenX,
						n = d.screenY,
						p = a.dw;
					b.timeStamp - a.ek < a.Xz && !(25 < Math.abs(p.x - m) || 25 < Math.abs(p.y - n)) ? a.Uh++ : a.Uh = 1;
					e.re = a.Uh;
					a.ek = b.timeStamp;
					a.dw.m(m, n)
				}
				m = 0;
				b.ctrlKey && (m += 1);
				b.altKey && (m += 2);
				b.shiftKey && (m += 4);
				b.metaKey && (m += 8);
				e.md = m;
				e.button = 0;
				e.buttons = 1;
				e.Dk = !1;
				e.up = !0;
				e.Ck = 0;
				e.tc = !1;
				e.bubbles = !1;
				e.event = b;
				e.timestamp = Date.now();
				e.If =
					null === c ? Xl(b) : c.aa ? c.aa : null;
				e.Ae = null;
				a.simulatedMouseUp(d ? d : b, null, new y, e.If) || a.doMouseUp();
				$l(e, b);
				a.bk = !1
			}
		};
		a.lq = function(b) {
			if (a.isEnabled) {
				a.eh = !0;
				var c = a.Iz;
				void 0 === c[b.pointerId] && (c[b.pointerId] = b);
				var c = a.ep,
					d = !1;
				if (null !== c[0] && c[0].pointerId === b.pointerId) c[0] = b;
				else if (null !== c[1] && c[1].pointerId === b.pointerId) c[1] = b, d = !0;
				else if (null === c[0]) c[0] = b;
				else if (null === c[1]) c[1] = b, d = !0;
				else {
					b.preventDefault();
					return
				}
				if ("touch" === b.pointerType || "pen" === b.pointerType) a.tp = !1, a.bk = !0;
				c = Yl(a,
					b, b, d);
				"touch" !== b.pointerType && (c.button = b.button, void 0 === b.buttons || w.ru || (c.buttons = b.buttons), w.yh && 0 === b.button && b.ctrlKey && (c.button = 2));
				a.doMouseDown();
				1 === b.button ? b.preventDefault() : $l(c, b)
			}
		};
		a.mq = function(b) {
			if (a.isEnabled) {
				a.eh = !0;
				var c = a.ep;
				if (null !== c[0] && c[0].pointerId === b.pointerId) c[0] = b;
				else {
					if (null !== c[1] && c[1].pointerId === b.pointerId) {
						c[1] = b;
						return
					}
					if (null === c[0]) c[0] = b;
					else return
				}
				c[0].pointerId === b.pointerId && (c = Zl(a, b, b, null !== c[1]), "touch" !== b.pointerType && (c.button = b.button,
					void 0 === b.buttons || w.ru || (c.buttons = b.buttons), w.yh && 0 === b.button && b.ctrlKey && (c.button = 2)), a.simulatedMouseMove(b, null, c.If) || (a.doMouseMove(), $l(c, b)))
			}
		};
		a.oq = function(b) {
			if (a.isEnabled) {
				a.eh = !0;
				var c = "touch" === b.pointerType || "pen" === b.pointerType,
					d = a.Iz;
				if (c && a.tp) delete d[b.pointerId], b.preventDefault();
				else if (d = a.ep, null !== d[0] && d[0].pointerId === b.pointerId) {
					d[0] = null;
					d = a.wd;
					a.wd = a.Yb;
					a.Yb = d;
					var e = window.document.elementFromPoint(b.clientX, b.clientY);
					null !== e && e.aa instanceof D && e.aa !== a &&
						Wl(e.aa, b, d);
					Wl(a, b, d);
					d.g = a;
					var m = a.dw,
						n = c ? 25 : 10;
					b.timeStamp - a.ek < a.Xz && !(Math.abs(m.x - b.screenX) > n || Math.abs(m.y - b.screenY) > n) ? a.Uh++ : a.Uh = 1;
					d.re = a.Uh;
					a.ek = b.timeStamp;
					a.dw.m(b.screenX, b.screenY);
					m = 0;
					b.ctrlKey && (m += 1);
					b.altKey && (m += 2);
					b.shiftKey && (m += 4);
					b.metaKey && (m += 8);
					d.md = m;
					d.button = b.button;
					void 0 === b.buttons || w.ru || (d.buttons = b.buttons);
					w.yh && 0 === b.button && b.ctrlKey && (d.button = 2);
					d.Dk = !1;
					d.up = !0;
					d.Ck = 0;
					d.tc = !1;
					d.bubbles = !0;
					d.event = b;
					d.timestamp = Date.now();
					d.If = null === e ? Xl(b) : e.aa ? e.aa : null;
					d.Ae = null;
					a.simulatedMouseUp(b, null, new y, d.If) || (a.doMouseUp(), Yh(a), $l(d, b), c && (a.bk = !1))
				} else null !== d[1] && d[1].pointerId === b.pointerId && (d[1] = null)
			}
		};
		a.nq = function(b) {
			if (a.isEnabled) {
				a.eh = !1;
				var c = a.Iz;
				c[b.pointerId] && delete c[b.pointerId];
				c = a.ep;
				null !== c[0] && c[0].pointerId === b.pointerId && (c[0] = null);
				null !== c[1] && c[1].pointerId === b.pointerId && (c[1] = null);
				"touch" !== b.pointerType && "pen" !== b.pointerType && (b = a.$a, b.cancelWaitAfter(), b.standardMouseOver())
			}
		};
		d.He(!0);
		Hl(a)
	}

	function Nn(a) {
		1 < arguments.length && w.k("Palette constructor can only take one optional argument, the DIV HTML element or its id.");
		D.call(this, a);
		this.Jt = !0;
		this.Kl = !1;
		this.hb = !0;
		this.kA = Bb;
		this.Sb = new On
	}
	w.La(Nn, D);
	w.ga("Palette", Nn);

	function Al(a) {
		1 < arguments.length && w.k("Overview constructor can only take one optional argument, the DIV HTML element or its id.");
		D.call(this, a);
		this.Ka.isEnabled = !1;
		this.Vc = !0;
		this.lk = null;
		this.Iv = !0;
		this.IJ("drawShadows", !1);
		var b = new R,
			c = new X;
		c.stroke = "magenta";
		c.mb = 2;
		c.fill = "transparent";
		c.name = "BOXSHAPE";
		b.gm = !0;
		b.vB = "BOXSHAPE";
		b.WA = "BOXSHAPE";
		b.hG = "BOXSHAPE";
		b.cursor = "move";
		b.add(c);
		this.wm = b;
		c = new kh;
		c.type = Nj;
		c.Ff = Jb;
		var d = new Oj;
		d.ef = !0;
		c.add(d);
		d = new X;
		d.oh = Jb;
		d.Db = "Rectangle";
		d.Ca = new ia(64,
			64);
		d.cursor = "se-resize";
		d.alignment = Sb;
		c.add(d);
		b.fG = c;
		this.hn = this.xk = !1;
		this.Af = this.Lt = !0;
		this.EE = new hb(0, 0, 0, 0);
		this.Sz = new Wc(null);
		this.dH = this.Sz.Bk;
		this.eb.ue = new Pn;
		this.eb.iG = new Qn;
		var e = this;
		this.click = function() {
			var a = e.lk;
			if (null !== a) {
				var b = a.rb,
					c = e.R.da;
				a.position = new y(c.x - b.width / 2, c.y - b.height / 2)
			}
		};
		this.UF = function() {
			Rn(e)
		};
		this.TF = function() {
			null !== e.lk && (e.Fc(), e.oa())
		};
		this.Ml = Tl;
		this.Vc = !1
	}
	w.La(Al, D);
	w.ga("Overview", Al);

	function Sn(a) {
		a.Vc || a.$d || !1 !== a.Tf || (a.Tf = !0, requestAnimationFrame(function() {
			if (a.Tf && !a.$d && (a.Tf = !1, null !== a.Nb)) {
				a.$d = !0;
				Hi(a);
				a.te.I() || Sl(a, a.sh());
				null === a.Nb && w.k("No div specified");
				null === a.Cb && w.k("No canvas specified");
				if (a.De) {
					var b = a.lk;
					if (null !== b && !b.Ka.cf && !b.Ka.rc) {
						var b = a.hf,
							c = a.Sz;
						b.setTransform(1, 0, 0, 1, 0, 0);
						b.clearRect(0, 0, a.Cb.width, a.Cb.height);
						b.drawImage(c.Od, 0, 0);
						c = a.kd;
						c.reset();
						1 !== a.scale && c.scale(a.scale);
						0 === a.position.x && 0 === a.position.y || c.translate(-a.position.x, -a.position.y);
						b.scale(a.Hd, a.Hd);
						b.transform(c.m11, c.m12, c.m21, c.m22, c.dx, c.dy);
						for (var c = a.dc.n, d = c.length, e = 0; e < d; e++) c[e].ve(b, a);
						a.ol = !1;
						a.De = !1
					}
				}
				a.$d = !1
			}
		}))
	}
	Al.prototype.computePixelRatio = function() {
		return 1
	};
	Al.prototype.ve = function() {
		null === this.Nb && w.k("No div specified");
		null === this.Cb && w.k("No canvas specified");
		if (this.De) {
			var a = this.lk;
			if (null !== a && !a.Ka.cf) {
				Hm(this);
				var b = a.Bn;
				(null !== b && b.visible && isNaN(b.width) || isNaN(b.height)) && dm(a);
				var c = this.Cb,
					b = this.hf,
					d = this.Sz,
					e = this.dH;
				d.width = c.width;
				d.height = c.height;
				b.He(!0);
				b.setTransform(1, 0, 0, 1, 0, 0);
				b.clearRect(0, 0, c.width, c.height);
				d = this.kd;
				d.reset();
				1 !== this.scale && d.scale(this.scale);
				0 === this.position.x && 0 === this.position.y || d.translate(-this.position.x, -this.position.y);
				b.scale(this.Hd, this.Hd);
				b.transform(d.m11, d.m12, d.m21, d.m22, d.dx, d.dy);
				for (var d = this.Iv, f = this.rb, h = a.dc.n, k = h.length, a = 0; a < k; a++) {
					var l = h[a],
						m = b,
						n = f,
						p = d;
					if (l.visible && 0 !== l.Bc && (void 0 === p && (p = !0), p || !l.Pc)) {
						1 !== l.Bc && (m.globalAlpha = l.Bc);
						for (var p = this.scale, l = l.zb.n, q = l.length, r = 0; r < q; r++) {
							var s = l[r],
								u = s.Y;
							u.Zf(n) && (1 < u.width * p || 1 < u.height * p ? s.ve(m, this) : ml(s, m))
						}
						m.globalAlpha = 1
					}
				}
				e.drawImage(c.Od, 0, 0);
				c = this.dc.n;
				e = c.length;
				for (a = 0; a < e; a++) c[a].ve(b, this);
				this.De = this.ol = !1
			}
		}
	};
	w.defineProperty(Al, {
		hB: "observed"
	}, function() {
		return this.lk
	}, function(a) {
		var b = this.lk;
		null !== a && w.G(a, D, Al, "observed");
		a instanceof Al && w.k("Overview.observed Diagram may not be an Overview itself: " + a);
		b !== a && (null !== b && (this.remove(this.rh), b.nB("ViewportBoundsChanged", this.UF), b.nB("DocumentBoundsChanged", this.TF), b.ww.remove(this)), this.lk = a, null !== a && (a.Yw("ViewportBoundsChanged", this.UF), a.Yw("DocumentBoundsChanged", this.TF), a.ww.add(this), this.add(this.rh), Rn(this)), this.Fc(), this.h("observed",
			b, a))
	});
	w.defineProperty(Al, {
		rh: "box"
	}, function() {
		return this.wm
	}, function(a) {
		var b = this.wm;
		b !== a && (this.wm = a, this.remove(b), this.add(this.wm), Rn(this), this.h("box", b, a))
	});
	w.defineProperty(Al, {
		bL: "drawsTemporaryLayers"
	}, function() {
		return this.Iv
	}, function(a) {
		this.Iv !== a && (this.Iv = a, this.Mu())
	});

	function Rn(a) {
		var b = a.rh;
		if (null !== b) {
			var c = a.lk;
			if (null !== c) {
				a.De = !0;
				var c = c.rb,
					d = b.Uu,
					e = w.mm();
				e.m(c.width, c.height);
				d.Ca = e;
				w.Hk(e);
				a = 2 / a.scale;
				d instanceof X && (d.mb = a);
				b.location = new y(c.x - a / 2, c.y - a / 2)
			}
		}
	}
	Al.prototype.sh = function() {
		var a = this.lk;
		return null === a ? ed : a.te
	};
	Al.prototype.wF = function() {
		!0 !== this.De && (this.De = !0, Sn(this))
	};
	Al.prototype.Ju = function(a, b, c, d, e) {
		this.Vc || (Nl(this), this.oa(), am(this), this.Fc(), Rn(this), this.nh.scale = c, this.nh.position.x = a.x, this.nh.position.y = a.y, this.nh.bounds.set(a), this.nh.isScroll = e, this.Aa("ViewportBoundsChanged", this.nh, a))
	};

	function Pn() {
		oh.call(this);
		this.xl = null
	}
	w.La(Pn, oh);
	Pn.prototype.canStart = function() {
		if (!this.isEnabled) return !1;
		var a = this.g;
		if (null === a || !a.Kl || !a.Af) return !1;
		var b = a.hB;
		if (null === b) return !1;
		if (null === this.findDraggablePart()) {
			var c = b.rb;
			this.xl = new y(c.width / 2, c.height / 2);
			a = a.Ec.da;
			b.position = new y(a.x - this.xl.x, a.y - this.xl.y)
		}
		return !0
	};
	Pn.prototype.doActivate = function() {
		this.xl = null;
		oh.prototype.doActivate.call(this)
	};
	Pn.prototype.moveParts = function() {
		var a = this.g,
			b = a.hB;
		if (null !== b) {
			var c = a.rh;
			if (null !== c) {
				if (null === this.xl) {
					var d = a.Ec.da,
						c = c.location;
					this.xl = new y(d.x - c.x, d.y - c.y)
				}
				a = a.R.da;
				b.position = new y(a.x - this.xl.x, a.y - this.xl.y)
			}
		}
	};

	function Qn() {
		Mj.call(this)
	}
	w.La(Qn, Mj);
	Qn.prototype.resize = function(a) {
		var b = this.g.hB;
		if (null !== b) {
			var c = b.rb.copy();
			b.position = a.position;
			(c.width !== a.width || c.height !== a.height) && 0 < a.width && 0 < a.height && (b.scale = Math.min(c.width / a.width, c.height / a.height))
		}
	};

	function Tn() {
		this.gg = this.bd = this.Dd = this.Gc = 0
	}

	function ga(a) {
		1 < arguments.length && w.k("Brush constructor can take at most one optional argument, the Brush type.");
		w.oc(this);
		this.P = !1;
		void 0 === a ? (this.na = og, this.oo = "black") : "string" === typeof a ? (this.na = og, this.oo = a) : (this.na = a, this.oo = "black");
		var b = this.na;
		b === pg ? (this.np = Bb, this.Co = Rb) : this.Co = b === bd ? this.np = Jb : this.np = yb;
		this.Nw = 0;
		this.Jv = NaN;
		this.ah = this.yw = this.$g = null;
		this.Vy = this.po = 0
	}
	w.ga("Brush", ga);
	var og;
	ga.Solid = og = w.p(ga, "Solid", 0);
	var pg;
	ga.Linear = pg = w.p(ga, "Linear", 1);
	var bd;
	ga.Radial = bd = w.p(ga, "Radial", 2);
	var Un;
	ga.Pattern = Un = w.p(ga, "Pattern", 4);
	var Vn;
	ga.Lab = Vn = w.p(ga, "Lab", 5);
	var Wn;
	ga.HSL = Wn = w.p(ga, "HSL", 6);
	ga.prototype.copy = function() {
		var a = new ga;
		a.na = this.na;
		a.oo = this.oo;
		a.np = this.np.S();
		a.Co = this.Co.S();
		a.Nw = this.Nw;
		a.Jv = this.Jv;
		null !== this.$g && (a.$g = this.$g.copy());
		a.yw = this.yw;
		return a
	};
	g = ga.prototype;
	g.Ha = function() {
		this.freeze();
		Object.freeze(this);
		return this
	};
	g.freeze = function() {
		this.P = !0;
		null !== this.$g && this.$g.freeze();
		return this
	};
	g.Qa = function() {
		Object.isFrozen(this) && w.k("cannot thaw constant: " + this);
		this.P = !1;
		null !== this.$g && this.$g.Qa();
		return this
	};
	g.ic = function(a) {
		a.Ge === ga ? this.type = a : w.Ij(this, a)
	};
	g.toString = function() {
		var a = "Brush(";
		if (this.type === og) a += this.color;
		else if (a = this.type === pg ? a + "Linear " : this.type === bd ? a + "Radial " : this.type === Un ? a + "Pattern " : a + "(unknown) ", a += this.start + " " + this.end, null !== this.yk)
			for (var b = this.yk.i; b.next();) a += " " + b.key + ":" + b.value;
		return a + ")"
	};
	ga.prototype.addColorStop = ga.prototype.addColorStop = function(a, b) {
		this.P && w.ma(this);
		("number" !== typeof a || !isFinite(a) || 1 < a || 0 > a) && w.Fa(a, "0 <= loc <= 1", ga, "addColorStop:loc");
		w.j(b, "string", ga, "addColorStop:color");
		null === this.$g && (this.$g = new ma("number", "string"));
		this.$g.add(a, b);
		this.na === og && (this.type = pg);
		this.ah = null
	};
	w.defineProperty(ga, {
		type: "type"
	}, function() {
		return this.na
	}, function(a) {
		this.P && w.ma(this, a);
		w.ob(a, ga, ga, "type");
		this.na = a;
		this.start.Td() && (a === pg ? this.start = Bb : a === bd && (this.start = Jb));
		this.end.Td() && (a === pg ? this.end = Rb : a === bd && (this.end = Jb));
		this.ah = null
	});
	w.defineProperty(ga, {
		color: "color"
	}, function() {
		return this.oo
	}, function(a) {
		this.P && w.ma(this, a);
		this.oo = a;
		this.ah = null
	});
	w.defineProperty(ga, {
		start: "start"
	}, function() {
		return this.np
	}, function(a) {
		this.P && w.ma(this, a);
		w.G(a, K, ga, "start");
		this.np = a.S();
		this.ah = null
	});
	w.defineProperty(ga, {
		end: "end"
	}, function() {
		return this.Co
	}, function(a) {
		this.P && w.ma(this, a);
		w.G(a, K, ga, "end");
		this.Co = a.S();
		this.ah = null
	});
	w.defineProperty(ga, {
		$u: "startRadius"
	}, function() {
		return this.Nw
	}, function(a) {
		this.P && w.ma(this, a);
		w.zd(a, ga, "startRadius");
		0 > a && w.Fa(a, ">= zero", ga, "startRadius");
		this.Nw = a;
		this.ah = null
	});
	w.defineProperty(ga, {
		St: "endRadius"
	}, function() {
		return this.Jv
	}, function(a) {
		this.P && w.ma(this, a);
		w.zd(a, ga, "endRadius");
		0 > a && w.Fa(a, ">= zero", ga, "endRadius");
		this.Jv = a;
		this.ah = null
	});
	w.defineProperty(ga, {
		yk: "colorStops"
	}, function() {
		return this.$g
	}, function(a) {
		this.P && w.ma(this, a);
		this.$g = a;
		this.ah = null
	});
	w.defineProperty(ga, {
		pattern: "pattern"
	}, function() {
		return this.yw
	}, function(a) {
		this.P && w.ma(this, a);
		this.yw = a;
		this.ah = null
	});
	ga.randomColor = function(a, b) {
		void 0 === a && (a = 128);
		void 0 === b && (b = Math.max(a, 255));
		var c = Math.abs(b - a),
			d = Math.floor(a + Math.random() * c).toString(16),
			e = Math.floor(a + Math.random() * c).toString(16),
			c = Math.floor(a + Math.random() * c).toString(16);
		2 > d.length && (d = "0" + d);
		2 > e.length && (e = "0" + e);
		2 > c.length && (c = "0" + c);
		return "#" + d + e + c
	};
	var Xn = (new Wc(null)).Bk,
		ea;
	ga.isValidColor = ea = function(a) {
		if ("black" === a) return !0;
		if ("" === a) return !1;
		Xn.fillStyle = "#000000";
		var b = Xn.fillStyle;
		Xn.fillStyle = a;
		if (Xn.fillStyle !== b) return !0;
		Xn.fillStyle = "#FFFFFF";
		b = Xn.fillStyle;
		Xn.fillStyle = a;
		return Xn.fillStyle !== b
	};
	var Yn = new Tn,
		Zn = new Tn,
		$n = new Tn,
		ao = new Tn;
	ga.lighten = function(a) {
		return bo(a)
	};
	ga.prototype.lightenBy = function(a, b) {
		this.P && w.ma(this);
		var c = void 0 === a || "number" !== typeof a ? .2 : a,
			d = void 0 === b ? Vn : b;
		if (this.type === og) co(this.color), this.color = eo(c, d);
		else if ((this.type === pg || this.type === bd) && null !== this.yk)
			for (var e = this.yk.i; e.next();) co(e.value), this.addColorStop(e.key, eo(c, d));
		return this
	};
	var bo;
	ga.lightenBy = bo = function(a, b, c) {
		b = void 0 === b || "number" !== typeof b ? .2 : b;
		c = void 0 === c ? Vn : c;
		co(a);
		return eo(b, c)
	};
	ga.darken = function(a) {
		return fo(a)
	};
	ga.prototype.darkenBy = function(a, b) {
		this.P && w.ma(this);
		var c = void 0 === a || "number" !== typeof a ? .2 : a,
			d = void 0 === b ? Vn : b;
		if (this.type === og) co(this.color), this.color = eo(-c, d);
		else if ((this.type === pg || this.type === bd) && null !== this.yk)
			for (var e = this.yk.i; e.next();) co(e.value), this.addColorStop(e.key, eo(-c, d));
		return this
	};
	var fo;
	ga.darkenBy = fo = function(a, b, c) {
		b = void 0 === b || "number" !== typeof b ? .2 : b;
		c = void 0 === c ? Vn : c;
		co(a);
		return eo(-b, c)
	};

	function eo(a, b) {
		switch (b) {
			case Vn:
				var c = 100 * ho(Yn.Gc),
					d = 100 * ho(Yn.Dd),
					e = 100 * ho(Yn.bd);
				$n.Gc = .4124564 * c + .3575761 * d + .1804375 * e;
				$n.Dd = .2126729 * c + .7151522 * d + .072175 * e;
				$n.bd = .0193339 * c + .119192 * d + .9503041 * e;
				$n.gg = Yn.gg;
				c = io($n.Gc / jo[0]);
				d = io($n.Dd / jo[1]);
				e = io($n.bd / jo[2]);
				ao.Gc = 116 * d - 16;
				ao.Dd = 500 * (c - d);
				ao.bd = 200 * (d - e);
				ao.gg = $n.gg;
				ao.Gc = Math.min(100, Math.max(0, ao.Gc + 100 * a));
				c = (ao.Gc + 16) / 116;
				d = c - ao.bd / 200;
				$n.Gc = jo[0] * ko(ao.Dd / 500 + c);
				$n.Dd = jo[1] * (ao.Gc > lo * mo ? Math.pow(c, 3) : ao.Gc / lo);
				$n.bd = jo[2] * ko(d);
				$n.gg =
					ao.gg;
				c = -.969266 * $n.Gc + 1.8760108 * $n.Dd + .041556 * $n.bd;
				d = .0556434 * $n.Gc + -.2040259 * $n.Dd + 1.0572252 * $n.bd;
				Yn.Gc = 255 * no((3.2404542 * $n.Gc + -1.5371385 * $n.Dd + -.4985314 * $n.bd) / 100);
				Yn.Dd = 255 * no(c / 100);
				Yn.bd = 255 * no(d / 100);
				Yn.gg = $n.gg;
				Yn.Gc = Math.round(Yn.Gc);
				255 < Yn.Gc ? Yn.Gc = 255 : 0 > Yn.Gc && (Yn.Gc = 0);
				Yn.Dd = Math.round(Yn.Dd);
				255 < Yn.Dd ? Yn.Dd = 255 : 0 > Yn.Dd && (Yn.Dd = 0);
				Yn.bd = Math.round(Yn.bd);
				255 < Yn.bd ? Yn.bd = 255 : 0 > Yn.bd && (Yn.bd = 0);
				return "rgba(" + Yn.Gc + ", " + Yn.Dd + ", " + Yn.bd + ", " + Yn.gg + ")";
			case Wn:
				var e = Yn.Gc / 255,
					f = Yn.Dd /
					255,
					h = Yn.bd / 255,
					k = Math.max(e, f, h),
					d = Math.min(e, f, h),
					l = k - d,
					d = (k + d) / 2;
				if (0 === l) c = e = 0;
				else {
					switch (k) {
						case e:
							c = (f - h) / l % 6;
							break;
						case f:
							c = (h - e) / l + 2;
							break;
						case h:
							c = (e - f) / l + 4
					}
					c *= 60;
					0 > c && (c += 360);
					e = l / (1 - Math.abs(2 * d - 1))
				}
				Zn.Gc = Math.round(c);
				Zn.Dd = Math.round(100 * e);
				Zn.bd = Math.round(100 * d);
				Zn.gg = Yn.gg;
				Zn.bd = Math.min(100, Math.max(0, Zn.bd + 100 * a));
				return "hsla(" + Zn.Gc + ", " + Zn.Dd + "%, " + Zn.bd + "%, " + Zn.gg + ")";
			default:
				return w.k("Unknown color space: " + b), "rgba(0, 0, 0, 1)"
		}
	}

	function co(a) {
		Xn.clearRect(0, 0, 1, 1);
		Xn.fillStyle = "#000000";
		var b = Xn.fillStyle;
		Xn.fillStyle = a;
		Xn.fillStyle !== b ? (Xn.fillRect(0, 0, 1, 1), a = Xn.getImageData(0, 0, 1, 1).data, Yn.Gc = a[0], Yn.Dd = a[1], Yn.bd = a[2], Yn.gg = a[3] / 255) : (Xn.fillStyle = "#FFFFFF", Xn.fillStyle = a, Yn.Gc = 0, Yn.Dd = 0, Yn.bd = 0, Yn.gg = 1)
	}

	function ho(a) {
		a /= 255;
		return .04045 >= a ? a / 12.92 : Math.pow((a + .055) / 1.055, 2.4)
	}

	function no(a) {
		return .0031308 >= a ? 12.92 * a : 1.055 * Math.pow(a, 1 / 2.4) - .055
	}
	var mo = 216 / 24389,
		lo = 24389 / 27,
		jo = [95.047, 100, 108.883];

	function io(a) {
		return a > mo ? Math.pow(a, 1 / 3) : (lo * a + 16) / 116
	}

	function ko(a) {
		var b = a * a * a;
		return b > mo ? b : (116 * a - 16) / lo
	}

	function G() {
		w.oc(this);
		this.N = 4225027;
		this.Bc = 1;
		this.bj = null;
		this.Rb = "";
		this.cc = this.Fb = null;
		this.jb = (new y(NaN, NaN)).freeze();
		this.Se = Gd;
		this.Yh = rd;
		this.Xh = Ed;
		this.kd = new ka;
		this.sm = new ka;
		this.Ti = new ka;
		this.vb = this.Ao = 1;
		this.mg = 0;
		this.Fg = oo;
		this.Nm = fd;
		this.ud = (new B(NaN, NaN, NaN, NaN)).freeze();
		this.pc = (new B(NaN, NaN, NaN, NaN)).freeze();
		this.Wc = (new B(0, 0, NaN, NaN)).freeze();
		this.V = this.Ms = this.Ns = null;
		this.rm = this.je = qc;
		this.Zs = 0;
		this.dj = 1;
		this.Zq = 0;
		this.Bi = 1;
		this.ot = null;
		this.ct = -Infinity;
		this.Ym =
			0;
		this.Zm = dd;
		this.$m = lj;
		this.hr = "";
		this.yc = this.ia = null;
		this.mo = -1;
		this.dn = this.og = this.gl = this.mp = null;
		this.Jz = oj;
		this.Um = null
	}
	w.mi(G);
	w.ga("GraphObject", G);
	G.prototype.cloneProtected = function(a) {
		a.N = this.N | 6144;
		a.Bc = this.Bc;
		a.Rb = this.Rb;
		a.Fb = this.Fb;
		a.cc = this.cc;
		a.jb.assign(this.jb);
		a.Se = this.Se.S();
		a.Yh = this.Yh.S();
		a.Xh = this.Xh.S();
		a.Ti = this.Ti.copy();
		a.vb = this.vb;
		a.mg = this.mg;
		a.Fg = this.Fg;
		a.Nm = this.Nm.S();
		a.ud.assign(this.ud);
		a.pc.assign(this.pc);
		a.Wc.assign(this.Wc);
		a.Ms = this.Ms;
		null !== this.V && (a.V = this.V.copy());
		a.je = this.je.S();
		a.rm = this.rm.S();
		a.Zs = this.Zs;
		a.dj = this.dj;
		a.Zq = this.Zq;
		a.Bi = this.Bi;
		a.ot = this.ot;
		a.ct = this.ct;
		a.Ym = this.Ym;
		a.Zm = this.Zm.S();
		a.$m = this.$m;
		a.hr = this.hr;
		null !== this.ia && (a.ia = this.ia.copy());
		a.yc = this.yc;
		a.mo = this.mo;
		null !== this.gl && (a.gl = w.Ol(this.gl));
		null !== this.og && (a.og = this.og.copy());
		a.dn = this.dn
	};
	G.prototype.addCopyProperty = G.prototype.jH = function(a) {
		var b = this.gl;
		if (w.isArray(b))
			for (var c = 0; c < b.length; c++) {
				if (b[c] === a) return
			} else this.gl = b = [];
		b.push(a)
	};
	G.prototype.ni = function(a) {
		a.Ns = null;
		a.Um = null;
		a.H()
	};
	G.prototype.clone = function() {
		var a = new this.constructor;
		this.cloneProtected(a);
		if (null !== this.gl)
			for (var b = 0; b < this.gl.length; b++) {
				var c = this.gl[b];
				a[c] = this[c]
			}
		return a
	};
	G.prototype.copy = function() {
		return this.clone()
	};
	G.prototype.ic = function(a) {
		a.Ge === W ? 0 === a.name.indexOf("Orient") ? this.wq = a : w.k("Unknown Link enum value for GraphObject.segmentOrientation property: " + a) : a.Ge === G ? this.stretch = a : w.Ij(this, a)
	};
	G.prototype.toString = function() {
		return w.of(Object.getPrototypeOf(this)) + "#" + w.Pd(this)
	};
	var Pj;
	G.None = Pj = w.p(G, "None", 0);
	var oo;
	G.Default = oo = w.p(G, "Default", 0);
	var po;
	G.Vertical = po = w.p(G, "Vertical", 4);
	var qo;
	G.Horizontal = qo = w.p(G, "Horizontal", 5);
	var Fe;
	G.Fill = Fe = w.p(G, "Fill", 3);
	var Rj;
	G.Uniform = Rj = w.p(G, "Uniform", 1);
	var Sj;
	G.UniformToFill = Sj = w.p(G, "UniformToFill", 2);
	var ro;
	G.FlipVertical = ro = w.p(G, "FlipVertical", 1);
	var so;
	G.FlipHorizontal = so = w.p(G, "FlipHorizontal", 2);
	var to;
	G.FlipBoth = to = w.p(G, "FlipBoth", 3);

	function uo(a) {
		null === a.ia && (a.ia = new vo)
	}
	G.prototype.Qd = function() {
		if (null === this.V) {
			var a = new wo;
			a.Wj = yb;
			a.uk = yb;
			a.Uj = 10;
			a.sk = 10;
			a.Tj = xo;
			a.rk = xo;
			a.Vj = 0;
			a.tk = 0;
			this.V = a
		}
	};

	function yo(a, b, c, d, e, f, h) {
		var k = .001,
			l = f.length;
		a.moveTo(b, c);
		d -= b;
		k = e - c;
		0 === d && (d = .001);
		e = k / d;
		for (var m = Math.sqrt(d * d + k * k), n = 0, p = !0, q = 0 === h ? !1 : !0; .1 <= m;) {
			if (q) {
				k = f[n++ % l];
				for (k -= h; 0 > k;) k += f[n++ % l], p = !p;
				q = !1
			} else k = f[n++ % l];
			k > m && (k = m);
			var r = Math.sqrt(k * k / (1 + e * e));
			0 > d && (r = -r);
			b += r;
			c += e * r;
			p ? a.lineTo(b, c) : a.moveTo(b, c);
			m -= k;
			p = !p
		}
	}
	G.prototype.raiseChangedEvent = G.prototype.cd = function(a, b, c, d, e, f, h) {
		var k = this.U;
		if (null !== k && (k.Un(a, b, c, d, e, f, h), zo(this) && c === this && a === Df && Ao(this, k, b), c === k && 0 !== (k.N & 16777216) && null !== k.data))
			for (a = this.xa.n, c = a.length, d = 0; d < c; d++) e = a[d], e instanceof C && Om(e, function(a) {
				null !== a.data && 0 !== (a.N & 16777216) && a.Ib(b)
			})
	};

	function Ao(a, b, c) {
		var d = a.Tl();
		if (null !== d)
			for (var e = a.yc.i; e.next();) {
				var f = e.value,
					h = null;
				if (null !== f.Cq) {
					h = eh(f, d, a);
					if (null === h) continue;
					f.yy(a, h, c, null)
				} else if (f.Lx) {
					var k = b.g;
					null === k || k.Pe || f.yy(a, k.$.Mk, c, d)
				} else {
					var l = d.data;
					if (null === l) continue;
					k = b.g;
					null === k || k.Pe || f.yy(a, l, c, d)
				}
				h === a && (k = d.yx(f.lm), null !== k && f.JG(k, h, c))
			}
	}
	G.prototype.yx = function(a) {
		return this.mo === a ? this : null
	};
	G.prototype.raiseChanged = G.prototype.h = function(a, b, c) {
		this.cd(Df, a, this, b, c)
	};

	function Bo(a, b, c, d, e) {
		var f = a.ud,
			h = a.Ti;
		h.reset();
		Co(a, h, b, c, d, e);
		a.Ti = h;
		f.x = b;
		f.y = c;
		f.width = d;
		f.height = e;
		h.su() || h.GG(f)
	}

	function Do(a, b, c, d) {
		if (!1 === a.Ug) return !1;
		d.multiply(a.transform);
		return c ? a.Zf(b, d) : a.pn(b, d)
	}
	G.prototype.cF = function(a, b, c) {
		if (!1 === this.Ug) return !1;
		var d = this.Ja;
		b = a.Bf(b);
		var e = !1;
		c && (e = Ra(a.x, a.y, 0, 0, 0, d.height) < b || Ra(a.x, a.y, 0, d.height, d.width, d.height) < b || Ra(a.x, a.y, d.width, d.height, d.width, 0) < b || Ra(a.x, a.y, d.width, 0, 0, 0) < b);
		c || (e = Ra(a.x, a.y, 0, 0, 0, d.height) < b && Ra(a.x, a.y, 0, d.height, d.width, d.height) < b && Ra(a.x, a.y, d.width, d.height, d.width, 0) < b && Ra(a.x, a.y, d.width, 0, 0, 0) < b);
		return e
	};
	G.prototype.Yg = function() {
		return !0
	};
	G.prototype.containsPoint = G.prototype.Ia = function(a) {
		var b = w.K();
		b.assign(a);
		this.transform.nb(b);
		var c = this.Y;
		if (!c.I()) return w.v(b), !1;
		var d = this.g;
		if (null !== d && d.bk) {
			var e = d.gu("extraTouchThreshold"),
				f = d.gu("extraTouchArea"),
				h = f / 2,
				k = this.Ja,
				d = this.sj() * d.scale,
				l = 1 / d;
			if (k.width * d < e && k.height * d < e) return a = db(c.x - h * l, c.y - h * l, c.width + f * l, c.height + f * l, b.x, b.y), w.v(b), a
		}
		if (this instanceof kh || this instanceof X ? db(c.x - 5, c.y - 5, c.width + 10, c.height + 10, b.x, b.y) : c.Ia(b)) return e = !1, e = this.og && !this.og.Ia(b) ?
			!1 : null !== this.cc && c.Ia(b) ? !0 : null !== this.Fb && this.Wc.Ia(a) ? !0 : this.zk(a), w.v(b), e;
		w.v(b);
		return !1
	};
	G.prototype.zk = function(a) {
		var b = this.Ja;
		return db(0, 0, b.width, b.height, a.x, a.y)
	};
	G.prototype.containsRect = G.prototype.Ak = function(a) {
		if (0 === this.angle) return this.Y.Ak(a);
		var b = this.Ja,
			b = w.lg(0, 0, b.width, b.height),
			c = this.transform,
			d = !1,
			e = w.xb(a.x, a.y);
		b.Ia(c.wh(e)) && (e.m(a.x, a.bottom), b.Ia(c.wh(e)) && (e.m(a.right, a.bottom), b.Ia(c.wh(e)) && (e.m(a.right, a.y), b.Ia(c.wh(e)) && (d = !0))));
		w.v(e);
		w.Eb(b);
		return d
	};
	G.prototype.containedInRect = G.prototype.pn = function(a, b) {
		if (void 0 === b) return a.Ak(this.Y);
		var c = this.Ja,
			d = !1,
			e = w.xb(0, 0);
		a.Ia(b.nb(e)) && (e.m(0, c.height), a.Ia(b.nb(e)) && (e.m(c.width, c.height), a.Ia(b.nb(e)) && (e.m(c.width, 0), a.Ia(b.nb(e)) && (d = !0))));
		w.v(e);
		return d
	};
	G.prototype.intersectsRect = G.prototype.Zf = function(a, b) {
		if (void 0 === b && (b = this.transform, 0 === this.angle)) return a.Zf(this.Y);
		var c = this.Ja,
			d = b,
			e = w.xb(0, 0),
			f = w.xb(0, c.height),
			h = w.xb(c.width, c.height),
			k = w.xb(c.width, 0),
			l = !1;
		if (a.Ia(d.nb(e)) || a.Ia(d.nb(f)) || a.Ia(d.nb(h)) || a.Ia(d.nb(k))) l = !0;
		else {
			var c = w.lg(0, 0, c.width, c.height),
				m = w.xb(a.x, a.y);
			c.Ia(d.wh(m)) ? l = !0 : (m.m(a.x, a.bottom), c.Ia(d.wh(m)) ? l = !0 : (m.m(a.right, a.bottom), c.Ia(d.wh(m)) ? l = !0 : (m.m(a.right, a.y), c.Ia(d.wh(m)) && (l = !0))));
			w.v(m);
			w.Eb(c);
			!l &&
				(ne(a, e, f) || ne(a, f, h) || ne(a, h, k) || ne(a, k, e)) && (l = !0)
		}
		w.v(e);
		w.v(f);
		w.v(h);
		w.v(k);
		return l
	};
	G.prototype.getDocumentPoint = G.prototype.Wa = function(a, b) {
		void 0 === b && (b = new y);
		if (a instanceof K) {
			a.Td() && w.k("getDocumentPoint:s Spot must be specific: " + a.toString());
			var c = this.Ja;
			b.m(a.x * c.width + a.offsetX, a.y * c.height + a.offsetY)
		} else b.set(a);
		this.ph.nb(b);
		return b
	};
	G.prototype.getDocumentAngle = G.prototype.Vl = function() {
		var a;
		a = this.ph;
		1 === a.m11 && 0 === a.m12 ? a = 0 : (a = 180 * Math.atan2(a.m12, a.m11) / Math.PI, 0 > a && (a += 360));
		return a
	};
	G.prototype.getDocumentScale = G.prototype.sj = function() {
		if (0 !== (this.N & 4096) === !1) return this.Ao;
		var a = this.vb;
		return null !== this.Q ? a * this.Q.sj() : a
	};
	G.prototype.getLocalPoint = G.prototype.iF = function(a, b) {
		void 0 === b && (b = new y);
		b.assign(a);
		this.ph.wh(b);
		return b
	};
	G.prototype.getNearestIntersectionPoint = G.prototype.jF = function(a, b, c) {
		return this.zn(a.x, a.y, b.x, b.y, c)
	};
	g = G.prototype;
	g.zn = function(a, b, c, d, e) {
		var f = this.transform,
			h = 1 / (f.m11 * f.m22 - f.m12 * f.m21),
			k = f.m22 * h,
			l = -f.m12 * h,
			m = -f.m21 * h,
			n = f.m11 * h,
			p = h * (f.m21 * f.dy - f.m22 * f.dx),
			q = h * (f.m12 * f.dx - f.m11 * f.dy);
		if (null !== this.kn) return f = this.Y, le(f.left, f.top, f.right, f.bottom, a, b, c, d, e);
		h = a * k + b * m + p;
		a = a * l + b * n + q;
		b = c * k + d * m + p;
		c = c * l + d * n + q;
		e.m(0, 0);
		d = this.Ja;
		c = le(0, 0, d.width, d.height, h, a, b, c, e);
		e.transform(f);
		return c
	};

	function yk(a, b, c, d, e) {
		if (!1 !== Em(a)) {
			var f = a.margin,
				h = f.right + f.left,
				f = f.top + f.bottom;
			b = Math.max(b - h, 0);
			c = Math.max(c - f, 0);
			e = e || 0;
			d = Math.max((d || 0) - h, 0);
			e = Math.max(e - f, 0);
			var h = a.angle,
				f = 0,
				f = a.Ca,
				k = 0;
			a instanceof X && (k = a.mb);
			90 === h || 270 === h ? (b = isFinite(f.height) ? f.height + k : b, c = isFinite(f.width) ? f.width + k : c) : (b = isFinite(f.width) ? f.width + k : b, c = isFinite(f.height) ? f.height + k : c);
			var f = d || 0,
				k = e || 0,
				l = a instanceof C;
			switch (Eo(a, !0)) {
				case Pj:
					k = f = 0;
					l && (c = b = Infinity);
					break;
				case Fe:
					isFinite(b) && b > d && (f = b);
					isFinite(c) &&
						c > e && (k = c);
					break;
				case qo:
					isFinite(b) && b > d && (f = b);
					k = 0;
					l && (c = Infinity);
					break;
				case po:
					isFinite(c) && c > e && (k = c), f = 0, l && (b = Infinity)
			}
			var l = a.Gf,
				m = a.qi;
			f > l.width && m.width < l.width && (f = l.width);
			k > l.height && m.height < l.height && (k = l.height);
			d = Math.max(f / a.scale, m.width);
			e = Math.max(k / a.scale, m.height);
			l.width < d && (d = Math.min(m.width, d));
			l.height < e && (e = Math.min(m.height, e));
			b = Math.min(l.width, b);
			c = Math.min(l.height, c);
			b = Math.max(d, b);
			c = Math.max(e, c);
			if (90 === h || 270 === h) f = b, b = c, c = f, f = d, d = e, e = f;
			a.ud.Qa();
			a.Ln(b, c,
				d, e);
			a.ud.freeze();
			a.ud.I() || w.k("Non-real measuredBounds has been set. Object " + a + ", measuredBounds: " + a.ud.toString());
			cm(a, !1)
		}
	}
	g.Ln = function() {};
	g.wj = function() {
		return !1
	};
	g.jc = function(a, b, c, d, e) {
		this.Ni();
		var f = w.Kf();
		f.assign(this.pc);
		this.pc.Qa();
		if (!1 === Fm(this)) {
			var h = this.pc;
			h.x = a;
			h.y = b;
			h.width = c;
			h.height = d
		} else this.mj(a, b, c, d);
		this.pc.freeze();
		this.og = void 0 === e ? null : e;
		c = !1;
		void 0 !== e ? c = !0 : null !== this.Q && (e = this.Q.Wc, d = this.za, null !== this.kn && (d = this.pc), c = b + d.height, d = a + d.width, c = !(0 <= a + .05 && d <= e.width + .05 && 0 <= b + .05 && c <= e.height + .05), this instanceof Lh && (a = this.Wc, this.jw > a.height || this.xf.Ee > a.width)) && (c = !0);
		this.N = c ? this.N | 256 : this.N & -257;
		this.pc.I() ||
			w.k("Non-real actualBounds has been set. Object " + this + ", actualBounds: " + this.pc.toString());
		this.Yx(f, this.pc);
		Fo(this, !1);
		w.Eb(f)
	};
	g.mj = function() {};

	function Go(a, b, c, d, e) {
		var f = a.Y;
		f.x = b;
		f.y = c;
		f.width = d;
		f.height = e;
		if (!a.Ca.I()) {
			f = a.ud;
			c = a.margin;
			b = c.right + c.left;
			var h = c.top + c.bottom;
			c = f.width + b;
			f = f.height + h;
			d += b;
			e += h;
			b = Eo(a, !0);
			c === d && f === e && (b = Pj);
			switch (b) {
				case Pj:
					if (c > d || f > e) cm(a, !0), yk(a, c > d ? d : c, f > e ? e : f);
					break;
				case Fe:
					cm(a, !0);
					yk(a, d, e, 0, 0);
					break;
				case qo:
					cm(a, !0);
					yk(a, d, f, 0, 0);
					break;
				case po:
					cm(a, !0), yk(a, c, e, 0, 0)
			}
		}
	}
	g.Yx = function(a, b) {
		var c = this.U;
		null !== c && null !== c.g && (c.Uu !== this && c.gG !== this && c.qB !== this || Ho(c, !0), this.oa(), Va(a, b) || (c.Lk(), this.Ds(c)))
	};
	g.Ds = function(a) {
		null !== this.Vd && (Ho(a, !0), a instanceof T && Io(a, this))
	};
	w.defineProperty(G, {
		Xn: "shadowVisible"
	}, function() {
		return this.dn
	}, function(a) {
		var b = this.dn;
		b !== a && (this.dn = a, this.oa(), this.h("shadowVisible", b, a))
	});
	G.prototype.ve = function(a, b) {
		if (this.visible) {
			var c = this.pc;
			if (0 !== c.width && 0 !== c.height && !isNaN(c.x) && !isNaN(c.y)) {
				var d = this.opacity,
					e = 1;
				if (1 !== d) {
					if (0 === d) return;
					e = a.globalAlpha;
					a.globalAlpha = e * d
				}
				if (a instanceof Oc) a: {
					if (this.visible) {
						var f = null,
							h = a.Nx;
						if (this instanceof C && (this.type === Jo || this.type === Ko)) Lo(this, a, b);
						else {
							var k = this.pc;
							if (0 !== k.width && 0 !== k.height && !isNaN(k.x) && !isNaN(k.y)) {
								var l = this.transform,
									m = this.Q;
								0 !== (this.N & 4096) === !0 && Mo(this);
								var c = 0 !== (this.N & 256),
									n = !1;
								this instanceof
								Lh && (a.font = this.font);
								if (c) {
									n = m.Yg() ? m.Ja : m.Y;
									if (null !== this.og) var p = this.og,
										q = p.x,
										r = p.y,
										s = p.width,
										p = p.height;
									else q = Math.max(k.x, n.x), r = Math.max(k.y, n.y), s = Math.min(k.right, n.right) - q, p = Math.min(k.bottom, n.bottom) - r;
									if (q > k.width + k.x || k.x > n.width + n.x || r > k.height + k.y || k.y > n.height + n.y) break a;
									n = !0;
									Qc(a, 1, 0, 0, 1, 0, 0);
									a.save();
									a.beginPath();
									a.rect(q, r, s, p);
									a.clip()
								}
								if (this.wj()) {
									var u = this;
									if (!u.isVisible()) break a
								}
								a.uh.Tb = [1, 0, 0, 1, 0, 0];
								this instanceof Lh && 1 < this.UA && Qc(a, 1, 0, 0, 1, 0, 0);
								q = !1;
								this.wj() &&
									this.cm && b.tj("drawShadows") && (r = this.cn, a.EB(r.x * b.scale * b.Hd, r.y * b.scale * b.Hd, u.Eg), a.Yn(), a.shadowColor = u.bn);
								u = !1;
								this.U && b.tj("drawShadows") && (u = this.U.cm);
								!0 === this.Xn ? (a.Yn(), !1 === q && u && (Qc(a, 1, 0, 0, 1, 0, 0), a.ab(), q = !0)) : !1 === this.Xn && a.im();
								null !== this.cc && (No(this, a, this.cc, !0, !0), !1 === q && u && (Qc(a, 1, 0, 0, 1, 0, 0), a.ab(), q = !0), this.cc instanceof ga && this.cc.type === bd ? (a.beginPath(), a.rect(k.x, k.y, k.width, k.height), a.Lg(this.cc)) : a.fillRect(k.x, k.y, k.width, k.height));
								this instanceof C ? Qc(a, l.m11,
									l.m12, l.m21, l.m22, l.dx, l.dy) : a.uh.Tb = [l.m11, l.m12, l.m21, l.m22, l.dx, l.dy];
								null !== this.Fb && (!1 === q && u && (Qc(a, 1, 0, 0, 1, 0, 0), a.ab(), q = !0), s = this.Ja, l = k = 0, r = s.width, s = s.height, p = 0, this instanceof X && (s = this.Ua.gb, k = s.x, l = s.y, r = s.width, s = s.height, p = this.ii), No(this, a, this.Fb, !0, !1), this.Fb instanceof ga && this.Fb.type === bd ? (a.beginPath(), a.rect(k - p / 2, l - p / 2, r + p, s + p), a.Lg(this.Fb)) : a.fillRect(k - p / 2, l - p / 2, r + p, s + p));
								u && (null !== this.Fb || null !== this.cc || null !== m && 0 !== (m.N & 512) || null !== m && (m.type === Gl || m.type ===
									Nj) && m.Ad() !== this) ? (Oo(this, !0), null === this.Xn && a.im()) : Oo(this, !1);
								this.Ek(a, b);
								u && 0 !== (this.N & 512) === !0 && a.Yn();
								this.wj() && u && a.im();
								c && (a.restore(), n && a.pf.pop());
								this instanceof C && (f = a.pf.pop());
								!0 === q && a.pf.pop();
								this instanceof Lh && 1 < this.UA && (f = a.pf.pop());
								null !== a.VE && (null === f && (h === a.Nx ? (Qc(a, 1, 0, 0, 1, 0, 0), f = a.pf.pop()) : f = a.Nx), a.VE(this, f))
							}
						}
					}
				}
				else {
					if (this instanceof C && (this.type === Jo || this.type === Ko)) {
						Lo(this, a, b);
						1 !== d && (a.globalAlpha = e);
						return
					}
					this instanceof W && this.Bu(!1);
					f = this.transform;
					h = this.Q;
					0 !== (this.N & 4096) === !0 && Mo(this);
					m = 0 !== (this.N & 256);
					a.Ip && (m = !1);
					this instanceof Lh && (a.font = this.font);
					if (m) {
						n = h.Yg() ? h.Ja : h.Y;
						null !== this.og ? (q = this.og, k = q.x, l = q.y, u = q.width, q = q.height) : (k = Math.max(c.x, n.x), l = Math.max(c.y, n.y), u = Math.min(c.right, n.right) - k, q = Math.min(c.bottom, n.bottom) - l);
						if (k > c.width + c.x || c.x > n.width + n.x || l > c.height + c.y || c.y > n.height + n.y) {
							1 !== d && (a.globalAlpha = e);
							return
						}
						a.save();
						a.beginPath();
						a.rect(k, l, u, q);
						a.clip()
					}
					if (this.wj()) {
						if (!this.isVisible()) {
							1 !== d && (a.globalAlpha =
								e);
							return
						}
						this.cm && b.tj("drawShadows") && (n = this.cn, a.EB(n.x * b.scale * b.Hd, n.y * b.scale * b.Hd, this.Eg), a.Yn(), a.shadowColor = this.bn)
					}
					n = !1;
					this.U && b.tj("drawShadows") && (n = this.U.cm);
					!0 === this.Xn ? a.Yn() : !1 === this.Xn && a.im();
					null !== this.cc && (No(this, a, this.cc, !0, !0), this.cc instanceof ga && this.cc.type === bd ? (a.beginPath(), a.rect(c.x, c.y, c.width, c.height), a.Lg(this.cc)) : a.fillRect(c.x, c.y, c.width, c.height));
					f.su() || a.transform(f.m11, f.m12, f.m21, f.m22, f.dx, f.dy);
					n && (null !== h && 0 !== (h.N & 512) || null !== h && (h.type ===
						Gl || h.type === Nj) && h.Ad() !== this) && null === this.Xn && a.im();
					null !== this.Fb && (u = this.Ja, k = c = 0, l = u.width, u = u.height, q = 0, this instanceof X && (u = this.Ua.gb, c = u.x, k = u.y, l = u.width, u = u.height, q = this.ii), No(this, a, this.Fb, !0, !1), this.Fb instanceof ga && this.Fb.type === bd ? (a.beginPath(), a.rect(c - q / 2, k - q / 2, l + q, u + q), a.Lg(this.Fb)) : a.fillRect(c - q / 2, k - q / 2, l + q, u + q));
					n && (null !== this.Fb || null !== this.cc || null !== h && 0 !== (h.N & 512) || null !== h && (h.type === Gl || h.type === Nj) && h.Ad() !== this) ? (Oo(this, !0), null === this.Xn && a.im()) : Oo(this, !1);
					this.Ek(a, b);
					n && 0 !== (this.N & 512) === !0 && a.Yn();
					this.wj() && n && a.im();
					m ? (a.restore(), this instanceof C ? a.He(!0) : a.He(!1)) : f.su() || (h = 1 / (f.m11 * f.m22 - f.m12 * f.m21), a.transform(f.m22 * h, -f.m12 * h, -f.m21 * h, f.m11 * h, h * (f.m21 * f.dy - f.m22 * f.dx), h * (f.m12 * f.dx - f.m11 * f.dy)))
				}
				1 !== d && (a.globalAlpha = e)
			}
		}
	};

	function Lo(a, b, c) {
		var d = a.pc;
		0 === d.width || 0 === d.height || isNaN(d.x) || isNaN(d.y) || (null !== a.cc && (No(a, b, a.cc, !0, !0), a.cc instanceof ga && a.cc.type === bd ? (b.beginPath(), b.rect(d.x, d.y, d.width, d.height), b.Lg(a.cc)) : b.fillRect(d.x, d.y, d.width, d.height)), null !== a.Fb && (No(a, b, a.Fb, !0, !1), a.Fb instanceof ga && a.Fb.type === bd ? (b.beginPath(), b.rect(d.x, d.y, d.width, d.height), b.Lg(a.Fb)) : b.fillRect(d.x, d.y, d.width, d.height)), a.Ek(b, c))
	}
	G.prototype.Ek = function() {};

	function No(a, b, c, d, e) {
		if (null !== c) {
			var f = 1,
				h = 1;
			if ("string" === typeof c) d ? b.fillStyle = c : b.strokeStyle = c;
			else if (c.type === og) d ? b.fillStyle = c.color : b.strokeStyle = c.color;
			else {
				var k, h = a.Ja,
					f = h.width,
					h = h.height;
				if (e) var l = a.Y,
					f = l.width,
					h = l.height;
				var m = b instanceof Xc;
				if (m && c.ah && (c.type === Un || c.po === f && c.Vy === h)) k = c.ah;
				else {
					var n = l = 0,
						p = 0,
						q = 0,
						r = 0,
						s = 0,
						s = r = 0;
					e && (l = a.Y, f = l.width, h = l.height, r = l.x, s = l.y);
					l = c.start.x * f + c.start.offsetX;
					n = c.start.y * h + c.start.offsetY;
					p = c.end.x * f + c.end.offsetX;
					q = c.end.y * h + c.end.offsetY;
					l += r;
					p += r;
					n += s;
					q += s;
					if (c.type === pg) k = b.createLinearGradient(l, n, p, q);
					else if (c.type === bd) s = isNaN(c.St) ? Math.max(f, h) / 2 : c.St, isNaN(c.$u) ? (r = 0, s = Math.max(f, h) / 2) : r = c.$u, k = b.createRadialGradient(l, n, r, p, q, s);
					else if (c.type === Un) try {
						k = b.createPattern(c.pattern, "repeat")
					} catch (u) {
						k = null
					} else w.Ed(c.type, "Brush type");
					if (c.type !== Un && (e = c.yk, null !== e))
						for (e = e.i; e.next();) k.addColorStop(e.key, e.value);
					if (m && (c.ah = k, null !== k && (c.po = f, c.Vy = h), null === k && c.type === Un && -1 !== c.po)) {
						c.po = -1;
						var t = a.g;
						null !== t &&
							-1 === c.po && w.setTimeout(function() {
								t.Mu()
							}, 600)
					}
				}
				d ? b.fillStyle = k : b.strokeStyle = k
			}
		}
	}
	G.prototype.isContainedBy = G.prototype.am = function(a) {
		if (a instanceof C) a: {
			if (this !== a && null !== a)
				for (var b = this.Q; null !== b;) {
					if (b === a) {
						a = !0;
						break a
					}
					b = b.Q
				}
			a = !1
		}
		else a = !1;
		return a
	};
	G.prototype.isVisibleObject = G.prototype.Aj = function() {
		if (!this.visible) return !1;
		var a = this.Q;
		return null !== a ? a.Aj() : !0
	};
	G.prototype.isEnabledObject = G.prototype.ou = function() {
		for (var a = this instanceof C ? this : this.Q; null !== a && a.isEnabled;) a = a.Q;
		return null === a
	};
	w.defineProperty(G, {
		WE: "enabledChanged"
	}, function() {
		return null !== this.ia ? this.ia.zr : null
	}, function(a) {
		uo(this);
		var b = this.ia.zr;
		b !== a && (null !== a && w.j(a, "function", G, "enabledChanged"), this.ia.zr = a, this.h("enabledChanged", b, a))
	});

	function Mo(a) {
		if (0 !== (a.N & 2048) === !0) {
			var b = a.kd;
			b.reset();
			if (!a.pc.I() || !a.ud.I()) {
				Po(a, !1);
				return
			}
			b.translate(a.pc.x, a.pc.y);
			b.translate(-a.za.x, -a.za.y);
			var c = a.Ja;
			Co(a, b, c.x, c.y, c.width, c.height);
			Po(a, !1);
			Qo(a, !0)
		}
		0 !== (a.N & 4096) === !0 && (b = a.Q, null === b ? (a.sm.set(a.kd), a.Ao = a.scale, Qo(a, !1)) : null !== b.ph && (c = a.sm, c.reset(), b.Yg() ? c.multiply(b.sm) : null !== b.Q && c.multiply(b.Q.sm), c.multiply(a.kd), a.Ao = a.scale * b.Ao, Qo(a, !1)))
	}

	function Co(a, b, c, d, e, f) {
		1 !== a.scale && b.scale(a.scale);
		if (0 !== a.angle) {
			var h = Jb;
			a.wj() && a.Ff.$c() && (h = a.Ff);
			var k = w.K();
			if (a instanceof R && a.bg !== a)
				for (c = a.bg, d = c.Ja, k.Xu(d.x, d.y, d.width, d.height, h), c.Ti.nb(k), k.offset(-c.za.x, -c.za.y), h = c.Q; null !== h && h !== a;) h.Ti.nb(k), k.offset(-h.za.x, -h.za.y), h = h.Q;
			else k.Xu(c, d, e, f, h);
			b.rotate(a.angle, k.x, k.y);
			w.v(k)
		}
	}
	g = G.prototype;
	g.H = function(a) {
		void 0 === a && (a = !1);
		if (!0 !== Em(this)) {
			cm(this, !0);
			Fo(this, !0);
			var b = this.Q;
			null === b || a || b.H()
		}
	};
	g.$p = function() {
		!0 !== Em(this) && (cm(this, !0), Fo(this, !0))
	};

	function Ro(a) {
		if (!1 === Fm(a)) {
			var b = a.Q;
			null !== b ? b.H() : a.wj() && (b = a.g, null !== b && (b.vg.add(a), a instanceof T && a.$f(), b.Ne()));
			Fo(a, !0)
		}
	}
	g.Ni = function() {
		0 !== (this.N & 2048) === !1 && (Po(this, !0), Qo(this, !0))
	};
	g.LA = function() {
		Qo(this, !0)
	};
	g.oa = function() {
		var a = this.U;
		null !== a && a.oa()
	};

	function Eo(a, b) {
		var c = a.stretch,
			d = a.Q;
		if (null !== d && d.na === So) return To(a, d.de(a.Ub), d.ce(a.column), b);
		if (null !== d && d.na === Gl && d.Ad() === a) return Uo(a, Fe, b);
		if (c === oo) {
			if (null !== d) {
				if (d.na === Nj && d.Ad() === a) return Uo(a, Fe, b);
				c = d.ae;
				return c === oo ? Uo(a, Pj, b) : Uo(a, c, b)
			}
			return Uo(a, Pj, b)
		}
		return Uo(a, c, b)
	}

	function To(a, b, c, d) {
		var e = a.stretch;
		if (e !== oo) return Uo(a, e, d);
		var f = e = null;
		switch (b.stretch) {
			case po:
				f = !0;
				break;
			case Fe:
				f = !0
		}
		switch (c.stretch) {
			case qo:
				e = !0;
				break;
			case Fe:
				e = !0
		}
		b = a.Q.ae;
		null === e && (e = b === qo || b === Fe);
		null === f && (f = b === po || b === Fe);
		return !0 === e && !0 === f ? Uo(a, Fe, d) : !0 === e ? Uo(a, qo, d) : !0 === f ? Uo(a, po, d) : Uo(a, Pj, d)
	}

	function Uo(a, b, c) {
		if (c) return b;
		if (b === Pj) return Pj;
		c = a.Ca;
		if (c.I()) return Pj;
		a = a.angle;
		if (!isNaN(c.width))
			if (90 !== a && 270 !== a) {
				if (b === qo) return Pj;
				if (b === Fe) return po
			} else {
				if (b === po) return Pj;
				if (b === Fe) return qo
			}
		if (!isNaN(c.height))
			if (90 !== a && 270 !== a) {
				if (b === po) return Pj;
				if (b === Fe) return qo
			} else {
				if (b === qo) return Pj;
				if (b === Fe) return po
			}
		return b
	}
	w.defineProperty(G, {
		wq: "segmentOrientation"
	}, function() {
		return this.$m
	}, function(a) {
		var b = this.$m;
		b !== a && (this.$m = a, this.H(), this.h("segmentOrientation", b, a), a === lj && (this.angle = 0))
	});
	w.defineProperty(G, {
		Oe: "segmentIndex"
	}, function() {
		return this.ct
	}, function(a) {
		a = Math.round(a);
		var b = this.ct;
		b !== a && (this.ct = a, this.H(), this.h("segmentIndex", b, a))
	});
	w.defineProperty(G, {
		tB: "segmentFraction"
	}, function() {
		return this.Ym
	}, function(a) {
		isNaN(a) ? a = 0 : 0 > a ? a = 0 : 1 < a && (a = 1);
		var b = this.Ym;
		b !== a && (this.Ym = a, this.H(), this.h("segmentFraction", b, a))
	});
	w.defineProperty(G, {
		uB: "segmentOffset"
	}, function() {
		return this.Zm
	}, function(a) {
		var b = this.Zm;
		b.L(a) || (this.Zm = a = a.S(), this.H(), this.h("segmentOffset", b, a))
	});
	w.defineProperty(G, {
		stretch: "stretch"
	}, function() {
		return this.Fg
	}, function(a) {
		var b = this.Fg;
		b !== a && (this.Fg = a, this.H(), this.h("stretch", b, a))
	});
	w.defineProperty(G, {
		name: "name"
	}, function() {
		return this.Rb
	}, function(a) {
		var b = this.Rb;
		b !== a && (this.Rb = a, null !== this.U && (this.U.Pm = null), this.h("name", b, a))
	});
	w.defineProperty(G, {
		opacity: "opacity"
	}, function() {
		return this.Bc
	}, function(a) {
		var b = this.Bc;
		b !== a && (w.j(a, "number", G, "opacity"), (0 > a || 1 < a) && w.Fa(a, "0 <= value <= 1", G, "opacity"), this.Bc = a, this.h("opacity", b, a), a = this.g, b = this.U, null !== a && null !== b && a.oa(ol(b, b.Y)))
	});
	w.defineProperty(G, {
		visible: "visible"
	}, function() {
		return 0 !== (this.N & 1)
	}, function(a) {
		var b = 0 !== (this.N & 1);
		b !== a && (this.N ^= 1, this.h("visible", b, a), b = this.Q, null !== b ? b.H() : this.wj() && this.Cd(a), this.oa(), Vo(this))
	});
	w.defineProperty(G, {
		Ug: "pickable"
	}, function() {
		return 0 !== (this.N & 2)
	}, function(a) {
		var b = 0 !== (this.N & 2);
		b !== a && (this.N ^= 2, this.h("pickable", b, a))
	});
	w.defineProperty(G, {
		ZH: "fromLinkableDuplicates"
	}, function() {
		return 0 !== (this.N & 4)
	}, function(a) {
		var b = 0 !== (this.N & 4);
		b !== a && (this.N ^= 4, this.h("fromLinkableDuplicates", b, a))
	});
	w.defineProperty(G, {
		$H: "fromLinkableSelfNode"
	}, function() {
		return 0 !== (this.N & 8)
	}, function(a) {
		var b = 0 !== (this.N & 8);
		b !== a && (this.N ^= 8, this.h("fromLinkableSelfNode", b, a))
	});
	w.defineProperty(G, {
		TJ: "toLinkableDuplicates"
	}, function() {
		return 0 !== (this.N & 16)
	}, function(a) {
		var b = 0 !== (this.N & 16);
		b !== a && (this.N ^= 16, this.h("toLinkableDuplicates", b, a))
	});
	w.defineProperty(G, {
		UJ: "toLinkableSelfNode"
	}, function() {
		return 0 !== (this.N & 32)
	}, function(a) {
		var b = 0 !== (this.N & 32);
		b !== a && (this.N ^= 32, this.h("toLinkableSelfNode", b, a))
	});
	w.defineProperty(G, {
		ef: "isPanelMain"
	}, function() {
		return 0 !== (this.N & 64)
	}, function(a) {
		var b = 0 !== (this.N & 64);
		b !== a && (this.N ^= 64, this.H(), this.h("isPanelMain", b, a))
	});
	w.defineProperty(G, {
		Fx: "isActionable"
	}, function() {
		return 0 !== (this.N & 128)
	}, function(a) {
		var b = 0 !== (this.N & 128);
		b !== a && (this.N ^= 128, this.h("isActionable", b, a))
	});
	w.defineProperty(G, {
		kn: "areaBackground"
	}, function() {
		return this.cc
	}, function(a) {
		var b = this.cc;
		b !== a && (a instanceof ga && a.freeze(), this.cc = a, this.oa(), this.h("areaBackground", b, a))
	});
	w.defineProperty(G, {
		background: "background"
	}, function() {
		return this.Fb
	}, function(a) {
		var b = this.Fb;
		b !== a && (a instanceof ga && a.freeze(), this.Fb = a, this.oa(), this.h("background", b, a))
	});

	function Oo(a, b) {
		a.N = b ? a.N | 512 : a.N & -513
	}

	function zo(a) {
		return 0 !== (a.N & 1024)
	}

	function Wo(a, b) {
		a.N = b ? a.N | 1024 : a.N & -1025
	}

	function Po(a, b) {
		a.N = b ? a.N | 2048 : a.N & -2049
	}

	function Qo(a, b) {
		a.N = b ? a.N | 4096 : a.N & -4097
	}

	function Em(a) {
		return 0 !== (a.N & 8192)
	}

	function cm(a, b) {
		a.N = b ? a.N | 8192 : a.N & -8193
	}

	function Fm(a) {
		return 0 !== (a.N & 16384)
	}

	function Fo(a, b) {
		a.N = b ? a.N | 16384 : a.N & -16385
	}
	w.u(G, {
		U: "part"
	}, function() {
		if (this.wj()) return this;
		if (null !== this.Um) return this.Um;
		var a;
		for (a = this.Q; a;) {
			if (a instanceof R) return this.Um = a;
			a = a.Q
		}
		return null
	});
	w.u(G, {
		Q: "panel"
	}, function() {
		return this.bj
	});
	G.prototype.hm = function(a) {
		this.bj = a
	};
	w.u(G, {
		layer: "layer"
	}, function() {
		var a = this.U;
		return null !== a ? a.layer : null
	}, {
		configurable: !0
	});
	w.u(G, {
		g: "diagram"
	}, function() {
		var a = this.U;
		return null !== a ? a.g : null
	}, {
		configurable: !0
	});
	w.defineProperty(G, {
		position: "position"
	}, function() {
		return this.jb
	}, function(a) {
		var b = a.x,
			c = a.y,
			d = this.jb,
			e = d.x,
			f = d.y;
		(e === b || isNaN(e) && isNaN(b)) && (f === c || isNaN(f) && isNaN(c)) ? this.BB(): (a = a.S(), this.AB(a, d) && this.h("position", d, a))
	});
	G.prototype.BB = function() {};
	G.prototype.AB = function(a) {
		this.jb = a;
		Ro(this);
		this.Ni();
		return !0
	};
	G.prototype.vy = function(a, b) {
		this.jb.m(a, b);
		this.Ni()
	};
	w.u(G, {
		Y: "actualBounds"
	}, function() {
		return this.pc
	});
	w.defineProperty(G, {
		scale: "scale"
	}, function() {
		return this.vb
	}, function(a) {
		var b = this.vb;
		b !== a && (0 >= a && w.k("GraphObject.scale for " + this + " must be greater than zero, not: " + a), this.vb = a, this.Ni(), this.H(), this.h("scale", b, a))
	});
	w.defineProperty(G, {
		angle: "angle"
	}, function() {
		return this.mg
	}, function(a) {
		var b = this.mg;
		b !== a && (a %= 360, 0 > a && (a += 360), b !== a && (this.mg = a, Vo(this), this.H(), this.Ni(), this.h("angle", b, a)))
	});
	w.defineProperty(G, {
		Ca: "desiredSize"
	}, function() {
		return this.Se
	}, function(a) {
		var b = a.width,
			c = a.height,
			d = this.Se,
			e = d.width,
			f = d.height;
		(e === b || isNaN(e) && isNaN(b)) && (f === c || isNaN(f) && isNaN(c)) || (this.Se = a = a.S(), this.H(), this instanceof X && this.Me(), this.h("desiredSize", d, a), zo(this) && (a = this.U, null !== a && (Ao(this, a, "width"), Ao(this, a, "height"))))
	});
	w.defineProperty(G, {
		width: "width"
	}, function() {
		return this.Se.width
	}, function(a) {
		var b = this.Se.width;
		b === a || isNaN(b) && isNaN(a) || (b = this.Se, this.Se = a = (new ia(a, this.Se.height)).freeze(), this.H(), this instanceof X && this.Me(), this.h("desiredSize", b, a), zo(this) && (a = this.U, null !== a && Ao(this, a, "width")))
	});
	w.defineProperty(G, {
		height: "height"
	}, function() {
		return this.Se.height
	}, function(a) {
		var b = this.Se.height;
		b === a || isNaN(b) && isNaN(a) || (b = this.Se, this.Se = a = (new ia(this.Se.width, a)).freeze(), this.H(), this instanceof X && this.Me(), this.h("desiredSize", b, a), zo(this) && (a = this.U, null !== a && Ao(this, a, "height")))
	});
	w.defineProperty(G, {
		qi: "minSize"
	}, function() {
		return this.Yh
	}, function(a) {
		var b = this.Yh;
		b.L(a) || (a = a.copy(), isNaN(a.width) && (a.width = 0), isNaN(a.height) && (a.height = 0), a.freeze(), this.Yh = a, this.H(), this.h("minSize", b, a))
	});
	w.defineProperty(G, {
		Gf: "maxSize"
	}, function() {
		return this.Xh
	}, function(a) {
		var b = this.Xh;
		b.L(a) || (a = a.copy(), isNaN(a.width) && (a.width = Infinity), isNaN(a.height) && (a.height = Infinity), a.freeze(), this.Xh = a, this.H(), this.h("maxSize", b, a))
	});
	w.u(G, {
		za: "measuredBounds"
	}, function() {
		return this.ud
	});
	w.u(G, {
		Ja: "naturalBounds"
	}, function() {
		return this.Wc
	}, {
		configurable: !0
	});
	w.defineProperty(G, {
		margin: "margin"
	}, function() {
		return this.Nm
	}, function(a) {
		"number" === typeof a && (a = new hb(a));
		var b = this.Nm;
		b.L(a) || (this.Nm = a = a.S(), this.H(), this.h("margin", b, a))
	});
	w.u(G, {
		transform: null
	}, function() {
		0 !== (this.N & 2048) === !0 && Mo(this);
		return this.kd
	});
	w.u(G, {
		ph: null
	}, function() {
		0 !== (this.N & 4096) === !0 && Mo(this);
		return this.sm
	});
	w.defineProperty(G, {
		alignment: "alignment"
	}, function() {
		return this.je
	}, function(a) {
		var b = this.je;
		b.L(a) || (a.Td() && !a.Zc() && w.k("GraphObject.alignment for " + this + " must be a real Spot or Spot.Default, not: " + a), this.je = a = a.S(), Ro(this), this.h("alignment", b, a))
	});
	w.defineProperty(G, {
		column: "column"
	}, function() {
		return this.Zq
	}, function(a) {
		a = Math.round(a);
		var b = this.Zq;
		b !== a && (0 > a && w.Fa(a, ">= 0", G, "column"), this.Zq = a, this.H(), this.h("column", b, a))
	});
	w.defineProperty(G, {
		yH: "columnSpan"
	}, function() {
		return this.Bi
	}, function(a) {
		a = Math.round(a);
		var b = this.Bi;
		b !== a && (1 > a && w.Fa(a, ">= 1", G, "columnSpan"), this.Bi = a, this.H(), this.h("columnSpan", b, a))
	});
	w.defineProperty(G, {
		Ub: "row"
	}, function() {
		return this.Zs
	}, function(a) {
		a = Math.round(a);
		var b = this.Zs;
		b !== a && (0 > a && w.Fa(a, ">= 0", G, "row"), this.Zs = a, this.H(), this.h("row", b, a))
	});
	w.defineProperty(G, {
		rowSpan: "rowSpan"
	}, function() {
		return this.dj
	}, function(a) {
		a = Math.round(a);
		var b = this.dj;
		b !== a && (1 > a && w.Fa(a, ">= 1", G, "rowSpan"), this.dj = a, this.H(), this.h("rowSpan", b, a))
	});
	w.defineProperty(G, {
		wy: "spanAllocation"
	}, function() {
		return this.ot
	}, function(a) {
		var b = this.ot;
		b !== a && (null !== a && w.j(a, "function", G, "spanAllocation"), this.ot = a, this.H(), this.h("spanAllocation", b, a))
	});
	w.defineProperty(G, {
		oh: "alignmentFocus"
	}, function() {
		return this.rm
	}, function(a) {
		var b = this.rm;
		b.L(a) || (!a.Td() || a.Zc() || a.L(yb) && this instanceof T || w.k("GraphObject.alignmentFocus must be a real Spot or Spot.Default, not: " + a), this.rm = a = a.S(), this.H(), this.h("alignmentFocus", b, a))
	});
	w.defineProperty(G, {
		Vd: "portId"
	}, function() {
		return this.Ms
	}, function(a) {
		var b = this.Ms;
		if (b !== a) {
			var c = this.U;
			null === c || c instanceof T || (w.k("Cannot set portID on a Link: " + a), c = null);
			null !== b && null !== c && Xo(c, this);
			this.Ms = a;
			if (null !== a && c) {
				c.Kk = !0;
				null === c.oe && Yo(c);
				var d = this.Vd;
				null !== d && c.oe.add(d, this)
			}
			this.h("portId", b, a)
		}
	});

	function Zo(a) {
		var b = a.U;
		if (b instanceof T && (null !== a.Vd || a === b.port)) {
			var c = b.g;
			null === c || c.ja.lb || Io(b, a)
		}
	}

	function Vo(a) {
		var b = a.g;
		null === b || b.ja.lb || (a instanceof C ? a instanceof T ? a.$f() : $o(a, a, function(a) {
			Zo(a)
		}) : Zo(a))
	}
	w.defineProperty(G, {
		Bb: "toSpot"
	}, function() {
		return null !== this.V ? this.V.uk : yb
	}, function(a) {
		this.Qd();
		var b = this.V.uk;
		b.L(a) || (a = a.S(), this.V.uk = a, this.h("toSpot", b, a), Zo(this))
	});
	w.defineProperty(G, {
		nm: "toEndSegmentLength"
	}, function() {
		return null !== this.V ? this.V.sk : 10
	}, function(a) {
		this.Qd();
		var b = this.V.sk;
		b !== a && (0 > a && w.Fa(a, ">= 0", G, "toEndSegmentLength"), this.V.sk = a, this.h("toEndSegmentLength", b, a), Zo(this))
	});
	w.defineProperty(G, {
		av: "toEndSegmentDirection"
	}, function() {
		return null !== this.V ? this.V.rk : xo
	}, function(a) {
		this.Qd();
		var b = this.V.rk;
		b !== a && (w.Qt("GraphObject.toEndSegmentDirection", "2.0"), this.V.rk = a, this.h("toEndSegmentDirection", b, a), Zo(this))
	});
	w.defineProperty(G, {
		bv: "toShortLength"
	}, function() {
		return null !== this.V ? this.V.tk : 0
	}, function(a) {
		this.Qd();
		var b = this.V.tk;
		b !== a && (this.V.tk = a, this.h("toShortLength", b, a), Zo(this))
	});
	w.defineProperty(G, {
		AG: "toLinkable"
	}, function() {
		return null !== this.V ? this.V.vt : null
	}, function(a) {
		this.Qd();
		var b = this.V.vt;
		b !== a && (this.V.vt = a, this.h("toLinkable", b, a))
	});
	w.defineProperty(G, {
		VJ: "toMaxLinks"
	}, function() {
		return null !== this.V ? this.V.wt : Infinity
	}, function(a) {
		this.Qd();
		var b = this.V.wt;
		b !== a && (0 > a && w.Fa(a, ">= 0", G, "toMaxLinks"), this.V.wt = a, this.h("toMaxLinks", b, a))
	});
	w.defineProperty(G, {
		Ab: "fromSpot"
	}, function() {
		return null !== this.V ? this.V.Wj : yb
	}, function(a) {
		this.Qd();
		var b = this.V.Wj;
		b.L(a) || (a = a.S(), this.V.Wj = a, this.h("fromSpot", b, a), Zo(this))
	});
	w.defineProperty(G, {
		Ul: "fromEndSegmentLength"
	}, function() {
		return null !== this.V ? this.V.Uj : 10
	}, function(a) {
		this.Qd();
		var b = this.V.Uj;
		b !== a && (0 > a && w.Fa(a, ">= 0", G, "fromEndSegmentLength"), this.V.Uj = a, this.h("fromEndSegmentLength", b, a), Zo(this))
	});
	w.defineProperty(G, {
		du: "fromEndSegmentDirection"
	}, function() {
		return null !== this.V ? this.V.Tj : xo
	}, function(a) {
		this.Qd();
		var b = this.V.Tj;
		b !== a && (w.Qt("GraphObject.fromEndSegmentDirection", "2.0"), this.V.Tj = a, this.h("fromEndSegmentDirection", b, a), Zo(this))
	});
	w.defineProperty(G, {
		eu: "fromShortLength"
	}, function() {
		return null !== this.V ? this.V.Vj : 0
	}, function(a) {
		this.Qd();
		var b = this.V.Vj;
		b !== a && (this.V.Vj = a, this.h("fromShortLength", b, a), Zo(this))
	});
	w.defineProperty(G, {
		fF: "fromLinkable"
	}, function() {
		return null !== this.V ? this.V.Cr : null
	}, function(a) {
		this.Qd();
		var b = this.V.Cr;
		b !== a && (this.V.Cr = a, this.h("fromLinkable", b, a))
	});
	w.defineProperty(G, {
		AA: "fromMaxLinks"
	}, function() {
		return null !== this.V ? this.V.Dr : Infinity
	}, function(a) {
		this.Qd();
		var b = this.V.Dr;
		b !== a && (0 > a && w.Fa(a, ">= 0", G, "fromMaxLinks"), this.V.Dr = a, this.h("fromMaxLinks", b, a))
	});
	w.defineProperty(G, {
		cursor: "cursor"
	}, function() {
		return this.hr
	}, function(a) {
		var b = this.hr;
		b !== a && (w.j(a, "string", G, "cursor"), this.hr = a, this.h("cursor", b, a))
	});
	w.defineProperty(G, {
		click: "click"
	}, function() {
		return null !== this.ia ? this.ia.Ai : null
	}, function(a) {
		uo(this);
		var b = this.ia.Ai;
		b !== a && (null !== a && w.j(a, "function", G, "click"), this.ia.Ai = a, this.h("click", b, a))
	});
	w.defineProperty(G, {
		Rt: "doubleClick"
	}, function() {
		return null !== this.ia ? this.ia.Ii : null
	}, function(a) {
		uo(this);
		var b = this.ia.Ii;
		b !== a && (null !== a && w.j(a, "function", G, "doubleClick"), this.ia.Ii = a, this.h("doubleClick", b, a))
	});
	w.defineProperty(G, {
		lA: "contextClick"
	}, function() {
		return null !== this.ia ? this.ia.Ci : null
	}, function(a) {
		uo(this);
		var b = this.ia.Ci;
		b !== a && (null !== a && w.j(a, "function", G, "contextClick"), this.ia.Ci = a, this.h("contextClick", b, a))
	});
	w.defineProperty(G, {
		Du: "mouseEnter"
	}, function() {
		return null !== this.ia ? this.ia.us : null
	}, function(a) {
		uo(this);
		var b = this.ia.us;
		b !== a && (null !== a && w.j(a, "function", G, "mouseEnter"), this.ia.us = a, this.h("mouseEnter", b, a))
	});
	w.defineProperty(G, {
		Eu: "mouseLeave"
	}, function() {
		return null !== this.ia ? this.ia.vs : null
	}, function(a) {
		uo(this);
		var b = this.ia.vs;
		b !== a && (null !== a && w.j(a, "function", G, "mouseLeave"), this.ia.vs = a, this.h("mouseLeave", b, a))
	});
	w.defineProperty(G, {
		dB: "mouseOver"
	}, function() {
		return null !== this.ia ? this.ia.Yi : null
	}, function(a) {
		uo(this);
		var b = this.ia.Yi;
		b !== a && (null !== a && w.j(a, "function", G, "mouseOver"), this.ia.Yi = a, this.h("mouseOver", b, a))
	});
	w.defineProperty(G, {
		cB: "mouseHover"
	}, function() {
		return null !== this.ia ? this.ia.Xi : null
	}, function(a) {
		uo(this);
		var b = this.ia.Xi;
		b !== a && (null !== a && w.j(a, "function", G, "mouseHover"), this.ia.Xi = a, this.h("mouseHover", b, a))
	});
	w.defineProperty(G, {
		bB: "mouseHold"
	}, function() {
		return null !== this.ia ? this.ia.Wi : null
	}, function(a) {
		uo(this);
		var b = this.ia.Wi;
		b !== a && (null !== a && w.j(a, "function", G, "mouseHold"), this.ia.Wi = a, this.h("mouseHold", b, a))
	});
	w.defineProperty(G, {
		bJ: "mouseDragEnter"
	}, function() {
		return null !== this.ia ? this.ia.ss : null
	}, function(a) {
		uo(this);
		var b = this.ia.ss;
		b !== a && (null !== a && w.j(a, "function", G, "mouseDragEnter"), this.ia.ss = a, this.h("mouseDragEnter", b, a))
	});
	w.defineProperty(G, {
		cJ: "mouseDragLeave"
	}, function() {
		return null !== this.ia ? this.ia.ts : null
	}, function(a) {
		uo(this);
		var b = this.ia.ts;
		b !== a && (null !== a && w.j(a, "function", G, "mouseDragLeave"), this.ia.ts = a, this.h("mouseDragLeave", b, a))
	});
	w.defineProperty(G, {
		aB: "mouseDrop"
	}, function() {
		return null !== this.ia ? this.ia.Vi : null
	}, function(a) {
		uo(this);
		var b = this.ia.Vi;
		b !== a && (null !== a && w.j(a, "function", G, "mouseDrop"), this.ia.Vi = a, this.h("mouseDrop", b, a))
	});
	w.defineProperty(G, {
		rE: "actionDown"
	}, function() {
		return null !== this.ia ? this.ia.Hq : null
	}, function(a) {
		uo(this);
		var b = this.ia.Hq;
		b !== a && (null !== a && w.j(a, "function", G, "actionDown"), this.ia.Hq = a, this.h("actionDown", b, a))
	});
	w.defineProperty(G, {
		sE: "actionMove"
	}, function() {
		return null !== this.ia ? this.ia.Iq : null
	}, function(a) {
		uo(this);
		var b = this.ia.Iq;
		b !== a && (null !== a && w.j(a, "function", G, "actionMove"), this.ia.Iq = a, this.h("actionMove", b, a))
	});
	w.defineProperty(G, {
		tE: "actionUp"
	}, function() {
		return null !== this.ia ? this.ia.Jq : null
	}, function(a) {
		uo(this);
		var b = this.ia.Jq;
		b !== a && (null !== a && w.j(a, "function", G, "actionUp"), this.ia.Jq = a, this.h("actionUp", b, a))
	});
	w.defineProperty(G, {
		qE: "actionCancel"
	}, function() {
		return null !== this.ia ? this.ia.Gq : null
	}, function(a) {
		uo(this);
		var b = this.ia.Gq;
		b !== a && (null !== a && w.j(a, "function", G, "actionCancel"), this.ia.Gq = a, this.h("actionCancel", b, a))
	});
	w.defineProperty(G, {
		KB: "toolTip"
	}, function() {
		return null !== this.ia ? this.ia.gj : null
	}, function(a) {
		uo(this);
		var b = this.ia.gj;
		b !== a && (this.ia.gj = a, this.h("toolTip", b, a))
	});
	w.defineProperty(G, {
		contextMenu: "contextMenu"
	}, function() {
		return null !== this.ia ? this.ia.Di : null
	}, function(a) {
		uo(this);
		var b = this.ia.Di;
		b !== a && (this.ia.Di = a, this.h("contextMenu", b, a))
	});
	G.prototype.bind = G.prototype.bind = function(a) {
		a.Gg = this;
		var b = this.Tl();
		null !== b && ap(b) && w.k("Cannot add a Binding to a template that has already been copied: " + a);
		null === this.yc && (this.yc = new H(bh));
		this.yc.add(a)
	};
	G.prototype.findTemplateBinder = G.prototype.Tl = function() {
		for (var a = this instanceof C ? this : this.Q; null !== a;) {
			if (null !== a.el) return a;
			a = a.Q
		}
		return null
	};
	G.prototype.setProperties = function(a) {
		w.Vu(this, a)
	};
	var bp;
	G.make = bp = function(a, b) {
		var c = arguments,
			d = null,
			e = null;
		if ("function" === typeof a) e = a;
		else if ("string" === typeof a) {
			var f = cp.ka(a);
			"function" === typeof f ? (c = w.Ol(arguments), d = f(c), w.Pa(d) || w.k('GraphObject.make invoked object builder "' + a + '", but it did not return an Object')) : e = ca[a]
		}
		null === d && (void 0 !== e && null !== e && e.constructor || w.k("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: " + a), d = new e);
		f = 1;
		if (d instanceof D && 1 < c.length) {
			var h = d,
				e = c[1];
			if ("string" ===
				typeof e || e instanceof HTMLDivElement) El(h, e), f++
		}
		for (; f < c.length; f++) e = c[f], void 0 === e ? w.k("Undefined value at argument " + f + " for object being constructed by GraphObject.make: " + d) : dp(d, e);
		return d
	};

	function dp(a, b) {
		if ("string" === typeof b)
			if (a instanceof Lh) a.text = b;
			else if (a instanceof X) a.Db = b;
		else if (a instanceof yl) a.source = b;
		else if (a instanceof C) {
			var c = pa(C, b);
			null !== c ? a.type = c : w.k("Unknown Panel type as an argument to GraphObject.make: " + b)
		} else a instanceof ga ? (c = pa(ga, b), null !== c ? a.type = c : w.k("Unknown Brush type as an argument to GraphObject.make: " + b)) : a instanceof Ce ? (c = pa(Ce, b), null !== c ? a.type = c : w.k("Unknown Geometry type as an argument to GraphObject.make: " + b)) : a instanceof xf ?
			(c = pa(xf, b), null !== c ? a.type = c : w.k("Unknown PathSegment type as an argument to GraphObject.make: " + b)) : w.k("Unable to use a string as an argument to GraphObject.make: " + b);
		else if (b instanceof G) c = b, a instanceof C || w.k("A GraphObject can only be added to a Panel, not to: " + a), a.add(c);
		else if (b instanceof Wg) {
			var d = b,
				c = a,
				e;
			d.xe && c.getRowDefinition ? e = c.getRowDefinition(d.index) : !d.xe && c.getColumnDefinition ? e = c.getColumnDefinition(d.index) : w.k("A RowColumnDefinition can only be added to a Panel, not to: " +
				a);
			e.Kp(d)
		} else if (b instanceof da) "function" === typeof a.ic ? a.ic(b) : w.Ij(a, b);
		else if (b instanceof bh) a instanceof G ? a.bind(b) : a instanceof Wg ? a.bind(b) : w.k("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: " + a);
		else if (b instanceof Ee) a instanceof Ce ? a.gc.add(b) : w.k("A PathFigure can only be added to a Geometry, not to: " + a);
		else if (b instanceof xf) a instanceof Ee ? a.wb.add(b) : w.k("A PathSegment can only be added to a PathFigure, not to: " + a);
		else if (b instanceof tg) a instanceof
		D ? a.Sb = b : a instanceof V ? a.Sb = b : w.k("A Layout can only be assigned to a Diagram or a Group, not to: " + a);
		else if (Array.isArray(b))
			for (c = 0; c < b.length; c++) dp(a, b[c]);
		else if ("object" === typeof b && null !== b)
			if (a instanceof ga) {
				e = new ra;
				for (c in b) d = parseFloat(c), isNaN(d) ? e[c] = b[c] : a.addColorStop(d, b[c]);
				w.Vu(a, e)
			} else if (a instanceof Wg) {
			void 0 !== b.row ? (e = b.row, (void 0 === e || null === e || Infinity === e || isNaN(e) || 0 > e) && w.k("Must specify non-negative integer row for RowColumnDefinition " + b + ", not: " + e), a.xe = !0,
				a.index = e) : void 0 !== b.column && (e = b.column, (void 0 === e || null === e || Infinity === e || isNaN(e) || 0 > e) && w.k("Must specify non-negative integer column for RowColumnDefinition " + b + ", not: " + e), a.xe = !1, a.index = e);
			e = new ra;
			for (c in b) "row" !== c && "column" !== c && (e[c] = b[c]);
			w.Vu(a, e)
		} else w.Vu(a, b);
		else w.k('Unknown initializer "' + b + '" for object being constructed by GraphObject.make: ' + a)
	}
	var cp = new ma("string", "function");
	G.getBuilders = function() {
		var a = new ma("string", "function"),
			b;
		for (b in cp)
			if (b !== b.toLowerCase()) {
				var c = cp.ka(b);
				"function" === typeof c && a.add(b, c)
			}
		a.freeze();
		return a
	};
	var ep;
	G.defineBuilder = ep = function(a, b) {
		w.j(a, "string", G, "defineBuilder:name");
		w.j(b, "function", G, "defineBuilder:func");
		var c = a.toLowerCase();
		"" !== a && "none" !== c && a !== c || w.k("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: " + a);
		cp.add(a, b)
	};
	var fp;
	G.takeBuilderArgument = fp = function(a, b, c) {
		void 0 === c && (c = null);
		var d = a[1];
		if ("function" === typeof c ? c(d) : "string" === typeof d) return a.splice(1, 1), d;
		if (void 0 === b) throw Error("no " + ("function" === typeof c ? "satisfactory" : "string") + " argument for GraphObject builder " + a[0]);
		return b
	};
	ep("Button", function() {
		var a = new ga(pg);
		a.addColorStop(0, "white");
		a.addColorStop(1, "lightgray");
		var b = new ga(pg);
		b.addColorStop(0, "white");
		b.addColorStop(1, "dodgerblue");
		a = bp(C, Gl, {
			Fx: !0,
			WE: function(a, b) {
				var e = a.Bd("ButtonBorder");
				null !== e && (e.fill = b ? a._buttonFillNormal : a._buttonFillDisabled)
			},
			_buttonFillNormal: a,
			_buttonStrokeNormal: "gray",
			_buttonFillOver: b,
			_buttonStrokeOver: "blue",
			_buttonFillDisabled: "darkgray"
		}, bp(X, {
			name: "ButtonBorder",
			Db: "Rectangle",
			A: new K(0, 0, 2.761423749153968, 2.761423749153968),
			B: new K(1, 1, -2.761423749153968, -2.761423749153968),
			fill: a,
			stroke: "gray"
		}));
		a.Du = function(a, b) {
			if (b.ou()) {
				var e = b.Bd("ButtonBorder");
				if (e instanceof X) {
					var f = b._buttonFillOver;
					b._buttonFillNormal = e.fill;
					e.fill = f;
					f = b._buttonStrokeOver;
					b._buttonStrokeNormal = e.stroke;
					e.stroke = f
				}
			}
		};
		a.Eu = function(a, b) {
			if (b.ou()) {
				var e = b.Bd("ButtonBorder");
				e instanceof X && (e.fill = b._buttonFillNormal, e.stroke = b._buttonStrokeNormal)
			}
		};
		return a
	});
	ep("TreeExpanderButton", function() {
		var a = bp("Button", {
			_treeExpandedFigure: "MinusLine",
			_treeCollapsedFigure: "PlusLine"
		}, bp(X, {
			name: "ButtonIcon",
			Db: "MinusLine",
			Ca: Bd
		}, (new bh("figure", "isTreeExpanded", function(a, c) {
			var d = c.Q;
			return a ? d._treeExpandedFigure : d._treeCollapsedFigure
		})).Xx()), {
			visible: !1
		}, (new bh("visible", "isTreeLeaf", function(a) {
			return !a
		})).Xx());
		a.click = function(a, c) {
			var d = c.U;
			d instanceof kh && (d = d.zf);
			if (d instanceof T) {
				var e = d.g;
				if (null !== e) {
					e = e.pb;
					if (d.uc) {
						if (!e.canCollapseTree(d)) return
					} else if (!e.canExpandTree(d)) return;
					a.tc = !0;
					d.uc ? e.collapseTree(d) : e.expandTree(d)
				}
			}
		};
		return a
	});
	ep("SubGraphExpanderButton", function() {
		var a = bp("Button", {
			_subGraphExpandedFigure: "MinusLine",
			_subGraphCollapsedFigure: "PlusLine"
		}, bp(X, {
			name: "ButtonIcon",
			Db: "MinusLine",
			Ca: Bd
		}, (new bh("figure", "isSubGraphExpanded", function(a, c) {
			var d = c.Q;
			return a ? d._subGraphExpandedFigure : d._subGraphCollapsedFigure
		})).Xx()));
		a.click = function(a, c) {
			var d = c.U;
			d instanceof kh && (d = d.zf);
			if (d instanceof V) {
				var e = d.g;
				if (null !== e) {
					e = e.pb;
					if (d.ad) {
						if (!e.canCollapseSubGraph(d)) return
					} else if (!e.canExpandSubGraph(d)) return;
					a.tc = !0;
					d.ad ? e.collapseSubGraph(d) : e.expandSubGraph(d)
				}
			}
		};
		return a
	});
	ep("ToolTip", function() {
		var a = new kh(Gl),
			b = new X;
		b.name = "Border";
		b.fill = "#FFFFE0";
		b.stroke = "#CCCCCC";
		a.add(b);
		return a
	});
	ep("ContextMenu", function() {
		return new kh(Fl)
	});
	ep("ContextMenuButton", function() {
		var a = bp("Button");
		a.stretch = qo;
		var b = a.Bd("ButtonBorder");
		b instanceof X && (b.Db = "Rectangle", b.A = new K(0, 0, 2, 3), b.B = new K(1, 1, -2, -2));
		return a
	});
	ep("PanelExpanderButton", function(a) {
		var b = fp(a, "COLLAPSIBLE"),
			c = bp("Button", {
				_buttonExpandedFigure: "TriangleUp",
				_buttonCollapsedFigure: "TriangleDown"
			}, bp(X, "TriangleUp", {
				name: "ButtonIcon",
				Ca: new ia(6, 4)
			}, (new bh("figure", "visible", function(a) {
				return a ? c._buttonExpandedFigure : c._buttonCollapsedFigure
			})).Xx(b)));
		a = c.Bd("ButtonBorder");
		a instanceof X && (a.stroke = null, a.fill = "transparent");
		c.click = function(a, c) {
			var f = c.g;
			if (null !== f && !f.hb) {
				var h = c.Tl();
				null === h && (h = c.U);
				null !== h && (h = h.Bd(b), null !== h &&
					(f.Hb("Collapse/Expand Panel"), h.visible = !h.visible, f.Yc("Collapse/Expand Panel")))
			}
		};
		return c
	});
	ep("CheckBoxButton", function(a) {
		var b = fp(a);
		a = bp("Button", {
			"ButtonBorder.fill": "white",
			"ButtonBorder.stroke": "gray",
			width: 14,
			height: 14
		}, bp(X, {
			name: "ButtonIcon",
			aI: "M0 4 L3 9 9 0",
			mb: 2,
			stretch: Fe,
			BA: Rj,
			visible: !1
		}, "" !== b ? (new bh("visible", b)).RI() : []));
		a.click = function(a, d) {
			var e = a.g;
			if (!(null === e || e.hb || "" !== b && e.$.hb)) {
				a.tc = !0;
				var f = d.Bd("ButtonIcon");
				e.Hb("checkbox");
				f.visible = !f.visible;
				"function" === typeof d._doClick && d._doClick(a, d);
				e.Yc("checkbox")
			}
		};
		return a
	});
	ep("CheckBox", function(a) {
		a = fp(a);
		a = bp("CheckBoxButton", a, {
			name: "Button",
			margin: new hb(0, 1, 0, 0)
		});
		var b = bp(C, "Horizontal", a, {
			Fx: !0,
			margin: 1,
			_buttonFillNormal: a._buttonFillNormal,
			_buttonStrokeNormal: a._buttonStrokeNormal,
			_buttonFillOver: a._buttonFillOver,
			_buttonStrokeOver: a._buttonStrokeOver,
			_buttonFillDisabled: a._buttonFillDisabled,
			Du: a.Du,
			Eu: a.Eu,
			click: a.click,
			_buttonClick: a.click
		});
		a.Du = null;
		a.Eu = null;
		a.click = null;
		return b
	});

	function vo() {
		this.zr = this.Di = this.gj = this.Gq = this.Jq = this.Iq = this.Hq = this.Vi = this.ts = this.ss = this.Wi = this.Xi = this.Yi = this.vs = this.us = this.Ci = this.Ii = this.Ai = null
	}
	vo.prototype.copy = function() {
		var a = new vo;
		a.Ai = this.Ai;
		a.Ii = this.Ii;
		a.Ci = this.Ci;
		a.us = this.us;
		a.vs = this.vs;
		a.Yi = this.Yi;
		a.Xi = this.Xi;
		a.Wi = this.Wi;
		a.ss = this.ss;
		a.ts = this.ts;
		a.Vi = this.Vi;
		a.Hq = this.Hq;
		a.Iq = this.Iq;
		a.Jq = this.Jq;
		a.Gq = this.Gq;
		a.gj = this.gj;
		a.Di = this.Di;
		a.zr = this.zr;
		return a
	};

	function C(a) {
		G.call(this);
		void 0 === a ? this.na = Uj : (w.ob(a, C, C, "type"), this.na = a);
		this.xa = new H(G);
		this.lf = fd;
		this.na === Jl && (this.En = !0);
		this.lr = qc;
		this.Gi = oo;
		this.na === So && gp(this);
		this.Ap = Rj;
		this.Lr = Dd;
		this.Mr = dd;
		this.Ir = 0;
		this.Hr = 100;
		this.Kr = 10;
		this.Jr = 0;
		this.el = this.Zd = this.Xj = this.Bm = this.Dm = null;
		this.$r = NaN;
		this.xg = this.dk = null;
		this.Qo = "category";
		this.wg = null;
		this.ij = new B(NaN, NaN, NaN, NaN);
		this.qk = this.$s = this.Bl = null;
		this.Lj = ""
	}
	w.La(C, G);
	w.mi(C);
	w.ga("Panel", C);

	function gp(a) {
		a.Pj = fd;
		a.Ph = 1;
		a.Fi = null;
		a.zm = null;
		a.Oh = 1;
		a.Nh = null;
		a.ym = null;
		a.Xc = [];
		a.Uc = [];
		a.Xm = hp;
		a.xm = hp;
		a.hj = 0;
		a.Ri = 0
	}
	C.prototype.cloneProtected = function(a) {
		G.prototype.cloneProtected.call(this, a);
		a.na = this.na;
		a.lf = this.lf.S();
		a.lr = this.lr.S();
		a.Gi = this.Gi;
		if (a.na === So) {
			a.Pj = this.Pj.S();
			a.Ph = this.Ph;
			a.Fi = this.Fi;
			a.zm = this.zm;
			a.Oh = this.Oh;
			a.Nh = this.Nh;
			a.ym = this.ym;
			var b = [];
			if (0 < this.Xc.length)
				for (var c = this.Xc, d = c.length, e = 0; e < d; e++)
					if (void 0 !== c[e]) {
						var f = c[e].copy();
						f.hm(a);
						b[e] = f
					}
			a.Xc = b;
			b = [];
			if (0 < this.Uc.length)
				for (c = this.Uc, d = c.length, e = 0; e < d; e++) void 0 !== c[e] && (f = c[e].copy(), f.hm(a), b[e] = f);
			a.Uc = b;
			a.Xm = this.Xm;
			a.xm = this.xm;
			a.hj = this.hj;
			a.Ri = this.Ri
		}
		a.Ap = this.Ap;
		a.Lr = this.Lr.S();
		a.Mr = this.Mr.S();
		a.Ir = this.Ir;
		a.Hr = this.Hr;
		a.Kr = this.Kr;
		a.Jr = this.Jr;
		a.Dm = this.Dm;
		a.Xj = this.Xj;
		a.Zd = this.Zd;
		a.el = this.el;
		a.$r = this.$r;
		a.dk = this.dk;
		a.xg = this.xg;
		a.Qo = this.Qo;
		a.ij.assign(this.ij);
		a.Lj = this.Lj;
		null !== this.$s && (a.$s = this.$s)
	};
	C.prototype.ni = function(a) {
		G.prototype.ni.call(this, a);
		a.xa = this.xa;
		for (var b = a.xa.n, c = b.length, d = 0; d < c; d++) b[d].bj = a;
		a.Bl = null
	};
	C.prototype.copy = function() {
		var a = G.prototype.copy.call(this);
		if (null !== a) {
			for (var b = this.xa.n, c = b.length, d = 0; d < c; d++) {
				var e = b[d].copy(),
					f = a;
				e.hm(f);
				e.Um = null;
				var h = f.xa,
					k = h.count;
				h.Rd(k, e);
				h = f.U;
				if (null !== h) {
					h.Pm = null;
					null !== e.Vd && h instanceof T && (h.Kk = !0);
					var l = f.g;
					null !== l && l.ja.lb || h.cd(Ff, "elements", f, null, e, null, k)
				}
			}
			return a
		}
		return null
	};
	C.prototype.ic = function(a) {
		a.Ge === C ? this.type = a : G.prototype.ic.call(this, a)
	};
	C.prototype.toString = function() {
		return "Panel(" + this.type + ")#" + w.Pd(this)
	};
	var Uj;
	C.Position = Uj = w.p(C, "Position", 0);
	C.Horizontal = w.p(C, "Horizontal", 1);
	var Fl;
	C.Vertical = Fl = w.p(C, "Vertical", 2);
	var Nj;
	C.Spot = Nj = w.p(C, "Spot", 3);
	var Gl;
	C.Auto = Gl = w.p(C, "Auto", 4);
	var So;
	C.Table = So = w.p(C, "Table", 5);
	C.Viewbox = w.p(C, "Viewbox", 6);
	var Jo;
	C.TableRow = Jo = w.p(C, "TableRow", 7);
	var Ko;
	C.TableColumn = Ko = w.p(C, "TableColumn", 8);
	var ij;
	C.Link = ij = w.p(C, "Link", 9);
	var Jl;
	C.Grid = Jl = w.p(C, "Grid", 10);
	var ip;
	C.Graduated = ip = w.p(C, "Graduated", 11);
	w.defineProperty(C, {
		type: "type"
	}, function() {
		return this.na
	}, function(a) {
		var b = this.na;
		b !== a && (b !== Jo && b !== Ko || w.k("Cannot change Panel.type when it is already a TableRow or a TableColumn: " + a), this.na = a, this.na === Jl ? this.En = !0 : this.na === So && gp(this), this.H(), this.h("type", b, a))
	});
	w.u(C, {
		elements: "elements"
	}, function() {
		return this.xa.i
	});
	w.u(C, {
		Ja: "naturalBounds"
	}, function() {
		return this.Wc
	});
	w.defineProperty(C, {
		padding: "padding"
	}, function() {
		return this.lf
	}, function(a) {
		"number" === typeof a ? (0 > a && w.Fa(a, ">= 0", C, "padding"), a = new hb(a)) : (w.G(a, hb, C, "padding"), 0 > a.left && w.Fa(a.left, ">= 0", C, "padding:value.left"), 0 > a.right && w.Fa(a.right, ">= 0", C, "padding:value.right"), 0 > a.top && w.Fa(a.top, ">= 0", C, "padding:value.top"), 0 > a.bottom && w.Fa(a.bottom, ">= 0", C, "padding:value.bottom"));
		var b = this.lf;
		b.L(a) || (this.lf = a = a.S(), this.H(), this.h("padding", b, a))
	});
	w.defineProperty(C, {
		Sl: "defaultAlignment"
	}, function() {
		return this.lr
	}, function(a) {
		var b = this.lr;
		b.L(a) || (this.lr = a = a.S(), this.H(), this.h("defaultAlignment", b, a))
	});
	w.defineProperty(C, {
		ae: "defaultStretch"
	}, function() {
		return this.Gi
	}, function(a) {
		var b = this.Gi;
		b !== a && (w.ob(a, G, C, "defaultStretch"), this.Gi = a, this.H(), this.h("defaultStretch", b, a))
	});
	w.defineProperty(C, {
		XK: "defaultSeparatorPadding"
	}, function() {
		return void 0 === this.Pj ? fd : this.Pj
	}, function(a) {
		if (void 0 !== this.Pj) {
			"number" === typeof a && (a = new hb(a));
			var b = this.Pj;
			b.L(a) || (this.Pj = a = a.S(), this.H(), this.h("defaultSeparatorPadding", b, a))
		}
	});
	w.defineProperty(C, {
		VK: "defaultRowSeparatorStroke"
	}, function() {
		return void 0 === this.Fi ? null : this.Fi
	}, function(a) {
		var b = this.Fi;
		b !== a && (null === a || "string" === typeof a || a instanceof ga) && (a instanceof ga && a.freeze(), this.Fi = a, this.oa(), this.h("defaultRowSeparatorStroke", b, a))
	});
	w.defineProperty(C, {
		WK: "defaultRowSeparatorStrokeWidth"
	}, function() {
		return void 0 === this.Ph ? 1 : this.Ph
	}, function(a) {
		if (void 0 !== this.Ph) {
			var b = this.Ph;
			b !== a && isFinite(a) && 0 <= a && (this.Ph = a, this.H(), this.h("defaultRowSeparatorStrokeWidth", b, a))
		}
	});
	w.defineProperty(C, {
		UK: "defaultRowSeparatorDashArray"
	}, function() {
		return void 0 === this.zm ? null : this.zm
	}, function(a) {
		if (void 0 !== this.zm) {
			var b = this.zm;
			if (b !== a) {
				null === a || Array.isArray(a) || w.Ed(a, "Array", C, "defaultRowSeparatorDashArray:value");
				if (null !== a) {
					for (var c = a.length, d = 0, e = 0; e < c; e++) {
						var f = a[e];
						"number" === typeof f && 0 <= f && isFinite(f) || w.k("defaultRowSeparatorDashArray value " + f + " at index " + e + " must be a positive number or zero.");
						d += f
					}
					if (0 === d) {
						if (null === b) return;
						a = null
					}
				}
				this.zm = a;
				this.oa();
				this.h("defaultRowSeparatorDashArray", b, a)
			}
		}
	});
	w.defineProperty(C, {
		PK: "defaultColumnSeparatorStroke"
	}, function() {
		return void 0 === this.Nh ? null : this.Nh
	}, function(a) {
		if (void 0 !== this.Nh) {
			var b = this.Nh;
			b !== a && (null === a || "string" === typeof a || a instanceof ga) && (a instanceof ga && a.freeze(), this.Nh = a, this.oa(), this.h("defaultColumnSeparatorStroke", b, a))
		}
	});
	w.defineProperty(C, {
		QK: "defaultColumnSeparatorStrokeWidth"
	}, function() {
		return void 0 === this.Oh ? 1 : this.Oh
	}, function(a) {
		if (void 0 !== this.Oh) {
			var b = this.Oh;
			b !== a && isFinite(a) && 0 <= a && (this.Oh = a, this.H(), this.h("defaultColumnSeparatorStrokeWidth", b, a))
		}
	});
	w.defineProperty(C, {
		OK: "defaultColumnSeparatorDashArray"
	}, function() {
		return void 0 === this.ym ? null : this.ym
	}, function(a) {
		if (void 0 !== this.ym) {
			var b = this.ym;
			if (b !== a) {
				null === a || Array.isArray(a) || w.Ed(a, "Array", C, "defaultColumnSeparatorDashArray:value");
				if (null !== a) {
					for (var c = a.length, d = 0, e = 0; e < c; e++) {
						var f = a[e];
						"number" === typeof f && 0 <= f && isFinite(f) || w.k("defaultColumnSeparatorDashArray value " + f + " at index " + e + " must be a positive number or zero.");
						d += f
					}
					if (0 === d) {
						if (null === b) return;
						a = null
					}
				}
				this.ym =
					a;
				this.oa();
				this.h("defaultColumnSeparatorDashArray", b, a)
			}
		}
	});
	w.defineProperty(C, {
		dM: "viewboxStretch"
	}, function() {
		return this.Ap
	}, function(a) {
		var b = this.Ap;
		b !== a && (w.ob(a, G, C, "viewboxStretch"), this.Ap = a, this.H(), this.h("viewboxStretch", b, a))
	});
	w.defineProperty(C, {
		Ex: "gridCellSize"
	}, function() {
		return this.Lr
	}, function(a) {
		var b = this.Lr;
		if (!b.L(a)) {
			w.G(a, ia, C, "gridCellSize");
			a.I() && 0 !== a.width && 0 !== a.height || w.k("Invalid Panel.gridCellSize: " + a);
			this.Lr = a.S();
			var c = this.g;
			null !== c && this === c.Bn && dm(c);
			this.oa();
			this.h("gridCellSize", b, a)
		}
	});
	w.defineProperty(C, {
		pF: "gridOrigin"
	}, function() {
		return this.Mr
	}, function(a) {
		var b = this.Mr;
		if (!b.L(a)) {
			w.G(a, y, C, "gridOrigin");
			a.I() || w.k("Invalid Panel.gridOrigin: " + a);
			this.Mr = a.S();
			var c = this.g;
			null !== c && this === c.Bn && dm(c);
			this.oa();
			this.h("gridOrigin", b, a)
		}
	});
	w.defineProperty(C, {
		Jk: "graduatedMin"
	}, function() {
		return this.Ir
	}, function(a) {
		w.zd(a, C, "graduatedMin");
		var b = this.Ir;
		b !== a && (this.Ir = a, this.H(), this.h("graduatedMin", b, a), zo(this) && (a = this.U, null !== a && Ao(this, a, "graduatedRange")))
	});
	w.defineProperty(C, {
		EA: "graduatedMax"
	}, function() {
		return this.Hr
	}, function(a) {
		w.zd(a, C, "graduatedMax");
		var b = this.Hr;
		b !== a && (this.Hr = a, this.H(), this.h("graduatedMax", b, a), zo(this) && (a = this.U, null !== a && Ao(this, a, "graduatedRange")))
	});
	w.u(C, {
		hu: "graduatedRange"
	}, function() {
		return this.EA - this.Jk
	});
	w.defineProperty(C, {
		FA: "graduatedTickUnit"
	}, function() {
		return this.Kr
	}, function(a) {
		w.zd(a, C, "graduatedTickUnit");
		var b = this.Kr;
		b !== a && 0 < a && (this.Kr = a, this.H(), this.h("graduatedTickUnit", b, a))
	});
	w.defineProperty(C, {
		oF: "graduatedTickBase"
	}, function() {
		return this.Jr
	}, function(a) {
		w.zd(a, C, "graduatedTickBase");
		var b = this.Jr;
		b !== a && (this.Jr = a, this.H(), this.h("graduatedTickBase", b, a))
	});
	g = C.prototype;
	g.Ds = function(a) {
		G.prototype.Ds.call(this, a);
		for (var b = this.xa.n, c = b.length, d = 0; d < c; d++) b[d].Ds(a)
	};
	g.Ek = function(a, b) {
		if (this.na === Jl) {
			var c = this.sj() * b.scale;
			0 >= c && (c = 1);
			var d = this.Ex,
				e = d.width,
				d = d.height,
				f = this.Ja,
				h = f.width,
				f = f.height,
				k = Math.ceil(h / e),
				l = Math.ceil(f / d),
				m = this.pF;
			a.save();
			a.beginPath();
			a.rect(0, 0, h, f);
			a.clip();
			for (var n = [], p = this.xa.n, q = p.length, r = 0; r < q; r++) {
				var s = p[r],
					u = [];
				n.push(u);
				if (s.visible)
					for (var s = Zm(s.Db), t = r + 1; t < q; t++) {
						var x = p[t];
						x.visible && Zm(x.Db) === s && (x = x.interval, 2 <= x && u.push(x))
					}
			}
			p = this.xa.n;
			q = p.length;
			for (r = 0; r < q; r++) {
				var v = p[r];
				if (v.visible && (u = v.interval, !(2 >
						e * u * c))) {
					s = v.opacity;
					t = 1;
					if (1 !== s) {
						if (0 === s) continue;
						t = a.globalAlpha;
						a.globalAlpha = t * s
					}
					var x = n[r],
						z = !1,
						A = !0,
						L = v.xG;
					null !== L && (z = !0, A = a.vA(L, v.yf));
					if ("LineV" === v.Db && null !== v.stroke) {
						a.lineWidth = v.mb;
						No(this, a, v.stroke, !1, !1);
						a.beginPath();
						for (var E = Math.floor(-m.x / e), P = E; P <= E + k; P++) {
							var $ = P * e + m.x;
							0 <= $ && $ <= h && jp(P, u, x) && (z && !A ? yo(a, $, 0, $, f, L, v.yf) : (a.moveTo($, 0), a.lineTo($, f)))
						}
						a.stroke()
					} else if ("LineH" === v.Db && null !== v.stroke) {
						a.lineWidth = v.mb;
						No(this, a, v.stroke, !1, !1);
						a.beginPath();
						for (P = E = Math.floor(-m.y /
								d); P <= E + l; P++) $ = P * d + m.y, 0 <= $ && $ <= f && jp(P, u, x) && (z && !A ? yo(a, 0, $, h, $, L, v.yf) : (a.moveTo(0, $), a.lineTo(h, $)));
						a.stroke()
					} else if ("BarV" === v.Db && null !== v.fill)
						for (No(this, a, v.fill, !0, !1), v = v.width, isNaN(v) && (v = e), P = E = Math.floor(-m.x / e); P <= E + k; P++) $ = P * e + m.x, 0 <= $ && $ <= h && jp(P, u, x) && a.fillRect($, 0, v, f);
					else if ("BarH" === v.Db && null !== v.fill)
						for (No(this, a, v.fill, !0, !1), v = v.height, isNaN(v) && (v = d), P = E = Math.floor(-m.y / d); P <= E + l; P++) $ = P * d + m.y, 0 <= $ && $ <= f && jp(P, u, x) && a.fillRect(0, $, h, v);
					z && a.sA();
					1 !== s && (a.globalAlpha =
						t)
				}
			}
			a.restore();
			a.He(!1)
		} else if (this.na === ip) {
			e = this.Ja;
			c = e.width;
			e = e.height;
			a.save();
			a.beginPath();
			a.rect(-1, -1, c + 1, e + 1);
			a.clip();
			c = this.Ad();
			c.ve(a, b);
			e = this.sj() * b.scale;
			0 >= e && (e = 1);
			d = c.Y;
			h = this.xa.n;
			f = this.Dm;
			k = h.length;
			for (l = 0; l < k; l++)
				if (q = h[l], m = f[l], n = m.length, q.visible && q !== c && 0 !== m.length)
					if (q instanceof X) {
						if (!(2 > this.FA * q.interval * c.nf.$t / this.hu * e))
							for (r = q.za, u = q.mb * q.scale, s = q.oh, s.Td() && (s = Bb), p = 0; p < n; p++) t = q, x = m[p][0], z = d, E = m[p][1], P = r, v = u, A = s, L = t.kd, L.reset(), L.translate(x.x + z.x,
								x.y + z.y), L.rotate(E + t.angle, 0, 0), L.translate(-P.width * A.x + A.offsetX + v / 2, -P.height * A.y + A.offsetY + v / 2), L.scale(t.scale, t.scale), Po(t, !1), t.sm.set(t.kd), t.Ao = t.scale, Qo(t, !1), q.ve(a, b), q.kd.reset()
					} else if (q instanceof Lh)
				for (null === this.qk && (this.qk = new Lh), r = this.qk, kp(q, r), p = 0; p < n; p++) x = m[p], 3 < x.length && (s = x[6], r.Md = x[2], r.mg = x[3], r.me = x[4], r.xf = x[5], r.Wc = x[8], r.jc(s.x, s.y, s.width, s.height), q = r, u = d, t = x[7], x = x[8], z = q.kd, z.reset(), z.translate(s.x + u.x, s.y + u.y), z.translate(-t.x, -t.y), Co(q, z, x.x, x.y, x.width,
					x.height), Po(q, !1), q.sm.set(q.kd), q.Ao = q.scale, Qo(q, !1), r.ve(a, b));
			a.restore();
			a.He(!0)
		} else {
			this.na === So && (a.lineCap = "butt", lp(this, a, !0, this.Xc, !0), lp(this, a, !1, this.Uc, !0), mp(this, a, !0, this.Xc), mp(this, a, !1, this.Uc), lp(this, a, !0, this.Xc, !1), lp(this, a, !1, this.Uc, !1));
			(c = this.mu) && a.save();
			e = this.Ad();
			d = this.xa.n;
			h = d.length;
			for (f = 0; f < h; f++) k = d[f], c && k === e && (a.Ip = !0), k.ve(a, b), c && k === e && (a.Ip = !1);
			c && (a.restore(), a.He(!0))
		}
	};

	function kp(a, b) {
		b.N = a.N | 6144;
		b.Bc = a.Bc;
		b.Fb = a.Fb;
		b.cc = a.cc;
		b.Se = a.Se.S();
		b.Yh = a.Yh.S();
		b.Xh = a.Xh.S();
		b.Ti = a.Ti.copy();
		b.vb = a.vb;
		b.mg = a.mg;
		b.Fg = a.Fg;
		b.Nm = a.Nm.S();
		b.je = a.je.S();
		b.rm = a.rm.S();
		b.Ym = a.Ym;
		b.Zm = a.Zm.S();
		b.$m = a.$m;
		null !== a.og && (b.og = a.og.copy());
		b.dn = a.dn;
		a instanceof Lh && (b.Md = a.Md, b.sc = a.sc, b.qg = a.qg, b.Cl = a.Cl, b.pg = a.pg, b.Gl = a.Gl, b.Gm = a.Gm, b.ck = a.ck, b.ak = a.ak, b.$i = a.$i, b.kj = a.kj, b.xf.Sj = null, b.ei = a.ei, b.fi = a.fi, b.gh = a.gh, b.To = a.To, b.ug = a.ug, b.tg = a.tg, b.sg = a.sg, b.Cm = a.Cm)
	}

	function mp(a, b, c, d) {
		for (var e = d.length, f = a.Y, h = !0, k = 0; k < e; k++) {
			var l = d[k];
			if (void 0 !== l)
				if (h) h = !1;
				else if (0 !== l.Ya) {
				if (c) {
					if (l.position > f.height) continue
				} else if (l.position > f.width) continue;
				var m = l.yq;
				isNaN(m) && (m = c ? a.Ph : a.Oh);
				var n = l.xq;
				null === n && (n = c ? a.Fi : a.Nh);
				0 !== m && null !== n && (No(a, b, n, !1, !1), b.beginPath(), n = l.position + m, c ? n > f.height && (m -= n - f.height) : n > f.width && (m -= n - f.width), l = l.position + m / 2, b.lineWidth = m, n = a.padding, c ? (l += n.top, m = n.left, n = f.width - n.right, b.moveTo(m, l), b.lineTo(n, l)) : (l += n.left,
					m = n.top, n = f.height - n.bottom, b.moveTo(l, m), b.lineTo(l, n)), b.stroke())
			}
		}
	}

	function lp(a, b, c, d, e) {
		for (var f = d.length, h = a.Y, k = 0; k < f; k++) {
			var l = d[k];
			if (void 0 !== l && null !== l.background && l.qA !== e && 0 !== l.Ya) {
				var m = c ? h.height : h.width;
				if (!(l.position > m)) {
					var n = l.Ye(),
						p = l.yq;
					isNaN(p) && (p = c ? a.Ph : a.Oh);
					var q = l.xq;
					null === q && (q = c ? a.Fi : a.Nh);
					null === q && (p = 0);
					n -= p;
					p = l.position + p;
					n += l.Ya;
					p + n > m && (n = m - p);
					0 >= n || (m = a.padding, No(a, b, l.background, !0, !1), c ? b.fillRect(m.left, p + m.top, h.width - (m.left + m.right), n) : b.fillRect(p + m.left, m.top, n, h.height - (m.top + m.bottom)))
				}
			}
		}
	}

	function jp(a, b, c) {
		if (0 !== a % b) return !1;
		b = c.length;
		for (var d = 0; d < b; d++)
			if (0 === a % c[d]) return !1;
		return !0
	}

	function Zm(a) {
		return "LineV" === a || "BarV" === a
	}
	g.zn = function(a, b, c, d, e) {
		var f = this.Yg(),
			h = this.transform,
			k = 1 / (h.m11 * h.m22 - h.m12 * h.m21),
			l = h.m22 * k,
			m = -h.m12 * k,
			n = -h.m21 * k,
			p = h.m11 * k,
			q = k * (h.m21 * h.dy - h.m22 * h.dx),
			r = k * (h.m12 * h.dx - h.m11 * h.dy);
		if (null !== this.kn) return h = this.Y, le(h.left, h.top, h.right, h.bottom, a, b, c, d, e);
		if (null !== this.background) f = a * l + b * n + q, k = a * m + b * p + r, a = c * l + d * n + q, l = c * m + d * p + r, e.m(0, 0), c = this.Ja, c = le(0, 0, c.width, c.height, f, k, a, l, e), e.transform(h);
		else {
			f || (l = 1, n = m = 0, p = 1, r = q = 0);
			k = a * l + b * n + q;
			a = a * m + b * p + r;
			l = c * l + d * n + q;
			d = c * m + d * p + r;
			e.m(l, d);
			m = (l -
				k) * (l - k) + (d - a) * (d - a);
			c = !1;
			p = this.xa.n;
			r = p.length;
			n = w.K();
			q = null;
			b = Infinity;
			var s = null;
			this.mu && (s = w.K(), q = this.Ad(), (c = q.zn(k, a, l, d, s)) && (b = (k - s.x) * (k - s.x) + (a - s.y) * (a - s.y)));
			for (var u = 0; u < r; u++) {
				var t = p[u];
				t.visible && t !== q && t.zn(k, a, l, d, n) && (c = !0, t = (k - n.x) * (k - n.x) + (a - n.y) * (a - n.y), t < m && (m = t, e.set(n)))
			}
			this.mu && (b > m && e.set(s), w.v(s));
			w.v(n);
			f && e.transform(h)
		}
		return c
	};
	g.H = function(a) {
		G.prototype.H.call(this, a);
		a = null;
		if (this.na === Gl || this.na === ij) a = this.Ad();
		for (var b = this.xa.n, c = b.length, d = 0; d < c; d++) {
			var e = b[d];
			(e === a || e.ef) && e.H(!0);
			if (!e.Ca.I()) {
				var f = Eo(e, !1);
				(e instanceof Oj || e instanceof C || e instanceof Lh || f !== Pj) && e.H(!0)
			}
		}
	};
	g.$p = function() {
		if (!1 === Em(this)) {
			cm(this, !0);
			Fo(this, !0);
			for (var a = this.xa.n, b = a.length, c = 0; c < b; c++) a[c].$p()
		}
	};
	g.Ni = function() {
		if (0 !== (this.N & 2048) === !1) {
			Po(this, !0);
			Qo(this, !0);
			for (var a = this.xa.n, b = a.length, c = 0; c < b; c++) a[c].LA()
		}
	};
	g.LA = function() {
		Qo(this, !0);
		for (var a = this.xa.n, b = a.length, c = 0; c < b; c++) a[c].LA()
	};
	g.Ln = function(a, b, c, d) {
		var e = this.ij;
		e.width = 0;
		e.height = 0;
		var f = this.Ca,
			h = this.qi;
		void 0 === c && (c = h.width, d = h.height);
		c = Math.max(c, h.width);
		d = Math.max(d, h.height);
		var k = this.Gf;
		isNaN(f.width) || (a = Math.min(f.width, k.width));
		isNaN(f.height) || (b = Math.min(f.height, k.height));
		a = Math.max(c, a);
		b = Math.max(d, b);
		var l = this.padding;
		a = Math.max(a - l.left - l.right, 0);
		b = Math.max(b - l.top - l.bottom, 0);
		var m = this.xa.n;
		if (0 !== m.length) {
			var n = this.na.Rb;
			switch (n) {
				case "Position":
					var p = a,
						q = b,
						r = c,
						s = d,
						u = m.length;
					e.x = 0;
					e.y =
						0;
					e.width = 0;
					e.height = 0;
					for (var t = np(this), x = 0; x < u; x++) {
						var v = m[x];
						if (v.visible || v === t) {
							var z = v.margin,
								A = z.right + z.left,
								L = z.top + z.bottom;
							yk(v, p, q, r, s);
							var E = v.za,
								P = Math.max(E.width + A, 0),
								$ = Math.max(E.height + L, 0),
								S = v.position.x,
								ba = v.position.y;
							isFinite(S) || (S = 0);
							isFinite(ba) || (ba = 0);
							if (v instanceof X) {
								var ha = v;
								if (ha.AF) var ya = ha.mb / 2,
									S = S - ya,
									ba = ba - ya
							}
							ab(e, S, ba, P, $)
						}
					}
					break;
				case "Vertical":
					for (var Ga = a, eb = c, wa = m.length, U = w.cb(), sb = np(this), Kb = 0; Kb < wa; Kb++) {
						var Oa = m[Kb];
						if (Oa.visible || Oa === sb) {
							var Lc = Eo(Oa, !1);
							if (Lc !== Pj && Lc !== po) U.push(Oa);
							else {
								var Ma = Oa.margin,
									dg = Ma.right + Ma.left,
									eg = Ma.top + Ma.bottom;
								yk(Oa, Ga, Infinity, eb, 0);
								var sd = Oa.za,
									td = Math.max(sd.width + dg, 0),
									Mc = Math.max(sd.height + eg, 0);
								e.width = Math.max(e.width, td);
								e.height += Mc
							}
						}
					}
					var qh = U.length;
					if (0 !== qh) {
						this.Ca.width ? Ga = Math.min(this.Ca.width, this.Gf.width) : 0 !== e.width && (Ga = Math.min(e.width, this.Gf.width));
						for (Kb = 0; Kb < qh; Kb++)
							if (Oa = U[Kb], Oa.visible || Oa === sb) Ma = Oa.margin, dg = Ma.right + Ma.left, eg = Ma.top + Ma.bottom, yk(Oa, Ga, Infinity, eb, 0), sd = Oa.za,
								td = Math.max(sd.width + dg, 0), Mc = Math.max(sd.height + eg, 0), e.width = Math.max(e.width, td), e.height += Mc;
						w.ta(U)
					}
					break;
				case "Horizontal":
					for (var Xe = b, fb = d, pb = m.length, na = w.cb(), ja = np(this), Za = 0; Za < pb; Za++) {
						var Ia = m[Za];
						if (Ia.visible || Ia === ja) {
							var kb = Eo(Ia, !1);
							if (kb !== Pj && kb !== qo) na.push(Ia);
							else {
								var Hd = Ia.margin,
									Gf = Hd.right + Hd.left,
									qe = Hd.top + Hd.bottom;
								yk(Ia, Infinity, Xe, 0, fb);
								var Yd = Ia.za,
									gd = Math.max(Yd.width + Gf, 0),
									rh = Math.max(Yd.height + qe, 0);
								e.width += gd;
								e.height = Math.max(e.height, rh)
							}
						}
					}
					var Hf = na.length;
					if (0 !==
						Hf) {
						this.Ca.height ? Xe = Math.min(this.Ca.height, this.Gf.height) : 0 !== e.height && (Xe = Math.min(e.height, this.Gf.height));
						for (Za = 0; Za < Hf; Za++)
							if (Ia = na[Za], Ia.visible || Ia === ja) Hd = Ia.margin, Gf = Hd.right + Hd.left, qe = Hd.top + Hd.bottom, yk(Ia, Infinity, Xe, 0, fb), Yd = Ia.za, gd = Math.max(Yd.width + Gf, 0), rh = Math.max(Yd.height + qe, 0), e.width += gd, e.height = Math.max(e.height, rh);
						w.ta(na)
					}
					break;
				case "Spot":
					a: {
						var Dg = a,
							Cb = b,
							Ac = c,
							Zd = d,
							sh = m.length,
							qb = this.Ad(),
							Ja = qb.margin,
							Lb = 0,
							If = 0,
							Eg = Ja.right + Ja.left,
							th = Ja.top + Ja.bottom;yk(qb, Dg,
							Cb, Ac, Zd);
						for (var gb = qb.za, tc = gb.width, Vb = gb.height, re = Math.max(tc + Eg, 0), uc = Math.max(Vb + th, 0), vc = this.mu, rb = w.lg(-Ja.left, -Ja.top, re, uc), kc = !0, tb = np(this), Bc = 0; Bc < sh; Bc++) {
							var bb = m[Bc];
							if (bb !== qb && (bb.visible || bb === tb)) {
								Ja = bb.margin;
								Lb = Ja.right + Ja.left;
								If = Ja.top + Ja.bottom;
								yk(bb, Dg, Cb, 0, 0);
								var gb = bb.za,
									re = Math.max(gb.width + Lb, 0),
									uc = Math.max(gb.height + If, 0),
									Qa = bb.alignment;
								Qa.Zc() && (Qa = this.Sl);
								Qa.$c() || (Qa = Jb);
								var Hb = bb.oh;
								Hb.Zc() && (Hb = Jb);
								var ud = null;
								bb instanceof C && "" !== bb.Lj && (bb.jc(0, 0, gb.width,
									gb.height), ud = bb.Bd(bb.Lj), ud === bb && (ud = null));
								var fg, Ye;
								if (null !== ud) {
									for (var gg = ud.Ja, rj = ud.margin, Mb = w.xb(Hb.x * gg.width + Hb.offsetX - rj.left, Hb.y * gg.height + Hb.offsetY - rj.top); ud !== bb;) ud.transform.nb(Mb), ud = ud.Q;
									fg = Qa.x * tc + Qa.offsetX - Mb.x;
									Ye = Qa.y * Vb + Qa.offsetY - Mb.y;
									w.v(Mb)
								} else fg = Qa.x * tc + Qa.offsetX - (Hb.x * gb.width - Hb.offsetX) - Ja.left, Ye = Qa.y * Vb + Qa.offsetY - (Hb.y * gb.height - Hb.offsetY) - Ja.top;
								kc ? (kc = !1, e.x = fg, e.y = Ye, e.width = re, e.height = uc) : ab(e, fg, Ye, re, uc)
							}
						}
						kc ? e.assign(rb) : vc ? e.uF(rb.x, rb.y, rb.width,
							rb.height) : ab(e, rb.x, rb.y, rb.width, rb.height);w.Eb(rb);
						var Cc = qb.stretch;Cc === oo && (Cc = Eo(qb, !1));
						switch (Cc) {
							case Pj:
								break a;
							case Fe:
								if (!isFinite(Dg) && !isFinite(Cb)) break a;
								break;
							case qo:
								if (!isFinite(Dg)) break a;
								break;
							case po:
								if (!isFinite(Cb)) break a
						}
						gb = qb.za;tc = gb.width;Vb = gb.height;re = Math.max(tc + Eg, 0);uc = Math.max(Vb + th, 0);Ja = qb.margin;rb = w.lg(-Ja.left, -Ja.top, re, uc);
						for (Bc = 0; Bc < sh; Bc++) bb = m[Bc],
						bb === qb || !bb.visible && bb !== tb || (Ja = bb.margin, Lb = Ja.right + Ja.left, If = Ja.top + Ja.bottom, gb = bb.za, re = Math.max(gb.width +
							Lb, 0), uc = Math.max(gb.height + If, 0), Qa = bb.alignment, Qa.Zc() && (Qa = this.Sl), Qa.$c() || (Qa = Jb), Hb = bb.oh, Hb.Zc() && (Hb = Jb), kc ? (kc = !1, e.x = Qa.x * tc + Qa.offsetX - (Hb.x * gb.width - Hb.offsetX) - Ja.left, e.y = Qa.y * Vb + Qa.offsetY - (Hb.y * gb.height - Hb.offsetY) - Ja.top, e.width = re, e.height = uc) : ab(e, Qa.x * tc + Qa.offsetX - (Hb.x * gb.width - Hb.offsetX) - Ja.left, Qa.y * Vb + Qa.offsetY - (Hb.y * gb.height - Hb.offsetY) - Ja.top, re, uc));kc ? e.assign(rb) : vc ? e.uF(rb.x, rb.y, rb.width, rb.height) : ab(e, rb.x, rb.y, rb.width, rb.height);w.Eb(rb)
					}
					break;
				case "Auto":
					var wc =
						a,
						hd = b,
						lb = c,
						Nb = d,
						se = m.length,
						ub = this.Ad(),
						$d = ub.margin,
						uh = wc,
						vh = hd,
						Fg = $d.right + $d.left,
						id = $d.top + $d.bottom;
					yk(ub, wc, hd, lb, Nb);
					var Id = ub.za,
						cc = 0,
						vb = null;
					ub instanceof X && (vb = ub, cc = vb.mb * vb.scale);
					var vd = Math.max(Id.width + Fg, 0),
						jb = Math.max(Id.height + id, 0),
						dc = Mp(ub),
						fi = dc.x * vd + dc.offsetX,
						Yc = dc.y * jb + dc.offsetY,
						Db = Np(ub),
						te = Db.x * vd + Db.offsetX,
						Ze = Db.y * jb + Db.offsetY;
					isFinite(wc) && (uh = Math.max(Math.abs(fi - te) - cc, 0));
					isFinite(hd) && (vh = Math.max(Math.abs(Yc - Ze) - cc, 0));
					var Zc = w.mm();
					Zc.m(0, 0);
					for (var Jf = np(this),
							Gg = 0; Gg < se; Gg++) {
						var wh = m[Gg];
						if (wh !== ub && (wh.visible || wh === Jf)) {
							var $d = wh.margin,
								Gk = $d.right + $d.left,
								wb = $d.top + $d.bottom;
							yk(wh, uh, vh, 0, 0);
							Id = wh.za;
							vd = Math.max(Id.width + Gk, 0);
							jb = Math.max(Id.height + wb, 0);
							Zc.m(Math.max(vd, Zc.width), Math.max(jb, Zc.height))
						}
					}
					if (1 === se) e.width = vd, e.height = jb, w.Hk(Zc);
					else {
						var dc = Mp(ub),
							Db = Np(ub),
							ae = 0,
							jd = 0;
						Db.x !== dc.x && Db.y !== dc.y && (ae = Zc.width / Math.abs(Db.x - dc.x), jd = Zc.height / Math.abs(Db.y - dc.y));
						w.Hk(Zc);
						cc = 0;
						null !== vb && (cc = vb.mb * vb.scale, Qj(vb) === Rj && (ae = jd = Math.max(ae,
							jd)));
						var ae = ae + (Math.abs(dc.offsetX) + Math.abs(Db.offsetX) + cc),
							jd = jd + (Math.abs(dc.offsetY) + Math.abs(Db.offsetY) + cc),
							Je = ub.stretch;
						Je === oo && (Je = Eo(ub, !1));
						switch (Je) {
							case Pj:
								Nb = lb = 0;
								break;
							case Fe:
								isFinite(wc) && (ae = wc);
								isFinite(hd) && (jd = hd);
								break;
							case qo:
								isFinite(wc) && (ae = wc);
								Nb = 0;
								break;
							case po:
								lb = 0, isFinite(hd) && (jd = hd)
						}
						ub.$p();
						yk(ub, ae, jd, lb, Nb);
						e.width = ub.za.width + Fg;
						e.height = ub.za.height + id
					}
					break;
				case "Table":
					for (var gi = a, hi = b, sj = c, tj = d, Eb = m.length, xh = w.cb(), yh = w.cb(), fa = 0; fa < Eb; fa++) {
						var aa = m[fa],
							be = aa instanceof C ? aa : null;
						if (null === be || be.type !== Jo && be.type !== Ko || !aa.visible) xh.push(aa);
						else {
							yh.push(be);
							for (var hg = be.xa.n, ii = hg.length, Fb = 0; Fb < ii; Fb++) {
								var ji = hg[Fb];
								be.type === Jo ? ji.Ub = aa.Ub : be.type === Ko && (ji.column = aa.column);
								xh.push(ji)
							}
						}
					}
					Eb = xh.length;
					0 === Eb && (this.de(0), this.ce(0));
					for (var Tb = [], fa = 0; fa < Eb; fa++) aa = xh[fa], cm(aa, !0), Fo(aa, !0), Tb[aa.Ub] || (Tb[aa.Ub] = []), Tb[aa.Ub][aa.column] || (Tb[aa.Ub][aa.column] = []), Tb[aa.Ub][aa.column].push(aa);
					w.ta(xh);
					for (var $e = w.cb(), Ke = w.cb(), af = w.cb(),
							ue = {
								count: 0
							}, ve = {
								count: 0
							}, $c = gi, Jd = hi, zh = this.Xc, Eb = zh.length, fa = 0; fa < Eb; fa++) {
						var Y = zh[fa];
						void 0 !== Y && (Y.Ya = 0)
					}
					zh = this.Uc;
					Eb = zh.length;
					for (fa = 0; fa < Eb; fa++) Y = zh[fa], void 0 !== Y && (Y.Ya = 0);
					for (var kd = Tb.length, ig = 0, fa = 0; fa < kd; fa++) Tb[fa] && (ig = Math.max(ig, Tb[fa].length));
					for (var ki = Math.min(this.hj, kd - 1), Ah = Math.min(this.Ri, ig - 1), lc = 0, kd = Tb.length, Bh = np(this), fa = 0; fa < kd; fa++)
						if (Tb[fa])
							for (var ig = Tb[fa].length, mb = this.de(fa), Fb = mb.Ya = 0; Fb < ig; Fb++)
								if (Tb[fa][Fb]) {
									var nb = this.ce(Fb);
									void 0 === $e[Fb] && (nb.Ya =
										0, $e[Fb] = !0);
									for (var gm = Tb[fa][Fb], bf = gm.length, Hk = 0; Hk < bf; Hk++)
										if (aa = gm[Hk], aa.visible || aa === Bh) {
											var li = 1 < aa.dj || 1 < aa.Bi;
											li && (fa < ki || Fb < Ah || Ke.push(aa));
											var xc = aa.margin,
												Kf = xc.right + xc.left,
												jg = xc.top + xc.bottom,
												Ob = To(aa, mb, nb, !1),
												cf = aa.Ca,
												Ik = !isNaN(cf.height),
												hm = !isNaN(cf.width) && Ik;
											li || Ob === Pj || hm || fa < ki || Fb < Ah || (void 0 !== ue[Fb] || Ob !== Fe && Ob !== qo || (ue[Fb] = -1, ue.count++), void 0 !== ve[fa] || Ob !== Fe && Ob !== po || (ve[fa] = -1, ve.count++), af.push(aa));
											yk(aa, Infinity, Infinity, 0, 0);
											if (!(fa < ki || Fb < Ah)) {
												var Lf =
													aa.za,
													df = Math.max(Lf.width + Kf, 0),
													ef = Math.max(Lf.height + jg, 0);
												if (1 === aa.dj && (Ob === Pj || Ob === qo)) {
													var Y = this.de(fa),
														mc = Y.Ye(),
														lc = Math.max(ef - Y.Ya, 0);
													lc + mc > Jd && (lc = Math.max(Jd - mc, 0));
													var kg = 0 === Y.Ya;
													Y.Ya += lc;
													Jd = Math.max(Jd - (lc + (kg ? mc : 0)), 0)
												}
												1 !== aa.Bi || Ob !== Pj && Ob !== po || (Y = this.ce(Fb), mc = Y.Ye(), lc = Math.max(df - Y.Ya, 0), lc + mc > $c && (lc = Math.max($c - mc, 0)), kg = 0 === Y.Ya, Y.Ya += lc, $c = Math.max($c - (lc + (kg ? mc : 0)), 0));
												li && aa.$p()
											}
										}
								}
					w.ta($e);
					for (var Dc = 0, Ab = 0, Eb = this.Jp, fa = 0; fa < Eb; fa++) {
						var mi = this.Uc[fa];
						void 0 !== mi &&
							(Dc += mi.Ra, 0 !== mi.Ra && (Dc += mi.Ye()))
					}
					Eb = this.vq;
					for (fa = 0; fa < Eb; fa++) {
						var Hg = this.Xc[fa];
						void 0 !== Hg && (Ab += Hg.Ra, 0 !== Hg.Ra && (Ab += Hg.Ye()))
					}
					for (var $c = Math.max(gi - Dc, 0), uj = Jd = Math.max(hi - Ab, 0), op = $c, Eb = af.length, fa = 0; fa < Eb; fa++) {
						var aa = af[fa],
							mb = this.de(aa.Ub),
							nb = this.ce(aa.column),
							Ig = aa.za,
							xc = aa.margin,
							Kf = xc.right + xc.left,
							jg = xc.top + xc.bottom;
						ue[aa.column] = 0 === nb.Ya && void 0 !== ue[aa.column] ? Math.max(Ig.width + Kf, ue[aa.column]) : null;
						ve[aa.Ub] = 0 === mb.Ya && void 0 !== ve[aa.Ub] ? Math.max(Ig.height + jg, ve[aa.Ub]) :
							null
					}
					var Mf = 0,
						Jg = 0,
						Kg;
					for (Kg in ve) "count" !== Kg && (Mf += ve[Kg]);
					for (Kg in ue) "count" !== Kg && (Jg += ue[Kg]);
					for (var ob = w.mm(), fa = 0; fa < Eb; fa++)
						if (aa = af[fa], aa.visible || aa === Bh) {
							var mb = this.de(aa.Ub),
								nb = this.ce(aa.column),
								Wb = 0;
							isFinite(nb.width) ? Wb = nb.width : (Wb = isFinite($c) && null !== ue[aa.column] ? 0 === Jg ? nb.Ya + $c : ue[aa.column] / Jg * op : null !== ue[aa.column] ? $c : nb.Ya || $c, Wb = Math.max(0, Wb - nb.Ye()));
							var Ec = 0;
							isFinite(mb.height) ? Ec = mb.height : (Ec = isFinite(Jd) && null !== ve[aa.Ub] ? 0 === Mf ? mb.Ya + Jd : ve[aa.Ub] / Mf * uj : null !==
								ve[aa.Ub] ? Jd : mb.Ya || Jd, Ec = Math.max(0, Ec - mb.Ye()));
							ob.m(Math.max(nb.Bh, Math.min(Wb, nb.ie)), Math.max(mb.Bh, Math.min(Ec, mb.ie)));
							Ob = To(aa, mb, nb, !1);
							switch (Ob) {
								case qo:
									ob.height = Math.max(ob.height, mb.Ya + Jd);
									break;
								case po:
									ob.width = Math.max(ob.width, nb.Ya + $c)
							}
							xc = aa.margin;
							Kf = xc.right + xc.left;
							jg = xc.top + xc.bottom;
							aa.$p();
							yk(aa, ob.width, ob.height, nb.Bh, mb.Bh);
							Lf = aa.za;
							df = Math.max(Lf.width + Kf, 0);
							ef = Math.max(Lf.height + jg, 0);
							isFinite($c) && (df = Math.min(df, ob.width));
							isFinite(Jd) && (ef = Math.min(ef, ob.height));
							var ff =
								0,
								ff = mb.Ya;
							mb.Ya = Math.max(mb.Ya, ef);
							lc = mb.Ya - ff;
							Jd = Math.max(Jd - lc, 0);
							ff = nb.Ya;
							nb.Ya = Math.max(nb.Ya, df);
							lc = nb.Ya - ff;
							$c = Math.max($c - lc, 0)
						}
					w.ta(af);
					var Kd = w.mm(),
						Eb = Ke.length;
					if (0 !== Eb)
						for (var wd = w.cb(), gf = w.cb(), fa = 0; fa < kd; fa++)
							if (Tb[fa])
								for (ig = Tb[fa].length, mb = this.de(fa), wd[fa] = mb.Ya, Fb = 0; Fb < ig; Fb++) Tb[fa][Fb] && (nb = this.ce(Fb), gf[Fb] = nb.Ya);
					for (fa = 0; fa < Eb; fa++)
						if (aa = Ke[fa], aa.visible || aa === Bh) {
							mb = this.de(aa.Ub);
							nb = this.ce(aa.column);
							ob.m(Math.max(nb.Bh, Math.min(gi, nb.ie)), Math.max(mb.Bh, Math.min(hi,
								mb.ie)));
							Ob = To(aa, mb, nb, !1);
							switch (Ob) {
								case Fe:
									0 !== gf[nb.index] && (ob.width = Math.min(ob.width, gf[nb.index]));
									0 !== wd[mb.index] && (ob.height = Math.min(ob.height, wd[mb.index]));
									break;
								case qo:
									0 !== gf[nb.index] && (ob.width = Math.min(ob.width, gf[nb.index]));
									break;
								case po:
									0 !== wd[mb.index] && (ob.height = Math.min(ob.height, wd[mb.index]))
							}
							isFinite(nb.width) && (ob.width = nb.width);
							isFinite(mb.height) && (ob.height = mb.height);
							Kd.m(0, 0);
							for (var cb = 1; cb < aa.dj && !(aa.Ub + cb >= this.vq); cb++) Y = this.de(aa.Ub + cb), lc = Ob === Fe || Ob ===
								po ? Math.max(Y.Bh, 0 === wd[aa.Ub + cb] ? Y.ie : Math.min(wd[aa.Ub + cb], Y.ie)) : Math.max(Y.Bh, isNaN(Y.mf) ? Y.ie : Math.min(Y.mf, Y.ie)), Kd.height += lc;
							for (cb = 1; cb < aa.Bi && !(aa.column + cb >= this.Jp); cb++) Y = this.ce(aa.column + cb), lc = Ob === Fe || Ob === qo ? Math.max(Y.Bh, 0 === gf[aa.column + cb] ? Y.ie : Math.min(gf[aa.column + cb], Y.ie)) : Math.max(Y.Bh, isNaN(Y.mf) ? Y.ie : Math.min(Y.mf, Y.ie)), Kd.width += lc;
							ob.width += Kd.width;
							ob.height += Kd.height;
							xc = aa.margin;
							Kf = xc.right + xc.left;
							jg = xc.top + xc.bottom;
							yk(aa, ob.width, ob.height, sj, tj);
							for (var Lf =
									aa.za, df = Math.max(Lf.width + Kf, 0), ef = Math.max(Lf.height + jg, 0), hf = 0, cb = 0; cb < aa.dj && !(aa.Ub + cb >= this.vq); cb++) Y = this.de(aa.Ub + cb), hf += Y.total || 0;
							if (hf < ef) {
								var ld = ef - hf,
									Lg = ef - hf;
								if (null !== aa.wy)
									for (var jf = aa.wy, cb = 0; cb < aa.dj && !(0 >= ld) && !(aa.Ub + cb >= this.vq); cb++) {
										var Y = this.de(aa.Ub + cb),
											Fc = Y.Ra || 0,
											ni = jf(aa, Y, Lg);
										Y.Ya = Math.min(Y.ie, Fc + ni);
										Y.Ra !== Fc && (ld -= Y.Ra - Fc)
									}
								for (; 0 < ld;) {
									Fc = Y.Ra || 0;
									isNaN(Y.height) && Y.ie > Fc && (Y.Ya = Math.min(Y.ie, Fc + ld), Y.Ra !== Fc && (ld -= Y.Ra - Fc));
									if (0 === Y.index) break;
									Y = this.de(Y.index -
										1)
								}
							}
							for (var Le = 0, cb = 0; cb < aa.Bi && !(aa.column + cb >= this.Jp); cb++) Y = this.ce(aa.column + cb), Le += Y.total || 0;
							if (Le < df) {
								ld = df - Le;
								Lg = df - Le;
								if (null !== aa.wy)
									for (jf = aa.wy, cb = 0; cb < aa.Bi && !(0 >= ld) && !(aa.column + cb >= this.Jp); cb++) Y = this.ce(aa.column + cb), Fc = Y.Ra || 0, ni = jf(aa, Y, Lg), Y.Ya = Math.min(Y.ie, Fc + ni), Y.Ra !== Fc && (ld -= Y.Ra - Fc);
								for (; 0 < ld;) {
									Fc = Y.Ra || 0;
									isNaN(Y.width) && Y.ie > Fc && (Y.Ya = Math.min(Y.ie, Fc + ld), Y.Ra !== Fc && (ld -= Y.Ra - Fc));
									if (0 === Y.index) break;
									Y = this.ce(Y.index - 1)
								}
							}
						}
					w.ta(Ke);
					w.Hk(Kd);
					w.Hk(ob);
					void 0 !== wd && w.ta(wd);
					void 0 !== gf && w.ta(gf);
					for (var Mg = 0, Ng = 0, Ob = Eo(this, !0), vj = this.Ca, Jk = this.Gf, we = Ab = Dc = 0, ad = 0, Eb = this.Jp, fa = 0; fa < Eb; fa++) void 0 !== this.Uc[fa] && (Y = this.ce(fa), isFinite(Y.width) ? (we += Y.width, we += Y.Ye()) : Op(Y) === Pp ? (we += Y.Ra, we += Y.Ye()) : 0 !== Y.Ra && (Dc += Y.Ra, Dc += Y.Ye()));
					var Mg = isFinite(vj.width) ? Math.min(vj.width, Jk.width) : Ob !== Pj && isFinite(gi) ? gi : Dc,
						Mg = Math.max(Mg, this.qi.width),
						Mg = Math.max(Mg - we, 0),
						Kk = Math.max(Mg / Dc, 1);
					isFinite(Kk) || (Kk = 1);
					for (fa = 0; fa < Eb; fa++) void 0 !== this.Uc[fa] && (Y = this.ce(fa), isFinite(Y.width) ||
						Op(Y) === Pp || (Y.Ya = Y.Ra * Kk), Y.position = e.width, 0 !== Y.Ra && (e.width += Y.Ra, e.width += Y.Ye()));
					Eb = this.vq;
					for (fa = 0; fa < Eb; fa++) void 0 !== this.Xc[fa] && (Y = this.de(fa), isFinite(Y.height) ? (ad += Y.height, ad += Y.Ye()) : Op(Y) === Pp ? (ad += Y.Ra, ad += Y.Ye()) : 0 !== Y.Ra && (Ab += Y.Ra, 0 !== Y.Ra && (Ab += Y.Ye())));
					var Ng = isFinite(vj.height) ? Math.min(vj.height, Jk.height) : Ob !== Pj && isFinite(hi) ? hi : Ab,
						Ng = Math.max(Ng, this.qi.height),
						Ng = Math.max(Ng - ad, 0),
						Ch = Math.max(Ng / Ab, 1);
					isFinite(Ch) || (Ch = 1);
					for (fa = 0; fa < Eb; fa++) void 0 !== this.Xc[fa] &&
						(Y = this.de(fa), isFinite(Y.height) || Op(Y) === Pp || (Y.Ya = Y.Ra * Ch), Y.position = e.height, 0 !== Y.Ra && (e.height += Y.Ra, 0 !== Y.Ra && (e.height += Y.Ye())));
					Eb = yh.length;
					for (fa = 0; fa < Eb; fa++) {
						var md = yh[fa];
						md.type === Jo ? (Wb = e.width, Y = this.de(md.Ub), Ec = Y.Ya) : (Y = this.ce(md.column), Wb = Y.Ya, Ec = e.height);
						md.ud.m(0, 0, Wb, Ec);
						cm(md, !1);
						Tb[md.Ub] || (Tb[md.Ub] = []);
						Tb[md.Ub][md.column] || (Tb[md.Ub][md.column] = []);
						Tb[md.Ub][md.column].push(md)
					}
					w.ta(yh);
					this.$s = Tb;
					break;
				case "Viewbox":
					var wj = a,
						jm = b,
						mt = c,
						nt = d;
					1 < m.length && w.k("Viewbox Panel cannot contain more than one GraphObject.");
					var kf = m[0];
					kf.vb = 1;
					kf.$p();
					yk(kf, Infinity, Infinity, mt, nt);
					var Lk = kf.za,
						km = kf.margin,
						ot = km.right + km.left,
						pt = km.top + km.bottom;
					if (isFinite(wj) || isFinite(jm)) {
						var cw = kf.scale,
							lm = Lk.width,
							mm = Lk.height,
							qt = Math.max(wj - ot, 0),
							rt = Math.max(jm - pt, 0),
							Mk = 1;
						this.Ap === Rj ? 0 !== lm && 0 !== mm && (Mk = Math.min(qt / lm, rt / mm)) : 0 !== lm && 0 !== mm && (Mk = Math.max(qt / lm, rt / mm));
						0 === Mk && (Mk = 1E-4);
						kf.vb *= Mk;
						cw !== kf.scale && (cm(kf, !0), yk(kf, Infinity, Infinity, mt, nt))
					}
					Lk = kf.za;
					e.width = isFinite(wj) ? wj : Math.max(Lk.width + ot, 0);
					e.height = isFinite(jm) ?
						jm : Math.max(Lk.height + pt, 0);
					break;
				case "Link":
					var st = m.length;
					if (this instanceof kh || this instanceof W) {
						var pi = null;
						this instanceof W && (pi = this);
						this instanceof kh && (pi = this.zf);
						if (pi instanceof W) {
							var Nk = pi;
							if (0 === st) {
								var nm = this.Ja;
								Ua(nm, 0, 0);
								var xe = this.za;
								xe.m(0, 0, 0, 0)
							} else {
								var om = this instanceof kh ? null : pi.path,
									Og = pi.Vn,
									lf = this.ij;
								lf.assign(Og);
								lf.x = 0;
								lf.y = 0;
								var Dh = Nk.points,
									qi = pi.qa;
								this.Bu(!1);
								var tt = Og.width,
									ut = Og.height;
								this.Ui.m(Og.x, Og.y);
								null === this.Zg && (this.Zg = new H(B));
								this.Zg.clear();
								null !== om && (Qp(om, tt, ut, this), xe = om.za, lf.Ih(xe), this.Zg.add(xe));
								for (var Pg = w.Wg(), Ok = w.K(), Qg = w.K(), pp = 0; pp < st; pp++) {
									var Ub = m[pp];
									if (Ub !== om)
										if (Ub.ef && Ub instanceof X) Qp(Ub, tt, ut, this), xe = Ub.za, lf.Ih(xe), this.Zg.add(xe);
										else if (2 > qi) yk(Ub, Infinity, Infinity), xe = Ub.za, lf.Ih(xe), this.Zg.add(xe);
									else {
										var xd = Ub.Oe,
											wt = Ub.tB,
											qp = Ub.oh;
										qp.Td() && (qp = Jb);
										var lg = Ub.wq,
											dw = Ub.uB,
											Pk = 0,
											Qk = 0,
											pm = 0;
										if (xd < -qi || xd >= qi) {
											var xt = Nk.PF,
												Nf = Nk.OF;
											lg !== lj && (pm = Nk.computeAngle(Ub, lg, Nf), Ub.mg = pm);
											Pk = xt.x - Og.x;
											Qk = xt.y - Og.y
										} else {
											var Ld,
												mf;
											if (0 <= xd) Ld = Dh.ea(xd), mf = xd < qi - 1 ? Dh.ea(xd + 1) : Ld;
											else {
												var ri = qi + xd;
												Ld = Dh.ea(ri);
												mf = 0 < ri ? Dh.ea(ri - 1) : Ld
											}
											if (Ld.Oc(mf)) {
												var si, ti;
												0 <= xd ? (si = 0 < xd ? Dh.ea(xd - 1) : Ld, ti = xd < qi - 2 ? Dh.ea(xd + 2) : mf) : (si = ri < qi - 1 ? Dh.ea(ri + 1) : Ld, ti = 1 < ri ? Dh.ea(ri - 2) : mf);
												var yt = si.Bf(Ld),
													zt = mf.Bf(ti),
													Nf = yt > zt + 10 ? 0 <= xd ? si.Pb(Ld) : Ld.Pb(si) : zt > yt + 10 ? 0 <= xd ? mf.Pb(ti) : ti.Pb(mf) : 0 <= xd ? si.Pb(ti) : ti.Pb(si)
											} else Nf = 0 <= xd ? Ld.Pb(mf) : mf.Pb(Ld);
											lg !== lj && (pm = Nk.computeAngle(Ub, lg, Nf), Ub.mg = pm);
											Pk = Ld.x + (mf.x - Ld.x) * wt - Og.x;
											Qk = Ld.y + (mf.y - Ld.y) * wt - Og.y
										}
										yk(Ub,
											Infinity, Infinity);
										var xe = Ub.za,
											nm = Ub.Ja,
											Rk = 0;
										Ub instanceof X && (Rk = Ub.mb);
										var ui = nm.width + Rk,
											xj = nm.height + Rk;
										Pg.reset();
										Pg.translate(-xe.x, -xe.y);
										Pg.scale(Ub.scale, Ub.scale);
										Pg.rotate(lg === lj ? Ub.angle : Nf, ui / 2, xj / 2);
										lg !== Rp && lg !== Sp || Pg.rotate(90, ui / 2, xj / 2);
										lg !== Tp && lg !== Up || Pg.rotate(-90, ui / 2, xj / 2);
										lg === Vp && (45 < Nf && 135 > Nf || 225 < Nf && 315 > Nf) && Pg.rotate(-Nf, ui / 2, xj / 2);
										var yj = new B(0, 0, ui, xj);
										Ok.Wn(yj, qp);
										Pg.nb(Ok);
										var ew = -Ok.x + Rk / 2 * Ub.scale,
											fw = -Ok.y + Rk / 2 * Ub.scale;
										Qg.assign(dw);
										isNaN(Qg.x) && (Qg.x = 0 <= xd ?
											ui / 2 + 3 : -(ui / 2 + 3));
										isNaN(Qg.y) && (Qg.y = -(xj / 2 + 3));
										Qg.rotate(Nf);
										Pk += Qg.x;
										Qk += Qg.y;
										yj.set(xe);
										yj.x = Pk + ew;
										yj.y = Qk + fw;
										this.Zg.add(yj);
										lf.Ih(yj)
									}
								}
								if (this instanceof W)
									for (var At = this.Ef; At.next();) yk(At.value, Infinity, Infinity);
								this.ij = lf;
								var rp = this.Ui;
								rp.m(rp.x + lf.x, rp.y + lf.y);
								Ua(e, lf.width || 0, lf.height || 0);
								w.af(Pg);
								w.v(Ok);
								w.v(Qg)
							}
						}
					}
					break;
				case "Grid":
					break;
				case "Graduated":
					var gw = a,
						hw = b,
						iw = c,
						jw = d,
						Rg = this.Ad();
					this.Bm = [];
					var zj = Rg.margin,
						kw = zj.right + zj.left,
						lw = zj.top + zj.bottom;
					yk(Rg, gw, hw, iw, jw);
					var Bt =
						Rg.za,
						mw = Bt.height,
						nw = Math.max(Bt.width + kw, 0),
						ow = Math.max(mw + lw, 0),
						Ct = new B(-zj.left, -zj.top, nw, ow);
					this.Bm.push(Ct);
					e.assign(Ct);
					for (var Wk = Rg.nf, Dt = Rg.mb, sp = Wk.Cx, Aj = Wk.Zt, vi = Wk.$t, pw = sp.length, tp = 0, up = 0, Bj = w.cb(), vp = 0; vp < pw; vp++) {
						for (var wp = sp[vp], Et = [], up = tp = 0, qw = wp.length, Cj = 0; Cj < qw; Cj += 2) {
							var Ft = wp[Cj],
								Gt = wp[Cj + 1];
							if (0 !== Cj) {
								var yd = 180 * Math.atan2(Gt - up, Ft - tp) / Math.PI;
								0 > yd && (yd += 360);
								Et.push(yd)
							}
							tp = Ft;
							up = Gt
						}
						Bj.push(Et)
					}
					var Ht;
					if (null === this.Xj) {
						for (var It = [], xp = this.xa.n, Jt = xp.length, yp = 0; yp <
							Jt; yp++) {
							var Xk = xp[yp],
								Kt = [];
							It.push(Kt);
							if (Xk.visible)
								for (var rw = Xk.interval, zp = 0; zp < Jt; zp++) {
									var Yk = xp[zp];
									if (Yk.visible && Xk !== Yk && !(Xk instanceof X && !(Yk instanceof X) || Xk instanceof Lh && !(Yk instanceof Lh))) {
										var Lt = Yk.interval;
										Lt > rw && Kt.push(Lt)
									}
								}
						}
						this.Xj = It
					}
					Ht = this.Xj;
					var Mt = this.xa.n,
						sw = Mt.length,
						Eh = 0,
						Nt = 0,
						Ot = vi;
					this.Dm = [];
					for (var rm = [], sm = 0; sm < sw; sm++) {
						var Fh = Mt[sm],
							rm = [];
						if (Fh.visible && Fh !== Rg) {
							var Pt = Fh.interval,
								Qt = this.FA;
							if (!(2 > Qt * Pt * vi / this.hu)) {
								var ce = this.oF,
									Rt = Ht[sm],
									wi = Aj[0][0],
									Of =
									0,
									zd = 0,
									Nt = vi * Fh.nF - 1E-4,
									Ot = vi * Fh.lF + 1E-4,
									Dj = Qt * Pt;
								if (ce < this.Jk) var xi = (this.Jk - ce) / Dj,
									xi = 0 === xi % 1 ? xi : Math.floor(xi + 1),
									ce = ce + xi * Dj;
								else ce > this.Jk + Dj && (xi = Math.floor((ce - this.Jk) / Dj), ce -= xi * Dj);
								for (; ce <= this.EA;) {
									var Ap;
									a: {
										for (var tw = Rt.length, Bp = 0; Bp < tw; Bp++)
											if (Wa((ce - this.oF) % (Rt[Bp] * this.FA), 0)) {
												Ap = !1;
												break a
											}
										Ap = !0
									}
									if (Ap && (Eh = (ce - this.Jk) * vi / this.hu, Eh > vi && (Eh = vi), Nt <= Eh && Eh <= Ot)) {
										for (var yd = Bj[Of][zd], Ej = Aj[Of][zd]; Of < Aj.length;) {
											for (; Eh > wi && zd < Aj[Of].length - 1;) zd++, yd = Bj[Of][zd], Ej = Aj[Of][zd],
												wi += Ej;
											if (Eh <= wi) break;
											Of++;
											zd = 0;
											yd = Bj[Of][zd];
											Ej = Aj[Of][zd];
											wi += Ej
										}
										var Md = sp[Of],
											St = Md[2 * zd],
											Tt = Md[2 * zd + 1],
											tm = (Eh - (wi - Ej)) / Ej,
											Cp = new y(St + (Md[2 * zd + 2] - St) * tm + Dt / 2 - Wk.gb.x, Tt + (Md[2 * zd + 3] - Tt) * tm + Dt / 2 - Wk.gb.y);
										Cp.scale(Rg.scale, Rg.scale);
										var mg = yd,
											Fj = Bj[Of];
										1E-4 > tm ? 0 < zd ? mg = Fj[zd - 1] : Wa(Md[0], Md[Md.length - 2]) && Wa(Md[1], Md[Md.length - 1]) && (mg = Fj[Fj.length - 1]) : .9999 < tm && (zd + 1 < Fj.length ? mg = Fj[zd + 1] : Wa(Md[0], Md[Md.length - 2]) && Wa(Md[1], Md[Md.length - 1]) && (mg = Fj[0]));
										yd !== mg && (180 < Math.abs(yd - mg) && (yd < mg ? yd +=
											360 : mg += 360), yd = (yd + mg) / 2 % 360);
										if (Fh instanceof Lh) {
											var Dp = "",
												Dp = null !== Fh.mF ? Fh.mF(ce) : (+ce.toFixed(2)).toString();
											"" !== Dp && rm.push([Cp, yd, Dp])
										} else rm.push([Cp, yd])
									}
									ce += Dj
								}
							}
						}
						this.Dm.push(rm)
					}
					w.ta(Bj);
					for (var uw = this.Dm, vw = m.length, um = 0; um < vw; um++) {
						var yi = m[um],
							Ep = uw[um];
						if (yi.visible && yi !== Rg && 0 !== Ep.length) {
							if (yi instanceof X) {
								var Gh = yi,
									Ut = Ep,
									ww = e,
									Fp = Gh.oh;
								Fp.Td() && (Fp = Bb);
								var xw = Gh.angle;
								Gh.mg = 0;
								yk(Gh, Infinity, Infinity);
								Gh.mg = xw;
								var Vt = Gh.za,
									Gp = Vt.width,
									Hp = Vt.height,
									Wt = w.lg(0, 0, Gp, Hp),
									de = w.K();
								de.Wn(Wt, Fp);
								w.Eb(Wt);
								for (var vm = -de.x, wm = -de.y, zi = new B, yw = Ut.length, xm = 0; xm < yw; xm++)
									for (var Ip = Ut[xm], Xt = Ip[0].x, Yt = Ip[0].y, Zt = Ip[1], ym = 0; 4 > ym; ym++) {
										switch (ym) {
											case 0:
												de.m(vm, wm);
												break;
											case 1:
												de.m(vm + Gp, wm);
												break;
											case 2:
												de.m(vm, wm + Hp);
												break;
											case 3:
												de.m(vm + Gp, wm + Hp)
										}
										de.rotate(Zt + Gh.angle);
										de.offset(Xt, Yt);
										0 === xm && 0 === ym ? zi.m(de.x, de.y, 0, 0) : zi.vi(de);
										de.offset(-Xt, -Yt);
										de.rotate(-Zt - Gh.angle)
									}
								w.v(de);
								this.Bm.push(zi);
								ab(ww, zi.x, zi.y, zi.width, zi.height)
							} else if (yi instanceof Lh) {
								var zm = yi,
									$t = Ep,
									zw =
									e;
								null === this.qk && (this.qk = new Lh);
								var Pf = this.qk;
								kp(zm, Pf);
								var Jp = zm.oh;
								Jp.Td() && (Jp = Bb);
								for (var Hh = zm.wq, Aw = zm.uB, Ai = null, Am = 0, Bm = 0, Sg = 0, Kp = 0, Bw = $t.length, Cm = 0; Cm < Bw; Cm++) {
									var ng = $t[Cm],
										Am = ng[0].x,
										Bm = ng[0].y,
										Sg = ng[1];
									Hh !== lj && (Kp = W.computeAngle(Hh, Sg), Pf.mg = Kp);
									Pf.text = ng[2];
									yk(Pf, Infinity, Infinity);
									var Ih = Pf.za,
										Gj = Pf.Ja,
										Hj = Gj.width,
										Ij = Gj.height,
										Tg = w.Wg();
									Tg.reset();
									Tg.translate(-Ih.x, -Ih.y);
									Tg.scale(Pf.scale, Pf.scale);
									Tg.rotate(Hh === lj ? Pf.angle : Sg, Hj / 2, Ij / 2);
									Hh !== Rp && Hh !== Sp || Tg.rotate(90, Hj / 2,
										Ij / 2);
									Hh !== Tp && Hh !== Up || Tg.rotate(-90, Hj / 2, Ij / 2);
									Hh === Vp && (45 < Sg && 135 > Sg || 225 < Sg && 315 > Sg) && Tg.rotate(-Sg, Hj / 2, Ij / 2);
									var au = w.lg(0, 0, Hj, Ij),
										Zk = w.K();
									Zk.Wn(au, Jp);
									Tg.nb(Zk);
									var Cw = -Zk.x,
										Dw = -Zk.y,
										Ug = w.K();
									Ug.assign(Aw);
									isNaN(Ug.x) && (Ug.x = Hj / 2 + 3);
									isNaN(Ug.y) && (Ug.y = -(Ij / 2 + 3));
									Ug.rotate(Sg);
									var Am = Am + (Ug.x + Cw),
										Bm = Bm + (Ug.y + Dw),
										Lp = new B(Am, Bm, Ih.width, Ih.height),
										Ew = new B(Ih.x, Ih.y, Ih.width, Ih.height),
										Fw = new B(Gj.x, Gj.y, Gj.width, Gj.height),
										bu = new Wp;
									bu.Kp(Pf.xf);
									ng.push(Kp);
									ng.push(Pf.me);
									ng.push(bu);
									ng.push(Lp);
									ng.push(Ew);
									ng.push(Fw);
									0 === Cm ? Ai = Lp.copy() : Ai.Ih(Lp);
									w.v(Ug);
									w.v(Zk);
									w.Eb(au);
									w.af(Tg)
								}
								this.Bm.push(Ai);
								ab(zw, Ai.x, Ai.y, Ai.width, Ai.height)
							}
							cm(yi, !1)
						}
					}
					break;
				case "TableRow":
				case "TableColumn":
					w.k(this.toString() + " is not an element of a Table Panel. TableRow and TableColumn Panels can only be elements of a Table Panel.");
					break;
				default:
					w.k("Unknown panel type: " + n)
			}
		}
		var nf = e.width,
			of = e.height,
			Dm = this.padding,
			Gw = Dm.top + Dm.bottom,
			nf = nf + (Dm.left + Dm.right),
			of = of +Gw;
		isFinite(f.width) && (nf = f.width);
		isFinite(f.height) &&
			( of = f.height);
		nf = Math.min(k.width, nf); of = Math.min(k.height, of );
		nf = Math.max(h.width, nf); of = Math.max(h.height, of );
		nf = Math.max(c, nf); of = Math.max(d, of );
		e.width = nf;
		e.height = of ;
		Ua(this.Wc, nf, of );
		Bo(this, 0, 0, nf, of )
	};
	C.prototype.findMainElement = C.prototype.Ad = function() {
		if (null === this.Bl) {
			var a = this.xa.n,
				b = a.length;
			if (0 === b) return null;
			for (var c = 0; c < b; c++) {
				var d = a[c];
				if (!0 === d.ef) return this.Bl = d
			}
			this.Bl = a[0]
		}
		return this.Bl
	};

	function np(a) {
		return null !== a.U ? a.U.bg : null
	}
	C.prototype.mj = function(a, b, c, d) {
		var e = this.ij,
			f = this.xa.n,
			h = w.lg(0, 0, 0, 0);
		if (0 === f.length) {
			var k = this.Y;
			k.x = a;
			k.y = b;
			k.width = c;
			k.height = d
		} else {
			if (!this.Ca.I()) {
				var l = Eo(this, !0),
					m = this.ud,
					n = m.width,
					p = m.height,
					q = this.margin,
					r = q.left + q.right,
					s = q.top + q.bottom;
				n === c && p === d && (l = Pj);
				switch (l) {
					case Pj:
						if (n > c || p > d) this.H(), yk(this, n > c ? c : n, p > d ? d : p);
						break;
					case Fe:
						this.H(!0);
						yk(this, c + r, d + s, 0, 0);
						break;
					case qo:
						this.H(!0);
						yk(this, c + r, p + s, 0, 0);
						break;
					case po:
						this.H(!0), yk(this, n + r, d + s, 0, 0)
				}
			}
			k = this.Y;
			k.x = a;
			k.y = b;
			k.width = c;
			k.height = d;
			var u = this.na.Rb;
			switch (u) {
				case "Position":
					for (var t = f.length, x = e.x - this.padding.left, v = e.y - this.padding.top, z = 0; z < t; z++) {
						var A = f[z],
							L = A.za,
							E = A.margin,
							P = A.position.x,
							$ = A.position.y;
						h.x = isNaN(P) ? -x : P - x;
						h.y = isNaN($) ? -v : $ - v;
						if (A instanceof X) {
							var S = A;
							if (S.AF) {
								var ba = S.mb / 2;
								h.x -= ba;
								h.y -= ba
							}
						}
						h.x += E.left;
						h.y += E.top;
						h.width = L.width;
						h.height = L.height;
						A.visible && A.jc(h.x, h.y, h.width, h.height)
					}
					break;
				case "Vertical":
					for (var ha = f.length, ya = this.padding.left, Ga = this.FF, eb = Ga ? e.height : this.padding.top,
							wa = 0; wa < ha; wa++) {
						var U = ya,
							sb = f[wa];
						if (sb.visible) {
							var Kb = sb.za,
								Oa = sb.margin,
								Lc = Oa.left + Oa.right,
								Ma = ya + this.padding.right,
								dg = Kb.width,
								eg = Eo(sb, !1);
							if (isNaN(sb.Ca.width) && eg === Fe || eg === qo) dg = Math.max(e.width - Lc - Ma, 0);
							var sd = dg + Lc + Ma,
								td = sb.alignment;
							td.Zc() && (td = this.Sl);
							td.$c() || (td = Jb);
							Ga && (eb -= Kb.height + Oa.bottom + Oa.top);
							sb.jc(U + td.offsetX + Oa.left + (e.width * td.x - sd * td.x), eb + td.offsetY + Oa.top, dg, Kb.height);
							Ga || (eb += Kb.height + Oa.bottom + Oa.top)
						}
					}
					break;
				case "Horizontal":
					for (var Mc = f.length, qh = this.padding.top,
							Xe = this.FF, fb = Xe ? e.width : this.padding.left, pb = 0; pb < Mc; pb++) {
						var na = qh,
							ja = f[pb];
						if (ja.visible) {
							var Za = ja.za,
								Ia = ja.margin,
								kb = Ia.top + Ia.bottom,
								Hd = qh + this.padding.bottom,
								Gf = Za.height,
								qe = Eo(ja, !1);
							if (isNaN(ja.Ca.height) && qe === Fe || qe === po) Gf = Math.max(e.height - kb - Hd, 0);
							var Yd = Gf + kb + Hd,
								gd = ja.alignment;
							gd.Zc() && (gd = this.Sl);
							gd.$c() || (gd = Jb);
							Xe && (fb -= Za.width + Ia.left + Ia.right);
							ja.jc(fb + gd.offsetX + Ia.left, na + gd.offsetY + Ia.top + (e.height * gd.y - Yd * gd.y), Za.width, Gf);
							Xe || (fb += Za.width + Ia.left + Ia.right)
						}
					}
					break;
				case "Spot":
					var rh =
						f.length,
						Hf = this.Ad(),
						Dg = Hf.za,
						Cb = Dg.width,
						Ac = Dg.height,
						Zd = this.padding,
						sh = Zd.left,
						qb = Zd.top;
					h.x = sh - e.x;
					h.y = qb - e.y;
					Hf.jc(h.x, h.y, Cb, Ac);
					for (var Ja = 0; Ja < rh; Ja++) {
						var Lb = f[Ja];
						if (Lb !== Hf) {
							var If = Lb.za,
								Eg = If.width,
								th = If.height,
								gb = Lb.alignment;
							gb.Zc() && (gb = this.Sl);
							gb.$c() || (gb = Jb);
							var tc = Lb.oh;
							tc.Zc() && (tc = Jb);
							var Vb = null;
							Lb instanceof C && "" !== Lb.Lj && (Vb = Lb.Bd(Lb.Lj), Vb === Lb && (Vb = null));
							if (null !== Vb) {
								for (var re = Vb.Ja, uc = w.xb(tc.x * re.width + tc.offsetX, tc.y * re.height + tc.offsetY); Vb !== Lb;) Vb.transform.nb(uc),
									Vb = Vb.Q;
								h.x = gb.x * Cb + gb.offsetX - uc.x;
								h.y = gb.y * Ac + gb.offsetY - uc.y;
								w.v(uc)
							} else h.x = gb.x * Cb + gb.offsetX - (tc.x * Eg - tc.offsetX), h.y = gb.y * Ac + gb.offsetY - (tc.y * th - tc.offsetY);
							h.x -= e.x;
							h.y -= e.y;
							Lb.visible && Lb.jc(sh + h.x, qb + h.y, Eg, th)
						}
					}
					break;
				case "Auto":
					var vc = f.length,
						rb = this.Ad(),
						kc = rb.za,
						tb = w.Kf();
					tb.m(0, 0, 1, 1);
					var Bc = rb.margin,
						bb = Bc.left,
						Qa = Bc.top,
						Hb = this.padding,
						ud = Hb.left,
						fg = Hb.top;
					h.x = bb;
					h.y = Qa;
					h.width = kc.width;
					h.height = kc.height;
					rb.jc(ud + h.x, fg + h.y, h.width, h.height);
					var Ye = Mp(rb),
						gg = Np(rb),
						rj = 0 + Ye.y * kc.height +
						Ye.offsetY,
						Mb = 0 + gg.x * kc.width + gg.offsetX,
						Cc = 0 + gg.y * kc.height + gg.offsetY;
					tb.x = 0 + Ye.x * kc.width + Ye.offsetX;
					tb.y = rj;
					ab(tb, Mb, Cc, 0, 0);
					tb.x += bb + ud;
					tb.y += Qa + fg;
					for (var wc = 0; wc < vc; wc++) {
						var hd = f[wc];
						if (hd !== rb) {
							var lb = hd.za,
								Bc = hd.margin,
								Nb = Math.max(lb.width + Bc.right + Bc.left, 0),
								se = Math.max(lb.height + Bc.top + Bc.bottom, 0),
								ub = hd.alignment;
							ub.Zc() && (ub = this.Sl);
							ub.$c() || (ub = Jb);
							h.x = tb.width * ub.x + ub.offsetX - Nb * ub.x + Bc.left + tb.x;
							h.y = tb.height * ub.y + ub.offsetY - se * ub.y + Bc.top + tb.y;
							h.width = tb.width;
							h.height = tb.height;
							hd.visible && (db(tb.x, tb.y, tb.width, tb.height, h.x, h.y, lb.width, lb.height) ? hd.jc(h.x, h.y, lb.width, lb.height) : hd.jc(h.x, h.y, lb.width, lb.height, new B(tb.x, tb.y, tb.width, tb.height)))
						}
					}
					w.Eb(tb);
					break;
				case "Table":
					for (var $d = f.length, uh = this.padding, vh = uh.left, Fg = uh.top, id = this.$s, Id = 0, cc = 0, vb = id.length, vd = 0, jb = 0; jb < vb; jb++) id[jb] && (vd = Math.max(vd, id[jb].length));
					for (var dc = Math.min(this.hj, vb - 1); dc !== vb && (void 0 === this.Xc[dc] || 0 === this.Xc[dc].Ra);) dc++;
					for (var dc = Math.min(dc, vb - 1), fi = -this.Xc[dc].jb, Yc =
							Math.min(this.Ri, vd - 1); Yc !== vd && (void 0 === this.Uc[Yc] || 0 === this.Uc[Yc].Ra);) Yc++;
					for (var Yc = Math.min(Yc, vd - 1), Db = -this.Uc[Yc].jb, te = w.mm(), jb = 0; jb < vb; jb++)
						if (id[jb]) {
							var vd = id[jb].length,
								Ze = this.de(jb),
								cc = Ze.jb + fi + Fg;
							0 !== Ze.Ra && (cc += Ze.JE());
							for (var Zc = 0; Zc < vd; Zc++)
								if (id[jb][Zc]) {
									var Jf = this.ce(Zc),
										Id = Jf.jb + Db + vh;
									0 !== Jf.Ra && (Id += Jf.JE());
									for (var Gg = id[jb][Zc], wh = Gg.length, Gk = 0; Gk < wh; Gk++) {
										var wb = Gg[Gk],
											ae = wb.za,
											jd = wb instanceof C ? wb : null;
										if (null === jd || jd.type !== Jo && jd.type !== Ko) {
											te.m(0, 0);
											for (var Je =
													1; Je < wb.rowSpan && !(jb + Je >= this.vq); Je++) {
												var gi = this.de(jb + Je);
												te.height += gi.total
											}
											for (Je = 1; Je < wb.yH && !(Zc + Je >= this.Jp); Je++) {
												var hi = this.ce(Zc + Je);
												te.width += hi.total
											}
											var sj = Jf.Ra + te.width,
												tj = Ze.Ra + te.height;
											h.x = Id;
											h.y = cc;
											h.width = sj;
											h.height = tj;
											var Eb = Id,
												xh = cc,
												yh = sj,
												fa = tj;
											Id + sj > e.width && (yh = Math.max(e.width - Id, 0));
											cc + tj > e.height && (fa = Math.max(e.height - cc, 0));
											var aa = wb.alignment,
												be = 0,
												hg = 0,
												ii = 0,
												Fb = 0;
											if (aa.Zc()) {
												aa = this.Sl;
												aa.$c() || (aa = Jb);
												var be = aa.x,
													hg = aa.y,
													ii = aa.offsetX,
													Fb = aa.offsetY,
													ji = Jf.alignment,
													Tb = Ze.alignment;
												ji.$c() && (be = ji.x, ii = ji.offsetX);
												Tb.$c() && (hg = Tb.y, Fb = Tb.offsetY)
											} else be = aa.x, hg = aa.y, ii = aa.offsetX, Fb = aa.offsetY;
											if (isNaN(be) || isNaN(hg)) hg = be = .5, Fb = ii = 0;
											var $e = ae.width,
												Ke = ae.height,
												af = wb.margin,
												ue = af.left + af.right,
												ve = af.top + af.bottom,
												$c = To(wb, Ze, Jf, !1);
											!isNaN(wb.Ca.width) || $c !== Fe && $c !== qo || ($e = Math.max(sj - ue, 0));
											!isNaN(wb.Ca.height) || $c !== Fe && $c !== po || (Ke = Math.max(tj - ve, 0));
											var Jd = wb.Gf,
												zh = wb.qi,
												$e = Math.min(Jd.width, $e),
												Ke = Math.min(Jd.height, Ke),
												$e = Math.max(zh.width, $e),
												Ke = Math.max(zh.height,
													Ke),
												Y = Ke + ve;
											h.x += h.width * be - ($e + ue) * be + ii + af.left;
											h.y += h.height * hg - Y * hg + Fb + af.top;
											wb.visible && (db(Eb, xh, yh, fa, h.x, h.y, ae.width, ae.height) ? wb.jc(h.x, h.y, $e, Ke) : wb.jc(h.x, h.y, $e, Ke, new B(Eb, xh, yh, fa)))
										} else {
											wb.Ni();
											wb.pc.Qa();
											var kd = wb.pc,
												ig = w.lg(kd.x, kd.y, kd.width, kd.height);
											kd.x = jd.type === Jo ? vh : Id;
											kd.y = jd.type === Ko ? Fg : cc;
											kd.width = ae.width;
											kd.height = ae.height;
											wb.pc.freeze();
											Fo(wb, !1);
											if (!Va(ig, kd)) {
												var ki = wb.U;
												null !== ki && (ki.Lk(), wb.Ds(ki))
											}
											w.Eb(ig)
										}
									}
								}
						}
					w.Hk(te);
					for (jb = 0; jb < $d; jb++) wb = f[jb], jd = wb instanceof
					C ? wb : null, null === jd || jd.type !== Jo && jd.type !== Ko || (kd = wb.pc, wb.Wc.Qa(), wb.Wc.m(0, 0, kd.width, kd.height), wb.Wc.freeze());
					break;
				case "Viewbox":
					var Ah = f[0],
						lc = Ah.za,
						Bh = Ah.margin,
						mb = Bh.top + Bh.bottom,
						nb = Math.max(lc.width + (Bh.right + Bh.left), 0),
						gm = Math.max(lc.height + mb, 0),
						bf = Ah.alignment;
					bf.Zc() && (bf = this.Sl);
					bf.$c() || (bf = Jb);
					h.x = e.width * bf.x - nb * bf.x + bf.offsetX;
					h.y = e.height * bf.y - gm * bf.y + bf.offsetY;
					h.width = lc.width;
					h.height = lc.height;
					Ah.jc(h.x, h.y, h.width, h.height);
					break;
				case "Link":
					var Hk = f.length;
					if (this instanceof kh || this instanceof W) {
						var li = null;
						this instanceof W && (li = this);
						this instanceof kh && (li = this.zf);
						var xc = li,
							Kf = this instanceof kh ? null : xc.path;
						if (null !== this.Zg) {
							var jg = this.Zg.n,
								Ob = 0;
							if (null !== Kf && Ob < this.Zg.count) {
								var cf = jg[Ob];
								Ob++;
								Kf.jc(cf.x - this.ij.x, cf.y - this.ij.y, cf.width, cf.height)
							}
							for (var Ik = 0; Ik < Hk; Ik++) {
								var hm = f[Ik];
								hm !== Kf && Ob < this.Zg.count && (cf = jg[Ob], Ob++, hm.jc(cf.x - this.ij.x, cf.y - this.ij.y, cf.width, cf.height))
							}
						}
						var Lf = xc.points,
							df = Lf.count;
						if (2 <= df && this instanceof W)
							for (var ef = this.Ef; ef.next();) {
								var mc =
									ef.value,
									kg = df,
									Dc = Lf,
									Ab = mc.Oe,
									mi = mc.tB,
									Hg = mc.oh,
									uj = mc.wq,
									op = mc.uB,
									Ig = 0,
									Mf = 0,
									Jg = 0;
								if (Ab < -kg || Ab >= kg) {
									var Kg = this.PF,
										ob = this.OF;
									uj !== lj && (Jg = this.computeAngle(mc, uj, ob), mc.angle = Jg);
									Ig = Kg.x;
									Mf = Kg.y
								} else {
									var Wb = void 0,
										Ec = void 0;
									if (0 <= Ab) Wb = Dc.n[Ab], Ec = Ab < kg - 1 ? Dc.n[Ab + 1] : Wb;
									else var ff = kg + Ab,
										Wb = Dc.n[ff],
										Ec = 0 < ff ? Dc.n[ff - 1] : Wb;
									if (Wb.Oc(Ec)) {
										var Kd = void 0,
											wd = void 0;
										0 <= Ab ? (Kd = 0 < Ab ? Dc.n[Ab - 1] : Wb, wd = Ab < kg - 2 ? Dc.n[Ab + 2] : Ec) : (Kd = ff < kg - 1 ? Dc.n[ff + 1] : Wb, wd = 1 < ff ? Dc.n[ff - 2] : Ec);
										var gf = Kd.Bf(Wb),
											cb = Ec.Bf(wd),
											ob = gf >
											cb + 10 ? 0 <= Ab ? Kd.Pb(Wb) : Wb.Pb(Kd) : cb > gf + 10 ? 0 <= Ab ? Ec.Pb(wd) : wd.Pb(Ec) : 0 <= Ab ? Kd.Pb(wd) : wd.Pb(Kd)
									} else ob = 0 <= Ab ? Wb.Pb(Ec) : Ec.Pb(Wb);
									uj !== lj && (Jg = this.computeAngle(mc, uj, ob), mc.angle = Jg);
									Ig = Wb.x + (Ec.x - Wb.x) * mi;
									Mf = Wb.y + (Ec.y - Wb.y) * mi
								}
								if (Hg.L(yb)) mc.location = new y(Ig, Mf);
								else {
									Hg.Td() && (Hg = Jb);
									var hf = w.Wg();
									hf.reset();
									hf.scale(mc.scale, mc.scale);
									hf.rotate(mc.angle, 0, 0);
									var ld = mc.Ja,
										Lg = w.lg(0, 0, ld.width, ld.height),
										jf = w.K();
									jf.Wn(Lg, Hg);
									hf.nb(jf);
									var Fc = -jf.x,
										ni = -jf.y,
										Le = op.copy();
									isNaN(Le.x) && (Le.x = 0 <= Ab ? jf.x +
										3 : -(jf.x + 3));
									isNaN(Le.y) && (Le.y = -(jf.y + 3));
									Le.rotate(ob);
									Ig += Le.x;
									Mf += Le.y;
									hf.GG(Lg);
									var Fc = Fc + Lg.x,
										ni = ni + Lg.y,
										Mg = w.xb(Ig + Fc, Mf + ni);
									mc.move(Mg);
									w.v(Mg);
									w.v(jf);
									w.Eb(Lg);
									w.af(hf)
								}
							}
						this.Bu(!1)
					}
					break;
				case "Grid":
					break;
				case "Graduated":
					if (null !== this.Bm) {
						var Ng = this.Ad(),
							vj = this.Dm,
							Jk = this.Bm,
							we = 0,
							ad = Jk[we];
						we++;
						Ng.jc(ad.x - e.x, ad.y - e.y, ad.width, ad.height);
						for (var Kk = f.length, Ch = 0; Ch < Kk; Ch++) {
							var md = f[Ch],
								wj = vj[Ch];
							md.visible && md !== Ng && 0 !== wj.length && (ad = Jk[we], we++, md.jc(ad.x - e.x, ad.y - e.y, ad.width, ad.height))
						}
						this.Bm =
							null
					}
					break;
				case "TableRow":
				case "TableColumn":
					w.k(this.toString() + " is not an element of a Table Panel.TableRow and TableColumn panels can only be elements of a Table Panel.");
					break;
				default:
					w.k("Unknown panel type: " + u)
			}
			w.Eb(h)
		}
	};
	C.prototype.zk = function(a) {
		var b = this.Ja,
			c = np(this);
		if (db(0, 0, b.width, b.height, a.x, a.y)) {
			for (var b = this.xa.n, d = b.length, e = w.xb(0, 0); d--;) {
				var f = b[d];
				if (f.visible || f === c)
					if (Pa(e.set(a), f.transform), f.Ia(e)) return w.v(e), !0
			}
			w.v(e);
			return null === this.Fb && null === this.cc ? !1 : !0
		}
		return !1
	};
	C.prototype.yx = function(a) {
		if (this.mo === a) return this;
		for (var b = this.xa.n, c = b.length, d = 0; d < c; d++) {
			var e = b[d].yx(a);
			if (null !== e) return e
		}
		return null
	};

	function $o(a, b, c) {
		c(a, b);
		if (b instanceof C) {
			b = b.xa.n;
			for (var d = b.length, e = 0; e < d; e++) $o(a, b[e], c)
		}
	}

	function Om(a, b) {
		Xp(a, a, b)
	}

	function Xp(a, b, c) {
		c(b);
		b = b.xa.n;
		for (var d = b.length, e = 0; e < d; e++) {
			var f = b[e];
			f instanceof C && Xp(a, f, c)
		}
	}
	C.prototype.walkVisualTree = C.prototype.bK = function(a) {
		Yp(this, this, a)
	};

	function Yp(a, b, c) {
		c(b);
		if (b instanceof C) {
			b = b.xa.n;
			for (var d = b.length, e = 0; e < d; e++) Yp(a, b[e], c)
		}
	}
	C.prototype.findInVisualTree = C.prototype.Ut = function(a) {
		return Zp(this, this, a)
	};

	function Zp(a, b, c) {
		if (c(b)) return b;
		if (b instanceof C) {
			b = b.xa.n;
			for (var d = b.length, e = 0; e < d; e++) {
				var f = Zp(a, b[e], c);
				if (null !== f) return f
			}
		}
		return null
	}
	C.prototype.findObject = C.prototype.Bd = function(a) {
		if (this.name === a) return this;
		for (var b = this.xa.n, c = b.length, d = 0; d < c; d++) {
			var e = b[d];
			if (e.name === a) return e;
			if (e instanceof C)
				if (null === e.dk && null === e.xg) {
					if (e = e.Bd(a), null !== e) return e
				} else if (mn(e) && (e = e.xa.first(), null !== e && (e = e.Bd(a), null !== e))) return e
		}
		return null
	};

	function $p(a) {
		a = a.xa.n;
		for (var b = a.length, c = 0, d = 0; d < b; d++) {
			var e = a[d];
			if (e instanceof C) c = Math.max(c, $p(e));
			else if (e instanceof X) {
				a: {
					if (null !== !e.Sf) switch (e.Do) {
						case "None":
						case "Square":
						case "Ellipse":
						case "Circle":
						case "LineH":
						case "LineV":
						case "FramedRectangle":
						case "RoundedRectangle":
						case "Line1":
						case "Line2":
						case "Border":
						case "Cube1":
						case "Cube2":
						case "Junction":
						case "Cylinder1":
						case "Cylinder2":
						case "Cylinder3":
						case "Cylinder4":
						case "PlusLine":
						case "XLine":
						case "ThinCross":
						case "ThickCross":
							e = 0;
							break a
					}
					e = e.ii / 2 * e.en * e.sj()
				}
				c = Math.max(c, e)
			}
		}
		return c
	}
	g = C.prototype;
	g.Yg = function() {
		return !(this.type === Jo || this.type === Ko)
	};
	g.Le = function(a, b, c) {
		if (!1 === this.Ug) return null;
		void 0 === b && (b = null);
		void 0 === c && (c = null);
		if (Fm(this)) return null;
		var d = this.Ja,
			e = 1 / this.sj(),
			f = this.Yg(),
			h = f ? a : Pa(w.xb(a.x, a.y), this.transform),
			k = this.g,
			l = 10,
			m = 5;
		null !== k && (l = k.gu("extraTouchArea"), m = l / 2);
		if (db(-(m * e), -(m * e), d.width + l * e, d.height + l * e, h.x, h.y)) {
			if (!this.En) {
				var e = this.xa.n,
					n = e.length,
					k = w.K(),
					m = (l = this.mu) ? this.Ad() : null;
				if (l && (m.Yg() ? Pa(k.set(a), m.transform) : k.set(a), !m.Ia(k))) return w.v(k), f || w.v(h), null;
				for (var p = np(this); n--;) {
					var q =
						e[n];
					if (q.visible || q === p)
						if (q.Yg() ? Pa(k.set(a), q.transform) : k.set(a), !l || q !== m) {
							var r = null;
							q instanceof C ? r = q.Le(k, b, c) : !0 === q.Ug && q.Ia(k) && (r = q);
							if (null !== r && (null !== b && (r = b(r)), null !== r && (null === c || c(r)))) return w.v(k), f || w.v(h), r
						}
				}
				w.v(k)
			}
			if (null === this.background && null === this.kn) return f || w.v(h), null;
			a = db(0, 0, d.width, d.height, h.x, h.y) ? this : null;
			f || w.v(h);
			return a
		}
		f || w.v(h);
		return null
	};
	g.Wt = function(a, b, c, d) {
		if (!1 === this.Ug) return !1;
		void 0 === b && (b = null);
		void 0 === c && (c = null);
		d instanceof H || d instanceof I || (d = new H(G));
		var e = this.Ja,
			f = this.Yg(),
			h = f ? a : Pa(w.xb(a.x, a.y), this.transform);
		if (db(0, 0, e.width, e.height, h.x, h.y)) {
			if (!this.En) {
				for (var e = this.xa.n, k = e.length, l = w.K(), m = np(this); k--;) {
					var n = e[k];
					if (n.visible || n === m) {
						n.Yg() ? Pa(l.set(a), n.transform) : l.set(a);
						var p = n,
							n = n instanceof C ? n : null;
						(null !== n ? n.Wt(l, b, c, d) : p.Ia(l)) && !1 !== p.Ug && (null !== b && (p = b(p)), null === p || null !== c && !c(p) ||
							d.add(p))
					}
				}
				w.v(l)
			}
			f || w.v(h);
			return null !== this.background || null !== this.kn
		}
		f || w.v(h);
		return !1
	};
	g.Fk = function(a, b, c, d, e, f) {
		if (!1 === this.Ug) return !1;
		void 0 === b && (b = null);
		void 0 === c && (c = null);
		var h = f;
		void 0 === f && (h = w.Wg(), h.reset());
		h.multiply(this.transform);
		if (this.pn(a, h)) return aq(this, b, c, e), void 0 === f && w.af(h), !0;
		if (this.Zf(a, h)) {
			if (!this.En)
				for (var k = np(this), l = this.xa.n, m = l.length; m--;) {
					var n = l[m];
					if (n.visible || n === k) {
						var p = n.Y,
							q = this.Ja;
						if (!(p.x > q.width || p.y > q.height || 0 > p.x + p.width || 0 > p.y + p.height)) {
							p = n;
							n = n instanceof C ? n : null;
							q = w.Wg();
							q.set(h);
							if (null !== n ? n.Fk(a, b, c, d, e, q) : Do(p, a, d,
									q)) null !== b && (p = b(p)), null === p || null !== c && !c(p) || e.add(p);
							w.af(q)
						}
					}
				}
			void 0 === f && w.af(h);
			return d
		}
		void 0 === f && w.af(h);
		return !1
	};

	function aq(a, b, c, d) {
		for (var e = a.xa.n, f = e.length; f--;) {
			var h = e[f];
			if (h.visible) {
				var k = h.Y,
					l = a.Ja;
				k.x > l.width || k.y > l.height || 0 > k.x + k.width || 0 > k.y + k.height || (h instanceof C && aq(h, b, c, d), null !== b && (h = b(h)), null === h || null !== c && !c(h) || d.add(h))
			}
		}
	}
	g.vn = function(a, b, c, d, e, f) {
		if (!1 === this.Ug) return !1;
		void 0 === c && (c = null);
		void 0 === d && (d = null);
		var h = this.Ja,
			k = this.Yg(),
			l = k ? a : Pa(w.xb(a.x, a.y), this.transform),
			m = k ? b : Pa(w.xb(b.x, b.y), this.transform),
			n = l.Bf(m),
			p = 0 < l.x && l.x < h.width && 0 < l.y && l.y < h.height || Ra(l.x, l.y, 0, 0, 0, h.height) < n || Ra(l.x, l.y, 0, h.height, h.width, h.height) < n || Ra(l.x, l.y, h.width, h.height, h.width, 0) < n || Ra(l.x, l.y, h.width, 0, 0, 0) < n,
			h = 0 < l.x && l.x < h.width && 0 < l.y && l.y < h.height && Ra(l.x, l.y, 0, 0, 0, h.height) < n && Ra(l.x, l.y, 0, h.height, h.width, h.height) <
			n && Ra(l.x, l.y, h.width, h.height, h.width, 0) < n && Ra(l.x, l.y, h.width, 0, 0, 0) < n;
		k || (w.v(l), w.v(m));
		if (p) {
			if (!this.En) {
				for (var l = w.K(), m = w.K(), n = np(this), q = this.xa.n, r = q.length; r--;) {
					var s = q[r];
					if (s.visible || s === n) {
						var u = s.Y,
							t = this.Ja;
						if (!k || !(u.x > t.width || u.y > t.height || 0 > u.x + u.width || 0 > u.y + u.height))
							if (s.Yg() ? (u = s.transform, Pa(l.set(a), u), Pa(m.set(b), u)) : (l.set(a), m.set(b)), u = s, s = s instanceof C ? s : null, null !== s ? s.vn(l, m, c, d, e, f) : u.cF(l, m, e)) null !== c && (u = c(u)), null === u || null !== d && !d(u) || f.add(u)
					}
				}
				w.v(l);
				w.v(m)
			}
			return e ?
				p : h
		}
		return !1
	};

	function Mp(a) {
		var b = null;
		a instanceof X && (b = a.A, b === qc && (b = null), a = a.nf, null !== a && null === b && (b = a.A));
		null === b && (b = zb);
		return b
	}

	function Np(a) {
		var b = null;
		a instanceof X && (b = a.B, b === qc && (b = null), a = a.nf, null !== a && null === b && (b = a.B));
		null === b && (b = Sb);
		return b
	}
	C.prototype.add = C.prototype.add = function(a) {
		w.G(a, G, C, "add:element");
		this.Rd(this.xa.count, a)
	};
	C.prototype.elt = C.prototype.ea = function(a) {
		return this.xa.ea(a)
	};
	C.prototype.insertAt = C.prototype.Rd = function(a, b) {
		b instanceof R && w.k("Cannot add a Part to a Panel: " + b + "; use a Panel instead");
		if (this === b || this.am(b)) this === b && w.k("Cannot make a Panel contain itself: " + this.toString()), w.k("Cannot make a Panel indirectly contain itself: " + this.toString() + " already contains " + b.toString());
		var c = b.Q;
		null !== c && c !== this && w.k("Cannot add a GraphObject that already belongs to another Panel to this Panel: " + b.toString() + ", already contained by " + c.toString() + ", cannot be shared by this Panel: " +
			this.toString());
		this.na !== Jl || b instanceof X || w.k("Can only add Shapes to a Grid Panel, not: " + b);
		this.na !== ip || b instanceof X || b instanceof Lh || w.k("Can only add Shapes or TextBlocks to a Graduated Panel, not: " + b);
		b.hm(this);
		b.Um = null;
		if (null !== this.fq) {
			var d = b.data;
			null !== d && "object" === typeof d && (null === this.wg && (this.wg = new ma(Object, C)), this.wg.add(d, b))
		}
		var e = this.xa,
			d = -1;
		if (c === this) {
			for (var f = -1, h = this.xa.n, k = h.length, l = 0; l < k; l++)
				if (h[l] === b) {
					f = l;
					break
				}
			if (-1 !== f) {
				if (f === a || f + 1 >= e.count &&
					a >= e.count) return;
				e.dd(f);
				d = f
			} else w.k("element " + b.toString() + " has panel " + c.toString() + " but is not contained by it.")
		}
		if (0 > a || a > e.count) a = e.count;
		e.Rd(a, b);
		if (0 === a || b.ef) this.Bl = null;
		this.H();
		b.H();
		null !== b.Vd ? this.Kk = !0 : b instanceof C && !0 === b.Kk && (this.Kk = !0);
		this.Xj = null;
		c = this.U;
		null !== c && (c.Pm = null, c.hk = NaN, this.Kk && c instanceof T && (c.Kk = !0), c.Kk && c instanceof T && (c.oe = null), e = this.g, null !== e && e.ja.lb || (-1 !== d && c.cd(Qf, "elements", this, b, null, d, null), c.cd(Ff, "elements", this, null, b, null, a),
			this.ou() || bq(this, b, !1)))
	};
	w.defineProperty(C, {
		Kk: null
	}, function() {
		return 0 !== (this.N & 8388608)
	}, function(a) {
		0 !== (this.N & 8388608) !== a && (this.N ^= 8388608)
	});

	function cq(a, b) {
		a.N = b ? a.N | 16777216 : a.N & -16777217
	}
	C.prototype.remove = C.prototype.remove = function(a) {
		w.G(a, G, C, "remove:element");
		for (var b = this.xa.n, c = b.length, d = -1, e = 0; e < c; e++)
			if (b[e] === a) {
				d = e;
				break
			} - 1 !== d && this.qf(d, !0)
	};
	C.prototype.removeAt = C.prototype.dd = function(a) {
		0 <= a && this.qf(a, !0)
	};
	C.prototype.qf = function(a, b) {
		var c = this.xa,
			d = c.ea(a);
		d.Um = null;
		d.hm(null);
		if (null !== this.wg) {
			var e = d.data;
			"object" === typeof e && this.wg.remove(e)
		}
		c.dd(a);
		cm(this, !1);
		this.H();
		this.Bl === d && (this.Bl = null);
		this.Xj = null;
		var f = this.U;
		null !== f && (f.Pm = null, f.hk = NaN, f.ee(), f instanceof T && (d instanceof C ? $o(d, d, function(a, c) {
			Xo(f, c, b)
		}) : Xo(f, d, b)), c = this.g, null !== c && c.ja.lb || f.cd(Qf, "elements", this, d, null, a, null))
	};
	w.u(C, {
		vq: "rowCount"
	}, function() {
		return void 0 === this.Xc ? 0 : this.Xc.length
	});
	C.prototype.getRowDefinition = C.prototype.de = function(a) {
		0 > a && w.Fa(a, ">= 0", C, "getRowDefinition:idx");
		a = Math.round(a);
		var b = this.Xc;
		if (void 0 === b[a]) {
			var c = new Wg;
			c.hm(this);
			c.xe = !0;
			c.index = a;
			b[a] = c
		}
		return b[a]
	};
	C.prototype.removeRowDefinition = C.prototype.cG = function(a) {
		0 > a && w.Fa(a, ">= 0", C, "removeRowDefinition:idx");
		a = Math.round(a);
		var b = this.Xc;
		this.cd(Qf, "coldefs", this, b[a], null, a, null);
		b[a] && delete b[a];
		this.H()
	};
	w.u(C, {
		Jp: "columnCount"
	}, function() {
		return void 0 === this.Uc ? 0 : this.Uc.length
	});
	C.prototype.getColumnDefinition = C.prototype.ce = function(a) {
		0 > a && w.Fa(a, ">= 0", C, "getColumnDefinition:idx");
		a = Math.round(a);
		var b = this.Uc;
		if (void 0 === b[a]) {
			var c = new Wg;
			c.hm(this);
			c.xe = !1;
			c.index = a;
			b[a] = c
		}
		return b[a]
	};
	C.prototype.removeColumnDefinition = C.prototype.aG = function(a) {
		0 > a && w.Fa(a, ">= 0", C, "removeColumnDefinition:idx");
		a = Math.round(a);
		var b = this.Uc;
		this.cd(Qf, "coldefs", this, b[a], null, a, null);
		b[a] && delete b[a];
		this.H()
	};
	w.defineProperty(C, {
		BJ: "rowSizing"
	}, function() {
		return void 0 === this.Xm ? hp : this.Xm
	}, function(a) {
		if (void 0 !== this.Xm) {
			var b = this.Xm;
			b !== a && (a !== hp && a !== Pp && w.k("Panel.rowSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: " + a), this.Xm = a, this.H(), this.h("rowSizing", b, a))
		}
	});
	w.defineProperty(C, {
		xH: "columnSizing"
	}, function() {
		return void 0 === this.xm ? hp : this.xm
	}, function(a) {
		if (void 0 !== this.xm) {
			var b = this.xm;
			b !== a && (a !== hp && a !== Pp && w.k("Panel.columnSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: " + a), this.xm = a, this.H(), this.h("columnSizing", b, a))
		}
	});
	w.defineProperty(C, {
		aM: "topIndex"
	}, function() {
		return void 0 === this.hj ? 0 : this.hj
	}, function(a) {
		if (void 0 !== this.hj) {
			var b = this.hj;
			b !== a && ((!isFinite(a) || 0 > a) && w.k("Panel.topIndex must be greater than zero and a real number, not: " + a), this.hj = a, this.H(), this.h("topIndex", b, a))
		}
	});
	w.defineProperty(C, {
		oL: "leftIndex"
	}, function() {
		return void 0 === this.Ri ? 0 : this.Ri
	}, function(a) {
		if (void 0 !== this.Ri) {
			var b = this.Ri;
			b !== a && ((!isFinite(a) || 0 > a) && w.k("Panel.leftIndex must be greater than zero and a real number, not: " + a), this.Ri = a, this.H(), this.h("leftIndex", b, a))
		}
	});
	C.prototype.findRowForLocalY = function(a) {
		if (0 > a || this.type !== So) return -1;
		for (var b = 0, c = this.Xc, d = c.length, e = this.hj; e < d; e++) {
			var f = c[e];
			if (void 0 !== f && (b += f.total, a < b)) break
		}
		return e
	};
	C.prototype.findColumnForLocalX = function(a) {
		if (0 > a || this.type !== So) return -1;
		for (var b = 0, c = this.Uc, d = c.length, e = this.Ri; e < d; e++) {
			var f = c[e];
			if (void 0 !== f && (b += f.total, a < b)) break
		}
		return e
	};
	C.prototype.graduatedPointForValue = function(a, b) {
		void 0 === b && (b = new y(NaN, NaN));
		if (this.type !== ip) return b.m(NaN, NaN), b;
		a = Math.min(Math.max(a, this.Jk), this.EA);
		var c = (a - this.Jk) / this.hu,
			d = this.Ad();
		d.nf.fI(c, b);
		return d.transform.nb(b)
	};
	C.prototype.graduatedValueForPoint = function(a) {
		if (this.type !== ip) return NaN;
		var b = this.Ad(),
			c = b.nf;
		b.transform.wh(a);
		return c.bI(a) * this.hu + this.Jk
	};
	w.defineProperty(C, {
		data: "data"
	}, function() {
		return this.Zd
	}, function(a) {
		var b = this.Zd;
		if (b !== a) {
			var c = this instanceof R && !(this instanceof kh);
			c && w.j(a, "object", C, "data");
			mh(this);
			this.Zd = a;
			var d = this.g;
			null !== d && (c ? this instanceof W ? (null !== b && d.Oj.remove(b), null !== a && d.Oj.add(a, this)) : this instanceof R && (null !== b && d.Ei.remove(b), null !== a && d.Ei.add(a, this)) : (c = this.Q, null !== c && null !== c.wg && (null !== b && c.wg.remove(b), null !== a && c.wg.add(a, this))));
			this.h("data", b, a);
			null !== d && d.ja.lb || null !== a && this.Ib()
		}
	});
	w.defineProperty(C, {
		vu: "itemIndex"
	}, function() {
		return this.$r
	}, function(a) {
		var b = this.$r;
		b !== a && (this.$r = a, this.h("itemIndex", b, a))
	});

	function ap(a) {
		a = a.el;
		return null !== a && a.P
	}

	function mh(a) {
		var b = a.el;
		if (null === b) null !== a.data && w.k("Template cannot have .data be non-null: " + a), a.el = b = new H(bh);
		else if (b.P) return;
		var c = new H(G);
		cq(a, !1);
		$o(a, a, function(a, d) {
			var e = d.yc;
			if (null !== e)
				for (Wo(d, !1), e = e.i; e.next();) {
					var f = e.value;
					f.mode === dh && Wo(d, !0);
					var h = f.Cq;
					null !== h && ("/" === h && cq(a, !0), h = eh(f, a, d), null !== h && (c.add(h), null === h.mp && (h.mp = new H(bh)), h.mp.add(f)));
					b.add(f)
				}
			if (d instanceof C && d.type === So) {
				if (0 < d.Xc.length)
					for (e = d.Xc, f = e.length, h = 0; h < f; h++) {
						var k = e[h];
						if (void 0 !==
							k && null !== k.yc)
							for (var l = k.yc.i; l.next();) {
								var t = l.value;
								t.Gg = k;
								t.st = 2;
								t.vp = k.index;
								b.add(t)
							}
					}
				if (0 < d.Uc.length)
					for (e = d.Uc, f = e.length, h = 0; h < f; h++)
						if (k = e[h], void 0 !== k && null !== k.yc)
							for (l = k.yc.i; l.next();) t = l.value, t.Gg = k, t.st = 1, t.vp = k.index, b.add(t)
			}
		});
		for (var d = c.i; d.next();) {
			var e = d.value;
			if (null !== e.mp) {
				Wo(e, !0);
				for (var f = e.mp.i; f.next();) {
					var h = f.value;
					null === e.yc && (e.yc = new H(bh));
					e.yc.add(h)
				}
			}
			e.mp = null
		}
		for (d = b.i; d.next();)
			if (e = d.value, f = e.Gg, null !== f) {
				e.Gg = null;
				var k = e.xy,
					l = k.indexOf(".");
				0 < l &&
					f instanceof C && (h = k.substring(0, l), k = k.substr(l + 1), l = f.Bd(h), null !== l ? (f = l, e.xy = k) : w.trace('Warning: unable to find GraphObject named "' + h + '" for Binding: ' + e.toString()));
				f instanceof Wg ? (e.lm = w.Pd(f.Q), f.Q.mo = e.lm) : (e.lm = w.Pd(f), f.mo = e.lm)
			}
		b.freeze();
		a instanceof R && a.fe() && a.$e()
	}
	C.prototype.copyTemplate = function() {
		var a = this.copy();
		a.bK(function(a) {
			a instanceof C && (a.el = null, a.Zd = null);
			var c = a.yc;
			null !== c && (a.yc = null, c.each(function(c) {
				a.bind(c.copy())
			}))
		});
		return a
	};
	C.prototype.updateTargetBindings = C.prototype.Ib = function(a) {
		var b = this.el;
		if (null !== b)
			for (void 0 === a && (a = ""), b = b.i; b.next();) {
				var c = b.value,
					d = c.uG;
				if ("" === a || "" === d || d === a)
					if (d = c.xy, null !== c.DH || "" !== d) {
						var d = this.data,
							e = c.Cq;
						if (null !== e) d = "" === e ? this : "/" === e ? this : "." === e ? this : ".." === e ? this : this.Bd(e);
						else {
							var f = this.g;
							null !== f && c.Lx && (d = f.$.Mk)
						}
						if (null !== d) {
							var f = this,
								h = c.lm;
							if (-1 !== h) {
								if (f = this.yx(h), null === f) continue
							} else null !== c.Gg && (f = c.Gg);
							"/" === e ? d = f.U : "." === e ? d = f : ".." === e && (d = f.Q);
							e = c.st;
							if (0 !== e) {
								if (!(f instanceof C)) continue;
								h = f;
								1 === e ? f = h.ce(c.vp) : 2 === e && (f = h.de(c.vp))
							}
							void 0 !== f && c.JG(f, d)
						}
					}
			}
	};
	w.defineProperty(C, {
		fq: "itemArray"
	}, function() {
		return this.dk
	}, function(a) {
		var b = this.dk;
		if (b !== a) {
			var c = this.g;
			null !== c && null !== b && Um(c, this);
			this.dk = a;
			null !== c && null !== a && Qm(c, this);
			this.h("itemArray", b, a);
			null !== c && c.ja.lb || this.mB()
		}
	});

	function mn(a) {
		return a.type === Nj || a.type === Gl || a.type === ij || a.type === So && 0 < a.xa.length && (a = a.xa.ea(0), a.ef && a instanceof C && (a.type === Jo || a.type === Ko)) ? !0 : !1
	}
	C.prototype.rebuildItemElements = C.prototype.mB = function() {
		var a = 0;
		for (mn(this) && (a = 1); this.xa.length > a;) this.qf(this.xa.length - 1, !1);
		a = this.fq;
		if (null !== a)
			for (var b = w.Za(a), c = 0; c < b; c++) ln(this, w.Ba(a, c), c)
	};
	C.prototype.findItemPanelForData = C.prototype.WH = function(a) {
		if (void 0 === a || null === a || null === this.wg) return null;
		w.j(a, "object", C, "findItemPanelForData");
		return this.wg.ka(a)
	};

	function ln(a, b, c) {
		if (!(void 0 === b || null === b || 0 > c)) {
			var d;
			d = dq(a, b);
			var e = a.GI,
				f = null;
			null !== e && (f = e.ka(d));
			null === f && (eq || (eq = !0, w.trace('No item template Panel found for category "' + d + '" on ' + a), w.trace("  Using default item template."), d = new C, e = new Lh, e.bind(new bh("text", "", Rf)), d.add(e), fq = d), f = fq);
			d = f;
			null !== d && (mh(d), d = d.copy(), 0 !== (d.N & 16777216) && (e = a.Tl(), null !== e && cq(e, !0)), "object" === typeof b && (null === a.wg && (a.wg = new ma(Object, C)), a.wg.add(b, d)), e = c, mn(a) && e++, a.Rd(e, d), d.Zd = b, nn(a, e,
				c), d.Zd = null, d.data = b)
		}
	}

	function nn(a, b, c) {
		for (a = a.xa; b < a.length;) {
			var d = a.ea(b);
			if (d instanceof C) {
				var e = b,
					f = c;
				d.type === Jo ? d.Ub = e : d.type === Ko && (d.column = e);
				d.vu = f
			}
			b++;
			c++
		}
	}
	w.defineProperty(C, {
		mL: "itemTemplate"
	}, function() {
		return null === this.xg ? null : this.xg.ka("")
	}, function(a) {
		if (null === this.xg) {
			if (null === a) return;
			this.xg = new ma("string", C)
		}
		var b = this.xg.ka("");
		b !== a && (w.G(a, C, C, "itemTemplate"), (a instanceof R || a.ef) && w.k("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: " + a), this.xg.add("", a), this.h("itemTemplate", b, a), a = this.g, null !== a && a.ja.lb || this.mB())
	});
	w.defineProperty(C, {
		GI: "itemTemplateMap"
	}, function() {
		return this.xg
	}, function(a) {
		var b = this.xg;
		if (b !== a) {
			w.G(a, ma, C, "itemTemplateMap");
			for (var c = a.i; c.next();) {
				var d = c.value;
				(d instanceof R || d.ef) && w.k("Template in Panel.itemTemplateMap must not be a Part or be Panel.isPanelMain: " + d)
			}
			this.xg = a;
			this.h("itemTemplateMap", b, a);
			a = this.g;
			null !== a && a.ja.lb || this.mB()
		}
	});
	w.defineProperty(C, {
		lL: "itemCategoryProperty"
	}, function() {
		return this.Qo
	}, function(a) {
		var b = this.Qo;
		b !== a && ("string" !== typeof a && "function" !== typeof a && w.Ed(a, "string or function", C, "itemCategoryProperty"), this.Qo = a, this.h("itemCategoryProperty", b, a))
	});

	function dq(a, b) {
		if (null === b) return "";
		var c = a.Qo,
			d = "";
		if ("function" === typeof c) d = c(b);
		else if ("string" === typeof c && "object" === typeof b) {
			if ("" === c) return "";
			d = w.ub(b, c)
		} else return "";
		if (void 0 === d) return "";
		if ("string" === typeof d) return d;
		w.k("Panel.getCategoryForItemData found a non-string category for " + b + ": " + d);
		return ""
	}
	var eq = !1,
		fq = null;
	w.defineProperty(C, {
		En: "isAtomic"
	}, function() {
		return 0 !== (this.N & 1048576)
	}, function(a) {
		var b = 0 !== (this.N & 1048576);
		b !== a && (w.j(a, "boolean", C, "isAtomic"), this.N ^= 1048576, this.h("isAtomic", b, a))
	});
	w.defineProperty(C, {
		mu: "isClipping"
	}, function() {
		return 0 !== (this.N & 2097152)
	}, function(a) {
		var b = 0 !== (this.N & 2097152);
		b !== a && (w.j(a, "boolean", C, "isClipping"), this.N ^= 2097152, this.H(), this.h("isClipping", b, a))
	});
	w.defineProperty(C, {
		FF: "isOpposite"
	}, function() {
		return 0 !== (this.N & 33554432)
	}, function(a) {
		var b = 0 !== (this.N & 33554432);
		b !== a && (w.j(a, "boolean", C, "isOpposite"), this.N ^= 33554432, this.H(), this.h("isOpposite", b, a))
	});
	w.defineProperty(C, {
		isEnabled: "isEnabled"
	}, function() {
		return 0 !== (this.N & 4194304)
	}, function(a) {
		var b = 0 !== (this.N & 4194304);
		if (b !== a) {
			w.j(a, "boolean", C, "isEnabled");
			var c = null === this.Q || this.Q.ou();
			this.N ^= 4194304;
			this.h("isEnabled", b, a);
			b = this.g;
			null !== b && b.ja.lb || c && bq(this, this, a)
		}
	});

	function bq(a, b, c) {
		var d = b.WE;
		null !== d && d(b, c);
		if (b instanceof C) {
			b = b.xa.n;
			for (var d = b.length, e = 0; e < d; e++) {
				var f = b[e];
				c && f instanceof C && !f.isEnabled || bq(a, f, c)
			}
		}
	}
	w.defineProperty(C, {
		hK: "alignmentFocusName"
	}, function() {
		return this.Lj
	}, function(a) {
		var b = this.Lj;
		b !== a && (this.Lj = a, this.H(), this.h("alignmentFocusName", b, a))
	});

	function Wg() {
		w.oc(this);
		this.bj = null;
		this.$v = !0;
		this.zc = 0;
		this.mf = NaN;
		this.jk = 0;
		this.ik = Infinity;
		this.je = qc;
		this.jb = this.Ra = 0;
		this.yc = null;
		this.lt = gq;
		this.Fg = oo;
		this.gt = this.nk = null;
		this.ht = NaN;
		this.Fb = this.$h = null;
		this.gr = !1
	}
	w.ga("RowColumnDefinition", Wg);
	Wg.prototype.copy = function() {
		var a = new Wg;
		a.$v = this.$v;
		a.zc = this.zc;
		a.mf = this.mf;
		a.jk = this.jk;
		a.ik = this.ik;
		a.je = this.je;
		a.Ra = this.Ra;
		a.jb = this.jb;
		a.Fg = this.Fg;
		a.lt = this.lt;
		a.nk = null === this.nk ? null : this.nk.S();
		a.gt = this.gt;
		a.ht = this.ht;
		a.$h = null;
		null !== this.$h && (a.$h = w.Ol(this.$h));
		a.Fb = this.Fb;
		a.gr = this.gr;
		a.yc = this.yc;
		return a
	};
	Wg.prototype.Kp = function(a) {
		w.G(a, Wg, Wg, "copyFrom:pd");
		a.xe ? this.height = a.height : this.width = a.width;
		this.Bh = a.Bh;
		this.ie = a.ie;
		this.alignment = a.alignment;
		this.stretch = a.stretch;
		this.Yu = a.Yu;
		this.nk = null === a.nk ? null : a.nk.S();
		this.xq = a.xq;
		this.yq = a.yq;
		this.$h = null;
		a.$h && (this.$h = w.Ol(a.$h));
		this.background = a.background;
		this.qA = a.qA;
		this.yc = a.yc
	};
	Wg.prototype.ic = function(a) {
		a.Ge === Wg ? this.Yu = a : w.Ij(this, a)
	};
	Wg.prototype.toString = function() {
		return "RowColumnDefinition " + (this.xe ? "(Row " : "(Column ") + this.index + ") #" + w.Pd(this)
	};
	var gq;
	Wg.Default = gq = w.p(Wg, "Default", 0);
	var Pp;
	Wg.None = Pp = w.p(Wg, "None", 1);
	var hp;
	Wg.ProportionalExtra = hp = w.p(Wg, "ProportionalExtra", 2);
	Wg.prototype.hm = function(a) {
		this.bj = a
	};
	Wg.prototype.computeEffectiveSpacingTop = Wg.prototype.JE = function() {
		var a = 0,
			b = this.bj,
			c = 0,
			d = this.xe;
		if (null !== b)
			for (var e = d ? b.Xc.length : b.Uc.length, f = 0; f < e; f++) {
				var h = d ? b.Xc[f] : b.Uc[f];
				if (void 0 !== h) {
					c = h.index;
					break
				}
			}
		this.index !== c && (c = this.xq, null === c && null !== b && (c = this.xe ? b.Fi : b.Nh), null !== c && (a = this.yq, isNaN(a) && (a = null !== b ? this.xe ? b.Ph : b.Oh : 0)));
		c = this.oG;
		if (null === c)
			if (null !== b) c = b.Pj;
			else return a;
		return a + (this.xe ? c.top : c.left)
	};
	Wg.prototype.computeEffectiveSpacing = Wg.prototype.Ye = function() {
		var a = 0,
			b = this.bj,
			c = 0,
			d = this.xe;
		if (null !== b)
			for (var e = d ? b.Xc.length : b.Uc.length, f = 0; f < e; f++) {
				var h = d ? b.Xc[f] : b.Uc[f];
				if (void 0 !== h) {
					c = h.index;
					break
				}
			}
		this.index !== c && (c = this.xq, null === c && null !== b && (c = d ? b.Fi : b.Nh), null !== c && (a = this.yq, isNaN(a) && (a = null !== b ? d ? b.Ph : b.Oh : 0)));
		d = this.oG;
		if (null === d)
			if (null !== b) d = b.Pj;
			else return a;
		return a + (this.xe ? d.top + d.bottom : d.left + d.right)
	};
	Wg.prototype.jd = function(a, b, c, d, e) {
		var f = this.bj;
		if (null !== f && (f.cd(Df, a, this, b, c, d, e), null !== this.yc && (b = f.g, null !== b && !b.Pe && (f = f.Tl(), null !== f && (b = f.data, null !== b)))))
			for (c = this.yc.i; c.next();) c.value.yy(this, b, a, f)
	};
	w.u(Wg, {
		Q: "panel"
	}, function() {
		return this.bj
	});
	w.defineProperty(Wg, {
		xe: "isRow"
	}, function() {
		return this.$v
	}, function(a) {
		this.$v = a
	});
	w.defineProperty(Wg, {
		index: "index"
	}, function() {
		return this.zc
	}, function(a) {
		this.zc = a
	});
	w.defineProperty(Wg, {
		height: "height"
	}, function() {
		return this.mf
	}, function(a) {
		var b = this.mf;
		b !== a && (0 > a && w.Fa(a, ">= 0", Wg, "height"), this.mf = a, this.Ya = this.Ra, null !== this.Q && this.Q.H(), this.jd("height", b, a))
	});
	w.defineProperty(Wg, {
		width: "width"
	}, function() {
		return this.mf
	}, function(a) {
		var b = this.mf;
		b !== a && (0 > a && w.Fa(a, ">= 0", Wg, "width"), this.mf = a, this.Ya = this.Ra, null !== this.Q && this.Q.H(), this.jd("width", b, a))
	});
	w.defineProperty(Wg, {
		Bh: "minimum"
	}, function() {
		return this.jk
	}, function(a) {
		var b = this.jk;
		b !== a && ((0 > a || !isFinite(a)) && w.Fa(a, ">= 0", Wg, "minimum"), this.jk = a, this.Ya = this.Ra, null !== this.Q && this.Q.H(), this.jd("minimum", b, a))
	});
	w.defineProperty(Wg, {
		ie: "maximum"
	}, function() {
		return this.ik
	}, function(a) {
		var b = this.ik;
		b !== a && (0 > a && w.Fa(a, ">= 0", Wg, "maximum"), this.ik = a, this.Ya = this.Ra, null !== this.Q && this.Q.H(), this.jd("maximum", b, a))
	});
	w.defineProperty(Wg, {
		alignment: "alignment"
	}, function() {
		return this.je
	}, function(a) {
		var b = this.je;
		b.L(a) || (this.je = a.S(), null !== this.Q && this.Q.H(), this.jd("alignment", b, a))
	});
	w.defineProperty(Wg, {
		stretch: "stretch"
	}, function() {
		return this.Fg
	}, function(a) {
		var b = this.Fg;
		b !== a && (this.Fg = a, null !== this.Q && this.Q.H(), this.jd("stretch", b, a))
	});
	w.defineProperty(Wg, {
		oG: "separatorPadding"
	}, function() {
		return this.nk
	}, function(a) {
		"number" === typeof a && (a = new hb(a));
		var b = this.nk;
		null !== a && null !== b && b.L(a) || (null !== a && (a = a.S()), this.nk = a, null !== this.Q && this.Q.H(), this.jd("separatorPadding", b, a))
	});
	w.defineProperty(Wg, {
		xq: "separatorStroke"
	}, function() {
		return this.gt
	}, function(a) {
		var b = this.gt;
		b !== a && (null === a || "string" === typeof a || a instanceof ga) && (a instanceof ga && a.freeze(), this.gt = a, null !== this.Q && this.Q.H(), this.jd("separatorStroke", b, a))
	});
	w.defineProperty(Wg, {
		yq: "separatorStrokeWidth"
	}, function() {
		return this.ht
	}, function(a) {
		var b = this.ht;
		b !== a && (this.ht = a, null !== this.Q && this.Q.H(), this.jd("separatorStrokeWidth", b, a))
	});
	w.defineProperty(Wg, {
		PL: "separatorDashArray"
	}, function() {
		return this.$h
	}, function(a) {
		var b = this.$h;
		if (b !== a) {
			null === a || Array.isArray(a) || w.Ed(a, "Array", Wg, "separatorDashArray:value");
			if (null !== a) {
				for (var c = a.length, d = 0, e = 0; e < c; e++) {
					var f = a[e];
					"number" === typeof f && 0 <= f && isFinite(f) || w.k("separatorDashArray value " + f + " at index " + e + " must be a positive number or zero.");
					d += f
				}
				if (0 === d) {
					if (null === b) return;
					a = null
				}
			}
			this.$h = a;
			null !== this.Q && this.Q.oa();
			this.jd("separatorDashArray", b, a)
		}
	});
	w.defineProperty(Wg, {
		background: "background"
	}, function() {
		return this.Fb
	}, function(a) {
		var b = this.Fb;
		b !== a && (null === a || "string" === typeof a || a instanceof ga) && (a instanceof ga && a.freeze(), this.Fb = a, null !== this.Q && this.Q.oa(), this.jd("background", b, a))
	});
	w.defineProperty(Wg, {
		qA: "coversSeparators"
	}, function() {
		return this.gr
	}, function(a) {
		var b = this.gr;
		b !== a && (w.j(a, "boolean", Wg, "coversSeparators"), this.gr = a, null !== this.Q && this.Q.oa(), this.jd("coversSeparators", b, a))
	});
	w.defineProperty(Wg, {
		Yu: "sizing"
	}, function() {
		return this.lt
	}, function(a) {
		var b = this.lt;
		b !== a && (this.lt = a, null !== this.Q && this.Q.H(), this.jd("sizing", b, a))
	});

	function Op(a) {
		if (a.Yu === gq) {
			var b = a.bj;
			return a.xe ? b.BJ : b.xH
		}
		return a.Yu
	}
	w.defineProperty(Wg, {
		Ya: "actual"
	}, function() {
		return this.Ra
	}, function(a) {
		this.Ra = isNaN(this.mf) ? Math.max(Math.min(this.ik, a), this.jk) : Math.max(Math.min(this.ik, this.mf), this.jk)
	});
	w.defineProperty(Wg, {
		total: "total"
	}, function() {
		return this.Ra + this.Ye()
	}, function(a) {
		this.Ra = isNaN(this.mf) ? Math.max(Math.min(this.ik, a), this.jk) : Math.max(Math.min(this.ik, this.mf), this.jk);
		this.Ra = Math.max(0, this.Ra - this.Ye())
	});
	w.defineProperty(Wg, {
		position: "position"
	}, function() {
		return this.jb
	}, function(a) {
		this.jb = a
	});
	Wg.prototype.bind = Wg.prototype.bind = function(a) {
		a.Gg = this;
		var b = this.Q;
		if (null !== b) {
			var c = b.Tl();
			null !== c && ap(c) && w.k("Cannot add a Binding to a RowColumnDefinition that is already frozen: " + a + " on " + b)
		}
		null === this.yc && (this.yc = new H(bh));
		this.yc.add(a)
	};

	function X() {
		G.call(this);
		this.Sf = this.Ua = null;
		this.Do = "None";
		this.Fr = oo;
		this.sc = this.Gd = "black";
		this.ii = 1;
		this.pp = "butt";
		this.rp = "miter";
		this.en = 10;
		this.qp = null;
		this.yf = 0;
		this.hi = this.gi = qc;
		this.Js = this.Is = NaN;
		this.Qr = !1;
		this.Ls = null;
		this.Fo = this.xp = "None";
		this.ug = 1;
		this.tg = 0;
		this.sg = 1
	}
	w.La(X, G);
	w.ga("Shape", X);
	X.prototype.cloneProtected = function(a) {
		G.prototype.cloneProtected.call(this, a);
		a.Ua = this.Ua;
		a.Do = this.Do;
		a.Fr = this.Fr;
		a.Sf = this.Sf;
		a.Gd = this.Gd;
		a.sc = this.sc;
		a.ii = this.ii;
		a.pp = this.pp;
		a.rp = this.rp;
		a.en = this.en;
		null !== this.qp && (a.qp = w.Ol(this.qp));
		a.yf = this.yf;
		a.gi = this.gi.S();
		a.hi = this.hi.S();
		a.Is = this.Is;
		a.Js = this.Js;
		a.Qr = this.Qr;
		a.Ls = this.Ls;
		a.xp = this.xp;
		a.Fo = this.Fo;
		a.ug = this.ug;
		a.tg = this.tg;
		a.sg = this.sg
	};
	X.prototype.ic = function(a) {
		a === Pj || a === Rj || a === Sj || a === oo ? this.BA = a : G.prototype.ic.call(this, a)
	};
	X.prototype.toString = function() {
		return "Shape(" + ("None" !== this.Db ? this.Db : "None" !== this.Dq ? this.Dq : this.zA) + ")#" + w.Pd(this)
	};

	function hq(a, b, c, d) {
		var e = c.length;
		if (!(4 > e)) {
			for (var f = d.za, h = Math.max(1, f.width), f = f.height, k = c[0], l = c[1], m = 0, n = 0, p = 0, q = 0, r = 0, s = 0, u = q = 0, t = w.cb(), x = 2; x < e; x += 2) m = c[x], n = c[x + 1], p = m - k, q = n - l, 0 === p && (p = .001), r = q / p, s = Math.atan2(q, p), q = Math.sqrt(p * p + q * q), t.push([p, s, r, q]), u += q, k = m, l = n;
			k = c[0];
			l = c[1];
			p = d.za.width;
			d instanceof X && (p -= d.mb);
			1 > p && (p = 1);
			for (var e = c = p, m = h / 2, n = 0 === m ? !1 : !0, x = 0, q = t[x], p = q[0], s = q[1], r = q[2], q = q[3], v = 0; .1 <= u;) {
				0 === v && (n ? (e = c, e -= m, u -= m, n = !1) : e = c, 0 === e && (e = 1));
				if (e > u) {
					w.ta(t);
					return
				}
				e >
					q ? (v = e - q, e = q) : v = 0;
				var z = Math.sqrt(e * e / (1 + r * r));
				0 > p && (z = -z);
				k += z;
				l += r * z;
				a.translate(k, l);
				a.rotate(s);
				a.translate(-(h / 2), -(f / 2));
				0 === v && d.Ek(a, b);
				a.translate(h / 2, f / 2);
				a.rotate(-s);
				a.translate(-k, -l);
				u -= e;
				q -= e;
				if (0 !== v) {
					x++;
					if (x === t.length) {
						w.ta(t);
						return
					}
					q = t[x];
					p = q[0];
					s = q[1];
					r = q[2];
					q = q[3];
					e = v
				}
			}
			w.ta(t)
		}
	}
	X.prototype.Ek = function(a, b) {
		if (null !== this.sc || null !== this.Gd) {
			null !== this.Gd && No(this, a, this.Gd, !0, !1);
			null !== this.sc && No(this, a, this.sc, !1, !1);
			var c = this.ii;
			if (0 === c) {
				var d = this.U;
				d instanceof kh && d.type === ij && "Selection" === d.yd && d.tb instanceof X && d.zf.Ad() === d.tb && (c = d.tb.mb)
			}
			a.lineWidth = c;
			a.lineJoin = this.rp;
			a.lineCap = this.pp;
			a.miterLimit = this.en;
			var e = !1;
			this.U && b.tj("drawShadows") && (e = this.U.cm);
			var f = !0;
			null !== this.sc && null === this.Gd && (f = !1);
			var d = !1,
				h = !0,
				k = this.xG;
			null !== k && (d = !0, h = a.vA(k,
				this.yf));
			var l = this.Ua;
			if (null !== l) {
				if (l.na === Ge) a.beginPath(), d && !h ? yo(a, l.Cc, l.Mc, l.yb, l.Gb, k, this.yf) : (a.moveTo(l.Cc, l.Mc), a.lineTo(l.yb, l.Gb)), null !== this.Gd && a.Lg(this.Gd), 0 !== c && null !== this.sc && a.Gj();
				else if (l.na === He) {
					var m = l.Cc,
						n = l.Mc,
						p = l.yb,
						q = l.Gb,
						l = Math.min(m, p),
						r = Math.min(n, q),
						m = Math.abs(p - m),
						n = Math.abs(q - n);
					null !== this.Gd && (a.beginPath(), a.rect(l, r, m, n), a.Lg(this.Gd));
					if (null !== this.sc) {
						var s = p = 0,
							u = 0;
						f && e && (p = a.shadowOffsetX, s = a.shadowOffsetY, u = a.shadowBlur, a.shadowOffsetX = 0, a.shadowOffsetY =
							0, a.shadowBlur = 0);
						d && !h ? (h = w.cb(), h.push(l), h.push(r), h.push(l + m), h.push(r), h.push(l + m), h.push(r + n), h.push(l), h.push(r + n), h.push(l), h.push(r), a.beginPath(), iq(a, h, k, this.yf), a.Gj(), w.ta(h)) : 0 !== c && (a.beginPath(), a.rect(l, r, m, n), a.Gj());
						f && e && (a.shadowOffsetX = p, a.shadowOffsetY = s, a.shadowBlur = u)
					}
				} else if (l.na === Ie) m = l.Cc, n = l.Mc, p = l.yb, q = l.Gb, l = Math.abs(p - m) / 2, r = Math.abs(q - n) / 2, m = Math.min(m, p) + l, n = Math.min(n, q) + r, a.beginPath(), a.moveTo(m, n - r), a.bezierCurveTo(m + cd * l, n - r, m + l, n - cd * r, m + l, n), a.bezierCurveTo(m +
					l, n + cd * r, m + cd * l, n + r, m, n + r), a.bezierCurveTo(m - cd * l, n + r, m - l, n + cd * r, m - l, n), a.bezierCurveTo(m - l, n - cd * r, m - cd * l, n - r, m, n - r), a.closePath(), null !== this.Gd && a.Lg(this.Gd), d && !h && (h = w.cb(), Xd(m, n - r, m + cd * l, n - r, m + l, n - cd * r, m + l, n, .5, h), Xd(m + l, n, m + l, n + cd * r, m + cd * l, n + r, m, n + r, .5, h), Xd(m, n + r, m - cd * l, n + r, m - l, n + cd * r, m - l, n, .5, h), Xd(m - l, n, m - l, n - cd * r, m - cd * l, n - r, m, n - r, .5, h), a.beginPath(), iq(a, h, k, this.yf), w.ta(h)), 0 !== c && null !== this.sc && (f && e ? (p = a.shadowOffsetX, s = a.shadowOffsetY, u = a.shadowBlur, a.shadowOffsetX = 0, a.shadowOffsetY =
					0, a.shadowBlur = 0, a.Gj(), a.shadowOffsetX = p, a.shadowOffsetY = s, a.shadowBlur = u) : a.Gj());
				else if (l.na === De) {
					r = l.Rj;
					n = r.length;
					for (q = 0; q < n; q++) {
						m = r.n[q];
						a.beginPath();
						a.moveTo(m.ha, m.fa);
						for (var p = m.wb.n, s = p.length, t = null, u = 0; u < s; u++) {
							var x = p[u];
							switch (x.na) {
								case Ve:
									a.moveTo(x.C, x.D);
									break;
								case Ne:
									a.lineTo(x.C, x.D);
									break;
								case We:
									a.bezierCurveTo(x.Jd, x.We, x.mh, x.Dg, x.yb, x.Gb);
									break;
								case pf:
									a.quadraticCurveTo(x.Jd, x.We, x.yb, x.Gb);
									break;
								case qf:
									if (x.radiusX === x.radiusY) t = Math.PI / 180, a.arc(x.Jd, x.We, x.radiusX,
										x.ze * t, (x.ze + x.tf) * t, 0 > x.tf);
									else {
										var t = sf(x, m),
											v = t.length;
										if (0 === v) {
											a.lineTo(x.la, x.ra);
											break
										}
										for (var z = 0; z < v; z++) {
											var A = t[z];
											0 === z && a.lineTo(A[0], A[1]);
											a.bezierCurveTo(A[2], A[3], A[4], A[5], A[6], A[7])
										}
									}
									break;
								case rf:
									z = v = 0;
									if (null !== t && t.type === qf) {
										t = sf(t, m);
										A = t.length;
										if (0 === A) {
											a.lineTo(x.la, x.ra);
											break
										}
										t = t[A - 1] || null;
										null !== t && (v = t[6], z = t[7])
									} else v = null !== t ? t.C : m.ha, z = null !== t ? t.D : m.fa;
									t = tf(x, m, v, z);
									v = t.length;
									if (0 === v) {
										a.lineTo(x.la, x.ra);
										break
									}
									for (z = 0; z < v; z++) A = t[z], a.bezierCurveTo(A[2], A[3],
										A[4], A[5], A[6], A[7]);
									break;
								default:
									w.k("Segment not of valid type: " + x.na)
							}
							x.Rh && a.closePath();
							t = x
						}
						e ? (u = s = p = 0, m.Oo ? (!0 === m.Fm && null !== this.Gd ? (a.Lg(this.Gd), f = !0) : f = !1, 0 !== c && null !== this.sc && (f && (p = a.shadowOffsetX, s = a.shadowOffsetY, u = a.shadowBlur, a.shadowOffsetX = 0, a.shadowOffsetY = 0, a.shadowBlur = 0), d && !h || a.Gj(), f && (a.shadowOffsetX = p, a.shadowOffsetY = s, a.shadowBlur = u))) : (f && (p = a.shadowOffsetX, s = a.shadowOffsetY, u = a.shadowBlur, a.shadowOffsetX = 0, a.shadowOffsetY = 0, a.shadowBlur = 0), !0 === m.Fm && null !== this.Gd &&
							a.Lg(this.Gd), 0 !== c && null !== this.sc && (d && !h || a.Gj()), f && (a.shadowOffsetX = p, a.shadowOffsetY = s, a.shadowBlur = u))) : (!0 === m.Fm && null !== this.Gd && a.Lg(this.Gd), 0 === c || null === this.sc || d && !h || a.Gj())
					}
					if (d && !h)
						for (c = f, f = l.Rj, h = f.length, l = 0; l < h; l++) {
							r = f.n[l];
							a.beginPath();
							n = w.cb();
							n.push(r.ha);
							n.push(r.fa);
							q = r.ha;
							m = r.fa;
							p = q;
							s = m;
							u = r.wb.n;
							x = u.length;
							for (t = 0; t < x; t++) {
								v = u[t];
								switch (v.na) {
									case Ve:
										iq(a, n, k, this.yf);
										n.length = 0;
										n.push(v.C);
										n.push(v.D);
										q = v.C;
										m = v.D;
										p = q;
										s = m;
										break;
									case Ne:
										n.push(v.C);
										n.push(v.D);
										q = v.C;
										m = v.D;
										break;
									case We:
										Xd(q, m, v.Jd, v.We, v.mh, v.Dg, v.yb, v.Gb, .5, n);
										q = v.C;
										m = v.D;
										break;
									case pf:
										he(q, m, v.Jd, v.We, v.yb, v.Gb, .5, n);
										q = v.C;
										m = v.D;
										break;
									case qf:
										z = sf(v, r);
										A = z.length;
										if (0 === A) {
											n.push(v.la);
											n.push(v.ra);
											q = v.la;
											m = v.ra;
											break
										}
										for (var L = 0; L < A; L++) {
											var E = z[L];
											Xd(q, m, E[2], E[3], E[4], E[5], E[6], E[7], .5, n);
											q = E[6];
											m = E[7]
										}
										break;
									case rf:
										z = tf(v, r, q, m);
										A = z.length;
										if (0 === A) {
											n.push(v.la);
											n.push(v.ra);
											q = v.la;
											m = v.ra;
											break
										}
										for (L = 0; L < A; L++) E = z[L], Xd(q, m, E[2], E[3], E[4], E[5], E[6], E[7], .5, n), q = E[6], m = E[7];
										break;
									default:
										w.k("Segment not of valid type: " +
											v.na)
								}
								v.Rh && (n.push(p), n.push(s), iq(a, n, k, this.yf))
							}
							iq(a, n, k, this.yf);
							w.ta(n);
							null !== this.sc && (q = n = r = 0, c && e && (r = a.shadowOffsetX, n = a.shadowOffsetY, q = a.shadowBlur, a.shadowOffsetX = 0, a.shadowOffsetY = 0, a.shadowBlur = 0), a.Gj(), c && e && (a.shadowOffsetX = r, a.shadowOffsetY = n, a.shadowBlur = q))
						}
				}
				d && a.sA();
				if (null !== this.$x) {
					d = this.$x;
					yk(d, Infinity, Infinity);
					k = d.za;
					d.jc(0, 0, k.width, k.height);
					c = this.nf;
					a.save();
					a.beginPath();
					k = w.cb();
					if (c.type === Ge) k.push(c.ha), k.push(c.fa), k.push(c.C), k.push(c.D), hq(a, b, k, d);
					else if (c.type ===
						De)
						for (h = c.gc.i; h.next();) {
							l = h.value;
							k.length = 0;
							k.push(l.ha);
							k.push(l.fa);
							f = l.ha;
							r = l.fa;
							n = f;
							q = r;
							m = l.wb.n;
							p = m.length;
							for (s = 0; s < p; s++) {
								u = m[s];
								switch (u.na) {
									case Ve:
										hq(a, b, k, d);
										k.length = 0;
										k.push(u.C);
										k.push(u.D);
										f = u.C;
										r = u.D;
										n = f;
										q = r;
										break;
									case Ne:
										k.push(u.C);
										k.push(u.D);
										f = u.C;
										r = u.D;
										break;
									case We:
										Xd(f, r, u.Jd, u.We, u.mh, u.Dg, u.yb, u.Gb, .5, k);
										f = u.C;
										r = u.D;
										break;
									case pf:
										he(f, r, u.Jd, u.We, u.yb, u.Gb, .5, k);
										f = u.C;
										r = u.D;
										break;
									case qf:
										c = sf(u, l);
										e = c.length;
										if (0 === e) {
											k.push(u.la);
											k.push(u.ra);
											f = u.la;
											r = u.ra;
											break
										}
										for (x =
											0; x < e; x++) t = c[x], Xd(f, r, t[2], t[3], t[4], t[5], t[6], t[7], .5, k), f = t[6], r = t[7];
										break;
									case rf:
										c = tf(u, l, f, r);
										e = c.length;
										if (0 === e) {
											k.push(u.la);
											k.push(u.ra);
											f = u.la;
											r = u.ra;
											break
										}
										for (x = 0; x < e; x++) t = c[x], Xd(f, r, t[2], t[3], t[4], t[5], t[6], t[7], .5, k), f = t[6], r = t[7];
										break;
									default:
										w.k("Segment not of valid type: " + u.na)
								}
								u.Rh && (k.push(n), k.push(q), hq(a, b, k, d))
							}
							hq(a, b, k, d)
						} else if (c.type === He) k.push(c.ha), k.push(c.fa), k.push(c.C), k.push(c.fa), k.push(c.C), k.push(c.D), k.push(c.ha), k.push(c.D), k.push(c.ha), k.push(c.fa),
							hq(a, b, k, d);
						else if (c.type === Ie) {
						h = new Ee;
						h.ha = c.C;
						h.fa = (c.fa + c.D) / 2;
						f = new xf(qf);
						f.ze = 0;
						f.tf = 360;
						f.la = (c.ha + c.C) / 2;
						f.ra = (c.fa + c.D) / 2;
						f.radiusX = Math.abs(c.ha - c.C) / 2;
						f.radiusY = Math.abs(c.fa - c.D) / 2;
						h.add(f);
						c = sf(f, h);
						e = c.length;
						if (0 === e) k.push(f.la), k.push(f.ra);
						else
							for (f = h.ha, r = h.fa, x = 0; x < e; x++) t = c[x], Xd(f, r, t[2], t[3], t[4], t[5], t[6], t[7], .5, k), f = t[6], r = t[7];
						hq(a, b, k, d)
					}
					w.ta(k);
					a.restore();
					a.He(!1)
				}
			}
		}
	};

	function iq(a, b, c, d) {
		var e = b.length;
		if (!(4 > e)) {
			var f = .001,
				h = c.length,
				k = b[0],
				l = b[1];
			if (4 === e) yo(a, k, l, b[2], b[3], c, d);
			else {
				a.moveTo(k, l);
				for (var m = f = 0, n = 0, p = 0, q = 0, r = p = 0, s = w.cb(), u = 2; u < e; u += 2) f = b[u], m = b[u + 1], n = f - k, p = m - l, 0 === n && (n = .001), q = p / n, p = Math.sqrt(n * n + p * p), s.push([n, q, p]), r += p, k = f, l = m;
				k = b[0];
				l = b[1];
				b = 0;
				for (var e = !0, f = c[b % h], m = 0 !== d, u = 0, p = s[u], n = p[0], q = p[1], p = p[2], t = 0; .1 <= r;) {
					0 === t && (f = c[b % h], b++, m && (d %= f, f -= d, m = !1));
					f > r && (f = r);
					f > p ? (t = f - p, f = p) : t = 0;
					var x = Math.sqrt(f * f / (1 + q * q));
					0 > n && (x = -x);
					k += x;
					l +=
						q * x;
					e ? a.lineTo(k, l) : a.moveTo(k, l);
					r -= f;
					p -= f;
					if (0 !== t) {
						u++;
						if (u === s.length) {
							w.ta(s);
							return
						}
						p = s[u];
						n = p[0];
						q = p[1];
						p = p[2];
						f = t
					} else e = !e
				}
				w.ta(s)
			}
		}
	}
	X.prototype.getDocumentPoint = X.prototype.Wa = function(a, b) {
		void 0 === b && (b = new y);
		if (a instanceof K) {
			a.Td() && w.k("getDocumentPoint Spot must be a real, specific Spot, not: " + a.toString());
			var c = this.Ja,
				d = this.mb;
			b.m(a.x * (c.width + d) - d / 2 + c.x + a.offsetX, a.y * (c.height + d) - d / 2 + c.y + a.offsetY)
		} else b.set(a);
		this.ph.nb(b);
		return b
	};
	X.prototype.zk = function(a, b) {
		var c = this.nf;
		if (null === c || null === this.fill && null === this.stroke) return !1;
		var d = c.gb,
			e = this.mb / 2;
		c.type !== Ge || b || (e += 2);
		var f = w.Kf();
		f.assign(d);
		f.Yf(e + 2, e + 2);
		if (!f.Ia(a)) return w.Eb(f), !1;
		d = e + 1E-4;
		if (c.type === Ge) {
			if (null === this.stroke) return !1;
			d = (c.C - c.ha) * (a.x - c.ha) + (c.D - c.fa) * (a.y - c.fa);
			if (0 > (c.ha - c.C) * (a.x - c.C) + (c.fa - c.D) * (a.y - c.D) || 0 > d) return !1;
			w.Eb(f);
			return Ud(c.ha, c.fa, c.C, c.D, e, a.x, a.y)
		}
		if (c.type === He) {
			var h = c.ha,
				k = c.fa,
				l = c.C,
				c = c.D;
			f.x = Math.min(h, l);
			f.y = Math.min(k,
				c);
			f.width = Math.abs(l - h);
			f.height = Math.abs(c - k);
			if (null === this.fill) {
				f.Yf(-d, -d);
				if (f.Ia(a)) return w.Eb(f), !1;
				f.Yf(d, d)
			}
			null !== this.stroke && f.Yf(e, e);
			d = f.Ia(a);
			w.Eb(f);
			return d
		}
		if (c.type === Ie) {
			var h = c.ha,
				k = c.fa,
				l = c.C,
				c = c.D,
				e = Math.min(h, l),
				m = Math.min(k, c),
				h = Math.abs(l - h) / 2,
				k = Math.abs(c - k) / 2,
				e = a.x - (e + h),
				m = a.y - (m + k);
			if (null === this.fill) {
				h -= d;
				k -= d;
				if (0 >= h || 0 >= k || 1 >= e * e / (h * h) + m * m / (k * k)) return w.Eb(f), !1;
				h += d;
				k += d
			}
			null !== this.stroke && (h += d, k += d);
			w.Eb(f);
			return 0 >= h || 0 >= k ? !1 : 1 >= e * e / (h * h) + m * m / (k * k)
		}
		if (c.type ===
			De) return w.Eb(f), null === this.fill ? vf(c, a.x, a.y, e) : c.Ia(a, e, 1 < this.mb, b);
		w.k("Unknown Geometry type: " + c.type);
		return !1
	};
	X.prototype.Ln = function(a, b, c, d) {
		var e = this.Ca,
			f = this.ii;
		a = Math.max(a, 0);
		b = Math.max(b, 0);
		var h;
		if (null !== this.Sf) h = this.nf.gb;
		else {
			var k = this.Db,
				l = Qd[k];
			if (void 0 === l) {
				var m = jq[k];
				"string" === typeof m && (m = jq[m]);
				"function" === typeof m ? (l = m(null, 100, 100), Qd[k] = l) : w.k("Unsupported Figure: " + k)
			}
			h = l.gb
		}
		var k = h.width,
			l = h.height,
			m = h.width,
			n = h.height;
		switch (Eo(this, !0)) {
			case Pj:
				d = c = 0;
				break;
			case Fe:
				m = Math.max(a - f, 0);
				n = Math.max(b - f, 0);
				break;
			case qo:
				m = Math.max(a - f, 0);
				d = 0;
				break;
			case po:
				c = 0, n = Math.max(b - f, 0)
		}
		isFinite(e.width) &&
			(m = e.width);
		isFinite(e.height) && (n = e.height);
		e = this.Gf;
		h = this.qi;
		c = Math.max(c, h.width) - f;
		d = Math.max(d, h.height) - f;
		m = Math.min(e.width, m);
		n = Math.min(e.height, n);
		m = isFinite(m) ? Math.max(c, m) : Math.max(k, c);
		n = isFinite(n) ? Math.max(d, n) : Math.max(l, d);
		c = Qj(this);
		switch (c) {
			case Pj:
				break;
			case Fe:
				k = m;
				l = n;
				break;
			case Rj:
				c = Math.min(m / k, n / l);
				isFinite(c) || (c = 1);
				k *= c;
				l *= c;
				break;
			default:
				w.k(c + " is not a valid geometryStretch.")
		}
		null !== this.Sf ? (k = Math.max(k, .01), l = Math.max(l, .01), h = null !== this.Sf ? this.Sf : this.Ua, e = k,
			d = l, c = h.copy(), h = h.gb, e /= h.width, d /= h.height, isFinite(e) || (e = 1), isFinite(d) || (d = 1), 1 === e && 1 === d || c.scale(e, d), this.Ua = c) : null !== this.Ua && Wa(this.Ua.No, a - f) && Wa(this.Ua.Lo, b - f) || (this.Ua = X.makeGeometry(this, k, l));
		h = this.Ua.gb;
		Infinity === a || Infinity === b ? Bo(this, h.x - f / 2, h.y - f / 2, 0 === a && 0 === k ? 0 : h.width + f, 0 === b && 0 === l ? 0 : h.height + f) : Bo(this, -(f / 2), -(f / 2), m + f, n + f)
	};

	function Qp(a, b, c, d) {
		if (!1 !== Em(a)) {
			a.ud.Qa();
			var e = a.ii;
			0 === e && d instanceof kh && d.type === ij && d.tb instanceof X && (e = d.tb.mb);
			e *= a.vb;
			d instanceof W && null !== d.Ua ? (b = d.Ua.gb, Bo(a, b.x - e / 2, b.y - e / 2, b.width + e, b.height + e)) : Bo(a, -(e / 2), -(e / 2), b + e, c + e);
			a.ud.freeze();
			a.ud.I() || w.k("Non-real measuredBounds has been set. Object " + a + ", measuredBounds: " + a.ud.toString());
			cm(a, !1)
		}
	}

	function Qj(a) {
		var b = a.BA;
		return null !== a.Sf ? b === oo ? Fe : b : b === oo ? Qd[a.Db].ae : b
	}
	X.prototype.mj = function(a, b, c, d) {
		Go(this, a, b, c, d)
	};
	X.prototype.getNearestIntersectionPoint = X.prototype.jF = function(a, b, c) {
		return this.zn(a.x, a.y, b.x, b.y, c)
	};
	X.prototype.zn = function(a, b, c, d, e) {
		var f = this.transform,
			h = 1 / (f.m11 * f.m22 - f.m12 * f.m21),
			k = f.m22 * h,
			l = -f.m12 * h,
			m = -f.m21 * h,
			n = f.m11 * h,
			p = h * (f.m21 * f.dy - f.m22 * f.dx),
			q = h * (f.m12 * f.dx - f.m11 * f.dy),
			f = a * k + b * m + p,
			h = a * l + b * n + q,
			k = c * k + d * m + p,
			l = c * l + d * n + q,
			m = this.mb / 2,
			p = this.Ua;
		null === p && (yk(this, Infinity, Infinity), p = this.Ua);
		q = p.gb;
		n = !1;
		if (p.type === Ge)
			if (1.5 >= this.mb) n = ke(p.Cc, p.Mc, p.yb, p.Gb, f, h, k, l, e);
			else {
				var r = 0,
					s = 0;
				p.Cc === p.yb ? (r = m, s = 0) : (b = (p.Gb - p.Mc) / (p.yb - p.Cc), s = m / Math.sqrt(1 + b * b), r = s * b);
				d = w.cb();
				b = new y;
				ke(p.Cc +
					r, p.Mc + s, p.yb + r, p.Gb + s, f, h, k, l, b) && d.push(b);
				b = new y;
				ke(p.Cc - r, p.Mc - s, p.yb - r, p.Gb - s, f, h, k, l, b) && d.push(b);
				b = new y;
				ke(p.Cc + r, p.Mc + s, p.Cc - r, p.Mc - s, f, h, k, l, b) && d.push(b);
				b = new y;
				ke(p.yb + r, p.Gb + s, p.yb - r, p.Gb - s, f, h, k, l, b) && d.push(b);
				b = d.length;
				if (0 === b) return w.ta(d), !1;
				n = !0;
				s = Infinity;
				for (r = 0; r < b; r++) {
					var k = d[r],
						u = (k.x - f) * (k.x - f) + (k.y - h) * (k.y - h);
					u < s && (s = u, e.x = k.x, e.y = k.y)
				}
				w.ta(d)
			}
		else if (p.type === He) b = q.x - m, n = le(b, q.y - m, q.x + q.width + m, q.y + q.height + m, f, h, k, l, e);
		else if (p.type === Ie) a: if (b = q.copy().Yf(m,
					m), 0 === b.width) n = ke(b.x, b.y, b.x, b.y + b.height, f, h, k, l, e);
			else if (0 === b.height) n = ke(b.x, b.y, b.x + b.width, b.y, f, h, k, l, e);
		else {
			a = b.width / 2;
			var t = b.height / 2;
			d = b.x + a;
			b = b.y + t;
			c = 9999;
			f !== k && (c = (h - l) / (f - k));
			if (9999 > Math.abs(c)) {
				n = h - b - c * (f - d);
				if (0 > a * a * c * c + t * t - n * n) {
					e.x = NaN;
					e.y = NaN;
					n = !1;
					break a
				}
				m = Math.sqrt(a * a * c * c + t * t - n * n);
				k = (-(a * a * c * n) + a * t * m) / (t * t + a * a * c * c) + d;
				a = (-(a * a * c * n) - a * t * m) / (t * t + a * a * c * c) + d;
				l = c * (k - d) + n + b;
				b = c * (a - d) + n + b;
				d = Math.abs((f - k) * (f - k)) + Math.abs((h - l) * (h - l));
				h = Math.abs((f - a) * (f - a)) + Math.abs((h - b) * (h -
					b));
				d < h ? (e.x = k, e.y = l) : (e.x = a, e.y = b)
			} else {
				k = t * t;
				l = f - d;
				k -= k / (a * a) * l * l;
				if (0 > k) {
					e.x = NaN;
					e.y = NaN;
					n = !1;
					break a
				}
				m = Math.sqrt(k);
				l = b + m;
				b -= m;
				d = Math.abs(l - h);
				h = Math.abs(b - h);
				d < h ? (e.x = f, e.y = l) : (e.x = f, e.y = b)
			}
			n = !0
		} else if (p.type === De) {
			var x = 0,
				v = 0,
				z = u = 0,
				q = w.K(),
				r = k - f,
				s = l - h,
				s = r * r + s * s;
			e.x = k;
			e.y = l;
			for (r = 0; r < p.gc.count; r++)
				for (var A = p.gc.n[r], L = A.wb, x = A.ha, v = A.fa, E = x, P = v, $ = 0; $ < L.count; $++) {
					var S = L.n[$],
						ba = S.type,
						u = S.C,
						z = S.D,
						ha = !1;
					switch (ba) {
						case Ve:
							E = u;
							P = z;
							break;
						case Ne:
							ha = kq(x, v, u, z, f, h, k, l, q);
							break;
						case We:
							var ha =
								S.wc,
								ba = S.Rc,
								ya = S.Ch,
								Ga = S.Dh,
								ha = ie(x, v, ha, ba, ya, Ga, u, z, f, h, k, l, .5, q);
							break;
						case pf:
							ha = (x + 2 * S.wc) / 3;
							ba = (v + 2 * S.Rc) / 3;
							ya = (2 * S.wc + u) / 3;
							Ga = (2 * S.wc + u) / 3;
							ha = ie(x, v, ha, ba, ya, Ga, u, z, f, h, k, l, .5, q);
							break;
						case qf:
						case rf:
							ba = S.type === qf ? sf(S, A) : tf(S, A, x, v);
							ya = ba.length;
							if (0 === ya) {
								ha = kq(x, v, S.la, S.ra, f, h, k, l, q);
								break
							}
							for (z = 0; z < ya; z++) t = ba[z], 0 === z && kq(x, v, t[0], t[1], f, h, k, l, q) && (u = lq(f, h, q, s, e), u < s && (s = u, n = !0)), ie(t[0], t[1], t[2], t[3], t[4], t[5], t[6], t[7], f, h, k, l, .5, q) && (u = lq(f, h, q, s, e), u < s && (s = u, n = !0));
							u = t[6];
							z =
								t[7];
							break;
						default:
							w.k("Unknown Segment type: " + ba)
					}
					x = u;
					v = z;
					ha && (u = lq(f, h, q, s, e), u < s && (s = u, n = !0));
					S.Gx && (u = E, z = P, kq(x, v, u, z, f, h, k, l, q) && (u = lq(f, h, q, s, e), u < s && (s = u, n = !0)))
				}
			f = c - a;
			h = d - b;
			b = Math.sqrt(f * f + h * h);
			0 !== b && (f /= b, h /= b);
			e.x -= f * m;
			e.y -= h * m;
			w.v(q)
		} else w.k("Unknown Geometry type: " + p.type);
		if (!n) return !1;
		this.transform.nb(e);
		return !0
	};

	function lq(a, b, c, d, e) {
		a = c.x - a;
		b = c.y - b;
		b = a * a + b * b;
		return b < d ? (e.x = c.x, e.y = c.y, b) : d
	}

	function kq(a, b, c, d, e, f, h, k, l) {
		var m = !1,
			n = (e - h) * (b - d) - (f - k) * (a - c);
		if (0 === n) return !1;
		l.x = ((e * k - f * h) * (a - c) - (e - h) * (a * d - b * c)) / n;
		l.y = ((e * k - f * h) * (b - d) - (f - k) * (a * d - b * c)) / n;
		(a > c ? a - c : c - a) < (b > d ? b - d : d - b) ? (e = b < d ? b : d, a = b < d ? d : b, (l.y > e || Wa(l.y, e)) && (l.y < a || Wa(l.y, a)) && (m = !0)) : (e = a < c ? a : c, a = a < c ? c : a, (l.x > e || Wa(l.x, e)) && (l.x < a || Wa(l.x, a)) && (m = !0));
		return m
	}
	X.prototype.containedInRect = X.prototype.pn = function(a, b) {
		if (void 0 === b) return a.Ak(this.Y);
		var c = this.Ua;
		null === c && (yk(this, Infinity, Infinity), c = this.Ua);
		var c = c.gb,
			d = this.mb / 2,
			e = !1,
			f = w.K();
		f.m(c.x - d, c.y - d);
		a.Ia(b.nb(f)) && (f.m(c.x - d, c.bottom + d), a.Ia(b.nb(f)) && (f.m(c.right + d, c.bottom + d), a.Ia(b.nb(f)) && (f.m(c.right + d, c.y - d), a.Ia(b.nb(f)) && (e = !0))));
		w.v(f);
		return e
	};
	X.prototype.intersectsRect = X.prototype.Zf = function(a, b) {
		if (this.pn(a, b) || void 0 === b && (b = this.transform, a.Ak(this.Y))) return !0;
		var c = w.Wg();
		c.set(b);
		c.NA();
		var d = a.left,
			e = a.right,
			f = a.top,
			h = a.bottom,
			k = w.K();
		k.m(d, f);
		c.nb(k);
		if (this.zk(k, !0)) return w.v(k), !0;
		k.m(e, f);
		c.nb(k);
		if (this.zk(k, !0)) return w.v(k), !0;
		k.m(d, h);
		c.nb(k);
		if (this.zk(k, !0)) return w.v(k), !0;
		k.m(e, h);
		c.nb(k);
		if (this.zk(k, !0)) return w.v(k), !0;
		var l = w.K(),
			m = w.K();
		c.set(b);
		c.RF(this.transform);
		c.NA();
		l.x = e;
		l.y = f;
		l.transform(c);
		k.x = d;
		k.y =
			f;
		k.transform(c);
		var n = !1;
		mq(this, k, l, m) ? n = !0 : (k.x = e, k.y = h, k.transform(c), mq(this, k, l, m) ? n = !0 : (l.x = d, l.y = h, l.transform(c), mq(this, k, l, m) ? n = !0 : (k.x = d, k.y = f, k.transform(c), mq(this, k, l, m) && (n = !0))));
		w.v(k);
		w.af(c);
		w.v(l);
		w.v(m);
		return n
	};

	function mq(a, b, c, d) {
		if (!a.jF(b, c, d)) return !1;
		a = b.x;
		b = b.y;
		var e = c.x;
		c = c.y;
		var f = d.x;
		d = d.y;
		if (a === e) {
			var h = 0;
			a = 0;
			b < c ? (h = b, a = c) : (h = c, a = b);
			return d >= h && d <= a
		}
		a < e ? (h = a, a = e) : h = e;
		return f >= h && f <= a
	}
	X.prototype.cF = function(a, b, c) {
		function d(a, b) {
			for (var c = a.length, d = 0; d < c; d += 2)
				if (b.Qp(a[d], a[d + 1]) > e) return !0;
			return !1
		}
		if (c && null !== this.fill && this.zk(a, !0)) return !0;
		var e = a.Bf(b);
		b = e;
		1.5 < this.mb && (e = this.mb / 2 + Math.sqrt(e), e *= e);
		var f = this.Ua;
		if (null === f && (yk(this, Infinity, Infinity), f = this.Ua, null === f)) return !1;
		if (!c) {
			var h = f.gb,
				k = h.x,
				l = h.y,
				m = h.x + h.width,
				h = h.y + h.height;
			if (Sa(a.x, a.y, k, l) <= e && Sa(a.x, a.y, m, l) <= e && Sa(a.x, a.y, k, h) <= e && Sa(a.x, a.y, m, h) <= e) return !0
		}
		k = f.Cc;
		l = f.Mc;
		m = f.yb;
		h = f.Gb;
		if (f.type ===
			Ge) {
			if (c = Ra(a.x, a.y, k, l, m, h), f = (k - m) * (a.x - m) + (l - h) * (a.y - h), c <= (0 <= (m - k) * (a.x - k) + (h - l) * (a.y - l) && 0 <= f ? e : b)) return !0
		} else {
			if (f.type === He) return b = !1, c && (b = Ra(a.x, a.y, k, l, k, h) <= e || Ra(a.x, a.y, k, l, m, l) <= e || Ra(a.x, a.y, m, l, m, h) <= e || Ra(a.x, a.y, k, h, m, h) <= e), b;
			if (f.type === Ie) {
				b = a.x - (k + m) / 2;
				var f = a.y - (l + h) / 2,
					n = Math.abs(m - k) / 2,
					p = Math.abs(h - l) / 2;
				if (0 === n || 0 === p) return c = Ra(a.x, a.y, k, l, m, h), c <= e ? !0 : !1;
				if (c) {
					if (a = Be(n, p, b, f), a * a <= e) return !0
				} else return Sa(b, f, -n, 0) >= e || Sa(b, f, 0, -p) >= e || Sa(b, f, 0, p) >= e || Sa(b, f, n, 0) >=
					e ? !1 : !0
			} else if (f.type === De) {
				h = f.gb;
				k = h.x;
				l = h.y;
				m = h.x + h.width;
				h = h.y + h.height;
				if (a.x > m && a.x < k && a.y > h && a.y < l && Ra(a.x, a.y, k, l, k, h) > e && Ra(a.x, a.y, k, l, m, l) > e && Ra(a.x, a.y, m, h, k, h) > e && Ra(a.x, a.y, m, h, m, l) > e) return !1;
				b = Math.sqrt(e);
				if (c) {
					if (null === this.fill ? vf(f, a.x, a.y, b) : f.Ia(a, b, !0)) return !0
				} else {
					c = f.gc;
					for (b = 0; b < c.count; b++) {
						k = c.n[b];
						n = k.ha;
						p = k.fa;
						if (a.Qp(n, p) > e) return !1;
						l = k.wb.n;
						m = l.length;
						for (h = 0; h < m; h++) {
							var q = l[h];
							switch (q.type) {
								case Ve:
								case Ne:
									n = q.C;
									p = q.D;
									if (a.Qp(n, p) > e) return !1;
									break;
								case We:
									f = w.cb();
									Xd(n, p, q.wc, q.Rc, q.Ch, q.Dh, q.C, q.D, .8, f);
									n = d(f, a);
									w.ta(f);
									if (n) return !1;
									n = q.C;
									p = q.D;
									if (a.Qp(n, p) > e) return !1;
									break;
								case pf:
									f = w.cb();
									he(n, p, q.wc, q.Rc, q.C, q.D, .8, f);
									n = d(f, a);
									w.ta(f);
									if (n) return !1;
									n = q.C;
									p = q.D;
									if (a.Qp(n, p) > e) return !1;
									break;
								case qf:
								case rf:
									var r = q.type === qf ? sf(q, k) : tf(q, k, n, p),
										s = r.length;
									if (0 === s) {
										n = q.la;
										p = q.ra;
										if (a.Qp(n, p) > e) return !1;
										break
									}
									q = null;
									f = w.cb();
									for (b = 0; b < s; b++)
										if (q = r[b], f.length = 0, Xd(q[0], q[1], q[2], q[3], q[4], q[5], q[6], q[7], .8, f), d(f, a)) return w.ta(f), !1;
									w.ta(f);
									null !== q && (n =
										q[6], p = q[7]);
									break;
								default:
									w.k("Unknown Segment type: " + q.type)
							}
						}
					}
					return !0
				}
			}
		}
		return !1
	};
	w.defineProperty(X, {
		nf: "geometry"
	}, function() {
		return null !== this.Ua ? this.Ua : this.Sf
	}, function(a) {
		var b = this.Ua;
		if (b !== a) {
			this.Sf = null !== a ? this.Ua = a.freeze() : this.Ua = null;
			var c = this.U;
			null !== c && (c.hk = NaN);
			this.H();
			this.h("geometry", b, a);
			zo(this) && (a = this.U, null !== a && Ao(this, a, "geometryString"))
		}
	});
	w.defineProperty(X, {
		aI: "geometryString"
	}, function() {
		return null === this.nf ? "" : this.nf.toString()
	}, function(a) {
		a = Pe(a);
		var b = a.normalize();
		this.nf = a;
		this.position = a = w.xb(-b.x, -b.y);
		w.v(a)
	});
	w.defineProperty(X, {
		AF: "isGeometryPositioned"
	}, function() {
		return this.Qr
	}, function(a) {
		var b = this.Qr;
		b !== a && (this.Qr = a, this.H(), this.h("isGeometryPositioned", b, a))
	});
	X.prototype.Me = function() {
		this.Ua = null
	};
	w.defineProperty(X, {
		fill: "fill"
	}, function() {
		return this.Gd
	}, function(a) {
		var b = this.Gd;
		b !== a && (a instanceof ga && a.freeze(), this.Gd = a, this.oa(), this.h("fill", b, a))
	});
	w.defineProperty(X, {
		stroke: "stroke"
	}, function() {
		return this.sc
	}, function(a) {
		var b = this.sc;
		b !== a && (a instanceof ga && a.freeze(), this.sc = a, this.oa(), this.h("stroke", b, a))
	});
	w.defineProperty(X, {
		mb: "strokeWidth"
	}, function() {
		return this.ii
	}, function(a) {
		var b = this.ii;
		if (b !== a)
			if (0 <= a) {
				this.ii = a;
				this.H();
				var c = this.U;
				null !== c && (c.hk = NaN);
				this.h("strokeWidth", b, a)
			} else w.Fa(a, "value >= 0", X, "strokeWidth:value")
	});
	w.defineProperty(X, {
		UL: "strokeCap"
	}, function() {
		return this.pp
	}, function(a) {
		var b = this.pp;
		b !== a && ("string" !== typeof a || "butt" !== a && "round" !== a && "square" !== a ? w.Fa(a, '"butt", "round", or "square"', X, "strokeCap") : (this.pp = a, this.oa(), this.h("strokeCap", b, a)))
	});
	w.defineProperty(X, {
		WL: "strokeJoin"
	}, function() {
		return this.rp
	}, function(a) {
		var b = this.rp;
		b !== a && ("string" !== typeof a || "miter" !== a && "bevel" !== a && "round" !== a ? w.Fa(a, '"miter", "bevel", or "round"', X, "strokeJoin") : (this.rp = a, this.oa(), this.h("strokeJoin", b, a)))
	});
	w.defineProperty(X, {
		XL: "strokeMiterLimit"
	}, function() {
		return this.en
	}, function(a) {
		var b = this.en;
		if (b !== a)
			if (1 <= a) {
				this.en = a;
				this.oa();
				var c = this.U;
				null !== c && (c.hk = NaN);
				this.h("strokeMiterLimit", b, a)
			} else w.Fa(a, "value >= 1", X, "strokeWidth:value")
	});
	w.defineProperty(X, {
		xG: "strokeDashArray"
	}, function() {
		return this.qp
	}, function(a) {
		var b = this.qp;
		if (b !== a) {
			null === a || Array.isArray(a) || w.Ed(a, "Array", X, "strokeDashArray:value");
			if (null !== a) {
				for (var c = a.length, d = 0, e = 0; e < c; e++) {
					var f = a[e];
					"number" === typeof f && 0 <= f && isFinite(f) || w.k("strokeDashArray:value " + f + " at index " + e + " must be a positive number or zero.");
					d += f
				}
				if (0 === d) {
					if (null === b) return;
					a = null
				}
			}
			this.qp = a;
			this.oa();
			this.h("strokeDashArray", b, a)
		}
	});
	w.defineProperty(X, {
		VL: "strokeDashOffset"
	}, function() {
		return this.yf
	}, function(a) {
		var b = this.yf;
		b !== a && 0 <= a && (this.yf = a, this.oa(), this.h("strokeDashOffset", b, a))
	});
	w.defineProperty(X, {
		Db: "figure"
	}, function() {
		return this.Do
	}, function(a) {
		var b = this.Do;
		if (b !== a) {
			var c = jq[a];
			"function" === typeof c ? c = a : (c = jq[a.toLowerCase()]) || w.k("Unknown Shape.figure: " + a);
			b !== c && (a = this.U, null !== a && (a.hk = NaN), this.Do = c, this.Sf = null, this.Me(), this.H(), this.h("figure", b, c))
		}
	});
	w.defineProperty(X, {
		Dq: "toArrow"
	}, function() {
		return this.xp
	}, function(a) {
		var b = this.xp;
		!0 === a ? a = "Standard" : !1 === a && (a = "");
		if (b !== a) {
			var c = nq(a);
			null === c ? w.k("Unknown Shape.toArrow: " + a) : b !== c && (this.xp = c, this.Sf = null, this.Me(), this.H(), oq(this), this.h("toArrow", b, c))
		}
	});
	w.defineProperty(X, {
		zA: "fromArrow"
	}, function() {
		return this.Fo
	}, function(a) {
		var b = this.Fo;
		!0 === a ? a = "Standard" : !1 === a && (a = "");
		if (b !== a) {
			var c = nq(a);
			null === c ? w.k("Unknown Shape.fromArrow: " + a) : b !== c && (this.Fo = c, this.Sf = null, this.Me(), this.H(), oq(this), this.h("fromArrow", b, c))
		}
	});

	function oq(a) {
		var b = a.g;
		null !== b && b.ja.lb || (a.wq = pq, "None" !== a.xp ? (a.Oe = -1, a.oh = Ic) : "None" !== a.Fo && (a.Oe = 0, a.oh = new K(1 - Ic.x, Ic.y)))
	}
	w.defineProperty(X, {
		A: "spot1"
	}, function() {
		return this.gi
	}, function(a) {
		w.G(a, K, X, "spot1");
		var b = this.gi;
		b.L(a) || (this.gi = a = a.S(), this.H(), this.h("spot1", b, a))
	});
	w.defineProperty(X, {
		B: "spot2"
	}, function() {
		return this.hi
	}, function(a) {
		w.G(a, K, X, "spot2");
		var b = this.hi;
		b.L(a) || (this.hi = a = a.S(), this.H(), this.h("spot2", b, a))
	});
	w.defineProperty(X, {
		Hc: "parameter1"
	}, function() {
		return this.Is
	}, function(a) {
		var b = this.Is;
		b !== a && (this.Is = a, this.Me(), this.H(), this.h("parameter1", b, a))
	});
	w.defineProperty(X, {
		Ku: "parameter2"
	}, function() {
		return this.Js
	}, function(a) {
		var b = this.Js;
		b !== a && (this.Js = a, this.Me(), this.H(), this.h("parameter2", b, a))
	});
	w.u(X, {
		Ja: "naturalBounds"
	}, function() {
		if (null !== this.Ua) return this.Wc.assign(this.Ua.gb), this.Wc;
		var a = this.Ca;
		return new B(0, 0, a.width, a.height)
	});
	w.defineProperty(X, {
		$x: "pathPattern"
	}, function() {
		return this.Ls
	}, function(a) {
		var b = this.Ls;
		b !== a && (this.Ls = a, this.oa(), this.h("pathPattern", b, a))
	});
	w.defineProperty(X, {
		KL: "pathObject"
	}, function() {
		return this.$x
	}, function(a) {
		this.$x = a
	});
	w.defineProperty(X, {
		BA: "geometryStretch"
	}, function() {
		return this.Fr
	}, function(a) {
		var b = this.Fr;
		b !== a && (w.ob(a, G, X, "geometryStretch"), this.Fr = a, this.h("geometryStretch", b, a))
	});
	w.defineProperty(X, {
		interval: "interval"
	}, function() {
		return this.ug
	}, function(a) {
		var b = this.ug;
		a = Math.floor(a);
		if (b !== a && 0 <= a) {
			this.ug = a;
			var c = this.g;
			null !== c && this.Q === c.Bn && dm(c);
			this.H();
			c = this.Q;
			null !== c && c.type === ip && (c.Xj = null);
			this.h("interval", b, a)
		}
	});
	w.defineProperty(X, {
		nF: "graduatedStart"
	}, function() {
		return this.tg
	}, function(a) {
		var b = this.tg;
		b !== a && (0 > a ? a = 0 : 1 < a && (a = 1), this.tg = a, this.H(), this.h("graduatedStart", b, a))
	});
	w.defineProperty(X, {
		lF: "graduatedEnd"
	}, function() {
		return this.sg
	}, function(a) {
		var b = this.sg;
		b !== a && (0 > a ? a = 0 : 1 < a && (a = 1), this.sg = a, this.H(), this.h("graduatedEnd", b, a))
	});
	X.makeGeometry = function(a, b, c) {
		var d = null;
		if ("None" !== a.Dq) d = Rd[a.Dq];
		else if ("None" !== a.zA) d = Rd[a.zA];
		else {
			var e = jq[a.Db];
			"string" === typeof e && (e = jq[e]);
			void 0 === e && w.k("Unknown Shape.figure: " + a.Db);
			d = e(a, b, c);
			d.No = b;
			d.Lo = c
		}
		null === d && (e = jq.Rectangle, "function" === typeof e && (d = e(a, b, c)));
		return d
	};
	X.getFigureGenerators = function() {
		var a = new ma("string", "function"),
			b;
		for (b in jq)
			if (b !== b.toLowerCase()) {
				var c = jq[b];
				"function" === typeof c && a.add(b, c)
			}
		a.freeze();
		return a
	};
	X.defineFigureGenerator = function(a, b) {
		w.j(a, "string", X, "defineFigureGenerator:name");
		"string" === typeof b ? "" !== b && jq[b] || w.k("Shape.defineFigureGenerator synonym must not be empty or None or not a defined figure name: " + b) : w.j(b, "function", X, "defineFigureGenerator:func");
		var c = a.toLowerCase();
		"" !== a && "none" !== c && a !== c || w.k("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: " + a);
		jq[a] = b;
		jq[c] = a
	};
	X.getArrowheadGeometries = function() {
		var a = new ma("string", Ce),
			b;
		for (b in qq)
			if (void 0 === Rd[b]) {
				var c = Pe(qq[b], !1);
				Rd[b] = c;
				c = b.toLowerCase();
				c !== b && (Rd[c] = b)
			}
		for (b in Rd) b !== b.toLowerCase() && (c = Rd[b], c instanceof Ce && a.add(b, c));
		a.freeze();
		return a
	};
	X.defineArrowheadGeometry = function(a, b) {
		w.j(a, "string", X, "defineArrowheadGeometry:name");
		var c = null;
		"string" === typeof b ? (w.j(b, "string", X, "defineArrowheadGeometry:pathstr"), c = Pe(b, !1)) : (w.G(b, Ce, X, "defineArrowheadGeometry:pathstr"), c = b);
		var d = a.toLowerCase();
		"" !== a && "none" !== d && a !== d || w.k("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: " + a);
		Rd[a] = c;
		Rd[d] = a
	};

	function Lh() {
		G.call(this);
		this.Md = "";
		this.sc = "black";
		this.qg = "13px sans-serif";
		this.Cl = "start";
		this.pg = Pj;
		this.Gl = yc;
		this.Gm = !0;
		this.ak = this.ck = !1;
		this.$i = rq;
		this.kj = sq;
		this.jw = this.me = 0;
		this.Az = this.Bz = null;
		this.xf = new Wp;
		this.yr = !1;
		this.Ue = this.Xq = this.tt = this.Dl = this.ut = null;
		this.fi = this.ei = 0;
		this.gh = Infinity;
		this.To = 0;
		this.ug = 1;
		this.tg = 0;
		this.sg = 1;
		this.Cm = null
	}
	w.La(Lh, G);
	w.ga("TextBlock", Lh);
	var tq = /[ \u200b\u00ad]/;
	Lh.prototype.cloneProtected = function(a) {
		G.prototype.cloneProtected.call(this, a);
		a.Md = this.Md;
		a.sc = this.sc;
		a.qg = this.qg;
		a.Cl = this.Cl;
		a.pg = this.pg;
		a.Gl = this.Gl;
		a.Gm = this.Gm;
		a.ck = this.ck;
		a.ak = this.ak;
		a.$i = this.$i;
		a.kj = this.kj;
		a.me = this.me;
		a.jw = this.jw;
		a.Bz = this.Bz;
		a.Az = this.Az;
		a.xf.Kp(this.xf);
		a.yr = this.yr;
		a.ut = this.ut;
		a.Dl = this.Dl;
		a.tt = this.tt;
		a.Xq = this.Xq;
		a.Ue = this.Ue;
		a.ei = this.ei;
		a.fi = this.fi;
		a.gh = this.gh;
		a.To = this.To;
		a.ug = this.ug;
		a.tg = this.tg;
		a.sg = this.sg;
		a.Cm = this.Cm
	};
	Lh.prototype.ic = function(a) {
		a.Ge === Lh ? this.LG = a : G.prototype.ic.call(this, a)
	};
	Lh.prototype.toString = function() {
		return 22 < this.Md.length ? 'TextBlock("' + this.Md.substring(0, 20) + '"...)' : 'TextBlock("' + this.Md + '")'
	};
	var uq = new ra,
		vq = 0,
		wq = new ra,
		xq = 0,
		yq = "...",
		zq = "",
		Aq = (new Wc(null)).Bk;
	Lh.getEllipsis = function() {
		return yq
	};
	Lh.setEllipsis = function(a) {
		yq = a;
		wq = new ra;
		xq = 0
	};
	var Bq;
	Lh.None = Bq = w.p(Lh, "None", 0);
	var Cq;
	Lh.WrapFit = Cq = w.p(Lh, "WrapFit", 1);
	var sq;
	Lh.WrapDesiredSize = sq = w.p(Lh, "WrapDesiredSize", 2);
	var Dq;
	Lh.WrapBreakAll = Dq = w.p(Lh, "WrapBreakAll", 3);
	var rq;
	Lh.OverflowClip = rq = w.p(Lh, "OverflowClip", 0);
	var Eq;
	Lh.OverflowEllipsis = Eq = w.p(Lh, "OverflowEllipsis", 1);
	Lh.prototype.H = function() {
		G.prototype.H.call(this);
		this.Az = this.Bz = null
	};
	w.defineProperty(Lh, {
		font: "font"
	}, function() {
		return this.qg
	}, function(a) {
		var b = this.qg;
		b !== a && (this.qg = a, this.xf.Sj = null, this.H(), this.h("font", b, a))
	});
	Lh.isValidFont = function(a) {
		var b = Aq.font;
		if (a === b || "10px sans-serif" === a) return !0;
		Aq.font = "10px sans-serif";
		var c;
		Aq.font = a;
		var d = Aq.font;
		if ("10px sans-serif" !== d) return Aq.font = b, !0;
		Aq.font = "19px serif";
		c = Aq.font;
		Aq.font = a;
		d = Aq.font;
		Aq.font = b;
		return d !== c
	};
	w.defineProperty(Lh, {
		text: "text"
	}, function() {
		return this.Md
	}, function(a) {
		var b = this.Md;
		a = null !== a && void 0 !== a ? a.toString() : "";
		b !== a && (this.Md = a, this.H(), this.h("text", b, a))
	});
	w.defineProperty(Lh, {
		textAlign: "textAlign"
	}, function() {
		return this.Cl
	}, function(a) {
		var b = this.Cl;
		b !== a && ("start" === a || "end" === a || "left" === a || "right" === a || "center" === a ? (this.Cl = a, this.oa(), this.h("textAlign", b, a)) : w.Fa(a, '"start", "end", "left", "right", or "center"', Lh, "textAlign"))
	});
	w.defineProperty(Lh, {
		au: "flip"
	}, function() {
		return this.pg
	}, function(a) {
		var b = this.pg;
		b !== a && (w.ob(a, G, Lh, "flip"), this.pg = a, this.oa(), this.h("flip", b, a))
	});
	w.defineProperty(Lh, {
		cM: "verticalAlignment"
	}, function() {
		return this.Gl
	}, function(a) {
		var b = this.Gl;
		b.L(a) || (a.Td() && w.k("TextBlock.verticalAlignment for " + this + " must be a real Spot, not:" + a), this.Gl = a = a.S(), Ro(this), this.h("verticalAlignment", b, a))
	});
	w.u(Lh, {
		Ja: "naturalBounds"
	}, function() {
		if (!this.Wc.I()) {
			var a = Fq(this, this.Md, this.xf, 999999).width,
				b = Gq(this, a, this.xf),
				c = this.Ca;
			isNaN(c.width) || (a = c.width);
			isNaN(c.height) || (b = c.height);
			Ua(this.Wc, a, b)
		}
		return this.Wc
	});
	w.defineProperty(Lh, {
		Kx: "isMultiline"
	}, function() {
		return this.Gm
	}, function(a) {
		var b = this.Gm;
		b !== a && (this.Gm = a, this.H(), this.h("isMultiline", b, a))
	});
	w.defineProperty(Lh, {
		kL: "isUnderline"
	}, function() {
		return this.ck
	}, function(a) {
		var b = this.ck;
		b !== a && (this.ck = a, this.oa(), this.h("isUnderline", b, a))
	});
	w.defineProperty(Lh, {
		jL: "isStrikethrough"
	}, function() {
		return this.ak
	}, function(a) {
		var b = this.ak;
		b !== a && (this.ak = a, this.oa(), this.h("isStrikethrough", b, a))
	});
	w.defineProperty(Lh, {
		LG: "wrap"
	}, function() {
		return this.kj
	}, function(a) {
		var b = this.kj;
		b !== a && (this.kj = a, this.H(), this.h("wrap", b, a))
	});
	w.defineProperty(Lh, {
		overflow: "overflow"
	}, function() {
		return this.$i
	}, function(a) {
		var b = this.$i;
		b !== a && (this.$i = a, this.H(), this.h("overflow", b, a))
	});
	w.defineProperty(Lh, {
		stroke: "stroke"
	}, function() {
		return this.sc
	}, function(a) {
		var b = this.sc;
		b !== a && (a instanceof ga && a.freeze(), this.sc = a, this.oa(), this.h("stroke", b, a))
	});
	w.u(Lh, {
		UA: "lineCount"
	}, function() {
		return this.me
	});
	w.defineProperty(Lh, {
		uA: "editable"
	}, function() {
		return this.yr
	}, function(a) {
		var b = this.yr;
		b !== a && (this.yr = a, this.h("editable", b, a))
	});
	w.defineProperty(Lh, {
		zG: "textEditor"
	}, function() {
		return this.ut
	}, function(a) {
		var b = this.ut;
		b !== a && (this.ut = a, this.h("textEditor", b, a))
	});
	w.defineProperty(Lh, {
		wA: "errorFunction"
	}, function() {
		return this.Ue
	}, function(a) {
		var b = this.Ue;
		b !== a && (null !== a && w.j(a, "function", Lh, "errorFunction"), this.Ue = a, this.h("errorFunction", b, a))
	});
	w.defineProperty(Lh, {
		interval: "interval"
	}, function() {
		return this.ug
	}, function(a) {
		var b = this.ug;
		a = Math.floor(a);
		if (b !== a && 0 <= a) {
			this.ug = a;
			this.H();
			var c = this.Q;
			null !== c && c.type === ip && (c.Xj = null);
			this.h("interval", b, a)
		}
	});
	w.defineProperty(Lh, {
		nF: "graduatedStart"
	}, function() {
		return this.tg
	}, function(a) {
		var b = this.tg;
		b !== a && (0 > a ? a = 0 : 1 < a && (a = 1), this.tg = a, this.H(), this.h("graduatedStart", b, a))
	});
	w.defineProperty(Lh, {
		lF: "graduatedEnd"
	}, function() {
		return this.sg
	}, function(a) {
		var b = this.sg;
		b !== a && (0 > a ? a = 0 : 1 < a && (a = 1), this.sg = a, this.H(), this.h("graduatedEnd", b, a))
	});
	w.defineProperty(Lh, {
		mF: "graduatedFunction"
	}, function() {
		return this.Cm
	}, function(a) {
		var b = this.Cm;
		b !== a && (null !== a && w.j(a, "function", Lh, "graduatedFunction"), this.Cm = a, this.H(), this.h("graduatedFunction", b, a))
	});
	Lh.prototype.Ek = function(a, b) {
		if (null !== this.sc && 0 !== this.Md.length && null !== this.qg) {
			var c = this.Ja.width,
				d = this.Ja.height,
				e = Hq(this),
				f = a.textAlign = this.Cl,
				h = b.Ur;
			"start" === f && (f = h ? "right" : "left");
			"end" === f && (f = h ? "left" : "right");
			No(this, a, this.sc, !0, !1);
			(this.ck || this.ak) && No(this, a, this.sc, !1, !1);
			var k = 0,
				h = !1,
				l = w.xb(0, 0);
			this.ph.nb(l);
			var m = w.xb(0, e);
			this.ph.nb(m);
			var n = l.Bf(m);
			w.v(l);
			w.v(m);
			l = b.scale;
			8 > n * l * l && (h = !0);
			b.hf !== a && (h = !1);
			!1 === b.tj("textGreeking") && (h = !1);
			n = this.ei;
			l = this.fi;
			switch (this.au) {
				case so:
					a.translate(c,
						0);
					a.scale(-1, 1);
					break;
				case ro:
					a.translate(0, d);
					a.scale(1, -1);
					break;
				case to:
					a.translate(c, d), a.scale(-1, -1)
			}
			var m = this.me,
				p = (n + e + l) * m;
			d > p && (k = this.Gl, k = k.y * d - k.y * p + k.offsetY);
			for (var p = this.xf, q = 0; q < m; q++) {
				var r = p.vf[q],
					s = p.Re[q];
				r > c && (r = c);
				var k = k + n,
					u = s,
					s = a,
					t = k,
					x = c,
					v = e,
					z = f,
					A = 0;
				h ? ("left" === z ? A = 0 : "right" === z ? A = x - r : "center" === z && (A = (x - r) / 2), s.fillRect(0 + A, t + .25 * v, r, 1)) : ("left" === z ? A = 0 : "right" === z ? A = x : "center" === z && (A = x / 2), s.fillText(u, 0 + A, t + v - .25 * v), u = v / 20 | 0, 0 === u && (u = 1), "right" === z ? A -= r : "center" ===
					z && (A -= r / 2), this.ck && (s.beginPath(), s.lineWidth = u, s.moveTo(0 + A, t + v - .2 * v), s.lineTo(0 + A + r, t + v - .2 * v), s.stroke()), this.ak && (s.beginPath(), s.lineWidth = u, t = t + v - v / 2.2 | 0, 0 !== u % 2 && (t += .5), s.moveTo(0 + A, t), s.lineTo(0 + A + r, t), s.stroke()));
				k += e + l
			}
			switch (this.au) {
				case so:
					a.scale(-1, 1);
					a.translate(-c, 0);
					break;
				case ro:
					a.scale(1, -1);
					a.translate(0, -d);
					break;
				case to:
					a.scale(-1, -1), a.translate(-c, -d)
			}
		}
	};
	Lh.prototype.Ln = function(a, b, c, d) {
		this.To = a;
		var e = this.xf;
		e.reset();
		var f = 0,
			h = 0;
		if (isNaN(this.Ca.width)) {
			f = this.Md.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
			if (0 === f.length) f = 0;
			else if (this.Kx) {
				for (var k = h = 0, l = !1; !l;) {
					var m = f.indexOf("\n", k); - 1 === m && (m = f.length, l = !0);
					k = Iq(f.substr(k, m - k).replace(/^\s+|\s+$/g, ""), this.qg);
					k > h && (h = k);
					k = m + 1
				}
				f = h
			} else h = f.indexOf("\n", 0), 0 <= h && (f = f.substr(0, h)), f = k = Iq(f, this.qg);
			f = Math.min(f, a / this.scale);
			f = Math.max(8, f)
		} else f = this.Ca.width;
		null !== this.Q && (f = Math.min(f,
			this.Q.Gf.width));
		h = Gq(this, f, e);
		m = h = isNaN(this.Ca.height) ? Math.min(h, b / this.scale) : this.Ca.height;
		if (0 !== e.Ee && 1 !== e.Re.length && this.$i === Eq && (b = this.qg, l = this.$i === Eq ? Jq(b) : 0, k = this.ei + this.fi, k = Math.max(0, Hq(this) + k), m = Math.min(this.TI - 1, Math.max(Math.floor(m / k + .01) - 1, 0)), !(m + 1 >= e.Re.length))) {
			k = e.Re[m];
			for (l = Math.max(1, a - l); Iq(k, b) > l && 1 < k.length;) k = k.substr(0, k.length - 1);
			k += yq;
			b = Iq(k, b);
			e.Re[m] = k;
			e.Re = e.Re.slice(0, m + 1);
			e.vf[m] = b;
			e.vf = e.vf.slice(0, m + 1);
			e.jj = e.Re.length;
			e.Ee = Math.max(e.Ee, b);
			this.me =
				e.jj
		}
		if (this.LG === Cq || isNaN(this.Ca.width)) f = isNaN(a) ? e.Ee : Math.min(a, e.Ee), isNaN(this.Ca.width) && (f = Math.max(8, f));
		f = Math.max(c, f);
		h = Math.max(d, h);
		Ua(this.Wc, f, h);
		Bo(this, 0, 0, f, h)
	};
	Lh.prototype.mj = function(a, b, c, d) {
		Go(this, a, b, c, d)
	};

	function Fq(a, b, c, d) {
		b = b.replace(/^\s+|\s+$/g, "");
		var e = 0,
			f = 0,
			h = 0,
			k = a.qg,
			f = a.ei + a.fi,
			l = Math.max(0, Hq(a) + f),
			h = a.$i === Eq ? Jq(k) : 0;
		if (a.me >= a.gh) return new ia(0, l);
		if (a.kj === Bq) {
			c.jj = 1;
			f = Iq(b, k);
			if (0 === h || f <= d) return c.Ee = Math.max(c.Ee, f), c.vf.push(c.Ee), c.Re.push(b), new ia(f, l);
			var m = Kq(a, b);
			b = b.substr(m.length);
			for (var n = Kq(a, b), f = Iq(m + n, k); 0 < n.length && f <= d;) m += n, b = b.substr(n.length), n = Kq(a, b), f = Iq((m + n).replace(/^\s+|\s+$/g, ""), k);
			m += n.replace(/^\s+|\s+$/g, "");
			for (d = Math.max(1, d - h); Iq(m, k) > d && 1 < m.length;) m =
				m.substr(0, m.length - 1);
			m += yq;
			h = Iq(m, k);
			c.vf.push(h);
			c.Ee = h;
			c.Re.push(m);
			return new ia(h, l)
		}
		var p = 0;
		0 === b.length && (p = 1, c.vf.push(0), c.Re.push(b));
		for (; 0 < b.length;) {
			m = Kq(a, b);
			for (b = b.substr(m.length); Iq(m, k) > d;) {
				n = 1;
				f = Iq(m.substr(0, n), k);
				for (h = 0; f <= d;) n++, h = f, f = Iq(m.substr(0, n), k);
				1 === n ? (c.vf[a.me + p] = f, e = Math.max(e, f)) : (c.vf[a.me + p] = h, e = Math.max(e, h));
				n--;
				1 > n && (n = 1);
				c.Re[a.me + p] = m.substr(0, n);
				p++;
				m = m.substr(n);
				if (a.me + p > a.gh) break
			}
			n = Kq(a, b);
			for (f = Iq(m + n, k); 0 < n.length && f <= d;) m += n, b = b.substr(n.length),
				n = Kq(a, b), f = Iq((m + n).replace(/^\s+|\s+$/g, ""), k);
			m = m.replace(/^\s+|\s+$/g, "");
			if ("" !== m && ("\u00ad" === m[m.length - 1] && (m = m.substring(0, m.length - 1) + "\u2010"), 0 === n.length ? (c.vf.push(f), e = Math.max(e, f)) : (h = Iq(m, k), c.vf.push(h), e = Math.max(e, h)), c.Re.push(m), p++, a.me + p > a.gh)) break
		}
		c.jj = Math.min(a.gh, p);
		c.Ee = Math.max(c.Ee, e);
		return new ia(c.Ee, l * c.jj)
	}

	function Kq(a, b) {
		if (a.kj === Dq) return b.substr(0, 1);
		for (var c = b.length, d = 0; d < c && !tq.test(b.charAt(d));) d++;
		for (; d < c && tq.test(b.charAt(d));) d++;
		return d >= c ? b : b.substr(0, d)
	}

	function Iq(a, b) {
		zq !== b && (zq = Aq.font = b);
		return Aq.measureText(a).width
	}

	function Hq(a) {
		if (null !== a.xf.Sj) return a.xf.Sj;
		var b = a.qg;
		zq !== b && (zq = Aq.font = b);
		var c = 0;
		void 0 !== uq[b] && 5E3 > vq ? c = uq[b] : (c = 1.3 * Aq.measureText("M").width, uq[b] = c, vq++);
		return a.xf.Sj = c
	}

	function Jq(a) {
		zq !== a && (zq = Aq.font = a);
		var b = 0;
		void 0 !== wq[a] && 5E3 > xq ? b = wq[a] : (b = Aq.measureText(yq).width, wq[a] = b, xq++);
		return b
	}

	function Gq(a, b, c) {
		var d = a.Md.replace(/\r\n/g, "\n").replace(/\r/g, "\n"),
			e = a.ei + a.fi,
			e = Math.max(0, Hq(a) + e);
		if (0 === d.length) return c.Ee = 0, a.me = 1, e;
		if (!a.Kx) {
			var f = d.indexOf("\n", 0);
			0 <= f && (d = d.substr(0, f))
		}
		for (var f = 0, h = a.me = 0, k = -1, l = !1; !l;) k = d.indexOf("\n", h), -1 === k && (k = d.length, l = !0), h <= k && (h = d.substr(h, k - h), a.kj !== Bq ? (c.jj = 0, h = Fq(a, h, c, b), f += h.height, a.me += c.jj) : (Fq(a, h, c, b), f += e, a.me++), a.me === a.gh && (l = !0)), h = k + 1;
		return a.jw = f
	}
	w.defineProperty(Lh, {
		IB: "textValidation"
	}, function() {
		return this.Dl
	}, function(a) {
		var b = this.Dl;
		b !== a && (null !== a && w.j(a, "function", Lh, "textValidation"), this.Dl = a, this.h("textValidation", b, a))
	});
	w.defineProperty(Lh, {
		yG: "textEdited"
	}, function() {
		return this.tt
	}, function(a) {
		var b = this.tt;
		b !== a && (null !== a && w.j(a, "function", Lh, "textEdited"), this.tt = a, this.h("textEdited", b, a))
	});
	w.defineProperty(Lh, {
		RL: "spacingAbove"
	}, function() {
		return this.ei
	}, function(a) {
		var b = this.ei;
		b !== a && (this.ei = a, this.h("spacingAbove", b, a))
	});
	w.defineProperty(Lh, {
		SL: "spacingBelow"
	}, function() {
		return this.fi
	}, function(a) {
		var b = this.fi;
		b !== a && (this.fi = a, this.h("spacingBelow", b, a))
	});
	w.defineProperty(Lh, {
		TI: "maxLines"
	}, function() {
		return this.gh
	}, function(a) {
		var b = this.gh;
		b !== a && (a = Math.floor(a), 0 >= a && w.Fa(a, "> 0", Lh, "maxLines"), this.gh = a, this.h("maxLines", b, a), this.H())
	});
	w.u(Lh, {
		wL: "metrics"
	}, function() {
		return this.xf
	});
	w.defineProperty(Lh, {
		HK: "choices"
	}, function() {
		return this.Xq
	}, function(a) {
		var b = this.Xq;
		b !== a && (null === a || Array.isArray(a) || w.Ed(a, "Array", Lh, "choices:value"), this.Xq = a, this.h("choices", b, a))
	});

	function Wp() {
		this.Ee = this.jj = 0;
		this.vf = [];
		this.Re = [];
		this.Sj = null
	}
	Wp.prototype.reset = function() {
		this.Ee = this.jj = 0;
		this.Sj = null;
		this.vf = [];
		this.Re = []
	};
	Wp.prototype.Kp = function(a) {
		this.jj = a.jj;
		this.Sj = a.Sj;
		this.Ee = a.Ee;
		this.vf = w.Ol(a.vf);
		this.Re = w.Ol(a.Re)
	};
	w.u(Wp, {
		DK: "arrSize"
	}, function() {
		return this.vf
	});
	w.u(Wp, {
		EK: "arrText"
	}, function() {
		return this.Re
	});
	w.u(Wp, {
		vL: "maxLineWidth"
	}, function() {
		return this.Ee
	});
	w.u(Wp, {
		dL: "fontHeight"
	}, function() {
		return this.Sj
	});

	function yl() {
		G.call(this);
		this.Te = null;
		this.nt = "";
		this.ok = Nd;
		this.Io = Fe;
		this.ji = this.Ue = null;
		this.Ho = Jb;
		this.pg = Pj;
		this.sp = null;
		this.vz = !1;
		this.Lv = !0;
		this.hw = !1;
		this.kp = null
	}
	w.La(yl, G);
	w.ga("Picture", yl);
	yl.prototype.cloneProtected = function(a) {
		G.prototype.cloneProtected.call(this, a);
		a.element = this.Te;
		a.nt = this.nt;
		a.ok = this.ok.S();
		a.Io = this.Io;
		a.pg = this.pg;
		a.Ue = this.Ue;
		a.ji = this.ji;
		a.Ho = this.Ho.S();
		a.Lv = this.Lv;
		a.kp = this.kp
	};
	yl.prototype.ic = function(a) {
		a === Pj || a === Rj || a === Sj ? this.qI = a : G.prototype.ic.call(this, a)
	};
	yl.prototype.toString = function() {
		return "Picture(" + this.source + ")#" + w.Pd(this)
	};
	var Lq = new ra,
		Mq = 0,
		sl = [];

	function Nq() {
		var a = sl;
		if (0 === a.length)
			for (var b = window.document.getElementsByTagName("canvas"), c = b.length, d = 0; d < c; d++) {
				var e = b[d];
				e.parentElement && e.parentElement.aa && a.push(e.parentElement.aa)
			}
		return a
	}
	var Oq;
	yl.clearCache = Oq = function(a) {
		void 0 === a && (a = "");
		w.j(a, "string", yl, "clearCache:url");
		"" !== a ? Lq[a] && (delete Lq[a], Mq--) : (Lq = new ra, Mq = 0)
	};
	w.defineProperty(yl, {
		element: "element"
	}, function() {
		return this.Te
	}, function(a) {
		var b = this.Te;
		if (b !== a) {
			null === a || a instanceof HTMLImageElement || a instanceof HTMLVideoElement || a instanceof HTMLCanvasElement || w.k("Picture.element must be an instance of Image, Canvas, or Video, not: " + a);
			this.vz = a instanceof HTMLCanvasElement;
			this.Te = a;
			if (null !== a)
				if (a instanceof HTMLCanvasElement || !0 === a.complete) a.Go instanceof Event && null !== this.Ue && this.Ue(this, a.Go), !0 === a.Sr && null !== this.ji && this.ji(this, a.Lz),
					a.Sr = !0, this.Ca.I() || (cm(this, !1), this.H());
				else {
					var c = this;
					a.YC || (a.addEventListener("load", function(b) {
						Pq(a, b);
						c.Ca.I() || (cm(c, !1), c.H())
					}), a.addEventListener("error", function(b) {
						Qq(a, b)
					}), a.YC = !0)
				}
			this.h("element", b, a);
			this.oa()
		}
	});
	w.defineProperty(yl, {
		source: "source"
	}, function() {
		return this.nt
	}, function(a) {
		var b = this.nt;
		if (b !== a) {
			w.j(a, "string", yl, "source");
			this.nt = a;
			var c = Lq,
				d = this.g;
			if (void 0 !== c[a]) var e = c[a].Dp[0].source;
			else {
				30 < Mq && (Oq(), c = Lq);
				var e = w.createElement("img"),
					f = this;
				e.addEventListener("load", function(a) {
					Pq(e, a);
					f.Ca.I() || (cm(f, !1), f.H())
				});
				e.addEventListener("error", function(a) {
					Qq(e, a)
				});
				e.YC = !0;
				var h = this.kp;
				null !== h && (e.crossOrigin = h(this));
				e.src = a;
				c[a] = new Rq(e);
				Mq++
			}
			null !== d && pn(d, this);
			this.element = e;
			null !== d && on(d, this);
			this.H();
			this.oa();
			this.h("source", b, a)
		}
	});

	function Pq(a, b) {
		a.Sr = !0;
		a.Go = !1;
		for (var c = null, d = Nq(), e = d.length, f = 0; f < e; f++) {
			var h = d[f],
				k = h.dp.ka(a.src);
			if (null !== k)
				for (var l = k.length, m = 0; m < l; m++) c = k[m], h.Hz.add(c), h.Ne(), null === a.Lz && (a.Lz = b, null !== c.ji && c.ji(c, b))
		}
	}

	function Qq(a, b) {
		a.Go = b;
		for (var c = null, d = Nq(), e = d.length, f = 0; f < e; f++)
			if (c = d[f].dp.ka(a.src), null !== c) {
				for (var h = c.length, k = w.cb(), l = 0; l < h; l++) k.push(c[l]);
				for (l = 0; l < h; l++) c = k[l], null !== c.Ue && c.Ue(c, b);
				w.ta(k)
			}
	}
	w.defineProperty(yl, {
		QL: "sourceCrossOrigin"
	}, function() {
		return this.kp
	}, function(a) {
		if (this.kp !== a && (null !== a && w.j(a, "function", yl, "sourceCrossOrigin"), this.kp = a, null !== this.element)) {
			var b = this.element.src;
			null === a && "string" === typeof b ? this.element.crossOrigin = null : null !== a && (this.element.crossOrigin = a(this));
			this.element.src = b
		}
	});
	w.defineProperty(yl, {
		Fj: "sourceRect"
	}, function() {
		return this.ok
	}, function(a) {
		var b = this.ok;
		b.L(a) || (w.G(a, B, yl, "sourceRect"), this.ok = a = a.S(), this.oa(), this.h("sourceRect", b, a))
	});
	w.defineProperty(yl, {
		qI: "imageStretch"
	}, function() {
		return this.Io
	}, function(a) {
		var b = this.Io;
		b !== a && (w.ob(a, G, yl, "imageStretch"), this.Io = a, this.oa(), this.h("imageStretch", b, a))
	});
	w.defineProperty(yl, {
		au: "flip"
	}, function() {
		return this.pg
	}, function(a) {
		var b = this.pg;
		b !== a && (w.ob(a, G, yl, "flip"), this.pg = a, this.oa(), this.h("flip", b, a))
	});
	w.defineProperty(yl, {
		fL: "imageAlignment"
	}, function() {
		return this.Ho
	}, function(a) {
		w.G(a, K, yl, "imageAlignment");
		var b = this.Ho;
		b.L(a) || (this.Ho = a = a.S(), this.H(), this.h("imageAlignment", b, a))
	});
	w.defineProperty(yl, {
		wA: "errorFunction"
	}, function() {
		return this.Ue
	}, function(a) {
		var b = this.Ue;
		b !== a && (null !== a && w.j(a, "function", yl, "errorFunction"), this.Ue = a, this.h("errorFunction", b, a))
	});
	w.defineProperty(yl, {
		$L: "successFunction"
	}, function() {
		return this.ji
	}, function(a) {
		var b = this.ji;
		b !== a && (null !== a && w.j(a, "function", yl, "successFunction"), this.ji = a, this.h("successFunction", b, a))
	});
	yl.prototype.Ek = function(a, b) {
		var c = this.Te;
		if (null !== c) {
			var d = c.src;
			null !== d && "" !== d || w.k('Element has no source ("src") attribute: ' + c);
			if (!(c.Go instanceof Event) && !1 !== c.Sr) {
				var d = this.Ja,
					e = 0,
					f = 0,
					h = this.vz,
					k = h ? +c.width : c.naturalWidth,
					h = h ? +c.height : c.naturalHeight;
				void 0 === k && c.videoWidth && (k = c.videoWidth);
				void 0 === h && c.videoHeight && (h = c.videoHeight);
				k = k || d.width;
				h = h || d.height;
				if (0 !== k && 0 !== h) {
					var l = k,
						m = h;
					this.Fj.I() && (e = this.ok.x, f = this.ok.y, k = this.ok.width, h = this.ok.height);
					var n = k,
						p = h,
						q = this.Io,
						r = this.Ho;
					switch (q) {
						case Pj:
							if (this.Fj.I()) break;
							n >= d.width && (e = e + r.offsetX + (n * r.x - d.width * r.x));
							p >= d.height && (f = f + r.offsetY + (p * r.y - d.height * r.y));
							k = Math.min(d.width, n);
							h = Math.min(d.height, p);
							break;
						case Fe:
							n = d.width;
							p = d.height;
							break;
						case Rj:
						case Sj:
							var s = 0;
							q === Rj ? (s = Math.min(d.height / p, d.width / n), n *= s, p *= s) : q === Sj && (s = Math.max(d.height / p, d.width / n), n *= s, p *= s, n >= d.width && (e = (e + r.offsetX + (n * r.x - d.width * r.x) / n) * k), p >= d.height && (f = (f + r.offsetY + (p * r.y - d.height * r.y) / p) * h), k *= 1 / (n / d.width), h *= 1 / (p / d.height),
								n = d.width, p = d.height)
					}
					var q = this.sj() * b.scale,
						u = k * h / (n * q * p * q),
						s = Lq[this.source],
						q = null;
					if (c.Sr && void 0 !== s && 16 < u) {
						2 > s.Dp.length && (Sq(s, 4, l, m), Sq(s, 16, l, m));
						for (var l = s.Dp, m = l.length, q = l[0], t = 0; t < m; t++)
							if (l[t].qq * l[t].qq < u) q = l[t];
							else break
					}
					if (!b.vr) {
						if (null === this.sp)
							if (null === this.Te) this.sp = !1;
							else {
								l = (new Wc(null)).Bk;
								l.drawImage(this.Te, 0, 0);
								try {
									l.getImageData(0, 0, 1, 1).data[3] && (this.sp = !1), this.sp = !1
								} catch (x) {
									this.sp = !0
								}
							}
						if (this.sp) return
					}
					l = 0;
					n < d.width && (l = r.offsetX + (d.width * r.x - n * r.x));
					m = 0;
					p <
						d.height && (m = r.offsetY + (d.height * r.y - p * r.y));
					switch (this.au) {
						case so:
							a.translate(Math.min(d.width, n), 0);
							a.scale(-1, 1);
							break;
						case ro:
							a.translate(0, Math.min(d.height, p));
							a.scale(1, -1);
							break;
						case to:
							a.translate(Math.min(d.width, n), Math.min(d.height, p)), a.scale(-1, -1)
					}
					if (b.tj("pictureRatioOptimization") && !b.wz && void 0 !== s && null !== q && 1 !== q.qq) {
						a.save();
						s = q.qq;
						try {
							a.drawImage(q.source, e / s, f / s, Math.min(q.source.width, k / s), Math.min(q.source.height, h / s), l, m, Math.min(d.width, n), Math.min(d.height, p))
						} catch (v) {
							this.Lv = !1
						}
						a.restore()
					} else try {
						a.drawImage(c, e, f, k, h, l, m, Math.min(d.width, n), Math.min(d.height, p))
					} catch (z) {
						this.Lv = !1
					}
					switch (this.au) {
						case so:
							a.scale(-1, 1);
							a.translate(-Math.min(d.width, n), 0);
							break;
						case ro:
							a.scale(1, -1);
							a.translate(0, -Math.min(d.height, p));
							break;
						case to:
							a.scale(-1, -1), a.translate(-Math.min(d.width, n), -Math.min(d.height, p))
					}
				}
			}
		}
	};
	w.u(yl, {
		Ja: "naturalBounds"
	}, function() {
		return this.Wc
	});
	yl.prototype.Ln = function(a, b, c, d) {
		var e = this.Ca,
			f = Eo(this, !0),
			h = this.Te,
			k = this.vz;
		if (k || !this.hw && h && h.complete) this.hw = !0;
		null === h && (isFinite(e.width) || (a = 0), isFinite(e.height) || (b = 0));
		isFinite(e.width) || f === Fe || f === qo ? (isFinite(a) || (a = this.Fj.I() ? this.Fj.width : k ? +h.width : h.naturalWidth), c = 0) : null !== h && !1 !== this.hw && (a = this.Fj.I() ? this.Fj.width : k ? +h.width : h.naturalWidth);
		isFinite(e.height) || f === Fe || f === po ? (isFinite(b) || (b = this.Fj.I() ? this.Fj.height : k ? +h.height : h.naturalHeight), d = 0) : null !== h && !1 !==
			this.hw && (b = this.Fj.I() ? this.Fj.height : k ? +h.height : h.naturalHeight);
		isFinite(e.width) && (a = e.width);
		isFinite(e.height) && (b = e.height);
		e = this.Gf;
		f = this.qi;
		c = Math.max(c, f.width);
		d = Math.max(d, f.height);
		a = Math.min(e.width, a);
		b = Math.min(e.height, b);
		a = Math.max(c, a);
		b = Math.max(d, b);
		null === h || h.complete || (isFinite(a) || (a = 0), isFinite(b) || (b = 0));
		Ua(this.Wc, a, b);
		Bo(this, 0, 0, a, b)
	};
	yl.prototype.mj = function(a, b, c, d) {
		Go(this, a, b, c, d)
	};

	function Rq(a) {
		this.Dp = [new Tq(a, 1)]
	}

	function Sq(a, b, c, d) {
		var e = new Wc(null),
			f = e.Bk,
			h = 1 / b;
		e.width = c / b;
		e.height = d / b;
		b = new Tq(e.Od, b);
		c = a.Dp[a.Dp.length - 1];
		f.setTransform(h * c.qq, 0, 0, h * c.qq, 0, 0);
		f.drawImage(c.source, 0, 0);
		a.Dp.push(b)
	}

	function Tq(a, b) {
		this.source = a;
		this.qq = b
	}

	function la() {
		this.o = new Ce;
		this.Xb = null
	}
	g = la.prototype;
	g.reset = function() {
		this.o = new Ce;
		this.Xb = null
	};

	function M(a, b, c, d, e, f) {
		null === a.o && w.k("StreamGeometryContext has been closed");
		void 0 !== e && !0 === e ? (null === a.Xb && w.k("Need to call beginFigure first"), d = new xf(Ve), d.C = b, d.D = c, a.Xb.wb.add(d)) : (a.Xb = new Ee, a.Xb.ha = b, a.Xb.fa = c, a.Xb.pu = d, a.o.gc.add(a.Xb));
		void 0 !== f && (a.Xb.Oo = f)
	}

	function O(a) {
		null === a.o && w.k("StreamGeometryContext has been closed");
		null === a.Xb && w.k("Need to call beginFigure first");
		var b = a.Xb.wb.length;
		0 < b && a.Xb.wb.ea(b - 1).close()
	}

	function Se(a) {
		null === a.o && w.k("StreamGeometryContext has been closed");
		null === a.Xb && w.k("Need to call beginFigure first");
		0 < a.Xb.wb.length && (a.Xb.pu = !0)
	}
	g.ab = function(a) {
		null === this.o && w.k("StreamGeometryContext has been closed");
		null === this.Xb && w.k("Need to call beginFigure first");
		this.Xb.cm = a
	};
	g.moveTo = function(a, b, c) {
		void 0 === c && (c = !1);
		null === this.o && w.k("StreamGeometryContext has been closed");
		null === this.Xb && w.k("Need to call beginFigure first");
		var d = new xf(Ve);
		d.C = a;
		d.D = b;
		c && d.close();
		this.Xb.wb.add(d)
	};
	g.lineTo = function(a, b, c) {
		void 0 === c && (c = !1);
		null === this.o && w.k("StreamGeometryContext has been closed");
		null === this.Xb && w.k("Need to call beginFigure first");
		var d = new xf(Ne);
		d.C = a;
		d.D = b;
		c && d.close();
		this.Xb.wb.add(d)
	};

	function N(a, b, c, d, e, f, h, k) {
		void 0 === k && (k = !1);
		null === a.o && w.k("StreamGeometryContext has been closed");
		null === a.Xb && w.k("Need to call beginFigure first");
		var l = new xf(We);
		l.wc = b;
		l.Rc = c;
		l.Ch = d;
		l.Dh = e;
		l.C = f;
		l.D = h;
		k && l.close();
		a.Xb.wb.add(l)
	}

	function Qe(a, b, c, d, e) {
		var f;
		void 0 === f && (f = !1);
		null === a.o && w.k("StreamGeometryContext has been closed");
		null === a.Xb && w.k("Need to call beginFigure first");
		var h = new xf(pf);
		h.wc = b;
		h.Rc = c;
		h.C = d;
		h.D = e;
		f && h.close();
		a.Xb.wb.add(h)
	}
	g.arcTo = function(a, b, c, d, e, f, h) {
		void 0 === f && (f = 0);
		void 0 === h && (h = !1);
		null === this.o && w.k("StreamGeometryContext has been closed");
		null === this.Xb && w.k("Need to call beginFigure first");
		var k = new xf(qf);
		k.ze = a;
		k.tf = b;
		k.la = c;
		k.ra = d;
		k.radiusX = e;
		k.radiusY = 0 !== f ? f : e;
		h && k.close();
		this.Xb.wb.add(k)
	};

	function Re(a, b, c, d, e, f, h, k) {
		var l;
		void 0 === l && (l = !1);
		null === a.o && w.k("StreamGeometryContext has been closed");
		null === a.Xb && w.k("Need to call beginFigure first");
		b = new xf(rf, h, k, b, c, d, e, f);
		l && b.close();
		a.Xb.wb.add(b)
	}

	function Uq(a) {
		a = Vq(a);
		var b = w.cb();
		b[0] = a[0];
		for (var c = 1, d = 1; d < a.length;) b[c] = a[d], b[c + 1] = a[d], b[c + 2] = a[d + 1], d += 2, c += 3;
		w.ta(a);
		return b
	}

	function Vq(a) {
		var b = Wq(a),
			c = w.cb(),
			d = Math.floor(b.length / 2),
			e = b.length - 1;
		a = 0 === a % 2 ? 2 : 1;
		for (var f = 0; f < e; f++) {
			var h = b[f],
				k = b[f + 1],
				l = b[(d + f - 1) % e],
				m = b[(d + f + a) % e];
			c[2 * f] = h;
			c[2 * f + 1] = me(h.x, h.y, l.x, l.y, k.x, k.y, m.x, m.y, new y)
		}
		c[c.length] = c[0];
		w.ta(b);
		return c
	}

	function Wq(a) {
		for (var b = w.cb(), c = 1.5 * Math.PI, d = 0, e = 0; e < a; e++) d = 2 * Math.PI / a * e + c, b[e] = new y(.5 + .5 * Math.cos(d), .5 + .5 * Math.sin(d));
		b.push(b[0]);
		return b
	}
	var jq = {
			None: "Rectangle",
			Rectangle: function(a, b, c) {
				a = new Ce;
				a.type = He;
				a.ha = 0;
				a.fa = 0;
				a.C = b;
				a.D = c;
				return a
			},
			Square: function(a, b, c) {
				a = new Ce;
				a.ae = Rj;
				a.type = He;
				a.ha = 0;
				a.fa = 0;
				a.C = Math.min(b, c);
				a.D = Math.min(b, c);
				return a
			},
			Ellipse: function(a, b, c) {
				a = new Ce;
				a.type = Ie;
				a.ha = 0;
				a.fa = 0;
				a.C = b;
				a.D = c;
				a.A = Od;
				a.B = Pd;
				return a
			},
			Circle: function(a, b, c) {
				a = new Ce;
				a.ae = Rj;
				a.type = Ie;
				a.ha = 0;
				a.fa = 0;
				a.C = Math.min(b, c);
				a.D = Math.min(b, c);
				a.A = Od;
				a.B = Pd;
				return a
			},
			Connector: "Ellipse",
			TriangleRight: function(a, b, c) {
				a = new Ce;
				var d = new Ee,
					e = new xf;
				e.C = b;
				e.D = .5 * c;
				d.wb.add(e);
				b = new xf;
				b.C = 0;
				b.D = c;
				d.wb.add(b.close());
				a.gc.add(d);
				a.A = new K(0, .25);
				a.B = new K(.5, .75);
				return a
			},
			TriangleDown: function(a, b, c) {
				a = new Ce;
				var d = new Ee,
					e = new xf;
				e.C = b;
				e.D = 0;
				d.wb.add(e);
				e = new xf;
				e.C = .5 * b;
				e.D = c;
				d.wb.add(e.close());
				a.gc.add(d);
				a.A = new K(.25, 0);
				a.B = new K(.75, .5);
				return a
			},
			TriangleLeft: function(a, b, c) {
				a = new Ce;
				var d = new Ee;
				d.ha = b;
				d.fa = c;
				var e = new xf;
				e.C = 0;
				e.D = .5 * c;
				d.wb.add(e);
				c = new xf;
				c.C = b;
				c.D = 0;
				d.wb.add(c.close());
				a.gc.add(d);
				a.A = new K(.5, .25);
				a.B = new K(1,
					.75);
				return a
			},
			TriangleUp: function(a, b, c) {
				a = new Ce;
				var d = new Ee;
				d.ha = b;
				d.fa = c;
				var e = new xf;
				e.C = 0;
				e.D = c;
				d.wb.add(e);
				c = new xf;
				c.C = .5 * b;
				c.D = 0;
				d.wb.add(c.close());
				a.gc.add(d);
				a.A = new K(.25, .5);
				a.B = new K(.75, 1);
				return a
			},
			Line1: function(a, b, c) {
				a = new Ce;
				a.type = Ge;
				a.ha = 0;
				a.fa = 0;
				a.C = b;
				a.D = c;
				return a
			},
			Line2: function(a, b, c) {
				a = new Ce;
				a.type = Ge;
				a.ha = b;
				a.fa = 0;
				a.C = 0;
				a.D = c;
				return a
			},
			MinusLine: "LineH",
			LineH: function(a, b, c) {
				a = new Ce;
				a.type = Ge;
				a.ha = 0;
				a.fa = c / 2;
				a.C = b;
				a.D = c / 2;
				return a
			},
			LineV: function(a, b, c) {
				a = new Ce;
				a.type =
					Ge;
				a.ha = b / 2;
				a.fa = 0;
				a.C = b / 2;
				a.D = c;
				return a
			},
			BarH: "Rectangle",
			BarV: "Rectangle",
			Curve1: function(a, b, c) {
				a = w.s();
				M(a, 0, 0, !1);
				N(a, cd * b, 0, 1 * b, (1 - cd) * c, b, c);
				b = a.o;
				w.q(a);
				return b
			},
			Curve2: function(a, b, c) {
				a = w.s();
				M(a, 0, 0, !1);
				N(a, 0, cd * c, (1 - cd) * b, c, b, c);
				b = a.o;
				w.q(a);
				return b
			},
			Curve3: function(a, b, c) {
				a = w.s();
				M(a, 1 * b, 0, !1);
				N(a, 1 * b, cd * c, cd * b, 1 * c, 0, 1 * c);
				b = a.o;
				w.q(a);
				return b
			},
			Curve4: function(a, b, c) {
				a = w.s();
				M(a, 1 * b, 0, !1);
				N(a, (1 - cd) * b, 0, 0, (1 - cd) * c, 0, 1 * c);
				b = a.o;
				w.q(a);
				return b
			},
			Alternative: "Triangle",
			Merge: "Triangle",
			Triangle: function(a, b, c) {
				a = w.s();
				M(a, .5 * b, 0 * c, !0);
				a.lineTo(0 * b, 1 * c);
				a.lineTo(1 * b, 1 * c, !0);
				b = a.o;
				b.A = new K(.25, .5);
				b.B = new K(.75, 1);
				w.q(a);
				return b
			},
			Decision: "Diamond",
			Diamond: function(a, b, c) {
				a = w.s();
				M(a, .5 * b, 0, !0);
				a.lineTo(0, .5 * c);
				a.lineTo(.5 * b, 1 * c);
				a.lineTo(1 * b, .5 * c, !0);
				b = a.o;
				b.A = new K(.25, .25);
				b.B = new K(.75, .75);
				w.q(a);
				return b
			},
			Pentagon: function(a, b, c) {
				var d = Wq(5);
				a = w.s();
				M(a, d[0].x * b, d[0].y * c, !0);
				for (var e = 1; 5 > e; e++) a.lineTo(d[e].x * b, d[e].y * c);
				w.ta(d);
				O(a);
				b = a.o;
				b.A = new K(.2, .22);
				b.B = new K(.8,
					.9);
				w.q(a);
				return b
			},
			DataTransmission: "Hexagon",
			Hexagon: function(a, b, c) {
				var d = Wq(6);
				a = w.s();
				M(a, d[0].x * b, d[0].y * c, !0);
				for (var e = 1; 6 > e; e++) a.lineTo(d[e].x * b, d[e].y * c);
				w.ta(d);
				O(a);
				b = a.o;
				b.A = new K(.07, .25);
				b.B = new K(.93, .75);
				w.q(a);
				return b
			},
			Heptagon: function(a, b, c) {
				var d = Wq(7);
				a = w.s();
				M(a, d[0].x * b, d[0].y * c, !0);
				for (var e = 1; 7 > e; e++) a.lineTo(d[e].x * b, d[e].y * c);
				w.ta(d);
				O(a);
				b = a.o;
				b.A = new K(.2, .15);
				b.B = new K(.8, .85);
				w.q(a);
				return b
			},
			Octagon: function(a, b, c) {
				var d = Wq(8);
				a = w.s();
				M(a, d[0].x * b, d[0].y * c, !0);
				for (var e = 1; 8 > e; e++) a.lineTo(d[e].x * b, d[e].y * c);
				w.ta(d);
				O(a);
				b = a.o;
				b.A = new K(.15, .15);
				b.B = new K(.85, .85);
				w.q(a);
				return b
			},
			Nonagon: function(a, b, c) {
				var d = Wq(9);
				a = w.s();
				M(a, d[0].x * b, d[0].y * c, !0);
				for (var e = 1; 9 > e; e++) a.lineTo(d[e].x * b, d[e].y * c);
				w.ta(d);
				O(a);
				b = a.o;
				b.A = new K(.17, .13);
				b.B = new K(.82, .82);
				w.q(a);
				return b
			},
			Decagon: function(a, b, c) {
				var d = Wq(10);
				a = w.s();
				M(a, d[0].x * b, d[0].y * c, !0);
				for (var e = 1; 10 > e; e++) a.lineTo(d[e].x * b, d[e].y * c);
				w.ta(d);
				O(a);
				b = a.o;
				b.A = new K(.16, .16);
				b.B = new K(.84, .84);
				w.q(a);
				return b
			},
			Dodecagon: function(a, b, c) {
				var d = Wq(12);
				a = w.s();
				M(a, d[0].x * b, d[0].y * c, !0);
				for (var e = 1; 12 > e; e++) a.lineTo(d[e].x * b, d[e].y * c);
				w.ta(d);
				O(a);
				b = a.o;
				b.A = new K(.16, .16);
				b.B = new K(.84, .84);
				w.q(a);
				return b
			},
			FivePointedStar: function(a, b, c) {
				var d = Vq(5);
				a = w.s();
				M(a, d[0].x * b, d[0].y * c, !0);
				for (var e = 1; 10 > e; e++) a.lineTo(d[e].x * b, d[e].y * c);
				w.ta(d);
				O(a);
				b = a.o;
				b.A = new K(.312, .383);
				b.B = new K(.693, .765);
				w.q(a);
				return b
			},
			SixPointedStar: function(a, b, c) {
				var d = Vq(6);
				a = w.s();
				M(a, d[0].x * b, d[0].y * c, !0);
				for (var e = 1; 12 > e; e++) a.lineTo(d[e].x *
					b, d[e].y * c);
				w.ta(d);
				O(a);
				b = a.o;
				b.A = new K(.17, .251);
				b.B = new K(.833, .755);
				w.q(a);
				return b
			},
			SevenPointedStar: function(a, b, c) {
				var d = Vq(7);
				a = w.s();
				M(a, d[0].x * b, d[0].y * c, !0);
				for (var e = 1; 14 > e; e++) a.lineTo(d[e].x * b, d[e].y * c);
				w.ta(d);
				O(a);
				b = a.o;
				b.A = new K(.363, .361);
				b.B = new K(.641, .709);
				w.q(a);
				return b
			},
			EightPointedStar: function(a, b, c) {
				var d = Vq(8);
				a = w.s();
				M(a, d[0].x * b, d[0].y * c, !0);
				for (var e = 1; 16 > e; e++) a.lineTo(d[e].x * b, d[e].y * c);
				w.ta(d);
				O(a);
				b = a.o;
				b.A = new K(.252, .255);
				b.B = new K(.75, .75);
				w.q(a);
				return b
			},
			NinePointedStar: function(a,
				b, c) {
				var d = Vq(9);
				a = w.s();
				M(a, d[0].x * b, d[0].y * c, !0);
				for (var e = 1; 18 > e; e++) a.lineTo(d[e].x * b, d[e].y * c);
				w.ta(d);
				O(a);
				b = a.o;
				b.A = new K(.355, .361);
				b.B = new K(.645, .651);
				w.q(a);
				return b
			},
			TenPointedStar: function(a, b, c) {
				var d = Vq(10);
				a = w.s();
				M(a, d[0].x * b, d[0].y * c, !0);
				for (var e = 1; 20 > e; e++) a.lineTo(d[e].x * b, d[e].y * c);
				w.ta(d);
				O(a);
				b = a.o;
				b.A = new K(.281, .261);
				b.B = new K(.723, .748);
				w.q(a);
				return b
			},
			FivePointedBurst: function(a, b, c) {
				var d = Uq(5);
				a = w.s();
				M(a, d[0].x * b, d[0].y * c, !0);
				for (var e = 1; e < d.length; e += 3) N(a, d[e].x *
					b, d[e].y * c, d[e + 1].x * b, d[e + 1].y * c, d[e + 2].x * b, d[e + 2].y * c);
				w.ta(d);
				O(a);
				b = a.o;
				b.A = new K(.312, .383);
				b.B = new K(.693, .765);
				w.q(a);
				return b
			},
			SixPointedBurst: function(a, b, c) {
				var d = Uq(6);
				a = w.s();
				M(a, d[0].x * b, d[0].y * c, !0);
				for (var e = 1; e < d.length; e += 3) N(a, d[e].x * b, d[e].y * c, d[e + 1].x * b, d[e + 1].y * c, d[e + 2].x * b, d[e + 2].y * c);
				w.ta(d);
				O(a);
				b = a.o;
				b.A = new K(.17, .251);
				b.B = new K(.833, .755);
				w.q(a);
				return b
			},
			SevenPointedBurst: function(a, b, c) {
				var d = Uq(7);
				a = w.s();
				M(a, d[0].x * b, d[0].y * c, !0);
				for (var e = 1; e < d.length; e += 3) N(a, d[e].x *
					b, d[e].y * c, d[e + 1].x * b, d[e + 1].y * c, d[e + 2].x * b, d[e + 2].y * c);
				w.ta(d);
				O(a);
				b = a.o;
				b.A = new K(.363, .361);
				b.B = new K(.641, .709);
				w.q(a);
				return b
			},
			EightPointedBurst: function(a, b, c) {
				var d = Uq(8);
				a = w.s();
				M(a, d[0].x * b, d[0].y * c, !0);
				for (var e = 1; e < d.length; e += 3) N(a, d[e].x * b, d[e].y * c, d[e + 1].x * b, d[e + 1].y * c, d[e + 2].x * b, d[e + 2].y * c);
				w.ta(d);
				O(a);
				b = a.o;
				b.A = new K(.252, .255);
				b.B = new K(.75, .75);
				w.q(a);
				return b
			},
			NinePointedBurst: function(a, b, c) {
				var d = Uq(9);
				a = w.s();
				M(a, d[0].x * b, d[0].y * c, !0);
				for (var e = 1; e < d.length; e += 3) N(a, d[e].x *
					b, d[e].y * c, d[e + 1].x * b, d[e + 1].y * c, d[e + 2].x * b, d[e + 2].y * c);
				w.ta(d);
				O(a);
				b = a.o;
				b.A = new K(.355, .361);
				b.B = new K(.645, .651);
				w.q(a);
				return b
			},
			TenPointedBurst: function(a, b, c) {
				var d = Uq(10);
				a = w.s();
				M(a, d[0].x * b, d[0].y * c, !0);
				for (var e = 1; e < d.length; e += 3) N(a, d[e].x * b, d[e].y * c, d[e + 1].x * b, d[e + 1].y * c, d[e + 2].x * b, d[e + 2].y * c);
				w.ta(d);
				O(a);
				b = a.o;
				b.A = new K(.281, .261);
				b.B = new K(.723, .748);
				w.q(a);
				return b
			},
			Cloud: function(a, b, c) {
				a = w.s();
				M(a, .08034461 * b, .1944299 * c, !0);
				N(a, -.09239631 * b, .07836421 * c, .1406031 * b, -.0542823 * c, .2008615 *
					b, .05349299 * c);
				N(a, .2450511 * b, -.00697547 * c, .3776197 * b, -.01112067 * c, .4338609 * b, .074219 * c);
				N(a, .4539471 * b, 0, .6066018 * b, -.02526587 * c, .6558228 * b, .07004196 * c);
				N(a, .6914277 * b, -.01904177 * c, .8921095 * b, -.01220843 * c, .8921095 * b, .08370865 * c);
				N(a, 1.036446 * b, .04105738 * c, 1.020377 * b, .3022052 * c, .9147671 * b, .3194596 * c);
				N(a, 1.04448 * b, .360238 * c, .992256 * b, .5219009 * c, .9082935 * b, .562044 * c);
				N(a, 1.032337 * b, .5771781 * c, 1.018411 * b, .8120651 * c, .9212406 * b, .8217117 * c);
				N(a, 1.028411 * b, .9571472 * c, .8556702 * b, 1.052487 * c, .7592566 * b, .9156953 *
					c);
				N(a, .7431877 * b, 1.009325 * c, .5624123 * b, 1.021761 * c, .5101666 * b, .9310455 * c);
				N(a, .4820677 * b, 1.031761 * c, .3030112 * b, 1.002796 * c, .2609328 * b, .9344623 * c);
				N(a, .2329994 * b, 1.01518 * c, .03213784 * b, 1.01518 * c, .08034461 * b, .870098 * c);
				N(a, -.02812061 * b, .9032597 * c, -.01205169 * b, .6835638 * c, .06829292 * b, .6545475 * c);
				N(a, -.01812061 * b, .6089503 * c, -.00606892 * b, .4555777 * c, .06427569 * b, .4265613 * c);
				N(a, -.01606892 * b, .3892545 * c, -.01205169 * b, .1944299 * c, .08034461 * b, .1944299 * c);
				O(a);
				b = a.o;
				b.A = new K(.1, .1);
				b.B = new K(.9, .9);
				w.q(a);
				return b
			},
			Gate: "Crescent",
			Crescent: function(a, b, c) {
				a = w.s();
				M(a, 0, 0, !0);
				N(a, 1 * b, 0, 1 * b, 1 * c, 0, 1 * c);
				N(a, .5 * b, .75 * c, .5 * b, .25 * c, 0, 0);
				O(a);
				b = a.o;
				b.A = new K(.511, .19);
				b.B = new K(.776, .76);
				w.q(a);
				return b
			},
			FramedRectangle: function(a, b, c) {
				var d = w.s(),
					e = a ? a.Hc : NaN;
				a = a ? a.Ku : NaN;
				isNaN(e) && (e = .1);
				isNaN(a) && (a = .1);
				M(d, 0, 0, !0);
				d.lineTo(1 * b, 0);
				d.lineTo(1 * b, 1 * c);
				d.lineTo(0, 1 * c, !0);
				M(d, e * b, a * c, !1, !0);
				d.lineTo(e * b, (1 - a) * c);
				d.lineTo((1 - e) * b, (1 - a) * c);
				d.lineTo((1 - e) * b, a * c, !0);
				b = d.o;
				b.A = new K(e, a);
				b.B = new K(1 - e, 1 - a);
				w.q(d);
				return b
			},
			Delay: "HalfEllipse",
			HalfEllipse: function(a, b, c) {
				a = w.s();
				M(a, 0, 0, !0);
				N(a, cd * b, 0, 1 * b, (.5 - cd / 2) * c, 1 * b, .5 * c);
				N(a, 1 * b, (.5 + cd / 2) * c, cd * b, 1 * c, 0, 1 * c);
				O(a);
				b = a.o;
				b.A = new K(0, .2);
				b.B = new K(.75, .8);
				w.q(a);
				return b
			},
			Heart: function(a, b, c) {
				a = w.s();
				M(a, .5 * b, 1 * c, !0);
				N(a, .1 * b, .8 * c, 0, .5 * c, 0 * b, .3 * c);
				N(a, 0 * b, 0, .45 * b, 0, .5 * b, .3 * c);
				N(a, .55 * b, 0, 1 * b, 0, 1 * b, .3 * c);
				N(a, b, .5 * c, .9 * b, .8 * c, .5 * b, 1 * c);
				O(a);
				b = a.o;
				b.A = new K(.15, .29);
				b.B = new K(.86, .68);
				w.q(a);
				return b
			},
			Spade: function(a, b, c) {
				a = w.s();
				M(a, .5 * b, 0, !0);
				a.lineTo(.51 * b, .01 * c);
				N(a, .6 * b, .2 * c, b, .25 * c, b, .5 * c);
				N(a, b, .8 * c, .6 * b, .8 * c, .55 * b, .7 * c);
				N(a, .5 * b, .75 * c, .55 * b, .95 * c, .75 * b, c);
				a.lineTo(.25 * b, c);
				N(a, .45 * b, .95 * c, .5 * b, .75 * c, .45 * b, .7 * c);
				N(a, .4 * b, .8 * c, 0, .8 * c, 0, .5 * c);
				N(a, 0, .25 * c, .4 * b, .2 * c, .49 * b, .01 * c);
				O(a);
				b = a.o;
				b.A = new K(.19, .26);
				b.B = new K(.8, .68);
				w.q(a);
				return b
			},
			Club: function(a, b, c) {
				a = w.s();
				M(a, .4 * b, .6 * c, !0);
				N(a, .5 * b, .75 * c, .45 * b, .95 * c, .15 * b, 1 * c);
				a.lineTo(.85 * b, c);
				N(a, .55 * b, .95 * c, .5 * b, .75 * c, .6 * b, .6 * c);
				var d = .2,
					e = .3,
					f = 0,
					h = 4 * (Math.SQRT2 - 1) / 3 * d;
				N(a, (.5 - d + e) * b, (.5 + h + f) * c, (.5 - h + e) *
					b, (.5 + d + f) * c, (.5 + e) * b, (.5 + d + f) * c);
				N(a, (.5 + h + e) * b, (.5 + d + f) * c, (.5 + d + e) * b, (.5 + h + f) * c, (.5 + d + e) * b, (.5 + f) * c);
				N(a, (.5 + d + e) * b, (.5 - h + f) * c, (.5 + h + e) * b, (.5 - d + f) * c, (.5 + e) * b, (.5 - d + f) * c);
				N(a, (.5 - h + e) * b, (.5 - d + f) * c, (.5 - d + e + .05) * b, (.5 - h + f - .02) * c, .65 * b, .36771243 * c);
				d = .2;
				e = 0;
				f = -.3;
				h = 4 * (Math.SQRT2 - 1) / 3 * d;
				N(a, (.5 + h + e) * b, (.5 + d + f) * c, (.5 + d + e) * b, (.5 + h + f) * c, (.5 + d + e) * b, (.5 + f) * c);
				N(a, (.5 + d + e) * b, (.5 - h + f) * c, (.5 + h + e) * b, (.5 - d + f) * c, (.5 + e) * b, (.5 - d + f) * c);
				N(a, (.5 - h + e) * b, (.5 - d + f) * c, (.5 - d + e) * b, (.5 - h + f) * c, (.5 - d + e) * b, (.5 + f) * c);
				N(a, (.5 - d +
					e) * b, (.5 + h + f) * c, (.5 - h + e) * b, (.5 + d + f) * c, .35 * b, .36771243 * c);
				d = .2;
				e = -.3;
				f = 0;
				h = 4 * (Math.SQRT2 - 1) / 3 * d;
				N(a, (.5 + d + e - .05) * b, (.5 - h + f - .02) * c, (.5 + h + e) * b, (.5 - d + f) * c, (.5 + e) * b, (.5 - d + f) * c);
				N(a, (.5 - h + e) * b, (.5 - d + f) * c, (.5 - d + e) * b, (.5 - h + f) * c, (.5 - d + e) * b, (.5 + f) * c);
				N(a, (.5 - d + e) * b, (.5 + h + f) * c, (.5 - h + e) * b, (.5 + d + f) * c, (.5 + e) * b, (.5 + d + f) * c);
				N(a, (.5 + h + e) * b, (.5 + d + f) * c, (.5 + d + e) * b, (.5 + h + f) * c, .4 * b, .6 * c);
				O(a);
				b = a.o;
				b.A = new K(.06, .39);
				b.B = new K(.93, .58);
				w.q(a);
				return b
			},
			Ring: function(a, b, c) {
				a = w.s();
				var d = 4 * (Math.SQRT2 - 1) / 3 * .5;
				M(a, b, .5 *
					c, !0);
				N(a, b, (.5 - d) * c, (.5 + d) * b, 0, .5 * b, 0);
				N(a, (.5 - d) * b, 0, 0, (.5 - d) * c, 0, .5 * c);
				N(a, 0, (.5 + d) * c, (.5 - d) * b, c, .5 * b, c);
				N(a, (.5 + d) * b, c, b, (.5 + d) * c, b, .5 * c);
				d = 4 * (Math.SQRT2 - 1) / 3 * .4;
				M(a, .5 * b, .1 * c, !0, !0);
				N(a, (.5 + d) * b, .1 * c, .9 * b, (.5 - d) * c, .9 * b, .5 * c);
				N(a, .9 * b, (.5 + d) * c, (.5 + d) * b, .9 * c, .5 * b, .9 * c);
				N(a, (.5 - d) * b, .9 * c, .1 * b, (.5 + d) * c, .1 * b, .5 * c);
				N(a, .1 * b, (.5 - d) * c, (.5 - d) * b, .1 * c, .5 * b, .1 * c);
				b = a.o;
				b.A = new K(.146, .146);
				b.B = new K(.853, .853);
				b.ae = Rj;
				w.q(a);
				return b
			},
			YinYang: function(a, b, c) {
				var d = .5;
				a = w.s();
				d = .5;
				M(a, .5 * b, 0, !0);
				a.arcTo(270,
					180, .5 * b, .5 * b, .5 * b);
				N(a, 1 * b, d * c, 0, d * c, d * b, 0, !0);
				var d = .1,
					e = .25;
				M(a, (.5 + d) * b, e * c, !0, !0);
				a.arcTo(0, -360, .5 * b, c * e, d * b);
				O(a);
				M(a, .5 * b, 0, !1);
				a.arcTo(270, -180, .5 * b, .5 * b, .5 * b);
				a.ab(!1);
				e = .75;
				M(a, (.5 + d) * b, e * c, !0);
				a.arcTo(0, 360, .5 * b, c * e, d * b);
				O(a);
				b = a.o;
				b.ae = Rj;
				w.q(a);
				return b
			},
			Peace: function(a, b, c) {
				a = w.s();
				var d = 4 * (Math.SQRT2 - 1) / 3 * .5;
				M(a, b, .5 * c, !0);
				N(a, b, (.5 - d) * c, (.5 + d) * b, 0, .5 * b, 0);
				N(a, (.5 - d) * b, 0, 0, (.5 - d) * c, 0, .5 * c);
				N(a, 0, (.5 + d) * c, (.5 - d) * b, c, .5 * b, c);
				N(a, (.5 + d) * b, c, b, (.5 + d) * c, b, .5 * c);
				d = 4 * (Math.SQRT2 - 1) / 3 * .4;
				M(a, .5 * b, .1 * c, !0, !0);
				N(a, (.5 + d) * b, .1 * c, .9 * b, (.5 - d) * c, .9 * b, .5 * c);
				N(a, .9 * b, (.5 + d) * c, (.5 + d) * b, .9 * c, .5 * b, .9 * c);
				N(a, (.5 - d) * b, .9 * c, .1 * b, (.5 + d) * c, .1 * b, .5 * c);
				N(a, .1 * b, (.5 - d) * c, (.5 - d) * b, .1 * c, .5 * b, .1 * c);
				var d = .07,
					e = 0,
					f = -.707 * .11,
					h = 4 * (Math.SQRT2 - 1) / 3 * d;
				M(a, (.5 + d + e) * b, (.5 + f) * c, !0);
				N(a, (.5 + d + e) * b, (.5 - h + f) * c, (.5 + h + e) * b, (.5 - d + f) * c, (.5 + e) * b, (.5 - d + f) * c);
				N(a, (.5 - h + e) * b, (.5 - d + f) * c, (.5 - d + e) * b, (.5 - h + f) * c, (.5 - d + e) * b, (.5 + f) * c);
				N(a, (.5 - d + e) * b, (.5 + h + f) * c, (.5 - h + e) * b, (.5 + d + f) * c, (.5 + e) * b, (.5 + d + f) * c);
				N(a, (.5 + h + e) * b, (.5 + d + f) *
					c, (.5 + d + e) * b, (.5 + h + f) * c, (.5 + d + e) * b, (.5 + f) * c);
				d = .07;
				e = -.707 * .11;
				f = .707 * .11;
				h = 4 * (Math.SQRT2 - 1) / 3 * d;
				M(a, (.5 + d + e) * b, (.5 + f) * c, !0);
				N(a, (.5 + d + e) * b, (.5 - h + f) * c, (.5 + h + e) * b, (.5 - d + f) * c, (.5 + e) * b, (.5 - d + f) * c);
				N(a, (.5 - h + e) * b, (.5 - d + f) * c, (.5 - d + e) * b, (.5 - h + f) * c, (.5 - d + e) * b, (.5 + f) * c);
				N(a, (.5 - d + e) * b, (.5 + h + f) * c, (.5 - h + e) * b, (.5 + d + f) * c, (.5 + e) * b, (.5 + d + f) * c);
				N(a, (.5 + h + e) * b, (.5 + d + f) * c, (.5 + d + e) * b, (.5 + h + f) * c, (.5 + d + e) * b, (.5 + f) * c);
				d = .07;
				e = .707 * .11;
				f = .707 * .11;
				h = 4 * (Math.SQRT2 - 1) / 3 * d;
				M(a, (.5 + d + e) * b, (.5 + f) * c, !0);
				N(a, (.5 + d + e) * b, (.5 - h +
					f) * c, (.5 + h + e) * b, (.5 - d + f) * c, (.5 + e) * b, (.5 - d + f) * c);
				N(a, (.5 - h + e) * b, (.5 - d + f) * c, (.5 - d + e) * b, (.5 - h + f) * c, (.5 - d + e) * b, (.5 + f) * c);
				N(a, (.5 - d + e) * b, (.5 + h + f) * c, (.5 - h + e) * b, (.5 + d + f) * c, (.5 + e) * b, (.5 + d + f) * c);
				N(a, (.5 + h + e) * b, (.5 + d + f) * c, (.5 + d + e) * b, (.5 + h + f) * c, (.5 + d + e) * b, (.5 + f) * c);
				b = a.o;
				b.A = new K(.146, .146);
				b.B = new K(.853, .853);
				b.ae = Rj;
				w.q(a);
				return b
			},
			NotAllowed: function(a, b, c) {
				var d = .5 * cd,
					e = .5;
				a = w.s();
				M(a, .5 * b, (.5 - e) * c, !0);
				N(a, (.5 - d) * b, (.5 - e) * c, (.5 - e) * b, (.5 - d) * c, (.5 - e) * b, .5 * c);
				N(a, (.5 - e) * b, (.5 + d) * c, (.5 - d) * b, (.5 + e) * c, .5 * b,
					(.5 + e) * c);
				N(a, (.5 + d) * b, (.5 + e) * c, (.5 + e) * b, (.5 + d) * c, (.5 + e) * b, .5 * c);
				N(a, (.5 + e) * b, (.5 - d) * c, (.5 + d) * b, (.5 - e) * c, .5 * b, (.5 - e) * c);
				var e = .4,
					d = .4 * cd,
					f = w.K(),
					h = w.K(),
					k = w.K(),
					l = w.K();
				ee(.5, .5 - e, .5 + d, .5 - e, .5 + e, .5 - d, .5 + e, .5, .42, f, h, k, l, l);
				var m = w.K(),
					n = w.K(),
					p = w.K();
				ee(.5, .5 - e, .5 + d, .5 - e, .5 + e, .5 - d, .5 + e, .5, .58, l, l, p, m, n);
				var q = w.K(),
					r = w.K(),
					s = w.K();
				ee(.5, .5 + e, .5 - d, .5 + e, .5 - e, .5 + d, .5 - e, .5, .42, q, r, s, l, l);
				var u = w.K(),
					t = w.K(),
					x = w.K();
				ee(.5, .5 + e, .5 - d, .5 + e, .5 - e, .5 + d, .5 - e, .5, .58, l, l, x, u, t);
				M(a, x.x * b, x.y * c, !0, !0);
				N(a, u.x * b,
					u.y * c, t.x * b, t.y * c, (.5 - e) * b, .5 * c);
				N(a, (.5 - e) * b, (.5 - d) * c, (.5 - d) * b, (.5 - e) * c, .5 * b, (.5 - e) * c);
				N(a, f.x * b, f.y * c, h.x * b, h.y * c, k.x * b, k.y * c);
				a.lineTo(x.x * b, x.y * c);
				O(a);
				M(a, s.x * b, s.y * c, !0, !0);
				a.lineTo(p.x * b, p.y * c);
				N(a, m.x * b, m.y * c, n.x * b, n.y * c, (.5 + e) * b, .5 * c);
				N(a, (.5 + e) * b, (.5 + d) * c, (.5 + d) * b, (.5 + e) * c, .5 * b, (.5 + e) * c);
				N(a, q.x * b, q.y * c, r.x * b, r.y * c, s.x * b, s.y * c);
				O(a);
				w.v(f);
				w.v(h);
				w.v(k);
				w.v(l);
				w.v(m);
				w.v(n);
				w.v(p);
				w.v(q);
				w.v(r);
				w.v(s);
				w.v(u);
				w.v(t);
				w.v(x);
				b = a.o;
				w.q(a);
				b.ae = Rj;
				return b
			},
			Fragile: function(a, b, c) {
				a = w.s();
				M(a,
					0, 0, !0);
				a.lineTo(.25 * b, 0);
				a.lineTo(.2 * b, .15 * c);
				a.lineTo(.3 * b, .25 * c);
				a.lineTo(.29 * b, .33 * c);
				a.lineTo(.35 * b, .25 * c);
				a.lineTo(.3 * b, .15 * c);
				a.lineTo(.4 * b, 0);
				a.lineTo(1 * b, 0);
				N(a, 1 * b, .25 * c, .75 * b, .5 * c, .55 * b, .5 * c);
				a.lineTo(.55 * b, .9 * c);
				a.lineTo(.7 * b, .9 * c);
				a.lineTo(.7 * b, 1 * c);
				a.lineTo(.3 * b, 1 * c);
				a.lineTo(.3 * b, .9 * c);
				a.lineTo(.45 * b, .9 * c);
				a.lineTo(.45 * b, .5 * c);
				N(a, .25 * b, .5 * c, 0, .25 * c, 0, 0);
				O(a);
				b = a.o;
				b.A = new K(.25, 0);
				b.B = new K(.75, .4);
				w.q(a);
				return b
			},
			HourGlass: function(a, b, c) {
				a = w.s();
				M(a, .65 * b, .5 * c, !0);
				a.lineTo(1 * b,
					1 * c);
				a.lineTo(0, 1 * c);
				a.lineTo(.35 * b, .5 * c);
				a.lineTo(0, 0);
				a.lineTo(1 * b, 0);
				O(a);
				b = a.o;
				w.q(a);
				return b
			},
			Lightning: function(a, b, c) {
				a = w.s();
				M(a, 0 * b, .55 * c, !0);
				a.lineTo(.75 * b, 0);
				a.lineTo(.25 * b, .45 * c);
				a.lineTo(.9 * b, .48 * c);
				a.lineTo(.4 * b, 1 * c);
				a.lineTo(.65 * b, .55 * c);
				O(a);
				b = a.o;
				w.q(a);
				return b
			},
			Parallelogram1: function(a, b, c) {
				a = a ? a.Hc : NaN;
				isNaN(a) && (a = .1);
				var d = w.s();
				M(d, a * b, 0, !0);
				d.lineTo(1 * b, 0);
				d.lineTo((1 - a) * b, 1 * c);
				d.lineTo(0, 1 * c);
				O(d);
				b = d.o;
				b.A = new K(a, 0);
				b.B = new K(1 - a, 1);
				w.q(d);
				return b
			},
			Input: "Output",
			Output: function(a,
				b, c) {
				a = w.s();
				M(a, 0, 1 * c, !0);
				a.lineTo(.1 * b, 0);
				a.lineTo(1 * b, 0);
				a.lineTo(.9 * b, 1 * c);
				O(a);
				b = a.o;
				b.A = new K(.1, 0);
				b.B = new K(.9, 1);
				w.q(a);
				return b
			},
			Parallelogram2: function(a, b, c) {
				a = a ? a.Hc : NaN;
				isNaN(a) && (a = .25);
				var d = w.s();
				M(d, a * b, 0, !0);
				d.lineTo(1 * b, 0);
				d.lineTo((1 - a) * b, 1 * c);
				d.lineTo(0, 1 * c);
				O(d);
				b = d.o;
				b.A = new K(a, 0);
				b.B = new K(1 - a, 1);
				w.q(d);
				return b
			},
			ThickCross: function(a, b, c) {
				a = a ? a.Hc : NaN;
				isNaN(a) && (a = .25);
				var d = w.s();
				M(d, (.5 - a / 2) * b, 0, !0);
				d.lineTo((.5 + a / 2) * b, 0);
				d.lineTo((.5 + a / 2) * b, (.5 - a / 2) * c);
				d.lineTo(1 * b, (.5 -
					a / 2) * c);
				d.lineTo(1 * b, (.5 + a / 2) * c);
				d.lineTo((.5 + a / 2) * b, (.5 + a / 2) * c);
				d.lineTo((.5 + a / 2) * b, 1 * c);
				d.lineTo((.5 - a / 2) * b, 1 * c);
				d.lineTo((.5 - a / 2) * b, (.5 + a / 2) * c);
				d.lineTo(0, (.5 + a / 2) * c);
				d.lineTo(0, (.5 - a / 2) * c);
				d.lineTo((.5 - a / 2) * b, (.5 - a / 2) * c);
				O(d);
				b = d.o;
				b.A = new K(.5 - a / 2, .5 - a / 2);
				b.B = new K(.5 + a / 2, .5 + a / 2);
				w.q(d);
				return b
			},
			ThickX: function(a, b, c) {
				a = .25 / Math.SQRT2;
				var d = w.s();
				M(d, .3 * b, 0, !0);
				d.lineTo(.5 * b, .2 * c);
				d.lineTo(.7 * b, 0);
				d.lineTo(1 * b, .3 * c);
				d.lineTo(.8 * b, .5 * c);
				d.lineTo(1 * b, .7 * c);
				d.lineTo(.7 * b, 1 * c);
				d.lineTo(.5 * b, .8 *
					c);
				d.lineTo(.3 * b, 1 * c);
				d.lineTo(0, .7 * c);
				d.lineTo(.2 * b, .5 * c);
				d.lineTo(0, .3 * c);
				O(d);
				b = d.o;
				b.A = new K(.5 - a, .5 - a);
				b.B = new K(.5 + a, .5 + a);
				w.q(d);
				return b
			},
			ThinCross: function(a, b, c) {
				var d = a ? a.Hc : NaN;
				isNaN(d) && (d = .1);
				a = w.s();
				M(a, (.5 - d / 2) * b, 0, !0);
				a.lineTo((.5 + d / 2) * b, 0);
				a.lineTo((.5 + d / 2) * b, (.5 - d / 2) * c);
				a.lineTo(1 * b, (.5 - d / 2) * c);
				a.lineTo(1 * b, (.5 + d / 2) * c);
				a.lineTo((.5 + d / 2) * b, (.5 + d / 2) * c);
				a.lineTo((.5 + d / 2) * b, 1 * c);
				a.lineTo((.5 - d / 2) * b, 1 * c);
				a.lineTo((.5 - d / 2) * b, (.5 + d / 2) * c);
				a.lineTo(0, (.5 + d / 2) * c);
				a.lineTo(0, (.5 - d / 2) * c);
				a.lineTo((.5 -
					d / 2) * b, (.5 - d / 2) * c);
				O(a);
				b = a.o;
				w.q(a);
				return b
			},
			ThinX: function(a, b, c) {
				a = w.s();
				M(a, .1 * b, 0, !0);
				a.lineTo(.5 * b, .4 * c);
				a.lineTo(.9 * b, 0);
				a.lineTo(1 * b, .1 * c);
				a.lineTo(.6 * b, .5 * c);
				a.lineTo(1 * b, .9 * c);
				a.lineTo(.9 * b, 1 * c);
				a.lineTo(.5 * b, .6 * c);
				a.lineTo(.1 * b, 1 * c);
				a.lineTo(0, .9 * c);
				a.lineTo(.4 * b, .5 * c);
				a.lineTo(0, .1 * c);
				O(a);
				b = a.o;
				w.q(a);
				return b
			},
			RightTriangle: function(a, b, c) {
				a = w.s();
				M(a, 0, 0, !0);
				a.lineTo(1 * b, 1 * c);
				a.lineTo(0, 1 * c);
				O(a);
				b = a.o;
				b.A = new K(0, .5);
				b.B = new K(.5, 1);
				w.q(a);
				return b
			},
			RoundedIBeam: function(a, b, c) {
				a =
					w.s();
				M(a, 0, 0, !0);
				a.lineTo(1 * b, 0);
				N(a, .5 * b, .25 * c, .5 * b, .75 * c, 1 * b, 1 * c);
				a.lineTo(0, 1 * c);
				N(a, .5 * b, .75 * c, .5 * b, .25 * c, 0, 0);
				O(a);
				b = a.o;
				w.q(a);
				return b
			},
			RoundedRectangle: function(a, b, c) {
				var d = a ? a.Hc : NaN;
				isNaN(d) && (d = 5);
				d = Math.min(d, b / 3);
				d = Math.min(d, c / 3);
				a = d * cd;
				var e = w.s();
				M(e, d, 0, !0);
				e.lineTo(b - d, 0);
				N(e, b - a, 0, b, a, b, d);
				e.lineTo(b, c - d);
				N(e, b, c - a, b - a, c, b - d, c);
				e.lineTo(d, c);
				N(e, a, c, 0, c - a, 0, c - d);
				e.lineTo(0, d);
				N(e, 0, a, a, 0, d, 0);
				O(e);
				b = e.o;
				1 < a ? (b.A = new K(0, 0, a, a), b.B = new K(1, 1, -a, -a)) : (b.A = zb, b.B = Sb);
				w.q(e);
				return b
			},
			Border: function(a, b, c) {
				var d = a ? a.Hc : NaN;
				isNaN(d) && (d = 5);
				d = Math.min(d, b / 3);
				d = Math.min(d, c / 3);
				a = w.s();
				M(a, d, 0, !0);
				a.lineTo(b - d, 0);
				N(a, b - 0, 0, b, 0, b, d);
				a.lineTo(b, c - d);
				N(a, b, c - 0, b - 0, c, b - d, c);
				a.lineTo(d, c);
				N(a, 0, c, 0, c - 0, 0, c - d);
				a.lineTo(0, d);
				N(a, 0, 0, 0, 0, d, 0);
				O(a);
				b = a.o;
				b.A = zb;
				b.B = Sb;
				w.q(a);
				return b
			},
			SquareIBeam: function(a, b, c) {
				var d = a ? a.Hc : NaN;
				isNaN(d) && (d = .2);
				a = w.s();
				M(a, 0, 0, !0);
				a.lineTo(1 * b, 0);
				a.lineTo(1 * b, d * c);
				a.lineTo((.5 + d / 2) * b, d * c);
				a.lineTo((.5 + d / 2) * b, (1 - d) * c);
				a.lineTo(1 * b, (1 - d) * c);
				a.lineTo(1 * b, 1 *
					c);
				a.lineTo(0, 1 * c);
				a.lineTo(0, (1 - d) * c);
				a.lineTo((.5 - d / 2) * b, (1 - d) * c);
				a.lineTo((.5 - d / 2) * b, d * c);
				a.lineTo(0, d * c);
				O(a);
				b = a.o;
				w.q(a);
				return b
			},
			Trapezoid: function(a, b, c) {
				a = a ? a.Hc : NaN;
				isNaN(a) && (a = .2);
				var d = w.s();
				M(d, a * b, 0, !0);
				d.lineTo((1 - a) * b, 0);
				d.lineTo(1 * b, 1 * c);
				d.lineTo(0, 1 * c);
				O(d);
				b = d.o;
				b.A = new K(a, 0);
				b.B = new K(1 - a, 1);
				w.q(d);
				return b
			},
			ManualLoop: "ManualOperation",
			ManualOperation: function(a, b, c) {
				var d = a ? a.Hc : NaN;
				isNaN(d) && (d = 0);
				a = w.s();
				M(a, d, 0, !0);
				a.lineTo(0, 0);
				a.lineTo(1 * b, 0);
				a.lineTo(.9 * b, 1 * c);
				a.lineTo(.1 *
					b, 1 * c);
				O(a);
				b = a.o;
				b.A = new K(.1, 0);
				b.B = new K(.9, 1);
				w.q(a);
				return b
			},
			GenderMale: function(a, b, c) {
				a = w.s();
				var d = .4 * cd,
					e = .4,
					f = w.K(),
					h = w.K(),
					k = w.K(),
					l = w.K();
				M(a, (.5 - e) * b, .5 * c, !0);
				N(a, (.5 - e) * b, (.5 - d) * c, (.5 - d) * b, (.5 - e) * c, .5 * b, (.5 - e) * c);
				ee(.5, .5 - e, .5 + d, .5 - e, .5 + e, .5 - d, .5 + e, .5, .44, k, l, h, f, f);
				N(a, k.x * b, k.y * c, l.x * b, l.y * c, h.x * b, h.y * c);
				var m = w.xb(h.x, h.y);
				ee(.5, .5 - e, .5 + d, .5 - e, .5 + e, .5 - d, .5 + e, .5, .56, f, f, h, k, l);
				var n = w.xb(h.x, h.y);
				a.lineTo((.1 * m.x + .855) * b, .1 * m.y * c);
				a.lineTo(.85 * b, .1 * m.y * c);
				a.lineTo(.85 * b, 0);
				a.lineTo(1 *
					b, 0);
				a.lineTo(1 * b, .15 * c);
				a.lineTo((.1 * n.x + .9) * b, .15 * c);
				a.lineTo((.1 * n.x + .9) * b, (.1 * n.y + .05 * .9) * c);
				a.lineTo(n.x * b, n.y * c);
				N(a, k.x * b, k.y * c, l.x * b, l.y * c, (.5 + e) * b, .5 * c);
				N(a, (.5 + e) * b, (.5 + d) * c, (.5 + d) * b, (.5 + e) * c, .5 * b, (.5 + e) * c);
				N(a, (.5 - d) * b, (.5 + e) * c, (.5 - e) * b, (.5 + d) * c, (.5 - e) * b, .5 * c);
				e = .35;
				d = .35 * cd;
				M(a, .5 * b, (.5 - e) * c, !0, !0);
				N(a, (.5 - d) * b, (.5 - e) * c, (.5 - e) * b, (.5 - d) * c, (.5 - e) * b, .5 * c);
				N(a, (.5 - e) * b, (.5 + d) * c, (.5 - d) * b, (.5 + e) * c, .5 * b, (.5 + e) * c);
				N(a, (.5 + d) * b, (.5 + e) * c, (.5 + e) * b, (.5 + d) * c, (.5 + e) * b, .5 * c);
				N(a, (.5 + e) * b, (.5 - d) * c, (.5 +
					d) * b, (.5 - e) * c, .5 * b, (.5 - e) * c);
				M(a, (.5 - e) * b, .5 * c, !0);
				w.v(f);
				w.v(h);
				w.v(k);
				w.v(l);
				w.v(m);
				w.v(n);
				b = a.o;
				b.A = new K(.202, .257);
				b.B = new K(.692, .839);
				b.ae = Rj;
				w.q(a);
				return b
			},
			GenderFemale: function(a, b, c) {
				a = w.s();
				var d = .375,
					e = 0,
					f = -.125,
					h = 4 * (Math.SQRT2 - 1) / 3 * d;
				M(a, (.525 + e) * b, (.5 + d + f) * c, !0);
				N(a, (.5 + h + e) * b, (.5 + d + f) * c, (.5 + d + e) * b, (.5 + h + f) * c, (.5 + d + e) * b, (.5 + f) * c);
				N(a, (.5 + d + e) * b, (.5 - h + f) * c, (.5 + h + e) * b, (.5 - d + f) * c, (.5 + e) * b, (.5 - d + f) * c);
				N(a, (.5 - h + e) * b, (.5 - d + f) * c, (.5 - d + e) * b, (.5 - h + f) * c, (.5 - d + e) * b, (.5 + f) * c);
				N(a, (.5 - d + e) * b,
					(.5 + h + f) * c, (.5 - h + e) * b, (.5 + d + f) * c, (.475 + e) * b, (.5 + d + f) * c);
				a.lineTo(.475 * b, .85 * c);
				a.lineTo(.425 * b, .85 * c);
				a.lineTo(.425 * b, .9 * c);
				a.lineTo(.475 * b, .9 * c);
				a.lineTo(.475 * b, 1 * c);
				a.lineTo(.525 * b, 1 * c);
				a.lineTo(.525 * b, .9 * c);
				a.lineTo(.575 * b, .9 * c);
				a.lineTo(.575 * b, .85 * c);
				a.lineTo(.525 * b, .85 * c);
				O(a);
				d = .325;
				e = 0;
				f = -.125;
				h = 4 * (Math.SQRT2 - 1) / 3 * d;
				M(a, (.5 + d + e) * b, (.5 + f) * c, !0, !0);
				N(a, (.5 + d + e) * b, (.5 + h + f) * c, (.5 + h + e) * b, (.5 + d + f) * c, (.5 + e) * b, (.5 + d + f) * c);
				N(a, (.5 - h + e) * b, (.5 + d + f) * c, (.5 - d + e) * b, (.5 + h + f) * c, (.5 - d + e) * b, (.5 + f) * c);
				N(a, (.5 -
					d + e) * b, (.5 - h + f) * c, (.5 - h + e) * b, (.5 - d + f) * c, (.5 + e) * b, (.5 - d + f) * c);
				N(a, (.5 + h + e) * b, (.5 - d + f) * c, (.5 + d + e) * b, (.5 - h + f) * c, (.5 + d + e) * b, (.5 + f) * c);
				M(a, (.525 + e) * b, (.5 + d + f) * c, !0);
				b = a.o;
				b.A = new K(.232, .136);
				b.B = new K(.782, .611);
				b.ae = Rj;
				w.q(a);
				return b
			},
			PlusLine: function(a, b, c) {
				a = w.s();
				M(a, 0, .5 * c, !1);
				a.lineTo(1 * b, .5 * c);
				a.moveTo(.5 * b, 0);
				a.lineTo(.5 * b, 1 * c);
				b = a.o;
				w.q(a);
				return b
			},
			XLine: function(a, b, c) {
				a = w.s();
				M(a, 0, 1 * c, !1);
				a.lineTo(1 * b, 0);
				a.moveTo(0, 0);
				a.lineTo(1 * b, 1 * c);
				b = a.o;
				w.q(a);
				return b
			},
			AsteriskLine: function(a, b, c) {
				a =
					w.s();
				var d = .2 / Math.SQRT2;
				M(a, d * b, (1 - d) * c, !1);
				a.lineTo((1 - d) * b, d * c);
				a.moveTo(d * b, d * c);
				a.lineTo((1 - d) * b, (1 - d) * c);
				a.moveTo(0 * b, .5 * c);
				a.lineTo(1 * b, .5 * c);
				a.moveTo(.5 * b, 0 * c);
				a.lineTo(.5 * b, 1 * c);
				b = a.o;
				w.q(a);
				return b
			},
			CircleLine: function(a, b, c) {
				var d = .5 * cd;
				a = w.s();
				M(a, 1 * b, .5 * c, !1);
				N(a, 1 * b, (.5 + d) * c, (.5 + d) * b, 1 * c, .5 * b, 1 * c);
				N(a, (.5 - d) * b, 1 * c, 0, (.5 + d) * c, 0, .5 * c);
				N(a, 0, (.5 - d) * c, (.5 - d) * b, 0, .5 * b, 0);
				N(a, (.5 + d) * b, 0, 1 * b, (.5 - d) * c, 1 * b, .5 * c);
				b = a.o;
				b.A = new K(.146, .146);
				b.B = new K(.853, .853);
				b.ae = Rj;
				w.q(a);
				return b
			},
			Pie: function(a,
				b, c) {
				a = w.s();
				var d = 4 * (Math.SQRT2 - 1) / 3 * .5;
				M(a, (.5 * Math.SQRT2 / 2 + .5) * b, (.5 - .5 * Math.SQRT2 / 2) * c, !0);
				N(a, .7 * b, 0 * c, .5 * b, 0 * c, .5 * b, 0 * c);
				N(a, (.5 - d + 0) * b, 0 * c, 0 * b, (.5 - d + 0) * c, 0 * b, .5 * c);
				N(a, 0 * b, (.5 + d + 0) * c, (.5 - d + 0) * b, 1 * c, .5 * b, 1 * c);
				N(a, (.5 + d + 0) * b, 1 * c, 1 * b, (.5 + d + 0) * c, 1 * b, .5 * c);
				a.lineTo(.5 * b, .5 * c);
				O(a);
				b = a.o;
				w.q(a);
				return b
			},
			PiePiece: function(a, b, c) {
				var d = cd / Math.SQRT2 * .5,
					e = Math.SQRT2 / 2,
					f = 1 - Math.SQRT2 / 2;
				a = w.s();
				M(a, b, c, !0);
				N(a, b, (1 - d) * c, (e + d) * b, (f + d) * c, e * b, f * c);
				a.lineTo(0, c);
				O(a);
				b = a.o;
				w.q(a);
				return b
			},
			StopSign: function(a,
				b, c) {
				a = 1 / (Math.SQRT2 + 2);
				var d = w.s();
				M(d, a * b, 0, !0);
				d.lineTo((1 - a) * b, 0);
				d.lineTo(1 * b, a * c);
				d.lineTo(1 * b, (1 - a) * c);
				d.lineTo((1 - a) * b, 1 * c);
				d.lineTo(a * b, 1 * c);
				d.lineTo(0, (1 - a) * c);
				d.lineTo(0, a * c);
				O(d);
				b = d.o;
				b.A = new K(a / 2, a / 2);
				b.B = new K(1 - a / 2, 1 - a / 2);
				w.q(d);
				return b
			},
			LogicImplies: function(a, b, c) {
				var d = a ? a.Hc : NaN;
				isNaN(d) && (d = .2);
				a = w.s();
				M(a, (1 - d) * b, 0 * c, !1);
				a.lineTo(1 * b, .5 * c);
				a.lineTo((1 - d) * b, c);
				a.moveTo(0, .5 * c);
				a.lineTo(b, .5 * c);
				b = a.o;
				b.A = zb;
				b.B = new K(.8, .5);
				w.q(a);
				return b
			},
			LogicIff: function(a, b, c) {
				var d = a ? a.Hc :
					NaN;
				isNaN(d) && (d = .2);
				a = w.s();
				M(a, (1 - d) * b, 0 * c, !1);
				a.lineTo(1 * b, .5 * c);
				a.lineTo((1 - d) * b, c);
				a.moveTo(0, .5 * c);
				a.lineTo(b, .5 * c);
				a.moveTo(d * b, 0);
				a.lineTo(0, .5 * c);
				a.lineTo(d * b, c);
				b = a.o;
				b.A = new K(.2, 0);
				b.B = new K(.8, .5);
				w.q(a);
				return b
			},
			LogicNot: function(a, b, c) {
				a = w.s();
				M(a, 0, 0, !1);
				a.lineTo(1 * b, 0);
				a.lineTo(1 * b, 1 * c);
				b = a.o;
				w.q(a);
				return b
			},
			LogicAnd: function(a, b, c) {
				a = w.s();
				M(a, 0, 1 * c, !1);
				a.lineTo(.5 * b, 0);
				a.lineTo(1 * b, 1 * c);
				b = a.o;
				b.A = new K(.25, .5);
				b.B = new K(.75, 1);
				w.q(a);
				return b
			},
			LogicOr: function(a, b, c) {
				a = w.s();
				M(a, 0, 0, !1);
				a.lineTo(.5 * b, 1 * c);
				a.lineTo(1 * b, 0);
				b = a.o;
				b.A = new K(.219, 0);
				b.B = new K(.78, .409);
				w.q(a);
				return b
			},
			LogicXor: function(a, b, c) {
				a = w.s();
				M(a, .5 * b, 0, !1);
				a.lineTo(.5 * b, 1 * c);
				a.moveTo(0, .5 * c);
				a.lineTo(1 * b, .5 * c);
				var d = .5 * cd;
				N(a, 1 * b, (.5 + d) * c, (.5 + d) * b, 1 * c, .5 * b, 1 * c);
				N(a, (.5 - d) * b, 1 * c, 0, (.5 + d) * c, 0, .5 * c);
				N(a, 0, (.5 - d) * c, (.5 - d) * b, 0, .5 * b, 0);
				N(a, (.5 + d) * b, 0, 1 * b, (.5 - d) * c, 1 * b, .5 * c);
				b = a.o;
				b.ae = Rj;
				w.q(a);
				return b
			},
			LogicTruth: function(a, b, c) {
				a = w.s();
				M(a, 0, 0, !1);
				a.lineTo(1 * b, 0);
				a.moveTo(.5 * b, 0);
				a.lineTo(.5 * b, 1 * c);
				b = a.o;
				w.q(a);
				return b
			},
			LogicFalsity: function(a, b, c) {
				a = w.s();
				M(a, 0, 1 * c, !1);
				a.lineTo(1 * b, 1 * c);
				a.moveTo(.5 * b, 1 * c);
				a.lineTo(.5 * b, 0);
				b = a.o;
				w.q(a);
				return b
			},
			LogicThereExists: function(a, b, c) {
				a = w.s();
				M(a, 0, 0, !1);
				a.lineTo(1 * b, 0);
				a.lineTo(1 * b, .5 * c);
				a.lineTo(0, .5 * c);
				a.moveTo(1 * b, .5 * c);
				a.lineTo(1 * b, 1 * c);
				a.lineTo(0, 1 * c);
				b = a.o;
				w.q(a);
				return b
			},
			LogicForAll: function(a, b, c) {
				a = w.s();
				M(a, 0, 0, !1);
				a.lineTo(.5 * b, 1 * c);
				a.lineTo(1 * b, 0);
				a.moveTo(.25 * b, .5 * c);
				a.lineTo(.75 * b, .5 * c);
				b = a.o;
				b.A = new K(.25, 0);
				b.B = new K(.75, .5);
				w.q(a);
				return b
			},
			LogicIsDefinedAs: function(a, b, c) {
				a = w.s();
				M(a, 0, 0, !1);
				a.lineTo(b, 0);
				a.moveTo(0, .5 * c);
				a.lineTo(b, .5 * c);
				a.moveTo(0, c);
				a.lineTo(b, c);
				b = a.o;
				b.A = new K(.01, .01);
				b.B = new K(.99, .49);
				w.q(a);
				return b
			},
			LogicIntersect: function(a, b, c) {
				var d = .5 * cd;
				a = w.s();
				M(a, 0, 1 * c, !1);
				a.lineTo(0, .5 * c);
				N(a, 0, (.5 - d) * c, (.5 - d) * b, 0, .5 * b, 0);
				N(a, (.5 + d) * b, 0, 1 * b, (.5 - d) * c, 1 * b, .5 * c);
				a.lineTo(1 * b, 1 * c);
				b = a.o;
				b.A = new K(0, .5);
				b.B = Sb;
				w.q(a);
				return b
			},
			LogicUnion: function(a, b, c) {
				var d = .5 * cd;
				a = w.s();
				M(a, 1 * b, 0, !1);
				a.lineTo(1 * b, .5 * c);
				N(a,
					1 * b, (.5 + d) * c, (.5 + d) * b, 1 * c, .5 * b, 1 * c);
				N(a, (.5 - d) * b, 1 * c, 0, (.5 + d) * c, 0, .5 * c);
				a.lineTo(0, 0);
				b = a.o;
				b.A = zb;
				b.B = new K(1, .5);
				w.q(a);
				return b
			},
			Arrow: function(a, b, c) {
				var d = a ? a.Hc : NaN,
					e = a ? a.Ku : NaN;
				isNaN(d) && (d = .3);
				isNaN(e) && (e = .3);
				a = w.s();
				M(a, 0, (.5 - e / 2) * c, !0);
				a.lineTo((1 - d) * b, (.5 - e / 2) * c);
				a.lineTo((1 - d) * b, 0);
				a.lineTo(1 * b, .5 * c);
				a.lineTo((1 - d) * b, 1 * c);
				a.lineTo((1 - d) * b, (.5 + e / 2) * c);
				a.lineTo(0, (.5 + e / 2) * c);
				O(a);
				b = a.o;
				b.A = new K(0, .5 - e / 2);
				d = me(0, .5 + e / 2, 1, .5 + e / 2, 1 - d, 1, 1, .5, w.K());
				b.B = new K(d.x, d.y);
				w.v(d);
				w.q(a);
				return b
			},
			ISOProcess: "Chevron",
			Chevron: function(a, b, c) {
				a = w.s();
				M(a, 0, 0, !0);
				a.lineTo(.5 * b, 0);
				a.lineTo(1 * b, .5 * c);
				a.lineTo(.5 * b, 1 * c);
				a.lineTo(0, 1 * c);
				a.lineTo(.5 * b, .5 * c);
				O(a);
				b = a.o;
				w.q(a);
				return b
			},
			DoubleArrow: function(a, b, c) {
				a = w.s();
				M(a, 0, 0, !0);
				a.lineTo(.3 * b, .214 * c);
				a.lineTo(.3 * b, 0);
				a.lineTo(1 * b, .5 * c);
				a.lineTo(.3 * b, 1 * c);
				a.lineTo(.3 * b, .786 * c);
				a.lineTo(0, 1 * c);
				O(a);
				M(a, .3 * b, .214 * c, !1);
				a.lineTo(.3 * b, .786 * c);
				a.ab(!1);
				b = a.o;
				w.q(a);
				return b
			},
			DoubleEndArrow: function(a, b, c) {
				a = w.s();
				M(a, 1 * b, .5 * c, !0);
				a.lineTo(.7 * b, 1 * c);
				a.lineTo(.7 * b, .7 * c);
				a.lineTo(.3 * b, .7 * c);
				a.lineTo(.3 * b, 1 * c);
				a.lineTo(0, .5 * c);
				a.lineTo(.3 * b, 0);
				a.lineTo(.3 * b, .3 * c);
				a.lineTo(.7 * b, .3 * c);
				a.lineTo(.7 * b, 0);
				O(a);
				b = a.o;
				c = me(0, .5, .3, 0, 0, .3, .3, .3, w.K());
				b.A = new K(c.x, c.y);
				c = me(.7, 1, 1, .5, .7, .7, 1, .7, c);
				b.B = new K(c.x, c.y);
				w.v(c);
				w.q(a);
				return b
			},
			IBeamArrow: function(a, b, c) {
				a = w.s();
				M(a, 1 * b, .5 * c, !0);
				a.lineTo(.7 * b, 1 * c);
				a.lineTo(.7 * b, .7 * c);
				a.lineTo(.2 * b, .7 * c);
				a.lineTo(.2 * b, 1 * c);
				a.lineTo(0, 1 * c);
				a.lineTo(0, 0);
				a.lineTo(.2 * b, 0);
				a.lineTo(.2 * b, .3 * c);
				a.lineTo(.7 * b, .3 * c);
				a.lineTo(.7 * b, 0);
				O(a);
				b = a.o;
				b.A = new K(0, .3);
				c = me(.7, 1, 1, .5, .7, .7, 1, .7, w.K());
				b.B = new K(c.x, c.y);
				w.v(c);
				w.q(a);
				return b
			},
			Pointer: function(a, b, c) {
				a = w.s();
				M(a, 1 * b, .5 * c, !0);
				a.lineTo(0, 1 * c);
				a.lineTo(.2 * b, .5 * c);
				a.lineTo(0, 0);
				O(a);
				b = a.o;
				b.A = new K(.2, .35);
				c = me(.2, .65, 1, .65, 0, 1, 1, .5, w.K());
				b.B = new K(c.x, c.y);
				w.v(c);
				w.q(a);
				return b
			},
			RoundedPointer: function(a, b, c) {
				a = w.s();
				M(a, 1 * b, .5 * c, !0);
				a.lineTo(0, 1 * c);
				N(a, .5 * b, .75 * c, .5 * b, .25 * c, 0, 0);
				O(a);
				b = a.o;
				b.A = new K(.4, .35);
				c = me(.2, .65, 1, .65, 0, 1, 1, .5, w.K());
				b.B = new K(c.x,
					c.y);
				w.v(c);
				w.q(a);
				return b
			},
			SplitEndArrow: function(a, b, c) {
				a = w.s();
				M(a, 1 * b, .5 * c, !0);
				a.lineTo(.7 * b, 1 * c);
				a.lineTo(.7 * b, .7 * c);
				a.lineTo(0, .7 * c);
				a.lineTo(.2 * b, .5 * c);
				a.lineTo(0, .3 * c);
				a.lineTo(.7 * b, .3 * c);
				a.lineTo(.7 * b, 0);
				O(a);
				b = a.o;
				b.A = new K(.2, .3);
				c = me(.7, 1, 1, .5, .7, .7, 1, .7, w.K());
				b.B = new K(c.x, c.y);
				w.v(c);
				w.q(a);
				return b
			},
			MessageToUser: "SquareArrow",
			SquareArrow: function(a, b, c) {
				a = w.s();
				M(a, 1 * b, .5 * c, !0);
				a.lineTo(.7 * b, 1 * c);
				a.lineTo(0, 1 * c);
				a.lineTo(0, 0);
				a.lineTo(.7 * b, 0);
				O(a);
				b = a.o;
				b.A = zb;
				b.B = new K(.7, 1);
				w.q(a);
				return b
			},
			Cone1: function(a, b, c) {
				var d = .5 * cd,
					e = .1 * cd;
				a = w.s();
				M(a, 0, .9 * c, !0);
				a.lineTo(.5 * b, 0);
				a.lineTo(1 * b, .9 * c);
				N(a, 1 * b, (.9 + e) * c, (.5 + d) * b, 1 * c, .5 * b, 1 * c);
				N(a, (.5 - d) * b, 1 * c, 0, (.9 + e) * c, 0, .9 * c);
				O(a);
				b = a.o;
				b.A = new K(.25, .5);
				b.B = new K(.75, .97);
				w.q(a);
				return b
			},
			Cone2: function(a, b, c) {
				a = w.s();
				M(a, 0, .9 * c, !0);
				N(a, (1 - .85 / .9) * b, 1 * c, .85 / .9 * b, 1 * c, 1 * b, .9 * c);
				a.lineTo(.5 * b, 0);
				a.lineTo(0, .9 * c);
				O(a);
				M(a, 0, .9 * c, !1);
				N(a, (1 - .85 / .9) * b, .8 * c, .85 / .9 * b, .8 * c, 1 * b, .9 * c);
				a.ab(!1);
				b = a.o;
				b.A = new K(.25, .5);
				b.B = new K(.75, .82);
				w.q(a);
				return b
			},
			Cube1: function(a, b, c) {
				a = w.s();
				M(a, .5 * b, 1 * c, !0);
				a.lineTo(1 * b, .85 * c);
				a.lineTo(1 * b, .15 * c);
				a.lineTo(.5 * b, 0 * c);
				a.lineTo(0 * b, .15 * c);
				a.lineTo(0 * b, .85 * c);
				O(a);
				M(a, .5 * b, 1 * c, !1);
				a.lineTo(.5 * b, .3 * c);
				a.lineTo(0, .15 * c);
				a.moveTo(.5 * b, .3 * c);
				a.lineTo(1 * b, .15 * c);
				a.ab(!1);
				b = a.o;
				b.A = new K(0, .3);
				b.B = new K(.5, .85);
				w.q(a);
				return b
			},
			Cube2: function(a, b, c) {
				a = w.s();
				M(a, 0, .3 * c, !0);
				a.lineTo(0 * b, 1 * c);
				a.lineTo(.7 * b, c);
				a.lineTo(1 * b, .7 * c);
				a.lineTo(1 * b, 0 * c);
				a.lineTo(.3 * b, 0 * c);
				O(a);
				M(a, 0, .3 * c, !1);
				a.lineTo(.7 * b, .3 * c);
				a.lineTo(1 * b,
					0 * c);
				a.moveTo(.7 * b, .3 * c);
				a.lineTo(.7 * b, 1 * c);
				a.ab(!1);
				b = a.o;
				b.A = new K(0, .3);
				b.B = new K(.7, 1);
				w.q(a);
				return b
			},
			MagneticData: "Cylinder1",
			Cylinder1: function(a, b, c) {
				var d = .5 * cd,
					e = .1 * cd;
				a = w.s();
				M(a, 0, .1 * c, !0);
				N(a, 0, (.1 - e) * c, (.5 - d) * b, 0, .5 * b, 0);
				N(a, (.5 + d) * b, 0, 1 * b, (.1 - e) * c, 1 * b, .1 * c);
				a.lineTo(b, .9 * c);
				N(a, 1 * b, (.9 + e) * c, (.5 + d) * b, 1 * c, .5 * b, 1 * c);
				N(a, (.5 - d) * b, 1 * c, 0, (.9 + e) * c, 0, .9 * c);
				a.lineTo(0, .1 * c);
				M(a, 0, .1 * c, !1);
				N(a, 0, (.1 + e) * c, (.5 - d) * b, .2 * c, .5 * b, .2 * c);
				N(a, (.5 + d) * b, .2 * c, 1 * b, (.1 + e) * c, 1 * b, .1 * c);
				a.ab(!1);
				b = a.o;
				b.A = new K(0,
					.2);
				b.B = new K(1, .9);
				w.q(a);
				return b
			},
			Cylinder2: function(a, b, c) {
				var d = .5 * cd,
					e = .1 * cd;
				a = w.s();
				M(a, 0, .9 * c, !0);
				a.lineTo(0, .1 * c);
				N(a, 0, (.1 - e) * c, (.5 - d) * b, 0, .5 * b, 0);
				N(a, (.5 + d) * b, 0, 1 * b, (.1 - e) * c, 1 * b, .1 * c);
				a.lineTo(1 * b, .9 * c);
				N(a, 1 * b, (.9 + e) * c, (.5 + d) * b, 1 * c, .5 * b, 1 * c);
				N(a, (.5 - d) * b, 1 * c, 0, (.9 + e) * c, 0, .9 * c);
				M(a, 0, .9 * c, !1);
				N(a, 0, (.9 - e) * c, (.5 - d) * b, .8 * c, .5 * b, .8 * c);
				N(a, (.5 + d) * b, .8 * c, 1 * b, (.9 - e) * c, 1 * b, .9 * c);
				a.ab(!1);
				b = a.o;
				b.A = new K(0, .1);
				b.B = new K(1, .8);
				w.q(a);
				return b
			},
			Cylinder3: function(a, b, c) {
				var d = .1 * cd,
					e = .5 * cd;
				a = w.s();
				M(a, .1 * b, 0, !0);
				a.lineTo(.9 * b, 0);
				N(a, (.9 + d) * b, 0, 1 * b, (.5 - e) * c, 1 * b, .5 * c);
				N(a, 1 * b, (.5 + e) * c, (.9 + d) * b, 1 * c, .9 * b, 1 * c);
				a.lineTo(.1 * b, 1 * c);
				N(a, (.1 - d) * b, 1 * c, 0, (.5 + e) * c, 0, .5 * c);
				N(a, 0, (.5 - e) * c, (.1 - d) * b, 0, .1 * b, 0);
				M(a, .1 * b, 0, !1);
				N(a, (.1 + d) * b, 0, .2 * b, (.5 - e) * c, .2 * b, .5 * c);
				N(a, .2 * b, (.5 + e) * c, (.1 + d) * b, 1 * c, .1 * b, 1 * c);
				a.ab(!1);
				b = a.o;
				b.A = new K(.2, 0);
				b.B = new K(.9, 1);
				w.q(a);
				return b
			},
			DirectData: "Cylinder4",
			Cylinder4: function(a, b, c) {
				var d = .1 * cd,
					e = .5 * cd;
				a = w.s();
				M(a, .9 * b, 0, !0);
				N(a, (.9 + d) * b, 0, 1 * b, (.5 - e) * c, 1 * b, .5 * c);
				N(a, 1 * b, (.5 +
					e) * c, (.9 + d) * b, 1 * c, .9 * b, 1 * c);
				a.lineTo(.1 * b, 1 * c);
				N(a, (.1 - d) * b, 1 * c, 0, (.5 + e) * c, 0, .5 * c);
				N(a, 0, (.5 - e) * c, (.1 - d) * b, 0, .1 * b, 0);
				a.lineTo(.9 * b, 0);
				M(a, .9 * b, 0, !1);
				N(a, (.9 - d) * b, 0, .8 * b, (.5 - e) * c, .8 * b, .5 * c);
				N(a, .8 * b, (.5 + e) * c, (.9 - d) * b, 1 * c, .9 * b, 1 * c);
				a.ab(!1);
				b = a.o;
				b.A = new K(.1, 0);
				b.B = new K(.8, 1);
				w.q(a);
				return b
			},
			Prism1: function(a, b, c) {
				a = w.s();
				M(a, .25 * b, .25 * c, !0);
				a.lineTo(.75 * b, 0);
				a.lineTo(b, .5 * c);
				a.lineTo(.5 * b, c);
				a.lineTo(0, c);
				O(a);
				M(a, .25 * b, .25 * c, !1);
				a.lineTo(.5 * b, c);
				a.ab(!1);
				b = a.o;
				b.A = new K(.408, .172);
				b.B = new K(.833,
					.662);
				w.q(a);
				return b
			},
			Prism2: function(a, b, c) {
				a = w.s();
				M(a, 0, .25 * c, !0);
				a.lineTo(.75 * b, 0);
				a.lineTo(1 * b, .25 * c);
				a.lineTo(.75 * b, .75 * c);
				a.lineTo(0, 1 * c);
				O(a);
				M(a, 0, c, !1);
				a.lineTo(.25 * b, .5 * c);
				a.lineTo(b, .25 * c);
				a.moveTo(0, .25 * c);
				a.lineTo(.25 * b, .5 * c);
				a.ab(!1);
				b = a.o;
				b.A = new K(.25, .5);
				b.B = new K(.75, .75);
				w.q(a);
				return b
			},
			Pyramid1: function(a, b, c) {
				a = w.s();
				M(a, .5 * b, 0, !0);
				a.lineTo(b, .75 * c);
				a.lineTo(.5 * b, 1 * c);
				a.lineTo(0, .75 * c);
				O(a);
				M(a, .5 * b, 0, !1);
				a.lineTo(.5 * b, 1 * c);
				a.ab(!1);
				b = a.o;
				b.A = new K(.25, .367);
				b.B = new K(.75,
					.875);
				w.q(a);
				return b
			},
			Pyramid2: function(a, b, c) {
				a = w.s();
				M(a, .5 * b, 0, !0);
				a.lineTo(b, .85 * c);
				a.lineTo(.5 * b, 1 * c);
				a.lineTo(0, .85 * c);
				O(a);
				M(a, .5 * b, 0, !1);
				a.lineTo(.5 * b, .7 * c);
				a.lineTo(0, .85 * c);
				a.moveTo(.5 * b, .7 * c);
				a.lineTo(1 * b, .85 * c);
				a.ab(!1);
				b = a.o;
				b.A = new K(.25, .367);
				b.B = new K(.75, .875);
				w.q(a);
				return b
			},
			Actor: function(a, b, c) {
				var d = .2 * cd,
					e = .1 * cd,
					f = .5,
					h = .1;
				a = w.s();
				M(a, f * b, (h + .1) * c, !0);
				N(a, (f - d) * b, (h + .1) * c, (f - .2) * b, (h + e) * c, (f - .2) * b, h * c);
				N(a, (f - .2) * b, (h - e) * c, (f - d) * b, (h - .1) * c, f * b, (h - .1) * c);
				N(a, (f + d) * b, (h - .1) * c,
					(f + .2) * b, (h - e) * c, (f + .2) * b, h * c);
				N(a, (f + .2) * b, (h + e) * c, (f + d) * b, (h + .1) * c, f * b, (h + .1) * c);
				d = .05;
				e = cd * d;
				M(a, .5 * b, .2 * c, !0);
				a.lineTo(.95 * b, .2 * c);
				f = .95;
				h = .25;
				N(a, (f + e) * b, (h - d) * c, (f + d) * b, (h - e) * c, (f + d) * b, h * c);
				a.lineTo(1 * b, .6 * c);
				a.lineTo(.85 * b, .6 * c);
				a.lineTo(.85 * b, .35 * c);
				d = .025;
				e = cd * d;
				f = .825;
				h = .35;
				N(a, (f + d) * b, (h - e) * c, (f + e) * b, (h - d) * c, f * b, (h - d) * c);
				N(a, (f - e) * b, (h - d) * c, (f - d) * b, (h - e) * c, (f - d) * b, h * c);
				a.lineTo(.8 * b, 1 * c);
				a.lineTo(.55 * b, 1 * c);
				a.lineTo(.55 * b, .7 * c);
				d = .05;
				e = cd * d;
				f = .5;
				h = .7;
				N(a, (f + d) * b, (h - e) * c, (f + e) * b, (h - d) * c,
					f * b, (h - d) * c);
				N(a, (f - e) * b, (h - d) * c, (f - d) * b, (h - e) * c, (f - d) * b, h * c);
				a.lineTo(.45 * b, 1 * c);
				a.lineTo(.2 * b, 1 * c);
				a.lineTo(.2 * b, .35 * c);
				d = .025;
				e = cd * d;
				f = .175;
				h = .35;
				N(a, (f + d) * b, (h - e) * c, (f + e) * b, (h - d) * c, f * b, (h - d) * c);
				N(a, (f - e) * b, (h - d) * c, (f - d) * b, (h - e) * c, (f - d) * b, h * c);
				a.lineTo(.15 * b, .6 * c);
				a.lineTo(0 * b, .6 * c);
				a.lineTo(0 * b, .25 * c);
				d = .05;
				e = cd * d;
				f = .05;
				h = .25;
				N(a, (f - d) * b, (h - e) * c, (f - e) * b, (h - d) * c, f * b, (h - d) * c);
				a.lineTo(.5 * b, .2 * c);
				b = a.o;
				b.A = new K(.2, .2);
				b.B = new K(.8, .65);
				w.q(a);
				return b
			},
			Card: function(a, b, c) {
				a = w.s();
				M(a, 1 * b, 0 * c, !0);
				a.lineTo(1 * b, 1 * c);
				a.lineTo(0 * b, 1 * c);
				a.lineTo(0 * b, .2 * c);
				a.lineTo(.2 * b, 0 * c);
				O(a);
				b = a.o;
				b.A = new K(0, .2);
				b.B = Sb;
				w.q(a);
				return b
			},
			Collate: function(a, b, c) {
				a = w.s();
				M(a, .5 * b, .5 * c, !0);
				a.lineTo(0, 0);
				a.lineTo(1 * b, 0);
				a.lineTo(.5 * b, .5 * c);
				M(a, .5 * b, .5 * c, !0);
				a.lineTo(1 * b, 1 * c);
				a.lineTo(0, 1 * c);
				a.lineTo(.5 * b, .5 * c);
				b = a.o;
				b.A = new K(.25, 0);
				b.B = new K(.75, .25);
				w.q(a);
				return b
			},
			CreateRequest: function(a, b, c) {
				a = a ? a.Hc : NaN;
				isNaN(a) && (a = .1);
				var d = w.s();
				M(d, 0, 0, !0);
				d.lineTo(1 * b, 0);
				d.lineTo(1 * b, 1 * c);
				d.lineTo(0, 1 * c);
				O(d);
				M(d, 0,
					a * c, !1);
				d.lineTo(1 * b, a * c);
				d.moveTo(0, (1 - a) * c);
				d.lineTo(1 * b, (1 - a) * c);
				d.ab(!1);
				b = d.o;
				b.A = new K(0, a);
				b.B = new K(1, 1 - a);
				w.q(d);
				return b
			},
			Database: function(a, b, c) {
				a = w.s();
				var d = .5 * cd,
					e = .1 * cd;
				M(a, 1 * b, .1 * c, !0);
				a.lineTo(1 * b, .9 * c);
				N(a, 1 * b, (.9 + e) * c, (.5 + d) * b, 1 * c, .5 * b, 1 * c);
				N(a, (.5 - d) * b, 1 * c, 0, (.9 + e) * c, 0, .9 * c);
				a.lineTo(0, .1 * c);
				N(a, 0, (.1 - e) * c, (.5 - d) * b, 0, .5 * b, 0);
				N(a, (.5 + d) * b, 0, 1 * b, (.1 - e) * c, 1 * b, .1 * c);
				M(a, 1 * b, .1 * c, !1);
				N(a, 1 * b, (.1 + e) * c, (.5 + d) * b, .2 * c, .5 * b, .2 * c);
				N(a, (.5 - d) * b, .2 * c, 0, (.1 + e) * c, 0, .1 * c);
				a.moveTo(1 * b, .2 * c);
				N(a, 1 * b, (.2 + e) * c, (.5 + d) * b, .3 * c, .5 * b, .3 * c);
				N(a, (.5 - d) * b, .3 * c, 0, (.2 + e) * c, 0, .2 * c);
				a.moveTo(1 * b, .3 * c);
				N(a, 1 * b, (.3 + e) * c, (.5 + d) * b, .4 * c, .5 * b, .4 * c);
				N(a, (.5 - d) * b, .4 * c, 0, (.3 + e) * c, 0, .3 * c);
				a.ab(!1);
				b = a.o;
				b.A = new K(0, .4);
				b.B = new K(1, .9);
				w.q(a);
				return b
			},
			StoredData: "DataStorage",
			DataStorage: function(a, b, c) {
				a = w.s();
				M(a, 0, 0, !0);
				a.lineTo(.75 * b, 0);
				N(a, 1 * b, 0, 1 * b, 1 * c, .75 * b, 1 * c);
				a.lineTo(0, 1 * c);
				N(a, .25 * b, .9 * c, .25 * b, .1 * c, 0, 0);
				O(a);
				b = a.o;
				b.A = new K(.226, 0);
				b.B = new K(.81, 1);
				w.q(a);
				return b
			},
			DiskStorage: function(a, b, c) {
				a =
					w.s();
				var d = .5 * cd,
					e = .1 * cd;
				M(a, 1 * b, .1 * c, !0);
				a.lineTo(1 * b, .9 * c);
				N(a, 1 * b, (.9 + e) * c, (.5 + d) * b, 1 * c, .5 * b, 1 * c);
				N(a, (.5 - d) * b, 1 * c, 0, (.9 + e) * c, 0, .9 * c);
				a.lineTo(0, .1 * c);
				N(a, 0, (.1 - e) * c, (.5 - d) * b, 0, .5 * b, 0);
				N(a, (.5 + d) * b, 0, 1 * b, (.1 - e) * c, 1 * b, .1 * c);
				M(a, 1 * b, .1 * c, !1);
				N(a, 1 * b, (.1 + e) * c, (.5 + d) * b, .2 * c, .5 * b, .2 * c);
				N(a, (.5 - d) * b, .2 * c, 0, (.1 + e) * c, 0, .1 * c);
				a.moveTo(1 * b, .2 * c);
				N(a, 1 * b, (.2 + e) * c, (.5 + d) * b, .3 * c, .5 * b, .3 * c);
				N(a, (.5 - d) * b, .3 * c, 0, (.2 + e) * c, 0, .2 * c);
				a.ab(!1);
				b = a.o;
				b.A = new K(0, .3);
				b.B = new K(1, .9);
				w.q(a);
				return b
			},
			Display: function(a,
				b, c) {
				a = w.s();
				M(a, .25 * b, 0, !0);
				a.lineTo(.75 * b, 0);
				N(a, 1 * b, 0, 1 * b, 1 * c, .75 * b, 1 * c);
				a.lineTo(.25 * b, 1 * c);
				a.lineTo(0, .5 * c);
				O(a);
				b = a.o;
				b.A = new K(.25, 0);
				b.B = new K(.75, 1);
				w.q(a);
				return b
			},
			DividedEvent: function(a, b, c) {
				a = a ? a.Hc : NaN;
				isNaN(a) ? a = .2 : .15 > a && (a = .15);
				var d = w.s(),
					e = .2 * cd;
				M(d, 0, .2 * c, !0);
				N(d, 0, (.2 - e) * c, (.2 - e) * b, 0, .2 * b, 0);
				d.lineTo(.8 * b, 0);
				N(d, (.8 + e) * b, 0, 1 * b, (.2 - e) * c, 1 * b, .2 * c);
				d.lineTo(1 * b, .8 * c);
				N(d, 1 * b, (.8 + e) * c, (.8 + e) * b, 1 * c, .8 * b, 1 * c);
				d.lineTo(.2 * b, 1 * c);
				N(d, (.2 - e) * b, 1 * c, 0, (.8 + e) * c, 0, .8 * c);
				d.lineTo(0, .2 * c);
				M(d, 0, a * c, !1);
				d.lineTo(1 * b, a * c);
				d.ab(!1);
				b = d.o;
				b.A = new K(0, a);
				b.B = new K(1, 1 - a);
				w.q(d);
				return b
			},
			DividedProcess: function(a, b, c) {
				a = a ? a.Hc : NaN;
				if (isNaN(a) || .1 > a) a = .1;
				var d = w.s();
				M(d, 0, 0, !0);
				d.lineTo(1 * b, 0);
				d.lineTo(1 * b, 1 * c);
				d.lineTo(0, 1 * c);
				O(d);
				M(d, 0, a * c, !1);
				d.lineTo(1 * b, a * c);
				d.ab(!1);
				b = d.o;
				b.A = new K(0, a);
				b.B = Sb;
				w.q(d);
				return b
			},
			Document: function(a, b, c) {
				c /= .8;
				a = w.s();
				M(a, 0, .7 * c, !0);
				a.lineTo(0, 0);
				a.lineTo(1 * b, 0);
				a.lineTo(1 * b, .7 * c);
				N(a, .5 * b, .4 * c, .5 * b, 1 * c, 0, .7 * c);
				O(a);
				b = a.o;
				b.A = zb;
				b.B = new K(1, .6);
				w.q(a);
				return b
			},
			ExternalOrganization: function(a, b, c) {
				a = a ? a.Hc : NaN;
				if (isNaN(a) || .2 > a) a = .2;
				var d = w.s();
				M(d, 0, 0, !0);
				d.lineTo(1 * b, 0);
				d.lineTo(1 * b, 1 * c);
				d.lineTo(0, 1 * c);
				O(d);
				M(d, a * b, 0, !1);
				d.lineTo(0, a * c);
				d.moveTo(1 * b, a * c);
				d.lineTo((1 - a) * b, 0);
				d.moveTo(0, (1 - a) * c);
				d.lineTo(a * b, 1 * c);
				d.moveTo((1 - a) * b, 1 * c);
				d.lineTo(1 * b, (1 - a) * c);
				d.ab(!1);
				b = d.o;
				b.A = new K(a / 2, a / 2);
				b.B = new K(1 - a / 2, 1 - a / 2);
				w.q(d);
				return b
			},
			ExternalProcess: function(a, b, c) {
				a = w.s();
				M(a, .5 * b, 0, !0);
				a.lineTo(1 * b, .5 * c);
				a.lineTo(.5 * b, 1 * c);
				a.lineTo(0, .5 * c);
				O(a);
				M(a, .1 * b, .4 * c, !1);
				a.lineTo(.1 * b, .6 * c);
				a.moveTo(.9 * b, .6 * c);
				a.lineTo(.9 * b, .4 * c);
				a.moveTo(.6 * b, .1 * c);
				a.lineTo(.4 * b, .1 * c);
				a.moveTo(.4 * b, .9 * c);
				a.lineTo(.6 * b, .9 * c);
				a.ab(!1);
				b = a.o;
				b.A = new K(.25, .25);
				b.B = new K(.75, .75);
				w.q(a);
				return b
			},
			File: function(a, b, c) {
				a = w.s();
				M(a, 0, 0, !0);
				a.lineTo(.75 * b, 0);
				a.lineTo(1 * b, .25 * c);
				a.lineTo(1 * b, 1 * c);
				a.lineTo(0, 1 * c);
				O(a);
				M(a, .75 * b, 0, !1);
				a.lineTo(.75 * b, .25 * c);
				a.lineTo(1 * b, .25 * c);
				a.ab(!1);
				b = a.o;
				b.A = new K(0, .25);
				b.B = Sb;
				w.q(a);
				return b
			},
			Interrupt: function(a, b, c) {
				a = w.s();
				M(a, 1 * b,
					.5 * c, !0);
				a.lineTo(0, 1 * c);
				a.lineTo(0, 0);
				a.lineTo(1 * b, .5 * c);
				M(a, 1 * b, .5 * c, !1);
				a.lineTo(1 * b, 1 * c);
				M(a, 1 * b, .5 * c, !1);
				a.lineTo(1 * b, 0);
				b = a.o;
				b.A = new K(0, .25);
				b.B = new K(.5, .75);
				w.q(a);
				return b
			},
			InternalStorage: function(a, b, c) {
				var d = a ? a.Hc : NaN;
				a = a ? a.Ku : NaN;
				isNaN(d) && (d = .1);
				isNaN(a) && (a = .1);
				var e = w.s();
				M(e, 0, 0, !0);
				e.lineTo(1 * b, 0);
				e.lineTo(1 * b, 1 * c);
				e.lineTo(0, 1 * c);
				O(e);
				M(e, d * b, 0, !1);
				e.lineTo(d * b, 1 * c);
				e.moveTo(0, a * c);
				e.lineTo(1 * b, a * c);
				e.ab(!1);
				b = e.o;
				b.A = new K(d, a);
				b.B = Sb;
				w.q(e);
				return b
			},
			Junction: function(a, b,
				c) {
				a = w.s();
				var d = 1 / Math.SQRT2,
					e = (1 - 1 / Math.SQRT2) / 2,
					f = .5 * cd;
				M(a, 1 * b, .5 * c, !0);
				N(a, 1 * b, (.5 + f) * c, (.5 + f) * b, 1 * c, .5 * b, 1 * c);
				N(a, (.5 - f) * b, 1 * c, 0, (.5 + f) * c, 0, .5 * c);
				N(a, 0, (.5 - f) * c, (.5 - f) * b, 0, .5 * b, 0);
				N(a, (.5 + f) * b, 0, 1 * b, (.5 - f) * c, 1 * b, .5 * c);
				M(a, (e + d) * b, (e + d) * c, !1);
				a.lineTo(e * b, e * c);
				a.moveTo(e * b, (e + d) * c);
				a.lineTo((e + d) * b, e * c);
				a.ab(!1);
				b = a.o;
				b.ae = Rj;
				w.q(a);
				return b
			},
			LinedDocument: function(a, b, c) {
				c /= .8;
				a = w.s();
				M(a, 0, .7 * c, !0);
				a.lineTo(0, 0);
				a.lineTo(1 * b, 0);
				a.lineTo(1 * b, .7 * c);
				N(a, .5 * b, .4 * c, .5 * b, 1 * c, 0, .7 * c);
				O(a);
				M(a, .1 *
					b, 0, !1);
				a.lineTo(.1 * b, .75 * c);
				a.ab(!1);
				b = a.o;
				b.A = new K(.1, 0);
				b.B = new K(1, .6);
				w.q(a);
				return b
			},
			LoopLimit: function(a, b, c) {
				a = w.s();
				M(a, 0, 1 * c, !0);
				a.lineTo(0, .25 * c);
				a.lineTo(.25 * b, 0);
				a.lineTo(.75 * b, 0);
				a.lineTo(1 * b, .25 * c);
				a.lineTo(1 * b, 1 * c);
				O(a);
				b = a.o;
				b.A = new K(0, .25);
				b.B = Sb;
				w.q(a);
				return b
			},
			SequentialData: "MagneticTape",
			MagneticTape: function(a, b, c) {
				a = w.s();
				var d = .5 * cd;
				M(a, .5 * b, 1 * c, !0);
				N(a, (.5 - d) * b, 1 * c, 0, (.5 + d) * c, 0, .5 * c);
				N(a, 0, (.5 - d) * c, (.5 - d) * b, 0, .5 * b, 0);
				N(a, (.5 + d) * b, 0, 1 * b, (.5 - d) * c, 1 * b, .5 * c);
				N(a, 1 * b, (.5 +
					d) * c, (.5 + d) * b, .9 * c, .6 * b, .9 * c);
				a.lineTo(1 * b, .9 * c);
				a.lineTo(1 * b, 1 * c);
				a.lineTo(.5 * b, 1 * c);
				b = a.o;
				b.A = new K(.15, .15);
				b.B = new K(.85, .8);
				w.q(a);
				return b
			},
			ManualInput: function(a, b, c) {
				a = w.s();
				M(a, 1 * b, 0, !0);
				a.lineTo(1 * b, 1 * c);
				a.lineTo(0, 1 * c);
				a.lineTo(0, .25 * c);
				O(a);
				b = a.o;
				b.A = new K(0, .25);
				b.B = Sb;
				w.q(a);
				return b
			},
			MessageFromUser: function(a, b, c) {
				a = a ? a.Hc : NaN;
				isNaN(a) && (a = .7);
				var d = w.s();
				M(d, 0, 0, !0);
				d.lineTo(1 * b, 0);
				d.lineTo(a * b, .5 * c);
				d.lineTo(1 * b, 1 * c);
				d.lineTo(0, 1 * c);
				O(d);
				b = d.o;
				b.A = zb;
				b.B = new K(a, 1);
				w.q(d);
				return b
			},
			MicroformProcessing: function(a, b, c) {
				a = a ? a.Hc : NaN;
				isNaN(a) && (a = .25);
				var d = w.s();
				M(d, 0, 0, !0);
				d.lineTo(.5 * b, a * c);
				d.lineTo(1 * b, 0);
				d.lineTo(1 * b, 1 * c);
				d.lineTo(.5 * b, (1 - a) * c);
				d.lineTo(0, 1 * c);
				O(d);
				b = d.o;
				b.A = new K(0, a);
				b.B = new K(1, 1 - a);
				w.q(d);
				return b
			},
			MicroformRecording: function(a, b, c) {
				a = w.s();
				M(a, 0, 0, !0);
				a.lineTo(.75 * b, .25 * c);
				a.lineTo(1 * b, .15 * c);
				a.lineTo(1 * b, .85 * c);
				a.lineTo(.75 * b, .75 * c);
				a.lineTo(0, 1 * c);
				O(a);
				b = a.o;
				b.A = new K(0, .25);
				b.B = new K(1, .75);
				w.q(a);
				return b
			},
			MultiDocument: function(a, b, c) {
				c /= .8;
				a = w.s();
				M(a, b, 0, !0);
				a.lineTo(b, .5 * c);
				N(a, .96 * b, .47 * c, .93 * b, .45 * c, .9 * b, .44 * c);
				a.lineTo(.9 * b, .6 * c);
				N(a, .86 * b, .57 * c, .83 * b, .55 * c, .8 * b, .54 * c);
				a.lineTo(.8 * b, .7 * c);
				N(a, .4 * b, .4 * c, .4 * b, 1 * c, 0, .7 * c);
				a.lineTo(0, .2 * c);
				a.lineTo(.1 * b, .2 * c);
				a.lineTo(.1 * b, .1 * c);
				a.lineTo(.2 * b, .1 * c);
				a.lineTo(.2 * b, 0);
				O(a);
				M(a, .1 * b, .2 * c, !1);
				a.lineTo(.8 * b, .2 * c);
				a.lineTo(.8 * b, .54 * c);
				a.moveTo(.2 * b, .1 * c);
				a.lineTo(.9 * b, .1 * c);
				a.lineTo(.9 * b, .44 * c);
				a.ab(!1);
				b = a.o;
				b.A = new K(0, .25);
				b.B = new K(.8, .77);
				w.q(a);
				return b
			},
			MultiProcess: function(a, b, c) {
				a = w.s();
				M(a, .1 * b, .1 * c, !0);
				a.lineTo(.2 * b, .1 * c);
				a.lineTo(.2 * b, 0);
				a.lineTo(1 * b, 0);
				a.lineTo(1 * b, .8 * c);
				a.lineTo(.9 * b, .8 * c);
				a.lineTo(.9 * b, .9 * c);
				a.lineTo(.8 * b, .9 * c);
				a.lineTo(.8 * b, 1 * c);
				a.lineTo(0, 1 * c);
				a.lineTo(0, .2 * c);
				a.lineTo(.1 * b, .2 * c);
				O(a);
				M(a, .2 * b, .1 * c, !1);
				a.lineTo(.9 * b, .1 * c);
				a.lineTo(.9 * b, .8 * c);
				a.moveTo(.1 * b, .2 * c);
				a.lineTo(.8 * b, .2 * c);
				a.lineTo(.8 * b, .9 * c);
				a.ab(!1);
				b = a.o;
				b.A = new K(0, .2);
				b.B = new K(.8, 1);
				w.q(a);
				return b
			},
			OfflineStorage: function(a, b, c) {
				a = a ? a.Hc : NaN;
				isNaN(a) && (a = .1);
				var d = 1 - a,
					e = w.s();
				M(e, 0, 0, !0);
				e.lineTo(1 *
					b, 0);
				e.lineTo(.5 * b, 1 * c);
				O(e);
				M(e, .5 * a * b, a * c, !1);
				e.lineTo((1 - .5 * a) * b, a * c);
				e.ab(!1);
				b = e.o;
				b.A = new K(d / 4 + .5 * a, a);
				b.B = new K(3 * d / 4 + .5 * a, a + .5 * d);
				w.q(e);
				return b
			},
			OffPageConnector: function(a, b, c) {
				a = w.s();
				M(a, 0, 0, !0);
				a.lineTo(.75 * b, 0);
				a.lineTo(1 * b, .5 * c);
				a.lineTo(.75 * b, 1 * c);
				a.lineTo(0, 1 * c);
				O(a);
				b = a.o;
				b.A = zb;
				b.B = new K(.75, 1);
				w.q(a);
				return b
			},
			Or: function(a, b, c) {
				a = w.s();
				var d = .5 * cd;
				M(a, 1 * b, .5 * c, !0);
				N(a, 1 * b, (.5 + d) * c, (.5 + d) * b, 1 * c, .5 * b, 1 * c);
				N(a, (.5 - d) * b, 1 * c, 0, (.5 + d) * c, 0, .5 * c);
				N(a, 0, (.5 - d) * c, (.5 - d) * b, 0, .5 * b, 0);
				N(a,
					(.5 + d) * b, 0, 1 * b, (.5 - d) * c, 1 * b, .5 * c);
				M(a, 1 * b, .5 * c, !1);
				a.lineTo(0, .5 * c);
				a.moveTo(.5 * b, 1 * c);
				a.lineTo(.5 * b, 0);
				a.ab(!1);
				b = a.o;
				b.ae = Rj;
				w.q(a);
				return b
			},
			PaperTape: function(a, b, c) {
				c /= .8;
				a = w.s();
				M(a, 0, .7 * c, !0);
				a.lineTo(0, .3 * c);
				N(a, .5 * b, .6 * c, .5 * b, 0, 1 * b, .3 * c);
				a.lineTo(1 * b, .7 * c);
				N(a, .5 * b, .4 * c, .5 * b, 1 * c, 0, .7 * c);
				O(a);
				b = a.o;
				b.A = new K(0, .49);
				b.B = new K(1, .75);
				w.q(a);
				return b
			},
			PrimitiveFromCall: function(a, b, c) {
				var d = a ? a.Hc : NaN;
				a = a ? a.Ku : NaN;
				isNaN(d) && (d = .1);
				isNaN(a) && (a = .3);
				var e = w.s();
				M(e, 0, 0, !0);
				e.lineTo(1 * b, 0);
				e.lineTo((1 -
					a) * b, .5 * c);
				e.lineTo(1 * b, 1 * c);
				e.lineTo(0, 1 * c);
				O(e);
				b = e.o;
				b.A = new K(d, 0);
				b.B = new K(1 - a, 1);
				w.q(e);
				return b
			},
			PrimitiveToCall: function(a, b, c) {
				var d = a ? a.Hc : NaN;
				a = a ? a.Ku : NaN;
				isNaN(d) && (d = .1);
				isNaN(a) && (a = .3);
				var e = w.s();
				M(e, 0, 0, !0);
				e.lineTo((1 - a) * b, 0);
				e.lineTo(1 * b, .5 * c);
				e.lineTo((1 - a) * b, 1 * c);
				e.lineTo(0, 1 * c);
				O(e);
				b = e.o;
				b.A = new K(d, 0);
				b.B = new K(1 - a, 1);
				w.q(e);
				return b
			},
			Subroutine: "Procedure",
			Procedure: function(a, b, c) {
				a = a ? a.Hc : NaN;
				isNaN(a) && (a = .1);
				var d = w.s();
				M(d, 0, 0, !0);
				d.lineTo(1 * b, 0);
				d.lineTo(1 * b, 1 * c);
				d.lineTo(0,
					1 * c);
				O(d);
				M(d, (1 - a) * b, 0, !1);
				d.lineTo((1 - a) * b, 1 * c);
				d.moveTo(a * b, 0);
				d.lineTo(a * b, 1 * c);
				d.ab(!1);
				b = d.o;
				b.A = new K(a, 0);
				b.B = new K(1 - a, 1);
				w.q(d);
				return b
			},
			Process: function(a, b, c) {
				a = a ? a.Hc : NaN;
				isNaN(a) && (a = .1);
				var d = w.s();
				M(d, 0, 0, !0);
				d.lineTo(1 * b, 0);
				d.lineTo(1 * b, 1 * c);
				d.lineTo(0, 1 * c);
				O(d);
				M(d, a * b, 0, !1);
				d.lineTo(a * b, 1 * c);
				d.ab(!1);
				b = d.o;
				b.A = new K(a, 0);
				b.B = Sb;
				w.q(d);
				return b
			},
			Sort: function(a, b, c) {
				a = w.s();
				M(a, .5 * b, 0, !0);
				a.lineTo(1 * b, .5 * c);
				a.lineTo(.5 * b, 1 * c);
				a.lineTo(0, .5 * c);
				O(a);
				M(a, 0, .5 * c, !1);
				a.lineTo(1 * b, .5 *
					c);
				a.ab(!1);
				b = a.o;
				b.A = new K(.25, .25);
				b.B = new K(.75, .5);
				w.q(a);
				return b
			},
			Start: function(a, b, c) {
				a = w.s();
				M(a, .25 * b, 0, !0);
				M(a, .25 * b, 0, !0);
				a.arcTo(270, 180, .75 * b, .5 * c, .25 * b, .5 * c);
				a.arcTo(90, 180, .25 * b, .5 * c, .25 * b, .5 * c);
				M(a, .25 * b, 0, !1);
				a.lineTo(.25 * b, 1 * c);
				a.moveTo(.75 * b, 0);
				a.lineTo(.75 * b, 1 * c);
				a.ab(!1);
				b = a.o;
				b.A = new K(.25, 0);
				b.B = new K(.75, 1);
				w.q(a);
				return b
			},
			Terminator: function(a, b, c) {
				a = w.s();
				M(a, .25 * b, 0, !0);
				a.arcTo(270, 180, .75 * b, .5 * c, .25 * b, .5 * c);
				a.arcTo(90, 180, .25 * b, .5 * c, .25 * b, .5 * c);
				b = a.o;
				b.A = new K(.23, 0);
				b.B = new K(.77, 1);
				w.q(a);
				return b
			},
			TransmittalTape: function(a, b, c) {
				a = a ? a.Hc : NaN;
				isNaN(a) && (a = .1);
				var d = w.s();
				M(d, 0, 0, !0);
				d.lineTo(1 * b, 0);
				d.lineTo(1 * b, 1 * c);
				d.lineTo(.75 * b, (1 - a) * c);
				d.lineTo(0, (1 - a) * c);
				O(d);
				b = d.o;
				b.A = zb;
				b.B = new K(1, 1 - a);
				w.q(d);
				return b
			},
			AndGate: function(a, b, c) {
				a = w.s();
				var d = .5 * cd;
				M(a, 0, 0, !0);
				a.lineTo(.5 * b, 0);
				N(a, (.5 + d) * b, 0, 1 * b, (.5 - d) * c, 1 * b, .5 * c);
				N(a, 1 * b, (.5 + d) * c, (.5 + d) * b, 1 * c, .5 * b, 1 * c);
				a.lineTo(0, 1 * c);
				O(a);
				b = a.o;
				b.A = zb;
				b.B = new K(.55, 1);
				w.q(a);
				return b
			},
			Buffer: function(a, b, c) {
				a = w.s();
				M(a,
					0, 0, !0);
				a.lineTo(1 * b, .5 * c);
				a.lineTo(0, 1 * c);
				O(a);
				b = a.o;
				b.A = new K(0, .25);
				b.B = new K(.5, .75);
				w.q(a);
				return b
			},
			Clock: function(a, b, c) {
				a = w.s();
				var d = .5 * cd;
				M(a, 1 * b, .5 * c, !0);
				N(a, 1 * b, (.5 + d) * c, (.5 + d) * b, 1 * c, .5 * b, 1 * c);
				N(a, (.5 - d) * b, 1 * c, 0, (.5 + d) * c, 0, .5 * c);
				N(a, 0, (.5 - d) * c, (.5 - d) * b, 0, .5 * b, 0);
				N(a, (.5 + d) * b, 0, 1 * b, (.5 - d) * c, 1 * b, .5 * c);
				M(a, 1 * b, .5 * c, !1);
				a.lineTo(1 * b, .5 * c);
				M(a, .8 * b, .75 * c, !1);
				a.lineTo(.8 * b, .25 * c);
				a.lineTo(.6 * b, .25 * c);
				a.lineTo(.6 * b, .75 * c);
				a.lineTo(.4 * b, .75 * c);
				a.lineTo(.4 * b, .25 * c);
				a.lineTo(.2 * b, .25 * c);
				a.lineTo(.2 *
					b, .75 * c);
				a.ab(!1);
				b = a.o;
				b.ae = Rj;
				w.q(a);
				return b
			},
			Ground: function(a, b, c) {
				a = w.s();
				M(a, .5 * b, 0, !1);
				a.lineTo(.5 * b, .4 * c);
				a.moveTo(.2 * b, .6 * c);
				a.lineTo(.8 * b, .6 * c);
				a.moveTo(.3 * b, .8 * c);
				a.lineTo(.7 * b, .8 * c);
				a.moveTo(.4 * b, 1 * c);
				a.lineTo(.6 * b, 1 * c);
				b = a.o;
				w.q(a);
				return b
			},
			Inverter: function(a, b, c) {
				a = w.s();
				var d = .1 * cd;
				M(a, .8 * b, .5 * c, !0);
				a.lineTo(0, 1 * c);
				a.lineTo(0, 0);
				a.lineTo(.8 * b, .5 * c);
				M(a, 1 * b, .5 * c, !0);
				N(a, 1 * b, (.5 + d) * c, (.9 + d) * b, .6 * c, .9 * b, .6 * c);
				N(a, (.9 - d) * b, .6 * c, .8 * b, (.5 + d) * c, .8 * b, .5 * c);
				N(a, .8 * b, (.5 - d) * c, (.9 - d) * b, .4 *
					c, .9 * b, .4 * c);
				N(a, (.9 + d) * b, .4 * c, 1 * b, (.5 - d) * c, 1 * b, .5 * c);
				b = a.o;
				b.A = new K(0, .25);
				b.B = new K(.4, .75);
				w.q(a);
				return b
			},
			NandGate: function(a, b, c) {
				a = w.s();
				var d = .5 * cd,
					e = .4 * cd,
					f = .1 * cd;
				M(a, .8 * b, .5 * c, !0);
				N(a, .8 * b, (.5 + e) * c, (.4 + d) * b, 1 * c, .4 * b, 1 * c);
				a.lineTo(0, 1 * c);
				a.lineTo(0, 0);
				a.lineTo(.4 * b, 0);
				N(a, (.4 + d) * b, 0, .8 * b, (.5 - e) * c, .8 * b, .5 * c);
				M(a, 1 * b, .5 * c, !0);
				N(a, 1 * b, (.5 + f) * c, (.9 + f) * b, .6 * c, .9 * b, .6 * c);
				N(a, (.9 - f) * b, .6 * c, .8 * b, (.5 + f) * c, .8 * b, .5 * c);
				N(a, .8 * b, (.5 - f) * c, (.9 - f) * b, .4 * c, .9 * b, .4 * c);
				N(a, (.9 + f) * b, .4 * c, 1 * b, (.5 - f) * c, 1 * b, .5 *
					c);
				b = a.o;
				b.A = new K(0, .05);
				b.B = new K(.55, .95);
				w.q(a);
				return b
			},
			NorGate: function(a, b, c) {
				a = w.s();
				var d = .5,
					e = cd * d,
					f = 0,
					h = .5;
				M(a, .8 * b, .5 * c, !0);
				N(a, .7 * b, (h + e) * c, (f + e) * b, (h + d) * c, 0, 1 * c);
				N(a, .25 * b, .75 * c, .25 * b, .25 * c, 0, 0);
				N(a, (f + e) * b, (h - d) * c, .7 * b, (h - e) * c, .8 * b, .5 * c);
				d = .1;
				e = .1 * cd;
				f = .9;
				h = .5;
				M(a, (f - d) * b, h * c, !0);
				N(a, (f - d) * b, (h - e) * c, (f - e) * b, (h - d) * c, f * b, (h - d) * c);
				N(a, (f + e) * b, (h - d) * c, (f + d) * b, (h - e) * c, (f + d) * b, h * c);
				N(a, (f + d) * b, (h + e) * c, (f + e) * b, (h + d) * c, f * b, (h + d) * c);
				N(a, (f - e) * b, (h + d) * c, (f - d) * b, (h + e) * c, (f - d) * b, h * c);
				b = a.o;
				b.A =
					new K(.2, .25);
				b.B = new K(.6, .75);
				w.q(a);
				return b
			},
			OrGate: function(a, b, c) {
				a = w.s();
				var d = .5 * cd;
				M(a, 0, 0, !0);
				N(a, (0 + d + d) * b, 0 * c, .8 * b, (.5 - d) * c, 1 * b, .5 * c);
				N(a, .8 * b, (.5 + d) * c, (0 + d + d) * b, 1 * c, 0, 1 * c);
				N(a, .25 * b, .75 * c, .25 * b, .25 * c, 0, 0);
				O(a);
				b = a.o;
				b.A = new K(.2, .25);
				b.B = new K(.75, .75);
				w.q(a);
				return b
			},
			XnorGate: function(a, b, c) {
				a = w.s();
				var d = .5,
					e = cd * d,
					f = .2,
					h = .5;
				M(a, .1 * b, 0, !1);
				N(a, .35 * b, .25 * c, .35 * b, .75 * c, .1 * b, 1 * c);
				M(a, .8 * b, .5 * c, !0);
				N(a, .7 * b, (h + e) * c, (f + e) * b, (h + d) * c, .2 * b, 1 * c);
				N(a, .45 * b, .75 * c, .45 * b, .25 * c, .2 * b, 0);
				N(a, (f + e) *
					b, (h - d) * c, .7 * b, (h - e) * c, .8 * b, .5 * c);
				d = .1;
				e = .1 * cd;
				f = .9;
				h = .5;
				M(a, (f - d) * b, h * c, !0);
				N(a, (f - d) * b, (h - e) * c, (f - e) * b, (h - d) * c, f * b, (h - d) * c);
				N(a, (f + e) * b, (h - d) * c, (f + d) * b, (h - e) * c, (f + d) * b, h * c);
				N(a, (f + d) * b, (h + e) * c, (f + e) * b, (h + d) * c, f * b, (h + d) * c);
				N(a, (f - e) * b, (h + d) * c, (f - d) * b, (h + e) * c, (f - d) * b, h * c);
				b = a.o;
				b.A = new K(.4, .25);
				b.B = new K(.65, .75);
				w.q(a);
				return b
			},
			XorGate: function(a, b, c) {
				a = w.s();
				var d = .5 * cd;
				M(a, .1 * b, 0, !1);
				N(a, .35 * b, .25 * c, .35 * b, .75 * c, .1 * b, 1 * c);
				M(a, .2 * b, 0, !0);
				N(a, (.2 + d) * b, 0 * c, .9 * b, (.5 - d) * c, 1 * b, .5 * c);
				N(a, .9 * b, (.5 + d) *
					c, (.2 + d) * b, 1 * c, .2 * b, 1 * c);
				N(a, .45 * b, .75 * c, .45 * b, .25 * c, .2 * b, 0);
				O(a);
				b = a.o;
				b.A = new K(.4, .25);
				b.B = new K(.8, .75);
				w.q(a);
				return b
			},
			Capacitor: function(a, b, c) {
				a = w.s();
				M(a, 0, 0, !1);
				a.lineTo(0, 1 * c);
				a.moveTo(1 * b, 0);
				a.lineTo(1 * b, 1 * c);
				b = a.o;
				w.q(a);
				return b
			},
			Resistor: function(a, b, c) {
				a = w.s();
				M(a, 0, .5 * c, !1);
				a.lineTo(.1 * b, 0);
				a.lineTo(.2 * b, 1 * c);
				a.lineTo(.3 * b, 0);
				a.lineTo(.4 * b, 1 * c);
				a.lineTo(.5 * b, 0);
				a.lineTo(.6 * b, 1 * c);
				a.lineTo(.7 * b, .5 * c);
				b = a.o;
				w.q(a);
				return b
			},
			Inductor: function(a, b, c) {
				a = w.s();
				var d = .1 * cd,
					e = .1;
				M(a, (e - .5 *
					d) * b, c, !1);
				N(a, (e - d) * b, c, (e - .1) * b, 0, (e + .1) * b, 0);
				e = .3;
				N(a, (e + .1) * b, 0, (e + d) * b, c, e * b, c);
				N(a, (e - d) * b, c, (e - .1) * b, 0, (e + .1) * b, 0);
				e = .5;
				N(a, (e + .1) * b, 0, (e + d) * b, c, e * b, c);
				N(a, (e - d) * b, c, (e - .1) * b, 0, (e + .1) * b, 0);
				e = .7;
				N(a, (e + .1) * b, 0, (e + d) * b, c, e * b, c);
				N(a, (e - d) * b, c, (e - .1) * b, 0, (e + .1) * b, 0);
				e = .9;
				N(a, (e + .1) * b, 0, (e + d) * b, c, (e + .5 * d) * b, c);
				b = a.o;
				w.q(a);
				return b
			},
			ACvoltageSource: function(a, b, c) {
				a = w.s();
				var d = .5 * cd;
				M(a, 0 * b, .5 * c, !1);
				N(a, 0 * b, (.5 - d) * c, (.5 - d) * b, 0 * c, .5 * b, 0 * c);
				N(a, (.5 + d) * b, 0 * c, 1 * b, (.5 - d) * c, 1 * b, .5 * c);
				N(a, 1 * b, (.5 + d) *
					c, (.5 + d) * b, 1 * c, .5 * b, 1 * c);
				N(a, (.5 - d) * b, 1 * c, 0 * b, (.5 + d) * c, 0 * b, .5 * c);
				a.moveTo(.1 * b, .5 * c);
				N(a, .5 * b, 0 * c, .5 * b, 1 * c, .9 * b, .5 * c);
				b = a.o;
				b.ae = Rj;
				w.q(a);
				return b
			},
			DCvoltageSource: function(a, b, c) {
				a = w.s();
				M(a, 0, .75 * c, !1);
				a.lineTo(0, .25 * c);
				a.moveTo(1 * b, 0);
				a.lineTo(1 * b, 1 * c);
				b = a.o;
				w.q(a);
				return b
			},
			Diode: function(a, b, c) {
				a = w.s();
				M(a, 1 * b, 0, !1);
				a.lineTo(1 * b, .5 * c);
				a.lineTo(0, 1 * c);
				a.lineTo(0, 0);
				a.lineTo(1 * b, .5 * c);
				a.lineTo(1 * b, 1 * c);
				b = a.o;
				b.A = new K(0, .25);
				b.B = new K(.5, .75);
				w.q(a);
				return b
			},
			Wifi: function(a, b, c) {
				var d = b,
					e = c;
				b *= .38;
				c *= .6;
				a = w.s();
				var f = .8 * cd,
					h = .8,
					k = 0,
					l = .5,
					d = (d - b) / 2,
					e = (e - c) / 2;
				M(a, k * b + d, (l + h) * c + e, !0);
				N(a, (k - f) * b + d, (l + h) * c + e, (k - h) * b + d, (l + f) * c + e, (k - h) * b + d, l * c + e);
				N(a, (k - h) * b + d, (l - f) * c + e, (k - f) * b + d, (l - h) * c + e, k * b + d, (l - h) * c + e);
				N(a, k * b + d, (l - h) * c + e, (k - h + .5 * f) * b + d, (l - f) * c + e, (k - h + .5 * f) * b + d, l * c + e);
				N(a, (k - h + .5 * f) * b + d, (l + f) * c + e, k * b + d, (l + h) * c + e, k * b + d, (l + h) * c + e);
				O(a);
				f = .4 * cd;
				h = .4;
				k = .2;
				l = .5;
				M(a, k * b + d, (l + h) * c + e, !0);
				N(a, (k - f) * b + d, (l + h) * c + e, (k - h) * b + d, (l + f) * c + e, (k - h) * b + d, l * c + e);
				N(a, (k - h) * b + d, (l - f) * c + e, (k - f) * b + d, (l - h) * c + e, k *
					b + d, (l - h) * c + e);
				N(a, k * b + d, (l - h) * c + e, (k - h + .5 * f) * b + d, (l - f) * c + e, (k - h + .5 * f) * b + d, l * c + e);
				N(a, (k - h + .5 * f) * b + d, (l + f) * c + e, k * b + d, (l + h) * c + e, k * b + d, (l + h) * c + e);
				O(a);
				f = .2 * cd;
				h = .2;
				l = k = .5;
				M(a, (k - h) * b + d, l * c + e, !0);
				N(a, (k - h) * b + d, (l - f) * c + e, (k - f) * b + d, (l - h) * c + e, k * b + d, (l - h) * c + e);
				N(a, (k + f) * b + d, (l - h) * c + e, (k + h) * b + d, (l - f) * c + e, (k + h) * b + d, l * c + e);
				N(a, (k + h) * b + d, (l + f) * c + e, (k + f) * b + d, (l + h) * c + e, k * b + d, (l + h) * c + e);
				N(a, (k - f) * b + d, (l + h) * c + e, (k - h) * b + d, (l + f) * c + e, (k - h) * b + d, l * c + e);
				f = .4 * cd;
				h = .4;
				k = .8;
				l = .5;
				M(a, k * b + d, (l - h) * c + e, !0);
				N(a, (k + f) * b + d, (l -
					h) * c + e, (k + h) * b + d, (l - f) * c + e, (k + h) * b + d, l * c + e);
				N(a, (k + h) * b + d, (l + f) * c + e, (k + f) * b + d, (l + h) * c + e, k * b + d, (l + h) * c + e);
				N(a, k * b + d, (l + h) * c + e, (k + h - .5 * f) * b + d, (l + f) * c + e, (k + h - .5 * f) * b + d, l * c + e);
				N(a, (k + h - .5 * f) * b + d, (l - f) * c + e, k * b + d, (l - h) * c + e, k * b + d, (l - h) * c + e);
				O(a);
				f = .8 * cd;
				h = .8;
				k = 1;
				l = .5;
				M(a, k * b + d, (l - h) * c + e, !0);
				N(a, (k + f) * b + d, (l - h) * c + e, (k + h) * b + d, (l - f) * c + e, (k + h) * b + d, l * c + e);
				N(a, (k + h) * b + d, (l + f) * c + e, (k + f) * b + d, (l + h) * c + e, k * b + d, (l + h) * c + e);
				N(a, k * b + d, (l + h) * c + e, (k + h - .5 * f) * b + d, (l + f) * c + e, (k + h - .5 * f) * b + d, l * c + e);
				N(a, (k + h - .5 * f) * b + d, (l - f) * c +
					e, k * b + d, (l - h) * c + e, k * b + d, (l - h) * c + e);
				O(a);
				b = a.o;
				w.q(a);
				return b
			},
			Email: function(a, b, c) {
				a = w.s();
				M(a, 0, 0, !0);
				a.lineTo(1 * b, 0);
				a.lineTo(1 * b, 1 * c);
				a.lineTo(0, 1 * c);
				a.lineTo(0, 0);
				O(a);
				M(a, 0, 0, !1);
				a.lineTo(.5 * b, .6 * c);
				a.lineTo(1 * b, 0);
				a.moveTo(0, 1 * c);
				a.lineTo(.45 * b, .54 * c);
				a.moveTo(1 * b, 1 * c);
				a.lineTo(.55 * b, .54 * c);
				a.ab(!1);
				b = a.o;
				w.q(a);
				return b
			},
			Ethernet: function(a, b, c) {
				a = w.s();
				M(a, .35 * b, 0, !0);
				a.lineTo(.65 * b, 0);
				a.lineTo(.65 * b, .4 * c);
				a.lineTo(.35 * b, .4 * c);
				a.lineTo(.35 * b, 0);
				O(a);
				M(a, .1 * b, 1 * c, !0, !0);
				a.lineTo(.4 * b, 1 * c);
				a.lineTo(.4 * b, .6 * c);
				a.lineTo(.1 * b, .6 * c);
				a.lineTo(.1 * b, 1 * c);
				O(a);
				M(a, .6 * b, 1 * c, !0, !0);
				a.lineTo(.9 * b, 1 * c);
				a.lineTo(.9 * b, .6 * c);
				a.lineTo(.6 * b, .6 * c);
				a.lineTo(.6 * b, 1 * c);
				O(a);
				M(a, 0, .5 * c, !1);
				a.lineTo(1 * b, .5 * c);
				a.moveTo(.5 * b, .5 * c);
				a.lineTo(.5 * b, .4 * c);
				a.moveTo(.75 * b, .5 * c);
				a.lineTo(.75 * b, .6 * c);
				a.moveTo(.25 * b, .5 * c);
				a.lineTo(.25 * b, .6 * c);
				a.ab(!1);
				b = a.o;
				w.q(a);
				return b
			},
			Power: function(a, b, c) {
				a = w.s();
				var d = .4 * cd,
					e = .4,
					f = w.K(),
					h = w.K(),
					k = w.K(),
					l = w.K();
				ee(.5, .5 - e, .5 + d, .5 - e, .5 + e, .5 - d, .5 + e, .5, .5, f, f, h, k, l);
				var m = w.xb(h.x,
					h.y);
				M(a, h.x * b, h.y * c, !0);
				N(a, k.x * b, k.y * c, l.x * b, l.y * c, (.5 + e) * b, .5 * c);
				N(a, (.5 + e) * b, (.5 + d) * c, (.5 + d) * b, (.5 + e) * c, .5 * b, (.5 + e) * c);
				N(a, (.5 - d) * b, (.5 + e) * c, (.5 - e) * b, (.5 + d) * c, (.5 - e) * b, .5 * c);
				ee(.5 - e, .5, .5 - e, .5 - d, .5 - d, .5 - e, .5, .5 - e, .5, k, l, h, f, f);
				N(a, k.x * b, k.y * c, l.x * b, l.y * c, h.x * b, h.y * c);
				d = .3 * cd;
				e = .3;
				ee(.5 - e, .5, .5 - e, .5 - d, .5 - d, .5 - e, .5, .5 - e, .5, k, l, h, f, f);
				a.lineTo(h.x * b, h.y * c);
				N(a, l.x * b, l.y * c, k.x * b, k.y * c, (.5 - e) * b, .5 * c);
				N(a, (.5 - e) * b, (.5 + d) * c, (.5 - d) * b, (.5 + e) * c, .5 * b, (.5 + e) * c);
				N(a, (.5 + d) * b, (.5 + e) * c, (.5 + e) * b, (.5 + d) * c, (.5 +
					e) * b, .5 * c);
				ee(.5, .5 - e, .5 + d, .5 - e, .5 + e, .5 - d, .5 + e, .5, .5, f, f, h, k, l);
				N(a, l.x * b, l.y * c, k.x * b, k.y * c, h.x * b, h.y * c);
				O(a);
				M(a, .45 * b, 0, !0);
				a.lineTo(.45 * b, .5 * c);
				a.lineTo(.55 * b, .5 * c);
				a.lineTo(.55 * b, 0);
				O(a);
				w.v(f);
				w.v(h);
				w.v(k);
				w.v(l);
				w.v(m);
				b = a.o;
				b.A = new K(.25, .55);
				b.B = new K(.75, .8);
				w.q(a);
				return b
			},
			Fallout: function(a, b, c) {
				a = w.s();
				var d = .5 * cd;
				M(a, 0 * b, .5 * c, !0);
				N(a, 0 * b, (.5 - d) * c, (.5 - d) * b, 0 * c, .5 * b, 0 * c);
				N(a, (.5 + d) * b, 0 * c, 1 * b, (.5 - d) * c, 1 * b, .5 * c);
				N(a, 1 * b, (.5 + d) * c, (.5 + d) * b, 1 * c, .5 * b, 1 * c);
				N(a, (.5 - d) * b, 1 * c, 0 * b, (.5 + d) * c, 0 * b,
					.5 * c);
				var e = d = 0;
				M(a, (.3 + d) * b, (.8 + e) * c, !0, !0);
				a.lineTo((.5 + d) * b, (.5 + e) * c);
				a.lineTo((.1 + d) * b, (.5 + e) * c);
				a.lineTo((.3 + d) * b, (.8 + e) * c);
				d = .4;
				e = 0;
				O(a);
				M(a, (.3 + d) * b, (.8 + e) * c, !0, !0);
				a.lineTo((.5 + d) * b, (.5 + e) * c);
				a.lineTo((.1 + d) * b, (.5 + e) * c);
				a.lineTo((.3 + d) * b, (.8 + e) * c);
				d = .2;
				e = -.3;
				O(a);
				M(a, (.3 + d) * b, (.8 + e) * c, !0, !0);
				a.lineTo((.5 + d) * b, (.5 + e) * c);
				a.lineTo((.1 + d) * b, (.5 + e) * c);
				a.lineTo((.3 + d) * b, (.8 + e) * c);
				O(a);
				b = a.o;
				b.ae = Rj;
				w.q(a);
				return b
			},
			IrritationHazard: function(a, b, c) {
				a = w.s();
				M(a, .2 * b, 0 * c, !0);
				a.lineTo(.5 * b, .3 * c);
				a.lineTo(.8 *
					b, 0 * c);
				a.lineTo(1 * b, .2 * c);
				a.lineTo(.7 * b, .5 * c);
				a.lineTo(1 * b, .8 * c);
				a.lineTo(.8 * b, 1 * c);
				a.lineTo(.5 * b, .7 * c);
				a.lineTo(.2 * b, 1 * c);
				a.lineTo(0 * b, .8 * c);
				a.lineTo(.3 * b, .5 * c);
				a.lineTo(0 * b, .2 * c);
				O(a);
				b = a.o;
				b.A = new K(.3, .3);
				b.B = new K(.7, .7);
				w.q(a);
				return b
			},
			ElectricalHazard: function(a, b, c) {
				a = w.s();
				M(a, .37 * b, 0 * c, !0);
				a.lineTo(.5 * b, .11 * c);
				a.lineTo(.77 * b, .04 * c);
				a.lineTo(.33 * b, .49 * c);
				a.lineTo(1 * b, .37 * c);
				a.lineTo(.63 * b, .86 * c);
				a.lineTo(.77 * b, .91 * c);
				a.lineTo(.34 * b, 1 * c);
				a.lineTo(.34 * b, .78 * c);
				a.lineTo(.44 * b, .8 * c);
				a.lineTo(.65 *
					b, .56 * c);
				a.lineTo(0 * b, .68 * c);
				O(a);
				b = a.o;
				w.q(a);
				return b
			},
			FireHazard: function(a, b, c) {
				a = w.s();
				M(a, .1 * b, 1 * c, !0);
				N(a, -.25 * b, .63 * c, .45 * b, .44 * c, .29 * b, 0 * c);
				N(a, .48 * b, .17 * c, .54 * b, .35 * c, .51 * b, .42 * c);
				N(a, .59 * b, .29 * c, .58 * b, .28 * c, .59 * b, .18 * c);
				N(a, .8 * b, .34 * c, .88 * b, .43 * c, .75 * b, .6 * c);
				N(a, .87 * b, .48 * c, .88 * b, .43 * c, .88 * b, .31 * c);
				N(a, 1.17 * b, .76 * c, .82 * b, .8 * c, .9 * b, 1 * c);
				O(a);
				b = a.o;
				b.A = new K(.05, .645);
				b.B = new K(.884, .908);
				w.q(a);
				return b
			},
			BpmnActivityLoop: function(a, b, c) {
				a = w.s();
				var d = 4 * (Math.SQRT2 - 1) / 3 * .5;
				M(a, .65 * b, 1 * c, !1);
				N(a, (1 - d + 0) * b, 1 * c, 1 * b, (.5 + d + 0) * c, 1 * b, .5 * c);
				N(a, 1 * b, (.5 - d + 0) * c, (.5 + d + 0) * b, 0 * c, .5 * b, 0 * c);
				N(a, (.5 - d + 0) * b, 0 * c, 0 * b, (.5 - d + 0) * c, 0 * b, .5 * c);
				N(a, 0 * b, (.5 + d + 0) * c, (.5 - d + 0) * b, 1 * c, .35 * b, .98 * c);
				a.moveTo(.25 * b, .8 * c);
				a.lineTo(.35 * b, 1 * c);
				a.lineTo(.1 * b, 1 * c);
				b = a.o;
				w.q(a);
				return b
			},
			BpmnActivityParallel: function(a, b, c) {
				a = w.s();
				M(a, 0, 0, !1);
				a.lineTo(0, 1 * c);
				a.moveTo(.5 * b, 0);
				a.lineTo(.5 * b, 1 * c);
				a.moveTo(1 * b, 0);
				a.lineTo(1 * b, 1 * c);
				b = a.o;
				w.q(a);
				return b
			},
			BpmnActivitySequential: function(a, b, c) {
				a = w.s();
				M(a, 0, 0, !1);
				a.lineTo(1 *
					b, 0);
				a.moveTo(0, .5 * c);
				a.lineTo(1 * b, .5 * c);
				a.moveTo(0, 1 * c);
				a.lineTo(1 * b, 1 * c);
				b = a.o;
				w.q(a);
				return b
			},
			BpmnActivityAdHoc: function(a, b, c) {
				a = w.s();
				M(a, 0, 0, !1);
				M(a, 1 * b, 1 * c, !1);
				M(a, 0, .5 * c, !1);
				N(a, .2 * b, .35 * c, .3 * b, .35 * c, .5 * b, .5 * c);
				N(a, .7 * b, .65 * c, .8 * b, .65 * c, 1 * b, .5 * c);
				b = a.o;
				w.q(a);
				return b
			},
			BpmnActivityCompensation: function(a, b, c) {
				a = w.s();
				M(a, 0, .5 * c, !0);
				a.lineTo(.5 * b, 0);
				a.lineTo(.5 * b, .5 * c);
				a.lineTo(1 * b, 1 * c);
				a.lineTo(1 * b, 0);
				a.lineTo(.5 * b, .5 * c);
				a.lineTo(.5 * b, 1 * c);
				O(a);
				b = a.o;
				w.q(a);
				return b
			},
			BpmnTaskMessage: function(a,
				b, c) {
				a = w.s();
				M(a, 0, .2 * c, !0);
				a.lineTo(1 * b, .2 * c);
				a.lineTo(1 * b, .8 * c);
				a.lineTo(0, .8 * c);
				a.lineTo(0, .8 * c);
				O(a);
				M(a, 0, .2 * c, !1);
				a.lineTo(.5 * b, .5 * c);
				a.lineTo(1 * b, .2 * c);
				a.ab(!1);
				b = a.o;
				w.q(a);
				return b
			},
			BpmnTaskScript: function(a, b, c) {
				a = w.s();
				M(a, .7 * b, 1 * c, !0);
				a.lineTo(.3 * b, 1 * c);
				N(a, .6 * b, .5 * c, 0, .5 * c, .3 * b, 0);
				a.lineTo(.7 * b, 0);
				N(a, .4 * b, .5 * c, 1 * b, .5 * c, .7 * b, 1 * c);
				O(a);
				M(a, .45 * b, .73 * c, !1);
				a.lineTo(.7 * b, .73 * c);
				a.moveTo(.38 * b, .5 * c);
				a.lineTo(.63 * b, .5 * c);
				a.moveTo(.31 * b, .27 * c);
				a.lineTo(.56 * b, .27 * c);
				a.ab(!1);
				b = a.o;
				w.q(a);
				return b
			},
			BpmnTaskUser: function(a, b, c) {
				a = w.s();
				M(a, 0, 0, !1);
				M(a, .335 * b, (1 - .555) * c, !0);
				a.lineTo(.335 * b, .595 * c);
				a.lineTo(.665 * b, .595 * c);
				a.lineTo(.665 * b, (1 - .555) * c);
				N(a, .88 * b, .46 * c, .98 * b, .54 * c, 1 * b, .68 * c);
				a.lineTo(1 * b, 1 * c);
				a.lineTo(0, 1 * c);
				a.lineTo(0, .68 * c);
				N(a, .02 * b, .54 * c, .12 * b, .46 * c, .335 * b, (1 - .555) * c);
				a.lineTo(.365 * b, .405 * c);
				var d = .5 - .285,
					e = Math.PI / 4,
					f = 4 * (1 - Math.cos(e)) / (3 * Math.sin(e)),
					e = f * d,
					f = f * d;
				N(a, (.5 - (e + d) / 2) * b, (d + (d + f) / 2) * c, (.5 - d) * b, (d + f) * c, (.5 - d) * b, d * c);
				N(a, (.5 - d) * b, (d - f) * c, (.5 - e) * b, (d - d) * c, .5 * b, (d - d) * c);
				N(a, (.5 + e) * b, (d - d) * c, (.5 + d) * b, (d - f) * c, (.5 + d) * b, d * c);
				N(a, (.5 + d) * b, (d + f) * c, (.5 + (e + d) / 2) * b, (d + (d + f) / 2) * c, .635 * b, .405 * c);
				a.lineTo(.635 * b, .405 * c);
				a.lineTo(.665 * b, (1 - .555) * c);
				a.lineTo(.665 * b, .595 * c);
				a.lineTo(.335 * b, .595 * c);
				M(a, .2 * b, 1 * c, !1);
				a.lineTo(.2 * b, .8 * c);
				M(a, .8 * b, 1 * c, !1);
				a.lineTo(.8 * b, .8 * c);
				b = a.o;
				w.q(a);
				return b
			},
			BpmnEventConditional: function(a, b, c) {
				a = w.s();
				M(a, .1 * b, 0, !0);
				a.lineTo(.9 * b, 0);
				a.lineTo(.9 * b, 1 * c);
				a.lineTo(.1 * b, 1 * c);
				O(a);
				M(a, .2 * b, .2 * c, !1);
				a.lineTo(.8 * b, .2 * c);
				a.moveTo(.2 * b, .4 * c);
				a.lineTo(.8 *
					b, .4 * c);
				a.moveTo(.2 * b, .6 * c);
				a.lineTo(.8 * b, .6 * c);
				a.moveTo(.2 * b, .8 * c);
				a.lineTo(.8 * b, .8 * c);
				a.ab(!1);
				b = a.o;
				w.q(a);
				return b
			},
			BpmnEventError: function(a, b, c) {
				a = w.s();
				M(a, 0, 1 * c, !0);
				a.lineTo(.33 * b, 0);
				a.lineTo(.66 * b, .5 * c);
				a.lineTo(1 * b, 0);
				a.lineTo(.66 * b, 1 * c);
				a.lineTo(.33 * b, .5 * c);
				O(a);
				b = a.o;
				w.q(a);
				return b
			},
			BpmnEventEscalation: function(a, b, c) {
				a = w.s();
				M(a, 0, 0, !1);
				M(a, 1 * b, 1 * c, !1);
				M(a, .1 * b, 1 * c, !0);
				a.lineTo(.5 * b, 0);
				a.lineTo(.9 * b, 1 * c);
				a.lineTo(.5 * b, .5 * c);
				O(a);
				b = a.o;
				w.q(a);
				return b
			},
			BpmnEventTimer: function(a, b, c) {
				a =
					w.s();
				var d = .5 * cd;
				M(a, 1 * b, .5 * c, !0);
				N(a, 1 * b, (.5 + d) * c, (.5 + d) * b, 1 * c, .5 * b, 1 * c);
				N(a, (.5 - d) * b, 1 * c, 0, (.5 + d) * c, 0, .5 * c);
				N(a, 0, (.5 - d) * c, (.5 - d) * b, 0, .5 * b, 0);
				N(a, (.5 + d) * b, 0, 1 * b, (.5 - d) * c, 1 * b, .5 * c);
				M(a, .5 * b, 0, !1);
				a.lineTo(.5 * b, .15 * c);
				a.moveTo(.5 * b, 1 * c);
				a.lineTo(.5 * b, .85 * c);
				a.moveTo(0, .5 * c);
				a.lineTo(.15 * b, .5 * c);
				a.moveTo(1 * b, .5 * c);
				a.lineTo(.85 * b, .5 * c);
				a.moveTo(.5 * b, .5 * c);
				a.lineTo(.58 * b, .1 * c);
				a.moveTo(.5 * b, .5 * c);
				a.lineTo(.78 * b, .54 * c);
				a.ab(!1);
				b = a.o;
				b.ae = Rj;
				w.q(a);
				return b
			}
		},
		Xq;
	for (Xq in jq) jq[Xq.toLowerCase()] = Xq;
	var qq = {
		"": "",
		Standard: "F1 m 0,0 l 8,4 -8,4 2,-4 z",
		Backward: "F1 m 8,0 l -2,4 2,4 -8,-4 z",
		Triangle: "F1 m 0,0 l 8,4.62 -8,4.62 z",
		BackwardTriangle: "F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",
		Boomerang: "F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",
		BackwardBoomerang: "F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",
		SidewaysV: "m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",
		BackwardV: "m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",
		OpenTriangle: "m 0,0 l 8,4 -8,4",
		BackwardOpenTriangle: "m 8,0 l -8,4 8,4",
		OpenTriangleLine: "m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8",
		BackwardOpenTriangleLine: "m 8,0 l  -8,4 8,4 m -8.5,0 l 0,-8",
		OpenTriangleTop: "m 0,0 l 8,4 m 0,4",
		BackwardOpenTriangleTop: "m 8,0 l -8,4 m 0,4",
		OpenTriangleBottom: "m 0,8 l 8,-4",
		BackwardOpenTriangleBottom: "m 0,4 l 8,4",
		HalfTriangleTop: "F1 m 0,0 l 0,4 8,0 z m 0,8",
		BackwardHalfTriangleTop: "F1 m 8,0 l 0,4 -8,0 z m 0,8",
		HalfTriangleBottom: "F1 m 0,4 l 0,4 8,-4 z",
		BackwardHalfTriangleBottom: "F1 m 8,4 l 0,4 -8,-4 z",
		ForwardSemiCircle: "m 4,0 b 270 180 0 4 4",
		BackwardSemiCircle: "m 4,8 b 90 180 0 -4 4",
		Feather: "m 0,0 l 3,4 -3,4",
		BackwardFeather: "m 3,0 l -3,4 3,4",
		DoubleFeathers: "m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",
		BackwardDoubleFeathers: "m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4",
		TripleFeathers: "m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",
		BackwardTripleFeathers: "m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4 m 3,-8 l -3,4 3,4",
		ForwardSlash: "m 0,8 l 5,-8",
		BackSlash: "m 0,0 l 5,8",
		DoubleForwardSlash: "m 0,8 l 4,-8 m -2,8 l 4,-8",
		DoubleBackSlash: "m 0,0 l 4,8 m -2,-8 l 4,8",
		TripleForwardSlash: "m 0,8 l 4,-8 m -2,8 l 4,-8 m -2,8 l 4,-8",
		TripleBackSlash: "m 0,0 l 4,8 m -2,-8 l 4,8 m -2,-8 l 4,8",
		Fork: "m 0,4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",
		BackwardFork: "m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4",
		LineFork: "m 0,0 l 0,8 m 0,-4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",
		BackwardLineFork: "m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4 m 8,-8 l 0,8",
		CircleFork: "F1 m 6,4 b 0 360 -3 0 3 z m 0,0 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",
		BackwardCircleFork: "F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 6,0 b 0 360 -3 0 3",
		CircleLineFork: "F1 m 6,4 b 0 360 -3 0 3 z m 1,-4 l 0,8 m 0,-4 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",
		BackwardCircleLineFork: "F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 0,-4 l 0,8 m 7,-4 b 0 360 -3 0 3",
		Circle: "F1 m 8,4 b 0 360 -4 0 4 z",
		Block: "F1 m 0,0 l 0,8 8,0 0,-8 z",
		StretchedDiamond: "F1 m 0,3 l 5,-3 5,3 -5,3 -5,-3 z",
		Diamond: "F1 m 0,4 l 4,-4 4,4 -4,4 -4,-4 z",
		Chevron: "F1 m 0,0 l 5,0 3,4 -3,4 -5,0 3,-4 -3,-4 z",
		StretchedChevron: "F1 m 0,0 l 8,0 3,4 -3,4 -8,0 3,-4 -3,-4 z",
		NormalArrow: "F1 m 0,2 l 4,0 0,-2 4,4 -4,4 0,-2 -4,0 z",
		X: "m 0,0 l 8,8 m 0,-8 l -8,8",
		TailedNormalArrow: "F1 m 0,0 l 2,0 1,2 3,0 0,-2 2,4 -2,4 0,-2 -3,0 -1,2 -2,0 1,-4 -1,-4 z",
		DoubleTriangle: "F1 m 0,0 l 4,4 -4,4 0,-8 z  m 4,0 l 4,4 -4,4 0,-8 z",
		BigEndArrow: "F1 m 0,0 l 5,2 0,-2 3,4 -3,4 0,-2 -5,2 0,-8 z",
		ConcaveTailArrow: "F1 m 0,2 h 4 v -2 l 4,4 -4,4 v -2 h -4 l 2,-2 -2,-2 z",
		RoundedTriangle: "F1 m 0,1 a 1,1 0 0 1 1,-1 l 7,3 a 0.5,1 0 0 1 0,2 l -7,3 a 1,1 0 0 1 -1,-1 l 0,-6 z",
		SimpleArrow: "F1 m 1,2 l -1,-2 2,0 1,2 -1,2 -2,0 1,-2 5,0 0,-2 2,2 -2,2 0,-2 z",
		AccelerationArrow: "F1 m 0,0 l 0,8 0.2,0 0,-8 -0.2,0 z m 2,0 l 0,8 1,0 0,-8 -1,0 z m 3,0 l 2,0 2,4 -2,4 -2,0 0,-8 z",
		BoxArrow: "F1 m 0,0 l 4,0 0,2 2,0 0,-2 2,4 -2,4 0,-2 -2,0 0,2 -4,0 0,-8 z",
		TriangleLine: "F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8",
		CircleEndedArrow: "F1 m 10,4 l -2,-3 0,2 -2,0 0,2 2,0 0,2 2,-3 z m -4,0 b 0 360 -3 0 3 z",
		DynamicWidthArrow: "F1 m 0,3 l 2,0 2,-1 2,-2 2,4 -2,4 -2,-2 -2,-1 -2,0 0,-2 z",
		EquilibriumArrow: "m 0,3 l 8,0 -3,-3 m 3,5 l -8,0 3,3",
		FastForward: "F1 m 0,0 l 3.5,4 0,-4 3.5,4 0,-4 1,0 0,8 -1,0 0,-4 -3.5,4 0,-4 -3.5,4 0,-8 z",
		Kite: "F1 m 0,4 l 2,-4 6,4 -6,4 -2,-4 z",
		HalfArrowTop: "F1 m 0,0 l 4,4 4,0 -8,-4 z m 0,8",
		HalfArrowBottom: "F1 m 0,8 l 4,-4 4,0 -8,4 z",
		OpposingDirectionDoubleArrow: "F1 m 0,4 l 2,-4 0,2 4,0 0,-2 2,4 -2,4 0,-2 -4,0 0,2 -2,-4 z",
		PartialDoubleTriangle: "F1 m 0,0 4,3 0,-3 4,4 -4,4 0,-3 -4,3 0,-8 z",
		LineCircle: "F1 m 0,0 l 0,8 m 7 -4 b 0 360 -3 0 3 z",
		DoubleLineCircle: "F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",
		TripleLineCircle: "F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",
		CircleLine: "F1 m 6 4 b 0 360 -3 0 3 z m 1,-4 l 0,8",
		DiamondCircle: "F1 m 8,4 l -4,4 -4,-4 4,-4 4,4 m 8,0 b 0 360 -4 0 4 z",
		PlusCircle: "F1 m 8,4 b 0 360 -4 0 4 l -8 0 z m -4 -4 l 0 8",
		OpenRightTriangleTop: "m 8,0 l 0,4 -8,0 m 0,4",
		OpenRightTriangleBottom: "m 8,8 l 0,-4 -8,0",
		Line: "m 0,0 l 0,8",
		DoubleLine: "m 0,0 l 0,8 m 2,0 l 0,-8",
		TripleLine: "m 0,0 l 0,8 m 2,0 l 0,-8 m 2,0 l 0,8",
		PentagonArrow: "F1 m 8,4 l -4,-4 -4,0 0,8 4,0 4,-4 z"
	};

	function nq(a) {
		var b = Rd[a];
		if (void 0 === b) {
			var c = a.toLowerCase();
			if ("none" === c) return "None";
			b = Rd[c];
			if (void 0 === b) {
				var d = null,
					e;
				for (e in qq)
					if (e.toLowerCase() === c) {
						d = e;
						break
					}
				if (null !== d) return a = Pe(qq[d], !1), Rd[d] = a, c !== d && (Rd[c] = d), d
			}
		}
		return "string" === typeof b ? b : b instanceof Ce ? a : null
	}

	function R(a) {
		C.call(this, a);
		this.O = 2408959;
		this.sl = this.yi = "";
		this.Vs = this.Ss = this.dt = this.bs = null;
		this.ft = "";
		this.wi = this.Nr = this.et = this.an = null;
		this.Us = "";
		this.gp = null;
		this.Ts = Gd;
		this.Ws = "";
		this.hp = null;
		this.Md = "";
		this.ew = this.$q = this.fl = null;
		this.Ui = (new y(NaN, NaN)).freeze();
		this.gs = "";
		this.vl = null;
		this.hs = zb;
		this.qs = pd;
		this.js = qd;
		this.ur = null;
		this.cs = Yq;
		this.cn = od;
		this.bn = "gray";
		this.Eg = 4;
		this.pD = -1;
		this.Dt = NaN;
		this.RG = new B;
		this.Pm = null;
		this.hk = NaN
	}
	w.La(R, C);
	w.ga("Part", R);
	R.prototype.cloneProtected = function(a) {
		C.prototype.cloneProtected.call(this, a);
		a.O = this.O & -4097 | 49152;
		a.yi = this.yi;
		a.sl = this.sl;
		a.bs = this.bs;
		a.dt = this.dt;
		a.Ss = this.Ss;
		a.Vs = this.Vs;
		a.ft = this.ft;
		a.et = this.et;
		a.Nr = this.Nr;
		a.wi = null;
		a.Us = this.Us;
		a.Ts = this.Ts.S();
		a.Ws = this.Ws;
		a.Md = this.Md;
		a.$q = this.$q;
		a.Ui.assign(this.Ui);
		a.gs = this.gs;
		a.hs = this.hs.S();
		a.qs = this.qs.S();
		a.js = this.js.S();
		a.ur = this.ur;
		a.cs = this.cs;
		a.cn = this.cn.S();
		a.bn = this.bn;
		a.Eg = this.Eg;
		a.Dt = this.Dt
	};
	R.prototype.ni = function(a) {
		C.prototype.ni.call(this, a);
		a.Lk();
		a.an = null;
		a.gp = null;
		a.hp = null;
		a.vl = null;
		a.Pm = null
	};
	R.prototype.toString = function() {
		var a = w.of(Object.getPrototypeOf(this)) + "#" + w.Pd(this);
		null !== this.data && (a += "(" + Rf(this.data) + ")");
		return a
	};
	R.LayoutNone = 0;
	var Nm;
	R.LayoutAdded = Nm = 1;
	var Wm;
	R.LayoutRemoved = Wm = 2;
	R.LayoutShown = 4;
	R.LayoutHidden = 8;
	R.LayoutNodeSized = 16;
	var Bn;
	R.LayoutGroupLayout = Bn = 32;
	R.LayoutNodeReplaced = 64;
	var Yq;
	R.LayoutStandard = Yq = Nm | Wm | 28 | Bn | 64;
	R.LayoutAll = 16777215;
	R.prototype.Un = function(a, b, c, d, e, f, h) {
		var k = this.g;
		null !== k && (a === Ff && "elements" === b ? e instanceof C ? Om(e, function(a) {
			Qm(k, a);
			Pm(k, a)
		}) : e instanceof yl && on(k, e) : a === Qf && "elements" === b && (e instanceof C ? Om(e, function(a) {
			Um(k, a);
			Tm(k, a)
		}) : e instanceof yl && pn(k, e)), k.cd(a, b, c, d, e, f, h))
	};
	R.prototype.updateTargetBindings = R.prototype.Ib = function(a) {
		C.prototype.Ib.call(this, a);
		if (null !== this.data) {
			a = this.xa.n;
			for (var b = a.length, c = 0; c < b; c++) {
				var d = a[c];
				d instanceof C && Om(d, function(a) {
					null !== a.data && a.Ib()
				})
			}
		}
	};
	R.prototype.updateRelationshipsFromData = function() {
		var a = this.data;
		if (null !== a) {
			var b = this.g;
			if (null !== b) {
				var c = b.$;
				c instanceof Q && (a = c.yn(a), b = b.XH(a), null === b || b instanceof V) && (this.Da = b)
			}
		}
	};
	w.u(R, {
		key: "key"
	}, function() {
		var a = this.g;
		return null === a ? void 0 : a.$.qb(this.data)
	}, {
		configurable: !0
	});
	w.u(R, {
		$w: "adornments"
	}, function() {
		return null === this.wi ? ua : this.wi.JF
	});
	R.prototype.findAdornment = R.prototype.Rp = function(a) {
		var b = this.wi;
		return null === b ? null : b.ka(a)
	};
	R.prototype.addAdornment = R.prototype.Hl = function(a, b) {
		if (null !== b) {
			var c = null,
				d = this.wi;
			null !== d && (c = d.ka(a));
			if (c !== b) {
				if (null !== c) {
					var e = c.g;
					null !== e && e.remove(c)
				}
				null === d && (this.wi = d = new ma("string", kh));
				b.yi !== a && (b.yd = a);
				d.add(a, b);
				c = this.g;
				null !== c && (c.add(b), b.data = this.data)
			}
		}
	};
	R.prototype.removeAdornment = R.prototype.Ej = function(a) {
		var b = this.wi;
		if (null !== b) {
			var c = b.ka(a);
			if (null !== c) {
				var d = c.g;
				null !== d && d.remove(c)
			}
			b.remove(a);
			0 === b.count && (this.wi = null)
		}
	};
	R.prototype.clearAdornments = R.prototype.Mt = function() {
		var a = this.wi;
		if (null !== a) {
			for (var b = w.cb(), a = a.i; a.next();) b.push(a.key);
			for (var a = b.length, c = 0; c < a; c++) this.Ej(b[c]);
			w.ta(b)
		}
	};
	R.prototype.updateAdornments = function() {
		var a = this.g;
		if (null !== a) {
			a: {
				if (this.ib && this.EJ) {
					var b = this.Uu;
					if (!(null !== b && this.Y.I() && this.isVisible() && b.Aj() && b.Y.I())) break a;
					var c = this.Rp("Selection");
					if (null === c) {
						c = this.FJ;
						null === c && (c = this instanceof W ? a.OI : this instanceof V ? a.kI : a.hJ);
						if (!(c instanceof kh)) break a;
						mh(c);
						c = c.copy();
						null !== c && (c.tb = b)
					}
					if (null !== c) {
						var d = c.placeholder;
						if (null !== d) {
							var e = b.sj(),
								f = 0;
							b instanceof X && (f = b.mb);
							var h = w.mm();
							h.m((b.Ja.width + f) * e, (b.Ja.height + f) * e);
							d.Ca =
								h;
							w.Hk(h)
						}
						c.angle = b.Vl();
						c.type !== ij && (d = w.K(), c.location = b.Wa(zb, d), w.v(d));
						this.Hl("Selection", c);
						break a
					}
				}
				this.Ej("Selection")
			}
			Zq(this, a);
			for (a = this.$w; a.next();) b = a.value,
			b.Ib(),
			b.H()
		}
	};

	function Zq(a, b) {
		b.eb.ff.each(function(b) {
			b.isEnabled && b.updateAdornments(a)
		});
		b.eb.updateAdornments(a)
	}
	w.u(R, {
		layer: "layer"
	}, function() {
		return this.ew
	});
	w.u(R, {
		g: "diagram"
	}, function() {
		var a = this.ew;
		return null !== a ? a.g : null
	});
	w.defineProperty(R, {
		ag: "layerName"
	}, function() {
		return this.sl
	}, function(a) {
		var b = this.sl;
		if (b !== a) {
			w.j(a, "string", R, "layerName");
			var c = this.g;
			if (null === c || null !== c.Vt(a) && !c.Kq)
				if (this.sl = a, null !== c && c.Fc(), this.h("layerName", b, a), b = this.layer, null !== b && b.name !== a && (c = b.g, null !== c && (a = c.Vt(a), null !== a && a !== b))) {
					var d = b.qf(-1, this, !0);
					0 <= d && c.cd(Qf, "parts", b, this, null, d, !0);
					d = a.Yp(99999999, this, !0);
					b.visible !== a.visible && this.Cd(a.visible);
					0 <= d && c.cd(Ff, "parts", a, null, this, !0, d);
					d = this.Px;
					if (null !==
						d) {
						var e = c.Ta;
						c.Ta = !0;
						d(this, b, a);
						c.Ta = e
					}
				}
		}
	});
	w.defineProperty(R, {
		Px: "layerChanged"
	}, function() {
		return this.bs
	}, function(a) {
		var b = this.bs;
		b !== a && (null !== a && w.j(a, "function", R, "layerChanged"), this.bs = a, this.h("layerChanged", b, a))
	});
	w.defineProperty(R, {
		eo: "zOrder"
	}, function() {
		return this.Dt
	}, function(a) {
		var b = this.Dt;
		if (b !== a) {
			w.j(a, "number", R, "zOrder");
			this.Dt = a;
			var c = this.layer;
			null !== c && pl(c, -1, this);
			this.h("zOrder", b, a);
			a = this.g;
			null !== a && a.oa()
		}
	});
	R.prototype.invalidateAdornments = R.prototype.ee = function() {
		var a = this.g;
		null !== a && (Nl(a), 0 !== (this.O & 16384) !== !0 && (this.O |= 16384, a.Ne()))
	};

	function ll(a) {
		0 !== (a.O & 16384) !== !1 && (a.updateAdornments(), a.O &= -16385)
	}

	function $q(a) {
		if (!1 === Gm(a)) {
			var b = a.g;
			null !== b && (b.vg.add(a), b.Ne());
			ar(a, !0);
			a.Ni()
		}
	}

	function br(a) {
		a.O |= 2097152;
		if (!1 !== Gm(a)) {
			var b = a.position,
				c = a.location;
			c.I() && b.I() || cr(a, b, c);
			var c = a.pc,
				d = c.copy();
			c.Qa();
			c.x = b.x;
			c.y = b.y;
			c.freeze();
			a.Yx(d, c);
			ar(a, !1)
		}
	}
	w.u(R, {
		bg: "locationObject"
	}, function() {
		if (null === this.vl) {
			var a = this.WA;
			"" !== a ? (a = this.Bd(a), this.vl = null !== a ? a : this) : this.vl = this instanceof kh ? this.type !== ij && null !== this.placeholder ? this.placeholder : this : this
		}
		return this.vl.visible ? this.vl : this
	});
	w.defineProperty(R, {
		$I: "minLocation"
	}, function() {
		return this.qs
	}, function(a) {
		var b = this.qs;
		b.L(a) || (this.qs = a = a.S(), this.h("minLocation", b, a))
	});
	w.defineProperty(R, {
		UI: "maxLocation"
	}, function() {
		return this.js
	}, function(a) {
		var b = this.js;
		b.L(a) || (this.js = a = a.S(), this.h("maxLocation", b, a))
	});
	w.defineProperty(R, {
		WA: "locationObjectName"
	}, function() {
		return this.gs
	}, function(a) {
		var b = this.gs;
		b !== a && (this.gs = a, this.vl = null, this.H(), this.h("locationObjectName", b, a))
	});
	w.defineProperty(R, {
		Ff: "locationSpot"
	}, function() {
		return this.hs
	}, function(a) {
		var b = this.hs;
		b.L(a) || (this.hs = a = a.S(), this.H(), this.h("locationSpot", b, a))
	});
	R.prototype.move = function(a) {
		this.position = a
	};
	R.prototype.moveTo = R.prototype.moveTo = function(a, b) {
		var c = w.xb(a, b);
		this.move(c);
		w.v(c)
	};
	R.prototype.isVisible = function() {
		if (!this.visible) return !1;
		var a = this.layer;
		if (null !== a && !a.visible) return !1;
		a = this.g;
		if (null !== a && (a = a.Ka, a.cf && (a = a.Rm.ka(this), null !== a && a.iy))) return !0;
		a = this.Da;
		return null === a || a.ad && a.isVisible() ? !0 : !1
	};
	R.prototype.Cd = function(a) {
		var b = this.g;
		a ? (this.J(4), this.ee(), null !== b && b.vg.add(this)) : (this.J(8), this.Mt());
		this.Lk();
		null !== b && (b.Fc(), b.oa())
	};
	R.prototype.findObject = R.prototype.Bd = function(a) {
		if (this.name === a) return this;
		var b = this.Pm;
		null === b && (this.Pm = b = new ra);
		if (void 0 !== b[a]) return b[a];
		for (var c = this.xa.n, d = c.length, e = 0; e < d; e++) {
			var f = c[e];
			if (f.name === a) return b[a] = f;
			if (f instanceof C)
				if (null === f.dk && null === f.xg) {
					if (f = f.Bd(a), null !== f) return b[a] = f
				} else if (mn(f) && (f = f.xa.first(), null !== f && f.name === a)) return b[a] = f
		}
		return b[a] = null
	};

	function dr(a, b, c, d) {
		void 0 === d && (d = new y);
		c = c.Td() ? Jb : c;
		var e = b.Ja;
		d.m(e.width * c.x + c.offsetX, e.height * c.y + c.offsetY);
		if (null === b || b === a) return d;
		b.transform.nb(d);
		for (b = b.Q; null !== b && b !== a;) b.transform.nb(d), b = b.Q;
		a.Ti.nb(d);
		d.offset(-a.ud.x, -a.ud.y);
		return d
	}
	R.prototype.ensureBounds = R.prototype.$e = function() {
		yk(this, Infinity, Infinity);
		this.jc()
	};

	function ol(a, b) {
		var c = a.RG,
			d;
		isNaN(a.hk) && (a.hk = $p(a));
		d = a.hk;
		var e = 2 * d;
		if (!a.cm) return c.m(b.x - 1 - d, b.y - 1 - d, b.width + 2 + e, b.height + 2 + e), c;
		d = b.x;
		var e = b.y,
			f = b.width,
			h = b.height,
			k = a.shadowBlur,
			l = a.JJ,
			f = f + k,
			h = h + k;
		d -= k / 2;
		e -= k / 2;
		0 < l.x ? f += l.x : (d += l.x, f -= l.x);
		0 < l.y ? h += l.y : (e += l.y, h -= l.y);
		c.m(d - 1, e - 1, f + 2, h + 2);
		return c
	}
	R.prototype.jc = function() {
		this.Ni();
		if (!1 === Fm(this)) br(this);
		else {
			var a = this.pc,
				b = w.Kf();
			b.assign(a);
			a.Qa();
			var c = kl(this);
			this.mj(0, 0, this.ud.width, this.ud.height);
			var d = this.position;
			cr(this, d, this.location);
			a.x = d.x;
			a.y = d.y;
			a.freeze();
			this.Yx(b, a);
			Fo(this, !1);
			b.L(a) ? this.Hf(c) : !this.fe() || J(b.width, a.width) && J(b.height, a.height) || 0 <= this.pD && this.J(16);
			w.Eb(b);
			ar(this, !1)
		}
	};
	R.prototype.Yx = function(a, b) {
		var c = this.g;
		if (null !== c) {
			var d = !1;
			if (!1 === c.Zj && a.I()) {
				var e = c.te,
					f = c.padding,
					h = e.x + f.left,
					k = e.y + f.top,
					l = e.width - 2 * f.right,
					e = e.height - 2 * f.bottom;
				a.x > h && a.y > k && a.right < l && a.bottom < e && b.x > h && b.y > k && b.right < l && b.bottom < e && (d = !0)
			}
			0 !== (this.O & 65536) !== !0 && a.L(b) || Rm(this, d, c);
			c.oa();
			Va(a, b) || (this instanceof T && !c.ja.lb && this.$f(), this.Lk())
		}
	};
	w.defineProperty(R, {
		location: "location"
	}, function() {
		return this.Ui
	}, function(a) {
		var b = a.x,
			c = a.y,
			d = this.Ui,
			e = d.x,
			f = d.y;
		(e === b || isNaN(e) && isNaN(b)) && (f === c || isNaN(f) && isNaN(c)) || (a = a.S(), b = a, this instanceof W ? b = !1 : (this.Ui = b, this.O |= 2097152, !1 === Fm(this) && ($q(this), c = this.jb, c.I() && (e = c.copy(), c.m(c.x + (b.x - d.x), c.y + (b.y - d.y)), er(this, this.g, c, e), this.h("position", e, c))), b = !0), b && this.h("location", d, a))
	});
	g = R.prototype;
	g.AB = function(a, b) {
		if (this instanceof W || !a.I()) return !1;
		var c = this.g;
		if (null !== c && (er(this, c, a, b), !0 === c.ja.lb)) return !0;
		this.jb = a;
		this.O &= -2097153;
		c = this.Ui;
		if (c.I()) {
			var d = c.copy();
			c.m(c.x + (a.x - b.x), c.y + (a.y - b.y));
			this.h("location", d, c)
		}!1 === Gm(this) && !1 === Fm(this) && ($q(this), br(this));
		return !0
	};

	function er(a, b, c, d) {
		null === b || a instanceof kh || (b = b.Ka, b.rc && Vk(b, a, "position", d.copy(), c.copy(), !1))
	}
	g.vy = function(a, b) {
		var c = this.Ui,
			d = this.jb;
		Gm(this) || Fm(this) ? c.m(NaN, NaN) : c.m(c.x + a - d.x, c.y + b - d.y);
		d.m(a, b);
		$q(this)
	};
	g.BB = function() {
		this.O &= -2097153;
		$q(this)
	};

	function cr(a, b, c) {
		var d = w.K(),
			e = a.Ff,
			f = a.bg;
		e.Td() && w.k("determineOffset: Part's locationSpot must be real: " + e.toString());
		var h = f.Ja,
			k = f instanceof X ? f.mb : 0;
		d.Xu(0, 0, h.width + k, h.height + k, e);
		if (f !== a)
			for (d.offset(-k / 2, -k / 2), f.transform.nb(d), e = f.Q; null !== e && e !== a;) e.transform.nb(d), e = e.Q;
		a.Ti.nb(d);
		d.offset(-a.ud.x, -a.ud.y);
		e = a.g;
		f = c.I();
		h = b.I();
		f && h ? 0 !== (a.O & 2097152) ? fr(a, b, c, e, d) : gr(a, b, c, e, d) : f ? fr(a, b, c, e, d) : h && gr(a, b, c, e, d);
		a.O |= 2097152;
		w.v(d);
		a.Ni()
	}

	function fr(a, b, c, d, e) {
		var f = b.x,
			h = b.y;
		b.m(c.x - e.x, c.y - e.y);
		null !== d && (c = d.Ka, (e = c.$j) || !c.rc || a instanceof kh || Vk(c, a, "position", new y(f, h), b, !1), e || b.x === f && b.y === h || (c = d.bb, d.bb = !0, a.h("position", new y(f, h), b), d.bb = c))
	}

	function gr(a, b, c, d, e) {
		var f = c.copy();
		c.m(b.x + e.x, b.y + e.y);
		c.L(f) || null === d || (b = d.bb, d.bb = !0, a.h("location", f, c), d.bb = b)
	}

	function Rm(a, b, c) {
		Ho(a, !1);
		a instanceof T && c.MA(a);
		a.layer.Pc || b || c.Fc();
		b = a.pc;
		var d = c.rb;
		d.I() ? (kl(a) ? $a(b, d) || a.Hf(!1) : b.Zf(d) && a.Hf(!0), a.updateAdornments()) : c.ol = !0
	}
	g.bm = function() {
		return !0
	};

	function ml(a, b) {
		var c = a.pc;
		if (0 !== c.width && 0 !== c.height && !isNaN(c.x) && !isNaN(c.y) && a.isVisible()) {
			var d = a.transform;
			null !== a.cc && (No(a, b, a.cc, !0, !0), b.fillRect(c.x, c.y, c.width, c.height));
			null === a.cc && null === a.Fb && (No(a, b, "rgba(0,0,0,0.4)", !0, !1), b.fillRect(c.x, c.y, c.width, c.height));
			null !== a.Fb && (d.su() || b.transform(d.m11, d.m12, d.m21, d.m22, d.dx, d.dy), c = a.Ja, No(a, b, a.Fb, !0, !1), b.fillRect(0, 0, c.width, c.height), d.su() || (c = 1 / (d.m11 * d.m22 - d.m12 * d.m21), b.transform(d.m22 * c, -d.m12 * c, -d.m21 * c, d.m11 * c, c * (d.m21 *
				d.dy - d.m22 * d.dx), c * (d.m12 * d.dx - d.m11 * d.dy))))
		}
	}
	g.fe = function() {
		return !0
	};
	g.wj = function() {
		return !0
	};
	w.defineProperty(R, {
		yd: "category"
	}, function() {
		return this.yi
	}, function(a) {
		var b = this.yi;
		if (b !== a) {
			w.j(a, "string", R, "category");
			var c = this.g,
				d = this.data,
				e = null;
			if (null !== c && null !== d && !(this instanceof kh)) {
				var f = c.$.ja;
				f.isEnabled && !f.lb && (e = this.clone(), e.xa.Nc(this.xa))
			}
			this.yi = a;
			this.h("category", b, a);
			null === c || null === d || this instanceof kh ? (e = this.zf, null !== e && (a = e.wi, null !== a && a.remove(b), e.Hl(this.yd, this))) : (f = c.$, f.ja.lb || (this instanceof W ? (f instanceof Q ? f.pG(d, a) : f instanceof $f && f.HJ(d,
				a), c = hj(c, a), null !== c && (mh(c), c = c.copy(), null !== c && hr(this, c, b, a))) : (null !== f && f.sy(d, a), c = tn(c, d, a), null !== c && (mh(c), c = c.copy(), null === c || c instanceof W || (c.location = this.location, hr(this, c, b, a)))), null !== e && (b = this.clone(), b.xa.Nc(this.xa), this.h("self", e, b))))
		}
	});
	w.defineProperty(R, {
		self: "self"
	}, function() {
		return this
	}, function(a) {
		hr(this, a, this.yd, a.yd)
	});
	var ir = !1;

	function hr(a, b, c, d) {
		b.constructor === a.constructor || ir || (ir = !0, w.trace('Should not change the class of the Part when changing category from "' + c + '" to "' + d + '"'), w.trace("  Old class: " + w.of(a) + ", new class: " + w.of(b) + ", part: " + a.toString()));
		a.Mt();
		var e = a.data;
		c = a.ag;
		var f = a.ib,
			h = a.Og,
			k = !0,
			l = !0,
			m = !1;
		if (a instanceof T) var n = a,
			k = n.zj,
			l = n.uc,
			m = n.Eq;
		b.ni(a);
		b.cloneProtected(a);
		a.yi = d;
		a.H();
		a.oa();
		b = a.g;
		d = !0;
		null !== b && (d = b.bb, b.bb = !0);
		a.Zd = e;
		null !== e && a.Ib();
		null !== b && (b.bb = d);
		e = a.ag;
		e !== c && (a.sl = c,
			a.ag = e);
		a instanceof T && (n = a, n.zj = k, n.uc = l, n.Eq = m, n.fe() && n.J(64));
		a.ib = f;
		a.Og = h
	}
	R.prototype.canCopy = function() {
		if (!this.IH) return !1;
		var a = this.layer;
		if (null === a) return !0;
		if (!a.xk) return !1;
		a = a.g;
		return null === a ? !0 : a.xk ? !0 : !1
	};
	R.prototype.canDelete = function() {
		if (!this.NH) return !1;
		var a = this.layer;
		if (null === a) return !0;
		if (!a.hn) return !1;
		a = a.g;
		return null === a ? !0 : a.hn ? !0 : !1
	};
	R.prototype.canEdit = function() {
		if (!this.QJ) return !1;
		var a = this.layer;
		if (null === a) return !0;
		if (!a.gx) return !1;
		a = a.g;
		return null === a ? !0 : a.gx ? !0 : !1
	};
	R.prototype.canGroup = function() {
		if (!this.lI) return !1;
		var a = this.layer;
		if (null === a) return !0;
		if (!a.ax) return !1;
		a = a.g;
		return null === a ? !0 : a.ax ? !0 : !1
	};
	R.prototype.canMove = function() {
		if (!this.eJ) return !1;
		var a = this.layer;
		if (null === a) return !0;
		if (!a.Kl) return !1;
		a = a.g;
		return null === a ? !0 : a.Kl ? !0 : !1
	};
	R.prototype.canReshape = function() {
		if (!this.sJ) return !1;
		var a = this.layer;
		if (null === a) return !0;
		if (!a.bx) return !1;
		a = a.g;
		return null === a ? !0 : a.bx ? !0 : !1
	};
	R.prototype.canResize = function() {
		if (!this.tJ) return !1;
		var a = this.layer;
		if (null === a) return !0;
		if (!a.Lt) return !1;
		a = a.g;
		return null === a ? !0 : a.Lt ? !0 : !1
	};
	R.prototype.canRotate = function() {
		if (!this.wJ) return !1;
		var a = this.layer;
		if (null === a) return !0;
		if (!a.ex) return !1;
		a = a.g;
		return null === a ? !0 : a.ex ? !0 : !1
	};
	R.prototype.canSelect = function() {
		if (!this.gm) return !1;
		var a = this.layer;
		if (null === a) return !0;
		if (!a.Af) return !1;
		a = a.g;
		return null === a ? !0 : a.Af ? !0 : !1
	};
	w.defineProperty(R, {
		IH: "copyable"
	}, function() {
		return 0 !== (this.O & 1)
	}, function(a) {
		var b = 0 !== (this.O & 1);
		b !== a && (this.O ^= 1, this.h("copyable", b, a))
	});
	w.defineProperty(R, {
		NH: "deletable"
	}, function() {
		return 0 !== (this.O & 2)
	}, function(a) {
		var b = 0 !== (this.O & 2);
		b !== a && (this.O ^= 2, this.h("deletable", b, a))
	});
	w.defineProperty(R, {
		QJ: "textEditable"
	}, function() {
		return 0 !== (this.O & 4)
	}, function(a) {
		var b = 0 !== (this.O & 4);
		b !== a && (this.O ^= 4, this.h("textEditable", b, a), this.ee())
	});
	w.defineProperty(R, {
		lI: "groupable"
	}, function() {
		return 0 !== (this.O & 8)
	}, function(a) {
		var b = 0 !== (this.O & 8);
		b !== a && (this.O ^= 8, this.h("groupable", b, a))
	});
	w.defineProperty(R, {
		eJ: "movable"
	}, function() {
		return 0 !== (this.O & 16)
	}, function(a) {
		var b = 0 !== (this.O & 16);
		b !== a && (this.O ^= 16, this.h("movable", b, a))
	});
	w.defineProperty(R, {
		EJ: "selectionAdorned"
	}, function() {
		return 0 !== (this.O & 32)
	}, function(a) {
		var b = 0 !== (this.O & 32);
		b !== a && (this.O ^= 32, this.h("selectionAdorned", b, a), this.ee())
	});
	w.defineProperty(R, {
		RA: "isInDocumentBounds"
	}, function() {
		return 0 !== (this.O & 64)
	}, function(a) {
		var b = 0 !== (this.O & 64);
		if (b !== a) {
			this.O ^= 64;
			var c = this.g;
			null !== c && c.Fc();
			this.h("isInDocumentBounds", b, a)
		}
	});
	w.defineProperty(R, {
		EF: "isLayoutPositioned"
	}, function() {
		return 0 !== (this.O & 128)
	}, function(a) {
		var b = 0 !== (this.O & 128);
		b !== a && (this.O ^= 128, this.h("isLayoutPositioned", b, a), this.J(a ? 4 : 8))
	});
	w.defineProperty(R, {
		gm: "selectable"
	}, function() {
		return 0 !== (this.O & 256)
	}, function(a) {
		var b = 0 !== (this.O & 256);
		b !== a && (this.O ^= 256, this.h("selectable", b, a), this.ee())
	});
	w.defineProperty(R, {
		sJ: "reshapable"
	}, function() {
		return 0 !== (this.O & 512)
	}, function(a) {
		var b = 0 !== (this.O & 512);
		b !== a && (this.O ^= 512, this.h("reshapable", b, a), this.ee())
	});
	w.defineProperty(R, {
		tJ: "resizable"
	}, function() {
		return 0 !== (this.O & 1024)
	}, function(a) {
		var b = 0 !== (this.O & 1024);
		b !== a && (this.O ^= 1024, this.h("resizable", b, a), this.ee())
	});
	w.defineProperty(R, {
		wJ: "rotatable"
	}, function() {
		return 0 !== (this.O & 2048)
	}, function(a) {
		var b = 0 !== (this.O & 2048);
		b !== a && (this.O ^= 2048, this.h("rotatable", b, a), this.ee())
	});
	w.defineProperty(R, {
		ib: "isSelected"
	}, function() {
		return 0 !== (this.O & 4096)
	}, function(a) {
		var b = 0 !== (this.O & 4096);
		if (b !== a) {
			var c = this.g;
			if (!a || this.canSelect() && !(null !== c && c.selection.count >= c.VI)) {
				this.O ^= 4096;
				var d = !1;
				if (null !== c) {
					d = c.bb;
					c.bb = !0;
					var e = c.selection;
					e.Qa();
					a ? e.add(this) : e.remove(this);
					e.freeze()
				}
				this.h("isSelected", b, a);
				this.ee();
				a = this.GJ;
				null !== a && a(this);
				null !== c && (c.Ne(), c.bb = d)
			}
		}
	});
	w.defineProperty(R, {
		Og: "isHighlighted"
	}, function() {
		return 0 !== (this.O & 524288)
	}, function(a) {
		var b = 0 !== (this.O & 524288);
		if (b !== a) {
			this.O ^= 524288;
			var c = this.g;
			null !== c && (c = c.Yl, c.Qa(), a ? c.add(this) : c.remove(this), c.freeze());
			this.h("isHighlighted", b, a);
			this.oa();
			a = this.oI;
			null !== a && a(this)
		}
	});
	w.defineProperty(R, {
		cm: "isShadowed"
	}, function() {
		return 0 !== (this.O & 8192)
	}, function(a) {
		var b = 0 !== (this.O & 8192);
		b !== a && (this.O ^= 8192, this.h("isShadowed", b, a), this.oa())
	});

	function Gm(a) {
		return 0 !== (a.O & 32768)
	}

	function ar(a, b) {
		a.O = b ? a.O | 32768 : a.O & -32769
	}

	function Ho(a, b) {
		a.O = b ? a.O | 65536 : a.O & -65537
	}

	function kl(a) {
		return 0 !== (a.O & 131072)
	}
	R.prototype.Hf = function(a) {
		this.O = a ? this.O | 131072 : this.O & -131073
	};

	function jr(a, b) {
		a.O = b ? a.O | 1048576 : a.O & -1048577
	}
	w.defineProperty(R, {
		xF: "isAnimated"
	}, function() {
		return 0 !== (this.O & 262144)
	}, function(a) {
		var b = 0 !== (this.O & 262144);
		b !== a && (this.O ^= 262144, this.h("isAnimated", b, a))
	});
	w.defineProperty(R, {
		oI: "highlightedChanged"
	}, function() {
		return this.Nr
	}, function(a) {
		var b = this.Nr;
		b !== a && (null !== a && w.j(a, "function", R, "highlightedChanged"), this.Nr = a, this.h("highlightedChanged", b, a))
	});
	w.defineProperty(R, {
		vB: "selectionObjectName"
	}, function() {
		return this.ft
	}, function(a) {
		var b = this.ft;
		b !== a && (this.ft = a, this.an = null, this.h("selectionObjectName", b, a))
	});
	w.defineProperty(R, {
		FJ: "selectionAdornmentTemplate"
	}, function() {
		return this.dt
	}, function(a) {
		var b = this.dt;
		b !== a && (this instanceof W && (a.type = ij), this.dt = a, this.h("selectionAdornmentTemplate", b, a))
	});
	w.u(R, {
		Uu: "selectionObject"
	}, function() {
		if (null === this.an) {
			var a = this.vB;
			null !== a && "" !== a ? (a = this.Bd(a), this.an = null !== a ? a : this) : this instanceof W ? (a = this.path, this.an = null !== a ? a : this) : this.an = this
		}
		return this.an
	});
	w.defineProperty(R, {
		GJ: "selectionChanged"
	}, function() {
		return this.et
	}, function(a) {
		var b = this.et;
		b !== a && (null !== a && w.j(a, "function", R, "selectionChanged"), this.et = a, this.h("selectionChanged", b, a))
	});
	w.defineProperty(R, {
		fG: "resizeAdornmentTemplate"
	}, function() {
		return this.Ss
	}, function(a) {
		var b = this.Ss;
		b !== a && (this.Ss = a, this.h("resizeAdornmentTemplate", b, a))
	});
	w.defineProperty(R, {
		hG: "resizeObjectName"
	}, function() {
		return this.Us
	}, function(a) {
		var b = this.Us;
		b !== a && (this.Us = a, this.gp = null, this.h("resizeObjectName", b, a))
	});
	w.u(R, {
		gG: "resizeObject"
	}, function() {
		if (null === this.gp) {
			var a = this.hG;
			null !== a && "" !== a ? (a = this.Bd(a), this.gp = null !== a ? a : this) : this.gp = this
		}
		return this.gp
	});
	w.defineProperty(R, {
		uJ: "resizeCellSize"
	}, function() {
		return this.Ts
	}, function(a) {
		var b = this.Ts;
		b.L(a) || (this.Ts = a = a.S(), this.h("resizeCellSize", b, a))
	});
	w.defineProperty(R, {
		xJ: "rotateAdornmentTemplate"
	}, function() {
		return this.Vs
	}, function(a) {
		var b = this.Vs;
		b !== a && (this.Vs = a, this.h("rotateAdornmentTemplate", b, a))
	});
	w.defineProperty(R, {
		yJ: "rotateObjectName"
	}, function() {
		return this.Ws
	}, function(a) {
		var b = this.Ws;
		b !== a && (this.Ws = a, this.hp = null, this.h("rotateObjectName", b, a))
	});
	w.u(R, {
		qB: "rotateObject"
	}, function() {
		if (null === this.hp) {
			var a = this.yJ;
			null !== a && "" !== a ? (a = this.Bd(a), this.hp = null !== a ? a : this) : this.hp = this
		}
		return this.hp
	});
	w.defineProperty(R, {
		text: "text"
	}, function() {
		return this.Md
	}, function(a) {
		var b = this.Md;
		b !== a && (this.Md = a, this.h("text", b, a))
	});
	w.defineProperty(R, {
		Da: "containingGroup"
	}, function() {
		return this.fl
	}, function(a) {
		if (this.fe()) {
			var b = this.fl;
			if (b !== a) {
				null === a || this !== a && !a.oi(this) || (this === a && w.k("Cannot make a Group a member of itself: " + this.toString()), w.k("Cannot make a Group indirectly contain itself: " + this.toString() + " already contains " + a.toString()));
				this.J(Wm);
				var c = this.g;
				null !== b ? kr(b, this) : this instanceof V && null !== c && c.El.remove(this);
				this.fl = a;
				null !== a ? lr(a, this) : this instanceof V && null !== c && c.El.add(this);
				this.J(Nm);
				if (null !== c) {
					var d = this.data,
						e = c.$;
					null !== d && e instanceof Q && e.yB(d, e.qb(null !== a ? a.data : null))
				}
				d = this.KE;
				null !== d && (e = !0, null !== c && (e = c.Ta, c.Ta = !0), d(this, b, a), null !== c && (c.Ta = e));
				if (this instanceof V)
					for (c = new I(R), jh(c, this, !0, 0, !0), c = c.i; c.next();)
						if (d = c.value, d instanceof T)
							for (d = d.he; d.next();) rn(d.value);
				if (this instanceof T) {
					for (d = this.he; d.next();) rn(d.value);
					c = this.Wb;
					null !== c && rn(c)
				}
				this.h("containingGroup", b, a);
				null !== a && (b = a.layer, null !== b && pl(b, -1, a))
			}
		} else w.k("cannot set the Part.containingGroup of a Link or Adornment")
	});
	g = R.prototype;
	g.Lk = function() {
		var a = this.Da;
		null !== a && (a.H(), null !== a.Lb && a.Lb.H(), a.$f())
	};
	g.oa = function() {
		var a = this.g;
		null !== a && !Fm(this) && !Gm(this) && this.isVisible() && this.pc.I() && a.oa(ol(this, this.pc))
	};
	g.H = function() {
		C.prototype.H.call(this);
		var a = this.g;
		null !== a && (a.vg.add(this), this instanceof T && null !== this.Wb && Ro(this.Wb), a.Ne(!0))
	};
	g.ju = function(a) {
		a || (a = this.fl, null !== a && lr(a, this))
	};
	g.ku = function(a) {
		a || (a = this.fl, null !== a && kr(a, this))
	};
	g.un = function() {
		var a = this.data;
		if (null !== a) {
			var b = this.g;
			null !== b && (b = b.$, null !== b && b.ly(a))
		}
	};
	w.defineProperty(R, {
		KE: "containingGroupChanged"
	}, function() {
		return this.$q
	}, function(a) {
		var b = this.$q;
		b !== a && (null !== a && w.j(a, "function", R, "containingGroupChanged"), this.$q = a, this.h("containingGroupChanged", b, a))
	});
	R.prototype.findSubGraphLevel = function() {
		return mr(this, this)
	};

	function mr(a, b) {
		var c = b.Da;
		return null !== c ? 1 + mr(a, c) : b instanceof T && (c = b.Wb, null !== c) ? mr(a, c) : 0
	}
	R.prototype.findTopLevelPart = function() {
		return nr(this, this)
	};

	function nr(a, b) {
		var c = b.Da;
		return null !== c ? nr(a, c) : b instanceof T && (c = b.Wb, null !== c) ? nr(a, c) : b
	}
	w.u(R, {
		cq: "isTopLevel"
	}, function() {
		return null !== this.Da || this instanceof T && null !== this.Wb ? !1 : !0
	});
	R.prototype.isMemberOf = R.prototype.oi = function(a) {
		return a instanceof V ? or(this, this, a) : !1
	};

	function or(a, b, c) {
		if (b === c || null === c) return !1;
		var d = b.Da;
		return null === d || d !== c && !or(a, d, c) ? b instanceof T && (b = b.Wb, null !== b) ? or(a, b, c) : !1 : !0
	}
	R.prototype.findCommonContainingGroup = R.prototype.VH = function(a) {
		if (null === a) return null;
		if (this === a) return this.Da;
		for (var b = this; null !== b;) {
			b instanceof V && jr(b, !0);
			if (b instanceof T) {
				var c = b.Wb;
				null !== c && (b = c)
			}
			b = b.Da
		}
		for (var d = null, b = a; null !== b;) {
			if (0 !== (b.O & 1048576)) {
				d = b;
				break
			}
			b instanceof T && (c = b.Wb, null !== c && (b = c));
			b = b.Da
		}
		for (b = this; null !== b;) b instanceof V && jr(b, !1), b instanceof T && (c = b.Wb, null !== c && (b = c)), b = b.Da;
		return d
	};
	w.defineProperty(R, {
		KI: "layoutConditions"
	}, function() {
		return this.cs
	}, function(a) {
		var b = this.cs;
		b !== a && (this.cs = a, this.h("layoutConditions", b, a))
	});
	R.prototype.canLayout = function() {
		if (!this.EF || !this.isVisible()) return !1;
		var a = this.layer;
		return null !== a && a.Pc || this instanceof T && this.Cf ? !1 : !0
	};
	R.prototype.invalidateLayout = R.prototype.J = function(a) {
		void 0 === a && (a = 16777215);
		var b;
		this.EF && 0 !== (a & this.KI) ? (b = this.layer, null !== b && b.Pc || this instanceof T && this.Cf ? b = !1 : (b = this.g, b = null !== b && b.ja.lb ? !1 : !0)) : b = !1;
		if (b)
			if (b = this.fl, null !== b) {
				var c = b.Sb;
				null !== c ? c.J() : b.J(a)
			} else a = this.g, null !== a && (c = a.Sb, null !== c && c.J())
	};

	function Sm(a) {
		if (!a.isVisible()) return !1;
		a = a.layer;
		return null !== a && a.Pc ? !1 : !0
	}
	w.defineProperty(R, {
		UE: "dragComputation"
	}, function() {
		return this.ur
	}, function(a) {
		var b = this.ur;
		b !== a && (null !== a && w.j(a, "function", R, "dragComputation"), this.ur = a, this.h("dragComputation", b, a))
	});
	w.defineProperty(R, {
		JJ: "shadowOffset"
	}, function() {
		return this.cn
	}, function(a) {
		var b = this.cn;
		b.L(a) || (this.cn = a = a.S(), this.oa(), this.h("shadowOffset", b, a))
	});
	w.defineProperty(R, {
		shadowColor: "shadowColor"
	}, function() {
		return this.bn
	}, function(a) {
		var b = this.bn;
		b !== a && (this.bn = a, this.oa(), this.h("shadowColor", b, a))
	});
	w.defineProperty(R, {
		shadowBlur: "shadowBlur"
	}, function() {
		return this.Eg
	}, function(a) {
		var b = this.Eg;
		b !== a && (this.Eg = a, this.oa(), this.h("shadowBlur", b, a))
	});

	function kh(a) {
		0 === arguments.length ? R.call(this, Uj) : R.call(this, a);
		this.O &= -257;
		this.sl = "Adornment";
		this.Jc = null;
		this.zD = 0;
		this.oE = !1;
		this.Lb = this.Zg = null
	}
	w.La(kh, R);
	w.ga("Adornment", kh);
	kh.prototype.toString = function() {
		var a = this.zf;
		return "Adornment(" + this.yd + ")" + (null !== a ? a.toString() : "")
	};
	kh.prototype.updateRelationshipsFromData = function() {};
	kh.prototype.Bu = function(a) {
		var b = this.tb.U,
			c = this.tb;
		if (b instanceof W && c instanceof X) {
			var d = b.path,
				c = d.nf;
			b.Bu(a);
			c = d.nf;
			a = this.xa.n;
			b = a.length;
			for (d = 0; d < b; d++) {
				var e = a[d];
				e.ef && e instanceof X && (e.Ua = c)
			}
		}
	};
	w.u(kh, {
		placeholder: "placeholder"
	}, function() {
		return this.Lb
	});
	w.defineProperty(kh, {
		tb: "adornedObject"
	}, function() {
		return this.Jc
	}, function(a) {
		var b = this.zf,
			c = null;
		null !== a && (c = a.U);
		null === b || null !== a && b === c || b.Ej(this.yd);
		this.Jc = a;
		null !== c && c.Hl(this.yd, this)
	});
	w.u(kh, {
		zf: "adornedPart"
	}, function() {
		var a = this.Jc;
		return null !== a ? a.U : null
	});
	kh.prototype.bm = function() {
		var a = this.Jc;
		if (null === a) return !0;
		a = a.U;
		return null === a || !Fm(a)
	};
	kh.prototype.fe = function() {
		return !1
	};
	w.u(kh, {
		Da: "containingGroup"
	}, function() {
		return null
	});
	kh.prototype.Un = function(a, b, c, d, e, f, h) {
		if (a === Ff && "elements" === b)
			if (e instanceof Oj) {
				var k = e;
				null === this.Lb ? this.Lb = k : this.Lb !== k && w.k("Cannot insert a second Placeholder into the visual tree of an Adornment.")
			} else e instanceof C && (k = e.Ut(function(a) {
				return a instanceof Oj
			}), k instanceof Oj && (null === this.Lb ? this.Lb = k : this.Lb !== k && w.k("Cannot insert a second Placeholder into the visual tree of an Adornment.")));
		else a === Qf && "elements" === b && null !== this.Lb && (d === this.Lb ? this.Lb = null : d instanceof C &&
			this.Lb.am(d) && (this.Lb = null));
		R.prototype.Un.call(this, a, b, c, d, e, f, h)
	};
	kh.prototype.updateAdornments = function() {};
	kh.prototype.un = function() {};

	function T(a) {
		R.call(this, a);
		this.ya = 13;
		this.qc = new H(W);
		this.yt = this.Ro = this.ul = this.es = this.ds = null;
		this.Tq = nd;
		this.oe = this.Kh = null;
		this.Os = pr;
		this.vk = !1
	}
	w.La(T, R);
	w.ga("Node", T);
	T.prototype.cloneProtected = function(a) {
		R.prototype.cloneProtected.call(this, a);
		a.ya = this.ya;
		a.ya = this.ya & -17;
		a.ds = this.ds;
		a.es = this.es;
		a.ul = this.ul;
		a.yt = this.yt;
		a.Tq = this.Tq.S();
		a.Os = this.Os
	};
	T.prototype.ni = function(a) {
		R.prototype.ni.call(this, a);
		a.$f();
		a.Kh = this.Kh;
		a.oe = null
	};
	var qr;
	T.DirectionDefault = qr = w.p(T, "DirectionDefault", 0);
	T.DirectionAbsolute = w.p(T, "DirectionAbsolute", 1);
	var rr;
	T.DirectionRotatedNode = rr = w.p(T, "DirectionRotatedNode", 2);
	var xo;
	T.DirectionRotatedNodeOrthogonal = xo = w.p(T, "DirectionRotatedNodeOrthogonal", 3);
	T.SpreadingNone = w.p(T, "SpreadingNone", 10);
	var pr;
	T.SpreadingEvenly = pr = w.p(T, "SpreadingEvenly", 11);
	var sr;
	T.SpreadingPacked = sr = w.p(T, "SpreadingPacked", 12);

	function tr(a, b) {
		null !== b && (null === a.Kh && (a.Kh = new I(zl)), a.Kh.add(b))
	}

	function ur(a, b, c, d) {
		if (null === b || null === a.Kh) return null;
		for (var e = a.Kh.i; e.next();) {
			var f = e.value;
			if (f.jq === a && f.Gu === b && f.ay === c && f.by === d || f.jq === b && f.Gu === a && f.ay === d && f.by === c) return f
		}
		return null
	}
	T.prototype.invalidateLinkBundle = function(a, b, c) {
		if (void 0 === b || null === b) b = "";
		if (void 0 === c || null === c) c = "";
		a = ur(this, a, b, c);
		null !== a && a.Zp()
	};
	T.prototype.Un = function(a, b, c, d, e, f, h) {
		a === Ff && "elements" === b ? this.oe = null : a === Qf && "elements" === b && (this.oe = null);
		R.prototype.Un.call(this, a, b, c, d, e, f, h)
	};
	T.prototype.invalidateConnectedLinks = T.prototype.$f = function(a) {
		void 0 === a && (a = null);
		for (var b = this.he; b.next();) {
			var c = b.value;
			null !== a && a.contains(c) || (vr(this, c.lc), vr(this, c.Ic), c.Vb())
		}
	};

	function Io(a, b) {
		for (var c = a.he; c.next();) {
			var d = c.value;
			if (d.lc === b || d.Ic === b) vr(a, d.lc), vr(a, d.Ic), d.Vb()
		}
	}

	function vr(a, b) {
		if (null !== b) {
			var c = b.Ns;
			null !== c && c.Zp();
			c = a.Da;
			null === c || c.ad || vr(c, c.port)
		}
	}
	T.prototype.bm = function() {
		return !0
	};
	w.defineProperty(T, {
		lJ: "portSpreading"
	}, function() {
		return this.Os
	}, function(a) {
		var b = this.Os;
		b !== a && (this.Os = a, this.h("portSpreading", b, a), a = this.g, null !== a && a.ja.lb || this.$f())
	});
	w.defineProperty(T, {
		fA: "avoidable"
	}, function() {
		return 0 !== (this.ya & 8)
	}, function(a) {
		var b = 0 !== (this.ya & 8);
		if (b !== a) {
			this.ya ^= 8;
			var c = this.g;
			null !== c && c.MA(this);
			this.h("avoidable", b, a)
		}
	});
	w.defineProperty(T, {
		rH: "avoidableMargin"
	}, function() {
		return this.Tq
	}, function(a) {
		"number" === typeof a ? a = new hb(a) : w.G(a, hb, T, "avoidableMargin");
		var b = this.Tq;
		if (!b.L(a)) {
			this.Tq = a = a.S();
			var c = this.g;
			null !== c && c.MA(this);
			this.h("avoidableMargin", b, a)
		}
	});
	T.prototype.getAvoidableRect = function(a) {
		a.set(this.Y);
		a.Zw(this.rH);
		return a
	};
	T.prototype.findVisibleNode = function() {
		for (var a = this; null !== a && !a.isVisible();) a = a.Da;
		return a
	};
	T.prototype.isVisible = function() {
		if (!R.prototype.isVisible.call(this)) return !1;
		var a = !0,
			b = vl,
			c = this.g;
		if (null !== c) {
			a = c.Ka;
			if (a.cf && (a = a.Rm.ka(this), null !== a && a.iy)) return !0;
			a = c.Ud;
			b = c.PB
		}
		if (b === vl) {
			if (c = this.Gk(), null !== c && !c.uc) return !1
		} else if (b === $m) {
			if (c = a ? this.aF() : this.bF(), 0 < c.count && c.all(function(a) {
					return !a.uc
				})) return !1
		} else if (b === an && (c = a ? this.aF() : this.bF(), 0 < c.count && c.any(function(a) {
				return !a.uc
			}))) return !1;
		c = this.Wb;
		return null !== c ? c.isVisible() : !0
	};
	T.prototype.Cd = function(a) {
		R.prototype.Cd.call(this, a);
		for (var b = this.he; b.next();) b.value.Cd(a)
	};
	w.u(T, {
		he: "linksConnected"
	}, function() {
		return this.qc.i
	});
	T.prototype.findLinksConnected = T.prototype.ZE = function(a) {
		void 0 === a && (a = null);
		if (null === a) return this.qc.i;
		var b = new za(this.qc),
			c = this;
		b.pq = function(b) {
			return b.W === c && b.Ng === a || b.Z === c && b.Hh === a
		};
		return b
	};
	T.prototype.findLinksOutOf = T.prototype.zx = function(a) {
		void 0 === a && (a = null);
		var b = new za(this.qc),
			c = this;
		b.pq = function(b) {
			return b.W !== c ? !1 : null === a ? !0 : b.Ng === a
		};
		return b
	};
	T.prototype.findLinksInto = T.prototype.Mg = function(a) {
		void 0 === a && (a = null);
		var b = new za(this.qc),
			c = this;
		b.pq = function(b) {
			return b.Z !== c ? !1 : null === a ? !0 : b.Hh === a
		};
		return b
	};
	T.prototype.findNodesConnected = T.prototype.$E = function(a) {
		void 0 === a && (a = null);
		for (var b = null, c = null, d = this.qc.i; d.next();) {
			var e = d.value;
			if (e.W === this) {
				if (null === a || e.Ng === a) e = e.Z, null !== b ? b.add(e) : null !== c && c !== e ? (b = new I(T), b.add(c), b.add(e)) : c = e
			} else e.Z !== this || null !== a && e.Hh !== a || (e = e.W, null !== b ? b.add(e) : null !== c && c !== e ? (b = new I(T), b.add(c), b.add(e)) : c = e)
		}
		return null !== b ? b.i : null !== c ? new va(c) : ua
	};
	T.prototype.findNodesOutOf = T.prototype.bF = function(a) {
		void 0 === a && (a = null);
		for (var b = null, c = null, d = this.qc.i; d.next();) {
			var e = d.value;
			e.W !== this || null !== a && e.Ng !== a || (e = e.Z, null !== b ? b.add(e) : null !== c && c !== e ? (b = new I(T), b.add(c), b.add(e)) : c = e)
		}
		return null !== b ? b.i : null !== c ? new va(c) : ua
	};
	T.prototype.findNodesInto = T.prototype.aF = function(a) {
		void 0 === a && (a = null);
		for (var b = null, c = null, d = this.qc.i; d.next();) {
			var e = d.value;
			e.Z !== this || null !== a && e.Hh !== a || (e = e.W, null !== b ? b.add(e) : null !== c && c !== e ? (b = new I(T), b.add(c), b.add(e)) : c = e)
		}
		return null !== b ? b.i : null !== c ? new va(c) : ua
	};
	T.prototype.findLinksBetween = function(a, b, c) {
		void 0 === b && (b = null);
		void 0 === c && (c = null);
		var d = new za(this.qc),
			e = this;
		d.pq = function(d) {
			return (d.W !== e || d.Z !== a || null !== b && d.Ng !== b || null !== c && d.Hh !== c) && (d.W !== a || d.Z !== e || null !== c && d.Ng !== c || null !== b && d.Hh !== b) ? !1 : !0
		};
		return d
	};
	T.prototype.findLinksTo = function(a, b, c) {
		void 0 === b && (b = null);
		void 0 === c && (c = null);
		var d = new za(this.qc),
			e = this;
		d.pq = function(d) {
			return d.W !== e || d.Z !== a || null !== b && d.Ng !== b || null !== c && d.Hh === c ? !1 : !0
		};
		return d
	};
	w.defineProperty(T, {
		LI: "linkConnected"
	}, function() {
		return this.ds
	}, function(a) {
		var b = this.ds;
		b !== a && (null !== a && w.j(a, "function", T, "linkConnected"), this.ds = a, this.h("linkConnected", b, a))
	});
	w.defineProperty(T, {
		MI: "linkDisconnected"
	}, function() {
		return this.es
	}, function(a) {
		var b = this.es;
		b !== a && (null !== a && w.j(a, "function", T, "linkDisconnected"), this.es = a, this.h("linkDisconnected", b, a))
	});
	w.defineProperty(T, {
		Sx: "linkValidation"
	}, function() {
		return this.ul
	}, function(a) {
		var b = this.ul;
		b !== a && (null !== a && w.j(a, "function", T, "linkValidation"), this.ul = a, this.h("linkValidation", b, a))
	});

	function wr(a, b, c) {
		vr(a, c);
		var d = a.qc.contains(b);
		d || a.qc.add(b);
		if (!d || b.W === b.Z) {
			var e = a.LI;
			if (null !== e) {
				var f = !0,
					h = a.g;
				null !== h && (f = h.Ta, h.Ta = !0);
				e(a, b, c);
				null !== h && (h.Ta = f)
			}
		}!d && b.bc && (c = b.W, b = b.Z, null !== c && null !== b && c !== b && (d = !0, h = a.g, null !== h && (d = h.Ud), a = d ? b : c, e = d ? c : b, a.vk || (a.vk = e), !e.zj || null !== h && h.ja.lb || (d ? c === e && (e.zj = !1) : b === e && (e.zj = !1))))
	}

	function xr(a, b, c) {
		vr(a, c);
		var d = a.qc.remove(b);
		if (d || b.Z === b.W) {
			var e = a.MI,
				f = a.g;
			if (null !== e) {
				var h = !0;
				null !== f && (h = f.Ta, f.Ta = !0);
				e(a, b, c);
				null !== f && (f.Ta = h)
			}
		}
		d && b.bc && (c = !0, null !== f && (c = f.Ud), a = c ? b.Z : b.W, b = c ? b.W : b.Z, null !== a && (a.vk = !1), null === b || b.zj || (0 === b.qc.count ? (b.vk = null, null !== f && f.ja.lb || (b.zj = !0)) : Cn(b)))
	}

	function Cn(a) {
		a.vk = !1;
		if (0 !== a.qc.count) {
			var b = !0,
				c = a.g;
			if (null === c || !c.ja.lb) {
				null !== c && (b = c.Ud);
				for (c = a.qc.i; c.next();) {
					var d = c.value;
					if (d.bc)
						if (b) {
							if (d.W === a) {
								a.zj = !1;
								return
							}
						} else if (d.Z === a) {
						a.zj = !1;
						return
					}
				}
				a.zj = !0
			}
		}
	}
	T.prototype.updateRelationshipsFromData = function() {
		R.prototype.updateRelationshipsFromData.call(this);
		var a = this.data;
		if (null !== a) {
			var b = this.g;
			if (null !== b) {
				var c = b.$;
				c instanceof $f && (a = c.An(a), a = b.Ke(a), c = this.Gk(), a !== c && (c = this.wn(), null !== a ? null !== c ? b.Ud ? c.W = a : c.Z = a : fn(b, a, this) : null !== c && Vm(b, c, !1)))
			}
		}
	};
	T.prototype.ju = function(a) {
		R.prototype.ju.call(this, a);
		a || (Cn(this), a = this.Ro, null !== a && yr(a, this))
	};
	T.prototype.ku = function(a) {
		R.prototype.ku.call(this, a);
		a || (a = this.Ro, null !== a && null !== a.wf && (a.wf.remove(this), a.H()))
	};
	T.prototype.un = function() {
		if (0 < this.qc.count) {
			var a = this.g;
			if (null !== a)
				for (var b = a.pb.TE, c = this.qc.copy().i; c.next();) {
					var d = c.value;
					b ? a.remove(d) : (d.W === this && (d.W = null), d.Z === this && (d.Z = null))
				}
		}
		this.Wb = null;
		R.prototype.un.call(this)
	};
	w.u(T, {
		Cf: "isLinkLabel"
	}, function() {
		return null !== this.Ro
	});
	w.defineProperty(T, {
		Wb: "labeledLink"
	}, function() {
		return this.Ro
	}, function(a) {
		var b = this.Ro;
		if (b !== a) {
			var c = this.g,
				d = this.data;
			if (null !== b) {
				null !== b.wf && (b.wf.remove(this), b.H());
				if (null !== c && null !== d && !c.ja.lb) {
					var e = b.data,
						f = c.$;
					if (null !== e && f instanceof Q) {
						var h = f.qb(d);
						void 0 !== h && f.qJ(e, h)
					}
				}
				this.Da = null
			}
			this.Ro = a;
			null !== a && (yr(a, this), null === c || null === d || c.ja.lb || (e = a.data, f = c.$, null !== e && f instanceof Q && (h = f.qb(d), void 0 !== h && f.vE(e, h))), this.Da = a.Da);
			Ro(this);
			this.h("labeledLink", b, a)
		}
	});
	T.prototype.findPort = T.prototype.yA = function(a) {
		if (null === this.oe) {
			if ("" === a && !1 === this.Kk) return this;
			Yo(this)
		}
		var b = this.oe.ka(a);
		return null !== b || "" !== a && (b = this.oe.ka(""), null !== b) ? b : this
	};
	w.u(T, {
		port: "port"
	}, function() {
		return this.yA("")
	});
	w.u(T, {
		ports: "ports"
	}, function() {
		null === this.oe && Yo(this);
		return this.oe.JF
	});

	function Yo(a) {
		null === a.oe ? a.oe = new ma("string", G) : a.oe.clear();
		$o(a, a, function(a, c) {
			var d = c.Vd;
			null !== d && a.oe.add(d, c)
		});
		0 === a.oe.count && a.oe.add("", a)
	}

	function Xo(a, b, c) {
		var d = b.Vd;
		if (null !== d && (null !== a.oe && a.oe.remove(d), b = a.g, null !== b && c)) {
			c = null;
			for (d = a.ZE(d); d.next();) a = d.value, null === c && (c = w.cb()), c.push(a);
			if (null !== c) {
				for (d = 0; d < c.length; d++) a = c[d], b.remove(a);
				w.ta(c)
			}
		}
	}
	T.prototype.isInTreeOf = function(a) {
		if (null === a || a === this) return !1;
		var b = !0,
			c = this.g;
		null !== c && (b = c.Ud);
		c = this;
		if (b)
			for (; c !== a;) {
				for (var b = null, d = c.qc.i; d.next();) {
					var e = d.value;
					if (e.bc && (b = e.W, b !== c && b !== this)) break
				}
				if (b === this || null === b || b === c) return !1;
				c = b
			} else
				for (; c !== a;) {
					b = null;
					for (d = c.qc.i; d.next() && (e = d.value, !e.bc || (b = e.Z, b === c || b === this)););
					if (b === this || null === b || b === c) return !1;
					c = b
				}
		return !0
	};
	T.prototype.findTreeRoot = function() {
		var a = !0,
			b = this.g;
		null !== b && (a = b.Ud);
		b = this;
		if (a)
			for (;;) {
				for (var a = null, c = b.qc.i; c.next();) {
					var d = c.value;
					if (d.bc && (a = d.W, a !== b && a !== this)) break
				}
				if (a === this) return this;
				if (null === a || a === b) return b;
				b = a
			} else
				for (;;) {
					a = null;
					for (c = b.qc.i; c.next() && (d = c.value, !d.bc || (a = d.Z, a === b || a === this)););
					if (a === this) return this;
					if (null === a || a === b) return b;
					b = a
				}
	};
	T.prototype.findCommonTreeParent = function(a) {
		if (null === a) return null;
		if (this === a) return this;
		for (var b = this; null !== b;) jr(b, !0), b = b.Gk();
		for (var c = null, b = a; null !== b;) {
			if (0 !== (b.O & 1048576)) {
				c = b;
				break
			}
			b = b.Gk()
		}
		for (b = this; null !== b;) jr(b, !1), b = b.Gk();
		return c
	};
	T.prototype.findTreeParentLink = T.prototype.wn = function() {
		var a = !0,
			b = this.g;
		null !== b && (a = b.Ud);
		b = this.qc.i;
		if (a)
			for (; b.next();) {
				if (a = b.value, a.bc && a.W !== this) return a
			} else
				for (; b.next();)
					if (a = b.value, a.bc && a.Z !== this) return a;
		return null
	};
	T.prototype.findTreeParentNode = T.prototype.Gk = function() {
		var a = this.vk;
		if (null === a) return null;
		if (a instanceof T) return a;
		var b = !0,
			a = this.g;
		null !== a && (b = a.Ud);
		a = this.qc.i;
		if (b)
			for (; a.next();) {
				if (b = a.value, b.bc && (b = b.W, b !== this)) return this.vk = b
			} else
				for (; a.next();)
					if (b = a.value, b.bc && (b = b.Z, b !== this)) return this.vk = b;
		return this.vk = null
	};
	T.prototype.findTreeParentChain = function() {
		function a(b, d) {
			if (null !== b) {
				d.add(b);
				var e = b.wn();
				null !== e && (d.add(e), a(b.Gk(), d))
			}
		}
		var b = new I(R);
		a(this, b);
		return b
	};
	T.prototype.findTreeLevel = function() {
		return zr(this, this)
	};

	function zr(a, b) {
		var c = b.Gk();
		return null === c ? 0 : 1 + zr(a, c)
	}
	T.prototype.findTreeChildrenLinks = T.prototype.Bx = function() {
		var a = !0,
			b = this.g;
		null !== b && (a = b.Ud);
		var b = new za(this.qc),
			c = this;
		b.pq = a ? function(a) {
			return a.bc && a.W === c ? !0 : !1
		} : function(a) {
			return a.bc && a.Z === c ? !0 : !1
		};
		return b
	};
	T.prototype.findTreeChildrenNodes = T.prototype.dF = function() {
		var a = !0,
			b = this.g;
		null !== b && (a = b.Ud);
		var c = b = null,
			d = this.qc.i;
		if (a)
			for (; d.next();) a = d.value, a.bc && a.W === this && (a = a.Z, null !== b ? b.add(a) : null !== c && c !== a ? (b = new H(T), b.add(c), b.add(a)) : c = a);
		else
			for (; d.next();) a = d.value, a.bc && a.Z === this && (a = a.W, null !== b ? b.add(a) : null !== c && c !== a ? (b = new H(T), b.add(c), b.add(a)) : c = a);
		return null !== b ? b.i : null !== c ? new va(c) : ua
	};
	T.prototype.findTreeParts = function(a) {
		void 0 === a && (a = Infinity);
		w.j(a, "number", T, "findTreeParts:level");
		var b = new I(R);
		jh(b, this, !1, a, !0);
		return b
	};
	T.prototype.collapseTree = T.prototype.collapseTree = function(a) {
		void 0 === a && (a = 1);
		w.zd(a, T, "collapseTree:level");
		1 > a && (a = 1);
		var b = this.g;
		if (null !== b && !b.xh) {
			b.xh = !0;
			var c = new I(T);
			c.add(this);
			Ar(this, c, b.Ud, a, b.Ka, this, b.PB === vl);
			b.xh = !1
		}
	};

	function Ar(a, b, c, d, e, f, h) {
		if (1 < d)
			for (var k = c ? a.zx() : a.Mg(); k.next();) {
				var l = k.value;
				l.bc && (l = l.DA(a), null === l || l === a || b.contains(l) || (b.add(l), Ar(l, b, c, d - 1, e, f, h)))
			} else Br(a, b, c, e, f, h)
	}

	function Br(a, b, c, d, e, f) {
		for (var h = e === a ? !0 : a.uc, k = c ? a.zx() : a.Mg(); k.next();) {
			var l = k.value;
			l.bc && (l = l.DA(a), null === l || l === a || b.contains(l) || (b.add(l), h && (f && hl(d, l, e), l.Lk(), l.Cd(!1)), l.uc && (l.Eq = l.uc, Br(l, b, c, d, e, f))))
		}
		a.uc = !1
	}
	T.prototype.expandTree = T.prototype.expandTree = function(a) {
		void 0 === a && (a = 2);
		w.zd(a, T, "expandTree:level");
		2 > a && (a = 2);
		var b = this.g;
		if (null !== b && !b.xh) {
			b.xh = !0;
			var c = new I(T);
			c.add(this);
			Cr(this, c, b.Ud, a, b.Ka, this, b.PB === vl);
			b.xh = !1
		}
	};

	function Cr(a, b, c, d, e, f, h) {
		for (var k = f === a ? !1 : a.uc, l = c ? a.zx() : a.Mg(); l.next();) {
			var m = l.value;
			m.bc && (k || m.Mf || m.Vb(), m = m.DA(a), null !== m && m !== a && !b.contains(m) && (b.add(m), k || (m.Cd(!0), m.Lk(), h && gl(e, m, f)), 2 < d || m.Eq)) && (m.Eq = !1, Cr(m, b, c, d - 1, e, f, h))
		}
		a.uc = !0
	}
	w.defineProperty(T, {
		uc: "isTreeExpanded"
	}, function() {
		return 0 !== (this.ya & 1)
	}, function(a) {
		var b = 0 !== (this.ya & 1);
		if (b !== a) {
			this.ya ^= 1;
			var c = this.g;
			this.h("isTreeExpanded", b, a);
			b = this.XJ;
			if (null !== b) {
				var d = !0;
				null !== c && (d = c.Ta, c.Ta = !0);
				b(this);
				null !== c && (c.Ta = d)
			}
			null !== c && c.ja.lb ? this.Cd(a) : a ? this.expandTree() : this.collapseTree()
		}
	});
	w.defineProperty(T, {
		Eq: "wasTreeExpanded"
	}, function() {
		return 0 !== (this.ya & 2)
	}, function(a) {
		var b = 0 !== (this.ya & 2);
		b !== a && (this.ya ^= 2, this.h("wasTreeExpanded", b, a))
	});
	w.defineProperty(T, {
		XJ: "treeExpandedChanged"
	}, function() {
		return this.yt
	}, function(a) {
		var b = this.yt;
		b !== a && (null !== a && w.j(a, "function", T, "treeExpandedChanged"), this.yt = a, this.h("treeExpandedChanged", b, a))
	});
	w.defineProperty(T, {
		zj: "isTreeLeaf"
	}, function() {
		return 0 !== (this.ya & 4)
	}, function(a) {
		var b = 0 !== (this.ya & 4);
		b !== a && (this.ya ^= 4, this.h("isTreeLeaf", b, a))
	});

	function W() {
		R.call(this, ij);
		this.Zb = 8;
		this.rg = null;
		this.Qh = "";
		this.Hg = this.Er = null;
		this.ki = "";
		this.xt = null;
		this.Lq = lj;
		this.fr = 0;
		this.ir = lj;
		this.jr = NaN;
		this.Wm = Dr;
		this.mt = .5;
		this.wf = null;
		this.hd = (new H(y)).freeze();
		this.Zg = this.LC = this.FC = this.xi = this.Ki = this.Ua = this.Aw = this.ip = this.Ve = null;
		this.Tz = new y;
		this.V = this.aE = this.$D = null
	}
	w.La(W, R);
	w.ga("Link", W);
	W.prototype.cloneProtected = function(a) {
		R.prototype.cloneProtected.call(this, a);
		a.Zb = this.Zb & -113;
		a.Qh = this.Qh;
		a.Er = this.Er;
		a.ki = this.ki;
		a.xt = this.xt;
		a.Lq = this.Lq;
		a.fr = this.fr;
		a.ir = this.ir;
		a.jr = this.jr;
		a.Wm = this.Wm;
		a.mt = this.mt;
		null !== this.V && (a.V = this.V.copy())
	};
	W.prototype.ni = function(a) {
		R.prototype.ni.call(this, a);
		this.Qh = a.Qh;
		this.ki = a.ki;
		a.Ve = null;
		a.Vb();
		a.xi = this.xi
	};
	W.prototype.ic = function(a) {
		a.Ge === W ? 2 === (a.value & 2) ? this.ny = a : a === Kj || a === kj || a === jj ? this.Ze = a : a === Er || a === Fr || a === Gr ? this.Ht = a : a !== Dr && a !== lj && w.k("Unknown Link enum value for a Link property: " + a) : R.prototype.ic.call(this, a)
	};
	var Dr;
	W.Normal = Dr = w.p(W, "Normal", 1);
	W.Orthogonal = w.p(W, "Orthogonal", 2);
	W.AvoidsNodes = w.p(W, "AvoidsNodes", 6);
	var Hr;
	W.AvoidsNodesStraight = Hr = w.p(W, "AvoidsNodesStraight", 7);
	var lj;
	W.None = lj = w.p(W, "None", 0);
	var Kj;
	W.Bezier = Kj = w.p(W, "Bezier", 9);
	var kj;
	W.JumpGap = kj = w.p(W, "JumpGap", 10);
	var jj;
	W.JumpOver = jj = w.p(W, "JumpOver", 11);
	var Er;
	W.End = Er = w.p(W, "End", 17);
	var Fr;
	W.Scale = Fr = w.p(W, "Scale", 18);
	var Gr;
	W.Stretch = Gr = w.p(W, "Stretch", 19);
	var pq;
	W.OrientAlong = pq = w.p(W, "OrientAlong", 21);
	var Rp;
	W.OrientPlus90 = Rp = w.p(W, "OrientPlus90", 22);
	var Tp;
	W.OrientMinus90 = Tp = w.p(W, "OrientMinus90", 23);
	var Ir;
	W.OrientOpposite = Ir = w.p(W, "OrientOpposite", 24);
	var Jr;
	W.OrientUpright = Jr = w.p(W, "OrientUpright", 25);
	var Sp;
	W.OrientPlus90Upright = Sp = w.p(W, "OrientPlus90Upright", 26);
	var Up;
	W.OrientMinus90Upright = Up = w.p(W, "OrientMinus90Upright", 27);
	var Vp;
	W.OrientUpright45 = Vp = w.p(W, "OrientUpright45", 28);
	g = W.prototype;
	g.Qd = function() {
		null === this.V && (this.V = new wo)
	};
	g.bm = function() {
		var a = this.W;
		if (null !== a) {
			var b = a.findVisibleNode();
			null !== b && (a = b);
			if (Fm(a) || Gm(a)) return !1
		}
		a = this.Z;
		return null !== a && (b = a.findVisibleNode(), null !== b && (a = b), Fm(a) || Gm(a)) ? !1 : !0
	};
	g.AB = function() {
		return !1
	};
	g.BB = function() {};
	g.fe = function() {
		return !1
	};
	W.prototype.computeAngle = function(a, b, c) {
		return W.computeAngle(b, c)
	};
	W.computeAngle = function(a, b) {
		var c = 0;
		switch (a) {
			default:
				case lj:
				c = 0;
			break;
			case pq:
					c = b;
				break;
			case Rp:
					c = b + 90;
				break;
			case Tp:
					c = b - 90;
				break;
			case Ir:
					c = b + 180;
				break;
			case Jr:
					c = ye(b);90 < c && 270 > c && (c -= 180);
				break;
			case Sp:
					c = ye(b + 90);90 < c && 270 > c && (c -= 180);
				break;
			case Up:
					c = ye(b - 90);90 < c && 270 > c && (c -= 180);
				break;
			case Vp:
					c = ye(b);
				if (45 < c && 135 > c || 225 < c && 315 > c) return 0;90 < c && 270 > c && (c -= 180)
		}
		return ye(c)
	};
	w.defineProperty(W, {
		W: "fromNode"
	}, function() {
		return this.rg
	}, function(a) {
		var b = this.rg;
		if (b !== a) {
			var c = this.lc;
			null !== b && (this.Hg !== b && xr(b, this, c), Kr(this), this.J(Wm));
			this.rg = a;
			null !== a && this.Cd(a.isVisible());
			this.Ki = null;
			this.Vb();
			var d = this.g;
			if (null !== d) {
				var e = this.data,
					f = d.$;
				if (null !== e)
					if (f instanceof Q) {
						var h = null !== a ? a.data : null;
						f.wB(e, f.qb(h))
					} else f instanceof $f && (h = null !== a ? a.data : null, d.Ud ? f.ri(e, f.qb(h)) : (null !== b && f.ri(b.data, void 0), f.ri(h, f.qb(null !== this.Hg ? this.Hg.data : null))))
			}
			e =
				this.lc;
			f = this.gF;
			null !== f && (h = !0, null !== d && (h = d.Ta, d.Ta = !0), f(this, c, e), null !== d && (d.Ta = h));
			null !== a && (this.Hg !== a && wr(a, this, e), Lr(this), this.J(Nm));
			this.h("fromNode", b, a);
			rn(this)
		}
	});
	w.defineProperty(W, {
		Ng: "fromPortId"
	}, function() {
		return this.Qh
	}, function(a) {
		var b = this.Qh;
		if (b !== a) {
			var c = this.W,
				d = this.lc;
			null !== d && vr(c, d);
			Kr(this);
			this.Qh = a;
			var e = this.lc;
			null !== e && vr(c, e);
			c = this.g;
			if (null !== c) {
				var f = this.data,
					h = c.$;
				null !== f && h instanceof Q && h.xB(f, a)
			}
			d !== e && (this.Ki = null, this.Vb(), f = this.gF, null !== f && (h = !0, null !== c && (h = c.Ta, c.Ta = !0), f(this, d, e), null !== c && (c.Ta = h)));
			Lr(this);
			this.h("fromPortId", b, a)
		}
	});
	w.u(W, {
		lc: "fromPort"
	}, function() {
		var a = this.rg;
		return null === a ? null : a.yA(this.Qh)
	});
	w.defineProperty(W, {
		gF: "fromPortChanged"
	}, function() {
		return this.Er
	}, function(a) {
		var b = this.Er;
		b !== a && (null !== a && w.j(a, "function", W, "fromPortChanged"), this.Er = a, this.h("fromPortChanged", b, a))
	});
	w.defineProperty(W, {
		Z: "toNode"
	}, function() {
		return this.Hg
	}, function(a) {
		var b = this.Hg;
		if (b !== a) {
			var c = this.Ic;
			null !== b && (this.rg !== b && xr(b, this, c), Kr(this), this.J(Wm));
			this.Hg = a;
			null !== a && this.Cd(a.isVisible());
			this.Ki = null;
			this.Vb();
			var d = this.g;
			if (null !== d) {
				var e = this.data,
					f = d.$;
				if (null !== e)
					if (f instanceof Q) {
						var h = null !== a ? a.data : null;
						f.CB(e, f.qb(h))
					} else f instanceof $f && (h = null !== a ? a.data : null, d.Ud ? (null !== b && f.ri(b.data, void 0), f.ri(h, f.qb(null !== this.rg ? this.rg.data : null))) : f.ri(e, f.qb(h)))
			}
			e =
				this.Ic;
			f = this.BG;
			null !== f && (h = !0, null !== d && (h = d.Ta, d.Ta = !0), f(this, c, e), null !== d && (d.Ta = h));
			null !== a && (this.rg !== a && wr(a, this, e), Lr(this), this.J(Nm));
			this.h("toNode", b, a);
			rn(this)
		}
	});
	w.defineProperty(W, {
		Hh: "toPortId"
	}, function() {
		return this.ki
	}, function(a) {
		var b = this.ki;
		if (b !== a) {
			var c = this.Z,
				d = this.Ic;
			null !== d && vr(c, d);
			Kr(this);
			this.ki = a;
			var e = this.Ic;
			null !== e && vr(c, e);
			c = this.g;
			if (null !== c) {
				var f = this.data,
					h = c.$;
				null !== f && h instanceof Q && h.DB(f, a)
			}
			d !== e && (this.Ki = null, this.Vb(), f = this.BG, null !== f && (h = !0, null !== c && (h = c.Ta, c.Ta = !0), f(this, d, e), null !== c && (c.Ta = h)));
			Lr(this);
			this.h("toPortId", b, a)
		}
	});
	w.u(W, {
		Ic: "toPort"
	}, function() {
		var a = this.Hg;
		return null === a ? null : a.yA(this.ki)
	});
	w.defineProperty(W, {
		BG: "toPortChanged"
	}, function() {
		return this.xt
	}, function(a) {
		var b = this.xt;
		b !== a && (null !== a && w.j(a, "function", W, "toPortChanged"), this.xt = a, this.h("toPortChanged", b, a))
	});
	w.defineProperty(W, {
		Ab: "fromSpot"
	}, function() {
		return null !== this.V ? this.V.Wj : qc
	}, function(a) {
		this.Qd();
		var b = this.V.Wj;
		b.L(a) || (a = a.S(), this.V.Wj = a, this.h("fromSpot", b, a), this.Vb())
	});
	w.defineProperty(W, {
		Ul: "fromEndSegmentLength"
	}, function() {
		return null !== this.V ? this.V.Uj : NaN
	}, function(a) {
		this.Qd();
		var b = this.V.Uj;
		b !== a && (0 > a && w.Fa(a, ">= 0", W, "fromEndSegmentLength"), this.V.Uj = a, this.h("fromEndSegmentLength", b, a), this.Vb())
	});
	w.defineProperty(W, {
		du: "fromEndSegmentDirection"
	}, function() {
		return null !== this.V ? this.V.Tj : qr
	}, function(a) {
		this.Qd();
		var b = this.V.Tj;
		b !== a && (w.Qt("Link.fromEndSegmentDirection", "2.0"), this.V.Tj = a, this.h("fromEndSegmentDirection", b, a), this.Vb())
	});
	w.defineProperty(W, {
		eu: "fromShortLength"
	}, function() {
		return null !== this.V ? this.V.Vj : NaN
	}, function(a) {
		this.Qd();
		var b = this.V.Vj;
		b !== a && (this.V.Vj = a, this.h("fromShortLength", b, a), this.Vb())
	});
	w.defineProperty(W, {
		Bb: "toSpot"
	}, function() {
		return null !== this.V ? this.V.uk : qc
	}, function(a) {
		this.Qd();
		var b = this.V.uk;
		b.L(a) || (a = a.S(), this.V.uk = a, this.h("toSpot", b, a), this.Vb())
	});
	w.defineProperty(W, {
		nm: "toEndSegmentLength"
	}, function() {
		return null !== this.V ? this.V.sk : NaN
	}, function(a) {
		this.Qd();
		var b = this.V.sk;
		b !== a && (0 > a && w.Fa(a, ">= 0", W, "toEndSegmentLength"), this.V.sk = a, this.h("toEndSegmentLength", b, a), this.Vb())
	});
	w.defineProperty(W, {
		av: "toEndSegmentDirection"
	}, function() {
		return null !== this.V ? this.V.rk : qr
	}, function(a) {
		this.Qd();
		var b = this.V.rk;
		b !== a && (w.Qt("Link.toEndSegmentDirection", "2.0"), this.V.rk = a, this.h("toEndSegmentDirection", b, a), this.Vb())
	});
	w.defineProperty(W, {
		bv: "toShortLength"
	}, function() {
		return null !== this.V ? this.V.tk : NaN
	}, function(a) {
		this.Qd();
		var b = this.V.tk;
		b !== a && (this.V.tk = a, this.h("toShortLength", b, a), this.Vb())
	});

	function rn(a) {
		var b = a.W,
			c = a.Z,
			d = null,
			b = d = null !== b ? null !== c ? b.VH(c) : b.Da : null !== c ? c.Da : null,
			c = a.fl;
		if (c !== b) {
			null !== c && kr(c, a);
			a.fl = b;
			null !== b && lr(b, a);
			var e = a.KE;
			if (null !== e) {
				var f = !0,
					h = a.g;
				null !== h && (f = h.Ta, h.Ta = !0);
				e(a, c, b);
				null !== h && (h.Ta = f)
			}!a.Mf || a.$D !== c && a.aE !== c || a.Vb()
		}
		if (a.zI)
			for (a = a.Ef; a.next();) a.value.Da = d
	}
	W.prototype.Lk = function() {
		var a = this.Da;
		null !== a && this.W !== a && this.Z !== a && a.lx && R.prototype.Lk.call(this)
	};
	W.prototype.getOtherNode = W.prototype.DA = function(a) {
		var b = this.W;
		return a === b ? this.Z : b
	};
	W.prototype.getOtherPort = function(a) {
		var b = this.lc;
		return a === b ? this.Ic : b
	};
	w.u(W, {
		zI: "isLabeledLink"
	}, function() {
		return null === this.wf ? !1 : 0 < this.wf.count
	});
	w.u(W, {
		Ef: "labelNodes"
	}, function() {
		return null === this.wf ? ua : this.wf.i
	});

	function yr(a, b) {
		null === a.wf && (a.wf = new I(T));
		a.wf.add(b);
		a.H()
	}
	W.prototype.ju = function(a) {
		R.prototype.ju.call(this, a);
		Mr(this) && mj(this, this.Y);
		if (!a) {
			a = this.rg;
			var b = null;
			null !== a && (b = this.lc, wr(a, this, b));
			var c = this.Hg,
				d = null;
			null !== c && (d = this.Ic, c === a && d === b || wr(c, this, d));
			Lr(this)
		}
	};
	W.prototype.ku = function(a) {
		R.prototype.ku.call(this, a);
		Mr(this) && mj(this, this.Y);
		if (!a) {
			a = this.rg;
			var b = null;
			null !== a && (b = this.lc, xr(a, this, b));
			var c = this.Hg,
				d = null;
			null !== c && (d = this.Ic, c === a && d === b || xr(c, this, d));
			Kr(this)
		}
	};
	W.prototype.un = function() {
		this.Mf = !0;
		if (null !== this.wf) {
			var a = this.g;
			if (null !== a)
				for (var b = this.wf.copy().i; b.next();) a.remove(b.value)
		}
		b = this.data;
		null !== b && (a = this.g, null !== a && (a = a.$, a instanceof Q ? a.ky(b) : a instanceof $f && a.ri(b, void 0)))
	};
	W.prototype.updateRelationshipsFromData = function() {
		var a = this.data;
		if (null !== a) {
			var b = this.g;
			if (null !== b) {
				var c = b.$;
				if (c instanceof Q) {
					var d = c.Wl(a);
					this.W = d = b.Ke(d);
					d = c.Xl(a);
					this.Z = d = b.Ke(d);
					a = c.Ik(a);
					if (0 < a.length || 0 < this.Ef.count) {
						if (1 === a.length && 1 === this.Ef.count) {
							var d = a[0],
								e = this.Ef.first();
							if (c.qb(e.data) === d) return
						}
						var d = (new I).Nc(a),
							f = new I;
						this.Ef.each(function(a) {
							null !== a.data && (a = c.qb(a.data), void 0 !== a && f.add(a))
						});
						a = f.copy();
						a.jy(d);
						d = d.copy();
						d.jy(f);
						if (0 < a.count || 0 < d.count) {
							var h =
								this;
							a.each(function(a) {
								a = b.Ke(a);
								null !== a && a.Wb === h && (a.Wb = null)
							});
							d.each(function(a) {
								a = b.Ke(a);
								null !== a && a.Wb !== h && (a.Wb = h)
							})
						}
					}
				}
			}
		}
	};
	W.prototype.move = function(a) {
		var b = this.position,
			c = b.x;
		isNaN(c) && (c = 0);
		b = b.y;
		isNaN(b) && (b = 0);
		c = a.x - c;
		b = a.y - b;
		R.prototype.move.call(this, a);
		this.Nk(c, b);
		for (a = this.Ef; a.next();) {
			var d = a.value,
				e = d.position;
			d.moveTo(e.x + c, e.y + b)
		}
	};
	w.defineProperty(W, {
		oJ: "relinkableFrom"
	}, function() {
		return 0 !== (this.Zb & 1)
	}, function(a) {
		var b = 0 !== (this.Zb & 1);
		b !== a && (this.Zb ^= 1, this.h("relinkableFrom", b, a), this.ee())
	});
	w.defineProperty(W, {
		pJ: "relinkableTo"
	}, function() {
		return 0 !== (this.Zb & 2)
	}, function(a) {
		var b = 0 !== (this.Zb & 2);
		b !== a && (this.Zb ^= 2, this.h("relinkableTo", b, a), this.ee())
	});
	W.prototype.canRelinkFrom = function() {
		if (!this.oJ) return !1;
		var a = this.layer;
		if (null === a) return !0;
		if (!a.jn) return !1;
		a = a.g;
		return null === a || a.jn ? !0 : !1
	};
	W.prototype.canRelinkTo = function() {
		if (!this.pJ) return !1;
		var a = this.layer;
		if (null === a) return !0;
		if (!a.jn) return !1;
		a = a.g;
		return null === a || a.jn ? !0 : !1
	};
	w.defineProperty(W, {
		Qu: "resegmentable"
	}, function() {
		return 0 !== (this.Zb & 4)
	}, function(a) {
		var b = 0 !== (this.Zb & 4);
		b !== a && (this.Zb ^= 4, this.h("resegmentable", b, a), this.ee())
	});
	w.defineProperty(W, {
		bc: "isTreeLink"
	}, function() {
		return 0 !== (this.Zb & 8)
	}, function(a) {
		var b = 0 !== (this.Zb & 8);
		b !== a && (this.Zb ^= 8, this.h("isTreeLink", b, a), null !== this.W && Cn(this.W), null !== this.Z && Cn(this.Z))
	});
	w.u(W, {
		path: "path"
	}, function() {
		var a = this.Ad();
		return a instanceof X ? a : null
	});
	w.u(W, {
		Vn: "routeBounds"
	}, function() {
		this.ao();
		var a = new B;
		var b = Infinity,
			c = Infinity,
			d = this.qa;
		if (0 === d) a.m(NaN, NaN, 0, 0);
		else {
			if (1 === d) d = this.l(0), b = Math.min(d.x, b), c = Math.min(d.y, c), a.m(d.x, d.y, 0, 0);
			else if (2 === d) {
				var e = this.l(0),
					f = this.l(1),
					b = Math.min(e.x, f.x),
					c = Math.min(e.y, f.y);
				a.m(e.x, e.y, 0, 0);
				a.vi(f)
			} else if (this.computeCurve() === Kj && 3 <= d && !this.ac)
				if (e = this.l(0), b = e.x, c = e.y, a.m(b, c, 0, 0), 3 === d) d = this.l(1), b = Math.min(d.x, b), c = Math.min(d.y, c), f = this.l(2), b = Math.min(f.x, b), c = Math.min(f.y, c), Wd(e.x,
					e.y, d.x, d.y, d.x, d.y, f.x, f.y, .5, a);
				else
					for (var h = 3; h < d; h += 3) {
						var k = this.l(h - 2);
						h + 3 >= d && (h = d - 1);
						var l = this.l(h - 1),
							f = this.l(h);
						Wd(e.x, e.y, k.x, k.y, l.x, l.y, f.x, f.y, .5, a);
						b = Math.min(f.x, b);
						c = Math.min(f.y, c);
						e = f
					} else
						for (e = this.l(0), f = this.l(1), b = Math.min(e.x, f.x), c = Math.min(e.y, f.y), a.m(e.x, e.y, 0, 0), a.vi(f), h = 2; h < d; h++) e = this.l(h), b = Math.min(e.x, b), c = Math.min(e.y, c), a.vi(e);
			this.Tz.m(b - a.x, c - a.y)
		}
		return this.Aw = a
	});
	w.u(W, {
		PF: "midPoint"
	}, function() {
		this.ao();
		return this.computeMidPoint(new y)
	});
	W.prototype.computeMidPoint = function(a) {
		var b = this.qa;
		if (0 === b) return a.assign(Fd), a;
		if (1 === b) return a.assign(this.l(0)), a;
		if (2 === b) {
			var c = this.l(0),
				d = this.l(1);
			a.m((c.x + d.x) / 2, (c.y + d.y) / 2);
			return a
		}
		if (this.computeCurve() === Kj && 3 <= b && !this.ac) {
			if (3 === b) return this.l(1);
			var c = (b - 1) / 3 | 0,
				e = 3 * (c / 2 | 0);
			if (1 === c % 2) {
				var c = this.l(e),
					d = this.l(e + 1),
					f = this.l(e + 2),
					e = this.l(e + 3),
					b = d.x,
					h = d.y,
					d = f.x,
					k = f.y,
					f = (b + d) / 2,
					l = (h + k) / 2,
					h = ((c.y + h) / 2 + l) / 2,
					k = (l + (k + e.y) / 2) / 2;
				a.x = (((c.x + b) / 2 + f) / 2 + (f + (d + e.x) / 2) / 2) / 2;
				a.y = (h + k) / 2
			} else a.assign(this.l(e));
			return a
		}
		e = 0;
		f = w.cb();
		for (h = 0; h < b - 1; h++) c = 0, c = this.l(h), d = this.l(h + 1), Wa(c.x, d.x) ? (c = d.y - c.y, 0 > c && (c = -c)) : Wa(c.y, d.y) ? (c = d.x - c.x, 0 > c && (c = -c)) : c = Math.sqrt(c.Bf(d)), f.push(c), e += c;
		for (d = h = c = 0; c < e / 2 && h < b;) {
			d = f[h];
			if (c + d > e / 2) break;
			c += d;
			h++
		}
		w.ta(f);
		b = this.l(h);
		f = this.l(h + 1);
		b.x === f.x ? b.y > f.y ? a.m(b.x, b.y - (e / 2 - c)) : a.m(b.x, b.y + (e / 2 - c)) : b.y === f.y ? b.x > f.x ? a.m(b.x - (e / 2 - c), b.y) : a.m(b.x + (e / 2 - c), b.y) : (c = (e / 2 - c) / d, a.m(b.x + c * (f.x - b.x), b.y + c * (f.y - b.y)));
		return a
	};
	w.u(W, {
		OF: "midAngle"
	}, function() {
		this.ao();
		return this.computeMidAngle()
	});
	W.prototype.computeMidAngle = function() {
		var a = this.qa;
		if (2 > a) return NaN;
		if (this.computeCurve() === Kj && 4 <= a && !this.ac) {
			var b = (a - 1) / 3 | 0,
				c = 3 * (b / 2 | 0);
			if (1 === b % 2) {
				var c = Math.floor(c),
					b = this.l(c),
					d = this.l(c + 1),
					a = this.l(c + 2),
					c = this.l(c + 3),
					e = d.x,
					d = d.y,
					f = a.x,
					a = a.y,
					h = (e + f) / 2,
					k = (d + a) / 2;
				return Ta(((b.x + e) / 2 + h) / 2, ((b.y + d) / 2 + k) / 2, (h + (f + c.x) / 2) / 2, (k + (a + c.y) / 2) / 2)
			}
			if (0 < c && c + 1 < a) return b = this.l(c - 1), d = this.l(c + 1), b.Pb(d)
		}
		c = a / 2 | 0;
		if (0 === a % 2) return b = this.l(c - 1), d = this.l(c), 4 <= a && b.Oc(d) ? (b = this.l(c - 2), a = this.l(c + 1),
			c = b.Bf(d), e = d.Bf(a), c > e + 10 ? b.Pb(d) : e > c + 10 ? d.Pb(a) : b.Pb(a)) : null === this.Ua || this.ac ? b.Pb(d) : this.Ua.hF(.5);
		if (null !== this.Ua && !this.ac) return this.Ua.hF(.5);
		b = this.l(c - 1);
		d = this.l(c);
		a = this.l(c + 1);
		c = b.Bf(d);
		e = d.Bf(a);
		return c > e + 10 ? b.Pb(d) : e > c + 10 ? d.Pb(a) : b.Pb(a)
	};
	w.defineProperty(W, {
		points: "points"
	}, function() {
		return this.hd
	}, function(a) {
		var b = this.hd;
		if (b !== a) {
			var c = null;
			if (Array.isArray(a)) {
				var d = 0 === a.length % 2;
				if (d)
					for (var e = 0; e < a.length; e++)
						if ("number" !== typeof a[e] || isNaN(a[e])) {
							d = !1;
							break
						}
				if (d)
					for (c = new H(y), d = 0; d < a.length / 2; d++) e = (new y(a[2 * d], a[2 * d + 1])).freeze(), c.add(e);
				else {
					e = !0;
					for (d = 0; d < a.length; d++) {
						var f = a[d];
						if (!w.Pa(f) || "number" !== typeof f.x || isNaN(f.x) || "number" !== typeof f.y || isNaN(f.y)) {
							e = !1;
							break
						}
					}
					if (e)
						for (c = new H(y), d = 0; d < a.length; d++) e =
							a[d], c.add((new y(e.x, e.y)).freeze());
					else w.k("Link.points array must contain only an even number of numbers or objects with x and y properties, not: " + a)
				}
			} else if (a instanceof H)
				for (c = a.copy(), a = c.i; a.next();) a.value.freeze();
			else w.k("Link.points value is not an instance of List or Array: " + a);
			c.freeze();
			this.hd = c;
			this.Me();
			this.H();
			Nr(this);
			a = this.g;
			null !== a && (a.Fn || a.ja.lb || a.Tx.add(this), a.Ka.rc && (this.ip = c));
			this.h("points", b, c)
		}
	});
	w.u(W, {
		qa: "pointsCount"
	}, function() {
		return this.hd.count
	});
	W.prototype.getPoint = W.prototype.l = function(a) {
		return this.hd.n[a]
	};
	W.prototype.setPoint = W.prototype.Vg = function(a, b) {
		null === this.Ve && w.k("Call Link.startRoute before modifying the points of the route.");
		this.hd.kg(a, b)
	};
	W.prototype.setPointAt = W.prototype.ca = function(a, b, c) {
		null === this.Ve && w.k("Call Link.startRoute before modifying the points of the route.");
		this.hd.kg(a, new y(b, c))
	};
	W.prototype.insertPoint = function(a, b) {
		null === this.Ve && w.k("Call Link.startRoute before modifying the points of the route.");
		this.hd.Rd(a, b)
	};
	W.prototype.insertPointAt = W.prototype.w = function(a, b, c) {
		null === this.Ve && w.k("Call Link.startRoute before modifying the points of the route.");
		this.hd.Rd(a, new y(b, c))
	};
	W.prototype.addPoint = W.prototype.li = function(a) {
		null === this.Ve && w.k("Call Link.startRoute before modifying the points of the route.");
		this.hd.add(a)
	};
	W.prototype.addPointAt = W.prototype.lj = function(a, b) {
		null === this.Ve && w.k("Call Link.startRoute before modifying the points of the route.");
		this.hd.add(new y(a, b))
	};
	W.prototype.removePoint = W.prototype.bG = function(a) {
		null === this.Ve && w.k("Call Link.startRoute before modifying the points of the route.");
		this.hd.dd(a)
	};
	W.prototype.clearPoints = W.prototype.Hp = function() {
		null === this.Ve && w.k("Call Link.startRoute before modifying the points of the route.");
		this.hd.clear()
	};
	W.prototype.movePoints = W.prototype.Nk = function(a, b) {
		if (0 !== a || 0 !== b) {
			for (var c = this.Mf, d = new H(y), e = this.hd.i; e.next();) {
				var f = e.value;
				d.add((new y(f.x + a, f.y + b)).freeze())
			}
			d.freeze();
			e = this.hd;
			this.hd = d;
			this.H();
			c && Nr(this);
			c = this.g;
			null !== c && c.Ka.rc && (this.ip = d);
			this.h("points", e, d)
		}
	};
	W.prototype.startRoute = W.prototype.jm = function() {
		null === this.Ve && (this.Ve = this.hd, this.hd = this.hd.copy())
	};
	W.prototype.commitRoute = W.prototype.nj = function() {
		if (null !== this.Ve) {
			for (var a = this.Ve, b = this.hd, c = Infinity, d = Infinity, e = a.n, f = e.length, h = 0; h < f; h++) var k = e[h],
				c = Math.min(k.x, c),
				d = Math.min(k.y, d);
			for (var l = Infinity, m = Infinity, n = b.n, p = n.length, h = 0; h < p; h++) k = n[h], l = Math.min(k.x, l), m = Math.min(k.y, m), k.freeze();
			b.freeze();
			if (p === f)
				for (h = 0; h < p; h++) {
					if (f = e[h], k = n[h], f.x - c !== k.x - l || f.y - d !== k.y - m) {
						this.H();
						this.Me();
						break
					}
				} else this.H(), this.Me();
			this.Ve = null;
			c = this.g;
			null !== c && c.Ka.rc && (this.ip = b);
			Nr(this);
			this.h("points", a, b)
		}
	};
	W.prototype.rollbackRoute = W.prototype.vJ = function() {
		null !== this.Ve && (this.hd = this.Ve, this.Ve = null)
	};

	function Nr(a) {
		0 === a.hd.count ? a.Mf = !1 : (a.Mf = !0, a.Mp = a.l(0), a.Np = a.l(a.qa - 1), Or(a, !1))
	}
	W.prototype.invalidateRoute = W.prototype.Vb = function() {
		if (!this.si) {
			var a = this.g;
			a && (a.Tx.contains(this) || a.ja.lb || a.Ka.FI && !a.Ka.cf) || (a = this.path, null !== a && (this.Mf = !1, this.H(), a.H()))
		}
	};
	w.defineProperty(W, {
		Mf: null
	}, function() {
		return 0 !== (this.Zb & 16)
	}, function(a) {
		0 !== (this.Zb & 16) !== a && (this.Zb ^= 16)
	});
	w.defineProperty(W, {
		si: "suspendsRouting"
	}, function() {
		return 0 !== (this.Zb & 32)
	}, function(a) {
		0 !== (this.Zb & 32) !== a && (this.Zb ^= 32)
	});
	w.defineProperty(W, {
		jA: null
	}, function() {
		return 0 !== (this.Zb & 64)
	}, function(a) {
		0 !== (this.Zb & 64) !== a && (this.Zb ^= 64)
	});
	w.defineProperty(W, {
		Mp: "defaultFromPoint"
	}, function() {
		return this.FC
	}, function(a) {
		this.FC = a.copy()
	});
	w.defineProperty(W, {
		Np: "defaultToPoint"
	}, function() {
		return this.LC
	}, function(a) {
		this.LC = a.copy()
	});
	W.prototype.updateRoute = W.prototype.ao = function() {
		if (!this.Mf && !this.jA) {
			var a = !0;
			try {
				this.jA = !0, this.jm(), a = this.computePoints()
			} finally {
				this.jA = !1, a ? this.nj() : this.vJ()
			}
		}
	};
	W.prototype.computePoints = function() {
		var a = this.g;
		if (null === a) return !1;
		var b = this.W,
			c = null;
		null === b ? (a.zl || (a.Xs = new X, a.Xs.Ca = rd, a.Xs.mb = 0, a.zl = new T, a.zl.add(a.Xs), a.zl.$e()), this.Mp && (a.zl.position = a.zl.location = this.Mp, a.zl.$e(), b = a.zl, c = a.Xs)) : c = this.lc;
		if (null !== c && !b.isVisible()) {
			var d = b.findVisibleNode();
			null !== d && d !== b ? (b = d, c = d.port) : b = d
		}
		this.$D = b;
		if (null === b || !b.location.I()) return !1;
		for (; !(null === c || c.Y.I() && c.Aj());) c = c.Q;
		if (null === c) return !1;
		var e = this.Z,
			f = null;
		null === e ? (a.Al || (a.Ys =
			new X, a.Ys.Ca = rd, a.Ys.mb = 0, a.Al = new T, a.Al.add(a.Ys), a.Al.$e()), this.Np && (a.Al.position = a.Al.location = this.Np, a.Al.$e(), e = a.Al, f = a.Ys)) : f = this.Ic;
		null === f || e.isVisible() || (a = e.findVisibleNode(), null !== a && a !== e ? (e = a, f = a.port) : e = a);
		this.aE = e;
		if (null === e || !e.location.I()) return !1;
		for (; !(null === f || f.Y.I() && f.Aj());) f = f.Q;
		if (null === f) return !1;
		var h = this.qa,
			d = this.computeSpot(!0, c),
			a = this.computeSpot(!1, f),
			k = d === yb,
			l = a === yb,
			m = c === f && null !== c,
			n = this.ac,
			p = this.Ze === Kj;
		this.Ki = m && !n ? p = !0 : !1;
		var q = this.Ht ===
			lj || m;
		if (!n && !m && k && l) {
			if (k = !1, !q && 3 <= h && (q = this.getLinkPoint(b, c, d, !0, !1, e, f), l = this.getLinkPoint(e, f, a, !1, !1, b, c), k = this.adjustPoints(0, q, h - 1, l)) && (q = this.getLinkPoint(b, c, d, !0, !1, e, f), l = this.getLinkPoint(e, f, a, !1, !1, b, c), this.adjustPoints(0, q, h - 1, l)), !k)
				if (this.Hp(), p) {
					var h = this.getLinkPoint(b, c, d, !0, !1, e, f),
						q = this.getLinkPoint(e, f, a, !1, !1, b, c),
						k = q.x - h.x,
						l = q.y - h.y,
						m = this.computeCurviness(),
						p = n = 0,
						r = h.x + k / 3,
						s = h.y + l / 3,
						u = r,
						t = s;
					J(l, 0) ? t = 0 < k ? t - m : t + m : (n = -k / l, p = Math.sqrt(m * m / (n * n + 1)), 0 > m && (p = -p), u = (0 >
						l ? -1 : 1) * p + r, t = n * (u - r) + s);
					var r = h.x + 2 * k / 3,
						s = h.y + 2 * l / 3,
						x = r,
						v = s;
					J(l, 0) ? v = 0 < k ? v - m : v + m : (x = (0 > l ? -1 : 1) * p + r, v = n * (x - r) + s);
					this.Hp();
					this.li(h);
					this.lj(u, t);
					this.lj(x, v);
					this.li(q);
					this.Vg(0, this.getLinkPoint(b, c, d, !0, !1, e, f));
					this.Vg(3, this.getLinkPoint(e, f, a, !1, !1, b, c))
				} else d = this.getLinkPoint(b, c, d, !0, !1, e, f), a = this.getLinkPoint(e, f, a, !1, !1, b, c), this.hasCurviness() ? (q = a.x - d.x, e = a.y - d.y, f = this.computeCurviness(), b = d.x + q / 2, c = d.y + e / 2, h = b, k = c, J(e, 0) ? k = 0 < q ? k - f : k + f : (q = -q / e, h = Math.sqrt(f * f / (q * q + 1)), 0 > f && (h = -h),
					h = (0 > e ? -1 : 1) * h + b, k = q * (h - b) + c), this.li(d), this.lj(h, k)) : this.li(d), this.li(a)
		} else {
			p = this.Zl;
			q && (n && p || m) && this.Hp();
			var z = m ? this.computeCurviness() : 0,
				p = this.getLinkPoint(b, c, d, !0, n, e, f),
				r = u = s = 0;
			if (n || !k || m)
				if (t = this.computeEndSegmentLength(b, c, d, !0), r = this.getLinkDirection(b, c, p, d, !0, n, e, f), m && (k || d.L(a) || !n && 1 === d.x + a.x && 1 === d.y + a.y) && (r -= n ? 90 : 30, 0 > z && (r -= 180)), 0 > r ? r += 360 : 360 <= r && (r -= 360), m && (t += Math.abs(z) * (n ? 1 : 2)), 0 === r ? s = t : 90 === r ? u = t : 180 === r ? s = -t : 270 === r ? u = -t : (s = t * Math.cos(r * Math.PI / 180), u = t *
						Math.sin(r * Math.PI / 180)), d.Td() && m) {
					var A = c.Wa(Jb, w.K()),
						L = w.xb(A.x + 1E3 * s, A.y + 1E3 * u);
					this.getLinkPointFromPoint(b, c, A, L, !0, p);
					w.v(A);
					w.v(L)
				}
			var t = this.getLinkPoint(e, f, a, !1, n, b, c),
				E = v = x = 0;
			if (n || !l || m) A = this.computeEndSegmentLength(e, f, a, !1), E = this.getLinkDirection(e, f, t, a, !1, n, b, c), m && (l || d.L(a) || !n && 1 === d.x + a.x && 1 === d.y + a.y) && (E += n ? 0 : 30, 0 > z && (E += 180)), 0 > E ? E += 360 : 360 <= E && (E -= 360), m && (A += Math.abs(z) * (n ? 1 : 2)), 0 === E ? x = A : 90 === E ? v = A : 180 === E ? x = -A : 270 === E ? v = -A : (x = A * Math.cos(E * Math.PI / 180), v = A * Math.sin(E *
				Math.PI / 180)), a.Td() && m && (A = f.Wa(Jb, w.K()), L = w.xb(A.x + 1E3 * x, A.y + 1E3 * v), this.getLinkPointFromPoint(e, f, A, L, !1, t), w.v(A), w.v(L));
			a = p;
			if (n || !k || m) a = new y(p.x + s, p.y + u);
			d = t;
			if (n || !l || m) d = new y(t.x + x, t.y + v);
			!q && !n && k && 3 < h && this.adjustPoints(0, p, h - 2, d) ? this.Vg(h - 1, t) : !q && !n && l && 3 < h && this.adjustPoints(1, a, h - 1, t) ? this.Vg(0, p) : !q && (n ? 6 <= h : 4 < h) && this.adjustPoints(1, a, h - 2, d) ? (this.Vg(0, p), this.Vg(h - 1, t)) : (this.Hp(), this.li(p), (n || !k || m) && this.li(a), n && this.addOrthoPoints(a, r, d, E, b, e), (n || !l || m) && this.li(d), this.li(t))
		}
		return !0
	};

	function Pr(a, b) {
		Math.abs(b.x - a.x) > Math.abs(b.y - a.y) ? (b.x = b.x >= a.x ? a.x + 9E9 : a.x - 9E9, b.y = a.y) : (b.y = b.y >= a.y ? a.y + 9E9 : a.y - 9E9, b.x = a.x);
		return b
	}
	W.prototype.getLinkPointFromPoint = function(a, b, c, d, e, f) {
		void 0 === f && (f = new y);
		if (null === a || null === b) return f.assign(c), f;
		a.isVisible() || (e = a.findVisibleNode(), null !== e && e !== a && (b = e.port));
		var h = e = 0,
			k = 0,
			l = 0;
		a = null;
		e = b.Q;
		null === e || e.Yg() || (e = e.Q);
		if (null === e) e = d.x, h = d.y, k = c.x, l = c.y;
		else {
			a = e.ph;
			e = 1 / (a.m11 * a.m22 - a.m12 * a.m21);
			var k = a.m22 * e,
				l = -a.m12 * e,
				m = -a.m21 * e,
				n = a.m11 * e,
				p = e * (a.m21 * a.dy - a.m22 * a.dx),
				q = e * (a.m12 * a.dx - a.m11 * a.dy);
			e = d.x * k + d.y * m + p;
			h = d.x * l + d.y * n + q;
			k = c.x * k + c.y * m + p;
			l = c.x * l + c.y * n + q
		}
		b.zn(e, h, k, l,
			f);
		null !== a && f.transform(a);
		return f
	};

	function Qr(a, b) {
		var c = b.Ns;
		null === c && (c = new Rr, c.port = b, c.Qc = b.U, b.Ns = c);
		return Sr(c, a)
	}
	W.prototype.getLinkPoint = function(a, b, c, d, e, f, h, k) {
		void 0 === k && (k = new y);
		if (c.$c()) return b.Wa(c, k), k;
		if (c.xj()) {
			var l = Qr(this, b);
			if (null !== l) {
				k.assign(l.gq);
				if (e && this.ny === Hr) {
					var m = Qr(this, h);
					if (null !== m && l.sn < m.sn) {
						var l = w.K(),
							m = w.K(),
							n = new B(b.Wa(zb, l), b.Wa(Sb, m)),
							p = this.computeSpot(!d, h);
						a = this.getLinkPoint(f, h, p, !d, e, a, b, m);
						(c.vj(Yb) || c.vj(Zb)) && a.y >= n.y && a.y <= n.y + n.height ? k.y = a.y : (c.vj(Xb) || c.vj($b)) && a.x >= n.x && a.x <= n.x + n.width && (k.x = a.x);
						w.v(l);
						w.v(m)
					}
				}
				return k
			}
		}
		c = b.Wa(Jb, w.K());
		l = f = null;
		this.qa > (e ? 6 : 2) ? (l = d ? this.l(1) : this.l(this.qa - 2), e && (l = Pr(c, l.copy()))) : (f = w.K(), l = h.Wa(Jb, f), e && (l = Pr(c, l)), w.v(f));
		this.getLinkPointFromPoint(a, b, c, l, d, k);
		w.v(c);
		return k
	};
	W.prototype.getLinkDirection = function(a, b, c, d, e, f, h, k) {
		a: if (d.$c()) c = d.x > d.y ? d.x > 1 - d.y ? 0 : d.x < 1 - d.y ? 270 : 315 : d.x < d.y ? d.x > 1 - d.y ? 90 : d.x < 1 - d.y ? 180 : 135 : .5 > d.x ? 225 : .5 < d.x ? 45 : 0;
			else {
				if (d.xj()) {
					var l = Qr(this, b);
					if (null !== l) switch (l.ye) {
						case w.od:
							c = 270;
							break a;
						case w.Tc:
							c = 180;
							break a;
						default:
						case w.fd:
							c = 0;
							break a;
						case w.ed:
							c = 90;
							break a
					}
				}
				var l = b.Wa(Jb, w.K()),
					m = null,
					n = null;
				this.qa > (f ? 6 : 2) ? (n = e ? this.l(1) : this.l(this.qa - 2), n = f ? Pr(l, n.copy()) : c) : (m = w.K(), n = k.Wa(Jb, m), w.v(m));
				c = 0;
				c = Math.abs(n.x - l.x) > Math.abs(n.y -
					l.y) ? n.x >= l.x ? 0 : 180 : n.y >= l.y ? 90 : 270;
				w.v(l)
			}d.Td() && h.oi(a) && (c += 180, 360 <= c && (c -= 360));a = qr;a = e ? this.du : this.av;a === qr && (a = e ? b.du : b.av);
		switch (a) {
			case rr:
				b = b.Vl();
				c += b;
				360 <= c && (c -= 360);
				break;
			case qr:
			case xo:
				if (d.CI()) break;
				b = b.Vl();
				if (0 === b) break;
				45 <= b && 135 > b ? c += 90 : 135 <= b && 225 > b ? c += 180 : 225 <= b && 315 > b && (c += 270);
				360 <= c && (c -= 360)
		}
		return c
	};
	W.prototype.computeEndSegmentLength = function(a, b, c, d) {
		if (null !== b && c.xj() && (a = Qr(this, b), null !== a)) return a.vx;
		a = NaN;
		a = d ? this.Ul : this.nm;
		null !== b && isNaN(a) && (a = d ? b.Ul : b.nm);
		isNaN(a) && (a = 10);
		return a
	};
	W.prototype.computeSpot = function(a, b) {
		var c;
		if (a)
			if (c = b ? b : this.lc, null === c) c = Jb;
			else {
				var d = this.Ab;
				d.Zc() && null !== c && (d = c.Ab);
				c = d === qc ? yb : d
			}
		else c = b ? b : this.Ic, null === c ? c = Jb : (d = this.Bb, d.Zc() && null !== c && (d = c.Bb), c = d === qc ? yb : d);
		return c
	};
	W.prototype.computeOtherPoint = function(a, b) {
		var c = b.Wa(Jb),
			d;
		d = b.Ns;
		d = null !== d ? Sr(d, this) : null;
		null !== d && (c = d.gq);
		return c
	};
	W.prototype.computeShortLength = function(a) {
		if (a) {
			if (a = this.eu, isNaN(a)) {
				var b = this.lc;
				null !== b && (a = b.eu)
			}
		} else a = this.bv, isNaN(a) && (b = this.Ic, null !== b && (a = b.bv));
		return isNaN(a) ? 0 : a
	};
	W.prototype.Fk = function(a, b, c, d, e, f) {
		if (!1 === this.Ug) return !1;
		void 0 === b && (b = null);
		void 0 === c && (c = null);
		var h = f;
		void 0 === f && (h = w.Wg(), h.reset());
		h.multiply(this.transform);
		if (this.pn(a, h)) return aq(this, b, c, e), void 0 === f && w.af(h), !0;
		if (this.Zf(a, h)) {
			var k = !1;
			if (!this.En)
				for (var l = this.xa.n, m = l.length; m--;) {
					var n = l[m];
					if (n.visible || n === this.bg) {
						var p = n.Y,
							q = this.Ja;
						if (!(p.x > q.width || p.y > q.height || 0 > p.x + p.width || 0 > p.y + p.height)) {
							p = w.Wg();
							p.set(h);
							if (n instanceof C) k = n.Fk(a, b, c, d, e, p);
							else if (this.path ===
								n) {
								if (n instanceof X) {
									var k = n,
										r = a,
										s = d,
										q = p;
									if (!1 === k.Ug) k = !1;
									else if (q.multiply(k.transform), s) b: {
										var u = r,
											t = q;
										if (k.pn(u, t)) k = !0;
										else {
											if (void 0 === t && (t = k.transform, u.Ak(k.Y))) {
												k = !0;
												break b
											}
											var q = u.left,
												r = u.right,
												s = u.top,
												u = u.bottom,
												x = w.K(),
												v = w.K(),
												z = w.K(),
												A = w.Wg();
											A.set(t);
											A.RF(k.transform);
											A.NA();
											v.x = r;
											v.y = s;
											v.transform(A);
											x.x = q;
											x.y = s;
											x.transform(A);
											t = !1;
											mq(k, x, v, z) ? t = !0 : (x.x = r, x.y = u, x.transform(A), mq(k, x, v, z) ? t = !0 : (v.x = q, v.y = u, v.transform(A), mq(k, x, v, z) ? t = !0 : (x.x = q, x.y = s, x.transform(A), mq(k, x, v, z) &&
												(t = !0))));
											w.af(A);
											w.v(x);
											w.v(v);
											w.v(z);
											k = t
										}
									}
									else k = k.pn(r, q)
								}
							} else k = Do(n, a, d, p);
							k && (null !== b && (n = b(n)), n && (null === c || c(n)) && (e instanceof I && e.add(n), e instanceof H && e.add(n)));
							w.af(p)
						}
					}
				}
			void 0 === f && w.af(h);
			return k || null !== this.background || null !== this.kn
		}
		void 0 === f && w.af(h);
		return !1
	};
	w.u(W, {
		ac: "isOrthogonal"
	}, function() {
		return 2 === (this.Wm.value & 2)
	});
	w.u(W, {
		Zl: "isAvoiding"
	}, function() {
		return 4 === (this.Wm.value & 4)
	});
	W.prototype.computeCurve = function() {
		if (null === this.Ki) {
			var a = this.lc,
				b = this.ac;
			this.Ki = null !== a && a === this.Ic && !b
		}
		return this.Ki ? Kj : this.Ze
	};
	W.prototype.computeCorner = function() {
		if (this.Ze === Kj) return 0;
		var a = this.pA;
		if (isNaN(a) || 0 > a) a = 10;
		return a
	};
	W.prototype.findMidLabel = function() {
		for (var a = this.path, b = this.xa.n, c = b.length, d = 0; d < c; d++) {
			var e = b[d];
			if (e !== a && !e.ef && (-Infinity === e.Oe || isNaN(e.Oe))) return e
		}
		for (a = this.Ef; a.next();)
			if (b = a.value, -Infinity === b.Oe || isNaN(b.Oe)) return b;
		return null
	};
	W.prototype.computeSpacing = function() {
		if (!this.isVisible()) return 0;
		var a;
		a = Math.max(14, this.computeThickness());
		var b = this.lc,
			c = this.Ic;
		if (null !== b && null !== c) {
			var d = this.findMidLabel();
			if (null !== d) {
				var e = d.Ja,
					f = d.margin,
					h = isNaN(e.width) ? 30 : e.width * d.scale + f.left + f.right,
					e = isNaN(e.height) ? 14 : e.height * d.scale + f.top + f.bottom,
					d = d.wq;
				d === pq || d === Jr || d === Ir ? a = Math.max(a, e) : d === Tp || d === Up || d === Rp || d === Sp ? a = Math.max(a, h) : (b = b.Wa(Jb).Pb(c.Wa(Jb)) / 180 * Math.PI, a = Math.max(a, Math.abs(Math.sin(b) * h) + Math.abs(Math.cos(b) *
					e) + 1));
				this.Ze === Kj && (a *= 1.333)
			}
		}
		return a
	};
	W.prototype.arrangeBundledLinks = function(a, b) {
		if (b)
			for (var c = 0; c < a.length; c++) a[c].Vb()
	};
	W.prototype.computeCurviness = function() {
		var a = this.px;
		if (isNaN(a)) {
			var a = 16,
				b = this.xi;
			if (null !== b) {
				for (var c = w.cb(), d = 0, e = b.links, f = 0; f < e.length; f++) {
					var h = e[f],
						h = h.computeSpacing();
					c.push(h);
					d += h
				}
				d = -d / 2;
				for (f = 0; f < e.length; f++) {
					h = e[f];
					if (h === this) {
						a = d + c[f] / 2;
						break
					}
					d += c[f]
				}
				b.jq === this.W && (a = -a);
				w.ta(c)
			}
		}
		return a
	};
	W.prototype.computeThickness = function() {
		if (!this.isVisible()) return 0;
		var a = this.path;
		return null !== a ? Math.max(a.mb, 1) : 1
	};
	W.prototype.hasCurviness = function() {
		return !isNaN(this.px) || null !== this.xi
	};
	W.prototype.adjustPoints = function(a, b, c, d) {
		var e = this.Ht;
		if (this.ac) {
			if (e === Fr) return !1;
			e === Gr && (e = Er)
		}
		switch (e) {
			case Fr:
				var f = this.l(a),
					h = this.l(c);
				if (!f.Oc(b) || !h.Oc(d)) {
					var e = f.x,
						f = f.y,
						k = h.x - e,
						l = h.y - f,
						m = Math.sqrt(k * k + l * l);
					if (!Wa(m, 0)) {
						var n = 0;
						Wa(k, 0) ? n = 0 > l ? -Math.PI / 2 : Math.PI / 2 : (n = Math.atan(l / Math.abs(k)), 0 > k && (n = Math.PI - n));
						var h = b.x,
							p = b.y,
							l = d.x - h,
							q = d.y - p,
							r = Math.sqrt(l * l + q * q),
							k = 0;
						Wa(l, 0) ? k = 0 > q ? -Math.PI / 2 : Math.PI / 2 : (k = Math.atan(q / Math.abs(l)), 0 > l && (k = Math.PI - k));
						m = r / m;
						n = k - n;
						this.Vg(a, b);
						for (a +=
							1; a < c; a++) b = this.l(a), k = b.x - e, l = b.y - f, b = Math.sqrt(k * k + l * l), Wa(b, 0) || (q = 0, Wa(k, 0) ? q = 0 > l ? -Math.PI / 2 : Math.PI / 2 : (q = Math.atan(l / Math.abs(k)), 0 > k && (q = Math.PI - q)), k = q + n, b *= m, this.ca(a, h + b * Math.cos(k), p + b * Math.sin(k)));
						this.Vg(c, d)
					}
				}
				return !0;
			case Gr:
				f = this.l(a);
				p = this.l(c);
				if (!f.Oc(b) || !p.Oc(d)) {
					var e = f.x,
						f = f.y,
						h = p.x,
						p = p.y,
						m = (h - e) * (h - e) + (p - f) * (p - f),
						k = b.x,
						n = b.y,
						l = d.x,
						q = d.y,
						r = 0,
						s = 1;
					0 !== l - k ? (r = (q - n) / (l - k), s = Math.sqrt(1 + 1 / (r * r))) : r = 9E9;
					this.Vg(a, b);
					for (a += 1; a < c; a++) {
						b = this.l(a);
						var u = b.x,
							t = b.y,
							x = .5;
						0 !== m && (x =
							((e - u) * (e - h) + (f - t) * (f - p)) / m);
						var v = e + x * (h - e),
							z = f + x * (p - f);
						b = Math.sqrt((u - v) * (u - v) + (t - z) * (t - z));
						t < r * (u - v) + z && (b = -b);
						0 < r && (b = -b);
						u = k + x * (l - k);
						x = n + x * (q - n);
						0 !== r ? (b = u + b / s, this.ca(a, b, x - (b - u) / r)) : this.ca(a, u, x + b)
					}
					this.Vg(c, d)
				}
				return !0;
			case Er:
				a: {
					if (this.ac && (e = this.l(a), f = this.l(a + 1), h = this.l(a + 2), k = f.x, n = f.y, p = k, m = n, J(e.y, f.y) ? J(f.x, h.x) ? n = b.y : J(f.y, h.y) && (k = b.x) : J(e.x, f.x) && (J(f.y, h.y) ? k = b.x : J(f.x, h.x) && (n = b.y)), this.ca(a + 1, k, n), e = this.l(c), f = this.l(c - 1), h = this.l(c - 2), k = f.x, n = f.y, l = k, q = n, J(e.y, f.y) ? J(f.x,
							h.x) ? n = d.y : J(f.y, h.y) && (k = d.x) : J(e.x, f.x) && (J(f.y, h.y) ? k = d.x : J(f.x, h.x) && (n = d.y)), this.ca(c - 1, k, n), Bi(this))) {
						this.ca(a + 1, p, m);
						this.ca(c - 1, l, q);
						c = !1;
						break a
					}
					this.Vg(a, b);this.Vg(c, d);c = !0
				}
				return c;
			default:
				return !1
		}
	};
	W.prototype.addOrthoPoints = function(a, b, c, d, e, f) {
		b = -45 <= b && 45 > b ? 0 : 45 <= b && 135 > b ? 90 : 135 <= b && 225 > b ? 180 : 270;
		d = -45 <= d && 45 > d ? 0 : 45 <= d && 135 > d ? 90 : 135 <= d && 225 > d ? 180 : 270;
		var h = e.Y.copy(),
			k = f.Y.copy();
		if (h.I() && k.I()) {
			h.Yf(8, 8);
			k.Yf(8, 8);
			h.vi(a);
			k.vi(c);
			var l, m;
			if (0 === b)
				if (c.x > a.x || 270 === d && c.y < a.y && k.right > a.x || 90 === d && c.y > a.y && k.right > a.x) l = new y(c.x, a.y), m = new y(c.x, (a.y + c.y) / 2), 180 === d ? (l.x = this.computeMidOrthoPosition(a.x, c.x, !1), m.x = l.x, m.y = c.y) : 270 === d && c.y < a.y || 90 === d && c.y > a.y ? (l.x = a.x < k.left ? this.computeMidOrthoPosition(a.x,
					k.left, !1) : a.x < k.right && (270 === d && a.y < k.top || 90 === d && a.y > k.bottom) ? this.computeMidOrthoPosition(a.x, c.x, !1) : k.right, m.x = l.x, m.y = c.y) : 0 === d && a.x < k.left && a.y > k.top && a.y < k.bottom && (l.x = a.x, l.y = a.y < c.y ? Math.min(c.y, k.top) : Math.max(c.y, k.bottom), m.y = l.y);
				else {
					l = new y(a.x, c.y);
					m = new y((a.x + c.x) / 2, c.y);
					if (180 === d || 90 === d && c.y < h.top || 270 === d && c.y > h.bottom) 180 === d && (k.Ia(a) || h.Ia(c)) ? l.y = this.computeMidOrthoPosition(a.y, c.y, !0) : c.y < a.y && (180 === d || 90 === d) ? l.y = this.computeMidOrthoPosition(h.top, Math.max(c.y,
						k.bottom), !0) : c.y > a.y && (180 === d || 270 === d) && (l.y = this.computeMidOrthoPosition(h.bottom, Math.min(c.y, k.top), !0)), m.x = c.x, m.y = l.y;
					if (l.y > h.top && l.y < h.bottom)
						if (c.x >= h.left && c.x <= a.x || a.x <= k.right && a.x >= c.x) {
							if (90 === d || 270 === d) l = new y(Math.max((a.x + c.x) / 2, a.x), a.y), m = new y(l.x, c.y)
						} else l.y = 270 === d || (0 === d || 180 === d) && c.y < a.y ? Math.min(c.y, 0 === d ? h.top : Math.min(h.top, k.top)) : Math.max(c.y, 0 === d ? h.bottom : Math.max(h.bottom, k.bottom)), m.x = c.x, m.y = l.y
				}
			else if (180 === b)
				if (c.x < a.x || 270 === d && c.y < a.y && k.left < a.x ||
					90 === d && c.y > a.y && k.left < a.x) l = new y(c.x, a.y), m = new y(c.x, (a.y + c.y) / 2), 0 === d ? (l.x = this.computeMidOrthoPosition(a.x, c.x, !1), m.x = l.x, m.y = c.y) : 270 === d && c.y < a.y || 90 === d && c.y > a.y ? (l.x = a.x > k.right ? this.computeMidOrthoPosition(a.x, k.right, !1) : a.x > k.left && (270 === d && a.y < k.top || 90 === d && a.y > k.bottom) ? this.computeMidOrthoPosition(a.x, c.x, !1) : k.left, m.x = l.x, m.y = c.y) : 180 === d && a.x > k.right && a.y > k.top && a.y < k.bottom && (l.x = a.x, l.y = a.y < c.y ? Math.min(c.y, k.top) : Math.max(c.y, k.bottom), m.y = l.y);
				else {
					l = new y(a.x, c.y);
					m = new y((a.x +
						c.x) / 2, c.y);
					if (0 === d || 90 === d && c.y < h.top || 270 === d && c.y > h.bottom) 0 === d && (k.Ia(a) || h.Ia(c)) ? l.y = this.computeMidOrthoPosition(a.y, c.y, !0) : c.y < a.y && (0 === d || 90 === d) ? l.y = this.computeMidOrthoPosition(h.top, Math.max(c.y, k.bottom), !0) : c.y > a.y && (0 === d || 270 === d) && (l.y = this.computeMidOrthoPosition(h.bottom, Math.min(c.y, k.top), !0)), m.x = c.x, m.y = l.y;
					if (l.y > h.top && l.y < h.bottom)
						if (c.x <= h.right && c.x >= a.x || a.x >= k.left && a.x <= c.x) {
							if (90 === d || 270 === d) l = new y(Math.min((a.x + c.x) / 2, a.x), a.y), m = new y(l.x, c.y)
						} else l.y = 270 ===
							d || (0 === d || 180 === d) && c.y < a.y ? Math.min(c.y, 180 === d ? h.top : Math.min(h.top, k.top)) : Math.max(c.y, 180 === d ? h.bottom : Math.max(h.bottom, k.bottom)), m.x = c.x, m.y = l.y
				}
			else if (90 === b)
				if (c.y > a.y || 180 === d && c.x < a.x && k.bottom > a.y || 0 === d && c.x > a.x && k.bottom > a.y) l = new y(a.x, c.y), m = new y((a.x + c.x) / 2, c.y), 270 === d ? (l.y = this.computeMidOrthoPosition(a.y, c.y, !0), m.x = c.x, m.y = l.y) : 180 === d && c.x < a.x || 0 === d && c.x > a.x ? (l.y = a.y < k.top ? this.computeMidOrthoPosition(a.y, k.top, !0) : a.y < k.bottom && (180 === d && a.x < k.left || 0 === d && a.x > k.right) ?
					this.computeMidOrthoPosition(a.y, c.y, !0) : k.bottom, m.x = c.x, m.y = l.y) : 90 === d && a.y < k.top && a.x > k.left && a.x < k.right && (l.x = a.x < c.x ? Math.min(c.x, k.left) : Math.max(c.x, k.right), l.y = a.y, m.x = l.x);
				else {
					l = new y(c.x, a.y);
					m = new y(c.x, (a.y + c.y) / 2);
					if (270 === d || 0 === d && c.x < h.left || 180 === d && c.x > h.right) 270 === d && (k.Ia(a) || h.Ia(c)) ? l.x = this.computeMidOrthoPosition(a.x, c.x, !1) : c.x < a.x && (270 === d || 0 === d) ? l.x = this.computeMidOrthoPosition(h.left, Math.max(c.x, k.right), !1) : c.x > a.x && (270 === d || 180 === d) && (l.x = this.computeMidOrthoPosition(h.right,
						Math.min(c.x, k.left), !1)), m.x = l.x, m.y = c.y;
					if (l.x > h.left && l.x < h.right)
						if (c.y >= h.top && c.y <= a.y || a.y <= k.bottom && a.y >= c.y) {
							if (0 === d || 180 === d) l = new y(a.x, Math.max((a.y + c.y) / 2, a.y)), m = new y(c.x, l.y)
						} else l.x = 180 === d || (90 === d || 270 === d) && c.x < a.x ? Math.min(c.x, 90 === d ? h.left : Math.min(h.left, k.left)) : Math.max(c.x, 90 === d ? h.right : Math.max(h.right, k.right)), m.x = l.x, m.y = c.y
				}
			else if (c.y < a.y || 180 === d && c.x < a.x && k.top < a.y || 0 === d && c.x > a.x && k.top < a.y) l = new y(a.x, c.y), m = new y((a.x + c.x) / 2, c.y), 90 === d ? (l.y = this.computeMidOrthoPosition(a.y,
				c.y, !0), m.x = c.x, m.y = l.y) : 180 === d && c.x < a.x || 0 === d && c.x >= a.x ? (l.y = a.y > k.bottom ? this.computeMidOrthoPosition(a.y, k.bottom, !0) : a.y > k.top && (180 === d && a.x < k.left || 0 === d && a.x > k.right) ? this.computeMidOrthoPosition(a.y, c.y, !0) : k.top, m.x = c.x, m.y = l.y) : 270 === d && a.y > k.bottom && a.x > k.left && a.x < k.right && (l.x = a.x < c.x ? Math.min(c.x, k.left) : Math.max(c.x, k.right), l.y = a.y, m.x = l.x);
			else {
				l = new y(c.x, a.y);
				m = new y(c.x, (a.y + c.y) / 2);
				if (90 === d || 0 === d && c.x < h.left || 180 === d && c.x > h.right) 90 === d && (k.Ia(a) || h.Ia(c)) ? l.x = this.computeMidOrthoPosition(a.x,
					c.x, !1) : c.x < a.x && (90 === d || 0 === d) ? l.x = this.computeMidOrthoPosition(h.left, Math.max(c.x, k.right), !1) : c.x > a.x && (90 === d || 180 === d) && (l.x = this.computeMidOrthoPosition(h.right, Math.min(c.x, k.left), !1)), m.x = l.x, m.y = c.y;
				if (l.x > h.left && l.x < h.right)
					if (c.y <= h.bottom && c.y >= a.y || a.y >= k.top && a.y <= c.y) {
						if (0 === d || 180 === d) l = new y(a.x, Math.min((a.y + c.y) / 2, a.y)), m = new y(c.x, l.y)
					} else l.x = 180 === d || (90 === d || 270 === d) && c.x < a.x ? Math.min(c.x, 270 === d ? h.left : Math.min(h.left, k.left)) : Math.max(c.x, 270 === d ? h.right : Math.max(h.right,
						k.right)), m.x = l.x, m.y = c.y
			}
			var n = l,
				p = m;
			if (this.Zl) {
				var q = this.g,
					r;
				(r = null === q) || (q.Ka.cf ? r = !1 : (r = q.$a, r = r instanceof oh ? !r.Pw || r.wI : !0), r = !r);
				if (r || h.Ia(c) && !f.oi(e) || k.Ia(a) && !e.oi(f) || e === f || this.layer.Pc) b = !1;
				else {
					var s = En(q, !0, this.Da, null);
					if (s.eq(Math.min(a.x, n.x), Math.min(a.y, n.y), Math.abs(a.x - n.x), Math.abs(a.y - n.y)) && s.eq(Math.min(n.x, p.x), Math.min(n.y, p.y), Math.abs(n.x - p.x), Math.abs(n.y - p.y)) && s.eq(Math.min(p.x, c.x), Math.min(p.y, c.y), Math.abs(p.x - c.x), Math.abs(p.y - c.y))) b = !1;
					else {
						e = a;
						f = c;
						var u = r = null;
						if (q.SA) {
							q = s.gb.copy();
							q.Yf(-s.Gp, -s.Ep);
							var t = w.K();
							Tr(s, a.x, a.y) || (le(q.x, q.y, q.x + q.width, q.y + q.height, a.x, a.y, n.x, n.y, t) ? (r = a = t.copy(), b = t.Pb(n)) : le(q.x, q.y, q.x + q.width, q.y + q.height, n.x, n.y, p.x, p.y, t) ? (r = a = t.copy(), b = t.Pb(p)) : le(q.x, q.y, q.x + q.width, q.y + q.height, p.x, p.y, c.x, c.y, t) && (r = a = t.copy(), b = t.Pb(c)));
							Tr(s, c.x, c.y) || (le(q.x, q.y, q.x + q.width, q.y + q.height, c.x, c.y, p.x, p.y, t) ? (u = c = t.copy(), d = p.Pb(t)) : le(q.x, q.y, q.x + q.width, q.y + q.height, p.x, p.y, n.x, n.y, t) ? (u = c = t.copy(), d = n.Pb(t)) : le(q.x,
								q.y, q.x + q.width, q.y + q.height, n.x, n.y, a.x, a.y, t) && (u = c = t.copy(), d = a.Pb(t)));
							w.v(t)
						}
						h = h.copy().Ih(k);
						k = s.tG;
						h.Yf(s.Gp * k, s.Ep * k);
						Ur(s, a, b, c, d, h);
						k = Vr(s, c.x, c.y);
						!s.abort && 999999 <= k && (Hn(s), k = s.KF, h.Yf(s.Gp * k, s.Ep * k), Ur(s, a, b, c, d, h), k = Vr(s, c.x, c.y));
						!s.abort && 999999 <= k && s.KG && (Hn(s), Ur(s, a, b, c, d, s.gb), k = Vr(s, c.x, c.y));
						if (!s.abort && 999999 > k && 0 !== Vr(s, c.x, c.y)) {
							Wr(this, s, c.x, c.y, d, !0);
							h = this.l(2);
							if (4 > this.qa) 0 === b || 180 === b ? (h.x = a.x, h.y = c.y) : (h.x = c.x, h.y = a.y), this.ca(2, h.x, h.y), this.w(3, h.x, h.y);
							else if (c =
								this.l(3), 0 === b || 180 === b) J(h.x, c.x) ? (h = 0 === b ? Math.max(h.x, a.x) : Math.min(h.x, a.x), this.ca(2, h, a.y), this.ca(3, h, c.y)) : J(h.y, c.y) ? (Math.abs(a.y - h.y) <= s.Ep / 2 && (this.ca(2, h.x, a.y), this.ca(3, c.x, a.y)), this.w(2, h.x, a.y)) : this.ca(2, a.x, h.y);
							else if (90 === b || 270 === b) J(h.y, c.y) ? (h = 90 === b ? Math.max(h.y, a.y) : Math.min(h.y, a.y), this.ca(2, a.x, h), this.ca(3, c.x, h)) : J(h.x, c.x) ? (Math.abs(a.x - h.x) <= s.Gp / 2 && (this.ca(2, a.x, h.y), this.ca(3, a.x, c.y)), this.w(2, a.x, h.y)) : this.ca(2, h.x, a.y);
							null !== r && (a = this.l(1), c = this.l(2),
								a.x !== c.x && a.y !== c.y ? 0 === b || 180 === b ? this.w(2, a.x, c.y) : this.w(2, c.x, a.y) : 0 === b || 180 === b ? this.w(2, e.x, r.y) : this.w(2, r.x, e.y));
							null !== u && (0 === d || 180 === d ? this.lj(f.x, u.y) : this.lj(u.x, f.y));
							b = !0
						} else b = !1
					}
				}
			} else b = !1;
			b || (this.li(l), this.li(m))
		}
	};
	W.prototype.computeMidOrthoPosition = function(a, b) {
		if (this.hasCurviness()) {
			var c = this.computeCurviness();
			return (a + b) / 2 + c
		}
		return (a + b) / 2
	};

	function Bi(a) {
		if (null === a.g || !a.Zl) return !1;
		var b = a.points.n,
			c = b.length;
		if (4 > c) return !1;
		a = En(a.g, !0, a.Da, null);
		for (var d = 1; d < c - 2; d++) {
			var e = b[d],
				f = b[d + 1];
			if (!a.eq(Math.min(e.x, f.x), Math.min(e.y, f.y), Math.abs(e.x - f.x), Math.abs(e.y - f.y))) return !0
		}
		return !1
	}

	function Wr(a, b, c, d, e, f) {
		var h = b.Gp,
			k = b.Ep,
			l = Vr(b, c, d),
			m = c,
			n = d;
		for (0 === e ? m += h : 90 === e ? n += k : 180 === e ? m -= h : n -= k; 1 < l && Vr(b, m, n) === l - 1;) c = m, d = n, 0 === e ? m += h : 90 === e ? n += k : 180 === e ? m -= h : n -= k, l -= 1;
		if (f) {
			if (1 < l)
				if (180 === e || 0 === e) c = Math.floor(c / h) * h + h / 2;
				else if (90 === e || 270 === e) d = Math.floor(d / k) * k + k / 2
		} else c = Math.floor(c / h) * h + h / 2, d = Math.floor(d / k) * k + k / 2;
		1 < l && (f = e, m = c, n = d, 0 === e ? (f = 90, n += k) : 90 === e ? (f = 180, m -= h) : 180 === e ? (f = 270, n -= k) : 270 === e && (f = 0, m += h), Vr(b, m, n) === l - 1 ? Wr(a, b, m, n, f, !1) : (m = c, n = d, 0 === e ? (f = 270, n -= k) : 90 ===
			e ? (f = 0, m += h) : 180 === e ? (f = 90, n += k) : 270 === e && (f = 180, m -= h), Vr(b, m, n) === l - 1 && Wr(a, b, m, n, f, !1)));
		a.lj(c, d)
	}
	W.prototype.findClosestSegment = function(a) {
		var b = a.x;
		a = a.y;
		for (var c = this.l(0), d = this.l(1), e = Ra(b, a, c.x, c.y, d.x, d.y), f = 0, h = 1; h < this.qa - 1; h++) {
			var c = this.l(h + 1),
				k = Ra(b, a, d.x, d.y, c.x, c.y),
				d = c;
			k < e && (f = h, e = k)
		}
		return f
	};
	W.prototype.Me = function() {
		this.Ua = null
	};
	w.u(W, {
		nf: "geometry"
	}, function() {
		null === this.Ua && (this.ao(), this.Ua = this.makeGeometry());
		return this.Ua
	});
	W.prototype.Bu = function(a) {
		if (!a) {
			if (!1 === this.Mf) return;
			a = this.Ad();
			if (null !== this.Ua && (null === a || null !== a.nf)) return
		}
		this.Ua = this.makeGeometry();
		a = this.path;
		if (null !== a) {
			a.Ua = this.Ua;
			for (var b = this.xa.n, c = b.length, d = 0; d < c; d++) {
				var e = b[d];
				e !== a && e.ef && e instanceof X && (e.Ua = this.Ua)
			}
		}
	};
	W.prototype.makeGeometry = function() {
		var a = this.qa;
		if (2 > a) return new Ce(Ge);
		var b = !1,
			c = this.g;
		null !== c && Mr(this) && c.hl.contains(this) && null !== this.Aw && (b = !0);
		var d = c = 0,
			e = this.l(0).copy(),
			f = e.copy(),
			c = this.hd.n,
			h = this.computeCurve();
		if (h === Kj && 3 <= a && !Wa(this.Aq, 0))
			if (3 === a) var k = this.l(1),
				c = Math.min(e.x, k.x),
				d = Math.min(e.y, k.y),
				k = this.l(2),
				c = Math.min(c, k.x),
				d = Math.min(d, k.y);
			else {
				if (this.ac)
					for (k = 0; k < a; k++) d = c[k], f.x = Math.min(d.x, f.x), f.y = Math.min(d.y, f.y);
				else
					for (k = 3; k < a; k += 3) k + 3 >= a && (k = a - 1), c = this.l(k),
						f.x = Math.min(c.x, f.x), f.y = Math.min(c.y, f.y);
				c = f.x;
				d = f.y
			}
		else {
			for (k = 0; k < a; k++) d = c[k], f.x = Math.min(d.x, f.x), f.y = Math.min(d.y, f.y);
			c = f.x;
			d = f.y
		}
		c -= this.Tz.x;
		d -= this.Tz.y;
		e.x -= c;
		e.y -= d;
		if (2 !== a || Mr(this)) {
			var l = w.s();
			0 !== this.computeShortLength(!0) && (e = Xr(this, e, !0, f));
			M(l, e.x, e.y, !1, !1);
			if (h === Kj && 3 <= a && !Wa(this.Aq, 0))
				if (3 === a) k = this.l(1), a = k.x - c, b = k.y - d, k = this.l(2).copy(), k.x -= c, k.y -= d, 0 !== this.computeShortLength(!1) && (k = Xr(this, k, !1, f)), N(l, a, b, a, b, k.x, k.y);
				else if (this.ac) {
				for (var f = new y(c, d), e = this.l(1).copy(),
						h = new y(c, d), a = new y(c, d), b = this.l(0), m = null, n = this.Aq / 3, k = 1; k < this.qa - 1; k++) {
					var m = this.l(k),
						p = b,
						q = m,
						r = this.l(Yr(this, m, k, !1));
					if (!Wa(p.x, q.x) || !Wa(q.x, r.x))
						if (!Wa(p.y, q.y) || !Wa(q.y, r.y)) {
							var s = n,
								u = h,
								t = a;
							isNaN(s) && (s = this.Aq / 3);
							var x = p.x,
								p = p.y,
								v = q.x,
								q = q.y,
								z = r.x,
								r = r.y,
								A = s * Zr(x, p, v, q),
								s = s * Zr(v, q, z, r);
							Wa(p, q) && Wa(v, z) && (v > x ? r > q ? (u.x = v - A, u.y = q - A, t.x = v + s, t.y = q + s) : (u.x = v - A, u.y = q + A, t.x = v + s, t.y = q - s) : r > q ? (u.x = v + A, u.y = q - A, t.x = v - s, t.y = q + s) : (u.x = v + A, u.y = q + A, t.x = v - s, t.y = q - s));
							Wa(x, v) && Wa(q, r) && (q > p ? (z > v ? (u.x =
								v - A, u.y = q - A, t.x = v + s) : (u.x = v + A, u.y = q - A, t.x = v - s), t.y = q + s) : (z > v ? (u.x = v - A, u.y = q + A, t.x = v + s) : (u.x = v + A, u.y = q + A, t.x = v - s), t.y = q - s));
							if (Wa(x, v) && Wa(v, z) || Wa(p, q) && Wa(q, r)) x = .5 * (x + z), p = .5 * (p + r), u.x = x, u.y = p, t.x = x, t.y = p;
							1 === k ? (e.x = .5 * (b.x + m.x), e.y = .5 * (b.y + m.y)) : 2 === k && Wa(b.x, this.l(0).x) && Wa(b.y, this.l(0).y) && (e.x = .5 * (b.x + m.x), e.y = .5 * (b.y + m.y));
							N(l, e.x - c, e.y - d, h.x - c, h.y - d, m.x - c, m.y - d);
							f.set(h);
							e.set(a);
							b = m
						}
				}
				k = b.x;
				b = b.y;
				f = this.l(this.qa - 1);
				0 !== this.computeShortLength(!1) && (f = Xr(this, f.copy(), !1, dd));
				k = .5 * (k + f.x);
				b = .5 * (b + f.y);
				N(l, a.x - c, a.y - d, k - c, b - d, f.x - c, f.y - d)
			} else
				for (k = 3; k < a; k += 3) b = this.l(k - 2), k + 3 >= a && (k = a - 1), f = this.l(k - 1), e = this.l(k), k === a - 1 && 0 !== this.computeShortLength(!1) && (e = Xr(this, e.copy(), !1, dd)), N(l, b.x - c, b.y - d, f.x - c, f.y - d, e.x - c, e.y - d);
			else {
				f = w.K();
				f.assign(this.l(0));
				k = 1;
				for (e = 0; k < a;) {
					k = Yr(this, f, k, 1 < k);
					u = this.l(k);
					if (k >= a - 1) {
						if (!f.L(u)) 0 !== this.computeShortLength(!1) && (u = Xr(this, u.copy(), !1, dd)), $r(this, l, -c, -d, f, u, b);
						else if (0 === e)
							for (k = 1; k < a;) u = this.l(k++), $r(this, l, -c, -d, f, u, b), f.assign(u);
						break
					}
					e = Yr(this, u, k + 1, k < a - 3);
					k = l;
					h = -c;
					m = -d;
					n = f;
					t = this.l(e);
					x = f;
					p = b;
					J(n.y, u.y) && J(u.x, t.x) ? (s = this.computeCorner(), s = Math.min(s, Math.abs(u.x - n.x) / 2), s = v = Math.min(s, Math.abs(t.y - u.y) / 2), J(s, 0) ? ($r(this, k, h, m, n, u, p), x.assign(u)) : (q = u.x, z = u.y, r = q, A = z, q = u.x > n.x ? u.x - s : u.x + s, A = t.y > u.y ? u.y + v : u.y - v, $r(this, k, h, m, n, new y(q, z), p), Qe(k, u.x + h, u.y + m, r + h, A + m), x.m(r, A))) : J(n.x, u.x) && J(u.y, t.y) ? (s = this.computeCorner(), v = Math.min(s, Math.abs(u.y - n.y) / 2), v = s = Math.min(v, Math.abs(t.x - u.x) / 2), J(s, 0) ? ($r(this, k, h, m, n, u,
						p), x.assign(u)) : (q = u.x, A = z = u.y, z = u.y > n.y ? u.y - v : u.y + v, r = t.x > u.x ? u.x + s : u.x - s, $r(this, k, h, m, n, new y(q, z), p), Qe(k, u.x + h, u.y + m, r + h, A + m), x.m(r, A))) : ($r(this, k, h, m, n, u, p), x.assign(u));
					k = e
				}
				w.v(f)
			}
			c = l.o;
			w.q(l)
		} else l = this.l(1).copy(), l.x -= c, l.y -= d, 0 !== this.computeShortLength(!0) && (e = Xr(this, e, !0, f)), 0 !== this.computeShortLength(!1) && (l = Xr(this, l, !1, f)), c = new Ce(Ge), c.ha = e.x, c.fa = e.y, c.C = l.x, c.D = l.y;
		return c
	};

	function Zr(a, b, c, d) {
		a = c - a;
		if (isNaN(a) || Infinity === a || -Infinity === a) return NaN;
		0 > a && (a = -a);
		b = d - b;
		if (isNaN(b) || Infinity === b || -Infinity === b) return NaN;
		0 > b && (b = -b);
		return Wa(a, 0) ? b : Wa(b, 0) ? a : Math.sqrt(a * a + b * b)
	}

	function Xr(a, b, c, d) {
		var e = a.qa;
		if (2 > e) return b;
		if (c) {
			var f = a.l(1);
			c = f.x - d.x;
			d = f.y - d.y;
			f = Zr(b.x, b.y, c, d);
			if (0 === f) return b;
			e = 2 === e ? .5 * f : f;
			a = a.computeShortLength(!0);
			a > e && (a = e);
			c = a * (c - b.x) / f;
			a = a * (d - b.y) / f;
			b.x += c;
			b.y += a
		} else {
			f = a.l(e - 2);
			c = f.x - d.x;
			d = f.y - d.y;
			f = Zr(b.x, b.y, c, d);
			if (0 === f) return b;
			e = 2 === e ? .5 * f : f;
			a = a.computeShortLength(!1);
			a > e && (a = e);
			c = a * (b.x - c) / f;
			a = a * (b.y - d) / f;
			b.x -= c;
			b.y -= a
		}
		return b
	}

	function Yr(a, b, c, d) {
		for (var e = a.qa, f = b; Wa(b.x, f.x) && Wa(b.y, f.y);) {
			if (c >= e) return e - 1;
			f = a.l(c++)
		}
		if (!Wa(b.x, f.x) && !Wa(b.y, f.y)) return c - 1;
		for (var h = f; Wa(b.x, f.x) && Wa(f.x, h.x) && (!d || (b.y >= f.y ? f.y >= h.y : f.y <= h.y)) || Wa(b.y, f.y) && Wa(f.y, h.y) && (!d || (b.x >= f.x ? f.x >= h.x : f.x <= h.x));) {
			if (c >= e) return e - 1;
			h = a.l(c++)
		}
		return c - 2
	}

	function $r(a, b, c, d, e, f, h) {
		if (!h && Mr(a)) {
			h = [];
			var k = 0;
			a.isVisible() && (k = as(a, e, f, h));
			var l = e.x,
				l = e.y;
			if (0 < k)
				if (J(e.y, f.y))
					if (e.x < f.x)
						for (var m = 0; m < k;) {
							var n = Math.max(e.x, Math.min(h[m++] - 5, f.x - 10));
							b.lineTo(n + c, f.y + d);
							for (var l = n + c, p = Math.min(n + 10, f.x); m < k;) {
								var q = h[m];
								if (q < p + 10) m++, p = Math.min(q + 5, f.x);
								else break
							}
							q = (n + p) / 2 + c;
							q = f.y - 10 + d;
							n = p + c;
							p = f.y + d;
							a.Ze === kj ? M(b, n, p, !1, !1) : N(b, l, q, n, q, n, p)
						} else
							for (m = k - 1; 0 <= m;) {
								n = Math.min(e.x, Math.max(h[m--] + 5, f.x + 10));
								b.lineTo(n + c, f.y + d);
								l = n + c;
								for (p = Math.max(n - 10,
										f.x); 0 <= m;)
									if (q = h[m], q > p - 10) m--, p = Math.max(q - 5, f.x);
									else break;
								q = f.y - 10 + d;
								n = p + c;
								p = f.y + d;
								a.Ze === kj ? M(b, n, p, !1, !1) : N(b, l, q, n, q, n, p)
							} else if (J(e.x, f.x))
								if (e.y < f.y)
									for (m = 0; m < k;) {
										n = Math.max(e.y, Math.min(h[m++] - 5, f.y - 10));
										b.lineTo(f.x + c, n + d);
										l = n + d;
										for (p = Math.min(n + 10, f.y); m < k;)
											if (q = h[m], q < p + 10) m++, p = Math.min(q + 5, f.y);
											else break;
										q = f.x - 10 + c;
										n = f.x + c;
										p += d;
										a.Ze === kj ? M(b, n, p, !1, !1) : N(b, q, l, q, p, n, p)
									} else
										for (m = k - 1; 0 <= m;) {
											n = Math.min(e.y, Math.max(h[m--] + 5, f.y + 10));
											b.lineTo(f.x + c, n + d);
											l = n + d;
											for (p = Math.max(n - 10, f.y); 0 <=
												m;)
												if (q = h[m], q > p - 10) m--, p = Math.max(q - 5, f.y);
												else break;
											q = f.x - 10 + c;
											n = f.x + c;
											p += d;
											a.Ze === kj ? M(b, n, p, !1, !1) : N(b, q, l, q, p, n, p)
										}
		}
		b.lineTo(f.x + c, f.y + d)
	}

	function as(a, b, c, d) {
		var e = a.g;
		if (null === e || b.L(c)) return 0;
		for (e = e.Qx; e.next();) {
			var f = e.value;
			if (null !== f && f.visible)
				for (var f = f.zb.n, h = f.length, k = 0; k < h; k++) {
					var l = f[k];
					if (l instanceof W) {
						if (l === a) return 0 < d.length && d.sort(function(a, b) {
							return a - b
						}), d.length;
						if (l.isVisible() && Mr(l)) {
							var m = l.Vn;
							m.I() && a.Vn.Zf(m) && !a.usesSamePort(l) && (m = l.path, null !== m && m.Aj() && bs(b, c, d, l))
						}
					}
				}
		}
		0 < d.length && d.sort(function(a, b) {
			return a - b
		});
		return d.length
	}

	function bs(a, b, c, d) {
		for (var e = J(a.y, b.y), f = d.qa, h = d.l(0), k = w.K(), l = 1; l < f; l++) {
			var m = d.l(l);
			if (l < f - 1) {
				var n = d.l(l + 1);
				if (h.y === m.y && m.y === n.y) {
					if (m.x > h.x && n.x > m.x || m.x < h.x && n.x < m.x) m = n, l++
				} else h.x === m.x && m.x === n.x && (m.y > h.y && n.y > m.y || m.y < h.y && n.y < m.y) && (m = n, l++)
			}
			a: {
				var n = k,
					p = a.x,
					q = a.y,
					r = b.x,
					s = b.y,
					u = h.x,
					h = h.y,
					t = m.x,
					x = m.y;
				if (!J(p, r)) {
					if (J(q, s) && J(u, t) && Math.min(p, r) < u && Math.max(p, r) > u && Math.min(h, x) < q && Math.max(h, x) > q && !J(h, x)) {
						n.x = u;
						n.y = q;
						n = !0;
						break a
					}
				} else if (!J(q, s) && J(h, x) && Math.min(q, s) < h && Math.max(q,
						s) > h && Math.min(u, t) < p && Math.max(u, t) > p && !J(u, t)) {
					n.x = p;
					n.y = h;
					n = !0;
					break a
				}
				n.x = 0;n.y = 0;n = !1
			}
			n && (e ? c.push(k.x) : c.push(k.y));
			h = m
		}
		w.v(k)
	}
	w.u(W, {
		Yt: "firstPickIndex"
	}, function() {
		var a;
		2 >= this.qa ? a = 0 : ((a = this.ac) || (a = this.computeSpot(!0) !== yb), a = a ? 1 : 0);
		return a
	});
	w.u(W, {
		Ox: "lastPickIndex"
	}, function() {
		var a = this.qa;
		if (0 === a) a = 0;
		else if (2 >= a) a -= 1;
		else {
			var b;
			(b = this.ac) || (b = this.computeSpot(!1) !== yb);
			a = b ? a - 2 : a - 1
		}
		return a
	});

	function Mr(a) {
		a = a.Ze;
		return a === jj || a === kj
	}

	function Or(a, b) {
		if (b || Mr(a)) {
			var c = a.g;
			null === c || c.hl.contains(a) || null === a.Aw || c.hl.add(a, a.Aw)
		}
	}

	function mj(a, b) {
		var c = a.layer;
		if (null !== c && c.visible && !c.Pc) {
			var d = c.g;
			if (null !== d)
				for (var e = !1, d = d.Qx; d.next();) {
					var f = d.value;
					if (f.visible)
						if (f === c)
							for (var e = !0, h = !1, f = f.zb.n, k = f.length, l = 0; l < k; l++) {
								var m = f[l];
								m instanceof W && (m === a ? h = !0 : h && cs(a, m, b))
							} else if (e)
								for (f = f.zb.n, k = f.length, l = 0; l < k; l++) m = f[l], m instanceof W && cs(a, m, b)
				}
		}
	}

	function cs(a, b, c) {
		if (null !== b && null !== b.Ua && Mr(b)) {
			var d = b.Vn;
			d.I() && (a.Vn.Zf(d) || c.Zf(d)) && (a.usesSamePort(b) || b.Me())
		}
	}
	W.prototype.usesSamePort = function(a) {
		var b = this.qa,
			c = a.qa;
		if (0 < b && 0 < c) {
			var d = this.l(0),
				e = a.l(0);
			if (d.Oc(e)) return !0;
			b = this.l(b - 1);
			a = a.l(c - 1);
			if (b.Oc(a) || d.Oc(a) || b.Oc(e)) return !0
		} else if (this.W === a.W || this.Z === a.Z || this.W === a.Z || this.Z === a.W) return !0;
		return !1
	};
	W.prototype.isVisible = function() {
		if (!R.prototype.isVisible.call(this)) return !1;
		var a = this.Da,
			b = !0,
			c = this.g;
		null !== c && (b = c.Ud);
		var d = this.W;
		if (null !== d) {
			if (this.bc && b && !d.uc) return !1;
			if (d === a) return !0;
			for (c = d; null !== c;) {
				if (c.Wb === this) return !0;
				c = c.Da
			}
			c = d.findVisibleNode();
			if (null === c || c === a) return !1
		}
		d = this.Z;
		if (null !== d) {
			if (this.bc && !b && !d.uc) return !1;
			if (d === a) return !0;
			for (c = d; null !== c;) {
				if (c.Wb === this) return !0;
				c = c.Da
			}
			b = d.findVisibleNode();
			if (null === b || b === a) return !1
		}
		return !0
	};
	W.prototype.Cd = function(a) {
		R.prototype.Cd.call(this, a);
		null !== this.xi && this.xi.Zp();
		if (null !== this.wf)
			for (var b = this.wf.i; b.next();) b.value.Cd(a)
	};
	w.defineProperty(W, {
		Ht: "adjusting"
	}, function() {
		return this.Lq
	}, function(a) {
		var b = this.Lq;
		b !== a && (this.Lq = a, this.h("adjusting", b, a))
	});
	w.defineProperty(W, {
		pA: "corner"
	}, function() {
		return this.fr
	}, function(a) {
		var b = this.fr;
		b !== a && (this.fr = a, this.Me(), this.h("corner", b, a))
	});
	w.defineProperty(W, {
		Ze: "curve"
	}, function() {
		return this.ir
	}, function(a) {
		var b = this.ir;
		b !== a && (this.ir = a, this.Vb(), this.Me(), Or(this, b === kj || b === jj || a === kj || a === jj), this.h("curve", b, a))
	});
	w.defineProperty(W, {
		px: "curviness"
	}, function() {
		return this.jr
	}, function(a) {
		var b = this.jr;
		b !== a && (this.jr = a, this.Vb(), this.Me(), this.h("curviness", b, a))
	});
	w.defineProperty(W, {
		ny: "routing"
	}, function() {
		return this.Wm
	}, function(a) {
		var b = this.Wm;
		b !== a && (this.Wm = a, this.Ki = null, this.Vb(), Or(this, 2 === (b.value & 2) || 2 === (a.value & 2)), this.h("routing", b, a))
	});
	w.defineProperty(W, {
		Aq: "smoothness"
	}, function() {
		return this.mt
	}, function(a) {
		var b = this.mt;
		b !== a && (this.mt = a, this.Me(), this.h("smoothness", b, a))
	});

	function Lr(a) {
		var b = a.rg;
		if (null !== b) {
			var c = a.Hg;
			if (null !== c) {
				var d = a.Qh;
				a = a.ki;
				for (var e = null, f = null, h = b.qc.n, k = h.length, l = 0; l < k; l++) {
					var m = h[l];
					if (m.rg === b && m.Qh === d && m.Hg === c && m.ki === a || m.rg === c && m.Qh === a && m.Hg === b && m.ki === d) null === f ? f = m : (null === e && (e = [], e.push(f)), e.push(m))
				}
				if (null !== e) {
					f = ur(b, c, d, a);
					null === f && (f = new zl, f.jq = b, f.ay = d, f.Gu = c, f.by = a, tr(b, f), tr(c, f));
					f.links = e;
					for (l = 0; l < e.length; l++) m = e[l], m.xi = f;
					f.Zp()
				}
			}
		}
	}

	function Kr(a) {
		var b = a.xi;
		null !== b && (a.xi = null, a = b.links.indexOf(a), 0 <= a && (w.Jg(b.links, a), b.Zp()))
	}
	w.u(W, {
		key: "key"
	}, function() {
		var a = this.g;
		return null !== a && a.$ instanceof Q ? a.$.bf(this.data) : void 0
	}, {
		configurable: !0
	});

	function zl() {
		w.oc(this);
		this.fh = this.Xv = !1;
		this.by = this.Gu = this.ay = this.jq = null;
		this.links = []
	}
	zl.prototype.Zp = function() {
		if (!this.Xv) {
			var a = this.links;
			0 < a.length && (a = a[0].g, null !== a && (a.aD.add(this), this.fh = a.ja.lb))
		}
		this.Xv = !0
	};
	zl.prototype.RB = function() {
		if (this.Xv) {
			this.Xv = !1;
			var a = this.links;
			if (0 < a.length) {
				var b = a[0],
					c = b.g,
					c = null === c || c.Fn && !this.fh;
				this.fh = !1;
				b.arrangeBundledLinks(a, c);
				1 === a.length && (b.xi = null, a.length = 0)
			}
			0 === a.length && (a = this.jq, null !== this && null !== a.Kh && a.Kh.remove(this), a = this.Gu, null !== this && null !== a.Kh && a.Kh.remove(this))
		}
	};
	w.be(zl, {
		jq: !0,
		ay: !0,
		Gu: !0,
		by: !0,
		links: !0,
		spacing: !0
	});

	function Fn() {
		w.oc(this);
		this.FB = this.group = null;
		this.lu = !0;
		this.abort = !1;
		this.Bg = this.Ag = 1;
		this.ls = this.ks = -1;
		this.Ce = this.Be = 8;
		this.qd = null;
		this.KG = !1;
		this.tG = 22;
		this.KF = 111
	}
	w.be(Fn, {
		group: !0,
		FB: !0,
		lu: !0,
		abort: !0,
		KG: !0,
		tG: !0,
		KF: !0
	});
	Fn.prototype.initialize = function(a) {
		if (!(0 >= a.width || 0 >= a.height)) {
			var b = a.y,
				c = a.x + a.width,
				d = a.y + a.height;
			this.Ag = Math.floor((a.x - this.Be) / this.Be) * this.Be;
			this.Bg = Math.floor((b - this.Ce) / this.Ce) * this.Ce;
			this.ks = Math.ceil((c + 2 * this.Be) / this.Be) * this.Be;
			this.ls = Math.ceil((d + 2 * this.Ce) / this.Ce) * this.Ce;
			a = 1 + (Math.ceil((this.ks - this.Ag) / this.Be) | 0);
			b = 1 + (Math.ceil((this.ls - this.Bg) / this.Ce) | 0);
			if (null === this.qd || this.yp < a - 1 || this.zp < b - 1) {
				c = [];
				for (d = 0; d <= a; d++) c[d] = [];
				this.qd = c;
				this.yp = a - 1;
				this.zp = b - 1
			}
			if (null !==
				this.qd)
				for (a = 0; a <= this.yp; a++)
					for (b = 0; b <= this.zp; b++) this.qd[a][b] = 1E6
		}
	};
	w.u(Fn, {
		gb: null
	}, function() {
		return new B(this.Ag, this.Bg, this.ks - this.Ag, this.ls - this.Bg)
	});
	w.defineProperty(Fn, {
		Gp: null
	}, function() {
		return this.Be
	}, function(a) {
		0 < a && a !== this.Be && (this.Be = a, this.initialize(this.gb))
	});
	w.defineProperty(Fn, {
		Ep: null
	}, function() {
		return this.Ce
	}, function(a) {
		0 < a && a !== this.Ce && (this.Ce = a, this.initialize(this.gb))
	});

	function Tr(a, b, c) {
		return a.Ag <= b && b <= a.ks && a.Bg <= c && c <= a.ls
	}

	function Vr(a, b, c) {
		if (!Tr(a, b, c)) return 1E6;
		b -= a.Ag;
		b /= a.Be;
		c -= a.Bg;
		c /= a.Ce;
		return a.qd[b | 0][c | 0]
	}

	function In(a, b, c) {
		Tr(a, b, c) && (b -= a.Ag, b /= a.Be, c -= a.Bg, c /= a.Ce, a.qd[b | 0][c | 0] = 0)
	}

	function Hn(a) {
		if (null !== a.qd)
			for (var b = 0; b <= a.yp; b++)
				for (var c = 0; c <= a.zp; c++) 1 <= a.qd[b][c] && (a.qd[b][c] = 1E6)
	}
	Fn.prototype.eq = function(a, b, c, d) {
		if (a > this.ks || a + c < this.Ag || b > this.ls || b + d < this.Bg) return !0;
		a = (a - this.Ag) / this.Be | 0;
		b = (b - this.Bg) / this.Ce | 0;
		c = Math.max(0, c) / this.Be + 1 | 0;
		var e = Math.max(0, d) / this.Ce + 1 | 0;
		0 > a && (c += a, a = 0);
		0 > b && (e += b, b = 0);
		if (0 > c || 0 > e) return !0;
		d = Math.min(a + c - 1, this.yp) | 0;
		for (c = Math.min(b + e - 1, this.zp) | 0; a <= d; a++)
			for (e = b; e <= c; e++)
				if (0 === this.qd[a][e]) return !1;
		return !0
	};

	function ds(a, b, c, d, e, f, h, k, l) {
		if (!(b < f || b > h || c < k || c > l)) {
			var m, n;
			m = b | 0;
			n = c | 0;
			var p = a.qd[m][n];
			if (1 <= p && 999999 > p)
				for (e ? n += d : m += d, p += 1; f <= m && m <= h && k <= n && n <= l && !(p >= a.qd[m][n]);) a.qd[m][n] = p, p += 1, e ? n += d : m += d;
			m = e ? n : m;
			if (e)
				if (0 < d)
					for (c += d; c < m; c += d) ds(a, b, c, 1, !e, f, h, k, l), ds(a, b, c, -1, !e, f, h, k, l);
				else
					for (c += d; c > m; c += d) ds(a, b, c, 1, !e, f, h, k, l), ds(a, b, c, -1, !e, f, h, k, l);
			else if (0 < d)
				for (b += d; b < m; b += d) ds(a, b, c, 1, !e, f, h, k, l), ds(a, b, c, -1, !e, f, h, k, l);
			else
				for (b += d; b > m; b += d) ds(a, b, c, 1, !e, f, h, k, l), ds(a, b, c, -1, !e, f, h,
					k, l)
		}
	}

	function es(a, b, c, d, e, f, h, k, l) {
		b |= 0;
		c |= 0;
		var m = 0,
			n = 1;
		for (a.qd[b][c] = n; 0 === m && b > f && b < h && c > k && c < l;) n += 1, a.qd[b][c] = n, e ? c += d : b += d, m = a.qd[b][c]
	}

	function fs(a, b, c, d, e, f, h, k, l) {
		b |= 0;
		c |= 0;
		var m = 0;
		for (a.qd[b][c] = 999999; 0 === m && b > f && b < h && c > k && c < l;) a.qd[b][c] = 999999, e ? c += d : b += d, m = a.qd[b][c]
	}

	function Ur(a, b, c, d, e, f) {
		if (null !== a.qd) {
			a.abort = !1;
			var h = b.x,
				k = b.y;
			if (Tr(a, h, k) && (h -= a.Ag, h /= a.Be, k -= a.Bg, k /= a.Ce, b = d.x, d = d.y, Tr(a, b, d)))
				if (b -= a.Ag, b /= a.Be, d -= a.Bg, d /= a.Ce, 1 >= Math.abs(h - b) && 1 >= Math.abs(k - d)) a.abort = !0;
				else {
					var l = f.x,
						m = f.y,
						n = f.x + f.width,
						p = f.y + f.height,
						l = l - a.Ag,
						l = l / a.Be,
						m = m - a.Bg,
						m = m / a.Ce,
						n = n - a.Ag,
						n = n / a.Be,
						p = p - a.Bg,
						p = p / a.Ce;
					f = Math.max(0, Math.min(a.yp, l | 0));
					n = Math.min(a.yp, Math.max(0, n | 0));
					m = Math.max(0, Math.min(a.zp, m | 0));
					p = Math.min(a.zp, Math.max(0, p | 0));
					h |= 0;
					k |= 0;
					b |= 0;
					d |= 0;
					l = 0 === c ||
						90 === c ? 1 : -1;
					c = 90 === c || 270 === c;
					0 === a.qd[h][k] ? (es(a, h, k, l, c, f, n, m, p), es(a, h, k, 1, !c, f, n, m, p), es(a, h, k, -1, !c, f, n, m, p)) : es(a, h, k, l, c, h, k, h, k);
					0 === a.qd[b][d] ? (fs(a, b, d, 0 === e || 90 === e ? 1 : -1, 90 === e || 270 === e, f, n, m, p), fs(a, b, d, 1, !(90 === e || 270 === e), f, n, m, p), fs(a, b, d, -1, !(90 === e || 270 === e), f, n, m, p)) : fs(a, b, d, l, c, b, d, b, d);
					a.abort || (ds(a, h, k, 1, !1, f, n, m, p), ds(a, h, k, -1, !1, f, n, m, p), ds(a, h, k, 1, !0, f, n, m, p), ds(a, h, k, -1, !0, f, n, m, p))
				}
		}
	}

	function Rr() {
		w.oc(this);
		this.port = this.Qc = null;
		this.fg = [];
		this.iq = !1
	}
	w.be(Rr, {
		Qc: !0,
		port: !0,
		fg: !0,
		iq: !0
	});
	Rr.prototype.toString = function() {
		for (var a = this.fg, b = this.Qc.toString() + " " + a.length.toString() + ":", c = 0; c < a.length; c++) {
			var d = a[c];
			null !== d && (b += "\n  " + d.toString())
		}
		return b
	};

	function gs(a, b, c, d) {
		b = b.offsetY;
		switch (b) {
			case w.ed:
				return 90;
			case w.Tc:
				return 180;
			case w.od:
				return 270;
			case w.fd:
				return 0
		}
		switch (b) {
			case w.ed | w.od:
				return 180 < c ? 270 : 90;
			case w.Tc | w.fd:
				return 90 < c && 270 >= c ? 180 : 0
		}
		a = 180 * Math.atan2(a.height, a.width) / Math.PI;
		switch (b) {
			case w.Tc | w.od:
				return c > a && c <= 180 + a ? 180 : 270;
			case w.od | w.fd:
				return c > 180 - a && c <= 360 - a ? 270 : 0;
			case w.fd | w.ed:
				return c > a && c <= 180 + a ? 90 : 0;
			case w.ed | w.Tc:
				return c > 180 - a && c <= 360 - a ? 180 : 90;
			case w.Tc | w.od | w.fd:
				return 90 < c && c <= 180 + a ? 180 : c > 180 + a && c <= 360 -
					a ? 270 : 0;
			case w.od | w.fd | w.ed:
				return 180 < c && c <= 360 - a ? 270 : c > a && 180 >= c ? 90 : 0;
			case w.fd | w.ed | w.Tc:
				return c > a && c <= 180 - a ? 90 : c > 180 - a && 270 >= c ? 180 : 0;
			case w.ed | w.Tc | w.od:
				return c > 180 - a && c <= 180 + a ? 180 : c > 180 + a ? 270 : 90
		}
		d && b !== (w.Tc | w.od | w.fd | w.ed) && (c -= 15, 0 > c && (c += 360));
		return c > a && c < 180 - a ? 90 : c >= 180 - a && c <= 180 + a ? 180 : c > 180 + a && c < 360 - a ? 270 : 0
	}
	Rr.prototype.Zp = function() {
		this.fg.length = 0
	};

	function Sr(a, b) {
		var c = a.fg;
		if (0 === c.length) {
			a: if (!a.iq) {
				c = a.iq;
				a.iq = !0;
				var d, e = null,
					f = a.Qc,
					f = f instanceof V ? f : null;
				if (null === f || f.ad) d = a.Qc.ZE(a.port.Vd);
				else {
					if (!f.Y.I()) {
						a.iq = c;
						break a
					}
					e = f;
					d = e.YE()
				}
				var h = a.fg.length = 0,
					k = a.port.Wa(zb, w.K()),
					l = a.port.Wa(Sb, w.K()),
					f = w.lg(k.x, k.y, 0, 0);
				f.vi(l);
				w.v(k);
				w.v(l);
				k = w.xb(f.x + f.width / 2, f.y + f.height / 2);
				l = a.port.Vl();
				for (d = d.i; d.next();) {
					var m = d.value;
					if (m.isVisible() && m.lc !== m.Ic) {
						var n = m.lc === a.port || m.W.oi(e),
							p = m.computeSpot(n, a.port);
						if (p.xj() && (n = n ? m.Ic :
								m.lc, null !== n)) {
							var q = n.U;
							if (null !== q) {
								var r = q.findVisibleNode();
								null !== r && r !== q && (q = r, n = q.port);
								n = m.computeOtherPoint(q, n);
								q = k.Pb(n);
								q -= l;
								0 > q && (q += 360);
								p = gs(f, p, q, m.ac);
								r = 0;
								0 === p ? (r = w.fd, 180 < q && (q -= 360)) : r = 90 === p ? w.ed : 180 === p ? w.Tc : w.od;
								p = a.fg[h];
								void 0 === p ? (p = new hs(m, q, r), a.fg[h] = p) : (p.link = m, p.angle = q, p.ye = r);
								p.Zx.set(n);
								h++
							}
						}
					}
				}
				w.v(k);
				a.fg.sort(Rr.prototype.gJ);
				e = a.fg.length;
				k = -1;
				for (h = l = 0; h < e; h++) p = a.fg[h], void 0 !== p && (p.ye !== k && (k = p.ye, l = 0), p.Xp = l, l++);
				k = -1;
				l = 0;
				for (h = e - 1; 0 <= h; h--) p = a.fg[h], void 0 !==
					p && (p.ye !== k && (k = p.ye, l = p.Xp + 1), p.sn = l);
				h = a.fg;
				p = a.port;
				e = a.Qc.lJ;
				k = w.K();
				l = w.K();
				d = w.K();
				m = w.K();
				p.Wa(zb, k);
				p.Wa(Gb, l);
				p.Wa(Sb, d);
				p.Wa(Qb, m);
				r = q = n = p = 0;
				if (e === sr)
					for (var s = 0; s < h.length; s++) {
						var u = h[s];
						if (null !== u) {
							var t = u.link.computeThickness();
							switch (u.ye) {
								case w.ed:
									q += t;
									break;
								case w.Tc:
									r += t;
									break;
								case w.od:
									p += t;
									break;
								default:
								case w.fd:
									n += t
							}
						}
					}
				for (var x = 0, v = 0, z = 1, s = 0; s < h.length; s++)
					if (u = h[s], null !== u) {
						var A, L;
						if (x !== u.ye) {
							x = u.ye;
							switch (x) {
								case w.ed:
									A = d;
									L = m;
									break;
								case w.Tc:
									A = m;
									L = k;
									break;
								case w.od:
									A =
										k;
									L = l;
									break;
								default:
								case w.fd:
									A = l, L = d
							}
							var E = L.x - A.x;
							L = L.y - A.y;
							switch (x) {
								case w.ed:
									q > Math.abs(E) ? (z = Math.abs(E) / q, q = Math.abs(E)) : z = 1;
									break;
								case w.Tc:
									r > Math.abs(L) ? (z = Math.abs(L) / r, r = Math.abs(L)) : z = 1;
									break;
								case w.od:
									p > Math.abs(E) ? (z = Math.abs(E) / p, p = Math.abs(E)) : z = 1;
									break;
								default:
								case w.fd:
									n > Math.abs(L) ? (z = Math.abs(L) / n, n = Math.abs(L)) : z = 1
							}
							v = 0
						}
						var P = u.gq;
						if (e === sr) {
							t = u.link.computeThickness();
							t *= z;
							P.set(A);
							switch (x) {
								case w.ed:
									P.x = A.x + E / 2 + q / 2 - v - t / 2;
									break;
								case w.Tc:
									P.y = A.y + L / 2 + r / 2 - v - t / 2;
									break;
								case w.od:
									P.x =
										A.x + E / 2 - p / 2 + v + t / 2;
									break;
								default:
								case w.fd:
									P.y = A.y + L / 2 - n / 2 + v + t / 2
							}
							v += t
						} else t = .5, e === pr && (t = (u.Xp + 1) / (u.sn + 1)), P.x = A.x + E * t, P.y = A.y + L * t
					}
				w.v(k);
				w.v(l);
				w.v(d);
				w.v(m);
				A = a.fg;
				for (E = 0; E < A.length; E++) L = A[E], null !== L && (L.vx = a.computeEndSegmentLength(L));
				a.iq = c;
				w.Eb(f)
			}c = a.fg
		}
		for (f = 0; f < c.length; f++)
			if (A = c[f], null !== A && A.link === b) return A;
		return null
	}
	Rr.prototype.gJ = function(a, b) {
		return a === b ? 0 : null === a ? -1 : null === b ? 1 : a.ye < b.ye ? -1 : a.ye > b.ye ? 1 : a.angle < b.angle ? -1 : a.angle > b.angle ? 1 : 0
	};
	Rr.prototype.computeEndSegmentLength = function(a) {
		var b = a.link,
			c = b.computeEndSegmentLength(this.Qc, this.port, yb, b.lc === this.port),
			d = a.Xp;
		if (0 > d) return c;
		var e = a.sn;
		if (1 >= e || !b.ac) return c;
		var b = a.Zx,
			f = a.gq;
		if (a.ye === w.Tc || a.ye === w.ed) d = e - 1 - d;
		return ((a = a.ye === w.Tc || a.ye === w.fd) ? b.y < f.y : b.x < f.x) ? c + 8 * d : (a ? b.y === f.y : b.x === f.x) ? c : c + 8 * (e - 1 - d)
	};

	function hs(a, b, c) {
		this.link = a;
		this.angle = b;
		this.ye = c;
		this.Zx = new y;
		this.sn = this.Xp = 0;
		this.gq = new y;
		this.vx = 0
	}
	w.be(hs, {
		link: !0,
		angle: !0,
		ye: !0,
		Zx: !0,
		Xp: !0,
		sn: !0,
		gq: !0,
		vx: !0
	});
	hs.prototype.toString = function() {
		return this.link.toString() + " " + this.angle.toString() + " " + this.ye.toString() + ":" + this.Xp.toString() + "/" + this.sn.toString() + " " + this.gq.toString() + " " + this.vx.toString() + " " + this.Zx.toString()
	};

	function wo() {
		this.uk = this.Wj = qc;
		this.sk = this.Uj = NaN;
		this.rk = this.Tj = qr;
		this.tk = this.Vj = NaN;
		this.vt = this.Cr = null;
		this.wt = this.Dr = Infinity
	}
	wo.prototype.copy = function() {
		var a = new wo;
		a.Wj = this.Wj.S();
		a.uk = this.uk.S();
		a.Uj = this.Uj;
		a.sk = this.sk;
		a.Tj = this.Tj;
		a.rk = this.rk;
		a.Vj = this.Vj;
		a.tk = this.tk;
		a.Cr = this.Cr;
		a.vt = this.vt;
		a.Dr = this.Dr;
		a.wt = this.wt;
		return a
	};

	function V(a) {
		T.call(this, a);
		this.ya |= 4608;
		this.ns = new I(R);
		this.Zo = new I(V);
		this.Lb = this.qt = this.wl = this.os = this.ms = null;
		this.le = new tg;
		this.le.group = this
	}
	w.La(V, T);
	w.ga("Group", V);
	V.prototype.cloneProtected = function(a) {
		T.prototype.cloneProtected.call(this, a);
		this.ya &= -32769;
		a.ms = this.ms;
		a.os = this.os;
		a.wl = this.wl;
		a.qt = this.qt;
		var b = a.Ut(function(a) {
			return a instanceof Oj
		});
		a.Lb = b instanceof Oj ? b : null;
		null !== this.le ? (a.le = this.le.copy(), a.le.group = a) : (null !== a.le && (a.le.group = null), a.le = null)
	};
	V.prototype.ni = function(a) {
		T.prototype.ni.call(this, a);
		var b = a.Tp();
		for (a = a.vc; a.next();) {
			var c = a.value;
			c.H();
			c.J(8);
			c.Mt();
			if (c instanceof T) c.$f(b);
			else if (c instanceof W)
				for (c = c.Ef; c.next();) c.value.$f(b)
		}
	};
	V.prototype.Un = function(a, b, c, d, e, f, h) {
		if (a === Ff && "elements" === b)
			if (e instanceof Oj) {
				var k = e;
				null === this.Lb ? this.Lb = k : this.Lb !== k && w.k("Cannot insert a second Placeholder into the visual tree of a Group.")
			} else e instanceof C && (k = e.Ut(function(a) {
				return a instanceof Oj
			}), k instanceof Oj && (null === this.Lb ? this.Lb = k : this.Lb !== k && w.k("Cannot insert a second Placeholder into the visual tree of a Group.")));
		else a === Qf && "elements" === b && null !== this.Lb && (d === this.Lb ? this.Lb = null : d instanceof C && this.Lb.am(d) &&
			(this.Lb = null));
		T.prototype.Un.call(this, a, b, c, d, e, f, h)
	};
	V.prototype.mj = function(a, b, c, d) {
		this.vl = this.Lb;
		C.prototype.mj.call(this, a, b, c, d)
	};
	V.prototype.bm = function() {
		if (!T.prototype.bm.call(this)) return !1;
		for (var a = this.vc; a.next();) {
			var b = a.value;
			if (b instanceof T) {
				if (b.isVisible() && Fm(b)) return !1
			} else if (b instanceof W && b.isVisible() && Fm(b) && b.W !== this && b.Z !== this) return !1
		}
		return !0
	};
	w.u(V, {
		placeholder: "placeholder"
	}, function() {
		return this.Lb
	});
	w.defineProperty(V, {
		BH: "computesBoundsAfterDrag"
	}, function() {
		return 0 !== (this.ya & 2048)
	}, function(a) {
		var b = 0 !== (this.ya & 2048);
		b !== a && (w.j(a, "boolean", V, "computesBoundsAfterDrag"), this.ya ^= 2048, this.h("computesBoundsAfterDrag", b, a))
	});
	w.defineProperty(V, {
		lx: "computesBoundsIncludingLinks"
	}, function() {
		return 0 !== (this.ya & 4096)
	}, function(a) {
		w.j(a, "boolean", V, "computesBoundsIncludingLinks");
		var b = 0 !== (this.ya & 4096);
		b !== a && (this.ya ^= 4096, this.h("computesBoundsIncludingLinks", b, a))
	});
	w.defineProperty(V, {
		CH: "computesBoundsIncludingLocation"
	}, function() {
		return 0 !== (this.ya & 8192)
	}, function(a) {
		w.j(a, "boolean", V, "computesBoundsIncludingLocation");
		var b = 0 !== (this.ya & 8192);
		b !== a && (this.ya ^= 8192, this.h("computesBoundsIncludingLocation", b, a))
	});
	w.defineProperty(V, {
		mI: "handlesDragDropForMembers"
	}, function() {
		return 0 !== (this.ya & 16384)
	}, function(a) {
		w.j(a, "boolean", V, "handlesDragDropForMembers");
		var b = 0 !== (this.ya & 16384);
		b !== a && (this.ya ^= 16384, this.h("handlesDragDropForMembers", b, a))
	});
	w.u(V, {
		vc: "memberParts"
	}, function() {
		return this.ns.i
	});

	function lr(a, b) {
		if (a.ns.add(b)) {
			b instanceof V && a.Zo.add(b);
			var c = a.XI;
			if (null !== c) {
				var d = !0,
					e = a.g;
				null !== e && (d = e.Ta, e.Ta = !0);
				c(a, b);
				null !== e && (e.Ta = d)
			}
			a.isVisible() && a.ad || b.Cd(!1)
		}
		b instanceof W && !a.lx || (c = a.Lb, null === c && (c = a), c.H())
	}

	function kr(a, b) {
		if (a.ns.remove(b)) {
			b instanceof V && a.Zo.remove(b);
			var c = a.YI;
			if (null !== c) {
				var d = !0,
					e = a.g;
				null !== e && (d = e.Ta, e.Ta = !0);
				c(a, b);
				null !== e && (e.Ta = d)
			}
			a.isVisible() && a.ad || b.Cd(!0)
		}
		b instanceof W && !a.lx || (c = a.Lb, null === c && (c = a), c.H())
	}
	V.prototype.un = function() {
		if (0 < this.ns.count) {
			var a = this.g;
			if (null !== a)
				for (var b = this.ns.copy().i; b.next();) a.remove(b.value)
		}
		T.prototype.un.call(this)
	};
	w.defineProperty(V, {
		Sb: "layout"
	}, function() {
		return this.le
	}, function(a) {
		var b = this.le;
		b !== a && (null !== a && w.G(a, tg, V, "layout"), null !== b && (b.g = null, b.group = null), this.le = a, null !== a && (a.g = this.g, a.group = this), this.h("layout", b, a))
	});
	w.defineProperty(V, {
		XI: "memberAdded"
	}, function() {
		return this.ms
	}, function(a) {
		var b = this.ms;
		b !== a && (null !== a && w.j(a, "function", V, "memberAdded"), this.ms = a, this.h("memberAdded", b, a))
	});
	w.defineProperty(V, {
		YI: "memberRemoved"
	}, function() {
		return this.os
	}, function(a) {
		var b = this.os;
		b !== a && (null !== a && w.j(a, "function", V, "memberRemoved"), this.os = a, this.h("memberRemoved", b, a))
	});
	w.defineProperty(V, {
		$A: "memberValidation"
	}, function() {
		return this.wl
	}, function(a) {
		var b = this.wl;
		b !== a && (null !== a && w.j(a, "function", V, "memberValidation"), this.wl = a, this.h("memberValidation", b, a))
	});
	V.prototype.canAddMembers = function(a) {
		var b = this.g;
		if (null === b) return !1;
		b = b.pb;
		for (a = Kh(a).i; a.next();)
			if (!b.isValidMember(this, a.value)) return !1;
		return !0
	};
	V.prototype.addMembers = function(a, b) {
		var c = this.g;
		if (null === c) return !1;
		for (var c = c.pb, d = !0, e = Kh(a).i; e.next();) {
			var f = e.value;
			!b || c.isValidMember(this, f) ? f.Da = this : d = !1
		}
		return d
	};
	w.defineProperty(V, {
		ZJ: "ungroupable"
	}, function() {
		return 0 !== (this.ya & 256)
	}, function(a) {
		var b = 0 !== (this.ya & 256);
		b !== a && (w.j(a, "boolean", V, "ungroupable"), this.ya ^= 256, this.h("ungroupable", b, a))
	});
	V.prototype.canUngroup = function() {
		if (!this.ZJ) return !1;
		var a = this.layer;
		if (null !== a && !a.hx) return !1;
		a = a.g;
		return null === a || a.hx ? !0 : !1
	};
	V.prototype.$f = function(a) {
		void 0 === a && (a = null);
		var b = 0 !== (this.ya & 65536);
		T.prototype.$f.call(this, a);
		if (!b)
			for (0 !== (this.ya & 65536) !== !0 && (this.ya ^= 65536), b = this.YE(); b.next();) {
				var c = b.value;
				if (null === a || !a.contains(c)) {
					var d = c.W;
					null !== d && d !== this && d.oi(this) && !d.isVisible() ? (vr(d, c.lc), vr(d, c.Ic), c.Vb()) : (d = c.Z, null !== d && d !== this && d.oi(this) && !d.isVisible() && (vr(d, c.lc), vr(d, c.Ic), c.Vb()))
				}
			}
	};
	V.prototype.findExternalLinksConnected = V.prototype.YE = function() {
		var a = this.Tp();
		a.add(this);
		for (var b = new I(W), c = a.i; c.next();) {
			var d = c.value;
			if (d instanceof T)
				for (d = d.he; d.next();) {
					var e = d.value;
					a.contains(e) || b.add(e)
				}
		}
		return b.i
	};
	V.prototype.findExternalNodesConnected = function() {
		var a = this.Tp();
		a.add(this);
		for (var b = new I(T), c = a.i; c.next();) {
			var d = c.value;
			if (d instanceof T)
				for (d = d.he; d.next();) {
					var e = d.value,
						f = e.W;
					a.contains(f) && f !== this || b.add(f);
					e = e.Z;
					a.contains(e) && e !== this || b.add(e)
				}
		}
		return b.i
	};
	V.prototype.findContainingGroupChain = function() {
		function a(b, d) {
			null !== b && (d.add(b), a(b.Da, d))
		}
		var b = new I(V);
		a(this, b);
		return b
	};
	V.prototype.findSubGraphParts = V.prototype.Tp = function() {
		var a = new I(R);
		jh(a, this, !0, 0, !0);
		a.remove(this);
		return a
	};
	V.prototype.Cd = function(a) {
		T.prototype.Cd.call(this, a);
		for (var b = this.vc; b.next();) b.value.Cd(a)
	};
	V.prototype.collapseSubGraph = V.prototype.collapseSubGraph = function() {
		var a = this.g;
		if (null !== a && !a.xh) {
			a.xh = !0;
			var b = this.Tp();
			is(this, b, a.Ka, this);
			a.xh = !1
		}
	};

	function is(a, b, c, d) {
		for (var e = a.vc; e.next();) {
			var f = e.value;
			f.Cd(!1);
			if (f instanceof V) {
				var h = f;
				h.ad && (h.By = h.ad, is(h, b, c, d))
			}
			if (f instanceof T) f.$f(b), hl(c, f, d);
			else if (f instanceof W)
				for (f = f.Ef; f.next();) f.value.$f(b)
		}
		a.ad = !1
	}
	V.prototype.expandSubGraph = V.prototype.expandSubGraph = function() {
		var a = this.g;
		if (null !== a && !a.xh) {
			a.xh = !0;
			var b = this.Tp();
			js(this, b, a.Ka, this);
			a.xh = !1
		}
	};

	function js(a, b, c, d) {
		for (var e = a.vc; e.next();) {
			var f = e.value;
			f.Cd(!0);
			if (f instanceof V) {
				var h = f;
				h.By && (h.By = !1, js(h, b, c, d))
			}
			if (f instanceof T) f.$f(b), gl(c, f, d);
			else if (f instanceof W)
				for (f = f.Ef; f.next();) f.value.$f(b)
		}
		a.ad = !0
	}
	w.defineProperty(V, {
		ad: "isSubGraphExpanded"
	}, function() {
		return 0 !== (this.ya & 512)
	}, function(a) {
		var b = 0 !== (this.ya & 512);
		if (b !== a) {
			w.j(a, "boolean", V, "isSubGraphExpanded");
			this.ya ^= 512;
			var c = this.g;
			this.h("isSubGraphExpanded", b, a);
			b = this.OJ;
			if (null !== b) {
				var d = !0;
				null !== c && (d = c.Ta, c.Ta = !0);
				b(this);
				null !== c && (c.Ta = d)
			}
			null !== c && c.ja.lb ? null !== this.Lb && this.Lb.H() : a ? this.expandSubGraph() : this.collapseSubGraph()
		}
	});
	w.defineProperty(V, {
		By: "wasSubGraphExpanded"
	}, function() {
		return 0 !== (this.ya & 1024)
	}, function(a) {
		var b = 0 !== (this.ya & 1024);
		b !== a && (w.j(a, "boolean", V, "wasSubGraphExpanded"), this.ya ^= 1024, this.h("wasSubGraphExpanded", b, a))
	});
	w.defineProperty(V, {
		OJ: "subGraphExpandedChanged"
	}, function() {
		return this.qt
	}, function(a) {
		var b = this.qt;
		b !== a && (null !== a && w.j(a, "function", V, "subGraphExpandedChanged"), this.qt = a, this.h("subGraphExpandedChanged", b, a))
	});
	V.prototype.move = function(a) {
		var b = this.position,
			c = b.x;
		isNaN(c) && (c = 0);
		b = b.y;
		isNaN(b) && (b = 0);
		var c = a.x - c,
			b = a.y - b,
			d = w.xb(c, b);
		T.prototype.move.call(this, a);
		a = new I(W);
		for (var e = this.Tp().i; e.next();) {
			var f = e.value;
			f instanceof W && (f.si && a.add(f), f.si = !0)
		}
		for (e.reset(); e.next();)
			if (f = e.value, !(f instanceof W || f instanceof T && f.Cf)) {
				var h = f.position,
					k = f.location;
				h.I() ? (d.x = h.x + c, d.y = h.y + b, f.position = d) : k.I() && (d.x = k.x + c, d.y = k.y + b, f.location = d)
			}
		for (e.reset(); e.next();)
			if (f = e.value, f instanceof W && (f.si =
					a.contains(f), f.Mf || f.W !== this && f.Z !== this)) h = f.position, d.x = h.x + c, d.y = h.y + b, f.move(d), Bi(f) && f.Vb();
		w.v(d)
	};
	w.defineProperty(V, {
		Rn: null
	}, function() {
		return 0 !== (this.ya & 32768)
	}, function(a) {
		0 !== (this.ya & 32768) !== a && (this.ya ^= 32768)
	});

	function Oj() {
		G.call(this);
		this.lf = fd;
		this.at = new B(NaN, NaN, NaN, NaN)
	}
	w.La(Oj, G);
	w.ga("Placeholder", Oj);
	Oj.prototype.cloneProtected = function(a) {
		G.prototype.cloneProtected.call(this, a);
		a.lf = this.lf.S();
		a.at = this.at.copy()
	};
	Oj.prototype.zk = function(a) {
		if (null === this.background && null === this.kn) return !1;
		var b = this.Ja;
		return db(0, 0, b.width, b.height, a.x, a.y)
	};
	Oj.prototype.Ln = function() {
		var a = this.U;
		null !== a && (a instanceof V || a instanceof kh) || w.k("Placeholder is not inside a Group or Adornment.");
		if (a instanceof V) {
			var b = this.computeBorder(this.at),
				c = this.Wc;
			Ua(c, b.width || 0, b.height || 0);
			Bo(this, 0, 0, c.width, c.height);
			for (var d = a.vc, c = !1; d.next();)
				if (d.value.isVisible()) {
					c = !0;
					break
				}
			d = a.g;
			!c || null === d || d.Ka.cf || isNaN(b.x) || isNaN(b.y) || (c = w.K(), c.Wn(b, a.Ff), a.location = new y(c.x, c.y), w.v(c))
		} else {
			var b = this.Ca,
				c = this.Wc,
				d = this.padding,
				e = d.left + d.right,
				f = d.top +
				d.bottom;
			if (b.I()) Ua(c, b.width + e || 0, b.height + f || 0), Bo(this, -d.left, -d.top, c.width, c.height);
			else {
				var h = a.tb,
					k = h.Wa(zb, w.K()),
					b = w.lg(k.x, k.y, 0, 0);
				b.vi(h.Wa(Sb, k));
				b.vi(h.Wa(Gb, k));
				b.vi(h.Wa(Qb, k));
				a.Ui.m(b.x, b.y);
				Ua(c, b.width + e || 0, b.height + f || 0);
				Bo(this, -d.left, -d.top, c.width, c.height);
				w.v(k);
				w.Eb(b)
			}
		}
	};
	Oj.prototype.mj = function(a, b, c, d) {
		var e = this.Y;
		e.x = a;
		e.y = b;
		e.width = c;
		e.height = d
	};
	Oj.prototype.computeBorder = function(a) {
		var b = this.U;
		if (b instanceof V) {
			var c = b;
			if (c.BH && this.at.I()) {
				var d = c.g;
				if (null !== d && (d = d.$a, d instanceof oh && !d.wr && null !== d.$b && !d.$b.contains(c))) return a.assign(this.at), a
			}
		}
		var c = w.Kf(),
			d = this.computeMemberBounds(c),
			e = this.padding;
		a.m(d.x - e.left, d.y - e.top, Math.max(d.width + e.left + e.right, 0), Math.max(d.height + e.top + e.bottom, 0));
		w.Eb(c);
		b instanceof V && (c = b, c.CH && c.location.I() && a.vi(c.location));
		return a
	};
	Oj.prototype.computeMemberBounds = function(a) {
		if (!(this.U instanceof V)) return a.m(0, 0, 0, 0), a;
		for (var b = this.U, c = Infinity, d = Infinity, e = -Infinity, f = -Infinity, h = b.vc; h.next();) {
			var k = h.value;
			if (k.isVisible()) {
				if (k instanceof W) {
					var l = k;
					if (!b.lx) continue;
					if (Em(l)) continue;
					if (l.W === b || l.Z === b) continue
				}
				k = k.Y;
				k.left < c && (c = k.left);
				k.top < d && (d = k.top);
				k.right > e && (e = k.right);
				k.bottom > f && (f = k.bottom)
			}
		}
		isFinite(c) && isFinite(d) ? a.m(c, d, e - c, f - d) : (b = b.location, c = this.padding, a.m(b.x + c.left, b.y + c.top, 0, 0));
		return a
	};
	w.defineProperty(Oj, {
		padding: "padding"
	}, function() {
		return this.lf
	}, function(a) {
		"number" === typeof a ? a = new hb(a) : w.G(a, hb, Oj, "padding");
		var b = this.lf;
		b.L(a) || (this.lf = a = a.S(), this.h("padding", b, a))
	});

	function tg() {
		0 < arguments.length && w.nd(tg);
		w.oc(this);
		this.rz = this.aa = null;
		this.pl = this.Tr = !0;
		this.Zr = !1;
		this.Pq = (new y(0, 0)).freeze();
		this.Vr = this.Wr = !0;
		this.OC = "";
		this.Yr = !1;
		this.Fz = null
	}
	w.ga("Layout", tg);
	tg.prototype.cloneProtected = function(a) {
		a.Tr = this.Tr;
		a.pl = this.pl;
		a.Zr = this.Zr;
		a.Pq.assign(this.Pq);
		a.Wr = this.Wr;
		a.Vr = this.Vr;
		a.OC = this.OC;
		a.Yr = !0
	};
	tg.prototype.copy = function() {
		var a = new this.constructor;
		this.cloneProtected(a);
		return a
	};
	tg.prototype.ic = function(a) {
		w.Ij(this, a)
	};
	tg.prototype.toString = function() {
		var a = w.of(Object.getPrototypeOf(this)),
			a = a + "(";
		null !== this.group && (a += " in " + this.group);
		null !== this.g && (a += " for " + this.g);
		return a + ")"
	};
	w.defineProperty(tg, {
		g: "diagram"
	}, function() {
		return this.aa
	}, function(a) {
		null !== a && w.G(a, D, tg, "diagram");
		this.aa = a
	});
	w.defineProperty(tg, {
		group: "group"
	}, function() {
		return this.rz
	}, function(a) {
		this.rz !== a && (null !== a && w.G(a, V, tg, "group"), this.rz = a, null !== a && (this.aa = a.g))
	});
	w.defineProperty(tg, {
		DI: "isOngoing"
	}, function() {
		return this.Tr
	}, function(a) {
		this.Tr !== a && (w.j(a, "boolean", tg, "isOngoing"), this.Tr = a)
	});
	w.defineProperty(tg, {
		DF: "isInitial"
	}, function() {
		return this.pl
	}, function(a) {
		w.j(a, "boolean", tg, "isInitial");
		this.pl = a;
		a || (this.Yr = !0)
	});
	w.defineProperty(tg, {
		Mx: "isViewportSized"
	}, function() {
		return this.Zr
	}, function(a) {
		this.Zr !== a && (w.j(a, "boolean", tg, "isViewportSized"), (this.Zr = a) && this.J())
	});
	w.defineProperty(tg, {
		uu: "isRouting"
	}, function() {
		return this.Wr
	}, function(a) {
		this.Wr !== a && (w.j(a, "boolean", tg, "isRouting"), this.Wr = a)
	});
	w.defineProperty(tg, {
		GF: "isRealtime"
	}, function() {
		return this.Vr
	}, function(a) {
		this.Vr !== a && (w.j(a, "boolean", tg, "isRealtime"), this.Vr = a)
	});
	w.defineProperty(tg, {
		rf: "isValidLayout"
	}, function() {
		return this.Yr
	}, function(a) {
		this.Yr !== a && (w.j(a, "boolean", tg, "isValidLayout"), this.Yr = a, a || (a = this.g, null !== a && (a.dl = !0)))
	});
	tg.prototype.invalidateLayout = tg.prototype.J = function() {
		if (this.rf) {
			var a = this.g;
			if (null !== a && !a.ja.lb) {
				var b = a.Ka;
				!b.Po && (b.cf && b.Gh(), this.DI && a.Fn || this.DF && !a.Fn) && (this.rf = !1, a.Ne())
			}
		}
	};
	w.defineProperty(tg, {
		network: "network"
	}, function() {
		return this.Fz
	}, function(a) {
		var b = this.Fz;
		b !== a && (null !== a && w.G(a, ug, tg, "network"), null !== b && (b.Sb = null), this.Fz = a, null !== a && (a.Sb = this))
	});
	tg.prototype.createNetwork = function() {
		return new ug
	};
	tg.prototype.makeNetwork = function(a) {
		var b = this.createNetwork();
		b.Sb = this;
		a instanceof D ? (b.wk(a.ig, !0), b.wk(a.links, !0)) : a instanceof V ? b.wk(a.vc) : b.wk(a.i);
		return b
	};
	tg.prototype.updateParts = function() {
		var a = this.g;
		if (null === a && null !== this.network)
			for (var b = this.network.vertexes.i; b.next();) {
				var c = b.value.Qc;
				if (null !== c && (a = c.g, null !== a)) break
			}
		this.rf = !0;
		try {
			null !== a && a.Hb("Layout"), this.commitLayout()
		} finally {
			null !== a && a.Yc("Layout")
		}
	};
	tg.prototype.commitLayout = function() {
		for (var a = this.network.vertexes.i; a.next();) a.value.commit();
		if (this.uu)
			for (a = this.network.edges.i; a.next();) a.value.commit()
	};
	tg.prototype.doLayout = function(a) {
		null === a && w.k("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");
		var b = new I(R);
		a instanceof D ? (ks(this, b, a.ig, !0, this.Rn, !0, !1, !0), ks(this, b, a.Pk, !0, this.Rn, !0, !1, !0)) : a instanceof V ? ks(this, b, a.vc, !1, this.Rn, !0, !1, !0) : b.Nc(a.i);
		var c = b.count;
		if (0 < c) {
			a = this.g;
			null !== a && a.Hb("Layout");
			c = Math.ceil(Math.sqrt(c));
			this.Nd = this.initialOrigin(this.Nd);
			for (var d = this.Nd.x, e = d, f = this.Nd.y, h = 0, k = 0, b = b.i; b.next();) {
				var l =
					b.value;
				l.$e();
				var m = l.za,
					n = m.width,
					m = m.height;
				l.moveTo(e, f);
				l instanceof V && (l.Rn = !1);
				e += Math.max(n, 50) + 20;
				k = Math.max(k, Math.max(m, 50));
				h >= c - 1 ? (h = 0, e = d, f += k + 20, k = 0) : h++
			}
			null !== a && a.Yc("Layout")
		}
		this.rf = !0
	};
	tg.prototype.Rn = function(a) {
		return !a.location.I() || a instanceof V && a.Rn ? !0 : !1
	};

	function ks(a, b, c, d, e, f, h, k) {
		for (c = c.i; c.next();) {
			var l = c.value;
			d && !l.cq || null !== e && !e(l) || !l.canLayout() || (f && l instanceof T ? l.Cf || (l instanceof V ? null === l.Sb ? ks(a, b, l.vc, !1, e, f, h, k) : (ls(l), b.add(l)) : (ls(l), b.add(l))) : h && l instanceof W ? b.add(l) : !k || !l.fe() || l instanceof T || (ls(l), b.add(l)))
		}
	}

	function ls(a) {
		var b = a.Y;
		(0 === b.width || 0 === b.height || isNaN(b.width) || isNaN(b.height)) && a.$e()
	}
	tg.prototype.collectParts = tg.prototype.wH = function(a) {
		var b = new I(R);
		a instanceof D ? (ks(this, b, a.ig, !0, null, !0, !0, !0), ks(this, b, a.links, !0, null, !0, !0, !0), ks(this, b, a.Pk, !0, null, !0, !0, !0)) : a instanceof V ? ks(this, b, a.vc, !1, null, !0, !0, !0) : ks(this, b, a.i, !1, null, !0, !0, !0);
		return b
	};
	w.defineProperty(tg, {
		Nd: "arrangementOrigin"
	}, function() {
		return this.Pq
	}, function(a) {
		w.G(a, y, tg, "arrangementOrigin");
		this.Pq.L(a) || (this.Pq.assign(a), this.J())
	});
	tg.prototype.initialOrigin = function(a) {
		var b = this.group;
		if (null !== b) {
			var c = b.position.copy();
			(isNaN(c.x) || isNaN(c.y)) && c.set(a);
			b = b.placeholder;
			null !== b && (c = b.Wa(zb), (isNaN(c.x) || isNaN(c.y)) && c.set(a), c.x += b.padding.left, c.y += b.padding.top);
			return c
		}
		return a
	};

	function ug() {
		w.oc(this);
		this.le = null;
		if (this.vertexes)
			for (var a = this.vertexes.i; a.next();) {
				var b = a.value;
				b.clear();
				b.network = null
			}
		if (this.edges)
			for (a = this.edges.i; a.next();) b = a.value, b.clear(), b.network = null;
		this.vertexes = new I(ms);
		this.edges = new I(ns);
		this.Wx = new ma(T, ms);
		this.Rx = new ma(W, ns)
	}
	w.ga("LayoutNetwork", ug);
	ug.prototype.clear = function() {
		if (this.vertexes)
			for (var a = this.vertexes.i; a.next();) {
				var b = a.value;
				b.clear();
				b.network = null
			}
		if (this.edges)
			for (a = this.edges.i; a.next();) b = a.value, b.clear(), b.network = null;
		this.vertexes = new I(ms);
		this.edges = new I(ns);
		this.Wx = new ma(T, ms);
		this.Rx = new ma(W, ns)
	};
	ug.prototype.toString = function(a) {
		void 0 === a && (a = 0);
		var b = "LayoutNetwork" + (null !== this.Sb ? "(" + this.Sb.toString() + ")" : "");
		if (0 >= a) return b;
		b += " vertexes: " + this.vertexes.count + " edges: " + this.edges.count;
		if (1 < a) {
			for (var c = this.vertexes.i; c.next();) b += "\n    " + c.value.toString(a - 1);
			for (c = this.edges.i; c.next();) b += "\n    " + c.value.toString(a - 1)
		}
		return b
	};
	w.defineProperty(ug, {
		Sb: "layout"
	}, function() {
		return this.le
	}, function(a) {
		this.le = a
	});
	ug.prototype.createVertex = function() {
		return new ms
	};
	ug.prototype.createEdge = function() {
		return new ns
	};
	ug.prototype.addParts = ug.prototype.wk = function(a, b, c) {
		if (null !== a) {
			void 0 === b && (b = !1);
			w.j(b, "boolean", ug, "addParts:toplevelonly");
			void 0 === c && (c = null);
			null === c && (c = function(a) {
				if (a instanceof T) return !a.Cf;
				if (a instanceof W) {
					var b = a.W;
					if (null === b || b.Cf) return !1;
					a = a.Z;
					return null === a || a.Cf ? !1 : !0
				}
				return !1
			});
			for (a = a.i; a.next();) {
				var d = a.value;
				if (d instanceof T && (!b || d.cq) && d.canLayout() && c(d))
					if (d instanceof V && null === d.Sb) this.wk(d.vc, !1);
					else if (null === this.xn(d)) {
					var e = this.createVertex();
					e.Qc = d;
					this.Jl(e)
				}
			}
			for (a.reset(); a.next();)
				if (d = a.value, d instanceof W && (!b || d.cq) && d.canLayout() && c(d) && null === this.xx(d)) {
					var f = d.W,
						e = d.Z;
					null !== f && null !== e && f !== e && (f = this.findGroupVertex(f), e = this.findGroupVertex(e), null !== f && null !== e && this.hq(f, e, d))
				}
		}
	};
	ug.prototype.findGroupVertex = function(a) {
		if (null === a) return null;
		var b = a.findVisibleNode();
		if (null === b) return null;
		a = this.xn(b);
		if (null !== a) return a;
		for (b = b.Da; null !== b;) {
			a = this.xn(b);
			if (null !== a) return a;
			b = b.Da
		}
		return null
	};
	ug.prototype.addVertex = ug.prototype.Jl = function(a) {
		if (null !== a) {
			this.vertexes.add(a);
			var b = a.Qc;
			null !== b && this.Wx.add(b, a);
			a.network = this
		}
	};
	ug.prototype.addNode = ug.prototype.Gt = function(a) {
		if (null === a) return null;
		var b = this.xn(a);
		null === b && (b = this.createVertex(), b.Qc = a, this.Jl(b));
		return b
	};
	ug.prototype.deleteVertex = ug.prototype.SE = function(a) {
		if (null !== a && os(this, a)) {
			for (var b = a.Qe, c = b.count - 1; 0 <= c; c--) {
				var d = b.ea(c);
				this.Op(d)
			}
			b = a.Je;
			for (c = b.count - 1; 0 <= c; c--) d = b.ea(c), this.Op(d)
		}
	};

	function os(a, b) {
		if (null === b) return !1;
		var c = a.vertexes.remove(b);
		c && (a.Wx.remove(b.Qc), b.network = null);
		return c
	}
	ug.prototype.deleteNode = function(a) {
		null !== a && (a = this.xn(a), null !== a && this.SE(a))
	};
	ug.prototype.findVertex = ug.prototype.xn = function(a) {
		return null === a ? null : this.Wx.ka(a)
	};
	ug.prototype.addEdge = ug.prototype.Bp = function(a) {
		if (null !== a) {
			this.edges.add(a);
			var b = a.link;
			null !== b && null === this.xx(b) && this.Rx.add(b, a);
			b = a.toVertex;
			null !== b && b.wE(a);
			b = a.fromVertex;
			null !== b && b.uE(a);
			a.network = this
		}
	};
	ug.prototype.addLink = function(a) {
		if (null === a) return null;
		var b = a.W,
			c = a.Z,
			d = this.xx(a);
		null === d ? (d = this.createEdge(), d.link = a, null !== b && (d.fromVertex = this.Gt(b)), null !== c && (d.toVertex = this.Gt(c)), this.Bp(d)) : (d.fromVertex = null !== b ? this.Gt(b) : null, d.toVertex = null !== c ? this.Gt(c) : null);
		return d
	};
	ug.prototype.deleteEdge = ug.prototype.Op = function(a) {
		if (null !== a) {
			var b = a.toVertex;
			null !== b && b.RE(a);
			b = a.fromVertex;
			null !== b && b.QE(a);
			ps(this, a)
		}
	};

	function ps(a, b) {
		null !== b && a.edges.remove(b) && (a.Rx.remove(b.link), b.network = null)
	}
	ug.prototype.deleteLink = function(a) {
		null !== a && (a = this.xx(a), null !== a && this.Op(a))
	};
	ug.prototype.findEdge = ug.prototype.xx = function(a) {
		return null === a ? null : this.Rx.ka(a)
	};
	ug.prototype.linkVertexes = ug.prototype.hq = function(a, b, c) {
		if (null === a || null === b) return null;
		if (a.network === this && b.network === this) {
			var d = this.createEdge();
			d.link = c;
			d.fromVertex = a;
			d.toVertex = b;
			this.Bp(d);
			return d
		}
		return null
	};
	ug.prototype.reverseEdge = ug.prototype.my = function(a) {
		if (null !== a) {
			var b = a.fromVertex,
				c = a.toVertex;
			null !== b && null !== c && (b.QE(a), c.RE(a), a.my(), b.wE(a), c.uE(a))
		}
	};
	ug.prototype.deleteSelfEdges = ug.prototype.sx = function() {
		for (var a = w.cb(), b = this.edges.i; b.next();) {
			var c = b.value;
			c.fromVertex === c.toVertex && a.push(c)
		}
		b = a.length;
		for (c = 0; c < b; c++) this.Op(a[c]);
		w.ta(a)
	};
	ug.prototype.deleteArtificialVertexes = function() {
		for (var a = w.cb(), b = this.vertexes.i; b.next();) {
			var c = b.value;
			null === c.Qc && a.push(c)
		}
		for (var c = a.length, d = 0; d < c; d++) this.SE(a[d]);
		b = w.cb();
		for (c = this.edges.i; c.next();) d = c.value, null === d.link && b.push(d);
		c = b.length;
		for (d = 0; d < c; d++) this.Op(b[d]);
		w.ta(a);
		w.ta(b)
	};

	function qs(a) {
		for (var b = w.cb(), c = a.edges.i; c.next();) {
			var d = c.value;
			null !== d.fromVertex && null !== d.toVertex || b.push(d)
		}
		c = b.length;
		for (d = 0; d < c; d++) a.Op(b[d]);
		w.ta(b)
	}
	ug.prototype.splitIntoSubNetworks = ug.prototype.NJ = function() {
		this.deleteArtificialVertexes();
		qs(this);
		this.sx();
		for (var a = new H(ug), b = !0; b;)
			for (var b = !1, c = this.vertexes.i; c.next();) {
				var d = c.value;
				if (0 < d.Qe.count || 0 < d.Je.count) {
					b = this.Sb.createNetwork();
					a.add(b);
					rs(this, b, d);
					b = !0;
					break
				}
			}
		a.sort(function(a, b) {
			return null === a || null === b || a === b ? 0 : b.vertexes.count - a.vertexes.count
		});
		return a
	};

	function rs(a, b, c) {
		if (null !== c && c.network !== b) {
			os(a, c);
			b.Jl(c);
			for (var d = c.nc; d.next();) {
				var e = d.value;
				e.network !== b && (ps(a, e), b.Bp(e), rs(a, b, e.fromVertex))
			}
			for (d = c.kc; d.next();) c = d.value, c.network !== b && (ps(a, c), b.Bp(c), rs(a, b, c.toVertex))
		}
	}
	ug.prototype.findAllParts = function() {
		for (var a = new I(R), b = this.vertexes.i; b.next();) a.add(b.value.Qc);
		for (b = this.edges.i; b.next();) a.add(b.value.link);
		return a
	};

	function ms() {
		w.oc(this);
		this.network = null;
		this.M = (new B(0, 0, 10, 10)).freeze();
		this.T = (new y(5, 5)).freeze();
		this.vd = this.Zd = null;
		this.Qe = new H(ns);
		this.Je = new H(ns)
	}
	w.ga("LayoutVertex", ms);
	ms.prototype.clear = function() {
		this.vd = this.Zd = null;
		this.Qe = new H(ns);
		this.Je = new H(ns)
	};
	ms.prototype.toString = function(a) {
		void 0 === a && (a = 0);
		var b = "LayoutVertex#" + w.Pd(this);
		if (0 < a && (b += null !== this.Qc ? "(" + this.Qc.toString() + ")" : "", 1 < a)) {
			a = "";
			for (var c = !0, d = this.Qe.i; d.next();) {
				var e = d.value;
				c ? c = !1 : a += ",";
				a += e.toString(0)
			}
			e = "";
			c = !0;
			for (d = this.Je.i; d.next();) {
				var f = d.value;
				c ? c = !1 : e += ",";
				e += f.toString(0)
			}
			b += " sources: " + a + " destinations: " + e
		}
		return b
	};
	w.defineProperty(ms, {
		data: "data"
	}, function() {
		return this.Zd
	}, function(a) {
		this.Zd = a;
		if (null !== a) {
			var b = a.bounds;
			a = b.x;
			var c = b.y,
				d = b.width,
				b = b.height;
			this.T.m(d / 2, b / 2);
			this.M.m(a, c, d, b)
		}
	});
	w.defineProperty(ms, {
		Qc: "node"
	}, function() {
		return this.vd
	}, function(a) {
		if (this.vd !== a) {
			this.vd = a;
			a.$e();
			var b = a.Y,
				c = b.x,
				d = b.y,
				e = b.width,
				b = b.height;
			isNaN(c) && (c = 0);
			isNaN(d) && (d = 0);
			this.M.m(c, d, e, b);
			if (!(a instanceof V) && (a = a.bg.Wa(Jb), a.I())) {
				this.T.m(a.x - c, a.y - d);
				return
			}
			this.T.m(e / 2, b / 2)
		}
	});
	w.defineProperty(ms, {
		gb: "bounds"
	}, function() {
		return this.M
	}, function(a) {
		this.M.L(a) || this.M.assign(a)
	});
	w.defineProperty(ms, {
		focus: "focus"
	}, function() {
		return this.T
	}, function(a) {
		this.T.L(a) || this.T.assign(a)
	});
	w.defineProperty(ms, {
		la: "centerX"
	}, function() {
		return this.M.x + this.T.x
	}, function(a) {
		var b = this.M;
		b.x + this.T.x !== a && (b.Qa(), b.x = a - this.T.x, b.freeze())
	});
	w.defineProperty(ms, {
		ra: "centerY"
	}, function() {
		return this.M.y + this.T.y
	}, function(a) {
		var b = this.M;
		b.y + this.T.y !== a && (b.Qa(), b.y = a - this.T.y, b.freeze())
	});
	w.defineProperty(ms, {
		bu: "focusX"
	}, function() {
		return this.T.x
	}, function(a) {
		var b = this.T;
		b.x !== a && (b.Qa(), b.x = a, b.freeze())
	});
	w.defineProperty(ms, {
		cu: "focusY"
	}, function() {
		return this.T.y
	}, function(a) {
		var b = this.T;
		b.y !== a && (b.Qa(), b.y = a, b.freeze())
	});
	w.defineProperty(ms, {
		x: "x"
	}, function() {
		return this.M.x
	}, function(a) {
		var b = this.M;
		b.x !== a && (b.Qa(), b.x = a, b.freeze())
	});
	w.defineProperty(ms, {
		y: "y"
	}, function() {
		return this.M.y
	}, function(a) {
		var b = this.M;
		b.y !== a && (b.Qa(), b.y = a, b.freeze())
	});
	w.defineProperty(ms, {
		width: "width"
	}, function() {
		return this.M.width
	}, function(a) {
		var b = this.M;
		b.width !== a && (b.Qa(), b.width = a, b.freeze())
	});
	w.defineProperty(ms, {
		height: "height"
	}, function() {
		return this.M.height
	}, function(a) {
		var b = this.M;
		b.height !== a && (b.Qa(), b.height = a, b.freeze())
	});
	ms.prototype.commit = function() {
		var a = this.Zd;
		if (null !== a) {
			var b = this.gb,
				c = a.bounds;
			w.Pa(c) ? (c.x = b.x, c.y = b.y, c.width = b.width, c.height = b.height) : a.bounds = b.copy()
		} else if (a = this.Qc, null !== a) {
			b = this.gb;
			if (!(a instanceof V)) {
				var c = a.Y,
					d = a.bg.Wa(Jb);
				if (c.I() && d.I()) {
					a.moveTo(b.x + this.bu - (d.x - c.x), b.y + this.cu - (d.y - c.y));
					return
				}
			}
			a.moveTo(b.x, b.y)
		}
	};
	ms.prototype.addSourceEdge = ms.prototype.wE = function(a) {
		null !== a && (this.Qe.contains(a) || this.Qe.add(a))
	};
	ms.prototype.deleteSourceEdge = ms.prototype.RE = function(a) {
		null !== a && this.Qe.remove(a)
	};
	ms.prototype.addDestinationEdge = ms.prototype.uE = function(a) {
		null !== a && (this.Je.contains(a) || this.Je.add(a))
	};
	ms.prototype.deleteDestinationEdge = ms.prototype.QE = function(a) {
		null !== a && this.Je.remove(a)
	};
	w.u(ms, {
		MJ: "sourceVertexes"
	}, function() {
		for (var a = new I(ms), b = this.nc; b.next();) a.add(b.value.fromVertex);
		return a.i
	});
	w.u(ms, {
		PH: "destinationVertexes"
	}, function() {
		for (var a = new I(ms), b = this.kc; b.next();) a.add(b.value.toVertex);
		return a.i
	});
	w.u(ms, {
		vertexes: "vertexes"
	}, function() {
		for (var a = new I(ms), b = this.nc; b.next();) a.add(b.value.fromVertex);
		for (b = this.kc; b.next();) a.add(b.value.toVertex);
		return a.i
	});
	w.u(ms, {
		nc: "sourceEdges"
	}, function() {
		return this.Qe.i
	});
	w.u(ms, {
		kc: "destinationEdges"
	}, function() {
		return this.Je.i
	});
	w.u(ms, {
		edges: "edges"
	}, function() {
		for (var a = new H(ns), b = this.nc; b.next();) a.add(b.value);
		for (b = this.kc; b.next();) a.add(b.value);
		return a.i
	});
	w.u(ms, {
		UH: "edgesCount"
	}, function() {
		return this.Qe.count + this.Je.count
	});
	var ss;
	ms.standardComparer = ss = function(a, b) {
		var c = a.vd,
			d = b.vd;
		return c ? d ? (c = c.text, d = d.text, c < d ? -1 : c > d ? 1 : 0) : 1 : null !== d ? -1 : 0
	};
	ms.smartComparer = function(a, b) {
		if (null !== a) {
			if (null !== b) {
				var c = a.vd,
					d = b.vd;
				if (null !== c) {
					if (null !== d) {
						for (var c = c.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/), d = d.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/), e = 0; e < c.length; e++)
							if ("" !== d[e] && void 0 !== d[e]) {
								var f = parseFloat(c[e]),
									h = parseFloat(d[e]);
								if (isNaN(f)) {
									if (!isNaN(h)) return 1;
									if (0 !== c[e].localeCompare(d[e])) return c[e].localeCompare(d[e])
								} else {
									if (isNaN(h)) return -1;
									if (0 !== f - h) return f -
										h
								}
							} else if ("" !== c[e]) return 1;
						return "" !== d[e] && void 0 !== d[e] ? -1 : 0
					}
					return 1
				}
				return null !== d ? -1 : 0
			}
			return 1
		}
		return null !== b ? -1 : 0
	};

	function ns() {
		w.oc(this);
		this.toVertex = this.fromVertex = this.link = this.data = this.network = null
	}
	w.ga("LayoutEdge", ns);
	ns.prototype.clear = function() {
		this.toVertex = this.fromVertex = this.link = this.data = null
	};
	ns.prototype.toString = function(a) {
		void 0 === a && (a = 0);
		var b = "LayoutEdge#" + w.Pd(this);
		0 < a && (b += null !== this.link ? "(" + this.link.toString() + ")" : "", 1 < a && (b += " " + (this.fromVertex ? this.fromVertex.toString() : "null") + " --\x3e " + (this.toVertex ? this.toVertex.toString() : "null")));
		return b
	};
	ns.prototype.my = function() {
		var a = this.fromVertex;
		this.fromVertex = this.toVertex;
		this.toVertex = a
	};
	ns.prototype.commit = function() {};
	ns.prototype.getOtherVertex = ns.prototype.dI = function(a) {
		return this.toVertex === a ? this.fromVertex : this.fromVertex === a ? this.toVertex : null
	};

	function On() {
		0 < arguments.length && w.nd(On);
		tg.call(this);
		this.Mx = !0;
		this.Bt = this.Ct = NaN;
		this.Nj = (new ia(NaN, NaN)).freeze();
		this.di = (new ia(10, 10)).freeze();
		this.je = ts;
		this.pd = us;
		this.ci = vs;
		this.Mh = ws
	}
	w.La(On, tg);
	w.ga("GridLayout", On);
	On.prototype.cloneProtected = function(a) {
		tg.prototype.cloneProtected.call(this, a);
		a.Ct = this.Ct;
		a.Bt = this.Bt;
		a.Nj.assign(this.Nj);
		a.di.assign(this.di);
		a.je = this.je;
		a.pd = this.pd;
		a.ci = this.ci;
		a.Mh = this.Mh
	};
	On.prototype.ic = function(a) {
		a.Ge === On ? a === vs || a === xs || a === ys || a === zs ? this.sorting = a : a === us || a === As ? this.Vf = a : a === ts || a === Bs ? this.alignment = a : w.k("Unknown enum value: " + a) : tg.prototype.ic.call(this, a)
	};
	On.prototype.doLayout = function(a) {
		null === a && w.k("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");
		this.Nd = this.initialOrigin(this.Nd);
		var b = this.g;
		a = this.wH(a);
		for (var c = a.copy().i; c.next();) {
			var d = c.value;
			if (d instanceof W) {
				var e = d;
				if (null !== e.W || null !== e.Z) {
					a.remove(e);
					continue
				}
			}
			d.$e();
			if (d instanceof V)
				for (d = d.vc; d.next();) a.remove(d.value)
		}
		e = a.xc();
		if (0 !== e.length) {
			switch (this.sorting) {
				case zs:
					e.reverse();
					break;
				case vs:
					e.sort(this.comparer);
					break;
				case xs:
					e.sort(this.comparer), e.reverse()
			}
			var f = this.cK;
			isNaN(f) && (f = 0);
			var h = this.MG,
				h = isNaN(h) && null !== b ? Math.max(b.rb.width - b.padding.left - b.padding.right, 0) : Math.max(this.MG, 0);
			0 >= f && 0 >= h && (f = 1);
			a = this.spacing.width;
			isFinite(a) || (a = 0);
			c = this.spacing.height;
			isFinite(c) || (c = 0);
			null !== b && b.Hb("Layout");
			d = [];
			switch (this.alignment) {
				case Bs:
					var k = a,
						l = c,
						m = Math.max(this.Fp.width, 1);
					if (!isFinite(m))
						for (var n = m = 0; n < e.length; n++) var p = e[n],
							q = p.za,
							m = Math.max(m, q.width);
					var m = Math.max(m + k, 1),
						r = Math.max(this.Fp.height,
							1);
					if (!isFinite(r))
						for (n = r = 0; n < e.length; n++) p = e[n], q = p.za, r = Math.max(r, q.height);
					for (var r = Math.max(r + l, 1), s = this.Vf, u = this.Nd.x, t = u, x = this.Nd.y, v = 0, z = 0, n = 0; n < e.length; n++) {
						var p = e[n],
							q = p.za,
							A = Math.ceil((q.width + k) / m) * m,
							L = Math.ceil((q.height + l) / r) * r,
							E = 0;
						switch (s) {
							case As:
								E = Math.abs(t - q.width);
								break;
							default:
								E = t + q.width
						}
						if (0 < f && v > f - 1 || 0 < h && 0 < v && E > h) d.push(new B(0, x, h + k, z)), v = 0, t = u, x += z, z = 0;
						z = Math.max(z, L);
						L = 0;
						switch (s) {
							case As:
								L = -q.width;
								break;
							default:
								L = 0
						}
						p.moveTo(t + L, x);
						switch (s) {
							case As:
								t -= A;
								break;
							default:
								t += A
						}
						v++
					}
					d.push(new B(0, x, h + k, z));
					break;
				case ts:
					k = f;
					l = a;
					m = c;
					n = Math.max(this.Fp.width, 1);
					p = x = A = 0;
					q = w.K();
					for (f = 0; f < e.length; f++) r = e[f], s = r.za, u = dr(r, r.bg, r.Ff, q), A = Math.max(A, u.x), x = Math.max(x, s.width - u.x), p = Math.max(p, u.y);
					t = this.Vf;
					switch (t) {
						case As:
							A += l;
							break;
						default:
							x += l
					}
					var n = isFinite(n) ? Math.max(n + l, 1) : Math.max(A + x, 1),
						P = x = this.Nd.x,
						v = this.Nd.y,
						z = 0;
					h >= A && (h -= A);
					for (var A = L = 0, E = Math.max(this.Fp.height, 1), $ = p = 0, S = !0, ba = w.K(), f = 0; f < e.length; f++) {
						r = e[f];
						s = r.za;
						u = dr(r, r.bg, r.Ff, q);
						if (0 < z) switch (t) {
							case As:
								P =
									(P - x - (s.width - u.x)) / n;
								P = Wa(Math.round(P), P) ? Math.round(P) : Math.floor(P);
								P = P * n + x;
								break;
							default:
								P = (P - x + u.x) / n, P = Wa(Math.round(P), P) ? Math.round(P) : Math.ceil(P), P = P * n + x
						} else switch (t) {
							case As:
								L = P + u.x + s.width;
								break;
							default:
								L = P - u.x
						}
						var ha = 0;
						switch (t) {
							case As:
								ha = -(P + u.x) + L;
								break;
							default:
								ha = P + s.width - u.x - L
						}
						if (0 < k && z > k - 1 || 0 < h && 0 < z && ha > h) {
							d.push(new B(0, S ? v - p : v, h + l, $ + p + m));
							for (P = 0; P < z && f !== z; P++) {
								var ha = e[f - z + P],
									ya = dr(ha, ha.bg, ha.Ff, ba);
								ha.moveTo(ha.position.x, ha.position.y + p - ya.y)
							}
							$ += m;
							v = S ? v + $ : v + ($ + p);
							z = $ =
								p = 0;
							P = x;
							S = !1
						}
						P === x && (A = t === As ? Math.max(A, s.width - u.x) : Math.min(A, -u.x));
						p = Math.max(p, u.y);
						$ = Math.max($, s.height - u.y);
						isFinite(E) && ($ = Math.max($, Math.max(s.height, E) - u.y));
						S ? r.moveTo(P - u.x, v - u.y) : r.moveTo(P - u.x, v);
						switch (t) {
							case As:
								P -= u.x + l;
								break;
							default:
								P += s.width - u.x + l
						}
						z++
					}
					d.push(new B(0, v, h + l, (S ? $ : $ + p) + m));
					for (P = 0; P < z && f !== z; P++) ha = e[f - z + P], ya = dr(ha, ha.bg, ha.Ff, q), ha.moveTo(ha.position.x, ha.position.y + p - ya.y);
					w.v(q);
					w.v(ba);
					if (t === As)
						for (f = 0; f < d.length; f++) e = d[f], e.width += A, e.x -= A;
					else
						for (f = 0; f <
							d.length; f++) e = d[f], e.x > A && (e.width += e.x - A, e.x = A)
			}
			for (k = f = h = e = 0; k < d.length; k++) l = d[k], e = Math.min(e, l.x), h = Math.min(h, l.y), f = Math.max(f, l.x + l.width);
			this.Vf === As ? this.commitLayers(d, new y(e + a / 2 - (f + e), h - c / 2)) : this.commitLayers(d, new y(e - a / 2, h - c / 2));
			null !== b && b.Yc("Layout");
			this.rf = !0
		}
	};
	On.prototype.commitLayers = function() {};
	w.defineProperty(On, {
		MG: "wrappingWidth"
	}, function() {
		return this.Ct
	}, function(a) {
		this.Ct !== a && (w.j(a, "number", On, "wrappingWidth"), 0 < a || isNaN(a)) && (this.Ct = a, this.Mx = isNaN(a), this.J())
	});
	w.defineProperty(On, {
		cK: "wrappingColumn"
	}, function() {
		return this.Bt
	}, function(a) {
		this.Bt !== a && (w.j(a, "number", On, "wrappingColumn"), 0 < a || isNaN(a)) && (this.Bt = a, this.J())
	});
	w.defineProperty(On, {
		Fp: "cellSize"
	}, function() {
		return this.Nj
	}, function(a) {
		w.G(a, ia, On, "cellSize");
		this.Nj.L(a) || (this.Nj.assign(a), this.J())
	});
	w.defineProperty(On, {
		spacing: "spacing"
	}, function() {
		return this.di
	}, function(a) {
		w.G(a, ia, On, "spacing");
		this.di.L(a) || (this.di.assign(a), this.J())
	});
	w.defineProperty(On, {
		alignment: "alignment"
	}, function() {
		return this.je
	}, function(a) {
		this.je !== a && (w.ob(a, On, On, "alignment"), a === ts || a === Bs) && (this.je = a, this.J())
	});
	w.defineProperty(On, {
		Vf: "arrangement"
	}, function() {
		return this.pd
	}, function(a) {
		this.pd !== a && (w.ob(a, On, On, "arrangement"), a === us || a === As) && (this.pd = a, this.J())
	});
	w.defineProperty(On, {
		sorting: "sorting"
	}, function() {
		return this.ci
	}, function(a) {
		this.ci !== a && (w.ob(a, On, On, "sorting"), a === ys || a === zs || a === vs || a === xs) && (this.ci = a, this.J())
	});
	w.defineProperty(On, {
		comparer: "comparer"
	}, function() {
		return this.Mh
	}, function(a) {
		this.Mh !== a && (w.j(a, "function", On, "comparer"), this.Mh = a, this.J())
	});
	var ws;
	On.standardComparer = ws = function(a, b) {
		var c = a.text,
			d = b.text;
		return c < d ? -1 : c > d ? 1 : 0
	};
	On.smartComparer = function(a, b) {
		if (null !== a) {
			if (null !== b) {
				for (var c = a.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/), d = b.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/), e = 0; e < c.length; e++)
					if ("" !== d[e] && void 0 !== d[e]) {
						var f = parseFloat(c[e]),
							h = parseFloat(d[e]);
						if (isNaN(f)) {
							if (!isNaN(h)) return 1;
							if (0 !== c[e].localeCompare(d[e])) return c[e].localeCompare(d[e])
						} else {
							if (isNaN(h)) return -1;
							if (0 !== f - h) return f - h
						}
					} else if ("" !== c[e]) return 1;
				return "" !==
					d[e] && void 0 !== d[e] ? -1 : 0
			}
			return 1
		}
		return null !== b ? -1 : 0
	};
	var Bs;
	On.Position = Bs = w.p(On, "Position", 0);
	var ts;
	On.Location = ts = w.p(On, "Location", 1);
	var us;
	On.LeftToRight = us = w.p(On, "LeftToRight", 2);
	var As;
	On.RightToLeft = As = w.p(On, "RightToLeft", 3);
	var ys;
	On.Forward = ys = w.p(On, "Forward", 4);
	var zs;
	On.Reverse = zs = w.p(On, "Reverse", 5);
	var vs;
	On.Ascending = vs = w.p(On, "Ascending", 6);
	var xs;
	On.Descending = xs = w.p(On, "Descending", 7);

	function Cs() {
		0 < arguments.length && w.nd(Cs);
		tg.call(this);
		this.iz = this.Bo = this.Fd = 0;
		this.xr = 360;
		this.hz = Ds;
		this.il = 0;
		this.eC = new y;
		this.UC = Ds;
		this.wv = this.Uf = this.iE = 0;
		this.Vw = new Es;
		this.xv = this.Sm = 0;
		this.$G = 600;
		this.Ps = NaN;
		this.Rq = 1;
		this.pt = 0;
		this.rt = 360;
		this.pd = Ds;
		this.ba = Fs;
		this.ci = Gs;
		this.Mh = ss;
		this.di = 6;
		this.Cs = Hs
	}
	w.La(Cs, tg);
	w.ga("CircularLayout", Cs);
	Cs.prototype.cloneProtected = function(a) {
		tg.prototype.cloneProtected.call(this, a);
		a.Ps = this.Ps;
		a.Rq = this.Rq;
		a.pt = this.pt;
		a.rt = this.rt;
		a.pd = this.pd;
		a.ba = this.ba;
		a.ci = this.ci;
		a.Mh = this.Mh;
		a.di = this.di;
		a.Cs = this.Cs
	};
	Cs.prototype.ic = function(a) {
		if (a.Ge === Cs)
			if (a === Is || a === Js || a === Ks || a === Ls || a === Gs) this.sorting = a;
			else if (a === Ms || a === Ns || a === Fs || a === Os) this.direction = a;
		else if (a === Ps || a === Qs || a === Ds || a === Rs) this.Vf = a;
		else {
			if (a === Ss || a === Hs) this.Vx = a
		} else tg.prototype.ic.call(this, a)
	};
	Cs.prototype.createNetwork = function() {
		return new Ts
	};
	Cs.prototype.doLayout = function(a) {
		null === a && w.k("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");
		null === this.network && (this.network = this.makeNetwork(a));
		this.Nd = this.initialOrigin(this.Nd);
		a = this.network.vertexes;
		if (1 >= a.count) 1 === a.count && (a = a.first(), a.la = 0, a.ra = 0);
		else {
			var b = new H(Us);
			b.Nc(a.i);
			a = new H(Us);
			var c = new H(Us),
				d;
			d = this.sort(b);
			var e = this.hz,
				f = this.UC,
				h = this.Fd,
				k = this.Bo,
				l = this.iz,
				m = this.xr,
				b = this.il,
				n = this.iE,
				p = this.Uf,
				q = this.wv,
				e = this.Vf,
				f = this.Vx,
				h = this.mJ;
			if (!isFinite(h) || 0 >= h) h = NaN;
			k = this.qH;
			if (!isFinite(k) || 0 >= k) k = 1;
			l = this.ze;
			isFinite(l) || (l = 0);
			m = this.tf;
			if (!isFinite(m) || 360 < m || 1 > m) m = 360;
			b = this.spacing;
			isFinite(b) || (b = NaN);
			e === Rs && f === Ss ? e = Ds : e === Rs && f !== Ss && (f = Ss, e = this.Vf);
			if ((this.direction === Ms || this.direction === Ns) && this.sorting !== Gs) {
				for (var r = 0; !(r >= d.length); r += 2) {
					a.add(d.ea(r));
					if (r + 1 >= d.length) break;
					c.add(d.ea(r + 1))
				}
				this.direction === Ms ? (this.Vf === Rs && a.reverse(), d = new H(Us), d.Nc(a), d.Nc(c)) : (this.Vf === Rs &&
					c.reverse(), d = new H(Us), d.Nc(c), d.Nc(a))
			}
			for (var s = d.length, u = n = 0, r = 0; r < d.length; r++) {
				var p = l + m * u * (this.direction === Fs ? 1 : -1) / s,
					t = d.ea(r).diameter;
				isNaN(t) && (t = Vs(d.ea(r), p));
				360 > m && (0 === r || r === d.length - 1) && (t /= 2);
				n += t;
				u++
			}
			if (isNaN(h) || e === Rs) {
				isNaN(b) && (b = 6);
				if (e !== Ds && e !== Rs) {
					t = -Infinity;
					for (r = 0; r < s; r++) {
						var q = d.ea(r),
							x = d.ea(r === s - 1 ? 0 : r + 1);
						isNaN(q.diameter) && Vs(q, 0);
						isNaN(x.diameter) && Vs(x, 0);
						t = Math.max(t, (q.diameter + x.diameter) / 2)
					}
					q = t + b;
					e === Ps ? (p = 2 * Math.PI / s, h = (t + b) / p) : h = Ws(this, q * (360 <= m ? s : s - 1),
						k, l * Math.PI / 180, m * Math.PI / 180)
				} else h = Ws(this, n + (360 <= m ? s : s - 1) * (e !== Rs ? b : 1.6 * b), k, l * Math.PI / 180, m * Math.PI / 180);
				p = h * k
			} else if (p = h * k, u = Xs(this, h, p, l * Math.PI / 180, m * Math.PI / 180), isNaN(b)) {
				if (e === Ds || e === Rs) b = (u - n) / (360 <= m ? s : s - 1)
			} else if (e === Ds || e === Rs) r = (u - n) / (360 <= m ? s : s - 1), r < b ? (h = Ws(this, n + b * (360 <= m ? s : s - 1), k, l * Math.PI / 180, m * Math.PI / 180), p = h * k) : b = r;
			else {
				t = -Infinity;
				for (r = 0; r < s; r++) q = d.ea(r), x = d.ea(r === s - 1 ? 0 : r + 1), isNaN(q.diameter) && Vs(q, 0), isNaN(x.diameter) && Vs(x, 0), t = Math.max(t, (q.diameter + x.diameter) /
					2);
				q = t + b;
				r = Ws(this, q * (360 <= m ? s : s - 1), k, l * Math.PI / 180, m * Math.PI / 180);
				r > h ? (h = r, p = h * k) : q = u / (360 <= m ? s : s - 1)
			}
			this.hz = e;
			this.UC = f;
			this.Fd = h;
			this.Bo = k;
			this.iz = l;
			this.xr = m;
			this.il = b;
			this.iE = n;
			this.Uf = p;
			this.wv = q;
			b = d;
			d = this.hz;
			e = this.Fd;
			f = this.iz;
			k = this.xr;
			l = this.il;
			m = this.Uf;
			n = this.wv;
			if (this.direction !== Ms && this.direction !== Ns || d !== Rs)
				if (this.direction === Ms || this.direction === Ns) {
					h = 0;
					switch (d) {
						case Qs:
							h = 180 * Ys(this, e, m, f, n) / Math.PI;
							break;
						case Ds:
							n = b = 0;
							h = a.first();
							null !== h && (b = Vs(h, Math.PI / 2));
							h = c.first();
							null !==
								h && (n = Vs(h, Math.PI / 2));
							h = 180 * Ys(this, e, m, f, l + (b + n) / 2) / Math.PI;
							break;
						case Ps:
							h = k / b.length
					}
					if (this.direction === Ms) {
						switch (d) {
							case Qs:
								Zs(this, a, f, Os);
								break;
							case Ds:
								$s(this, a, f, Os);
								break;
							case Ps:
								at(this, a, k / 2, f, Os)
						}
						switch (d) {
							case Qs:
								Zs(this, c, f + h, Fs);
								break;
							case Ds:
								$s(this, c, f + h, Fs);
								break;
							case Ps:
								at(this, c, k / 2, f + h, Fs)
						}
					} else {
						switch (d) {
							case Qs:
								Zs(this, c, f, Os);
								break;
							case Ds:
								$s(this, c, f, Os);
								break;
							case Ps:
								at(this, c, k / 2, f, Os)
						}
						switch (d) {
							case Qs:
								Zs(this, a, f + h, Fs);
								break;
							case Ds:
								$s(this, a, f + h, Fs);
								break;
							case Ps:
								at(this,
									a, k / 2, f + h, Fs)
						}
					}
				} else switch (d) {
					case Qs:
						Zs(this, b, f, this.direction);
						break;
					case Ds:
						$s(this, b, f, this.direction);
						break;
					case Ps:
						at(this, b, k, f, this.direction);
						break;
					case Rs:
						bt(this, b, k, f, this.direction)
				} else bt(this, b, k, f - k / 2, Fs)
		}
		this.updateParts();
		this.network = null;
		this.rf = !0
	};

	function at(a, b, c, d, e) {
		var f = a.xr,
			h = a.Fd;
		a = a.Uf;
		d = d * Math.PI / 180;
		c = c * Math.PI / 180;
		for (var k = b.length, l = 0; l < k; l++) {
			var m = d + (e === Fs ? l * c / (360 <= f ? k : k - 1) : -(l * c) / k),
				n = b.ea(l),
				p = h * Math.tan(m) / a,
				p = Math.sqrt((h * h + a * a * p * p) / (1 + p * p));
			n.la = p * Math.cos(m);
			n.ra = p * Math.sin(m);
			n.actualAngle = 180 * m / Math.PI
		}
	}

	function $s(a, b, c, d) {
		var e = a.Fd,
			f = a.Uf,
			h = a.il;
		c = c * Math.PI / 180;
		for (var k = b.length, l = 0; l < k; l++) {
			var m = b.ea(l),
				n = b.ea(l === k - 1 ? 0 : l + 1),
				p = f * Math.sin(c);
			m.la = e * Math.cos(c);
			m.ra = p;
			m.actualAngle = 180 * c / Math.PI;
			isNaN(m.diameter) && Vs(m, 0);
			isNaN(n.diameter) && Vs(n, 0);
			m = Ys(a, e, f, d === Fs ? c : -c, (m.diameter + n.diameter) / 2 + h);
			c += d === Fs ? m : -m
		}
	}

	function Zs(a, b, c, d) {
		var e = a.Fd,
			f = a.Uf,
			h = a.wv;
		c = c * Math.PI / 180;
		for (var k = b.length, l = 0; l < k; l++) {
			var m = b.ea(l);
			m.la = e * Math.cos(c);
			m.ra = f * Math.sin(c);
			m.actualAngle = 180 * c / Math.PI;
			m = Ys(a, e, f, d === Fs ? c : -c, h);
			c += d === Fs ? m : -m
		}
	}

	function bt(a, b, c, d, e) {
		var f = a.xv,
			f = a.xr;
		a.Sm = 0;
		a.Vw = new Es;
		if (360 > c) {
			for (f = d + (e === Fs ? f : -f); 0 > f;) f += 360;
			f %= 360;
			180 < f && (f -= 360);
			f *= Math.PI / 180;
			a.xv = f;
			ct(a, b, c, d, e)
		} else dt(a, b, c, d, e);
		a.Vw.commit(b)
	}

	function dt(a, b, c, d, e) {
		var f = a.Fd,
			h = a.il,
			k = a.Bo,
			l = f * Math.cos(d * Math.PI / 180),
			m = a.Uf * Math.sin(d * Math.PI / 180),
			n = b.xc();
		if (3 === n.length) n[0].la = f, n[0].ra = 0, n[1].la = n[0].la - n[0].width / 2 - n[1].width / 2 - h, n[1].y = n[0].y, n[2].la = (n[0].la + n[1].la) / 2, n[2].y = n[0].y - n[2].height - h;
		else if (4 === n.length) n[0].la = f, n[0].ra = 0, n[2].la = -n[0].la, n[2].ra = n[0].ra, n[1].la = 0, n[1].y = Math.min(n[0].y, n[2].y) - n[1].height - h, n[3].la = 0, n[3].y = Math.max(n[0].y + n[0].height + h, n[2].y + n[2].height + h);
		else {
			for (var f = w.K(), p = 0; p < n.length; p++) {
				n[p].la =
					l;
				n[p].ra = m;
				if (p >= n.length - 1) break;
				et(a, l, m, n, p, e, f) || ft(a, l, m, n, p, e, f);
				l = f.x;
				m = f.y
			}
			w.v(f);
			a.Sm++;
			if (!(23 < a.Sm)) {
				var l = n[0].la,
					m = n[0].ra,
					f = n[n.length - 1].la,
					p = n[n.length - 1].ra,
					q = Math.abs(l - f) - ((n[0].width + n[n.length - 1].width) / 2 + h),
					r = Math.abs(m - p) - ((n[0].height + n[n.length - 1].height) / 2 + h),
					h = 0;
				1 > Math.abs(r) ? Math.abs(l - f) < (n[0].width + n[n.length - 1].width) / 2 && (h = 0) : h = 0 < r ? r : 1 > Math.abs(q) ? 0 : q;
				q = !1;
				q = Math.abs(f) > Math.abs(p) ? 0 < f !== m > p : 0 < p !== l < f;
				if (q = e === Fs ? q : !q) h = -Math.abs(h), h = Math.min(h, -n[n.length - 1].width),
					h = Math.min(h, -n[n.length - 1].height);
				a.Vw.compare(h, n);
				1 < Math.abs(h) && (a.Fd = 8 > a.Sm ? a.Fd - h / (2 * Math.PI) : 5 > n.length && 10 < h ? a.Fd / 2 : a.Fd - (0 < h ? 1.7 : -2.3), a.Uf = a.Fd * k, dt(a, b, c, d, e))
			}
		}
	}

	function ct(a, b, c, d, e) {
		for (var f = a.Fd, h = a.Uf, k = a.Bo, l = f * Math.cos(d * Math.PI / 180), m = h * Math.sin(d * Math.PI / 180), n = w.K(), p = b.xc(), q = 0; q < p.length; q++) {
			p[q].la = l;
			p[q].ra = m;
			if (q >= p.length - 1) break;
			et(a, l, m, p, q, e, n) || ft(a, l, m, p, q, e, n);
			l = n.x;
			m = n.y
		}
		w.v(n);
		a.Sm++;
		if (!(23 < a.Sm)) {
			l = Math.atan2(m, l);
			l = e === Fs ? a.xv - l : l - a.xv;
			l = Math.abs(l) < Math.abs(l - 2 * Math.PI) ? l : l - 2 * Math.PI;
			f = l * (f + h) / 2;
			h = a.Vw;
			if (Math.abs(f) < Math.abs(h.Up))
				for (h.Up = f, h.co = [], h.Fq = [], l = 0; l < p.length; l++) h.co[l] = p[l].gb.x, h.Fq[l] = p[l].gb.y;
			1 < Math.abs(f) &&
				(a.Fd = 8 > a.Sm ? a.Fd - f / (2 * Math.PI) : a.Fd - (0 < f ? 1.7 : -2.3), a.Uf = a.Fd * k, ct(a, b, c, d, e))
		}
	}

	function et(a, b, c, d, e, f, h) {
		var k = a.Fd,
			l = a.Uf,
			m = 0,
			n = 0;
		a = (d[e].width + d[e + 1].width) / 2 + a.il;
		var p = !1;
		if (0 <= c !== (f === Fs)) {
			if (m = b + a, m > k) {
				m = b - a;
				if (m < -k) return h.x = m, h.y = n, !1;
				p = !0
			}
		} else if (m = b - a, m < -k) {
			m = b + a;
			if (m > k) return h.x = m, h.y = n, !1;
			p = !0
		}
		n = Math.sqrt(1 - Math.min(1, m * m / (k * k))) * l;
		0 > c !== p && (n = -n);
		if (Math.abs(c - n) > (d[e].height + d[e + 1].height) / 2) return h.x = m, h.y = n, !1;
		h.x = m;
		h.y = n;
		return !0
	}

	function ft(a, b, c, d, e, f, h) {
		var k = a.Fd,
			l = a.Uf,
			m = 0,
			n = 0;
		a = (d[e].height + d[e + 1].height) / 2 + a.il;
		d = !1;
		if (0 <= b !== (f === Fs)) {
			if (n = c - a, n < -l) {
				n = c + a;
				if (n > l) {
					h.x = m;
					h.y = n;
					return
				}
				d = !0
			}
		} else if (n = c + a, n > l) {
			n = c - a;
			if (n < -l) {
				h.x = m;
				h.y = n;
				return
			}
			d = !0
		}
		m = Math.sqrt(1 - Math.min(1, n * n / (l * l))) * k;
		0 > b !== d && (m = -m);
		h.x = m;
		h.y = n
	}
	Cs.prototype.commitLayout = function() {
		this.commitNodes();
		this.uu && this.commitLinks()
	};
	Cs.prototype.commitNodes = function() {
		var a = this.iH,
			b = null !== this.group && null !== this.group.placeholder && this.group.ad,
			c = b ? this.group.location.copy() : null;
		b ? a = new y(0, 0) : (a.x = this.Nd.x + this.Fd, a.y = this.Nd.y + this.Uf);
		for (var d = this.network.vertexes.i; d.next();) {
			var e = d.value;
			e.x += a.x;
			e.y += a.y;
			e.commit()
		}
		b && (this.group.$e(), a = this.group.position.copy(), b = this.group.location.copy(), c = c.Hj(b.Hj(a)), this.group.move(c), this.eC = c.Hj(a))
	};
	Cs.prototype.commitLinks = function() {
		for (var a = this.network.edges.i; a.next();) a.value.commit()
	};

	function Xs(a, b, c, d, e) {
		var f = a.$G;
		if (.001 > Math.abs(a.Bo - 1)) return void 0 !== d && void 0 !== e ? e * b : 2 * Math.PI * b;
		a = b > c ? Math.sqrt(b * b - c * c) / b : Math.sqrt(c * c - b * b) / c;
		for (var h = 0, k = 0, k = void 0 !== d && void 0 !== e ? e / (f + 1) : Math.PI / (2 * (f + 1)), l = 0, m = 0; m <= f; m++) l = void 0 !== d && void 0 !== e ? d + m * e / f : m * Math.PI / (2 * f), l = Math.sin(l), h += Math.sqrt(1 - a * a * l * l) * k;
		return void 0 !== d && void 0 !== e ? (b > c ? b : c) * h : 4 * (b > c ? b : c) * h
	}

	function Ws(a, b, c, d, e) {
		var f = 0,
			f = void 0 !== d && void 0 !== e ? Xs(a, 1, c, d, e) : Xs(a, 1, c);
		return b / f
	}

	function Ys(a, b, c, d, e) {
		if (.001 > Math.abs(a.Bo - 1)) return e / b;
		var f = b > c ? Math.sqrt(b * b - c * c) / b : Math.sqrt(c * c - b * b) / c,
			h = 0;
		a = 2 * Math.PI / (700 * a.network.vertexes.count);
		b > c && (d += Math.PI / 2);
		for (var k = 0;; k++) {
			var l = Math.sin(d + k * a),
				h = h + (b > c ? b : c) * Math.sqrt(1 - f * f * l * l) * a;
			if (h >= e) return k * a
		}
	}
	Cs.prototype.sort = function(a) {
		switch (this.sorting) {
			case Ks:
				break;
			case Ls:
				a.reverse();
				break;
			case Is:
				a.sort(this.comparer);
				break;
			case Js:
				a.sort(this.comparer);
				a.reverse();
				break;
			case Gs:
				for (var b = [], c = 0; c < a.length; c++) b.push(0);
				for (var d = new H(Us), c = 0; c < a.length; c++) {
					var e = -1,
						f = -1;
					if (0 === c)
						for (var h = 0; h < a.length; h++) {
							var k = a.ea(h).UH;
							k > e && (e = k, f = h)
						} else
							for (h = 0; h < a.length; h++) k = b[h], k > e && (e = k, f = h);
					d.add(a.ea(f));
					b[f] = -1;
					f = a.ea(f);
					e = 0;
					for (h = f.nc; h.next();) e = a.indexOf(h.value.fromVertex), 0 > e || 0 <= b[e] &&
						b[e]++;
					for (f = f.kc; f.next();) e = a.indexOf(f.value.toVertex), 0 > e || 0 <= b[e] && b[e]++
				}
				a = [];
				for (f = 0; f < d.length; f++) {
					b = d.ea(f);
					a[f] = [];
					for (var l = 0, c = b.kc; c.next();) l = d.indexOf(c.value.toVertex), l !== f && 0 > a[f].indexOf(l) && a[f].push(l);
					for (b = b.nc; b.next();) l = d.indexOf(b.value.fromVertex), l !== f && 0 > a[f].indexOf(l) && a[f].push(l)
				}
				h = [];
				for (f = 0; f < a.length; f++) h[f] = 0;
				for (var b = [], k = [], m = [], c = [], e = new H(Us), n = 0, f = 0; f < a.length; f++) {
					var p = a[f].length;
					if (1 === p) c.push(f);
					else if (0 === p) e.add(d.ea(f));
					else {
						if (0 === n) b.push(f);
						else {
							for (var q = Infinity, r = Infinity, s = -1, u = [], p = 0; p < b.length; p++) 0 > a[b[p]].indexOf(b[p === b.length - 1 ? 0 : p + 1]) && u.push(p === b.length - 1 ? 0 : p + 1);
							if (0 === u.length)
								for (p = 0; p < b.length; p++) u.push(p);
							for (p = 0; p < u.length; p++) {
								var t = u[p],
									x, l = a[f];
								x = k;
								for (var v = m, z = h, A = t, L = b, E = 0, P = 0; P < x.length; P++) {
									var $ = z[x[P]],
										S = z[v[P]],
										ba = 0,
										ha = 0;
									$ < S ? (ba = $, ha = S) : (ba = S, ha = $);
									if (ba < A && A <= ha)
										for ($ = 0; $ < l.length; $++) S = l[$], 0 > L.indexOf(S) || ba < z[S] && z[S] < ha || ba === z[S] || ha === z[S] || E++;
									else
										for ($ = 0; $ < l.length; $++) S = l[$], 0 > L.indexOf(S) || ba <
											z[S] && z[S] < ha && ba !== z[S] && ha !== z[S] && E++
								}
								x = E;
								for (z = v = 0; z < a[f].length; z++) l = b.indexOf(a[f][z]), 0 <= l && (l = Math.abs(t - (l >= t ? l + 1 : l)), v += l < b.length + 1 - l ? l : b.length + 1 - l);
								for (z = 0; z < k.length; z++) l = h[k[z]], A = h[m[z]], l >= t && l++, A >= t && A++, l > A && (L = A, A = l, l = L), A - l < (b.length + 2) / 2 === (l < t && t <= A) && v++;
								if (x < q || x === q && v < r) q = x, r = v, s = t
							}
							b.splice(s, 0, f);
							for (p = 0; p < b.length; p++) h[b[p]] = p;
							for (p = 0; p < a[f].length; p++) q = a[f][p], 0 <= b.indexOf(q) && (k.push(f), m.push(q))
						}
						n++
					}
				}
				f = !1;
				for (h = b.length;;) {
					f = !0;
					for (k = 0; k < c.length; k++)
						if (m = c[k],
							n = a[m][0], l = b.indexOf(n), 0 <= l) {
							for (r = p = 0; r < a[n].length; r++) q = a[n][r], q = b.indexOf(q), 0 > q || q === l || (s = q > l ? q - l : l - q, p += q < l !== s > h - s ? 1 : -1);
							b.splice(0 > p ? l : l + 1, 0, m);
							c.splice(k, 1);
							k--
						} else f = !1;
					if (f) break;
					else b.push(c[0]), c.splice(0, 1)
				}
				for (f = 0; f < b.length; f++) e.add(d.ea(b[f]));
				return e;
			default:
				w.k("Invalid sorting type.")
		}
		return a
	};
	w.defineProperty(Cs, {
		mJ: "radius"
	}, function() {
		return this.Ps
	}, function(a) {
		this.Ps !== a && (w.j(a, "number", Cs, "radius"), 0 < a || isNaN(a)) && (this.Ps = a, this.J())
	});
	w.defineProperty(Cs, {
		qH: "aspectRatio"
	}, function() {
		return this.Rq
	}, function(a) {
		this.Rq !== a && (w.j(a, "number", Cs, "aspectRatio"), 0 < a && (this.Rq = a, this.J()))
	});
	w.defineProperty(Cs, {
		ze: "startAngle"
	}, function() {
		return this.pt
	}, function(a) {
		this.pt !== a && (w.j(a, "number", Cs, "startAngle"), this.pt = a, this.J())
	});
	w.defineProperty(Cs, {
		tf: "sweepAngle"
	}, function() {
		return this.rt
	}, function(a) {
		this.rt !== a && (w.j(a, "number", Cs, "sweepAngle"), this.rt = 0 < a && 360 >= a ? a : 360, this.J())
	});
	w.defineProperty(Cs, {
		Vf: "arrangement"
	}, function() {
		return this.pd
	}, function(a) {
		this.pd !== a && (w.ob(a, Cs, Cs, "arrangement"), a === Rs || a === Ds || a === Qs || a === Ps) && (this.pd = a, this.J())
	});
	w.defineProperty(Cs, {
		direction: "direction"
	}, function() {
		return this.ba
	}, function(a) {
		this.ba !== a && (w.ob(a, Cs, Cs, "direction"), a === Fs || a === Os || a === Ms || a === Ns) && (this.ba = a, this.J())
	});
	w.defineProperty(Cs, {
		sorting: "sorting"
	}, function() {
		return this.ci
	}, function(a) {
		this.ci !== a && (w.ob(a, Cs, Cs, "sorting"), a === Ks || a === Ls || a === Is || Js || a === Gs) && (this.ci = a, this.J())
	});
	w.defineProperty(Cs, {
		comparer: "comparer"
	}, function() {
		return this.Mh
	}, function(a) {
		this.Mh !== a && (w.j(a, "function", Cs, "comparer"), this.Mh = a, this.J())
	});
	w.defineProperty(Cs, {
		spacing: "spacing"
	}, function() {
		return this.di
	}, function(a) {
		this.di !== a && (w.j(a, "number", Cs, "spacing"), this.di = a, this.J())
	});
	w.defineProperty(Cs, {
		Vx: "nodeDiameterFormula"
	}, function() {
		return this.Cs
	}, function(a) {
		this.Cs !== a && (w.ob(a, Cs, Cs, "nodeDiameterFormula"), a === Hs || a === Ss) && (this.Cs = a, this.J())
	});
	w.u(Cs, {
		fK: "actualXRadius"
	}, function() {
		return this.Fd
	});
	w.u(Cs, {
		gK: "actualYRadius"
	}, function() {
		return this.Uf
	});
	w.u(Cs, {
		eK: "actualSpacing"
	}, function() {
		return this.il
	});
	w.u(Cs, {
		iH: "actualCenter"
	}, function() {
		return this.eC
	});
	var Ds;
	Cs.ConstantSpacing = Ds = w.p(Cs, "ConstantSpacing", 0);
	var Qs;
	Cs.ConstantDistance = Qs = w.p(Cs, "ConstantDistance", 1);
	var Ps;
	Cs.ConstantAngle = Ps = w.p(Cs, "ConstantAngle", 2);
	var Rs;
	Cs.Packed = Rs = w.p(Cs, "Packed", 3);
	var Fs;
	Cs.Clockwise = Fs = w.p(Cs, "Clockwise", 4);
	var Os;
	Cs.Counterclockwise = Os = w.p(Cs, "Counterclockwise", 5);
	var Ms;
	Cs.BidirectionalLeft = Ms = w.p(Cs, "BidirectionalLeft", 6);
	var Ns;
	Cs.BidirectionalRight = Ns = w.p(Cs, "BidirectionalRight", 7);
	var Ks;
	Cs.Forwards = Ks = w.p(Cs, "Forwards", 8);
	var Ls;
	Cs.Reverse = Ls = w.p(Cs, "Reverse", 9);
	var Is;
	Cs.Ascending = Is = w.p(Cs, "Ascending", 10);
	var Js;
	Cs.Descending = Js = w.p(Cs, "Descending", 11);
	var Gs;
	Cs.Optimized = Gs = w.p(Cs, "Optimized", 12);
	var Hs;
	Cs.Pythagorean = Hs = w.p(Cs, "Pythagorean", 13);
	var Ss;
	Cs.Circular = Ss = w.p(Cs, "Circular", 14);

	function Es() {
		this.Up = -Infinity;
		this.Fq = this.co = null
	}
	Es.prototype.compare = function(a, b) {
		if (0 < a && 0 > this.Up || Math.abs(a) < Math.abs(this.Up) && !(0 > a && 0 < this.Up)) {
			this.Up = a;
			this.co = [];
			this.Fq = [];
			for (var c = 0; c < b.length; c++) this.co[c] = b[c].gb.x, this.Fq[c] = b[c].gb.y
		}
	};
	Es.prototype.commit = function(a) {
		if (null !== this.co && null !== this.Fq)
			for (var b = 0; b < this.co.length; b++) {
				var c = a.ea(b);
				c.x = this.co[b];
				c.y = this.Fq[b]
			}
	};

	function Ts() {
		ug.call(this)
	}
	w.La(Ts, ug);
	w.ga("CircularNetwork", Ts);
	Ts.prototype.createVertex = function() {
		return new Us
	};
	Ts.prototype.createEdge = function() {
		return new gt
	};

	function Us() {
		ms.call(this);
		this.actualAngle = this.diameter = NaN
	}
	w.La(Us, ms);
	w.ga("CircularVertex", Us);

	function Vs(a, b) {
		var c = a.network;
		if (null === c) return NaN;
		c = c.Sb;
		if (null === c) return NaN;
		if (c.Vf === Rs)
			if (c.Vx === Ss) a.diameter = Math.max(a.width, a.height);
			else {
				var c = Math.abs(Math.sin(b)),
					d = Math.abs(Math.cos(b));
				if (0 === c) return a.width;
				if (0 === d) return a.height;
				a.diameter = Math.min(a.height / c, a.width / d)
			}
		else a.diameter = c.Vx === Ss ? Math.max(a.width, a.height) : Math.sqrt(a.width * a.width + a.height * a.height);
		return a.diameter
	}

	function gt() {
		ns.call(this)
	}
	w.La(gt, ns);
	w.ga("CircularEdge", gt);

	function ht() {
		0 < arguments.length && w.nd(ht);
		tg.call(this);
		this.Ig = null;
		this.as = 0;
		this.ng = (new ia(100, 100)).freeze();
		this.Qq = !1;
		this.bi = !0;
		this.Lh = !1;
		this.Yo = 100;
		this.Ar = 1;
		this.Mi = 1E3;
		this.ws = 10;
		this.Qs = Math;
		this.yo = .05;
		this.xo = 50;
		this.vo = 150;
		this.wo = 0;
		this.nr = 10;
		this.mr = 5
	}
	w.La(ht, tg);
	w.ga("ForceDirectedLayout", ht);
	ht.prototype.cloneProtected = function(a) {
		tg.prototype.cloneProtected.call(this, a);
		a.ng.assign(this.ng);
		a.Qq = this.Qq;
		a.bi = this.bi;
		a.Lh = this.Lh;
		a.Yo = this.Yo;
		a.Ar = this.Ar;
		a.Mi = this.Mi;
		a.ws = this.ws;
		a.Qs = this.Qs;
		a.yo = this.yo;
		a.xo = this.xo;
		a.vo = this.vo;
		a.wo = this.wo;
		a.nr = this.nr;
		a.mr = this.mr
	};
	ht.prototype.createNetwork = function() {
		return new it
	};
	ht.prototype.doLayout = function(a) {
		null === a && w.k("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");
		null === this.network && (this.network = this.makeNetwork(a));
		a = this.ZA;
		if (0 < this.network.vertexes.count) {
			this.network.sx();
			for (var b = this.network.vertexes.i; b.next();) {
				var c = b.value;
				c.charge = this.electricalCharge(c);
				c.mass = this.gravitationalMass(c)
			}
			for (b = this.network.edges.i; b.next();) c = b.value, c.stiffness = this.springStiffness(c), c.length = this.springLength(c);
			this.dA();
			this.as = 0;
			if (this.needsClusterLayout()) {
				b = this.network;
				for (c = b.NJ().i; c.next();) {
					this.network = c.value;
					for (var d = this.network.vertexes.i; d.next();) {
						var e = d.value;
						e.jg = e.vertexes.count;
						e.Ok = 1;
						e.on = null;
						e.Fh = null
					}
					jt(this, 0, a)
				}
				this.network = b;
				c.reset();
				for (var d = this.CE, f = c.count, h = !0, k = e = 0, l = w.cb(), m = 0; m < f + b.vertexes.count + 2; m++) l[m] = null;
				f = 0;
				c.reset();
				for (var n = w.Kf(); c.next();)
					if (m = c.value, this.sh(m, n), h) h = !1, e = n.x + n.width / 2, k = n.y + n.height / 2, l[0] = new y(n.x + n.width + d.width, n.y), l[1] = new y(n.x,
						n.y + n.height + d.height), f = 2;
					else {
						var p = kt(l, f, e, k, n.width, n.height, d),
							q = l[p],
							r = new y(q.x + n.width + d.width, q.y),
							s = new y(q.x, q.y + n.height + d.height);
						p + 1 < f && l.splice(p + 1, 0, null);
						l[p] = r;
						l[p + 1] = s;
						f++;
						p = q.x - n.x;
						q = q.y - n.y;
						for (m = m.vertexes.i; m.next();) r = m.value, r.la += p, r.ra += q
					}
				w.Eb(n);
				for (m = b.vertexes.i; m.next();) h = m.value, n = h.gb, 2 > f ? (e = n.x + n.width / 2, k = n.y + n.height / 2, l[0] = new y(n.x + n.width + d.width, n.y), l[1] = new y(n.x, n.y + n.height + d.height), f = 2) : (p = kt(l, f, e, k, n.width, n.height, d), q = l[p], r = new y(q.x + n.width + d.width,
					q.y), s = new y(q.x, q.y + n.height + d.height), p + 1 < f && l.splice(p + 1, 0, null), l[p] = r, l[p + 1] = s, f++, h.la = q.x + h.width / 2, h.ra = q.y + h.height / 2);
				w.ta(l);
				for (c.reset(); c.next();) {
					d = c.value;
					for (e = d.vertexes.i; e.next();) b.Jl(e.value);
					for (d = d.edges.i; d.next();) b.Bp(d.value)
				}
			}
			lt(this, a);
			this.updateParts()
		}
		this.Yo = a;
		this.network = null;
		this.rf = !0
	};
	ht.prototype.needsClusterLayout = function() {
		if (3 > this.network.vertexes.count) return !1;
		for (var a = 0, b = 0, c = this.network.vertexes.first().gb, d = this.network.vertexes.i; d.next();) {
			if (d.value.gb.Zf(c) && (a++, 2 < a)) return !0;
			if (10 < b) break;
			b++
		}
		return !1
	};
	ht.prototype.sh = function(a, b) {
		for (var c = !0, d = a.vertexes.i; d.next();) {
			var e = d.value;
			c ? (c = !1, b.set(e.gb)) : b.Ih(e.gb)
		}
		return b
	};

	function jt(a, b, c) {
		if (vt(a, b)) {
			var d = a.Mi;
			a.Mi *= 1 + 1 / (b + 1);
			var e = cu(a, b),
				f = Math.max(0, Math.max(Math.min(a.network.vertexes.count, c * (b + 1) / 11), 10));
			a.ZA += f;
			jt(a, b + 1, c);
			lt(a, f);
			du(a, e);
			b = a.Ig;
			null === b ? b = new H(eu) : b.clear();
			b.Nc(e.vertexes);
			b.sort(function(a, b) {
				return null === a || null === b || a === b ? 0 : b.jg - a.jg
			});
			for (e = b.i; e.next();) fu(a, e.value);
			a.Mi = d
		}
	}

	function vt(a, b) {
		if (10 < b || 3 > a.network.vertexes.count) return !1;
		null === a.Ig ? a.Ig = new H(eu) : a.Ig.clear();
		a.Ig.Nc(a.network.vertexes);
		var c = a.Ig;
		c.sort(function(a, b) {
			return null === a || null === b || a === b ? 0 : b.jg - a.jg
		});
		for (var d = c.count - 1; 0 <= d && 1 >= c.ea(d).jg;) d--;
		return 1 < c.count - d
	}

	function cu(a, b) {
		for (var c = a.network, d = new it, e = a.Ig.i; e.next();) {
			var f = e.value;
			if (1 < f.jg) {
				d.Jl(f);
				var h = new gu;
				h.Fy = f.jg;
				h.Gy = f.width;
				h.Ey = f.height;
				h.XB = f.T.x;
				h.YB = f.T.y;
				null === f.Fh && (f.Fh = new H(gu));
				f.Fh.add(h);
				f.rB = f.Fh.count - 1
			} else break
		}
		for (var k = c.edges.i; k.next();)
			if (h = k.value, e = h.fromVertex, f = h.toVertex, e.network === d && f.network === d) d.Bp(h);
			else if (e.network === d) {
			var l = e.on;
			null === l && (l = new H(eu), e.on = l);
			l.add(f);
			e.jg--;
			e.Ok += f.Ok
		} else f.network === d && (l = f.on, null === l && (l = new H(eu), f.on = l),
			l.add(e), f.jg--, f.Ok += e.Ok);
		for (e = d.edges.i; e.next();) f = e.value, f.length *= Math.max(1, Td((f.fromVertex.Ok + f.toVertex.Ok) / (4 * b + 1)));
		for (e = d.vertexes.i; e.next();)
			if (f = e.value, l = f.on, null !== l && 0 < l.count && (h = f.Fh.ea(f.Fh.count - 1), h = h.Fy - f.jg, !(0 >= h))) {
				for (var m = 0, n = 0, p = l.count - h; p < l.count; p++) {
					for (var q = l.ea(p), r = null, k = q.edges.i; k.next();) {
						var s = k.value;
						if (s.dI(q) === f) {
							r = s;
							break
						}
					}
					null !== r && (n += r.length, m += q.width * q.height)
				}
				k = f.la;
				l = f.ra;
				p = f.width;
				q = f.height;
				r = f.T;
				s = p * q;
				1 > s && (s = 1);
				m = Td((m + s + n * n * 4 / (h * h)) /
					s);
				h = (m - 1) * p / 2;
				m = (m - 1) * q / 2;
				f.gb = new B(k - r.x - h, l - r.y - m, p + 2 * h, q + 2 * m);
				f.focus = new y(r.x + h, r.y + m)
			}
		a.network = d;
		return c
	}

	function du(a, b) {
		for (var c = a.network.vertexes.i; c.next();) {
			var d = c.value;
			d.network = b;
			if (null !== d.Fh) {
				var e = d.Fh.ea(d.rB);
				d.jg = e.Fy;
				var f = e.XB,
					h = e.YB;
				d.gb = new B(d.la - f, d.ra - h, e.Gy, e.Ey);
				d.focus = new y(f, h);
				d.rB--
			}
		}
		for (c = a.network.edges.i; c.next();) c.value.network = b;
		a.network = b
	}

	function fu(a, b) {
		var c = b.on;
		if (null !== c && 0 !== c.count) {
			var d = b.la,
				e = b.ra,
				f = b.width,
				h = b.height;
			null !== b.Fh && 0 < b.Fh.count && (h = b.Fh.ea(0), f = h.Gy, h = h.Ey);
			for (var f = Td(f * f + h * h) / 2, k = !1, l = h = 0, m = 0, n = b.vertexes.i; n.next();) {
				var p = n.value;
				1 >= p.jg ? l++ : (k = !0, m++, h += Math.atan2(b.ra - p.ra, b.la - p.la))
			}
			if (0 !== l)
				for (0 < m && (h /= m), n = m = 0, m = k ? 2 * Math.PI / (l + 1) : 2 * Math.PI / l, 0 === l % 2 && (n = m / 2), 1 < c.count && c.sort(function(a, b) {
						return null === a || null === b || a === b ? 0 : b.width * b.height - a.width * a.height
					}), k = 0 === l % 2 ? 0 : 1, c = c.i; c.next();)
					if (l =
						c.value, !(1 < l.jg || a.isFixed(l))) {
						for (var p = null, q = l.edges.i; q.next();) {
							p = q.value;
							break
						}
						var q = l.width,
							r = l.height,
							q = Td(q * q + r * r) / 2,
							p = f + p.length + q,
							q = h + (m * (k / 2 >> 1) + n) * (0 === k % 2 ? 1 : -1);
						l.la = d + p * Math.cos(q);
						l.ra = e + p * Math.sin(q);
						k++
					}
		}
	}

	function kt(a, b, c, d, e, f, h) {
		var k = 9E19,
			l = -1,
			m = 0;
		a: for (; m < b; m++) {
			var n = a[m],
				p = n.x - c,
				q = n.y - d,
				p = p * p + q * q;
			if (p < k) {
				for (q = m - 1; 0 <= q; q--)
					if (a[q].y > n.y && a[q].x - n.x < e + h.width) continue a;
				for (q = m + 1; q < b; q++)
					if (a[q].x > n.x && a[q].y - n.y < f + h.height) continue a;
				l = m;
				k = p
			}
		}
		return l
	}
	ht.prototype.dA = function() {
		if (this.comments)
			for (var a = this.network.vertexes.i; a.next();) this.addComments(a.value)
	};
	ht.prototype.addComments = function(a) {
		var b = a.Qc;
		if (null !== b)
			for (b = b.$E(); b.next();) {
				var c = b.value;
				if ("Comment" === c.yd && c.isVisible()) {
					var d = this.network.xn(c);
					null === d && (d = this.network.Gt(c));
					d.charge = this.KH;
					for (var c = null, e = d.kc; e.next();) {
						var f = e.value;
						if (f.toVertex === a) {
							c = f;
							break
						}
					}
					if (null === c)
						for (e = d.nc; e.next();)
							if (f = e.value, f.fromVertex === a) {
								c = f;
								break
							}
					null === c && (c = this.network.hq(a, d, null));
					c.length = this.LH
				}
			}
	};

	function hu(a, b) {
		var c = a.M,
			d = c.x,
			e = c.y,
			f = c.width,
			c = c.height,
			h = b.M,
			k = h.x,
			l = h.y,
			m = h.width,
			h = h.height;
		return d + f < k ? e > l + h ? (d = d + f - k, e = e - l - h, Td(d * d + e * e)) : e + c < l ? (d = d + f - k, e = e + c - l, Td(d * d + e * e)) : k - (d + f) : d > k + m ? e > l + h ? (d = d - k - m, e = e - l - h, Td(d * d + e * e)) : e + c < l ? (d = d - k - m, e = e + c - l, Td(d * d + e * e)) : d - (k + m) : e > l + h ? e - (l + h) : e + c < l ? l - (e + c) : .1
	}

	function lt(a, b) {
		a.Ig = null;
		for (var c = a.as + b; a.as < c && (a.as++, iu(a)););
		a.Ig = null
	}

	function iu(a) {
		null === a.Ig && (a.Ig = new H(eu), a.Ig.Nc(a.network.vertexes));
		var b = a.Ig.n;
		if (0 >= b.length) return !1;
		var c = b[0];
		c.forceX = 0;
		c.forceY = 0;
		for (var d = c.la, e = d, f = c.ra, h = f, c = 1; c < b.length; c++) {
			var k = b[c];
			k.forceX = 0;
			k.forceY = 0;
			var l = k.la,
				k = k.ra,
				d = Math.min(d, l),
				e = Math.max(e, l),
				f = Math.min(f, k),
				h = Math.max(h, k)
		}(f = e - d > h - f) ? b.sort(function(a, b) {
			return null === a || null === b || a === b ? 0 : a.la - b.la
		}): b.sort(function(a, b) {
			return null === a || null === b || a === b ? 0 : a.ra - b.ra
		});
		for (var h = a.Mi, m = 0, n = 0, p = 0, c = 0; c < b.length; c++) {
			var k =
				b[c],
				l = k.M,
				q = k.T,
				d = l.x + q.x,
				l = l.y + q.y,
				n = k.charge * a.electricalFieldX(d, l),
				p = k.charge * a.electricalFieldY(d, l),
				n = n + k.mass * a.gravitationalFieldX(d, l),
				p = p + k.mass * a.gravitationalFieldY(d, l);
			k.forceX += n;
			k.forceY += p;
			for (q = c + 1; q < b.length; q++)
				if (e = b[q], e !== k) {
					var r = e.M,
						n = e.T,
						p = r.x + n.x,
						r = r.y + n.y;
					if (d - p > h || p - d > h) {
						if (f) break
					} else if (l - r > h || r - l > h) {
						if (!f) break
					} else {
						var s = hu(k, e);
						1 > s ? (n = a.gy, null === n && (a.gy = n = new sa(0)), m = n.random(), s = n.random(), d > p ? (n = Math.abs(e.M.right - k.M.x), n = (1 + n) * m) : d < p ? (n = Math.abs(e.M.x - k.M.right),
							n = -(1 + n) * m) : (n = Math.max(e.width, k.width), n = (1 + n) * m - n / 2), l > r ? (p = Math.abs(e.M.bottom - k.M.y), p = (1 + p) * s) : d < p ? (p = Math.abs(e.M.y - k.M.bottom), p = -(1 + p) * s) : (p = Math.max(e.height, k.height), p = (1 + p) * s - p / 2)) : (m = -(k.charge * e.charge) / (s * s), n = (p - d) / s * m, p = (r - l) / s * m);
						k.forceX += n;
						k.forceY += p;
						e.forceX -= n;
						e.forceY -= p
					}
				}
		}
		for (c = a.network.edges.i; c.next();) f = c.value, k = f.fromVertex, e = f.toVertex, l = k.M, q = k.T, d = l.x + q.x, l = l.y + q.y, r = e.M, n = e.T, p = r.x + n.x, r = r.y + n.y, s = hu(k, e), 1 > s ? (n = a.gy, null === n && (a.gy = n = new sa(0)), m = n.random(), s =
			n.random(), n = (d > p ? 1 : -1) * (1 + (e.width > k.width ? e.width : k.width)) * m, p = (l > r ? 1 : -1) * (1 + (e.height > k.height ? e.height : k.height)) * s) : (m = f.stiffness * (s - f.length), n = (p - d) / s * m, p = (r - l) / s * m), k.forceX += n, k.forceY += p, e.forceX -= n, e.forceY -= p;
		c = 0;
		d = a.fJ;
		for (e = 0; e < b.length; e++) k = b[e], a.isFixed(k) ? a.moveFixedVertex(k) : (f = k.forceX, h = k.forceY, f < -d ? f = -d : f > d && (f = d), h < -d ? h = -d : h > d && (h = d), k.la += f, k.ra += h, c = Math.max(c, f * f + h * h));
		return c > a.XE * a.XE
	}
	ht.prototype.moveFixedVertex = function() {};
	ht.prototype.commitLayout = function() {
		this.zB();
		this.commitNodes();
		this.uu && this.commitLinks()
	};
	ht.prototype.zB = function() {
		if (this.zq)
			for (var a = this.network.edges.i; a.next();) {
				var b = a.value.link;
				null !== b && (b.Ab = qc, b.Bb = qc)
			}
	};
	ht.prototype.commitNodes = function() {
		var a = 0,
			b = 0;
		if (this.pH) {
			var c = w.Kf();
			this.sh(this.network, c);
			b = this.Nd;
			a = b.x - c.x;
			b = b.y - c.y;
			w.Eb(c)
		}
		for (var c = w.Kf(), d = this.network.vertexes.i; d.next();) {
			var e = d.value;
			if (0 !== a || 0 !== b) c.assign(e.gb), c.x += a, c.y += b, e.gb = c;
			e.commit()
		}
		w.Eb(c)
	};
	ht.prototype.commitLinks = function() {
		for (var a = this.network.edges.i; a.next();) a.value.commit()
	};
	ht.prototype.springStiffness = function(a) {
		a = a.stiffness;
		return isNaN(a) ? this.yo : a
	};
	ht.prototype.springLength = function(a) {
		a = a.length;
		return isNaN(a) ? this.xo : a
	};
	ht.prototype.electricalCharge = function(a) {
		a = a.charge;
		return isNaN(a) ? this.vo : a
	};
	ht.prototype.electricalFieldX = function() {
		return 0
	};
	ht.prototype.electricalFieldY = function() {
		return 0
	};
	ht.prototype.gravitationalMass = function(a) {
		a = a.mass;
		return isNaN(a) ? this.wo : a
	};
	ht.prototype.gravitationalFieldX = function() {
		return 0
	};
	ht.prototype.gravitationalFieldY = function() {
		return 0
	};
	ht.prototype.isFixed = function(a) {
		return a.isFixed
	};
	w.u(ht, {
		NK: "currentIteration"
	}, function() {
		return this.as
	});
	w.defineProperty(ht, {
		CE: "arrangementSpacing"
	}, function() {
		return this.ng
	}, function(a) {
		w.G(a, ia, ht, "arrangementSpacing");
		this.ng.L(a) || (this.ng.assign(a), this.J())
	});
	w.defineProperty(ht, {
		pH: "arrangesToOrigin"
	}, function() {
		return this.Qq
	}, function(a) {
		this.Qq !== a && (w.j(a, "boolean", ht, "arrangesToOrigin"), this.Qq = a, this.J())
	});
	w.defineProperty(ht, {
		zq: "setsPortSpots"
	}, function() {
		return this.bi
	}, function(a) {
		this.bi !== a && (w.j(a, "boolean", ht, "setsPortSpots"), this.bi = a, this.J())
	});
	w.defineProperty(ht, {
		comments: "comments"
	}, function() {
		return this.Lh
	}, function(a) {
		this.Lh !== a && (w.j(a, "boolean", ht, "comments"), this.Lh = a, this.J())
	});
	w.defineProperty(ht, {
		ZA: "maxIterations"
	}, function() {
		return this.Yo
	}, function(a) {
		this.Yo !== a && (w.j(a, "number", ht, "maxIterations"), 0 <= a && (this.Yo = a, this.J()))
	});
	w.defineProperty(ht, {
		XE: "epsilonDistance"
	}, function() {
		return this.Ar
	}, function(a) {
		this.Ar !== a && (w.j(a, "number", ht, "epsilonDistance"), 0 < a && (this.Ar = a, this.J()))
	});
	w.defineProperty(ht, {
		gL: "infinityDistance"
	}, function() {
		return this.Mi
	}, function(a) {
		this.Mi !== a && (w.j(a, "number", ht, "infinityDistance"), 1 < a && (this.Mi = a, this.J()))
	});
	w.defineProperty(ht, {
		fJ: "moveLimit"
	}, function() {
		return this.ws
	}, function(a) {
		this.ws !== a && (w.j(a, "number", ht, "moveLimit"), 1 < a && (this.ws = a, this.J()))
	});
	w.defineProperty(ht, {
		gy: "randomNumberGenerator"
	}, function() {
		return this.Qs
	}, function(a) {
		this.Qs !== a && (null !== a && "function" !== typeof a.random && w.k('ForceDirectedLayout.randomNumberGenerator must have a "random()" function on it: ' + a), this.Qs = a)
	});
	w.defineProperty(ht, {
		ZK: "defaultSpringStiffness"
	}, function() {
		return this.yo
	}, function(a) {
		this.yo !== a && (w.j(a, "number", ht, "defaultSpringStiffness"), this.yo = a, this.J())
	});
	w.defineProperty(ht, {
		YK: "defaultSpringLength"
	}, function() {
		return this.xo
	}, function(a) {
		this.xo !== a && (w.j(a, "number", ht, "defaultSpringLength"), this.xo = a, this.J())
	});
	w.defineProperty(ht, {
		SK: "defaultElectricalCharge"
	}, function() {
		return this.vo
	}, function(a) {
		this.vo !== a && (w.j(a, "number", ht, "defaultElectricalCharge"), this.vo = a, this.J())
	});
	w.defineProperty(ht, {
		TK: "defaultGravitationalMass"
	}, function() {
		return this.wo
	}, function(a) {
		this.wo !== a && (w.j(a, "number", ht, "defaultGravitationalMass"), this.wo = a, this.J())
	});
	w.defineProperty(ht, {
		LH: "defaultCommentSpringLength"
	}, function() {
		return this.nr
	}, function(a) {
		this.nr !== a && (w.j(a, "number", ht, "defaultCommentSpringLength"), this.nr = a, this.J())
	});
	w.defineProperty(ht, {
		KH: "defaultCommentElectricalCharge"
	}, function() {
		return this.mr
	}, function(a) {
		this.mr !== a && (w.j(a, "number", ht, "defaultCommentElectricalCharge"), this.mr = a, this.J())
	});

	function gu() {
		this.YB = this.XB = this.Ey = this.Gy = this.Fy = 0
	}

	function it() {
		ug.call(this)
	}
	w.La(it, ug);
	w.ga("ForceDirectedNetwork", it);
	it.prototype.createVertex = function() {
		return new eu
	};
	it.prototype.createEdge = function() {
		return new ju
	};

	function eu() {
		ms.call(this);
		this.isFixed = !1;
		this.mass = this.charge = NaN;
		this.Ok = this.jg = this.forceY = this.forceX = 0;
		this.Fh = this.on = null;
		this.rB = 0
	}
	w.La(eu, ms);
	w.ga("ForceDirectedVertex", eu);

	function ju() {
		ns.call(this);
		this.length = this.stiffness = NaN
	}
	w.La(ju, ns);
	w.ga("ForceDirectedEdge", ju);

	function ku() {
		0 < arguments.length && w.nd(ku);
		tg.call(this);
		this.Yd = this.Jm = 25;
		this.ba = 0;
		this.uo = lu;
		this.Uo = mu;
		this.Ko = nu;
		this.Im = 4;
		this.io = ou;
		this.aj = pu;
		this.bi = !0;
		this.fs = 4;
		this.Kb = this.iw = this.sb = -1;
		this.Rf = this.ps = 0;
		this.Ob = this.Pf = this.Qf = this.yg = this.ke = null;
		this.ys = 0;
		this.xs = this.Om = null;
		this.Cg = 0;
		this.zs = null;
		this.kC = new y;
		this.ih = [];
		this.ih.length = 100
	}
	w.La(ku, tg);
	w.ga("LayeredDigraphLayout", ku);
	ku.prototype.cloneProtected = function(a) {
		tg.prototype.cloneProtected.call(this, a);
		a.Jm = this.Jm;
		a.Yd = this.Yd;
		a.ba = this.ba;
		a.uo = this.uo;
		a.Uo = this.Uo;
		a.Ko = this.Ko;
		a.Im = this.Im;
		a.io = this.io;
		a.aj = this.aj;
		a.bi = this.bi;
		a.fs = this.fs
	};
	ku.prototype.ic = function(a) {
		a.Ge === ku ? 0 === a.name.indexOf("Aggressive") ? this.oH = a : 0 === a.name.indexOf("Cycle") ? this.JH = a : 0 === a.name.indexOf("Init") ? this.vI = a : 0 === a.name.indexOf("Layer") ? this.JI = a : w.k("Unknown enum value: " + a) : tg.prototype.ic.call(this, a)
	};
	ku.prototype.createNetwork = function() {
		return new qu
	};
	ku.prototype.doLayout = function(a) {
		null === a && w.k("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");
		null === this.network && (this.network = this.makeNetwork(a));
		this.Nd = this.initialOrigin(this.Nd);
		this.iw = -1;
		this.Rf = this.ps = 0;
		this.zs = this.xs = this.Om = null;
		for (a = 0; a < this.ih.length; a++) this.ih[a] = null;
		if (0 < this.network.vertexes.count) {
			this.network.sx();
			for (a = this.network.edges.i; a.next();) a.value.rev = !1;
			switch (this.uo) {
				default:
					case ru:
					a = this.network;
				var b =
					0,
					c = a.vertexes.count - 1,
					d = [];d.length = c + 1;
				for (var e = a.vertexes.i; e.next();) e.value.valid = !0;
				for (; null !== su(a);) {
					for (e = tu(a); null !== e;) d[c] = e, c--, e.valid = !1, e = tu(a);
					for (e = uu(a); null !== e;) d[b] = e, b++, e.valid = !1, e = uu(a);
					for (var e = null, f = 0, h = this.network.vertexes.i; h.next();) {
						var k = h.value;
						if (k.valid) {
							for (var l = 0, m = k.kc; m.next();) m.value.toVertex.valid && l++;
							for (var m = 0, n = k.nc; n.next();) n.value.fromVertex.valid && m++;
							if (null === e || f < l - m) e = k, f = l - m
						}
					}
					null !== e && (d[b] = e, b++, e.valid = !1)
				}
				for (b = 0; b < a.vertexes.count; b++) d[b].index =
					b;
				for (d = a.edges.i; d.next();) b = d.value,
				b.fromVertex.index > b.toVertex.index && (a.my(b), b.rev = !0);
				break;
				case lu:
						for (d = this.network.vertexes.i; d.next();) a = d.value, a.Pp = -1, a.finish = -1;
					for (a = this.network.edges.i; a.next();) a.value.forest = !1;this.ys = 0;
					for (d.reset(); d.next();) b = d.value,
					0 === b.nc.count && vu(this, b);
					for (d.reset(); d.next();) b = d.value,
					-1 === b.Pp && vu(this, b);
					for (a.reset(); a.next();) d = a.value,
					d.forest || (b = d.fromVertex, c = b.finish, e = d.toVertex, f = e.finish, e.Pp < b.Pp && c < f && (this.network.my(d), d.rev = !0))
			}
			for (a =
				this.network.vertexes.i; a.next();) a.value.layer = -1;
			this.sb = -1;
			this.assignLayers();
			for (a.reset(); a.next();) this.sb = Math.max(this.sb, a.value.layer);
			a = this.network;
			d = [];
			for (c = a.edges.i; c.next();) b = c.value, b.valid = !1, d.push(b);
			for (c = 0; c < d.length; c++)
				if (b = d[c], f = b.fromVertex, e = b.toVertex, !b.valid && (null !== f.vd && null !== e.vd || f.layer !== e.layer)) {
					m = k = l = h = 0;
					if (null !== b.link) {
						l = b.link;
						if (null === l) continue;
						var p = f.vd,
							h = e.vd;
						if (null === p || null === h) continue;
						var q = l.W,
							k = l.Z,
							r = l.lc,
							m = l.Ic;
						b.rev && (l = q, n = r, q = k, r = m,
							k = l, m = n);
						var s = f.T,
							l = e.T,
							u = b.rev ? e.M : f.M,
							n = w.K();
						u.I() ? (dr(q, r, Jb, n), n.I() || n.assign(s)) : n.assign(s);
						p !== q && u.I() && q.isVisible() && (p = f.M, p.I() && (n.x += u.x - p.x, n.y += u.y - p.y));
						q = b.rev ? f.M : e.M;
						p = w.K();
						q.I() ? (dr(k, m, Jb, p), p.I() || p.assign(l)) : p.assign(l);
						h !== k && q.I() && k.isVisible() && (h = e.M, h.I() && (p.x += q.x - h.x, p.y += q.y - h.y));
						90 === this.ba || 270 === this.ba ? (h = Math.round((n.x - s.x) / this.Yd), k = n.x, l = Math.round((p.x - l.x) / this.Yd), m = p.x) : (h = Math.round((n.y - s.y) / this.Yd), k = n.y, l = Math.round((p.y - l.y) / this.Yd), m = p.y);
						w.v(n);
						w.v(p);
						b.portFromColOffset = h;
						b.portFromPos = k;
						b.portToColOffset = l;
						b.portToPos = m
					} else b.portFromColOffset = 0, b.portFromPos = 0, b.portToColOffset = 0, b.portToPos = 0;
					n = f.layer;
					s = e.layer;
					a: if (p = b, q = 0, u = p.link, null !== u) {
						var t = u.lc,
							x = u.Ic;
						if (null !== t && null !== x) {
							var v = u.W,
								r = u.Z;
							if (null !== v && null !== r) {
								var z = t.Ab,
									A = x.Bb;
								this.zq || (u.Ab.Zc() || (z = u.Ab), u.Bb.Zc() || (A = u.Bb));
								var L = u.ac,
									E = wu(this, !0);
								if (z.Zc() || z === yb) z = E;
								var P = wu(this, !1);
								if (A.Zc() || A === yb) A = P;
								if (z.xj() && z.vj(P) && A.xj() && A.vj(E)) {
									q = 0;
									break a
								}
								E =
									u.getLinkPoint(v, t, z, !0, L, r, x, w.K());
								z = u.getLinkDirection(v, t, E, z, !0, L, r, x);
								w.v(E);
								z === xu(this, p, !0) ? q += 1 : this.zq && null !== v && 1 === v.ports.count && p.rev && (q += 1);
								z = u.getLinkPoint(r, x, A, !1, L, v, t, w.K());
								u = u.getLinkDirection(r, x, z, A, !1, L, v, t);
								w.v(z);
								u === xu(this, p, !1) ? q += 2 : this.zq && null !== r && 1 === r.ports.count && p.rev && (q += 2)
							}
						}
					}
					p = 1 === q || 3 === q ? !0 : !1;
					if (q = 2 === q || 3 === q ? !0 : !1) r = a.createVertex(), r.vd = null, r.ln = 1, r.layer = n, r.near = f, a.Jl(r), f = a.hq(f, r, b.link), f.valid = !1, f.rev = b.rev, f.portFromColOffset = h, f.portToColOffset =
						0, f.portFromPos = k, f.portToPos = 0, f = r;
					u = 1;
					p && u--;
					if (n - s > u && 0 < n) {
						b.valid = !1;
						r = a.createVertex();
						r.vd = null;
						r.ln = 2;
						r.layer = n - 1;
						a.Jl(r);
						f = a.hq(f, r, b.link);
						f.valid = !0;
						f.rev = b.rev;
						f.portFromColOffset = q ? 0 : h;
						f.portToColOffset = 0;
						f.portFromPos = q ? 0 : k;
						f.portToPos = 0;
						f = r;
						for (n--; n - s > u && 0 < n;) r = a.createVertex(), r.vd = null, r.ln = 3, r.layer = n - 1, a.Jl(r), f = a.hq(f, r, b.link), f.valid = !0, f.rev = b.rev, f.portFromColOffset = 0, f.portToColOffset = 0, f.portFromPos = 0, f.portToPos = 0, f = r, n--;
						f = a.hq(r, e, b.link);
						f.valid = !p;
						p && (r.near = e);
						f.rev =
							b.rev;
						f.portFromColOffset = 0;
						f.portToColOffset = l;
						f.portFromPos = 0;
						f.portToPos = m
					} else b.valid = !0
				}
			d = this.ke = [];
			for (b = 0; b <= this.sb; b++) d[b] = 0;
			for (a = this.network.vertexes.i; a.next();) a.value.index = -1;
			this.initializeIndices();
			this.iw = -1;
			for (b = this.Rf = this.ps = 0; b <= this.sb; b++) d[b] > d[this.Rf] && (this.iw = d[b] - 1, this.Rf = b), d[b] < d[this.ps] && (this.ps = b);
			this.zs = [];
			for (b = 0; b < d.length; b++) this.zs[b] = [];
			for (a.reset(); a.next();) d = a.value, this.zs[d.layer][d.index] = d;
			this.Kb = -1;
			for (a = 0; a <= this.sb; a++) {
				d = yu(this, a);
				b =
					0;
				c = this.ke[a];
				for (e = 0; e < c; e++) f = d[e], b += this.nodeMinColumnSpace(f, !0), f.column = b, b += 1, b += this.nodeMinColumnSpace(f, !1);
				this.Kb = Math.max(this.Kb, b - 1);
				zu(this, a, d)
			}
			this.reduceCrossings();
			this.straightenAndPack();
			this.updateParts()
		}
		this.network = null;
		this.rf = !0
	};
	ku.prototype.linkMinLength = function() {
		return 1
	};

	function Au(a) {
		var b = a.fromVertex.vd;
		a = a.toVertex.vd;
		return null === b && null === a ? 8 : null === b || null === a ? 4 : 1
	}
	ku.prototype.nodeMinLayerSpace = function(a, b) {
		return null === a.vd ? 0 : 90 === this.ba || 270 === this.ba ? b ? a.T.y + 10 : a.M.height - a.T.y + 10 : b ? a.T.x + 10 : a.M.width - a.T.x + 10
	};
	ku.prototype.nodeMinColumnSpace = function(a, b) {
		if (null === a.vd) return 0;
		var c = b ? a.fB : a.eB;
		if (null !== c) return c;
		c = this.ba;
		return 90 === c || 270 === c ? b ? a.fB = a.T.x / this.Yd + 1 | 0 : a.eB = (a.M.width - a.T.x) / this.Yd + 1 | 0 : b ? a.fB = a.T.y / this.Yd + 1 | 0 : a.eB = (a.M.height - a.T.y) / this.Yd + 1 | 0
	};

	function Bu(a) {
		null === a.Om && (a.Om = []);
		for (var b = 0, c = a.network.vertexes.i; c.next();) {
			var d = c.value;
			a.Om[b] = d.layer;
			b++;
			a.Om[b] = d.column;
			b++;
			a.Om[b] = d.index;
			b++
		}
		return a.Om
	}

	function Cu(a, b) {
		for (var c = 0, d = a.network.vertexes.i; d.next();) {
			var e = d.value;
			e.layer = b[c];
			c++;
			e.column = b[c];
			c++;
			e.index = b[c];
			c++
		}
	}

	function Du(a, b, c) {
		var d = yu(a, b),
			e = a.ke[b];
		if (null === a.xs || a.xs.length < e * e) a.xs = [];
		for (var f = a.xs, h = 0; h < e; h++) {
			var k = 0,
				l = d[h],
				m = l.near,
				n = 0;
			if (null !== m && m.layer === l.layer)
				if (n = m.index, n > h)
					for (var p = h + 1; p < n; p++) l = d[p], l.near === m && l.ln === m.ln || k++;
				else
					for (p = h - 1; p > n; p--) l = d[p], l.near === m && l.ln === m.ln || k++;
			var m = 0,
				q, r = q = p = l = 0,
				s, u = 0,
				t = 0;
			s = 0;
			var x;
			if (0 <= c)
				for (n = d[h].Qe, m = 0; m < n.count; m++)
					if (q = n.n[m], q.valid && q.fromVertex.layer !== b)
						for (l = q.fromVertex.index, p = q.portToPos, q = q.portFromPos, r = m + 1; r < n.count; r++) s =
							n.n[r], s.valid && s.fromVertex.layer !== b && (u = s.fromVertex.index, t = s.portToPos, s = s.portFromPos, p < t && (l > u || l === u && q > s) && k++, t < p && (u > l || u === l && s > q) && k++);
			if (0 >= c)
				for (n = d[h].Je, m = 0; m < n.count; m++)
					if (q = n.n[m], q.valid && q.toVertex.layer !== b)
						for (l = q.toVertex.index, p = q.portToPos, q = q.portFromPos, r = m + 1; r < n.count; r++) s = n.n[r], s.valid && s.toVertex.layer !== b && (u = s.toVertex.index, t = s.portToPos, s = s.portFromPos, q < s && (l > u || l === u && p > t) && k++, s < q && (u > l || u === l && t > p) && k++);
			f[h * e + h] = k;
			for (n = h + 1; n < e; n++) {
				var v = 0,
					z = 0;
				if (0 <= c)
					for (k =
						d[h].Qe, x = d[n].Qe, m = 0; m < k.count; m++)
						if (q = k.n[m], q.valid && q.fromVertex.layer !== b)
							for (l = q.fromVertex.index, q = q.portFromPos, r = 0; r < x.count; r++) s = x.n[r], s.valid && s.fromVertex.layer !== b && (u = s.fromVertex.index, s = s.portFromPos, (l < u || l === u && q < s) && z++, (u < l || u === l && s < q) && v++);
				if (0 >= c)
					for (k = d[h].Je, x = d[n].Je, m = 0; m < k.count; m++)
						if (q = k.n[m], q.valid && q.toVertex.layer !== b)
							for (l = q.toVertex.index, p = q.portToPos, r = 0; r < x.count; r++) s = x.n[r], s.valid && s.toVertex.layer !== b && (u = s.toVertex.index, t = s.portToPos, (l < u || l === u && p <
								t) && z++, (u < l || u === l && t < p) && v++);
				f[h * e + n] = v;
				f[n * e + h] = z
			}
		}
		zu(a, b, d);
		return f
	}
	ku.prototype.countCrossings = function() {
		for (var a = 0, b = 0; b <= this.sb; b++)
			for (var c = Du(this, b, 1), d = this.ke[b], e = 0; e < d; e++)
				for (var f = e; f < d; f++) a += c[e * d + f];
		return a
	};

	function Eu(a) {
		for (var b = 0, c = 0; c <= a.sb; c++) {
			for (var d = a, e = c, f = yu(d, e), h = d.ke[e], k = 0, l = 0; l < h; l++) {
				var m = null,
					m = f[l].Je,
					n, p = 0,
					q = 0;
				if (null !== m)
					for (var r = 0; r < m.count; r++) n = m.n[r], n.valid && n.toVertex.layer !== e && (p = n.fromVertex.column + n.portFromColOffset, q = n.toVertex.column + n.portToColOffset, k += (Math.abs(p - q) + 1) * Au(n))
			}
			zu(d, e, f);
			b += k
		}
		return b
	}
	ku.prototype.normalize = function() {
		var a = Infinity;
		this.Kb = -1;
		for (var b = this.network.vertexes.i; b.next();) {
			var c = b.value,
				a = Math.min(a, c.column - this.nodeMinColumnSpace(c, !0));
			this.Kb = Math.max(this.Kb, c.column + this.nodeMinColumnSpace(c, !1))
		}
		for (b.reset(); b.next();) b.value.column -= a;
		this.Kb -= a
	};

	function Fu(a, b, c) {
		for (var d = yu(a, b), e = a.ke[b], f = [], h = 0; h < e; h++) {
			var k = d[h],
				l = null;
			0 >= c && (l = k.Qe);
			var m = null;
			0 <= c && (m = k.Je);
			var n = 0,
				p = 0,
				q = k.near;
			null !== q && q.layer === k.layer && (n += q.column - 1, p++);
			if (null !== l)
				for (q = 0; q < l.count; q++) {
					var k = l.n[q],
						r = k.fromVertex;
					k.valid && !k.rev && r.layer !== b && (n += r.column, p++)
				}
			if (null !== m)
				for (l = 0; l < m.count; l++) k = m.n[l], q = k.toVertex, k.valid && !k.rev && q.layer !== b && (n += q.column, p++);
			f[h] = 0 === p ? -1 : n / p
		}
		zu(a, b, d);
		return f
	}

	function Gu(a, b, c) {
		for (var d = yu(a, b), e = a.ke[b], f = [], h = 0; h < e; h++) {
			var k = d[h],
				l = null;
			0 >= c && (l = k.Qe);
			var m = null;
			0 <= c && (m = k.Je);
			var n = 0,
				p = [],
				q = k.near;
			null !== q && q.layer === k.layer && (p[n] = q.column - 1, n++);
			if (null !== l)
				for (q = 0; q < l.count; q++) {
					var k = l.n[q],
						r = k.fromVertex;
					k.valid && !k.rev && r.layer !== b && (p[n] = r.column + k.portFromColOffset, n++)
				}
			if (null !== m)
				for (l = 0; l < m.count; l++) k = m.n[l], q = k.toVertex, k.valid && !k.rev && q.layer !== b && (p[n] = q.column + k.portToColOffset, n++);
			0 === n ? f[h] = -1 : (p.sort(function(a, b) {
					return a - b
				}),
				m = n >> 1, f[h] = 0 !== (n & 1) ? p[m] : p[m - 1] + p[m] >> 1)
		}
		zu(a, b, d);
		return f
	}

	function Hu(a, b, c, d, e, f) {
		if (b.component === d) {
			b.component = c;
			var h = 0,
				k = 0;
			if (e)
				for (var l = b.kc; l.next();) {
					var k = l.value,
						m = k.toVertex,
						h = b.layer - m.layer,
						k = a.linkMinLength(k);
					h === k && Hu(a, m, c, d, e, f)
				}
			if (f)
				for (l = b.nc; l.next();) k = l.value, m = k.fromVertex, h = m.layer - b.layer, k = a.linkMinLength(k), h === k && Hu(a, m, c, d, e, f)
		}
	}

	function Iu(a, b, c, d, e, f) {
		if (b.component === d) {
			b.component = c;
			if (e)
				for (var h = b.kc; h.next();) Iu(a, h.value.toVertex, c, d, e, f);
			if (f)
				for (b = b.nc; b.next();) Iu(a, b.value.fromVertex, c, d, e, f)
		}
	}

	function su(a) {
		for (a = a.vertexes.i; a.next();) {
			var b = a.value;
			if (b.valid) return b
		}
		return null
	}

	function tu(a) {
		for (a = a.vertexes.i; a.next();) {
			var b = a.value;
			if (b.valid) {
				for (var c = !0, d = b.kc; d.next();)
					if (d.value.toVertex.valid) {
						c = !1;
						break
					}
				if (c) return b
			}
		}
		return null
	}

	function uu(a) {
		for (a = a.vertexes.i; a.next();) {
			var b = a.value;
			if (b.valid) {
				for (var c = !0, d = b.nc; d.next();)
					if (d.value.fromVertex.valid) {
						c = !1;
						break
					}
				if (c) return b
			}
		}
		return null
	}

	function vu(a, b) {
		b.Pp = a.ys;
		a.ys++;
		for (var c = b.kc; c.next();) {
			var d = c.value,
				e = d.toVertex; - 1 === e.Pp && (d.forest = !0, vu(a, e))
		}
		b.finish = a.ys;
		a.ys++
	}
	ku.prototype.assignLayers = function() {
		switch (this.Uo) {
			case Ju:
				Ku(this);
				break;
			case Lu:
				for (var a = 0, b = this.network.vertexes.i; b.next();) a = Mu(this, b.value), this.sb = Math.max(a, this.sb);
				for (b.reset(); b.next();) a = b.value, a.layer = this.sb - a.layer;
				break;
			default:
			case mu:
				Ku(this);
				for (b = this.network.vertexes.i; b.next();) b.value.valid = !1;
				for (b.reset(); b.next();) a = b.value, 0 === a.nc.count && Nu(this, a);
				a = Infinity;
				for (b.reset(); b.next();) a = Math.min(a, b.value.layer);
				this.sb = -1;
				for (b.reset(); b.next();) {
					var c = b.value;
					c.layer -=
						a;
					this.sb = Math.max(this.sb, c.layer)
				}
		}
	};

	function Ku(a) {
		for (var b = a.network.vertexes.i; b.next();) {
			var c = Ou(a, b.value);
			a.sb = Math.max(c, a.sb)
		}
	}

	function Ou(a, b) {
		var c = 0;
		if (-1 === b.layer) {
			for (var d = b.kc; d.next();) var e = d.value,
				f = e.toVertex,
				e = a.linkMinLength(e),
				c = Math.max(c, Ou(a, f) + e);
			b.layer = c
		} else c = b.layer;
		return c
	}

	function Mu(a, b) {
		var c = 0;
		if (-1 === b.layer) {
			for (var d = b.nc; d.next();) var e = d.value,
				f = e.fromVertex,
				e = a.linkMinLength(e),
				c = Math.max(c, Mu(a, f) + e);
			b.layer = c
		} else c = b.layer;
		return c
	}

	function Nu(a, b) {
		if (!b.valid) {
			b.valid = !0;
			for (var c = b.kc; c.next();) Nu(a, c.value.toVertex);
			for (c = a.network.vertexes.i; c.next();) c.value.component = -1;
			for (var d = b.Qe.n, e = d.length, f = 0; f < e; f++) {
				var h = d[f],
					k = h.fromVertex,
					l = h.toVertex,
					h = a.linkMinLength(h);
				k.layer - l.layer > h && Hu(a, k, 0, -1, !0, !1)
			}
			for (Hu(a, b, 1, -1, !0, !0); 0 !== b.component;) {
				for (var k = 0, d = Infinity, l = 0, m = null, n = a.network.vertexes.i; n.next();) {
					var p = n.value;
					if (1 === p.component) {
						for (var q = 0, r = !1, s = p.Qe.n, e = s.length, f = 0; f < e; f++) {
							var h = s[f],
								u = h.fromVertex,
								q = q + 1;
							1 !== u.component && (k += 1, u = u.layer - p.layer, h = a.linkMinLength(h), d = Math.min(d, u - h))
						}
						h = p.Je.n;
						e = h.length;
						for (f = 0; f < e; f++) s = h[f].toVertex, q -= 1, 1 !== s.component ? k -= 1 : r = !0;
						(null === m || q < l) && !r && (m = p, l = q)
					}
				}
				if (0 < k) {
					for (c.reset(); c.next();) e = c.value, 1 === e.component && (e.layer += d);
					b.component = 0
				} else m.component = 0
			}
			for (c = a.network.vertexes.i; c.next();) c.value.component = -1;
			for (Hu(a, b, 1, -1, !0, !1); 0 !== b.component;) {
				f = 0;
				e = Infinity;
				d = 0;
				h = null;
				for (k = a.network.vertexes.i; k.next();)
					if (l = k.value, 1 === l.component) {
						m =
							0;
						n = !1;
						r = l.Qe.n;
						p = r.length;
						for (q = 0; q < p; q++) s = r[q].fromVertex, m += 1, 1 !== s.component ? f += 1 : n = !0;
						r = l.Je.n;
						p = r.length;
						for (q = 0; q < p; q++) s = r[q], u = s.toVertex, m -= 1, 1 !== u.component && (f -= 1, u = l.layer - u.layer, s = a.linkMinLength(s), e = Math.min(e, u - s));
						(null === h || m > d) && !n && (h = l, d = m)
					}
				if (0 > f) {
					for (c.reset(); c.next();) f = c.value, 1 === f.component && (f.layer -= e);
					b.component = 0
				} else h.component = 0
			}
		}
	}

	function xu(a, b, c) {
		return 90 === a.ba ? c && !b.rev || !c && b.rev ? 270 : 90 : 180 === a.ba ? c && !b.rev || !c && b.rev ? 0 : 180 : 270 === a.ba ? c && !b.rev || !c && b.rev ? 90 : 270 : c && !b.rev || !c && b.rev ? 180 : 0
	}
	ku.prototype.initializeIndices = function() {
		switch (this.Ko) {
			default:
				case Pu:
				for (var a = this.network.vertexes.i; a.next();) {
				var b = a.value,
					c = b.layer;
				b.index = this.ke[c];
				this.ke[c]++
			}
			break;
			case nu:
					a = this.network.vertexes.i;
				for (b = this.sb; 0 <= b; b--)
					for (a.reset(); a.next();) c = a.value, c.layer === b && -1 === c.index && Qu(this, c);
				break;
			case Ru:
					for (a = this.network.vertexes.i, b = 0; b <= this.sb; b++)
					for (a.reset(); a.next();) c = a.value, c.layer === b && -1 === c.index && Su(this, c)
		}
	};

	function Qu(a, b) {
		var c = b.layer;
		b.index = a.ke[c];
		a.ke[c]++;
		for (var c = b.Je.xc(), d = !0; d;)
			for (var d = !1, e = 0; e < c.length - 1; e++) {
				var f = c[e],
					h = c[e + 1];
				f.portFromColOffset > h.portFromColOffset && (d = !0, c[e] = h, c[e + 1] = f)
			}
		for (e = 0; e < c.length; e++) d = c[e], d.valid && (d = d.toVertex, -1 === d.index && Qu(a, d))
	}

	function Su(a, b) {
		var c = b.layer;
		b.index = a.ke[c];
		a.ke[c]++;
		for (var c = b.Qe.xc(), d = !0, e = 0; d;)
			for (d = !1, e = 0; e < c.length - 1; e++) {
				var f = c[e],
					h = c[e + 1];
				f.portToColOffset > h.portToColOffset && (d = !0, c[e] = h, c[e + 1] = f)
			}
		for (e = 0; e < c.length; e++) d = c[e], d.valid && (d = d.fromVertex, -1 === d.index && Su(a, d))
	}
	ku.prototype.reduceCrossings = function() {
		for (var a = this.countCrossings(), b = Bu(this), c = 0, d = 0, e = 0, c = 0; c < this.Im; c++) {
			for (d = 0; d <= this.sb; d++) Tu(this, d, 1), Uu(this, d, 1);
			e = this.countCrossings();
			e < a && (a = e, b = Bu(this));
			for (d = this.sb; 0 <= d; d--) Tu(this, d, -1), Uu(this, d, -1);
			e = this.countCrossings();
			e < a && (a = e, b = Bu(this))
		}
		Cu(this, b);
		for (c = 0; c < this.Im; c++) {
			for (d = 0; d <= this.sb; d++) Tu(this, d, 0), Uu(this, d, 0);
			e = this.countCrossings();
			e < a && (a = e, b = Bu(this));
			for (d = this.sb; 0 <= d; d--) Tu(this, d, 0), Uu(this, d, 0);
			e = this.countCrossings();
			e < a && (a = e, b = Bu(this))
		}
		Cu(this, b);
		var f = !1,
			h = c = 0,
			k = 0,
			d = 0;
		switch (this.io) {
			case Vu:
				break;
			case Wu:
				for (k = a + 1;
					(d = this.countCrossings()) < k;)
					for (k = d, c = this.sb; 0 <= c; c--)
						for (h = 0; h <= c; h++) {
							for (f = !0; f;)
								for (f = !1, d = c; d >= h; d--) f = Uu(this, d, -1) || f;
							e = this.countCrossings();
							e >= a ? Cu(this, b) : (a = e, b = Bu(this));
							for (f = !0; f;)
								for (f = !1, d = c; d >= h; d--) f = Uu(this, d, 1) || f;
							e = this.countCrossings();
							e >= a ? Cu(this, b) : (a = e, b = Bu(this));
							for (f = !0; f;)
								for (f = !1, d = h; d <= c; d++) f = Uu(this, d, 1) || f;
							e >= a ? Cu(this, b) : (a = e, b = Bu(this));
							for (f = !0; f;)
								for (f = !1,
									d = h; d <= c; d++) f = Uu(this, d, -1) || f;
							e >= a ? Cu(this, b) : (a = e, b = Bu(this));
							for (f = !0; f;)
								for (f = !1, d = c; d >= h; d--) f = Uu(this, d, 0) || f;
							e >= a ? Cu(this, b) : (a = e, b = Bu(this));
							for (f = !0; f;)
								for (f = !1, d = h; d <= c; d++) f = Uu(this, d, 0) || f;
							e >= a ? Cu(this, b) : (a = e, b = Bu(this))
						}
				break;
			default:
			case ou:
				for (c = this.sb, h = 0, k = a + 1;
					(d = this.countCrossings()) < k;) {
					k = d;
					for (f = !0; f;)
						for (f = !1, d = c; d >= h; d--) f = Uu(this, d, -1) || f;
					e = this.countCrossings();
					e >= a ? Cu(this, b) : (a = e, b = Bu(this));
					for (f = !0; f;)
						for (f = !1, d = c; d >= h; d--) f = Uu(this, d, 1) || f;
					e = this.countCrossings();
					e >= a ? Cu(this, b) : (a = e, b = Bu(this));
					for (f = !0; f;)
						for (f = !1, d = h; d <= c; d++) f = Uu(this, d, 1) || f;
					e >= a ? Cu(this, b) : (a = e, b = Bu(this));
					for (f = !0; f;)
						for (f = !1, d = h; d <= c; d++) f = Uu(this, d, -1) || f;
					e >= a ? Cu(this, b) : (a = e, b = Bu(this));
					for (f = !0; f;)
						for (f = !1, d = c; d >= h; d--) f = Uu(this, d, 0) || f;
					e >= a ? Cu(this, b) : (a = e, b = Bu(this));
					for (f = !0; f;)
						for (f = !1, d = h; d <= c; d++) f = Uu(this, d, 0) || f;
					e >= a ? Cu(this, b) : (a = e, b = Bu(this))
				}
		}
		Cu(this, b)
	};

	function Tu(a, b, c) {
		var d = 0,
			e = yu(a, b),
			f = a.ke[b],
			h = Gu(a, b, c);
		c = Fu(a, b, c);
		for (d = 0; d < f; d++) - 1 === c[d] && (c[d] = e[d].column), -1 === h[d] && (h[d] = e[d].column);
		for (var k = !0, l; k;)
			for (k = !1, d = 0; d < f - 1; d++)
				if (h[d + 1] < h[d] || h[d + 1] === h[d] && c[d + 1] < c[d]) k = !0, l = h[d], h[d] = h[d + 1], h[d + 1] = l, l = c[d], c[d] = c[d + 1], c[d + 1] = l, l = e[d], e[d] = e[d + 1], e[d + 1] = l;
		for (d = h = 0; d < f; d++) l = e[d], l.index = d, h += a.nodeMinColumnSpace(l, !0), l.column = h, h += 1, h += a.nodeMinColumnSpace(l, !1);
		zu(a, b, e)
	}

	function Uu(a, b, c) {
		var d = yu(a, b),
			e = a.ke[b];
		c = Du(a, b, c);
		var f = 0,
			h;
		h = [];
		for (f = 0; f < e; f++) h[f] = -1;
		var k;
		k = [];
		for (f = 0; f < e; f++) k[f] = -1;
		for (var l = !1, m = !0; m;)
			for (m = !1, f = 0; f < e - 1; f++) {
				var n = c[d[f].index * e + d[f + 1].index],
					p = c[d[f + 1].index * e + d[f].index],
					q = 0,
					r = 0,
					s = d[f].column,
					u = d[f + 1].column,
					t = a.nodeMinColumnSpace(d[f], !0),
					x = a.nodeMinColumnSpace(d[f], !1),
					v = a.nodeMinColumnSpace(d[f + 1], !0),
					z = a.nodeMinColumnSpace(d[f + 1], !1),
					t = s - t + v,
					x = u - x + z,
					v = v = 0,
					A = d[f].nc.i;
				for (A.reset(); A.next();)
					if (v = A.value, z = v.fromVertex, v.valid &&
						z.layer === b) {
						for (v = 0; d[v] !== z;) v++;
						v < f && (q += 2 * (f - v), r += 2 * (f + 1 - v));
						v === f + 1 && (q += 1);
						v > f + 1 && (q += 4 * (v - f), r += 4 * (v - (f + 1)))
					}
				A = d[f].kc.i;
				for (A.reset(); A.next();)
					if (v = A.value, z = v.toVertex, v.valid && z.layer === b) {
						for (v = 0; d[v] !== z;) v++;
						v === f + 1 && (r += 1)
					}
				A = d[f + 1].nc.i;
				for (A.reset(); A.next();)
					if (v = A.value, z = v.fromVertex, v.valid && z.layer === b) {
						for (v = 0; d[v] !== z;) v++;
						v < f && (q += 2 * (f + 1 - v), r += 2 * (f - v));
						v === f && (r += 1);
						v > f + 1 && (q += 4 * (v - (f + 1)), r += 4 * (v - f))
					}
				A = d[f + 1].kc.i;
				for (A.reset(); A.next();)
					if (v = A.value, z = v.toVertex, v.valid &&
						z.layer === b) {
						for (v = 0; d[v] !== z;) v++;
						v === f && (q += 1)
					}
				var v = z = 0,
					A = h[d[f].index],
					L = k[d[f].index],
					E = h[d[f + 1].index],
					P = k[d[f + 1].index]; - 1 !== A && (z += Math.abs(A - s), v += Math.abs(A - x)); - 1 !== L && (z += Math.abs(L - s), v += Math.abs(L - x)); - 1 !== E && (z += Math.abs(E - u), v += Math.abs(E - t)); - 1 !== P && (z += Math.abs(P - u), v += Math.abs(P - t));
				if (r < q - .5 || r === q && p < n - .5 || r === q && p === n && v < z - .5) m = l = !0, d[f].column = x, d[f + 1].column = t, n = d[f], d[f] = d[f + 1], d[f + 1] = n
			}
		for (f = 0; f < e; f++) d[f].index = f;
		zu(a, b, d);
		return l
	}
	ku.prototype.straightenAndPack = function() {
		var a = 0,
			b = !1,
			c = 0 !== (this.aj & Xu),
			a = this.aj === pu;
		1E3 < this.network.edges.count && !a && (c = !1);
		if (c) {
			b = [];
			for (a = a = 0; a <= this.sb; a++) b[a] = 0;
			for (var d = 0, e = this.network.vertexes.i; e.next();) {
				var f = e.value,
					a = f.layer,
					d = f.column,
					f = this.nodeMinColumnSpace(f, !1);
				b[a] = Math.max(b[a], d + f)
			}
			for (e.reset(); e.next();) f = e.value, a = f.layer, d = f.column, f.column = (8 * (this.Kb - b[a]) >> 1) + 8 * d;
			this.Kb *= 8
		}
		if (0 !== (this.aj & Yu))
			for (b = !0; b;) {
				b = !1;
				for (a = this.Rf + 1; a <= this.sb; a++) b = Zu(this, a, 1) || b;
				for (a = this.Rf - 1; 0 <= a; a--) b = Zu(this, a, -1) || b;
				b = Zu(this, this.Rf, 0) || b
			}
		if (0 !== (this.aj & $u)) {
			for (a = this.Rf + 1; a <= this.sb; a++) av(this, a, 1);
			for (a = this.Rf - 1; 0 <= a; a--) av(this, a, -1);
			av(this, this.Rf, 0)
		}
		c && (bv(this, -1), bv(this, 1));
		if (0 !== (this.aj & Yu))
			for (b = !0; b;) {
				b = !1;
				b = Zu(this, this.Rf, 0) || b;
				for (a = this.Rf + 1; a <= this.sb; a++) b = Zu(this, a, 0) || b;
				for (a = this.Rf - 1; 0 <= a; a--) b = Zu(this, a, 0) || b
			}
	};

	function Zu(a, b, c) {
		for (var d = !1; cv(a, b, c);) d = !0;
		return d
	}

	function cv(a, b, c) {
		var d = 0,
			e = yu(a, b),
			f = a.ke[b],
			h = Fu(a, b, -1);
		if (0 < c)
			for (d = 0; d < f; d++) h[d] = -1;
		var k = Fu(a, b, 1);
		if (0 > c)
			for (d = 0; d < f; d++) k[d] = -1;
		for (var l = !1, m = !0; m;)
			for (m = !1, d = 0; d < f; d++) {
				var n = e[d].column,
					p = a.nodeMinColumnSpace(e[d], !0),
					q = a.nodeMinColumnSpace(e[d], !1),
					r = 0,
					r = 0 > d - 1 || n - e[d - 1].column - 1 > p + a.nodeMinColumnSpace(e[d - 1], !1) ? n - 1 : n,
					p = 0,
					p = d + 1 >= f || e[d + 1].column - n - 1 > q + a.nodeMinColumnSpace(e[d + 1], !0) ? n + 1 : n,
					s = q = 0,
					u = 0,
					t = 0,
					x = 0,
					v = 0;
				if (0 >= c)
					for (var z = e[d].nc.i; z.next();) {
						var v = z.value,
							A = v.fromVertex;
						v.valid &&
							A.layer !== b && (t = Au(v), x = v.portFromColOffset, v = v.portToColOffset, A = A.column, q += (Math.abs(n + v - (A + x)) + 1) * t, s += (Math.abs(r + v - (A + x)) + 1) * t, u += (Math.abs(p + v - (A + x)) + 1) * t)
					}
				if (0 <= c)
					for (z = e[d].kc.i; z.next();) v = z.value, A = v.toVertex, v.valid && A.layer !== b && (t = Au(v), x = v.portFromColOffset, v = v.portToColOffset, A = A.column, q += (Math.abs(n + x - (A + v)) + 1) * t, s += (Math.abs(r + x - (A + v)) + 1) * t, u += (Math.abs(p + x - (A + v)) + 1) * t);
				v = x = t = 0;
				z = h[e[d].index];
				A = k[e[d].index]; - 1 !== z && (t += Math.abs(z - n), x += Math.abs(z - r), v += Math.abs(z - p)); - 1 !== A &&
					(t += Math.abs(A - n), x += Math.abs(A - r), v += Math.abs(A - p));
				if (s < q || s === q && x < t) m = l = !0, e[d].column = r;
				else if (u < q || u === q && v < t) m = l = !0, e[d].column = p
			}
		zu(a, b, e);
		a.normalize();
		return l
	}

	function av(a, b, c) {
		var d = 0,
			e = yu(a, b),
			f = a.ke[b],
			h = Gu(a, b, c);
		c = [];
		for (d = 0; d < f; d++) c[d] = h[d];
		for (h = !0; h;)
			for (h = !1, d = 0; d < f; d++) {
				var k = e[d].column,
					l = a.nodeMinColumnSpace(e[d], !0),
					m = a.nodeMinColumnSpace(e[d], !1),
					n = 0,
					p = 0,
					q = 0,
					q = p = 0; - 1 === c[d] ? 0 === d && d === f - 1 ? n = k : 0 === d ? (p = e[d + 1].column, n = p - k === m + a.nodeMinColumnSpace(e[d + 1], !0) ? k - 1 : k) : d === f - 1 ? (q = e[d - 1].column, n = k - q === l + a.nodeMinColumnSpace(e[d - 1], !1) ? k + 1 : k) : (q = e[d - 1].column, q = q + a.nodeMinColumnSpace(e[d - 1], !1) + l + 1, p = e[d + 1].column, p = p - a.nodeMinColumnSpace(e[d +
					1], !0) - m - 1, n = (q + p) / 2 | 0) : 0 === d && d === f - 1 ? n = c[d] : 0 === d ? (p = e[d + 1].column, p = p - a.nodeMinColumnSpace(e[d + 1], !0) - m - 1, n = Math.min(c[d], p)) : d === f - 1 ? (q = e[d - 1].column, q = q + a.nodeMinColumnSpace(e[d - 1], !1) + l + 1, n = Math.max(c[d], q)) : (q = e[d - 1].column, q = q + a.nodeMinColumnSpace(e[d - 1], !1) + l + 1, p = e[d + 1].column, p = p - a.nodeMinColumnSpace(e[d + 1], !0) - m - 1, q < c[d] && c[d] < p ? n = c[d] : q >= c[d] ? n = q : p <= c[d] && (n = p));
				n !== k && (h = !0, e[d].column = n)
			}
		zu(a, b, e);
		a.normalize()
	}

	function dv(a, b) {
		for (var c = !0, d = a.network.vertexes.i; d.next();) {
			var e = d.value,
				f = a.nodeMinColumnSpace(e, !0),
				h = a.nodeMinColumnSpace(e, !1);
			if (e.column - f <= b && e.column + h >= b) {
				c = !1;
				break
			}
		}
		e = !1;
		if (c)
			for (d.reset(); d.next();) c = d.value, c.column > b && (c.column -= 1, e = !0);
		return e
	}

	function ev(a, b) {
		for (var c = b, c = b + 1, d = 0, e = [], f = [], d = 0; d <= a.sb; d++) e[d] = !1, f[d] = !1;
		for (var h = a.network.vertexes.i; h.next();) {
			var d = h.value,
				k = d.column - a.nodeMinColumnSpace(d, !0),
				l = d.column + a.nodeMinColumnSpace(d, !1);
			k <= b && l >= b && (e[d.layer] = !0);
			k <= c && l >= c && (f[d.layer] = !0)
		}
		k = !0;
		c = !1;
		for (d = 0; d <= a.sb; d++) k = k && !(e[d] && f[d]);
		if (k)
			for (h.reset(); h.next();) e = h.value, e.column > b && (e.column -= 1, c = !0);
		return c
	}

	function bv(a, b) {
		for (var c = 0; c <= a.Kb; c++)
			for (; dv(a, c););
		a.normalize();
		for (c = 0; c < a.Kb; c++)
			for (; ev(a, c););
		a.normalize();
		var c = 0,
			d, e = 0,
			f = 0,
			h = 0;
		if (0 < b)
			for (c = 0; c <= a.Kb; c++)
				for (d = Bu(a), e = Eu(a), f = e + 1; e < f;) f = e, fv(a, c, 1), h = Eu(a), h > e ? Cu(a, d) : h < e && (e = h, d = Bu(a));
		if (0 > b)
			for (c = a.Kb; 0 <= c; c--)
				for (d = Bu(a), e = Eu(a), f = e + 1; e < f;) f = e, fv(a, c, -1), h = Eu(a), h > e ? Cu(a, d) : h < e && (e = h, d = Bu(a));
		a.normalize()
	}

	function fv(a, b, c) {
		a.Cg = 0;
		for (var d = a.network.vertexes.i; d.next();) d.value.component = -1;
		if (0 < c)
			for (d.reset(); d.next();) {
				var e = d.value;
				e.column - a.nodeMinColumnSpace(e, !0) <= b && (e.component = a.Cg)
			}
		if (0 > c)
			for (d.reset(); d.next();) e = d.value, e.column + a.nodeMinColumnSpace(e, !1) >= b && (e.component = a.Cg);
		a.Cg++;
		for (d.reset(); d.next();) b = d.value, -1 === b.component && (Iu(a, b, a.Cg, -1, !0, !0), a.Cg++);
		var f = 0;
		b = [];
		for (f = 0; f < a.Cg * a.Cg; f++) b[f] = !1;
		e = [];
		for (f = 0; f < (a.sb + 1) * (a.Kb + 1); f++) e[f] = -1;
		for (d.reset(); d.next();)
			for (var f =
					d.value, h = f.layer, k = Math.max(0, f.column - a.nodeMinColumnSpace(f, !0)), l = Math.min(a.Kb, f.column + a.nodeMinColumnSpace(f, !1)); k <= l; k++) e[h * (a.Kb + 1) + k] = f.component;
		for (f = 0; f <= a.sb; f++) {
			if (0 < c)
				for (k = 0; k < a.Kb; k++) - 1 !== e[f * (a.Kb + 1) + k] && -1 !== e[f * (a.Kb + 1) + k + 1] && e[f * (a.Kb + 1) + k] !== e[f * (a.Kb + 1) + k + 1] && (b[e[f * (a.Kb + 1) + k] * a.Cg + e[f * (a.Kb + 1) + k + 1]] = !0);
			if (0 > c)
				for (k = a.Kb; 0 < k; k--) - 1 !== e[f * (a.Kb + 1) + k] && -1 !== e[f * (a.Kb + 1) + k - 1] && e[f * (a.Kb + 1) + k] !== e[f * (a.Kb + 1) + k - 1] && (b[e[f * (a.Kb + 1) + k] * a.Cg + e[f * (a.Kb + 1) + k - 1]] = !0)
		}
		e = [];
		for (f =
			0; f < a.Cg; f++) e[f] = !0;
		h = new H("number");
		h.add(0);
		for (l = 0; 0 !== h.count;)
			if (l = h.n[h.count - 1], h.dd(h.count - 1), e[l])
				for (e[l] = !1, f = 0; f < a.Cg; f++) b[l * a.Cg + f] && h.Rd(0, f);
		if (0 < c)
			for (d.reset(); d.next();) a = d.value, e[a.component] && (a.column -= 1);
		if (0 > c)
			for (d.reset(); d.next();) c = d.value, e[c.component] && (c.column += 1)
	}
	ku.prototype.commitLayout = function() {
		if (this.zq)
			for (var a = wu(this, !0), b = wu(this, !1), c = this.network.edges.i; c.next();) {
				var d = c.value.link;
				null !== d && (d.Ab = a, d.Bb = b)
			}
		this.commitNodes();
		this.iA();
		this.uu && this.commitLinks()
	};

	function wu(a, b) {
		return 270 === a.ba ? b ? Gc : Jc : 90 === a.ba ? b ? Jc : Gc : 180 === a.ba ? b ? Hc : Ic : b ? Ic : Hc
	}
	ku.prototype.commitNodes = function() {
		this.yg = [];
		this.Qf = [];
		this.Pf = [];
		this.Ob = [];
		for (var a = 0; a <= this.sb; a++) this.yg[a] = 0, this.Qf[a] = 0, this.Pf[a] = 0, this.Ob[a] = 0;
		for (a = this.network.vertexes.i; a.next();) {
			var b = a.value,
				c = b.layer;
			this.yg[c] = Math.max(this.yg[c], this.nodeMinLayerSpace(b, !0));
			this.Qf[c] = Math.max(this.Qf[c], this.nodeMinLayerSpace(b, !1))
		}
		for (var b = 0, d = this.Jm, c = 0; c <= this.sb; c++) {
			var e = d;
			0 >= this.yg[c] + this.Qf[c] && (e = 0);
			0 < c && (b += e / 2);
			90 === this.ba || 0 === this.ba ? (b += this.Qf[c], this.Pf[c] = b, b += this.yg[c]) :
				(b += this.yg[c], this.Pf[c] = b, b += this.Qf[c]);
			c < this.sb && (b += e / 2);
			this.Ob[c] = b
		}
		d = b;
		b = this.Nd;
		for (c = 0; c <= this.sb; c++) 270 === this.ba ? this.Pf[c] = b.y + this.Pf[c] : 90 === this.ba ? (this.Pf[c] = b.y + d - this.Pf[c], this.Ob[c] = d - this.Ob[c]) : 180 === this.ba ? this.Pf[c] = b.x + this.Pf[c] : (this.Pf[c] = b.x + d - this.Pf[c], this.Ob[c] = d - this.Ob[c]);
		a.reset();
		for (d = e = Infinity; a.next();) {
			var c = a.value,
				f = c.layer,
				h = c.column | 0,
				k = 0,
				l = 0;
			270 === this.ba || 90 === this.ba ? (k = b.x + this.Yd * h, l = this.Pf[f]) : (k = this.Pf[f], l = b.y + this.Yd * h);
			c.la = k;
			c.ra = l;
			e = Math.min(c.x, e);
			d = Math.min(c.y, d)
		}
		e = b.x - e;
		b = b.y - d;
		this.kC = new y(e, b);
		for (a.reset(); a.next();) c = a.value, c.x += e, c.y += b, c.commit()
	};
	ku.prototype.iA = function() {
		for (var a = 0, b = this.Jm, c = 0; c <= this.sb; c++) a += this.yg[c], a += this.Qf[c];
		for (var a = a + this.sb * b, b = [], c = this.Yd * this.Kb, d = this.SI; 0 <= d; d--) 270 === this.ba ? 0 === d ? b.push(new B(0, 0, c, Math.abs(this.Ob[0]))) : b.push(new B(0, this.Ob[d - 1], c, Math.abs(this.Ob[d - 1] - this.Ob[d]))) : 90 === this.ba ? 0 === d ? b.push(new B(0, this.Ob[0], c, Math.abs(this.Ob[0] - a))) : b.push(new B(0, this.Ob[d], c, Math.abs(this.Ob[d - 1] - this.Ob[d]))) : 180 === this.ba ? 0 === d ? b.push(new B(0, 0, Math.abs(this.Ob[0]), c)) : b.push(new B(this.Ob[d -
			1], 0, Math.abs(this.Ob[d - 1] - this.Ob[d]), c)) : 0 === d ? b.push(new B(this.Ob[0], 0, Math.abs(this.Ob[0] - a), c)) : b.push(new B(this.Ob[d], 0, Math.abs(this.Ob[d - 1] - this.Ob[d]), c));
		this.commitLayers(b, this.kC)
	};
	ku.prototype.commitLayers = function() {};
	ku.prototype.commitLinks = function() {
		for (var a = this.network.edges.i, b; a.next();) b = a.value.link, null !== b && (b.jm(), b.Hp(), b.nj());
		for (a.reset(); a.next();) b = a.value.link, null !== b && b.ao();
		for (a.reset(); a.next();) {
			var c = a.value;
			b = c.link;
			if (null !== b) {
				b.jm();
				var d = b,
					e = d.W,
					f = d.Z,
					h = d.lc,
					k = d.Ic;
				if (null !== e) {
					var l = e.findVisibleNode();
					null !== l && l !== e && (e = l, h = l.port)
				}
				if (null !== f) {
					var m = f.findVisibleNode();
					null !== m && m !== f && (f = m, k = m.port)
				}
				var n = b.computeSpot(!0, h),
					p = b.computeSpot(!1, k),
					q = c.fromVertex,
					r = c.toVertex;
				if (c.valid) {
					if (b.Ze === Kj && 4 === b.qa) {
						if (c.rev) var s = e,
							e = f,
							f = s,
							u = h,
							h = k,
							k = u;
						if (q.column === r.column) {
							var t = b.getLinkPoint(e, h, n, !0, !1, f, k),
								x = b.getLinkPoint(f, k, p, !1, !1, e, h);
							t.I() || t.set(e.Y.Nl);
							x.I() || x.set(f.Y.Nl);
							b.Hp();
							b.lj(t.x, t.y);
							b.lj((2 * t.x + x.x) / 3, (2 * t.y + x.y) / 3);
							b.lj((t.x + 2 * x.x) / 3, (t.y + 2 * x.y) / 3);
							b.lj(x.x, x.y)
						} else {
							var v = !1,
								z = !1;
							null !== h && n === yb && (v = !0);
							null !== k && p === yb && (z = !0);
							if (v || z) {
								var A = b.l(0).x,
									L = b.l(0).y,
									E = b.l(1).x,
									P = b.l(1).y,
									$ = b.l(2).x,
									S = b.l(2).y,
									ba = b.l(3).x,
									ha = b.l(3).y;
								if (v) {
									90 === this.ba ||
										270 === this.ba ? (E = A, P = (L + ha) / 2) : (E = (A + ba) / 2, P = L);
									b.ca(1, E, P);
									var ya = b.getLinkPoint(e, h, n, !0, !1, f, k);
									ya.I() || ya.set(e.Y.Nl);
									b.ca(0, ya.x, ya.y)
								}
								z && (90 === this.ba || 270 === this.ba ? ($ = ba, S = (L + ha) / 2) : ($ = (A + ba) / 2, S = ha), b.ca(2, $, S), ya = b.getLinkPoint(f, k, p, !1, !1, e, h), ya.I() || ya.set(f.Y.Nl), b.ca(3, ya.x, ya.y))
							}
						}
					}
					b.nj()
				} else if (q.layer === r.layer) b.nj();
				else {
					var Ga = !1,
						eb = !1,
						wa = 0,
						U = b.Yt + 1;
					if (b.ac) eb = !0, wa = b.qa, 4 < wa && b.points.removeRange(2, wa - 3);
					else if (b.Ze === Kj) Ga = !0, wa = b.qa, 4 < wa && b.points.removeRange(2, wa - 3), U = 2;
					else {
						var wa = b.qa,
							sb = n === yb,
							Kb = p === yb;
						2 < wa && sb && Kb ? b.points.removeRange(1, wa - 2) : 3 < wa && sb && !Kb ? b.points.removeRange(1, wa - 3) : 3 < wa && !sb && Kb ? b.points.removeRange(2, wa - 2) : 4 < wa && !sb && !Kb && b.points.removeRange(2, wa - 3)
					}
					var Oa, Lc;
					if (c.rev) {
						for (var Ma = 0; null !== r && q !== r;) {
							Lc = Oa = null;
							for (var dg = r.nc.i; dg.next();) {
								var eg = dg.value;
								if (eg.link === c.link && (Oa = eg.fromVertex, Lc = eg.toVertex, null === Oa.vd)) break
							}
							if (Oa !== q)
								if (fb = b.l(U - 1).x, pb = b.l(U - 1).y, na = Oa.la, ja = Oa.ra, eb) 180 === this.ba || 0 === this.ba ? 2 === U ? (b.w(U++, fb, pb),
									b.w(U++, fb, ja)) : (Hd = null !== Lc ? Lc.ra : pb, Hd !== ja && (Za = this.Ob[Oa.layer - 1], b.w(U++, Za, pb), b.w(U++, Za, ja))) : 2 === U ? (b.w(U++, fb, pb), b.w(U++, na, pb)) : (Gf = null !== Lc ? Lc.la : fb, Gf !== na && (Za = this.Ob[Oa.layer - 1], b.w(U++, fb, Za), b.w(U++, na, Za)));
								else if (2 === U)
								if (Ia = Math.max(10, this.yg[r.layer]), kb = Math.max(10, this.Qf[r.layer]), Ga) 180 === this.ba ? na <= r.M.x ? (Ma = r.M.x, b.w(U++, Ma - Ia, ja), b.w(U++, Ma, ja), b.w(U++, Ma + kb, ja)) : (b.w(U++, na - Ia, ja), b.w(U++, na, ja), b.w(U++, na + kb, ja)) : 90 === this.ba ? ja >= r.M.bottom ? (Ma = r.M.y + r.M.height,
									b.w(U++, na, Ma + kb), b.w(U++, na, Ma), b.w(U++, na, Ma - Ia)) : (b.w(U++, na, ja + kb), b.w(U++, na, ja), b.w(U++, na, ja - Ia)) : 270 === this.ba ? ja <= r.M.y ? (Ma = r.M.y, b.w(U++, na, Ma - Ia), b.w(U++, na, Ma), b.w(U++, na, Ma + kb)) : (b.w(U++, na, ja - Ia), b.w(U++, na, ja), b.w(U++, na, ja + kb)) : 0 === this.ba && (na >= r.M.right ? (Ma = r.M.x + r.M.width, b.w(U++, Ma + kb, ja), b.w(U++, Ma, ja), b.w(U++, Ma - Ia, ja)) : (b.w(U++, na + kb, ja), b.w(U++, na, ja), b.w(U++, na - Ia, ja)));
								else {
									b.w(U++, fb, pb);
									var sd = 0;
									if (180 === this.ba || 0 === this.ba) {
										if (180 === this.ba ? na >= r.M.right : na <= r.M.x) sd =
											(0 === this.ba ? -Ia : kb) / 2;
										b.w(U++, fb + sd, ja)
									} else {
										if (270 === this.ba ? ja >= r.M.bottom : ja <= r.M.y) sd = (90 === this.ba ? -Ia : kb) / 2;
										b.w(U++, na, pb + sd)
									}
									b.w(U++, na, ja)
								}
							else Ia = Math.max(10, this.yg[Oa.layer]), kb = Math.max(10, this.Qf[Oa.layer]), 180 === this.ba ? (Ga && b.w(U++, na - Ia, ja), b.w(U++, na, ja), Ga && b.w(U++, na + kb, ja)) : 90 === this.ba ? (Ga && b.w(U++, na, ja + kb), b.w(U++, na, ja), Ga && b.w(U++, na, ja - Ia)) : 270 === this.ba ? (Ga && b.w(U++, na, ja - Ia), b.w(U++, na, ja), Ga && b.w(U++, na, ja + kb)) : (Ga && b.w(U++, na + kb, ja), b.w(U++, na, ja), Ga && b.w(U++, na - Ia,
								ja));
							r = Oa
						}
						if (null === k || n !== yb || eb)
							if (fb = b.l(U - 1).x, pb = b.l(U - 1).y, na = b.l(U).x, ja = b.l(U).y, eb) {
								var td = this.Qf[q.layer],
									Mc = 0;
								180 === this.ba || 0 === this.ba ? (Mc = pb, Mc >= q.M.y && Mc <= q.M.bottom && (180 === this.ba ? na >= q.M.x : na <= q.M.right) && (Ma = q.la + (180 === this.ba ? -td : td), Mc = Mc < q.M.y + q.M.height / 2 ? q.M.y - this.Yd / 2 : q.M.bottom + this.Yd / 2, b.w(U++, Ma, pb), b.w(U++, Ma, Mc)), b.w(U++, na, Mc)) : (Mc = fb, Mc >= q.M.x && Mc <= q.M.right && (270 === this.ba ? ja >= q.M.y : ja <= q.M.bottom) && (Ma = q.ra + (270 === this.ba ? -td : td), Mc = Mc < q.M.x + q.M.width / 2 ? q.M.x -
									this.Yd / 2 : q.M.right + this.Yd / 2, b.w(U++, fb, Ma), b.w(U++, Mc, Ma)), b.w(U++, Mc, ja));
								b.w(U++, na, ja)
							} else if (Ga) Ia = Math.max(10, this.yg[q.layer]), kb = Math.max(10, this.Qf[q.layer]), 180 === this.ba && na >= q.M.x ? (Ma = q.M.x + q.M.width, b.ca(U - 2, Ma, pb), b.ca(U - 1, Ma + kb, pb)) : 90 === this.ba && ja <= q.M.bottom ? (Ma = q.M.y, b.ca(U - 2, fb, Ma), b.ca(U - 1, fb, Ma - Ia)) : 270 === this.ba && ja >= q.M.y ? (Ma = q.M.y + q.M.height, b.ca(U - 2, fb, Ma), b.ca(U - 1, fb, Ma + kb)) : 0 === this.ba && na <= q.M.right && (Ma = q.M.x, b.ca(U - 2, Ma, pb), b.ca(U - 1, Ma - Ia, pb));
						else {
							Ia = Math.max(10,
								this.yg[q.layer]);
							kb = Math.max(10, this.Qf[q.layer]);
							sd = 0;
							if (180 === this.ba || 0 === this.ba) {
								if (180 === this.ba ? na <= q.M.x : na >= q.M.right) sd = (0 === this.ba ? kb : -Ia) / 2;
								b.w(U++, na + sd, pb)
							} else {
								if (270 === this.ba ? ja <= q.M.y : ja >= q.M.bottom) sd = (90 === this.ba ? kb : -Ia) / 2;
								b.w(U++, fb, ja + sd)
							}
							b.w(U++, na, ja)
						}
					} else {
						for (; null !== q && q !== r;) {
							Lc = Oa = null;
							for (var qh = q.kc.i; qh.next();) {
								var Xe = qh.value;
								if (Xe.link === c.link && (Oa = Xe.toVertex, Lc = Xe.fromVertex, null !== Lc.vd && (Lc = null), null === Oa.vd)) break
							}
							var fb = 0,
								pb = 0,
								na = 0,
								ja = 0,
								Za = 0,
								Ia = 0,
								kb = 0;
							if (Oa !== r)
								if (fb = b.l(U - 1).x, pb = b.l(U - 1).y, na = Oa.la, ja = Oa.ra, eb)
									if (180 === this.ba || 0 === this.ba) {
										var Hd = null !== Lc ? Lc.ra : pb;
										Hd !== ja && (Za = this.Ob[Oa.layer], 2 === U && (Za = 0 === this.ba ? Math.max(Za, fb) : Math.min(Za, fb)), b.w(U++, Za, pb), b.w(U++, Za, ja))
									} else {
										var Gf = null !== Lc ? Lc.la : fb;
										Gf !== na && (Za = this.Ob[Oa.layer], 2 === U && (Za = 90 === this.ba ? Math.max(Za, pb) : Math.min(Za, pb)), b.w(U++, fb, Za), b.w(U++, na, Za))
									}
							else Ia = Math.max(10, this.yg[Oa.layer]), kb = Math.max(10, this.Qf[Oa.layer]), 180 === this.ba ? (b.w(U++, na + kb, ja), Ga && b.w(U++,
								na, ja), b.w(U++, na - Ia, ja)) : 90 === this.ba ? (b.w(U++, na, ja - Ia), Ga && b.w(U++, na, ja), b.w(U++, na, ja + kb)) : 270 === this.ba ? (b.w(U++, na, ja + kb), Ga && b.w(U++, na, ja), b.w(U++, na, ja - Ia)) : (b.w(U++, na - Ia, ja), Ga && b.w(U++, na, ja), b.w(U++, na + kb, ja));
							q = Oa
						}
						eb && (fb = b.l(U - 1).x, pb = b.l(U - 1).y, na = b.l(U).x, ja = b.l(U).y, 180 === this.ba || 0 === this.ba ? pb !== ja && (Za = 0 === this.ba ? Math.min(Math.max((na + fb) / 2, this.Ob[r.layer]), na) : Math.max(Math.min((na + fb) / 2, this.Ob[r.layer]), na), b.w(U++, Za, pb), b.w(U++, Za, ja)) : fb !== na && (Za = 90 === this.ba ? Math.min(Math.max((ja +
							pb) / 2, this.Ob[r.layer]), ja) : Math.max(Math.min((ja + pb) / 2, this.Ob[r.layer]), ja), b.w(U++, fb, Za), b.w(U++, na, Za)))
					}
					if (null !== d && Ga) {
						if (null !== h) {
							if (n === yb) {
								var qe = b.l(0),
									Yd = b.l(2);
								qe.L(Yd) || b.ca(1, (qe.x + Yd.x) / 2, (qe.y + Yd.y) / 2)
							}
							ya = b.getLinkPoint(e, h, yb, !0, !1, f, k);
							ya.I() || ya.set(e.Y.Nl);
							b.ca(0, ya.x, ya.y)
						}
						null !== k && (p === yb && (qe = b.l(b.qa - 1), Yd = b.l(b.qa - 3), qe.L(Yd) || b.ca(b.qa - 2, (qe.x + Yd.x) / 2, (qe.y + Yd.y) / 2)), ya = b.getLinkPoint(f, k, yb, !1, !1, e, h), ya.I() || ya.set(f.Y.Nl), b.ca(b.qa - 1, ya.x, ya.y))
					}
					b.nj();
					c.commit()
				}
			}
		}
		for (var gd =
				new H(W), rh = this.network.edges.i; rh.next();) {
			var Hf = rh.value.link;
			null !== Hf && Hf.ac && !gd.contains(Hf) && gd.add(Hf)
		}
		if (0 < gd.count)
			if (90 === this.ba || 270 === this.ba) {
				for (var Dg = 0, Cb = new H(gv), Ac, Zd, sh = gd.i; sh.next();) {
					var qb = sh.value;
					if (null !== qb && qb.ac)
						for (var Ja = 2; Ja < qb.qa - 3; Ja++)
							if (Ac = qb.l(Ja), Zd = qb.l(Ja + 1), hv(Ac.y, Zd.y) && !hv(Ac.x, Zd.x)) {
								var Lb = new gv;
								Lb.layer = Math.floor(Ac.y / 2);
								var If = qb.l(0),
									Eg = qb.l(qb.qa - 1);
								Lb.first = If.x * If.x + If.y;
								Lb.ge = Eg.x * Eg.x + Eg.y;
								Lb.Xe = Math.min(Ac.x, Zd.x);
								Lb.se = Math.max(Ac.x,
									Zd.x);
								Lb.index = Ja;
								Lb.link = qb;
								if (Ja + 2 < qb.qa) {
									var th = qb.l(Ja - 1),
										gb = qb.l(Ja + 2),
										tc = 0;
									th.y < Ac.y ? tc = gb.y < Ac.y ? 3 : Ac.x < Zd.x ? 2 : 1 : th.y > Ac.y && (tc = gb.y > Ac.y ? 0 : Zd.x < Ac.x ? 2 : 1);
									Lb.ui = tc
								}
								Cb.add(Lb)
							}
				}
				if (1 < Cb.count) {
					Cb.sort(this.mG);
					for (var Vb = 0; Vb < Cb.count;) {
						for (var re = Cb.n[Vb].layer, uc = Vb + 1; uc < Cb.count && Cb.n[uc].layer === re;) uc++;
						if (1 < uc - Vb)
							for (var vc = Vb; vc < uc;) {
								for (var rb = Cb.n[vc].se, kc = Vb + 1; kc < uc && Cb.n[kc].Xe < rb;) rb = Math.max(rb, Cb.n[kc].se), kc++;
								var tb = kc - vc;
								if (1 < tb) {
									Cb.Bq(this.py, vc, vc + tb);
									for (var Bc = 1, bb = Cb.n[vc].ge,
											Ja = vc; Ja < kc; Ja++) {
										var Qa = Cb.n[Ja];
										Qa.ge !== bb && (Bc++, bb = Qa.ge)
									}
									Cb.Bq(this.lG, vc, vc + tb);
									for (var Hb = 1, bb = Cb.n[vc].first, Ja = vc; Ja < kc; Ja++) Qa = Cb.n[Ja], Qa.first !== bb && (Hb++, bb = Qa.first);
									var ud = !0,
										fg = Hb;
									Bc < Hb ? (ud = !1, fg = Bc, bb = Cb.n[vc].ge, Cb.Bq(this.py, vc, vc + tb)) : bb = Cb.n[vc].first;
									for (var Ye = 0, Ja = vc; Ja < kc; Ja++) {
										Qa = Cb.n[Ja];
										(ud ? Qa.first : Qa.ge) !== bb && (Ye++, bb = ud ? Qa.first : Qa.ge);
										qb = Qa.link;
										Ac = qb.l(Qa.index);
										Zd = qb.l(Qa.index + 1);
										var gg = this.LF * (Ye - (fg - 1) / 2);
										Dg++;
										qb.jm();
										qb.ca(Qa.index, Ac.x, Ac.y + gg);
										qb.ca(Qa.index +
											1, Zd.x, Zd.y + gg);
										qb.nj()
									}
								}
								vc = kc
							}
						Vb = uc
					}
				}
			} else {
				for (var rj = 0, Mb = new H(gv), Cc, wc, hd = gd.i; hd.next();) {
					var lb = hd.value;
					if (null !== lb && lb.ac)
						for (var Nb = 2; Nb < lb.qa - 3; Nb++)
							if (Cc = lb.l(Nb), wc = lb.l(Nb + 1), hv(Cc.x, wc.x) && !hv(Cc.y, wc.y)) {
								var se = new gv;
								se.layer = Math.floor(Cc.x / 2);
								var ub = lb.l(0),
									$d = lb.l(lb.qa - 1);
								se.first = ub.x + ub.y * ub.y;
								se.ge = $d.x + $d.y * $d.y;
								se.Xe = Math.min(Cc.y, wc.y);
								se.se = Math.max(Cc.y, wc.y);
								se.index = Nb;
								se.link = lb;
								if (Nb + 2 < lb.qa) {
									var uh = lb.l(Nb - 1),
										vh = lb.l(Nb + 2),
										Fg = 0;
									uh.x < Cc.x ? Fg = vh.x < Cc.x ? 3 : Cc.y < wc.y ?
										2 : 1 : uh.x > Cc.x && (Fg = vh.x > Cc.x ? 0 : wc.y < Cc.y ? 2 : 1);
									se.ui = Fg
								}
								Mb.add(se)
							}
				}
				if (1 < Mb.count) {
					Mb.sort(this.mG);
					for (var id = 0; id < Mb.count;) {
						for (var Id = Mb.n[id].layer, cc = id + 1; cc < Mb.count && Mb.n[cc].layer === Id;) cc++;
						if (1 < cc - id)
							for (var vb = id; vb < cc;) {
								for (var vd = Mb.n[vb].se, jb = id + 1; jb < cc && Mb.n[jb].Xe < vd;) vd = Math.max(vd, Mb.n[jb].se), jb++;
								var dc = jb - vb;
								if (1 < dc) {
									Mb.Bq(this.py, vb, vb + dc);
									for (var fi = 1, Yc = Mb.n[vb].ge, Nb = vb; Nb < jb; Nb++) {
										var Db = Mb.n[Nb];
										Db.ge !== Yc && (fi++, Yc = Db.ge)
									}
									Mb.Bq(this.lG, vb, vb + dc);
									for (var te = 1, Yc = Mb.n[vb].first,
											Nb = vb; Nb < jb; Nb++) Db = Mb.n[Nb], Db.first !== Yc && (te++, Yc = Db.first);
									var Ze = !0,
										Zc = te;
									fi < te ? (Ze = !1, Zc = fi, Yc = Mb.n[vb].ge, Mb.Bq(this.py, vb, vb + dc)) : Yc = Mb.n[vb].first;
									for (var Jf = 0, Nb = vb; Nb < jb; Nb++) {
										Db = Mb.n[Nb];
										(Ze ? Db.first : Db.ge) !== Yc && (Jf++, Yc = Ze ? Db.first : Db.ge);
										lb = Db.link;
										Cc = lb.l(Db.index);
										wc = lb.l(Db.index + 1);
										var Gg = this.LF * (Jf - (Zc - 1) / 2);
										rj++;
										lb.jm();
										lb.ca(Db.index, Cc.x + Gg, Cc.y);
										lb.ca(Db.index + 1, wc.x + Gg, wc.y);
										lb.nj()
									}
								}
								vb = jb
							}
						id = cc
					}
				}
			}
	};
	ku.prototype.mG = function(a, b) {
		return a instanceof gv && b instanceof gv && a !== b ? a.layer < b.layer ? -1 : a.layer > b.layer ? 1 : a.Xe < b.Xe ? -1 : a.Xe > b.Xe ? 1 : a.se < b.se ? -1 : a.se > b.se ? 1 : 0 : 0
	};
	ku.prototype.lG = function(a, b) {
		return a instanceof gv && b instanceof gv && a !== b ? a.first < b.first ? -1 : a.first > b.first || a.ui < b.ui ? 1 : a.ui > b.ui || a.Xe < b.Xe ? -1 : a.Xe > b.Xe ? 1 : a.se < b.se ? -1 : a.se > b.se ? 1 : 0 : 0
	};
	ku.prototype.py = function(a, b) {
		return a instanceof gv && b instanceof gv && a !== b ? a.ge < b.ge ? -1 : a.ge > b.ge || a.ui < b.ui ? 1 : a.ui > b.ui || a.Xe < b.Xe ? -1 : a.Xe > b.Xe ? 1 : a.se < b.se ? -1 : a.se > b.se ? 1 : 0 : 0
	};

	function hv(a, b) {
		var c = a - b;
		return -1 < c && 1 > c
	}

	function yu(a, b) {
		var c, d = a.ke[b];
		if (d >= a.ih.length) {
			c = [];
			for (var e = 0; e < a.ih.length; e++) c[e] = a.ih[e];
			a.ih = c
		}
		void 0 === a.ih[d] || null === a.ih[d] ? c = [] : (c = a.ih[d], a.ih[d] = null);
		d = a.zs[b];
		for (e = 0; e < d.length; e++) {
			var f = d[e];
			c[f.index] = f
		}
		return c
	}

	function zu(a, b, c) {
		a.ih[a.ke[b]] = c
	}
	w.defineProperty(ku, {
		layerSpacing: "layerSpacing"
	}, function() {
		return this.Jm
	}, function(a) {
		this.Jm !== a && (w.j(a, "number", ku, "layerSpacing"), 0 <= a && (this.Jm = a, this.J()))
	});
	w.defineProperty(ku, {
		KK: "columnSpacing"
	}, function() {
		return this.Yd
	}, function(a) {
		this.Yd !== a && (w.j(a, "number", ku, "columnSpacing"), 0 < a && (this.Yd = a, this.J()))
	});
	w.defineProperty(ku, {
		direction: "direction"
	}, function() {
		return this.ba
	}, function(a) {
		this.ba !== a && (w.j(a, "number", ku, "direction"), 0 === a || 90 === a || 180 === a || 270 === a ? (this.ba = a, this.J()) : w.k("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))
	});
	w.defineProperty(ku, {
		angle: "angle"
	}, function() {
		return this.direction
	}, function(a) {
		this.direction = a
	});
	w.defineProperty(ku, {
		JH: "cycleRemoveOption"
	}, function() {
		return this.uo
	}, function(a) {
		this.uo !== a && (w.ob(a, ku, ku, "cycleRemoveOption"), a === ru || a === lu) && (this.uo = a, this.J())
	});
	w.defineProperty(ku, {
		JI: "layeringOption"
	}, function() {
		return this.Uo
	}, function(a) {
		this.Uo !== a && (w.ob(a, ku, ku, "layeringOption"), a === mu || a === Ju || a === Lu) && (this.Uo = a, this.J())
	});
	w.defineProperty(ku, {
		vI: "initializeOption"
	}, function() {
		return this.Ko
	}, function(a) {
		this.Ko !== a && (w.ob(a, ku, ku, "initializeOption"), a === nu || a === Ru || a === Pu) && (this.Ko = a, this.J())
	});
	w.defineProperty(ku, {
		nL: "iterations"
	}, function() {
		return this.Im
	}, function(a) {
		this.Im !== a && (w.zd(a, qu, "iterations"), 0 <= a && (this.Im = a, this.J()))
	});
	w.defineProperty(ku, {
		oH: "aggressiveOption"
	}, function() {
		return this.io
	}, function(a) {
		this.io !== a && (w.ob(a, ku, ku, "aggressiveOption"), a === Vu || a === ou || a === Wu) && (this.io = a, this.J())
	});
	w.defineProperty(ku, {
		HL: "packOption"
	}, function() {
		return this.aj
	}, function(a) {
		this.aj !== a && (w.j(a, "number", ku, "packOption"), 0 <= a && 8 > a && (this.aj = a, this.J()))
	});
	w.defineProperty(ku, {
		zq: "setsPortSpots"
	}, function() {
		return this.bi
	}, function(a) {
		this.bi !== a && (w.j(a, "boolean", ku, "setsPortSpots"), this.bi = a, this.J())
	});
	w.defineProperty(ku, {
		LF: "linkSpacing"
	}, function() {
		return this.fs
	}, function(a) {
		this.fs !== a && (w.j(a, "number", ku, "linkSpacing"), 0 <= a && (this.fs = a, this.J()))
	});
	w.u(ku, {
		SI: "maxLayer"
	}, function() {
		return this.sb
	});
	w.u(ku, {
		tL: "maxIndex"
	}, function() {
		return this.iw
	});
	w.u(ku, {
		sL: "maxColumn"
	}, function() {
		return this.Kb
	});
	w.u(ku, {
		yL: "minIndexLayer"
	}, function() {
		return this.ps
	});
	w.u(ku, {
		uL: "maxIndexLayer"
	}, function() {
		return this.Rf
	});
	var lu;
	ku.CycleDepthFirst = lu = w.p(ku, "CycleDepthFirst", 0);
	var ru;
	ku.CycleGreedy = ru = w.p(ku, "CycleGreedy", 1);
	var mu;
	ku.LayerOptimalLinkLength = mu = w.p(ku, "LayerOptimalLinkLength", 0);
	var Ju;
	ku.LayerLongestPathSink = Ju = w.p(ku, "LayerLongestPathSink", 1);
	var Lu;
	ku.LayerLongestPathSource = Lu = w.p(ku, "LayerLongestPathSource", 2);
	var nu;
	ku.InitDepthFirstOut = nu = w.p(ku, "InitDepthFirstOut", 0);
	var Ru;
	ku.InitDepthFirstIn = Ru = w.p(ku, "InitDepthFirstIn", 1);
	var Pu;
	ku.InitNaive = Pu = w.p(ku, "InitNaive", 2);
	var Vu;
	ku.AggressiveNone = Vu = w.p(ku, "AggressiveNone", 0);
	var ou;
	ku.AggressiveLess = ou = w.p(ku, "AggressiveLess", 1);
	var Wu;
	ku.AggressiveMore = Wu = w.p(ku, "AggressiveMore", 2);
	ku.PackNone = 0;
	var Xu;
	ku.PackExpand = Xu = 1;
	var Yu;
	ku.PackStraighten = Yu = 2;
	var $u;
	ku.PackMedian = $u = 4;
	var pu;
	ku.PackAll = pu = 7;

	function gv() {
		this.index = this.se = this.Xe = this.ge = this.first = this.layer = 0;
		this.link = null;
		this.ui = 0
	}
	w.be(gv, {
		layer: !0,
		first: !0,
		ge: !0,
		Xe: !0,
		se: !0,
		index: !0,
		link: !0,
		ui: !0
	});

	function qu() {
		ug.call(this)
	}
	w.La(qu, ug);
	w.ga("LayeredDigraphNetwork", qu);
	qu.prototype.createVertex = function() {
		return new iv
	};
	qu.prototype.createEdge = function() {
		return new jv
	};

	function iv() {
		ms.call(this);
		this.index = this.column = this.layer = -1;
		this.component = NaN;
		this.near = null;
		this.valid = !1;
		this.finish = this.Pp = NaN;
		this.ln = 0;
		this.eB = this.fB = null
	}
	w.La(iv, ms);
	w.ga("LayeredDigraphVertex", iv);

	function jv() {
		ns.call(this);
		this.forest = this.rev = this.valid = !1;
		this.portToPos = this.portFromPos = NaN;
		this.portToColOffset = this.portFromColOffset = 0
	}
	w.La(jv, ns);
	w.ga("LayeredDigraphEdge", jv);

	function Z() {
		0 < arguments.length && w.nd(Z);
		tg.call(this);
		this.xd = new I(Object);
		this.Ks = kv;
		this.Of = lv;
		this.zt = mv;
		this.fw = nv;
		this.fC = null;
		this.Lh = !0;
		this.pd = ov;
		this.ng = (new ia(10, 10)).freeze();
		this.va = new pv;
		this.wa = new pv;
		this.Rz = []
	}
	w.La(Z, tg);
	w.ga("TreeLayout", Z);
	Z.prototype.cloneProtected = function(a) {
		tg.prototype.cloneProtected.call(this, a);
		a.Ks = this.Ks;
		a.zt = this.zt;
		a.fw = this.fw;
		a.Lh = this.Lh;
		a.pd = this.pd;
		a.ng.assign(this.ng);
		a.va.copyInheritedPropertiesFrom(this.va);
		a.wa.copyInheritedPropertiesFrom(this.wa)
	};
	Z.prototype.ic = function(a) {
		a.Ge === Z ? 0 === a.name.indexOf("Alignment") ? this.alignment = a : 0 === a.name.indexOf("Arrangement") ? this.Vf = a : 0 === a.name.indexOf("Compaction") ? this.compaction = a : 0 === a.name.indexOf("Path") ? this.path = a : 0 === a.name.indexOf("Sorting") ? this.sorting = a : 0 === a.name.indexOf("Style") ? this.YJ = a : w.k("Unknown enum value: " + a) : tg.prototype.ic.call(this, a)
	};
	Z.prototype.createNetwork = function() {
		return new qv
	};
	Z.prototype.makeNetwork = function(a) {
		function b(a) {
			if (a instanceof T) return !a.Cf && "Comment" !== a.yd;
			if (a instanceof W) {
				var b = a.W;
				if (null === b || b.Cf || "Comment" === b.yd) return !1;
				a = a.Z;
				return null === a || a.Cf || "Comment" === a.yd ? !1 : !0
			}
			return !1
		}
		var c = this.createNetwork();
		c.Sb = this;
		a instanceof D ? (c.wk(a.ig, !0, b), c.wk(a.links, !0, b)) : a instanceof V ? c.wk(a.vc, !1, b) : c.wk(a.i, !1, b);
		return c
	};
	Z.prototype.doLayout = function(a) {
		null === a && w.k("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");
		null === this.network && (this.network = this.makeNetwork(a));
		this.Vf !== rv && (this.Nd = this.initialOrigin(this.Nd));
		var b = this.g;
		null === b && a instanceof D && (b = a);
		this.Of = this.path === kv && null !== b ? b.Ud ? lv : sv : this.path === kv ? lv : this.path;
		if (0 < this.network.vertexes.count) {
			this.network.sx();
			for (a = this.network.vertexes.i; a.next();) b = a.value, b.initialized = !1, b.level =
				0, b.parent = null, b.children = [];
			if (0 < this.xd.count) {
				a = new I(pv);
				for (b = this.xd.i; b.next();) {
					var c = b.value;
					c instanceof T ? (c = this.network.xn(c), null !== c && a.add(c)) : c instanceof pv && a.add(c)
				}
				this.xd = a
			}
			0 === this.xd.count && this.findRoots();
			for (a = this.xd.copy().i; a.next();) b = a.value, b.initialized || (b.initialized = !0, tv(this, b));
			b = this.network.vertexes;
			for (a = null; a = uv(b), 0 < a.count;) b = vv(this, a), null !== b && this.xd.add(b), b.initialized = !0, tv(this, b), b = a;
			for (a = this.xd.i; a.next();) b = a.value, b instanceof pv && wv(this,
				b);
			for (a = this.xd.i; a.next();) b = a.value, b instanceof pv && xv(this, b);
			for (a = this.xd.i; a.next();) b = a.value, b instanceof pv && yv(this, b);
			this.dA();
			if (this.TA === zv) {
				c = [];
				for (a = this.network.vertexes.i; a.next();) {
					var d = a.value,
						b = d.parent;
					null === b && (b = d);
					var b = 0 === b.angle || 180 === b.angle,
						e = c[d.level];
					void 0 === e && (e = 0);
					c[d.level] = Math.max(e, b ? d.width : d.height)
				}
				for (d = 0; d < c.length; d++) void 0 === c[d] && (c[d] = 0);
				this.fC = c;
				for (a = this.network.vertexes.i; a.next();) d = a.value, b = d.parent, null === b && (b = d), 0 === b.angle || 180 ===
					b.angle ? (180 === b.angle && (d.bu += c[d.level] - d.width), d.width = c[d.level]) : (270 === b.angle && (d.cu += c[d.level] - d.height), d.height = c[d.level])
			} else if (this.TA === Av)
				for (a = this.network.vertexes.i; a.next();) {
					c = a.value;
					b = 0 === c.angle || 180 === c.angle;
					e = -1;
					for (d = 0; d < c.children.length; d++) var f = c.children[d],
						e = Math.max(e, b ? f.width : f.height);
					if (0 <= e)
						for (d = 0; d < c.children.length; d++) f = c.children[d], b ? (180 === c.angle && (f.bu += e - f.width), f.width = e) : (270 === c.angle && (f.cu += e - f.height), f.height = e)
				}
			for (a = this.xd.i; a.next();) b =
				a.value, b instanceof pv && this.layoutTree(b);
			this.arrangeTrees();
			this.updateParts()
		}
		this.network = null;
		this.xd = new I(Object);
		this.rf = !0
	};

	function uv(a) {
		var b = new I(pv);
		for (a = a.i; a.next();) {
			var c = a.value;
			c.initialized || b.add(c)
		}
		return b
	}
	Z.prototype.findRoots = function() {
		for (var a = this.network.vertexes, b = a.i; b.next();) {
			var c = b.value;
			switch (this.Of) {
				case lv:
					0 === c.nc.count && this.xd.add(c);
					break;
				case sv:
					0 === c.kc.count && this.xd.add(c);
					break;
				default:
					w.k("Unhandled path value " + this.Of.toString())
			}
		}
		0 === this.xd.count && (a = vv(this, a), null !== a && this.xd.add(a))
	};

	function vv(a, b) {
		for (var c = 999999, d = null, e = b.i; e.next();) {
			var f = e.value;
			switch (a.Of) {
				case lv:
					f.nc.count < c && (c = f.nc.count, d = f);
					break;
				case sv:
					f.kc.count < c && (c = f.kc.count, d = f);
					break;
				default:
					w.k("Unhandled path value " + a.Of.toString())
			}
		}
		return d
	}

	function tv(a, b) {
		if (null !== b) {
			switch (a.Of) {
				case lv:
					if (0 < b.kc.count) {
						for (var c = new H(pv), d = b.PH; d.next();) {
							var e = d.value;
							Bv(a, b, e) && c.add(e)
						}
						0 < c.count && (b.children = c.xc())
					}
					break;
				case sv:
					if (0 < b.nc.count) {
						c = new H(pv);
						for (d = b.MJ; d.next();) e = d.value, Bv(a, b, e) && c.add(e);
						0 < c.count && (b.children = c.xc())
					}
					break;
				default:
					w.k("Unhandled path value" + a.Of.toString())
			}
			c = b.children;
			d = c.length;
			for (e = 0; e < d; e++) {
				var f = c[e];
				f.initialized = !0;
				f.level = b.level + 1;
				f.parent = b;
				a.xd.remove(f)
			}
			for (e = 0; e < d; e++) f = c[e], tv(a, f)
		}
	}

	function Bv(a, b, c) {
		if (c.initialized) {
			var d;
			if (null === b) d = !1;
			else {
				for (d = b.parent; null !== d && d !== c;) d = d.parent;
				d = d === c
			}
			if (d || c.level > b.level) return !1;
			a.removeChild(c.parent, c)
		}
		return !0
	}
	Z.prototype.removeChild = function(a, b) {
		if (null !== a && null !== b) {
			for (var c = a.children, d = 0, e = 0; e < c.length; e++) c[e] === b && d++;
			if (0 < d) {
				for (var d = Array(c.length - d), f = 0, e = 0; e < c.length; e++) c[e] !== b && (d[f++] = c[e]);
				a.children = d
			}
		}
	};

	function wv(a, b) {
		if (null !== b) {
			a.initializeTreeVertexValues(b);
			b.alignment === Cv && a.sortTreeVertexChildren(b);
			for (var c = 0, d = b.nn, e = 0, f = b.children, h = f.length, k = 0; k < h; k++) {
				var l = f[k];
				wv(a, l);
				c += l.descendantCount + 1;
				d = Math.max(d, l.maxChildrenCount);
				e = Math.max(e, l.maxGenerationCount)
			}
			b.descendantCount = c;
			b.maxChildrenCount = d;
			b.maxGenerationCount = 0 < d ? e + 1 : 0
		}
	}

	function Dv(a, b) {
		switch (a.zt) {
			default:
				case mv:
				return null !== b.parent ? b.parent : a.va;
			case Ev:
					return null === b.parent ? a.va : null === b.parent.parent ? a.wa : b.parent;
			case Fv:
					return null !== b.parent ? null !== b.parent.parent ? b.parent.parent : a.wa : a.va;
			case Gv:
					var c = !0;
				if (0 === b.nn) c = !1;
				else
					for (var d = b.children, e = d.length, f = 0; f < e; f++)
						if (0 < d[f].nn) {
							c = !1;
							break
						}
				return c && null !== b.parent ? a.wa : null !== b.parent ? b.parent : a.va
		}
	}
	Z.prototype.initializeTreeVertexValues = function(a) {
		var b = Dv(this, a);
		a.copyInheritedPropertiesFrom(b);
		if (null !== a.parent && a.parent.alignment === Cv) {
			for (var b = a.angle, c = a.parent.children, d = 0; d < c.length && a !== c[d];) d++;
			0 === d % 2 ? d !== c.length - 1 && (b = 90 === b ? 180 : 180 === b ? 270 : 270 === b ? 180 : 270) : b = 90 === b ? 0 : 180 === b ? 90 : 270 === b ? 0 : 90;
			a.angle = b
		}
		a.initialized = !0
	};

	function xv(a, b) {
		if (null !== b) {
			a.assignTreeVertexValues(b);
			for (var c = b.children, d = c.length, e = 0; e < d; e++) xv(a, c[e])
		}
	}
	Z.prototype.assignTreeVertexValues = function() {};

	function yv(a, b) {
		if (null !== b) {
			b.alignment !== Cv && a.sortTreeVertexChildren(b);
			for (var c = b.children, d = c.length, e = 0; e < d; e++) yv(a, c[e])
		}
	}
	Z.prototype.sortTreeVertexChildren = function(a) {
		switch (a.sorting) {
			case Hv:
				break;
			case Iv:
				a.children.reverse();
				break;
			case Jv:
				a.children.sort(a.comparer);
				break;
			case Kv:
				a.children.sort(a.comparer);
				a.children.reverse();
				break;
			default:
				w.k("Unhandled sorting value " + a.sorting.toString())
		}
	};
	Z.prototype.dA = function() {
		if (this.comments)
			for (var a = this.network.vertexes.i; a.next();) this.addComments(a.value)
	};
	Z.prototype.addComments = function(a) {
		var b = a.angle,
			c = a.parent,
			d = 0,
			e = Lv,
			e = !1;
		null !== c && (d = c.angle, e = c.alignment, e = Mv(e));
		var b = 90 === b || 270 === b,
			d = 90 === d || 270 === d,
			c = 0 === a.nn,
			f = 0,
			h = 0,
			k = 0,
			l = a.commentSpacing;
		if (null !== a.Qc)
			for (var m = a.Qc.$E(); m.next();) {
				var n = m.value;
				"Comment" === n.yd && n.canLayout() && (null === a.comments && (a.comments = []), a.comments.push(n), n.$e(), n = n.za, b && !c || !e && !d && c || e && d && c ? (f = Math.max(f, n.width), h += n.height + Math.abs(k)) : (f += n.width + Math.abs(k), h = Math.max(h, n.height)), k = l)
			}
		null !== a.comments &&
			(b && !c || !e && !d && c || e && d && c ? (f += Math.abs(a.commentMargin), h = Math.max(0, h - a.height)) : (h += Math.abs(a.commentMargin), f = Math.max(0, f - a.width)), e = w.lg(0, 0, a.M.width + f, a.M.height + h), a.gb = e, w.Eb(e))
	};

	function Mv(a) {
		return a === Nv || a === Cv || a === Ov || a === Pv
	}

	function Qv(a) {
		return a === Nv || a === Cv
	}

	function Rv(a) {
		var b = a.parent;
		if (null !== b) {
			var c = b.alignment;
			if (Mv(c)) {
				if (Qv(c)) {
					b = b.children;
					for (c = 0; c < b.length && a !== b[c];) c++;
					return 0 === c % 2
				}
				if (c === Ov) return !0
			}
		}
		return !1
	}
	Z.prototype.layoutComments = function(a) {
		if (null !== a.comments) {
			var b = a.Qc.za,
				c = a.parent,
				d = a.angle,
				e = 0,
				f = Lv,
				f = !1;
			null !== c && (e = c.angle, f = c.alignment, f = Mv(f));
			for (var c = 90 === d || 270 === d, d = 90 === e || 270 === e, h = 0 === a.nn, k = Rv(a), l = 0, m = a.comments, n = m.length, p = w.K(), q = 0; q < n; q++) {
				var r = m[q],
					s = r.za;
				if (c && !h || !f && !d && h || f && d && h) {
					if (135 < e && !f || d && k)
						if (0 <= a.commentMargin)
							for (p.m(a.M.x - a.commentMargin - s.width, a.M.y + l), r.move(p), r = r.Mg(); r.next();) {
								var u = r.value;
								u.Ab = Hc;
								u.Bb = Ic
							} else
								for (p.m(a.M.x + 2 * a.T.x - a.commentMargin,
										a.M.y + l), r.move(p), r = r.Mg(); r.next();) u = r.value, u.Ab = Ic, u.Bb = Hc;
						else if (0 <= a.commentMargin)
						for (p.m(a.M.x + 2 * a.T.x + a.commentMargin, a.M.y + l), r.move(p), r = r.Mg(); r.next();) u = r.value, u.Ab = Ic, u.Bb = Hc;
					else
						for (p.m(a.M.x + a.commentMargin - s.width, a.M.y + l), r.move(p), r = r.Mg(); r.next();) u = r.value, u.Ab = Hc, u.Bb = Ic;
					l = 0 <= a.commentSpacing ? l + (s.height + a.commentSpacing) : l + (a.commentSpacing - s.height)
				} else {
					if (135 < e && !f || !d && k)
						if (0 <= a.commentMargin)
							for (p.m(a.M.x + l, a.M.y - a.commentMargin - s.height), r.move(p), r = r.Mg(); r.next();) u =
								r.value, u.Ab = Gc, u.Bb = Jc;
						else
							for (p.m(a.M.x + l, a.M.y + 2 * a.T.y - a.commentMargin), r.move(p), r = r.Mg(); r.next();) u = r.value, u.Ab = Jc, u.Bb = Gc;
					else if (0 <= a.commentMargin)
						for (p.m(a.M.x + l, a.M.y + 2 * a.T.y + a.commentMargin), r.move(p), r = r.Mg(); r.next();) u = r.value, u.Ab = Jc, u.Bb = Gc;
					else
						for (p.m(a.M.x + l, a.M.y + a.commentMargin - s.height), r.move(p), r = r.Mg(); r.next();) u = r.value, u.Ab = Gc, u.Bb = Jc;
					l = 0 <= a.commentSpacing ? l + (s.width + a.commentSpacing) : l + (a.commentSpacing - s.width)
				}
			}
			w.v(p);
			b = l - a.commentSpacing - (c ? b.height : b.width);
			if (this.Of ===
				lv)
				for (e = a.kc; e.next();) a = e.value.link, null === a || a.Zl || (a.Ul = 0 < b ? b : NaN);
			else
				for (e = a.nc; e.next();) a = e.value.link, null === a || a.Zl || (a.nm = 0 < b ? b : NaN)
		}
	};
	Z.prototype.layoutTree = function(a) {
		if (null !== a) {
			for (var b = a.children, c = b.length, d = 0; d < c; d++) this.layoutTree(b[d]);
			switch (a.compaction) {
				case Sv:
					Tv(this, a);
					break;
				case Uv:
					if (a.alignment === Cv) Tv(this, a);
					else if (0 === a.nn) {
						var d = a.parent,
							b = !1,
							c = 0,
							e = Lv;
						null !== d && (c = d.angle, e = d.alignment, b = Mv(e));
						d = Rv(a);
						a.pa.m(0, 0);
						a.kb.m(a.width, a.height);
						null === a.parent || null === a.comments || (180 !== c && 270 !== c || b) && !d ? a.Oa.m(0, 0) : 180 === c && !b || (90 === c || 270 === c) && d ? a.Oa.m(a.width - 2 * a.T.x, 0) : a.Oa.m(0, a.height - 2 * a.T.y);
						a.wu =
							null;
						a.Ru = null
					} else {
						for (var f = Vv(a), b = 90 === f || 270 === f, h = 0, k = a.children, l = k.length, m = 0; m < l; m++) var n = k[m],
							h = Math.max(h, b ? n.kb.width : n.kb.height);
						var p = a.alignment,
							d = p === Wv,
							q = p === Xv,
							r = Mv(p),
							s = Math.max(0, a.breadthLimit),
							c = Yv(a),
							u = a.nodeSpacing,
							t = Zv(a),
							x = a.rowSpacing,
							v = 0;
						if (d || q || a.tq || a.uq && 1 === a.maxGenerationCount) v = Math.max(0, a.rowIndent);
						var d = a.width,
							e = a.height,
							z = 0,
							A = 0,
							L = 0,
							E = null,
							P = null,
							$ = 0,
							S = 0,
							ba = 0,
							ha = 0,
							ya = 0,
							Ga = 0,
							eb = 0,
							wa = 0,
							n = 0;
						r && !Qv(p) && 135 < f && k.reverse();
						if (Qv(p))
							if (1 < l)
								for (m = 0; m < l; m++) 0 === m %
									2 && m !== l - 1 ? wa = Math.max(wa, b ? k[m].kb.width : k[m].kb.height) : 0 !== m % 2 && (n = Math.max(n, b ? k[m].kb.width : k[m].kb.height));
							else 1 === l && (wa = b ? k[0].kb.width : k[0].kb.height);
						if (r) {
							switch (p) {
								case Nv:
									A = 135 > f ? $v(a, k, wa, z, A) : aw(a, k, wa, z, A);
									wa = A.x;
									z = A.width;
									A = A.height;
									break;
								case Ov:
									for (m = 0; m < l; m++) {
										var n = k[m],
											U = n.kb,
											E = 0 === Ga ? 0 : x;
										b ? (n.pa.m(h - U.width, ha + E), z = Math.max(z, U.width), A = Math.max(A, ha + E + U.height), ha += E + U.height) : (n.pa.m(ba + E, h - U.height), z = Math.max(z, ba + E + U.width), A = Math.max(A, U.height), ba += E + U.width);
										Ga++
									}
									break;
								case Pv:
									for (m = 0; m < l; m++) n = k[m], U = n.kb, E = 0 === Ga ? 0 : x, b ? (n.pa.m(u / 2 + a.T.x, ha + E), z = Math.max(z, U.width), A = Math.max(A, ha + E + U.height), ha += E + U.height) : (n.pa.m(ba + E, u / 2 + a.T.y), z = Math.max(z, ba + E + U.width), A = Math.max(A, U.height), ba += E + U.width), Ga++
							}
							E = bw(this, 2);
							P = bw(this, 2);
							b ? (E[0].m(0, 0), E[1].m(0, A), P[0].m(z, 0)) : (E[0].m(0, 0), E[1].m(z, 0), P[0].m(0, A));
							P[1].m(z, A)
						} else
							for (m = 0; m < l; m++) {
								n = k[m];
								U = n.kb;
								if (b) {
									0 < s && 0 < Ga && ba + u + U.width > s && (ba < h && Hw(a, p, h - ba, 0, eb, m - 1), ya++, Ga = 0, eb = m, L = A, ba = 0, ha = 135 < f ? -A - x : A + x);
									Iw(this,
										n, 0, ha);
									var sb = 0;
									if (0 === Ga) {
										if (E = n.wu, P = n.Ru, $ = U.width, S = U.height, null === E || null === P || f !== Vv(n)) E = bw(this, 2), P = bw(this, 2), E[0].m(0, 0), E[1].m(0, S), P[0].m($, 0), P[1].m($, S)
									} else {
										var Kb = w.cb(),
											S = Jw(this, a, n, E, P, $, S, Kb),
											sb = S.x,
											E = Kb[0],
											P = Kb[1],
											$ = S.width,
											S = S.height;
										w.ta(Kb);
										ba < U.width && 0 > sb && (Kw(a, -sb, 0, eb, m - 1), Lw(E, -sb, 0), Lw(P, -sb, 0), sb = 0)
									}
									n.pa.m(sb, ha);
									z = Math.max(z, $);
									A = Math.max(A, L + (0 === ya ? 0 : x) + U.height);
									ba = $
								} else {
									0 < s && 0 < Ga && ha + u + U.height > s && (ha < h && Hw(a, p, 0, h - ha, eb, m - 1), ya++, Ga = 0, eb = m, L = z, ha = 0, ba = 135 <
										f ? -z - x : z + x);
									Iw(this, n, ba, 0);
									sb = 0;
									if (0 === Ga) {
										if (E = n.wu, P = n.Ru, $ = U.width, S = U.height, null === E || null === P || f !== Vv(n)) E = bw(this, 2), P = bw(this, 2), E[0].m(0, 0), E[1].m($, 0), P[0].m(0, S), P[1].m($, S)
									} else Kb = w.cb(), S = Jw(this, a, n, E, P, $, S, Kb), sb = S.x, E = Kb[0], P = Kb[1], $ = S.width, S = S.height, w.ta(Kb), ha < U.height && 0 > sb && (Kw(a, 0, -sb, eb, m - 1), Lw(E, 0, -sb), Lw(P, 0, -sb), sb = 0);
									n.pa.m(ba, sb);
									A = Math.max(A, S);
									z = Math.max(z, L + (0 === ya ? 0 : x) + U.width);
									ha = S
								}
								Ga++
							}
						0 < ya && (b ? (A += Math.max(0, c), ba < z && Hw(a, p, z - ba, 0, eb, l - 1), 0 < v && (q || Kw(a, v, 0, 0,
							l - 1), z += v)) : (z += Math.max(0, c), ha < A && Hw(a, p, 0, A - ha, eb, l - 1), 0 < v && (q || Kw(a, 0, v, 0, l - 1), A += v)));
						v = q = 0;
						switch (p) {
							case Mw:
								b ? q += z / 2 - a.T.x - t / 2 : v += A / 2 - a.T.y - t / 2;
								break;
							case Lv:
								0 < ya ? b ? q += z / 2 - a.T.x - t / 2 : v += A / 2 - a.T.y - t / 2 : b ? (wa = k[0].pa.x + k[0].Oa.x, m = k[l - 1].pa.x + k[l - 1].Oa.x + 2 * k[l - 1].T.x, q += wa + (m - wa) / 2 - a.T.x - t / 2) : (wa = k[0].pa.y + k[0].Oa.y, m = k[l - 1].pa.y + k[l - 1].Oa.y + 2 * k[l - 1].T.y, v += wa + (m - wa) / 2 - a.T.y - t / 2);
								break;
							case Wv:
								b ? (q -= t, z += t) : (v -= t, A += t);
								break;
							case Xv:
								b ? (q += z - a.width + t, z += t) : (v += A - a.height + t, A += t);
								break;
							case Nv:
								b ?
									q = 1 < l ? q + (wa + u / 2 - a.T.x) : q + (k[0].T.x - a.T.x + k[0].Oa.x) : v = 1 < l ? v + (wa + u / 2 - a.T.y) : v + (k[0].T.y - a.T.y + k[0].Oa.y);
								break;
							case Ov:
								b ? q += z + u / 2 - a.T.x : v += A + u / 2 - a.T.y;
								break;
							case Pv:
								break;
							default:
								w.k("Unhandled alignment value " + p.toString())
						}
						for (m = 0; m < l; m++) n = k[m], b ? n.pa.m(n.pa.x + n.Oa.x - q, n.pa.y + (135 < f ? (r ? -A : -n.kb.height) + n.Oa.y - c : e + c + n.Oa.y)) : n.pa.m(n.pa.x + (135 < f ? (r ? -z : -n.kb.width) + n.Oa.x - c : d + c + n.Oa.x), n.pa.y + n.Oa.y - v);
						l = k = 0;
						r ? b ? (z = Nw(a, z, q), 0 > q && (q = 0), 135 < f && (v += A + c), A += e + c, p === Pv && (k += u / 2 + a.T.x), l += e + c) : (135 < f &&
							(q += z + c), z += d + c, A = Ow(a, A, v), 0 > v && (v = 0), p === Pv && (l += u / 2 + a.T.y), k += d + c) : b ? (null === a.comments ? d > z && (p = Pw(p, d - z, 0), k = p.x, l = p.y, z = d, q = 0) : z = Nw(a, z, q), 0 > q && (k -= q, q = 0), 135 < f && (v += A + c), A = Math.max(Math.max(A, e), A + e + c), l += e + c) : (135 < f && (q += z + c), z = Math.max(Math.max(z, d), z + d + c), null === a.comments ? e > A && (p = Pw(p, 0, e - A), k = p.x, l = p.y, A = e, v = 0) : A = Ow(a, A, v), 0 > v && (l -= v, v = 0), k += d + c);
						if (0 < ya) f = bw(this, 4), p = bw(this, 4), b ? (f[2].m(0, e + c), f[3].m(f[2].x, A), p[2].m(z, f[2].y), p[3].m(p[2].x, f[3].y)) : (f[2].m(d + c, 0), f[3].m(z, f[2].y), p[2].m(f[2].x,
							A), p[3].m(f[3].x, p[2].y));
						else {
							f = bw(this, E.length + 2);
							p = bw(this, P.length + 2);
							for (m = 0; m < E.length; m++) r = E[m], f[m + 2].m(r.x + k, r.y + l);
							for (m = 0; m < P.length; m++) r = P[m], p[m + 2].m(r.x + k, r.y + l)
						}
						b ? (f[0].m(q, 0), f[1].m(f[0].x, e), f[2].y < f[1].y && (f[2].x > f[0].x ? f[2].assign(f[1]) : f[1].assign(f[2])), f[3].y < f[2].y && (f[3].x > f[0].x ? f[3].assign(f[2]) : f[2].assign(f[3])), p[0].m(q + d, 0), p[1].m(p[0].x, e), p[2].y < p[1].y && (p[2].x < p[0].x ? p[2].assign(p[1]) : p[1].assign(p[2])), p[3].y < p[2].y && (p[3].x < p[0].x ? p[3].assign(p[2]) : p[2].assign(p[3])),
							f[2].y -= c / 2, p[2].y -= c / 2) : (f[0].m(0, v), f[1].m(d, f[0].y), f[2].x < f[1].x && (f[2].y > f[0].y ? f[2].assign(f[1]) : f[1].assign(f[2])), f[3].x < f[2].x && (f[3].y > f[0].y ? f[3].assign(f[2]) : f[2].assign(f[3])), p[0].m(0, v + e), p[1].m(d, p[0].y), p[2].x < p[1].x && (p[2].y < p[0].y ? p[2].assign(p[1]) : p[1].assign(p[2])), p[3].x < p[2].x && (p[3].y < p[0].y ? p[3].assign(p[2]) : p[2].assign(p[3])), f[2].x -= c / 2, p[2].x -= c / 2);
						Qw(this, E);
						Qw(this, P);
						a.wu = f;
						a.Ru = p;
						a.Oa.m(q, v);
						a.kb.m(z, A)
					}
					break;
				default:
					w.k("Unhandled compaction value " + a.compaction.toString())
			}
		}
	};

	function Tv(a, b) {
		if (0 === b.nn) {
			var c = !1,
				d = 0,
				e = Lv;
			null !== b.parent && (d = b.parent.angle, e = b.parent.alignment, c = Mv(e));
			e = Rv(b);
			b.pa.m(0, 0);
			b.kb.m(b.width, b.height);
			null === b.parent || null === b.comments || (180 !== d && 270 !== d || c) && !e ? b.Oa.m(0, 0) : 180 === d && !c || (90 === d || 270 === d) && e ? b.Oa.m(b.width - 2 * b.T.x, 0) : b.Oa.m(0, b.height - 2 * b.T.y)
		} else {
			for (var c = Vv(b), d = 90 === c || 270 === c, f = 0, e = b.children, h = e.length, k = 0; k < h; k++) var l = e[k],
				f = Math.max(f, d ? l.kb.width : l.kb.height);
			var m = b.alignment,
				n = m === Wv,
				p = m === Xv,
				q = Mv(m),
				r = Math.max(0,
					b.breadthLimit),
				s = Yv(b),
				u = b.nodeSpacing,
				t = Zv(b),
				x = n || p ? 0 : t / 2,
				v = b.rowSpacing,
				z = 0;
			if (n || p || b.tq || b.uq && 1 === b.maxGenerationCount) z = Math.max(0, b.rowIndent);
			var n = b.width,
				A = b.height,
				L = 0,
				E = 0,
				P = 0,
				$ = 0,
				S = 0,
				ba = 0,
				ha = 0,
				ya = 0,
				Ga = 0,
				eb = 0;
			q && !Qv(m) && 135 < c && e.reverse();
			if (Qv(m))
				if (1 < h)
					for (k = 0; k < h; k++) {
						var l = e[k],
							wa = l.kb;
						0 === k % 2 && k !== h - 1 ? Ga = Math.max(Ga, (d ? wa.width : wa.height) + Rw(l) - u) : 0 !== k % 2 && (eb = Math.max(eb, (d ? wa.width : wa.height) + Rw(l) - u))
					} else 1 === h && (Ga = d ? e[0].kb.width : e[0].kb.height);
			if (q) switch (m) {
				case Nv:
				case Cv:
					E =
						135 > c ? $v(b, e, Ga, L, E) : aw(b, e, Ga, L, E);
					Ga = E.x;
					L = E.width;
					E = E.height;
					break;
				case Ov:
					for (k = 0; k < h; k++) l = e[k], wa = l.kb, r = 0 === ha ? 0 : v, d ? (l.pa.m(f - wa.width, S + r), L = Math.max(L, wa.width), E = Math.max(E, S + r + wa.height), S += r + wa.height) : (l.pa.m($ + r, f - wa.height), L = Math.max(L, $ + r + wa.width), E = Math.max(E, wa.height), $ += r + wa.width), ha++;
					break;
				case Pv:
					for (f = 0; f < h; f++) l = e[f], wa = l.kb, r = 0 === ha ? 0 : v, d ? (l.pa.m(u / 2 + b.T.x, S + r), L = Math.max(L, wa.width), E = Math.max(E, S + r + wa.height), S += r + wa.height) : (l.pa.m($ + r, u / 2 + b.T.y), L = Math.max(L, $ + r +
						wa.width), E = Math.max(E, wa.height), $ += r + wa.width), ha++
			} else
				for (k = 0; k < h; k++) l = e[k], wa = l.kb, d ? (0 < r && 0 < ha && $ + u + wa.width > r && ($ < f && Hw(b, m, f - $, 0, ya, k - 1), ba++, ha = 0, ya = k, P = E, $ = 0, S = 135 < c ? -E - v : E + v), eb = 0 === ha ? x : u, Iw(a, l, 0, S), l.pa.m($ + eb, S), L = Math.max(L, $ + eb + wa.width), E = Math.max(E, P + (0 === ba ? 0 : v) + wa.height), $ += eb + wa.width) : (0 < r && 0 < ha && S + u + wa.height > r && (S < f && Hw(b, m, 0, f - S, ya, k - 1), ba++, ha = 0, ya = k, P = L, S = 0, $ = 135 < c ? -L - v : L + v), eb = 0 === ha ? x : u, Iw(a, l, $, 0), l.pa.m($, S + eb), E = Math.max(E, S + eb + wa.height), L = Math.max(L, P + (0 === ba ?
					0 : v) + wa.width), S += eb + wa.height), ha++;
			0 < ba && (d ? (E += Math.max(0, s), $ < L && Hw(b, m, L - $, 0, ya, h - 1), 0 < z && (p || Kw(b, z, 0, 0, h - 1), L += z)) : (L += Math.max(0, s), S < E && Hw(b, m, 0, E - S, ya, h - 1), 0 < z && (p || Kw(b, 0, z, 0, h - 1), E += z)));
			z = p = 0;
			switch (m) {
				case Mw:
					d ? p += L / 2 - b.T.x - t / 2 : z += E / 2 - b.T.y - t / 2;
					break;
				case Lv:
					0 < ba ? d ? p += L / 2 - b.T.x - t / 2 : z += E / 2 - b.T.y - t / 2 : d ? (m = e[0].pa.x + e[0].Oa.x, u = e[h - 1].pa.x + e[h - 1].Oa.x + 2 * e[h - 1].T.x, p += m + (u - m) / 2 - b.T.x - t / 2) : (m = e[0].pa.y + e[0].Oa.y, u = e[h - 1].pa.y + e[h - 1].Oa.y + 2 * e[h - 1].T.y, z += m + (u - m) / 2 - b.T.y - t / 2);
					break;
				case Wv:
					d ?
						(p -= t, L += t) : (z -= t, E += t);
					break;
				case Xv:
					d ? (p += L - b.width + t, L += t) : (z += E - b.height + t, E += t);
					break;
				case Nv:
				case Cv:
					d ? p = 1 < h ? p + (Ga + u / 2 - b.T.x) : p + (e[0].T.x - b.T.x + e[0].Oa.x) : z = 1 < h ? z + (Ga + u / 2 - b.T.y) : z + (e[0].T.y - b.T.y + e[0].Oa.y);
					break;
				case Ov:
					d ? p += L + u / 2 - b.T.x : z += E + u / 2 - b.T.y;
					break;
				case Pv:
					break;
				default:
					w.k("Unhandled alignment value " + m.toString())
			}
			for (k = 0; k < h; k++) l = e[k], d ? l.pa.m(l.pa.x + l.Oa.x - p, l.pa.y + (135 < c ? (q ? -E : -l.kb.height) + l.Oa.y - s : A + s + l.Oa.y)) : l.pa.m(l.pa.x + (135 < c ? (q ? -L : -l.kb.width) + l.Oa.x - s : n + s + l.Oa.x), l.pa.y +
				l.Oa.y - z);
			d ? (L = Nw(b, L, p), 0 > p && (p = 0), 135 < c && (z += E + s), E += A + s) : (135 < c && (p += L + s), L += n + s, E = Ow(b, E, z), 0 > z && (z = 0));
			b.Oa.m(p, z);
			b.kb.m(L, E)
		}
	}

	function $v(a, b, c, d, e) {
		var f = b.length;
		if (0 === f) return new B(c, 0, d, e);
		if (1 === f) {
			var h = b[0];
			d = h.kb.width;
			e = h.kb.height;
			return new B(c, 0, d, e)
		}
		for (var k = a.nodeSpacing, l = a.rowSpacing, m = 90 === Vv(a), n = 0, p = 0, q = 0, r = 0; r < f; r++)
			if (!(0 !== r % 2 || 1 < f && r === f - 1)) {
				var h = b[r],
					s = h.kb,
					u = 0 === n ? 0 : l;
				if (m) {
					var t = Rw(h) - k;
					h.pa.m(c - (s.width + t), q + u);
					d = Math.max(d, s.width + t);
					e = Math.max(e, q + u + s.height);
					q += u + s.height
				} else t = Rw(h) - k, h.pa.m(p + u, c - (s.height + t)), e = Math.max(e, s.height + t), d = Math.max(d, p + u + s.width), p += u + s.width;
				n++
			}
		var n =
			0,
			x = p,
			v = q;
		m ? (p = c + k, q = 0) : (p = 0, q = c + k);
		for (r = 0; r < f; r++) 0 !== r % 2 && (h = b[r], s = h.kb, u = 0 === n ? 0 : l, m ? (t = Rw(h) - k, h.pa.m(p + t, q + u), d = Math.max(d, p + s.width + t), e = Math.max(e, q + u + s.height), q += u + s.height) : (t = Rw(h) - k, h.pa.m(p + u, q + t), d = Math.max(d, p + u + s.width), e = Math.max(e, q + s.height + t), p += u + s.width), n++);
		1 < f && 1 === f % 2 && (h = b[f - 1], s = h.kb, b = Sw(h, m ? Math.max(Math.abs(v), Math.abs(q)) : Math.max(Math.abs(x), Math.abs(p))), m ? (h.pa.m(c + k / 2 - h.T.x - h.Oa.x, e + b), m = c + k / 2 - h.T.x - h.Oa.x, d = Math.max(d, m + s.width), 0 > m && (d -= m), e = Math.max(e, Math.max(v,
			q) + b + s.height), 0 > h.pa.x && (c = Tw(a, h.pa.x, !1, c, k))) : (h.pa.m(d + b, c + k / 2 - h.T.y - h.Oa.y), d = Math.max(d, Math.max(x, p) + b + s.width), m = c + k / 2 - h.T.y - h.Oa.y, e = Math.max(e, m + s.height), 0 > m && (e -= m), 0 > h.pa.y && (c = Tw(a, h.pa.y, !0, c, k))));
		return new B(c, 0, d, e)
	}

	function aw(a, b, c, d, e) {
		var f = b.length;
		if (0 === f) return new B(c, 0, d, e);
		if (1 === f) {
			var h = b[0];
			d = h.kb.width;
			e = h.kb.height;
			return new B(c, 0, d, e)
		}
		for (var k = a.nodeSpacing, l = a.rowSpacing, m = 270 === Vv(a), n = 0, p = 0, q = 0, r = 0; r < f; r++)
			if (!(0 !== r % 2 || 1 < f && r === f - 1)) {
				var h = b[r],
					s = h.kb,
					u = 0 === n ? 0 : l;
				if (m) {
					var t = Rw(h) - k,
						q = q - (u + s.height);
					h.pa.m(c - (s.width + t), q);
					d = Math.max(d, s.width + t);
					e = Math.max(e, Math.abs(q))
				} else t = Rw(h) - k, p -= u + s.width, h.pa.m(p, c - (s.height + t)), e = Math.max(e, s.height + t), d = Math.max(d, Math.abs(p));
				n++
			}
		var n = 0,
			x = p,
			v = q;
		m ? (p = c + k, q = 0) : (p = 0, q = c + k);
		for (r = 0; r < f; r++) 0 !== r % 2 && (h = b[r], s = h.kb, u = 0 === n ? 0 : l, m ? (t = Rw(h) - k, q -= u + s.height, h.pa.m(p + t, q), d = Math.max(d, p + s.width + t), e = Math.max(e, Math.abs(q))) : (t = Rw(h) - k, p -= u + s.width, h.pa.m(p, q + t), e = Math.max(e, q + s.height + t), d = Math.max(d, Math.abs(p))), n++);
		1 < f && 1 === f % 2 && (h = b[f - 1], s = h.kb, l = Sw(h, m ? Math.max(Math.abs(v), Math.abs(q)) : Math.max(Math.abs(x), Math.abs(p))), m ? (h.pa.m(c + k / 2 - h.T.x - h.Oa.x, -e - s.height - l), p = c + k / 2 - h.T.x - h.Oa.x, d = Math.max(d, p + s.width), 0 > p && (d -= p), e = Math.max(e, Math.abs(Math.min(v,
			q)) + l + s.height), 0 > h.pa.x && (c = Tw(a, h.pa.x, !1, c, k))) : (h.pa.m(-d - s.width - l, c + k / 2 - h.T.y - h.Oa.y), d = Math.max(d, Math.abs(Math.min(x, p)) + l + s.width), p = c + k / 2 - h.T.y - h.Oa.y, e = Math.max(e, p + s.height), 0 > p && (e -= p), 0 > h.pa.y && (c = Tw(a, h.pa.y, !0, c, k))));
		for (r = 0; r < f; r++) h = b[r], m ? h.pa.m(h.pa.x, h.pa.y + e) : h.pa.m(h.pa.x + d, h.pa.y);
		return new B(c, 0, d, e)
	}

	function Rw(a) {
		return null === a.parent ? 0 : a.parent.nodeSpacing
	}

	function Sw(a) {
		return null === a.parent ? 0 : a.parent.rowSpacing
	}

	function Tw(a, b, c, d, e) {
		a = a.children;
		for (var f = a.length, h = 0; h < f; h++) c ? a[h].pa.m(a[h].pa.x, a[h].pa.y - b) : a[h].pa.m(a[h].pa.x - b, a[h].pa.y);
		b = a[f - 1];
		return Math.max(d, c ? b.Oa.y + b.T.y - e / 2 : b.Oa.x + b.T.x - e / 2)
	}

	function Nw(a, b, c) {
		switch (a.alignment) {
			case Lv:
			case Mw:
				var d = b;
				c + a.width > d && (d = c + a.width);
				0 > c && (d -= c);
				return d;
			case Wv:
				return a.width > b ? a.width : b;
			case Xv:
				return 2 * a.T.x > b ? a.width : b + a.width - 2 * a.T.x;
			case Nv:
			case Cv:
				return d = Math.min(0, c), c = Math.max(b, c + a.width), Math.max(a.width, c - d);
			case Ov:
				return a.width - a.T.x + a.nodeSpacing / 2 + b;
			case Pv:
				return Math.max(a.width, a.T.x + a.nodeSpacing / 2 + b);
			default:
				return b
		}
	}

	function Ow(a, b, c) {
		switch (a.alignment) {
			case Lv:
			case Mw:
				var d = b;
				c + a.height > d && (d = c + a.height);
				0 > c && (d -= c);
				return d;
			case Wv:
				return a.height > b ? a.height : b;
			case Xv:
				return 2 * a.T.y > b ? a.height : b + a.height - 2 * a.T.y;
			case Nv:
			case Cv:
				return d = Math.min(0, c), c = Math.max(b, c + a.height), Math.max(a.height, c - d);
			case Ov:
				return a.height - a.T.y + a.nodeSpacing / 2 + b;
			case Pv:
				return Math.max(a.height, a.T.y + a.nodeSpacing / 2 + b);
			default:
				return b
		}
	}

	function Pw(a, b, c) {
		switch (a) {
			case Mw:
				b /= 2;
				c /= 2;
				break;
			case Lv:
				b /= 2;
				c /= 2;
				break;
			case Wv:
				c = b = 0;
				break;
			case Xv:
				break;
			default:
				w.k("Unhandled alignment value " + a.toString())
		}
		return new y(b, c)
	}

	function Hw(a, b, c, d, e, f) {
		b = Pw(b, c, d);
		Kw(a, b.x, b.y, e, f)
	}

	function Kw(a, b, c, d, e) {
		if (0 !== b || 0 !== c)
			for (a = a.children; d <= e; d++) {
				var f = a[d].pa;
				f.x += b;
				f.y += c
			}
	}

	function Iw(a, b, c, d) {
		var e = b.parent;
		switch (a.Of) {
			case lv:
				for (a = b.nc; a.next();) b = a.value, b.fromVertex === e && b.Rs.m(c, d);
				break;
			case sv:
				for (a = b.kc; a.next();) b = a.value, b.toVertex === e && b.Rs.m(c, d);
				break;
			default:
				w.k("Unhandled path value " + a.Of.toString())
		}
	}

	function Lw(a, b, c) {
		for (var d = 0; d < a.length; d++) {
			var e = a[d];
			e.x += b;
			e.y += c
		}
	}

	function Jw(a, b, c, d, e, f, h, k) {
		var l = Vv(b),
			m = 90 === l || 270 === l,
			n = b.nodeSpacing;
		b = d;
		var p = e;
		d = f;
		e = h;
		var q = c.wu,
			r = c.Ru;
		h = c.kb;
		var s = m ? Math.max(e, h.height) : Math.max(d, h.width);
		if (null === q || l !== Vv(c)) q = bw(a, 2), r = bw(a, 2), m ? (q[0].m(0, 0), q[1].m(0, h.height), r[0].m(h.width, 0), r[1].m(r[0].x, q[1].y)) : (q[0].m(0, 0), q[1].m(h.width, 0), r[0].m(0, h.height), r[1].m(q[1].x, r[0].y));
		if (m) {
			c = d;
			d = 9999999;
			if (!(null === p || 2 > p.length || null === q || 2 > q.length))
				for (m = l = 0; l < p.length && m < q.length;) {
					e = p[l];
					var u = q[m];
					f = u.x;
					var t = u.y;
					f +=
						c;
					var x = e;
					l + 1 < p.length && (x = p[l + 1]);
					var v = u,
						u = v.x,
						v = v.y;
					m + 1 < q.length && (v = q[m + 1], u = v.x, v = v.y, u += c);
					var z = d;
					e.y === t ? z = f - e.x : e.y > t && e.y < v ? z = f + (e.y - t) / (v - t) * (u - f) - e.x : t > e.y && t < x.y && (z = f - (e.x + (t - e.y) / (x.y - e.y) * (x.x - e.x)));
					z < d && (d = z);
					x.y <= e.y ? l++ : v <= t ? m++ : (x.y <= v && l++, v <= x.y && m++)
				}
			c -= d;
			c += n;
			l = q;
			m = c;
			if (null === b || 2 > b.length || null === l || 2 > l.length) d = null;
			else {
				n = bw(a, b.length + l.length);
				for (d = f = e = 0; f < l.length && l[f].y < b[0].y;) t = l[f++], n[d++].m(t.x + m, t.y);
				for (; e < b.length;) t = b[e++], n[d++].m(t.x, t.y);
				for (e = b[b.length -
						1].y; f < l.length && l[f].y <= e;) f++;
				for (; f < l.length && l[f].y > e;) t = l[f++], n[d++].m(t.x + m, t.y);
				l = bw(a, d);
				for (e = 0; e < d; e++) l[e].assign(n[e]);
				Qw(a, n);
				d = l
			}
			f = r;
			t = c;
			if (null === p || 2 > p.length || null === f || 2 > f.length) e = null;
			else {
				n = bw(a, p.length + f.length);
				for (m = x = l = 0; l < p.length && p[l].y < f[0].y;) e = p[l++], n[m++].m(e.x, e.y);
				for (; x < f.length;) e = f[x++], n[m++].m(e.x + t, e.y);
				for (f = f[f.length - 1].y; l < p.length && p[l].y <= f;) l++;
				for (; l < p.length && p[l].y > f;) e = p[l++], n[m++].m(e.x, e.y);
				e = bw(a, m);
				for (l = 0; l < m; l++) e[l].assign(n[l]);
				Qw(a, n)
			}
			f =
				Math.max(0, c) + h.width;
			h = s
		} else {
			c = e;
			d = 9999999;
			if (!(null === p || 2 > p.length || null === q || 2 > q.length))
				for (m = l = 0; l < p.length && m < q.length;) e = p[l], u = q[m], f = u.x, t = u.y, t += c, x = e, l + 1 < p.length && (x = p[l + 1]), v = u, u = v.x, v = v.y, m + 1 < q.length && (v = q[m + 1], u = v.x, v = v.y, v += c), z = d, e.x === f ? z = t - e.y : e.x > f && e.x < u ? z = t + (e.x - f) / (u - f) * (v - t) - e.y : f > e.x && f < x.x && (z = t - (e.y + (f - e.x) / (x.x - e.x) * (x.y - e.y))), z < d && (d = z), x.x <= e.x ? l++ : u <= f ? m++ : (x.x <= u && l++, u <= x.x && m++);
			c -= d;
			c += n;
			l = q;
			m = c;
			if (null === b || 2 > b.length || null === l || 2 > l.length) d = null;
			else {
				n = bw(a,
					b.length + l.length);
				for (d = f = e = 0; f < l.length && l[f].x < b[0].x;) t = l[f++], n[d++].m(t.x, t.y + m);
				for (; e < b.length;) t = b[e++], n[d++].m(t.x, t.y);
				for (e = b[b.length - 1].x; f < l.length && l[f].x <= e;) f++;
				for (; f < l.length && l[f].x > e;) t = l[f++], n[d++].m(t.x, t.y + m);
				l = bw(a, d);
				for (e = 0; e < d; e++) l[e].assign(n[e]);
				Qw(a, n);
				d = l
			}
			f = r;
			t = c;
			if (null === p || 2 > p.length || null === f || 2 > f.length) e = null;
			else {
				n = bw(a, p.length + f.length);
				for (m = x = l = 0; l < p.length && p[l].x < f[0].x;) e = p[l++], n[m++].m(e.x, e.y);
				for (; x < f.length;) e = f[x++], n[m++].m(e.x, e.y + t);
				for (f =
					f[f.length - 1].x; l < p.length && p[l].x <= f;) l++;
				for (; l < p.length && p[l].x > f;) e = p[l++], n[m++].m(e.x, e.y);
				e = bw(a, m);
				for (l = 0; l < m; l++) e[l].assign(n[l]);
				Qw(a, n)
			}
			f = s;
			h = Math.max(0, c) + h.height
		}
		Qw(a, b);
		Qw(a, q);
		Qw(a, p);
		Qw(a, r);
		k[0] = d;
		k[1] = e;
		return new B(c, 0, f, h)
	}

	function bw(a, b) {
		var c = a.Rz[b];
		if (void 0 !== c && (c = c.pop(), void 0 !== c)) return c;
		for (var c = [], d = 0; d < b; d++) c[d] = new y;
		return c
	}

	function Qw(a, b) {
		var c = b.length,
			d = a.Rz[c];
		void 0 === d && (d = [], a.Rz[c] = d);
		d.push(b)
	}
	Z.prototype.arrangeTrees = function() {
		if (this.pd === rv)
			for (var a = this.xd.i; a.next();) {
				var b = a.value;
				if (b instanceof pv) {
					var c = b.Qc;
					if (null !== c) {
						var d = c.position,
							c = d.x,
							d = d.y;
						isFinite(c) || (c = 0);
						isFinite(d) || (d = 0);
						Uw(this, b, c, d)
					}
				}
			} else {
				c = [];
				for (a = this.xd.i; a.next();) b = a.value, b instanceof pv && c.push(b);
				switch (this.sorting) {
					case Hv:
						break;
					case Iv:
						c.reverse();
						break;
					case Jv:
						c.sort(this.comparer);
						break;
					case Kv:
						c.sort(this.comparer);
						c.reverse();
						break;
					default:
						w.k("Unhandled sorting value " + this.sorting.toString())
				}
				b =
					this.Nd;
				a = b.x;
				b = b.y;
				for (d = 0; d < c.length; d++) {
					var e = c[d];
					Uw(this, e, a + e.Oa.x, b + e.Oa.y);
					switch (this.pd) {
						case ov:
							b += e.kb.height + this.ng.height;
							break;
						case Vw:
							a += e.kb.width + this.ng.width;
							break;
						default:
							w.k("Unhandled arrangement value " + this.pd.toString())
					}
				}
			}
	};

	function Uw(a, b, c, d) {
		if (null !== b) {
			b.x = c;
			b.y = d;
			b = b.children;
			for (var e = b.length, f = 0; f < e; f++) {
				var h = b[f];
				Uw(a, h, c + h.pa.x, d + h.pa.y)
			}
		}
	}
	Z.prototype.commitLayout = function() {
		this.zB();
		this.commitNodes();
		this.iA();
		this.uu && this.commitLinks()
	};
	Z.prototype.commitNodes = function() {
		for (var a = this.network.vertexes.i; a.next();) a.value.commit();
		for (a.reset(); a.next();) this.layoutComments(a.value)
	};
	Z.prototype.iA = function() {
		if (this.TA === zv) {
			for (var a = this.fC, b = [], c = null, d = this.network.vertexes.i; d.next();) {
				var e = d.value;
				null === c ? c = e.gb.copy() : c.Ih(e.gb);
				var f = b[e.level],
					f = void 0 === f ? Yv(e) : Math.max(f, Yv(e));
				b[e.level] = f
			}
			for (d = 0; d < b.length; d++) void 0 === b[d] && (b[d] = 0);
			90 === this.angle || 270 === this.angle ? (c.Yf(this.nodeSpacing / 2, this.layerSpacing), e = new y(-this.nodeSpacing / 2, -this.layerSpacing / 2)) : (c.Yf(this.layerSpacing, this.nodeSpacing / 2), e = new y(-this.layerSpacing / 2, -this.nodeSpacing / 2));
			var f =
				[],
				c = 90 === this.angle || 270 === this.angle ? c.width : c.height,
				h = 0;
			if (180 === this.angle || 270 === this.angle)
				for (d = 0; d < a.length; d++) h += a[d] + b[d];
			for (d = 0; d < a.length; d++) {
				var k = a[d] + b[d];
				270 === this.angle ? (h -= k, f.push(new B(0, h, c, k))) : 90 === this.angle ? (f.push(new B(0, h, c, k)), h += k) : 180 === this.angle ? (h -= k, f.push(new B(h, 0, k, c))) : (f.push(new B(h, 0, k, c)), h += k)
			}
			this.commitLayers(f, e)
		}
	};
	Z.prototype.commitLayers = function() {};
	Z.prototype.commitLinks = function() {
		for (var a = this.network.edges.i; a.next();) a.value.commit()
	};
	Z.prototype.zB = function() {
		for (var a = this.xd.i; a.next();) {
			var b = a.value;
			b instanceof pv && Ww(this, b)
		}
	};

	function Ww(a, b) {
		if (null !== b) {
			a.setPortSpots(b);
			for (var c = b.children, d = c.length, e = 0; e < d; e++) Ww(a, c[e])
		}
	}
	Z.prototype.setPortSpots = function(a) {
		var b = a.alignment;
		if (Mv(b)) {
			var c = this.Of === lv,
				d = Vv(a),
				e;
			switch (d) {
				case 0:
					e = Ic;
					break;
				case 90:
					e = Jc;
					break;
				case 180:
					e = Hc;
					break;
				default:
					e = Gc
			}
			var f = a.children,
				h = f.length;
			switch (b) {
				case Nv:
				case Cv:
					for (b = 0; b < h; b++) {
						var k = f[b],
							k = (c ? k.nc : k.kc).first();
						if (null !== k && (k = k.link, null !== k)) {
							var l = 90 === d || 270 === d ? Hc : Gc;
							if (1 === h || b === h - 1 && 1 === h % 2) switch (d) {
								case 0:
									l = Hc;
									break;
								case 90:
									l = Gc;
									break;
								case 180:
									l = Ic;
									break;
								default:
									l = Jc
							} else 0 === b % 2 && (l = 90 === d || 270 === d ? Ic : Jc);
							c ? (a.setsPortSpot &&
								(k.Ab = e), a.setsChildPortSpot && (k.Bb = l)) : (a.setsPortSpot && (k.Ab = l), a.setsChildPortSpot && (k.Bb = e))
						}
					}
					break;
				case Ov:
					l = 90 === d || 270 === d ? Ic : Jc;
					for (d = c ? a.kc : a.nc; d.next();) k = d.value.link, null !== k && (c ? (a.setsPortSpot && (k.Ab = e), a.setsChildPortSpot && (k.Bb = l)) : (a.setsPortSpot && (k.Ab = l), a.setsChildPortSpot && (k.Bb = e)));
					break;
				case Pv:
					for (l = 90 === d || 270 === d ? Hc : Gc, d = c ? a.kc : a.nc; d.next();) k = d.value.link, null !== k && (c ? (a.setsPortSpot && (k.Ab = e), a.setsChildPortSpot && (k.Bb = l)) : (a.setsPortSpot && (k.Ab = l), a.setsChildPortSpot &&
						(k.Bb = e)))
			}
		} else if (c = Vv(a), this.Of === lv)
			for (e = a.kc; e.next();) {
				if (d = e.value.link, null !== d) {
					if (a.setsPortSpot)
						if (a.portSpot.Zc()) switch (c) {
							case 0:
								d.Ab = Ic;
								break;
							case 90:
								d.Ab = Jc;
								break;
							case 180:
								d.Ab = Hc;
								break;
							default:
								d.Ab = Gc
						} else d.Ab = a.portSpot;
					if (a.setsChildPortSpot)
						if (a.childPortSpot.Zc()) switch (c) {
							case 0:
								d.Bb = Hc;
								break;
							case 90:
								d.Bb = Gc;
								break;
							case 180:
								d.Bb = Ic;
								break;
							default:
								d.Bb = Jc
						} else d.Bb = a.childPortSpot
				}
			} else
				for (e = a.nc; e.next();)
					if (d = e.value.link, null !== d) {
						if (a.setsPortSpot)
							if (a.portSpot.Zc()) switch (c) {
								case 0:
									d.Bb =
										Ic;
									break;
								case 90:
									d.Bb = Jc;
									break;
								case 180:
									d.Bb = Hc;
									break;
								default:
									d.Bb = Gc
							} else d.Bb = a.portSpot;
						if (a.setsChildPortSpot)
							if (a.childPortSpot.Zc()) switch (c) {
								case 0:
									d.Ab = Hc;
									break;
								case 90:
									d.Ab = Gc;
									break;
								case 180:
									d.Ab = Ic;
									break;
								default:
									d.Ab = Jc
							} else d.Ab = a.childPortSpot
					}
	};

	function Vv(a) {
		a = a.angle;
		return 45 >= a ? 0 : 135 >= a ? 90 : 225 >= a ? 180 : 315 >= a ? 270 : 0
	}

	function Yv(a) {
		var b = Vv(a),
			b = 90 === b || 270 === b,
			c = a.layerSpacing;
		if (0 < a.layerSpacingParentOverlap) var d = Math.min(1, a.layerSpacingParentOverlap),
			c = c - (b ? a.height * d : a.width * d);
		c < (b ? -a.height : -a.width) && (c = b ? -a.height : -a.width);
		return c
	}

	function Zv(a) {
		var b = Vv(a),
			b = 90 === b || 270 === b,
			c = a.nodeIndent;
		if (0 < a.nodeIndentPastParent) var d = Math.min(1, a.nodeIndentPastParent),
			c = c + (b ? a.width * d : a.height * d);
		return c = Math.max(0, c)
	}
	w.defineProperty(Z, {
		OL: "roots"
	}, function() {
		return this.xd
	}, function(a) {
		this.xd !== a && (w.G(a, I, Z, "roots"), this.xd = a, this.J())
	});
	w.defineProperty(Z, {
		path: "path"
	}, function() {
		return this.Ks
	}, function(a) {
		this.Ks !== a && (w.ob(a, Z, Z, "path"), this.Ks = a, this.J())
	});
	w.defineProperty(Z, {
		YJ: "treeStyle"
	}, function() {
		return this.zt
	}, function(a) {
		this.pd !== a && (w.ob(a, Z, Z, "treeStyle"), a === mv || a === Fv || a === Gv || a === Ev) && (this.zt = a, this.J())
	});
	w.defineProperty(Z, {
		TA: "layerStyle"
	}, function() {
		return this.fw
	}, function(a) {
		this.pd !== a && (w.ob(a, Z, Z, "layerStyle"), a === nv || a === Av || a === zv) && (this.fw = a, this.J())
	});
	w.defineProperty(Z, {
		comments: "comments"
	}, function() {
		return this.Lh
	}, function(a) {
		this.Lh !== a && (w.j(a, "boolean", Z, "comments"), this.Lh = a, this.J())
	});
	w.defineProperty(Z, {
		Vf: "arrangement"
	}, function() {
		return this.pd
	}, function(a) {
		this.pd !== a && (w.ob(a, Z, Z, "arrangement"), a === ov || a === Vw || a === rv) && (this.pd = a, this.J())
	});
	w.defineProperty(Z, {
		CE: "arrangementSpacing"
	}, function() {
		return this.ng
	}, function(a) {
		w.G(a, ia, Z, "arrangementSpacing");
		this.ng.L(a) || (this.ng.assign(a), this.J())
	});
	w.defineProperty(Z, {
		NL: "rootDefaults"
	}, function() {
		return this.va
	}, function(a) {
		this.va !== a && (w.G(a, pv, Z, "rootDefaults"), this.va = a, this.J())
	});
	w.defineProperty(Z, {
		qK: "alternateDefaults"
	}, function() {
		return this.wa
	}, function(a) {
		this.wa !== a && (w.G(a, pv, Z, "alternateDefaults"), this.wa = a, this.J())
	});
	w.defineProperty(Z, {
		sorting: "sorting"
	}, function() {
		return this.va.sorting
	}, function(a) {
		this.va.sorting !== a && (w.ob(a, Z, Z, "sorting"), a === Hv || a === Iv || a === Jv || Kv) && (this.va.sorting = a, this.J())
	});
	w.defineProperty(Z, {
		comparer: "comparer"
	}, function() {
		return this.va.comparer
	}, function(a) {
		this.va.comparer !== a && (w.j(a, "function", Z, "comparer"), this.va.comparer = a, this.J())
	});
	w.defineProperty(Z, {
		angle: "angle"
	}, function() {
		return this.va.angle
	}, function(a) {
		this.va.angle !== a && (w.j(a, "number", Z, "angle"), 0 === a || 90 === a || 180 === a || 270 === a ? (this.va.angle = a, this.J()) : w.k("TreeLayout.angle must be 0, 90, 180, or 270"))
	});
	w.defineProperty(Z, {
		alignment: "alignment"
	}, function() {
		return this.va.alignment
	}, function(a) {
		this.va.alignment !== a && (w.ob(a, Z, Z, "alignment"), this.va.alignment = a, this.J())
	});
	w.defineProperty(Z, {
		nodeIndent: "nodeIndent"
	}, function() {
		return this.va.nodeIndent
	}, function(a) {
		this.va.nodeIndent !== a && (w.j(a, "number", Z, "nodeIndent"), 0 <= a && (this.va.nodeIndent = a, this.J()))
	});
	w.defineProperty(Z, {
		nodeIndentPastParent: "nodeIndentPastParent"
	}, function() {
		return this.va.nodeIndentPastParent
	}, function(a) {
		this.va.nodeIndentPastParent !== a && (w.j(a, "number", Z, "nodeIndentPastParent"), 0 <= a && 1 >= a && (this.va.nodeIndentPastParent = a, this.J()))
	});
	w.defineProperty(Z, {
		nodeSpacing: "nodeSpacing"
	}, function() {
		return this.va.nodeSpacing
	}, function(a) {
		this.va.nodeSpacing !== a && (w.j(a, "number", Z, "nodeSpacing"), this.va.nodeSpacing = a, this.J())
	});
	w.defineProperty(Z, {
		layerSpacing: "layerSpacing"
	}, function() {
		return this.va.layerSpacing
	}, function(a) {
		this.va.layerSpacing !== a && (w.j(a, "number", Z, "layerSpacing"), this.va.layerSpacing = a, this.J())
	});
	w.defineProperty(Z, {
		layerSpacingParentOverlap: "layerSpacingParentOverlap"
	}, function() {
		return this.va.layerSpacingParentOverlap
	}, function(a) {
		this.va.layerSpacingParentOverlap !== a && (w.j(a, "number", Z, "layerSpacingParentOverlap"), 0 <= a && 1 >= a && (this.va.layerSpacingParentOverlap = a, this.J()))
	});
	w.defineProperty(Z, {
		compaction: "compaction"
	}, function() {
		return this.va.compaction
	}, function(a) {
		this.va.compaction !== a && (w.ob(a, Z, Z, "compaction"), a === Sv || a === Uv) && (this.va.compaction = a, this.J())
	});
	w.defineProperty(Z, {
		breadthLimit: "breadthLimit"
	}, function() {
		return this.va.breadthLimit
	}, function(a) {
		this.va.breadthLimit !== a && (w.j(a, "number", Z, "breadthLimit"), 0 <= a && (this.va.breadthLimit = a, this.J()))
	});
	w.defineProperty(Z, {
		rowSpacing: "rowSpacing"
	}, function() {
		return this.va.rowSpacing
	}, function(a) {
		this.va.rowSpacing !== a && (w.j(a, "number", Z, "rowSpacing"), this.va.rowSpacing = a, this.J())
	});
	w.defineProperty(Z, {
		rowIndent: "rowIndent"
	}, function() {
		return this.va.rowIndent
	}, function(a) {
		this.va.rowIndent !== a && (w.j(a, "number", Z, "rowIndent"), 0 <= a && (this.va.rowIndent = a, this.J()))
	});
	w.defineProperty(Z, {
		commentSpacing: "commentSpacing"
	}, function() {
		return this.va.commentSpacing
	}, function(a) {
		this.va.commentSpacing !== a && (w.j(a, "number", Z, "commentSpacing"), this.va.commentSpacing = a, this.J())
	});
	w.defineProperty(Z, {
		commentMargin: "commentMargin"
	}, function() {
		return this.va.commentMargin
	}, function(a) {
		this.va.commentMargin !== a && (w.j(a, "number", Z, "commentMargin"), this.va.commentMargin = a, this.J())
	});
	w.defineProperty(Z, {
		setsPortSpot: "setsPortSpot"
	}, function() {
		return this.va.setsPortSpot
	}, function(a) {
		this.va.setsPortSpot !== a && (w.j(a, "boolean", Z, "setsPortSpot"), this.va.setsPortSpot = a, this.J())
	});
	w.defineProperty(Z, {
		portSpot: "portSpot"
	}, function() {
		return this.va.portSpot
	}, function(a) {
		w.G(a, K, Z, "portSpot");
		this.va.portSpot.L(a) || (this.va.portSpot = a, this.J())
	});
	w.defineProperty(Z, {
		setsChildPortSpot: "setsChildPortSpot"
	}, function() {
		return this.va.setsChildPortSpot
	}, function(a) {
		this.va.setsChildPortSpot !== a && (w.j(a, "boolean", Z, "setsChildPortSpot"), this.va.setsChildPortSpot = a, this.J())
	});
	w.defineProperty(Z, {
		childPortSpot: "childPortSpot"
	}, function() {
		return this.va.childPortSpot
	}, function(a) {
		w.G(a, K, Z, "childPortSpot");
		this.va.childPortSpot.L(a) || (this.va.childPortSpot = a, this.J())
	});
	w.defineProperty(Z, {
		BK: "alternateSorting"
	}, function() {
		return this.wa.sorting
	}, function(a) {
		this.wa.sorting !== a && (w.ob(a, Z, Z, "alternateSorting"), a === Hv || a === Iv || a === Jv || Kv) && (this.wa.sorting = a, this.J())
	});
	w.defineProperty(Z, {
		pK: "alternateComparer"
	}, function() {
		return this.wa.comparer
	}, function(a) {
		this.wa.comparer !== a && (w.j(a, "function", Z, "alternateComparer"), this.wa.comparer = a, this.J())
	});
	w.defineProperty(Z, {
		jK: "alternateAngle"
	}, function() {
		return this.wa.angle
	}, function(a) {
		this.wa.angle !== a && (w.j(a, "number", Z, "alternateAngle"), 0 === a || 90 === a || 180 === a || 270 === a) && (this.wa.angle = a, this.J())
	});
	w.defineProperty(Z, {
		iK: "alternateAlignment"
	}, function() {
		return this.wa.alignment
	}, function(a) {
		this.wa.alignment !== a && (w.ob(a, Z, Z, "alternateAlignment"), this.wa.alignment = a, this.J())
	});
	w.defineProperty(Z, {
		tK: "alternateNodeIndent"
	}, function() {
		return this.wa.nodeIndent
	}, function(a) {
		this.wa.nodeIndent !== a && (w.j(a, "number", Z, "alternateNodeIndent"), 0 <= a && (this.wa.nodeIndent = a, this.J()))
	});
	w.defineProperty(Z, {
		uK: "alternateNodeIndentPastParent"
	}, function() {
		return this.wa.nodeIndentPastParent
	}, function(a) {
		this.wa.nodeIndentPastParent !== a && (w.j(a, "number", Z, "alternateNodeIndentPastParent"), 0 <= a && 1 >= a && (this.wa.nodeIndentPastParent = a, this.J()))
	});
	w.defineProperty(Z, {
		vK: "alternateNodeSpacing"
	}, function() {
		return this.wa.nodeSpacing
	}, function(a) {
		this.wa.nodeSpacing !== a && (w.j(a, "number", Z, "alternateNodeSpacing"), this.wa.nodeSpacing = a, this.J())
	});
	w.defineProperty(Z, {
		rK: "alternateLayerSpacing"
	}, function() {
		return this.wa.layerSpacing
	}, function(a) {
		this.wa.layerSpacing !== a && (w.j(a, "number", Z, "alternateLayerSpacing"), this.wa.layerSpacing = a, this.J())
	});
	w.defineProperty(Z, {
		sK: "alternateLayerSpacingParentOverlap"
	}, function() {
		return this.wa.layerSpacingParentOverlap
	}, function(a) {
		this.wa.layerSpacingParentOverlap !== a && (w.j(a, "number", Z, "alternateLayerSpacingParentOverlap"), 0 <= a && 1 >= a && (this.wa.layerSpacingParentOverlap = a, this.J()))
	});
	w.defineProperty(Z, {
		oK: "alternateCompaction"
	}, function() {
		return this.wa.compaction
	}, function(a) {
		this.wa.compaction !== a && (w.ob(a, Z, Z, "alternateCompaction"), a === Sv || a === Uv) && (this.wa.compaction = a, this.J())
	});
	w.defineProperty(Z, {
		kK: "alternateBreadthLimit"
	}, function() {
		return this.wa.breadthLimit
	}, function(a) {
		this.wa.breadthLimit !== a && (w.j(a, "number", Z, "alternateBreadthLimit"), 0 <= a && (this.wa.breadthLimit = a, this.J()))
	});
	w.defineProperty(Z, {
		yK: "alternateRowSpacing"
	}, function() {
		return this.wa.rowSpacing
	}, function(a) {
		this.wa.rowSpacing !== a && (w.j(a, "number", Z, "alternateRowSpacing"), this.wa.rowSpacing = a, this.J())
	});
	w.defineProperty(Z, {
		xK: "alternateRowIndent"
	}, function() {
		return this.wa.rowIndent
	}, function(a) {
		this.wa.rowIndent !== a && (w.j(a, "number", Z, "alternateRowIndent"), 0 <= a && (this.wa.rowIndent = a, this.J()))
	});
	w.defineProperty(Z, {
		nK: "alternateCommentSpacing"
	}, function() {
		return this.wa.commentSpacing
	}, function(a) {
		this.wa.commentSpacing !== a && (w.j(a, "number", Z, "alternateCommentSpacing"), this.wa.commentSpacing = a, this.J())
	});
	w.defineProperty(Z, {
		mK: "alternateCommentMargin"
	}, function() {
		return this.wa.commentMargin
	}, function(a) {
		this.wa.commentMargin !== a && (w.j(a, "number", Z, "alternateCommentMargin"), this.wa.commentMargin = a, this.J())
	});
	w.defineProperty(Z, {
		AK: "alternateSetsPortSpot"
	}, function() {
		return this.wa.setsPortSpot
	}, function(a) {
		this.wa.setsPortSpot !== a && (w.j(a, "boolean", Z, "alternateSetsPortSpot"), this.wa.setsPortSpot = a, this.J())
	});
	w.defineProperty(Z, {
		wK: "alternatePortSpot"
	}, function() {
		return this.wa.portSpot
	}, function(a) {
		w.G(a, K, Z, "alternatePortSpot");
		this.wa.portSpot.L(a) || (this.wa.portSpot = a, this.J())
	});
	w.defineProperty(Z, {
		zK: "alternateSetsChildPortSpot"
	}, function() {
		return this.wa.setsChildPortSpot
	}, function(a) {
		this.wa.setsChildPortSpot !== a && (w.j(a, "boolean", Z, "alternateSetsChildPortSpot"), this.wa.setsChildPortSpot = a, this.J())
	});
	w.defineProperty(Z, {
		lK: "alternateChildPortSpot"
	}, function() {
		return this.wa.childPortSpot
	}, function(a) {
		w.G(a, K, Z, "alternateChildPortSpot");
		this.wa.childPortSpot.L(a) || (this.wa.childPortSpot = a, this.J())
	});
	var kv;
	Z.PathDefault = kv = w.p(Z, "PathDefault", -1);
	var lv;
	Z.PathDestination = lv = w.p(Z, "PathDestination", 0);
	var sv;
	Z.PathSource = sv = w.p(Z, "PathSource", 1);
	var Hv;
	Z.SortingForwards = Hv = w.p(Z, "SortingForwards", 10);
	var Iv;
	Z.SortingReverse = Iv = w.p(Z, "SortingReverse", 11);
	var Jv;
	Z.SortingAscending = Jv = w.p(Z, "SortingAscending", 12);
	var Kv;
	Z.SortingDescending = Kv = w.p(Z, "SortingDescending", 13);
	var Mw;
	Z.AlignmentCenterSubtrees = Mw = w.p(Z, "AlignmentCenterSubtrees", 20);
	var Lv;
	Z.AlignmentCenterChildren = Lv = w.p(Z, "AlignmentCenterChildren", 21);
	var Wv;
	Z.AlignmentStart = Wv = w.p(Z, "AlignmentStart", 22);
	var Xv;
	Z.AlignmentEnd = Xv = w.p(Z, "AlignmentEnd", 23);
	var Nv;
	Z.AlignmentBus = Nv = w.p(Z, "AlignmentBus", 24);
	var Cv;
	Z.AlignmentBusBranching = Cv = w.p(Z, "AlignmentBusBranching", 25);
	var Ov;
	Z.AlignmentTopLeftBus = Ov = w.p(Z, "AlignmentTopLeftBus", 26);
	var Pv;
	Z.AlignmentBottomRightBus = Pv = w.p(Z, "AlignmentBottomRightBus", 27);
	var Sv;
	Z.CompactionNone = Sv = w.p(Z, "CompactionNone", 30);
	var Uv;
	Z.CompactionBlock = Uv = w.p(Z, "CompactionBlock", 31);
	var mv;
	Z.StyleLayered = mv = w.p(Z, "StyleLayered", 40);
	var Gv;
	Z.StyleLastParents = Gv = w.p(Z, "StyleLastParents", 41);
	var Fv;
	Z.StyleAlternating = Fv = w.p(Z, "StyleAlternating", 42);
	var Ev;
	Z.StyleRootOnly = Ev = w.p(Z, "StyleRootOnly", 43);
	var ov;
	Z.ArrangementVertical = ov = w.p(Z, "ArrangementVertical", 50);
	var Vw;
	Z.ArrangementHorizontal = Vw = w.p(Z, "ArrangementHorizontal", 51);
	var rv;
	Z.ArrangementFixedRoots = rv = w.p(Z, "ArrangementFixedRoots", 52);
	var nv;
	Z.LayerIndividual = nv = w.p(Z, "LayerIndividual", 60);
	var Av;
	Z.LayerSiblings = Av = w.p(Z, "LayerSiblings", 61);
	var zv;
	Z.LayerUniform = zv = w.p(Z, "LayerUniform", 62);

	function qv() {
		ug.call(this)
	}
	w.La(qv, ug);
	w.ga("TreeNetwork", qv);
	qv.prototype.createVertex = function() {
		return new pv
	};
	qv.prototype.createEdge = function() {
		return new Xw
	};

	function pv() {
		ms.call(this);
		this.initialized = !1;
		this.parent = null;
		this.children = [];
		this.maxGenerationCount = this.maxChildrenCount = this.descendantCount = this.level = 0;
		this.comments = null;
		this.pa = new y(0, 0);
		this.kb = new ia(0, 0);
		this.Oa = new y(0, 0);
		this.uq = this.tq = this.AJ = !1;
		this.Ru = this.wu = null;
		this.sorting = Hv;
		this.comparer = ss;
		this.angle = 0;
		this.alignment = Lv;
		this.nodeIndentPastParent = this.nodeIndent = 0;
		this.nodeSpacing = 20;
		this.layerSpacing = 50;
		this.layerSpacingParentOverlap = 0;
		this.compaction = Uv;
		this.breadthLimit =
			0;
		this.rowSpacing = 25;
		this.commentSpacing = this.rowIndent = 10;
		this.commentMargin = 20;
		this.setsPortSpot = !0;
		this.portSpot = qc;
		this.setsChildPortSpot = !0;
		this.childPortSpot = qc
	}
	w.La(pv, ms);
	w.ga("TreeVertex", pv);
	pv.prototype.copyInheritedPropertiesFrom = function(a) {
		null !== a && (this.sorting = a.sorting, this.comparer = a.comparer, this.angle = a.angle, this.alignment = a.alignment, this.nodeIndent = a.nodeIndent, this.nodeIndentPastParent = a.nodeIndentPastParent, this.nodeSpacing = a.nodeSpacing, this.layerSpacing = a.layerSpacing, this.layerSpacingParentOverlap = a.layerSpacingParentOverlap, this.compaction = a.compaction, this.breadthLimit = a.breadthLimit, this.rowSpacing = a.rowSpacing, this.rowIndent = a.rowIndent, this.commentSpacing = a.commentSpacing,
			this.commentMargin = a.commentMargin, this.setsPortSpot = a.setsPortSpot, this.portSpot = a.portSpot, this.setsChildPortSpot = a.setsChildPortSpot, this.childPortSpot = a.childPortSpot)
	};
	w.u(pv, {
		nn: "childrenCount"
	}, function() {
		return this.children.length
	});
	w.defineProperty(pv, {
		ML: "relativePosition"
	}, function() {
		return this.pa
	}, function(a) {
		this.pa.set(a)
	});
	w.defineProperty(pv, {
		ZL: "subtreeSize"
	}, function() {
		return this.kb
	}, function(a) {
		this.kb.set(a)
	});
	w.defineProperty(pv, {
		YL: "subtreeOffset"
	}, function() {
		return this.Oa
	}, function(a) {
		this.Oa.set(a)
	});

	function Xw() {
		ns.call(this);
		this.Rs = new y(0, 0)
	}
	w.La(Xw, ns);
	w.ga("TreeEdge", Xw);
	Xw.prototype.commit = function() {
		var a = this.link;
		if (null !== a && !a.Zl) {
			var b = this.network.Sb,
				c = null,
				d = null;
			switch (b.Of) {
				case lv:
					c = this.fromVertex;
					d = this.toVertex;
					break;
				case sv:
					c = this.toVertex;
					d = this.fromVertex;
					break;
				default:
					w.k("Unhandled path value " + b.Of.toString())
			}
			if (null !== c && null !== d)
				if (b = this.Rs, 0 !== b.x || 0 !== b.y || c.AJ) {
					var d = c.gb,
						e = Vv(c),
						f = Yv(c),
						h = c.rowSpacing;
					a.ao();
					var k = a.Ze === Kj,
						l = a.ac,
						m = 0,
						n, p;
					a.jm();
					if (l || k) {
						for (m = 2; 4 < a.qa;) a.bG(2);
						n = a.l(1);
						p = a.l(2)
					} else {
						for (m = 1; 3 < a.qa;) a.bG(1);
						n = a.l(0);
						p =
							a.l(a.qa - 1)
					}
					var q = a.l(a.qa - 1),
						r = 0;
					0 === e ? (c.alignment === Xv ? (r = d.bottom + b.y, 0 === b.y && n.y > q.y + c.rowIndent && (r = Math.min(r, Math.max(n.y, r - Zv(c))))) : c.alignment === Wv ? (r = d.top + b.y, 0 === b.y && n.y < q.y - c.rowIndent && (r = Math.max(r, Math.min(n.y, r + Zv(c))))) : r = c.tq || c.uq && 1 === c.maxGenerationCount ? d.top - c.Oa.y + b.y : d.y + d.height / 2 + b.y, k ? (a.w(m, n.x, r), m++, a.w(m, d.right + f, r), m++, a.w(m, d.right + f + (b.x - h) / 3, r), m++, a.w(m, d.right + f + 2 * (b.x - h) / 3, r), m++, a.w(m, d.right + f + (b.x - h), r), m++, a.w(m, p.x, r)) : (l && (a.w(m, d.right + f / 2, n.y),
						m++), a.w(m, d.right + f / 2, r), m++, a.w(m, d.right + f + b.x - (l ? h / 2 : h), r), m++, l && a.w(m, a.l(m - 1).x, p.y))) : 90 === e ? (c.alignment === Xv ? (r = d.right + b.x, 0 === b.x && n.x > q.x + c.rowIndent && (r = Math.min(r, Math.max(n.x, r - Zv(c))))) : c.alignment === Wv ? (r = d.left + b.x, 0 === b.x && n.x < q.x - c.rowIndent && (r = Math.max(r, Math.min(n.x, r + Zv(c))))) : r = c.tq || c.uq && 1 === c.maxGenerationCount ? d.left - c.Oa.x + b.x : d.x + d.width / 2 + b.x, k ? (a.w(m, r, n.y), m++, a.w(m, r, d.bottom + f), m++, a.w(m, r, d.bottom + f + (b.y - h) / 3), m++, a.w(m, r, d.bottom + f + 2 * (b.y - h) / 3), m++, a.w(m, r, d.bottom +
						f + (b.y - h)), m++, a.w(m, r, p.y)) : (l && (a.w(m, n.x, d.bottom + f / 2), m++), a.w(m, r, d.bottom + f / 2), m++, a.w(m, r, d.bottom + f + b.y - (l ? h / 2 : h)), m++, l && a.w(m, p.x, a.l(m - 1).y))) : 180 === e ? (c.alignment === Xv ? (r = d.bottom + b.y, 0 === b.y && n.y > q.y + c.rowIndent && (r = Math.min(r, Math.max(n.y, r - Zv(c))))) : c.alignment === Wv ? (r = d.top + b.y, 0 === b.y && n.y < q.y - c.rowIndent && (r = Math.max(r, Math.min(n.y, r + Zv(c))))) : r = c.tq || c.uq && 1 === c.maxGenerationCount ? d.top - c.Oa.y + b.y : d.y + d.height / 2 + b.y, k ? (a.w(m, n.x, r), m++, a.w(m, d.left - f, r), m++, a.w(m, d.left - f + (b.x +
						h) / 3, r), m++, a.w(m, d.left - f + 2 * (b.x + h) / 3, r), m++, a.w(m, d.left - f + (b.x + h), r), m++, a.w(m, p.x, r)) : (l && (a.w(m, d.left - f / 2, n.y), m++), a.w(m, d.left - f / 2, r), m++, a.w(m, d.left - f + b.x + (l ? h / 2 : h), r), m++, l && a.w(m, a.l(m - 1).x, p.y))) : 270 === e ? (c.alignment === Xv ? (r = d.right + b.x, 0 === b.x && n.x > q.x + c.rowIndent && (r = Math.min(r, Math.max(n.x, r - Zv(c))))) : c.alignment === Wv ? (r = d.left + b.x, 0 === b.x && n.x < q.x - c.rowIndent && (r = Math.max(r, Math.min(n.x, r + Zv(c))))) : r = c.tq || c.uq && 1 === c.maxGenerationCount ? d.left - c.Oa.x + b.x : d.x + d.width / 2 + b.x, k ? (a.w(m,
						r, n.y), m++, a.w(m, r, d.top - f), m++, a.w(m, r, d.top - f + (b.y + h) / 3), m++, a.w(m, r, d.top - f + 2 * (b.y + h) / 3), m++, a.w(m, r, d.top - f + (b.y + h)), m++, a.w(m, r, p.y)) : (l && (a.w(m, n.x, d.top - f / 2), m++), a.w(m, r, d.top - f / 2), m++, a.w(m, r, d.top - f + b.y + (l ? h / 2 : h)), m++, l && a.w(m, p.x, a.l(m - 1).y))) : w.k("Invalid angle " + e);
					a.nj()
				} else e = c, f = d, a = this.link, c = Vv(e), c !== Vv(f) && (b = Yv(e), d = e.gb, e = f.gb, 0 === c && e.left - d.right < b + 1 || 90 === c && e.top - d.bottom < b + 1 || 180 === c && d.left - e.right < b + 1 || 270 === c && d.top - e.bottom < b + 1 || (a.ao(), e = a.Ze === Kj, f = a.ac, h = Mv(this.fromVertex.alignment),
					a.jm(), 0 === c ? (c = d.right + b / 2, e ? 4 === a.qa && (b = a.l(3).y, a.ca(1, c - 20, a.l(1).y), a.w(2, c - 20, b), a.w(3, c, b), a.w(4, c + 20, b), a.ca(5, a.l(5).x, b)) : f ? h ? a.ca(3, a.l(2).x, a.l(4).y) : 6 === a.qa && (a.ca(2, c, a.l(2).y), a.ca(3, c, a.l(3).y)) : 4 === a.qa ? a.w(2, c, a.l(2).y) : 3 === a.qa ? a.ca(1, c, a.l(2).y) : 2 === a.qa && a.w(1, c, a.l(1).y)) : 90 === c ? (b = d.bottom + b / 2, e ? 4 === a.qa && (c = a.l(3).x, a.ca(1, a.l(1).x, b - 20), a.w(2, c, b - 20), a.w(3, c, b), a.w(4, c, b + 20), a.ca(5, c, a.l(5).y)) : f ? h ? a.ca(3, a.l(2).x, a.l(4).y) : 6 === a.qa && (a.ca(2, a.l(2).x, b), a.ca(3, a.l(3).x,
						b)) : 4 === a.qa ? a.w(2, a.l(2).x, b) : 3 === a.qa ? a.ca(1, a.l(2).x, b) : 2 === a.qa && a.w(1, a.l(1).x, b)) : 180 === c ? (c = d.left - b / 2, e ? 4 === a.qa && (b = a.l(3).y, a.ca(1, c + 20, a.l(1).y), a.w(2, c + 20, b), a.w(3, c, b), a.w(4, c - 20, b), a.ca(5, a.l(5).x, b)) : f ? h ? a.ca(3, a.l(2).x, a.l(4).y) : 6 === a.qa && (a.ca(2, c, a.l(2).y), a.ca(3, c, a.l(3).y)) : 4 === a.qa ? a.w(2, c, a.l(2).y) : 3 === a.qa ? a.ca(1, c, a.l(2).y) : 2 === a.qa && a.w(1, c, a.l(1).y)) : 270 === c && (b = d.top - b / 2, e ? 4 === a.qa && (c = a.l(3).x, a.ca(1, a.l(1).x, b + 20), a.w(2, c, b + 20), a.w(3, c, b), a.w(4, c, b - 20), a.ca(5, c, a.l(5).y)) :
						f ? h ? a.ca(3, a.l(2).x, a.l(4).y) : 6 === a.qa && (a.ca(2, a.l(2).x, b), a.ca(3, a.l(3).x, b)) : 4 === a.qa ? a.w(2, a.l(2).x, b) : 3 === a.qa ? a.ca(1, a.l(2).x, b) : 2 === a.qa && a.w(1, a.l(1).x, b)), a.nj()))
		}
	};
	w.defineProperty(Xw, {
		LL: "relativePoint"
	}, function() {
		return this.Rs
	}, function(a) {
		this.Rs.set(a)
	});

	function Yw() {
		G.call(this);
		this.Te = null
	}
	w.La(Yw, G);
	Yw.prototype.cloneProtected = function(a) {
		G.prototype.cloneProtected.call(this, a);
		a.element = this.Te.cloneNode(!0)
	};
	Yw.prototype.toString = function() {
		return "HTMLHost(" + this.Te.toString() + ")#" + w.Pd(this)
	};
	Yw.prototype.Ek = function(a, b) {
		var c = this.Te;
		if (null !== c) {
			var d = this.Wa(Jb);
			d.x -= this.Y.width / 2;
			d.y -= this.Y.height / 2;
			d.x -= this.Y.x;
			d.y -= this.Y.y;
			var d = b.FG(d),
				e = b.qj;
			null === e || e.contains(c) || e.appendChild(c);
			e = this.transform;
			c.style.transform = "matrix(" + e.m11 + "," + e.m12 + "," + e.m21 + "," + e.m22 + "," + e.dx + "," + e.dy + ")";
			c.style.transformOrigin = "0 0";
			e = d.y;
			c.style.left = d.x + "px";
			c.style.top = e + "px"
		}
	};
	Yw.prototype.Ln = function(a, b, c, d) {
		var e = this.Ca;
		isFinite(e.width) && (a = e.width);
		isFinite(e.height) && (b = e.height);
		var e = this.Gf,
			f = this.qi;
		c = Math.max(c, f.width);
		d = Math.max(d, f.height);
		a = Math.min(e.width, a);
		b = Math.min(e.height, b);
		a = Math.max(c, a);
		b = Math.max(d, b);
		c = this.Te;
		null !== c && (b = c.getBoundingClientRect(), a = b.width, b = b.height);
		Ua(this.Wc, a, b);
		Bo(this, 0, 0, a, b)
	};
	Yw.prototype.mj = function(a, b, c, d) {
		Go(this, a, b, c, d)
	};
	w.u(Yw, {
		Ja: "naturalBounds"
	}, function() {
		return this.Wc
	});
	w.defineProperty(Yw, {
		element: "element"
	}, function() {
		return this.Te
	}, function(a) {
		var b = this.Te;
		b !== a && (a instanceof HTMLElement || w.k("HTMLHost.element must be an instance of Element."), this.Te = a, a.className = "HTMLHost", this.h("element", b, a), this.oa())
	});
	ca.version = "1.8.12";
	window && (window.module && "object" === typeof window.module && "object" === typeof window.module.exports ? window.module.exports = ca : window.define && "function" === typeof window.define && window.define.amd ? (window.go = ca, window.define(ca)) : window.go = ca);
	"undefined" !== typeof module && "object" === typeof module.exports && (module.exports = ca);
})(window);