}elseif(t&&t.getPath&&t.getPath()===this)returnt;returnnull},getOffsetsWithTangent:function(){vart=f.read(arguments);if(t.isZero())return[];for(vare=[],i=0,n=this.getCurves(),r=0,s=n.length;r<s;r++){for(vara=n[r],o=a.getTimesWithTangent(t),h=0,u=o.length;h<u;h++){varl=i+a.getOffsetAtTime(o[h]);e.indexOf(l)<0&&e.push(l)}i+=a.length}returne}}),newfunction(){functiont(t,e,i,n,r){functions(e){vari=u[e],n=u[e+1];a==i&&o==n||(t.beginPath(),t.moveTo(a,o),t.lineTo(i,n),t.moveTo(i-h,n),t.lineTo(i,n+h),t.lineTo(i+h,n),t.lineTo(i,n-h),t.closePath(),t.stroke())}if(!(n<=0))for(vara,o,h=n/2,u=newArray(6),l=0,c=e.length;l<c;l++){varf=e[l],d=f._selection;f._transformCoordinates(i,u),a=u[0],o=u[1],2&d&&!r&&s(2),4&d&&!r&&s(4),t.beginPath(),t.arc(a,o,h,0,2*Math.PI,!0),t.stroke();var_=t.fillStyle;1&d||(t.fillStyle="rgba(255, 255, 255, 0.5)"),t.fill(),t.fillStyle=_}}functione(t,e,i){functionn(e){if(i)e._transformCoordinates(i,_),r=_[0],s=_[1];else{varn=e._point;r=n._x,s=n._y}if(g)t.moveTo(r,s),g=!1;else{if(i)h=_[2],u=_[3];else{varf=e._handleIn;h=r+f._x,u=s+f._y}h===r&&u===s&&l===a&&c===o?t.lineTo(r,s):t.bezierCurveTo(l,c,h,u,r,s)}if(a=r,o=s,i)l=_[4],c=_[5];else{varf=e._handleOut;l=a+f._x,c=o+f._y}}for(varr,s,a,o,h,u,l,c,f=e._segments,d=f.length,_=newArray(6),g=!0,v=0;v<d;v++)n(f[v]);e._closed&&d>0&&n(f[0])}return{_draw:function(t,i,n,r){functions(t){returnc[(t%f+f)%f]}vara=i.dontStart,o=i.dontFinish||i.clip,h=this.getStyle(),u=h.hasFill(),l=h.hasStroke(),c=h.getDashArray(),f=!st.support.nativeDash&&l&&c&&c.length;if(a||t.beginPath(),(u||l&&!f||o)&&(e(t,this,r),this._closed&&t.closePath()),!o&&(u||l)&&(this._setStyles(t,i,n,r),u&&(t.fill(h.getFillRule()),t.shadowColor="rgba(0,0,0,0)"),l)){if(f){a||t.beginPath();vard,_=newE(this,.25,32,(!1),r),g=_.length,v=-h.getDashOffset(),p=0;for(v%=g;v>0;)v-=s(p--)+s(p--);for(;v<g;)d=v+s(p++),(v>0||d>0)&&_.drawPart(t,Math.max(v,0),Math.max(d,0)),v=d+s(p++)}t.stroke()}},_drawSelected:function(i,n){i.beginPath(),e(i,this,n),i.stroke(),t(i,this._segments,n,st.settings.handleSize,this.isFullySelected())}}},newfunction(){functiont(t){vare=t._segments;if(!e.length)thrownewError("Use a moveTo() command first");returne[e.length-1]}return{moveTo:function(){vart=this._segments;1===t.length&&this.removeSegment(0),t.length||this._add([newz(f.read(arguments))])},moveBy:function(){thrownewError("moveBy() is unsupported on Path items.")},lineTo:function(){this._add([newz(f.read(arguments))])},cubicCurveTo:function(){vare=arguments,i=f.read(e),n=f.read(e),r=f.read(e),s=t(this);s.setHandleOut(i.subtract(s._point)),this._add([newz(r,n.subtract(r))])},quadraticCurveTo:function(){vare=arguments,i=f.read(e),n=f.read(e),r=t(this)._point;this.cubicCurveTo(i.add(r.subtract(i).multiply(1/3)),i.add(n.subtract(i).multiply(1/3)),n)},curveTo:function(){vare=arguments,i=f.read(e),n=f.read(e),s=r.pick(r.read(e),.5),a=1-s,o=t(this)._point,h=i.subtract(o.multiply(a*a)).subtract(n.multiply(s*s)).divide(2*s*a);if(h.isNaN())thrownewError("Cannot put a curve through points with parameter = "+s);this.quadraticCurveTo(h,n)},arcTo:function(){vare,i,n,s,a,o=arguments,h=Math.abs,u=Math.sqrt,c=t(this),d=c._point,g=f.read(o),v=r.peek(o),p=r.pick(v,!0);if("boolean"==typeofp)varw=d.add(g).divide(2),e=w.add(w.subtract(d).rotate(p?-90:90));elseif(r.remain(o)<=2)e=g,g=f.read(o);elseif(!d.equals(g)){varx=_.read(o),b=l.isZero;if(b(x.width)||b(x.height))returnthis.lineTo(g);varC=r.read(o),p=!!r.read(o),S=!!r.read(o),w=d.add(g).divide(2),P=d.subtract(w).rotate(-C),I=P.x,M=P.y,T=h(x.width),O=h(x.height),k=T*T,A=O*O,L=I*I,N=M*M,B=u(L/k+N/A);if(B>1&&(T*=B,O*=B,k=T*T,A=O*O),B=(k*A-k*N-A*L)/(k*N+A*L),h(B)<1e-12&&(B=0),B<0)thrownewError("Cannot create an arc with the given arguments");i=newf(T*M/O,-O*I/T).multiply((S===p?-1:1)*u(B)).rotate(C).add(w),a=(newm).translate(i).rotate(C).scale(T,O),s=a._inverseTransform(d),n=s.getDirectedAngle(a._inverseTransform(g)),!p&&n>0?n-=360:p&&n<0&&(n+=360)}if(e){varE=newy(d.add(e).divide(2),e.subtract(d).rotate(90),(!0)),F=newy(e.add(g).divide(2),g.subtract(e).rotate(9
this._setProperty(o,h)}elses=h&&h.clone?h.clone():h;i[a]=s}returni},_resolveValue:function(t,e){if(e){if(Array.isArray(e)&&2===e.length){vari=e[0];returni&&i.match&&i.match(/^[+\-\*\/]=/)?this._calculate(t,i[0],e[1]):e}if("string"==typeofe){varn=e.match(/^[+\-*\/]=(.*)/);if(n){varr=JSON.parse(n[1].replace(/(['"])?([a-zA-Z0-9_]+)(['"])?:/g,'"$2": '));returnthis._calculate(t,e[0],r)}}}returne},_calculate:function(t,e,i){returnst.PaperScript.calculateBinary(t,e,i)},_parseKeys:function(t){for(vare={},i=0,n=t.length;i<n;i++){varr=t[i],s=r.replace(/\.([^.]*)/g,"/$1").replace(/\[['"]?([^'"\]]*)['"]?\]/g,"/$1");e[r]=s.split("/")}returne},_getProperty:function(t,e){for(vari=this.object,n=0,r=t.length-(e||0);n<r&&i;n++)i=i[t[n]];returni},_setProperty:function(t,e){vari=this._getProperty(t,1);i&&(i[t[t.length-1]]=e)}})),tt={request:function(e){vari=newt.XMLHttpRequest;returni.open((e.method||"get").toUpperCase(),e.url,r.pick(e.async,!0)),e.mimeType&&i.overrideMimeType(e.mimeType),i.onload=function(){vart=i.status;0===t||200===t?e.onLoad&&e.onLoad.call(i,i.responseText):i.onerror()},i.onerror=function(){vart=i.status,n='Could not load "'+e.url+'" (Status: '+t+")";if(!e.onError)thrownewError(n);e.onError(n,t)},i.send(null)}},et={canvases:[],getCanvas:function(t,e){if(!i)returnnull;varr,s=!0;"object"==typeoft&&(e=t.height,t=t.width),this.canvases.length?r=this.canvases.pop():(r=n.createElement("canvas"),s=!1);vara=r.getContext("2d");if(!a)thrownewError("Canvas "+r+" is unable to provide a 2D context.");returnr.width===t&&r.height===e?s&&a.clearRect(0,0,t+1,e+1):(r.width=t,r.height=e),a.save(),r},getContext:function(t,e){vari=this.getCanvas(t,e);returni?i.getContext("2d"):null},release:function(t){vare=t&&t.canvas?t.canvas:t;e&&e.getContext&&(e.getContext("2d").restore(),this.canvases.push(e))}},it=newfunction(){functiont(t,e,i){return.2989*t+.587*e+.114*i}functione(e,i,n,r){vars=r-t(e,i,n);d=e+s,_=i+s,g=n+s;varr=t(d,_,g),a=v(d,_,g),o=p(d,_,g);if(a<0){varh=r-a;d=r+(d-r)*r/h,_=r+(_-r)*r/h,g=r+(g-r)*r/h}if(o>255){varu=255-r,l=o-r;d=r+(d-r)*u/l,_=r+(_-r)*u/l,g=r+(g-r)*u/l}}functioni(t,e,i){returnp(t,e,i)-v(t,e,i)}functionn(t,e,i,n){varr,s=[t,e,i],a=p(t,e,i),o=v(t,e,i);o=o===t?0:o===e?1:2,a=a===t?0:a===e?1:2,r=0===v(o,a)?1===p(o,a)?2:1:0,s[a]>s[o]?(s[r]=(s[r]-s[o])*n/(s[a]-s[o]),s[a]=n):s[r]=s[a]=0,s[o]=0,d=s[0],_=s[1],g=s[2]}vars,a,o,h,u,l,c,f,d,_,g,v=Math.min,p=Math.max,m=Math.abs,y={multiply:function(){d=u*s/255,_=l*a/255,g=c*o/255},screen:function(){d=u+s-u*s/255,_=l+a-l*a/255,g=c+o-c*o/255},overlay:function(){d=u<128?2*u*s/255:255-2*(255-u)*(255-s)/255,_=l<128?2*l*a/255:255-2*(255-l)*(255-a)/255,g=c<128?2*c*o/255:255-2*(255-c)*(255-o)/255},"soft-light":function(){vart=s*u/255;d=t+u*(255-(255-u)*(255-s)/255-t)/255,t=a*l/255,_=t+l*(255-(255-l)*(255-a)/255-t)/255,t=o*c/255,g=t+c*(255-(255-c)*(255-o)/255-t)/255},"hard-light":function(){d=s<128?2*s*u/255:255-2*(255-s)*(255-u)/255,_=a<128?2*a*l/255:255-2*(255-a)*(255-l)/255,g=o<128?2*o*c/255:255-2*(255-o)*(255-c)/255},"color-dodge":function(){d=0===u?0:255===s?255:v(255,255*u/(255-s)),_=0===l?0:255===a?255:v(255,255*l/(255-a)),g=0===c?0:255===o?255:v(255,255*c/(255-o))},"color-burn":function(){d=255===u?255:0===s?0:p(0,255-255*(255-u)/s),_=255===l?255:0===a?0:p(0,255-255*(255-l)/a),g=255===c?255:0===o?0:p(0,255-255*(255-c)/o)},darken:function(){d=u<s?u:s,_=l<a?l:a,g=c<o?c:o},lighten:function(){d=u>s?u:s,_=l>a?l:a,g=c>o?c:o},difference:function(){d=u-s,d<0&&(d=-d),_=l-a,_<0&&(_=-_),g=c-o,g<0&&(g=-g)},exclusion:function(){d=u+s*(255-u-u)/255,_=l+a*(255-l-l)/255,g=c+o*(255-c-c)/255},hue:function(){n(s,a,o,i(u,l,c)),e(d,_,g,t(u,l,c))},saturation:function(){n(u,l,c,i(s,a,o)),e(d,_,g,t(u,l,c))},luminosity:function(){e(u,l,c,t(s,a,o))},color:function(){e(s,a,o,t(u,l,c))},add:function(){d=v(u+s,255),_=v(l+a,255),g=v(c+o,255)},subtract:function(){d=p(u-s,0),_=p(l-a,0),g=p(c-o,0)},average:function(){d=(u+s)/2,_=(l+a)/2,g=(c+o)/2},negation:function(){d=255-m(255-s-u),_=255-m(255-a-l),g=255-m(255-o-c)}},w=this.nativeModes=r.each(["source-over","source-in",