var ictinus = (function () { var D = navigator.userAgent.toLowerCase(); var E = /msie/.test(D) && !/opera/.test(D); function C(H, G) { return H.nodeType == 1 && H.className.indexOf(G) != -1; } function F() { function G(K) { var J; if (K.className.indexOf("ictinus-init") != -1) { if (K.nodeName == "IMG" && K.previousSibling.nodeName == "CANVAS") { J = K.previousSibling; } else { if (K.getElementsByTagName("canvas").length) { J = K.getElementsByTagName("canvas")[0]; } } } if (!J) { J = document.createElement("canvas"); J.width = K.offsetWidth + 1; J.height = K.offsetHeight + 1; J.className = "ictinus"; if (K.tagName == "IMG") { K.parentNode.insertBefore(J, K); } else { K.appendChild(J); } K.className = (K.className ? K.className + " " : "") + "ictinus-init"; } return J.getContext("2d"); } function I(J, K) { J.beginPath(); K.traverse(function (L) { L.drawCanvas(J); }); J.closePath(); } function H(J, K) { J.clearRect(0, 0, J.canvas.width, J.canvas.height); J.canvas.width = Math.ceil(K.width() + K.paddingLeft + K.paddingRight + K.strokeWidth * 2); J.canvas.height = Math.ceil(K.height() + K.paddingTop + K.paddingBottom + K.strokeWidth * 2); J.save(); var L = Math.floor(K.strokeWidth / 2); J.translate(K.paddingLeft + L, K.paddingTop + L); } return { decorate: function (L, K) { var J = G(L); var M = (K.strokeWidth % 2) / 2; H(J, K); J.save(); I(J, K); J.clip(); if (K.fillColor) { J.rect(0, 0, L.offsetWidth, L.offsetHeight); J.fillStyle = K.fillColor; J.fill(); } J.translate(K.contentBox.x, K.contentBox.y); J.drawImage(L, 0, 0, L.offsetWidth, L.offsetHeight); J.restore(); if (K.strokeWidth) { J.save(); J.translate(M, M); I(J, K); J.strokeStyle = K.strokeColor; J.lineWidth = K.strokeWidth; J.stroke(); J.restore(); } J.restore(); }, draw: function (L, K) { var J = G(L); H(J, K); I(J, K); J.fillStyle = K.fillColor; J.fill(); if (K.strokeWidth) { J.strokeStyle = K.strokeColor; J.lineWidth = K.strokeWidth; J.stroke(); } J.restore(); } }; } function B() { var L = 10; var K = 0; function J(M) { var N = []; M.traverse(function (O) { var P = O.clone(); if (N.length) { N[N.length - 1].next(P); P.prev(N[N.length - 1]); } P.walkOnCoords(function (Q) { this[Q] = Math.round(this[Q] * L); }); N.push(P); }, M.getPaths()); return N; } if (!document.namespaces["v"]) { document.namespaces.add("v", "urn:schemas-microsoft-com:vml"); var I = document.createStyleSheet(); I.cssText = "v\\:* {behavior:url(#default#VML);display:block;}"; } function H(M) { var N = []; M.traverse(function (O) { N.push(O.drawVML()); }, J(M)); N.push("x e"); return N.join(" "); } function G(P) { var M; if (P.className.indexOf("ictinus-init") != -1) { if (P.nodeName == "IMG" && C(P.previousSibling, "ictinus")) { M = P.previousSibling; } else { if (P.getElementsByTagName("div").length) { var O = P.getElementsByTagName("div"); for (var N = 0; N < O.length; N++) { if (C(O[N], "ictinus")) { M = O[N]; break; } } } } } if (!M) { M = document.createElement("div"); M.style.width = P.offsetWidth + "px"; M.style.height = P.offsetHeight + "px"; M.className = "ictinus"; if (P.tagName == "IMG") { P.parentNode.insertBefore(M, P); } else { P.appendChild(M); } P.className = (P.className ? P.className + " " : "") + "ictinus-init"; } return M; } return { decorate: function (N, M) { var Q; this.draw(N, M); var P = M._cache.shape_elem; var O = Boolean(M._cache.fill_elem); if (O) { Q = M._cache.fill_elem; } else { Q = document.createElement("v:fill"); Q.type = "tile"; P.appendChild(Q); M._cache.fill_elem = Q; } Q.origin = ((P.offsetLeft + K - M.paddingLeft) / N.offsetWidth) + " " + ((P.offsetTop + K - M.paddingTop) / N.offsetHeight); Q.size = N.width + "px," + N.height + "px"; Q.src = N.src; }, draw: function (S, O) { var R; var N; var Q = Boolean(O._cache.shape_elem); if (Q) { R = O._cache.shape_elem; } else { R = document.createElement("v:shape"); N = G(S); O._cache.shape_elem = R; } if (!O.strokeWidth) { R.stroked = false; } else { R.strokeweight = O.strokeWidth; R.strokecolor = O.strokeColor; } R.fillcolor = O.fillColor; var M = O.width() + O.paddingLeft + O.paddingRight; var P = O.height() + O.paddingTop + O.paddingBottom; R.style.width = M + "px"; R.style.height = P + "px"; R.coordorigin = (-O.paddingLeft * L) + " " + (-O.paddingTop * L); R.coordsize = (M * L + K) + " " + (P * L + K); R.path = H(O); if (!Q) { N.appendChild(R); } } }; } var A = E ? B() : F(); return { decorate: function (H, G) { A.decorate(H, G); }, draw: function (H, G) { A.draw(H, G); } }; })(); ictinus.drawItems = (function () {
    function E(K, M) { var L = function () { }; L.prototype = M.prototype; K.prototype = new L(); K.prototype.constructor = K; K.baseConstructor = M; K.superClass = M.prototype; } function F(K) { return Math.round(K * 1000) / 1000; } function J(N, K, O, M) { K = (typeof (K) == "string") ? K.split(",") : K; O = (typeof (O) == "string") ? O.split(",") : O; for (var L = 0; L < K.length; L++) { M.call(N, K[L], "x"); } for (var L = 0; L < O.length; L++) { M.call(N, O[L], "y"); } } function H(M, L) { if (M && L) { for (var K in L) { M[K] = L[K]; } } } var I = { no_prev: "Этот элемент рисования не может быть первым в списке" }; function D(K) { throw new Error(I[K]); } function B() { this._next = null; this._prev = null; } B.prototype = { toString: function () { return ""; }, getBounds: function () { return { minX: 0, minY: 0, maxX: 0, maxY: 0 }; }, next: function (K) { if (arguments.length) { this._next = K; } return this._next || null; }, prev: function (K) { if (arguments.length) { this._prev = K; } return this._prev || null; }, clone: function () { return new this.constructor(); }, typeOf: function (K) {
        switch (K) { case "move": return this.constructor == G; case "line": return this.constructor == C; case "bezier": return this.constructor == A; } return false;
    }, walkOnCoords: function () { }, drawCanvas: function (K) { }, drawVML: function () { return this.toString().toLowerCase(); } 
    }; function G(K, L) { G.baseConstructor.call(this); this.x = K; this.y = L; } E(G, B); H(G.prototype, { clone: function () { return new this.constructor(this.x, this.y); }, walkOnCoords: function (K) { J(this, "x", "y", K); }, drawCanvas: function (K) { K.moveTo(this.x, this.y); } }); G.prototype.toString = function () { return "M" + F(this.x) + "," + F(this.y); }; function C(K, L) { C.baseConstructor.call(this); this.x = K; this.y = L; } E(C, G); H(C.prototype, { getBounds: function () { if (!this.prev()) { D(I.no_prev); } return { minX: Math.min(this.prev().x, this.x), minY: Math.min(this.prev().y, this.y), maxX: Math.max(this.prev().x, this.x), maxY: Math.max(this.prev().y, this.y) }; }, drawCanvas: function (K) { K.lineTo(this.x, this.y); } }); C.prototype.toString = function () { return "L" + F(this.x) + "," + F(this.y); }; function A(K, Q, N, P, M, O, L) { A.baseConstructor.call(this); this.x = K; this.y = Q; this.cpx1 = N; this.cpy1 = P; this.cpx2 = M; this.cpy2 = O; this.locked = L || false; } E(A, B); H(A.prototype, { clone: function () { return new this.constructor(this.x, this.y, this.cpx1, this.cpy1, this.cpx2, this.cpy2, this.locked); }, walkOnCoords: function (K) { J(this, "x,cpx1,cpx2", "y,cpy1,cpy2", K); }, getBounds: function () { function M(O, P) { this.x = O; this.y = P; } var K = []; function L(P, O, S) { var Q = O * O - 4 * P * S; if (P == 0) { K.push(-S / O); return; } if (Q == 0) { K.push(-O / (2 * P)); } else { if (Q > 0) { var R = Math.sqrt(O * O - 4 * P * S); if ((-O + R) / (2 * P) < 1 && (-O + R) / (2 * P) > 0) { K.push((-O + R) / (2 * P)); } if ((-O - R) / (2 * P) < 1 && (-O - R) / (2 * P) > 0) { K.push((-O - R) / (2 * P)); } } } } function N(S, R, Q, P, O) { return Math.pow(1 - O, 3) * S + 3 * O * Math.pow(1 - O, 2) * R + 3 * O * O * (1 - O) * Q + O * O * O * P; } return function () { if (!this.prev()) { D(I.no_prev); } var W = new M(this.prev().x, this.prev().y); var U = new M(this.cpx1, this.cpy1); var S = new M(this.cpx2, this.cpy2); var R = new M(this.x, this.y); K = []; K.push(0); K.push(1); L(-3 * W.x + 9 * U.x - 9 * S.x + 3 * R.x, 6 * W.x - 12 * U.x + 6 * S.x, -3 * W.x + 3 * U.x); L(-3 * W.y + 9 * U.y - 9 * S.y + 3 * R.y, 6 * W.y - 12 * U.y + 6 * S.y, -3 * W.y + 3 * U.y); var Q = -1, P = -1, V = 1000, T = 1000; for (var O = 0; O < K.length; O++) { var X; if (V > (X = N(W.x, U.x, S.x, R.x, K[O]))) { V = X; } if (T > (X = N(W.y, U.y, S.y, R.y, K[O]))) { T = X; } if (Q < (X = N(W.x, U.x, S.x, R.x, K[O]))) { Q = X; } if (P < (X = N(W.y, U.y, S.y, R.y, K[O]))) { P = X; } } return { minX: V, minY: T, maxX: Q, maxY: P }; }; } (), drawCanvas: function (K) { K.bezierCurveTo(this.cpx1, this.cpy1, this.cpx2, this.cpy2, this.x, this.y); }, drawVML: function () { return this.toString().toLowerCase().replace("o", "c"); } }); A.prototype.toString = function () { return (this.locked ? "O" : "C") + F(this.cpx1) + "," + F(this.cpy1) + "," + F(this.cpx2) + "," + F(this.cpy2) + "," + F(this.x) + "," + F(this.y); }; return { Item: B, MoveTo: G, LineTo: C, BezierTo: A };
})(); ictinus.Shape = function (A) { this._cache = {}; this._session = {}; if (typeof (A) == "string") { A = ictinus.Shape.pathData.parse(A); } this.paths = A || []; this.strokeWidth = 0; this.strokeColor = "#000000"; this.fillColor = ""; this.scaleGrid = { x1: 0, x2: 0, y1: 0, y2: 0 }; this.paddingLeft = 0; this.paddingRight = 0; this.paddingTop = 0; this.paddingBottom = 0; this.contentBox = { x: 0, y: 0, width: 0, height: 0 }; this._scaleX = 1; this._scaleY = 1; }; ictinus.Shape.calculateTangentPoint = function (F, E, I, G, D, C) { var J = Math.atan2(E - C, F - D); var H = (J + Math.PI) % (Math.PI * 2); var A = I - D; var K = G - C; var B = Math.sqrt(A * A + K * K); return { x: Math.cos(H) * B + D, y: Math.sin(H) * B + C }; }; ictinus.Shape.fromJSON = function (G) { function F(H) { return (H || "").replace(/^\s+|\s+$/g, "").replace(/\s+/, " ").split(" "); } var B = new ictinus.Shape(G.paths); B.scaleX(G.scaleX); B.scaleY(G.scaleY); var E = "strokeWidth,strokeColor,fillColor".split(","); for (var C = 0; C < E.length; C++) { if (G.hasOwnProperty(E[C])) { B[E[C]] = G[E[C]]; } } B.padding(G.padding); var D = F(G.scaleGrid); if (D.length == 4) { B.scaleGrid.x1 = D[0]; B.scaleGrid.x2 = D[1]; B.scaleGrid.y1 = D[2]; B.scaleGrid.y2 = D[3]; } var A = F(G.contentBox); if (A.length == 4) { B.contentBox.x = A[0]; B.contentBox.y = A[1]; B.contentBox.width = A[2]; B.contentBox.height = A[3]; } return B; }; ictinus.Shape.prototype = { fixTangents: function (E) { if (!E) { throw new Error("No paths specified"); } var D, C, A, B; this.traverse(function (F) { if (!F.prev()) { D = F; } else { if (!F.next()) { C = F; } } }, this.paths); this.traverse(function (G, H) { if (!G.prev()) { A = G; } else { if (!G.next()) { B = G; } } if (G.typeOf("bezier") && G.locked && G.prev().typeOf("bezier")) { var I = G.prev(); var F = ictinus.Shape.calculateTangentPoint(I.cpx2, I.cpy2, G.cpx1, G.cpy1, I.x, I.y); G.cpx1 = F.x; G.cpy1 = F.y; } }, E); if (D.x == C.x && D.y == C.y) { B.x = A.x; B.y = A.y; } return E; }, traverse: function (E, F, D) { F = F || this.getPaths(); if (D) { var A = F.slice(0).sort(D); for (var C = 0; C < A.length; C++) { E(A[C], C); } } else { for (var C = 0; C < F.length; C++) { if (F[C] instanceof ictinus.drawItems.MoveTo) { var G = F[C]; var B = 0; do { E(G, B++); } while (G = G.next()); break; } } } }, getPaths: function (K) {
    if (this._session.paths && !K) { return this.fixTangents(this._session.paths); } var L = []; var F = { x: ["x", "cpx", "cpx1", "cpx2"], y: ["y", "cpy", "cpy1", "cpy2"] }; function D(Q, O, N) { for (var M = 0; M < F[N].length; M++) { var P = F[N][M]; if (Q.hasOwnProperty(P)) { Q[P] = O(Q[P]); } } } var I = this.scaleX(); var G = this.scaleY(); var B = this.getBounds(true); var C = (B.maxX - B.minX) * (I - 1); var E = (B.maxY - B.minY) * (G - 1); var H = { moveX: function (M) { return M + C; }, moveY: function (M) { return M + E; }, scaleX: function (M) { return M * I; }, scaleY: function (M) {
        return M * G;
    } 
    }; if (!this.isEmptyGrid()) { var A = this.scaleGrid; function J(M, P) { var O, N; if (M <= A.x1) { N = 1; } else { if (M >= A.x2) { N = 3; } else { N = 2; } } if (P <= A.y1) { O = 10; } else { if (P >= A.y2) { O = 30; } else { O = 20; } } return O + N; } this.traverse(function (Q) { var R = Q.clone(); if (L.length) { R.prev(L[L.length - 1]); L[L.length - 1].next(R); } var M; for (var O = 0; O < F.x.length; O++) { var P = F.x[O], N = F.y[O]; if (R.hasOwnProperty(P) && R.hasOwnProperty(N)) { switch (J(R[P], R[N])) { case 12: R[P] = H.scaleX(R[P]); break; case 13: R[P] = H.moveX(R[P]); break; case 21: R[N] = H.scaleY(R[N]); break; case 22: R[P] = H.scaleX(R[P]); R[N] = H.scaleY(R[N]); break; case 23: R[P] = H.moveX(R[P]); R[N] = H.scaleY(R[N]); break; case 31: R[N] = H.moveY(R[N]); break; case 32: R[P] = H.scaleX(R[P]); R[N] = H.moveY(R[N]); break; case 33: R[P] = H.moveX(R[P]); R[N] = H.moveY(R[N]); break; } } } L.push(R); }, this.paths); } else { this.traverse(function (M) { var N = M.clone(); if (L.length) { N.prev(L[L.length - 1]); L[L.length - 1].next(N); } D(N, H.scaleX, "x"); D(N, H.scaleY, "y"); L.push(N); }, this.paths); } return this.fixTangents(L);
}, scaleX: function (A) { if (arguments.length) { this._scaleX = parseFloat(A, 10); } return this._scaleX; }, scaleY: function (A) { if (arguments.length) { this._scaleY = parseFloat(A, 10); } return this._scaleY; }, width: function (C) { var B = this.getBounds(true); var A = B.maxX - B.minX; if (arguments.length) { this.scaleX(parseFloat(C, 10) / A); } return A * this.scaleX(); }, height: function (C) { var B = this.getBounds(true); var A = B.maxY - B.minY; if (arguments.length) { this.scaleY(parseFloat(C, 10) / A); } return A * this.scaleY(); }, setScaleGrid: function (B, A, D, C) { this.scaleGrid.x1 = Math.min(B, A); this.scaleGrid.x2 = Math.max(B, A); this.scaleGrid.y1 = Math.min(D, C); this.scaleGrid.y2 = Math.max(D, C); }, isEmptyGrid: function () { var A = this.scaleGrid; return (!A.x1 && !A.x2 && !A.y1 && !A.y2); }, draw: function (A, B) { this._session.paths = B; ictinus.draw(A, this); delete this._session.paths; }, decorate: function (A, B) { this._session.paths = B; ictinus.decorate(A, this); delete this._session.paths; }, padding: function (A) { if (typeof (A) == "number") { this.paddingLeft = this.paddingRight = this.paddingTop = this.paddingBottom = A; } else { if (typeof (A) == "string") { A = A.split(/\s+/); var B = function (C) { return parseInt(C, 10); }; switch (A.length) { case 1: this.paddingLeft = this.paddingRight = this.paddingTop = this.paddingBottom = B(A[0]); break; case 2: this.paddingTop = this.paddingBottom = B(A[0]); this.paddingLeft = this.paddingRight = B(A[1]); break; case 3: this.paddingTop = B(A[0]); this.paddingLeft = this.paddingRight = B(A[1]); this.paddingBottom = B(A[2]); break; case 4: this.paddingTop = B(A[0]); this.paddingRight = B(A[1]); this.paddingBottom = B(A[2]); this.paddingLeft = B(A[3]); break; } } } }, updateSizeBy: function (A) { if (this.contentBox.width && this.contentBox.height) { this.scaleX(A.offsetWidth / this.contentBox.width); this.scaleY(A.offsetHeight / this.contentBox.height); } else { this.width(A.offsetWidth); this.height(A.offsetHeight); } }, getBounds: function (B) { var A = { minX: 0, minY: 0, maxX: 0, maxY: 0 }; this.traverse(function (D) { var C = D.getBounds(); A.minX = Math.min(A.minX, C.minX); A.minY = Math.min(A.minY, C.minY); A.maxX = Math.max(A.maxX, C.maxX); A.maxY = Math.max(A.maxY, C.maxY); }, (B) ? this.paths : null); return A; }, toJSON: function () { function D() { return Array.prototype.join.call(arguments, " "); } var A = {}; var C = "strokeWidth,strokeColor,fillColor".split(","); for (var B = 0; B < C.length; B++) { A[C[B]] = this[C[B]]; } A.scaleX = this.scaleX(); A.scaleY = this.scaleY(); A.padding = D(this.paddingTop, this.paddingRight, this.paddingBottom, this.paddingLeft); A.contentBox = D(this.contentBox.x, this.contentBox.y, this.contentBox.width, this.contentBox.height); A.scaleGrid = D(this.scaleGrid.x1, this.scaleGrid.y1, this.scaleGrid.x2, this.scaleGrid.y2); var E = []; for (var B = 0; B < this.paths.length; B++) { E.push(this.paths[B].toString()); } A.paths = E.join(""); return A; } 
}; ictinus.Shape.pathData = (function () {
    function A(E) { return (E || "").replace(/^\s+|\s+$/g, ""); } function C(E, F) { this.x = E; this.y = F; } function B(J, L, I, H, G, K) { var F = J + 2 / 3 * (I - J); var E = L + 2 / 3 * (H - L); return { cp1x: F, cp1y: E, cp2x: F + (G - J) / 3, cp2y: E + (K - L) / 3, x: G, y: K }; } var D = (function () {
        var R = 0, P = 0; var L; var I = []; var T = null; function H(V) { if (T) { T.next(V); } V.prev(T); I.push(V); T = V; } function S(Y, W, Z) { W = E(W, 2); for (var X = 0; X < W.length; X++) { var V = W[X]; if (Y == "M" || Z == 0) { R = V[0]; P = V[1]; } else { R += V[0]; P += V[1]; } if (X == 0) { H(new ictinus.drawItems.MoveTo(R, P)); } else { H(new ictinus.drawItems.LineTo(R, P)); } } } function G() { } function F(Y, W, Z) { W = E(W, 2); for (var X = 0; X < W.length; X++) { var V = W[X]; switch (Y) { case "L": R = V[0]; P = V[1]; break; case "l": R += V[0]; P += V[1]; break; } H(new ictinus.drawItems.LineTo(R, P)); } } function N(Y, W, Z) { W = E(W, 1); for (var X = 0; X < W.length; X++) { var V = W[X]; switch (Y) { case "H": R = V[0]; break; case "h": R += V[0]; break; case "V": P = V[0]; break; case "v": P += V[0]; break; } H(new ictinus.drawItems.LineTo(R, P)); } } function O(Z, X, a) { X = E(X, 6); for (var Y = 0; Y < X.length; Y++) { var V = X[Y]; var W = (Z.toLowerCase() == "o"); switch (Z) { case "C": case "O": H(new ictinus.drawItems.BezierTo(V[4], V[5], V[0], V[1], V[2], V[3], W)); L = new C(V[2], V[3]); R = V[4]; P = V[5]; break; case "c": case "o": H(new ictinus.drawItems.BezierTo(R + V[4], P + V[5], R + V[0], P + V[1], R + V[2], P + V[3], W)); L = new C(R + V[2], P + V[3]); R += V[4]; P += V[5]; break; } } } function U(a, X, b) {
            X = E(X, 4); for (var Y = 0;
Y < X.length; Y++) { var V = X[Y]; var Z = ictinus.Shape.calculateTangentPoint(L.x, L.y, L.x, L.y, R, P); var W = true; switch (a) { case "S": H(new ictinus.drawItems.BezierTo(V[2], V[3], Z.x, Z.y, V[0], V[1], W)); L = new C(V[0], V[1]); R = V[2]; P = V[3]; break; case "s": H(new ictinus.drawItems.BezierTo(R + V[2], P + V[3], Z.x, Z.y, R + V[0], P + V[1], W)); L = new C(R + V[0], P + V[1]); R += V[2]; P += V[3]; break; } } 
        } function Q(Z, X, a) { X = E(X, 4); for (var Y = 0; Y < X.length; Y++) { var V = X[Y]; var W; switch (Z) { case "Q": W = B(R, P, V[0], V[1], V[2], V[3]); L = new C(V[0], V[1]); break; case "q": W = B(R, P, R + V[0], P + V[1], R + V[2], P + V[3]); L = new C(R + V[0], P + V[1]); break; } H(new ictinus.drawItems.BezierTo(W.x, W.y, W.cp1x, W.cp1y, W.cp2x, W.cp2y, false)); R = W.x; P = W.y; } } function J(a, X, b) { X = E(X, 2); for (var Y = 0; Y < X.length; Y++) { var V = X[Y]; var Z = M(L, new C(R, P)); var W; switch (a) { case "T": W = B(R, P, Z.x, Z.y, V[0], V[1]); break; case "t": W = B(R, P, Z.x, Z.y, R + V[0], P + V[1]); break; } H(new ictinus.drawItems.BezierTo(W.x, W.y, W.cp1x, W.cp1y, W.cp2x, W.cp2y, false)); L = Z; R = V[0]; P = V[1]; } } function M(d, X) { var W = Math.atan2(d.y - X.y, d.x - X.x); var V = (W + Math.PI) % (Math.PI * 2); var c = d.x - X.x; var Z = d.y - X.y; var Y = Math.sqrt(c * c + Z * Z); return new C(Math.cos(V) * Y + X.x, Math.sin(V) * Y + X.y); } function E(X, b) { if (typeof X != "string") { return X; } var a = /(\-?\d+(?:\.\d+)?)/g; var Z, W = []; X = A(X); while ((Z = a.exec(X))) { W.push(Z[1]); } for (var Y = 0; Y < W.length; Y++) { W[Y] = parseFloat(W[Y], 10); } var V = []; b = b || 1; for (var Y = 0; Y < W.length; Y += b) { V.push(W.slice(Y, Y + b)); } return V; } var K = { m: S, z: G, l: F, h: N, v: N, c: O, o: O, s: U, q: Q, t: J }; return function (W) { R = P = 0; T = L = null; I = []; for (var V = 0; V < W.length; V++) { var X = W[V]; K[X.command.toLowerCase()](X.command, X.args, V); } return I; };
    })(); return { parse: function (J) { var L = A(J); L = L.replace(/\n|\r/g, " "); var F = [], G = /([a-z])/ig, I = 0, E, H = null; function K(N, M) { F.push({ command: N, args: A(M) }); } while ((E = G.exec(L))) { if (H !== null) { K(H, L.substring(I, G.lastIndex - H.length)); } H = E[0]; I = G.lastIndex; } K(H, L.substring(I)); return D(F); } };
})(); ictinus.svgimport = function () { return { read: function (D) { var B = D.getElementsByTagName("path"); var E = parseInt(D.documentElement.getAttribute("width"), 10); var A = parseInt(D.documentElement.getAttribute("height"), 10); var F = B[0]; var C = new ictinus.Shape(F.getAttribute("d"), E, A); C.fillColor = F.getAttribute("fill"); C.strokeColor = F.getAttribute("stroke"); C.strokeWidth = parseFloat(F.getAttribute("stroke-width"), 10); return C; } }; } (); ictinus.roundCorners = (function () { var D = {}; var F = "m 0, %rd " + "c 0, -%r2, %r2, -%rd, %rd, -%rd " + "l %w, 0 " + "c %r2, 0, %rd, %r2, %rd, %rd " + "l 0, %h " + "c 0, %r2, -%r2, %rd, -%rd, %rd " + "l -%w, 0 " + "c -%r2, 0, -%rd, -%r2, -%rd, -%rd "; var E = 100, B = 100; function C(G) { if (!D[G]) { var J = { rd: G, r2: G / 2, w: E - 2 * G, h: B - 2 * G }; var H = F.replace(/(%(\w{1,2}))/g, function (M, L, K) { return J[K]; }); var I = new ictinus.Shape(H); I.scaleGrid = { x1: G, y1: G, x2: E - G, y2: B - G }; D[G] = I; } return D[G]; } function A(I, G, K) { K = K || A.DRAW_PARAMS; var H = C(G || A.RADIUS); H.updateSizeBy(I); for (var J in K) { if (H.hasOwnProperty(J)) { H[J] = K[J]; } } H.decorate(I); return H; } A.RADIUS = 10; A.DRAW_PARAMS = { strokeWidth: 0 }; return A; })();
