1234 |
- "use strict";(self["webpackChunkscd_tools_ui"]=self["webpackChunkscd_tools_ui"]||[]).push([[290],{4290:function(e,t){
- /*! LeaderLine v1.0.7 (c) anseki https://anseki.github.io/leader-line/ */
- var n=function(){var e,t,n,a,i,o,l,r,s,u,h,p,c,d,f,y,m,S,g,_,v,E,b,x="leader-line",k=1,w=2,O=3,M=4,I={top:k,right:w,bottom:O,left:M},C=1,A=2,L=3,V=4,P=5,N={straight:C,arc:A,fluid:L,magnet:V,grid:P},T="behind",W=x+"-defs",B='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" id="leader-line-defs"><style><![CDATA[.leader-line{position:absolute;overflow:visible!important;pointer-events:none!important;font-size:16px}#leader-line-defs{width:0;height:0;position:absolute;left:0;top:0}.leader-line-line-path{fill:none}.leader-line-mask-bg-rect{fill:white}.leader-line-caps-mask-anchor,.leader-line-caps-mask-marker-shape{fill:black}.leader-line-caps-mask-anchor{stroke:black}.leader-line-caps-mask-line,.leader-line-plugs-face{stroke:rgba(0,0,0,0)}.leader-line-line-mask-shape{stroke:white}.leader-line-line-outline-mask-shape{stroke:black}.leader-line-plug-mask-shape{fill:white;stroke:black}.leader-line-plug-outline-mask-shape{fill:black;stroke:white}.leader-line-areaAnchor{position:absolute;overflow:visible!important}]]></style><defs><circle id="leader-line-disc" cx="0" cy="0" r="5"/><rect id="leader-line-square" x="-5" y="-5" width="10" height="10"/><polygon id="leader-line-arrow1" points="-8,-8 8,0 -8,8 -5,0"/><polygon id="leader-line-arrow2" points="-4,-8 4,0 -4,8 -7,5 -2,0 -7,-5"/><polygon id="leader-line-arrow3" points="-4,-5 8,0 -4,5"/><g id="leader-line-hand"><path style="fill: #fcfcfc" d="M9.19 11.14h4.75c1.38 0 2.49-1.11 2.49-2.49 0-.51-.15-.98-.41-1.37h1.3c1.38 0 2.49-1.11 2.49-2.49s-1.11-2.53-2.49-2.53h1.02c1.38 0 2.49-1.11 2.49-2.49s-1.11-2.49-2.49-2.49h14.96c1.37 0 2.49-1.11 2.49-2.49s-1.11-2.49-2.49-2.49H16.58C16-9.86 14.28-11.14 9.7-11.14c-4.79 0-6.55 3.42-7.87 4.73H-2.14v13.23h3.68C3.29 9.97 5.47 11.14 9.19 11.14L9.19 11.14Z"/><path style="fill: black" d="M13.95 12c1.85 0 3.35-1.5 3.35-3.35 0-.17-.02-.34-.04-.51h.07c1.85 0 3.35-1.5 3.35-3.35 0-.79-.27-1.51-.72-2.08 1.03-.57 1.74-1.67 1.74-2.93 0-.59-.16-1.15-.43-1.63h12.04c1.85 0 3.35-1.5 3.35-3.35 0-1.85-1.5-3.35-3.35-3.35H17.2C16.26-10.93 13.91-12 9.7-12 5.36-12 3.22-9.4 1.94-7.84c0 0-.29.33-.5.57-.63 0-3.58 0-3.58 0C-2.61-7.27-3-6.88-3-6.41v13.23c0 .47.39.86.86.86 0 0 2.48 0 3.2 0C2.9 10.73 5.29 12 9.19 12L13.95 12ZM9.19 10.28c-3.46 0-5.33-1.05-6.9-3.87-.15-.27-.44-.44-.75-.44 0 0-1.81 0-2.82 0V-5.55c1.06 0 3.11 0 3.11 0 .25 0 .44-.06.61-.25l.83-.95c1.23-1.49 2.91-3.53 6.43-3.53 3.45 0 4.9.74 5.57 1.72h-4.3c-.48 0-.86.38-.86.86s.39.86.86.86h22.34c.9 0 1.63.73 1.63 1.63 0 .9-.73 1.63-1.63 1.63H15.83c-.48 0-.86.38-.86.86 0 .47.39.86.86.86h2.52c.9 0 1.63.73 1.63 1.63s-.73 1.63-1.63 1.63h-3.12c-.48 0-.86.38-.86.86 0 .47.39.86.86.86h2.11c.88 0 1.63.76 1.63 1.67 0 .9-.73 1.63-1.63 1.63h-3.2c-.48 0-.86.39-.86.86 0 .47.39.86.86.86h1.36c.05.16.09.34.09.51 0 .9-.73 1.63-1.63 1.63C13.95 10.28 9.19 10.28 9.19 10.28Z"/></g><g id="leader-line-crosshair"><path d="M0-78.97c-43.54 0-78.97 35.43-78.97 78.97 0 43.54 35.43 78.97 78.97 78.97s78.97-35.43 78.97-78.97C78.97-43.54 43.55-78.97 0-78.97ZM76.51-1.21h-9.91v-9.11h-2.43v9.11h-11.45c-.64-28.12-23.38-50.86-51.5-51.5V-64.17h9.11V-66.6h-9.11v-9.91C42.46-75.86 75.86-42.45 76.51-1.21ZM-1.21-30.76h-9.11v2.43h9.11V-4.2c-1.44.42-2.57 1.54-2.98 2.98H-28.33v-9.11h-2.43v9.11H-50.29C-49.65-28-27.99-49.65-1.21-50.29V-30.76ZM-30.76 1.21v9.11h2.43v-9.11H-4.2c.42 1.44 1.54 2.57 2.98 2.98v24.13h-9.11v2.43h9.11v19.53C-27.99 49.65-49.65 28-50.29 1.21H-30.76ZM1.22 30.75h9.11v-2.43h-9.11V4.2c1.44-.42 2.56-1.54 2.98-2.98h24.13v9.11h2.43v-9.11h19.53C49.65 28 28 49.65 1.22 50.29V30.75ZM30.76-1.21v-9.11h-2.43v9.11H4.2c-.42-1.44-1.54-2.56-2.98-2.98V-28.33h9.11v-2.43h-9.11V-50.29C28-49.65 49.65-28 50.29-1.21H30.76ZM-1.21-76.51v9.91h-9.11v2.43h9.11v11.45c-28.12.64-50.86 23.38-51.5 51.5H-64.17v-9.11H-66.6v9.11h-9.91C-75.86-42.45-42.45-75.86-1.21-76.51ZM-76.51 1.21h9.91v9.11h2.43v-9.11h11.45c.64 28.12 23.38 50.86 51.5 51.5v11.45h-9.11v2.43h9.11v9.91C-42.45 75.86-75.86 42.45-76.51 1.21ZM1.22 76.51v-9.91h9.11v-2.43h-9.11v-11.45c28.12-.64 50.86-23.38 51.5-51.5h11.45v9.11h2.43v-9.11h9.91C75.86 42.45 42.45 75.86 1.22 76.51Z"/><path d="M0 83.58-7.1 96 7.1 96Z"/><path d="M0-83.58 7.1-96-7.1-96"/><path d="M83.58 0 96 7.1 96-7.1Z"/><path d="M-83.58 0-96-7.1-96 7.1Z"/></g></defs></svg>',R={disc:{elmId:"leader-line-disc",noRotate:!0,bBox:{left:-5,top:-5,width:10,height:10,right:5,bottom:5},widthR:2.5,heightR:2.5,bCircle:5,sideLen:5,backLen:5,overhead:0,outlineBase:1,outlineMax:4},square:{elmId:"leader-line-square",noRotate:!0,bBox:{left:-5,top:-5,width:10,height:10,right:5,bottom:5},widthR:2.5,heightR:2.5,bCircle:5,sideLen:5,backLen:5,overhead:0,outlineBase:1,outlineMax:4},arrow1:{elmId:"leader-line-arrow1",bBox:{left:-8,top:-8,width:16,height:16,right:8,bottom:8},widthR:4,heightR:4,bCircle:8,sideLen:8,backLen:8,overhead:8,outlineBase:2,outlineMax:1.5},arrow2:{elmId:"leader-line-arrow2",bBox:{left:-7,top:-8,width:11,height:16,right:4,bottom:8},widthR:2.75,heightR:4,bCircle:8,sideLen:8,backLen:7,overhead:4,outlineBase:1,outlineMax:1.75},arrow3:{elmId:"leader-line-arrow3",bBox:{left:-4,top:-5,width:12,height:10,right:8,bottom:5},widthR:3,heightR:2.5,bCircle:8,sideLen:5,backLen:4,overhead:8,outlineBase:1,outlineMax:2.5},hand:{elmId:"leader-line-hand",bBox:{left:-3,top:-12,width:40,height:24,right:37,bottom:12},widthR:10,heightR:6,bCircle:37,sideLen:12,backLen:3,overhead:37},crosshair:{elmId:"leader-line-crosshair",noRotate:!0,bBox:{left:-96,top:-96,width:192,height:192,right:96,bottom:96},widthR:48,heightR:48,bCircle:96,sideLen:96,backLen:96,overhead:0}},F={behind:T,disc:"disc",square:"square",arrow1:"arrow1",arrow2:"arrow2",arrow3:"arrow3",hand:"hand",crosshair:"crosshair"},G={disc:"disc",square:"square",arrow1:"arrow1",arrow2:"arrow2",arrow3:"arrow3",hand:"hand",crosshair:"crosshair"},D=[k,w,O,M],z="auto",j={x:"left",y:"top",width:"width",height:"height"},H=80,U=4,Z=5,Y=120,X=8,q=3.75,Q=10,K=30,J=.5522847,$=.25*Math.PI,ee=/^\s*(\-?[\d\.]+)\s*(\%)?\s*$/,te="http://www.w3.org/2000/svg",ne="-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style&&!window.navigator.msPointerEnabled,ae=!ne&&!!document.uniqueID,ie="MozAppearance"in document.documentElement.style,oe=!(ne||ie||!window.chrome||!window.CSS),le=!ne&&!ae&&!ie&&!oe&&!window.chrome&&"WebkitAppearance"in document.documentElement.style,re=ae||ne?.2:.1,se={path:L,lineColor:"coral",lineSize:4,plugSE:[T,"arrow1"],plugSizeSE:[1,1],lineOutlineEnabled:!1,lineOutlineColor:"indianred",lineOutlineSize:.25,plugOutlineEnabledSE:[!1,!1],plugOutlineSizeSE:[1,1]},ue=(v={}.toString,E={}.hasOwnProperty.toString,b=E.call(Object),function(e){return e&&"[object Object]"===v.call(e)&&(!(e=Object.getPrototypeOf(e))||(e=e.hasOwnProperty("constructor")&&e.constructor)&&"function"==typeof e&&E.call(e)===b)}),he=Number.isFinite||function(e){return"number"==typeof e&&window.isFinite(e)},pe=(d={ease:[.25,.1,.25,1],linear:[0,0,1,1],"ease-in":[.42,0,1,1],"ease-out":[0,0,.58,1],"ease-in-out":[.42,0,.58,1]},f=1e3/60/2,y=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,f)},m=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame||function(e){clearTimeout(e)},S=Number.isFinite||function(e){return"number"==typeof e&&window.isFinite(e)},g=[],_=0,{add:function(e,t,n,a,i,o,l){var r,s,u,h,p,c,y,m,S,v,E=++_;function b(t,n){return{value:e(n),timeRatio:t,outputRatio:n}}if("string"==typeof i&&(i=d[i]),e=e||function(){},n<f)r=[b(0,0),b(1,1)];else{if(s=f/n,r=[b(0,0)],0===i[0]&&0===i[1]&&1===i[2]&&1===i[3])for(h=s;h<=1;h+=s)r.push(b(h,h));else for(p=u=(h=s)/10;p<=1;p+=u)y=p,v=S=m=void 0,m=(v=p*p)*p,v*=3*(S=1-p),h<=(c={x:(y=S*S*3*p)*i[0]+v*i[2]+m,y:y*i[1]+v*i[3]+m}).x&&(r.push(b(c.x,c.y)),h+=s);r.push(b(1,1))}return g.push(o={animId:E,frameCallback:t,duration:n,count:a,frames:r,reverse:!!o}),!1!==l&&xe(o,l),E},remove:function(e){var t;g.some((function(n,a){return n.animId===e&&(t=a,!(n.framesStart=null))}))&&g.splice(t,1)},start:function(e,t,n){g.some((function(a){return a.animId===e&&(a.reverse=!!t,xe(a,n),!0)}))},stop:function(e,t){var n;return g.some((function(a){return a.animId===e&&(t?null!=a.lastFrame&&(n=a.frames[a.lastFrame].timeRatio):(n=(Date.now()-a.framesStart)/a.duration,(n=a.reverse?1-n:n)<0?n=0:1<n&&(n=1)),!(a.framesStart=null))})),n},validTiming:function(e){return"string"==typeof e?d[e]:Array.isArray(e)&&[0,1,2,3].every((function(t){return S(e[t])&&0<=e[t]&&e[t]<=1}))?[e[0],e[1],e[2],e[3]]:null}}),ce=function(e){e.SVGPathElement.prototype.getPathData&&e.SVGPathElement.prototype.setPathData||function(){function t(e){this._string=e,this._currentIndex=0,this._endIndex=this._string.length,this._prevCommand=null,this._skipOptionalSpaces()}var n={Z:"Z",M:"M",L:"L",C:"C",Q:"Q",A:"A",H:"H",V:"V",S:"S",T:"T",z:"Z",m:"m",l:"l",c:"c",q:"q",a:"a",h:"h",v:"v",s:"s",t:"t"},a=-1!==e.navigator.userAgent.indexOf("MSIE ");function i(e){if(!e||0===e.length)return[];var n=new t(e),a=[];if(n.initialCommandIsMoveTo())for(;n.hasMoreData();){var i=n.parseSegment();if(null===i)break;a.push(i)}return a}function o(e){return e.map((function(e){return{type:e.type,values:Array.prototype.slice.call(e.values)}}))}function l(e){var t=[],n=null,a=null,i=null,o=null,l=null,r=null,s=null;return e.forEach((function(e){var u,h,c,d,f,y,m,S;"M"===e.type?(m=e.values[0],S=e.values[1],t.push({type:"M",values:[m,S]}),o=r=m,l=s=S):"C"===e.type?(f=e.values[0],y=e.values[1],u=e.values[2],h=e.values[3],m=e.values[4],S=e.values[5],t.push({type:"C",values:[f,y,u,h,m,S]}),a=u,i=h,o=m,l=S):"L"===e.type?(m=e.values[0],S=e.values[1],t.push({type:"L",values:[m,S]}),o=m,l=S):"H"===e.type?(m=e.values[0],t.push({type:"L",values:[m,l]}),o=m):"V"===e.type?(S=e.values[0],t.push({type:"L",values:[o,S]}),l=S):"S"===e.type?(u=e.values[0],h=e.values[1],m=e.values[2],S=e.values[3],d="C"===n||"S"===n?(c=o+(o-a),l+(l-i)):(c=o,l),t.push({type:"C",values:[c,d,u,h,m,S]}),a=u,i=h,o=m,l=S):"T"===e.type?(m=e.values[0],S=e.values[1],y="Q"===n||"T"===n?(f=o+(o-a),l+(l-i)):(f=o,l),t.push({type:"C",values:[c=o+2*(f-o)/3,d=l+2*(y-l)/3,m+2*(f-m)/3,S+2*(y-S)/3,m,S]}),a=f,i=y,o=m,l=S):"Q"===e.type?(f=e.values[0],y=e.values[1],m=e.values[2],S=e.values[3],t.push({type:"C",values:[c=o+2*(f-o)/3,d=l+2*(y-l)/3,m+2*(f-m)/3,S+2*(y-S)/3,m,S]}),a=f,i=y,o=m,l=S):"A"===e.type?(h=e.values[0],c=e.values[1],d=e.values[2],f=e.values[3],y=e.values[4],m=e.values[5],S=e.values[6],0===h||0===c?(t.push({type:"C",values:[o,l,m,S,m,S]}),o=m,l=S):o===m&&l===S||p(o,l,m,S,h,c,d,f,y).forEach((function(e){t.push({type:"C",values:e}),o=m,l=S}))):"Z"===e.type&&(t.push(e),o=r,l=s),n=e.type})),t}t.prototype={parseSegment:function(){var e=this._string[this._currentIndex],t=n[e]||null;if(null===t){if(null===this._prevCommand)return null;if(null===(t=("+"===e||"-"===e||"."===e||"0"<=e&&e<="9")&&"Z"!==this._prevCommand?"M"===this._prevCommand?"L":"m"===this._prevCommand?"l":this._prevCommand:null))return null}else this._currentIndex+=1;var a=null;e=(this._prevCommand=t).toUpperCase();return"H"===e||"V"===e?a=[this._parseNumber()]:"M"===e||"L"===e||"T"===e?a=[this._parseNumber(),this._parseNumber()]:"S"===e||"Q"===e?a=[this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber()]:"C"===e?a=[this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber()]:"A"===e?a=[this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseArcFlag(),this._parseArcFlag(),this._parseNumber(),this._parseNumber()]:"Z"===e&&(this._skipOptionalSpaces(),a=[]),null===a||0<=a.indexOf(null)?null:{type:t,values:a}},hasMoreData:function(){return this._currentIndex<this._endIndex},peekSegmentType:function(){var e=this._string[this._currentIndex];return n[e]||null},initialCommandIsMoveTo:function(){if(!this.hasMoreData())return!0;var e=this.peekSegmentType();return"M"===e||"m"===e},_isCurrentSpace:function(){var e=this._string[this._currentIndex];return e<=" "&&(" "===e||"\n"===e||"\t"===e||"\r"===e||"\f"===e)},_skipOptionalSpaces:function(){for(;this._currentIndex<this._endIndex&&this._isCurrentSpace();)this._currentIndex+=1;return this._currentIndex<this._endIndex},_skipOptionalSpacesOrDelimiter:function(){return!(this._currentIndex<this._endIndex&&!this._isCurrentSpace()&&","!==this._string[this._currentIndex])&&(this._skipOptionalSpaces()&&this._currentIndex<this._endIndex&&","===this._string[this._currentIndex]&&(this._currentIndex+=1,this._skipOptionalSpaces()),this._currentIndex<this._endIndex)},_parseNumber:function(){var e=0,t=0,n=1,a=0,i=1,o=1,l=this._currentIndex;if(this._skipOptionalSpaces(),this._currentIndex<this._endIndex&&"+"===this._string[this._currentIndex]?this._currentIndex+=1:this._currentIndex<this._endIndex&&"-"===this._string[this._currentIndex]&&(this._currentIndex+=1,i=-1),this._currentIndex===this._endIndex||(this._string[this._currentIndex]<"0"||"9"<this._string[this._currentIndex])&&"."!==this._string[this._currentIndex])return null;for(var r=this._currentIndex;this._currentIndex<this._endIndex&&"0"<=this._string[this._currentIndex]&&this._string[this._currentIndex]<="9";)this._currentIndex+=1;if(this._currentIndex!==r)for(var s=this._currentIndex-1,u=1;r<=s;)t+=u*(this._string[s]-"0"),--s,u*=10;if(this._currentIndex<this._endIndex&&"."===this._string[this._currentIndex]){if(this._currentIndex+=1,this._currentIndex>=this._endIndex||this._string[this._currentIndex]<"0"||"9"<this._string[this._currentIndex])return null;for(;this._currentIndex<this._endIndex&&"0"<=this._string[this._currentIndex]&&this._string[this._currentIndex]<="9";)n*=10,a+=(this._string.charAt(this._currentIndex)-"0")/n,this._currentIndex+=1}if(this._currentIndex!==l&&this._currentIndex+1<this._endIndex&&("e"===this._string[this._currentIndex]||"E"===this._string[this._currentIndex])&&"x"!==this._string[this._currentIndex+1]&&"m"!==this._string[this._currentIndex+1]){if(this._currentIndex+=1,"+"===this._string[this._currentIndex]?this._currentIndex+=1:"-"===this._string[this._currentIndex]&&(this._currentIndex+=1,o=-1),this._currentIndex>=this._endIndex||this._string[this._currentIndex]<"0"||"9"<this._string[this._currentIndex])return null;for(;this._currentIndex<this._endIndex&&"0"<=this._string[this._currentIndex]&&this._string[this._currentIndex]<="9";)e*=10,e+=this._string[this._currentIndex]-"0",this._currentIndex+=1}var h=t+a;return h*=i,e&&(h*=Math.pow(10,o*e)),l===this._currentIndex?null:(this._skipOptionalSpacesOrDelimiter(),h)},_parseArcFlag:function(){if(this._currentIndex>=this._endIndex)return null;var e=null,t=this._string[this._currentIndex];if(this._currentIndex+=1,"0"===t)e=0;else{if("1"!==t)return null;e=1}return this._skipOptionalSpacesOrDelimiter(),e}};var r=e.SVGPathElement.prototype.setAttribute,s=e.SVGPathElement.prototype.removeAttribute,u=e.Symbol?e.Symbol():"__cachedPathData",h=e.Symbol?e.Symbol():"__cachedNormalizedPathData",p=function(e,t,n,a,i,o,l,r,s,u){function h(e,t,n){return{x:e*Math.cos(n)-t*Math.sin(n),y:e*Math.sin(n)+t*Math.cos(n)}}var c=Math.PI*l/180,d=[];u?(v=u[0],E=u[1],g=u[2],_=u[3]):(e=(S=h(e,t,-c)).x,t=S.y,1<(S=(m=(e-(n=(y=h(n,a,-c)).x))/2)*m/(i*i)+(f=(t-(a=y.y))/2)*f/(o*o))&&(i*=S=Math.sqrt(S),o*=S),y=i*i,S=o*o,g=(y=(r===s?-1:1)*Math.sqrt(Math.abs((y*S-y*f*f-S*m*m)/(y*f*f+S*m*m))))*i*f/o+(e+n)/2,_=y*-o*m/i+(t+a)/2,v=Math.asin(parseFloat(((t-_)/o).toFixed(9))),E=Math.asin(parseFloat(((a-_)/o).toFixed(9))),e<g&&(v=Math.PI-v),n<g&&(E=Math.PI-E),v<0&&(v=2*Math.PI+v),E<0&&(E=2*Math.PI+E),s&&E<v&&(v-=2*Math.PI),!s&&v<E&&(E-=2*Math.PI));var f,y,m,S=E-v;Math.abs(S)>120*Math.PI/180&&(f=E,y=n,m=a,E=s&&v<E?v+120*Math.PI/180*1:v+120*Math.PI/180*-1,n=g+i*Math.cos(E),a=_+o*Math.sin(E),d=p(n,a,y,m,i,o,l,0,s,[E,f,g,_]));S=E-v;var g=Math.cos(v),_=Math.sin(v),v=Math.cos(E),E=Math.sin(E);S=Math.tan(S/4),i=4/3*i*S,o=4/3*o*S,S=[e,t],g=[e+i*_,t-o*g],v=[n+i*E,a-o*v],a=[n,a];if(g[0]=2*S[0]-g[0],g[1]=2*S[1]-g[1],u)return[g,v,a].concat(d);d=[g,v,a].concat(d).join().split(",");var b=[],x=[];return d.forEach((function(e,t){t%2?x.push(h(d[t-1],d[t],c).y):x.push(h(d[t],d[t+1],c).x),6===x.length&&(b.push(x),x=[])})),b};e.SVGPathElement.prototype.setAttribute=function(e,t){"d"===e&&(this[u]=null,this[h]=null),r.call(this,e,t)},e.SVGPathElement.prototype.removeAttribute=function(e,t){"d"===e&&(this[u]=null,this[h]=null),s.call(this,e)},e.SVGPathElement.prototype.getPathData=function(e){if(e&&e.normalize)return this[h]?o(this[h]):(this[u]?p=o(this[u]):(p=i(this.getAttribute("d")||""),this[u]=o(p)),e=l((t=[],s=r=a=n=null,p.forEach((function(e){var i,o,l,u,h,p,c=e.type;"M"===c?(h=e.values[0],p=e.values[1],t.push({type:"M",values:[h,p]}),n=r=h,a=s=p):"m"===c?(h=n+e.values[0],p=a+e.values[1],t.push({type:"M",values:[h,p]}),n=r=h,a=s=p):"L"===c?(h=e.values[0],p=e.values[1],t.push({type:"L",values:[h,p]}),n=h,a=p):"l"===c?(h=n+e.values[0],p=a+e.values[1],t.push({type:"L",values:[h,p]}),n=h,a=p):"C"===c?(i=e.values[0],o=e.values[1],l=e.values[2],u=e.values[3],h=e.values[4],p=e.values[5],t.push({type:"C",values:[i,o,l,u,h,p]}),n=h,a=p):"c"===c?(i=n+e.values[0],o=a+e.values[1],l=n+e.values[2],u=a+e.values[3],h=n+e.values[4],p=a+e.values[5],t.push({type:"C",values:[i,o,l,u,h,p]}),n=h,a=p):"Q"===c?(i=e.values[0],o=e.values[1],h=e.values[2],p=e.values[3],t.push({type:"Q",values:[i,o,h,p]}),n=h,a=p):"q"===c?(i=n+e.values[0],o=a+e.values[1],h=n+e.values[2],p=a+e.values[3],t.push({type:"Q",values:[i,o,h,p]}),n=h,a=p):"A"===c?(h=e.values[5],p=e.values[6],t.push({type:"A",values:[e.values[0],e.values[1],e.values[2],e.values[3],e.values[4],h,p]}),n=h,a=p):"a"===c?(h=n+e.values[5],p=a+e.values[6],t.push({type:"A",values:[e.values[0],e.values[1],e.values[2],e.values[3],e.values[4],h,p]}),n=h,a=p):"H"===c?(h=e.values[0],t.push({type:"H",values:[h]}),n=h):"h"===c?(h=n+e.values[0],t.push({type:"H",values:[h]}),n=h):"V"===c?(p=e.values[0],t.push({type:"V",values:[p]}),a=p):"v"===c?(p=a+e.values[0],t.push({type:"V",values:[p]}),a=p):"S"===c?(l=e.values[0],u=e.values[1],h=e.values[2],p=e.values[3],t.push({type:"S",values:[l,u,h,p]}),n=h,a=p):"s"===c?(l=n+e.values[0],u=a+e.values[1],h=n+e.values[2],p=a+e.values[3],t.push({type:"S",values:[l,u,h,p]}),n=h,a=p):"T"===c?(h=e.values[0],p=e.values[1],t.push({type:"T",values:[h,p]}),n=h,a=p):"t"===c?(h=n+e.values[0],p=a+e.values[1],t.push({type:"T",values:[h,p]}),n=h,a=p):"Z"!==c&&"z"!==c||(t.push({type:"Z",values:[]}),n=r,a=s)})),t)),this[h]=o(e),e);if(this[u])return o(this[u]);var t,n,a,r,s,p=i(this.getAttribute("d")||"");return this[u]=o(p),p},e.SVGPathElement.prototype.setPathData=function(e){if(0===e.length)a?this.setAttribute("d",""):this.removeAttribute("d");else{for(var t="",n=0,i=e.length;n<i;n+=1){var o=e[n];0<n&&(t+=" "),t+=o.type,o.values&&0<o.values.length&&(t+=" "+o.values.join(" "))}this.setAttribute("d",t)}},e.SVGRectElement.prototype.getPathData=function(e){var t=this.x.baseVal.value,n=this.y.baseVal.value,a=this.width.baseVal.value,i=this.height.baseVal.value,o=(this.hasAttribute("rx")?this.rx:this.ry).baseVal.value,r=(this.hasAttribute("ry")?this.ry:this.rx).baseVal.value;n=(n=[{type:"M",values:[t+(o=a/2<o?a/2:o),n]},{type:"H",values:[t+a-o]},{type:"A",values:[o,r=i/2<r?i/2:r,0,0,1,t+a,n+r]},{type:"V",values:[n+i-r]},{type:"A",values:[o,r,0,0,1,t+a-o,n+i]},{type:"H",values:[t+o]},{type:"A",values:[o,r,0,0,1,t,n+i-r]},{type:"V",values:[n+r]},{type:"A",values:[o,r,0,0,1,t+o,n]},{type:"Z",values:[]}]).filter((function(e){return"A"!==e.type||0!==e.values[0]&&0!==e.values[1]}));return e&&!0===e.normalize?l(n):n},e.SVGCircleElement.prototype.getPathData=function(e){var t=this.cx.baseVal.value,n=this.cy.baseVal.value,a=this.r.baseVal.value;n=[{type:"M",values:[t+a,n]},{type:"A",values:[a,a,0,0,1,t,n+a]},{type:"A",values:[a,a,0,0,1,t-a,n]},{type:"A",values:[a,a,0,0,1,t,n-a]},{type:"A",values:[a,a,0,0,1,t+a,n]},{type:"Z",values:[]}];return e&&!0===e.normalize?l(n):n},e.SVGEllipseElement.prototype.getPathData=function(e){var t=this.cx.baseVal.value,n=this.cy.baseVal.value,a=this.rx.baseVal.value,i=this.ry.baseVal.value;n=[{type:"M",values:[t+a,n]},{type:"A",values:[a,i,0,0,1,t,n+i]},{type:"A",values:[a,i,0,0,1,t-a,n]},{type:"A",values:[a,i,0,0,1,t,n-i]},{type:"A",values:[a,i,0,0,1,t+a,n]},{type:"Z",values:[]}];return e&&!0===e.normalize?l(n):n},e.SVGLineElement.prototype.getPathData=function(){return[{type:"M",values:[this.x1.baseVal.value,this.y1.baseVal.value]},{type:"L",values:[this.x2.baseVal.value,this.y2.baseVal.value]}]},e.SVGPolylineElement.prototype.getPathData=function(){for(var e=[],t=0;t<this.points.numberOfItems;t+=1){var n=this.points.getItem(t);e.push({type:0===t?"M":"L",values:[n.x,n.y]})}return e},e.SVGPolygonElement.prototype.getPathData=function(){for(var e=[],t=0;t<this.points.numberOfItems;t+=1){var n=this.points.getItem(t);e.push({type:0===t?"M":"L",values:[n.x,n.y]})}return e.push({type:"Z",values:[]}),e}}()},de=(ne=(p={},Ee.m=h=[function(e,t,n){n.r(t);var a=500,i=[],o=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return setTimeout(e,1e3/60)},l=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame||function(e){return clearTimeout(e)},r=Date.now(),s=void 0;function u(){var e=void 0,t=void 0;s&&(l.call(window,s),s=null),i.forEach((function(t){var n;(n=t.event)&&(t.event=null,t.listener(n),e=!0)})),e?(r=Date.now(),t=!0):Date.now()-r<a&&(t=!0),t&&(s=o.call(window,u))}function h(e){var t=-1;return i.some((function(n,a){return n.listener===e&&(t=a,!0)})),t}t.default={add:function(e){var t=void 0;return-1===h(e)?(i.push(t={listener:e}),function(e){t.event=e,s||u()}):null},remove:function(e){-1<(e=h(e))&&(i.splice(e,1),!i.length&&s&&(l.call(window,s),s=null))}}}],Ee.c=p,Ee.d=function(e,t,n){Ee.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},Ee.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},Ee.t=function(e,t){if(1&t&&(e=Ee(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(Ee.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)Ee.d(n,a,function(t){return e[t]}.bind(null,a));return n},Ee.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return Ee.d(t,"a",t),t},Ee.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Ee.p="",Ee(Ee.s=0).default),{line_altColor:{iniValue:!1},line_color:{},line_colorTra:{iniValue:!1},line_strokeWidth:{},plug_enabled:{iniValue:!1},plug_enabledSE:{hasSE:!0,iniValue:!1},plug_plugSE:{hasSE:!0,iniValue:T},plug_colorSE:{hasSE:!0},plug_colorTraSE:{hasSE:!0,iniValue:!1},plug_markerWidthSE:{hasSE:!0},plug_markerHeightSE:{hasSE:!0},lineOutline_enabled:{iniValue:!1},lineOutline_color:{},lineOutline_colorTra:{iniValue:!1},lineOutline_strokeWidth:{},lineOutline_inStrokeWidth:{},plugOutline_enabledSE:{hasSE:!0,iniValue:!1},plugOutline_plugSE:{hasSE:!0,iniValue:T},plugOutline_colorSE:{hasSE:!0},plugOutline_colorTraSE:{hasSE:!0,iniValue:!1},plugOutline_strokeWidthSE:{hasSE:!0},plugOutline_inStrokeWidthSE:{hasSE:!0},position_socketXYSE:{hasSE:!0,hasProps:!0},position_plugOverheadSE:{hasSE:!0},position_path:{},position_lineStrokeWidth:{},position_socketGravitySE:{hasSE:!0},path_pathData:{},path_edge:{hasProps:!0},viewBox_bBox:{hasProps:!0},viewBox_plugBCircleSE:{hasSE:!0},lineMask_enabled:{iniValue:!1},lineMask_outlineMode:{iniValue:!1},lineMask_x:{},lineMask_y:{},lineOutlineMask_x:{},lineOutlineMask_y:{},maskBGRect_x:{},maskBGRect_y:{},capsMaskAnchor_enabledSE:{hasSE:!0,iniValue:!1},capsMaskAnchor_pathDataSE:{hasSE:!0},capsMaskAnchor_strokeWidthSE:{hasSE:!0},capsMaskMarker_enabled:{iniValue:!1},capsMaskMarker_enabledSE:{hasSE:!0,iniValue:!1},capsMaskMarker_plugSE:{hasSE:!0,iniValue:T},capsMaskMarker_markerWidthSE:{hasSE:!0},capsMaskMarker_markerHeightSE:{hasSE:!0},caps_enabled:{iniValue:!1},attach_plugSideLenSE:{hasSE:!0},attach_plugBackLenSE:{hasSE:!0}}),fe={show_on:{},show_effect:{},show_animOptions:{},show_animId:{},show_inAnim:{}},ye="fade",me=[],Se={},ge=0,_e={},ve=0;function Ee(e){if(p[e])return p[e].exports;var t=p[e]={i:e,l:!1,exports:{}};return h[e].call(t.exports,t,t.exports,Ee),t.l=!0,t.exports}function be(){var e=Date.now(),t=!1;c&&(m.call(window,c),c=null),g.forEach((function(n){var a,i,o;if(n.framesStart){if((a=e-n.framesStart)>=n.duration&&n.count&&n.loopsLeft<=1)return o=n.frames[n.lastFrame=n.reverse?0:n.frames.length-1],n.frameCallback(o.value,!0,o.timeRatio,o.outputRatio),void(n.framesStart=null);if(a>n.duration){if(i=Math.floor(a/n.duration),n.count){if(i>=n.loopsLeft)return o=n.frames[n.lastFrame=n.reverse?0:n.frames.length-1],n.frameCallback(o.value,!0,o.timeRatio,o.outputRatio),void(n.framesStart=null);n.loopsLeft-=i}n.framesStart+=n.duration*i,a=e-n.framesStart}n.reverse&&(a=n.duration-a),o=n.frames[n.lastFrame=Math.round(a/f)],!1!==n.frameCallback(o.value,!1,o.timeRatio,o.outputRatio)?t=!0:n.framesStart=null}})),t&&(c=y.call(window,be))}function xe(e,t){e.framesStart=Date.now(),null!=t&&(e.framesStart-=e.duration*(e.reverse?1-t:t)),e.loopsLeft=e.count,e.lastFrame=null,be()}function ke(e,t){var n,a;return typeof e!=typeof t||(n=ue(e)?"obj":Array.isArray(e)?"array":"")!=(ue(t)?"obj":Array.isArray(t)?"array":"")||("obj"===n?ke(a=Object.keys(e).sort(),Object.keys(t).sort())||a.some((function(n){return ke(e[n],t[n])})):"array"===n?e.length!==t.length||e.some((function(e,n){return ke(e,t[n])})):e!==t)}function we(e){return e&&(ue(e)?Object.keys(e).reduce((function(t,n){return t[n]=we(e[n]),t}),{}):Array.isArray(e)?e.map(we):e)}function Oe(e){var t,n,a,i=1,o=e=(e+"").trim();function l(e){var t=1;e=ee.exec(e);return e&&(t=parseFloat(e[1]),e[2]?t=0<=t&&t<=100?t/100:1:(t<0||1<t)&&(t=1)),t}return(t=/^(rgba|hsla|hwb|gray|device\-cmyk)\s*\(([\s\S]+)\)$/i.exec(e))?(n=t[1].toLowerCase(),a=t[2].trim().split(/\s*,\s*/),"rgba"===n&&4===a.length?(i=l(a[3]),o="rgb("+a.slice(0,3).join(", ")+")"):"hsla"===n&&4===a.length?(i=l(a[3]),o="hsl("+a.slice(0,3).join(", ")+")"):"hwb"===n&&4===a.length?(i=l(a[3]),o="hwb("+a.slice(0,3).join(", ")+")"):"gray"===n&&2===a.length?(i=l(a[1]),o="gray("+a[0]+")"):"device-cmyk"===n&&5<=a.length&&(i=l(a[4]),o="device-cmyk("+a.slice(0,4).join(", ")+")")):(t=/^\#(?:([\da-f]{6})([\da-f]{2})|([\da-f]{3})([\da-f]))$/i.exec(e))?o=t[1]?(i=parseInt(t[2],16)/255,"#"+t[1]):(i=parseInt(t[4]+t[4],16)/255,"#"+t[3]):"transparent"===e.toLocaleLowerCase()&&(i=0),[i,o]}function Me(e){return!(!e||e.nodeType!==Node.ELEMENT_NODE||"function"!=typeof e.getBoundingClientRect)}function Ie(e,t){var n,a,i,o={};if(!(i=e.ownerDocument))return console.error("Cannot get document that contains the element."),null;if(e.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_DISCONNECTED)return console.error("A disconnected element was passed."),null;for(a in n=e.getBoundingClientRect())o[a]=n[a];if(!t){if(!(i=i.defaultView))return console.error("Cannot get window that contains the element."),null;o.left+=i.pageXOffset,o.right+=i.pageXOffset,o.top+=i.pageYOffset,o.bottom+=i.pageYOffset}return o}function Ce(e,t){var n,a=[],i=e;for(t=t||window;;){if(!(n=i.ownerDocument))return console.error("Cannot get document that contains the element."),null;if(!(n=n.defaultView))return console.error("Cannot get window that contains the element."),null;if(n===t)break;if(!(i=n.frameElement))return console.error("`baseWindow` was not found."),null;a.unshift(i)}return a}function Ae(e,t){var n=0,a=0;return(t=Ce(e,t=t||window))?t.length?(t.forEach((function(e,t){var i=Ie(e,0<t);n+=i.left,a+=i.top,e=(t=e).ownerDocument.defaultView.getComputedStyle(t,""),i={left:t.clientLeft+parseFloat(e.paddingLeft),top:t.clientTop+parseFloat(e.paddingTop)},n+=i.left,a+=i.top})),(t=Ie(e,!0)).left+=n,t.right+=n,t.top+=a,t.bottom+=a,t):Ie(e):null}function Le(e,t){var n=e.x-t.x;t=e.y-t.y;return Math.sqrt(n*n+t*t)}function Ve(e,t,n){var a=t.x-e.x;t=t.y-e.y;return{x:e.x+a*n,y:e.y+t*n,angle:Math.atan2(t,a)/(Math.PI/180)}}function Pe(e,t,n){return e=Math.atan2(e.y-t.y,t.x-e.x),{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n*-1}}function Ne(e,t,n,a,i){var o=i*i,l=o*i,r=1-i,s=r*r,u=s*r,h=u*e.x+3*s*i*t.x+3*r*o*n.x+l*a.x,p=u*e.y+3*s*i*t.y+3*r*o*n.y+l*a.y,c=e.x+2*i*(t.x-e.x)+o*(n.x-2*t.x+e.x);u=e.y+2*i*(t.y-e.y)+o*(n.y-2*t.y+e.y),s=t.x+2*i*(n.x-t.x)+o*(a.x-2*n.x+t.x),l=t.y+2*i*(n.y-t.y)+o*(a.y-2*n.y+t.y),o=r*e.x+i*t.x,e=r*e.y+i*t.y,t=r*n.x+i*a.x,i=r*n.y+i*a.y,a=90-180*Math.atan2(c-s,u-l)/Math.PI;return{x:h,y:p,fromP2:{x:c,y:u},toP1:{x:s,y:l},fromP1:{x:o,y:e},toP2:{x:t,y:i},angle:a+=180<a?-180:180}}function Te(e,t,n,a,i){function o(e,t,n,a,i){return e*(e*(-3*t+9*n-9*a+3*i)+6*t-12*n+6*a)-3*t+3*n}var l,r,s=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],u=0,h=(i=null==i||1<i?1:i<0?0:i)/2;return[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816].forEach((function(i,p){l=o(r=h*i+h,e.x,t.x,n.x,a.x),r=o(r,e.y,t.y,n.y,a.y),r=l*l+r*r,u+=s[p]*Math.sqrt(r)})),h*u}function We(e,t,n,a,i){for(var o,l=.5,r=1-l;o=Te(e,t,n,a,r),!(Math.abs(o-i)<=.01);)r+=(o<i?1:-1)*(l/=2);return r}function Be(e,t){var n;return e.forEach((function(e){e=t?e.map((function(e){return e={x:e.x,y:e.y},t(e),e})):e,(n=n||[{type:"M",values:[e[0].x,e[0].y]}]).push(e.length?2===e.length?{type:"L",values:[e[1].x,e[1].y]}:{type:"C",values:[e[1].x,e[1].y,e[2].x,e[2].y,e[3].x,e[3].y]}:{type:"Z",values:[]})})),n}function Re(e){var t=[],n=0;return e.forEach((function(e){e=(2===e.length?Le:Te).apply(null,e),t.push(e),n+=e})),{segsLen:t,lenAll:n}}function Fe(e,t){return null==e||null==t||e.length!==t.length||e.some((function(e,n){var a=t[n];return e.type!==a.type||e.values.some((function(e,t){return e!==a.values[t]}))}))}function Ge(e,t,n){e.events[t]?e.events[t].indexOf(n)<0&&e.events[t].push(n):e.events[t]=[n]}function De(e,t,n){var a;e.events[t]&&-1<(a=e.events[t].indexOf(n))&&e.events[t].splice(a,1)}function ze(e){l&&clearTimeout(l),me.push(e),l=setTimeout((function(){me.forEach((function(e){e()})),me=[]}),0)}function je(e,t){e.reflowTargets.indexOf(t)<0&&e.reflowTargets.push(t)}function He(e){e.reflowTargets.forEach((function(e){var t;t=e,setTimeout((function(){var e=t.parentNode,n=t.nextSibling;e.insertBefore(e.removeChild(t),n)}),0)})),e.reflowTargets=[]}function Ue(e,t,n,a,i,o,l){var s;"auto-start-reverse"===n?("boolean"!=typeof r&&(t.setAttribute("orient","auto-start-reverse"),r=t.orientType.baseVal===SVGMarkerElement.SVG_MARKER_ORIENT_UNKNOWN),r?t.setAttribute("orient",n):((s=i.createSVGTransform()).setRotate(180,0,0),o.transform.baseVal.appendItem(s),t.setAttribute("orient","auto"),s=!0)):(t.setAttribute("orient",n),!1===r&&o.transform.baseVal.clear()),t=t.viewBox.baseVal,s?(t.x=-a.right,t.y=-a.bottom):(t.x=a.left,t.y=a.top),t.width=a.width,t.height=a.height,ae&&je(e,l)}function Ze(e,t){return{prop:e?"markerEnd":"markerStart",orient:t?t.noRotate?"0":e?"auto":"auto-start-reverse":null}}function Ye(e,t){Object.keys(t).forEach((function(n){var a=t[n];e[n]=null!=a.iniValue?a.hasSE?[a.iniValue,a.iniValue]:a.iniValue:a.hasSE?a.hasProps?[{},{}]:[]:a.hasProps?{}:null}))}function Xe(e,t,n,a,i){return a!==t[n]&&(t[n]=a,i&&i.forEach((function(t){t(e,a,n)})),!0)}function qe(e){function t(e,t){return e+parseFloat(t)}var n=e.document,a=e.getComputedStyle(n.documentElement,"");e=e.getComputedStyle(n.body,""),n={x:0,y:0};return"static"!==e.position?(n.x-=[a.marginLeft,a.borderLeftWidth,a.paddingLeft,e.marginLeft,e.borderLeftWidth].reduce(t,0),n.y-=[a.marginTop,a.borderTopWidth,a.paddingTop,e.marginTop,e.borderTopWidth].reduce(t,0)):"static"!==a.position&&(n.x-=[a.marginLeft,a.borderLeftWidth].reduce(t,0),n.y-=[a.marginTop,a.borderTopWidth].reduce(t,0)),n}function Qe(e){var t,n=e.document;n.getElementById(W)||(t=(new e.DOMParser).parseFromString(B,"image/svg+xml"),n.body.appendChild(t.documentElement),ce(e))}function Ke(e){var t,n,a,i,o,l,r,s,u,h,p,c,d,f,y=e.options,m=e.curStats,S=e.aplStats,g=m.position_socketXYSE,_=!1;function v(e,t){return e=t===k?{x:e.left+e.width/2,y:e.top}:t===w?{x:e.right,y:e.top+e.height/2}:t===O?{x:e.left+e.width/2,y:e.bottom}:{x:e.left,y:e.top+e.height/2},e.socketId=t,e}function E(e){return{x:e.x,y:e.y}}if(m.position_path=y.path,m.position_lineStrokeWidth=m.line_strokeWidth,m.position_socketGravitySE=t=we(y.socketGravitySE),n=[0,1].map((function(t){var n=y.anchorSE[t],a=e.optionIsAttach.anchorSE[t],i=!1!==a?_e[n._id]:null,o=!1!==a&&i.conf.getStrokeWidth?i.conf.getStrokeWidth(i,e):0,l=!1!==a&&i.conf.getBBoxNest?i.conf.getBBoxNest(i,e,o):Ae(n,e.baseWindow);return m.capsMaskAnchor_pathDataSE[t]=!1!==a&&i.conf.getPathData?i.conf.getPathData(i,e,o):(a=null!=(n=l).right?n.right:n.left+n.width,i=null!=n.bottom?n.bottom:n.top+n.height,[{type:"M",values:[n.left,n.top]},{type:"L",values:[a,n.top]},{type:"L",values:[a,i]},{type:"L",values:[n.left,i]},{type:"Z",values:[]}]),m.capsMaskAnchor_strokeWidthSE[t]=o,l})),r=-1,y.socketSE[0]&&y.socketSE[1]?(g[0]=v(n[0],y.socketSE[0]),g[1]=v(n[1],y.socketSE[1])):(y.socketSE[0]||y.socketSE[1]?(l=y.socketSE[0]?(o=0,1):(o=1,0),g[o]=v(n[o],y.socketSE[o]),(i=D.map((function(e){return v(n[l],e)}))).forEach((function(e){var t=Le(e,g[o]);(t<r||-1===r)&&(g[l]=e,r=t)}))):(i=D.map((function(e){return v(n[1],e)})),D.map((function(e){return v(n[0],e)})).forEach((function(e){i.forEach((function(t){var n=Le(e,t);(n<r||-1===r)&&(g[0]=e,g[1]=t,r=n)}))}))),[0,1].forEach((function(e){var t,a;y.socketSE[e]||(n[e].width||n[e].height?n[e].width||g[e].socketId!==M&&g[e].socketId!==w?n[e].height||g[e].socketId!==k&&g[e].socketId!==O||(g[e].socketId=0<=g[e?0:1].y-n[e].top?O:k):g[e].socketId=0<=g[e?0:1].x-n[e].left?w:M:(t=g[e?0:1].x-n[e].left,a=g[e?0:1].y-n[e].top,g[e].socketId=Math.abs(t)>=Math.abs(a)?0<=t?w:M:0<=a?O:k))}))),m.position_path!==S.position_path||m.position_lineStrokeWidth!==S.position_lineStrokeWidth||[0,1].some((function(e){return m.position_plugOverheadSE[e]!==S.position_plugOverheadSE[e]||(n=g[e],a=S.position_socketXYSE[e],n.x!==a.x||n.y!==a.y||n.socketId!==a.socketId)||(n=t[e],a=S.position_socketGravitySE[e],(e=null==n?"auto":Array.isArray(n)?"array":"number")!=(null==a?"auto":Array.isArray(a)?"array":"number")||("array"==e?n[0]!==a[0]||n[1]!==a[1]:n!==a));var n,a}))){switch(e.pathList.baseVal=a=[],e.pathList.animVal=null,m.position_path){case C:a.push([E(g[0]),E(g[1])]);break;case A:c="number"==typeof t[0]&&0<t[0]||"number"==typeof t[1]&&0<t[1],d=$*(c?-1:1),f=Math.atan2(g[1].y-g[0].y,g[1].x-g[0].x),c=d-f,f=Math.PI-f-d,d=Le(g[0],g[1])/Math.sqrt(2)*J,c={x:g[0].x+Math.cos(c)*d,y:g[0].y+Math.sin(c)*d*-1},d={x:g[1].x+Math.cos(f)*d,y:g[1].y+Math.sin(f)*d*-1},a.push([E(g[0]),c,d,E(g[1])]);break;case L:case V:u=[t[0],m.position_path===V?0:t[1]],h=[],p=[],g.forEach((function(e,t){var n,a=u[t],i=Array.isArray(a)?{x:a[0],y:a[1]}:"number"==typeof a?e.socketId===k?{x:0,y:-a}:e.socketId===w?{x:a,y:0}:e.socketId===O?{x:0,y:a}:{x:-a,y:0}:(n=g[t?0:1],a=0<(a=m.position_plugOverheadSE[t])?Y+(X<a?(a-X)*q:0):H+(m.position_lineStrokeWidth>U?(m.position_lineStrokeWidth-U)*Z:0),e.socketId===k?{x:0,y:-(i=(i=(e.y-n.y)/2)<a?a:i)}:e.socketId===w?{x:i=(i=(n.x-e.x)/2)<a?a:i,y:0}:e.socketId===O?{x:0,y:i=(i=(n.y-e.y)/2)<a?a:i}:{x:-(i=(i=(e.x-n.x)/2)<a?a:i),y:0});h[t]=e.x+i.x,p[t]=e.y+i.y})),a.push([E(g[0]),{x:h[0],y:p[0]},{x:h[1],y:p[1]},E(g[1])]);break;case P:!function(){var e,n=1,i=2,o=3,l=4,r=[[],[]],s=[];function u(e){return e===n?o:e===i?l:e===o?n:i}function h(e){return e===i||e===l?"x":"y"}function p(e,t,a){var l={x:e.x,y:e.y};if(a){if(a===u(e.dirId))throw new Error("Invalid dirId: "+a);l.dirId=a}else l.dirId=e.dirId;return l.dirId===n?l.y-=t:l.dirId===i?l.x+=t:l.dirId===o?l.y+=t:l.x-=t,l}function c(e,t){return t.dirId===n?e.y<=t.y:t.dirId===i?e.x>=t.x:t.dirId===o?e.y>=t.y:e.x<=t.x}function d(e,t){return t.dirId===n||t.dirId===o?e.x===t.x:e.y===t.y}function f(e){return e[0]?{contain:0,notContain:1}:{contain:1,notContain:0}}function y(e,t,n){return Math.abs(t[n]-e[n])}function m(e,t,a){return"x"===a?e.x<t.x?i:l:e.y<t.y?o:n}for(g.forEach((function(e,a){var h=E(e),c=t[a];e=Array.isArray(c)?c[0]<0?[l,-c[0]]:0<c[0]?[i,c[0]]:c[1]<0?[n,-c[1]]:0<c[1]?[o,c[1]]:[e.socketId,0]:"number"!=typeof c?[e.socketId,K]:0<=c?[e.socketId,c]:[u(e.socketId),-c],h.dirId=e[0],c=e[1],r[a].push(h),s[a]=p(h,c)}));function(){var e,t,n,a,l=[c(s[1],s[0]),c(s[0],s[1])],u=[h(s[0].dirId),h(s[1].dirId)];if(u[0]===u[1]){if(l[0]&&l[1])return void(d(s[1],s[0])||(s[0][u[0]]===s[1][u[1]]?(r[0].push(s[0]),r[1].push(s[1])):(e=s[0][u[0]]+(s[1][u[1]]-s[0][u[0]])/2,r[0].push(p(s[0],Math.abs(e-s[0][u[0]]))),r[1].push(p(s[1],Math.abs(e-s[1][u[1]]))))));l[0]!==l[1]?(t=f(l),(n=y(s[t.notContain],s[t.contain],u[t.notContain]))<K&&(s[t.notContain]=p(s[t.notContain],K-n)),r[t.notContain].push(s[t.notContain]),s[t.notContain]=p(s[t.notContain],K,d(s[t.contain],s[t.notContain])?"x"===u[t.notContain]?o:i:m(s[t.notContain],s[t.contain],"x"===u[t.notContain]?"y":"x"))):(n=y(s[0],s[1],"x"===u[0]?"y":"x"),r.forEach((function(e,t){var a=0===t?1:0;e.push(s[t]),s[t]=p(s[t],K,2*K<=n?m(s[t],s[a],"x"===u[t]?"y":"x"):"x"===u[t]?o:i)})))}else{if(l[0]&&l[1])return void(d(s[1],s[0])?r[1].push(s[1]):d(s[0],s[1])?r[0].push(s[0]):r[0].push("x"===u[0]?{x:s[1].x,y:s[0].y}:{x:s[0].x,y:s[1].y}));l[0]!==l[1]?(t=f(l),r[t.notContain].push(s[t.notContain]),s[t.notContain]=p(s[t.notContain],K,y(s[t.notContain],s[t.contain],u[t.contain])>=K?m(s[t.notContain],s[t.contain],u[t.contain]):s[t.contain].dirId)):(a=[{x:s[0].x,y:s[0].y},{x:s[1].x,y:s[1].y}],r.forEach((function(e,t){var n=0===t?1:0,i=y(a[t],a[n],u[t]);i<K&&(s[t]=p(s[t],K-i)),e.push(s[t]),s[t]=p(s[t],K,m(s[t],s[n],u[n]))})))}return 1}(););r[1].reverse(),r[0].concat(r[1]).forEach((function(t,n){t={x:t.x,y:t.y},0<n&&a.push([e,t]),e=t}))}()}s=[],m.position_plugOverheadSE.forEach((function(e,t){var i,o,l,r,u,h,p,c,d,f=!t;0<e?2===(i=a[o=f?0:a.length-1]).length?(s[o]=s[o]||Le.apply(null,i),s[o]>Q&&(s[o]-e<Q&&(e=s[o]-Q),p=Ve(i[0],i[1],(f?e:s[o]-e)/s[o]),a[o]=f?[p,i[1]]:[i[0],p],s[o]-=e)):(s[o]=s[o]||Te.apply(null,i),s[o]>Q&&(s[o]-e<Q&&(e=s[o]-Q),p=Ne(i[0],i[1],i[2],i[3],We(i[0],i[1],i[2],i[3],f?e:s[o]-e)),r=f?(l=i[0],p.toP1):(l=i[3],p.fromP2),u=Math.atan2(l.y-p.y,p.x-l.x),h=Le(p,r),p.x=l.x+Math.cos(u)*e,p.y=l.y+Math.sin(u)*e*-1,r.x=p.x+Math.cos(u)*h,r.y=p.y+Math.sin(u)*h*-1,a[o]=f?[p,p.toP1,p.toP2,i[3]]:[i[0],p.fromP1,p.fromP2,p],s[o]=null)):e<0&&(i=a[o=f?0:a.length-1],p=g[t].socketId,t=-n[t]["x"==(c=p===M||p===w?"x":"y")?"width":"height"],d=(e=e<t?t:e)*(p===M||p===k?-1:1),2===i.length?i[f?0:i.length-1][c]+=d:(f?[0,1]:[i.length-2,i.length-1]).forEach((function(e){i[e][c]+=d})),s[o]=null)})),S.position_socketXYSE=we(g),S.position_plugOverheadSE=we(m.position_plugOverheadSE),S.position_path=m.position_path,S.position_lineStrokeWidth=m.position_lineStrokeWidth,S.position_socketGravitySE=we(t),_=!0,e.events.apl_position&&e.events.apl_position.forEach((function(t){t(e,a)}))}return _}function Je(e,t){t!==e.isShown&&(!!t!=!!e.isShown&&(e.svg.style.visibility=t?"":"hidden"),e.isShown=t,e.events&&e.events.svgShow&&e.events.svgShow.forEach((function(n){n(e,t)})))}function $e(t,n){var a,i,o,l,r,s,u,h,p,c,d,f,y,m,S,g,_,v,E,b,x,k,w,O,M,I,C,A,L,V,P,N,W,B,F,D,z,H,U,Z,Y,X,q,Q={};n.line&&(Q.line=(h=(a=t).options,i=a.curStats,p=a.events,c=!1,c=Xe(a,i,"line_color",h.lineColor,p.cur_line_color)||c,c=Xe(a,i,"line_colorTra",Oe(i.line_color)[0]<1)||c,c=Xe(a,i,"line_strokeWidth",h.lineSize,p.cur_line_strokeWidth)||c)),(n.plug||Q.line)&&(Q.plug=(l=(o=t).options,r=o.curStats,s=o.events,u=!1,[0,1].forEach((function(e){var t,n,a,i,h,p,c,d,f=l.plugSE[e];u=Xe(o,r.plug_enabledSE,e,f!==T)||u,u=Xe(o,r.plug_plugSE,e,f)||u,u=Xe(o,r.plug_colorSE,e,d=l.plugColorSE[e]||r.line_color,s.cur_plug_colorSE)||u,u=Xe(o,r.plug_colorTraSE,e,Oe(d)[0]<1)||u,f!==T&&(i=n=(t=R[G[f]]).widthR*l.plugSizeSE[e],h=a=t.heightR*l.plugSizeSE[e],le&&(i*=r.line_strokeWidth,h*=r.line_strokeWidth),u=Xe(o,r.plug_markerWidthSE,e,i)||u,u=Xe(o,r.plug_markerHeightSE,e,h)||u,r.capsMaskMarker_markerWidthSE[e]=n,r.capsMaskMarker_markerHeightSE[e]=a),r.plugOutline_plugSE[e]=r.capsMaskMarker_plugSE[e]=f,r.plug_enabledSE[e]?(d=r.line_strokeWidth/se.lineSize*l.plugSizeSE[e],r.position_plugOverheadSE[e]=t.overhead*d,r.viewBox_plugBCircleSE[e]=t.bCircle*d,p=t.sideLen*d,c=t.backLen*d):(r.position_plugOverheadSE[e]=-r.line_strokeWidth/2,r.viewBox_plugBCircleSE[e]=p=c=0),Xe(o,r.attach_plugSideLenSE,e,p,s.cur_attach_plugSideLenSE),Xe(o,r.attach_plugBackLenSE,e,c,s.cur_attach_plugBackLenSE),r.capsMaskAnchor_enabledSE[e]=!r.plug_enabledSE[e]})),u=Xe(o,r,"plug_enabled",r.plug_enabledSE[0]||r.plug_enabledSE[1])||u)),(n.lineOutline||Q.line)&&(Q.lineOutline=(p=(h=t).options,c=h.curStats,w=!1,w=Xe(h,c,"lineOutline_enabled",p.lineOutlineEnabled)||w,w=Xe(h,c,"lineOutline_color",p.lineOutlineColor)||w,w=Xe(h,c,"lineOutline_colorTra",Oe(c.lineOutline_color)[0]<1)||w,p=c.line_strokeWidth*p.lineOutlineSize,w=Xe(h,c,"lineOutline_strokeWidth",c.line_strokeWidth-2*p)||w,w=Xe(h,c,"lineOutline_inStrokeWidth",c.lineOutline_colorTra?c.lineOutline_strokeWidth+2*re:c.line_strokeWidth-p)||w)),(n.plugOutline||Q.line||Q.plug||Q.lineOutline)&&(Q.plugOutline=(f=(d=t).options,y=d.curStats,m=!1,[0,1].forEach((function(e){var t=y.plugOutline_plugSE[e],n=t!==T?R[G[t]]:null;m=Xe(d,y.plugOutline_enabledSE,e,f.plugOutlineEnabledSE[e]&&y.plug_enabled&&y.plug_enabledSE[e]&&!!n&&!!n.outlineBase)||m,m=Xe(d,y.plugOutline_colorSE,e,t=f.plugOutlineColorSE[e]||y.lineOutline_color)||m,m=Xe(d,y.plugOutline_colorTraSE,e,Oe(t)[0]<1)||m,n&&n.outlineBase&&((t=f.plugOutlineSizeSE[e])>n.outlineMax&&(t=n.outlineMax),t*=2*n.outlineBase,m=Xe(d,y.plugOutline_strokeWidthSE,e,t)||m,m=Xe(d,y.plugOutline_inStrokeWidthSE,e,y.plugOutline_colorTraSE[e]?t-re/(y.line_strokeWidth/se.lineSize)/f.plugSizeSE[e]*2:t/2)||m)})),m)),(n.faces||Q.line||Q.plug||Q.lineOutline||Q.plugOutline)&&(Q.faces=(_=(S=t).curStats,v=S.aplStats,E=S.events,b=!1,!_.line_altColor&&Xe(S,v,"line_color",g=_.line_color,E.apl_line_color)&&(S.lineFace.style.stroke=g,b=!0),Xe(S,v,"line_strokeWidth",g=_.line_strokeWidth,E.apl_line_strokeWidth)&&(S.lineShape.style.strokeWidth=g+"px",b=!0,(ie||ae)&&(je(S,S.lineShape),ae&&(je(S,S.lineFace),je(S,S.lineMaskCaps)))),Xe(S,v,"lineOutline_enabled",g=_.lineOutline_enabled,E.apl_lineOutline_enabled)&&(S.lineOutlineFace.style.display=g?"inline":"none",b=!0),_.lineOutline_enabled&&(Xe(S,v,"lineOutline_color",g=_.lineOutline_color,E.apl_lineOutline_color)&&(S.lineOutlineFace.style.stroke=g,b=!0),Xe(S,v,"lineOutline_strokeWidth",g=_.lineOutline_strokeWidth,E.apl_lineOutline_strokeWidth)&&(S.lineOutlineMaskShape.style.strokeWidth=g+"px",b=!0,ae&&(je(S,S.lineOutlineMaskCaps),je(S,S.lineOutlineFace))),Xe(S,v,"lineOutline_inStrokeWidth",g=_.lineOutline_inStrokeWidth,E.apl_lineOutline_inStrokeWidth)&&(S.lineMaskShape.style.strokeWidth=g+"px",b=!0,ae&&(je(S,S.lineOutlineMaskCaps),je(S,S.lineOutlineFace)))),Xe(S,v,"plug_enabled",g=_.plug_enabled,E.apl_plug_enabled)&&(S.plugsFace.style.display=g?"inline":"none",b=!0),_.plug_enabled&&[0,1].forEach((function(e){var t=_.plug_plugSE[e],n=t!==T?R[G[t]]:null,a=Ze(e,n);Xe(S,v.plug_enabledSE,e,g=_.plug_enabledSE[e],E.apl_plug_enabledSE)&&(S.plugsFace.style[a.prop]=g?"url(#"+S.plugMarkerIdSE[e]+")":"none",b=!0),_.plug_enabledSE[e]&&(Xe(S,v.plug_plugSE,e,t,E.apl_plug_plugSE)&&(S.plugFaceSE[e].href.baseVal="#"+n.elmId,Ue(S,S.plugMarkerSE[e],a.orient,n.bBox,S.svg,S.plugMarkerShapeSE[e],S.plugsFace),b=!0,ie&&je(S,S.plugsFace)),Xe(S,v.plug_colorSE,e,g=_.plug_colorSE[e],E.apl_plug_colorSE)&&(S.plugFaceSE[e].style.fill=g,b=!0,(oe||le||ae)&&!_.line_colorTra&&je(S,ae?S.lineMaskCaps:S.capsMaskLine)),["markerWidth","markerHeight"].forEach((function(t){var n="plug_"+t+"SE";Xe(S,v[n],e,g=_[n][e],E["apl_"+n])&&(S.plugMarkerSE[e][t].baseVal.value=g,b=!0)})),Xe(S,v.plugOutline_enabledSE,e,g=_.plugOutline_enabledSE[e],E.apl_plugOutline_enabledSE)&&(g?(S.plugFaceSE[e].style.mask="url(#"+S.plugMaskIdSE[e]+")",S.plugOutlineFaceSE[e].style.display="inline"):(S.plugFaceSE[e].style.mask="none",S.plugOutlineFaceSE[e].style.display="none"),b=!0),_.plugOutline_enabledSE[e]&&(Xe(S,v.plugOutline_plugSE,e,t,E.apl_plugOutline_plugSE)&&(S.plugOutlineFaceSE[e].href.baseVal=S.plugMaskShapeSE[e].href.baseVal=S.plugOutlineMaskShapeSE[e].href.baseVal="#"+n.elmId,[S.plugMaskSE[e],S.plugOutlineMaskSE[e]].forEach((function(e){e.x.baseVal.value=n.bBox.left,e.y.baseVal.value=n.bBox.top,e.width.baseVal.value=n.bBox.width,e.height.baseVal.value=n.bBox.height})),b=!0),Xe(S,v.plugOutline_colorSE,e,g=_.plugOutline_colorSE[e],E.apl_plugOutline_colorSE)&&(S.plugOutlineFaceSE[e].style.fill=g,b=!0,ae&&(je(S,S.lineMaskCaps),je(S,S.lineOutlineMaskCaps))),Xe(S,v.plugOutline_strokeWidthSE,e,g=_.plugOutline_strokeWidthSE[e],E.apl_plugOutline_strokeWidthSE)&&(S.plugOutlineMaskShapeSE[e].style.strokeWidth=g+"px",b=!0),Xe(S,v.plugOutline_inStrokeWidthSE,e,g=_.plugOutline_inStrokeWidthSE[e],E.apl_plugOutline_inStrokeWidthSE)&&(S.plugMaskShapeSE[e].style.strokeWidth=g+"px",b=!0)))})),b)),(n.position||Q.line||Q.plug)&&(Q.position=Ke(t)),(n.path||Q.position)&&(Q.path=(w=(x=t).curStats,C=x.aplStats,I=x.pathList.animVal||x.pathList.baseVal,O=w.path_edge,A=!1,I&&(O.x1=O.x2=I[0][0].x,O.y1=O.y2=I[0][0].y,w.path_pathData=k=Be(I,(function(e){e.x<O.x1&&(O.x1=e.x),e.y<O.y1&&(O.y1=e.y),e.x>O.x2&&(O.x2=e.x),e.y>O.y2&&(O.y2=e.y)})),Fe(k,C.path_pathData)&&(x.linePath.setPathData(k),C.path_pathData=k,A=!0,ae?(je(x,x.plugsFace),je(x,x.lineMaskCaps)):ie&&je(x,x.linePath),x.events.apl_path&&x.events.apl_path.forEach((function(e){e(x,k)})))),A)),Q.viewBox=(I=(M=t).curStats,C=M.aplStats,A=I.path_edge,L=I.viewBox_bBox,V=C.viewBox_bBox,P=M.svg.viewBox.baseVal,N=M.svg.style,W=!1,C=Math.max(I.line_strokeWidth/2,I.viewBox_plugBCircleSE[0]||0,I.viewBox_plugBCircleSE[1]||0),B={x1:A.x1-C,y1:A.y1-C,x2:A.x2+C,y2:A.y2+C},M.events.new_edge4viewBox&&M.events.new_edge4viewBox.forEach((function(e){e(M,B)})),L.x=I.lineMask_x=I.lineOutlineMask_x=I.maskBGRect_x=B.x1,L.y=I.lineMask_y=I.lineOutlineMask_y=I.maskBGRect_y=B.y1,L.width=B.x2-B.x1,L.height=B.y2-B.y1,["x","y","width","height"].forEach((function(e){var t;(t=L[e])!==V[e]&&(P[e]=V[e]=t,N[j[e]]=t+("x"===e||"y"===e?M.bodyOffset[e]:0)+"px",W=!0)})),W),Q.mask=(z=(F=t).curStats,H=F.aplStats,U=!1,z.plug_enabled?[0,1].forEach((function(e){z.capsMaskMarker_enabledSE[e]=z.plug_enabledSE[e]&&z.plug_colorTraSE[e]||z.plugOutline_enabledSE[e]&&z.plugOutline_colorTraSE[e]})):z.capsMaskMarker_enabledSE[0]=z.capsMaskMarker_enabledSE[1]=!1,z.capsMaskMarker_enabled=z.capsMaskMarker_enabledSE[0]||z.capsMaskMarker_enabledSE[1],z.lineMask_outlineMode=z.lineOutline_enabled,z.caps_enabled=z.capsMaskMarker_enabled||z.capsMaskAnchor_enabledSE[0]||z.capsMaskAnchor_enabledSE[1],z.lineMask_enabled=z.caps_enabled||z.lineMask_outlineMode,(z.lineMask_enabled&&!z.lineMask_outlineMode||z.lineOutline_enabled)&&["x","y"].forEach((function(e){var t="maskBGRect_"+e;Xe(F,H,t,D=z[t])&&(F.maskBGRect[e].baseVal.value=D,U=!0)})),Xe(F,H,"lineMask_enabled",D=z.lineMask_enabled)&&(F.lineFace.style.mask=D?"url(#"+F.lineMaskId+")":"none",U=!0,le&&je(F,F.lineMask)),z.lineMask_enabled&&(Xe(F,H,"lineMask_outlineMode",D=z.lineMask_outlineMode)&&(D?(F.lineMaskBG.style.display="none",F.lineMaskShape.style.display="inline"):(F.lineMaskBG.style.display="inline",F.lineMaskShape.style.display="none"),U=!0),["x","y"].forEach((function(e){var t="lineMask_"+e;Xe(F,H,t,D=z[t])&&(F.lineMask[e].baseVal.value=D,U=!0)})),Xe(F,H,"caps_enabled",D=z.caps_enabled)&&(F.lineMaskCaps.style.display=F.lineOutlineMaskCaps.style.display=D?"inline":"none",U=!0,le&&je(F,F.capsMaskLine)),z.caps_enabled&&([0,1].forEach((function(e){var t;Xe(F,H.capsMaskAnchor_enabledSE,e,D=z.capsMaskAnchor_enabledSE[e])&&(F.capsMaskAnchorSE[e].style.display=D?"inline":"none",U=!0,le&&je(F,F.lineMask)),z.capsMaskAnchor_enabledSE[e]&&(Fe(t=z.capsMaskAnchor_pathDataSE[e],H.capsMaskAnchor_pathDataSE[e])&&(F.capsMaskAnchorSE[e].setPathData(t),H.capsMaskAnchor_pathDataSE[e]=t,U=!0),Xe(F,H.capsMaskAnchor_strokeWidthSE,e,D=z.capsMaskAnchor_strokeWidthSE[e])&&(F.capsMaskAnchorSE[e].style.strokeWidth=D+"px",U=!0))})),Xe(F,H,"capsMaskMarker_enabled",D=z.capsMaskMarker_enabled)&&(F.capsMaskLine.style.display=D?"inline":"none",U=!0),z.capsMaskMarker_enabled&&[0,1].forEach((function(e){var t=z.capsMaskMarker_plugSE[e],n=t!==T?R[G[t]]:null,a=Ze(e,n);Xe(F,H.capsMaskMarker_enabledSE,e,D=z.capsMaskMarker_enabledSE[e])&&(F.capsMaskLine.style[a.prop]=D?"url(#"+F.lineMaskMarkerIdSE[e]+")":"none",U=!0),z.capsMaskMarker_enabledSE[e]&&(Xe(F,H.capsMaskMarker_plugSE,e,t)&&(F.capsMaskMarkerShapeSE[e].href.baseVal="#"+n.elmId,Ue(F,F.capsMaskMarkerSE[e],a.orient,n.bBox,F.svg,F.capsMaskMarkerShapeSE[e],F.capsMaskLine),U=!0,ie&&(je(F,F.capsMaskLine),je(F,F.lineFace))),["markerWidth","markerHeight"].forEach((function(t){var n="capsMaskMarker_"+t+"SE";Xe(F,H[n],e,D=z[n][e])&&(F.capsMaskMarkerSE[e][t].baseVal.value=D,U=!0)})))})))),z.lineOutline_enabled&&["x","y"].forEach((function(e){var t="lineOutlineMask_"+e;Xe(F,H,t,D=z[t])&&(F.lineOutlineMask[e].baseVal.value=D,U=!0)})),U),n.effect&&(X=(Z=t).curStats,q=Z.aplStats,Object.keys(e).forEach((function(t){var n=e[t],a=t+"_enabled",i=t+"_options";t=X[i];Xe(Z,q,a,Y=X[a])?(Y&&(q[i]=we(t)),n[Y?"init":"remove"](Z)):Y&&ke(t,q[i])&&(n.remove(Z),q[a]=!0,q[i]=we(t),n.init(Z))}))),(oe||le)&&Q.line&&!Q.path&&je(t,t.lineShape),oe&&Q.plug&&!Q.line&&je(t,t.plugsFace),He(t)}function et(e,t){return{duration:(he(e.duration)&&0<e.duration?e:t).duration,timing:pe.validTiming(e.timing)?e.timing:we(t.timing)}}function tt(e,n,a,i){var o=e.curStats,l=e.aplStats,r={};function s(){["show_on","show_effect","show_animOptions"].forEach((function(e){l[e]=o[e]}))}o.show_on=n,a&&t[a]&&(o.show_effect=a,o.show_animOptions=et(ue(i)?i:{},t[a].defaultAnimOptions)),r.show_on=o.show_on!==l.show_on,r.show_effect=o.show_effect!==l.show_effect,r.show_animOptions=ke(o.show_animOptions,l.show_animOptions),r.show_effect||r.show_animOptions?o.show_inAnim?(a=r.show_effect?t[l.show_effect].stop(e,!0,!0):t[l.show_effect].stop(e),s(),t[l.show_effect].init(e,a)):r.show_on&&(l.show_effect&&r.show_effect&&t[l.show_effect].stop(e,!0,!0),s(),t[l.show_effect].init(e)):r.show_on&&(s(),t[l.show_effect].start(e))}function nt(e,t,n){return n={props:e,optionName:n},e.attachments.indexOf(t)<0&&(!t.conf.bind||t.conf.bind(t,n))&&(e.attachments.push(t),t.boundTargets.push(n),1)}function at(e,t,n){var a=e.attachments.indexOf(t);-1<a&&e.attachments.splice(a,1),t.boundTargets.some((function(n,i){return n.props===e&&(t.conf.unbind&&t.conf.unbind(t,n),a=i,!0)}))&&(t.boundTargets.splice(a,1),n||ze((function(){t.boundTargets.length||o(t)})))}function it(o,l){var r,s,u,h,p,c,d,f,y,m,S,g,_,v,E,b=o.options,k={};function w(e,t,n,a,i){var o={};return n?null!=a?(o.container=e[n],o.key=a):(o.container=e,o.key=n):(o.container=e,o.key=t),o.default=i,o.acceptsAuto=null==o.default,o}function O(e,t,n,a,i,o,l){var r,s,u;l=w(e,n,i,o,l);return null!=t[n]&&(s=(t[n]+"").toLowerCase())&&(l.acceptsAuto&&s===z||(u=a[s]))&&u!==l.container[l.key]&&(l.container[l.key]=u,r=!0),null!=l.container[l.key]||l.acceptsAuto||(l.container[l.key]=l.default,r=!0),r}function M(e,t,n,a,i,o,l,r,s){var u,h,p,c;l=w(e,n,i,o,l);if(!a){if(null==l.default)throw new Error("Invalid `type`: "+n);a=typeof l.default}return null!=t[n]&&(l.acceptsAuto&&(t[n]+"").toLowerCase()===z||(p=h=t[n],("number"===(c=a)?he(p):typeof p===c)&&(h=s&&"string"===a&&h?h.trim():h,1)&&(!r||r(h))))&&h!==l.container[l.key]&&(l.container[l.key]=h,u=!0),null!=l.container[l.key]||l.acceptsAuto||(l.container[l.key]=l.default,u=!0),u}if(l=l||{},["start","end"].forEach((function(e,t){var n=l[e],a=!1;if(n&&(Me(n)||(a=i(n,"anchor")))&&n!==b.anchorSE[t]){if(!1!==o.optionIsAttach.anchorSE[t]&&at(o,_e[b.anchorSE[t]._id]),a&&!nt(o,_e[n._id],e))throw new Error("Can't bind attachment");b.anchorSE[t]=n,o.optionIsAttach.anchorSE[t]=a,r=k.position=!0}})),!b.anchorSE[0]||!b.anchorSE[1]||b.anchorSE[0]===b.anchorSE[1])throw new Error("`start` and `end` are required.");function C(e){var t=p.appendChild(v.createElementNS(te,"mask"));return t.id=e,t.maskUnits.baseVal=SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE,[t.x,t.y,t.width,t.height].forEach((function(e){e.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,0)})),t}function A(e){var t=p.appendChild(v.createElementNS(te,"marker"));return t.id=e,t.markerUnits.baseVal=SVGMarkerElement.SVG_MARKERUNITS_STROKEWIDTH,t.viewBox.baseVal||t.setAttribute("viewBox","0 0 0 0"),t}function L(e){return[e.width,e.height].forEach((function(e){e.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PERCENTAGE,100)})),e}r&&(S=function(e,t){var n,a;if(!(e=Ce(e))||!(n=Ce(t)))throw new Error("Cannot get frames.");return e.length&&n.length&&(e.reverse(),n.reverse(),e.some((function(e){return n.some((function(t){return t===e&&(a=t.contentWindow,!0)}))}))),a||window}(!1!==o.optionIsAttach.anchorSE[0]?_e[b.anchorSE[0]._id].element:b.anchorSE[0],!1!==o.optionIsAttach.anchorSE[1]?_e[b.anchorSE[1]._id].element:b.anchorSE[1]))!==o.baseWindow&&(u=S,_=(s=o).aplStats,v=u.document,E=x+"-"+s._id,s.pathList={},Ye(_,de),Object.keys(e).forEach((function(t){var n=t+"_enabled";_[n]&&(e[t].remove(s),_[n]=!1)})),s.baseWindow&&s.svg&&s.baseWindow.document.body.removeChild(s.svg),Qe(s.baseWindow=u),s.bodyOffset=qe(u),s.svg=h=v.createElementNS(te,"svg"),h.className.baseVal=x,h.viewBox.baseVal||h.setAttribute("viewBox","0 0 0 0"),s.defs=p=h.appendChild(v.createElementNS(te,"defs")),s.linePath=d=p.appendChild(v.createElementNS(te,"path")),d.id=f=E+"-line-path",d.className.baseVal=x+"-line-path",le&&(d.style.fill="none"),s.lineShape=d=p.appendChild(v.createElementNS(te,"use")),d.id=y=E+"-line-shape",d.href.baseVal="#"+f,(c=p.appendChild(v.createElementNS(te,"g"))).id=m=E+"-caps",s.capsMaskAnchorSE=[0,1].map((function(){var e=c.appendChild(v.createElementNS(te,"path"));return e.className.baseVal=x+"-caps-mask-anchor",e})),s.lineMaskMarkerIdSE=[E+"-caps-mask-marker-0",E+"-caps-mask-marker-1"],s.capsMaskMarkerSE=[0,1].map((function(e){return A(s.lineMaskMarkerIdSE[e])})),s.capsMaskMarkerShapeSE=[0,1].map((function(e){return e=s.capsMaskMarkerSE[e].appendChild(v.createElementNS(te,"use")),e.className.baseVal=x+"-caps-mask-marker-shape",e})),s.capsMaskLine=d=c.appendChild(v.createElementNS(te,"use")),d.className.baseVal=x+"-caps-mask-line",d.href.baseVal="#"+y,s.maskBGRect=d=L(p.appendChild(v.createElementNS(te,"rect"))),d.id=S=E+"-mask-bg-rect",d.className.baseVal=x+"-mask-bg-rect",le&&(d.style.fill="white"),s.lineMask=L(C(s.lineMaskId=E+"-line-mask")),s.lineMaskBG=d=s.lineMask.appendChild(v.createElementNS(te,"use")),d.href.baseVal="#"+S,s.lineMaskShape=d=s.lineMask.appendChild(v.createElementNS(te,"use")),d.className.baseVal=x+"-line-mask-shape",d.href.baseVal="#"+f,d.style.display="none",s.lineMaskCaps=d=s.lineMask.appendChild(v.createElementNS(te,"use")),d.href.baseVal="#"+m,s.lineOutlineMask=L(C(u=E+"-line-outline-mask")),(d=s.lineOutlineMask.appendChild(v.createElementNS(te,"use"))).href.baseVal="#"+S,s.lineOutlineMaskShape=d=s.lineOutlineMask.appendChild(v.createElementNS(te,"use")),d.className.baseVal=x+"-line-outline-mask-shape",d.href.baseVal="#"+f,s.lineOutlineMaskCaps=d=s.lineOutlineMask.appendChild(v.createElementNS(te,"use")),d.href.baseVal="#"+m,s.face=h.appendChild(v.createElementNS(te,"g")),s.lineFace=d=s.face.appendChild(v.createElementNS(te,"use")),d.href.baseVal="#"+y,s.lineOutlineFace=d=s.face.appendChild(v.createElementNS(te,"use")),d.href.baseVal="#"+y,d.style.mask="url(#"+u+")",d.style.display="none",s.plugMaskIdSE=[E+"-plug-mask-0",E+"-plug-mask-1"],s.plugMaskSE=[0,1].map((function(e){return C(s.plugMaskIdSE[e])})),s.plugMaskShapeSE=[0,1].map((function(e){return e=s.plugMaskSE[e].appendChild(v.createElementNS(te,"use")),e.className.baseVal=x+"-plug-mask-shape",e})),g=[],s.plugOutlineMaskSE=[0,1].map((function(e){return C(g[e]=E+"-plug-outline-mask-"+e)})),s.plugOutlineMaskShapeSE=[0,1].map((function(e){return e=s.plugOutlineMaskSE[e].appendChild(v.createElementNS(te,"use")),e.className.baseVal=x+"-plug-outline-mask-shape",e})),s.plugMarkerIdSE=[E+"-plug-marker-0",E+"-plug-marker-1"],s.plugMarkerSE=[0,1].map((function(e){return e=A(s.plugMarkerIdSE[e]),le&&(e.markerUnits.baseVal=SVGMarkerElement.SVG_MARKERUNITS_USERSPACEONUSE),e})),s.plugMarkerShapeSE=[0,1].map((function(e){return s.plugMarkerSE[e].appendChild(v.createElementNS(te,"g"))})),s.plugFaceSE=[0,1].map((function(e){return s.plugMarkerShapeSE[e].appendChild(v.createElementNS(te,"use"))})),s.plugOutlineFaceSE=[0,1].map((function(e){var t=s.plugMarkerShapeSE[e].appendChild(v.createElementNS(te,"use"));return t.style.mask="url(#"+g[e]+")",t.style.display="none",t})),s.plugsFace=d=s.face.appendChild(v.createElementNS(te,"use")),d.className.baseVal=x+"-plugs-face",d.href.baseVal="#"+y,d.style.display="none",s.curStats.show_inAnim?(s.isShown=1,t[_.show_effect].stop(s,!0)):s.isShown||(h.style.visibility="hidden"),v.body.appendChild(h),[0,1,2].forEach((function(e){var t;e=s.options.labelSEM[e];e&&i(e,"label")&&(t=_e[e._id]).conf.initSvg&&t.conf.initSvg(t,s)})),k.line=k.plug=k.lineOutline=k.plugOutline=k.faces=k.effect=!0),k.position=O(b,l,"path",N,null,null,se.path)||k.position,k.position=O(b,l,"startSocket",I,"socketSE",0)||k.position,k.position=O(b,l,"endSocket",I,"socketSE",1)||k.position,[l.startSocketGravity,l.endSocketGravity].forEach((function(e,t){var n,a,i=!1;null!=e&&(Array.isArray(e)?he(e[0])&&he(e[1])&&(i=[e[0],e[1]],Array.isArray(b.socketGravitySE[t])&&(n=i,a=b.socketGravitySE[t],n.length===a.length&&n.every((function(e,t){return e===a[t]})))&&(i=!1)):((e+"").toLowerCase()===z?i=null:he(e)&&0<=e&&(i=e),i===b.socketGravitySE[t]&&(i=!1)),!1!==i&&(b.socketGravitySE[t]=i,k.position=!0))})),k.line=M(b,l,"color",null,"lineColor",null,se.lineColor,null,!0)||k.line,k.line=M(b,l,"size",null,"lineSize",null,se.lineSize,(function(e){return 0<e}))||k.line,["startPlug","endPlug"].forEach((function(e,t){k.plug=O(b,l,e,F,"plugSE",t,se.plugSE[t])||k.plug,k.plug=M(b,l,e+"Color","string","plugColorSE",t,null,null,!0)||k.plug,k.plug=M(b,l,e+"Size",null,"plugSizeSE",t,se.plugSizeSE[t],(function(e){return 0<e}))||k.plug})),k.lineOutline=M(b,l,"outline",null,"lineOutlineEnabled",null,se.lineOutlineEnabled)||k.lineOutline,k.lineOutline=M(b,l,"outlineColor",null,"lineOutlineColor",null,se.lineOutlineColor,null,!0)||k.lineOutline,k.lineOutline=M(b,l,"outlineSize",null,"lineOutlineSize",null,se.lineOutlineSize,(function(e){return 0<e&&e<=.48}))||k.lineOutline,["startPlugOutline","endPlugOutline"].forEach((function(e,t){k.plugOutline=M(b,l,e,null,"plugOutlineEnabledSE",t,se.plugOutlineEnabledSE[t])||k.plugOutline,k.plugOutline=M(b,l,e+"Color","string","plugOutlineColorSE",t,null,null,!0)||k.plugOutline,k.plugOutline=M(b,l,e+"Size",null,"plugOutlineSizeSE",t,se.plugOutlineSizeSE[t],(function(e){return 1<=e}))||k.plugOutline})),["startLabel","endLabel","middleLabel"].forEach((function(e,t){var r,s,u,h=l[e],p=b.labelSEM[t]&&!o.optionIsAttach.labelSEM[t]?_e[b.labelSEM[t]._id].text:b.labelSEM[t],c=!1;if((r="string"==typeof h)&&(h=h.trim()),(r||h&&(c=i(h,"label")))&&h!==p){if(b.labelSEM[t]&&(at(o,_e[b.labelSEM[t]._id]),b.labelSEM[t]=""),h){if(c?(s=_e[(u=h)._id]).boundTargets.slice().forEach((function(e){s.conf.removeOption(s,e)})):u=new a(n.captionLabel,[h]),!nt(o,_e[u._id],e))throw new Error("Can't bind attachment");b.labelSEM[t]=u}o.optionIsAttach.labelSEM[t]=c}})),Object.keys(e).forEach((function(t){var n,a,i=e[t],r=t+"_enabled",s=t+"_options";function u(e){var t={};return i.optionsConf.forEach((function(n){var a=n[0],i=n[3];null==n[4]||t[i]||(t[i]=[]),("function"==typeof a?a:"id"===a?O:M).apply(null,[t,e].concat(n.slice(1)))})),t}function h(e){var n,a=t+"_animOptions";return e.hasOwnProperty("animation")?ue(e.animation)?n=o.curStats[a]=et(e.animation,i.defaultAnimOptions):(n=!!e.animation,o.curStats[a]=n?et({},i.defaultAnimOptions):null):(n=!!i.defaultEnabled,o.curStats[a]=n?et({},i.defaultAnimOptions):null),n}l.hasOwnProperty(t)&&(n=l[t],ue(n)?(o.curStats[r]=!0,a=o.curStats[s]=u(n),i.anim&&(o.curStats[s].animation=h(n))):(a=o.curStats[r]=!!n)&&(o.curStats[s]=u({}),i.anim&&(o.curStats[s].animation=h({}))),ke(a,b[t])&&(b[t]=a,k.effect=!0))})),$e(o,k)}function ot(n,a,i){var o={options:{anchorSE:[],socketSE:[],socketGravitySE:[],plugSE:[],plugColorSE:[],plugSizeSE:[],plugOutlineEnabledSE:[],plugOutlineColorSE:[],plugOutlineSizeSE:[],labelSEM:["","",""]},optionIsAttach:{anchorSE:[!1,!1],labelSEM:[!1,!1,!1]},curStats:{},aplStats:{},attachments:[],events:{},reflowTargets:[]};Ye(o.curStats,de),Ye(o.aplStats,de),Object.keys(e).forEach((function(t){var n=e[t].stats;Ye(o.curStats,n),Ye(o.aplStats,n),o.options[t]=!1})),Ye(o.curStats,fe),Ye(o.aplStats,fe),o.curStats.show_effect=ye,o.curStats.show_animOptions=we(t[ye].defaultAnimOptions),Object.defineProperty(this,"_id",{value:++ge}),o._id=this._id,Se[this._id]=o,1===arguments.length&&(i=n,n=null),i=i||{},(n||a)&&(i=we(i),n&&(i.start=n),a&&(i.end=a)),o.isShown=o.aplStats.show_on=!i.hide,this.setOptions(i)}function lt(e){return function(t){var n={};n[e]=t,this.setOptions(n)}}function rt(e,t){var n,a={conf:e,curStats:{},aplStats:{},boundTargets:[]},i={};e.argOptions.every((function(e){return!(!t.length||("string"==typeof e.type?typeof t[0]!==e.type:"function"!=typeof e.type||!e.type(t[0])))&&(i[e.optionName]=t.shift(),!0)})),n=t.length&&ue(t[0])?we(t[0]):{},Object.keys(i).forEach((function(e){n[e]=i[e]})),e.stats&&(Ye(a.curStats,e.stats),Ye(a.aplStats,e.stats)),Object.defineProperty(this,"_id",{value:++ve}),Object.defineProperty(this,"isRemoved",{get:function(){return!_e[this._id]}}),a._id=this._id,e.init&&!e.init(a,n)||(_e[this._id]=a)}return e={dash:{stats:{dash_len:{},dash_gap:{},dash_maxOffset:{}},anim:!0,defaultAnimOptions:{duration:1e3,timing:"linear"},optionsConf:[["type","len","number",null,null,null,function(e){return 0<e}],["type","gap","number",null,null,null,function(e){return 0<e}]],init:function(t){Ge(t,"apl_line_strokeWidth",e.dash.update),t.lineFace.style.strokeDashoffset=0,e.dash.update(t)},remove:function(t){var n=t.curStats;De(t,"apl_line_strokeWidth",e.dash.update),n.dash_animId&&(pe.remove(n.dash_animId),n.dash_animId=null),t.lineFace.style.strokeDasharray="none",t.lineFace.style.strokeDashoffset=0,Ye(t.aplStats,e.dash.stats)},update:function(e){var t,n=e.curStats,a=e.aplStats,i=a.dash_options,o=!1;n.dash_len=i.len||2*a.line_strokeWidth,n.dash_gap=i.gap||a.line_strokeWidth,n.dash_maxOffset=n.dash_len+n.dash_gap,o=Xe(e,a,"dash_len",n.dash_len)||o,(o=Xe(e,a,"dash_gap",n.dash_gap)||o)&&(e.lineFace.style.strokeDasharray=a.dash_len+","+a.dash_gap),n.dash_animOptions?(o=Xe(e,a,"dash_maxOffset",n.dash_maxOffset),a.dash_animOptions&&(o||ke(n.dash_animOptions,a.dash_animOptions))&&(n.dash_animId&&(t=pe.stop(n.dash_animId),pe.remove(n.dash_animId)),a.dash_animOptions=null),a.dash_animOptions||(n.dash_animId=pe.add((function(e){return(1-e)*a.dash_maxOffset+"px"}),(function(t){e.lineFace.style.strokeDashoffset=t}),n.dash_animOptions.duration,0,n.dash_animOptions.timing,!1,t),a.dash_animOptions=we(n.dash_animOptions))):a.dash_animOptions&&(n.dash_animId&&(pe.remove(n.dash_animId),n.dash_animId=null),e.lineFace.style.strokeDashoffset=0,a.dash_animOptions=null)}},gradient:{stats:{gradient_colorSE:{hasSE:!0},gradient_pointSE:{hasSE:!0,hasProps:!0}},optionsConf:[["type","startColor","string","colorSE",0,null,null,!0],["type","endColor","string","colorSE",1,null,null,!0]],init:function(t){var n=t.baseWindow.document,a=t.defs,i=x+"-"+t._id+"-gradient";t.efc_gradient_gradient=a=a.appendChild(n.createElementNS(te,"linearGradient")),a.id=i,a.gradientUnits.baseVal=SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE,[a.x1,a.y1,a.x2,a.y2].forEach((function(e){e.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,0)})),t.efc_gradient_stopSE=[0,1].map((function(e){var a=t.efc_gradient_gradient.appendChild(n.createElementNS(te,"stop"));try{a.offset.baseVal=e}catch(t){if(t.code!==DOMException.NO_MODIFICATION_ALLOWED_ERR)throw t;a.setAttribute("offset",e)}return a})),Ge(t,"cur_plug_colorSE",e.gradient.update),Ge(t,"apl_path",e.gradient.update),t.curStats.line_altColor=!0,t.lineFace.style.stroke="url(#"+i+")",e.gradient.update(t)},remove:function(t){t.efc_gradient_gradient&&(t.defs.removeChild(t.efc_gradient_gradient),t.efc_gradient_gradient=t.efc_gradient_stopSE=null),De(t,"cur_plug_colorSE",e.gradient.update),De(t,"apl_path",e.gradient.update),t.curStats.line_altColor=!1,t.lineFace.style.stroke=t.curStats.line_color,Ye(t.aplStats,e.gradient.stats)},update:function(e){var t,n=e.curStats,a=e.aplStats,i=a.gradient_options,o=e.pathList.animVal||e.pathList.baseVal;[0,1].forEach((function(e){n.gradient_colorSE[e]=i.colorSE[e]||n.plug_colorSE[e]})),t=o[0][0],n.gradient_pointSE[0]={x:t.x,y:t.y},t=(o=o[o.length-1])[o.length-1],n.gradient_pointSE[1]={x:t.x,y:t.y},[0,1].forEach((function(t){var i;Xe(e,a.gradient_colorSE,t,i=n.gradient_colorSE[t])&&(le?(i=Oe(i),e.efc_gradient_stopSE[t].style.stopColor=i[1],e.efc_gradient_stopSE[t].style.stopOpacity=i[0]):e.efc_gradient_stopSE[t].style.stopColor=i),["x","y"].forEach((function(o){(i=n.gradient_pointSE[t][o])!==a.gradient_pointSE[t][o]&&(e.efc_gradient_gradient[o+(t+1)].baseVal.value=a.gradient_pointSE[t][o]=i)}))}))}},dropShadow:{stats:{dropShadow_dx:{},dropShadow_dy:{},dropShadow_blur:{},dropShadow_color:{},dropShadow_opacity:{},dropShadow_x:{},dropShadow_y:{}},optionsConf:[["type","dx",null,null,null,2],["type","dy",null,null,null,4],["type","blur",null,null,null,3,function(e){return 0<=e}],["type","color",null,null,null,"#000",null,!0],["type","opacity",null,null,null,.8,function(e){return 0<=e&&e<=1}]],init:function(t){var n,a,i,o,l=t.baseWindow.document,r=t.defs,s=x+"-"+t._id+"-dropShadow",h=(n=l,a=s,o={},"boolean"!=typeof u&&(u=!!window.SVGFEDropShadowElement&&!le),o.elmsAppend=[o.elmFilter=l=n.createElementNS(te,"filter")],l.filterUnits.baseVal=SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE,l.x.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,0),l.y.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,0),l.width.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PERCENTAGE,100),l.height.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PERCENTAGE,100),l.id=a,u?(o.elmOffset=o.elmBlur=i=l.appendChild(n.createElementNS(te,"feDropShadow")),o.styleFlood=i.style):(o.elmBlur=l.appendChild(n.createElementNS(te,"feGaussianBlur")),o.elmOffset=i=l.appendChild(n.createElementNS(te,"feOffset")),i.result.baseVal="offsetblur",i=l.appendChild(n.createElementNS(te,"feFlood")),o.styleFlood=i.style,(i=l.appendChild(n.createElementNS(te,"feComposite"))).in2.baseVal="offsetblur",i.operator.baseVal=SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_IN,(i=l.appendChild(n.createElementNS(te,"feMerge"))).appendChild(n.createElementNS(te,"feMergeNode")),i.appendChild(n.createElementNS(te,"feMergeNode")).in1.baseVal="SourceGraphic"),o);["elmFilter","elmOffset","elmBlur","styleFlood","elmsAppend"].forEach((function(e){t["efc_dropShadow_"+e]=h[e]})),h.elmsAppend.forEach((function(e){r.appendChild(e)})),t.face.setAttribute("filter","url(#"+s+")"),Ge(t,"new_edge4viewBox",e.dropShadow.adjustEdge),e.dropShadow.update(t)},remove:function(t){var n=t.defs;t.efc_dropShadow_elmsAppend&&(t.efc_dropShadow_elmsAppend.forEach((function(e){n.removeChild(e)})),t.efc_dropShadow_elmFilter=t.efc_dropShadow_elmOffset=t.efc_dropShadow_elmBlur=t.efc_dropShadow_styleFlood=t.efc_dropShadow_elmsAppend=null),De(t,"new_edge4viewBox",e.dropShadow.adjustEdge),$e(t,{}),t.face.removeAttribute("filter"),Ye(t.aplStats,e.dropShadow.stats)},update:function(e){var t,n,a=e.curStats,i=e.aplStats,o=i.dropShadow_options;a.dropShadow_dx=t=o.dx,Xe(e,i,"dropShadow_dx",t)&&(e.efc_dropShadow_elmOffset.dx.baseVal=t,n=!0),a.dropShadow_dy=t=o.dy,Xe(e,i,"dropShadow_dy",t)&&(e.efc_dropShadow_elmOffset.dy.baseVal=t,n=!0),a.dropShadow_blur=t=o.blur,Xe(e,i,"dropShadow_blur",t)&&(e.efc_dropShadow_elmBlur.setStdDeviation(t,t),n=!0),n&&$e(e,{}),a.dropShadow_color=t=o.color,Xe(e,i,"dropShadow_color",t)&&(e.efc_dropShadow_styleFlood.floodColor=t),a.dropShadow_opacity=t=o.opacity,Xe(e,i,"dropShadow_opacity",t)&&(e.efc_dropShadow_styleFlood.floodOpacity=t)},adjustEdge:function(e,t){var n,a=e.curStats,i=e.aplStats;null!=a.dropShadow_dx&&(n=3*a.dropShadow_blur,(n={x1:t.x1-n+a.dropShadow_dx,y1:t.y1-n+a.dropShadow_dy,x2:t.x2+n+a.dropShadow_dx,y2:t.y2+n+a.dropShadow_dy}).x1<t.x1&&(t.x1=n.x1),n.y1<t.y1&&(t.y1=n.y1),n.x2>t.x2&&(t.x2=n.x2),n.y2>t.y2&&(t.y2=n.y2),["x","y"].forEach((function(n){var o,l="dropShadow_"+n;a[l]=o=t[n+"1"],Xe(e,i,l,o)&&(e.efc_dropShadow_elmFilter[n].baseVal.value=o)})))}}},Object.keys(e).forEach((function(t){var n=e[t],a=n.stats;a[t+"_enabled"]={iniValue:!1},a[t+"_options"]={hasProps:!0},n.anim&&(a[t+"_animOptions"]={},a[t+"_animId"]={})})),t={none:{defaultAnimOptions:{},init:function(e,n){var a=e.curStats;a.show_animId&&(pe.remove(a.show_animId),a.show_animId=null),t.none.start(e,n)},start:function(e,n){t.none.stop(e,!0)},stop:function(e,t,n){var a=e.curStats;return n=null!=n?n:e.aplStats.show_on,a.show_inAnim=!1,t&&Je(e,n),n?1:0}},fade:{defaultAnimOptions:{duration:300,timing:"linear"},init:function(e,n){var a=e.curStats,i=e.aplStats;a.show_animId&&pe.remove(a.show_animId),a.show_animId=pe.add((function(e){return e}),(function(n,a){a?t.fade.stop(e,!0):(e.svg.style.opacity=n+"",ae&&(je(e,e.svg),He(e)))}),i.show_animOptions.duration,1,i.show_animOptions.timing,null,!1),t.fade.start(e,n)},start:function(e,t){var n,a=e.curStats;a.show_inAnim&&(n=pe.stop(a.show_animId)),Je(e,1),a.show_inAnim=!0,pe.start(a.show_animId,!e.aplStats.show_on,null!=t?t:n)},stop:function(e,t,n){var a,i=e.curStats;return n=null!=n?n:e.aplStats.show_on,a=i.show_inAnim?pe.stop(i.show_animId):n?1:0,i.show_inAnim=!1,t&&(e.svg.style.opacity=n?"":"0",Je(e,n)),a}},draw:{defaultAnimOptions:{duration:500,timing:[.58,0,.42,1]},init:function(e,n){var a=e.curStats,i=e.aplStats,o=e.pathList.baseVal,l=Re(o),r=l.segsLen,s=l.lenAll;a.show_animId&&pe.remove(a.show_animId),a.show_animId=pe.add((function(e){var t,n,a,i=-1;if(0===e)n=[[o[0][0],o[0][0]]];else if(1===e)n=o;else{for(t=s*e,n=[];t>=r[++i];)n.push(o[i]),t-=r[i];t&&(2===(a=o[i]).length?n.push([a[0],Ve(a[0],a[1],t/r[i])]):(e=Ne(a[0],a[1],a[2],a[3],We(a[0],a[1],a[2],a[3],t)),n.push([a[0],e.fromP1,e.fromP2,e])))}return n}),(function(n,a){a?t.draw.stop(e,!0):(e.pathList.animVal=n,$e(e,{path:!0}))}),i.show_animOptions.duration,1,i.show_animOptions.timing,null,!1),t.draw.start(e,n)},start:function(e,n){var a,i=e.curStats;i.show_inAnim&&(a=pe.stop(i.show_animId)),Je(e,1),i.show_inAnim=!0,Ge(e,"apl_position",t.draw.update),pe.start(i.show_animId,!e.aplStats.show_on,null!=n?n:a)},stop:function(e,t,n){var a,i=e.curStats;return n=null!=n?n:e.aplStats.show_on,a=i.show_inAnim?pe.stop(i.show_animId):n?1:0,i.show_inAnim=!1,t&&(e.pathList.animVal=n?null:[[e.pathList.baseVal[0][0],e.pathList.baseVal[0][0]]],$e(e,{path:!0}),Je(e,n)),a},update:function(e){De(e,"apl_position",t.draw.update),e.curStats.show_inAnim?t.draw.init(e,t.draw.stop(e)):e.aplStats.show_animOptions={}}}},[["start","anchorSE",0],["end","anchorSE",1],["color","lineColor"],["size","lineSize"],["startSocketGravity","socketGravitySE",0],["endSocketGravity","socketGravitySE",1],["startPlugColor","plugColorSE",0],["endPlugColor","plugColorSE",1],["startPlugSize","plugSizeSE",0],["endPlugSize","plugSizeSE",1],["outline","lineOutlineEnabled"],["outlineColor","lineOutlineColor"],["outlineSize","lineOutlineSize"],["startPlugOutline","plugOutlineEnabledSE",0],["endPlugOutline","plugOutlineEnabledSE",1],["startPlugOutlineColor","plugOutlineColorSE",0],["endPlugOutlineColor","plugOutlineColorSE",1],["startPlugOutlineSize","plugOutlineSizeSE",0],["endPlugOutlineSize","plugOutlineSizeSE",1]].forEach((function(e){var t=e[0],n=e[1],a=e[2];Object.defineProperty(ot.prototype,t,{get:function(){var e=null!=a?Se[this._id].options[n][a]:n?Se[this._id].options[n]:Se[this._id].options[t];return null==e?z:we(e)},set:lt(t),enumerable:!0})})),[["path",N],["startSocket",I,"socketSE",0],["endSocket",I,"socketSE",1],["startPlug",F,"plugSE",0],["endPlug",F,"plugSE",1]].forEach((function(e){var t=e[0],n=e[1],a=e[2],i=e[3];Object.defineProperty(ot.prototype,t,{get:function(){var e,o=null!=i?Se[this._id].options[a][i]:a?Se[this._id].options[a]:Se[this._id].options[t];return o?Object.keys(n).some((function(t){return n[t]===o&&(e=t,!0)}))?e:new Error("It's broken"):z},set:lt(t),enumerable:!0})})),Object.keys(e).forEach((function(t){var n=e[t];Object.defineProperty(ot.prototype,t,{get:function(){var e,a,i=Se[this._id].options[t];return ue(i)?(e=i,a=n.optionsConf.reduce((function(t,n){var a,i=n[0],o=n[1],l=n[2],r=n[3],s=(n=n[4],null!=n?e[r][n]:r?e[r]:e[o]);return t[o]="id"===i?s?Object.keys(l).some((function(e){return l[e]===s&&(a=e,!0)}))?a:new Error("It's broken"):z:null==s?z:we(s),t}),{}),n.anim&&(a.animation=we(e.animation)),a):i},set:lt(t),enumerable:!0})})),["startLabel","endLabel","middleLabel"].forEach((function(e,t){Object.defineProperty(ot.prototype,e,{get:function(){var e=Se[this._id],n=e.options;return n.labelSEM[t]&&!e.optionIsAttach.labelSEM[t]?_e[n.labelSEM[t]._id].text:n.labelSEM[t]||""},set:lt(e),enumerable:!0})})),ot.prototype.setOptions=function(e){return it(Se[this._id],e),this},ot.prototype.position=function(){return $e(Se[this._id],{position:!0}),this},ot.prototype.remove=function(){var t=Se[this._id],n=t.curStats;Object.keys(e).forEach((function(e){e+="_animId",n[e]&&pe.remove(n[e])})),n.show_animId&&pe.remove(n.show_animId),t.attachments.slice().forEach((function(e){at(t,e)})),t.baseWindow&&t.svg&&t.baseWindow.document.body.removeChild(t.svg),delete Se[this._id]},ot.prototype.show=function(e,t){return tt(Se[this._id],!0,e,t),this},ot.prototype.hide=function(e,t){return tt(Se[this._id],!1,e,t),this},o=function(e){e&&_e[e._id]&&(e.boundTargets.slice().forEach((function(t){at(t.props,e,!0)})),e.conf.remove&&e.conf.remove(e),delete _e[e._id])},rt.prototype.remove=function(){var e=this,t=_e[e._id];t&&(t.boundTargets.slice().forEach((function(e){t.conf.removeOption(t,e)})),ze((function(){var t=_e[e._id];t&&(console.error("LeaderLineAttachment was not removed by removeOption"),o(t))})))},a=rt,window.LeaderLineAttachment=a,i=function(e,t){return e instanceof a&&(!(e.isRemoved||t&&_e[e._id].conf.type!==t)||null)},n={pointAnchor:{type:"anchor",argOptions:[{optionName:"element",type:Me}],init:function(e,t){return e.element=n.pointAnchor.checkElement(t.element),e.x=n.pointAnchor.parsePercent(t.x,!0)||[.5,!0],e.y=n.pointAnchor.parsePercent(t.y,!0)||[.5,!0],!0},removeOption:function(e,t){var i=t.props,o={},l=e.element;e=i.options.anchorSE["start"===t.optionName?1:0];l===e&&(l=e===document.body?new a(n.pointAnchor,[l]):document.body),o[t.optionName]=l,it(i,o)},getBBoxNest:function(e,t){var n=Ae(e.element,t.baseWindow),a=n.width;t=n.height;return n.width=n.height=0,n.left=n.right=n.left+e.x[0]*(e.x[1]?a:1),n.top=n.bottom=n.top+e.y[0]*(e.y[1]?t:1),n},parsePercent:function(e,t){var n,a,i=!1;return he(e)?a=e:"string"==typeof e&&(n=ee.exec(e))&&n[2]&&(i=0!==(a=parseFloat(n[1])/100)),null!=a&&(t||0<=a)?[a,i]:null},checkElement:function(e){if(null==e)e=document.body;else if(!Me(e))throw new Error("`element` must be Element");return e}},areaAnchor:{type:"anchor",argOptions:[{optionName:"element",type:Me},{optionName:"shape",type:"string"}],stats:{color:{},strokeWidth:{},elementWidth:{},elementHeight:{},elementLeft:{},elementTop:{},pathListRel:{},bBoxRel:{},pathData:{},viewBoxBBox:{hasProps:!0},dashLen:{},dashGap:{}},init:function(e,t){var a,i=[];return e.element=n.pointAnchor.checkElement(t.element),"string"==typeof t.color&&(e.color=t.color.trim()),"string"==typeof t.fillColor&&(e.fill=t.fillColor.trim()),he(t.size)&&0<=t.size&&(e.size=t.size),t.dash&&(e.dash=!0,he(t.dash.len)&&0<t.dash.len&&(e.dashLen=t.dash.len),he(t.dash.gap)&&0<t.dash.gap&&(e.dashGap=t.dash.gap)),"circle"===t.shape?e.shape=t.shape:"polygon"===t.shape&&Array.isArray(t.points)&&3<=t.points.length&&t.points.every((function(t){var a={};return!(!(a.x=n.pointAnchor.parsePercent(t[0],!0))||!(a.y=n.pointAnchor.parsePercent(t[1],!0)))&&(i.push(a),(a.x[1]||a.y[1])&&(e.hasRatio=!0),!0)}))?(e.shape=t.shape,e.points=i):(e.shape="rect",e.radius=he(t.radius)&&0<=t.radius?t.radius:0),"rect"!==e.shape&&"circle"!==e.shape||(e.x=n.pointAnchor.parsePercent(t.x,!0)||[-.05,!0],e.y=n.pointAnchor.parsePercent(t.y,!0)||[-.05,!0],e.width=n.pointAnchor.parsePercent(t.width)||[1.1,!0],e.height=n.pointAnchor.parsePercent(t.height)||[1.1,!0],(e.x[1]||e.y[1]||e.width[1]||e.height[1])&&(e.hasRatio=!0)),a=e.element.ownerDocument,e.svg=t=a.createElementNS(te,"svg"),t.className.baseVal=x+"-areaAnchor",t.viewBox.baseVal||t.setAttribute("viewBox","0 0 0 0"),e.path=t.appendChild(a.createElementNS(te,"path")),e.path.style.fill=e.fill||"none",e.isShown=!1,t.style.visibility="hidden",a.body.appendChild(t),Qe(a=a.defaultView),e.bodyOffset=qe(a),e.updateColor=function(){var t=e.curStats,n=e.aplStats,a=e.boundTargets.length?e.boundTargets[0].props.curStats:null;t.color=a=e.color||(a?a.line_color:se.lineColor),Xe(e,n,"color",a)&&(e.path.style.stroke=a)},e.updateShow=function(){Je(e,e.boundTargets.some((function(e){return!0===e.props.isShown})))},!0},bind:function(e,t){return t=t.props,e.color||Ge(t,"cur_line_color",e.updateColor),Ge(t,"svgShow",e.updateShow),ze((function(){e.updateColor(),e.updateShow()})),!0},unbind:function(e,t){t=t.props,e.color||De(t,"cur_line_color",e.updateColor),De(t,"svgShow",e.updateShow),1<e.boundTargets.length&&ze((function(){e.updateColor(),e.updateShow(),n.areaAnchor.update(e)&&e.boundTargets.forEach((function(e){$e(e.props,{position:!0})}))}))},removeOption:function(e,t){n.pointAnchor.removeOption(e,t)},remove:function(e){e.boundTargets.length&&(console.error("LeaderLineAttachment was not unbound by remove"),e.boundTargets.forEach((function(t){n.areaAnchor.unbind(e,t)}))),e.svg.parentNode.removeChild(e.svg)},getStrokeWidth:function(e,t){return n.areaAnchor.update(e)&&1<e.boundTargets.length&&ze((function(){e.boundTargets.forEach((function(e){e.props!==t&&$e(e.props,{position:!0})}))})),e.curStats.strokeWidth},getPathData:function(e,t){var n=Ae(e.element,t.baseWindow);return Be(e.curStats.pathListRel,(function(e){e.x+=n.left,e.y+=n.top}))},getBBoxNest:function(e,t){return t=Ae(e.element,t.baseWindow),e=e.curStats.bBoxRel,{left:e.left+t.left,top:e.top+t.top,right:e.right+t.left,bottom:e.bottom+t.top,width:e.width,height:e.height}},update:function(e){var t,n,a,i,o,l,r,s,u,h,p,c,d,f,y,m,S=e.curStats,g=e.aplStats,_=e.boundTargets.length?e.boundTargets[0].props.curStats:null,v={};if(v.strokeWidth=Xe(e,S,"strokeWidth",null!=e.size?e.size:_?_.line_strokeWidth:se.lineSize),t=Ie(e.element),v.elementWidth=Xe(e,S,"elementWidth",t.width),v.elementHeight=Xe(e,S,"elementHeight",t.height),v.elementLeft=Xe(e,S,"elementLeft",t.left),v.elementTop=Xe(e,S,"elementTop",t.top),v.strokeWidth||e.hasRatio&&(v.elementWidth||v.elementHeight)){switch(e.shape){case"rect":(c={left:e.x[0]*(e.x[1]?t.width:1),top:e.y[0]*(e.y[1]?t.height:1),width:e.width[0]*(e.width[1]?t.width:1),height:e.height[0]*(e.height[1]?t.height:1)}).right=c.left+c.width,c.bottom=c.top+c.height,p=S.strokeWidth/2,s=(r=Math.min(c.width,c.height))?r/2*Math.SQRT2+p:0,h=(r=e.radius?e.radius<=s?e.radius:s:0)?(s=(r-p)/Math.SQRT2,h=[{x:c.left-(u=r-s),y:c.top+s},{x:c.left+s,y:c.top-u},{x:c.right-s,y:c.top-u},{x:c.right+u,y:c.top+s},{x:c.right+u,y:c.bottom-s},{x:c.right-s,y:c.bottom+u},{x:c.left+s,y:c.bottom+u},{x:c.left-u,y:c.bottom-s}],S.pathListRel=[[h[0],{x:h[0].x,y:h[0].y-(p=r*J)},{x:h[1].x-p,y:h[1].y},h[1]]],h[1].x!==h[2].x&&S.pathListRel.push([h[1],h[2]]),S.pathListRel.push([h[2],{x:h[2].x+p,y:h[2].y},{x:h[3].x,y:h[3].y-p},h[3]]),h[3].y!==h[4].y&&S.pathListRel.push([h[3],h[4]]),S.pathListRel.push([h[4],{x:h[4].x,y:h[4].y+p},{x:h[5].x+p,y:h[5].y},h[5]]),h[5].x!==h[6].x&&S.pathListRel.push([h[5],h[6]]),S.pathListRel.push([h[6],{x:h[6].x-p,y:h[6].y},{x:h[7].x,y:h[7].y+p},h[7]]),h[7].y!==h[0].y&&S.pathListRel.push([h[7],h[0]]),S.pathListRel.push([]),u=r-s+S.strokeWidth/2,[{x:c.left-u,y:c.top-u},{x:c.right+u,y:c.bottom+u}]):(u=S.strokeWidth/2,h=[{x:c.left-u,y:c.top-u},{x:c.right+u,y:c.bottom+u}],S.pathListRel=[[h[0],{x:h[1].x,y:h[0].y}],[{x:h[1].x,y:h[0].y},h[1]],[h[1],{x:h[0].x,y:h[1].y}],[]],[{x:c.left-S.strokeWidth,y:c.top-S.strokeWidth},{x:c.right+S.strokeWidth,y:c.bottom+S.strokeWidth}]),S.bBoxRel={left:h[0].x,top:h[0].y,right:h[1].x,bottom:h[1].y,width:h[1].x-h[0].x,height:h[1].y-h[0].y};break;case"circle":(l={left:e.x[0]*(e.x[1]?t.width:1),top:e.y[0]*(e.y[1]?t.height:1),width:e.width[0]*(e.width[1]?t.width:1),height:e.height[0]*(e.height[1]?t.height:1)}).width||l.height||(l.width=l.height=10),l.width||(l.width=l.height),l.height||(l.height=l.width),l.right=l.left+l.width,l.bottom=l.top+l.height,p=l.left+l.width/2,r=l.top+l.height/2,o=S.strokeWidth/2,s=l.width/2,u=l.height/2,c=s*Math.SQRT2+o,h=u*Math.SQRT2+o,S.pathListRel=[[(o=[{x:p-c,y:r},{x:p,y:r-h},{x:p+c,y:r},{x:p,y:r+h}])[0],{x:o[0].x,y:o[0].y-(p=h*J)},{x:o[1].x-(r=c*J),y:o[1].y},o[1]],[o[1],{x:o[1].x+r,y:o[1].y},{x:o[2].x,y:o[2].y-p},o[2]],[o[2],{x:o[2].x,y:o[2].y+p},{x:o[3].x+r,y:o[3].y},o[3]],[o[3],{x:o[3].x-r,y:o[3].y},{x:o[0].x,y:o[0].y+p},o[0]],[]],s=c-s+S.strokeWidth/2,u=h-u+S.strokeWidth/2,o=[{x:l.left-s,y:l.top-u},{x:l.right+s,y:l.bottom+u}],S.bBoxRel={left:o[0].x,top:o[0].y,right:o[1].x,bottom:o[1].y,width:o[1].x-o[0].x,height:o[1].y-o[0].y};break;case"polygon":e.points.forEach((function(e){var n=e.x[0]*(e.x[1]?t.width:1);e=e.y[0]*(e.y[1]?t.height:1);a?(n<a.left&&(a.left=n),n>a.right&&(a.right=n),e<a.top&&(a.top=e),e>a.bottom&&(a.bottom=e)):a={left:n,right:n,top:e,bottom:e},i?S.pathListRel.push([i,{x:n,y:e}]):S.pathListRel=[],i={x:n,y:e}})),S.pathListRel.push([]),o=S.strokeWidth/2,o=[{x:a.left-o,y:a.top-o},{x:a.right+o,y:a.bottom+o}],S.bBoxRel={left:o[0].x,top:o[0].y,right:o[1].x,bottom:o[1].y,width:o[1].x-o[0].x,height:o[1].y-o[0].y}}v.pathListRel=v.bBoxRel=!0}return(v.pathListRel||v.elementLeft||v.elementTop)&&(S.pathData=Be(S.pathListRel,(function(e){e.x+=t.left,e.y+=t.top}))),Xe(e,g,"strokeWidth",n=S.strokeWidth)&&(e.path.style.strokeWidth=n+"px"),Fe(n=S.pathData,g.pathData)&&(e.path.setPathData(n),g.pathData=n,v.pathData=!0),e.dash&&(!v.pathData&&(!v.strokeWidth||e.dashLen&&e.dashGap)||(S.dashLen=e.dashLen||2*S.strokeWidth,S.dashGap=e.dashGap||S.strokeWidth),v.dash=Xe(e,g,"dashLen",S.dashLen)||v.dash,v.dash=Xe(e,g,"dashGap",S.dashGap)||v.dash,v.dash&&(e.path.style.strokeDasharray=g.dashLen+","+g.dashGap)),d=S.viewBoxBBox,f=g.viewBoxBBox,y=e.svg.viewBox.baseVal,m=e.svg.style,d.x=S.bBoxRel.left+t.left,d.y=S.bBoxRel.top+t.top,d.width=S.bBoxRel.width,d.height=S.bBoxRel.height,["x","y","width","height"].forEach((function(t){(n=d[t])!==f[t]&&(y[t]=f[t]=n,m[j[t]]=n+("x"===t||"y"===t?e.bodyOffset[t]:0)+"px")})),v.strokeWidth||v.pathListRel||v.bBoxRel}},mouseHoverAnchor:{type:"anchor",argOptions:[{optionName:"element",type:Me},{optionName:"showEffectName",type:"string"}],style:{backgroundImage:"url('data:image/svg+xml;charset=utf-8;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cG9seWdvbiBwb2ludHM9IjI0LDAgMCw4IDgsMTEgMCwxOSA1LDI0IDEzLDE2IDE2LDI0IiBmaWxsPSJjb3JhbCIvPjwvc3ZnPg==')",backgroundSize:"",backgroundRepeat:"no-repeat",backgroundColor:"#f8f881",cursor:"default"},hoverStyle:{backgroundImage:"none",backgroundColor:"#fadf8f"},padding:{top:1,right:15,bottom:1,left:2},minHeight:15,backgroundPosition:{right:2,top:2},backgroundSize:{width:12,height:12},dirKeys:[["top","Top"],["right","Right"],["bottom","Bottom"],["left","Left"]],init:function(e,a){var i,o,l,r,s,u,h,p,c,d=n.mouseHoverAnchor,f={};if(e.element=n.pointAnchor.checkElement(a.element),h=e.element,!((p=h.ownerDocument)&&(c=p.defaultView)&&c.HTMLElement&&h instanceof c.HTMLElement))throw new Error("`element` must be HTML element");return d.style.backgroundSize=d.backgroundSize.width+"px "+d.backgroundSize.height+"px",["style","hoverStyle"].forEach((function(t){var n=d[t];e[t]=Object.keys(n).reduce((function(e,t){return e[t]=n[t],e}),{})})),"inline"===(i=e.element.ownerDocument.defaultView.getComputedStyle(e.element,"")).display?e.style.display="inline-block":"none"===i.display&&(e.style.display="block"),n.mouseHoverAnchor.dirKeys.forEach((function(t){var n=t[0];t="padding"+t[1];parseFloat(i[t])<d.padding[n]&&(e.style[t]=d.padding[n]+"px")})),e.style.display&&(l=e.element.style.display,e.element.style.display=e.style.display),n.mouseHoverAnchor.dirKeys.forEach((function(t){t="padding"+t[1],e.style[t]&&(f[t]=e.element.style[t],e.element.style[t]=e.style[t])})),(h=e.element.getBoundingClientRect()).height<d.minHeight&&(ae?(c=d.minHeight,"content-box"===i.boxSizing?c-=parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth)+parseFloat(i.paddingTop)+parseFloat(i.paddingBottom):"padding-box"===i.boxSizing&&(c-=parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth)),e.style.height=c+"px"):e.style.height=parseFloat(i.height)+(d.minHeight-h.height)+"px"),e.style.backgroundPosition=le?h.width-d.backgroundSize.width-d.backgroundPosition.right+"px "+d.backgroundPosition.top+"px":"right "+d.backgroundPosition.right+"px top "+d.backgroundPosition.top+"px",e.style.display&&(e.element.style.display=l),n.mouseHoverAnchor.dirKeys.forEach((function(t){t="padding"+t[1],e.style[t]&&(e.element.style[t]=f[t])})),["style","hoverStyle"].forEach((function(t){var n=e[t],i=a[t];ue(i)&&Object.keys(i).forEach((function(e){"string"==typeof i[e]||he(i[e])?n[e]=i[e]:null==i[e]&&delete n[e]}))})),"function"==typeof a.onSwitch&&(u=a.onSwitch),a.showEffectName&&t[a.showEffectName]&&(e.showEffectName=r=a.showEffectName),s=a.animOptions,e.elmStyle=o=e.element.style,e.mouseenter=function(t){e.hoverStyleSave=d.getStyles(o,Object.keys(e.hoverStyle)),d.setStyles(o,e.hoverStyle),e.boundTargets.forEach((function(e){tt(e.props,!0,r,s)})),u&&u(t)},e.mouseleave=function(t){d.setStyles(o,e.hoverStyleSave),e.boundTargets.forEach((function(e){tt(e.props,!1,r,s)})),u&&u(t)},!0},bind:function(e,t){var a,i,o,l,r;return t.props.svg?n.mouseHoverAnchor.llShow(t.props,!1,e.showEffectName):ze((function(){n.mouseHoverAnchor.llShow(t.props,!1,e.showEffectName)})),e.enabled||(e.styleSave=n.mouseHoverAnchor.getStyles(e.elmStyle,Object.keys(e.style)),n.mouseHoverAnchor.setStyles(e.elmStyle,e.style),e.removeEventListener=(a=e.element,i=e.mouseenter,o=e.mouseleave,"onmouseenter"in a&&"onmouseleave"in a?(a.addEventListener("mouseenter",i,!1),a.addEventListener("mouseleave",o,!1),function(){a.removeEventListener("mouseenter",i,!1),a.removeEventListener("mouseleave",o,!1)}):(console.warn("mouseenter and mouseleave events polyfill is enabled."),a.addEventListener("mouseover",l=function(e){e.relatedTarget&&(e.relatedTarget===this||this.compareDocumentPosition(e.relatedTarget)&Node.DOCUMENT_POSITION_CONTAINED_BY)||i.apply(this,arguments)}),a.addEventListener("mouseout",r=function(e){e.relatedTarget&&(e.relatedTarget===this||this.compareDocumentPosition(e.relatedTarget)&Node.DOCUMENT_POSITION_CONTAINED_BY)||o.apply(this,arguments)}),function(){a.removeEventListener("mouseover",l,!1),a.removeEventListener("mouseout",r,!1)})),e.enabled=!0),!0},unbind:function(e,t){e.enabled&&e.boundTargets.length<=1&&(e.removeEventListener(),n.mouseHoverAnchor.setStyles(e.elmStyle,e.styleSave),e.enabled=!1),n.mouseHoverAnchor.llShow(t.props,!0,e.showEffectName)},removeOption:function(e,t){n.pointAnchor.removeOption(e,t)},remove:function(e){e.boundTargets.length&&(console.error("LeaderLineAttachment was not unbound by remove"),e.boundTargets.forEach((function(t){n.mouseHoverAnchor.unbind(e,t)})))},getBBoxNest:function(e,t){return Ae(e.element,t.baseWindow)},llShow:function(e,n,a){t[a||e.curStats.show_effect].stop(e,!0,n),e.aplStats.show_on=n},getStyles:function(e,t){return t.reduce((function(t,n){return t[n]=e[n],t}),{})},setStyles:function(e,t){Object.keys(t).forEach((function(n){e[n]=t[n]}))}},captionLabel:{type:"label",argOptions:[{optionName:"text",type:"string"}],stats:{color:{},x:{},y:{}},textStyleProps:["fontFamily","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","kerning","letterSpacing","wordSpacing","textDecoration"],init:function(e,t){return"string"==typeof t.text&&(e.text=t.text.trim()),!!e.text&&("string"==typeof t.color&&(e.color=t.color.trim()),e.outlineColor="string"==typeof t.outlineColor?t.outlineColor.trim():"#fff",Array.isArray(t.offset)&&he(t.offset[0])&&he(t.offset[1])&&(e.offset={x:t.offset[0],y:t.offset[1]}),he(t.lineOffset)&&(e.lineOffset=t.lineOffset),n.captionLabel.textStyleProps.forEach((function(n){null!=t[n]&&(e[n]=t[n])})),e.updateColor=function(t){n.captionLabel.updateColor(e,t)},e.updateSocketXY=function(t){var n,a=e.curStats,i=e.aplStats,o=t.curStats,l=o.position_socketXYSE[e.socketIndex];null!=l.x&&(e.offset?(a.x=l.x+e.offset.x,a.y=l.y+e.offset.y):(n=e.height/2,t=Math.max(o.attach_plugSideLenSE[e.socketIndex]||0,o.line_strokeWidth/2),o=o.position_socketXYSE[e.socketIndex?0:1],l.socketId===M||l.socketId===w?(a.x=l.socketId===M?l.x-n-e.width:l.x+n,a.y=o.y<l.y?l.y+t+n:l.y-t-n-e.height):(a.x=o.x<l.x?l.x+t+n:l.x-t-n-e.width,a.y=l.socketId===k?l.y-n-e.height:l.y+n)),Xe(e,i,"x",n=a.x)&&(e.elmPosition.x.baseVal.getItem(0).value=n),Xe(e,i,"y",n=a.y)&&(e.elmPosition.y.baseVal.getItem(0).value=n+e.height))},e.updatePath=function(t){var a=e.curStats,i=e.aplStats;t=t.pathList.animVal||t.pathList.baseVal;t&&(t=n.captionLabel.getMidPoint(t,e.lineOffset),a.x=t.x-e.width/2,a.y=t.y-e.height/2,Xe(e,i,"x",t=a.x)&&(e.elmPosition.x.baseVal.getItem(0).value=t),Xe(e,i,"y",t=a.y)&&(e.elmPosition.y.baseVal.getItem(0).value=t+e.height))},e.updateShow=function(t){n.captionLabel.updateShow(e,t)},le&&(e.adjustEdge=function(t,a){var i=e.curStats;null!=i.x&&n.captionLabel.adjustEdge(a,{x:i.x,y:i.y,width:e.width,height:e.height},e.strokeWidth/2)}),!0)},updateColor:function(e,t){var n=e.curStats,a=e.aplStats;t=t.curStats;n.color=t=e.color||t.line_color,Xe(e,a,"color",t)&&(e.styleFill.fill=t)},updateShow:function(e,t){t=!0===t.isShown,t!==e.isShown&&(e.styleShow.visibility=t?"":"hidden",e.isShown=t)},adjustEdge:function(e,t,n){n={x1:t.x-n,y1:t.y-n,x2:t.x+t.width+n,y2:t.y+t.height+n},n.x1<e.x1&&(e.x1=n.x1),n.y1<e.y1&&(e.y1=n.y1),n.x2>e.x2&&(e.x2=n.x2),n.y2>e.y2&&(e.y2=n.y2)},newText:function(e,t,n,a,i){var o,l,r=t.createElementNS(te,"text");return r.textContent=e,[r.x,r.y].forEach((function(e){var t=n.createSVGLength();t.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,0),e.baseVal.initialize(t)})),"boolean"!=typeof s&&(s="paintOrder"in r.style),i&&!s?(o=t.createElementNS(te,"defs"),r.id=a,o.appendChild(r),(l=(e=t.createElementNS(te,"g")).appendChild(t.createElementNS(te,"use"))).href.baseVal="#"+a,(t=e.appendChild(t.createElementNS(te,"use"))).href.baseVal="#"+a,(l=l.style).strokeLinejoin="round",{elmPosition:r,styleText:r.style,styleFill:t.style,styleStroke:l,styleShow:e.style,elmsAppend:[o,e]}):(l=r.style,i&&(l.strokeLinejoin="round",l.paintOrder="stroke"),{elmPosition:r,styleText:l,styleFill:l,styleStroke:i?l:null,styleShow:l,elmsAppend:[r]})},getMidPoint:function(e,t){var n,a,i=Re(e),o=i.segsLen,l=(i=i.lenAll,-1),r=i/2+(t||0);if(r<=0)return 2===(n=e[0]).length?Ve(n[0],n[1],0):Ne(n[0],n[1],n[2],n[3],0);if(i<=r)return 2===(n=e[e.length-1]).length?Ve(n[0],n[1],1):Ne(n[0],n[1],n[2],n[3],1);for(a=[];r>o[++l];)a.push(e[l]),r-=o[l];return 2===(n=e[l]).length?Ve(n[0],n[1],r/o[l]):Ne(n[0],n[1],n[2],n[3],We(n[0],n[1],n[2],n[3],r))},initSvg:function(e,t){var a,i,o=n.captionLabel.newText(e.text,t.baseWindow.document,t.svg,x+"-captionLabel-"+e._id,e.outlineColor);["elmPosition","styleFill","styleShow","elmsAppend"].forEach((function(t){e[t]=o[t]})),e.isShown=!1,e.styleShow.visibility="hidden",n.captionLabel.textStyleProps.forEach((function(t){null!=e[t]&&(o.styleText[t]=e[t])})),o.elmsAppend.forEach((function(e){t.svg.appendChild(e)})),a=o.elmPosition.getBBox(),e.width=a.width,e.height=a.height,e.outlineColor&&(i=a.height/9,o.styleStroke.strokeWidth=(i=10<i?10:i<2?2:i)+"px",o.styleStroke.stroke=e.outlineColor),e.strokeWidth=i||0,Ye(e.aplStats,n.captionLabel.stats),e.updateColor(t),e.refSocketXY?e.updateSocketXY(t):e.updatePath(t),le&&$e(t,{}),e.updateShow(t)},bind:function(e,t){var a=t.props;return e.color||Ge(a,"cur_line_color",e.updateColor),(e.refSocketXY="startLabel"===t.optionName||"endLabel"===t.optionName)?(e.socketIndex="startLabel"===t.optionName?0:1,Ge(a,"apl_position",e.updateSocketXY),e.offset||(Ge(a,"cur_attach_plugSideLenSE",e.updateSocketXY),Ge(a,"cur_line_strokeWidth",e.updateSocketXY))):Ge(a,"apl_path",e.updatePath),Ge(a,"svgShow",e.updateShow),le&&Ge(a,"new_edge4viewBox",e.adjustEdge),n.captionLabel.initSvg(e,a),!0},unbind:function(e,t){var a=t.props;e.elmsAppend&&(e.elmsAppend.forEach((function(e){a.svg.removeChild(e)})),e.elmPosition=e.styleFill=e.styleShow=e.elmsAppend=null),Ye(e.curStats,n.captionLabel.stats),Ye(e.aplStats,n.captionLabel.stats),e.color||De(a,"cur_line_color",e.updateColor),e.refSocketXY?(De(a,"apl_position",e.updateSocketXY),e.offset||(De(a,"cur_attach_plugSideLenSE",e.updateSocketXY),De(a,"cur_line_strokeWidth",e.updateSocketXY))):De(a,"apl_path",e.updatePath),De(a,"svgShow",e.updateShow),le&&(De(a,"new_edge4viewBox",e.adjustEdge),$e(a,{}))},removeOption:function(e,t){var n=t.props,a={};a[t.optionName]="",it(n,a)},remove:function(e){e.boundTargets.length&&(console.error("LeaderLineAttachment was not unbound by remove"),e.boundTargets.forEach((function(t){n.captionLabel.unbind(e,t)})))}},pathLabel:{type:"label",argOptions:[{optionName:"text",type:"string"}],stats:{color:{},startOffset:{},pathData:{}},init:function(e,t){return"string"==typeof t.text&&(e.text=t.text.trim()),!!e.text&&("string"==typeof t.color&&(e.color=t.color.trim()),e.outlineColor="string"==typeof t.outlineColor?t.outlineColor.trim():"#fff",he(t.lineOffset)&&(e.lineOffset=t.lineOffset),n.captionLabel.textStyleProps.forEach((function(n){null!=t[n]&&(e[n]=t[n])})),e.updateColor=function(t){n.captionLabel.updateColor(e,t)},e.updatePath=function(t){var a=e.curStats,i=e.aplStats,o=t.curStats,l=t.pathList.animVal||t.pathList.baseVal;l&&(a.pathData=o=n.pathLabel.getOffsetPathData(l,o.line_strokeWidth/2+e.strokeWidth/2+e.height/4,1.25*e.height),Fe(o,i.pathData)&&(e.elmPath.setPathData(o),i.pathData=o,e.bBox=e.elmPosition.getBBox(),e.updateStartOffset(t)))},e.updateStartOffset=function(t){var n,a,i=e.curStats,o=e.aplStats,l=t.curStats;i.pathData&&(2===e.semIndex&&!e.lineOffset||(a=i.pathData.reduce((function(e,t){var a,i=t.values;switch(t.type){case"M":n={x:i[0],y:i[1]};break;case"L":a={x:i[0],y:i[1]},n&&(e+=Le(n,a)),n=a;break;case"C":a={x:i[4],y:i[5]},n&&(e+=Te(n,{x:i[0],y:i[1]},{x:i[2],y:i[3]},a)),n=a}return e}),0),t=0===e.semIndex?0:1===e.semIndex?a:a/2,2!==e.semIndex&&(l=Math.max(l.attach_plugBackLenSE[e.semIndex]||0,l.line_strokeWidth/2)+e.strokeWidth/2+e.height/4,t=(t+=0===e.semIndex?l:-l)<0?0:a<t?a:t),e.lineOffset&&(t=(t+=e.lineOffset)<0?0:a<t?a:t),i.startOffset=t,Xe(e,o,"startOffset",t)&&(e.elmOffset.startOffset.baseVal.value=t)))},e.updateShow=function(t){n.captionLabel.updateShow(e,t)},le&&(e.adjustEdge=function(t,a){e.bBox&&n.captionLabel.adjustEdge(a,e.bBox,e.strokeWidth/2)}),!0)},getOffsetPathData:function(e,t,n){var a,i,o=[];function l(e,t){return Math.abs(e.x-t.x)<3&&Math.abs(e.y-t.y)<3}return e.forEach((function(e){var n,i,r,s,u,h,p,c,d,f,y;2===e.length?(c=e[0],d=e[1],f=t,y=Math.atan2(c.y-d.y,d.x-c.x)+.5*Math.PI,n=[{x:c.x+Math.cos(y)*f,y:c.y+Math.sin(y)*f*-1},{x:d.x+Math.cos(y)*f,y:d.y+Math.sin(y)*f*-1}],a?(r=a.points,0<=(p=Math.atan2(r[1].y-r[0].y,r[0].x-r[1].x)-Math.atan2(e[0].y-e[1].y,e[1].x-e[0].x))&&p<=Math.PI?i={type:"line",points:n,inside:!0}:(u=Pe(r[0],r[1],t),s=Pe(n[1],n[0],t),h=r[0],c=n[1],y=(d=u).x-h.x,f=d.y-h.y,p=c.x-s.x,d=c.y-s.y,c=(-f*(h.x-s.x)+y*(h.y-s.y))/(-p*f+y*d),d=(p*(h.y-s.y)-d*(h.x-s.x))/(-p*f+y*d),i=(f=0<=c&&c<=1&&0<=d&&d<=1?{x:h.x+d*y,y:h.y+d*f}:null)?{type:"line",points:[r[1]=f,n[1]]}:(r[1]=l(s,u)?s:u,{type:"line",points:[s,n[1]]}),a.len=Le(r[0],r[1]))):i={type:"line",points:n},i.len=Le(i.points[0],i.points[1]),o.push(a=i)):(o.push({type:"cubic",points:function(e,t,n,a,i,o){for(var l,r,s=Te(e,t,n,a)/o,u=1/(o<i?i/o*s:s),h=[],p=0;r=(90-(l=Ne(e,t,n,a,p)).angle)*(Math.PI/180),h.push({x:l.x+Math.cos(r)*i,y:l.y+Math.sin(r)*i*-1}),!(1<=p);)1<(p+=u)&&(p=1);return h}(e[0],e[1],e[2],e[3],t,16)}),a=null)})),a=null,o.forEach((function(e){var i;a="line"===e.type?(e.inside&&(a.len>t?((i=a.points)[1]=Pe(i[0],i[1],-t),a.len=Le(i[0],i[1])):(a.points=null,a.len=0),e.len>t+n?((i=e.points)[0]=Pe(i[1],i[0],-(t+n)),e.len=Le(i[0],i[1])):(e.points=null,e.len=0)),e):null})),o.reduce((function(e,t){var n=t.points;return n&&(i&&l(n[0],i)||e.push({type:"M",values:[n[0].x,n[0].y]}),"line"===t.type?e.push({type:"L",values:[n[1].x,n[1].y]}):(n.shift(),n.forEach((function(t){e.push({type:"L",values:[t.x,t.y]})}))),i=n[n.length-1]),e}),[])},newText:function(e,t,n,a){var i,o,l,r,u=t.createElementNS(te,"defs"),h=u.appendChild(t.createElementNS(te,"path"));return h.id=i=n+"-path",(l=(o=t.createElementNS(te,"text")).appendChild(t.createElementNS(te,"textPath"))).href.baseVal="#"+i,l.startOffset.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,0),l.textContent=e,"boolean"!=typeof s&&(s="paintOrder"in o.style),a&&!s?(o.id=e=n+"-text",u.appendChild(o),(r=(n=t.createElementNS(te,"g")).appendChild(t.createElementNS(te,"use"))).href.baseVal="#"+e,(t=n.appendChild(t.createElementNS(te,"use"))).href.baseVal="#"+e,(r=r.style).strokeLinejoin="round",{elmPosition:o,elmPath:h,elmOffset:l,styleText:o.style,styleFill:t.style,styleStroke:r,styleShow:n.style,elmsAppend:[u,n]}):(r=o.style,a&&(r.strokeLinejoin="round",r.paintOrder="stroke"),{elmPosition:o,elmPath:h,elmOffset:l,styleText:r,styleFill:r,styleStroke:a?r:null,styleShow:r,elmsAppend:[u,o]})},initSvg:function(e,t){var a,i,o,l=n.pathLabel.newText(e.text,t.baseWindow.document,x+"-pathLabel-"+e._id,e.outlineColor);["elmPosition","elmPath","elmOffset","styleFill","styleShow","elmsAppend"].forEach((function(t){e[t]=l[t]})),e.isShown=!1,e.styleShow.visibility="hidden",n.captionLabel.textStyleProps.forEach((function(t){null!=e[t]&&(l.styleText[t]=e[t])})),l.elmsAppend.forEach((function(e){t.svg.appendChild(e)})),l.elmPath.setPathData([{type:"M",values:[0,100]},{type:"h",values:[100]}]),oe&&(o=l.elmOffset.href.baseVal,l.elmOffset.href.baseVal=""),a=l.elmPosition.getBBox(),oe&&(l.elmOffset.href.baseVal=o),l.styleText.textAnchor=["start","end","middle"][e.semIndex],2!==e.semIndex||e.lineOffset||l.elmOffset.startOffset.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PERCENTAGE,50),e.height=a.height,e.outlineColor&&(i=a.height/9,l.styleStroke.strokeWidth=(i=10<i?10:i<2?2:i)+"px",l.styleStroke.stroke=e.outlineColor),e.strokeWidth=i||0,Ye(e.aplStats,n.pathLabel.stats),e.updateColor(t),e.updatePath(t),e.updateStartOffset(t),le&&$e(t,{}),e.updateShow(t)},bind:function(e,t){var a=t.props;return e.color||Ge(a,"cur_line_color",e.updateColor),Ge(a,"cur_line_strokeWidth",e.updatePath),Ge(a,"apl_path",e.updatePath),e.semIndex="startLabel"===t.optionName?0:"endLabel"===t.optionName?1:2,2===e.semIndex&&!e.lineOffset||Ge(a,"cur_attach_plugBackLenSE",e.updateStartOffset),Ge(a,"svgShow",e.updateShow),le&&Ge(a,"new_edge4viewBox",e.adjustEdge),n.pathLabel.initSvg(e,a),!0},unbind:function(e,t){var a=t.props;e.elmsAppend&&(e.elmsAppend.forEach((function(e){a.svg.removeChild(e)})),e.elmPosition=e.elmPath=e.elmOffset=e.styleFill=e.styleShow=e.elmsAppend=null),Ye(e.curStats,n.pathLabel.stats),Ye(e.aplStats,n.pathLabel.stats),e.color||De(a,"cur_line_color",e.updateColor),De(a,"cur_line_strokeWidth",e.updatePath),De(a,"apl_path",e.updatePath),2===e.semIndex&&!e.lineOffset||De(a,"cur_attach_plugBackLenSE",e.updateStartOffset),De(a,"svgShow",e.updateShow),le&&(De(a,"new_edge4viewBox",e.adjustEdge),$e(a,{}))},removeOption:function(e,t){var n=t.props,a={};a[t.optionName]="",it(n,a)},remove:function(e){e.boundTargets.length&&(console.error("LeaderLineAttachment was not unbound by remove"),e.boundTargets.forEach((function(t){n.pathLabel.unbind(e,t)})))}}},Object.keys(n).forEach((function(e){ot[e]=function(){return new a(n[e],Array.prototype.slice.call(arguments))}})),ot.positionByWindowResize=!0,window.addEventListener("resize",ne.add((function(){ot.positionByWindowResize&&Object.keys(Se).forEach((function(e){$e(Se[e],{position:!0})}))})),!1),ot}();t.Z=n}}]);
- //# sourceMappingURL=290.e0e94485.js.map
|