varSvgCanvas=function(){"use strict";functione(t){return(e="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(e){returntypeofe}:function(e){returne&&"function"==typeofSymbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeofe})(t)}functiont(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}functionr(e,t){for(varr=0;r<t.length;r++){varn=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}functionn(e,t,n){returnt&&r(e.prototype,t),n&&r(e,n),e}functioni(e,t){if("function"!=typeoft&&null!==t)thrownewTypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}functiona(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){returne.__proto__||Object.getPrototypeOf(e)})(e)}functions(e,t){return(s=Object.setPrototypeOf||function(e,t){returne.__proto__=t,e})(e,t)}functiono(e,t){return!t||"object"!=typeoft&&"function"!=typeoft?function(e){if(void0===e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");returne}(e):t}functionu(e,t){returnfunction(e){if(Array.isArray(e))returne}(e)||function(e,t){if(!(Symbol.iteratorinObject(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;varr=[],n=!0,i=!1,a=void0;try{for(vars,o=e[Symbol.iterator]();!(n=(s=o.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==o.return||o.return()}finally{if(i)throwa}}returnr}(e,t)||function(){thrownewTypeError("Invalid attempt to destructure non-iterable instance")}()}functionl(e){returnfunction(e){if(Array.isArray(e)){for(vart=0,r=newArray(e.length);t<e.length;t++)r[t]=e[t];returnr}}(e)||function(e){if(Symbol.iteratorinObject(e)||"[object Arguments]"===Object.prototype.toString.call(e))returnArray.from(e)}(e)||function(){thrownewTypeError("Invalid attempt to spread non-iterable instance")}()}
varc,d={HTML:"http://www.w3.org/1999/xhtml",MATH:"http://www.w3.org/1998/Math/MathML",SE:"http://svg-edit.googlecode.com",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"},m=function(){vare={};returnObject.entries(d).forEach((function(t){varr=u(t,2),n=r[0],i=r[1];e[i]=n.toLowerCase()})),e},f=jQuery,g=(Boolean(document.createElementNS&&document.createElementNS(d.SVG,"svg").createSVGRect),navigator.userAgent),p=document.createElementNS(d.SVG,"svg"),y=Boolean(window.opera),v=g.includes("AppleWebKit"),x=g.includes("Gecko/"),_=g.includes("MSIE"),S=g.includes("Chrome/"),b=(g.includes("Windows"),g.includes("Macintosh"),"ontouchstart"inwindow),w=Boolean(p.querySelector),A=Boolean(document.evaluate),k=function(){vare=document.createElementNS(d.SVG,"path");e.setAttribute("d","M0,0 10,10");vart=e.pathSegList,r=e.createSVGPathSegLinetoAbs(5,5);try{returnt.replaceItem(r,1),!0}catch(e){}return!1}(),C=function(){vare=document.createElementNS(d.SVG,"path");e.setAttribute("d","M0,0 10,10");vart=e.pathSegList,r=e.createSVGPathSegLinetoAbs(5,5);try{returnt.insertItemBefore(r,1),!0}catch(e){}return!1}(),E=function(){vare=document.createElementNS(d.SVG,"svg"),t=document.createElementNS(d.SVG,"svg");document.documentElement.append(e),t.setAttribute("x",5),e.append(t);varr=document.createElementNS(d.SVG,"text");r.textContent="a",t.append(r);try{return0===r.getStartPositionOfChar(0).x}catch(e){return!1}finally{e.remove()}}(),P=function(){vare=document.createElementNS(d.SVG,"svg");document.documentElement.append(e);vart=document.createElementNS(d.SVG,"path");t.setAttribute("d","M0,0 C0,0 10,10 10,0"),e.append(t);varr=t.getBBox();returne.remove(),r.height>4&&r.height<5}(),G=function(){vare=document.createElementNS(d.SVG,"svg");document.documentElement.append(e);vart=document.createElementNS(d.SVG,"path");t.setAttribute("d","M0,0 10,0");varr=document.createElementNS(d.SVG,"path");r.setAttribute("d","M5,0 15,0");varn=document.createElementNS(d.SVG,"g");n.append(t,r),e.append(n);vari=n.getBBox();returne.remove(),15===i.width}(),N=(function(){vare=document.createElementNS(d.SVG,"rect");e.setAttribute("x",.1);vart=!e.cloneNode(!1).getAttribute("x").includes(",");t||f.alert('NOTE: This version of Opera is known to contain bugs in SVG-edit.\nPlease upgrade to the <a href="http://opera.com">latest version</a> in which the problems have been fixed.')}(),(c=document.createElementNS(d.SVG,"rect")).setAttribute("style","vector-effect:non-scaling-stroke"),"non-scaling-stroke"===c.style.vectorEffect),I=function(){vart=document.createElementNS(d.SVG,"rect").transform.baseVal,r=p.createSVGTransform();t.appendItem(r);varn=t.getItem(0),i=function(t){returnt&&"object"===e(t)&&"function"==typeoft.setMatrix&&"angle"int};returni(n)&&i(r)&&n.type===r.type&&n.angle===r.angle&&n.matrix.a===r.matrix.a&&n.matrix.b===r.matrix.b&&n.matrix.c===r.matrix.c&&n.matrix.d===r.matrix.d&&n.matrix.e===r.matrix.e&&n.matrix.f===r.matrix.f}(),T=function(){returny},L=function(){returnv},V=function(){returnx},O=function(){return_},M=function(){returnS},R=function(){returnG},B=function(){returnN},U=document.createElementNS(d.SVG,"svg");functionH(e){vart=e.matrix,r="";switch(e.type){case1:r="matrix("+[t.a,t.b,t.c,t.d,t.e,t.f].join(",")+")";break;case2:r="translate("+t.e+","+t.f+")";break;case3:r=t.a===t.d?"scale("+t.a+")":"scale("+t.a+","+t.d+")";break;case4:varn=0,i=0;if(0!==e.angle){vara=1-t.a;i=(a*t.f+t.b*t.e)/(a*a+t.b*t.b),n=(t.e-t.b*i)/a}r="rotate("+e.angle+" "+n+","+i+")"}returnr}varj,F={},D=function(){functione(r){t(this,e),this._elem=r||null,this._xforms=[],this._update=function(){for(vare="",t=0;t<this.numberOfItems;++t){e+=H(this._list.getItem(t))+" "}this._elem.setAttribute("transform",e)},this._list=this,this._init=function(){vare=this,t=this._elem.getAttribute("transform");if(t)for(varr=/\s*((scale|matrix|rotate|translate)\s*\(.*?\))\s*,?\s*/,n=!0;n;)n=t.match(r),t=t.replace(r,""),n&&n[1]&&function(){vart=n[1].split(/\s*\(/)