/*! LeaderLine v1.0.7 (c) anseki https://anseki.github.io/leader-line/ */ var LeaderLine=function(){"use strict";function o(e){function n(e){if(!e||0===e.length)return[];var t=new o(e),n=[];if(t.initialCommandIsMoveTo())for(;t.hasMoreData();){var a=t.parseSegment();if(null===a)break;n.push(a)}return n}function a(e){return e.map(function(e){return{type:e.type,values:Array.prototype.slice.call(e.values)}})}function r(e){var p=[],c=null,d=null,f=null,y=null,m=null,S=null,g=null;return e.forEach(function(e){var t,n,a,i,o,l,r,s,u,h;"M"===e.type?(u=e.values[0],h=e.values[1],p.push({type:"M",values:[u,h]}),y=S=u,m=g=h):"C"===e.type?(t=e.values[0],n=e.values[1],i=e.values[2],o=e.values[3],u=e.values[4],h=e.values[5],p.push({type:"C",values:[t,n,i,o,u,h]}),d=i,f=o,y=u,m=h):"L"===e.type?(u=e.values[0],h=e.values[1],p.push({type:"L",values:[u,h]}),y=u,m=h):"H"===e.type?(u=e.values[0],p.push({type:"L",values:[u,m]}),y=u):"V"===e.type?(h=e.values[0],p.push({type:"L",values:[y,h]}),m=h):"S"===e.type?(i=e.values[0],o=e.values[1],u=e.values[2],h=e.values[3],r="C"===c||"S"===c?(l=y+(y-d),m+(m-f)):(l=y,m),p.push({type:"C",values:[l,r,i,o,u,h]}),d=i,f=o,y=u,m=h):"T"===e.type?(u=e.values[0],h=e.values[1],n="Q"===c||"T"===c?(t=y+(y-d),m+(m-f)):(t=y,m),l=y+2*(t-y)/3,r=m+2*(n-m)/3,s=u+2*(t-u)/3,a=h+2*(n-h)/3,p.push({type:"C",values:[l,r,s,a,u,h]}),d=t,f=n,y=u,m=h):"Q"===e.type?(t=e.values[0],n=e.values[1],u=e.values[2],h=e.values[3],l=y+2*(t-y)/3,r=m+2*(n-m)/3,s=u+2*(t-u)/3,a=h+2*(n-h)/3,p.push({type:"C",values:[l,r,s,a,u,h]}),d=t,f=n,y=u,m=h):"A"===e.type?(i=e.values[0],o=e.values[1],l=e.values[2],r=e.values[3],s=e.values[4],u=e.values[5],h=e.values[6],0===i||0===o?(p.push({type:"C",values:[y,m,u,h,u,h]}),y=u,m=h):y===u&&m===h||b(y,m,u,h,i,o,l,r,s).forEach(function(e){p.push({type:"C",values:e}),y=u,m=h})):"Z"===e.type&&(p.push(e),y=S,m=g),c=e.type}),p}var i,o,l,s,u,d,f,b;e.SVGPathElement.prototype.getPathData&&e.SVGPathElement.prototype.setPathData||(i={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"},o=function(e){this._string=e,this._currentIndex=0,this._endIndex=this._string.length,this._prevCommand=null,this._skipOptionalSpaces()},l=-1!==e.navigator.userAgent.indexOf("MSIE "),o.prototype={parseSegment:function(){var e=this._string[this._currentIndex],t=i[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 e=null,n=(this._prevCommand=t).toUpperCase();return"H"===n||"V"===n?e=[this._parseNumber()]:"M"===n||"L"===n||"T"===n?e=[this._parseNumber(),this._parseNumber()]:"S"===n||"Q"===n?e=[this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber()]:"C"===n?e=[this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber()]:"A"===n?e=[this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseArcFlag(),this._parseArcFlag(),this._parseNumber(),this._parseNumber()]:"Z"===n&&(this._skipOptionalSpaces(),e=[]),null===e||0<=e.indexOf(null)?null:{type:t,values:e}},hasMoreData:function(){return this._currentIndex=this._endIndex||this._string[this._currentIndex]<"0"||"9"=this._endIndex||this._string[this._currentIndex]<"0"||"9"=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}},s=e.SVGPathElement.prototype.setAttribute,u=e.SVGPathElement.prototype.removeAttribute,d=e.Symbol?e.Symbol():"__cachedPathData",f=e.Symbol?e.Symbol():"__cachedNormalizedPathData",b=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 p,c,d=Math.PI*l/180,f=[],y=(u?(E=u[0],x=u[1],_=u[2],v=u[3]):(e=(S=h(e,t,-d)).x,t=S.y,1<(y=(m=(e-(n=(S=h(n,a,-d)).x))/2)*m/(i*i)+(S=(t-(a=S.y))/2)*S/(o*o))&&(i*=y=Math.sqrt(y),o*=y),y=i*i,g=o*o,_=(r=(r===s?-1:1)*Math.sqrt(Math.abs((y*g-y*S*S-g*m*m)/(y*S*S+g*m*m))))*i*S/o+(e+n)/2,v=r*-o*m/i+(t+a)/2,E=Math.asin(parseFloat(((t-v)/o).toFixed(9))),x=Math.asin(parseFloat(((a-v)/o).toFixed(9))),e<_&&(E=Math.PI-E),n<_&&(x=Math.PI-x),E<0&&(E=2*Math.PI+E),x<0&&(x=2*Math.PI+x),s&&x120*Math.PI/180&&(g=x,S=n,r=a,x=s&&E',ue={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}},he={behind:Z,disc:"disc",square:"square",arrow1:"arrow1",arrow2:"arrow2",arrow3:"arrow3",hand:"hand",crosshair:"crosshair"},pe={disc:"disc",square:"square",arrow1:"arrow1",arrow2:"arrow2",arrow3:"arrow3",hand:"hand",crosshair:"crosshair"},ce=[B,R,F,G],C="auto",de={x:"left",y:"top",width:"width",height:"height"},fe=80,ye=4,me=5,Se=120,ge=8,_e=3.75,D=10,z=30,ve=.5522847,Ee=.25*Math.PI,xe=/^\s*(\-?[\d\.]+)\s*(\%)?\s*$/,L="http://www.w3.org/2000/svg",be="-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style&&!window.navigator.msPointerEnabled,Y=!be&&!!document.uniqueID,X="MozAppearance"in document.documentElement.style,ke=!(be||X||!window.chrome||!window.CSS),q=!be&&!Y&&!X&&!ke&&!window.chrome&&"WebkitAppearance"in document.documentElement.style,we=Y||be?.2:.1,Q={path:ae,lineColor:"coral",lineSize:4,plugSE:[Z,"arrow1"],plugSizeSE:[1,1],lineOutlineEnabled:!1,lineOutlineColor:"indianred",lineOutlineSize:.25,plugOutlineEnabledSE:[!1,!1],plugOutlineSizeSE:[1,1],classes:""},A=(x={}.toString,b={}.hasOwnProperty.toString,k=b.call(Object),function(e){return e&&"[object Object]"===x.call(e)&&(!(e=Object.getPrototypeOf(e))||(e=e.hasOwnProperty("constructor")&&e.constructor)&&"function"==typeof e&&b.call(e)===k)}),V=Number.isFinite||function(e){return"number"==typeof e&&window.isFinite(e)},s=(_={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]},v=1e3/60/2,y=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,v)},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=[],E=0,{add:function(n,e,t,a,i,o,l){var r,s,u,h,p,c,d,f,y,m=++E;function S(e,t){return{value:n(t),timeRatio:e,outputRatio:t}}if("string"==typeof i&&(i=_[i]),n=n||function(){},t=e.duration&&e.count&&e.loopsLeft<=1)a=e.frames[e.lastFrame=e.reverse?0:e.frames.length-1],e.frameCallback(a.value,!0,a.timeRatio,a.outputRatio),e.framesStart=null;else{if(t>e.duration){if(n=Math.floor(t/e.duration),e.count){if(n>=e.loopsLeft)return a=e.frames[e.lastFrame=e.reverse?0:e.frames.length-1],e.frameCallback(a.value,!0,a.timeRatio,a.outputRatio),void(e.framesStart=null);e.loopsLeft-=n}e.framesStart+=e.duration*n,t=i-e.framesStart}e.reverse&&(t=e.duration-t),a=e.frames[e.lastFrame=Math.round(t/v)],!1!==e.frameCallback(a.value,!1,a.timeRatio,a.outputRatio)?o=!0:e.framesStart=null}}),o&&(e=y.call(window,Ve))}function Pe(e,t){e.framesStart=Date.now(),null!=t&&(e.framesStart-=e.duration*(e.reverse?1-t:t)),e.loopsLeft=e.count,e.lastFrame=null,Ve()}function K(t,n){var e,a;return typeof t!=typeof n||(e=A(t)?"obj":Array.isArray(t)?"array":"")!=(A(n)?"obj":Array.isArray(n)?"array":"")||("obj"===e?K(a=Object.keys(t).sort(),Object.keys(n).sort())||a.some(function(e){return K(t[e],n[e])}):"array"===e?t.length!==n.length||t.some(function(e,t){return K(e,n[t])}):t!==n)}function J(n){return n&&(A(n)?Object.keys(n).reduce(function(e,t){return e[t]=J(n[t]),e},{}):Array.isArray(n)?n.map(J):n)}function Ne(e){var t,n,a,i=1,o=e=(e+"").trim();function l(e){var t=1,e=xe.exec(e);return e&&(t=parseFloat(e[1]),e[2]?t=0<=t&&t<=100?t/100:1:(t<0||1=Math.abs(n)?0<=t?R:G:0<=n?F:B))})),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]||(t=g[e],n=S.position_socketXYSE[e],t.x!==n.x)||t.y!==n.y||t.socketId!==n.socketId||(t=i[e],n=S.position_socketGravitySE[e],(e=null==t?"auto":Array.isArray(t)?"array":"number")!=(null==n?"auto":Array.isArray(n)?"array":"number"))||("array"==e?t[0]!==n[0]||t[1]!==n[1]:t!==n);var t,n})){switch(l.pathList.baseVal=d=[],l.pathList.animVal=null,m.position_path){case te:d.push([E(g[0]),E(g[1])]);break;case ne:t="number"==typeof i[0]&&0ye?(m.position_lineStrokeWidth-ye)*me:0),e.socketId===B?{x:0,y:-(a=(a=(e.y-i.y)/2)=t.x:t.dirId===w?e.y>=t.y:e.x<=t.x}function P(e,t){return t.dirId===b||t.dirId===w?e.x===t.x:e.y===t.y}function W(e){return e[0]?{contain:0,notContain:1}:{contain:1,notContain:0}}function N(e,t,n){return Math.abs(t[n]-e[n])}function T(e,t,n){return"x"===n?e.x=z?T(I[t.notContain],I[t.contain],o[t.contain]):I[t.contain].dirId)):(i=[{x:I[0].x,y:I[0].y},{x:I[1].x,y:I[1].y}],M.forEach(function(e,t){var n=0===t?1:0,a=N(i[t],i[n],o[t]);an.outlineMax&&(t=n.outlineMax),t*=2*n.outlineBase,s=ee(l,r.plugOutline_strokeWidthSE,e,t)||s,s=ee(l,r.plugOutline_inStrokeWidthSE,e,r.plugOutline_colorTraSE[e]?t-we/(r.line_strokeWidth/Q.lineSize)/B.plugSizeSE[e]*2:t/2)||s)}),s)),(t.faces||T.line||T.plug||T.lineOutline||T.plugOutline)&&(T.faces=(y=(u=e).curStats,m=u.aplStats,S=u.events,g=!1,!y.line_altColor&&ee(u,m,"line_color",f=y.line_color,S.apl_line_color)&&(u.lineFace.style.stroke=f,g=!0),ee(u,m,"line_strokeWidth",f=y.line_strokeWidth,S.apl_line_strokeWidth)&&(u.lineShape.style.strokeWidth=f+"px",g=!0,X||Y)&&($(u,u.lineShape),Y)&&($(u,u.lineFace),$(u,u.lineMaskCaps)),ee(u,m,"lineOutline_enabled",f=y.lineOutline_enabled,S.apl_lineOutline_enabled)&&(u.lineOutlineFace.style.display=f?"inline":"none",g=!0),y.lineOutline_enabled&&(ee(u,m,"lineOutline_color",f=y.lineOutline_color,S.apl_lineOutline_color)&&(u.lineOutlineFace.style.stroke=f,g=!0),ee(u,m,"lineOutline_strokeWidth",f=y.lineOutline_strokeWidth,S.apl_lineOutline_strokeWidth)&&(u.lineOutlineMaskShape.style.strokeWidth=f+"px",g=!0,Y)&&($(u,u.lineOutlineMaskCaps),$(u,u.lineOutlineFace)),ee(u,m,"lineOutline_inStrokeWidth",f=y.lineOutline_inStrokeWidth,S.apl_lineOutline_inStrokeWidth))&&(u.lineMaskShape.style.strokeWidth=f+"px",g=!0,Y)&&($(u,u.lineOutlineMaskCaps),$(u,u.lineOutlineFace)),ee(u,m,"plug_enabled",f=y.plug_enabled,S.apl_plug_enabled)&&(u.plugsFace.style.display=f?"inline":"none",g=!0),y.plug_enabled&&[0,1].forEach(function(n){var e=y.plug_plugSE[n],t=e!==Z?ue[pe[e]]:null,a=Qe(n,t);ee(u,m.plug_enabledSE,n,f=y.plug_enabledSE[n],S.apl_plug_enabledSE)&&(u.plugsFace.style[a.prop]=f?"url(#"+u.plugMarkerIdSE[n]+")":"none",g=!0),y.plug_enabledSE[n]&&(ee(u,m.plug_plugSE,n,e,S.apl_plug_plugSE)&&(u.plugFaceSE[n].href.baseVal="#"+t.elmId,qe(u,u.plugMarkerSE[n],a.orient,t.bBox,u.svg,u.plugMarkerShapeSE[n],u.plugsFace),g=!0,X)&&$(u,u.plugsFace),ee(u,m.plug_colorSE,n,f=y.plug_colorSE[n],S.apl_plug_colorSE)&&(u.plugFaceSE[n].style.fill=f,g=!0,ke||q||Y)&&!y.line_colorTra&&$(u,Y?u.lineMaskCaps:u.capsMaskLine),["markerWidth","markerHeight"].forEach(function(e){var t="plug_"+e+"SE";ee(u,m[t],n,f=y[t][n],S["apl_"+t])&&(u.plugMarkerSE[n][e].baseVal.value=f,g=!0)}),ee(u,m.plugOutline_enabledSE,n,f=y.plugOutline_enabledSE[n],S.apl_plugOutline_enabledSE)&&(f?(u.plugFaceSE[n].style.mask="url(#"+u.plugMaskIdSE[n]+")",u.plugOutlineFaceSE[n].style.display="inline"):(u.plugFaceSE[n].style.mask="none",u.plugOutlineFaceSE[n].style.display="none"),g=!0),y.plugOutline_enabledSE[n])&&(ee(u,m.plugOutline_plugSE,n,e,S.apl_plugOutline_plugSE)&&(u.plugOutlineFaceSE[n].href.baseVal=u.plugMaskShapeSE[n].href.baseVal=u.plugOutlineMaskShapeSE[n].href.baseVal="#"+t.elmId,[u.plugMaskSE[n],u.plugOutlineMaskSE[n]].forEach(function(e){e.x.baseVal.value=t.bBox.left,e.y.baseVal.value=t.bBox.top,e.width.baseVal.value=t.bBox.width,e.height.baseVal.value=t.bBox.height}),g=!0),ee(u,m.plugOutline_colorSE,n,f=y.plugOutline_colorSE[n],S.apl_plugOutline_colorSE)&&(u.plugOutlineFaceSE[n].style.fill=f,g=!0,Y)&&($(u,u.lineMaskCaps),$(u,u.lineOutlineMaskCaps)),ee(u,m.plugOutline_strokeWidthSE,n,f=y.plugOutline_strokeWidthSE[n],S.apl_plugOutline_strokeWidthSE)&&(u.plugOutlineMaskShapeSE[n].style.strokeWidth=f+"px",g=!0),ee(u,m.plugOutline_inStrokeWidthSE,n,f=y.plugOutline_inStrokeWidthSE[n],S.apl_plugOutline_inStrokeWidthSE))&&(u.plugMaskShapeSE[n].style.strokeWidth=f+"px",g=!0)}),g)),(t.position||T.line||T.plug)&&(T.position=$e(e)),(t.path||T.position)&&(T.path=(v=(_=e).curStats,k=_.aplStats,b=_.pathList.animVal||_.pathList.baseVal,E=v.path_edge,w=!1,b&&(E.x1=E.x2=b[0][0].x,E.y1=E.y2=b[0][0].y,v.path_pathData=R=He(b,function(e){e.xE.x2&&(E.x2=e.x),e.y>E.y2&&(E.y2=e.y)}),Ze(R,k.path_pathData))&&(_.linePath.setPathData(R),k.path_pathData=R,w=!0,Y?($(_,_.plugsFace),$(_,_.lineMaskCaps)):X&&$(_,_.linePath),_.events.apl_path)&&_.events.apl_path.forEach(function(e){e(_,R)}),w)),T.viewBox=(b=(x=e).curStats,k=x.aplStats,w=b.path_edge,O=b.viewBox_bBox,F=k.viewBox_bBox,G=x.svg.viewBox.baseVal,D=x.svg.style,z=!1,k=Math.max(b.line_strokeWidth/2,b.viewBox_plugBCircleSE[0]||0,b.viewBox_plugBCircleSE[1]||0),M={x1:w.x1-k,y1:w.y1-k,x2:w.x2+k,y2:w.y2+k},x.events.new_edge4viewBox&&x.events.new_edge4viewBox.forEach(function(e){e(x,M)}),O.x=b.lineMask_x=b.lineOutlineMask_x=b.maskBGRect_x=M.x1,O.y=b.lineMask_y=b.lineOutlineMask_y=b.maskBGRect_y=M.y1,O.width=M.x2-M.x1,O.height=M.y2-M.y1,["x","y","width","height"].forEach(function(e){var t;(t=O[e])!==F[e]&&(G[e]=F[e]=t,D[de[e]]=t+("x"===e||"y"===e?x.bodyOffset[e]:0)+"px",z=!0)}),z),T.mask=(L=(I=e).curStats,A=I.aplStats,V=!1,L.plug_enabled?[0,1].forEach(function(e){L.capsMaskMarker_enabledSE[e]=L.plug_enabledSE[e]&&L.plug_colorTraSE[e]||L.plugOutline_enabledSE[e]&&L.plugOutline_colorTraSE[e]}):L.capsMaskMarker_enabledSE[0]=L.capsMaskMarker_enabledSE[1]=!1,L.capsMaskMarker_enabled=L.capsMaskMarker_enabledSE[0]||L.capsMaskMarker_enabledSE[1],L.lineMask_outlineMode=L.lineOutline_enabled,L.caps_enabled=L.capsMaskMarker_enabled||L.capsMaskAnchor_enabledSE[0]||L.capsMaskAnchor_enabledSE[1],L.lineMask_enabled=L.caps_enabled||L.lineMask_outlineMode,(L.lineMask_enabled&&!L.lineMask_outlineMode||L.lineOutline_enabled)&&["x","y"].forEach(function(e){var t="maskBGRect_"+e;ee(I,A,t,C=L[t])&&(I.maskBGRect[e].baseVal.value=C,V=!0)}),ee(I,A,"lineMask_enabled",C=L.lineMask_enabled)&&(I.lineFace.style.mask=C?"url(#"+I.lineMaskId+")":"none",V=!0,q)&&$(I,I.lineMask),L.lineMask_enabled&&(ee(I,A,"lineMask_outlineMode",C=L.lineMask_outlineMode)&&(C?(I.lineMaskBG.style.display="none",I.lineMaskShape.style.display="inline"):(I.lineMaskBG.style.display="inline",I.lineMaskShape.style.display="none"),V=!0),["x","y"].forEach(function(e){var t="lineMask_"+e;ee(I,A,t,C=L[t])&&(I.lineMask[e].baseVal.value=C,V=!0)}),ee(I,A,"caps_enabled",C=L.caps_enabled)&&(I.lineMaskCaps.style.display=I.lineOutlineMaskCaps.style.display=C?"inline":"none",V=!0,q)&&$(I,I.capsMaskLine),L.caps_enabled)&&([0,1].forEach(function(e){var t;ee(I,A.capsMaskAnchor_enabledSE,e,C=L.capsMaskAnchor_enabledSE[e])&&(I.capsMaskAnchorSE[e].style.display=C?"inline":"none",V=!0,q)&&$(I,I.lineMask),L.capsMaskAnchor_enabledSE[e]&&(Ze(t=L.capsMaskAnchor_pathDataSE[e],A.capsMaskAnchor_pathDataSE[e])&&(I.capsMaskAnchorSE[e].setPathData(t),A.capsMaskAnchor_pathDataSE[e]=t,V=!0),ee(I,A.capsMaskAnchor_strokeWidthSE,e,C=L.capsMaskAnchor_strokeWidthSE[e]))&&(I.capsMaskAnchorSE[e].style.strokeWidth=C+"px",V=!0)}),ee(I,A,"capsMaskMarker_enabled",C=L.capsMaskMarker_enabled)&&(I.capsMaskLine.style.display=C?"inline":"none",V=!0),L.capsMaskMarker_enabled)&&[0,1].forEach(function(n){var e=L.capsMaskMarker_plugSE[n],t=e!==Z?ue[pe[e]]:null,a=Qe(n,t);ee(I,A.capsMaskMarker_enabledSE,n,C=L.capsMaskMarker_enabledSE[n])&&(I.capsMaskLine.style[a.prop]=C?"url(#"+I.lineMaskMarkerIdSE[n]+")":"none",V=!0),L.capsMaskMarker_enabledSE[n]&&(ee(I,A.capsMaskMarker_plugSE,n,e)&&(I.capsMaskMarkerShapeSE[n].href.baseVal="#"+t.elmId,qe(I,I.capsMaskMarkerSE[n],a.orient,t.bBox,I.svg,I.capsMaskMarkerShapeSE[n],I.capsMaskLine),V=!0,X)&&($(I,I.capsMaskLine),$(I,I.lineFace)),["markerWidth","markerHeight"].forEach(function(e){var t="capsMaskMarker_"+e+"SE";ee(I,A[t],n,C=L[t][n])&&(I.capsMaskMarkerSE[n][e].baseVal.value=C,V=!0)}))}),L.lineOutline_enabled&&["x","y"].forEach(function(e){var t="lineOutlineMask_"+e;ee(I,A,t,C=L[t])&&(I.lineOutlineMask[e].baseVal.value=C,V=!0)}),V),t.effect&&(H=(P=e).curStats,N=P.aplStats,Object.keys(U).forEach(function(e){var t=U[e],n=e+"_enabled",e=e+"_options",a=H[e];ee(P,N,n,j=H[n])?(j&&(N[e]=J(a)),t[j?"init":"remove"](P)):j&&K(a,N[e])&&(t.remove(P),N[n]=!0,N[e]=J(a),t.init(P))})),(ke||q)&&T.line&&!T.path&&$(e,e.lineShape),ke&&T.plug&&!T.line&&$(e,e.plugsFace),Xe(e)}function tt(e,t){return{duration:(V(e.duration)&&0i.x2&&(i.x2=e.x2),e.y2>i.y2&&(i.y2=e.y2),["x","y"].forEach(function(e){var t,n="dropShadow_"+e;o[n]=t=i[e+"1"],ee(a,l,n,t)&&(a.efc_dropShadow_elmFilter[e].baseVal.value=t)}))}}},Object.keys(U).forEach(function(e){var t=U[e],n=t.stats;n[e+"_enabled"]={iniValue:!1},n[e+"_options"]={hasProps:!0},t.anim&&(n[e+"_animOptions"]={},n[e+"_animId"]={})}),w={none:{defaultAnimOptions:{},init:function(e,t){var n=e.curStats;n.show_animId&&(s.remove(n.show_animId),n.show_animId=null),w.none.start(e,t)},start:function(e,t){w.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&&et(e,n),n?1:0}},fade:{defaultAnimOptions:{duration:300,timing:"linear"},init:function(n,e){var t=n.curStats,a=n.aplStats;t.show_animId&&s.remove(t.show_animId),t.show_animId=s.add(function(e){return e},function(e,t){t?w.fade.stop(n,!0):(n.svg.style.opacity=e+"",Y&&($(n,n.svg),Xe(n)))},a.show_animOptions.duration,1,a.show_animOptions.timing,null,!1),w.fade.start(n,e)},start:function(e,t){var n,a=e.curStats;a.show_inAnim&&(n=s.stop(a.show_animId)),et(e,1),a.show_inAnim=!0,s.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?s.stop(i.show_animId):n?1:0,i.show_inAnim=!1,t&&(e.svg.style.opacity=n?"":"0",et(e,n)),a}},draw:{defaultAnimOptions:{duration:500,timing:[.58,0,.42,1]},init:function(n,e){var t=n.curStats,a=n.aplStats,o=n.pathList.baseVal,i=Ue(o),l=i.segsLen,r=i.lenAll;t.show_animId&&s.remove(t.show_animId),t.show_animId=s.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=r*e,n=[];t>=l[++i];)n.push(o[i]),t-=l[i];t&&(2===(e=o[i]).length?n.push([e[0],Fe(e[0],e[1],t/l[i])]):(a=De(e[0],e[1],e[2],e[3],je(e[0],e[1],e[2],e[3],t)),n.push([e[0],a.fromP1,a.fromP2,a])))}return n},function(e,t){t?w.draw.stop(n,!0):(n.pathList.animVal=e,N(n,{path:!0}))},a.show_animOptions.duration,1,a.show_animOptions.timing,null,!1),w.draw.start(n,e)},start:function(e,t){var n,a=e.curStats;a.show_inAnim&&(n=s.stop(a.show_animId)),et(e,1),a.show_inAnim=!0,u(e,"apl_position",w.draw.update),s.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?s.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]]],N(e,{path:!0}),et(e,n)),a},update:function(e){a(e,"apl_position",w.draw.update),e.curStats.show_inAnim?w.draw.init(e,w.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(p.prototype,t,{get:function(){var e=null!=a?r[this._id].options[n][a]:n?r[this._id].options[n]:r[this._id].options[t];return null==e?C:J(e)},set:lt(t),enumerable:!0})}),[["path",le],["startSocket",W,"socketSE",0],["endSocket",W,"socketSE",1],["startPlug",he,"plugSE",0],["endPlug",he,"plugSE",1]].forEach(function(e){var a=e[0],i=e[1],o=e[2],l=e[3];Object.defineProperty(p.prototype,a,{get:function(){var t,n=null!=l?r[this._id].options[o][l]:o?r[this._id].options[o]:r[this._id].options[a];return n?Object.keys(i).some(function(e){return i[e]===n&&(t=e,!0)})?t:new Error("It's broken"):C},set:lt(a),enumerable:!0})}),Object.keys(U).forEach(function(n){var a=U[n];Object.defineProperty(p.prototype,n,{get:function(){var s,e,t=r[this._id].options[n];return A(t)?(s=t,e=a.optionsConf.reduce(function(e,t){var n,a=t[0],i=t[1],o=t[2],l=t[3],t=t[4],r=null!=t?s[l][t]:l?s[l]:s[i];return e[i]="id"===a?r?Object.keys(o).some(function(e){return o[e]===r&&(n=e,!0)})?n:new Error("It's broken"):C:null==r?C:J(r),e},{}),a.anim&&(e.animation=J(s.animation)),e):t},set:lt(n),enumerable:!0})}),["startLabel","endLabel","middleLabel"].forEach(function(e,n){Object.defineProperty(p.prototype,e,{get:function(){var e=r[this._id],t=e.options;return t.labelSEM[n]&&!e.optionIsAttach.labelSEM[n]?j[t.labelSEM[n]._id].text:t.labelSEM[n]||""},set:lt(e),enumerable:!0})}),p.prototype.setOptions=function(e){return ot(r[this._id],e),this},p.prototype.position=function(){return N(r[this._id],{position:!0}),this},p.prototype.remove=function(){var t=r[this._id],n=t.curStats;Object.keys(U).forEach(function(e){e+="_animId";n[e]&&s.remove(n[e])}),n.show_animId&&s.remove(n.show_animId),t.attachments.slice().forEach(function(e){it(t,e)}),t.baseWindow&&t.svg&&t.baseWindow.document.body.removeChild(t.svg),delete r[this._id]},p.prototype.show=function(e,t){return nt(r[this._id],!0,e,t),this},p.prototype.hide=function(e,t){return nt(r[this._id],!1,e,t),this},l=function(t){t&&j[t._id]&&(t.boundTargets.slice().forEach(function(e){it(e.props,t,!0)}),t.conf.remove&&t.conf.remove(t),delete j[t._id])},rt.prototype.remove=function(){var t=this,n=j[t._id];n&&(n.boundTargets.slice().forEach(function(e){n.conf.removeOption(n,e)}),Ye(function(){var e=j[t._id];e&&(console.error("LeaderLineAttachment was not removed by removeOption"),l(e))}))},M=rt,window.LeaderLineAttachment=M,T=function(e,t){return e instanceof M&&(!(e.isRemoved||t&&j[e._id].conf.type!==t)||null)},O={pointAnchor:{type:"anchor",argOptions:[{optionName:"element",type:Te}],init:function(e,t){return e.element=O.pointAnchor.checkElement(t.element),e.x=O.pointAnchor.parsePercent(t.x,!0)||[.5,!0],e.y=O.pointAnchor.parsePercent(t.y,!0)||[.5,!0],!0},removeOption:function(e,t){var n=t.props,a={},e=e.element,i=n.options.anchorSE["start"===t.optionName?1:0];e===i&&(e=i===document.body?new M(O.pointAnchor,[e]):document.body),a[t.optionName]=e,ot(n,a)},getBBoxNest:function(e,t){var t=Re(e.element,t.baseWindow),n=t.width,a=t.height;return t.width=t.height=0,t.left=t.right=t.left+e.x[0]*(e.x[1]?n:1),t.top=t.bottom=t.top+e.y[0]*(e.y[1]?a:1),t},parsePercent:function(e,t){var n,a=!1;return V(e)?n=e:"string"==typeof e&&(e=xe.exec(e))&&e[2]&&(a=0!==(n=parseFloat(e[1])/100)),null!=n&&(t||0<=n)?[n,a]:null},checkElement:function(e){if(null==e)e=document.body;else if(!Te(e))throw new Error("`element` must be Element");return e}},areaAnchor:{type:"anchor",argOptions:[{optionName:"element",type:Te},{optionName:"shape",type:"string"}],stats:{color:{},strokeWidth:{},elementWidth:{},elementHeight:{},elementLeft:{},elementTop:{},pathListRel:{},bBoxRel:{},pathData:{},viewBoxBBox:{hasProps:!0},dashLen:{},dashGap:{}},init:function(a,e){var t,n=[];return a.element=O.pointAnchor.checkElement(e.element),"string"==typeof e.color&&(a.color=e.color.trim()),"string"==typeof e.fillColor&&(a.fill=e.fillColor.trim()),V(e.size)&&0<=e.size&&(a.size=e.size),e.dash&&(a.dash=!0,V(e.dash.len)&&0i.right&&(i.right=t),ei.bottom&&(i.bottom=e)):i={left:t,right:t,top:e,bottom:e},o?S.pathListRel.push([o,{x:t,y:e}]):S.pathListRel=[],o={x:t,y:e}}),S.pathListRel.push([]),e=S.strokeWidth/2,e=[{x:i.left-e,y:i.top-e},{x:i.right+e,y:i.bottom+e}],S.bBoxRel={left:e[0].x,top:e[0].y,right:e[1].x,bottom:e[1].y,width:e[1].x-e[0].x,height:e[1].y-e[0].y}}v.pathListRel=v.bBoxRel=!0}return(v.pathListRel||v.elementLeft||v.elementTop)&&(S.pathData=He(S.pathListRel,function(e){e.x+=n.left,e.y+=n.top})),ee(t,g,"strokeWidth",a=S.strokeWidth)&&(t.path.style.strokeWidth=a+"px"),Ze(a=S.pathData,g.pathData)&&(t.path.setPathData(a),g.pathData=a,v.pathData=!0),t.dash&&(!v.pathData&&(!v.strokeWidth||t.dashLen&&t.dashGap)||(S.dashLen=t.dashLen||2*S.strokeWidth,S.dashGap=t.dashGap||S.strokeWidth),v.dash=ee(t,g,"dashLen",S.dashLen)||v.dash,v.dash=ee(t,g,"dashGap",S.dashGap)||v.dash,v.dash)&&(t.path.style.strokeDasharray=g.dashLen+","+g.dashGap),d=S.viewBoxBBox,f=g.viewBoxBBox,y=t.svg.viewBox.baseVal,m=t.svg.style,d.x=S.bBoxRel.left+n.left,d.y=S.bBoxRel.top+n.top,d.width=S.bBoxRel.width,d.height=S.bBoxRel.height,["x","y","width","height"].forEach(function(e){(a=d[e])!==f[e]&&(y[e]=f[e]=a,m[de[e]]=a+("x"===e||"y"===e?t.bodyOffset[e]:0)+"px")}),v.strokeWidth||v.pathListRel||v.bBoxRel}},mouseHoverAnchor:{type:"anchor",argOptions:[{optionName:"element",type:Te},{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(a,i){var n,t,e,o,l,r,s,u,h=O.mouseHoverAnchor,p={};if(a.element=O.pointAnchor.checkElement(i.element),s=a.element,(u=s.ownerDocument)&&(u=u.defaultView)&&u.HTMLElement&&s instanceof u.HTMLElement)return h.style.backgroundSize=h.backgroundSize.width+"px "+h.backgroundSize.height+"px",["style","hoverStyle"].forEach(function(e){var n=h[e];a[e]=Object.keys(n).reduce(function(e,t){return e[t]=n[t],e},{})}),"inline"===(n=a.element.ownerDocument.defaultView.getComputedStyle(a.element,"")).display?a.style.display="inline-block":"none"===n.display&&(a.style.display="block"),O.mouseHoverAnchor.dirKeys.forEach(function(e){var t=e[0],e="padding"+e[1];parseFloat(n[e])e.x2&&(e.x2=t.x2),t.y2>e.y2&&(e.y2=t.y2)},newText:function(e,t,n,a,i){var o,l,r=t.createElementNS(L,"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 h&&(h="paintOrder"in r.style),i&&!h?(e=t.createElementNS(L,"defs"),r.id=a,e.appendChild(r),(l=(o=t.createElementNS(L,"g")).appendChild(t.createElementNS(L,"use"))).href.baseVal="#"+a,(t=o.appendChild(t.createElementNS(L,"use"))).href.baseVal="#"+a,(l=l.style).strokeLinejoin="round",{elmPosition:r,styleText:r.style,styleFill:t.style,styleStroke:l,styleShow:o.style,elmsAppend:[e,o]}):(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=Ue(e),o=i.segsLen,i=i.lenAll,l=-1,r=i/2+(t||0);if(r<=0)return 2===(n=e[0]).length?Fe(n[0],n[1],0):De(n[0],n[1],n[2],n[3],0);if(i<=r)return 2===(n=e[e.length-1]).length?Fe(n[0],n[1],1):De(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?Fe(n[0],n[1],r/o[l]):De(n[0],n[1],n[2],n[3],je(n[0],n[1],n[2],n[3],r))},initSvg:function(t,n){var e,a,i=O.captionLabel.newText(t.text,n.baseWindow.document,n.svg,I+"-captionLabel-"+t._id,t.outlineColor);["elmPosition","styleFill","styleShow","elmsAppend"].forEach(function(e){t[e]=i[e]}),t.isShown=!1,t.styleShow.visibility="hidden",O.captionLabel.textStyleProps.forEach(function(e){null!=t[e]&&(i.styleText[e]=t[e])}),i.elmsAppend.forEach(function(e){n.svg.appendChild(e)}),e=i.elmPosition.getBBox(),t.width=e.width,t.height=e.height,t.outlineColor&&(a=e.height/9,i.styleStroke.strokeWidth=(a=10d?((t=f.points)[1]=Ge(t[0],t[1],-d),f.len=H(t[0],t[1])):(f.points=null,f.len=0),e.len>d+n?((t=e.points)[0]=Ge(t[1],t[0],-(d+n)),e.len=H(t[0],t[1])):(e.points=null,e.len=0)),e):null}),y.reduce(function(t,e){var n=e.points;return n&&(a&&m(n[0],a)||t.push({type:"M",values:[n[0].x,n[0].y]}),"line"===e.type?t.push({type:"L",values:[n[1].x,n[1].y]}):(n.shift(),n.forEach(function(e){t.push({type:"L",values:[e.x,e.y]})})),a=n[n.length-1]),t},[])},newText:function(e,t,n,a){var i,o,l,r,s=t.createElementNS(L,"defs"),u=s.appendChild(t.createElementNS(L,"path"));return u.id=i=n+"-path",(l=(o=t.createElementNS(L,"text")).appendChild(t.createElementNS(L,"textPath"))).href.baseVal="#"+i,l.startOffset.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,0),l.textContent=e,"boolean"!=typeof h&&(h="paintOrder"in o.style),a&&!h?(o.id=i=n+"-text",s.appendChild(o),(n=(e=t.createElementNS(L,"g")).appendChild(t.createElementNS(L,"use"))).href.baseVal="#"+i,(t=e.appendChild(t.createElementNS(L,"use"))).href.baseVal="#"+i,(r=n.style).strokeLinejoin="round",{elmPosition:o,elmPath:u,elmOffset:l,styleText:o.style,styleFill:t.style,styleStroke:r,styleShow:e.style,elmsAppend:[s,e]}):(r=o.style,a&&(r.strokeLinejoin="round",r.paintOrder="stroke"),{elmPosition:o,elmPath:u,elmOffset:l,styleText:r,styleFill:r,styleStroke:a?r:null,styleShow:r,elmsAppend:[s,o]})},initSvg:function(t,n){var e,a,i,o=O.pathLabel.newText(t.text,n.baseWindow.document,I+"-pathLabel-"+t._id,t.outlineColor);["elmPosition","elmPath","elmOffset","styleFill","styleShow","elmsAppend"].forEach(function(e){t[e]=o[e]}),t.isShown=!1,t.styleShow.visibility="hidden",O.captionLabel.textStyleProps.forEach(function(e){null!=t[e]&&(o.styleText[e]=t[e])}),o.elmsAppend.forEach(function(e){n.svg.appendChild(e)}),o.elmPath.setPathData([{type:"M",values:[0,100]},{type:"h",values:[100]}]),ke&&(i=o.elmOffset.href.baseVal,o.elmOffset.href.baseVal=""),e=o.elmPosition.getBBox(),ke&&(o.elmOffset.href.baseVal=i),o.styleText.textAnchor=["start","end","middle"][t.semIndex],2!==t.semIndex||t.lineOffset||o.elmOffset.startOffset.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PERCENTAGE,50),t.height=e.height,t.outlineColor&&(a=e.height/9,o.styleStroke.strokeWidth=(a=10