| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005 |
- /*
- * GoJS v1.5.17 JavaScript Library for HTML Diagrams
- * Northwoods Software, http://www.nwoods.com/
- * GoJS and Northwoods Software are registered trademarks of Northwoods Software Corporation.
- * Copyright (C) 1998-2015 by Northwoods Software Corporation. All Rights Reserved.
- * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: http://www.gojs.net/1.5.17/doc/license.html.
- */
- (function(window) { var f,ba={};if(!window.document||void 0===window.document.createElement("canvas").getContext)throw window.console&&window.console.log("The HTML Canvas element is not supported in this browser,or this browser is in Compatibility mode."),Error("The HTML Canvas element is not supported in this browser,or this browser is in Compatibility mode.");if(!Object.defineProperty)throw Error("GoJS requires a newer version of JavaScript");
- (function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c<b.length&&!window.requestAnimationFrame;++c)window.requestAnimationFrame=window[b[c]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[b[c]+"CancelAnimationFrame"]||window[b[c]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(b){var c=(new Date).getTime(),g=Math.max(8,16-(c-a)),h=window.setTimeout(function(){b(c+g)},g);a=c+g;return h});window.cancelAnimationFrame||(window.cancelAnimationFrame=
- function(a){window.clearTimeout(a)})})();
- var u={Pi:!1,Cz:!1,UD:!1,nH:!1,LE:!1,mE:!1,rD:!1,assert:function(a,b){!a&&u.rD&&(w.trace(b),w.l(b))},Os:null,enableBoundsInfo:function(a){u.Pi=!0;a&&a.At()},disableBoundsInfo:function(a){u.Pi=!1;a&&(ca(a),a.At())},RD:function(a,b){void 0===a&&(a=u.Os);void 0===b&&(b=a.ql("").kb);var c=b.length,d=a.ab.getContext("2d");d.fillStyle="rgba(255,255,0,.3)";for(var e=0;e<c;e++){var g=b.ma(e),h=g.ca;if(null!==g.va)u.RD(a,g.va);else{var k=g.hj.copy();k.fA(g.md);d.save();d.transform(k.m11,k.m12,k.m21,k.m22,
- k.dx,k.dy);d.fillRect(h.x,h.y,h.width,h.height);d.restore()}}},SD:function(a,b){a||(a=u.Os);b||(b=a.ql("").kb);var c=a.ab.getContext("2d"),d=b.length;c.fillStyle="rgba(0,0,255,.3)";for(var e=0;e<d;e++){var g=b.ma(e),h=g.Ha,k=g.hj;null!==g.va?u.SD(a,g.va):(c.save(),c.transform(k.m11,k.m12,k.m21,k.m22,k.dx,k.dy),c.fillRect(h.x,h.y,h.width,h.height),c.restore())}},iH:function(a,b){a||(a=u.Os);b||(b=a.ql("").kb);var c=a.ab.getContext("2d"),d=b.length;c.fillStyle="rgba(0,0,255,.3)";for(var e=0;e<d;e++){var g=
- b.ma(e),h=g.Ja,k=g.hj;null!==g.va?u.iH(a,g.va):(c.save(),c.transform(k.m11,k.m12,k.m21,k.m22,k.dx,k.dy),c.fillRect(h.x||0,h.y||0,h.width,h.height),c.restore())}},hK:function(){u.SD();u.RD()},iK:function(a){a||(a=u.Os);var b=a.Gc;a=a.ab.getContext("2d");a.strokeStyle="rgba(0,255,0,.9)";a.strokeRect(b.x,b.y,b.width,b.height)},TD:function(a,b){b.fillStyle="red";b.fillRect(0,0,8,8);b.lineWidth=8;b.strokeStyle="rgba(255,255,0,.6)";var c=a.qb;b.strokeRect(c.x,c.y,c.width,c.height);b.fillStyle="rgba(0,255,0,.2)";
- b.fillRect(a.Gc.x,a.Gc.y,a.Gc.width,a.Gc.height)},jH:function(a,b){b instanceof da||(a.lineWidth=2,a.strokeStyle="rgba(255,0,0,.5)",a.strokeRect(b.Ob.x,b.Ob.y,b.Ob.width,b.Ob.height),void 0!==b.stroke&&(a.strokeStyle=b.stroke),void 0!==b.qe&&(a.lineWidth=b.qe),null!==b.S&&b.S.type===ga&&(a.lineWidth=1,a.strokeStyle="rgba(10,200,10,.6)",void 0!==b.stroke&&(a.strokeStyle=b.stroke),void 0!==b.qe&&(a.lineWidth=b.qe)))},kH:function(a,b){a.lineWidth=1;a.strokeStyle="rgba(0,0,255,.5)";a.strokeRect(b.Ha.x,
- b.Ha.y,b.Ha.width,b.Ha.height);void 0!==b.stroke&&(a.strokeStyle=b.stroke);void 0!==b.qe&&(a.lineWidth=b.qe)},Bz:function(a,b,c){a.setTransform(1,0,0,1,0,0);a.scale(b.Ge,b.Ge);a.transform(c.m11,c.m12,c.m21,c.m22,c.dx,c.dy);c=b.Yb.length;for(var d=0;d<c;d++)for(var e=b.Yb.ma(d),g=e.kb.length,h=0;h<g;h++){var k=e.kb.ma(h);if(void 0!==k.location&&null!==k.location){if(k.location.J()){var l=k.location.x,m=k.location.y;a.beginPath();a.strokeStyle="limegreen";a.lineWidth=2;a.moveTo(l,m+6);a.lineTo(l,m);
- a.lineTo(l+6,m);a.moveTo(l,m);a.lineTo(l+10,m+20);a.stroke()}l=k.position.x;m=k.position.y;a.beginPath();a.strokeStyle="red";a.lineWidth=2;a.moveTo(l,m+6);a.lineTo(l,m);a.lineTo(l+6,m);a.moveTo(l,m);a.lineTo(l+20,m+10);a.stroke()}}a.setTransform(1,0,0,1,0,0)},jK:function(a,b,c){var d=a.length;b.fillStyle="rgba(255,0,0,.1)";for(var e=0;e<d;e++){var g,h=a[e];g=c.md;var k=h.x,l=h.y,m=k+h.width,n=l+h.height,p=g.m11,q=g.m12,r=g.m21,s=g.m22,t=g.dx,v=g.dy,y=k*p+l*r+t,h=k*q+l*s+v;g=m*p+l*r+t;var l=m*q+l*
- s+v,B=k*p+n*r+t,k=k*q+n*s+v,p=m*p+n*r+t,m=m*q+n*s+v,n=y,q=h,n=Math.min(n,g),y=Math.max(y,g),q=Math.min(q,l),h=Math.max(h,l),n=Math.min(n,B),y=Math.max(y,B),q=Math.min(q,k),h=Math.max(h,k),n=Math.min(n,p),y=Math.max(y,p),q=Math.min(q,m),h=Math.max(h,m);g=new x(n,q,y-n,h-q);b.fillRect(g.x,g.y,g.width,g.height)}},lH:function(a,b,c,d,e){a.fillStyle="rgba(0,255,0,.2)";a.fillRect(b,c,d,e)},mH:function(a,b,c){a.save();var d=b.md;d.reset();1!==b.$b&&d.scale(b.$b);b=b.Sa;0===b.x&&0===b.y||d.translate(-b.x,
- -b.y);a.setTransform(d.m11,d.m12,d.m21,d.m22,d.dx,d.dy);c=c.Rc.p;d=c.length;for(b=0;b<d;b++){var e=c[b];a.beginPath();a.moveTo(e.x-4,e.y);a.lineTo(e.x+4,e.y);a.moveTo(e.x,e.y-4);a.lineTo(e.x,e.y+4);a.lineWidth=2;a.strokeStyle="rgba(255,0,0,.9)";a.stroke()}a.restore()},fK:function(a){a||(a=u.Os);for(a=a.bn;a.next();)w.trace(a.value.toString())},dL:function(a,b){var c=b.Tn(a),d=b.Rb;d.pe=b.LA(c);d.ga=c;return ia(b,d,a)},$K:function(a,b){b.he(a.ga)&&(b.Ve.fillStyle="lime",b.Ve.Ql="lime",b.Ve.fillRect(a.pe.x,
- a.pe.y,1*b.scale,1*b.scale))},aL:function(a){var b=ja(a,!1,null,null);if(!b.ap){a=a.Ve;for(var c=0;c<=b.Em;c++)for(var d=0;d<=b.Fm;d++){var e=b.nc[c][d];if(0!==e){var g=c*b.Ed+b.Kf,h=d*b.vd+b.Lf;0!==e&&(a.fillStyle="rgba(255, 0, 0, .2)",a.fillRect(g,h,b.Ed,b.vd));999999<=e||(e%=10,a.fillStyle="blue",a.fillText(e.toString(),g,h+b.vd))}}}},oH:function(a){if(a instanceof z)for(a=a.bn;a.next();){var b=a.value;w.trace(b.toString());for(b=b.fi;b.next();)u.oH(b.value)}else if(a instanceof C){w.trace("References for "+
- a);null!==a.layer&&w.trace(" "+a.layer.toString()+' LayerName: "'+a.jf+'"');a.jn!==a&&w.trace(" SelectionObject: "+a.jn.toString()+' SelectionObjectName: "'+a.ex+'"');a.ac!==a&&w.trace(" LocationObject: "+a.ac.toString()+' LocationObjectName: "'+a.Pw+'"');if(a.Qg){for(var c="",b=a.Qg.j;b.next();)c+=b.key+" ";w.trace(" Adornments: "+c)}null!==a.Va&&w.trace(" ContainingGroup: "+a.Va.toString());if(a instanceof D){if(a.yd)for(b=a.yd.j;b.next(););if(0<a.Vd.count){c="";for(b=a.Vd;b.next();)c+=b.value.toString()+
- ", ";w.trace(" Links: "+c)}null!==a.Cd&&w.trace(" LabeledLink: "+a.Cd.toString());if(a instanceof F){w.trace(" Placeholder: "+a.placeholder);c="";for(b=a.Jc;b.next();)c+=b.value.toString()+", ";w.trace(" Members: "+c);c="";for(b=a.mm.j;b.next();)c+=b.value.toString()+", ";w.trace(" NestedGroups: "+c);w.trace(" Layout: "+a.Ub)}}else if(a instanceof G){w.trace(" Path: "+a.path);w.trace(" From: "+a.aa+" "+a.nd+' "'+a.Sf+'"');w.trace(" To: "+a.fa+" "+a.Wd+' "'+a.Pg+'"');c="";for(b=a.Vf;b.next();)c+=
- b.value.toString()+", ";w.trace(" LabelNodes: "+c)}}},pH:function(a){if(a instanceof z)for(a=a.bn;a.next();){var b=a.value;w.trace(b.toString());for(b=b.fi;b.next();)u.pH(b.value)}else a instanceof C&&(b=" ",a.GD&&(b+="c"),a.MD&&(b+="d"),a.kE&&(b+="g"),a.JE&&(b+="m"),a.aF&&(b+="h"),a.bF&&(b+="z"),a.gF&&(b+="o"),a.kk&&(b+="s"),a.zF&&(b+="t"),a.pF&&(b+="A"),a.Fw&&(b+="B"),a.Wz&&(b+="L"),a.cb&&(b+="S"),a.gk&&(b+="H"),u.DB(a,1,b))},DB:function(a,b,c){for(var d="",e=0;e<b;e++)d+=" ";d+=a.toString();
- c&&(d+=c);c=" ";c=a.visible?c+"v":c+"~";a.ag&&(c+="p");a.Uf&&(c+="m");a.Bw&&(c+="a");d+=c;if(0!==a.kc||0!==a.column)d+=" ["+a.kc+","+a.column+"]";d+=" "+a.ca.toString();a.Ca.J()&&(d+=" d:"+a.Ca.toString());a.Ha.J()&&(d+=" n:"+a.Ha.toString());1!==a.scale&&(d+=" s:"+a.scale);0!==a.angle&&(d+=" a:"+a.angle);null!==a.background&&(d+=" b:"+a.background.toString());null!==a.gl&&(d+=" a:"+a.background.toString());a instanceof H&&(d+=" elts:"+a.va.count,0!==a.DF&&(d+=" top:"+a.DF),0!==a.AE&&(d+=" left:"+
- a.AE),null!==a.jt&&(d+=" itemArray#:"+w.tb(a.jt)),a.ZH&&(d+=" cat:"+a.ZH),null!==a.data&&(d+=" data:"+a.data));null!==a.td&&(d+=' portId: "'+a.td+'"');w.trace(d);if(a instanceof H)for(a=a.elements;a.next();)u.DB(a.value,b+1,"")},lK:function(a){w.trace("DelayedReferences ("+a.ig.count+")");for(a=a.ig.j;a.next();){for(var b="",c=a.value.j;c.next();)b+=ka(c.value)+", ";w.trace(" "+a.key+": "+b)}}};ba.Debug=u;
- var w={dd:1,Nc:2,Wc:4,Vc:8,Zm:void 0!==window.navigator&&0<window.navigator.userAgent.indexOf("534.30")&&0<window.navigator.userAgent.indexOf("Android"),Tz:void 0!==window.navigator&&0<window.navigator.userAgent.indexOf("MSIE 10.0"),Uz:void 0!==window.navigator&&0<window.navigator.userAgent.indexOf("Trident/7"),uE:void 0!==window.navigator&&0<window.navigator.userAgent.indexOf("Edge/"),$m:0<=navigator.platform.toUpperCase().indexOf("MAC"),vE:null!==navigator.platform.match(/(iPhone|iPod|iPad)/i),
- JD:function(a,b,c){var d=-1;return function(){var e=this,g=arguments;-1!==d&&w.clearTimeout(d);d=w.setTimeout(function(){d=-1;c||a.apply(e,g)},b);c&&!d&&a.apply(e,g)}},setTimeout:function(a,b){return window.setTimeout(a,b)},clearTimeout:function(a){window.clearTimeout(a)},setInterval:function(a,b){return window.setInterval(a,b)},clearInterval:function(a){window.clearInterval(a)},createElement:function(a){return window.document.createElement(a)},l:function(a){u&&u.rD&&window.alert&&window.alert(a);
- throw Error(a);},G:function(a,b){if(a.La){var c="The object is frozen, so its properties cannot be set: "+a.toString();void 0!==b&&(c+=" to value: "+b);w.l(c)}},k:function(a,b,c,d){a instanceof b||(c=w.getTypeName(c),void 0!==d&&(c+="."+d),w.tc(a,b,c))},g:function(a,b,c,d){typeof a!==b&&(c=w.getTypeName(c),void 0!==d&&(c+="."+d),w.tc(a,b,c))},o:function(a,b,c){"number"===typeof a&&isFinite(a)||(b=w.getTypeName(b),void 0!==c&&(b+="."+c),w.l(b+" must be a real number type, and not NaN or Infinity: "+
- a))},Ea:function(a,b,c,d){a instanceof la&&a.Je===b||(c=w.getTypeName(c),void 0!==d&&(c+="."+d),w.tc(a,"a constant of class "+w.Fg(b),c))},Gs:function(a,b){"string"===typeof a?na(a)||w.l('Color "'+a+'" is not a valid color string for '+b):a instanceof oa||w.l("Value for "+b+" must be a color string or a Brush, not "+a)},tc:function(a,b,c,d){b=w.getTypeName(b);c=w.getTypeName(c);void 0!==d&&(c+="."+d);"string"===typeof a?w.l(c+" value is not an instance of "+b+': "'+a+'"'):w.l(c+" value is not an instance of "+
- b+": "+a)},ja:function(a,b,c,d){c=w.getTypeName(c);void 0!==d&&(c+="."+d);w.l(c+" is not in the range "+b+": "+a)},cd:function(a){w.l(w.Fg(a)+" constructor cannot take any arguments.")},Vb:function(a){w.l("Collection was modified during iteration: "+a.toString()+"\n Perhaps you should iterate over a copy of the collection,\n or you could collect items to be removed from the collection after the iteration.")},trace:function(a){window.console&&window.console.log(a)},$a:function(a){return"object"===
- typeof a&&null!==a},isArray:function(a){return Array.isArray(a)||a instanceof NodeList||a instanceof HTMLCollection},UH:function(a){return Array.isArray(a)},Fs:function(a,b,c){w.isArray(a)||w.tc(a,"Array or NodeList or HTMLCollection",b,c)},tb:function(a){return a.length},il:function(a){return Array.prototype.slice.call(a)},ob:function(a,b){Array.isArray(a);return a[b]},qD:function(a,b,c){Array.isArray(a)?a[b]=c:w.l("Cannot replace an object in an HTMLCollection or NodeList at "+b)},oz:function(a,
- b){if(Array.isArray(a))return a.indexOf(b);for(var c=a.length,d=0;d<c;d++)if(a[d]===b)return d;return-1},Ni:function(a,b,c){Array.isArray(a)?b>=a.length?a.push(c):a.splice(b,0,c):w.l("Cannot insert an object into an HTMLCollection or NodeList: "+c+" at "+b)},Oi:function(a,b){Array.isArray(a)?b>=a.length?a.pop():a.splice(b,1):w.l("Cannot remove an object from an HTMLCollection or NodeList at "+b)},zx:[],O:function(){var a=w.zx.pop();return void 0===a?new I:a},lc:function(a,b){var c=w.zx.pop();if(void 0===
- c)return new I(a,b);c.x=a;c.y=b;return c},A:function(a){w.zx.push(a)},YA:[],Ml:function(){var a=w.YA.pop();return void 0===a?new pa:a},ek:function(a){w.YA.push(a)},Ax:[],eg:function(){var a=w.Ax.pop();return void 0===a?new x:a},nk:function(a,b,c,d){var e=w.Ax.pop();if(void 0===e)return new x(a,b,c,d);e.x=a;e.y=b;e.width=c;e.height=d;return e},qc:function(a){w.Ax.push(a)},ZA:[],zh:function(){var a=w.ZA.pop();return void 0===a?new ra:a},gf:function(a){w.ZA.push(a)},Bx:null,s:function(){var a=w.Bx;return null!==
- a?(w.Bx=null,a):new sa},u:function(a){a.reset();w.Bx=a},XA:[],nb:function(){var a=w.XA.pop();return void 0===a?[]:a},xa:function(a){a.length=0;w.XA.push(a)},Ah:Object.freeze([]),Pl:1,mc:function(a){a.__gohashid=w.Pl++},bt:function(a){var b=a.__gohashid;void 0===b&&(b=w.Pl++,a.__gohashid=b);return b},ad:function(a){return a.__gohashid},la:function(a,b){b.Jx=a;ba[a]=b},Pa:function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},$h:function(a){a.nG=!0},defineProperty:function(a,
- b,c,d,e){w.g(a,"function","Util.defineProperty:classfunc");w.g(b,"object","Util.defineProperty:propobj");w.g(c,"function","Util.defineProperty:getter");w.g(d,"function","Util.defineProperty:setter");for(var g in b){var h=b[g];b={get:c,set:d};if(void 0!==e)for(var k in e)b[k]=e[k];Object.defineProperty(a.prototype,g,b);e=Object.getOwnPropertyDescriptor(a.prototype,g);h&&e&&Object.defineProperty(a.prototype,h,e);if(u&&h){var l=h.charAt(0).toUpperCase()+h.slice(1);h===l&&w.l('Defining capitalized property "'+
- l+'"!?');Object.defineProperty(a.prototype,l,{get:function(){w.Sv||w.Tz||w.Uz||w.uE||(w.Sv=!0,w.trace('Getting the property "'+l+'" is probably not what you intended: it is capitalized but should be spelled "'+h+'"'))},set:function(){w.l('Setting the property "'+l+'" is probably not what you intended: it is capitalized but should be spelled "'+h+'"')}})}break}},Sv:!1,w:function(a,b,c,d){w.g(a,"function","Util.defineReadOnlyProperty:classfunc");w.g(b,"object","Util.defineReadOnlyProperty:propobj");
- w.g(c,"function","Util.defineReadOnlyProperty:getter");for(var e in b){var g=b[e];b={get:c,set:function(a){w.l('The property "'+g+'" is read-only and cannot be set to '+a)}};if(void 0!==d)for(var h in d)b[h]=d[h];Object.defineProperty(a.prototype,e,b);d=Object.getOwnPropertyDescriptor(a.prototype,e);g&&d&&Object.defineProperty(a.prototype,g,d);if(u&&g){var k=g.charAt(0).toUpperCase()+g.slice(1);Object.defineProperty(a.prototype,k,{get:function(){w.Sv||w.Tz||w.Uz||w.uE||(w.Sv=!0,w.trace('Getting the property "'+
- k+'" is probably not what you intended: it is capitalized but should be spelled "'+g+'"'))},set:function(){w.l('Setting the read-only property "'+k+'" is probably not what you intended: it is capitalized but should be spelled "'+g+'", and cannot be set anyway')}})}break}},ge:function(a,b){for(var c in b)b[c]=!0;a.prototype.tC=b},getTypeName:function(a){return void 0===a?"":"string"===typeof a?a:"function"===typeof a?w.Fg(a):null===a?"*":""},Fg:function(a){if("function"===typeof a){if(a.Jx)return a.Jx;
- if(a.name)return a.name;var b=a.toString(),c=b.indexOf("("),b=b.substring(9,c).trim();if(""!==b)return a.Jx=b}else if("object"===typeof a&&a.constructor)return w.Fg(a.constructor);return typeof a},v:function(a,b,c){w.g(a,"function","Util.defineEnumValue:classfunc");w.g(b,"string","Util.defineEnumValue:name");w.g(c,"number","Util.defineEnumValue:num");c=new la(a,b,c);Object.freeze(c);a[b]=c;var d=a.Yt;d instanceof ta||(d=new ta("string",la),a.Yt=d);d.add(b,c);return c},yb:function(a,b){if(!a||!b)return null;
- var c=void 0;try{"function"===typeof b?c=b(a):"function"===typeof a.getAttribute?(c=a.getAttribute(b),null===c&&(c=void 0)):c=a[b]}catch(d){u&&w.trace("property get error: "+d.toString())}return c},Wa:function(a,b,c){if(a&&b)try{"function"===typeof b?b(a,c):"function"===typeof a.setAttribute?a.setAttribute(b,c):a[b]=c}catch(d){u&&w.trace("property set error: "+d.toString())}},It:function(a,b){w.g(a,"object","Setting properties requires Objects as arguments");w.g(b,"object","Setting properties requires Objects as arguments");
- var c=a instanceof H,d=a instanceof z,e;for(e in b){""===e&&w.l("Setting properties requires non-empty property names");var g=a,h=e;if(c||d){var k=e.indexOf(".");if(0<k){var l=e.substring(0,k);if(c)g=a.te(l);else if(g=a[l],void 0===g||null===g)g=a.zb[l];w.$a(g)?h=e.substr(k+1):w.l("Unable to find object named: "+l+" in "+a.toString()+" when trying to set property: "+e)}}if("_"!==h[0]&&!w.xw(g,h))if(d&&w.xw(a.zb,h))g=a.zb;else if(d&&ua(a,h)){a.jz(h,b[h]);continue}else w.l('Trying to set undefined property "'+
- h+'" on object: '+g.toString());g[h]=b[e];"_"===h[0]&&(k=g.Vl,w.isArray(k)||(k=[],g.Vl=k),k.push(h))}},xw:function(a,b){if(a.hasOwnProperty(b))return!0;for(var c=Object.getPrototypeOf(a);c&&c!==Function;){if(c.hasOwnProperty(b))return!0;var d=c.tC;if(d&&d[b])return!0;c=Object.getPrototypeOf(c)}return!1},vD:function(a,b){if(!w.$a(b)||b instanceof Element||b instanceof CanvasRenderingContext2D||b instanceof va||b instanceof xa)return"";var c="",d;for(d in b)if("string"!==typeof d)""===c&&(c=b+"\n"),
- c+=" "+d+" is not a string property\n";else if("_"!==d.charAt(0)&&!(2>=d.length)){var e=w.yb(b,d);null===e||"function"===typeof e||w.xw(b,d)||(""===c&&(c=b+"\n"),c+=' unknown property "'+d+'" has value: '+e+" at "+a+"\n")}return c},gw:function(a,b){if(null!==b&&"number"!==typeof b&&"string"!==typeof b&&"boolean"!==typeof b&&"function"!==typeof b)if(void 0!==w.ad(b)){if(!w.yv.contains(b))if(w.yv.add(b),w.fv.add(w.vD(a,b)),b instanceof K||b instanceof L||b instanceof ta)for(var c=b.j;c.next();)w.gw(a+
- "["+c.key+"]",c.value);else for(c in b){var d=w.yb(b,c);if(void 0!==d&&null!==d&&w.$a(d)&&d!==b.tC){if(b instanceof ya){if(d===b.vj)continue}else if(b instanceof H){if("data"===c||d===b.Fh)continue;if("itemArray"===c||d===b.ui)continue;if(b instanceof C&&d===b.Uk)continue}else if(!(b instanceof z))if(b instanceof za){if("archetypeGroupData"===c||d===b.Ex)continue}else if(b instanceof Ba){if("archetypeLinkData"===c||d===b.Gx)continue;if("archetypeLabelNodeData"===c||d===b.Fx)continue}else if(b instanceof
- Ca){if("archetypeNodeData"===c||d===b.Bk)continue}else if(b instanceof M){if("nodeDataArray"===c||d===b.vf)continue;if("linkDataArray"===c||d===b.Qh||d===b.km)continue;if(d===b.Ac)continue;if(d===b.ig)continue}else if(b instanceof Da||b instanceof Ga||b instanceof Ia)continue;w.gw(a+"."+c,d)}}}else if(Array.isArray(b))for(c=0;c<b.length;c++)w.gw(a+"["+c+"]",b[c]);else w.fv.add(w.vD(a,b))},check:function(a){void 0===w.yv?w.yv=new L(Object):w.yv.clear();w.fv=new Ja;w.gw("",a);a=w.fv.toString();w.fv=
- null;return a},FI:function(a){for(var b=[],c=0;256>c;c++)b[c]=c;for(var d=0,e=0,c=0;256>c;c++)d=(d+b[c]+119)%256,e=b[c],b[c]=b[d],b[d]=e;for(var d=c=0,g="",h=0;h<a.length;h++)c=(c+1)%256,d=(d+b[c])%256,e=b[c],b[c]=b[d],b[d]=e,g+=String.fromCharCode(a.charCodeAt(h)^b[(b[c]+b[d])%256]);return g},HH:function(a){for(var b=[],c=0;256>c;c++)b["0123456789abcdef".charAt(c>>4)+"0123456789abcdef".charAt(c&15)]=String.fromCharCode(c);a.length%2&&(a="0"+a);for(var d=[],e=0,c=0;c<a.length;c+=2)d[e++]=b[a.substr(c,
- 2)];a=d.join("");return""===a?"0":a},Ma:function(a){return w.FI(w.HH(a))},Ol:null,adym:"7da71ca0ad381e90",KG:"@COLOR1",LG:"@COLOR2"};
- w.Ol=function(){var a=window.document.createElement("canvas"),b=a.getContext("2d");b[w.Ma("7ca11abfd022028846")]=w.Ma("398c3597c01238");for(var c=["5da73c80a3330d854f9e5e671d6633","32ab5ff3b26f42dc0ed90f22412913b54ae6247590da4bb21c324ba3a84e385776","54a702f3e53909c447824c6706603faf4cfb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387","74bf19bce72555874c86"],d=1;5>d;d++)b[w.Ma("7ca11abfd7330390")](w.Ma(c[d-1]),10,15*d+0);b[w.Ma("7ca11abfd022028846")]=w.Ma("39f046ebb36e4b");for(d=1;5>d;d++)b[w.Ma("7ca11abfd7330390")](w.Ma(c[d-
- 1]),10,15*d+0);if(4!==c.length||"5"!==c[0][0]||"7"!==c[3][0])w.v=function(a,b){var c=new la(a,b,2);Object.freeze(c);a[b]=c;var d=a.Yt;d instanceof ta||(d=new ta("string",la),a.Yt=d);d.add(b,c);return c};return a}();function la(a,b,c){w.mc(this);this.fB=a;this.cc=b;this.sG=c}la.prototype.toString=function(){return w.Fg(this.fB)+"."+this.cc};w.w(la,{Je:"classType"},function(){return this.fB});w.w(la,{name:"name"},function(){return this.cc});w.w(la,{value:"value"},function(){return this.sG});var Ma;
- la.findName=Ma=function(a,b){if(null===b||""===b)return null;w.g(a,"function","findName:classfunc");w.g(b,"string","EnumValue.findName:name");var c=a.Yt;return c instanceof ta?c.za(b):null};function Ja(){this.eB=[]}Ja.prototype.toString=function(){return this.eB.join("")};Ja.prototype.add=function(a){""!==a&&this.eB.push(a)};function xa(){}
- function Na(a){void 0===a&&(a=42);this.seed=a;this.sx=48271;this.Xt=2147483647;this.UA=this.Xt/this.sx;this.VF=this.Xt%this.sx;this.RF=1/this.Xt;this.random()}Na.prototype.random=function(){var a=this.seed%this.UA*this.sx-this.seed/this.UA*this.VF;this.seed=0<a?a:a+this.Xt;return this.seed*this.RF};function Oa(){}w.w(Oa,{j:"iterator"},function(){return this});Oa.prototype.reset=Oa.prototype.reset=function(){};Oa.prototype.next=Oa.prototype.hasNext=Oa.prototype.next=function(){return!1};
- Oa.prototype.first=Oa.prototype.first=function(){return null};Oa.prototype.any=function(){return!1};Oa.prototype.all=function(){return!0};Oa.prototype.each=function(){};w.w(Oa,{count:"count"},function(){return 0});Oa.prototype.jg=function(){};Oa.prototype.toString=function(){return"EmptyIterator"};var Pa=new Oa;function Qa(a){this.key=-1;this.value=a}w.ge(Qa,{key:!0,value:!0});w.w(Qa,{j:"iterator"},function(){return this});Qa.prototype.reset=Qa.prototype.reset=function(){this.key=-1};
- Qa.prototype.next=Qa.prototype.hasNext=Qa.prototype.next=function(){return-1===this.key?(this.key=0,!0):!1};Qa.prototype.first=Qa.prototype.first=function(){this.key=0;return this.value};Qa.prototype.any=function(a){this.key=-1;return a(this.value)};Qa.prototype.all=function(a){this.key=-1;return a(this.value)};Qa.prototype.each=function(a){this.key=-1;a(this.value)};w.w(Qa,{count:"count"},function(){return 1});Qa.prototype.jg=function(){this.value=null};
- Qa.prototype.toString=function(){return"SingletonIterator("+this.value+")"};function Ta(a){this.Md=a;this.Jj=null;this.reset()}w.ge(Ta,{key:!0,value:!0});w.w(Ta,{j:"iterator"},function(){return this});w.defineProperty(Ta,{fn:"predicate"},function(){return this.Jj},function(a){this.Jj=a});Ta.prototype.reset=Ta.prototype.reset=function(){var a=this.Md;a.Ld=null;this.fb=a.Y;this.Jd=-1};
- Ta.prototype.next=Ta.prototype.hasNext=Ta.prototype.next=function(){var a=this.Md;if(a.Y!==this.fb){if(0>this.key)return!1;w.Vb(a)}var a=a.p,b=a.length,c=++this.Jd,d=this.Jj;if(null!==d)for(;c<b;){var e=a[c];if(d(e))return this.key=this.Jd=c,this.value=e,!0;c++}else{if(c<b)return this.key=c,this.value=a[c],!0;this.jg()}return!1};
- Ta.prototype.first=Ta.prototype.first=function(){var a=this.Md;this.fb=a.Y;this.Jd=0;var a=a.p,b=a.length,c=this.Jj;if(null!==c){for(var d=0;d<b;){var e=a[d];if(c(e))return this.key=this.Jd=d,this.value=e;d++}return null}return 0<b?(e=a[0],this.key=0,this.value=e):null};Ta.prototype.any=function(a){var b=this.Md;b.Ld=null;var c=b.Y;this.Jd=-1;for(var d=b.p,e=d.length,g=this.Jj,h=0;h<e;h++){var k=d[h];if(null===g||g(k)){if(a(k))return!0;b.Y!==c&&w.Vb(b)}}return!1};
- Ta.prototype.all=function(a){var b=this.Md;b.Ld=null;var c=b.Y;this.Jd=-1;for(var d=b.p,e=d.length,g=this.Jj,h=0;h<e;h++){var k=d[h];if(null===g||g(k)){if(!a(k))return!1;b.Y!==c&&w.Vb(b)}}return!0};Ta.prototype.each=function(a){var b=this.Md;b.Ld=null;var c=b.Y;this.Jd=-1;for(var d=b.p,e=d.length,g=this.Jj,h=0;h<e;h++){var k=d[h];if(null===g||g(k))a(k),b.Y!==c&&w.Vb(b)}};w.w(Ta,{count:"count"},function(){var a=this.Jj;if(null!==a){for(var b=0,c=this.Md.p,d=c.length,e=0;e<d;e++)a(c[e])&&b++;return b}return this.Md.p.length});
- Ta.prototype.jg=function(){this.key=-1;this.value=null;this.fb=-1;this.Jj=null;this.Md.Ld=this};Ta.prototype.toString=function(){return"ListIterator@"+this.Jd+"/"+this.Md.count};function Ua(a){this.Md=a;this.reset()}w.ge(Ua,{key:!0,value:!0});w.w(Ua,{j:"iterator"},function(){return this});Ua.prototype.reset=Ua.prototype.reset=function(){var a=this.Md;a.fo=null;this.fb=a.Y;this.Jd=a.p.length};
- Ua.prototype.next=Ua.prototype.hasNext=Ua.prototype.next=function(){var a=this.Md;if(a.Y!==this.fb){if(0>this.key)return!1;w.Vb(a)}var b=--this.Jd;if(0<=b)return this.key=b,this.value=a.p[b],!0;this.jg();return!1};Ua.prototype.first=Ua.prototype.first=function(){var a=this.Md;this.fb=a.Y;var b=a.p;this.Jd=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null};
- Ua.prototype.any=function(a){var b=this.Md;b.fo=null;var c=b.Y,d=b.p,e=d.length;this.Jd=e;for(e-=1;0<=e;e--){if(a(d[e]))return!0;b.Y!==c&&w.Vb(b)}return!1};Ua.prototype.all=function(a){var b=this.Md;b.fo=null;var c=b.Y,d=b.p,e=d.length;this.Jd=e;for(e-=1;0<=e;e--){if(!a(d[e]))return!1;b.Y!==c&&w.Vb(b)}return!0};Ua.prototype.each=function(a){var b=this.Md;b.fo=null;var c=b.Y,d=b.p,e=d.length;this.Jd=e;for(e-=1;0<=e;e--)a(d[e]),b.Y!==c&&w.Vb(b)};w.w(Ua,{count:"count"},function(){return this.Md.p.length});
- Ua.prototype.jg=function(){this.key=-1;this.value=null;this.fb=-1;this.Md.fo=this};Ua.prototype.toString=function(){return"ListIteratorBackwards("+this.Jd+"/"+this.Md.count+")"};
- function K(a){w.mc(this);this.La=!1;this.p=[];this.Y=0;this.fo=this.Ld=null;void 0===a||null===a?this.ia=null:"string"===typeof a?"object"===a||"string"===a||"number"===a||"boolean"===a||"function"===a?this.ia=a:w.ja(a,"the string 'object', 'number', 'string', 'boolean', or 'function'","List constructor: type"):"function"===typeof a?this.ia=a===Object?"object":a===String?"string":a===Number?"number":a===Boolean?"boolean":a===Function?"function":a:w.ja(a,"null, a primitive type name, or a class type",
- "List constructor: type")}w.la("List",K);K.prototype.Sg=function(a){null!==this.ia&&("string"===typeof this.ia?typeof a===this.ia&&null!==a||w.tc(a,this.ia):a instanceof this.ia||w.tc(a,this.ia))};K.prototype.ae=function(){var a=this.Y;a++;999999999<a&&(a=0);this.Y=a};K.prototype.freeze=K.prototype.freeze=function(){this.La=!0;return this};K.prototype.thaw=K.prototype.Ta=function(){this.La=!1;return this};K.prototype.toString=function(){return"List("+w.getTypeName(this.ia)+")#"+w.ad(this)};
- K.prototype.add=K.prototype.push=K.prototype.add=function(a){null!==a&&(u&&this.Sg(a),w.G(this,a),this.p.push(a),this.ae())};K.prototype.addAll=K.prototype.ce=function(a){if(null===a)return this;w.G(this);var b=this.p;if(w.isArray(a))for(var c=w.tb(a),d=0;d<c;d++){var e=w.ob(a,d);u&&this.Sg(e);b.push(e)}else for(a=a.j;a.next();)e=a.value,u&&this.Sg(e),b.push(e);this.ae();return this};K.prototype.clear=K.prototype.clear=function(){w.G(this);this.p.length=0;this.ae()};
- K.prototype.contains=K.prototype.has=K.prototype.contains=function(a){if(null===a)return!1;u&&this.Sg(a);return-1!==this.p.indexOf(a)};K.prototype.indexOf=K.prototype.indexOf=function(a){if(null===a)return-1;u&&this.Sg(a);return this.p.indexOf(a)};K.prototype.elt=K.prototype.get=K.prototype.ma=function(a){u&&w.o(a,K,"elt:i");var b=this.p;(0>a||a>=b.length)&&w.ja(a,"0 <= i < length",K,"elt:i");return b[a]};
- K.prototype.setElt=K.prototype.set=K.prototype.Lg=function(a,b){u&&(this.Sg(b),w.o(a,K,"setElt:i"));var c=this.p;(0>a||a>=c.length)&&w.ja(a,"0 <= i < length",K,"setElt:i");w.G(this,a);c[a]=b};K.prototype.first=K.prototype.first=function(){var a=this.p;return 0===a.length?null:a[0]};K.prototype.last=K.prototype.Ud=function(){var a=this.p,b=a.length;return 0<b?a[b-1]:null};K.prototype.pop=K.prototype.pop=function(){w.G(this);var a=this.p;return 0<a.length?a.pop():null};
- K.prototype.any=function(a){for(var b=this.p,c=this.Y,d=b.length,e=0;e<d;e++){if(a(b[e]))return!0;this.Y!==c&&w.Vb(this)}return!1};K.prototype.all=function(a){for(var b=this.p,c=this.Y,d=b.length,e=0;e<d;e++){if(!a(b[e]))return!1;this.Y!==c&&w.Vb(this)}return!0};K.prototype.each=function(a){for(var b=this.p,c=this.Y,d=b.length,e=0;e<d;e++)a(b[e]),this.Y!==c&&w.Vb(this)};
- K.prototype.insertAt=K.prototype.ie=function(a,b){u&&(this.Sg(b),w.o(a,K,"insertAt:i"));0>a&&w.ja(a,">= 0",K,"insertAt:i");w.G(this,a);var c=this.p;a>=c.length?c.push(b):c.splice(a,0,b);this.ae();return!0};K.prototype.remove=K.prototype["delete"]=K.prototype.remove=function(a){if(null===a)return!1;u&&this.Sg(a);w.G(this,a);var b=this.p;a=b.indexOf(a);if(-1===a)return!1;a===b.length-1?b.pop():b.splice(a,1);this.ae();return!0};
- K.prototype.removeAt=K.prototype.ud=function(a){u&&w.o(a,K,"removeAt:i");var b=this.p;(0>a||a>=b.length)&&w.ja(a,"0 <= i < length",K,"removeAt:i");w.G(this,a);a===b.length-1?b.pop():b.splice(a,1);this.ae()};
- K.prototype.removeRange=K.prototype.removeRange=function(a,b){u&&(w.o(a,K,"removeRange:from"),w.o(b,K,"removeRange:to"));var c=this.p;(0>a||a>=c.length)&&w.ja(a,"0 <= from < length",K,"elt:from");(0>b||b>=c.length)&&w.ja(b,"0 <= to < length",K,"elt:to");w.G(this,a);var d=c.slice((b||a)+1||c.length);c.length=0>a?c.length+a:a;c.push.apply(c,d);this.ae()};K.prototype.copy=function(){for(var a=new K(this.ia),b=this.p,c=this.count,d=0;d<c;d++)a.add(b[d]);return a};
- K.prototype.toArray=K.prototype.Te=function(){for(var a=this.p,b=this.count,c=Array(b),d=0;d<b;d++)c[d]=a[d];return c};K.prototype.toSet=function(){for(var a=new L(this.ia),b=this.p,c=this.count,d=0;d<c;d++)a.add(b[d]);return a};K.prototype.sort=K.prototype.sort=function(a){u&&w.g(a,"function",K,"sort:sortfunc");w.G(this);this.p.sort(a);this.ae();return this};
- K.prototype.sortRange=K.prototype.Fp=function(a,b,c){var d=this.p,e=d.length;void 0===b&&(b=0);void 0===c&&(c=e);u&&(w.g(a,"function",K,"sortRange:sortfunc"),w.o(b,K,"sortRange:from"),w.o(c,K,"sortRange:to"));w.G(this);var g=c-b;if(1>=g)return this;(0>b||b>=e-1)&&w.ja(b,"0 <= from < length",K,"sortRange:from");if(2===g)return c=d[b],e=d[b+1],0<a(c,e)&&(d[b]=e,d[b+1]=c,this.ae()),this;if(0===b)if(c>=e)d.sort(a);else for(g=d.slice(0,c),g.sort(a),a=0;a<c;a++)d[a]=g[a];else if(c>=e)for(g=d.slice(b),g.sort(a),
- a=b;a<e;a++)d[a]=g[a-b];else for(g=d.slice(b,c),g.sort(a),a=b;a<c;a++)d[a]=g[a-b];this.ae();return this};K.prototype.reverse=K.prototype.reverse=function(){w.G(this);this.p.reverse();this.ae();return this};w.w(K,{count:"count"},function(){return this.p.length});w.w(K,{size:"size"},function(){return this.p.length});w.w(K,{length:"length"},function(){return this.p.length});w.w(K,{j:"iterator"},function(){if(0>=this.p.length)return Pa;var a=this.Ld;return null!==a?(a.reset(),a):new Ta(this)});
- w.w(K,{an:"iteratorBackwards"},function(){if(0>=this.p.length)return Pa;var a=this.fo;return null!==a?(a.reset(),a):new Ua(this)});function Va(a){this.Zk=a;this.reset()}w.ge(Va,{key:!0,value:!0});w.w(Va,{j:"iterator"},function(){return this});Va.prototype.reset=Va.prototype.reset=function(){var a=this.Zk;a.Ld=null;this.fb=a.Y;this.Ib=null};
- Va.prototype.next=Va.prototype.hasNext=Va.prototype.next=function(){var a=this.Zk;if(a.Y!==this.fb){if(null===this.key)return!1;w.Vb(a)}var b=this.Ib,b=null===b?a.jb:b.Zb;if(null!==b)return this.Ib=b,this.value=b.value,this.key=b.key,!0;this.jg();return!1};Va.prototype.first=Va.prototype.first=function(){var a=this.Zk;this.fb=a.Y;a=a.jb;if(null!==a){this.Ib=a;var b=a.value;this.key=a.key;return this.value=b}return null};
- Va.prototype.any=function(a){var b=this.Zk;b.Ld=null;var c=b.Y;this.Ib=null;for(var d=b.jb;null!==d;){if(a(d.value))return!0;b.Y!==c&&w.Vb(b);d=d.Zb}return!1};Va.prototype.all=function(a){var b=this.Zk;b.Ld=null;var c=b.Y;this.Ib=null;for(var d=b.jb;null!==d;){if(!a(d.value))return!1;b.Y!==c&&w.Vb(b);d=d.Zb}return!0};Va.prototype.each=function(a){var b=this.Zk;b.Ld=null;var c=b.Y;this.Ib=null;for(var d=b.jb;null!==d;)a(d.value),b.Y!==c&&w.Vb(b),d=d.Zb};w.w(Va,{count:"count"},function(){return this.Zk.fd});
- Va.prototype.jg=function(){this.value=this.key=null;this.fb=-1;this.Zk.Ld=this};Va.prototype.toString=function(){return null!==this.Ib?"SetIterator@"+this.Ib.value:"SetIterator"};
- function L(a){w.mc(this);this.La=!1;void 0===a||null===a?this.ia=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.ia=a:w.ja(a,"the string 'object', 'number' or 'string'","Set constructor: type"):"function"===typeof a?this.ia=a===Object?"object":a===String?"string":a===Number?"number":a:w.ja(a,"null, a primitive type name, or a class type","Set constructor: type");this.gd={};this.fd=0;this.Ld=null;this.Y=0;this.Ph=this.jb=null}w.la("Set",L);
- L.prototype.Sg=function(a){null!==this.ia&&("string"===typeof this.ia?typeof a===this.ia&&null!==a||w.tc(a,this.ia):a instanceof this.ia||w.tc(a,this.ia))};L.prototype.ae=function(){var a=this.Y;a++;999999999<a&&(a=0);this.Y=a};L.prototype.freeze=L.prototype.freeze=function(){this.La=!0;return this};L.prototype.thaw=L.prototype.Ta=function(){this.La=!1;return this};L.prototype.toString=function(){return"Set("+w.getTypeName(this.ia)+")#"+w.ad(this)};
- L.prototype.add=L.prototype.add=function(a){if(null===a)return!1;u&&this.Sg(a);w.G(this,a);var b=a;w.$a(a)&&(b=w.bt(a));return void 0===this.gd[b]?(this.fd++,a=new Wa(a,a),this.gd[b]=a,b=this.Ph,null===b?this.jb=a:(a.ro=b,b.Zb=a),this.Ph=a,this.ae(),!0):!1};L.prototype.addAll=L.prototype.ce=function(a){if(null===a)return this;w.G(this);if(w.isArray(a))for(var b=w.tb(a),c=0;c<b;c++)this.add(w.ob(a,c));else for(a=a.j;a.next();)this.add(a.value);return this};
- L.prototype.contains=L.prototype.has=L.prototype.contains=function(a){if(null===a)return!1;u&&this.Sg(a);var b=a;return w.$a(a)&&(b=w.ad(a),void 0===b)?!1:void 0!==this.gd[b]};L.prototype.containsAll=function(a){if(null===a)return!0;for(a=a.j;a.next();)if(!this.contains(a.value))return!1;return!0};L.prototype.containsAny=function(a){if(null===a)return!0;for(a=a.j;a.next();)if(this.contains(a.value))return!0;return!1};
- L.prototype.first=L.prototype.first=function(){var a=this.jb;return null===a?null:a.value};L.prototype.any=function(a){for(var b=this.Y,c=this.jb;null!==c;){if(a(c.value))return!0;this.Y!==b&&w.Vb(this);c=c.Zb}return!1};L.prototype.all=function(a){for(var b=this.Y,c=this.jb;null!==c;){if(!a(c.value))return!1;this.Y!==b&&w.Vb(this);c=c.Zb}return!0};L.prototype.each=function(a){for(var b=this.Y,c=this.jb;null!==c;)a(c.value),this.Y!==b&&w.Vb(this),c=c.Zb};
- L.prototype.remove=L.prototype["delete"]=L.prototype.remove=function(a){if(null===a)return!1;u&&this.Sg(a);w.G(this,a);var b=a;if(w.$a(a)&&(b=w.ad(a),void 0===b))return!1;a=this.gd[b];if(void 0===a)return!1;var c=a.Zb,d=a.ro;null!==c&&(c.ro=d);null!==d&&(d.Zb=c);this.jb===a&&(this.jb=c);this.Ph===a&&(this.Ph=d);delete this.gd[b];this.fd--;this.ae();return!0};
- L.prototype.removeAll=L.prototype.TE=function(a){if(null===a)return this;w.G(this);if(w.isArray(a))for(var b=w.tb(a),c=0;c<b;c++)this.remove(w.ob(a,c));else for(a=a.j;a.next();)this.remove(a.value);return this};L.prototype.retainAll=function(a){if(null===a||0===this.count)return this;w.G(this);var b=new L(this.ia);b.ce(a);a=new K(this.ia);for(var c=this.j;c.next();)b.contains(c.value)||a.add(c.value);for(b=a.j;b.next();)this.remove(b.value);return this};
- L.prototype.clear=L.prototype.clear=function(){w.G(this);this.gd={};this.fd=0;this.Ph=this.jb=null;this.ae()};L.prototype.copy=function(){var a=new L(this.ia),b=this.gd,c;for(c in b)a.add(b[c].value);return a};L.prototype.toArray=L.prototype.Te=function(){var a=Array(this.fd),b=this.gd,c=0,d;for(d in b)a[c]=b[d].value,c++;return a};L.prototype.toList=function(){var a=new K(this.ia),b=this.gd,c;for(c in b)a.add(b[c].value);return a};w.w(L,{count:"count"},function(){return this.fd});
- w.w(L,{size:"size"},function(){return this.fd});w.w(L,{j:"iterator"},function(){if(0>=this.fd)return Pa;var a=this.Ld;return null!==a?(a.reset(),a):new Va(this)});function Ya(a){this.eb=a;this.reset()}w.ge(Ya,{key:!0,value:!0});w.w(Ya,{j:"iterator"},function(){return this});Ya.prototype.reset=Ya.prototype.reset=function(){this.fb=this.eb.Y;this.Ib=null};
- Ya.prototype.next=Ya.prototype.hasNext=Ya.prototype.next=function(){var a=this.eb;if(a.Y!==this.fb){if(null===this.key)return!1;w.Vb(a)}var b=this.Ib,b=null===b?a.jb:b.Zb;if(null!==b)return this.Ib=b,this.value=this.key=a=b.key,!0;this.jg();return!1};Ya.prototype.first=Ya.prototype.first=function(){var a=this.eb;this.fb=a.Y;a=a.jb;return null!==a?(this.Ib=a,this.value=this.key=a=a.key):null};
- Ya.prototype.any=function(a){var b=this.eb,c=b.Y;this.Ib=null;for(var d=b.jb;null!==d;){if(a(d.key))return!0;b.Y!==c&&w.Vb(b);d=d.Zb}return!1};Ya.prototype.all=function(a){var b=this.eb,c=b.Y;this.Ib=null;for(var d=b.jb;null!==d;){if(!a(d.key))return!1;b.Y!==c&&w.Vb(b);d=d.Zb}return!0};Ya.prototype.each=function(a){var b=this.eb,c=b.Y;this.Ib=null;for(var d=b.jb;null!==d;)a(d.key),b.Y!==c&&w.Vb(b),d=d.Zb};w.w(Ya,{count:"count"},function(){return this.eb.fd});
- Ya.prototype.jg=function(){this.value=this.key=null;this.fb=-1};Ya.prototype.toString=function(){return null!==this.Ib?"MapKeySetIterator@"+this.Ib.value:"MapKeySetIterator"};function Za(a){w.mc(this);this.La=!0;this.eb=a}w.Pa(Za,L);Za.prototype.freeze=function(){return this};Za.prototype.Ta=function(){return this};Za.prototype.toString=function(){return"MapKeySet("+this.eb.toString()+")"};
- Za.prototype.add=Za.prototype.set=Za.prototype.add=function(){w.l("This Set is read-only: "+this.toString());return!1};Za.prototype.contains=Za.prototype.has=Za.prototype.contains=function(a){return this.eb.contains(a)};Za.prototype.remove=Za.prototype["delete"]=Za.prototype.remove=function(){w.l("This Set is read-only: "+this.toString());return!1};Za.prototype.clear=Za.prototype.clear=function(){w.l("This Set is read-only: "+this.toString())};
- Za.prototype.first=Za.prototype.first=function(){var a=this.eb.jb;return null!==a?a.key:null};Za.prototype.any=function(a){for(var b=this.eb.jb;null!==b;){if(a(b.key))return!0;b=b.Zb}return!1};Za.prototype.all=function(a){for(var b=this.eb.jb;null!==b;){if(!a(b.key))return!1;b=b.Zb}return!0};Za.prototype.each=function(a){for(var b=this.eb.jb;null!==b;)a(b.key),b=b.Zb};Za.prototype.copy=function(){return new Za(this.eb)};
- Za.prototype.toSet=function(){var a=new L(this.eb.Oh),b=this.eb.gd,c;for(c in b)a.add(b[c].key);return a};Za.prototype.toArray=Za.prototype.Te=function(){var a=this.eb.gd,b=Array(this.eb.fd),c=0,d;for(d in a)b[c]=a[d].key,c++;return b};Za.prototype.toList=function(){var a=new K(this.ia),b=this.eb.gd,c;for(c in b)a.add(b[c].key);return a};w.w(Za,{count:"count"},function(){return this.eb.fd});w.w(Za,{size:"size"},function(){return this.eb.fd});
- w.w(Za,{j:"iterator"},function(){return 0>=this.eb.fd?Pa:new Ya(this.eb)});function $a(a){this.eb=a;this.reset()}w.ge($a,{key:!0,value:!0});w.w($a,{j:"iterator"},function(){return this});$a.prototype.reset=$a.prototype.reset=function(){var a=this.eb;a.ho=null;this.fb=a.Y;this.Ib=null};
- $a.prototype.next=$a.prototype.hasNext=$a.prototype.next=function(){var a=this.eb;if(a.Y!==this.fb){if(null===this.key)return!1;w.Vb(a)}var b=this.Ib,b=null===b?a.jb:b.Zb;if(null!==b)return this.Ib=b,this.value=b.value,this.key=b.key,!0;this.jg();return!1};$a.prototype.first=$a.prototype.first=function(){var a=this.eb;this.fb=a.Y;a=a.jb;if(null!==a){this.Ib=a;var b=a.value;this.key=a.key;return this.value=b}return null};
- $a.prototype.any=function(a){var b=this.eb;b.ho=null;var c=b.Y;this.Ib=null;for(var d=b.jb;null!==d;){if(a(d.value))return!0;b.Y!==c&&w.Vb(b);d=d.Zb}return!1};$a.prototype.all=function(a){var b=this.eb;b.ho=null;var c=b.Y;this.Ib=null;for(var d=b.jb;null!==d;){if(!a(d.value))return!1;b.Y!==c&&w.Vb(b);d=d.Zb}return!0};$a.prototype.each=function(a){var b=this.eb;b.ho=null;var c=b.Y;this.Ib=null;for(var d=b.jb;null!==d;)a(d.value),b.Y!==c&&w.Vb(b),d=d.Zb};w.w($a,{count:"count"},function(){return this.eb.fd});
- $a.prototype.jg=function(){this.value=this.key=null;this.fb=-1;this.eb.ho=this};$a.prototype.toString=function(){return null!==this.Ib?"MapValueSetIterator@"+this.Ib.value:"MapValueSetIterator"};function Wa(a,b){this.key=a;this.value=b;this.ro=this.Zb=null}w.ge(Wa,{key:!0,value:!0});Wa.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"};function ab(a){this.eb=a;this.reset()}w.ge(ab,{key:!0,value:!0});w.w(ab,{j:"iterator"},function(){return this});
- ab.prototype.reset=ab.prototype.reset=function(){var a=this.eb;a.Ld=null;this.fb=a.Y;this.Ib=null};ab.prototype.next=ab.prototype.hasNext=ab.prototype.next=function(){var a=this.eb;if(a.Y!==this.fb){if(null===this.key)return!1;w.Vb(a)}var b=this.Ib,b=null===b?a.jb:b.Zb;if(null!==b)return this.Ib=b,this.key=b.key,this.value=b.value,!0;this.jg();return!1};
- ab.prototype.first=ab.prototype.first=function(){var a=this.eb;this.fb=a.Y;a=a.jb;return null!==a?(this.Ib=a,this.key=a.key,this.value=a.value,a):null};ab.prototype.any=function(a){var b=this.eb;b.Ld=null;var c=b.Y;this.Ib=null;for(var d=b.jb;null!==d;){if(a(d))return!0;b.Y!==c&&w.Vb(b);d=d.Zb}return!1};ab.prototype.all=function(a){var b=this.eb;b.Ld=null;var c=b.Y;this.Ib=null;for(var d=b.jb;null!==d;){if(!a(d))return!1;b.Y!==c&&w.Vb(b);d=d.Zb}return!0};
- ab.prototype.each=function(a){var b=this.eb;b.Ld=null;var c=b.Y;this.Ib=null;for(var d=b.jb;null!==d;)a(d),b.Y!==c&&w.Vb(b),d=d.Zb};w.w(ab,{count:"count"},function(){return this.eb.fd});ab.prototype.jg=function(){this.value=this.key=null;this.fb=-1;this.eb.Ld=this};ab.prototype.toString=function(){return null!==this.Ib?"MapIterator@"+this.Ib:"MapIterator"};
- function ta(a,b){w.mc(this);this.La=!1;void 0===a||null===a?this.Oh=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.Oh=a:w.ja(a,"the string 'object', 'number' or 'string'","Map constructor: keytype"):"function"===typeof a?this.Oh=a===Object?"object":a===String?"string":a===Number?"number":a:w.ja(a,"null, a primitive type name, or a class type","Map constructor: keytype");void 0===b||null===b?this.Li=null:"string"===typeof b?"object"===b||"string"===b||"boolean"===b||"number"===
- b||"function"===b?this.Li=b:w.ja(b,"the string 'object', 'number', 'string', 'boolean', or 'function'","Map constructor: valtype"):"function"===typeof b?this.Li=b===Object?"object":b===String?"string":b===Number?"number":b===Boolean?"boolean":b===Function?"function":b:w.ja(b,"null, a primitive type name, or a class type","Map constructor: valtype");this.gd={};this.fd=0;this.ho=this.Ld=null;this.Y=0;this.Ph=this.jb=null}w.la("Map",ta);
- function cb(a,b){null!==a.Oh&&("string"===typeof a.Oh?typeof b===a.Oh&&null!==b||w.tc(b,a.Oh):b instanceof a.Oh||w.tc(b,a.Oh))}ta.prototype.ae=function(){var a=this.Y;a++;999999999<a&&(a=0);this.Y=a};ta.prototype.freeze=ta.prototype.freeze=function(){this.La=!0;return this};ta.prototype.thaw=ta.prototype.Ta=function(){this.La=!1;return this};ta.prototype.toString=function(){return"Map("+w.getTypeName(this.Oh)+","+w.getTypeName(this.Li)+")#"+w.ad(this)};
- ta.prototype.add=ta.prototype.set=ta.prototype.add=function(a,b){u&&(cb(this,a),null!==this.Li&&("string"===typeof this.Li?typeof b===this.Li&&null!==b||w.tc(b,this.Li):b instanceof this.Li||w.tc(b,this.Li)));w.G(this,a);var c=a;w.$a(a)&&(c=w.bt(a));var d=this.gd[c];if(void 0===d)return this.fd++,d=new Wa(a,b),this.gd[c]=d,c=this.Ph,null===c?this.jb=d:(d.ro=c,c.Zb=d),this.Ph=d,this.ae(),!0;d.value=b;return!1};
- ta.prototype.addAll=ta.prototype.ce=function(a){if(null===a)return this;if(w.isArray(a))for(var b=w.tb(a),c=0;c<b;c++){var d=w.ob(a,c);this.add(d.key,d.value)}else for(u&&w.k(a,ta,ta,"addAll:map"),a=a.j;a.next();)this.add(a.key,a.value);return this};ta.prototype.first=ta.prototype.first=function(){return this.jb};ta.prototype.any=function(a){for(var b=this.Y,c=this.jb;null!==c;){if(a(c))return!0;this.Y!==b&&w.Vb(this);c=c.Zb}return!1};
- ta.prototype.all=function(a){for(var b=this.Y,c=this.jb;null!==c;){if(!a(c))return!1;this.Y!==b&&w.Vb(this);c=c.Zb}return!0};ta.prototype.each=function(a){for(var b=this.Y,c=this.jb;null!==c;)a(c),this.Y!==b&&w.Vb(this),c=c.Zb};ta.prototype.contains=ta.prototype.has=ta.prototype.contains=function(a){u&&cb(this,a);var b=a;return w.$a(a)&&(b=w.ad(a),void 0===b)?!1:void 0!==this.gd[b]};
- ta.prototype.getValue=ta.prototype.get=ta.prototype.za=function(a){u&&cb(this,a);var b=a;if(w.$a(a)&&(b=w.ad(a),void 0===b))return null;a=this.gd[b];return void 0===a?null:a.value};
- ta.prototype.remove=ta.prototype["delete"]=ta.prototype.remove=function(a){if(null===a)return!1;u&&cb(this,a);w.G(this,a);var b=a;if(w.$a(a)&&(b=w.ad(a),void 0===b))return!1;a=this.gd[b];if(void 0===a)return!1;var c=a.Zb,d=a.ro;null!==c&&(c.ro=d);null!==d&&(d.Zb=c);this.jb===a&&(this.jb=c);this.Ph===a&&(this.Ph=d);delete this.gd[b];this.fd--;this.ae();return!0};ta.prototype.clear=ta.prototype.clear=function(){w.G(this);this.gd={};this.fd=0;this.Ph=this.jb=null;this.ae()};
- ta.prototype.copy=function(){var a=new ta(this.Oh,this.Li),b=this.gd,c;for(c in b){var d=b[c];a.add(d.key,d.value)}return a};ta.prototype.toArray=ta.prototype.Te=function(){var a=this.gd,b=Array(this.fd),c=0,d;for(d in a){var e=a[d];b[c]=new Wa(e.key,e.value);c++}return b};ta.prototype.toKeySet=ta.prototype.dj=function(){return new Za(this)};w.w(ta,{count:"count"},function(){return this.fd});w.w(ta,{size:"size"},function(){return this.fd});
- w.w(ta,{j:"iterator"},function(){if(0>=this.count)return Pa;var a=this.Ld;return null!==a?(a.reset(),a):new ab(this)});w.w(ta,{CK:"iteratorKeys"},function(){return 0>=this.count?Pa:new Ya(this)});w.w(ta,{yE:"iteratorValues"},function(){if(0>=this.count)return Pa;var a=this.ho;return null!==a?(a.reset(),a):new $a(this)});function I(a,b){void 0===a?this.M=this.L=0:"number"===typeof a&&"number"===typeof b?(this.L=a,this.M=b):w.l("Invalid arguments to Point constructor: "+a+", "+b);this.La=!1}
- w.la("Point",I);w.$h(I);w.ge(I,{x:!0,y:!0});I.prototype.assign=function(a){this.L=a.L;this.M=a.M};I.prototype.setTo=I.prototype.n=function(a,b){u&&(w.g(a,"number",I,"setTo:x"),w.g(b,"number",I,"setTo:y"));this.L=a;this.M=b;return this};I.prototype.set=I.prototype.set=function(a){u&&w.k(a,I,I,"set:p");this.G();this.L=a.L;this.M=a.M;return this};I.prototype.copy=function(){var a=new I;a.L=this.L;a.M=this.M;return a};f=I.prototype;f.Ra=function(){this.La=!0;Object.freeze(this);return this};
- f.da=function(){return Object.isFrozen(this)?this:this.copy().freeze()};f.freeze=function(){this.La=!0;return this};f.Ta=function(){Object.isFrozen(this)&&w.l("cannot thaw constant: "+this);this.La=!1;return this};f.G=function(a){if(this.La){var b="The Point is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);w.l(b)}};
- I.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new I(c,e)}return new I};I.stringify=function(a){return a instanceof I?a.x.toString()+" "+a.y.toString():a.toString()};I.prototype.toString=function(){return"Point("+this.x+","+this.y+")"};I.prototype.equals=I.prototype.N=function(a){return a instanceof I?this.L===a.x&&this.M===a.y:!1};
- I.prototype.equalTo=I.prototype.ow=function(a,b){return this.L===a&&this.M===b};I.prototype.equalsApprox=I.prototype.Me=function(a){return O.F(this.L,a.x)&&O.F(this.M,a.y)};I.prototype.add=I.prototype.add=function(a){u&&w.k(a,I,I,"add:p");this.G();this.L+=a.x;this.M+=a.y;return this};I.prototype.subtract=I.prototype.Pt=function(a){u&&w.k(a,I,I,"subtract:p");this.G();this.L-=a.x;this.M-=a.y;return this};
- I.prototype.offset=I.prototype.offset=function(a,b){u&&(w.o(a,I,"offset:dx"),w.o(b,I,"offset:dy"));this.G();this.L+=a;this.M+=b;return this};I.prototype.rotate=I.prototype.rotate=function(a){u&&w.o(a,I,"rotate:angle");this.G();if(0===a)return this;var b=this.L,c=this.M;if(0===b&&0===c)return this;var d=0,e=0;360<=a?a-=360:0>a&&(a+=360);90===a?(d=0,e=1):180===a?(d=-1,e=0):270===a?(d=0,e=-1):(a=a*Math.PI/180,d=Math.cos(a),e=Math.sin(a));this.L=d*b-e*c;this.M=e*b+d*c;return this};
- I.prototype.scale=I.prototype.scale=function(a,b){u&&(w.o(a,I,"scale:sx"),w.o(b,I,"scale:sy"));this.L*=a;this.M*=b;return this};I.prototype.distanceSquaredPoint=I.prototype.bk=function(a){u&&w.k(a,I,I,"distanceSquaredPoint:p");var b=a.x-this.L;a=a.y-this.M;return b*b+a*a};I.prototype.distanceSquared=I.prototype.Ro=function(a,b){u&&(w.o(a,I,"distanceSquared:px"),w.o(b,I,"distanceSquared:py"));var c=a-this.L,d=b-this.M;return c*c+d*d};
- I.prototype.normalize=I.prototype.normalize=function(){this.G();var a=this.L,b=this.M,c=Math.sqrt(a*a+b*b);0<c&&(this.L=a/c,this.M=b/c);return this};I.prototype.directionPoint=I.prototype.Vi=function(a){u&&w.k(a,I,I,"directionPoint:p");return jb(a.x-this.L,a.y-this.M)};I.prototype.direction=I.prototype.direction=function(a,b){u&&(w.o(a,I,"direction:px"),w.o(b,I,"direction:py"));return jb(a-this.L,b-this.M)};
- function jb(a,b){if(0===a)return 0<b?90:0>b?270:0;if(0===b)return 0<a?0:180;if(isNaN(a)||isNaN(b))return 0;var c=180*Math.atan(Math.abs(b/a))/Math.PI;0>a?c=0>b?c+180:180-c:0>b&&(c=360-c);return c}I.prototype.projectOntoLineSegment=function(a,b,c,d){u&&(w.o(a,I,"projectOntoLineSegment:px"),w.o(b,I,"projectOntoLineSegment:py"),w.o(c,I,"projectOntoLineSegment:qx"),w.o(d,I,"projectOntoLineSegment:qy"));O.dn(a,b,c,d,this.L,this.M,this);return this};
- I.prototype.projectOntoLineSegmentPoint=function(a,b){u&&(w.k(a,I,I,"projectOntoLineSegmentPoint:p"),w.k(b,I,I,"projectOntoLineSegmentPoint:q"));O.dn(a.x,a.y,b.x,b.y,this.L,this.M,this);return this};I.prototype.snapToGrid=function(a,b,c,d){u&&(w.o(a,I,"snapToGrid:originx"),w.o(b,I,"snapToGrid:originy"),w.o(c,I,"snapToGrid:cellwidth"),w.o(d,I,"snapToGrid:cellheight"));O.Ss(this.L,this.M,a,b,c,d,this);return this};
- I.prototype.snapToGridPoint=function(a,b){u&&(w.k(a,I,I,"snapToGridPoint:p"),w.k(b,pa,I,"snapToGridPoint:q"));O.Ss(this.L,this.M,a.x,a.y,b.width,b.height,this);return this};I.prototype.setRectSpot=I.prototype.Jt=function(a,b){u&&(w.k(a,x,I,"setRectSpot:r"),w.k(b,Q,I,"setRectSpot:spot"));this.G();this.L=a.x+b.x*a.width+b.offsetX;this.M=a.y+b.y*a.height+b.offsetY;return this};
- I.prototype.setSpot=I.prototype.Lt=function(a,b,c,d,e){u&&(w.o(a,I,"setSpot:x"),w.o(b,I,"setSpot:y"),w.o(c,I,"setSpot:w"),w.o(d,I,"setSpot:h"),(0>c||0>d)&&w.l("Point.setSpot:Width and height cannot be negative"),w.k(e,Q,I,"setSpot:spot"));this.G();this.L=a+e.x*c+e.offsetX;this.M=b+e.y*d+e.offsetY;return this};I.prototype.transform=function(a){u&&w.k(a,ra,I,"transform:t");a.ib(this);return this};function kb(a,b){u&&w.k(b,ra,I,"transformInverted:t");b.ci(a);return a}var lb;
- I.distanceLineSegmentSquared=lb=function(a,b,c,d,e,g){u&&(w.o(a,I,"distanceLineSegmentSquared:px"),w.o(b,I,"distanceLineSegmentSquared:py"),w.o(c,I,"distanceLineSegmentSquared:ax"),w.o(d,I,"distanceLineSegmentSquared:ay"),w.o(e,I,"distanceLineSegmentSquared:bx"),w.o(g,I,"distanceLineSegmentSquared:by"));var h=e-c,k=g-d,l=h*h+k*k;c-=a;d-=b;var m=-c*h-d*k;if(0>=m||m>=l)return h=e-a,k=g-b,Math.min(c*c+d*d,h*h+k*k);a=h*d-k*c;return a*a/l};var mb;
- I.distanceSquared=mb=function(a,b,c,d){u&&(w.o(a,I,"distanceSquared:px"),w.o(b,I,"distanceSquared:py"),w.o(c,I,"distanceSquared:qx"),w.o(d,I,"distanceSquared:qy"));a=c-a;b=d-b;return a*a+b*b};var nb;
- I.direction=nb=function(a,b,c,d){u&&(w.o(a,I,"direction:px"),w.o(b,I,"direction:py"),w.o(c,I,"direction:qx"),w.o(d,I,"direction:qy"));a=c-a;b=d-b;if(0===a)return 0<b?90:0>b?270:0;if(0===b)return 0<a?0:180;if(isNaN(a)||isNaN(b))return 0;d=180*Math.atan(Math.abs(b/a))/Math.PI;0>a?d=0>b?d+180:180-d:0>b&&(d=360-d);return d};w.defineProperty(I,{x:"x"},function(){return this.L},function(a){this.G(a);u&&w.g(a,"number",I,"x");this.L=a});
- w.defineProperty(I,{y:"y"},function(){return this.M},function(a){this.G(a);u&&w.g(a,"number",I,"y");this.M=a});I.prototype.isReal=I.prototype.J=function(){return isFinite(this.x)&&isFinite(this.y)};function pa(a,b){void 0===a?this.Fa=this.Ga=0:"number"===typeof a&&(0<=a||isNaN(a))&&"number"===typeof b&&(0<=b||isNaN(b))?(this.Ga=a,this.Fa=b):w.l("Invalid arguments to Size constructor: "+a+", "+b);this.La=!1}w.la("Size",pa);w.$h(pa);w.ge(pa,{width:!0,height:!0});
- pa.prototype.assign=function(a){this.Ga=a.Ga;this.Fa=a.Fa};pa.prototype.setTo=pa.prototype.n=function(a,b){u&&(w.g(a,"number",pa,"setTo:w"),w.g(b,"number",pa,"setTo:h"),0>a&&w.ja(a,">= 0",pa,"setTo:w"),0>b&&w.ja(b,">= 0",pa,"setTo:h"));this.Ga=a;this.Fa=b;return this};pa.prototype.set=pa.prototype.set=function(a){u&&w.k(a,pa,pa,"set:s");this.G();this.Ga=a.Ga;this.Fa=a.Fa;return this};pa.prototype.copy=function(){var a=new pa;a.Ga=this.Ga;a.Fa=this.Fa;return a};f=pa.prototype;
- f.Ra=function(){this.La=!0;Object.freeze(this);return this};f.da=function(){return Object.isFrozen(this)?this:this.copy().freeze()};f.freeze=function(){this.La=!0;return this};f.Ta=function(){Object.isFrozen(this)&&w.l("cannot thaw constant: "+this);this.La=!1;return this};f.G=function(a){if(this.La){var b="The Size is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);w.l(b)}};
- pa.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new pa(c,e)}return new pa};pa.stringify=function(a){return a instanceof pa?a.width.toString()+" "+a.height.toString():a.toString()};pa.prototype.toString=function(){return"Size("+this.width+","+this.height+")"};
- pa.prototype.equals=pa.prototype.N=function(a){return a instanceof pa?this.Ga===a.width&&this.Fa===a.height:!1};pa.prototype.equalTo=pa.prototype.ow=function(a,b){return this.Ga===a&&this.Fa===b};pa.prototype.equalsApprox=pa.prototype.Me=function(a){return O.F(this.Ga,a.width)&&O.F(this.Fa,a.height)};w.defineProperty(pa,{width:"width"},function(){return this.Ga},function(a){this.G(a);u&&w.g(a,"number",pa,"width");0>a&&w.ja(a,">= 0",pa,"width");this.Ga=a});
- w.defineProperty(pa,{height:"height"},function(){return this.Fa},function(a){this.G(a);u&&w.g(a,"number",pa,"height");0>a&&w.ja(a,">= 0",pa,"height");this.Fa=a});pa.prototype.isReal=pa.prototype.J=function(){return isFinite(this.width)&&isFinite(this.height)};
- function x(a,b,c,d){void 0===a?this.Fa=this.Ga=this.M=this.L=0:a instanceof I?b instanceof I?(this.L=Math.min(a.L,b.L),this.M=Math.min(a.M,b.M),this.Ga=Math.abs(a.L-b.L),this.Fa=Math.abs(a.M-b.M)):b instanceof pa?(this.L=a.L,this.M=a.M,this.Ga=b.Ga,this.Fa=b.Fa):w.l("Incorrect arguments supplied to Rect constructor"):"number"===typeof a&&"number"===typeof b&&"number"===typeof c&&(0<=c||isNaN(c))&&"number"===typeof d&&(0<=d||isNaN(d))?(this.L=a,this.M=b,this.Ga=c,this.Fa=d):w.l("Invalid arguments to Rect constructor: "+
- a+", "+b+", "+c+", "+d);this.La=!1}w.la("Rect",x);w.$h(x);w.ge(x,{x:!0,y:!0,width:!0,height:!0});x.prototype.assign=function(a){this.L=a.L;this.M=a.M;this.Ga=a.Ga;this.Fa=a.Fa};function tb(a,b,c){a.Ga=b;a.Fa=c}x.prototype.setTo=x.prototype.n=function(a,b,c,d){u&&(w.g(a,"number",x,"setTo:x"),w.g(b,"number",x,"setTo:y"),w.g(c,"number",x,"setTo:w"),w.g(d,"number",x,"setTo:h"),0>c&&w.ja(c,">= 0",x,"setTo:w"),0>d&&w.ja(d,">= 0",x,"setTo:h"));this.L=a;this.M=b;this.Ga=c;this.Fa=d;return this};
- x.prototype.set=x.prototype.set=function(a){u&&w.k(a,x,x,"set:r");this.G();this.L=a.L;this.M=a.M;this.Ga=a.Ga;this.Fa=a.Fa;return this};x.prototype.setPoint=x.prototype.Ff=function(a){u&&w.k(a,I,x,"setPoint:p");this.G();this.L=a.L;this.M=a.M;return this};x.prototype.setSize=function(a){u&&w.k(a,pa,x,"setSize:s");this.G();this.Ga=a.Ga;this.Fa=a.Fa;return this};x.prototype.copy=function(){var a=new x;a.L=this.L;a.M=this.M;a.Ga=this.Ga;a.Fa=this.Fa;return a};f=x.prototype;
- f.Ra=function(){this.La=!0;Object.freeze(this);return this};f.da=function(){return Object.isFrozen(this)?this:this.copy().freeze()};f.freeze=function(){this.La=!0;return this};f.Ta=function(){Object.isFrozen(this)&&w.l("cannot thaw constant: "+this);this.La=!1;return this};f.G=function(a){if(this.La){var b="The Rect is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);w.l(b)}};
- x.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));for(var g=0;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));for(var h=0;""===a[b];)b++;(d=a[b++])&&(h=parseFloat(d));return new x(c,e,g,h)}return new x};x.stringify=function(a){return a instanceof x?a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString():a.toString()};
- x.prototype.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};x.prototype.equals=x.prototype.N=function(a){return a instanceof x?this.L===a.x&&this.M===a.y&&this.Ga===a.width&&this.Fa===a.height:!1};x.prototype.equalTo=x.prototype.ow=function(a,b,c,d){return this.L===a&&this.M===b&&this.Ga===c&&this.Fa===d};x.prototype.equalsApprox=x.prototype.Me=function(a){return O.F(this.L,a.x)&&O.F(this.M,a.y)&&O.F(this.Ga,a.width)&&O.F(this.Fa,a.height)};
- x.prototype.containsPoint=x.prototype.Ka=function(a){u&&w.k(a,I,x,"containsPoint:p");return this.L<=a.x&&this.L+this.Ga>=a.x&&this.M<=a.y&&this.M+this.Fa>=a.y};x.prototype.containsRect=x.prototype.ak=function(a){u&&w.k(a,x,x,"containsRect:r");return this.L<=a.x&&a.x+a.width<=this.L+this.Ga&&this.M<=a.y&&a.y+a.height<=this.M+this.Fa};
- x.prototype.contains=x.prototype.contains=function(a,b,c,d){u?(w.o(a,x,"contains:x"),w.o(b,x,"contains:y"),void 0===c?c=0:w.o(c,x,"contains:w"),void 0===d?d=0:w.o(d,x,"contains:h"),(0>c||0>d)&&w.l("Rect.contains:Width and height cannot be negative")):(void 0===c&&(c=0),void 0===d&&(d=0));return this.L<=a&&a+c<=this.L+this.Ga&&this.M<=b&&b+d<=this.M+this.Fa};x.prototype.reset=function(){this.G();this.Fa=this.Ga=this.M=this.L=0};
- x.prototype.offset=x.prototype.offset=function(a,b){u&&(w.o(a,x,"offset:dx"),w.o(b,x,"offset:dy"));this.G();this.L+=a;this.M+=b;return this};x.prototype.inflate=x.prototype.Tf=function(a,b){u&&(w.o(a,x,"inflate:w"),w.o(b,x,"inflate:h"));return ub(this,b,a,b,a)};x.prototype.addMargin=x.prototype.Vv=function(a){u&&w.k(a,vb,x,"addMargin:m");return ub(this,a.top,a.right,a.bottom,a.left)};
- x.prototype.subtractMargin=x.prototype.gJ=function(a){u&&w.k(a,vb,x,"subtractMargin:m");return ub(this,-a.top,-a.right,-a.bottom,-a.left)};x.prototype.grow=function(a,b,c,d){u&&(w.o(a,x,"grow:t"),w.o(b,x,"grow:r"),w.o(c,x,"grow:b"),w.o(d,x,"grow:l"));return ub(this,a,b,c,d)};function ub(a,b,c,d,e){a.G();var g=a.Ga;c+e<=-g?(a.L+=g/2,a.Ga=0):(a.L-=e,a.Ga+=c+e);c=a.Fa;b+d<=-c?(a.M+=c/2,a.Fa=0):(a.M-=b,a.Fa+=b+d);return a}
- x.prototype.intersectRect=function(a){u&&w.k(a,x,x,"intersectRect:r");return wb(this,a.x,a.y,a.width,a.height)};x.prototype.intersect=function(a,b,c,d){u&&(w.o(a,x,"intersect:x"),w.o(b,x,"intersect:y"),w.o(c,x,"intersect:w"),w.o(d,x,"intersect:h"),(0>c||0>d)&&w.l("Rect.intersect:Width and height cannot be negative"));return wb(this,a,b,c,d)};
- function wb(a,b,c,d,e){a.G();var g=Math.max(a.L,b),h=Math.max(a.M,c);b=Math.min(a.L+a.Ga,b+d);c=Math.min(a.M+a.Fa,c+e);a.L=g;a.M=h;a.Ga=Math.max(0,b-g);a.Fa=Math.max(0,c-h);return a}x.prototype.intersectsRect=x.prototype.Gg=function(a){u&&w.k(a,x,x,"intersectsRect:r");return this.pE(a.x,a.y,a.width,a.height)};
- x.prototype.intersects=x.prototype.pE=function(a,b,c,d){u&&(w.o(a,x,"intersects:x"),w.o(b,x,"intersects:y"),w.o(a,x,"intersects:w"),w.o(b,x,"intersects:h"),(0>c||0>d)&&w.l("Rect.intersects:Width and height cannot be negative"));var e=this.Ga,g=this.L;if(Infinity!==e&&Infinity!==c&&(e+=g,c+=a,isNaN(c)||isNaN(e)||g>c||a>e))return!1;a=this.Fa;c=this.M;return Infinity!==a&&Infinity!==d&&(a+=c,d+=b,isNaN(d)||isNaN(a)||c>d||b>a)?!1:!0};
- function yb(a,b){var c=a.Ga,d=b.width+10+10,e=a.L,g=b.x-10;if(e>d+g||g>c+e)return!1;c=a.Fa;d=b.height+10+10;e=a.M;g=b.y-10;return e>d+g||g>c+e?!1:!0}x.prototype.unionPoint=x.prototype.ej=function(a){u&&w.k(a,I,x,"unionPoint:p");return Ab(this,a.x,a.y,0,0)};x.prototype.unionRect=x.prototype.hi=function(a){u&&w.k(a,x,x,"unionRect:r");return Ab(this,a.L,a.M,a.Ga,a.Fa)};
- x.prototype.union=x.prototype.LF=function(a,b,c,d){this.G();u?(w.o(a,x,"union:x"),w.o(b,x,"union:y"),void 0===c?c=0:w.o(c,x,"union:w"),void 0===d?d=0:w.o(d,x,"union:h"),(0>c||0>d)&&w.l("Rect.union:Width and height cannot be negative")):(void 0===c&&(c=0),void 0===d&&(d=0));return Ab(this,a,b,c,d)};function Ab(a,b,c,d,e){var g=Math.min(a.L,b),h=Math.min(a.M,c);b=Math.max(a.L+a.Ga,b+d);c=Math.max(a.M+a.Fa,c+e);a.L=g;a.M=h;a.Ga=b-g;a.Fa=c-h;return a}
- x.prototype.setSpot=x.prototype.Lt=function(a,b,c){u&&(w.o(a,x,"setSpot:x"),w.o(b,x,"setSpot:y"),w.k(c,Q,x,"setSpot:spot"));this.G();this.L=a-c.offsetX-c.x*this.Ga;this.M=b-c.offsetY-c.y*this.Fa;return this};var Hb;
- x.contains=Hb=function(a,b,c,d,e,g,h,k){u?(w.o(a,x,"contains:rx"),w.o(b,x,"contains:ry"),w.o(c,x,"contains:rw"),w.o(d,x,"contains:rh"),w.o(e,x,"contains:x"),w.o(g,x,"contains:y"),void 0===h?h=0:w.o(h,x,"contains:w"),void 0===k?k=0:w.o(k,x,"contains:h"),(0>c||0>d||0>h||0>k)&&w.l("Rect.contains:Width and height cannot be negative")):(void 0===h&&(h=0),void 0===k&&(k=0));return a<=e&&e+h<=a+c&&b<=g&&g+k<=b+d};
- x.intersects=function(a,b,c,d,e,g,h,k){u&&(w.o(a,x,"intersects:rx"),w.o(b,x,"intersects:ry"),w.o(c,x,"intersects:rw"),w.o(d,x,"intersects:rh"),w.o(e,x,"intersects:x"),w.o(g,x,"intersects:y"),w.o(h,x,"intersects:w"),w.o(k,x,"intersects:h"),(0>c||0>d||0>h||0>k)&&w.l("Rect.intersects:Width and height cannot be negative"));c+=a;h+=e;if(a>h||e>c)return!1;a=d+b;k+=g;return b>k||g>a?!1:!0};w.defineProperty(x,{x:"x"},function(){return this.L},function(a){this.G(a);u&&w.g(a,"number",x,"x");this.L=a});
- w.defineProperty(x,{y:"y"},function(){return this.M},function(a){this.G(a);u&&w.g(a,"number",x,"y");this.M=a});w.defineProperty(x,{width:"width"},function(){return this.Ga},function(a){this.G(a);u&&w.g(a,"number",x,"width");0>a&&w.ja(a,">= 0",x,"width");this.Ga=a});w.defineProperty(x,{height:"height"},function(){return this.Fa},function(a){this.G(a);u&&w.g(a,"number",x,"height");0>a&&w.ja(a,">= 0",x,"height");this.Fa=a});
- w.defineProperty(x,{left:"left"},function(){return this.L},function(a){this.G(a);u&&w.g(a,"number",x,"left");this.L=a});w.defineProperty(x,{top:"top"},function(){return this.M},function(a){this.G(a);u&&w.g(a,"number",x,"top");this.M=a});w.defineProperty(x,{right:"right"},function(){return this.L+this.Ga},function(a){this.G(a);u&&w.o(a,x,"right");this.L+=a-(this.L+this.Ga)});
- w.defineProperty(x,{bottom:"bottom"},function(){return this.M+this.Fa},function(a){this.G(a);u&&w.o(a,x,"top");this.M+=a-(this.M+this.Fa)});w.defineProperty(x,{position:"position"},function(){return new I(this.L,this.M)},function(a){this.G(a);u&&w.k(a,I,x,"position");this.L=a.x;this.M=a.y});w.defineProperty(x,{size:"size"},function(){return new pa(this.Ga,this.Fa)},function(a){this.G(a);u&&w.k(a,pa,x,"size");this.Ga=a.width;this.Fa=a.height});
- w.defineProperty(x,{hl:"center"},function(){return new I(this.L+this.Ga/2,this.M+this.Fa/2)},function(a){this.G(a);u&&w.k(a,I,x,"center");this.L=a.x-this.Ga/2;this.M=a.y-this.Fa/2});w.defineProperty(x,{ra:"centerX"},function(){return this.L+this.Ga/2},function(a){this.G(a);u&&w.o(a,x,"centerX");this.L=a-this.Ga/2});w.defineProperty(x,{Da:"centerY"},function(){return this.M+this.Fa/2},function(a){this.G(a);u&&w.o(a,x,"centerY");this.M=a-this.Fa/2});
- x.prototype.isReal=x.prototype.J=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};x.prototype.isEmpty=function(){return 0===this.width&&0===this.height};
- function vb(a,b,c,d){void 0===a?this.$g=this.Rg=this.gh=this.ih=0:void 0===b?this.left=this.bottom=this.right=this.top=a:void 0===c?(d=b,this.top=a,this.right=b,this.bottom=a,this.left=d):void 0!==d?(this.top=a,this.right=b,this.bottom=c,this.left=d):w.l("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this.La=!1}w.la("Margin",vb);w.$h(vb);w.ge(vb,{top:!0,right:!0,bottom:!0,left:!0});vb.prototype.assign=function(a){this.ih=a.ih;this.gh=a.gh;this.Rg=a.Rg;this.$g=a.$g};
- vb.prototype.setTo=vb.prototype.n=function(a,b,c,d){u&&(w.g(a,"number",vb,"setTo:t"),w.g(b,"number",vb,"setTo:r"),w.g(c,"number",vb,"setTo:b"),w.g(d,"number",vb,"setTo:l"));this.G();this.ih=a;this.gh=b;this.Rg=c;this.$g=d;return this};vb.prototype.set=vb.prototype.set=function(a){u&&w.k(a,vb,vb,"assign:m");this.G();this.ih=a.ih;this.gh=a.gh;this.Rg=a.Rg;this.$g=a.$g;return this};vb.prototype.copy=function(){var a=new vb;a.ih=this.ih;a.gh=this.gh;a.Rg=this.Rg;a.$g=this.$g;return a};f=vb.prototype;
- f.Ra=function(){this.La=!0;Object.freeze(this);return this};f.da=function(){return Object.isFrozen(this)?this:this.copy().freeze()};f.freeze=function(){this.La=!0;return this};f.Ta=function(){Object.isFrozen(this)&&w.l("cannot thaw constant: "+this);this.La=!1;return this};f.G=function(a){if(this.La){var b="The Margin is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);w.l(b)}};
- vb.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=NaN;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));if(isNaN(c))return new vb;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new vb(c);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));if(isNaN(g))return new vb(c,e);for(var h=NaN;""===a[b];)b++;(d=a[b++])&&(h=parseFloat(d));return isNaN(h)?new vb(c,e):new vb(c,e,g,h)}return new vb};
- vb.stringify=function(a){return a instanceof vb?a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString():a.toString()};vb.prototype.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};vb.prototype.equals=vb.prototype.N=function(a){return a instanceof vb?this.ih===a.top&&this.gh===a.right&&this.Rg===a.bottom&&this.$g===a.left:!1};
- vb.prototype.equalTo=vb.prototype.ow=function(a,b,c,d){return this.ih===a&&this.gh===b&&this.Rg===c&&this.$g===d};vb.prototype.equalsApprox=vb.prototype.Me=function(a){return O.F(this.ih,a.top)&&O.F(this.gh,a.right)&&O.F(this.Rg,a.bottom)&&O.F(this.$g,a.left)};w.defineProperty(vb,{top:"top"},function(){return this.ih},function(a){this.G(a);u&&w.o(a,vb,"top");this.ih=a});w.defineProperty(vb,{right:"right"},function(){return this.gh},function(a){this.G(a);u&&w.o(a,vb,"right");this.gh=a});
- w.defineProperty(vb,{bottom:"bottom"},function(){return this.Rg},function(a){this.G(a);u&&w.o(a,vb,"bottom");this.Rg=a});w.defineProperty(vb,{left:"left"},function(){return this.$g},function(a){this.G(a);u&&w.o(a,vb,"left");this.$g=a});vb.prototype.isReal=vb.prototype.J=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};function ra(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0}w.$h(ra);
- w.ge(ra,{m11:!0,m12:!0,m21:!0,m22:!0,dx:!0,dy:!0});ra.prototype.set=ra.prototype.set=function(a){u&&w.k(a,ra,ra,"set:t");this.m11=a.m11;this.m12=a.m12;this.m21=a.m21;this.m22=a.m22;this.dx=a.dx;this.dy=a.dy;return this};ra.prototype.copy=function(){var a=new ra;a.m11=this.m11;a.m12=this.m12;a.m21=this.m21;a.m22=this.m22;a.dx=this.dx;a.dy=this.dy;return a};ra.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"};
- ra.prototype.equals=ra.prototype.N=function(a){return a instanceof ra?this.m11===a.m11&&this.m12===a.m12&&this.m21===a.m21&&this.m22===a.m22&&this.dx===a.dx&&this.dy===a.dy:!1};ra.prototype.isIdentity=ra.prototype.gt=function(){return 1===this.m11&&0===this.m12&&0===this.m21&&1===this.m22&&0===this.dx&&0===this.dy};ra.prototype.reset=ra.prototype.reset=function(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0;return this};
- ra.prototype.multiply=ra.prototype.multiply=function(a){u&&w.k(a,ra,ra,"multiply:matrix");var b=this.m12*a.m11+this.m22*a.m12,c=this.m11*a.m21+this.m21*a.m22,d=this.m12*a.m21+this.m22*a.m22,e=this.m11*a.dx+this.m21*a.dy+this.dx,g=this.m12*a.dx+this.m22*a.dy+this.dy;this.m11=this.m11*a.m11+this.m21*a.m12;this.m12=b;this.m21=c;this.m22=d;this.dx=e;this.dy=g;return this};
- ra.prototype.multiplyInverted=ra.prototype.fA=function(a){u&&w.k(a,ra,ra,"multiplyInverted:matrix");var b=1/(a.m11*a.m22-a.m12*a.m21),c=a.m22*b,d=-a.m12*b,e=-a.m21*b,g=a.m11*b,h=b*(a.m21*a.dy-a.m22*a.dx),k=b*(a.m12*a.dx-a.m11*a.dy);a=this.m12*c+this.m22*d;b=this.m11*e+this.m21*g;e=this.m12*e+this.m22*g;g=this.m11*h+this.m21*k+this.dx;h=this.m12*h+this.m22*k+this.dy;this.m11=this.m11*c+this.m21*d;this.m12=a;this.m21=b;this.m22=e;this.dx=g;this.dy=h;return this};
- ra.prototype.invert=ra.prototype.Pz=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),b=-this.m12*a,c=-this.m21*a,d=this.m11*a,e=a*(this.m21*this.dy-this.m22*this.dx),g=a*(this.m12*this.dx-this.m11*this.dy);this.m11=this.m22*a;this.m12=b;this.m21=c;this.m22=d;this.dx=e;this.dy=g;return this};
- ra.prototype.rotate=ra.prototype.rotate=function(a,b,c){u&&(w.o(a,ra,"rotate:angle"),w.o(b,ra,"rotate:rx"),w.o(c,ra,"rotate:ry"));360<=a?a-=360:0>a&&(a+=360);if(0===a)return this;this.translate(b,c);var d=0,e=0;90===a?(d=0,e=1):180===a?(d=-1,e=0):270===a?(d=0,e=-1):(e=a*Math.PI/180,d=Math.cos(e),e=Math.sin(e));a=this.m12*d+this.m22*e;var g=this.m11*-e+this.m21*d,h=this.m12*-e+this.m22*d;this.m11=this.m11*d+this.m21*e;this.m12=a;this.m21=g;this.m22=h;this.translate(-b,-c);return this};
- ra.prototype.translate=ra.prototype.translate=function(a,b){u&&(w.o(a,ra,"translate:x"),w.o(b,ra,"translate:y"));this.dx+=this.m11*a+this.m21*b;this.dy+=this.m12*a+this.m22*b;return this};ra.prototype.scale=ra.prototype.scale=function(a,b){void 0===b&&(b=a);u&&(w.o(a,ra,"translate:sx"),w.o(b,ra,"translate:sy"));this.m11*=a;this.m12*=a;this.m21*=b;this.m22*=b;return this};
- ra.prototype.transformPoint=ra.prototype.ib=function(a){u&&w.k(a,I,ra,"transformPoint:p");var b=a.L,c=a.M;a.L=b*this.m11+c*this.m21+this.dx;a.M=b*this.m12+c*this.m22+this.dy;return a};ra.prototype.invertedTransformPoint=ra.prototype.ci=function(a){u&&w.k(a,I,ra,"invertedTransformPoint:p");var b=1/(this.m11*this.m22-this.m12*this.m21),c=-this.m12*b,d=this.m11*b,e=b*(this.m12*this.dx-this.m11*this.dy),g=a.L,h=a.M;a.L=g*this.m22*b+h*-this.m21*b+b*(this.m21*this.dy-this.m22*this.dx);a.M=g*c+h*d+e;return a};
- ra.prototype.transformRect=ra.prototype.JF=function(a){u&&w.k(a,x,ra,"transformRect:rect");var b=a.L,c=a.M,d=b+a.Ga,e=c+a.Fa,g=this.m11,h=this.m12,k=this.m21,l=this.m22,m=this.dx,n=this.dy,p=b*g+c*k+m,q=b*h+c*l+n,r=d*g+c*k+m,c=d*h+c*l+n,s=b*g+e*k+m,b=b*h+e*l+n,g=d*g+e*k+m,d=d*h+e*l+n,e=p,h=q,p=Math.min(p,r),e=Math.max(e,r),h=Math.min(h,c),q=Math.max(q,c),p=Math.min(p,s),e=Math.max(e,s),h=Math.min(h,b),q=Math.max(q,b),p=Math.min(p,g),e=Math.max(e,g),h=Math.min(h,d),q=Math.max(q,d);a.L=p;a.M=h;a.Ga=
- e-p;a.Fa=q-h;return a};function Q(a,b,c,d){void 0===a?this.rg=this.qg=this.M=this.L=0:(void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=0),this.x=a,this.y=b,this.offsetX=c,this.offsetY=d);this.La=!1}w.la("Spot",Q);w.$h(Q);w.ge(Q,{x:!0,y:!0,offsetX:!0,offsetY:!0});Q.prototype.assign=function(a){this.L=a.L;this.M=a.M;this.qg=a.qg;this.rg=a.rg};
- Q.prototype.setTo=Q.prototype.n=function(a,b,c,d){u&&(Ib(a,"setTo:x"),Ib(b,"setTo:y"),Mb(c,"setTo:offx"),Mb(d,"setTo:offy"));this.G();this.L=a;this.M=b;this.qg=c;this.rg=d;return this};Q.prototype.set=Q.prototype.set=function(a){u&&w.k(a,Q,Q,"set:s");this.G();this.L=a.L;this.M=a.M;this.qg=a.qg;this.rg=a.rg;return this};Q.prototype.copy=function(){var a=new Q;a.L=this.L;a.M=this.M;a.qg=this.qg;a.rg=this.rg;return a};f=Q.prototype;f.Ra=function(){this.La=!0;Object.freeze(this);return this};
- f.da=function(){return Object.isFrozen(this)?this:this.copy().freeze()};f.freeze=function(){this.La=!0;return this};f.Ta=function(){Object.isFrozen(this)&&w.l("cannot thaw constant: "+this);this.La=!1;return this};f.G=function(a){if(this.La){var b="The Spot is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);w.l(b)}};function Nb(a,b){a.L=NaN;a.M=NaN;a.qg=b;return a}function Ib(a,b){(isNaN(a)||1<a||0>a)&&w.ja(a,"0 <= "+b+" <= 1",Q,b)}
- function Mb(a,b){(isNaN(a)||Infinity===a||-Infinity===a)&&w.ja(a,"real number, not NaN or Infinity",Q,b)}var Ob;
- Q.parse=Ob=function(a){if("string"===typeof a){a=a.trim();if("None"===a)return Pb;if("TopLeft"===a)return Xb;if("Top"===a||"TopCenter"===a||"MiddleTop"===a)return Yb;if("TopRight"===a)return Zb;if("Left"===a||"LeftCenter"===a||"MiddleLeft"===a)return $b;if("Center"===a)return ac;if("Right"===a||"RightCenter"===a||"MiddleRight"===a)return bc;if("BottomLeft"===a)return cc;if("Bottom"===a||"BottomCenter"===a||"MiddleBottom"===a)return dc;if("BottomRight"===a)return jc;if("TopSide"===a)return kc;if("LeftSide"===
- a)return nc;if("RightSide"===a)return oc;if("BottomSide"===a)return tc;if("TopBottomSides"===a)return uc;if("LeftRightSides"===a)return vc;if("TopLeftSides"===a)return wc;if("TopRightSides"===a)return xc;if("BottomLeftSides"===a)return yc;if("BottomRightSides"===a)return zc;if("NotTopSide"===a)return Fc;if("NotLeftSide"===a)return Gc;if("NotRightSide"===a)return Hc;if("NotBottomSide"===a)return Nc;if("AllSides"===a)return Oc;if("Default"===a)return Pc;a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;
- var d=a[b++];void 0!==d&&0<d.length&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;d=a[b++];void 0!==d&&0<d.length&&(e=parseFloat(d));for(var g=0;""===a[b];)b++;d=a[b++];void 0!==d&&0<d.length&&(g=parseFloat(d));for(var h=0;""===a[b];)b++;d=a[b++];void 0!==d&&0<d.length&&(h=parseFloat(d));return new Q(c,e,g,h)}return new Q};Q.stringify=function(a){return a instanceof Q?a.rd()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString():a.toString()};
- Q.prototype.toString=function(){return this.rd()?0===this.qg&&0===this.rg?"Spot("+this.x+","+this.y+")":"Spot("+this.x+","+this.y+","+this.offsetX+","+this.offsetY+")":this.N(Pb)?"None":this.N(Xb)?"TopLeft":this.N(Yb)?"Top":this.N(Zb)?"TopRight":this.N($b)?"Left":this.N(ac)?"Center":this.N(bc)?"Right":this.N(cc)?"BottomLeft":this.N(dc)?"Bottom":this.N(jc)?"BottomRight":this.N(kc)?"TopSide":this.N(nc)?"LeftSide":this.N(oc)?"RightSide":this.N(tc)?"BottomSide":this.N(uc)?"TopBottomSides":this.N(vc)?
- "LeftRightSides":this.N(wc)?"TopLeftSides":this.N(xc)?"TopRightSides":this.N(yc)?"BottomLeftSides":this.N(zc)?"BottomRightSides":this.N(Fc)?"NotTopSide":this.N(Gc)?"NotLeftSide":this.N(Hc)?"NotRightSide":this.N(Nc)?"NotBottomSide":this.N(Oc)?"AllSides":this.N(Pc)?"Default":"None"};Q.prototype.equals=Q.prototype.N=function(a){return a instanceof Q?(this.L===a.x||isNaN(this.L)&&isNaN(a.x))&&(this.M===a.y||isNaN(this.M)&&isNaN(a.y))&&this.qg===a.offsetX&&this.rg===a.offsetY:!1};
- Q.prototype.opposite=function(){return new Q(.5-(this.L-.5),.5-(this.M-.5),-this.qg,-this.rg)};Q.prototype.includesSide=function(a){if(!this.cp()||!a.cp())return!1;a=a.offsetY;return(this.rg&a)===a};w.defineProperty(Q,{x:"x"},function(){return this.L},function(a){this.G(a);u&&Ib(a,"x");this.L=a});w.defineProperty(Q,{y:"y"},function(){return this.M},function(a){this.G(a);u&&Ib(a,"y");this.M=a});
- w.defineProperty(Q,{offsetX:"offsetX"},function(){return this.qg},function(a){this.G(a);u&&Mb(a,"offsetX");this.qg=a});w.defineProperty(Q,{offsetY:"offsetY"},function(){return this.rg},function(a){this.G(a);u&&Mb(a,"offsetY");this.rg=a});Q.prototype.isSpot=Q.prototype.rd=function(){return!isNaN(this.x)&&!isNaN(this.y)};Q.prototype.isNoSpot=Q.prototype.we=function(){return isNaN(this.x)||isNaN(this.y)};Q.prototype.isSide=Q.prototype.cp=function(){return this.we()&&1===this.offsetX&&0!==this.offsetY};
- Q.prototype.isDefault=Q.prototype.Uc=function(){return isNaN(this.x)&&isNaN(this.y)&&-1===this.offsetX&&0===this.offsetY};var Pb;Q.None=Pb=Nb(new Q(0,0,0,0),0).Ra();var Pc;Q.Default=Pc=Nb(new Q(0,0,-1,0),-1).Ra();var Xb;Q.TopLeft=Xb=(new Q(0,0,0,0)).Ra();var Yb;Q.TopCenter=Yb=(new Q(.5,0,0,0)).Ra();var Zb;Q.TopRight=Zb=(new Q(1,0,0,0)).Ra();var $b;Q.LeftCenter=$b=(new Q(0,.5,0,0)).Ra();var ac;Q.Center=ac=(new Q(.5,.5,0,0)).Ra();var bc;Q.RightCenter=bc=(new Q(1,.5,0,0)).Ra();var cc;
- Q.BottomLeft=cc=(new Q(0,1,0,0)).Ra();var dc;Q.BottomCenter=dc=(new Q(.5,1,0,0)).Ra();var jc;Q.BottomRight=jc=(new Q(1,1,0,0)).Ra();var Qc;Q.MiddleTop=Qc=Yb;var Wc;Q.MiddleLeft=Wc=$b;var Xc;Q.MiddleRight=Xc=bc;var Yc;Q.MiddleBottom=Yc=dc;Q.Top=Yb;var Zc;Q.Left=Zc=$b;var $c;Q.Right=$c=bc;Q.Bottom=dc;var kc;Q.TopSide=kc=Nb(new Q(0,0,1,w.dd),1).Ra();var nc;Q.LeftSide=nc=Nb(new Q(0,0,1,w.Nc),1).Ra();var oc;Q.RightSide=oc=Nb(new Q(0,0,1,w.Wc),1).Ra();var tc;Q.BottomSide=tc=Nb(new Q(0,0,1,w.Vc),1).Ra();
- var uc;Q.TopBottomSides=uc=Nb(new Q(0,0,1,w.dd|w.Vc),1).Ra();var vc;Q.LeftRightSides=vc=Nb(new Q(0,0,1,w.Nc|w.Wc),1).Ra();var wc;Q.TopLeftSides=wc=Nb(new Q(0,0,1,w.dd|w.Nc),1).Ra();var xc;Q.TopRightSides=xc=Nb(new Q(0,0,1,w.dd|w.Wc),1).Ra();var yc;Q.BottomLeftSides=yc=Nb(new Q(0,0,1,w.Vc|w.Nc),1).Ra();var zc;Q.BottomRightSides=zc=Nb(new Q(0,0,1,w.Vc|w.Wc),1).Ra();var Fc;Q.NotTopSide=Fc=Nb(new Q(0,0,1,w.Nc|w.Wc|w.Vc),1).Ra();var Gc;Q.NotLeftSide=Gc=Nb(new Q(0,0,1,w.dd|w.Wc|w.Vc),1).Ra();var Hc;
- Q.NotRightSide=Hc=Nb(new Q(0,0,1,w.dd|w.Nc|w.Vc),1).Ra();var Nc;Q.NotBottomSide=Nc=Nb(new Q(0,0,1,w.dd|w.Nc|w.Wc),1).Ra();var Oc;Q.AllSides=Oc=Nb(new Q(0,0,1,w.dd|w.Nc|w.Wc|w.Vc),1).Ra();function ad(){this.lf=[1,0,0,1,0,0]}ad.prototype.copy=function(){var a=new ad;a.lf[0]=this.lf[0];a.lf[1]=this.lf[1];a.lf[2]=this.lf[2];a.lf[3]=this.lf[3];a.lf[4]=this.lf[4];a.lf[5]=this.lf[5];return a};function bd(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.yD=[]}
- bd.prototype.addColorStop=function(a,b){this.yD.push({offset:a,color:b})};
- function cd(a,b,c){this.fillStyle="#000000";this.font="10px sans-serif";this.globalAlpha=1;this.lineCap="butt";this.Lw=0;this.lineJoin="miter";this.lineWidth=1;this.miterLimit=10;this.shadowBlur=0;this.shadowColor="rgba(0, 0, 0, 0)";this.shadowOffsetY=this.shadowOffsetX=0;this.strokeStyle="#000000";this.textAlign="start";this.document=b||document;this.VD=c;this.Jw=null;this.path=[];this.Ui=new ad;this.stack=[];this.zf=[];this.mw=a;this.yI="http://www.w3.org/2000/svg";this.width=this.mw.width;this.height=
- this.mw.height;this.Kl=dd(this,"svg",{width:this.width+"px",height:this.height+"px",tL:"0 0 "+this.mw.width+" "+this.mw.height});this.Kl.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg");this.Kl.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink");ed(this,1,0,0,1,0,0);a=w.Pl++;b=dd(this,"clipPath",{id:"mainClip"+a});b.appendChild(dd(this,"rect",{x:0,y:0,width:this.width,height:this.height}));this.Kl.appendChild(b);this.zf[0].setAttributeNS(null,
- "clip-path","url(#mainClip"+a+")")}f=cd.prototype;f.arc=function(a,b,c,d,e,g){fd(this,a,b,c,d,e,g)};f.beginPath=function(){this.path=[]};f.bezierCurveTo=function(a,b,c,d,e,g){this.path.push(["C",a,b,c,d,e,g])};f.clearRect=function(){};f.clip=function(){gd(this,"clipPath",this.path,new ad)};f.closePath=function(){this.path.push(["z"])};f.createLinearGradient=function(a,b,c,d){var e=new bd("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e};f.createPattern=function(){};
- f.createRadialGradient=function(a,b,c,d,e,g){var h=new bd("radial");h.x1=a;h.y1=b;h.r1=c;h.x2=d;h.y2=e;h.r2=g;return h};
- f.drawImage=function(a,b,c,d,e,g,h,k,l){a=[b,c,d,e,g,h,k,l,a];b=this.Ui;e=a[8];c="";e instanceof HTMLCanvasElement&&(c=e.toDataURL());e instanceof HTMLImageElement&&(c=e.src);c={x:0,y:0,width:a[6],height:a[7],href:c};d="";g=a[6]/a[2];h=a[7]/a[3];if(0!==a[4]||0!==a[5])d+=" translate("+a[4]+", "+a[5]+")";if(1!==g||1!==h)d+=" scale("+g+", "+h+")";if(0!==a[0]||0!==a[1])d+=" translate("+-a[0]+", "+-a[1]+")";if(0!==a[0]||0!==a[1]||a[2]!==e.naturalWidth||a[3]!==e.naturalHeight)e="CLIP"+w.Pl++,g=dd(this,
- "clipPath",{id:e}),g.appendChild(dd(this,"rect",{x:a[0],y:a[1],width:a[2],height:a[3]})),this.Kl.appendChild(g),c["clip-path"]="url(#"+e+")";hd(this,"image",c,b,d);this.addElement("image",c)};f.fill=function(){gd(this,"fill",this.path,this.Ui)};f.fillRect=function(a,b,c,d){id(this,"fill",[a,b,c,d],this.Ui)};
- f.fillText=function(a,b,c){a=[a,b,c];b=this.textAlign;"left"===b?b="start":"right"===b?b="end":"center"===b&&(b="middle");b={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":b};hd(this,"fill",b,this.Ui);this.addElement("text",b,a[0])};f.lineTo=function(a,b){this.path.push(["L",a,b])};f.moveTo=function(a,b){this.path.push(["M",a,b])};f.quadraticCurveTo=function(a,b,c,d){this.path.push(["Q",a,b,c,d])};f.rect=function(a,b,c,d){this.path.push(["M",a,b],["L",a+c,b],["L",a+c,b+d],["L",a,b+d],["z"])};
- f.restore=function(){this.Ui=this.stack.pop();this.path=this.stack.pop();var a=this.stack.pop();this.fillStyle=a.fillStyle;this.font=a.font;this.globalAlpha=a.globalAlpha;this.lineCap=a.lineCap;this.Lw=a.Lw;this.lineJoin=a.lineJoin;this.lineWidth=a.lineWidth;this.miterLimit=a.miterLimit;this.shadowBlur=a.shadowBlur;this.shadowColor=a.shadowColor;this.shadowOffsetX=a.shadowOffsetX;this.shadowOffsetY=a.shadowOffsetY;this.strokeStyle=a.strokeStyle;this.textAlign=a.textAlign};
- f.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,Lw:this.Lw,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign});for(var a=[],b=0;b<this.path.length;b++)a.push(this.path[b]);this.stack.push(a);this.stack.push(this.Ui.copy())};
- f.setTransform=function(a,b,c,d,e,g){1===a&&0===b&&0===c&&1===d&&0===e&&0===g||ed(this,a,b,c,d,e,g)};f.scale=function(){};f.stroke=function(){gd(this,"stroke",this.path,this.Ui)};f.strokeRect=function(a,b,c,d){id(this,"stroke",[a,b,c,d],this.Ui)};function dd(a,b,c,d){a=a.document.createElementNS(a.yI,b);if(w.$a(c))for(var e in c)a.setAttributeNS("href"===e?"http://www.w3.org/1999/xlink":"",e,c[e]);void 0!==d&&(a.textContent=d);return a}
- f.addElement=function(a,b,c){a=dd(this,a,b,c);0<this.zf.length?this.zf[this.zf.length-1].appendChild(a):this.Kl.appendChild(a);return this.Jw=a};
- function hd(a,b,c,d,e){1!==a.globalAlpha&&(c.opacity=a.globalAlpha);"fill"==b?(/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),c.fill="rgb("+a[1]+","+a[2]+","+a[3]+")",c["fill-opacity"]=a[4]):c.fill=a.fillStyle instanceof bd?rd(a,a.fillStyle):a.fillStyle,c.stroke="none"):"stroke"==b&&(c.fill="none",/^rgba\(/.test(a.strokeStyle)?(b=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.strokeStyle),
- c.stroke="rgb("+b[1]+","+b[2]+","+b[3]+")",c["stroke-opacity"]=b[4]):c.stroke=a.strokeStyle instanceof bd?rd(a,a.strokeStyle):a.strokeStyle,c["stroke-width"]=a.lineWidth,c["stroke-linecap"]=a.lineCap,c["stroke-linejoin"]=a.lineJoin,c["stroke-miterlimit"]=a.miterLimit);d=d.lf;d="matrix("+d[0]+", "+d[1]+", "+d[2]+", "+d[3]+", "+d[4]+", "+d[5]+")";void 0!==e&&(d+=e);c.transform=d}
- function rd(a,b){var c="GRAD"+w.Pl++,d;if("linear"===b.type)d={x1:b.x1,x2:b.x2,y1:b.y1,y2:b.y2,id:c,gradientUnits:"userSpaceOnUse"},d=dd(a,"linearGradient",d);else if("radial"===b.type)d={x1:b.x1,x2:b.x2,y1:b.y1,y2:b.y2,r1:b.r1,r2:b.r2,id:c},d=dd(a,"radialGradient",d);else throw Error("invalid gradient");for(var e=b.yD,g=e.length,h=[],k=0;k<g;k++){var l=e[k],m=l.color,l={offset:l.offset,"stop-color":m};/^rgba\(/.test(m)&&(m=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(m),
- l["stop-color"]="rgb("+m[1]+","+m[2]+","+m[3]+")",l["stop-opacity"]=m[4]);h.push(l)}h.sort(function(a,b){return a.offset>b.offset?1:-1});for(k=0;k<g;k++)d.appendChild(dd(a,"stop",h[k]));a.Kl.appendChild(d);return"url(#"+c+")"}function id(a,b,c,d){c={x:c[0],y:c[1],width:c[2],height:c[3]};hd(a,b,c,d);a.addElement("rect",c)}
- function gd(a,b,c,d){for(var e=[],g=0;g<c.length;g++){var h=w.il(c[g]),k=[h.shift()];if("A"==k[0])k.push(h.shift()+","+h.shift(),h.shift(),h.shift()+","+h.shift(),h.shift()+","+h.shift());else for(;h.length;)k.push(h.shift()+","+h.shift());e.push(k.join(" "))}c={d:e.join(" ")};hd(a,b,c,d);"clipPath"===b?(b="CLIP"+w.Pl++,d=dd(a,"clipPath",{id:b}),d.appendChild(dd(a,"path",c)),a.Kl.appendChild(d),0<a.zf.length&&a.zf[a.zf.length-1].setAttributeNS(null,"clip-path","url(#"+b+")")):a.addElement("path",
- c)}function fd(a,b,c,d,e,g,h){var k=Math.abs(e-g);if(e!=g){var l=b+d*Math.cos(g);g=c+d*Math.sin(g);k>=2*Math.PI?(fd(a,b,c,d,e,e+Math.PI,h),fd(a,b,c,d,e+Math.PI,e+2*Math.PI,h),a.path.push(["M",l,g])):(b+=d*Math.cos(e),c+=d*Math.sin(e),k=180*k/Math.PI,e=h?0:1,h=180<=k==!!h?0:1,0!==a.path.length?a.path.push(["L",b,c]):a.path.push(["M",b,c]),a.path.push(["A",d,d,k,h,e,l,g]))}}function ed(a,b,c,d,e,g,h){var k=new ad;k.lf=[b,c,d,e,g,h];b={};hd(a,"g",b,k);k=a.addElement("g",b);a.zf.push(k)}
- f.hb=function(){if(0!==this.shadowOffsetX||0!==this.shadowOffsetY||0!==this.shadowBlur){var a="SHADOW"+w.Pl++,b=this.addElement("filter",{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},null),c,d,e,g,h;c=dd(this,"feGaussianBlur",{"in":"SourceAlpha",result:"blur",mL:this.shadowBlur/2});d=dd(this,"feFlood",{"in":"blur",result:"flood","flood-color":this.shadowColor});e=dd(this,"feComposite",{"in":"flood",in2:"blur",operator:"in",result:"comp"});g=dd(this,"feOffset",{"in":"comp",result:"offsetBlur",
- dx:this.shadowOffsetX,dy:this.shadowOffsetY});h=dd(this,"feMerge",{});h.appendChild(dd(this,"feMergeNode",{"in":"offsetBlur"}));h.appendChild(dd(this,"feMergeNode",{"in":"SourceGraphic"}));b.appendChild(c);b.appendChild(d);b.appendChild(e);b.appendChild(g);b.appendChild(h);0<this.zf.length&&this.zf[this.zf.length-1].setAttributeNS(null,"filter","url(#"+a+")")}};
- function va(a,b){this.ownerDocument=void 0===b?document:b;var c=this.ownerDocument.createElement("canvas");c.tabIndex=0;this.Rd=c;c.getContext&&c.getContext("2d")||w.l("Browser does not support HTML Canvas Element");this.RG=c.getContext("2d");c.Z=a;Object.seal(this)}f=va.prototype;f.getContext=function(){return this.RG};f.toDataURL=function(a,b){return this.Rd.toDataURL(a,b)};f.getBoundingClientRect=function(){return this.Rd.getBoundingClientRect()};f.focus=function(){return this.Rd.focus()};
- f.addEventListener=function(a,b,c){this.Rd.addEventListener(a,b,c)};f.removeEventListener=function(a,b,c){this.Rd.removeEventListener(a,b,c)};w.defineProperty(va,{width:"width"},function(){return this.Rd.width},function(a){this.Rd.width=a});w.defineProperty(va,{height:"height"},function(){return this.Rd.height},function(a){this.Rd.height=a});w.defineProperty(va,{style:"style"},function(){return this.Rd.style},function(a){this.Rd.style=a});
- var O={ya:4*((Math.sqrt(2)-1)/3),ok:(new I(0,0)).Ra(),XF:(new x(0,0,0,0)).Ra(),Lp:(new vb(0,0,0,0)).Ra(),WF:(new vb(2,2,2,2)).Ra(),WA:(new pa(Infinity,Infinity)).Ra(),TF:(new I(-Infinity,-Infinity)).Ra(),SF:(new I(Infinity,Infinity)).Ra(),pn:(new pa(0,0)).Ra(),wx:(new pa(1,1)).Ra(),Kp:(new pa(6,6)).Ra(),tx:(new pa(8,8)).Ra(),UF:(new I(NaN,NaN)).Ra(),xx:new xa,gj:new xa,VA:null,sqrt:function(a){if(0>=a)return 0;var b=O.VA;if(null===b){for(var b=[],c=0;2E3>=c;c++)b[c]=Math.sqrt(c);O.VA=b}return 1>a?
- (c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)},F:function(a,b){var c=a-b;return.5>c&&-.5<c},wb:function(a,b){var c=a-b;return 5E-8>c&&-5E-8<c},Dd:function(a,b,c,d,e,g,h){0>=e&&(e=1E-6);var k=0,l=0,m=0,n=0;a<c?(l=a,k=c):(l=c,k=a);b<d?(n=b,m=d):(n=d,m=b);if(a===c)return n<=h&&h<=m&&a-e<=g&&g<=a+e;if(b===d)return l<=g&&g<=k&&b-e<=h&&h<=b+e;k+=e;l-=e;if(l<=g&&g<=k&&(m+=e,n-=e,n<=h&&h<=m))if(k-l>m-n)if(a-c>e||c-a>e){if(g=(d-b)/(c-a)*(g-a)+b,g-e<=h&&h<=g+e)return!0}else return!0;else if(b-
- d>e||d-b>e){if(h=(c-a)/(d-b)*(h-b)+a,h-e<=g&&g<=h+e)return!0}else return!0;return!1},ew:function(a,b,c,d,e,g,h,k,l,m,n,p){if(O.Dd(a,b,h,k,p,c,d)&&O.Dd(a,b,h,k,p,e,g))return O.Dd(a,b,h,k,p,m,n);var q=(a+c)/2,r=(b+d)/2,s=(c+e)/2,t=(d+g)/2;e=(e+h)/2;g=(g+k)/2;d=(q+s)/2;c=(r+t)/2;var s=(s+e)/2,t=(t+g)/2,v=(d+s)/2,y=(c+t)/2;return O.ew(a,b,q,r,d,c,v,y,l,m,n,p)||O.ew(v,y,s,t,e,g,h,k,l,m,n,p)},HG:function(a,b,c,d,e,g,h,k,l){var m=(c+e)/2,n=(d+g)/2;l.x=(((a+c)/2+m)/2+(m+(e+h)/2)/2)/2;l.y=(((b+d)/2+n)/2+(n+
- (g+k)/2)/2)/2;return l},GG:function(a,b,c,d,e,g,h,k){var l=(c+e)/2,m=(d+g)/2;return nb(((a+c)/2+l)/2,((b+d)/2+m)/2,(l+(e+h)/2)/2,(m+(g+k)/2)/2)},Io:function(a,b,c,d,e,g,h,k,l,m){if(O.Dd(a,b,h,k,l,c,d)&&O.Dd(a,b,h,k,l,e,g))Ab(m,a,b,0,0),Ab(m,h,k,0,0);else{var n=(a+c)/2,p=(b+d)/2,q=(c+e)/2,r=(d+g)/2;e=(e+h)/2;g=(g+k)/2;d=(n+q)/2;c=(p+r)/2;var q=(q+e)/2,r=(r+g)/2,s=(d+q)/2,t=(c+r)/2;O.Io(a,b,n,p,d,c,s,t,l,m);O.Io(s,t,q,r,e,g,h,k,l,m)}return m},Ie:function(a,b,c,d,e,g,h,k,l,m){if(O.Dd(a,b,h,k,l,c,d)&&
- O.Dd(a,b,h,k,l,e,g))0===m.length&&(m.push(a),m.push(b)),m.push(h),m.push(k);else{var n=(a+c)/2,p=(b+d)/2,q=(c+e)/2,r=(d+g)/2;e=(e+h)/2;g=(g+k)/2;d=(n+q)/2;c=(p+r)/2;var q=(q+e)/2,r=(r+g)/2,s=(d+q)/2,t=(c+r)/2;O.Ie(a,b,n,p,d,c,s,t,l,m);O.Ie(s,t,q,r,e,g,h,k,l,m)}return m},oA:function(a,b,c,d,e,g,h,k,l,m){if(O.Dd(a,b,e,g,m,c,d))return O.Dd(a,b,e,g,m,k,l);var n=(a+c)/2,p=(b+d)/2;c=(c+e)/2;d=(d+g)/2;var q=(n+c)/2,r=(p+d)/2;return O.oA(a,b,n,p,q,r,h,k,l,m)||O.oA(q,r,c,d,e,g,h,k,l,m)},eL:function(a,b,c,
- d,e,g,h){h.x=((a+c)/2+(c+e)/2)/2;h.y=((b+d)/2+(d+g)/2)/2;return h},nA:function(a,b,c,d,e,g,h,k){if(O.Dd(a,b,e,g,h,c,d))Ab(k,a,b,0,0),Ab(k,e,g,0,0);else{var l=(a+c)/2,m=(b+d)/2;c=(c+e)/2;d=(d+g)/2;var n=(l+c)/2,p=(m+d)/2;O.nA(a,b,l,m,n,p,h,k);O.nA(n,p,c,d,e,g,h,k)}return k},tp:function(a,b,c,d,e,g,h,k){if(O.Dd(a,b,e,g,h,c,d))0===k.length&&(k.push(a),k.push(b)),k.push(e),k.push(g);else{var l=(a+c)/2,m=(b+d)/2;c=(c+e)/2;d=(d+g)/2;var n=(l+c)/2,p=(m+d)/2;O.tp(a,b,l,m,n,p,h,k);O.tp(n,p,c,d,e,g,h,k)}return k},
- Ds:function(a,b,c,d,e,g,h,k,l,m,n,p,q,r){0>=q&&(q=1E-6);if(O.Dd(a,b,h,k,q,c,d)&&O.Dd(a,b,h,k,q,e,g)){var s=(a-h)*(m-p)-(b-k)*(l-n);if(0===s)return!1;q=((a*k-b*h)*(l-n)-(a-h)*(l*p-m*n))/s;s=((a*k-b*h)*(m-p)-(b-k)*(l*p-m*n))/s;if((l>n?l-n:n-l)<(m>p?m-p:p-m)){if(h=l=0,b<k?(l=b,h=k):(l=k,h=b),s<l||s>h)return!1}else if(a<h?l=a:(l=h,h=a),q<l||q>h)return!1;r.x=q;r.y=s;return!0}var s=(a+c)/2,t=(b+d)/2;c=(c+e)/2;d=(d+g)/2;e=(e+h)/2;g=(g+k)/2;var v=(s+c)/2,y=(t+d)/2;c=(c+e)/2;d=(d+g)/2;var B=(v+c)/2,A=(y+d)/
- 2,E=(n-l)*(n-l)+(p-m)*(p-m),N=!1;O.Ds(a,b,s,t,v,y,B,A,l,m,n,p,q,r)&&(b=(r.x-l)*(r.x-l)+(r.y-m)*(r.y-m),b<E&&(E=b,N=!0));a=r.x;s=r.y;O.Ds(B,A,c,d,e,g,h,k,l,m,n,p,q,r)&&(b=(r.x-l)*(r.x-l)+(r.y-m)*(r.y-m),b<E?N=!0:(r.x=a,r.y=s));return N},Es:function(a,b,c,d,e,g,h,k,l,m,n,p,q){var r=0;0>=q&&(q=1E-6);if(O.Dd(a,b,h,k,q,c,d)&&O.Dd(a,b,h,k,q,e,g)){q=(a-h)*(m-p)-(b-k)*(l-n);if(0===q)return r;var s=((a*k-b*h)*(l-n)-(a-h)*(l*p-m*n))/q,t=((a*k-b*h)*(m-p)-(b-k)*(l*p-m*n))/q;if(s>=n)return r;if((l>n?l-n:n-l)<
- (m>p?m-p:p-m)){if(a=l=0,b<k?(l=b,a=k):(l=k,a=b),t<l||t>a)return r}else if(a<h?(l=a,a=h):l=h,s<l||s>a)return r;0<q?r++:0>q&&r--}else{var s=(a+c)/2,t=(b+d)/2,v=(c+e)/2,y=(d+g)/2;e=(e+h)/2;g=(g+k)/2;d=(s+v)/2;c=(t+y)/2;var v=(v+e)/2,y=(y+g)/2,B=(d+v)/2,A=(c+y)/2,r=r+O.Es(a,b,s,t,d,c,B,A,l,m,n,p,q),r=r+O.Es(B,A,v,y,e,g,h,k,l,m,n,p,q)}return r},dn:function(a,b,c,d,e,g,h){if(O.wb(a,c)){var k=0;c=0;b<d?(k=b,c=d):(k=d,c=b);d=g;if(d<k)return h.x=a,h.y=k,!1;if(d>c)return h.x=a,h.y=c,!1;h.x=a;h.y=d;return!0}if(O.wb(b,
- d)){a<c?k=a:(k=c,c=a);d=e;if(d<k)return h.x=k,h.y=b,!1;if(d>c)return h.x=c,h.y=b,!1;h.x=d;h.y=b;return!0}k=((a-e)*(a-c)+(b-g)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>k)return h.x=a,h.y=b,!1;if(1.000005<k)return h.x=c,h.y=d,!1;h.x=a+k*(c-a);h.y=b+k*(d-b);return!0},qh:function(a,b,c,d,e,g,h,k,l){if(O.F(a,c)&&O.F(b,d))return l.x=a,l.y=b,!1;if(O.wb(e,h)){if(O.wb(a,c))return O.dn(a,b,c,d,e,g,l),!1;g=(d-b)/(c-a)*(e-a)+b;return O.dn(a,b,c,d,e,g,l)}k=(k-g)/(h-e);if(O.wb(a,c)){g=k*(a-e)+g;c=h=0;b<d?(h=b,
- c=d):(h=d,c=b);if(g<h)return l.x=a,l.y=h,!1;if(g>c)return l.x=a,l.y=c,!1;l.x=a;l.y=g;return!0}h=(d-b)/(c-a);if(O.wb(k,h))return O.dn(a,b,c,d,e,g,l),!1;e=(h*a-k*e+g-b)/(h-k);if(O.wb(h,0)){a<c?h=a:(h=c,c=a);if(e<h)return l.x=h,l.y=b,!1;if(e>c)return l.x=c,l.y=b,!1;l.x=e;l.y=b;return!0}g=h*(e-a)+b;return O.dn(a,b,c,d,e,g,l)},DK:function(a,b,c,d,e){return O.qh(c.x,c.y,d.x,d.y,a.x,a.y,b.x,b.y,e)},nK:function(a,b,c,d,e,g,h,k,l,m){function n(c,d){var e=(c-a)*(c-a)+(d-b)*(d-b);e<p&&(p=e,l.x=c,l.y=d)}var p=
- Infinity;n(l.x,l.y);var q=0,r=0,s=0,t=0;e<h?(q=e,r=h):(q=h,r=e);g<k?(s=e,t=h):(s=h,t=e);q=(r-q)/2+m;m=(t-s)/2+m;e=(e+h)/2;g=(g+k)/2;if(0===q||0===m)return l;if(.5>(c>a?c-a:a-c)){q=1-(c-e)*(c-e)/(q*q);if(0>q)return l;q=Math.sqrt(q);d=-m*q+g;n(c,m*q+g);n(c,d)}else{c=(d-b)/(c-a);d=1/(q*q)+c*c/(m*m);k=2*c*(b-c*a)/(m*m)-2*c*g/(m*m)-2*e/(q*q);q=k*k-4*d*(2*c*a*g/(m*m)-2*b*g/(m*m)+g*g/(m*m)+e*e/(q*q)-1+(b-c*a)*(b-c*a)/(m*m));if(0>q)return l;q=Math.sqrt(q);m=(-k+q)/(2*d);n(m,c*m-c*a+b);q=(-k-q)/(2*d);n(q,
- c*q-c*a+b)}return l},wl:function(a,b,c,d,e,g,h,k,l){var m=1E21,n=a,p=b;if(O.qh(a,b,a,d,e,g,h,k,l)){var q=(l.x-e)*(l.x-e)+(l.y-g)*(l.y-g);q<m&&(m=q,n=l.x,p=l.y)}O.qh(c,b,c,d,e,g,h,k,l)&&(q=(l.x-e)*(l.x-e)+(l.y-g)*(l.y-g),q<m&&(m=q,n=l.x,p=l.y));O.qh(a,b,c,b,e,g,h,k,l)&&(q=(l.x-e)*(l.x-e)+(l.y-g)*(l.y-g),q<m&&(m=q,n=l.x,p=l.y));O.qh(a,d,c,d,e,g,h,k,l)&&(q=(l.x-e)*(l.x-e)+(l.y-g)*(l.y-g),q<m&&(m=q,n=l.x,p=l.y));l.x=n;l.y=p;return 1E21>m},Aw:function(a,b,c){var d=b.x,e=b.y,g=c.x,h=c.y,k=a.left,l=a.right,
- m=a.top,n=a.bottom;return d===g?(g=a=0,e<h?(a=e,g=h):(a=h,g=e),k<=d&&d<=l&&a<=n&&g>=m):e===h?(d<g?a=d:(a=g,g=d),m<=e&&e<=n&&a<=l&&g>=k):a.Ka(b)||a.Ka(c)||O.zw(k,m,l,m,d,e,g,h)||O.zw(l,m,l,n,d,e,g,h)||O.zw(l,n,k,n,d,e,g,h)||O.zw(k,n,k,m,d,e,g,h)?!0:!1},zw:function(a,b,c,d,e,g,h,k){return 0>=O.iw(a,b,c,d,e,g)*O.iw(a,b,c,d,h,k)&&0>=O.iw(e,g,h,k,a,b)*O.iw(e,g,h,k,c,d)},iw:function(a,b,c,d,e,g){c-=a;d-=b;a=e-a;b=g-b;g=a*d-b*c;0===g&&(g=a*c+b*d,0<g&&(g=(a-c)*c+(b-d)*d,0>g&&(g=0)));return 0>g?-1:0<g?1:0},
- wt:function(a){0>a&&(a+=360);360<=a&&(a-=360);return a},HD:function(a,b,c,d,e,g){var h=Math.PI;g||(d*=h/180,e*=h/180);g=d<e?1:-1;var k=[],l=h/2,m=d;for(d=Math.min(2*h,Math.abs(e-d));1E-5<d;)e=m+g*Math.min(d,l),k.push(O.WG(c,m,e,a,b)),d-=Math.abs(e-m),m=e;return k},WG:function(a,b,c,d,e){var g=(c-b)/2,h=a*Math.cos(g),k=a*Math.sin(g),l=-k,m=h*h+l*l,n=m+h*h+l*k,m=4/3*(Math.sqrt(2*m*n)-n)/(h*k-l*h),k=h-m*l,h=l+m*h,l=-h,m=g+b,g=Math.cos(m),m=Math.sin(m);return[d+a*Math.cos(b),e+a*Math.sin(b),d+k*g-h*m,
- e+k*m+h*g,d+k*g-l*m,e+k*m+l*g,d+a*Math.cos(c),e+a*Math.sin(c)]},Ss:function(a,b,c,d,e,g,h){c=Math.floor((a-c)/e)*e+c;d=Math.floor((b-d)/g)*g+d;var k=c;c+e-a<e/2&&(k=c+e);a=d;d+g-b<g/2&&(a=d+g);h.n(k,a);return h},eE:function(a,b){var c=Math.max(a,b),d=Math.min(a,b),e=1,g=1;do e=c%d,c=g=d,d=e;while(0<e);return g},dH:function(a,b,c,d){var e=0>c,g=0>d,h=0,k=h=0;a<b?(h=1,k=0):(h=0,k=1);var l=0,m=0,n=0,l=0===h?a:b,m=0===h?c:d;if(0===h?e:g)m=-m;h=k;n=0===h?c:d;if(0===h?e:g)n=-n;return O.eH(l,0===h?a:b,m,
- n,0,0)},eH:function(a,b,c,d,e,g){e=0;if(0<d)if(0<c){g=a*a;e=b*b;a*=c;var h=b*d,k=-e+h,l=-e+Math.sqrt(a*a+h*h);b=k;for(var m=0;9999999999>m;++m){b=.5*(k+l);if(b===k||b===l)break;var n=a/(b+g),p=h/(b+e),n=n*n+p*p-1;if(0<n)k=b;else if(0>n)l=b;else break}c=g*c/(b+g)-c;d=e*d/(b+e)-d;e=Math.sqrt(c*c+d*d)}else e=Math.abs(d-b);else d=a*a-b*b,e=a*c,e<d?(d=e/d,e=a*d,g=b*Math.sqrt(Math.abs(1-d*d)),c=e-c,e=Math.sqrt(c*c+g*g)):e=Math.abs(c-a);return e}};
- function sd(a){1<arguments.length&&w.l("Geometry constructor can take at most one optional argument, the Geometry type.");w.mc(this);this.La=!1;void 0===a?a=td:u&&w.Ea(a,sd,sd,"constructor:type");this.ia=a;this.Ab=this.rb=this.vc=this.pc=0;this.pj=new K(ud);this.Eu=this.pj.Y;this.ou=(new x).freeze();this.bb=!0;this.Fi=Xb;this.Gi=jc;this.Zn=this.$n=NaN;this.pi=vd}w.la("Geometry",sd);w.$h(sd);
- sd.prototype.copy=function(){var a=new sd;a.ia=this.ia;a.pc=this.pc;a.vc=this.vc;a.rb=this.rb;a.Ab=this.Ab;for(var b=this.pj.p,c=b.length,d=a.pj,e=0;e<c;e++){var g=b[e].copy();d.add(g)}a.Eu=this.Eu;a.ou.assign(this.ou);a.bb=this.bb;a.Fi=this.Fi.da();a.Gi=this.Gi.da();a.$n=this.$n;a.Zn=this.Zn;a.pi=this.pi;return a};var wd;sd.Line=wd=w.v(sd,"Line",0);var xd;sd.Rectangle=xd=w.v(sd,"Rectangle",1);var yd;sd.Ellipse=yd=w.v(sd,"Ellipse",2);var td;sd.Path=td=w.v(sd,"Path",3);
- sd.prototype.Ra=function(){this.freeze();Object.freeze(this);return this};sd.prototype.freeze=function(){this.La=!0;var a=this.Bb;a.freeze();for(var a=a.p,b=a.length,c=0;c<b;c++)a[c].freeze();return this};sd.prototype.Ta=function(){Object.isFrozen(this)&&w.l("cannot thaw constant: "+this);this.La=!1;var a=this.Bb;a.Ta();for(var a=a.p,b=a.length,c=0;c<b;c++)a[c].Ta();return this};
- sd.prototype.equalsApprox=sd.prototype.Me=function(a){if(!(a instanceof sd))return!1;if(this.type!==a.type)return this.type===wd&&a.type===td?zd(this,a):a.type===wd&&this.type===td?zd(a,this):!1;if(this.type===td){var b=this.Bb.p;a=a.Bb.p;var c=b.length;if(c!==a.length)return!1;for(var d=0;d<c;d++)if(!b[d].Me(a[d]))return!1;return!0}return O.F(this.Aa,a.Aa)&&O.F(this.Ba,a.Ba)&&O.F(this.H,a.H)&&O.F(this.I,a.I)};
- function zd(a,b){if(a.type!==wd||b.type!==td)return!1;if(1===b.Bb.count){var c=b.Bb.ma(0);if(1===c.Oa.count&&O.F(a.Aa,c.Aa)&&O.F(a.Ba,c.Ba)&&(c=c.Oa.ma(0),c.type===Ad&&O.F(a.H,c.H)&&O.F(a.I,c.I)))return!0}return!1}var Bd;sd.stringify=Bd=function(a){return a.toString()};
- sd.prototype.toString=function(a){void 0===a&&(a=-1);switch(this.type){case wd:return 0>a?"M"+this.Aa.toString()+" "+this.Ba.toString()+"L"+this.H.toString()+" "+this.I.toString():"M"+this.Aa.toFixed(a)+" "+this.Ba.toFixed(a)+"L"+this.H.toFixed(a)+" "+this.I.toFixed(a);case xd:var b=new x(this.Aa,this.Ba,0,0);b.LF(this.H,this.I,0,0);return 0>a?"M"+b.x.toString()+" "+b.y.toString()+"H"+b.right.toString()+"V"+b.bottom.toString()+"H"+b.left.toString()+"z":"M"+b.x.toFixed(a)+" "+b.y.toFixed(a)+"H"+b.right.toFixed(a)+
- "V"+b.bottom.toFixed(a)+"H"+b.left.toFixed(a)+"z";case yd:b=new x(this.Aa,this.Ba,0,0);b.LF(this.H,this.I,0,0);if(0>a){var c=b.left.toString()+" "+(b.y+b.height/2).toString(),d=b.right.toString()+" "+(b.y+b.height/2).toString();return"M"+c+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+d+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+c}c=b.left.toFixed(a)+" "+(b.y+b.height/2).toFixed(a);d=b.right.toFixed(a)+" "+(b.y+b.height/2).toFixed(a);return"M"+c+"A"+(b.width/
- 2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+d+"A"+(b.width/2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+c;case td:for(var b="",c=this.Bb.p,d=c.length,e=0;e<d;e++){var g=c[e];0<e&&(b+=" x ");g.ft&&(b+="F ");b+=g.toString(a)}return b;default:return this.type.toString()}};var Cd;
- sd.fillPath=Cd=function(a){"string"!==typeof a&&w.tc(a,"string",sd,"fillPath:str");a=a.split(/[Xx]/);for(var b=a.length,c="",d=0;d<b;d++)var e=a[d],c=null!==e.match(/[Ff]/)?0===d?c+e:c+("X"+(" "===e[0]?"":" ")+e):c+((0===d?"":"X ")+"F"+(" "===e[0]?"":" ")+e);return c};var Dd;
- sd.parse=Dd=function(a,b){function c(){return m>=t-1?!0:null!==l[m+1].match(/[A-Za-z]/)}function d(){m++;return l[m]}function e(){var a=new I(parseFloat(d()),parseFloat(d()));n===n.toLowerCase()&&(a.x=s.x+a.x,a.y=s.y+a.y);return a}function g(){return s=e()}function h(){return r=e()}function k(){return"c"!==p.toLowerCase()&&"s"!==p.toLowerCase()?s:new I(2*s.x-r.x,2*s.y-r.y)}void 0===b&&(b=!1);"string"!==typeof a&&w.tc(a,"string",sd,"parse:str");a=a.replace(/,/gm," ");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm,
- "$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm,"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([^\s])/gm,"$1 $2");a=a.replace(/([^\s])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm,"$1 $2");a=a.replace(/([0-9])([+\-])/gm,"$1 $2");a=a.replace(/(\.[0-9]*)(\.)/gm,"$1 $2");a=a.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,"$1 $3 $4 ");a=a.replace(/[\s\r\t\n]+/gm," ");a=a.replace(/^\s+|\s+$/g,"");for(var l=a.split(" "),m=-1,n="",p="",q=new I(0,0),r=new I(0,0),s=new I(0,
- 0),t=l.length,v=w.s(),y=!1,B=!1,A=!0;!(m>=t-1);)if(p=n,n=d(),""!==n)switch(n.toUpperCase()){case "X":A=!0;B=y=!1;break;case "M":var E=g();null===v.bc||!0===A?(R(v,E.x,E.y,y,!1,!B),A=!1):v.moveTo(E.x,E.y);for(q=s;!c();)E=g(),v.lineTo(E.x,E.y);break;case "L":for(;!c();)E=g(),v.lineTo(E.x,E.y);break;case "H":for(;!c();)s=E=new I((n===n.toLowerCase()?s.x:0)+parseFloat(d()),s.y),v.lineTo(s.x,s.y);break;case "V":for(;!c();)s=E=new I(s.x,(n===n.toLowerCase()?s.y:0)+parseFloat(d())),v.lineTo(s.x,s.y);break;
- case "C":for(;!c();){var N=e(),J=h(),E=g();S(v,N.x,N.y,J.x,J.y,E.x,E.y)}break;case "S":for(;!c();)N=k(),J=h(),E=g(),S(v,N.x,N.y,J.x,J.y,E.x,E.y);break;case "Q":for(;!c();)J=h(),E=g(),Id(v,J.x,J.y,E.x,E.y);break;case "T":for(;!c();)r=J=k(),E=g(),Id(v,J.x,J.y,E.x,E.y);break;case "B":for(;!c();){var E=parseFloat(d()),N=parseFloat(d()),J=parseFloat(d()),W=parseFloat(d()),ea=parseFloat(d()),T=ea,P=!1;c()||(T=parseFloat(d()),c()||(P=0!==parseFloat(d())));n===n.toLowerCase()&&(J+=s.x,W+=s.y);v.arcTo(E,N,
- J,W,ea,T,P)}break;case "A":for(;!c();)N=Math.abs(parseFloat(d())),J=Math.abs(parseFloat(d())),W=parseFloat(d()),ea=!!parseFloat(d()),T=!!parseFloat(d()),E=g(),Jd(v,N,J,W,ea,T,E.x,E.y);break;case "Z":E=v.q.Bb.p[v.q.Bb.length-1];U(v);s=q;break;case "F":E="";for(N=1;l[m+N];)if(null!==l[m+N].match(/[Uu]/))N++;else if(null===l[m+N].match(/[A-Za-z]/))N++;else{E=l[m+N];break}E.match(/[Mm]/)?y=!0:Kd(v);break;case "U":E="";for(N=1;l[m+N];)if(null!==l[m+N].match(/[Ff]/))N++;else if(null===l[m+N].match(/[A-Za-z]/))N++;
- else{E=l[m+N];break}E.match(/[Mm]/)?B=!0:v.hb(!1)}q=v.q;w.u(v);if(b)for(v=q.Bb.j;v.next();)E=v.value,E.ft=!0;return q};function Ld(a,b){for(var c=a.length,d=w.O(),e=0;e<c;e++){var g=a[e];d.x=g[0];d.y=g[1];b.ib(d);g[0]=d.x;g[1]=d.y;d.x=g[2];d.y=g[3];b.ib(d);g[2]=d.x;g[3]=d.y;d.x=g[4];d.y=g[5];b.ib(d);g[4]=d.x;g[5]=d.y;d.x=g[6];d.y=g[7];b.ib(d);g[6]=d.x;g[7]=d.y}w.A(d)}
- sd.prototype.Vz=function(){if(this.bb||this.Eu!==this.Bb.Y)return!0;for(var a=this.Bb.p,b=a.length,c=0;c<b;c++)if(a[c].Vz())return!0;return!1};sd.prototype.NA=function(){this.bb=!1;this.Eu=this.Bb.Y;for(var a=this.Bb.p,b=a.length,c=0;c<b;c++)a[c].NA()};sd.prototype.zg=function(){var a=this.ou;a.Ta();isNaN(this.$n)||isNaN(this.Zn)?a.n(0,0,0,0):a.n(0,0,this.$n,this.Zn);Md(this,a,!1);Ab(a,0,0,0,0);a.freeze()};
- sd.prototype.computeBoundsWithoutOrigin=sd.prototype.OG=function(){var a=new x;Md(this,a,!0);return a};
- function Md(a,b,c){switch(a.type){case wd:case xd:case yd:c?b.n(a.pc,a.vc,0,0):Ab(b,a.pc,a.vc,0,0);Ab(b,a.rb,a.Ab,0,0);break;case td:var d=a.Bb;a=d.p;for(var d=d.length,e=0;e<d;e++){var g=a[e];c&&0===e?b.n(g.Aa,g.Ba,0,0):Ab(b,g.Aa,g.Ba,0,0);for(var h=g.Oa.p,k=h.length,l=g.Aa,m=g.Ba,n=0;n<k;n++){var p=h[n];switch(p.type){case Ad:case Nd:l=p.H;m=p.I;Ab(b,l,m,0,0);break;case Od:O.Io(l,m,p.Xb,p.rc,p.of,p.pf,p.H,p.I,.5,b);l=p.H;m=p.I;break;case Pd:O.nA(l,m,p.Xb,p.rc,p.H,p.I,.5,b);l=p.H;m=p.I;break;case Qd:case be:var q=
- p.type===Qd?ce(p,g):de(p,g,l,m),r=q.length;if(0===r){l=p.ra;m=p.Da;Ab(b,l,m,0,0);break}for(var p=null,s=0;s<r;s++)p=q[s],O.Io(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],.5,b);null!==p&&(l=p[6],m=p[7]);break;default:w.l("Unknown Segment type: "+p.type)}}}break;default:w.l("Unknown Geometry type: "+a.type)}}sd.prototype.normalize=sd.prototype.normalize=function(){w.G(this);var a=this.OG();this.offset(-a.x,-a.y);return new I(-a.x,-a.y)};
- sd.prototype.offset=sd.prototype.offset=function(a,b){w.G(this);u&&(w.o(a,sd,"offset"),w.o(b,sd,"offset"));this.transform(1,0,0,1,a,b);return this};sd.prototype.scale=sd.prototype.scale=function(a,b){w.G(this);u&&(w.o(a,sd,"scale:x"),w.o(b,sd,"scale:y"),0===a&&w.ja(a,"scale must be non-zero",sd,"scale:x"),0===b&&w.ja(b,"scale must be non-zero",sd,"scale:y"));this.transform(a,0,0,b,0,0);return this};
- sd.prototype.rotate=sd.prototype.rotate=function(a,b,c){w.G(this);void 0===b&&(b=0);void 0===c&&(c=0);u&&(w.o(a,sd,"rotate:angle"),w.o(b,sd,"rotate:x"),w.o(c,sd,"rotate:y"));var d=w.zh();d.reset();d.rotate(a,b,c);this.transform(d.m11,d.m12,d.m21,d.m22,d.dx,d.dy);w.gf(d);return this};
- sd.prototype.transform=sd.prototype.transform=function(a,b,c,d,e,g){var h=0,k=0;switch(this.type){case wd:case xd:case yd:h=this.pc;k=this.vc;this.pc=h*a+k*c+e;this.vc=h*b+k*d+g;h=this.rb;k=this.Ab;this.rb=h*a+k*c+e;this.Ab=h*b+k*d+g;break;case td:for(var l=this.Bb.p,m=l.length,n=0;n<m;n++){var p=l[n],h=p.Aa,k=p.Ba;p.Aa=h*a+k*c+e;p.Ba=h*b+k*d+g;for(var p=p.Oa.p,q=p.length,r=0;r<q;r++){var s=p[r];switch(s.type){case Ad:case Nd:h=s.H;k=s.I;s.H=h*a+k*c+e;s.I=h*b+k*d+g;break;case Od:h=s.Xb;k=s.rc;s.Xb=
- h*a+k*c+e;s.rc=h*b+k*d+g;h=s.of;k=s.pf;s.of=h*a+k*c+e;s.pf=h*b+k*d+g;h=s.H;k=s.I;s.H=h*a+k*c+e;s.I=h*b+k*d+g;break;case Pd:h=s.Xb;k=s.rc;s.Xb=h*a+k*c+e;s.rc=h*b+k*d+g;h=s.H;k=s.I;s.H=h*a+k*c+e;s.I=h*b+k*d+g;break;case Qd:h=s.ra;k=s.Da;s.ra=h*a+k*c+e;s.Da=h*b+k*d+g;0!==b&&(h=180*Math.atan2(b,a)/Math.PI,0>h&&(h+=360),s.Se+=h);0>a&&(s.Se=180-s.Se,s.cg=-s.cg);0>d&&(s.Se=-s.Se,s.cg=-s.cg);s.radiusX*=Math.sqrt(a*a+c*c);void 0!==s.radiusY&&(s.radiusY*=Math.sqrt(b*b+d*d));break;case be:h=s.H;k=s.I;s.H=h*
- a+k*c+e;s.I=h*b+k*d+g;0!==b&&(h=180*Math.atan2(b,a)/Math.PI,0>h&&(h+=360),s.fj+=h);0>a&&(s.fj=180-s.fj,s.zl=!s.zl);0>d&&(s.fj=-s.fj,s.zl=!s.zl);s.radiusX*=Math.sqrt(a*a+c*c);s.radiusY*=Math.sqrt(b*b+d*d);break;default:w.l("Unknown Segment type: "+s.type)}}}}this.bb=!0;return this};
- sd.prototype.rs=function(a,b){var c=this.pc,d=this.vc,e=this.rb,g=this.Ab,h=Math.min(c,e),k=Math.min(d,g),c=Math.abs(e-c),d=Math.abs(g-d),g=w.O();g.x=h;g.y=k;b.ib(g);e=new ud(g.x,g.y);g.x=h+c;g.y=k;b.ib(g);e.Oa.add(new ee(Ad,g.x,g.y));g.x=h+c;g.y=k+d;b.ib(g);e.Oa.add(new ee(Ad,g.x,g.y));g.x=h;g.y=k+d;b.ib(g);e.Oa.add((new ee(Ad,g.x,g.y)).close());w.A(g);a.type=td;a.Bb.add(e);return a};
- sd.prototype.Ka=function(a,b,c,d){var e=a.x,g=a.y,h=this.ub.x-20;a=a.y;for(var k=0,l=0,m=0,n=0,p=0,q=0,r=this.Bb.p,s=r.length,t=0;t<s;t++){var v=r[t];if(v.ft){if(c&&v.Ka(e,g,b))return!0;for(var y=v.Oa,l=v.Aa,m=v.Ba,B=l,A=m,E=y.p,N=0;N<=y.length;N++){var J,W;N!==y.length?(J=E[N],W=J.type,p=J.H,q=J.I):(W=Ad,p=B,q=A);switch(W){case Nd:n=fe(e,g,h,a,l,m,B,A);if(isNaN(n))return!0;k+=n;B=p;A=q;break;case Ad:n=fe(e,g,h,a,l,m,p,q);if(isNaN(n))return!0;k+=n;break;case Od:n=O.Es(l,m,J.Xb,J.rc,J.of,J.pf,p,q,
- h,a,e,g,.5);k+=n;break;case Pd:n=O.Es(l,m,(l+2*J.Xb)/3,(m+2*J.rc)/3,(J.Xb+2*p)/3,(J.Xb+2*p)/3,p,q,h,a,e,g,.5);k+=n;break;case Qd:case be:W=J.type===Qd?ce(J,v):de(J,v,l,m);var ea=W.length;if(0===ea){n=fe(e,g,h,a,l,m,J.ra,J.Da);if(isNaN(n))return!0;k+=n;break}for(var T=null,P=0;P<ea;P++){T=W[P];if(0===P){n=fe(e,g,h,a,l,m,T[0],T[1]);if(isNaN(n))return!0;k+=n}n=O.Es(T[0],T[1],T[2],T[3],T[4],T[5],T[6],T[7],h,a,e,g,.5);k+=n}null!==T&&(p=T[6],q=T[7]);break;default:w.l("Unknown Segment type: "+J.type)}l=
- p;m=q}if(0!==k)return!0;k=0}else if(v.Ka(e,g,d?b:b+2))return!0}return 0!==k};function fe(a,b,c,d,e,g,h,k){if(O.Dd(e,g,h,k,.05,a,b))return NaN;var l=(a-c)*(g-k);if(0===l)return 0;var m=((a*d-b*c)*(e-h)-(a-c)*(e*k-g*h))/l;b=(a*d-b*c)*(g-k)/l;if(m>=a)return 0;if((e>h?e-h:h-e)<(g>k?g-k:k-g)){if(e=a=0,g<k?(a=g,e=k):(a=k,e=g),b<a||b>e)return 0}else if(e<h?(a=e,e=h):a=h,m<a||m>e)return 0;return 0<l?1:-1}function ge(a,b,c,d){a=a.Bb.p;for(var e=a.length,g=0;g<e;g++)if(a[g].Ka(b,c,d))return!0;return!1}
- sd.prototype.getPointAlongPath=function(a){(0>a||1<a)&&w.ja(a,"0 <= fraction <= 1",sd,"getPointAlongPath:fraction");var b=this.Bb.first(),c=w.nb(),d=[];d.push(b.Aa);d.push(b.Ba);for(var e=b.Aa,g=b.Ba,h=e,k=g,l=b.Oa.p,m=l.length,n=0;n<m;n++){var p=l[n];switch(p.ia){case Nd:c.push(d);d=[];d.push(p.H);d.push(p.I);e=p.H;g=p.I;h=e;k=g;break;case Ad:d.push(p.H);d.push(p.I);e=p.H;g=p.I;break;case Od:O.Ie(e,g,p.kd,p.He,p.sg,p.tg,p.rb,p.Ab,.5,d);e=p.H;g=p.I;break;case Pd:O.tp(e,g,p.kd,p.He,p.rb,p.Ab,.5,d);
- e=p.H;g=p.I;break;case Qd:var q=ce(p,b),r=q.length;if(0===r){d.push(p.ra);d.push(p.Da);e=p.ra;g=p.Da;break}for(var s=0;s<r;s++){var t=q[s];O.Ie(e,g,t[2],t[3],t[4],t[5],t[6],t[7],.5,d);e=t[6];g=t[7]}break;case be:q=de(p,b,e,g);r=q.length;for(s=0;s<r;s++)t=q[s],O.Ie(e,g,t[2],t[3],t[4],t[5],t[6],t[7],.5,d),e=t[6],g=t[7];break;default:w.l("Segment not of valid type")}p.Nh&&(d.push(h),d.push(k))}c.push(d);q=0;h=c.length;for(k=d=b=0;k<h;k++)for(l=c[k],m=l.length,n=0;n<m;n+=2)e=l[n],g=l[n+1],0!==n&&(p=Math.sqrt(mb(b,
- d,e,g)),q+=p),b=e,d=g;a*=q;for(k=q=0;k<h;k++)for(l=c[k],m=l.length,n=0;n<m;n++){e=l[n];g=l[n+1];if(0!==n){p=Math.sqrt(mb(b,d,e,g));if(q+p>a)return n=(a-q)/p,w.xa(c),new I(b+(e-b)*n,d+(g-d)*n);q+=p}b=e;d=g}w.xa(c);return null};w.defineProperty(sd,{type:"type"},function(){return this.ia},function(a){this.ia!==a&&(u&&w.Ea(a,sd,sd,"type"),w.G(this,a),this.ia=a,this.bb=!0)});
- w.defineProperty(sd,{Aa:"startX"},function(){return this.pc},function(a){this.pc!==a&&(u&&w.o(a,sd,"startX"),w.G(this,a),this.pc=a,this.bb=!0)});w.defineProperty(sd,{Ba:"startY"},function(){return this.vc},function(a){this.vc!==a&&(u&&w.o(a,sd,"startY"),w.G(this,a),this.vc=a,this.bb=!0)});w.defineProperty(sd,{H:"endX"},function(){return this.rb},function(a){this.rb!==a&&(u&&w.o(a,sd,"endX"),w.G(this,a),this.rb=a,this.bb=!0)});
- w.defineProperty(sd,{I:"endY"},function(){return this.Ab},function(a){this.Ab!==a&&(u&&w.o(a,sd,"endY"),w.G(this,a),this.Ab=a,this.bb=!0)});w.defineProperty(sd,{Bb:"figures"},function(){return this.pj},function(a){this.pj!==a&&(u&&w.k(a,K,sd,"figures"),w.G(this,a),this.pj=a,this.bb=!0)});sd.prototype.add=sd.prototype.add=function(a){this.pj.add(a);return this};w.defineProperty(sd,{C:"spot1"},function(){return this.Fi},function(a){u&&w.k(a,Q,sd,"spot1");w.G(this,a);this.Fi=a.da()});
- w.defineProperty(sd,{D:"spot2"},function(){return this.Gi},function(a){u&&w.k(a,Q,sd,"spot2");w.G(this,a);this.Gi=a.da()});w.defineProperty(sd,{Qd:"defaultStretch"},function(){return this.pi},function(a){u&&w.Ea(a,V,sd,"stretch");w.G(this,a);this.pi=a});w.w(sd,{ub:"bounds"},function(){this.Vz()&&(this.NA(),this.zg());return this.ou});
- function ud(a,b,c,d){w.mc(this);this.La=!1;void 0===c&&(c=!0);this.bm=c;void 0===d&&(d=!0);this.ao=d;void 0!==a?(u&&w.o(a,ud,"sx"),this.pc=a):this.pc=0;void 0!==b?(u&&w.o(b,ud,"sy"),this.vc=b):this.vc=0;this.vo=new K(ee);this.zv=this.vo.Y;this.bb=!0}w.la("PathFigure",ud);w.$h(ud);ud.prototype.copy=function(){var a=new ud;a.bm=this.bm;a.ao=this.ao;a.pc=this.pc;a.vc=this.vc;for(var b=this.vo.p,c=b.length,d=a.vo,e=0;e<c;e++){var g=b[e].copy();d.add(g)}a.zv=this.zv;a.bb=this.bb;return a};
- ud.prototype.equalsApprox=ud.prototype.Me=function(a){if(!(a instanceof ud&&O.F(this.Aa,a.Aa)&&O.F(this.Ba,a.Ba)))return!1;var b=this.Oa.p;a=a.Oa.p;var c=b.length;if(c!==a.length)return!1;for(var d=0;d<c;d++)if(!b[d].Me(a[d]))return!1;return!0};f=ud.prototype;f.toString=function(a){void 0===a&&(a=-1);for(var b=0>a?"M"+this.Aa.toString()+" "+this.Ba.toString():"M"+this.Aa.toFixed(a)+" "+this.Ba.toFixed(a),c=this.Oa.p,d=c.length,e=0;e<d;e++)b+=" "+c[e].toString(a);return b};
- f.freeze=function(){this.La=!0;var a=this.Oa;a.freeze();for(var b=a.p,a=a.length,c=0;c<a;c++)b[c].freeze();return this};f.Ta=function(){this.La=!1;var a=this.Oa;a.Ta();for(var a=a.p,b=a.length,c=0;c<b;c++)a[c].Ta();return this};f.Vz=function(){if(this.bb)return!0;var a=this.Oa;if(this.zv!==a.Y)return!0;for(var a=a.p,b=a.length,c=0;c<b;c++)if(a[c].bb)return!0;return!1};f.NA=function(){this.bb=!1;var a=this.Oa;this.zv=a.Y;for(var a=a.p,b=a.length,c=0;c<b;c++){var d=a[c];d.bb=!1;d.hg=null}};
- w.defineProperty(ud,{ft:"isFilled"},function(){return this.bm},function(a){u&&w.g(a,"boolean",ud,"isFilled");w.G(this,a);this.bm=a});w.defineProperty(ud,{gk:"isShadowed"},function(){return this.ao},function(a){u&&w.g(a,"boolean",ud,"isShadowed");w.G(this,a);this.ao=a});w.defineProperty(ud,{Aa:"startX"},function(){return this.pc},function(a){u&&w.o(a,ud,"startX");w.G(this,a);this.pc=a;this.bb=!0});
- w.defineProperty(ud,{Ba:"startY"},function(){return this.vc},function(a){u&&w.o(a,ud,"startY");w.G(this,a);this.vc=a;this.bb=!0});w.defineProperty(ud,{Oa:"segments"},function(){return this.vo},function(a){u&&w.k(a,K,ud,"segments");w.G(this,a);this.vo=a;this.bb=!0});ud.prototype.add=ud.prototype.add=function(a){this.vo.add(a);return this};
- ud.prototype.Ka=function(a,b,c){for(var d=this.Aa,e=this.Ba,g=d,h=e,k=this.Oa.p,l=k.length,m=0;m<l;m++){var n=k[m];switch(n.type){case Nd:g=n.H;h=n.I;d=n.H;e=n.I;break;case Ad:if(O.Dd(d,e,n.H,n.I,c,a,b))return!0;d=n.H;e=n.I;break;case Od:if(O.ew(d,e,n.Xb,n.rc,n.of,n.pf,n.H,n.I,.5,a,b,c))return!0;d=n.H;e=n.I;break;case Pd:if(O.oA(d,e,n.Xb,n.rc,n.H,n.I,.5,a,b,c))return!0;d=n.H;e=n.I;break;case Qd:case be:var p=n.type===Qd?ce(n,this):de(n,this,d,e),q=p.length;if(0===q){if(O.Dd(d,e,n.ra,n.Da,c,a,b))return!0;
- d=n.ra;e=n.Da;break}for(var r=null,s=0;s<q;s++)if(r=p[s],0===s&&O.Dd(d,e,r[0],r[1],c,a,b)||O.ew(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],.5,a,b,c))return!0;null!==r&&(d=r[6],e=r[7]);break;default:w.l("Unknown Segment type: "+n.type)}if(n.Cw&&(d!==g||e!==h)&&O.Dd(d,e,g,h,c,a,b))return!0}return!1};
- function ee(a,b,c,d,e,g,h,k){w.mc(this);this.La=!1;void 0===a?a=Ad:u&&w.Ea(a,ee,ee,"constructor:type");this.ia=a;void 0!==b?(u&&w.o(b,ee,"ex"),this.rb=b):this.rb=0;void 0!==c?(u&&w.o(c,ee,"ey"),this.Ab=c):this.Ab=0;a===be?(void 0!==g&&(a=g%360,0>a&&(a+=360),this.kd=a),void 0!==d&&(u&&w.o(d,ee,"x1"),this.sg=Math.max(d,0)),void 0!==e&&(u&&w.o(e,ee,"y1"),this.tg=Math.max(e,0)),this.jo=!!h,this.yn=!!k):(void 0!==d&&(u&&w.o(d,ee,"x1"),this.kd=d),void 0!==e&&(u&&w.o(e,ee,"y1"),this.He=e),void 0!==g&&(u&&
- w.o(g,ee,"x2"),a===Qd&&(g=Math.max(g,0)),this.sg=g),void 0!==h&&"number"===typeof h&&(u&&w.o(h,ee,"y2"),a===Qd&&(h=Math.max(h,0)),this.tg=h));this.Nh=!1;this.bb=!0;this.hg=null}w.la("PathSegment",ee);w.$h(ee);
- ee.prototype.copy=function(){var a=new ee;a.ia=this.ia;a.rb=this.rb;a.Ab=this.Ab;void 0!==this.kd&&(a.kd=this.kd);void 0!==this.He&&(a.He=this.He);void 0!==this.sg&&(a.sg=this.sg);void 0!==this.tg&&(a.tg=this.tg);void 0!==this.jo&&(a.jo=this.jo);void 0!==this.yn&&(a.yn=this.yn);a.Nh=this.Nh;a.bb=this.bb;return a};
- ee.prototype.equalsApprox=ee.prototype.Me=function(a){if(!(a instanceof ee)||this.type!==a.type||this.Cw!==a.Cw)return!1;switch(this.type){case Nd:case Ad:return O.F(this.H,a.H)&&O.F(this.I,a.I);case Od:return O.F(this.H,a.H)&&O.F(this.I,a.I)&&O.F(this.Xb,a.Xb)&&O.F(this.rc,a.rc)&&O.F(this.of,a.of)&&O.F(this.pf,a.pf);case Pd:return O.F(this.H,a.H)&&O.F(this.I,a.I)&&O.F(this.Xb,a.Xb)&&O.F(this.rc,a.rc);case Qd:return O.F(this.Se,a.Se)&&O.F(this.cg,a.cg)&&O.F(this.ra,a.ra)&&O.F(this.Da,a.Da)&&O.F(this.radiusX,
- a.radiusX)&&O.F(this.radiusY,a.radiusY);case be:return this.zl===a.zl&&this.Gw===a.Gw&&O.F(this.fj,a.fj)&&O.F(this.H,a.H)&&O.F(this.I,a.I)&&O.F(this.radiusX,a.radiusX)&&O.F(this.radiusY,a.radiusY);default:return!1}};
- ee.prototype.toString=function(a){void 0===a&&(a=-1);var b="";switch(this.type){case Nd:b=0>a?"M"+this.H.toString()+" "+this.I.toString():"M"+this.H.toFixed(a)+" "+this.I.toFixed(a);break;case Ad:b=0>a?"L"+this.H.toString()+" "+this.I.toString():"L"+this.H.toFixed(a)+" "+this.I.toFixed(a);break;case Od:b=0>a?"C"+this.Xb.toString()+" "+this.rc.toString()+" "+this.of.toString()+" "+this.pf.toString()+" "+this.H.toString()+" "+this.I.toString():"C"+this.Xb.toFixed(a)+" "+this.rc.toFixed(a)+" "+this.of.toFixed(a)+
- " "+this.pf.toFixed(a)+" "+this.H.toFixed(a)+" "+this.I.toFixed(a);break;case Pd:b=0>a?"Q"+this.Xb.toString()+" "+this.rc.toString()+" "+this.H.toString()+" "+this.I.toString():"Q"+this.Xb.toFixed(a)+" "+this.rc.toFixed(a)+" "+this.H.toFixed(a)+" "+this.I.toFixed(a);break;case Qd:b=0>a?"B"+this.Se.toString()+" "+this.cg.toString()+" "+this.ra.toString()+" "+this.Da.toString()+" "+this.radiusX:"B"+this.Se.toFixed(a)+" "+this.cg.toFixed(a)+" "+this.ra.toFixed(a)+" "+this.Da.toFixed(a)+" "+this.radiusX;
- break;case be:b=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.fj.toString()+" "+(this.Gw?1:0)+" "+(this.zl?1:0)+" "+this.H.toString()+" "+this.I.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.fj.toFixed(a)+" "+(this.Gw?1:0)+" "+(this.zl?1:0)+" "+this.H.toFixed(a)+" "+this.I.toFixed(a);break;default:b=this.type.toString()}return b+(this.Nh?"z":"")};var Nd;ee.Move=Nd=w.v(ee,"Move",0);var Ad;ee.Line=Ad=w.v(ee,"Line",1);var Od;
- ee.Bezier=Od=w.v(ee,"Bezier",2);var Pd;ee.QuadraticBezier=Pd=w.v(ee,"QuadraticBezier",3);var Qd;ee.Arc=Qd=w.v(ee,"Arc",4);var be;ee.SvgArc=be=w.v(ee,"SvgArc",4);ee.prototype.freeze=function(){this.La=!0;return this};ee.prototype.Ta=function(){this.La=!1;return this};ee.prototype.close=ee.prototype.close=function(){this.Nh=!0;return this};
- function ce(a,b){if(null!==a.hg&&!1===b.bb)return a.hg;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.hg=[],a.hg;var e=a.kd,g=a.He,h=O.HD(0,0,c<d?c:d,a.Se,a.Se+a.cg,!1);if(c!==d){var k=w.zh();k.reset();c<d?k.scale(1,d/c):k.scale(c/d,1);Ld(h,k);w.gf(k)}c=h.length;for(d=0;d<c;d++)k=h[d],k[0]+=e,k[1]+=g,k[2]+=e,k[3]+=g,k[4]+=e,k[5]+=g,k[6]+=e,k[7]+=g;a.hg=h;return a.hg}
- function de(a,b,c,d){function e(a,b,c,d){return(a*d<b*c?-1:1)*Math.acos(g(a,b,c,d))}function g(a,b,c,d){return(a*c+b*d)/(Math.sqrt(a*a+b*b)*Math.sqrt(c*c+d*d))}if(null!==a.hg&&!1===b.bb)return a.hg;b=a.sg;var h=a.tg;if(0===b||0===h)return a.hg=[],a.hg;var k=Math.PI/180*a.kd,l=a.jo,m=a.yn,n=a.rb,p=a.Ab,q=Math.cos(k),r=Math.sin(k),s=q*(c-n)/2+r*(d-p)/2,k=-r*(c-n)/2+q*(d-p)/2,t=s*s/(b*b)+k*k/(h*h);1<t&&(b*=Math.sqrt(t),h*=Math.sqrt(t));t=(l===m?-1:1)*Math.sqrt((b*b*h*h-b*b*k*k-h*h*s*s)/(b*b*k*k+h*h*
- s*s));isNaN(t)&&(t=0);l=t*b*k/h;t=t*-h*s/b;isNaN(l)&&(l=0);isNaN(t)&&(t=0);c=(c+n)/2+q*l-r*t;d=(d+p)/2+r*l+q*t;p=e(1,0,(s-l)/b,(k-t)/h);q=(s-l)/b;n=(k-t)/h;s=(-s-l)/b;l=(-k-t)/h;k=e(q,n,s,l);s=g(q,n,s,l);-1>=s?k=Math.PI:1<=s&&(k=0);!m&&0<k&&(k-=2*Math.PI);m&&0>k&&(k+=2*Math.PI);m=b>h?1:b/h;s=b>h?h/b:1;b=O.HD(0,0,b>h?b:h,p,p+k,!0);h=w.zh();h.reset();h.translate(c,d);h.rotate(a.kd,0,0);h.scale(m,s);Ld(b,h);w.gf(h);a.hg=b;return a.hg}
- w.defineProperty(ee,{Cw:"isClosed"},function(){return this.Nh},function(a){this.Nh!==a&&(this.Nh=a,this.bb=!0)});w.defineProperty(ee,{type:"type"},function(){return this.ia},function(a){u&&w.Ea(a,ee,ee,"type");w.G(this,a);this.ia=a;this.bb=!0});w.defineProperty(ee,{H:"endX"},function(){return this.rb},function(a){u&&w.o(a,ee,"endX");w.G(this,a);this.rb=a;this.bb=!0});w.defineProperty(ee,{I:"endY"},function(){return this.Ab},function(a){u&&w.o(a,ee,"endY");w.G(this,a);this.Ab=a;this.bb=!0});
- w.defineProperty(ee,{Xb:"point1X"},function(){return this.kd},function(a){u&&w.o(a,ee,"point1X");w.G(this,a);this.kd=a;this.bb=!0});w.defineProperty(ee,{rc:"point1Y"},function(){return this.He},function(a){u&&w.o(a,ee,"point1Y");w.G(this,a);this.He=a;this.bb=!0});w.defineProperty(ee,{of:"point2X"},function(){return this.sg},function(a){u&&w.o(a,ee,"point2X");w.G(this,a);this.sg=a;this.bb=!0});
- w.defineProperty(ee,{pf:"point2Y"},function(){return this.tg},function(a){u&&w.o(a,ee,"point2Y");w.G(this,a);this.tg=a;this.bb=!0});w.defineProperty(ee,{ra:"centerX"},function(){return this.kd},function(a){u&&w.o(a,ee,"centerX");w.G(this,a);this.kd=a;this.bb=!0});w.defineProperty(ee,{Da:"centerY"},function(){return this.He},function(a){u&&w.o(a,ee,"centerY");w.G(this,a);this.He=a;this.bb=!0});
- w.defineProperty(ee,{radiusX:"radiusX"},function(){return this.sg},function(a){u&&w.o(a,ee,"radiusX");0>a&&w.ja(a,">= zero",ee,"radiusX");w.G(this,a);this.sg=a;this.bb=!0});w.defineProperty(ee,{radiusY:"radiusY"},function(){return this.tg},function(a){u&&w.o(a,ee,"radiusY");0>a&&w.ja(a,">= zero",ee,"radiusY");w.G(this,a);this.tg=a;this.bb=!0});
- w.defineProperty(ee,{Se:"startAngle"},function(){return this.rb},function(a){this.rb!==a&&(w.G(this,a),u&&w.o(a,ee,"startAngle"),a%=360,0>a&&(a+=360),this.rb=a,this.bb=!0)});w.defineProperty(ee,{cg:"sweepAngle"},function(){return this.Ab},function(a){u&&w.o(a,ee,"sweepAngle");w.G(this,a);360<a&&(a=360);-360>a&&(a=-360);this.Ab=a;this.bb=!0});w.defineProperty(ee,{zl:"isClockwiseArc"},function(){return this.yn},function(a){w.G(this,a);this.yn=a;this.bb=!0});
- w.defineProperty(ee,{Gw:"isLargeArc"},function(){return this.jo},function(a){w.G(this,a);this.jo=a;this.bb=!0});w.defineProperty(ee,{fj:"xAxisRotation"},function(){return this.kd},function(a){u&&w.o(a,ee,"xAxisRotation");a%=360;0>a&&(a+=360);w.G(this,a);this.kd=a;this.bb=!0});function he(){this.Z=null;this.gz=(new I(0,0)).freeze();this.ey=(new I(0,0)).freeze();this.lu=this.iv=0;this.Wu="";this.Ov=this.Bu=!1;this.xu=this.nu=0;this.ij=this.Ju=this.Su=!1;this.qq=null;this.Nv=0;this.ug=this.Kv=null}
- w.la("InputEvent",he);he.prototype.copy=function(){var a=new he;a.Z=this.Z;a.gz.assign(this.pe);a.ey.assign(this.ga);a.iv=this.iv;a.lu=this.lu;a.Wu=this.Wu;a.Bu=this.Bu;a.Ov=this.Ov;a.nu=this.nu;a.xu=this.xu;a.Su=this.Su;a.Ju=this.Ju;a.ij=this.ij;a.qq=this.qq;a.Nv=this.Nv;a.Kv=this.Kv;a.ug=this.ug;return a};
- he.prototype.toString=function(){var a="^";0!==this.sd&&(a+="M:"+this.sd);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.cf&&(a+="C:"+this.cf);0!==this.nl&&(a+="D:"+this.nl);this.$c&&(a+="h");this.bubbles&&(a+="b");null!==this.ga&&(a+="@"+this.ga.toString());return a};w.defineProperty(he,{h:"diagram"},function(){return this.Z},function(a){this.Z=a});w.defineProperty(he,{pe:"viewPoint"},function(){return this.gz},function(a){w.k(a,I,he,"viewPoint");this.gz.assign(a)});
- w.defineProperty(he,{ga:"documentPoint"},function(){return this.ey},function(a){w.k(a,I,he,"documentPoint");this.ey.assign(a)});w.defineProperty(he,{sd:"modifiers"},function(){return this.iv},function(a){this.iv=a});w.defineProperty(he,{button:"button"},function(){return this.lu},function(a){this.lu=a});w.defineProperty(he,{key:"key"},function(){return this.Wu},function(a){this.Wu=a});w.defineProperty(he,{pl:"down"},function(){return this.Bu},function(a){this.Bu=a});
- w.defineProperty(he,{up:"up"},function(){return this.Ov},function(a){this.Ov=a});w.defineProperty(he,{cf:"clickCount"},function(){return this.nu},function(a){this.nu=a});w.defineProperty(he,{nl:"delta"},function(){return this.xu},function(a){this.xu=a});w.defineProperty(he,{ht:"isMultiTouch"},function(){return this.Su},function(a){this.Su=a});w.defineProperty(he,{$c:"handled"},function(){return this.Ju},function(a){this.Ju=a});
- w.defineProperty(he,{bubbles:"bubbles"},function(){return this.ij},function(a){this.ij=a});w.defineProperty(he,{event:"event"},function(){return this.qq},function(a){this.qq=a});w.w(he,{Cl:"isTouchEvent"},function(){var a=window.TouchEvent;return a&&this.event instanceof a?!0:(a=window.PointerEvent)&&this.event instanceof a&&"touch"===this.event.pointerType});w.defineProperty(he,{timestamp:"timestamp"},function(){return this.Nv},function(a){this.Nv=a});
- w.defineProperty(he,{Mg:"targetDiagram"},function(){return this.Kv},function(a){this.Kv=a});w.defineProperty(he,{ye:"targetObject"},function(){return this.ug},function(a){this.ug=a});w.defineProperty(he,{control:"control"},function(){return 0!==(this.sd&1)},function(a){this.sd=a?this.sd|1:this.sd&-2});w.defineProperty(he,{shift:"shift"},function(){return 0!==(this.sd&4)},function(a){this.sd=a?this.sd|4:this.sd&-5});
- w.defineProperty(he,{alt:"alt"},function(){return 0!==(this.sd&2)},function(a){this.sd=a?this.sd|2:this.sd&-3});w.defineProperty(he,{rt:"meta"},function(){return 0!==(this.sd&8)},function(a){this.sd=a?this.sd|8:this.sd&-9});w.defineProperty(he,{left:"left"},function(){return 0===this.button},function(a){this.button=a?0:2});w.defineProperty(he,{MK:"middle"},function(){return 1===this.button},function(a){this.button=a?1:0});
- w.defineProperty(he,{right:"right"},function(){return 2===this.button},function(a){this.button=a?2:0});function ie(){this.Z=null;this.cc="";this.rv=this.Fv=null;this.mu=!1}w.la("DiagramEvent",ie);ie.prototype.copy=function(){var a=new ie;a.Z=this.Z;a.cc=this.cc;a.Fv=this.Fv;a.rv=this.rv;a.mu=this.mu;return a};ie.prototype.toString=function(){var a="*"+this.name;this.cancel&&(a+="x");null!==this.GA&&(a+=":"+this.GA.toString());null!==this.mA&&(a+="("+this.mA.toString()+")");return a};
- w.defineProperty(ie,{h:"diagram"},function(){return this.Z},function(a){this.Z=a});w.defineProperty(ie,{name:"name"},function(){return this.cc},function(a){this.cc=a});w.defineProperty(ie,{GA:"subject"},function(){return this.Fv},function(a){this.Fv=a});w.defineProperty(ie,{mA:"parameter"},function(){return this.rv},function(a){this.rv=a});w.defineProperty(ie,{cancel:"cancel"},function(){return this.mu},function(a){this.mu=a});
- function se(){this.Xp=te;this.rm=this.hv="";this.pr=this.qr=this.ur=this.vr=this.tr=this.Z=this.$d=null}w.la("ChangedEvent",se);var ue;se.Transaction=ue=w.v(se,"Transaction",-1);var te;se.Property=te=w.v(se,"Property",0);var ve;se.Insert=ve=w.v(se,"Insert",1);var we;se.Remove=we=w.v(se,"Remove",2);se.prototype.clear=se.prototype.clear=function(){this.pr=this.qr=this.ur=this.vr=this.tr=this.Z=this.$d=null};
- se.prototype.copy=function(){var a=new se;a.$d=this.$d;a.Z=this.Z;a.Xp=this.Xp;a.hv=this.hv;a.rm=this.rm;a.tr=this.tr;var b=this.vr;a.vr=w.$a(b)&&"function"===typeof b.da?b.da():b;b=this.ur;a.ur=w.$a(b)&&"function"===typeof b.da?b.da():b;b=this.qr;a.qr=w.$a(b)&&"function"===typeof b.da?b.da():b;b=this.pr;a.pr=w.$a(b)&&"function"===typeof b.da?b.da():b;return a};
- se.prototype.toString=function(){var a="",a=this.Pd===ue?a+"* ":this.Pd===te?a+(null!==this.ha?"!m":"!d"):a+((null!==this.ha?"!m":"!d")+this.Pd);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.Xf&&this.Xf!==this.propertyName&&(a+=" "+this.Xf);a+=": ";this.Pd===ue?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=ka(this.object)),null!==this.oldValue&&(a+=" old: "+ka(this.oldValue)),null!==this.Kg&&(a+=" "+this.Kg),null!==this.newValue&&
- (a+=" new: "+ka(this.newValue)),null!==this.Ig&&(a+=" "+this.Ig));return a};se.prototype.getValue=se.prototype.za=function(a){return a?this.oldValue:this.newValue};se.prototype.getParam=function(a){return a?this.Kg:this.Ig};se.prototype.canUndo=se.prototype.canUndo=function(){return null!==this.ha||null!==this.h?!0:!1};se.prototype.undo=se.prototype.undo=function(){this.canUndo()&&(null!==this.ha?this.ha.Lm(this,!0):null!==this.h&&this.h.Lm(this,!0))};
- se.prototype.canRedo=se.prototype.canRedo=function(){return null!==this.ha||null!==this.h?!0:!1};se.prototype.redo=se.prototype.redo=function(){this.canRedo()&&(null!==this.ha?this.ha.Lm(this,!1):null!==this.h&&this.h.Lm(this,!1))};w.defineProperty(se,{ha:"model"},function(){return this.$d},function(a){this.$d=a});w.defineProperty(se,{h:"diagram"},function(){return this.Z},function(a){this.Z=a});
- w.defineProperty(se,{Pd:"change"},function(){return this.Xp},function(a){u&&w.Ea(a,se,se,"change");this.Xp=a});w.defineProperty(se,{Xf:"modelChange"},function(){return this.hv},function(a){u&&w.g(a,"string",se,"modelChange");this.hv=a});w.defineProperty(se,{propertyName:"propertyName"},function(){return this.rm},function(a){u&&"string"!==typeof a&&w.g(a,"function",se,"propertyName");this.rm=a});
- w.w(se,{YH:"isTransactionFinished"},function(){return this.Xp===ue&&("CommittedTransaction"===this.rm||"FinishedUndo"===this.rm||"FinishedRedo"===this.rm)});w.defineProperty(se,{object:"object"},function(){return this.tr},function(a){this.tr=a});w.defineProperty(se,{oldValue:"oldValue"},function(){return this.vr},function(a){this.vr=a});w.defineProperty(se,{Kg:"oldParam"},function(){return this.ur},function(a){this.ur=a});
- w.defineProperty(se,{newValue:"newValue"},function(){return this.qr},function(a){this.qr=a});w.defineProperty(se,{Ig:"newParam"},function(){return this.pr},function(a){this.pr=a});
- function M(a){1<arguments.length&&w.l("Model constructor can only take one optional argument, the Array of node data.");w.mc(this);this.Xx=this.cc="";this.Ok=!1;this.Hy={};this.vf=[];this.Ac=new ta(null,Object);this.nm="key";this.ru=this.av=null;this.Px=this.Qx=!1;this.rr="category";this.ig=new ta(null,L);this.Aj=null;this.Ei=!1;this.fz=null;this.na=new xe;void 0!==a&&(this.rh=a)}w.la("Model",M);M.prototype.clear=M.prototype.clear=function(){this.vf=[];this.Ac.clear();this.ig.clear();this.na.clear()};
- f=M.prototype;f.Vt=function(){var a="";""!==this.name&&(a+=',\n "name": '+this.quote(this.name));""!==this.ll&&(a+=',\n "dataFormat": '+this.quote(this.ll));this.xb&&(a+=',\n "isReadOnly": '+this.xb);"key"!==this.ik&&"string"===typeof this.ik&&(a+=',\n "nodeKeyProperty": '+this.quote(this.ik));this.wz&&(a+=',\n "copiesArrays": true');this.vz&&(a+=',\n "copiesArrayObjects": true');"category"!==this.en&&"string"===typeof this.en&&(a+=',\n "nodeCategoryProperty": '+this.quote(this.en));return a};
- f.PA=function(){var a="",b=this.st,c=!1,d;for(d in b)if(!ye(d,b[d])){c=!0;break}c&&(a=',\n "modelData": '+ze(this,b));return a+',\n "nodeDataArray": '+Ae(this,this.rh,!0)};f.zt=function(a){a.name&&(this.name=a.name);a.dataFormat&&(this.ll=a.dataFormat);a.isReadOnly&&(this.xb=a.isReadOnly);a.nodeKeyProperty&&(this.ik=a.nodeKeyProperty);a.copiesArrays&&(this.wz=a.copiesArrays);a.copiesArrayObjects&&(this.vz=a.copiesArrayObjects);a.nodeCategoryProperty&&(this.en=a.nodeCategoryProperty)};
- f.qA=function(a){var b=a.modelData;w.$a(b)&&(this.Ct(b),this.st=b);a=a.nodeDataArray;w.isArray(a)&&(this.Ct(a),this.rh=a)};f.toString=function(a){void 0===a&&(a=0);if(1<a)return this.JA();var b=(""!==this.name?this.name:"")+" Model";if(0<a){b+="\n node data:";a=this.rh;for(var c=w.tb(a),d=0;d<c;d++)var e=w.ob(a,d),b=b+(" "+this.Db(e)+":"+ka(e))}return b};
- M.prototype.toJson=M.prototype.toJSON=M.prototype.JA=function(a){void 0===a&&(a=this.constructor===M?"go.Model":this.constructor===X?"go.GraphLinksModel":this.constructor===Be?"go.TreeModel":w.Fg(this));return'{ "class": '+this.quote(a)+this.Vt()+this.PA()+"}"};
- M.fromJson=M.fromJSON=function(a,b){void 0===b&&(b=null);null!==b&&w.k(b,M,M,"fromJson:model");var c=null;if("string"===typeof a)if(window.JSON&&window.JSON.parse)try{c=window.JSON.parse(a)}catch(d){u&&w.trace("JSON.parse error: "+d.toString())}else w.trace("WARNING: no JSON.parse available");else"object"===typeof a?c=a:w.l("Unable to construct a Model from: "+a);if(null===b){var e;e=null;var g=c["class"];if("string"===typeof g)try{var h=null;0===g.indexOf("go.")?(g=g.substr(3),h=ba[g]):(h=ba[g],
- void 0===h&&(h=window[g]));"function"===typeof h&&(e=new h)}catch(k){}null===e||e instanceof M?b=e:w.l("Unable to construct a Model of declared class: "+c["class"])}null===b&&(b=new X);b.zt(c);b.qA(c);return b};
- M.prototype.replaceJsonObjects=M.prototype.Ct=function(a){if(w.isArray(a))for(var b=w.tb(a),c=0;c<b;c++){var d=w.ob(a,c);w.$a(d)&&w.qD(a,c,this.Ct(d))}else if(w.$a(a)){for(c in a)if(d=a[c],w.$a(d)&&(d=this.Ct(d),a[c]=d,"points"===c&&Array.isArray(d))){for(var e=0===d.length%2,g=0;g<d.length;g++)if("number"!==typeof d[g]){e=!1;break}if(e){e=new K(I);for(g=0;g<d.length/2;g++){var h=new I(d[2*g],d[2*g+1]);e.add(h)}e.freeze();a[c]=e}}if("object"===typeof a){c=a;d=a["class"];if("NaN"===d)c=NaN;else if("Date"===
- d)c=new Date(a.value);else if("go.Point"===d)c=new I(Oe(a.x),Oe(a.y));else if("go.Size"===d)c=new pa(Oe(a.width),Oe(a.height));else if("go.Rect"===d)c=new x(Oe(a.x),Oe(a.y),Oe(a.width),Oe(a.height));else if("go.Margin"===d)c=new vb(Oe(a.top),Oe(a.right),Oe(a.bottom),Oe(a.left));else if("go.Spot"===d)c="string"===typeof a["enum"]?Ob(a["enum"]):new Q(Oe(a.x),Oe(a.y),Oe(a.offsetX),Oe(a.offsetY));else if("go.Brush"===d){if(c=new oa,c.type=Ma(oa,a.type),"string"===typeof a.color&&(c.color=a.color),a.start instanceof
- Q&&(c.start=a.start),a.end instanceof Q&&(c.end=a.end),"number"===typeof a.startRadius&&(c.Ot=Oe(a.startRadius)),"number"===typeof a.endRadius&&(c.Qs=Oe(a.endRadius)),a=a.colorStops,w.$a(a))for(b in a)c.addColorStop(parseFloat(b),a[b])}else"go.Geometry"===d&&(b=null,b="string"===typeof a.path?Dd(a.path):new sd,b.type=Ma(sd,a.type),"number"===typeof a.startX&&(b.Aa=Oe(a.startX)),"number"===typeof a.startY&&(b.Ba=Oe(a.startY)),"number"===typeof a.endX&&(b.H=Oe(a.endX)),"number"===typeof a.endY&&(b.I=
- Oe(a.endY)),a.spot1 instanceof Q&&(b.C=a.spot1),a.spot2 instanceof Q&&(b.D=a.spot2),c=b);a=c}}return a};M.prototype.quote=function(a){for(var b="",c=a.length,d=0;d<c;d++)var e=a[d],b='"'===e||"\\"===e?b+("\\"+e):"\b"===e?b+"\\b":"\f"===e?b+"\\f":"\n"===e?b+"\\n":"\r"===e?b+"\\r":"\t"===e?b+"\\t":b+e;return'"'+b+'"'};
- M.prototype.writeJsonValue=M.prototype.Wt=function(a){return void 0===a?"undefined":null===a?"null":!0===a?"true":!1===a?"false":"string"===typeof a?this.quote(a):"number"===typeof a?Infinity===a?"9e9999":-Infinity===a?"-9e9999":isNaN(a)?'{"class":"NaN"}':a.toString():a instanceof Date?'{"class":"Date", "value":"'+a.toJSON()+'"}':a instanceof Number?this.Wt(a.valueOf()):w.isArray(a)?Ae(this,a):w.$a(a)?ze(this,a):"function"===typeof a?"null":a.toString()};
- function Ae(a,b,c){void 0===c&&(c=!1);var d=w.tb(b);if(0>=d)return"[]";var e=new Ja;e.add("[ ");c&&1<d&&e.add("\n");for(var g=0;g<d;g++){var h=w.ob(b,g);void 0!==h&&(0<g&&(e.add(","),c&&e.add("\n")),e.add(a.Wt(h)))}c&&1<d&&e.add("\n");e.add(" ]");return e.toString()}function ye(a,b){return void 0===b||"__gohashid"===a||"_"===a[0]||"function"===typeof b?!0:!1}function Pe(a){return isNaN(a)?"NaN":Infinity===a?"9e9999":-Infinity===a?"-9e9999":a}
- function ze(a,b){var c=b;if(c instanceof I){var d=c;b={"class":"go.Point",x:Pe(d.x),y:Pe(d.y)}}else if(c instanceof pa){var e=c;b={"class":"go.Size",width:Pe(e.width),height:Pe(e.height)}}else if(c instanceof x)b={"class":"go.Rect",x:Pe(c.x),y:Pe(c.y),width:Pe(c.width),height:Pe(c.height)};else if(c instanceof vb)b={"class":"go.Margin",top:Pe(c.top),right:Pe(c.right),bottom:Pe(c.bottom),left:Pe(c.left)};else if(c instanceof Q)e=c,b=e.rd()?{"class":"go.Spot",x:Pe(e.x),y:Pe(e.y),offsetX:Pe(e.offsetX),
- offsetY:Pe(e.offsetY)}:{"class":"go.Spot","enum":e.toString()};else if(c instanceof oa){b={"class":"go.Brush",type:c.type.name};if(c.type===Qe)b.color=c.color;else if(c.type===Re||c.type===Se)b.start=c.start,b.end=c.end,c.type===Se&&(0!==c.Ot&&(b.startRadius=Pe(c.Ot)),isNaN(c.Qs)||(b.endRadius=Pe(c.Qs)));if(null!==c.Ks){for(var g={},h=c.Ks.j;h.next();)g[h.key]=h.value;b.colorStops=g}}else if(c instanceof sd)b={"class":"go.Geometry",type:c.type.name},0!==c.Aa&&(b.startX=Pe(c.Aa)),0!==c.Ba&&(b.startY=
- Pe(c.Ba)),0!==c.H&&(b.endX=Pe(c.H)),0!==c.I&&(b.endY=Pe(c.I)),c.C.N(Xb)||(b.spot1=c.C),c.D.N(jc)||(b.spot2=c.D),c.type===td&&(b.path=Bd(c));else if(c instanceof V||c instanceof z||c instanceof Te||c instanceof M||c instanceof Ue||c instanceof za||c instanceof Ve||c instanceof Da||c instanceof xe||c instanceof We)return w.trace("ERROR: trying to convert a GraphObject or Diagram or Model or Tool or Layout or UndoManager into JSON text: "+c.toString()),"{}";g="{";c=!0;for(d in b)if(e=w.yb(b,d),!ye(d,
- e))if(c?c=!1:g+=", ",g+='"'+d+'":',"points"===d&&e instanceof K&&e.ia===I){h=e;e="[";for(h=h.j;h.next();){var k=h.value;1<e.length&&(e+=",");e+=a.Wt(k.x);e+=",";e+=a.Wt(k.y)}e+="]";g+=e}else g+=a.Wt(e);return g+"}"}function Oe(a){return"number"===typeof a?a:"NaN"===a?NaN:"9e9999"===a?Infinity:"-9e9999"===a?-Infinity:parseFloat(a)}w.defineProperty(M,{name:"name"},function(){return this.cc},function(a){var b=this.cc;b!==a&&(w.g(a,"string",M,"name"),this.cc=a,this.i("name",b,a))});
- w.defineProperty(M,{ll:"dataFormat"},function(){return this.Xx},function(a){var b=this.Xx;b!==a&&(w.g(a,"string",M,"dataFormat"),this.Xx=a,this.i("dataFormat",b,a))});w.defineProperty(M,{xb:"isReadOnly"},function(){return this.Ok},function(a){var b=this.Ok;b!==a&&(w.g(a,"boolean",M,"isReadOnly"),this.Ok=a,this.i("isReadOnly",b,a))});w.defineProperty(M,{st:"modelData"},function(){return this.Hy},function(a){var b=this.Hy;b!==a&&(w.g(a,"object",M,"modelData"),this.Hy=a,this.i("modelData",b,a),this.Wb(a))});
- M.prototype.addChangedListener=M.prototype.iz=function(a){w.g(a,"function",M,"addChangedListener:listener");null===this.Aj&&(this.Aj=new K("function"));this.Aj.add(a)};M.prototype.removeChangedListener=M.prototype.sA=function(a){w.g(a,"function",M,"removeChangedListener:listener");null!==this.Aj&&(this.Aj.remove(a),0===this.Aj.count&&(this.Aj=null))};
- M.prototype.fw=function(a){this.mb||this.na.lE(a);if(null!==this.Aj){var b=this.Aj,c=b.length;if(1===c)b=b.ma(0),b(a);else if(0!==c)for(var d=b.Te(),e=0;e<c;e++)b=d[e],b(a)}};M.prototype.raiseChangedEvent=M.prototype.Lc=function(a,b,c,d,e,g,h){Xe(this,"",a,b,c,d,e,g,h)};M.prototype.raiseChanged=M.prototype.i=function(a,b,c,d,e){Xe(this,"",te,a,this,b,c,d,e)};M.prototype.raiseDataChanged=M.prototype.pA=function(a,b,c,d,e,g){Xe(this,"",te,b,a,c,d,e,g)};
- function Xe(a,b,c,d,e,g,h,k,l){void 0===k&&(k=null);void 0===l&&(l=null);var m=new se;m.ha=a;m.Pd=c;m.Xf=b;m.propertyName=d;m.object=e;m.oldValue=g;m.Kg=k;m.newValue=h;m.Ig=l;a.fw(m)}w.defineProperty(M,{na:"undoManager"},function(){return this.fz},function(a){var b=this.fz;b!==a&&(w.k(a,xe,M,"undoManager"),null!==b&&b.II(this),this.fz=a,null!==a&&a.zG(this))});w.defineProperty(M,{mb:"skipsUndoManager"},function(){return this.Ei},function(a){w.g(a,"boolean",M,"skipsUndoManager");this.Ei=a});
- M.prototype.Lm=function(a,b){if(null!==a&&a.ha===this)if(a.Pd===te){var c=a.object,d=a.propertyName,e=a.za(b);w.Wa(c,d,e)}else a.Pd===ve?"nodeDataArray"===a.Xf?(c=a.newValue,w.$a(c)&&(d=this.Db(c),void 0!==d&&(b?(w.Oi(this.vf,a.Ig),this.Ac.remove(d)):(w.Ni(this.vf,a.Ig,c),this.Ac.add(d,c))))):""===a.Xf?(c=a.object,!w.isArray(c)&&a.propertyName&&(c=w.yb(a.object,a.propertyName)),w.isArray(c)&&(d=a.newValue,e=a.Ig,b?w.Oi(c,e):w.Ni(c,e,d))):w.l("unknown ChangedEvent.Insert object: "+a.toString()):a.Pd===
- we?"nodeDataArray"===a.Xf?(c=a.oldValue,w.$a(c)&&(d=this.Db(c),void 0!==d&&(b?(w.Ni(this.vf,a.Kg,c),this.Ac.add(d,c)):(w.Oi(this.vf,a.Kg),this.Ac.remove(d))))):""===a.Xf?(c=a.object,!w.isArray(c)&&a.propertyName&&(c=w.yb(a.object,a.propertyName)),w.isArray(c)&&(d=a.oldValue,e=a.Kg,b?w.Ni(c,e,d):w.Oi(c,e))):w.l("unknown ChangedEvent.Remove object: "+a.toString()):a.Pd!==ue&&w.l("unknown ChangedEvent: "+a.toString())};M.prototype.startTransaction=M.prototype.ec=function(a){return this.na.ec(a)};
- M.prototype.commitTransaction=M.prototype.fe=function(a){return this.na.fe(a)};M.prototype.rollbackTransaction=M.prototype.yp=function(){return this.na.yp()};M.prototype.updateTargetBindings=M.prototype.Wb=function(a,b){void 0===b&&(b="");Xe(this,"SourceChanged",ue,b,a,null,null)};
- w.defineProperty(M,{ik:"nodeKeyProperty"},function(){return this.nm},function(a){var b=this.nm;b!==a&&(Ye(a,M,"nodeKeyProperty"),0<this.Ac.count&&w.l("Cannot set Model.nodeKeyProperty when there is existing node data"),this.nm=a,this.i("nodeKeyProperty",b,a))});function Ye(a,b,c){"string"!==typeof a&&"function"!==typeof a&&w.tc(a,"string or function",b,c)}
- M.prototype.getKeyForNodeData=M.prototype.Db=function(a){if(null!==a){var b=this.nm;if(""!==b&&(b=w.yb(a,b),void 0!==b)){if(Ze(b))return b;w.l("Key value for node data "+a+" is not a number or a string: "+b)}}};
- M.prototype.setKeyForNodeData=M.prototype.AA=function(a,b){void 0!==b&&null!==b&&Ze(b)||w.tc(b,"number or string",M,"setKeyForNodeData:key");if(null!==a){var c=this.nm;if(""!==c)if(this.se(a)){var d=w.yb(a,c);d!==b&&null===this.yf(b)&&(w.Wa(a,c,b),this.Ac.remove(d),this.Ac.add(b,a),Xe(this,"nodeKey",te,c,a,d,b),"string"===typeof c&&this.Wb(a,c),this.Bt(d,b))}else w.Wa(a,c,b)}};
- w.defineProperty(M,{FK:"makeUniqueKeyFunction"},function(){return this.av},function(a){var b=this.av;b!==a&&(null!==a&&w.g(a,"function",M,"makeUniqueKeyFunction"),this.av=a,this.i("makeUniqueKeyFunction",b,a))});function Ze(a){return"number"===typeof a||"string"===typeof a}M.prototype.containsNodeData=M.prototype.se=function(a){a=this.Db(a);return void 0===a?!1:this.Ac.contains(a)};
- M.prototype.findNodeDataForKey=M.prototype.yf=function(a){null===a&&w.l("Model.findNodeDataForKey:key must not be null");return void 0!==a&&Ze(a)?this.Ac.za(a):null};
- w.defineProperty(M,{rh:"nodeDataArray"},function(){return this.vf},function(a){var b=this.vf;if(b!==a){w.Fs(a,M,"nodeDataArray");this.Ac.clear();this.MA();for(var c=w.tb(a),d=0;d<c;d++){var e=w.ob(a,d);if(!w.$a(e)){w.l("Model.nodeDataArray must only contain Objects, not: "+e);return}w.bt(e)}this.vf=a;for(var g=new K(Object),d=0;d<c;d++){var e=w.ob(a,d),h=this.Db(e);void 0===h?g.add(e):null!==this.Ac.za(h)?g.add(e):this.Ac.add(h,e)}for(d=g.j;d.next();)e=d.value,this.CE(e),g=this.Db(e),void 0!==g&&
- this.Ac.add(g,e);Xe(this,"nodeDataArray",te,"nodeDataArray",this,b,a);for(d=0;d<c;d++)e=w.ob(a,d),this.xp(e),this.wp(e);this.xD();w.UH(a)||(this.xb=!0)}});
- M.prototype.makeNodeDataKeyUnique=M.prototype.CE=function(a){if(null!==a){var b=this.nm;if(""!==b){var c=this.Db(a);if(void 0===c||this.Ac.contains(c)){var d=this.av;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.Ac.contains(c))){w.Wa(a,b,c);return}if("string"===typeof c){for(d=2;this.Ac.contains(c+d);)d++;w.Wa(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(d=-this.Ac.count-1;this.Ac.contains(d);)d--;w.Wa(a,b,d)}else w.l("Model.getKeyForNodeData returned something other than a string or a number: "+
- c)}}}};M.prototype.addNodeData=M.prototype.Hm=function(a){if(null!==a){w.bt(a);var b=this.Db(a);if(void 0===b||this.Ac.za(b)!==a)this.CE(a),b=this.Db(a),void 0===b?w.l("Model.makeNodeDataKeyUnique failed on "+a+". Data not added to Model."):(this.Ac.add(b,a),b=w.tb(this.vf),w.Ni(this.vf,b,a),Xe(this,"nodeDataArray",ve,"nodeDataArray",this,null,a,null,b),this.xp(a),this.wp(a))}};
- M.prototype.addNodeDataCollection=function(a){if(w.isArray(a))for(var b=w.tb(a),c=0;c<b;c++)this.Hm(w.ob(a,c));else for(a=a.j;a.next();)this.Hm(a.value)};M.prototype.removeNodeData=M.prototype.uA=function(a){if(null!==a){var b=this.Db(a);void 0!==b&&this.Ac.contains(b)&&(this.Ac.remove(b),b=w.oz(this.vf,a),0>b||(w.Oi(this.vf,b),Xe(this,"nodeDataArray",we,"nodeDataArray",this,a,null,b,null),this.Ut(a)))}};
- M.prototype.removeNodeDataCollection=function(a){if(w.isArray(a))for(var b=w.tb(a),c=0;c<b;c++)this.uA(w.ob(a,c));else for(a=a.j;a.next();)this.uA(a.value)};f=M.prototype;f.Bt=function(a,b){var c=$e(this,a);c instanceof L&&this.ig.add(b,c)};f.MA=function(){};f.xp=function(){};f.wp=function(){};f.Ut=function(){};function af(a,b,c){if(void 0!==b){var d=a.ig.za(b);null===d&&(d=new L(Object),a.ig.add(b,d));d.add(c)}}
- function gf(a,b,c){if(void 0!==b){var d=a.ig.za(b);d instanceof L&&(void 0===c||null===c?a.ig.remove(b):(d.remove(c),0===d.count&&a.ig.remove(b)))}}function $e(a,b){if(void 0===b)return null;var c=a.ig.za(b);return c instanceof L?c:null}M.prototype.clearUnresolvedReferences=M.prototype.xD=function(a){void 0===a?this.ig.clear():this.ig.remove(a)};
- w.defineProperty(M,{RJ:"copyNodeDataFunction"},function(){return this.ru},function(a){var b=this.ru;b!==a&&(null!==a&&w.g(a,"function",M,"copyNodeDataFunction"),this.ru=a,this.i("copyNodeDataFunction",b,a))});w.defineProperty(M,{wz:"copiesArrays"},function(){return this.Qx},function(a){var b=this.Qx;b!==a&&(null!==a&&w.g(a,"boolean",M,"copiesArrays"),this.Qx=a,this.i("copiesArrays",b,a))});
- w.defineProperty(M,{vz:"copiesArrayObjects"},function(){return this.Px},function(a){var b=this.Px;b!==a&&(null!==a&&w.g(a,"boolean",M,"copiesArrayObjects"),this.Px=a,this.i("copiesArrayObjects",b,a))});M.prototype.copyNodeData=function(a){if(null===a)return null;var b=null,b=this.ru,b=null!==b?b(a,this):hf(this,a,!0);w.$a(b)&&w.mc(b);return b};
- function hf(a,b,c){if(a.wz&&Array.isArray(b)){var d=[];for(c=0;c<b.length;c++){var e=hf(a,b[c],a.vz);d.push(e)}w.mc(d);return d}if(c&&w.$a(b)){c=(c=b.constructor)?new c:{};for(d in b)"__gohashid"!==d&&(e=w.yb(b,d),jf(b,d,e)||(e=hf(a,e,!1)),w.Wa(c,d,e));w.mc(c);return c}return b}
- function jf(a,b,c){return c instanceof V||c instanceof z||c instanceof Te||c instanceof kf||c instanceof lf||c instanceof Ue||c instanceof za||c instanceof Ve||c instanceof he||c instanceof ie?("_"!==b[0]&&w.trace('Warning: found GraphObject or Diagram reference when copying model data on property "'+b+'" of data object: '+a.toString()+" \nModel data should not have any references to a Diagram or any part of a diagram, such as: "+c.toString()),!0):c instanceof M||c instanceof xe||c instanceof We||
- c instanceof se?!0:!1}var mf=!1;
- M.prototype.setDataProperty=function(a,b,c){u&&(w.g(a,"object",M,"setDataProperty:data"),w.g(b,"string",M,"setDataProperty:propname"),""===b&&w.l("Model.setDataProperty: property name must not be an empty string when setting "+a+" to "+c));if(this.se(a))if(b===this.ik)this.AA(a,c);else{if(b===this.en){this.gx(a,c);return}}else!mf&&a instanceof V&&(mf=!0,w.trace('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),w.trace(" Is that really your intent?"));var d=w.yb(a,b);d!==c&&
- (w.Wa(a,b,c),this.pA(a,b,d,c))};M.prototype.addArrayItem=function(a,b){this.PH(a,-1,b)};M.prototype.insertArrayItem=M.prototype.PH=function(a,b,c){u&&(w.Fs(a,M,"insertArrayItem:arr"),w.o(b,M,"insertArrayItem:idx"));a===this.vf&&w.l("Model.insertArrayItem or Model.addArrayItem should not be called on the Model.nodeDataArray");0>b&&(b=w.tb(a));w.Ni(a,b,c);Xe(this,"",ve,"",a,null,c,null,b)};
- M.prototype.removeArrayItem=function(a,b){void 0===b&&(b=-1);u&&(w.Fs(a,M,"removeArrayItem:arr"),w.o(b,M,"removeArrayItem:idx"));a===this.vf&&w.l("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=w.tb(a)-1);var c=w.ob(a,b);w.Oi(a,b);Xe(this,"",we,"",a,c,null,b,null)};w.defineProperty(M,{en:"nodeCategoryProperty"},function(){return this.rr},function(a){var b=this.rr;b!==a&&(Ye(a,M,"nodeCategoryProperty"),this.rr=a,this.i("nodeCategoryProperty",b,a))});
- M.prototype.getCategoryForNodeData=M.prototype.Hz=function(a){if(null===a)return"";var b=this.rr;if(""===b)return"";b=w.yb(a,b);if(void 0===b)return"";if("string"===typeof b)return b;w.l("getCategoryForNodeData found a non-string category for "+a+": "+b);return""};
- M.prototype.setCategoryForNodeData=M.prototype.gx=function(a,b){w.g(b,"string",M,"setCategoryForNodeData:cat");if(null!==a){var c=this.rr;if(""!==c)if(this.se(a)){var d=w.yb(a,c);void 0===d&&(d="");d!==b&&(w.Wa(a,c,b),Xe(this,"nodeCategory",te,c,a,d,b))}else w.Wa(a,c,b)}};
- function X(a,b){2<arguments.length&&w.l("GraphLinksModel constructor can only take two optional arguments, the Array of node data and the Array of link data.");M.call(this);this.Qh=[];this.km=new L(Object);this.Bk=this.qu=null;this.wj="from";this.zj="to";this.Xq=this.Wq="";this.Tq="category";this.Rh="";this.kv="isGroup";this.Gj="group";this.Rx=!1;void 0!==a&&(this.rh=a);void 0!==b&&(this.hk=b)}w.Pa(X,M);w.la("GraphLinksModel",X);
- X.prototype.clear=X.prototype.clear=function(){M.prototype.clear.call(this);this.Qh=[];this.km.clear()};f=X.prototype;f.toString=function(a){void 0===a&&(a=0);if(2<=a)return this.JA();var b=(""!==this.name?this.name:"")+" GraphLinksModel";if(0<a){b+="\n node data:";a=this.rh;for(var c=w.tb(a),d=0,d=0;d<c;d++)var e=w.ob(a,d),b=b+(" "+this.Db(e)+":"+ka(e));b+="\n link data:";a=this.hk;c=w.tb(a);for(d=0;d<c;d++)e=w.ob(a,d),b+=" "+this.ul(e)+"--\x3e"+this.xl(e)}return b};
- f.Vt=function(){var a=M.prototype.Vt.call(this),b="";"category"!==this.mt&&"string"===typeof this.mt&&(b+=',\n "linkCategoryProperty": '+this.quote(this.mt));"from"!==this.gp&&"string"===typeof this.gp&&(b+=',\n "linkFromKeyProperty": '+this.quote(this.gp));"to"!==this.ip&&"string"===typeof this.ip&&(b+=',\n "linkToKeyProperty": '+this.quote(this.ip));""!==this.nt&&"string"===typeof this.nt&&(b+=',\n "linkFromPortIdProperty": '+this.quote(this.nt));""!==this.pt&&"string"===typeof this.pt&&(b+=
- ',\n "linkToPortIdProperty": '+this.quote(this.pt));""!==this.ot&&"string"===typeof this.ot&&(b+=',\n "linkLabelKeysProperty": '+this.quote(this.ot));"isGroup"!==this.vt&&"string"===typeof this.vt&&(b+=',\n "nodeIsGroupProperty": '+this.quote(this.vt));"group"!==this.rp&&"string"===typeof this.rp&&(b+=',\n "nodeGroupKeyProperty": '+this.quote(this.rp));return a+b};f.PA=function(){var a=M.prototype.PA.call(this),b=',\n "linkDataArray": '+Ae(this,this.hk,!0);return a+b};
- f.zt=function(a){M.prototype.zt.call(this,a);a.linkFromKeyProperty&&(this.gp=a.linkFromKeyProperty);a.linkToKeyProperty&&(this.ip=a.linkToKeyProperty);a.linkFromPortIdProperty&&(this.nt=a.linkFromPortIdProperty);a.linkToPortIdProperty&&(this.pt=a.linkToPortIdProperty);a.linkCategoryProperty&&(this.mt=a.linkCategoryProperty);a.linkLabelKeysProperty&&(this.ot=a.linkLabelKeysProperty);a.nodeIsGroupProperty&&(this.vt=a.nodeIsGroupProperty);a.nodeGroupKeyProperty&&(this.rp=a.nodeGroupKeyProperty)};
- f.qA=function(a){M.prototype.qA.call(this,a);a=a.linkDataArray;w.isArray(a)&&(this.Ct(a),this.hk=a)};f.Lm=function(a,b){var c=null;if(a.Pd===ve){if("linkDataArray"===a.Xf?c=this.Qh:"linkLabelKeys"===a.Xf&&(c=this.fk(a.object)),w.isArray(c)){b?w.Oi(c,a.Ig):w.Ni(c,a.Ig,a.newValue);return}}else if(a.Pd===we&&("linkDataArray"===a.Xf?c=this.Qh:"linkLabelKeys"===a.Xf&&(c=this.fk(a.object)),w.isArray(c))){b?w.Ni(c,a.Kg,a.oldValue):w.Oi(c,a.Kg);return}M.prototype.Lm.call(this,a,b)};
- w.defineProperty(X,{nz:"archetypeNodeData"},function(){return this.Bk},function(a){var b=this.Bk;b!==a&&(null!==a&&w.k(a,Object,X,"archetypeNodeData"),this.Bk=a,this.i("archetypeNodeData",b,a))});X.prototype.cn=function(a){if(void 0!==a){var b=this.Bk;if(null!==b){var c=this.yf(a);null===c&&(c=this.copyNodeData(b),w.Wa(c,this.nm,a),this.Hm(c))}return a}};
- w.defineProperty(X,{gp:"linkFromKeyProperty"},function(){return this.wj},function(a){var b=this.wj;b!==a&&(Ye(a,X,"linkFromKeyProperty"),this.wj=a,this.i("linkFromKeyProperty",b,a))});X.prototype.getFromKeyForLinkData=X.prototype.ul=function(a){if(null!==a){var b=this.wj;if(""!==b&&(b=w.yb(a,b),void 0!==b)){if(Ze(b))return b;w.l("FromKey value for link data "+a+" is not a number or a string: "+b)}}};
- X.prototype.setFromKeyForLinkData=X.prototype.hx=function(a,b){null===b&&(b=void 0);void 0===b||Ze(b)||w.tc(b,"number or string",X,"setFromKeyForLinkData:key");if(null!==a){var c=this.wj;if(""!==c)if(b=this.cn(b),this.Si(a)){var d=w.yb(a,c);d!==b&&(gf(this,d,a),w.Wa(a,c,b),null===this.yf(b)&&af(this,b,a),Xe(this,"linkFromKey",te,c,a,d,b),"string"===typeof c&&this.Wb(a,c))}else w.Wa(a,c,b)}};
- w.defineProperty(X,{ip:"linkToKeyProperty"},function(){return this.zj},function(a){var b=this.zj;b!==a&&(Ye(a,X,"linkToKeyProperty"),this.zj=a,this.i("linkToKeyProperty",b,a))});X.prototype.getToKeyForLinkData=X.prototype.xl=function(a){if(null!==a){var b=this.zj;if(""!==b&&(b=w.yb(a,b),void 0!==b)){if(Ze(b))return b;w.l("ToKey value for link data "+a+" is not a number or a string: "+b)}}};
- X.prototype.setToKeyForLinkData=X.prototype.jx=function(a,b){null===b&&(b=void 0);void 0===b||Ze(b)||w.tc(b,"number or string",X,"setToKeyForLinkData:key");if(null!==a){var c=this.zj;if(""!==c)if(b=this.cn(b),this.Si(a)){var d=w.yb(a,c);d!==b&&(gf(this,d,a),w.Wa(a,c,b),null===this.yf(b)&&af(this,b,a),Xe(this,"linkToKey",te,c,a,d,b),"string"===typeof c&&this.Wb(a,c))}else w.Wa(a,c,b)}};
- w.defineProperty(X,{nt:"linkFromPortIdProperty"},function(){return this.Wq},function(a){var b=this.Wq;b!==a&&(Ye(a,X,"linkFromPortIdProperty"),this.Wq=a,this.i("linkFromPortIdProperty",b,a))});X.prototype.getFromPortIdForLinkData=X.prototype.yH=function(a){if(null===a)return"";var b=this.Wq;if(""===b)return"";a=w.yb(a,b);return void 0===a?"":a};
- X.prototype.setFromPortIdForLinkData=X.prototype.zA=function(a,b){w.g(b,"string",X,"setFromPortIdForLinkData:portname");if(null!==a){var c=this.Wq;if(""!==c)if(this.Si(a)){var d=w.yb(a,c);void 0===d&&(d="");d!==b&&(w.Wa(a,c,b),Xe(this,"linkFromPortId",te,c,a,d,b),"string"===typeof c&&this.Wb(a,c))}else w.Wa(a,c,b)}};w.defineProperty(X,{pt:"linkToPortIdProperty"},function(){return this.Xq},function(a){var b=this.Xq;b!==a&&(Ye(a,X,"linkToPortIdProperty"),this.Xq=a,this.i("linkToPortIdProperty",b,a))});
- X.prototype.getToPortIdForLinkData=X.prototype.BH=function(a){if(null===a)return"";var b=this.Xq;if(""===b)return"";a=w.yb(a,b);return void 0===a?"":a};X.prototype.setToPortIdForLinkData=X.prototype.DA=function(a,b){w.g(b,"string",X,"setToPortIdForLinkData:portname");if(null!==a){var c=this.Xq;if(""!==c)if(this.Si(a)){var d=w.yb(a,c);void 0===d&&(d="");d!==b&&(w.Wa(a,c,b),Xe(this,"linkToPortId",te,c,a,d,b),"string"===typeof c&&this.Wb(a,c))}else w.Wa(a,c,b)}};
- w.defineProperty(X,{ot:"linkLabelKeysProperty"},function(){return this.Rh},function(a){var b=this.Rh;b!==a&&(Ye(a,X,"linkLabelKeysProperty"),this.Rh=a,this.i("linkLabelKeysProperty",b,a))});X.prototype.getLabelKeysForLinkData=X.prototype.fk=function(a){if(null===a)return w.Ah;var b=this.Rh;if(""===b)return w.Ah;a=w.yb(a,b);return void 0===a?w.Ah:a};
- X.prototype.setLabelKeysForLinkData=X.prototype.sF=function(a,b){w.Fs(b,X,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.Rh;if(""!==c)if(this.Si(a)){var d=w.yb(a,c);void 0===d&&(d=w.Ah);if(d!==b){for(var e=w.tb(d),g=0;g<e;g++){var h=w.ob(d,g);gf(this,h,a)}w.Wa(a,c,b);e=w.tb(b);for(g=0;g<e;g++)h=w.ob(b,g),null===this.yf(h)&&af(this,h,a);Xe(this,"linkLabelKeys",te,c,a,d,b);"string"===typeof c&&this.Wb(a,c)}}else w.Wa(a,c,b)}};
- X.prototype.addLabelKeyForLinkData=X.prototype.kz=function(a,b){if(null!==b&&void 0!==b&&(Ze(b)||w.tc(b,"number or string",X,"addLabelKeyForLinkData:key"),null!==a)){var c=this.Rh;if(""!==c){var d=w.yb(a,c);void 0===d?(c=[],c.push(b),this.sF(a,c)):w.isArray(d)?0<=w.oz(d,b)||(w.Ni(d,Infinity,b),this.Si(a)&&(null===this.yf(b)&&af(this,b,a),Xe(this,"linkLabelKeys",ve,c,a,null,b))):w.l(c+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}};
- X.prototype.removeLabelKeyForLinkData=X.prototype.WE=function(a,b){if(null!==b&&void 0!==b&&(Ze(b)||w.tc(b,"number or string",X,"removeLabelKeyForLinkData:key"),null!==a)){var c=this.Rh;if(""!==c){var d=w.yb(a,c);if(w.isArray(d)){var e=w.oz(d,b);0>e||(w.Oi(d,e),this.Si(a)&&(gf(this,b,a),Xe(this,"linkLabelKeys",we,c,a,b,null)))}else void 0!==d&&w.l(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}};
- w.defineProperty(X,{hk:"linkDataArray"},function(){return this.Qh},function(a){var b=this.Qh;if(b!==a){w.Fs(a,X,"linkDataArray");for(var c=w.tb(a),d=0;d<c;d++){var e=w.ob(a,d);if(!w.$a(e)){w.l("GraphLinksModel.linkDataArray must only contain Objects, not: "+e);return}w.bt(e)}this.Qh=a;for(var g=new L(Object),d=0;d<c;d++)e=w.ob(a,d),g.add(e);this.km=g;Xe(this,"linkDataArray",te,"linkDataArray",this,b,a);for(d=0;d<c;d++)e=w.ob(a,d),nf(this,e)}});
- X.prototype.containsLinkData=X.prototype.Si=function(a){return null===a?!1:this.km.contains(a)};X.prototype.addLinkData=X.prototype.Uv=function(a){if(null!==a){if(void 0===w.ad(a))w.mc(a);else if(this.Si(a))return;this.km.add(a);var b=w.tb(this.Qh);w.Ni(this.Qh,b,a);Xe(this,"linkDataArray",ve,"linkDataArray",this,null,a,null,b);nf(this,a)}};X.prototype.addLinkDataCollection=function(a){if(w.isArray(a))for(var b=w.tb(a),c=0;c<b;c++)this.Uv(w.ob(a,c));else for(a=a.j;a.next();)this.Uv(a.value)};
- X.prototype.removeLinkData=X.prototype.tA=function(a){if(null!==a){this.km.remove(a);var b=this.Qh.indexOf(a);if(!(0>b)){w.Oi(this.Qh,b);Xe(this,"linkDataArray",we,"linkDataArray",this,a,null,b,null);b=this.ul(a);gf(this,b,a);b=this.xl(a);gf(this,b,a);var c=this.fk(a);if(w.isArray(c))for(var d=w.tb(c),e=0;e<d;e++)b=w.ob(c,e),gf(this,b,a)}}};X.prototype.removeLinkDataCollection=function(a){if(w.isArray(a))for(var b=w.tb(a),c=0;c<b;c++)this.tA(w.ob(a,c));else for(a=a.j;a.next();)this.tA(a.value)};
- function nf(a,b){var c=a.ul(b),c=a.cn(c);null===a.yf(c)&&af(a,c,b);c=a.xl(b);c=a.cn(c);null===a.yf(c)&&af(a,c,b);var d=a.fk(b);if(w.isArray(d))for(var e=w.tb(d),g=0;g<e;g++)c=w.ob(d,g),null===a.yf(c)&&af(a,c,b)}w.defineProperty(X,{QJ:"copyLinkDataFunction"},function(){return this.qu},function(a){var b=this.qu;b!==a&&(null!==a&&w.g(a,"function",X,"copyLinkDataFunction"),this.qu=a,this.i("copyLinkDataFunction",b,a))});
- X.prototype.copyLinkData=X.prototype.FD=function(a){if(null===a)return null;var b=null,b=this.qu;if(null!==b)b=b(a,this);else{var b=new a.constructor,c;for(c in a)if("__gohashid"!==c){var d=w.yb(a,c);u&&jf(a,c,d);w.Wa(b,c,d)}}null!==b&&(w.mc(b),""!==this.wj&&w.Wa(b,this.wj,void 0),""!==this.zj&&w.Wa(b,this.zj,void 0),""!==this.Rh&&w.Wa(b,this.Rh,[]));return b};
- w.defineProperty(X,{vt:"nodeIsGroupProperty"},function(){return this.kv},function(a){var b=this.kv;b!==a&&(Ye(a,X,"nodeIsGroupProperty"),this.kv=a,this.i("nodeIsGroupProperty",b,a))});X.prototype.isGroupForNodeData=X.prototype.Sz=function(a){if(null===a)return!1;var b=this.kv;return""===b?!1:w.yb(a,b)?!0:!1};w.defineProperty(X,{rp:"nodeGroupKeyProperty"},function(){return this.Gj},function(a){var b=this.Gj;b!==a&&(Ye(a,X,"nodeGroupKeyProperty"),this.Gj=a,this.i("nodeGroupKeyProperty",b,a))});
- w.defineProperty(X,{Pm:"copiesGroupKeyOfNodeData"},function(){return this.Rx},function(a){this.Rx!==a&&(w.g(a,"boolean",X,"copiesGroupKeyOfNodeData"),this.Rx=a)});X.prototype.getGroupKeyForNodeData=X.prototype.Xm=function(a){if(null!==a){var b=this.Gj;if(""!==b&&(b=w.yb(a,b),void 0!==b)){if(Ze(b))return b;w.l("GroupKey value for node data "+a+" is not a number or a string: "+b)}}};
- X.prototype.setGroupKeyForNodeData=X.prototype.ix=function(a,b){null===b&&(b=void 0);void 0===b||Ze(b)||w.tc(b,"number or string",X,"setGroupKeyForNodeData:key");if(null!==a){var c=this.Gj;if(""!==c)if(this.se(a)){var d=w.yb(a,c);d!==b&&(gf(this,d,a),w.Wa(a,c,b),null===this.yf(b)&&af(this,b,a),Xe(this,"nodeGroupKey",te,c,a,d,b),"string"===typeof c&&this.Wb(a,c))}else w.Wa(a,c,b)}};
- X.prototype.copyNodeData=function(a){if(null===a)return null;a=M.prototype.copyNodeData.call(this,a);this.Pm||""===this.Gj||w.Wa(a,this.Gj,void 0);return a};
- X.prototype.setDataProperty=function(a,b,c){u&&(w.g(a,"object",X,"setDataProperty:data"),w.g(b,"string",X,"setDataProperty:propname"),""===b&&w.l("GraphLinksModel.setDataProperty: property name must not be an empty string when setting "+a+" to "+c));if(this.se(a))if(b===this.ik)this.AA(a,c);else{if(b===this.en){this.gx(a,c);return}if(b===this.rp){this.ix(a,c);return}b===this.vt&&w.l("GraphLinksModel.setDataProperty: property name must not be the nodeIsGroupProperty: "+b)}else if(this.Si(a)){if(b===
- this.gp){this.hx(a,c);return}if(b===this.ip){this.jx(a,c);return}if(b===this.nt){this.zA(a,c);return}if(b===this.pt){this.DA(a,c);return}if(b===this.mt){this.rF(a,c);return}if(b===this.ot){this.sF(a,c);return}}else!mf&&a instanceof V&&(mf=!0,w.trace('GraphLinksModel.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),w.trace(" Is that really your intent?"));var d=w.yb(a,b);d!==c&&(w.Wa(a,b,c),this.pA(a,b,d,c))};f=X.prototype;
- f.Bt=function(a,b){M.prototype.Bt.call(this,a,b);for(var c=this.Ac.j;c.next();)this.wA(c.value,a,b);for(var d=this.km.j;d.next();){var e=c.value,g=a,h=b;if(this.ul(e)===g){var k=this.wj;w.Wa(e,k,h);Xe(this,"linkFromKey",te,k,e,g,h);"string"===typeof k&&this.Wb(e,k)}this.xl(e)===g&&(k=this.zj,w.Wa(e,k,h),Xe(this,"linkToKey",te,k,e,g,h),"string"===typeof k&&this.Wb(e,k));var l=this.fk(e);if(w.isArray(l))for(var m=w.tb(l),k=this.Rh,n=0;n<m;n++)w.ob(l,n)===g&&(w.qD(l,n,h),Xe(this,"linkLabelKeys",ve,k,
- e,g,h))}};f.wA=function(a,b,c){if(this.Xm(a)===b){var d=this.Gj;w.Wa(a,d,c);Xe(this,"nodeGroupKey",te,d,a,b,c);"string"===typeof d&&this.Wb(a,d)}};f.MA=function(){M.prototype.MA.call(this);for(var a=this.hk,b=w.tb(a),c=0;c<b;c++){var d=w.ob(a,c);nf(this,d)}};
- f.xp=function(a){M.prototype.xp.call(this,a);a=this.Db(a);var b=$e(this,a);if(null!==b){for(var c=new K(Object),b=b.j;b.next();){var d=b.value;if(this.se(d)){if(this.Xm(d)===a){var e=this.Gj;Xe(this,"nodeGroupKey",te,e,d,a,a);"string"===typeof e&&this.Wb(d,e);c.add(d)}}else{this.ul(d)===a&&(e=this.wj,Xe(this,"linkFromKey",te,e,d,a,a),"string"===typeof e&&this.Wb(d,e),c.add(d));this.xl(d)===a&&(e=this.zj,Xe(this,"linkToKey",te,e,d,a,a),"string"===typeof e&&this.Wb(d,e),c.add(d));var g=this.fk(d);if(w.isArray(g))for(var h=
- w.tb(g),e=this.Rh,k=0;k<h;k++)w.ob(g,k)===a&&(Xe(this,"linkLabelKeys",ve,e,d,a,a),c.add(d))}}for(c=c.j;c.next();)gf(this,a,c.value)}};f.wp=function(a){M.prototype.wp.call(this,a);var b=this.Xm(a);null===this.yf(b)&&af(this,b,a)};f.Ut=function(a){M.prototype.Ut.call(this,a);var b=this.Xm(a);gf(this,b,a)};w.defineProperty(X,{mt:"linkCategoryProperty"},function(){return this.Tq},function(a){var b=this.Tq;b!==a&&(Ye(a,X,"linkCategoryProperty"),this.Tq=a,this.i("linkCategoryProperty",b,a))});
- X.prototype.getCategoryForLinkData=X.prototype.uw=function(a){if(null===a)return"";var b=this.Tq;if(""===b)return"";b=w.yb(a,b);if(void 0===b)return"";if("string"===typeof b)return b;w.l("getCategoryForLinkData found a non-string category for "+a+": "+b);return""};
- X.prototype.setCategoryForLinkData=X.prototype.rF=function(a,b){w.g(b,"string",X,"setCategoryForLinkData:cat");if(null!==a){var c=this.Tq;if(""===c)return"";if(this.Si(a)){var d=w.yb(a,c);void 0===d&&(d="");d!==b&&(w.Wa(a,c,b),Xe(this,"linkCategory",te,c,a,d,b),"string"===typeof c&&this.Wb(a,c))}else w.Wa(a,c,b)}};
- function Be(a){1<arguments.length&&w.l("TreeModel constructor can only take one optional argument, the Array of node data.");M.call(this);this.Hj="parent";this.Sx=!1;this.yr="parentLinkCategory";void 0!==a&&(this.rh=a)}w.Pa(Be,M);w.la("TreeModel",Be);Be.prototype.toString=function(a){void 0===a&&(a=0);if(2<=a)return this.JA();var b=(""!==this.name?this.name:"")+" TreeModel";if(0<a){b+="\n node data:";a=this.rh;for(var c=w.tb(a),d=0;d<c;d++)var e=w.ob(a,d),b=b+(" "+this.Db(e)+":"+ka(e))}return b};
- Be.prototype.Vt=function(){var a=M.prototype.Vt.call(this),b="";"parent"!==this.sp&&"string"===typeof this.sp&&(b+=',\n "nodeParentKeyProperty": '+this.quote(this.sp));return a+b};Be.prototype.zt=function(a){M.prototype.zt.call(this,a);a.nodeParentKeyProperty&&(this.sp=a.nodeParentKeyProperty)};Be.prototype.cn=function(a){return a};
- w.defineProperty(Be,{sp:"nodeParentKeyProperty"},function(){return this.Hj},function(a){var b=this.Hj;b!==a&&(Ye(a,Be,"nodeParentKeyProperty"),this.Hj=a,this.i("nodeParentKeyProperty",b,a))});w.defineProperty(Be,{Qm:"copiesParentKeyOfNodeData"},function(){return this.Sx},function(a){this.Sx!==a&&(w.g(a,"boolean",Be,"copiesParentKeyOfNodeData"),this.Sx=a)});
- Be.prototype.getParentKeyForNodeData=Be.prototype.Ym=function(a){if(null!==a){var b=this.Hj;if(""!==b&&(b=w.yb(a,b),void 0!==b)){if(Ze(b))return b;w.l("ParentKey value for node data "+a+" is not a number or a string: "+b)}}};
- Be.prototype.setParentKeyForNodeData=Be.prototype.yh=function(a,b){null===b&&(b=void 0);void 0===b||Ze(b)||w.tc(b,"number or string",Be,"setParentKeyForNodeData:key");if(null!==a){var c=this.Hj;if(""!==c)if(b=this.cn(b),this.se(a)){var d=w.yb(a,c);d!==b&&(gf(this,d,a),w.Wa(a,c,b),null===this.yf(b)&&af(this,b,a),Xe(this,"nodeParentKey",te,c,a,d,b),"string"===typeof c&&this.Wb(a,c))}else w.Wa(a,c,b)}};
- w.defineProperty(Be,{bL:"parentLinkCategoryProperty"},function(){return this.yr},function(a){var b=this.yr;b!==a&&(Ye(a,Be,"parentLinkCategoryProperty"),this.yr=a,this.i("parentLinkCategoryProperty",b,a))});Be.prototype.getParentLinkCategoryForNodeData=Be.prototype.AH=function(a){if(null===a)return"";var b=this.yr;if(""===b)return"";b=w.yb(a,b);if(void 0===b)return"";if("string"===typeof b)return b;w.l("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+b);return""};
- Be.prototype.setParentLinkCategoryForNodeData=Be.prototype.VI=function(a,b){w.g(b,"string",Be,"setParentLinkCategoryForNodeData:cat");if(null!==a){var c=this.yr;if(""===c)return"";if(this.se(a)){var d=w.yb(a,c);void 0===d&&(d="");d!==b&&(w.Wa(a,c,b),Xe(this,"parentLinkCategory",te,c,a,d,b),"string"===typeof c&&this.Wb(a,c))}else w.Wa(a,c,b)}};Be.prototype.copyNodeData=function(a){if(null===a)return null;a=M.prototype.copyNodeData.call(this,a);this.Qm||""===this.Hj||w.Wa(a,this.Hj,void 0);return a};
- Be.prototype.setDataProperty=function(a,b,c){u&&(w.g(a,"object",Be,"setDataProperty:data"),w.g(b,"string",Be,"setDataProperty:propname"),""===b&&w.l("TreeModel.setDataProperty: property name must not be an empty string when setting "+a+" to "+c));if(this.se(a))if(b===this.ik)this.AA(a,c);else{if(b===this.en){this.gx(a,c);return}if(b===this.sp){this.yh(a,c);return}}else!mf&&a instanceof V&&(mf=!0,w.trace('TreeModel.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),w.trace(" Is that really your intent?"));
- var d=w.yb(a,b);d!==c&&(w.Wa(a,b,c),this.pA(a,b,d,c))};f=Be.prototype;f.Bt=function(a,b){M.prototype.Bt.call(this,a,b);for(var c=this.Ac.j;c.next();)this.wA(c.value,a,b)};f.wA=function(a,b,c){if(this.Ym(a)===b){var d=this.Hj;w.Wa(a,d,c);Xe(this,"nodeParentKey",te,d,a,b,c);"string"===typeof d&&this.Wb(a,d)}};
- f.xp=function(a){M.prototype.xp.call(this,a);a=this.Db(a);var b=$e(this,a);if(null!==b){for(var c=new K(Object),b=b.j;b.next();){var d=b.value;if(this.se(d)&&this.Ym(d)===a){var e=this.Hj;Xe(this,"nodeParentKey",te,e,d,a,a);"string"===typeof e&&this.Wb(d,e);c.add(d)}}for(c=c.j;c.next();)gf(this,a,c.value)}};f.wp=function(a){M.prototype.wp.call(this,a);var b=this.Ym(a),b=this.cn(b);null===this.yf(b)&&af(this,b,a)};f.Ut=function(a){M.prototype.Ut.call(this,a);var b=this.Ym(a);gf(this,b,a)};
- function of(a,b,c){w.mc(this);this.La=!1;void 0===a?a="":w.g(a,"string",of,"constructor:targetprop");void 0===b?b=a:w.g(b,"string",of,"constructor:sourceprop");void 0===c?c=null:null!==c&&w.g(c,"function",of,"constructor:conv");this.MC=-1;this.ug=null;this.Lv=a;this.Jv=this.$y=0;this.HC=null;this.dz=!1;this.Cv=b;this.Ox=c;this.Gy=pf;this.Hx=null}w.la("Binding",of);var pf;of.OneWay=pf=w.v(of,"OneWay",1);var qf;of.TwoWay=qf=w.v(of,"TwoWay",2);
- of.parseEnum=function(a,b){w.g(a,"function",of,"parseEnum:ctor");w.Ea(b,a,of,"parseEnum:defval");return function(c){c=Ma(a,c);return null===c?b:c}};var ka;of.toString=ka=function(a){var b=a;w.$a(a)&&(a.text?b=a.text:a.name?b=a.name:void 0!==a.key?b=a.key:void 0!==a.id?b=a.id:a.constructor===Object&&(a.Text?b=a.Text:a.Name?b=a.Name:void 0!==a.Key?b=a.Key:void 0!==a.Id?b=a.Id:void 0!==a.ID&&(b=a.ID)));return void 0===b?"undefined":null===b?"null":b.toString()};
- of.prototype.toString=function(){return"Binding("+this.Qt+":"+this.xF+(-1!==this.Ll?" "+this.Ll:"")+" "+this.mode.name+")"};of.prototype.freeze=function(){this.La=!0;return this};of.prototype.Ta=function(){this.La=!1;return this};w.defineProperty(of,{Ll:null},function(){return this.MC},function(a){w.G(this);w.g(a,"number",of,"targetId");this.MC=a});w.defineProperty(of,{Qt:"targetProperty"},function(){return this.Lv},function(a){w.G(this);w.g(a,"string",of,"targetProperty");this.Lv=a});
- w.defineProperty(of,{kn:"sourceName"},function(){return this.HC},function(a){w.G(this);null!==a&&w.g(a,"string",of,"sourceName");this.HC=a;null!==a&&(this.dz=!1)});w.defineProperty(of,{St:"toModel"},function(){return this.dz},function(a){w.G(this);w.g(a,"boolean",of,"toModel");this.dz=a});w.defineProperty(of,{xF:"sourceProperty"},function(){return this.Cv},function(a){w.G(this);w.g(a,"string",of,"sourceProperty");this.Cv=a});
- w.defineProperty(of,{SG:"converter"},function(){return this.Ox},function(a){w.G(this);null!==a&&w.g(a,"function",of,"converter");this.Ox=a});w.defineProperty(of,{FG:"backConverter"},function(){return this.Hx},function(a){w.G(this);null!==a&&w.g(a,"function",of,"backConverter");this.Hx=a});w.defineProperty(of,{mode:"mode"},function(){return this.Gy},function(a){w.G(this);w.Ea(a,of,of,"mode");this.Gy=a});
- of.prototype.makeTwoWay=function(a){void 0===a&&(a=null);null!==a&&w.g(a,"function",of,"makeTwoWay");this.mode=qf;this.FG=a;return this};of.prototype.ofObject=of.prototype.Rw=function(a){void 0===a&&(a="");u&&w.g(a,"string",of,"ofObject:srcname");this.kn=a;this.St=!1;return this};of.prototype.ofModel=function(){this.kn=null;this.St=!0;return this};of.prototype.ofData=function(){this.kn=null;this.St=!1;return this};
- function rf(a,b,c){a=a.kn;var d=null;return d=null===a||""===a?b:"."===a?c:".."===a?c.S:b.te(a)}
- of.prototype.updateTarget=of.prototype.MF=function(a,b,c){var d=this.Cv;if(void 0===c||d===c){c=this.Lv;var e=this.Ox;if(null===e&&""===c)w.trace("Binding error: target property is the empty string: "+this.toString());else{u&&"string"===typeof c&&("function"!==typeof a.setAttribute&&0<c.length&&"_"!==c[0]&&!w.xw(a,c)?w.trace("Binding error: undefined target property: "+c+" on "+a.toString()):"name"===c&&a instanceof V&&w.trace("Binding error: cannot modify GraphObject.name on "+a.toString()));var g=
- b;""!==d&&(g=w.yb(b,d));if(void 0!==g)if(null===e)""!==c&&w.Wa(a,c,g);else try{if(""!==c){var h=e(g,a);u&&void 0===h&&w.trace('Binding warning: conversion function returned undefined when setting target property "'+c+'" on '+a.toString()+", function is: "+e);w.Wa(a,c,h)}else e(g,a)}catch(k){u&&w.trace("Binding error: "+k.toString()+' setting target property "'+c+'" on '+a.toString()+" with conversion function: "+e)}}}};
- of.prototype.updateSource=of.prototype.ox=function(a,b,c,d){void 0===d&&(d=null);if(this.Gy===qf){var e=this.Lv;if(void 0===c||e===c){c=this.Cv;var g=this.Hx;if(null!==g||""!==c){var h=a;""!==e&&(h=w.yb(a,e));if(void 0!==h)if(null===g)null!==d&&d.ha?(u&&d.ha.ik===c&&d.ha.se(b)&&w.trace("Binding error: cannot have TwoWay Binding on node data key property: "+this.toString()),d.ha.setDataProperty(b,c,h)):w.Wa(b,c,h);else try{if(""!==c){var k=g(h,b);null!==d&&d.ha?(u&&(d.ha.ik===c&&d.ha.se(b)&&w.trace("Binding error: cannot have TwoWay Binding on node data key property: "+
- this.toString()),void 0===k&&w.trace('Binding warning: conversion function returned undefined when setting source property "'+c+'" on '+b.toString()+", function is: "+g)),d.ha.setDataProperty(b,c,k)):w.Wa(b,c,k)}else g(h,b)}catch(l){u&&w.trace("Binding error: "+l.toString()+' setting source property "'+c+'" on '+b.toString()+" with conversion function: "+g)}}}}};function We(){this.ZF=(new K(se)).freeze();this.cc="";this.NB=!1}w.la("Transaction",We);
- We.prototype.toString=function(a){var b="Transaction: "+this.name+" "+this.kh.count.toString()+(this.et?"":", incomplete");if(void 0!==a&&0<a){a=this.kh.count;for(var c=0;c<a;c++){var d=this.kh.ma(c);null!==d&&(b+="\n "+d.toString())}}return b};We.prototype.clear=We.prototype.clear=function(){var a=this.kh;a.Ta();for(var b=a.count-1;0<=b;b--){var c=a.ma(b);null!==c&&c.clear()}a.clear();a.freeze()};We.prototype.canUndo=We.prototype.canUndo=function(){return this.et};
- We.prototype.undo=We.prototype.undo=function(){if(this.canUndo())for(var a=this.kh.count-1;0<=a;a--){var b=this.kh.ma(a);null!==b&&b.undo()}};We.prototype.canRedo=We.prototype.canRedo=function(){return this.et};We.prototype.redo=We.prototype.redo=function(){if(this.canRedo())for(var a=this.kh.count,b=0;b<a;b++){var c=this.kh.ma(b);null!==c&&c.redo()}};w.w(We,{kh:"changes"},function(){return this.ZF});w.defineProperty(We,{name:"name"},function(){return this.cc},function(a){this.cc=a});
- w.defineProperty(We,{et:"isComplete"},function(){return this.NB},function(a){this.NB=a});function xe(){this.Iy=new L(M);this.Xe=!1;this.fG=(new K(We)).freeze();this.Wg=-1;this.bC=999;this.ti=!1;this.wu=null;this.bl=0;this.Ix=!1;u&&(this.Ix=!0);this.dh=(new K("string")).freeze();this.no=new K("number");this.ny=!0;this.By=!1}w.la("UndoManager",xe);
- xe.prototype.toString=function(a){for(var b="UndoManager "+this.Yi+"<"+this.history.count+"<="+this.DE,b=b+"[",c=this.KE.count,d=0;d<c;d++)0<d&&(b+=" "),b+=this.KE.ma(d);b+="]";if(void 0!==a&&0<a)for(c=this.history.count,d=0;d<c;d++)b+="\n "+this.history.ma(d).toString(a-1);return b};
- xe.prototype.clear=xe.prototype.clear=function(){var a=this.history;a.Ta();for(var b=a.count-1;0<=b;b--){var c=a.ma(b);null!==c&&c.clear()}a.clear();this.Wg=-1;a.freeze();this.ti=!1;this.wu=null;this.bl=0;this.dh.Ta();this.dh.clear();this.dh.freeze();this.no.clear()};xe.prototype.addModel=xe.prototype.zG=function(a){this.Iy.add(a)};xe.prototype.removeModel=xe.prototype.II=function(a){this.Iy.remove(a)};
- xe.prototype.startTransaction=xe.prototype.ec=function(a){void 0===a&&(a="");null===a&&(a="");if(this.lb)return!1;!0===this.ny&&(this.ny=!1,this.bl++,this.Yc("StartingFirstTransaction",a,this.Ti),0<this.bl&&this.bl--);this.isEnabled&&(this.dh.Ta(),this.dh.add(a),this.dh.freeze(),null===this.Ti?this.no.add(0):this.no.add(this.Ti.kh.count));this.bl++;var b=1===this.Ue;b&&this.Yc("StartedTransaction",a,this.Ti);return b};
- xe.prototype.commitTransaction=xe.prototype.fe=function(a){void 0===a&&(a="");return sf(this,!0,a)};xe.prototype.rollbackTransaction=xe.prototype.yp=function(){return sf(this,!1,"")};
- function sf(a,b,c){if(a.lb)return!1;a.pz&&1>a.Ue&&w.trace("Ending transaction without having started a transaction: "+c);var d=1===a.Ue;d&&b&&a.isEnabled&&a.Yc("CommittingTransaction",c,a.Ti);var e=0;if(0<a.Ue&&(a.bl--,a.isEnabled)){var g=a.dh.count;0<g&&(""===c&&(c=a.dh.ma(0)),a.dh.Ta(),a.dh.ud(g-1),a.dh.freeze());g=a.no.count;0<g&&(e=a.no.ma(g-1),a.no.ud(g-1))}g=a.Ti;if(d){if(b){a.By=!1;if(a.isEnabled&&null!==g){b=g;b.et=!0;b.name=c;d=a.history;d.Ta();for(e=d.count-1;e>a.Yi;e--)g=d.ma(e),null!==
- g&&g.clear(),d.ud(e),a.By=!0;e=a.DE;0===e&&(e=1);0<e&&d.count>=e&&(g=d.ma(0),null!==g&&g.clear(),d.ud(0),a.Wg--);d.add(b);a.Wg++;d.freeze();g=b}a.Yc("CommittedTransaction",c,g)}else{a.ti=!0;try{a.isEnabled&&null!==g&&(g.et=!0,g.undo())}finally{a.Yc("RolledBackTransaction",c,g),a.ti=!1}null!==g&&g.clear()}a.wu=null;return!0}if(a.isEnabled&&!b&&null!==g){a=e;c=g.kh;for(b=c.count-1;b>=a;b--)d=c.ma(b),null!==d&&d.undo(),c.Ta(),c.ud(b);c.freeze()}return!1}
- xe.prototype.canUndo=xe.prototype.canUndo=function(){if(!this.isEnabled||0<this.Ue||this.lb)return!1;var a=this.IF;return null!==a&&a.canUndo()?!0:!1};xe.prototype.undo=xe.prototype.undo=function(){if(this.canUndo()){var a=this.IF;try{this.Yc("StartingUndo","Undo",a),this.ti=!0,this.Wg--,a.undo()}catch(b){w.trace("undo error: "+b.toString())}finally{this.ti=!1,this.Yc("FinishedUndo","Undo",a)}}};
- xe.prototype.canRedo=xe.prototype.canRedo=function(){if(!this.isEnabled||0<this.Ue||this.lb)return!1;var a=this.HF;return null!==a&&a.canRedo()?!0:!1};xe.prototype.redo=xe.prototype.redo=function(){if(this.canRedo()){var a=this.HF;try{this.Yc("StartingRedo","Redo",a),this.ti=!0,this.Wg++,a.redo()}catch(b){w.trace("redo error: "+b.toString())}finally{this.ti=!1,this.Yc("FinishedRedo","Redo",a)}}};
- xe.prototype.Yc=function(a,b,c){void 0===c&&(c=null);var d=new se;d.Pd=ue;d.propertyName=a;d.object=c;d.oldValue=b;for(a=this.sI;a.next();)b=a.value,d.ha=b,b.fw(d)};xe.prototype.handleChanged=xe.prototype.lE=function(a){if(this.isEnabled&&!this.lb&&!this.skipsEvent(a)){var b=this.Ti;null===b&&(this.wu=b=new We);var c=a.copy(),b=b.kh;b.Ta();b.add(c);b.freeze();this.pz&&0>=this.Ue&&!this.ny&&(a=a.h,null!==a&&!1===a.uf||w.trace("Change not within a transaction: "+c.toString()))}};
- xe.prototype.skipsEvent=function(a){if(null===a||0>a.Pd.value)return!0;a=a.object;if(a instanceof V){if(a=a.layer,null!==a&&a.Hc)return!0}else if(a instanceof Te&&a.Hc)return!0;return!1};w.w(xe,{sI:"models"},function(){return this.Iy.j});w.defineProperty(xe,{isEnabled:"isEnabled"},function(){return this.Xe},function(a){this.Xe=a});w.w(xe,{IF:"transactionToUndo"},function(){return 0<=this.Yi&&this.Yi<=this.history.count-1?this.history.ma(this.Yi):null});
- w.w(xe,{HF:"transactionToRedo"},function(){return this.Yi<this.history.count-1?this.history.ma(this.Yi+1):null});w.w(xe,{lb:"isUndoingRedoing"},function(){return this.ti});w.w(xe,{history:"history"},function(){return this.fG});w.defineProperty(xe,{DE:"maxHistoryLength"},function(){return this.bC},function(a){this.bC=a});w.w(xe,{Yi:"historyIndex"},function(){return this.Wg});w.w(xe,{Ti:"currentTransaction"},function(){return this.wu});w.w(xe,{Ue:"transactionLevel"},function(){return this.bl});
- w.w(xe,{wE:"isInTransaction"},function(){return 0<this.bl});w.defineProperty(xe,{pz:"checksTransactionLevel"},function(){return this.Ix},function(a){this.Ix=a});w.w(xe,{KE:"nestedTransactionNames"},function(){return this.dh});function za(){0<arguments.length&&w.cd(za);w.mc(this);this.Z=null;this.hB=!0;this.jB=this.kB=this.vB=this.lB=!1;this.Tk=this.Ex=null;this.dD=1.05;this.tB=1;this.Cy=NaN;this.ZB=null;this.eD=NaN}w.la("CommandHandler",za);var tf=null,yf="";za.prototype.toString=function(){return"CommandHandler"};
- w.w(za,{h:"diagram"},function(){return this.Z});za.prototype.Mc=function(a){u&&null!==a&&w.k(a,z,za,"setDiagram");this.Z=a};
- za.prototype.doKeyDown=function(){var a=this.h;if(null!==a){var b=a.Q,c=w.$m?b.rt:b.control,d=b.shift,e=b.alt,g=b.key;!c||"C"!==g&&"Insert"!==g?c&&"X"===g||d&&"Del"===g?this.canCutSelection()&&this.cutSelection():c&&"V"===g||d&&"Insert"===g?this.canPasteSelection()&&this.pasteSelection():c&&"Y"===g||e&&d&&"Backspace"===g?this.canRedo()&&this.redo():c&&"Z"===g||e&&"Backspace"===g?this.canUndo()&&this.undo():"Del"===g||"Backspace"===g?this.canDeleteSelection()&&this.deleteSelection():c&&"A"===g?this.canSelectAll()&&
- this.selectAll():"Esc"===g?this.canStopCommand()&&this.stopCommand():"Up"===g?a.bf&&(c?a.scroll("pixel","up"):a.scroll("line","up")):"Down"===g?a.bf&&(c?a.scroll("pixel","down"):a.scroll("line","down")):"Left"===g?a.af&&(c?a.scroll("pixel","left"):a.scroll("line","left")):"Right"===g?a.af&&(c?a.scroll("pixel","right"):a.scroll("line","right")):"PageUp"===g?d&&a.af?a.scroll("page","left"):a.bf&&a.scroll("page","up"):"PageDown"===g?d&&a.af?a.scroll("page","right"):a.bf&&a.scroll("page","down"):"Home"===
- g?(b=a.Gc,c&&a.bf?a.position=new I(a.position.x,b.y):!c&&a.af&&(a.position=new I(b.x,a.position.y))):"End"===g?(b=a.Gc,d=a.qb,c&&a.bf?a.position=new I(d.x,b.bottom-d.height):!c&&a.af&&(a.position=new I(b.right-d.width,d.y))):"Subtract"===g?this.canDecreaseZoom()&&this.decreaseZoom():"Add"===g?this.canIncreaseZoom()&&this.increaseZoom():c&&"0"===g?this.canResetZoom()&&this.resetZoom():d&&"Z"===g?this.canZoomToFit()&&this.zoomToFit():c&&!d&&"G"===g?this.canGroupSelection()&&this.groupSelection():c&&
- d&&"G"===g?this.canUngroupSelection()&&this.ungroupSelection():b.event&&113===b.event.which?this.canEditTextBlock()&&this.editTextBlock():b.event&&93===b.event.which?this.canShowContextMenu()&&this.showContextMenu():b.bubbles=!0:this.canCopySelection()&&this.copySelection()}};za.prototype.doKeyUp=function(){var a=this.h;null!==a&&(a.Q.bubbles=!0)};za.prototype.stopCommand=function(){var a=this.h;if(null!==a){var b=a.Za;b instanceof zf&&a.wf&&a.hw();null!==b&&b.doCancel()}};
- za.prototype.canStopCommand=function(){return!0};za.prototype.selectAll=function(){var a=this.h;if(null!==a){a.sa();try{a.gc="wait";a.Ia("ChangingSelection");for(var b=a.fi;b.next();)b.value.cb=!0;for(var c=a.Jg;c.next();)c.value.cb=!0;for(var d=a.links;d.next();)d.value.cb=!0}finally{a.Ia("ChangedSelection"),a.gc=""}}};za.prototype.canSelectAll=function(){var a=this.h;return null!==a&&a.wf};
- za.prototype.deleteSelection=function(){var a=this.h;if(null!==a&&!a.Ia("SelectionDeleting",a.selection))try{a.gc="wait";a.ec("Delete");a.Ia("ChangingSelection");for(var b=new L(C),c=a.selection.j;c.next();)Af(b,c.value,!0,this.bH?Infinity:0,!0,function(a){return a.canDelete()});a.vA(b,!0);a.Ia("SelectionDeleted",b)}finally{a.Ia("ChangedSelection"),a.fe("Delete"),a.gc=""}};za.prototype.canDeleteSelection=function(){var a=this.h;return null===a||a.xb||a.Bf||!a.Im||0===a.selection.count?!1:!0};
- function Af(a,b,c,d,e,g){void 0===g&&(g=null);if(!(a.contains(b)||null!==g&&!g(b)||b instanceof da))if(a.add(b),b instanceof D){if(c&&b instanceof F)for(var h=b.Jc;h.next();)Af(a,h.value,c,d,e,g);if(e)for(h=b.Vd;h.next();){var k=h.value;if(!a.contains(k)){var l=k.aa,m=k.fa;null!==l&&a.contains(l)&&null!==m&&a.contains(m)?Af(a,k,c,d,e,g):null!==l&&null!==m||Af(a,k,c,d,e,g)}}if(1<d)for(b=b.aE();b.next();)Af(a,b.value,c,d-1,e,g)}else if(b instanceof G)for(h=b.Vf;h.next();)Af(a,h.value,c,d,e,g)}
- za.prototype.No=function(a,b,c){var d=new ta(C,C);for(a=a.j;a.next();)Bf(this,a.value,b,d,c);if(null!==b){c=b.ha;a=!1;null!==b.zb.Sd&&(a=b.zb.Sd.Wi);for(var e=new L(G),g=new ta(G,G),h=d.j;h.next();){var k=h.value;if(k instanceof G){var l=k;a||null!==l.aa&&null!==l.fa||e.add(l)}else if(c instanceof Be&&k instanceof D&&null!==k.data){var l=c,m=k,k=h.key,n=k.Vm();null!==n&&(n=d.za(n),null!==n?(l.yh(m.data,l.Db(n.data)),l=b.Cg(m.data),k=k.Us(),null!==k&&null!==l&&g.add(k,l)):l.yh(m.data,void 0))}}0<e.count&&
- b.vA(e,!1);if(0<g.count)for(b=g.j;b.next();)d.add(b.key,b.value)}for(b=d.j;b.next();)b.value.Wb();return d};
- function Bf(a,b,c,d,e){if(null===b||e&&!b.canCopy())return null;if(d.contains(b))return d.za(b);var g=null,h=b.data;if(null!==h&&null!==c){var k=c.ha;b instanceof G?k instanceof X&&(h=k.FD(h),w.$a(h)&&(k.Uv(h),g=c.Cg(h))):(h=k.copyNodeData(h),w.$a(h)&&(k.Hm(h),g=c.bi(h)))}else Cf(b),g=b.copy(),null!==c&&null!==g&&c.add(g);if(!(g instanceof C))return null;g.cb=!1;g.mh=!1;d.add(b,g);if(b instanceof D){for(k=b.Vd;k.next();){h=k.value;if(h.aa===b){var l=d.za(h);null!==l&&(l.aa=g)}h.fa===b&&(l=d.za(h),
- null!==l&&(l.fa=g))}if(b instanceof F&&g instanceof F)for(k=g,b=b.Jc;b.next();)h=Bf(a,b.value,c,d,e),h instanceof G||null===h||(h.Va=k)}else if(b instanceof G)for(k=b.aa,null!==k&&(k=d.za(k),null!==k&&(g.aa=k)),k=b.fa,null!==k&&(k=d.za(k),null!==k&&(g.fa=k)),b=b.Vf;b.next();)k=Bf(a,b.value,c,d,e),null!==k&&(k.Cd=g);return g}
- za.prototype.copySelection=function(){var a=this.h;if(null!==a){for(var b=new L(C),a=a.selection.j;a.next();)Af(b,a.value,!0,this.VG?Infinity:0,this.TG,function(a){return a.canCopy()});this.copyToClipboard(b)}};za.prototype.canCopySelection=function(){var a=this.h;return null!==a&&a.Zj&&a.lz&&0!==a.selection.count?!0:!1};za.prototype.cutSelection=function(){this.copySelection();this.deleteSelection()};
- za.prototype.canCutSelection=function(){var a=this.h;return null!==a&&!a.xb&&!a.Bf&&a.Zj&&a.Im&&a.lz&&0!==a.selection.count?!0:!1};za.prototype.copyToClipboard=function(a){var b=this.h;if(null!==b){var c=null;if(null===a)tf=null,yf="";else{var c=b.ha,d=!1,e=!1,g=null;try{if(c instanceof Be){var h=c,d=h.Qm;h.Qm=this.ED}c instanceof X&&(h=c,e=h.Pm,h.Pm=this.DD);g=b.No(a,null,!0)}finally{c instanceof Be&&(c.Qm=d),c instanceof X&&(c.Pm=e),c=new K(C),c.ce(g),tf=c,yf=b.ha.ll}}b.Ia("ClipboardChanged",c)}};
- za.prototype.pasteFromClipboard=function(){var a=new L(C),b=tf;if(null===b)return a;var c=this.h;if(null===c||yf!==c.ha.ll)return a;var d=c.ha,e=!1,g=!1,h=null;try{if(d instanceof Be){var k=d,e=k.Qm;k.Qm=this.ED}d instanceof X&&(k=d,g=k.Pm,k.Pm=this.DD);h=c.No(b,c,!1)}finally{for(d instanceof Be&&(d.Qm=e),d instanceof X&&(d.Pm=g),b=h.j;b.next();)c=b.value,d=b.key,c.location.J()||(d.location.J()?c.location=d.location:!c.position.J()&&d.position.J()&&(c.position=d.position)),a.add(c)}return a};
- za.prototype.pasteSelection=function(a){void 0===a&&(a=null);var b=this.h;if(null!==b)try{b.gc="wait";b.ec("Paste");b.Ia("ChangingSelection");var c=this.pasteFromClipboard();0<c.count&&Df(b);for(var d=c.j;d.next();)d.value.cb=!0;b.Ia("ChangedSelection");if(null!==a){var e=b.computePartsBounds(b.selection);if(e){var g=b.zb.Sd;null===g&&(g=new Ef,g.Mc(b));var h=g.computeEffectiveCollection(b.selection);g.moveParts(h,new I(a.x-e.ra,a.y-e.Da),!1)}}b.Ia("ClipboardPasted",c)}finally{b.fe("Paste"),b.gc=
- ""}};za.prototype.canPasteSelection=function(){var a=this.h;return null===a||a.xb||a.Bf||!a.Fo||!a.lz||null===tf||yf!==a.ha.ll?!1:!0};za.prototype.undo=function(){var a=this.h;null!==a&&a.na.undo()};za.prototype.canUndo=function(){var a=this.h;return null===a||a.xb||a.Bf?!1:a.mD&&a.na.canUndo()};za.prototype.redo=function(){var a=this.h;null!==a&&a.na.redo()};za.prototype.canRedo=function(){var a=this.h;return null===a||a.xb||a.Bf?!1:a.mD&&a.na.canRedo()};
- za.prototype.decreaseZoom=function(a){void 0===a&&(a=1/this.qx);w.o(a,za,"decreaseZoom:factor");var b=this.h;null!==b&&b.Ho===Ff&&(a*=b.scale,a<b.oh||a>b.nh||(b.scale=a))};za.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.qx);w.o(a,za,"canDecreaseZoom:factor");var b=this.h;if(null===b||b.Ho!==Ff)return!1;a*=b.scale;return a<b.oh||a>b.nh?!1:b.cw};
- za.prototype.increaseZoom=function(a){void 0===a&&(a=this.qx);w.o(a,za,"increaseZoom:factor");var b=this.h;null!==b&&b.Ho===Ff&&(a*=b.scale,a<b.oh||a>b.nh||(b.scale=a))};za.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.qx);w.o(a,za,"canIncreaseZoom:factor");var b=this.h;if(null===b||b.Ho!==Ff)return!1;a*=b.scale;return a<b.oh||a>b.nh?!1:b.cw};za.prototype.resetZoom=function(a){void 0===a&&(a=this.kw);w.o(a,za,"resetZoom:newscale");var b=this.h;null===b||a<b.oh||a>b.nh||(b.scale=a)};
- za.prototype.canResetZoom=function(a){void 0===a&&(a=this.kw);w.o(a,za,"canResetZoom:newscale");var b=this.h;return null===b||a<b.oh||a>b.nh?!1:b.cw};za.prototype.zoomToFit=function(){var a=this.h;if(null!==a){var b=a.scale,c=a.position;b!==this.eD||isNaN(this.Cy)?(this.Cy=b,this.ZB=c.copy(),a.zoomToFit(),a.mf(),this.eD=a.scale):(a.scale=this.Cy,a.position=this.ZB)}};za.prototype.canZoomToFit=function(){var a=this.h;return null===a?!1:a.cw};
- za.prototype.collapseTree=function(a){void 0===a&&(a=null);var b=this.h;if(null===b)return!1;try{b.ec("Collapse Tree");var c=new K(D);if(null!==a&&a.bd)a.collapseTree(),c.add(a);else for(var d=b.selection.j;d.next();){var e=d.value;e instanceof D&&(a=e,a.bd&&(a.collapseTree(),c.add(a)))}b.Ia("TreeCollapsed",c)}finally{b.fe("Collapse Tree")}};
- za.prototype.canCollapseTree=function(a){void 0===a&&(a=null);var b=this.h;if(null===b||b.xb)return!1;if(null!==a){if(!a.bd)return!1;if(0<a.tw().count)return!0}else for(a=b.selection.j;a.next();)if(b=a.value,b instanceof D&&b.bd&&0<b.tw().count)return!0;return!1};
- za.prototype.expandTree=function(a){void 0===a&&(a=null);var b=this.h;if(null===b)return!1;try{b.ec("Expand Tree");var c=new K(D);if(null===a||a.bd)for(var d=b.selection.j;d.next();){var e=d.value;e instanceof D&&(a=e,a.bd||(a.expandTree(),c.add(a)))}else a.expandTree(),c.add(a);b.Ia("TreeExpanded",c)}finally{b.fe("Expand Tree")}};
- za.prototype.canExpandTree=function(a){void 0===a&&(a=null);var b=this.h;if(null===b||b.xb)return!1;if(null!==a){if(a.bd)return!1;if(0<a.tw().count)return!0}else for(a=b.selection.j;a.next();)if(b=a.value,b instanceof D&&!b.bd&&0<b.tw().count)return!0;return!1};
- za.prototype.groupSelection=function(){var a=this.h;if(null!==a){var b=a.ha;if(b instanceof X){var c=this.nD;if(null!==c){var d=null;try{a.gc="wait";a.ec("Group");a.Ia("ChangingSelection");for(var e=new K(C),g=a.selection.j;g.next();){var h=g.value;h.Td()&&h.canGroup()&&e.add(h)}for(var k=new K(C),l=e.j;l.next();){for(var m=l.value,g=!1,n=e.j;n.next();)if(m.di(n.value)){g=!0;break}g||k.add(m)}if(0<k.count){var p=k.first().Va;if(null!==p)for(;null!==p;){for(var e=!1,q=k.j;q.next();)if(!q.value.di(p)){e=
- !0;break}if(e)p=p.Va;else break}if(c instanceof F)Cf(c),d=c.copy(),null!==d&&a.add(d);else if(b.Sz(c)){var r=b.copyNodeData(c);w.$a(r)&&(b.Hm(r),d=a.sw(r))}if(null!==d){null!==p&&this.isValidMember(p,d)&&(d.Va=p);for(var s=k.j;s.next();){var t=s.value;this.isValidMember(d,t)&&(t.Va=d)}a.select(d)}}a.Ia("ChangedSelection");a.Ia("SelectionGrouped",d)}finally{a.fe("Group"),a.gc=""}}}}};
- za.prototype.canGroupSelection=function(){var a=this.h;if(null===a||a.xb||a.Bf||!a.Fo||!a.Yv||!(a.ha instanceof X)||null===this.nD)return!1;for(a=a.selection.j;a.next();){var b=a.value;if(b.Td()&&b.canGroup())return!0}return!1};function Gf(a){var b=w.nb();for(a=a.j;a.next();){var c=a.value;c instanceof G||b.push(c)}a=new L(C);for(var c=b.length,d=0;d<c;d++){for(var e=b[d],g=!0,h=0;h<c;h++)if(e.di(b[h])){g=!1;break}g&&a.add(e)}w.xa(b);return a}
- za.prototype.isValidMember=function(a,b){if(null===b||a===b||b instanceof G)return!1;if(null!==a){if(a===b||a.di(b))return!1;var c=a.aA;if(null!==c&&!c(a,b)||null===a.data&&null!==b.data||null!==a.data&&null===b.data)return!1}c=this.aA;return null!==c?c(a,b):!0};
- za.prototype.ungroupSelection=function(a){void 0===a&&(a=null);var b=this.h;if(null!==b){var c=b.ha;if(c instanceof X)try{b.gc="wait";b.ec("Ungroup");b.Ia("ChangingSelection");var d=new K(F);if(null!==a)d.add(a);else for(var e=b.selection.j;e.next();){var g=e.value;g instanceof F&&(a=g,a.canUngroup()&&d.add(a))}if(0<d.count){b.hw();for(var h=d.j;h.next();){var k=h.value;k.expandSubGraph();var l=k.Va,m=null!==l&&null!==l.data?c.Db(l.data):void 0,n=new K(C);n.ce(k.Jc);for(var p=n.j;p.next();){var q=
- p.value;q.cb=!0;if(!(q instanceof G)){var r=q.data;null!==r?c.ix(r,m):q.Va=l}}b.remove(k)}}b.Ia("ChangedSelection");b.Ia("SelectionUngrouped",d,n)}finally{b.fe("Ungroup"),b.gc=""}}};za.prototype.canUngroupSelection=function(a){void 0===a&&(a=null);var b=this.h;if(null===b||b.xb||b.Bf||!b.Im||!b.bw||!(b.ha instanceof X))return!1;if(null!==a){if(a.canUngroup())return!0}else for(a=b.selection.j;a.next();)if(b=a.value,b instanceof F&&b.canUngroup())return!0;return!1};
- za.prototype.addTopLevelParts=function(a,b){for(var c=!0,d=Gf(a).j;d.next();){var e=d.value;null!==e.Va&&(!b||this.isValidMember(null,e)?e.Va=null:c=!1)}return c};za.prototype.collapseSubGraph=function(a){void 0===a&&(a=null);var b=this.h;if(null===b)return!1;try{b.ec("Collapse SubGraph");var c=new K(F);if(null!==a&&a.me)a.collapseSubGraph(),c.add(a);else for(var d=b.selection.j;d.next();){var e=d.value;e instanceof F&&(a=e,a.me&&(a.collapseSubGraph(),c.add(a)))}b.Ia("SubGraphCollapsed",c)}finally{b.fe("Collapse SubGraph")}};
- za.prototype.canCollapseSubGraph=function(a){void 0===a&&(a=null);var b=this.h;if(null===b||b.xb)return!1;if(null!==a)return a.me?!0:!1;for(a=b.selection.j;a.next();)if(b=a.value,b instanceof F&&b.me)return!0;return!1};
- za.prototype.expandSubGraph=function(a){void 0===a&&(a=null);var b=this.h;if(null===b)return!1;try{b.ec("Expand SubGraph");var c=new K(F);if(null===a||a.me)for(var d=b.selection.j;d.next();){var e=d.value;e instanceof F&&(a=e,a.me||(a.expandSubGraph(),c.add(a)))}else a.expandSubGraph(),c.add(a);b.Ia("SubGraphExpanded",c)}finally{b.fe("Expand SubGraph")}};
- za.prototype.canExpandSubGraph=function(a){void 0===a&&(a=null);var b=this.h;if(null===b||b.xb)return!1;if(null!==a)return a.me?!1:!0;for(a=b.selection.j;a.next();)if(b=a.value,b instanceof F&&!b.me)return!0;return!1};
- za.prototype.editTextBlock=function(a){void 0===a&&(a=null);null!==a&&w.k(a,ya,za,"editTextBlock");var b=this.h;if(null!==b){var c=b.zb.HA;if(null!==c){if(null===a){a=null;for(var d=b.selection.j;d.next();){var e=d.value;if(e.canEdit()){a=e;break}}if(null===a)return;a=a.Rs(function(a){return a instanceof ya&&a.Dz})}null!==a&&(b.Za=null,c.Og=a,b.Za=c)}}};
- za.prototype.canEditTextBlock=function(a){void 0===a&&(a=null);null!==a&&w.k(a,ya,za,"canEditTextBlock");var b=this.h;if(null===b||b.xb||b.Bf||!b.aw||null===b.zb.HA)return!1;if(null!==a){if(a=a.W,null!==a&&a.canEdit())return!0}else for(b=b.selection.j;b.next();)if(a=b.value,a.canEdit()&&(a=a.Rs(function(a){return a instanceof ya&&a.Dz}),null!==a))return!0;return!1};
- za.prototype.showContextMenu=function(a){var b=this.h;if(null!==b){var c=b.zb.uz;if(null!==c&&(void 0===a&&(a=0<b.selection.count?b.selection.first():b),a=c.findObjectWithContextMenu(a),null!==a)){var d=new he,e=null;a instanceof V?e=a.vb(ac):b.VH||(e=b.qb,e=new I(e.x+e.width/2,e.y+e.height/2));null!==e&&(d.pe=b.LA(e),d.ga=e,b.Q=d);b.Za=c;Hf(c,!1,a)}}};
- za.prototype.canShowContextMenu=function(a){var b=this.h;if(null===b)return!1;var c=b.zb.uz;if(null===c)return!1;void 0===a&&(a=0<b.selection.count?b.selection.first():b);return null===c.findObjectWithContextMenu(a)?!1:!0};w.defineProperty(za,{TG:"copiesConnectedLinks"},function(){return this.hB},function(a){w.g(a,"boolean",za,"copiesConnectedLinks");this.hB=a});w.defineProperty(za,{VG:"copiesTree"},function(){return this.lB},function(a){w.g(a,"boolean",za,"copiesTree");this.lB=a});
- w.defineProperty(za,{bH:"deletesTree"},function(){return this.vB},function(a){w.g(a,"boolean",za,"deletesTree");this.vB=a});w.defineProperty(za,{ED:"copiesParentKey"},function(){return this.kB},function(a){w.g(a,"boolean",za,"copiesParentKey");this.kB=a});w.defineProperty(za,{DD:"copiesGroupKey"},function(){return this.jB},function(a){w.g(a,"boolean",za,"copiesGroupKey");this.jB=a});
- w.defineProperty(za,{nD:"archetypeGroupData"},function(){return this.Ex},function(a){null!==a&&w.k(a,Object,za,"archetypeGroupData");var b=this.h;null!==b&&(b=b.ha,b instanceof X&&(a instanceof F||b.Sz(a)||w.l("CommandHandler.archetypeGroupData must be either a Group or a data object for which GraphLinksModel.isGroupForNodeData is true: "+a)));this.Ex=a});w.defineProperty(za,{aA:"memberValidation"},function(){return this.Tk},function(a){null!==a&&w.g(a,"function",za,"memberValidation");this.Tk=a});
- w.defineProperty(za,{kw:"defaultScale"},function(){return this.tB},function(a){w.o(a,za,"defaultScale");0<a||w.l("defaultScale must be larger than zero, not: "+a);this.tB=a});w.defineProperty(za,{qx:"zoomFactor"},function(){return this.dD},function(a){w.o(a,za,"zoomFactor");1<a||w.l("zoomFactor must be larger than 1.0, not: "+a);this.dD=a});function Ue(){0<arguments.length&&w.cd(Ue);w.mc(this);this.Z=null;this.cc="";this.Xe=!0;this.LB=!1;this.$C=null;this.Rv=-1}w.la("Tool",Ue);
- Ue.prototype.Mc=function(a){u&&null!==a&&w.k(a,z,Ue,"setDiagram");this.Z=a};Ue.prototype.toString=function(){return""!==this.name?this.name+" Tool":w.Fg(Object.getPrototypeOf(this))};Ue.prototype.updateAdornments=function(){};Ue.prototype.canStart=function(){return this.isEnabled};Ue.prototype.doStart=function(){};Ue.prototype.doActivate=function(){this.ta=!0};Ue.prototype.doDeactivate=function(){this.ta=!1};Ue.prototype.doStop=function(){};Ue.prototype.doCancel=function(){this.stopTool()};
- Ue.prototype.stopTool=function(){var a=this.h;null!==a&&a.Za===this&&(a.Za=null,a.gc="")};Ue.prototype.doMouseDown=function(){!this.ta&&this.canStart()&&this.doActivate()};Ue.prototype.doMouseMove=function(){};Ue.prototype.doMouseUp=function(){this.stopTool()};Ue.prototype.doMouseWheel=function(){};Ue.prototype.canStartMultiTouch=function(){return!0};
- Ue.prototype.standardPinchZoomStart=function(){var a=this.h;if(null!==a){var b=a.Q.event,c=null,d=null;if(void 0!==b.targetTouches){if(2>b.targetTouches.length)return;c=b.targetTouches[0];d=b.targetTouches[1]}else if(null!==a.Mf[0])c=a.Mf[0],d=a.Mf[1];else return;this.doCancel();if(a.Vn){a.oy=!0;a.lC=a.scale;var e=a.Hb,g=a.Gb,h=a.ab.getBoundingClientRect(),k=c.clientX-e/h.width*h.left,l=c.clientY-g/h.height*h.top,c=d,d=c.clientX-e/h.width*h.left-k,g=c.clientY-g/h.height*h.top-l,g=Math.sqrt(d*d+g*
- g);a.IC=g;b.preventDefault();b.cancelBubble=!0}else If(a)}};
- Ue.prototype.standardPinchZoomMove=function(){var a=this.h;if(null!==a){var b=a.Q.event;this.doCancel();If(a);var c=null,d=null;if(void 0!==b.targetTouches){if(2>b.targetTouches.length)return;c=b.targetTouches[0];d=b.targetTouches[1]}else if(null!==a.Mf[0])c=a.Mf[0],d=a.Mf[1];else return;if(a.Vn&&a.oy){var e=a.Hb,g=a.Gb,h=a.ab.getBoundingClientRect(),k=c,c=k.clientX-e/h.width*h.left,l=k.clientY-g/h.height*h.top,k=d,d=k.clientX-e/h.width*h.left,g=k.clientY-g/h.height*h.top,h=d-c,e=g-l,h=Math.sqrt(h*
- h+e*e)/a.IC,c=new I((Math.min(d,c)+Math.max(d,c))/2,(Math.min(g,l)+Math.max(g,l))/2),l=a.lC*h,d=a.Jb;l!==a.scale&&d.canResetZoom(l)&&(g=a.on,a.on=c,d.resetZoom(l),a.on=g);b.preventDefault();b.cancelBubble=!0}}};Ue.prototype.doKeyDown=function(){var a=this.h;null!==a&&"Esc"===a.Q.key&&this.doCancel()};Ue.prototype.doKeyUp=function(){};Ue.prototype.startTransaction=Ue.prototype.ec=function(a){void 0===a&&(a=this.name);this.Gf=null;var b=this.h;return null===b?!1:b.ec(a)};
- Ue.prototype.stopTransaction=Ue.prototype.mk=function(){var a=this.h;return null===a?!1:null===this.Gf?a.yp():a.fe(this.Gf)};
- Ue.prototype.standardMouseSelect=function(){var a=this.h;if(null!==a&&a.wf){var b=a.Q,c=a.Ts(b.ga,!1);if(null!==c)if(w.$m?b.rt:b.control){a.Ia("ChangingSelection");for(b=c;null!==b&&!b.canSelect();)b=b.Va;null!==b&&(b.cb=!b.cb);a.Ia("ChangedSelection")}else if(b.shift){if(!c.cb){a.Ia("ChangingSelection");for(b=c;null!==b&&!b.canSelect();)b=b.Va;null!==b&&(b.cb=!0);a.Ia("ChangedSelection")}}else{if(!c.cb){for(b=c;null!==b&&!b.canSelect();)b=b.Va;null!==b&&a.select(b)}}else!b.left||(w.$m?b.rt:b.control)||
- b.shift||a.hw()}};Ue.prototype.standardMouseClick=function(a,b){void 0===a&&(a=null);void 0===b&&(b=function(a){return!a.layer.Hc});var c=this.h;if(null!==c){var d=c.Q,e=c.he(d.ga,a,b);d.ye=e;Jf(e,d,c)}};
- function Jf(a,b,c){var d=0;b.left?d=1===b.cf?1:2===b.cf?2:1:b.right&&1===b.cf&&(d=3);var e="";if(null!==a){switch(d){case 1:e="ObjectSingleClicked";break;case 2:e="ObjectDoubleClicked";break;case 3:e="ObjectContextClicked"}0!==d&&c.Ia(e,a)}else{switch(d){case 1:e="BackgroundSingleClicked";break;case 2:e="BackgroundDoubleClicked";break;case 3:e="BackgroundContextClicked"}0!==d&&c.Ia(e)}if(null!==a)for(b.$c=!1;null!==a;){c=null;switch(d){case 1:c=a.click;break;case 2:c=a.Ps?a.Ps:a.click;break;case 3:c=
- a.sz}if(null!==c&&(c(b,a),b.$c))break;a=a.S}else{a=null;switch(d){case 1:a=c.click;break;case 2:a=c.Ps?c.Ps:c.click;break;case 3:a=c.sz}null!==a&&a(b)}}
- Ue.prototype.standardMouseOver=function(){var a=this.h;if(null!==a){var b=a.Q;if(null!==b.h&&!0!==a.Tb.jd){var c=a.mb;a.mb=!0;var d=a.he(b.ga,null,null);b.ye=d;var e=!1;if(d!==a.Bn){var g=a.Bn,h=g;a.Bn=d;this.doCurrentObjectChanged(g,d);for(b.$c=!1;null!==g;){var k=g.IE;if(null!==k){if(d===g)break;if(null!==d&&d.Al(g))break;k(b,g,d);e=!0;if(b.$c)break}g=g.S}g=h;for(b.$c=!1;null!==d;){k=d.HE;if(null!==k){if(g===d)break;if(null!==g&&g.Al(d))break;k(b,d,g);e=!0;if(b.$c)break}d=d.S}d=a.Bn}if(null!==d){g=
- d;for(k="";null!==g;){k=g.cursor;if(""!==k)break;g=g.S}a.gc=k;b.$c=!1;for(g=d;null!==g;){k=g.eA;if(null!==k&&(k(b,g),e=!0,b.$c))break;g=g.S}}else a.gc="",k=a.eA,null!==k&&(k(b),e=!0);e&&a.ne();a.mb=c}}};Ue.prototype.doCurrentObjectChanged=function(){};
- Ue.prototype.standardMouseWheel=function(){var a=this.h;if(null!==a){var b=a.Q,c=b.nl;if(0!==c&&a.Gc.J()){var d=a.Jb,e=a.zb.tt;if((e===Kf&&!b.shift||e===Lf&&b.control)&&(0<c?d.canIncreaseZoom():d.canDecreaseZoom()))e=a.on,a.on=b.pe,0<c?d.increaseZoom():d.decreaseZoom(),a.on=e,b.bubbles=!1;else if(e===Kf&&b.shift||e===Lf&&!b.control){d=a.position.copy();e=0<c?c:-c;if(!b.shift&&a.bf){var g=a.Ht,e=e/40*g;0<c?a.scroll("pixel","up",e):a.scroll("pixel","down",e)}else b.shift&&a.af&&(g=a.Gt,e=e/40*g,0<c?
- a.scroll("pixel","left",e):a.scroll("pixel","right",e));a.position.N(d)||(b.bubbles=!1)}}}};Ue.prototype.standardWaitAfter=function(a){w.g(a,"number",Ue,"standardWaitAfter:delay");this.cancelWaitAfter();var b=this;this.Rv=w.setTimeout(function(){b.doWaitAfter()},a)};Ue.prototype.cancelWaitAfter=function(){-1!==this.Rv&&w.clearTimeout(this.Rv);this.Rv=-1};Ue.prototype.doWaitAfter=function(){};
- Ue.prototype.findToolHandleAt=function(a,b){var c=this.h;if(null===c)return null;c=c.he(a,null,function(a){a=a.W;return null===a?!1:null!==a.Bc});if(null===c)return null;var d=c.W;return null===d||d.Tc!==b?null:c};Ue.prototype.isBeyondDragSize=function(a,b){var c=this.h;if(null===c)return!1;void 0===a&&(a=c.Cc.pe);void 0===b&&(b=c.Q.pe);var d=c.zb.gH,e=d.width,d=d.height;c.Cc.Cl&&(e+=6,d+=6);return Math.abs(b.x-a.x)>e||Math.abs(b.y-a.y)>d};w.w(Ue,{h:"diagram"},function(){return this.Z});
- w.defineProperty(Ue,{name:"name"},function(){return this.cc},function(a){w.g(a,"string",Ue,"name");this.cc=a});w.defineProperty(Ue,{isEnabled:"isEnabled"},function(){return this.Xe},function(a){w.g(a,"boolean",Ue,"isEnabled");this.Xe=a});w.defineProperty(Ue,{ta:"isActive"},function(){return this.LB},function(a){w.g(a,"boolean",Ue,"isActive");this.LB=a});w.defineProperty(Ue,{Gf:"transactionResult"},function(){return this.$C},function(a){null!==a&&w.g(a,"string",Ue,"transactionResult");this.$C=a});
- function Ef(){0<arguments.length&&w.cd(Ef);Ue.call(this);this.name="Dragging";this.iB=this.PB=!0;this.Dq=this.BB=!1;this.TB=!0;this.py=(new pa(NaN,NaN)).freeze();this.qy=Xb;this.sy=(new I(NaN,NaN)).freeze();this.AB=!1;this.yB=this.gB=this.zB=this.oB=this.Di=null;this.mq=this.RB=!1;this.zo=new I(NaN,NaN);this.Dv=new I;this.Gv=!1;this.Bv=this.OB=!0;this.Ln=100;this.oj=[];this.eG=(new L(C)).freeze()}w.Pa(Ef,Ue);w.la("DraggingTool",Ef);
- w.defineProperty(Ef,{tE:"isCopyEnabled"},function(){return this.PB},function(a){w.g(a,"boolean",Ef,"isCopyEnabled");this.PB=a});w.defineProperty(Ef,{UG:"copiesEffectiveCollection"},function(){return this.iB},function(a){w.g(a,"boolean",Ef,"copiesEffectiveCollection");this.iB=a});w.defineProperty(Ef,{hH:"dragsTree"},function(){return this.BB},function(a){w.g(a,"boolean",Ef,"dragsTree");this.BB=a});
- w.defineProperty(Ef,{Ew:"isGridSnapEnabled"},function(){return this.Dq},function(a){w.g(a,"boolean",Ef,"isGridSnapEnabled");this.Dq=a});w.defineProperty(Ef,{QH:"isComplexRoutingRealtime"},function(){return this.OB},function(a){w.g(a,"boolean",Ef,"isComplexRoutingRealtime");this.OB=a});w.defineProperty(Ef,{SH:"isGridSnapRealtime"},function(){return this.TB},function(a){w.g(a,"boolean",Ef,"isGridSnapRealtime");this.TB=a});
- w.defineProperty(Ef,{jE:"gridSnapCellSize"},function(){return this.py},function(a){w.k(a,pa,Ef,"gridSnapCellSize");this.py.N(a)||(this.py=a=a.da())});w.defineProperty(Ef,{CH:"gridSnapCellSpot"},function(){return this.qy},function(a){w.k(a,Q,Ef,"gridSnapCellSpot");this.qy.N(a)||(this.qy=a=a.da())});w.defineProperty(Ef,{DH:"gridSnapOrigin"},function(){return this.sy},function(a){w.k(a,I,Ef,"gridSnapOrigin");this.sy.N(a)||(this.sy=a=a.da())});
- w.defineProperty(Ef,{Wi:"dragsLink"},function(){return this.AB},function(a){w.g(a,"boolean",Ef,"dragsLink");this.AB=a});w.defineProperty(Ef,{Ns:"currentPart"},function(){return this.oB},function(a){null!==a&&w.k(a,C,Ef,"currentPart");this.oB=a});w.defineProperty(Ef,{wc:"copiedParts"},function(){return this.gB},function(a){this.gB=a});w.defineProperty(Ef,{ic:"draggedParts"},function(){return this.zB},function(a){this.zB=a});
- w.w(Ef,{gK:"draggingParts"},function(){return null!==this.wc?this.wc.dj():null!==this.ic?this.ic.dj():this.eG});w.defineProperty(Ef,{Zc:"draggedLink"},function(){return this.yB},function(a){null!==a&&w.k(a,G,Ef,"draggedLink");this.yB=a});w.defineProperty(Ef,{Dw:"isDragOutStarted"},function(){return this.RB},function(a){this.RB=a});w.defineProperty(Ef,{lk:"startPoint"},function(){return this.Dv},function(a){w.k(a,I,Ef,"startPoint");this.Dv.N(a)||(this.Dv=a=a.da())});
- w.defineProperty(Ef,{LD:"delay"},function(){return this.Ln},function(a){w.g(a,"number",Ef,"delay");this.Ln=a});Ef.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.h;if(null===a||!a.fl&&!a.Zj&&!a.Xv||!a.wf)return!1;var b=a.Q;return!b.left||a.Za!==this&&(!this.isBeyondDragSize()||b.Cl&&b.timestamp-a.Cc.timestamp<this.Ln)?!1:null!==this.findDraggablePart()};
- Ef.prototype.findDraggablePart=function(){var a=this.h;if(null===a)return null;a=a.Ts(a.Cc.ga,!1);if(null===a)return null;for(;null!==a&&!a.canSelect();)a=a.Va;return null!==a&&(a.canMove()||a.canCopy())?a:null};Ef.prototype.standardMouseSelect=function(){var a=this.h;if(null!==a&&a.wf){var b=a.Ts(a.Cc.ga,!1);if(null!==b){for(;null!==b&&!b.canSelect();)b=b.Va;this.Ns=b;this.Ns.cb||(a.Ia("ChangingSelection"),b=a.Q,(w.$m?b.rt:b.control)||b.shift||Df(a),this.Ns.cb=!0,a.Ia("ChangedSelection"))}}};
- Ef.prototype.doActivate=function(){var a=this.h;if(null!==a){this.standardMouseSelect();var b=this.Ns;null!==b&&(b.canMove()||b.canCopy())&&(this.ta=!0,this.zo.set(a.position),Mf(this,a.selection),this.oj.length=0,this.ic=this.computeEffectiveCollection(a.selection),a.Nt=!0,Nf(this,this.ic),this.ec("Drag"),this.lk=a.Cc.ga,a.Pe=!0,a.Xv&&(this.Dw=!0,this.mq=!1,bg=this,cg=this.h,this.doSimulatedDragOut()))}};
- function Mf(a,b){if(a.Wi){var c=a.h;null!==c&&c.Jm&&(c.ha instanceof X&&1===b.count&&b.first()instanceof G?(a.Zc=b.first(),a.Zc.canRelinkFrom()&&a.Zc.canRelinkTo()&&a.Zc.Hs(),a.Di=c.zb.SE,null===a.Di&&(a.Di=new dg,a.Di.Mc(c))):(a.Zc=null,a.Di=null))}}
- Ef.prototype.computeEffectiveCollection=function(a){var b=null!==this.h&&this.h.Za===this,c=new ta(C);if(null===a)return c;for(var d=a.j;d.next();)eg(this,c,d.value,b);if(null!==this.Zc&&this.Wi)return c;for(d=a.j;d.next();)a=d.value,a instanceof G&&(b=a.aa,null===b||c.contains(b)?(b=a.fa,null===b||c.contains(b)||c.remove(a)):c.remove(a));return c};function fg(a){return void 0===a?new gg(O.ok):new gg(a.copy())}
- function eg(a,b,c,d){if(!b.contains(c)&&(!d||c.canMove()||c.canCopy()))if(c instanceof D){b.add(c,fg(c.location));if(c instanceof F)for(var e=c.Jc;e.next();)eg(a,b,e.value,d);for(e=c.Vd;e.next();){var g=e.value;if(!b.contains(g)){var h=g.aa,k=g.fa;null!==h&&b.contains(h)&&null!==k&&b.contains(k)&&eg(a,b,g,d)}}if(a.hH)for(c=c.aE();c.next();)eg(a,b,c.value,d)}else if(c instanceof G)for(g=c,b.add(g,fg()),e=g.Vf;e.next();)eg(a,b,e.value,d);else c instanceof da||b.add(c,fg(c.location))}
- Ef.prototype.doDeactivate=function(){this.ta=!1;var a=this.h;null!==a&&hg(a);ig(this);jg(this,this.ic);this.ic=null;this.mq=this.Dw=!1;if(0<kg.count){for(var b=kg.length,c=0;c<b;c++){var d=kg.ma(c);lg(d);mg(d);ig(d);null!==d.h&&hg(d.h)}kg.clear()}lg(this);this.zo.n(NaN,NaN);bg=cg=null;mg(this);a.Pe=!1;a.gc="";a.Nt=!1;this.mk()};function ig(a){var b=a.h;if(null!==b){var c=b.mb;b.mb=!0;ng(a,b.Q,null);b.mb=c}a.oj.length=0}
- function og(){var a=bg;mg(a);pg(a);var b=a.h;null!==b&&a.zo.J()&&(b.position=a.zo);null!==b&&hg(b)}Ef.prototype.doCancel=function(){mg(this);pg(this);var a=this.h;null!==a&&this.zo.J()&&(a.position=this.zo);this.stopTool()};function Nf(a,b){if(null!==b){a.Gv=!0;for(var c=b.j;c.next();){var d=c.key;d instanceof G&&(d.Gp=!0)}}}function jg(a,b){if(null!==b){for(var c=b.j;c.next();){var d=c.key;d instanceof G&&(d.Gp=!1,d.Zi&&qg(d)&&d.dc())}a.Gv=!1}}
- Ef.prototype.doKeyDown=function(){var a=this.h;null!==a&&(a=a.Q,null!==a&&this.ta&&("Esc"===a.key?this.doCancel():this.doMouseMove()))};Ef.prototype.doKeyUp=function(){var a=this.h;null!==a&&null!==a.Q&&this.ta&&this.doMouseMove()};function xg(a,b){for(var c=Infinity,d=Infinity,e=-Infinity,g=-Infinity,h=a.j;h.next();){var k=h.value;if(k.Td()&&k.Na()){var l=k.location,k=l.x,l=l.y;isNaN(k)||isNaN(l)||(k<c&&(c=k),l<d&&(d=l),k>e&&(e=k),l>g&&(g=l))}}Infinity===c?b.n(0,0,0,0):b.n(c,d,e-c,g-d)}
- function yg(a,b){if(null===a.wc){var c=a.h;if(!(null===c||b&&(c.xb||c.Bf))&&null!==a.ic){var d=c.na;d.isEnabled&&d.wE?null!==d.Ti&&0<d.Ti.kh.count&&(c.na.yp(),c.ec("Drag")):pg(a);c.mb=!b;c.sn=!b;a.lk=c.Cc.ga;d=a.UG?a.ic.dj():c.selection;d=c.No(d,c,!0);for(c=d.j;c.next();)c.value.location=c.key.location;c=w.eg();xg(d,c);w.qc(c);for(var c=new ta(C),e=a.ic.j;e.next();){var g=e.key;g.Td()&&g.canCopy()&&(g=d.za(g),null!==g&&(g.xf(),c.add(g,fg(g.location))))}for(d=d.j;d.next();)e=d.value,e instanceof G&&
- e.canCopy()&&c.add(e,fg());a.wc=c;Mf(a,c.dj());null!==a.Zc&&(c=a.Zc,d=c.hn,c.El(a.lk.x-(d.x+d.width/2),a.lk.y-(d.y+d.height/2)))}}}function mg(a){var b=a.h;if(null!==b){if(null!==a.wc&&(b.vA(a.wc.dj(),!1),a.wc=null,null!==a.ic))for(var c=a.ic.j;c.next();)c.key instanceof G&&(c.value.point=new I(0,0));b.mb=!1;b.sn=!1;a.lk=b.Cc.ga}}function lg(a){if(null!==a.Zc){if(a.Wi&&null!==a.Di){var b=a.Di;b.h.remove(b.ze);b.h.remove(b.Ae)}a.Zc=null;a.Di=null}}
- function zg(a,b,c){var d=a.h;if(null!==d){var e=a.lk,g=w.O();g.assign(d.Q.ga);a.moveParts(b,g.Pt(e),c);w.A(g)}}
- Ef.prototype.moveParts=function(a,b,c){if(null!==a&&(w.k(a,ta,Ef,"moveParts:parts"),0!==a.count)){var d=w.O(),e=w.O();e.assign(b);isNaN(e.x)&&(e.x=0);isNaN(e.y)&&(e.y=0);(b=this.Gv)||Nf(this,a);for(var g=new K(Ag),h=new K(Wa),k=a.j;k.next();){var l=k.key;if(l.Td()){var m=Bg(this,l,a);if(null!==m)g.add(new Ag(l,k.value,m));else if(!c||l.canMove()){m=k.value.point;d.assign(m);var n=w.O(),p=this.computeMove(l,d.add(e),a,n);l.location=p;k.value.uF=n.Pt(m);w.A(n)}}else k.key instanceof G&&h.add(k.Ib)}for(c=
- g.j;c.next();)g=c.value,m=g.info.point,d.assign(m),g.Kc.location=d.add(g.EH.uF);c=w.O();m=w.O();for(h=h.j;h.next();)if(k=h.value,g=k.key,g instanceof G)if(g.Gp)l=g.aa,n=g.fa,null!==this.Zc&&this.Wi?(k=k.value.point,a.add(g,fg(e)),l=e.x-k.x,k=e.y-k.y,g.El(l,k)):(null!==l&&(c.assign(l.location),p=a.za(l),null!==p&&c.Pt(p.point)),null!==n&&(m.assign(n.location),p=a.za(n),null!==p&&m.Pt(p.point)),null!==l&&null!==n?c.Me(m)?(k=k.value.point,l=d,l.assign(c),l.Pt(k),a.add(g,fg(c)),g.El(l.x,l.y)):(g.Gp=!1,
- g.dc()):(k=k.value.point,n=null!==l?c:null!==n?m:e,a.add(g,fg(n)),l=n.x-k.x,k=n.y-k.y,g.El(l,k)));else if(null===g.aa||null===g.fa)k=k.value.point,a.add(g,fg(e)),l=e.x-k.x,k=e.y-k.y,g.El(l,k);w.A(d);w.A(e);w.A(c);w.A(m);b||jg(this,a)}};function Bg(a,b,c){b=b.Va;if(null!==b){a=Bg(a,b,c);if(null!==a)return a;a=c.za(b);if(null!==a)return a}return null}
- function pg(a){if(null!==a.ic){for(var b=a.h,c=a.ic.j;c.next();){var d=c.key;d.Td()&&(d.location=c.value.point)}for(c=a.ic.j;c.next();)if(d=c.key,d instanceof G&&d.Gp){var e=c.value.point;a.ic.add(d,fg());d.El(-e.x,-e.y)}b.mf()}}
- Ef.prototype.computeMove=function(a,b,c,d){void 0===d&&(d=new I);d.assign(b);if(null===a)return d;void 0===c&&(c=null);var e=b;if(this.Ew&&(this.SH||null===c||this.h.Q.up)&&(e=w.O(),c=e,c.assign(b),null!==a)){var g=this.h;if(null!==g){var h=g.$s,k=this.jE,g=k.width,k=k.height,l=this.DH,m=l.x,l=l.y,n=this.CH;if(null!==h){var p=h.ww;isNaN(g)&&(g=p.width);isNaN(k)&&(k=p.height);h=h.iE;isNaN(m)&&(m=h.x);isNaN(l)&&(l=h.y)}h=w.lc(0,0);h.Lt(0,0,g,k,n);O.Ss(b.x,b.y,m+h.x,l+h.y,g,k,c);w.A(h)}}c=null!==a.QD?
- a.QD(a,b,e):e;k=a.rI;g=k.x;isNaN(g)&&(g=a.location.x);k=k.y;isNaN(k)&&(k=a.location.y);h=a.mI;m=h.x;isNaN(m)&&(m=a.location.x);h=h.y;isNaN(h)&&(h=a.location.y);d.n(Math.max(g,Math.min(c.x,m)),Math.max(k,Math.min(c.y,h)));e!==b&&w.A(e);return d};function Cg(a,b){if(null===b)return!0;var c=b.W;return null===c||c instanceof da||c.layer.Hc||a.ic&&a.ic.contains(c)||a.wc&&a.wc.contains(c)?!0:!1}
- function Dg(a,b,c,d){var e=a.h;if(null!==e){a.Wi&&(null!==a.Zc&&(a.Zc.aa=null,a.Zc.fa=null),Eg(a,!1));var g=!1;!1===a.Bv&&(g=e.mb,e.mb=!0);var h=Fg(e,b,null,function(b){return!Cg(a,b)}),k=e.Q;k.ye=h;var l=e.mb;e.mb=!0;var m=ng(a,k,h);if(a.ta||null!==bg){if(null===h){var n=e.vI;null!==n&&(n(k),m=!0)}if(a.ta||null!==bg)if(a.doDragOver(b,h),a.ta||null!==bg)e.mb=l,m&&e.mf(),!1===a.Bv&&(e.mb=g),(e.af||e.bf)&&(c||d)&&Gg(e,k.pe)}}}
- function ng(a,b,c){var d=!1,e=a.oj.length,g=0<e?a.oj[0]:null;if(c===g)return!1;b.$c=!1;for(var h=0;h<e;h++){var k=a.oj[h],l=k.uI;if(null!==l&&(l(b,k,c),d=!0,b.$c))break}a.oj.length=0;if(!a.ta&&null===bg||null===c)return d;for(b.$c=!1;null!==c;)a.oj.push(c),c=Hg(c);e=a.oj.length;for(h=0;h<e&&(k=a.oj[h],l=k.tI,null===l||(l(b,k,g),d=!0,!b.$c));h++);return d}function Hg(a){var b=a.S;return null!==b?b:a instanceof C&&!(a instanceof F)&&(a=a.Va,null!==a&&a.GH)?a:null}
- function Ig(a,b,c){var d=a.Di;if(null===d)return null;var e=a.h.Um(b,d.PE,function(a){return d.findValidLinkablePort(a,c)});a=w.O();for(var g=Infinity,h=null,e=e.j;e.next();){var k=e.value;if(null!==k.W){var l=k.vb(ac,a),l=b.bk(l);l<g&&(h=k,g=l)}}w.A(a);return h}
- function Eg(a,b){var c=a.Zc;if(null!==c&&!(2>c.pa)){var d=a.h;if(null!==d&&!d.xb&&(d=a.Di,null!==d)){var e=null,g=null;null===c.aa&&(e=Ig(a,c.m(0),!1),null!==e&&(g=e.W));var h=null,k=null;null===c.fa&&(h=Ig(a,c.m(c.pa-1),!0),null!==h&&(k=h.W));d.isValidLink(g,e,k,h)?b?(c.Fn=c.m(0).copy(),c.Jn=c.m(c.pa-1).copy(),c.Gp=!1,c.aa=g,null!==e&&(c.Sf=e.td),c.fa=k,null!==h&&(c.Pg=h.td)):Jg(d,g,e,k,h):Jg(d,null,null,null,null)}}}Ef.prototype.doDragOver=function(){};
- function Kg(a,b){var c=a.h;if(null!==c){a.Wi&&Eg(a,!0);ig(a);var d=Fg(c,b,null,function(b){return!Cg(a,b)}),e=c.Q;e.ye=d;if(null!==d){e.$c=!1;for(var g=d;null!==g;){var h=g.bA;if(null!==h&&(h(e,g),e.$c))break;g=Hg(g)}}else h=c.bA,null!==h&&h(e);if(a.ta||null!==bg)if(a.doDropOnto(b,d),a.ta||null!==bg)for(d=c.selection.j;d.next();)e=d.value,e instanceof D&&Lg(c,e.ca)}}Ef.prototype.doDropOnto=function(){};
- Ef.prototype.doMouseMove=function(){if(this.ta){var a=this.h;if(null!==a&&null!==this.Ns&&null!==this.ic){var b=!1,c=!1;this.mayCopy()?(b=!0,a.gc="copy",yg(this,!1),Nf(this,this.wc),zg(this,this.wc,!1),jg(this,this.wc)):this.mayMove()?(c=!0,a.gc="default",mg(this),zg(this,this.ic,!0)):this.mayDragOut()?(a.gc="no-drop",yg(this,!1),zg(this,this.wc,!1)):mg(this);Dg(this,a.Q.ga,c,b)}}};
- Ef.prototype.doMouseUp=function(){if(this.ta){var a=this.h;if(null!==a){var b=!1,c=this.mayCopy();c&&null!==this.wc?(mg(this),yg(this,!0),Nf(this,this.wc),zg(this,this.wc,!1),jg(this,this.wc),null!==this.wc&&a.oF(this.wc.dj())):(b=!0,mg(this),this.mayMove()&&(zg(this,this.ic,!0),this.Bv=!1,Dg(this,a.Q.ga,!0,!1),this.Bv=!0));this.mq=!0;Kg(this,a.Q.ga);if(this.ta){this.wc=null;if(b&&null!==this.ic)for(b=this.ic.j;b.next();){var d=b.key;d instanceof D&&(d=d.Va,null===d||null===d.placeholder||this.ic.contains(d)||
- d.BD&&d.V())}a.xc();jg(this,this.ic);this.Gf=c?"Copy":"Move";a.Ia(c?"SelectionCopied":"SelectionMoved",a.selection)}this.stopTool()}}};Ef.prototype.mayCopy=function(){if(!this.tE)return!1;var a=this.h;if(null===a||a.xb||a.Bf||!a.Fo||!a.Zj||(w.$m?!a.Q.alt:!a.Q.control))return!1;for(a=a.selection.j;a.next();){var b=a.value;if(b.Td()&&b.canCopy())return!0}return null!==this.Zc&&this.Wi&&this.Zc.canCopy()?!0:!1};
- Ef.prototype.mayDragOut=function(){if(!this.tE)return!1;var a=this.h;if(null===a||!a.Xv||!a.Zj||a.fl)return!1;for(a=a.selection.j;a.next();){var b=a.value;if(b.Td()&&b.canCopy())return!0}return null!==this.Zc&&this.Wi&&this.Zc.canCopy()?!0:!1};Ef.prototype.mayMove=function(){var a=this.h;if(null===a||a.xb||!a.fl)return!1;for(a=a.selection.j;a.next();){var b=a.value;if(b.Td()&&b.canMove())return!0}return null!==this.Zc&&this.Wi&&this.Zc.canMove()?!0:!1};var kg=new K(Ef),bg=null,cg=null;
- Ef.prototype.mayDragIn=function(){var a=this.h;if(null===a||!a.lD||a.xb||a.Bf||!a.Fo)return!1;var b=bg;return null===b||b.h.ha.ll!==a.ha.ll?!1:!0};Ef.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.h;a.Tb.cj();Mg(a);a=bg;null!==a&&(a.h.gc="copy")}};Ef.prototype.doSimulatedDragLeave=function(){var a=bg;null!==a&&a.doSimulatedDragOut();this.doCancel()};
- Ef.prototype.doSimulatedDragOver=function(){var a=this.h;if(null!==a){var b=bg;null!==b&&null!==b.ic&&this.mayDragIn()&&(a.gc="copy",Ng(this,b.ic.dj(),!1),zg(this,this.wc,!1),Dg(this,a.Q.ga,!1,!0))}};
- Ef.prototype.doSimulatedDrop=function(){var a=this.h;if(null!==a){var b=bg;null!==b&&(b.mq=!0,mg(this),this.mayDragIn()&&(this.ec("Drop"),Ng(this,b.ic.dj(),!0),zg(this,this.wc,!1),null!==this.wc&&a.oF(this.wc.dj()),this.Gf="ExternalCopy",Kg(this,a.Q.ga),a.xc(),this.wc=null,a.focus(),a.Ia("ExternalObjectsDropped",a.selection),this.mk()))}};
- function Ng(a,b,c){if(null===a.wc){var d=a.h;if(null!==d&&!d.xb&&!d.Bf){d.mb=!c;d.sn=!c;a.lk=d.Q.ga;d=d.No(b,d,!0);c=w.eg();xg(b,c);var e=c.x+c.width/2,g=c.y+c.height/2;w.qc(c);var h=a.Dv;c=new ta(C);var k=w.O();for(b=b.j;b.next();){var l=b.value;if(l.Td()&&l.canCopy()){var m=l.location,l=d.za(l);k.n(h.x-(e-m.x),h.y-(g-m.y));l.location=k;l.xf();c.add(l,fg(k))}}w.A(k);for(d=d.j;d.next();)e=d.value,e instanceof G&&e.canCopy()&&c.add(e,fg());a.wc=c;Mf(a,c.dj());null!==a.Zc&&(c=a.Zc,d=c.hn,c.El(a.lk.x-
- (d.x+d.width/2),a.lk.y-(d.y+d.height/2)))}}}Ef.prototype.doSimulatedDragOut=function(){var a=this.h;null!==a&&(this.mayCopy()||this.mayMove()?a.gc="":a.gc="no-drop")};function gg(a){this.point=a;this.uF=O.ok}w.la("DraggingInfo",gg);function Ag(a,b,c){this.Kc=a;this.info=b;this.EH=c}
- function Og(){0<arguments.length&&w.cd(Og);Ue.call(this);this.wC=100;this.XB=!1;var a=new G,b=new Y;b.Uf=!0;b.stroke="blue";a.add(b);b=new Y;b.Hp="Standard";b.fill="blue";b.stroke="blue";a.add(b);a.jf="Tool";this.TC=a;a=new D;b=new Y;b.td="";b.Kb="Rectangle";b.fill=null;b.stroke="magenta";b.pb=2;b.Ca=O.wx;a.add(b);a.kk=!1;a.jf="Tool";this.RC=a;this.SC=b;a=new D;b=new Y;b.td="";b.Kb="Rectangle";b.fill=null;b.stroke="magenta";b.pb=2;b.Ca=O.wx;a.add(b);a.kk=!1;a.jf="Tool";this.UC=a;this.VC=b;this.sC=
- this.rC=this.nC=this.mC=this.oC=null;this.SB=!0;this.rG=new ta(V,"boolean");this.xC=this.Qk=this.NC=null}w.Pa(Og,Ue);w.la("LinkingBaseTool",Og);Og.prototype.doStop=function(){var a=this.h;null!==a&&hg(a);this.vh=this.uh=this.th=this.sh=this.yc=null;this.px.clear();this.dg=null};w.defineProperty(Og,{PE:"portGravity"},function(){return this.wC},function(a){w.g(a,"number",Og,"portGravity");0<=a&&(this.wC=a)});
- w.defineProperty(Og,{ep:"isUnconnectedLinkValid"},function(){return this.XB},function(a){w.g(a,"boolean",Og,"isUnconnectedLinkValid");this.XB=a});w.defineProperty(Og,{Ng:"temporaryLink"},function(){return this.TC},function(a){w.k(a,G,Og,"temporaryLink");this.TC=a});w.defineProperty(Og,{ze:"temporaryFromNode"},function(){return this.RC},function(a){w.k(a,D,Og,"temporaryFromNode");this.RC=a});
- w.defineProperty(Og,{ln:"temporaryFromPort"},function(){return this.SC},function(a){w.k(a,V,Og,"temporaryFromPort");this.SC=a});w.defineProperty(Og,{Ae:"temporaryToNode"},function(){return this.UC},function(a){w.k(a,D,Og,"temporaryToNode");this.UC=a});w.defineProperty(Og,{mn:"temporaryToPort"},function(){return this.VC},function(a){w.k(a,V,Og,"temporaryToPort");this.VC=a});w.defineProperty(Og,{yc:"originalLink"},function(){return this.oC},function(a){null!==a&&w.k(a,G,Og,"originalLink");this.oC=a});
- w.defineProperty(Og,{sh:"originalFromNode"},function(){return this.mC},function(a){null!==a&&w.k(a,D,Og,"originalFromNode");this.mC=a});w.defineProperty(Og,{th:"originalFromPort"},function(){return this.nC},function(a){null!==a&&w.k(a,V,Og,"originalFromPort");this.nC=a});w.defineProperty(Og,{uh:"originalToNode"},function(){return this.rC},function(a){null!==a&&w.k(a,D,Og,"originalToNode");this.rC=a});
- w.defineProperty(Og,{vh:"originalToPort"},function(){return this.sC},function(a){null!==a&&w.k(a,V,Og,"originalToPort");this.sC=a});w.defineProperty(Og,{ke:"isForwards"},function(){return this.SB},function(a){w.g(a,"boolean",Og,"isForwards");this.SB=a});w.w(Og,{px:"validPortsCache"},function(){return this.rG});w.defineProperty(Og,{dg:"targetPort"},function(){return this.NC},function(a){null!==a&&w.k(a,V,Og,"targetPort");this.NC=a});
- Og.prototype.copyPortProperties=function(a,b,c,d,e){if(null!==a&&null!==b&&null!==c&&null!==d){d.Ca=b.ca.size;e?(d.Eb=b.Eb,d.Nl=b.Nl):(d.Cb=b.Cb,d.sl=b.sl);c.kf=ac;var g=w.O();c.location=b.vb(ac,g);w.A(g);d.angle=b.tl();null!==this.Ww&&this.Ww(a,b,c,d,e)}};Og.prototype.setNoTargetPortProperties=function(a,b,c){null!==b&&(b.Ca=O.wx,b.Cb=Pb,b.Eb=Pb);null!==a&&(a.location=this.h.Q.ga);null!==this.Ww&&this.Ww(null,null,a,b,c)};Og.prototype.doMouseDown=function(){this.ta&&this.doMouseMove()};
- Og.prototype.doMouseMove=function(){if(this.ta){var a=this.h;if(null!==a){this.dg=this.findTargetPort(this.ke);if(null!==this.dg){var b=this.dg.W;if(b instanceof D){this.ke?this.copyPortProperties(b,this.dg,this.Ae,this.mn,!0):this.copyPortProperties(b,this.dg,this.ze,this.ln,!1);return}}this.ke?this.setNoTargetPortProperties(this.Ae,this.mn,!0):this.setNoTargetPortProperties(this.ze,this.ln,!1);(a.af||a.bf)&&Gg(a,a.Q.pe)}}};
- Og.prototype.findValidLinkablePort=function(a,b){if(null===a)return null;var c=a.W;if(!(c instanceof D))return null;for(;null!==a;){var d=b?a.BF:a.cE;if(!0===d&&(null!==a.td||a instanceof D)&&(b?this.isValidTo(c,a):this.isValidFrom(c,a)))return a;if(!1===d)break;a=a.S}return null};
- Og.prototype.findTargetPort=function(a){var b=this.h,c=b.Q.ga,d=this.PE;0>=d&&(d=.1);for(var e=this,g=b.Um(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0),d=Infinity,b=null,g=g.j;g.next();){var h=g.value,k=h.W;if(k instanceof D){var l=h.vb(ac,w.O()),m=c.x-l.x,n=c.y-l.y;w.A(l);l=m*m+n*n;l<d&&(m=this.px.za(h),null!==m?m&&(b=h,d=l):a&&this.isValidLink(this.sh,this.th,k,h)||!a&&this.isValidLink(k,h,this.uh,this.vh)?(this.px.add(h,!0),b=h,d=l):this.px.add(h,!1))}}return null!==b&&(c=b.W,
- c instanceof D&&(null===c.layer||c.layer.Bs))?b:null};Og.prototype.isValidFrom=function(a,b){if(null===a||null===b)return this.ep;if(this.h.Za===this&&(null!==a.layer&&!a.layer.Bs||!0!==b.cE))return!1;var c=b.wH;if(Infinity>c){if(null!==this.yc&&a===this.sh&&b===this.th)return!0;var d=b.td;null===d&&(d="");if(a.rw(d).count>=c)return!1}return!0};
- Og.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.ep;if(this.h.Za===this&&(null!==a.layer&&!a.layer.Bs||!0!==b.BF))return!1;var c=b.lJ;if(Infinity>c){if(null!==this.yc&&a===this.uh&&b===this.vh)return!0;var d=b.td;null===d&&(d="");if(a.Dg(d).count>=c)return!1}return!0};Og.prototype.isInSameNode=function(a,b){if(null===a||null===b)return!1;if(a===b)return!0;var c=a.W,d=b.W;return null!==c&&c===d};
- Og.prototype.isLinked=function(a,b){if(null===a||null===b)return!1;var c=a.W;if(!(c instanceof D))return!1;var d=a.td;null===d&&(d="");var e=b.W;if(!(e instanceof D))return!1;var g=b.td;null===g&&(g="");for(e=e.Dg(g);e.next();)if(g=e.value,g.aa===c&&g.Sf===d)return!0;return!1};
- Og.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.vH&&d.kJ||!this.isInSameNode(b,d))&&(b.uH&&d.jJ||!this.isLinked(b,d)))||null!==this.yc&&(null!==a&&this.isLabelDependentOnLink(a,this.yc)||null!==c&&this.isLabelDependentOnLink(c,this.yc))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a,c,this.yc))return!1;if(null!==a){var e=a.Nw;if(null!==e&&!e(a,b,c,d,this.yc))return!1}if(null!==
- c&&(e=c.Nw,null!==e&&!e(a,b,c,d,this.yc)))return!1;e=this.Nw;return null!==e?e(a,b,c,d,this.yc):!0};Og.prototype.isLabelDependentOnLink=function(a,b){if(null===a)return!1;var c=a.Cd;if(null===c)return!1;if(c===b)return!0;var d=new L(D);d.add(a);return Xg(this,c,b,d)};function Xg(a,b,c,d){if(b===c)return!0;var e=b.aa;if(null!==e&&e.Af&&(d.add(e),Xg(a,e.Cd,c,d)))return!0;b=b.fa;return null!==b&&b.Af&&(d.add(b),Xg(a,b.Cd,c,d))?!0:!1}
- Og.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.ep;var d=this.h.qJ;if(d!==Yg){if(d===Zg){if(null!==c&&!c.Ic)return!0;for(d=b.Vd;d.next();){var e=d.value;if(e!==c&&e.Ic&&e.fa===b)return!1}return!$g(this,a,b,c,!0)}if(d===ah){if(null!==c&&!c.Ic)return!0;for(d=a.Vd;d.next();)if(e=d.value,e!==c&&e.Ic&&e.aa===a)return!1;return!$g(this,a,b,c,!0)}if(d===bh)return a===b?a=!0:(d=new L(D),d.add(b),a=ch(this,d,a,b,c)),!a;if(d===dh)return!$g(this,a,b,c,!1);if(d===
- eh)return a===b?a=!0:(d=new L(D),d.add(b),a=fh(this,d,a,b,c)),!a}return!0};function $g(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var g=b.Vd;g.next();){var h=g.value;if(h!==d&&(!e||h.Ic)&&h.fa===b&&(h=h.aa,h!==b&&$g(a,h,c,d,e)))return!0}return!1}function ch(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var g=c.Vd;g.next();){var h=g.value;if(h!==e&&h.fa===c&&(h=h.aa,h!==c&&ch(a,b,h,d,e)))return!0}return!1}
- function fh(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var g=c.Vd;g.next();){var h=g.value;if(h!==e){var k=h.aa,h=h.fa,k=k===c?h:k;if(k!==c&&fh(a,b,k,d,e))return!0}}return!1}w.defineProperty(Og,{Nw:"linkValidation"},function(){return this.Qk},function(a){null!==a&&w.g(a,"function",Og,"linkValidation");this.Qk=a});w.defineProperty(Og,{Ww:"portTargeted"},function(){return this.xC},function(a){null!==a&&w.g(a,"function",Og,"portTargeted");this.xC=a});
- function Ba(){0<arguments.length&&w.cd(Ba);Og.call(this);this.name="Linking";this.Gx={};this.Fx=null;this.qa=gh;this.Yy=this.JC=null}w.Pa(Ba,Og);w.la("LinkingTool",Ba);var gh;Ba.Either=gh=w.v(Ba,"Either",0);var hh;Ba.ForwardsOnly=hh=w.v(Ba,"ForwardsOnly",0);var ih;Ba.BackwardsOnly=ih=w.v(Ba,"BackwardsOnly",0);w.defineProperty(Ba,{BG:"archetypeLinkData"},function(){return this.Gx},function(a){null!==a&&w.k(a,Object,Ba,"archetypeLinkData");a instanceof V&&w.k(a,G,Ba,"archetypeLinkData");this.Gx=a});
- w.defineProperty(Ba,{oD:"archetypeLabelNodeData"},function(){return this.Fx},function(a){null!==a&&w.k(a,Object,Ba,"archetypeLabelNodeData");a instanceof V&&w.k(a,D,Ba,"archetypeLabelNodeData");this.Fx=a});w.defineProperty(Ba,{direction:"direction"},function(){return this.qa},function(a){w.Ea(a,Ba,Ba,"direction");this.qa=a});w.defineProperty(Ba,{yF:"startObject"},function(){return this.JC},function(a){null!==a&&w.k(a,V,Ba,"startObject");this.JC=a});w.w(Ba,{nx:"startPort"},function(){return this.Yy});
- Ba.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.h;if(null===a||a.xb||a.Bf||!a.Bs)return!1;var b=a.ha;return(b instanceof X||b instanceof Be)&&a.Q.left&&(a.Za===this||this.isBeyondDragSize())?null!==this.findLinkablePort():!1};
- Ba.prototype.findLinkablePort=function(){var a=this.h;if(null===a)return null;var b=this.yF;null===b&&(b=a.he(a.Cc.ga,null,null));if(null===b||!(b.W instanceof D))return null;a=this.direction;if(a===gh||a===hh){var c=this.findValidLinkablePort(b,!1);if(null!==c)return this.ke=!0,c}if(a===gh||a===ih)if(c=this.findValidLinkablePort(b,!0),null!==c)return this.ke=!1,c;return null};
- Ba.prototype.doActivate=function(){var a=this.h;if(null!==a&&(null===this.nx&&(this.Yy=this.findLinkablePort()),null!==this.nx)){this.ec(this.name);a.Pe=!0;a.gc="pointer";if(this.ke){this.th=this.nx;var b=this.th.W;b instanceof D&&(this.sh=b);this.copyPortProperties(this.sh,this.th,this.ze,this.ln,!1)}else this.vh=this.nx,b=this.vh.W,b instanceof D&&(this.uh=b),this.copyPortProperties(this.uh,this.vh,this.Ae,this.mn,!0);a.add(this.ze);a.add(this.Ae);null!==this.Ng&&(null!==this.ze&&(this.Ng.aa=this.ze),
- null!==this.Ae&&(this.Ng.fa=this.Ae),this.Ng.dc(),a.add(this.Ng));this.ta=!0}};Ba.prototype.doDeactivate=function(){this.ta=!1;var a=this.h;null!==a&&(a.remove(this.Ng),a.remove(this.ze),a.remove(this.Ae),a.Pe=!1,a.gc="",this.mk())};Ba.prototype.doStop=function(){Og.prototype.doStop.call(this);this.yF=this.Yy=null};
- Ba.prototype.doMouseUp=function(){if(this.ta){var a=this.h;if(null===a)return;var b=this.Gf=null,c=null,d=null,e=null,g=this.dg=this.findTargetPort(this.ke);if(null!==g){var h=g.W;h instanceof D&&(this.ke?(null!==this.sh&&(b=this.sh,c=this.th),d=h,e=g):(b=h,c=g,null!==this.uh&&(d=this.uh,e=this.vh)))}else this.ke?null!==this.sh&&this.ep&&(b=this.sh,c=this.th):null!==this.uh&&this.ep&&(d=this.uh,e=this.vh);if(null!==b||null!==d)b=this.insertLink(b,c,d,e),null!==b?(null===g&&(this.ke?b.Jn=a.Q.ga.copy():
- b.Fn=a.Q.ga.copy()),a.wf&&a.select(b),this.Gf=this.name,a.Ia("LinkDrawn",b)):a.ha.xD()}this.stopTool()};
- Ba.prototype.insertLink=function(a,b,c,d){var e=this.h;if(null===e)return null;var g=e.ha;if(g instanceof Be){var h=a;b=c;e.Bd||(h=c,b=a);if(null!==h&&null!==b)return g.yh(b.data,g.Db(h.data)),b.Us()}else if(g instanceof X)if(h="",null!==a&&(null===b&&(b=a),h=b.td,null===h&&(h="")),b="",null!==c&&(null===d&&(d=c),b=d.td,null===b&&(b="")),d=this.BG,d instanceof G){if(Cf(d),g=d.copy(),null!==g)return g.aa=a,g.Sf=h,g.fa=c,g.Pg=b,e.add(g),a=this.oD,a instanceof D&&(Cf(a),a=a.copy(),null!==a&&(a.Cd=g,
- e.add(a))),g}else if(null!==d&&(d=g.FD(d),w.$a(d)))return null!==a&&g.hx(d,g.Db(a.data)),g.zA(d,h),null!==c&&g.jx(d,g.Db(c.data)),g.DA(d,b),g.Uv(d),a=this.oD,null===a||a instanceof D||(a=g.copyNodeData(a),w.$a(a)&&(g.Hm(a),a=g.Db(a),void 0!==a&&g.kz(d,a))),g=e.Cg(d);return null};
- function dg(){0<arguments.length&&w.cd(dg);Og.call(this);this.name="Relinking";var a=new Y;a.Kb="Diamond";a.Ca=O.tx;a.fill="lightblue";a.stroke="dodgerblue";a.cursor="pointer";a.bg=0;this.GB=a;a=new Y;a.Kb="Diamond";a.Ca=O.tx;a.fill="lightblue";a.stroke="dodgerblue";a.cursor="pointer";a.bg=-1;this.WC=a;this.fc=null;this.pC=new x}w.Pa(dg,Og);w.la("RelinkingTool",dg);
- dg.prototype.updateAdornments=function(a){if(null!==a&&a instanceof G){var b="RelinkFrom",c=null;if(a.cb&&!this.h.xb){var d=a.jn;null!==d&&a.canRelinkFrom()&&a.ca.J()&&a.Na()&&d.ca.J()&&d.Dl()&&(c=a.So(b),null===c&&(c=this.makeAdornment(d,!1),null!==c&&(c.Tc=b),a.cl(b,c)))}null===c&&a.Hl(b);b="RelinkTo";c=null;a.cb&&!this.h.xb&&(d=a.jn,null!==d&&a.canRelinkTo()&&a.ca.J()&&a.Na()&&d.ca.J()&&d.Dl()&&(c=a.So(b),null===c&&(c=this.makeAdornment(d,!0),null!==c&&(c.Tc=b),a.cl(b,c))));null===c&&a.Hl(b)}};
- dg.prototype.makeAdornment=function(a,b){var c=new da;c.type=jh;var d=b?this.iJ:this.tH;null!==d&&c.add(d.copy());c.Bc=a;return c};w.defineProperty(dg,{tH:"fromHandleArchetype"},function(){return this.GB},function(a){null!==a&&w.k(a,V,dg,"fromHandleArchetype");this.GB=a});w.defineProperty(dg,{iJ:"toHandleArchetype"},function(){return this.WC},function(a){null!==a&&w.k(a,V,dg,"toHandleArchetype");this.WC=a});w.w(dg,{handle:"handle"},function(){return this.fc});
- dg.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.h;if(null===a||a.xb||a.Bf||!a.Jm)return!1;var b=a.ha;if(!(b instanceof X||b instanceof Be)||!a.Q.left)return!1;b=this.findToolHandleAt(a.Cc.ga,"RelinkFrom");null===b&&(b=this.findToolHandleAt(a.Cc.ga,"RelinkTo"));return null!==b};
- dg.prototype.doActivate=function(){var a=this.h;if(null!==a){if(null===this.yc){var b=this.findToolHandleAt(a.Cc.ga,"RelinkFrom");null===b&&(b=this.findToolHandleAt(a.Cc.ga,"RelinkTo"));if(null===b)return;var c=b.W;if(!(c instanceof da&&c.Zh instanceof G))return;this.fc=b;this.ke=null===c||"RelinkTo"===c.Tc;this.yc=c.Zh}this.ec(this.name);a.Pe=!0;a.gc="pointer";this.th=this.yc.nd;this.sh=this.yc.aa;this.vh=this.yc.Wd;this.uh=this.yc.fa;this.pC.set(this.yc.ca);null!==this.yc&&0<this.yc.pa&&(null===
- this.yc.aa&&(null!==this.ln&&(this.ln.Ca=O.pn),null!==this.ze&&(this.ze.location=this.yc.m(0))),null===this.yc.fa&&(null!==this.mn&&(this.mn.Ca=O.pn),null!==this.Ae&&(this.Ae.location=this.yc.m(this.yc.pa-1))));this.copyPortProperties(this.sh,this.th,this.ze,this.ln,!1);this.copyPortProperties(this.uh,this.vh,this.Ae,this.mn,!0);a.add(this.ze);a.add(this.Ae);null!==this.Ng&&(null!==this.ze&&(this.Ng.aa=this.ze),null!==this.Ae&&(this.Ng.fa=this.Ae),this.copyLinkProperties(this.yc,this.Ng),this.Ng.dc(),
- a.add(this.Ng));this.ta=!0}};dg.prototype.copyLinkProperties=function(a,b){if(null!==a&&null!==b){b.zs=a.zs;b.xz=a.xz;var c=a.df;if(c===kh||c===lh)c=mh;b.df=c;b.jw=a.jw;b.Zw=a.Zw;b.Ep=a.Ep;b.Cb=a.Cb;b.sl=a.sl;b.Ys=a.Ys;b.Zs=a.Zs;b.Eb=a.Eb;b.Nl=a.Nl;b.Rt=a.Rt;b.Tt=a.Tt}};dg.prototype.doDeactivate=function(){this.ta=!1;var a=this.h;null!==a&&(a.remove(this.Ng),a.remove(this.ze),a.remove(this.Ae),a.Pe=!1,a.gc="",this.mk())};dg.prototype.doStop=function(){Og.prototype.doStop.call(this);this.fc=null};
- dg.prototype.doMouseUp=function(){if(this.ta){var a=this.h;if(null===a)return;this.Gf=null;var b=this.sh,c=this.th,d=this.uh,e=this.vh,g=this.yc;this.dg=this.findTargetPort(this.ke);if(null!==this.dg){var h=this.dg.W;h instanceof D&&(this.ke?(d=h,e=this.dg):(b=h,c=this.dg))}else this.ep?this.ke?e=d=null:c=b=null:g=null;null!==g&&(this.reconnectLink(g,this.ke?d:b,this.ke?e:c,this.ke),null===this.dg&&(this.ke?g.Jn=a.Q.ga.copy():g.Fn=a.Q.ga.copy(),g.dc()),a.wf&&(g.cb=!0),this.Gf=this.name,a.Ia("LinkRelinked",
- g,this.ke?this.vh:this.th));nh(this.yc,this.pC)}this.stopTool()};dg.prototype.reconnectLink=function(a,b,c,d){if(null===this.h)return!1;c=null!==c&&null!==c.td?c.td:"";d?(a.fa=b,a.Pg=c):(a.aa=b,a.Sf=c);return!0};function Jg(a,b,c,d,e){null!==b?(a.copyPortProperties(b,c,a.ze,a.ln,!1),a.h.add(a.ze)):a.h.remove(a.ze);null!==d?(a.copyPortProperties(d,e,a.Ae,a.mn,!0),a.h.add(a.Ae)):a.h.remove(a.Ae)}
- function oh(){0<arguments.length&&w.cd(oh);Ue.call(this);this.name="LinkReshaping";var a=new Y;a.Kb="Rectangle";a.Ca=O.Kp;a.fill="lightblue";a.stroke="dodgerblue";this.Ik=a;a=new Y;a.Kb="Diamond";a.Ca=O.Kp;a.fill="lightblue";a.stroke="dodgerblue";this.cC=a;this.yC=3;this.Dx=this.fc=null;this.qC=new I;this.Ny=null}w.Pa(oh,Ue);w.la("LinkReshapingTool",oh);var ph;oh.None=ph=w.v(oh,"None",0);var qh;oh.Horizontal=qh=w.v(oh,"Horizontal",1);var rh;oh.Vertical=rh=w.v(oh,"Vertical",2);var sh;
- oh.All=sh=w.v(oh,"All",3);oh.prototype.getReshapingBehavior=oh.prototype.hE=function(a){return a&&a.zC?a.zC:ph};oh.prototype.setReshapingBehavior=oh.prototype.Kt=function(a,b){w.k(a,V,oh,"setReshapingBehavior:obj");w.Ea(b,oh,oh,"setReshapingBehavior:behavior");a.zC=b};
- oh.prototype.updateAdornments=function(a){if(null!==a&&a instanceof G){if(a.cb&&!this.h.xb){var b=a.path;if(null!==b&&a.canReshape()&&a.ca.J()&&a.Na()&&b.ca.J()&&b.Dl()){var c=a.So(this.name);if(null===c||c.kG!==a.pa||c.tG!==a.Dt)c=this.makeAdornment(b),null!==c&&(c.kG=a.pa,c.tG=a.Dt,a.cl(this.name,c));if(null!==c){c.location=a.position;return}}}a.Hl(this.name)}};
- oh.prototype.makeAdornment=function(a){var b=a.W,c=b.pa,d=b.jc,e=null;if(null!==b.points&&1<c){e=new da;e.type=jh;var c=b.Vs,g=b.Kw,h=d?1:0;if(b.Dt&&b.df!==th)for(var k=c+h;k<g-h;k++){var l=this.makeResegmentHandle(a,k);null!==l&&(l.bg=k,l.ax=.5,e.add(l))}for(k=c+1;k<g;k++)if(l=this.makeHandle(a,k),null!==l){l.bg=k;if(k!==c)if(k===c+1&&d){var h=b.m(c),m=b.m(c+1);O.F(h.x,m.x)&&O.F(h.y,m.y)&&(m=b.m(c-1));O.F(h.x,m.x)?(this.Kt(l,rh),l.cursor="n-resize"):O.F(h.y,m.y)&&(this.Kt(l,qh),l.cursor="w-resize")}else k===
- g-1&&d?(h=b.m(g-1),m=b.m(g),O.F(h.x,m.x)&&O.F(h.y,m.y)&&(h=b.m(g+1)),O.F(h.x,m.x)?(this.Kt(l,rh),l.cursor="n-resize"):O.F(h.y,m.y)&&(this.Kt(l,qh),l.cursor="w-resize")):k!==g&&(this.Kt(l,sh),l.cursor="move");e.add(l)}e.Tc=this.name;e.Bc=a}return e};oh.prototype.makeHandle=function(){var a=this.at;return null===a?null:a.copy()};w.defineProperty(oh,{at:"handleArchetype"},function(){return this.Ik},function(a){null!==a&&w.k(a,V,oh,"handleArchetype");this.Ik=a});
- oh.prototype.makeResegmentHandle=function(){var a=this.qI;return null===a?null:a.copy()};w.defineProperty(oh,{qI:"midHandleArchetype"},function(){return this.cC},function(a){null!==a&&w.k(a,V,oh,"midHandleArchetype");this.cC=a});w.w(oh,{handle:"handle"},function(){return this.fc});w.w(oh,{As:"adornedLink"},function(){return this.Dx});oh.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.h;return null!==a&&!a.xb&&a.Zv&&a.Q.left?null!==this.findToolHandleAt(a.Cc.ga,this.name):!1};
- oh.prototype.doActivate=function(){var a=this.h;if(null!==a&&(this.fc=this.findToolHandleAt(a.Cc.ga,this.name),null!==this.fc)){var b=this.fc.W.Zh;if(b instanceof G){this.Dx=b;a.Pe=!0;this.ec(this.name);if(b.Dt&&.5===this.fc.ax){var c=b.points.copy(),d=this.fc.vb(ac);c.ie(this.fc.bg+1,d);b.jc&&c.ie(this.fc.bg+1,d);b.points=c;b.je();this.fc=this.findToolHandleAt(a.Cc.ga,this.name)}this.qC=b.m(this.fc.bg);this.Ny=b.points.copy();this.ta=!0}}};
- oh.prototype.doDeactivate=function(){this.mk();this.Dx=this.fc=null;var a=this.h;null!==a&&(a.Pe=!1);this.ta=!1};oh.prototype.doCancel=function(){var a=this.As;null!==a&&(a.points=this.Ny);this.stopTool()};oh.prototype.doMouseMove=function(){var a=this.h;this.ta&&null!==a&&(a=this.computeReshape(a.Q.ga),this.reshape(a))};
- oh.prototype.doMouseUp=function(){var a=this.h;if(this.ta&&null!==a){var b=this.computeReshape(a.Q.ga);this.reshape(b);b=this.As;if(null!==b&&b.Dt){var c=this.handle.bg,d=b.m(c-1),e=b.m(c),g=b.m(c+1);if(b.jc){if(c>b.Vs+1&&c<b.Kw-1){var h=b.m(c-2);if(Math.abs(d.x-e.x)<this.wh&&Math.abs(d.y-e.y)<this.wh&&(uh(this,h,d,e,g,!0)||uh(this,h,d,e,g,!1))){var k=b.points.copy();uh(this,h,d,e,g,!0)?(k.Lg(c-2,new I(h.x,(g.y+h.y)/2)),k.Lg(c+1,new I(g.x,(g.y+h.y)/2))):(k.Lg(c-2,new I((g.x+h.x)/2,h.y)),k.Lg(c+1,
- new I((g.x+h.x)/2,g.y)));k.ud(c);k.ud(c-1);b.points=k;b.je()}else h=b.m(c+2),Math.abs(e.x-g.x)<this.wh&&Math.abs(e.y-g.y)<this.wh&&(uh(this,d,e,g,h,!0)||uh(this,d,e,g,h,!1))&&(k=b.points.copy(),uh(this,d,e,g,h,!0)?(k.Lg(c-1,new I(d.x,(d.y+h.y)/2)),k.Lg(c+2,new I(h.x,(d.y+h.y)/2))):(k.Lg(c-1,new I((d.x+h.x)/2,d.y)),k.Lg(c+2,new I((d.x+h.x)/2,h.y))),k.ud(c+1),k.ud(c),b.points=k,b.je())}}else h=w.O(),O.dn(d.x,d.y,g.x,g.y,e.x,e.y,h)&&h.bk(e)<this.wh*this.wh&&(k=b.points.copy(),k.ud(c),b.points=k,b.je()),
- w.A(h)}a.xc();this.Gf=this.name;a.Ia("LinkReshaped",this.As)}this.stopTool()};function uh(a,b,c,d,e,g){return g?Math.abs(b.y-c.y)<a.wh&&Math.abs(c.y-d.y)<a.wh&&Math.abs(d.y-e.y)<a.wh:Math.abs(b.x-c.x)<a.wh&&Math.abs(c.x-d.x)<a.wh&&Math.abs(d.x-e.x)<a.wh}w.defineProperty(oh,{wh:"resegmentingDistance"},function(){return this.yC},function(a){w.g(a,"number",oh,"resegmentingDistance");this.yC=a});
- oh.prototype.reshape=function(a){var b=this.As;b.Jl();var c=this.handle.bg,d=this.hE(this.handle);if(b.jc)if(c===b.Vs+1)c=b.Vs+1,d===rh?(b.ba(c,b.m(c-1).x,a.y),b.ba(c+1,b.m(c+2).x,a.y)):d===qh&&(b.ba(c,a.x,b.m(c-1).y),b.ba(c+1,a.x,b.m(c+2).y));else if(c===b.Kw-1)c=b.Kw-1,d===rh?(b.ba(c-1,b.m(c-2).x,a.y),b.ba(c,b.m(c+1).x,a.y)):d===qh&&(b.ba(c-1,a.x,b.m(c-2).y),b.ba(c,a.x,b.m(c+1).y));else{var d=c,e=b.m(d),g=b.m(d-1),h=b.m(d+1);O.F(g.x,e.x)&&O.F(e.y,h.y)?(O.F(g.x,b.m(d-2).x)&&!O.F(g.y,b.m(d-2).y)?
- (b.B(d,a.x,g.y),c++,d++):b.ba(d-1,a.x,g.y),O.F(h.y,b.m(d+2).y)&&!O.F(h.x,b.m(d+2).x)?b.B(d+1,h.x,a.y):b.ba(d+1,h.x,a.y)):O.F(g.y,e.y)&&O.F(e.x,h.x)?(O.F(g.y,b.m(d-2).y)&&!O.F(g.x,b.m(d-2).x)?(b.B(d,g.x,a.y),c++,d++):b.ba(d-1,g.x,a.y),O.F(h.x,b.m(d+2).x)&&!O.F(h.y,b.m(d+2).y)?b.B(d+1,a.x,h.y):b.ba(d+1,a.x,h.y)):O.F(g.x,e.x)&&O.F(e.x,h.x)?(O.F(g.x,b.m(d-2).x)&&!O.F(g.y,b.m(d-2).y)?(b.B(d,a.x,g.y),c++,d++):b.ba(d-1,a.x,g.y),O.F(h.x,b.m(d+2).x)&&!O.F(h.y,b.m(d+2).y)?b.B(d+1,a.x,h.y):b.ba(d+1,a.x,h.y)):
- O.F(g.y,e.y)&&O.F(e.y,h.y)&&(O.F(g.y,b.m(d-2).y)&&!O.F(g.x,b.m(d-2).x)?(b.B(d,g.x,a.y),c++,d++):b.ba(d-1,g.x,a.y),O.F(h.y,b.m(d+2).y)&&!O.F(h.x,b.m(d+2).x)?b.B(d+1,h.x,a.y):b.ba(d+1,h.x,a.y));b.ba(c,a.x,a.y)}else b.ba(c,a.x,a.y),1===c&&b.computeSpot(!0).we()&&(e=b.aa,g=b.nd,null===e||e.Na()||(e=e.findVisibleNode(),e!==b.aa&&(g=e.rl(""))),d=g.vb(ac,w.O()),e=b.getLinkPointFromPoint(e,g,d,a,!0,w.O()),b.ba(0,e.x,e.y),w.A(d),w.A(e)),c===b.pa-2&&b.computeSpot(!1).we()&&(c=b.fa,e=b.Wd,null===c||c.Na()||
- (c=c.findVisibleNode(),c!==b.fa&&(e=c.rl(""))),d=e.vb(ac,w.O()),e=b.getLinkPointFromPoint(c,e,d,a,!1,w.O()),b.ba(b.pa-1,e.x,e.y),w.A(d),w.A(e));b.Ri()};oh.prototype.computeReshape=function(a){var b=this.As,c=this.handle.bg;switch(this.hE(this.handle)){case sh:return a;case rh:return b=b.m(c),new I(b.x,a.y);case qh:return b=b.m(c),new I(a.x,b.y);default:case ph:return b.m(c)}};w.w(oh,{WK:"originalPoint"},function(){return this.qC});w.w(oh,{XK:"originalPoints"},function(){return this.Ny});
- function vh(){0<arguments.length&&w.cd(vh);Ue.call(this);this.name="Resizing";this.Ej=(new pa(1,1)).freeze();this.Cj=(new pa(9999,9999)).freeze();this.jj=(new pa(NaN,NaN)).freeze();this.Dq=!1;this.Lb=null;var a=new Y;a.Yj=ac;a.Kb="Rectangle";a.Ca=O.Kp;a.fill="lightblue";a.stroke="dodgerblue";a.pb=1;a.cursor="pointer";this.Ik=a;this.fc=null;this.pv=new pa;this.My=new I;this.my=new pa(0,0);this.ly=new pa(Infinity,Infinity);this.ky=new pa(1,1);this.jC=!0}w.Pa(vh,Ue);w.la("ResizingTool",vh);
- vh.prototype.updateAdornments=function(a){if(!(null===a||a instanceof G)){if(a.cb&&!this.h.xb){var b=a.dF;if(null!==b&&a.canResize()&&a.ca.J()&&a.Na()&&b.ca.J()&&b.Dl()){var c=a.So(this.name);null===c&&(c=this.makeAdornment(b));if(null!==c){var d=b.tl();c.angle=d;var e=b.vb(c.kf,w.O()),g=b.Xi();c.location=e;w.A(e);e=c.placeholder;if(null!==e){var b=b.Ha,h=w.Ml();h.n(b.width*g,b.height*g);e.Ca=h;w.ek(h)}wh(this,c,d);a.cl(this.name,c);return}}}a.Hl(this.name)}};
- vh.prototype.makeAdornment=function(a){var b=null,b=a.W.cF;if(null===b){b=new da;b.type=xh;b.kf=ac;var c=new yh;c.Uf=!0;b.add(c);b.add(this.makeHandle(a,Xb));b.add(this.makeHandle(a,Zb));b.add(this.makeHandle(a,jc));b.add(this.makeHandle(a,cc));b.add(this.makeHandle(a,Qc));b.add(this.makeHandle(a,Xc));b.add(this.makeHandle(a,Yc));b.add(this.makeHandle(a,Wc))}else if(Cf(b),b=b.copy(),null===b)return null;b.Tc=this.name;b.Bc=a;return b};
- vh.prototype.makeHandle=function(a,b){var c=this.at;if(null===c)return null;c=c.copy();c.alignment=b;return c};
- function wh(a,b,c){if(null!==b)if(!b.alignment.Uc()&&""!==b.cursor)a:{a=b.alignment;a.we()&&(a=ac);if(0>=a.x)c=0>=a.y?c+225:1<=a.y?c+135:c+180;else if(1<=a.x)0>=a.y?c+=315:1<=a.y&&(c+=45);else if(0>=a.y)c+=270;else if(1<=a.y)c+=90;else break a;0>c?c+=360:360<=c&&(c-=360);b.cursor=22.5>c?"e-resize":67.5>c?"se-resize":112.5>c?"s-resize":157.5>c?"sw-resize":202.5>c?"w-resize":247.5>c?"nw-resize":292.5>c?"n-resize":337.5>c?"ne-resize":"e-resize"}else if(b instanceof H)for(b=b.elements;b.next();)wh(a,
- b.value,c)}w.defineProperty(vh,{at:"handleArchetype"},function(){return this.Ik},function(a){null!==a&&w.k(a,V,vh,"handleArchetype");this.Ik=a});w.w(vh,{handle:"handle"},function(){return this.fc});w.defineProperty(vh,{Bc:"adornedObject"},function(){return this.Lb},function(a){null!==a&&w.k(a,V,vh,"adornedObject");this.Lb=a});vh.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.h;return null!==a&&!a.xb&&a.Cs&&a.Q.left?null!==this.findToolHandleAt(a.Cc.ga,this.name)?!0:!1:!1};
- vh.prototype.doActivate=function(){var a=this.h;null!==a&&(this.fc=this.findToolHandleAt(a.Cc.ga,this.name),null!==this.fc&&(this.Lb=this.fc.W.Bc,this.My.set(this.Lb.W.location),this.pv.set(this.Lb.Ca),this.ky=this.computeCellSize(),this.my=this.computeMinSize(),this.ly=this.computeMaxSize(),a.Pe=!0,this.jC=a.Tb.isEnabled,a.Tb.isEnabled=!1,this.ec(this.name),this.ta=!0))};vh.prototype.doDeactivate=function(){var a=this.h;null!==a&&(this.mk(),this.Lb=this.fc=null,this.ta=a.Pe=!1,a.Tb.isEnabled=this.jC)};
- vh.prototype.doCancel=function(){this.Lb.Ca=this.pv;this.Lb.W.location=this.My;this.stopTool()};vh.prototype.doMouseMove=function(){var a=this.h;if(this.ta&&null!==a){var b=this.my,c=this.ly,d=this.ky,e=this.Lb.gE(a.Q.ga,w.O()),g=zh;this.Lb instanceof Y&&(g=Ah(this.Lb));b=this.computeResize(e,this.fc.alignment,b,c,d,!(g===Bh||g===Lh||a.Q.shift));this.resize(b);a.mf();w.A(e)}};
- vh.prototype.doMouseUp=function(){var a=this.h;if(this.ta&&null!==a){var b=this.my,c=this.ly,d=this.ky,e=this.Lb.gE(a.Q.ga,w.O()),g=zh;this.Lb instanceof Y&&(g=Ah(this.Lb));b=this.computeResize(e,this.fc.alignment,b,c,d,!(g===Bh||g===Lh||a.Q.shift));this.resize(b);w.A(e);a.xc();this.Gf=this.name;a.Ia("PartResized",this.Lb,this.pv)}this.stopTool()};
- vh.prototype.resize=function(a){if(null!==this.h){var b=this.Bc,c=b.W,d=b.tl(),e=b.Xi(),g=Math.PI*d/180,h=Math.cos(g),g=Math.sin(g),k=0<d&&180>d?1:0,l=90<d&&270>d?1:0,d=180<d&&360>d?1:0,m=b.Ha.width,n=b.Ha.height;b.Ca=a.size;var p=c.position.copy();c.xf();m=b.Ha.width-m;n=b.Ha.height-n;if(0!==m||0!==n)0!==m&&(p.x+=e*((a.x+m*l)*h-(a.y+n*k)*g)),0!==n&&(p.y+=e*((a.x+m*d)*g+(a.y+n*l)*h)),c.move(p),c instanceof D&&c.hf()}};
- vh.prototype.computeResize=function(a,b,c,d,e,g){b.we()&&(b=ac);var h=this.Bc.Ha,k=h.x,l=h.y,m=h.x+h.width,n=h.y+h.height,p=1;if(!g){var p=h.width,q=h.height;0>=p&&(p=1);0>=q&&(q=1);p=q/p}q=w.O();O.Ss(a.x,a.y,k,l,e.width,e.height,q);a=h.copy();0>=b.x?0>=b.y?(a.x=Math.max(q.x,m-d.width),a.x=Math.min(a.x,m-c.width),a.width=Math.max(m-a.x,c.width),a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height),a.height=Math.max(n-a.y,c.height),g||(b=a.height/a.width,p<b?(a.height=p*a.width,a.y=n-a.height):
- (a.width=a.height/p,a.x=m-a.width))):1<=b.y?(a.x=Math.max(q.x,m-d.width),a.x=Math.min(a.x,m-c.width),a.width=Math.max(m-a.x,c.width),a.height=Math.max(Math.min(q.y-l,d.height),c.height),g||(b=a.height/a.width,p<b?a.height=p*a.width:(a.width=a.height/p,a.x=m-a.width))):(a.x=Math.max(q.x,m-d.width),a.x=Math.min(a.x,m-c.width),a.width=m-a.x,g||(a.height=p*a.width,a.y=l+.5*(n-l-a.height))):1<=b.x?0>=b.y?(a.width=Math.max(Math.min(q.x-k,d.width),c.width),a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-
- c.height),a.height=Math.max(n-a.y,c.height),g||(b=a.height/a.width,p<b?(a.height=p*a.width,a.y=n-a.height):a.width=a.height/p)):1<=b.y?(a.width=Math.max(Math.min(q.x-k,d.width),c.width),a.height=Math.max(Math.min(q.y-l,d.height),c.height),g||(b=a.height/a.width,p<b?a.height=p*a.width:a.width=a.height/p)):(a.width=Math.max(Math.min(q.x-k,d.width),c.width),g||(a.height=p*a.width,a.y=l+.5*(n-l-a.height))):0>=b.y?(a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height),a.height=n-a.y,g||(a.width=a.height/
- p,a.x=k+.5*(m-k-a.width))):1<=b.y&&(a.height=Math.max(Math.min(q.y-l,d.height),c.height),g||(a.width=a.height/p,a.x=k+.5*(m-k-a.width)));w.A(q);return a};vh.prototype.computeMinSize=function(){var a=this.Bc.Df.copy(),b=this.Df;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a};
- vh.prototype.computeMaxSize=function(){var a=this.Bc.xe.copy(),b=this.xe;!isNaN(b.width)&&b.width<a.width&&(a.width=b.width);!isNaN(b.height)&&b.height<a.height&&(a.height=b.height);return a};
- vh.prototype.computeCellSize=function(){var a=new pa(NaN,NaN),b=this.Bc.W;if(null!==b){var c=b.JI;!isNaN(c.width)&&0<c.width&&(a.width=c.width);!isNaN(c.height)&&0<c.height&&(a.height=c.height)}c=this.Ko;isNaN(a.width)&&!isNaN(c.width)&&0<c.width&&(a.width=c.width);isNaN(a.height)&&!isNaN(c.height)&&0<c.height&&(a.height=c.height);b=this.h;(isNaN(a.width)||isNaN(a.height))&&b&&(c=b.zb.Sd,null!==c&&c.Ew&&(c=c.jE,isNaN(a.width)&&!isNaN(c.width)&&0<c.width&&(a.width=c.width),isNaN(a.height)&&!isNaN(c.height)&&
- 0<c.height&&(a.height=c.height)),b=b.$s,null!==b&&b.visible&&this.Ew&&(c=b.ww,isNaN(a.width)&&!isNaN(c.width)&&0<c.width&&(a.width=c.width),isNaN(a.height)&&!isNaN(c.height)&&0<c.height&&(a.height=c.height)));if(isNaN(a.width)||0===a.width||Infinity===a.width)a.width=1;if(isNaN(a.height)||0===a.height||Infinity===a.height)a.height=1;return a};
- w.defineProperty(vh,{Df:"minSize"},function(){return this.Ej},function(a){w.k(a,pa,vh,"minSize");if(!this.Ej.N(a)){var b=a.width;isNaN(b)&&(b=0);a=a.height;isNaN(a)&&(a=0);this.Ej.n(b,a)}});w.defineProperty(vh,{xe:"maxSize"},function(){return this.Cj},function(a){w.k(a,pa,vh,"maxSize");if(!this.Cj.N(a)){var b=a.width;isNaN(b)&&(b=Infinity);a=a.height;isNaN(a)&&(a=Infinity);this.Cj.n(b,a)}});
- w.defineProperty(vh,{Ko:"cellSize"},function(){return this.jj},function(a){w.k(a,pa,vh,"cellSize");this.jj.N(a)||this.jj.assign(a)});w.defineProperty(vh,{Ew:"isGridSnapEnabled"},function(){return this.Dq},function(a){w.g(a,"boolean",vh,"isGridSnapEnabled");this.Dq=a});w.w(vh,{UK:"originalDesiredSize"},function(){return this.pv});w.w(vh,{VK:"originalLocation"},function(){return this.My});
- function Mh(){0<arguments.length&&w.cd(Mh);Ue.call(this);this.name="Rotating";this.GC=45;this.FC=2;this.Lb=null;var a=new Y;a.Kb="Ellipse";a.Ca=O.tx;a.fill="lightblue";a.stroke="dodgerblue";a.pb=1;a.cursor="pointer";this.Ik=a;this.fc=null;this.ov=0;this.AC=new I}w.Pa(Mh,Ue);w.la("RotatingTool",Mh);
- Mh.prototype.updateAdornments=function(a){if(!(null===a||a instanceof G)){if(a.cb&&!this.h.xb){var b=a.hF;if(null!==b&&a.canRotate()&&a.ca.J()&&a.Na()&&b.ca.J()&&b.Dl()){var c=a.So(this.name);null===c&&(c=this.makeAdornment(b));if(null!==c){c.angle=b.tl();var d=null,e=null;b===a||b===a.ac?(d=a.ac,e=a.kf):(d=b,e=ac);for(var g=d.Ha,e=w.lc(g.width*e.x+e.offsetX,g.height*e.y+e.offsetY);null!==d&&d!==b;)d.transform.ib(e),d=d.S;var d=e.y,g=Math.max(e.x-b.Ha.width,0),h=w.O();c.location=b.vb(new Q(1,0,50+
- g,d),h);w.A(h);w.A(e);a.cl(this.name,c);return}}}a.Hl(this.name)}};Mh.prototype.makeAdornment=function(a){var b=null,b=a.W.LI;if(null===b){b=new da;b.type=Nh;b.kf=ac;var c=this.at;null!==c&&b.add(c.copy())}else if(Cf(b),b=b.copy(),null===b)return null;b.Tc=this.name;b.Bc=a;return b};w.defineProperty(Mh,{at:"handleArchetype"},function(){return this.Ik},function(a){null!==a&&w.k(a,V,Mh,"handleArchetype");this.Ik=a});w.w(Mh,{handle:"handle"},function(){return this.fc});
- w.defineProperty(Mh,{Bc:"adornedObject"},function(){return this.Lb},function(a){null!==a&&w.k(a,V,Mh,"adornedObject");this.Lb=a});Mh.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.h;return null!==a&&!a.xb&&a.$v&&a.Q.left?null!==this.findToolHandleAt(a.Cc.ga,this.name)?!0:!1:!1};
- Mh.prototype.doActivate=function(){var a=this.h;if(null!==a&&(this.fc=this.findToolHandleAt(a.Cc.ga,this.name),null!==this.fc)){this.Lb=this.fc.W.Bc;var b=this.Lb.W,c=b.ac;this.AC=this.Lb===b||this.Lb===c?c.vb(b.kf):this.Lb.vb(ac);this.ov=this.Lb.angle;a.Pe=!0;a.Az=!0;this.ec(this.name);this.ta=!0}};Mh.prototype.doDeactivate=function(){var a=this.h;null!==a&&(this.mk(),this.Lb=this.fc=null,this.ta=a.Pe=!1)};Mh.prototype.doCancel=function(){var a=this.h;null!==a&&(a.Az=!1);this.rotate(this.ov);this.stopTool()};
- Mh.prototype.doMouseMove=function(){var a=this.h;this.ta&&null!==a&&(a=this.computeRotate(a.Q.ga),this.rotate(a))};Mh.prototype.doMouseUp=function(){var a=this.h;if(this.ta&&null!==a){a.Az=!1;var b=this.computeRotate(a.Q.ga);this.rotate(b);a.xc();this.Gf=this.name;a.Ia("PartRotated",this.Lb,this.ov)}this.stopTool()};Mh.prototype.rotate=function(a){u&&w.o(a,Mh,"rotate:newangle");null!==this.Lb&&(this.Lb.angle=a)};
- Mh.prototype.computeRotate=function(a){a=this.AC.Vi(a);var b=this.Lb.S;null!==b&&(a-=b.tl(),360<=a?a-=360:0>a&&(a+=360));var b=Math.min(Math.abs(this.$I),180),c=Math.min(Math.abs(this.ZI),b/2);!this.h.Q.shift&&0<b&&0<c&&(a%b<c?a=Math.floor(a/b)*b:a%b>b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a};w.defineProperty(Mh,{$I:"snapAngleMultiple"},function(){return this.GC},function(a){w.g(a,"number",Mh,"snapAngleMultiple");this.GC=a});
- w.defineProperty(Mh,{ZI:"snapAngleEpsilon"},function(){return this.FC},function(a){w.g(a,"number",Mh,"snapAngleEpsilon");this.FC=a});w.w(Mh,{TK:"originalAngle"},function(){return this.ov});function Oh(){0<arguments.length&&w.cd(Oh);Ue.call(this);this.name="ClickSelecting"}w.Pa(Oh,Ue);w.la("ClickSelectingTool",Oh);Oh.prototype.canStart=function(){return!this.isEnabled||null===this.h||this.isBeyondDragSize()?!1:!0};
- Oh.prototype.doMouseUp=function(){this.ta&&(this.standardMouseSelect(),this.standardMouseClick());this.stopTool()};function Ph(){0<arguments.length&&w.cd(Ph);Ue.call(this);this.name="Action";this.rn=null}w.Pa(Ph,Ue);w.la("ActionTool",Ph);Ph.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.h;if(null===a)return!1;var b=a.Q,c=a.he(b.ga,function(a){for(;null!==a.S&&!a.Bw;)a=a.S;return a});if(null!==c){if(!c.Bw)return!1;this.rn=c;a.Bn=a.he(b.ga,null,null);return!0}return!1};
- Ph.prototype.doMouseDown=function(){if(this.ta){var a=this.h.Q,b=this.rn;null!==b&&(a.ye=b,null!==b.gD&&b.gD(a,b))}else this.canStart()&&this.doActivate()};Ph.prototype.doMouseMove=function(){if(this.ta){var a=this.h.Q,b=this.rn;null!==b&&(a.ye=b,null!==b.hD&&b.hD(a,b))}};Ph.prototype.doMouseUp=function(){if(this.ta){var a=this.h,b=a.Q,c=this.rn;if(null===c)return;b.ye=c;null!==c.iD&&c.iD(b,c);this.isBeyondDragSize()||Jf(c,b,a)}this.stopTool()};
- Ph.prototype.doCancel=function(){var a=this.h;if(null!==a){var a=a.Q,b=this.rn;if(null===b)return;a.ye=b;null!==b.fD&&b.fD(a,b)}this.stopTool()};Ph.prototype.doStop=function(){this.rn=null};function Ca(){0<arguments.length&&w.cd(Ca);Ue.call(this);this.name="ClickCreating";this.Bk=null;this.QB=!0;this.FB=new I(0,0)}w.Pa(Ca,Ue);w.la("ClickCreatingTool",Ca);
- Ca.prototype.canStart=function(){if(!this.isEnabled||null===this.nz)return!1;var a=this.h;if(null===a||a.xb||a.Bf||!a.Fo||!a.Q.left||this.isBeyondDragSize())return!1;if(this.RH){if(1===a.Q.cf&&(this.FB=a.Q.pe.copy()),2!==a.Q.cf||this.isBeyondDragSize(this.FB))return!1}else if(1!==a.Q.cf)return!1;return a.Za!==this&&null!==a.Ts(a.Q.ga,!0)?!1:!0};Ca.prototype.doMouseUp=function(){var a=this.h;this.ta&&null!==a&&this.insertPart(a.Q.ga);this.stopTool()};
- Ca.prototype.insertPart=function(a){var b=this.h;if(null===b)return null;var c=this.nz;if(null===c)return null;this.ec(this.name);var d=null;c instanceof C?c.Td()&&(Cf(c),d=c.copy(),null!==d&&b.add(d)):null!==c&&(c=b.ha.copyNodeData(c),w.$a(c)&&(b.ha.Hm(c),d=b.bi(c)));null!==d&&(d.location=a,b.wf&&b.select(d));b.xc();this.Gf=this.name;b.Ia("PartCreated",d);this.mk();return d};
- w.defineProperty(Ca,{nz:"archetypeNodeData"},function(){return this.Bk},function(a){null!==a&&w.k(a,Object,Ca,"archetypeNodeData");this.Bk=a});w.defineProperty(Ca,{RH:"isDoubleClick"},function(){return this.QB},function(a){w.g(a,"boolean",Ca,"isDoubleClick");this.QB=a});function Qh(a,b,c){this.text=a;this.zD=b;this.visible=c}function Rh(){0<arguments.length&&w.cd(Rh);Ue.call(this);this.name="ContextMenu";this.Cn=this.mB=null;this.gC=new I;this.Yx=this.Kn=null;Sh(this)}w.Pa(Rh,Ue);
- w.la("ContextMenuTool",Rh);w.KD=!1;w.Is=null;w.Js=null;
- function Sh(a){a.Kn=new da;a.XC=function(){a.stopTool()};if(!1===w.KD){var b=w.createElement("div"),c=w.createElement("div");b.style.cssText="top: 0px;z-index:300;position: fixed;display: none;text-align: center;left: 25%;width: 50%;background-color: #F5F5F5;padding: 16px;border: 16px solid #444;border-radius: 10px;margin-top: 10px";c.style.cssText="z-index:299;position: fixed;display: none;top: 0;left: 0;width: 100%;height: 100%;background-color: black;-moz-opacity: 0.8;opacity:.80;filter: alpha(opacity=80);";var d=
- w.createElement("style");window.document.getElementsByTagName("head")[0].appendChild(d);d.sheet.insertRule(".defaultCXul { list-style: none; }",0);d.sheet.insertRule(".defaultCXli {font:700 1.5em Helvetica, Arial, sans-serif;position: relative;min-width: 60px; }",0);d.sheet.insertRule(".defaultCXa {color: #444;display: inline-block;padding: 4px;text-decoration: none;margin: 2px;border: 1px solid gray;border-radius: 10px; }",0);b.addEventListener("contextmenu",function(a){a.preventDefault();return!1},
- !1);b.addEventListener("selectstart",function(a){a.preventDefault();return!1},!1);c.addEventListener("contextmenu",function(a){a.preventDefault();return!1},!1);window.document.body&&(window.document.body.appendChild(b),window.document.body.appendChild(c));w.Js=b;w.Is=c;w.KD=!0}}Rh.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.h;return null===a||this.isBeyondDragSize()||!a.Q.right?!1:null!==this.Kn&&a.Q.Cl||null!==this.findObjectWithContextMenu()?!0:!1};
- Rh.prototype.doStart=function(){var a=this.h;null!==a&&this.gC.set(a.Cc.ga)};Rh.prototype.doStop=function(){this.hideDefaultContextMenu();this.hideContextMenu();this.Cn=null};
- Rh.prototype.findObjectWithContextMenu=function(a){void 0===a&&(a=null);var b=this.h;if(null===b)return null;var c=b.Q,d=null;a instanceof z||(d=a instanceof V?a:b.he(c.ga,null,function(a){return!a.layer.Hc}));if(null!==d){for(a=d;null!==a;){c=a.contextMenu;if(null!==c)return a;a=a.S}if(null!==this.Kn&&b.Q.Cl)return d.W}else if(c=b.contextMenu,null!==c)return b;return null};Rh.prototype.doActivate=function(){};
- Rh.prototype.doMouseUp=function(){var a=this.h;null!==a&&(this.ta?null!==this.Qf&&(a=a.he(a.Q.ga,null,null),null!==a&&a.Al(this.Qf)&&this.standardMouseClick(null,null),this.stopTool()):this.canStart()&&Hf(this,!0))};
- function Hf(a,b,c){void 0===c&&(c=null);a.ta=!0;b&&a.standardMouseSelect();a.standardMouseClick();a.Cn=null;null===c&&(c=a.findObjectWithContextMenu());null!==c?(b=c.contextMenu,null!==b?(a.Cn=c instanceof V?c:null,a.showContextMenu(b,a.Cn)):a.showDefaultContextMenu()):a.showDefaultContextMenu()}Rh.prototype.doMouseMove=function(){this.ta&&this.standardMouseOver()};
- Rh.prototype.showContextMenu=function(a,b){w.k(a,da,Rh,"showContextMenu:contextmenu");null!==b&&w.k(b,V,Rh,"showContextMenu:obj");var c=this.h;if(null!==c){a!==this.Qf&&this.hideContextMenu();a.jf="Tool";a.kk=!1;a.scale=1/c.scale;a.Tc=this.name;c.add(a);if(null!==b){var c=null,d=b.Vo();null!==d&&(c=d.data);a.Bc=b;a.data=c}else a.data=c.ha;a.xf();this.positionContextMenu(a,b);this.Qf=a}};
- Rh.prototype.positionContextMenu=function(a){if(null===a.placeholder){var b=this.h;if(null!==b){var c=b.Q.ga.copy(),d=a.Ja,e=b.qb;b.Q.Cl&&(c.x-=d.width);c.x+d.width>e.right&&(c.x-=d.width+5);c.x<e.x&&(c.x=e.x);c.y+d.height>e.bottom&&(c.y-=d.height+5);c.y<e.y&&(c.y=e.y);a.position=c}}};Rh.prototype.hideContextMenu=function(){var a=this.h;null!==a&&null!==this.Qf&&(this.Qf.data=null,this.Qf.Bc=null,a.remove(this.Qf),this.Qf=null,this.standardMouseOver())};
- Rh.prototype.initializeDefaultButtons=function(){if(null===this.h)return null;var a=new K(Qh);a.add(new Qh("Copy",function(a){a.Jb.copySelection()},function(a){return a.Jb.canCopySelection()}));a.add(new Qh("Cut",function(a){a.Jb.cutSelection()},function(a){return a.Jb.canCutSelection()}));a.add(new Qh("Delete",function(a){a.Jb.deleteSelection()},function(a){return a.Jb.canDeleteSelection()}));a.add(new Qh("Paste",function(a){a.Jb.pasteSelection(a.Q.ga)},function(a){return a.Jb.canPasteSelection()}));
- a.add(new Qh("Select All",function(a){a.Jb.selectAll()},function(a){return a.Jb.canSelectAll()}));a.add(new Qh("Undo",function(a){a.Jb.undo()},function(a){return a.Jb.canUndo()}));a.add(new Qh("Redo",function(a){a.Jb.redo()},function(a){return a.Jb.canRedo()}));a.add(new Qh("Zoom To Fit",function(a){a.Jb.zoomToFit()},function(a){return a.Jb.canZoomToFit()}));a.add(new Qh("Reset Zoom",function(a){a.Jb.resetZoom()},function(a){return a.Jb.canResetZoom()}));a.add(new Qh("Group Selection",function(a){a.Jb.groupSelection()},
- function(a){return a.Jb.canGroupSelection()}));a.add(new Qh("Ungroup Selection",function(a){a.Jb.ungroupSelection()},function(a){return a.Jb.canUngroupSelection()}));a.add(new Qh("Edit Text",function(a){a.Jb.editTextBlock()},function(a){return a.Jb.canEditTextBlock()}));return a};
- Rh.prototype.showDefaultContextMenu=function(){var a=this.h;if(null!==a){null===this.Yx&&(this.Yx=this.initializeDefaultButtons());this.Kn!==this.Qf&&this.hideContextMenu();w.Js.innerHTML="";w.Is.addEventListener("click",this.XC,!1);var b=this,c=w.createElement("ul");c.className="defaultCXul";w.Js.appendChild(c);c.innerHTML="";for(var d=this.Yx.j;d.next();){var e=d.value,g=e.text,h=e.visible;if("function"===typeof e.zD&&("function"!==typeof h||h(a))){h=w.createElement("li");h.className="defaultCXli";
- var k=w.createElement("a");k.className="defaultCXa";k.href="#";k.$F=e.zD;k.addEventListener("click",function(c){this.$F(a);b.stopTool();c.preventDefault();return!1},!1);k.textContent=g;h.appendChild(k);c.appendChild(h)}}w.Js.style.display="block";w.Is.style.display="block";this.Qf=this.Kn}};Rh.prototype.hideDefaultContextMenu=function(){null!==this.Qf&&this.Qf===this.Kn&&(w.Js.style.display="none",w.Is.style.display="none",w.Is.removeEventListener("click",this.XC,!1),this.Qf=null)};
- w.defineProperty(Rh,{Qf:"currentContextMenu"},function(){return this.mB},function(a){null!==a&&w.k(a,da,Rh,"currentContextMenu");this.mB=a});w.defineProperty(Rh,{TJ:"currentObject"},function(){return this.Cn},function(a){null!==a&&w.k(a,V,Rh,"currentObject");this.Cn=a});w.w(Rh,{OK:"mouseDownPoint"},function(){return this.gC});
- function Th(){0<arguments.length&&w.cd(Th);Ue.call(this);this.name="DragSelecting";this.Ln=175;this.VB=!1;var a=new C;a.jf="Tool";a.kk=!1;var b=new Y;b.name="SHAPE";b.Kb="Rectangle";b.fill=null;b.stroke="magenta";a.add(b);this.Tl=a}w.Pa(Th,Ue);w.la("DragSelectingTool",Th);
- Th.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.h;if(null===a||!a.wf)return!1;var b=a.Q;return!b.left||a.Za!==this&&(!this.isBeyondDragSize()||b.timestamp-a.Cc.timestamp<this.LD||null!==a.Ts(b.ga,!0))?!1:!0};Th.prototype.doActivate=function(){var a=this.h;null!==a&&(this.ta=!0,a.Pe=!0,a.mb=!0,a.add(this.jh),this.doMouseMove())};Th.prototype.doDeactivate=function(){var a=this.h;null!==a&&(a.remove(this.jh),a.mb=!1,this.ta=a.Pe=!1)};
- Th.prototype.doMouseMove=function(){if(null!==this.h&&this.ta&&null!==this.jh){var a=this.computeBoxBounds(),b=this.jh.te("SHAPE");null===b&&(b=this.jh.Rf());b.Ca=a.size;this.jh.position=a.position}};Th.prototype.doMouseUp=function(){if(this.ta){var a=this.h;a.remove(this.jh);try{a.gc="wait",this.selectInRect(this.computeBoxBounds())}finally{a.gc=""}}this.stopTool()};Th.prototype.computeBoxBounds=function(){var a=this.h;return null===a?new x(0,0,0,0):new x(a.Cc.ga,a.Q.ga)};
- Th.prototype.selectInRect=function(a){var b=this.h;if(null!==b){var c=b.Q;b.Ia("ChangingSelection");a=b.dk(a,null,function(a){return a instanceof C?a.canSelect():!1},this.XH);if(w.$m?c.rt:c.control)if(c.shift)for(a=a.j;a.next();)c=a.value,c.cb&&(c.cb=!1);else for(a=a.j;a.next();)c=a.value,c.cb=!c.cb;else{if(!c.shift){for(var c=new K(C),d=b.selection.j;d.next();){var e=d.value;a.contains(e)||c.add(e)}for(c=c.j;c.next();)c.value.cb=!1}for(a=a.j;a.next();)c=a.value,c.cb||(c.cb=!0)}b.Ia("ChangedSelection")}};
- w.defineProperty(Th,{LD:"delay"},function(){return this.Ln},function(a){w.g(a,"number",Th,"delay");this.Ln=a});w.defineProperty(Th,{XH:"isPartialInclusion"},function(){return this.VB},function(a){w.g(a,"boolean",Th,"isPartialInclusion");this.VB=a});w.defineProperty(Th,{jh:"box"},function(){return this.Tl},function(a){null!==a&&w.k(a,C,Th,"box");this.Tl=a});
- function Uh(){0<arguments.length&&w.cd(Uh);Ue.call(this);this.name="Panning";this.Oy=new I;this.ij=!1;var a=this;this.LC=function(){window.document.removeEventListener("scroll",a.LC,!1);a.stopTool()}}w.Pa(Uh,Ue);w.la("PanningTool",Uh);Uh.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.h;return null===a||!a.af&&!a.bf||!a.Q.left||a.Za!==this&&!this.isBeyondDragSize()?!1:!0};
- Uh.prototype.doActivate=function(){var a=this.h;null!==a&&(this.ij?(a.Q.bubbles=!0,window.document.addEventListener("scroll",this.LC,!1)):(a.gc="move",a.Pe=!0,this.Oy=a.position.copy()),this.ta=!0)};Uh.prototype.doDeactivate=function(){var a=this.h;null!==a&&(a.gc="",this.ta=a.Pe=!1)};Uh.prototype.doCancel=function(){var a=this.h;null!==a&&(a.position=this.Oy,a.Pe=!1);this.stopTool()};Uh.prototype.doMouseMove=function(){this.move()};Uh.prototype.doMouseUp=function(){this.move();this.stopTool()};
- Uh.prototype.move=function(){var a=this.h;if(this.ta&&a)if(this.ij)a.Q.bubbles=!0;else{var b=a.position,c=a.Cc.ga,d=a.Q.ga,e=b.x+c.x-d.x,c=b.y+c.y-d.y;a.af||(e=b.x);a.bf||(c=b.y);a.position=new I(e,c)}};w.defineProperty(Uh,{bubbles:"bubbles"},function(){return this.ij},function(a){w.g(a,"boolean",Uh,"bubbles");this.ij=a});w.w(Uh,{YK:"originalPosition"},function(){return this.Oy});
- function Vh(){0<arguments.length&&w.cd(Vh);Ue.call(this);this.name="TextEditing";this.pB=this.Mv=this.PC=null;this.KC=Wh;this.$k=null;this.fb=Xh;this.Wk=null;this.dC=1;this.DC=!0;var a=w.createElement("textarea");a.$A=!0;this.uB=a;a.addEventListener("input",function(){var a=this.textEditingTool,c=a.PC;c.text=this.value;var d=this.hJ;Yh(c,a.Og.Xu,Infinity);this.style.width=20+c.Ja.width*d+"px";this.style.height=10+c.Ja.height*d+"px";this.rows=c.fI},!1);a.addEventListener("keydown",function(a){var c=
- a.which,d=this.textEditingTool;if(null!==d)if(13===c)!1===d.Mv.Hw&&a.preventDefault(),d.acceptText(Zh);else{if(9===c)return d.acceptText($h),a.preventDefault(),!1;27===c&&(d.doCancel(),null!==d.h&&d.h.focus())}},!1);a.addEventListener("focus",function(){var a=this.textEditingTool;a.fb===ai?a.fb=bi:a.fb===ci?a.fb=di:a.fb===di&&(a.fb=bi);"function"===typeof this.select&&a.yA&&(this.select(),this.setSelectionRange(0,9999))},!1);a.addEventListener("blur",function(){"function"===typeof this.focus&&this.focus();
- var a=this.textEditingTool;"function"===typeof this.select&&a.yA&&(this.select(),this.setSelectionRange(0,9999))},!1)}w.la("TextEditingTool",Vh);w.Pa(Vh,Ue);var ei;Vh.LostFocus=ei=w.v(Vh,"LostFocus",0);var fi;Vh.MouseDown=fi=w.v(Vh,"MouseDown",1);var $h;Vh.Tab=$h=w.v(Vh,"Tab",2);var Zh;Vh.Enter=Zh=w.v(Vh,"Enter",3);Vh.SingleClick=w.v(Vh,"SingleClick",0);var Wh;Vh.SingleClickSelected=Wh=w.v(Vh,"SingleClickSelected",1);
- var Xh=w.v(Vh,"StateNone",0),ai=w.v(Vh,"StateActive",1),bi=w.v(Vh,"StateEditing",2),di=w.v(Vh,"StateEditing2",3),gi=w.v(Vh,"StateValidating",4),ci=w.v(Vh,"StateValidated",5);w.defineProperty(Vh,{Og:"textBlock"},function(){return this.Mv},function(a){null!==a&&w.k(a,ya,Vh,"textBlock");this.Mv=a});w.defineProperty(Vh,{Bg:"currentTextEditor"},function(){return this.pB},function(a){this.pB=a});
- w.defineProperty(Vh,{$G:"defaultTextEditor"},function(){return this.uB},function(a){w.k(a,Element,Vh,"defaultTextEditor");this.uB=a});w.defineProperty(Vh,{cJ:"starting"},function(){return this.KC},function(a){w.Ea(a,Vh,Vh,"starting");this.KC=a});
- Vh.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.h;if(null===a||a.xb||!a.Q.left||this.isBeyondDragSize())return!1;a=a.he(a.Q.ga,null,function(a){return a instanceof ya});if(null===a||!a.Dz||!a.W.canEdit())return!1;a=a.W;return null===a||this.cJ===Wh&&!a.cb?!1:!0};Vh.prototype.doStart=function(){this.ta||null===this.Og||this.doActivate()};
- Vh.prototype.doActivate=function(){if(!this.ta){var a=this.h;if(null!==a){var b=this.Og;null===b&&(b=a.he(a.Q.ga,function(a){return a instanceof ya?a:null}));if(null!==b){this.Og=b;var c=b.W;if(null!==c){this.ta=!0;this.fb=ai;var d=this.$G,e=!1;null!==b.AF&&(d=b.AF);null===d||d.$A||(e=!0);this.PC=this.Og.copy();a.RI(c.ca);if(d.$A){var g=b.vb(ac),h=a.position,k=a.scale,l=b.Xi()*k;l<this.GE&&(l=this.GE);var c=b.Ha.width*l,m=b.Ha.height*l,n=(g.x-h.x)*k,g=(g.y-h.y)*k;d.value=b.text;a.ol.style.font=b.font;
- d.style.font="inherit";d.style.fontSize=100*l+"%";d.style.lineHeight="normal";d.style.width=c+6+"px";d.style.height=m+2+"px";d.style.left=(n-c/2|0)-1+"px";d.style.top=(g-m/2|0)-1+"px";d.style.textAlign=b.textAlign;d.style.margin="0";d.style.padding="1px";d.style.border="0";d.style.outline="none";d.style["white-space"]="pre-wrap";d.style.overflow="hidden"}a.ol.appendChild(d);d.style.position="absolute";d.style.zIndex=100;d.className="start";d.textEditingTool=this;d.hJ=l;if(e&&"function"===typeof d.onActivate)d.onActivate();
- this.Bg=d;"function"===typeof d.focus&&d.focus();"function"===typeof d.select&&this.yA&&(d.select(),d.setSelectionRange(0,9999))}}}}};Vh.prototype.doCancel=function(){null!==this.Wk&&(this.Bg.style.border=this.Wk,this.Wk=null);this.stopTool()};Vh.prototype.doMouseUp=function(){!this.ta&&this.canStart()&&this.doActivate()};Vh.prototype.doMouseDown=function(){this.ta&&this.acceptText(fi)};
- Vh.prototype.acceptText=function(a){switch(a){case fi:if(this.fb===ci||this.fb===di)"function"===typeof this.Bg.focus&&this.Bg.focus();else if(this.fb===ai||this.fb===bi)this.fb=gi,hi(this);break;case ei:case Zh:case $h:if(Zh===a&&!0===this.Mv.Hw)break;if(this.fb===ai||this.fb===bi)this.fb=gi,hi(this)}};
- function hi(a){if(null!==a.Og&&null!==a.Bg){var b=a.Og,c=a.Og.text,d=a.Bg.value,e="",e="function"===typeof d?d():d;if(!a.isValidText(a.Og,c,e)){a.fb=bi;null!==b.Ez&&b.Ez(a,c,e);null===a.Wk&&(a.Wk=a.Bg.style.border,a.Bg.style.border="3px solid red");"function"===typeof a.Bg.focus&&a.Bg.focus();return}a.ec(a.name);a.fb=ci;c!==e&&(a.Og.text=e);a.Gf=a.name;b=a.h;null!==b&&b.Ia("TextEdited",a.Og,c);a.mk();a.stopTool();null!==b&&b.focus()}null!==a.Wk&&(a.Bg.style.border=a.Wk,a.Wk=null)}
- Vh.prototype.doDeactivate=function(){var a=this.h;if(null!==a){this.fb=Xh;this.Og=null;if(null!==this.Bg){var b=this.Bg;if("function"===typeof b.onDeactivate)b.onDeactivate();null!==b&&a.ol.removeChild(b)}this.ta=!1}};Vh.prototype.isValidText=function(a,b,c){w.k(a,ya,Vh,"isValidText:textblock");var d=this.IA;if(null!==d&&!d(a,b,c))return!1;d=a.IA;return null===d||d(a,b,c)?!0:!1};
- w.defineProperty(Vh,{IA:"textValidation"},function(){return this.$k},function(a){null!==a&&w.g(a,"function",Vh,"textValidation");this.$k=a});w.defineProperty(Vh,{GE:"minimumEditorScale"},function(){return this.dC},function(a){null!==a&&w.g(a,"number",Vh,"minimumEditorScale");this.dC=a});w.defineProperty(Vh,{yA:"selectsTextOnActivate"},function(){return this.DC},function(a){null!==a&&w.g(a,"boolean",Vh,"selectsTextOnActivate");this.DC=a});
- function zf(){Ue.call(this);this.name="ToolManager";this.hG=new K(Ue);this.iG=new K(Ue);this.jG=new K(Ue);this.JB=this.KB=1E3;this.xB=(new pa(2,2)).Ra();this.vu=this.Wx=null;this.hC=Lf;this.HB=ii}w.Pa(zf,Ue);w.la("ToolManager",zf);var Lf;zf.WheelScroll=Lf=w.v(zf,"WheelScroll",0);var Kf;zf.WheelZoom=Kf=w.v(zf,"WheelZoom",1);zf.WheelNone=w.v(zf,"WheelNone",2);var ii;zf.GestureZoom=ii=w.v(zf,"GestureZoom",3);var ji;zf.GestureCancel=ji=w.v(zf,"GestureCancel",4);var ki;
- zf.GestureNone=ki=w.v(zf,"GestureNone",5);w.defineProperty(zf,{tt:"mouseWheelBehavior"},function(){return this.hC},function(a){w.Ea(a,zf,zf,"mouseWheelBehavior");this.hC=a});w.defineProperty(zf,{Xo:"gestureBehavior"},function(){return this.HB},function(a){w.Ea(a,zf,zf,"gestureBehavior");this.HB=a});
- zf.prototype.initializeStandardTools=function(){this.uG=new Ph;this.SE=new dg;this.iI=new oh;this.fF=new vh;this.NI=new Mh;this.BE=new Ba;this.Sd=new Ef;this.fH=new Th;this.zI=new Uh;this.uz=new Rh;this.HA=new Vh;this.IG=new Ca;this.JG=new Oh};
- zf.prototype.doMouseDown=function(){var a=this.h;if(null!==a){var b=a.Q;b.Cl&&this.Xo===ji&&(b.bubbles=!1);if(b.ht){if(this.Xo===ki){b.bubbles=!0;return}if(this.Xo===ji)return;if(a.Za.canStartMultiTouch()){a.Za.standardPinchZoomStart();return}}b=a.na;b.pz&&0!==b.Ue&&w.trace("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");for(var b=this.nf.length,c=0;c<b;c++){var d=this.nf.ma(c);null===d.h&&d.Mc(this.h);if(d.canStart()){a.Za=d;a.Za===d&&(d.ta||d.doActivate(),d.doMouseDown());
- return}}1===a.Q.button&&(this.tt===Lf?this.tt=Kf:this.tt===Kf&&(this.tt=Lf));this.doActivate();this.standardWaitAfter(this.nE)}};
- zf.prototype.doMouseMove=function(){var a=this.h;if(null!==a){var b=a.Q;if(b.ht){if(this.Xo===ki){b.bubbles=!0;return}if(this.Xo===ji)return;if(a.Za.canStartMultiTouch()){a.Za.standardPinchZoomMove();return}}if(this.ta)for(var b=this.Yf.length,c=0;c<b;c++){var d=this.Yf.ma(c);null===d.h&&d.Mc(this.h);if(d.canStart()){a.Za=d;a.Za===d&&(d.ta||d.doActivate(),d.doMouseMove());return}}this.standardMouseOver();this.isBeyondDragSize()&&this.standardWaitAfter(this.ta?this.nE:this.IH)}};
- zf.prototype.doCurrentObjectChanged=function(a,b){var c=this.kl;null===c||null!==b&&(b===c||b.Al(c))||this.hideToolTip()};zf.prototype.doWaitAfter=function(){var a=this.h;null!==a&&a.ab&&(this.doMouseHover(),this.ta||this.doToolTip())};zf.prototype.doMouseHover=function(){var a=this.h;if(null!==a){var b=a.Q;null===b.ye&&(b.ye=a.he(b.ga,null,null));var c=b.ye;if(null!==c)for(b.$c=!1;null!==c;){a=this.ta?c.cA:c.dA;if(null!==a&&(a(b,c),b.$c))break;c=c.S}else a=this.ta?a.cA:a.dA,null!==a&&a(b)}};
- zf.prototype.doToolTip=function(){var a=this.h;if(null!==a){var b=a.Q;null===b.ye&&(b.ye=a.he(b.ga,null,null));b=b.ye;if(null!==b){if(b!==this.kl&&!b.Al(this.kl)){for(;null!==b;){a=b.KA;if(null!==a){this.showToolTip(a,b);return}b=b.S}this.hideToolTip()}}else a=a.KA,null!==a?this.showToolTip(a,null):this.hideToolTip()}};
- zf.prototype.showToolTip=function(a,b){w.k(a,da,zf,"showToolTip:tooltip");null!==b&&w.k(b,V,zf,"showToolTip:obj");var c=this.h;if(null!==c){a!==this.kl&&this.hideToolTip();a.jf="Tool";a.kk=!1;a.scale=1/c.scale;c.add(a);if(null!==b&&b!==this.vu){var c=null,d=b.Vo();null!==d&&(c=d.data);a.Bc=b;a.data=c}else null===b&&(a.data=c.ha);if(null===b||b!==this.vu)a.xf(),this.positionToolTip(a,b);this.Wx=a;this.vu=b}};
- zf.prototype.positionToolTip=function(a){if(null===a.placeholder){var b=this.h;if(null!==b){var c=b.Q.ga.copy(),d=a.Ja,e=b.qb;b.Q.Cl&&(c.x-=d.width);c.x+d.width>e.right&&(c.x-=d.width+5);c.x<e.x&&(c.x=e.x);c.y=c.y+20+d.height>e.bottom?c.y-(d.height+5):c.y+20;c.y<e.y&&(c.y=e.y);a.position=c}}};zf.prototype.hideToolTip=function(){if(null!==this.kl){var a=this.h;null!==a&&(this.kl.data=null,this.kl.Bc=null,a.remove(this.kl),this.vu=this.Wx=null)}};w.w(zf,{kl:"currentToolTip"},function(){return this.Wx});
- zf.prototype.doMouseUp=function(){this.cancelWaitAfter();if(this.ta){var a=this.h;if(null===a)return;for(var b=this.Zf.length,c=0;c<b;c++){var d=this.Zf.ma(c);null===d.h&&d.Mc(this.h);if(d.canStart()){a.Za=d;a.Za===d&&(d.ta||d.doActivate(),d.doMouseUp());return}}}this.doDeactivate()};zf.prototype.doMouseWheel=function(){this.standardMouseWheel()};zf.prototype.doKeyDown=function(){var a=this.h;null!==a&&a.Jb.doKeyDown()};zf.prototype.doKeyUp=function(){var a=this.h;null!==a&&a.Jb.doKeyUp()};
- zf.prototype.doCancel=function(){null!==bg&&bg.doCancel();Ue.prototype.doCancel.call(this)};zf.prototype.findTool=function(a){w.g(a,"string",zf,"findTool:name");for(var b=this.nf.length,c=0;c<b;c++){var d=this.nf.ma(c);if(d.name===a)return d}b=this.Yf.length;for(c=0;c<b;c++)if(d=this.Yf.ma(c),d.name===a)return d;b=this.Zf.length;for(c=0;c<b;c++)if(d=this.Zf.ma(c),d.name===a)return d;return null};
- zf.prototype.replaceTool=function(a,b){w.g(a,"string",zf,"replaceTool:name");null!==b&&(w.k(b,Ue,zf,"replaceTool:newtool"),b.h&&b.h!==this.h&&w.l("Cannot share tools between Diagrams: "+b.toString()),b.Mc(this.h));for(var c=this.nf.length,d=0;d<c;d++){var e=this.nf.ma(d);if(e.name===a)return null!==b?this.nf.Lg(d,b):this.nf.ud(d),e}c=this.Yf.length;for(d=0;d<c;d++)if(e=this.Yf.ma(d),e.name===a)return null!==b?this.Yf.Lg(d,b):this.Yf.ud(d),e;c=this.Zf.length;for(d=0;d<c;d++)if(e=this.Zf.ma(d),e.name===
- a)return null!==b?this.Zf.Lg(d,b):this.Zf.ud(d),e;return null};function li(a,b,c,d){w.g(b,"string",zf,"replaceStandardTool:name");w.k(d,K,zf,"replaceStandardTool:list");null!==c&&(w.k(c,Ue,zf,"replaceStandardTool:newtool"),c.h&&c.h!==a.h&&w.l("Cannot share tools between Diagrams: "+c.toString()),c.name=b,c.Mc(a.h));a.findTool(b)?a.replaceTool(b,c):null!==c&&d.add(c)}w.w(zf,{nf:"mouseDownTools"},function(){return this.hG});w.w(zf,{Yf:"mouseMoveTools"},function(){return this.iG});
- w.w(zf,{Zf:"mouseUpTools"},function(){return this.jG});w.defineProperty(zf,{IH:"hoverDelay"},function(){return this.KB},function(a){w.g(a,"number",zf,"hoverDelay");this.KB=a});w.defineProperty(zf,{nE:"holdDelay"},function(){return this.JB},function(a){w.g(a,"number",zf,"holdDelay");this.JB=a});w.defineProperty(zf,{gH:"dragSize"},function(){return this.xB},function(a){w.k(a,pa,zf,"dragSize");this.xB=a.da()});
- w.defineProperty(zf,{uG:"actionTool"},function(){return this.findTool("Action")},function(a){li(this,"Action",a,this.nf)});w.defineProperty(zf,{SE:"relinkingTool"},function(){return this.findTool("Relinking")},function(a){li(this,"Relinking",a,this.nf)});w.defineProperty(zf,{iI:"linkReshapingTool"},function(){return this.findTool("LinkReshaping")},function(a){li(this,"LinkReshaping",a,this.nf)});
- w.defineProperty(zf,{fF:"resizingTool"},function(){return this.findTool("Resizing")},function(a){li(this,"Resizing",a,this.nf)});w.defineProperty(zf,{NI:"rotatingTool"},function(){return this.findTool("Rotating")},function(a){li(this,"Rotating",a,this.nf)});w.defineProperty(zf,{BE:"linkingTool"},function(){return this.findTool("Linking")},function(a){li(this,"Linking",a,this.Yf)});
- w.defineProperty(zf,{Sd:"draggingTool"},function(){return this.findTool("Dragging")},function(a){li(this,"Dragging",a,this.Yf)});w.defineProperty(zf,{fH:"dragSelectingTool"},function(){return this.findTool("DragSelecting")},function(a){li(this,"DragSelecting",a,this.Yf)});w.defineProperty(zf,{zI:"panningTool"},function(){return this.findTool("Panning")},function(a){li(this,"Panning",a,this.Yf)});
- w.defineProperty(zf,{uz:"contextMenuTool"},function(){return this.findTool("ContextMenu")},function(a){li(this,"ContextMenu",a,this.Zf)});w.defineProperty(zf,{HA:"textEditingTool"},function(){return this.findTool("TextEditing")},function(a){li(this,"TextEditing",a,this.Zf)});w.defineProperty(zf,{IG:"clickCreatingTool"},function(){return this.findTool("ClickCreating")},function(a){li(this,"ClickCreating",a,this.Zf)});
- w.defineProperty(zf,{JG:"clickSelectingTool"},function(){return this.findTool("ClickSelecting")},function(a){li(this,"ClickSelecting",a,this.Zf)});function lf(){this.bG=mi;this.Zl=this.$l=this.Z=null;this.bB=this.jd=this.bo=this.uj=!1;this.Xe=!0;this.uu=this.tu=this.nB=null;this.Ux=0;this.hy=600;this.lG=new I(0,0);this.dB=this.cB=this.aD=!1;this.po=new ta(V,ni)}w.la("AnimationManager",lf);lf.prototype.Mc=function(a){this.Z=a};function mi(a,b,c,d){a/=d/2;return 1>a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}
- lf.prototype.prepareAnimation=lf.prototype.Fl=function(){this.Xe&&(this.uj&&this.cj(),this.jd=!0,this.bB=!1)};function oi(a){a.Xe&&requestAnimationFrame(function(){!1===a.jd||a.uj||(a.Z.Dm=1,pi(a.Z),a.jd=!1,a.Z.Ia("AnimationStarting"),qi(a))})}
- function ri(a,b,c,d,e){if(a.jd&&(u&&w.k(b,V,lf,"addPropToAnimation:obj"),!(b instanceof C)||b.qE)){var g=a.po;if(g.contains(b)){b=g.za(b);a=b.start;var h=b.end;void 0===a[c]&&(a[c]=si(d));h[c]=si(e)}else a=new xa,h=new xa,a[c]=si(d),h[c]=si(e),g.add(b,new ni(a,h))}}function si(a){return a instanceof I?a.copy():a instanceof pa?a.copy():a}
- function qi(a){var b;void 0===b&&(b=new xa);var c=a.Z;if(null!==c)if(0===a.po.count)a.uj=!1,ti(c,!1),c.mf();else{a.uj=!0;var d=b.mK||a.bG,e=b.RK||null,g=b.SK||null,h=b.duration||a.hy;b=a.lG;for(var k=a.po.j;k.next();){var l=k.value.start.position;l instanceof I&&(l.J()||l.assign(b))}a.nB=d;a.tu=e;a.uu=g;a.Ux=h;var m=a.aG=a.po;ui(a);vi(a,c,m,d,0,h,null!==a.$l&&null!==a.Zl);Mg(a.Z);wi(a);requestAnimationFrame(function(b){var e=b||+new Date,g=e+h;(function s(b){if(!1!==a.uj){b=b||+new Date;var k=b>g?
- h:b-e;ui(a);vi(a,c,m,d,k,h,null!==a.$l&&null!==a.Zl);a.tu&&a.tu();Mg(c);wi(a);b>g?xi(a):requestAnimationFrame(s)}})(e)})}}var yi={opacity:function(a,b,c,d,e,g){a.opacity=d(e,b,c-b,g)},position:function(a,b,c,d,e,g){e!==g?a.tF(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g)):a.position=new I(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g))},scale:function(a,b,c,d,e,g){a.scale=d(e,b,c-b,g)},visible:function(a,b,c,d,e,g){a.visible=e!==g?b:c}};
- function ui(a){if(!a.bo){var b=a.Z;a.aD=b.mb;a.cB=b.lx;a.dB=b.Nt;b.mb=!0;b.lx=!0;b.Nt=!0;a.bo=!0}}function wi(a){var b=a.Z;b.mb=a.aD;b.lx=a.cB;b.Nt=a.dB;a.bo=!1}function vi(a,b,c,d,e,g,h){for(c=c.j;c.next();){var k=c.key,l=c.value,m=l.start,l=l.end,n;for(n in l)if(void 0!==yi[n])yi[n](k,m[n],l[n],d,e,g)}h&&(h=a.$l,a=a.Zl,n=a.y-h.y,a=d(e,h.x,a.x-h.x,g),d=d(e,h.y,n,g),e=b.Qz,b.Qz=!0,b.position=new I(a,d),b.Qz=e)}
- lf.prototype.stopAnimation=lf.prototype.cj=function(){!0===this.jd&&(this.jd=!1,this.bB&&this.Z.ne());this.uj&&this.Xe&&(ui(this),vi(this,this.Z,this.aG,this.nB,this.Ux,this.Ux,null!==this.$l&&null!==this.Zl),wi(this),xi(this))};function xi(a){a.uj=!1;a.$l=null;a.Zl=null;a.po=new ta(V,ni);ui(a);for(var b=a.Z,c=a.Z.links;c.next();){var d=c.value;null!==d.uo&&(d.points=d.uo,d.uo=null)}b.Ow.clear();ti(b,!1);b.xc();b.mf();zi(b);wi(a);a.uu&&a.uu();a.uu=null;a.tu=null;b.Ia("AnimationFinished");b.ne()}
- function Ai(a,b,c){var d=b.ca,e=c.ca,g=null;c instanceof F&&(g=c.placeholder);null!==g?(c=g.vb(Xb),c.x+=g.padding.left,c.y+=g.padding.top,ri(a,b,"position",c,b.position)):ri(a,b,"position",new I(e.x+e.width/2-d.width/2,e.y+e.height/2-d.height/2),b.position);ri(a,b,"opacity",.01,b.opacity)}function Bi(a,b,c){a.jd&&(null===a.$l&&b.J()&&null===a.Zl&&(a.$l=b.copy()),a.Zl=c.copy())}
- w.defineProperty(lf,{isEnabled:"isEnabled"},function(){return this.Xe},function(a){w.g(a,"boolean",lf,"isEnabled");this.Xe=a});w.defineProperty(lf,{duration:"duration"},function(){return this.hy},function(a){w.g(a,"number",lf,"duration");1>a&&w.ja(a,">= 1",lf,"duration");this.hy=a});w.w(lf,{lh:"isAnimating"},function(){return this.uj});w.w(lf,{xK:"isTicking"},function(){return this.bo});function ni(a,b){this.start=a;this.end=b}
- function Te(){0<arguments.length&&w.cd(Te);w.mc(this);this.Z=null;this.kb=new K(C);this.cc="";this.Qc=1;this.zy=!1;this.Yk=this.hz=this.yk=this.xk=this.wk=this.vk=this.tk=this.uk=this.sk=this.Ak=this.rk=this.zk=this.qk=this.pk=!0;this.uy=!1;this.qv=[]}w.la("Layer",Te);Te.prototype.Mc=function(a){this.Z=a};
- Te.prototype.toString=function(a){void 0===a&&(a=0);var b='Layer "'+this.name+'"';if(0>=a)return b;for(var c=0,d=0,e=0,g=0,h=0,k=this.kb.j;k.next();){var l=k.value;l instanceof F?e++:l instanceof D?d++:l instanceof G?g++:l instanceof da?h++:c++}k="";0<c&&(k+=c+" Parts ");0<d&&(k+=d+" Nodes ");0<e&&(k+=e+" Groups ");0<g&&(k+=g+" Links ");0<h&&(k+=h+" Adornments ");if(1<a)for(a=this.kb.j;a.next();)c=a.value,k+="\n "+c.toString(),d=c.data,null!==d&&w.ad(d)&&(k+=" #"+w.ad(d)),c instanceof D?k+=" "+
- ka(d):c instanceof G&&(k+=" "+ka(c.aa)+" "+ka(c.fa));return b+" "+this.kb.count+": "+k};
- Te.prototype.findObjectAt=Te.prototype.he=function(a,b,c){void 0===b&&(b=null);void 0===c&&(c=null);if(!1===this.Yk)return null;u&&!a.J()&&w.l("findObjectAt: Point must have a real value.");var d=!1;this.h.qb.Ka(a)&&(d=!0);for(var e=w.O(),g=this.kb.p,h=g.length;h--;){var k=g[h];if((!0!==d||!1!==Oi(k))&&k.Na()&&(e.assign(a),kb(e,k.Of),k=k.he(e,b,c),null!==k&&(null!==b&&(k=b(k)),null!==k&&(null===c||c(k)))))return w.A(e),k}w.A(e);return null};
- Te.prototype.findObjectsAt=Te.prototype.To=function(a,b,c,d){void 0===b&&(b=null);void 0===c&&(c=null);d instanceof K||d instanceof L||(d=new L(V));if(!1===this.Yk)return d;u&&!a.J()&&w.l("findObjectsAt: Point must have a real value.");var e=!1;this.h.qb.Ka(a)&&(e=!0);for(var g=w.O(),h=this.kb.p,k=h.length;k--;){var l=h[k];!0===e&&!1===Oi(l)||!l.Na()||(g.assign(a),kb(g,l.Of),l.To(g,b,c,d)&&(null!==b&&(l=b(l)),null===l||null!==c&&!c(l)||d.add(l)))}w.A(g);return d};
- Te.prototype.findObjectsIn=Te.prototype.dk=function(a,b,c,d,e){void 0===b&&(b=null);void 0===c&&(c=null);void 0===d&&(d=!1);e instanceof K||e instanceof L||(e=new L(V));if(!1===this.Yk)return e;u&&!a.J()&&w.l("findObjectsIn: Rect must have a real value.");var g=!1;this.h.qb.ak(a)&&(g=!0);for(var h=this.kb.p,k=h.length;k--;){var l=h[k];(!0!==g||!1!==Oi(l))&&l.Na()&&l.dk(a,b,c,d,e)&&(null!==b&&(l=b(l)),null===l||null!==c&&!c(l)||e.add(l))}return e};
- Te.prototype.Fz=function(a,b,c,d,e,g,h){if(!1===this.Yk)return e;for(var k=this.kb.p,l=k.length;l--;){var m=k[l];(!0!==h||!1!==Oi(m))&&g(m)&&m.Na()&&m.dk(a,b,c,d,e)&&(null!==b&&(m=b(m)),null===m||null!==c&&!c(m)||e.add(m))}return e};
- Te.prototype.findObjectsNear=Te.prototype.Um=function(a,b,c,d,e,g){void 0===c&&(c=null);void 0===d&&(d=null);void 0===e&&(e=!0);if(!1!==e&&!0!==e){if(e instanceof K||e instanceof L)g=e;e=!0}g instanceof K||g instanceof L||(g=new L(V));if(!1===this.Yk)return g;u&&!a.J()&&w.l("findObjectsNear: Point must have a real value.");var h=!1;this.h.qb.Ka(a)&&(h=!0);for(var k=w.O(),l=w.O(),m=this.kb.p,n=m.length;n--;){var p=m[n];!0===h&&!1===Oi(p)||!p.Na()||(k.assign(a),kb(k,p.Of),l.n(a.x+b,a.y),kb(l,p.Of),
- p.Um(k,l,c,d,e,g)&&(null!==c&&(p=c(p)),null===p||null!==d&&!d(p)||g.add(p)))}w.A(k);w.A(l);return g};f=Te.prototype;f.Ef=function(a,b){if(this.visible){var c;c=void 0===b?a.qb:b;for(var d=this.kb.p,e=d.length,g=0;g<e;g++){var h=d[g];h.aC=g;if(!(h instanceof G&&!1===h.wg)){if(h instanceof da){var k=h;if(null!==k.Zh)continue}if(yb(h.ca,c))for(h.Ef(!0),Pi(h),h=h.Wv;h.next();)k=h.value,Yh(k,Infinity,Infinity),k.Fc(),k.Ef(!0);else h.Ef(!1),null!==h.Wv&&0<h.Wv.count&&Pi(h)}}}};
- f.ef=function(a,b,c,d){if(this.visible&&0!==this.Qc&&(void 0===d&&(d=!0),d||!this.Hc)){1!==this.Qc&&(a.globalAlpha=this.Qc);c=this.qv;c.length=0;d=b.scale;for(var e=this.kb.p,g=e.length,h=0;h<g;h++){var k=e[h];if(Oi(k)||Qi(k)){if(k instanceof G){var l=k;l.jc&&c.push(l);if(!1===l.wg)continue}l=k.ca;1<l.width*d||1<l.height*d?k.ef(a,b):Ri(k,a)}}a.globalAlpha=1}};
- function Si(a,b,c,d){if(a.visible&&0!==a.Qc){1!==a.Qc&&(b.globalAlpha=a.Qc);var e=a.qv;e.length=0;var g=c.scale;a=a.kb.p;for(var h=a.length,k=d.length,l=0;l<h;l++){var m=a[l];if(Oi(m)||Qi(m)){if(m instanceof G){var n=m;n.jc&&e.push(n);if(!1===n.wg)continue}var n=Ti(m,m.ca),p;a:{p=n;for(var q=d,r=k,s=2/g,t=4/g,v=0;v<r;v++){var y=q[v];if(0!==y.width&&0!==y.height&&p.pE(y.x-s,y.y-s,y.width+t,y.height+t)){p=!0;break a}}p=!1}p&&(1<n.width*g||1<n.height*g?m.ef(b,c):Ri(m,b))}}b.globalAlpha=1}}
- f.i=function(a,b,c,d,e){var g=this.h;null!==g&&g.Lc(te,a,this,b,c,d,e)};f.$o=function(a,b,c){var d=this.kb;b.Yu=this;if(a>=d.count)a=d.count;else if(d.ma(a)===b)return-1;d.ie(a,b);b.ct(c);d=this.h;null!==d&&(c?d.sa():d.$o(b));b instanceof F&&this.mx(b);return a};
- f.Oe=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.Oe(a,b,c);var d=this.kb;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.ma(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.dt(c);d.ud(a);d=this.h;null!==d&&(c?d.sa():d.Oe(b));b.Yu=null;return a};
- f.mx=function(a){for(;null!==a;){if(a.layer===this){var b=a;if(0!==b.Jc.count){for(var c=-1,d=-1,e=this.kb.p,g=e.length,h=0;h<g;h++){var k=e[h];if(k===b&&(c=h,0<=d))break;if(0>d&&k.Va===b&&(d=h,0<=c))break}!(0>d)&&d<c&&(e=this.kb,e.ud(c),e.ie(d,b))}}a=a.Va}};f.clear=function(){for(var a=this.kb.Te(),b=a.length,c=0;c<b;c++)a[c].Ef(!1),this.Oe(-1,a[c],!1)};w.w(Te,{fi:"parts"},function(){return this.kb.j});w.w(Te,{cL:"partsBackwards"},function(){return this.kb.an});w.w(Te,{h:"diagram"},function(){return this.Z});
- w.defineProperty(Te,{name:"name"},function(){return this.cc},function(a){w.g(a,"string",Te,"name");var b=this.cc;if(b!==a){var c=this.h;if(null!==c)for(""===b&&w.l("Cannot rename default Layer to: "+a),c=c.bn;c.next();)c.value.name===a&&w.l("Layer.name is already present in this diagram: "+a);this.cc=a;this.i("name",b,a);for(a=this.kb.j;a.next();)a.value.jf=this.cc}});
- w.defineProperty(Te,{opacity:"opacity"},function(){return this.Qc},function(a){var b=this.Qc;b!==a&&(w.g(a,"number",Te,"opacity"),(0>a||1<a)&&w.ja(a,"0 <= value <= 1",Te,"opacity"),this.Qc=a,this.i("opacity",b,a),a=this.h,null!==a&&a.sa())});w.defineProperty(Te,{Hc:"isTemporary"},function(){return this.zy},function(a){var b=this.zy;b!==a&&(w.g(a,"boolean",Te,"isTemporary"),this.zy=a,this.i("isTemporary",b,a))});
- w.defineProperty(Te,{visible:"visible"},function(){return this.hz},function(a){var b=this.hz;if(b!==a){w.g(a,"boolean",Te,"visible");this.hz=a;this.i("visible",b,a);for(b=this.kb.j;b.next();)b.value.Qe(a);a=this.h;null!==a&&a.sa()}});w.defineProperty(Te,{ag:"pickable"},function(){return this.Yk},function(a){var b=this.Yk;b!==a&&(w.g(a,"boolean",Te,"pickable"),this.Yk=a,this.i("pickable",b,a))});
- w.defineProperty(Te,{rE:"isBoundsIncluded"},function(){return this.uy},function(a){this.uy!==a&&(this.uy=a,null!==this.h&&this.h.xc())});w.defineProperty(Te,{Zj:"allowCopy"},function(){return this.pk},function(a){var b=this.pk;b!==a&&(w.g(a,"boolean",Te,"allowCopy"),this.pk=a,this.i("allowCopy",b,a))});w.defineProperty(Te,{Im:"allowDelete"},function(){return this.qk},function(a){var b=this.qk;b!==a&&(w.g(a,"boolean",Te,"allowDelete"),this.qk=a,this.i("allowDelete",b,a))});
- w.defineProperty(Te,{aw:"allowTextEdit"},function(){return this.zk},function(a){var b=this.zk;b!==a&&(w.g(a,"boolean",Te,"allowTextEdit"),this.zk=a,this.i("allowTextEdit",b,a))});w.defineProperty(Te,{Yv:"allowGroup"},function(){return this.rk},function(a){var b=this.rk;b!==a&&(w.g(a,"boolean",Te,"allowGroup"),this.rk=a,this.i("allowGroup",b,a))});
- w.defineProperty(Te,{bw:"allowUngroup"},function(){return this.Ak},function(a){var b=this.Ak;b!==a&&(w.g(a,"boolean",Te,"allowUngroup"),this.Ak=a,this.i("allowUngroup",b,a))});w.defineProperty(Te,{Bs:"allowLink"},function(){return this.sk},function(a){var b=this.sk;b!==a&&(w.g(a,"boolean",Te,"allowLink"),this.sk=a,this.i("allowLink",b,a))});
- w.defineProperty(Te,{Jm:"allowRelink"},function(){return this.uk},function(a){var b=this.uk;b!==a&&(w.g(a,"boolean",Te,"allowRelink"),this.uk=a,this.i("allowRelink",b,a))});w.defineProperty(Te,{fl:"allowMove"},function(){return this.tk},function(a){var b=this.tk;b!==a&&(w.g(a,"boolean",Te,"allowMove"),this.tk=a,this.i("allowMove",b,a))});
- w.defineProperty(Te,{Zv:"allowReshape"},function(){return this.vk},function(a){var b=this.vk;b!==a&&(w.g(a,"boolean",Te,"allowReshape"),this.vk=a,this.i("allowReshape",b,a))});w.defineProperty(Te,{Cs:"allowResize"},function(){return this.wk},function(a){var b=this.wk;b!==a&&(w.g(a,"boolean",Te,"allowResize"),this.wk=a,this.i("allowResize",b,a))});
- w.defineProperty(Te,{$v:"allowRotate"},function(){return this.xk},function(a){var b=this.xk;b!==a&&(w.g(a,"boolean",Te,"allowRotate"),this.xk=a,this.i("allowRotate",b,a))});w.defineProperty(Te,{wf:"allowSelect"},function(){return this.yk},function(a){var b=this.yk;b!==a&&(w.g(a,"boolean",Te,"allowSelect"),this.yk=a,this.i("allowSelect",b,a))});
- function z(a){function b(){window.document.removeEventListener("DOMContentLoaded",b,!1);Ui(c)}1<arguments.length&&w.l("Diagram constructor can only take one optional argument, the DIV HTML element or its id.");w.mc(this);Vi=[];this.zc=!0;this.Bh=new lf;this.Bh.Mc(this);this.Od=17;var c=this;null!==window.document.body?Ui(this):window.document.addEventListener("DOMContentLoaded",b,!1);this.WB=!1;this.Yb=new K(Te);this.Gb=this.Hb=0;this.fh=this.Qb=this.Ve=this.ab=null;this.$E();this.yq=null;this.ZE();
- this.Sa=(new I(NaN,NaN)).freeze();this.$b=1;this.Pu=(new I(NaN,NaN)).freeze();this.Qu=NaN;this.gv=1E-4;this.dv=100;this.md=new ra;this.Tv=(new I(NaN,NaN)).freeze();this.Gu=(new x(NaN,NaN,NaN,NaN)).freeze();this.Vy=(new vb(0,0,0,0)).freeze();this.Wy=Wi;this.Ry=this.Py=null;this.Rl=Ff;this.An=Pc;this.Mk=Ff;this.Xn=Pc;this.Ru=this.Ou=Xb;this.lg=new L(V);this.Yd=!0;this.Aq=!1;this.Yl=new ta(G,x);this.Mn=!0;this.YF=250;this.vn=-1;this.ku=(new vb(16,16,16,16)).freeze();this.yu=this.Nf=!1;this.Qn=!0;this.Gk=
- new he;this.Sc=new he;this.Rb=new he;this.kj=null;this.Iv=-1;this.Hv=!1;this.ay=this.by=null;Xi(this);this.oo=new L(D);this.al=new L(F);this.lo=new L(G);this.kb=new L(C);this.Uu=!0;this.MB=!1;this.Pv=Yg;this.xj=10;this.Vx=this.Zx=this.ez=null;this.Tx="";this.kq="auto";this.mi=this.Hi=this.xi=this.jv=this.yi=this.zi=this.Ai=this.li=this.qi=this.ji=null;this.Vn=!0;this.Jy=!1;this.vC={};this.Br=0;this.Mf=[null,null];this.Kx=null;this.Vu=this.sn=this.$x=this.Xy=this.EC=this.Ei=!1;this.YB=!0;this.wy=this.Kd=
- !1;this.$d=null;var d=this;this.eC=function(a){if(a.ha===d.ha&&d.Ua){d.Ua=!1;try{var b=a.Pd;""===a.Xf&&b===te&&Yi(d,a.object,a.propertyName)}finally{d.Ua=!0}}};this.fC=function(a){Zi(d,a)};this.cD=!0;this.Wg=-2;this.ni=new ta(Object,C);this.Ek=new ta(Object,G);this.fm=new ta(Object,Array);this.qo=new ta("string",Array);this.uC=new K($i);this.Ok=!1;this.qk=this.pk=this.au=this.Xe=!0;this.cu=this.bu=!1;this.hu=this.fu=this.yk=this.xk=this.wk=this.vk=this.tk=this.uk=this.sk=this.eu=this.Ak=this.rk=this.zk=
- !0;this.cm=this.UB=!1;this.gu=this.du=this.Mu=this.Lu=!0;this.xv=this.wv=16;this.Sy=this.vv=!1;this.Uy=this.Ty=this.Mj=this.Lj=null;this.Ze=(new vb(5)).freeze();this.Av=(new L(C)).freeze();this.ev=999999999;this.Nu=(new L(C)).freeze();this.Nk=this.am=this.si=!0;this.Kk=this.Jk=!1;this.Zd=null;this.iu=!0;this.uf=!1;this.gG=new L(G);this.zd=null;this.lC=1;this.oy=!1;this.IC=0;this.bD=(new x(NaN,NaN,NaN,NaN)).freeze();this.zu=(new x(NaN,NaN,NaN,NaN)).freeze();this.om=new L(aj);bj(this);this.$u=this.Iu=
- this.lv=this.rB=this.qB=this.sB=this.yj=this.Hk=this.Bi=null;cj(this);this.hd=null;this.Hu=!1;this.Bn=null;this.zb=new zf;this.zb.initializeStandardTools();this.Za=this.zz=this.zb;this.Jb=new za;this.ha=new X;this.Ei=!0;this.Ub=new Ve;this.Ei=!1;this.CB=this.gy=null;this.Ge=1;this.Dm=null;this.Lk=new dj;void 0!==a&&ej(this,a);this.hm=1;this.im=0;this.$B=new I;this.ZC=500;this.ju=new I;this.cs=null;this.zc=this.Ay=!1}w.la("Diagram",z);
- function cj(a){a.Bi=new ta("string",C);var b=new D,c=new ya;c.bind(new of("text","",ka));b.add(c);a.sB=b;a.Bi.add("",b);b=new D;c=new ya;c.stroke="brown";c.bind(new of("text","",ka));b.add(c);a.Bi.add("Comment",b);b=new D;b.kk=!1;b.tD=!1;c=new Y;c.Kb="Ellipse";c.fill="black";c.stroke=null;c.Ca=(new pa(3,3)).Ra();b.add(c);a.Bi.add("LinkLabel",b);a.Hk=new ta("string",F);b=new F;b.ex="GROUPPANEL";b.type=fj;c=new ya;c.font="bold 12pt sans-serif";c.bind(new of("text","",ka));b.add(c);c=new H(gj);c.name=
- "GROUPPANEL";var d=new Y;d.Kb="Rectangle";d.fill="rgba(128,128,128,0.2)";d.stroke="black";c.add(d);d=new yh;d.padding=(new vb(5,5,5,5)).Ra();c.add(d);b.add(c);a.qB=b;a.Hk.add("",b);a.yj=new ta("string",G);b=new G;c=new Y;c.Uf=!0;b.add(c);c=new Y;c.Hp="Standard";c.fill="black";c.stroke=null;c.pb=0;b.add(c);a.rB=b;a.yj.add("",b);b=new G;c=new Y;c.Uf=!0;c.stroke="brown";b.add(c);a.yj.add("Comment",b);b=new da;b.type=gj;c=new Y;c.fill=null;c.stroke="dodgerblue";c.pb=3;b.add(c);c=new yh;c.margin=(new vb(1.5,
- 1.5,1.5,1.5)).Ra();b.add(c);a.lv=b;a.Iu=b;b=new da;b.type=jh;c=new Y;c.Uf=!0;c.fill=null;c.stroke="dodgerblue";c.pb=3;b.add(c);a.$u=b}
- function Ui(a){var b=w.createElement("p");b.style.width="100%";b.style.height="200px";b.style.boxSizing="content-box";var c=w.createElement("div");c.style.position="absolute";c.style.visibility="hidden";c.style.width="200px";c.style.height="150px";c.style.overflow="hidden";c.style.boxSizing="content-box";c.appendChild(b);window.document.body.appendChild(c);var d=b.offsetWidth;c.style.overflow="scroll";b=b.offsetWidth;d===b&&(b=c.clientWidth);window.document.body.removeChild(c);c=d-b;0!==c||w.vE||
- (c=11);a.Od=c}z.prototype.toString=function(a){void 0===a&&(a=0);var b="";this.id&&(b=this.id);this.ol&&this.ol.id&&(b=this.ol.id);b='Diagram "'+b+'"';if(0>=a)return b;for(var c=this.Yb.j;c.next();)b+="\n "+c.value.toString(a-1);return b};z.prototype.checkProperties=function(){return w.check(this)};z.fromDiv=function(a){var b=a;"string"===typeof a&&(b=window.document.getElementById(a));return b instanceof HTMLDivElement&&b.Z instanceof z?b.Z:null};
- w.defineProperty(z,{ol:"div"},function(){return this.Qb},function(a){null!==a&&w.k(a,HTMLDivElement,z,"div");if(this.Qb!==a){Vi=[];var b=this.Qb;null!==b?(b.Z=void 0,b.innerHTML="",null!==this.ab&&(this.ab.removeEventListener("touchstart",this.GF,!1),this.ab.removeEventListener("touchmove",this.FF,!1),this.ab.removeEventListener("touchend",this.EF,!1),this.ab.Rd.Z=null),b=this.zb,null!==b&&(b.nf.each(function(a){a.cancelWaitAfter()}),b.Yf.each(function(a){a.cancelWaitAfter()}),b.Zf.each(function(a){a.cancelWaitAfter()})),
- b.cancelWaitAfter(),this.Za.doCancel(),this.Ve=this.ab=null,window.removeEventListener("resize",this.OF,!1),window.removeEventListener("mousemove",this.mp,!0),window.removeEventListener("mousedown",this.lp,!0),window.removeEventListener("mouseup",this.op,!0),window.removeEventListener("mousewheel",this.ph,!0),window.removeEventListener("DOMMouseScroll",this.ph,!0),window.removeEventListener("mouseout",this.np,!0)):this.uf=!1;this.Qb=null;if(null!==a){if(b=a.Z)b.ol=null;ej(this,a);this.At()}}});
- function hj(a){var b=a.ab;b.addEventListener("touchstart",a.GF,!1);b.addEventListener("touchmove",a.FF,!1);b.addEventListener("touchend",a.EF,!1);b.addEventListener("mousemove",a.mp,!1);b.addEventListener("mousedown",a.lp,!1);b.addEventListener("mouseup",a.op,!1);b.addEventListener("mousewheel",a.ph,!1);b.addEventListener("DOMMouseScroll",a.ph,!1);b.addEventListener("mouseout",a.np,!1);b.addEventListener("keydown",a.bI,!1);b.addEventListener("keyup",a.cI,!1);b.addEventListener("selectstart",function(a){a.preventDefault();
- return!1},!1);b.addEventListener("contextmenu",function(a){a.preventDefault();return!1},!1);b.addEventListener("gesturechange",function(b){a.zb.Xo===ji&&b.preventDefault()},!1);b.addEventListener("pointerdown",a.AI,!1);b.addEventListener("pointermove",a.CI,!1);b.addEventListener("pointerleave",a.BI,!1);window.addEventListener("resize",a.OF,!1)}function ti(a,b){a.Dm=null;b&&a.RE()}
- z.prototype.computePixelRatio=function(){if(null!==this.Dm)return this.Dm;var a=this.Ve;return(window.devicePixelRatio||1)/(a.webkitBackingStorePixelRatio||a.mozBackingStorePixelRatio||a.msBackingStorePixelRatio||a.oBackingStorePixelRatio||a.backingStorePixelRatio||1)};z.prototype.doMouseMove=function(){this.Za.doMouseMove()};z.prototype.doMouseDown=function(){this.Za.doMouseDown()};z.prototype.doMouseUp=function(){this.Za.doMouseUp()};z.prototype.doMouseWheel=function(){this.Za.doMouseWheel()};
- z.prototype.doKeyDown=function(){this.Za.doKeyDown()};z.prototype.doKeyUp=function(){this.Za.doKeyUp()};function pi(a){if(null!==a.ab){var b=a.Qb;if(0!==b.clientWidth&&0!==b.clientHeight){var c=a.Kk?a.Od:0,d=a.Jk?a.Od:0,e=a.Ge;a.Ge=a.computePixelRatio();a.Ge!==e&&(a.Aq=!0,a.ne());if(b.clientWidth!==a.Hb+c||b.clientHeight!==a.Gb+d)a.am=!0,a.Yd=!0,b=a.Ub,null!==b&&b.Iw&&b.K(),a.Kd||a.ne()}}}z.prototype.focus=z.prototype.focus=function(){this.ab&&this.ab.focus()};
- function ca(a,b,c){void 0===b&&(b=a.Ve);void 0===c&&(c=!0);c&&(b.Zt="");b.qn="";b.Ql=""}function bj(a){var b=new Te;b.name="Background";a.xs(b);b=new Te;b.name="";a.xs(b);b=new Te;b.name="Foreground";a.xs(b);b=new Te;b.name="Adornment";b.Hc=!0;a.xs(b);b=new Te;b.name="Tool";b.Hc=!0;b.rE=!0;a.xs(b);b=new Te;b.name="Grid";b.wf=!1;b.ag=!1;b.Hc=!0;a.yG(b,a.ql("Background"))}
- function ij(a){a.hd=new H(jj);a.hd.name="GRID";var b=new Y;b.Kb="LineH";b.stroke="lightgray";b.pb=.5;b.interval=1;a.hd.add(b);b=new Y;b.Kb="LineH";b.stroke="gray";b.pb=.5;b.interval=5;a.hd.add(b);b=new Y;b.Kb="LineH";b.stroke="gray";b.pb=1;b.interval=10;a.hd.add(b);b=new Y;b.Kb="LineV";b.stroke="lightgray";b.pb=.5;b.interval=1;a.hd.add(b);b=new Y;b.Kb="LineV";b.stroke="gray";b.pb=.5;b.interval=5;a.hd.add(b);b=new Y;b.Kb="LineV";b.stroke="gray";b.pb=1;b.interval=10;a.hd.add(b);b=new C;b.add(a.hd);
- b.jf="Grid";b.Fw=!1;b.qE=!1;b.ag=!1;b.Pw="GRID";a.add(b);a.kb.remove(b);a.hd.visible=!1}
- z.prototype.kC=function(){if(this.Z.isEnabled){var a=this.Z;if(a.Sy&&null!==a.ab){a.vv=!0;var b=a.Gc,c=a.qb,d=b.width,e=c.width,g=b.height,h=c.height,k=b.right,l=c.right,m=b.bottom,n=c.bottom,p=b.x,q=c.x,b=b.y,c=c.y,r=a.scale;if(e<d||h<g){var s=w.O();this.BC&&a.af?(s.n(this.scrollLeft/r+p,a.position.y),a.position=s):this.CC&&a.bf&&(s.n(a.position.x,this.scrollTop/r+b),a.position=s);w.A(s);a.vv=!1;a.am=!1}else s=w.O(),this.BC&&a.af&&(p<q&&(a.position=new I(this.scrollLeft+p,a.position.y)),k>l&&(a.position=
- new I(-(a.Lj.scrollWidth-a.Hb)+this.scrollLeft-a.Hb/r+a.Gc.right,a.position.y))),this.CC&&a.bf&&(b<c&&(a.position=new I(a.position.x,this.scrollTop+b)),m>n&&(a.position=new I(a.position.x,-(a.Mj.scrollHeight-a.Gb)+this.scrollTop-a.Gb/r+a.Gc.bottom))),w.A(s),kj(a),a.vv=!1,a.am=!1,b=a.Gc,c=a.qb,k=b.right,l=c.right,m=b.bottom,n=c.bottom,p=b.x,q=c.x,b=b.y,c=c.y,e>=d&&p>=q&&k<=l&&(a.Ty.style.width="1px"),h>=g&&b>=c&&m<=n&&(a.Uy.style.height="1px")}}else lj(this.Z)};
- z.prototype.nv=function(){this.Z.isEnabled?this.Z.Sy=!0:lj(this.Z)};z.prototype.computeBounds=z.prototype.zg=function(){0<this.lg.count&&mj(this);return nj(this)};function nj(a){if(a.bE.J()){var b=a.bE.copy();b.Vv(a.padding);return b}for(var c=!0,d=a.Yb.p,e=d.length,g=0;g<e;g++){var h=d[g];if(h.visible&&(!h.Hc||h.rE))for(var h=h.kb.p,k=h.length,l=0;l<k;l++){var m=h[l];m.Fw&&m.Na()&&(m=m.ca,m.J()&&(c?(c=!1,b=m.copy()):b.hi(m)))}}c&&(b=new x(0,0,0,0));b.Vv(a.padding);return b}
- z.prototype.computePartsBounds=function(a){var b=null;for(a=a.j;a.next();){var c=a.value;c instanceof G||(c.xf(),null===b?b=c.ca.copy():b.hi(c.ca))}return null===b?new x(NaN,NaN,0,0):b};
- function oj(a,b){if((b||a.uf)&&!a.zc&&null!==a.ab&&!a.Tb.lh&&a.Gc.J()){a.zc=!0;var c=a.Rl;b&&a.Mk!==Ff&&(c=a.Mk);var d=c!==Ff?pj(a,c):a.scale,c=a.qb.copy(),e=a.Hb/d,g=a.Gb/d,h=null,k=a.Tb;k.jd&&(h=a.Sa.copy());a.position.Ta();var l=a.An;b&&!l.rd()&&a.Xn.rd()&&(l=a.Xn);qj(a,a.Sa,a.Gc,e,g,l,b);a.position.freeze();null!==h&&Bi(k,h,a.Sa);a.scale=d;a.zc=!1;d=a.qb;d.Me(c)||a.xt(c,d)}}
- function pj(a,b){var c=a.Jb.kw;if(null===a.ab)return c;a.si&&rj(a,a.zg());var d=a.Gc;if(!d.J())return c;var e=d.width,d=d.height,g=a.Hb,h=a.Gb,k=g/e,l=h/d;return b===sj?(e=Math.min(l,k),e>c&&(e=c),e<a.oh&&(e=a.oh),e>a.nh&&(e=a.nh),e):b===tj?(e=l>k?(h-a.Od)/d:(g-a.Od)/e,e>c&&(e=c),e<a.oh&&(e=a.oh),e>a.nh&&(e=a.nh),e):a.scale}z.prototype.zoomToFit=z.prototype.zoomToFit=function(){this.scale=pj(this,sj)};
- z.prototype.zoomToRect=function(a,b){void 0===b&&(b=sj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===sj||b===tj)if(isNaN(c))e=this.qb.height*this.scale/d;else if(isNaN(d))e=this.qb.width*this.scale/c;else var e=this.Hb,g=this.Gb,e=b===tj?g/d>e/c?(g-(this.Jk?this.Od:0))/d:(e-(this.Kk?this.Od:0))/c:Math.min(g/d,e/c);this.scale=e;this.position=new I(a.x,a.y)}};w.defineProperty(z,{Qz:null},function(){return this.zc},function(a){this.zc=a});
- z.prototype.alignDocument=function(a,b){this.si&&rj(this,this.zg());var c=this.Gc,d=this.qb,e=this.zc;this.zc=!0;this.position=new I(c.x+(a.x*c.width+a.offsetX)-(b.x*d.width-b.offsetX),c.y+(a.y*c.height+a.offsetY)-(b.y*d.height-b.offsetY));this.zc=e;this.sa()};
- function qj(a,b,c,d,e,g,h){var k=b.x,l=b.y;if(h||a.kF===Wi)g.rd()&&(d>c.width&&(k=c.x+(g.x*c.width+g.offsetX)-(g.x*d-g.offsetX)),e>c.height&&(l=c.y+(g.y*c.height+g.offsetY)-(g.y*e-g.offsetY))),g=a.jF,h=d-c.width,d<c.width+g.left+g.right?(k=Math.min(k+d/2,c.right+Math.max(h,g.right)-d/2),k=Math.max(k,c.left-Math.max(h,g.left)+d/2),k-=d/2):k>c.left?k=c.left:k<c.right-d&&(k=c.right-d),d=e-c.height,e<c.height+g.top+g.bottom?(l=Math.min(l+e/2,c.bottom+Math.max(d,g.bottom)-e/2),l=Math.max(l,c.top-Math.max(d,
- g.top)+e/2),l-=e/2):l>c.top?l=c.top:l<c.bottom-e&&(l=c.bottom-e);b.x=isFinite(k)?k:-a.padding.left;b.y=isFinite(l)?l:-a.padding.top;null!==a.QE&&(a=a.QE(a,b),b.x=a.x,b.y=a.y)}z.prototype.findPartAt=z.prototype.Ts=function(a,b){var c=b?Fg(this,a,function(a){return a.W},function(a){return a.canSelect()}):Fg(this,a,function(a){return a.W});return c instanceof C?c:null};
- z.prototype.findObjectAt=z.prototype.he=function(a,b,c){void 0===b&&(b=null);void 0===c&&(c=null);mj(this);for(var d=this.Yb.an;d.next();){var e=d.value;if(e.visible&&(e=e.he(a,b,c),null!==e))return e}return null};function Fg(a,b,c,d){void 0===c&&(c=null);void 0===d&&(d=null);mj(a);for(a=a.Yb.an;a.next();){var e=a.value;if(e.visible&&!e.Hc&&(e=e.he(b,c,d),null!==e))return e}return null}
- z.prototype.findObjectsAt=z.prototype.To=function(a,b,c,d){void 0===b&&(b=null);void 0===c&&(c=null);d instanceof K||d instanceof L||(d=new L(V));mj(this);for(var e=this.Yb.an;e.next();){var g=e.value;g.visible&&g.To(a,b,c,d)}return d};z.prototype.findObjectsIn=z.prototype.dk=function(a,b,c,d,e){void 0===b&&(b=null);void 0===c&&(c=null);void 0===d&&(d=!1);e instanceof K||e instanceof L||(e=new L(V));mj(this);for(var g=this.Yb.an;g.next();){var h=g.value;h.visible&&h.dk(a,b,c,d,e)}return e};
- z.prototype.Fz=function(a,b,c,d,e,g){var h=new L(V);mj(this);for(var k=this.Yb.an;k.next();){var l=k.value;l.visible&&l.Fz(a,b,c,d,h,e,g)}return h};z.prototype.findObjectsNear=z.prototype.Um=function(a,b,c,d,e,g){void 0===c&&(c=null);void 0===d&&(d=null);void 0===e&&(e=!0);if(!1!==e&&!0!==e){if(e instanceof K||e instanceof L)g=e;e=!0}g instanceof K||g instanceof L||(g=new L(V));mj(this);for(var h=this.Yb.an;h.next();){var k=h.value;k.visible&&k.Um(a,b,c,d,e,g)}return g};
- function If(a){-1!==a.Iv&&(w.clearTimeout(a.Iv),a.Iv=-1)}function uj(a,b){var c=b.copy();a.Iv=w.setTimeout(function(){c.button=2;a.Q=c;a.Hv=!0;a.doMouseUp()},850)}z.prototype.acceptEvent=function(a){var b=this.Sc;this.Sc=this.Rb;this.Rb=b;vj(this,this,a,b,a instanceof MouseEvent);return b};
- function vj(a,b,c,d,e){d.h=b;e?wj(a,c,d):(d.pe=b.Rb.pe,d.ga=b.Rb.ga);a=0;c.ctrlKey&&(a+=1);c.altKey&&(a+=2);c.shiftKey&&(a+=4);c.metaKey&&(a+=8);d.sd=a;d.button=c.button;w.$m&&0===c.button&&c.ctrlKey&&(d.button=2);d.pl=!1;d.up=!1;d.cf=1;d.nl=0;d.$c=!1;d.bubbles=!1;d.event=c;d.timestamp=Date.now();d.ht=!1;d.Mg=c.target.Z?c.target.Z:null;d.ye=null}
- function xj(a,b,c,d,e){d.h=a;wj(a,c,d);d.sd=0;d.button=0;d.pl=!0;d.up=!1;d.cf=1;d.nl=0;d.$c=!1;d.bubbles=!0;d.event=b;d.timestamp=Date.now();d.ht=e;d.Mg=b.target.Z?b.target.Z:null;d.ye=null;a.Gk=d.copy();bg=null}
- function yj(a,b,c,d,e){var g=null;d.h=a;if(null!==c){var g=window.document.elementFromPoint(c.clientX,c.clientY),h;g&&g.Z?h=g.Z:(c=b.changedTouches[0],h=a);wj(a,c,d)}else null!==a.Sc?(d.ga=a.Sc.ga,d.pe=a.Sc.pe,d.Mg=a.Sc.Mg):null!==a.Gk&&(d.ga=a.Gk.ga,d.pe=a.Gk.pe,d.Mg=a.Gk.Mg);d.sd=0;d.button=0;d.pl=!1;d.up=!1;d.cf=1;d.nl=0;d.$c=!1;d.bubbles=!1;d.event=b;d.timestamp=Date.now();d.ht=e;d.Mg=h;d.ye=null}
- function ia(a,b,c){if(b.bubbles)return u&&u.mE&&w.trace("NOT handled "+c.type+" "+b.toString()),!0;u&&u.mE&&w.trace("handled "+c.type+" "+a.Za.name+" "+b.toString());void 0!==c.stopPropagation&&c.stopPropagation();(void 0===c.touches||2>c.touches.length)&&c.preventDefault();c.cancelBubble=!0;return!1}
- z.prototype.bI=function(a){if(!this.Z.isEnabled)return!1;var b=this.Z.Rb;vj(this.Z,this.Z,a,b,!1);b.key=String.fromCharCode(a.which);b.pl=!0;switch(a.which){case 8:b.key="Backspace";break;case 33:b.key="PageUp";break;case 34:b.key="PageDown";break;case 35:b.key="End";break;case 36:b.key="Home";break;case 37:b.key="Left";break;case 38:b.key="Up";break;case 39:b.key="Right";break;case 40:b.key="Down";break;case 45:b.key="Insert";break;case 46:b.key="Del";break;case 48:b.key="0";break;case 187:case 61:case 107:b.key=
- "Add";break;case 189:case 173:case 109:b.key="Subtract";break;case 27:b.key="Esc"}this.Z.doKeyDown();return 187!==a.which&&189!==a.which&&48!==a.which&&107!==a.which&&109!==a.which&&61!==a.which&&173!==a.which||!0!==a.ctrlKey?ia(this.Z,b,a):(a.cancelBubble=!0,a.preventDefault(),a.stopPropagation(),!1)};
- z.prototype.cI=function(a){if(!this.Z.isEnabled)return!1;var b=this.Z.Rb;vj(this.Z,this.Z,a,b,!1);b.key=String.fromCharCode(a.which);b.up=!0;switch(a.which){case 8:b.key="Backspace";break;case 33:b.key="PageUp";break;case 34:b.key="PageDown";break;case 35:b.key="End";break;case 36:b.key="Home";break;case 37:b.key="Left";break;case 38:b.key="Up";break;case 39:b.key="Right";break;case 40:b.key="Down";break;case 45:b.key="Insert";break;case 46:b.key="Del";break;case 93:a.preventDefault()}this.Z.doKeyUp();
- return ia(this.Z,b,a)};z.prototype.Tn=function(a){var b=this.ab;if(null===b)return new I(0,0);var c=this.Hb,d=this.Gb,b=b.getBoundingClientRect(),c=a.clientX-c/b.width*b.left;a=a.clientY-d/b.height*b.top;return null!==this.md?(a=new I(c,a),kb(a,this.md),a):new I(c,a)};
- function wj(a,b,c){var d=a.ab,e=a.Hb,g=a.Gb,h=0,k=0;null!==d&&(d=d.getBoundingClientRect(),h=b.clientX-e/d.width*d.left,k=b.clientY-g/d.height*d.top);c.pe.n(h,k);null!==a.md?(b=w.lc(h,k),a.md.ci(b),c.ga.assign(b),w.A(b)):c.ga.n(h,k)}z.prototype.invalidateDocumentBounds=z.prototype.xc=function(){this.si||(this.si=!0,this.ne(!0))};function zi(a){a.Kd||mj(a);a.si&&rj(a,a.zg());for(a=a.om.j;a.next();)zi(a.value)}
- z.prototype.redraw=z.prototype.At=function(){this.zc||this.Kd||(this.sa(),zj(this),kj(this),this.xc(),this.mf())};z.prototype.isUpdateRequested=function(){return this.Nf};z.prototype.delayInitialization=z.prototype.aH=function(a){void 0===a&&(a=null);var b=this.Tb,c=b.isEnabled;b.cj();b.isEnabled=!1;Mg(this);this.uf=!1;b.isEnabled=c;null!==a&&w.setTimeout(a,1)};
- z.prototype.requestUpdate=z.prototype.ne=function(a){void 0===a&&(a=!1);if(!0!==this.Nf&&!(this.zc||!1===a&&this.Kd)){this.Nf=!0;var b=this;requestAnimationFrame(function(){b.Nf&&b.mf()})}};z.prototype.maybeUpdate=z.prototype.mf=function(){if(!this.Qn||this.Nf)this.Qn&&(this.Qn=!1),Mg(this)};function Aj(a,b){a.zc||!a.am||lj(a)||(b&&mj(a),oj(a,!1))}
- function Mg(a){if(!a.Kd&&(a.Nf=!1,null!==a.Qb)){a.Kd=!0;var b=a.Bh,c=a.uC;if(!b.bo&&0!==c.length){for(var d=c.p,e=d.length,g=0;g<e;g++){var h=d[g];Bj(h,!1);h.V()}c.clear()}d=c=!1;b.lh&&(d=!0,c=a.mb,a.mb=!0);b.jd||pi(a);Aj(a,!1);null!==a.hd&&(a.hd.visible&&!a.Hu&&(Cj(a),a.Hu=!0),!a.hd.visible&&a.Hu&&(a.Hu=!1));mj(a);0!==a.Yl.count&&(Dj(a),mj(a));e=!1;if(!a.uf||a.iu)a.uf?Ej(a,!a.yu):(a.ec("Initial Layout"),!1===b.isEnabled&&b.cj(),Ej(a,!1)),e=!0;a.yu=!1;mj(a);a.Xy||b.lh||zi(a);e&&(a.uf||(b=a.Yb.p,a.Ef(b,
- b.length,a),Fj(a),Cj(a)),a.Ia("LayoutCompleted"));Aj(a,!0);mj(a);e&&!a.uf&&(a.uf=!0,a.fe("Initial Layout"),a.mb||a.na.clear(),w.setTimeout(function(){a.ei=!1},1));a.ef();d&&(a.mb=c);a.Kd=!1}}
- function Fj(a){if(a.Mk!==Ff)a.scale=pj(a,a.Mk);else if(a.Rl!==Ff)a.scale=pj(a,a.Rl);else{var b=a.MH;isFinite(b)&&0<b&&(a.scale=b)}a.si&&rj(a,a.zg());b=a.LH;if(b.J())a.position=b;else{b=w.O();b.Jt(a.Gc,a.KH);var c=a.qb,c=w.nk(0,0,c.width,c.height),d=w.O();d.Jt(c,a.NH);a.position=new I(b.x-d.x,b.y-d.y);w.qc(c);w.A(d);w.A(b);oj(a,!0)}a.Ia("InitialLayoutCompleted")}
- function mj(a){if((a.Kd||!a.Tb.lh)&&0!==a.lg.count)for(var b=0;23>b;b++){var c=a.lg.j;if(null===c||0===a.lg.count)break;a.lg=new L(V);var d=a,e=a.lg;for(c.reset();c.next();){var g=c.value;!g.Td()||g instanceof F||!g.Na()||(g.Bl()?(Yh(g,Infinity,Infinity),g.Fc()):e.add(g))}for(c.reset();c.next();)g=c.value,g instanceof F&&g.Na()&&Gj(d,g);for(c.reset();c.next();)g=c.value,g instanceof G&&(d=g,d.Na()&&(d.Bl()?(Yh(d,Infinity,Infinity),d.Fc(),d.qt()):e.add(d)));for(c.reset();c.next();)d=c.value,d instanceof
- da&&d.Na()&&(d.Bl()?(Yh(d,Infinity,Infinity),d.Fc()):e.add(d));u&&22===b&&w.trace("failure to validate parts")}}
- function Gj(a,b){for(var c=w.nb(),d=w.nb(),e=b.Jc;e.next();){var g=e.value;g.Na()&&(g instanceof F?(Hj(g)||Ij(g)||Jj(g))&&Gj(a,g):g instanceof G?g.aa==b||g.fa==b?d.push(g):c.push(g):(Yh(g,Infinity,Infinity),g.Fc()))}for(var e=c.length,h=0;h<e;h++)g=c[h],Yh(g,Infinity,Infinity),g.Fc();w.xa(c);Yh(b,Infinity,Infinity);b.Fc();e=d.length;for(h=0;h<e;h++)g=d[h],Yh(g,Infinity,Infinity),g.Fc();w.xa(d)}z.prototype.Ef=function(a,b,c,d){var e=this.Bh;if(this.Nk||e.lh)for(e=0;e<b;e++)a[e].Ef(c,d)};
- z.prototype.ef=function(a,b){void 0===a&&(a=this.Ve);void 0===b&&(b=null);null===this.Qb&&w.l("No div specified");var c=this.ab;null===c&&w.l("No canvas specified");if(this.Bh.jd)0===this.na.Ue&&this.ne(!0);else{Kj(this);var d=a!==this.Ve,e=this.Yb.p,g=e.length,h=this;this.Ef(e,g,h);if(d)ca(this,a),kj(this);else if(!this.Yd&&null===b)return;var g=this.Sa,k=this.$b,l=Math.round(g.x*k)/k,m=Math.round(g.y*k)/k,n=this.md;n.reset();1!==k&&n.scale(k);0===g.x&&0===g.y||n.translate(-l,-m);g=this.Ge;w.Zm?
- (c.width=c.width,ca(this,a),a.scale(g,g)):(a.setTransform(1,0,0,1,0,0),a.scale(g,g),a.clearRect(0,0,this.Hb,this.Gb));a.miterLimit=9;a.setTransform(1,0,0,1,0,0);a.scale(g,g);a.transform(n.m11,n.m12,n.m21,n.m22,n.dx,n.dy);u&&u.Pi&&u.TD(this,a);c=null!==b?function(c){var d=a,e=b;if(c.visible&&0!==c.Qc){1!==c.Qc&&(d.globalAlpha=c.Qc);var g=c.qv;g.length=0;var k=h.scale;c=c.kb.p;for(var l=c.length,m=0;m<l;m++){var n=c[m];if((Oi(n)||Qi(n))&&!e.contains(n)){if(n instanceof G){var A=n;A.jc&&g.push(A);if(!1===
- A.wg)continue}A=n.ca;1<A.width*k||1<A.height*k?n.ef(d,h):Ri(n,d)}}d.globalAlpha=1}}:function(b){b.ef(a,h)};Lj(this,a);g=e.length;for(k=0;k<g;k++)c(e[k]);this.Lk?this.Lk.Ol(this)&&this.Cx():this.Tn=function(){return new I(0,0)};u&&(u.Cz||u.Pi)&&u.Bz(a,this,n);d?(ca(this),kj(this)):this.Yd=this.Nk=!1}};
- function Mj(a,b,c,d,e){null===a.Qb&&w.l("No div specified");var g=a.ab;null===g&&w.l("No canvas specified");var h=a.Ve;if(a.Yd){Kj(a);var k=a.Ge;w.Zm?(g.width=g.width,ca(a,h)):(h.setTransform(1,0,0,1,0,0),h.clearRect(0,0,a.Hb*k,a.Gb*k));h.oE=!1;h.drawImage(a.gy.Rd,0<d?0:Math.round(-d),0<e?0:Math.round(-e));e=a.Sa;var g=a.$b,l=Math.round(e.x*g)/g,m=Math.round(e.y*g)/g;d=a.md;d.reset();1!==g&&d.scale(g);0===e.x&&0===e.y||d.translate(-l,-m);h.save();h.beginPath();e=c.length;for(g=0;g<e;g++)l=c[g],0!==
- l.width&&0!==l.height&&h.rect(Math.floor(l.x),Math.floor(l.y),Math.ceil(l.width),Math.ceil(l.height));h.clip();h.setTransform(1,0,0,1,0,0);h.scale(k,k);h.transform(d.m11,d.m12,d.m21,d.m22,d.dx,d.dy);u&&u.Pi&&u.TD(a,h);c=a.Yb.p;e=c.length;a.Ef(c,e,a);Lj(a,h);for(g=0;g<e;g++)Si(c[g],h,a,b);h.restore();ca(a);u&&(u.Cz||u.Pi)&&u.Bz(h,a,d);a.Lk?a.Lk.Ol(a)&&a.Cx():a.Tn=function(){return new I(0,0)};a.Nk=!1;a.Yd=!1;a.RE()}}
- function Nj(a,b,c,d,e,g,h,k,l,m){null===a.Qb&&w.l("No div specified");null===a.ab&&w.l("No canvas specified");void 0===h&&(h=null);void 0===k&&(k=null);void 0===l&&(l=!1);void 0===m&&(m=!1);Kj(a);ca(a);kj(a);a.wy=!0;var n=new x(g.x,g.y,d.width/e,d.height/e),p=n.copy();p.Vv(c);Cj(a,p);mj(a);var p=a.Yb.p,q=p.length;a.Ef(p,q,a,n);var r=a.Ge;b.setTransform(1,0,0,1,0,0);b.scale(r,r);b.clearRect(0,0,d.width,d.height);null!==k&&""!==k&&(b.fillStyle=k,b.fillRect(0,0,d.width,d.height));d=w.zh();d.reset();
- d.translate(c.left,c.top);d.scale(e);0===g.x&&0===g.y||d.translate(-g.x,-g.y);b.setTransform(d.m11,d.m12,d.m21,d.m22,d.dx,d.dy);w.gf(d);Lj(a,b);if(null!==h){var s=new L(V);c=h.j;for(c.reset();c.next();)e=c.value,!1===m&&"Grid"===e.layer.name||null===e||s.add(e);c=function(c){var d=l;if(c.visible&&0!==c.Qc&&(void 0===d&&(d=!0),d||!c.Hc)){1!==c.Qc&&(b.globalAlpha=c.Qc);d=c.qv;d.length=0;var e=a.scale;c=c.kb.p;for(var g=c.length,h=0;h<g;h++){var k=c[h];if((Oi(k)||Qi(k))&&s.contains(k)){if(k instanceof
- G){var m=k;m.jc&&d.push(m);if(!1===m.wg)continue}m=k.ca;1<m.width*e||1<m.height*e?k.ef(b,a):Ri(k,b)}}b.globalAlpha=1}}}else if(!l&&m){var t=a.$s.W,v=t.layer;c=function(c){c===v?t.ef(b,a):c.ef(b,a,n,l,m)}}else c=function(c){c.ef(b,a,n,l,m)};for(e=0;e<q;e++)c(p[e]);a.wy=!1;a.Lk?a.Lk.Ol(a)&&a.Cx():a.Tn=function(){return new I(0,0)};ca(a);kj(a);a.Ef(p,q,a);Cj(a)}z.prototype.getRenderingHint=z.prototype.vw=function(a){return this.fh[a]};
- z.prototype.setRenderingHint=z.prototype.WI=function(a,b){this.fh[a]=b;this.At()};z.prototype.resetRenderingHints=z.prototype.$E=function(){this.fh=new xa;this.fh.drawShadows=!0;this.fh.textGreeking=!0;this.fh.viewportOptimizations=w.vE?!1:!0;this.fh.temporaryPixelRatio=!0;this.fh.pictureRatioOptimization=!0};function Lj(a,b){var c=a.fh;if(null!==c){if(void 0!==c.imageSmoothingEnabled){var d=!!c.imageSmoothingEnabled;b.oE=d;b.PK=d}c=c.defaultFont;void 0!==c&&null!==c&&(b.font=c,b.Zt=c)}}
- z.prototype.getInputOption=z.prototype.Iz=function(a){return this.yq[a]};z.prototype.setInputOption=function(a,b){this.yq[a]=b};z.prototype.resetInputOptions=z.prototype.ZE=function(){this.yq=new xa;this.yq.extraTouchArea=10;this.yq.extraTouchThreshold=10};z.prototype.setProperties=function(a){w.It(this,a)};function Dj(a){if(0===a.na.Ue){for(var b=a.Yl.j;b.next();){var c=b.key,d=b.value;c.ue();nh(c,d)}a.Yl.clear()}}
- z.prototype.sa=function(a){void 0===a&&(a=null);if(null===a)this.Yd=!0,this.ne();else{var b=this.qb;null!==a&&a.J()&&b.Gg(a)&&(this.Yd=!0,this.ne())}for(b=this.om.j;b.next();)b.value.sa(a)};
- z.prototype.Oz=function(a,b){if(!0!==this.Yd){this.Yd=!0;var c=!0===this.vw("temporaryPixelRatio");if(!0===this.vw("viewportOptimizations")&&this.kF!==Oj&&this.jF.ow(0,0,0,0)&&b.width===a.width&&b.height===a.height){var d=this.scale,e=w.eg(),g=Math.max(a.x,b.x),h=Math.max(a.y,b.y),k=Math.min(a.x+a.width,b.x+b.width),l=Math.min(a.y+a.height,b.y+b.height);e.x=g;e.y=h;e.width=Math.max(0,k-g)*d;e.height=Math.max(0,l-h)*d;if(0<e.width&&0<e.height){if(!this.Kd&&(this.Nf=!1,null!==this.Qb)){this.Kd=!0;mj(this);
- 0!==this.Yl.count&&(Dj(this),mj(this));this.Gc.J()||rj(this,this.zg());var m=this.ab;if(null!==m){var n=this.Ge,h=this.Hb*n,k=this.Gb*n,g=this.scale*n,d=Math.round(Math.round(b.x*g)-Math.round(a.x*g)),g=Math.round(Math.round(b.y*g)-Math.round(a.y*g)),l=this.gy,p=this.CB;l.width!==h&&(l.width=h);l.height!==k&&(l.height=k);p.clearRect(0,0,h,k);var l=190*this.Ge,q=70*this.Ge,r=Math.max(d,0),s=Math.max(g,0),t=Math.floor(h-r),v=Math.floor(k-s);p.oE=!1;p.drawImage(m.Rd,r,s,t,v,0,0,t,v);this.Lk.Ol(this)&&
- p.clearRect(0,0,l,q);var m=w.nb(),p=w.nb(),v=Math.abs(d),t=Math.abs(g),y=0===r?0:h-v,r=w.lc(y,0),v=w.lc(v+y,k);p.push(new x(Math.min(r.x,v.x),Math.min(r.y,v.y),Math.abs(r.x-v.x),Math.abs(r.y-v.y)));var B=this.md;B.reset();B.scale(n,n);1!==this.$b&&B.scale(this.$b);n=this.Sa;(0!==n.x||0!==n.y)&&isFinite(n.x)&&isFinite(n.y)&&B.translate(-n.x,-n.y);kb(r,B);kb(v,B);m.push(new x(Math.min(r.x,v.x),Math.min(r.y,v.y),Math.abs(r.x-v.x),Math.abs(r.y-v.y)));y=0===s?0:k-t;r.n(0,y);v.n(h,t+y);p.push(new x(Math.min(r.x,
- v.x),Math.min(r.y,v.y),Math.abs(r.x-v.x),Math.abs(r.y-v.y)));kb(r,B);kb(v,B);m.push(new x(Math.min(r.x,v.x),Math.min(r.y,v.y),Math.abs(r.x-v.x),Math.abs(r.y-v.y)));this.Lk.Ol(this)&&(h=0<d?0:-d,k=0<g?0:-g,r.n(h,k),v.n(l+h,q+k),p.push(new x(Math.min(r.x,v.x),Math.min(r.y,v.y),Math.abs(r.x-v.x),Math.abs(r.y-v.y))),kb(r,B),kb(v,B),m.push(new x(Math.min(r.x,v.x),Math.min(r.y,v.y),Math.abs(r.x-v.x),Math.abs(r.y-v.y))));w.A(r);w.A(v);Aj(this,!1);Mj(this,m,p,d,g);w.xa(m);w.xa(p);this.Kd=!1}}}else this.mf();
- w.qc(e);c&&(this.Dm=1,this.mf(),ti(this,!0))}else c?(this.Dm=1,this.mf(),ti(this,!0)):this.mf();for(c=this.om.j;c.next();)c.value.Oz()}};function zj(a){!1===a.am&&(a.am=!0)}function kj(a){!1===a.Nk&&(a.Nk=!0)}function Kj(a){!1!==a.Aq&&(a.Aq=!1,Pj(a,a.Hb,a.Gb))}function Pj(a,b,c){var d=a.ab,e=a.Ge,g=b*e,e=c*e;if(d.width!==g||d.height!==e)d.width=g,d.height=e,d.style.width=b+"px",d.style.height=c+"px",a.Yd=!0,ca(a)}
- function lj(a){var b=a.ab;if(null===b)return!0;var c=a.Qb,d=a.Hb,e=a.Gb,g=a.bD.copy(),h=!1,k=a.Kk?a.Od:0,l=a.Jk?a.Od:0,m=c.clientWidth||d+k,c=c.clientHeight||e+l;if(m!==d+k||c!==e+l)a.Kk=!1,a.Jk=!1,l=k=0,a.Hb=m,a.Gb=c,h=a.Aq=!0;a.am=!1;if(a.Tb.lh)return h?(a.Tb.cj(),a.aH(),!1):!0;var n=a.qb,p=a.Gc,m=p.width,c=p.height,q=n.width,r=n.height,s=p.x,t=n.x,v=p.right,k=n.right+k,y=p.y,B=n.y,p=p.bottom,l=n.bottom+l,A=n="1px",E=a.scale;a.Lz&&a.af&&(n=1,s+1<t&&(n=Math.max((t-s)*E+a.Hb,n)),v>k+1&&(n=Math.max((v-
- k)*E+a.Hb,n)),q+1<m&&(n=Math.max((m-q)*E+a.Hb,n)),n+="px");a.Mz&&a.bf&&(A=1,y+1<B&&(A=Math.max((B-y)*E+a.Gb,A)),p>l+1&&(A=Math.max((p-l)*E+a.Gb,A)),r+1<c&&(A=Math.max((c-r)*E+a.Gb,A)),A+="px");var N="1px"!==n,J="1px"!==A;if((!N||!J)&&N||J)J&&(k-=a.Od),N&&(l-=a.Od),a.Lz&&a.af&&(n=1,s+1<t&&(n=Math.max((t-s)*E+a.Hb,n)),v>k+1&&(n=Math.max((v-k)*E+a.Hb,n)),q+1<m&&(n=Math.max((m-q)*E+a.Hb,n)),n+="px"),a.Mz&&a.bf&&(A=1,y+1<B&&(A=Math.max((B-y)*E+a.Gb,A)),p>l+1&&(A=Math.max((p-l)*E+a.Gb,A)),r+1<c&&(A=Math.max((c-
- r)*E+a.Gb,A)),A+="px"),N="1px"!==n,J="1px"!==A;if(a.vv&&N===a.Jk&&J===a.Kk)return d===a.Hb&&e===a.Gb||a.mf(),!1;N!==a.Jk&&(a.Gb="1px"===n?a.Gb+a.Od:Math.max(a.Gb-a.Od,1),h=!0);a.Jk=N;a.Ty.style.width=n;J!==a.Kk&&(a.Hb="1px"===A?a.Hb+a.Od:Math.max(a.Hb-a.Od,1),h=!0,a.WB&&(J?(b.style.left=a.Od+"px",a.position=new I(a.Sa.x+a.Od/a.scale,a.Sa.y)):(b.style.left="0px",a.position=new I(a.Sa.x-a.Od/a.scale,a.Sa.y))));a.Kk=J;a.Uy.style.height=A;a.Lz&&a.af&&(q+1<m?a.Lj.scrollLeft=(a.position.x-s)*E:s+1<t?a.Lj.scrollLeft=
- a.Lj.scrollWidth-a.Lj.clientWidth:v>k+1&&(a.Lj.scrollLeft=a.position.x*E));a.Mz&&a.bf&&(r+1<c?a.Mj.scrollTop=(a.position.y-y)*E:y+1<B?a.Mj.scrollTop=a.Mj.scrollHeight-a.Mj.clientHeight:p>l+1&&(a.Mj.scrollTop=a.position.y*E));h&&(a.Aq=!0);m=a.Hb;c=a.Gb;a.Mj.style.height=c+"px";a.Mj.style.width=m+(a.Kk?a.Od:0)+"px";a.Lj.style.width=m+"px";a.Lj.style.height=c+(a.Jk?a.Od:0)+"px";a.Sy=!1;return d!==m||e!==c||a.Tb.jd?(n=a.qb,a.xt(g,n,h),!1):!0}
- z.prototype.add=z.prototype.add=function(a){w.k(a,C,z,"add:part");var b=a.h;if(b!==this){null!==b&&w.l("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString());this.sn&&(a.Pk="Tool");var c=a.jf,b=this.ql(c);null===b&&(b=this.ql(""));null===b&&w.l('Cannot add a Part when unable find a Layer named "'+c+'" and there is no default Layer');a.layer!==b&&(c=b.$o(99999999,a,a.h===this),0<=c&&this.Lc(ve,"parts",b,null,a,null,c),b.Hc||this.xc(),a.K(Qj),c=a.kt,null!==
- c&&c(a,null,b))}};
- z.prototype.$o=function(a){if(a instanceof D){if(this.oo.add(a),a instanceof F){var b=a.Va;null===b?this.al.add(a):b.mm.add(a);b=a.Ub;null!==b&&(b.h=this)}}else a instanceof G?this.lo.add(a):a instanceof da||this.kb.add(a);var c=this;Rj(a,function(a){Sj(c,a)});a.Nb&&a.V();b=a.data;null!==b&&(a instanceof da||(a instanceof G?this.Ek.add(b,a):this.ni.add(b,a)),Rj(a,function(a){Tj(c,a)}));!0!==Ij(a)&&!0!==Jj(a)||this.lg.add(a);Uj(a,!0,this);Vj(a)?(a.ca.J()&&this.sa(Ti(a,a.ca)),this.xc()):a.Na()&&a.ca.J()&&
- this.sa(Ti(a,a.ca));this.ne()};
- z.prototype.Oe=function(a){a.Hs();if(a instanceof D){if(this.oo.remove(a),a instanceof F){var b=a.Va;null===b?this.al.remove(a):b.mm.remove(a);b=a.Ub;null!==b&&(b.h=null)}}else a instanceof G?this.lo.remove(a):a instanceof da||this.kb.remove(a);var c=this;Rj(a,function(a){Wj(c,a)});b=a.data;null!==b&&(a instanceof da||(a instanceof G?this.Ek.remove(b):this.ni.remove(b)),Rj(a,function(a){Xj(c,a)}));this.lg.remove(a);Vj(a)?(a.ca.J()&&this.sa(Ti(a,a.ca)),this.xc()):a.Na()&&a.ca.J()&&this.sa(Ti(a,a.ca));
- this.ne()};z.prototype.remove=z.prototype.remove=function(a){w.k(a,C,z,"remove:part");a.cb=!1;a.mh=!1;var b=a.layer;if(null!==b&&b.h===this){a.K(Yj);a.Tm();var c=b.Oe(-1,a,!1);0<=c&&this.Lc(we,"parts",b,a,null,c,null);c=a.kt;null!==c&&c(a,b,null)}};z.prototype.removeParts=z.prototype.vA=function(a,b){if(w.isArray(a))for(var c=w.tb(a),d=0;d<c;d++){var e=w.ob(a,d);b&&!e.canDelete()||this.remove(e)}else for(e=new L(C),e.ce(a),c=e.j;c.next();)e=c.value,b&&!e.canDelete()||this.remove(e)};
- z.prototype.copyParts=z.prototype.No=function(a,b,c){return this.Jb.No(a,b,c)};z.prototype.moveParts=z.prototype.moveParts=function(a,b,c){w.k(b,I,z,"moveParts:offset");var d=this.zb;if(null!==d){d=d.Sd;null===d&&(d=new Ef,d.Mc(this));var e=new ta(C,Object);if(null!==a)a=a.j;else{for(a=this.fi;a.next();)eg(d,e,a.value,c);for(a=this.Jg;a.next();)eg(d,e,a.value,c);a=this.links}for(;a.next();)eg(d,e,a.value,c);d.moveParts(e,b,c)}};
- function Zj(a,b,c){w.k(b,Te,z,"addLayer:layer");null!==b.h&&b.h!==a&&w.l("Cannot share a Layer with another Diagram: "+b+" of "+b.h);null===c?null!==b.h&&w.l("Cannot add an existing Layer to this Diagram again: "+b):(w.k(c,Te,z,"addLayer:existingLayer"),c.h!==a&&w.l("Existing Layer must be in this Diagram: "+c+" not in "+c.h),b===c&&w.l("Cannot move a Layer before or after itself: "+b));if(b.h!==a){b=b.name;a=a.Yb;c=a.count;for(var d=0;d<c;d++)a.ma(d).name===b&&w.l("Cannot add Layer with the name '"+
- b+"'; a Layer with the same name is already present in this Diagram.")}}z.prototype.addLayer=z.prototype.xs=function(a){Zj(this,a,null);a.Mc(this);var b=this.Yb,c=b.count-1;if(!a.Hc)for(;0<=c&&b.ma(c).Hc;)c--;b.ie(c+1,a);null!==this.$d&&this.Lc(ve,"layers",this,null,a,null,c+1);this.sa();this.xc()};
- z.prototype.addLayerBefore=z.prototype.yG=function(a,b){Zj(this,a,b);a.Mc(this);var c=this.Yb,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.$d&&this.Lc(we,"layers",this,a,null,d,null));for(var e=c.count,g=0;g<e;g++)if(c.ma(g)===b){c.ie(g,a);break}null!==this.$d&&this.Lc(ve,"layers",this,null,a,null,g);this.sa();0>d&&this.xc()};
- z.prototype.addLayerAfter=function(a,b){Zj(this,a,b);a.Mc(this);var c=this.Yb,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.$d&&this.Lc(we,"layers",this,a,null,d,null));for(var e=c.count,g=0;g<e;g++)if(c.ma(g)===b){c.ie(g+1,a);break}null!==this.$d&&this.Lc(ve,"layers",this,null,a,null,g+1);this.sa();0>d&&this.xc()};
- z.prototype.removeLayer=function(a){w.k(a,Te,z,"removeLayer:layer");a.h!==this&&w.l("Cannot remove a Layer from another Diagram: "+a+" of "+a.h);if(""!==a.name){var b=this.Yb,c=b.indexOf(a);if(b.remove(a)){for(b=a.kb.copy().j;b.next();){var d=b.value,e=d.jf;d.jf=e!==a.name?e:""}null!==this.$d&&this.Lc(we,"layers",this,a,null,c,null);this.sa();this.xc()}}};z.prototype.findLayer=z.prototype.ql=function(a){for(var b=this.bn;b.next();){var c=b.value;if(c.name===a)return c}return null};
- z.prototype.addChangedListener=z.prototype.iz=function(a){w.g(a,"function",z,"addChangedListener:listener");null===this.kj&&(this.kj=new K("function"));this.kj.add(a)};z.prototype.removeChangedListener=z.prototype.sA=function(a){w.g(a,"function",z,"removeChangedListener:listener");null!==this.kj&&(this.kj.remove(a),0===this.kj.count&&(this.kj=null))};
- z.prototype.fw=function(a){this.mb||this.na.lE(a);a.Pd!==ue&&(this.ei=!0);if(null!==this.kj){var b=this.kj,c=b.length;if(1===c)b=b.ma(0),b(a);else if(0!==c)for(var d=b.Te(),e=0;e<c;e++)b=d[e],b(a)}};z.prototype.raiseChangedEvent=z.prototype.Lc=function(a,b,c,d,e,g,h){void 0===g&&(g=null);void 0===h&&(h=null);var k=new se;k.h=this;k.Pd=a;k.propertyName=b;k.object=c;k.oldValue=d;k.Kg=g;k.newValue=e;k.Ig=h;this.fw(k)};
- z.prototype.raiseChanged=z.prototype.i=function(a,b,c,d,e){this.Lc(te,a,this,b,c,d,e)};w.w(z,{Tb:"animationManager"},function(){return this.Bh});w.w(z,{na:"undoManager"},function(){return this.$d.na});w.defineProperty(z,{mb:"skipsUndoManager"},function(){return this.Ei},function(a){w.g(a,"boolean",z,"skipsUndoManager");this.Ei=a;this.$d.Ei=a});w.defineProperty(z,{Az:"delaysLayout"},function(){return this.$x},function(a){this.$x=a});
- z.prototype.Lm=function(a,b){if(null!==a&&a.h===this){var c=a.Pd;if(c===te){var d=a.object,c=a.propertyName,e=a.za(b);w.Wa(d,c,e);d instanceof V&&(d=d.W,null!==d&&d.je());this.ei=!0}else if(c===ve){e=a.object;c=a.Ig;d=a.newValue;if(e instanceof H)if("number"===typeof c&&d instanceof V){var g=e;b?g.Oe(c):g.ie(c,d);d=e.W;null!==d&&d.je()}else"number"===typeof c&&d instanceof kf&&(g=e,b?d.le?g.YE(c):g.UE(c):(c=d.le?g.qd(d.index):g.pd(d.index),c.Ms(d)));else e instanceof Te?(g=!0===a.Kg,"number"===typeof c&&
- d instanceof C&&(b?(d.je(),e.Oe(g?c:-1,d,g)):e.$o(c,d,g))):e instanceof z?"number"===typeof c&&d instanceof Te&&(e=d,b?this.Yb.ud(c):(e.Mc(this),this.Yb.ie(c,e))):w.l("unknown ChangedEvent.Insert object: "+a.toString());this.ei=!0}else c===we?(e=a.object,c=a.Kg,d=a.oldValue,e instanceof H?"number"===typeof c&&d instanceof V?(g=e,b?g.ie(c,d):g.Oe(c)):"number"===typeof c&&d instanceof kf&&(g=e,b?(c=d.le?g.qd(d.index):g.pd(d.index),c.Ms(d)):d.le?g.YE(c):g.UE(c)):e instanceof Te?(g=!0===a.Ig,"number"===
- typeof c&&d instanceof C&&(b?e.$o(c,d,g):(d.je(),e.Oe(g?c:-1,d,g)))):e instanceof z?"number"===typeof c&&d instanceof Te&&(e=d,b?(e.Mc(this),this.Yb.ie(c,e)):this.Yb.ud(c)):w.l("unknown ChangedEvent.Remove object: "+a.toString()),this.ei=!0):c!==ue&&w.l("unknown ChangedEvent: "+a.toString())}};z.prototype.startTransaction=z.prototype.ec=function(a){return this.na.ec(a)};z.prototype.commitTransaction=z.prototype.fe=function(a){return this.na.fe(a)};z.prototype.rollbackTransaction=z.prototype.yp=function(){return this.na.yp()};
- z.prototype.updateAllTargetBindings=z.prototype.pJ=function(a){void 0===a&&(a="");for(var b=this.fi;b.next();)b.value.Wb(a);for(b=this.Jg;b.next();)b.value.Wb(a);for(b=this.links;b.next();)b.value.Wb(a)};z.prototype.updateAllRelationshipsFromData=function(){for(var a=this.fi;a.next();)a.value.updateRelationshipsFromData();for(a=this.Jg;a.next();)a.value.updateRelationshipsFromData();for(a=this.links;a.next();)a.value.updateRelationshipsFromData()};
- function ak(a,b,c){if(a.zc||a.Kd)a.$b=c;else if(a.zc=!0,null===a.ab)a.$b=c;else{var d=a.qb.copy(),e=a.Hb,g=a.Gb;d.width=a.Hb/b;d.height=a.Gb/b;var h=a.on.copy();if(isNaN(h.x))switch(a.rz){case nc:h.x=0;break;case oc:h.x=e-1;break;case ac:h.x=e/2;break;case Pc:case Oc:h.x=e/2}if(isNaN(h.y))switch(a.rz){case kc:h.y=0;break;case tc:h.y=g-1;break;case ac:h.y=g/2;break;case Pc:case Oc:h.y=g/2}null!==a.iF&&(c=a.iF(a,c));c<a.oh&&(c=a.oh);c>a.nh&&(c=a.nh);a.position=new I(a.Sa.x+h.x/b-h.x/c,a.Sa.y+h.y/b-
- h.y/c);a.zc=!1;a.$b=c;a.xt(d,a.qb);oj(a,!1);a.sa();zj(a)}}z.prototype.xt=function(a,b,c){void 0===c&&(c=!1);c||zj(this);kj(this);var d=this.Ub;null===d||!d.Iw||c||a.width===b.width&&a.height===b.height||d.K();d=this.Za;!0===this.cm&&d instanceof zf&&(this.Q.ga=this.KF(this.Q.pe),d.doMouseMove());this.Oz(a,b);Cj(this);this.Ia("ViewportBoundsChanged",c?w.Ah:null,a)};
- function Cj(a,b){void 0===b&&(b=null);var c=a.hd;if(null!==c&&c.visible){for(var d=w.Ml(),e=1,g=1,h=c.va.p,k=h.length,l=0;l<k;l++){var m=h[l],n=m.interval;2>n||(gk(m.Kb)?g=g*n/O.eE(g,n):e=e*n/O.eE(e,n))}h=c.ww;d.n(g*h.width,e*h.height);h=g=l=k=0;if(null!==b)k=b.width,l=b.height,g=b.x,h=b.y;else{e=w.eg();g=a.qb;e.n(g.x,g.y,g.width,g.height);for(h=a.om.j;h.next();)g=h.value.qb,g.J()&&Ab(e,g.x,g.y,g.width,g.height);k=e.width;l=e.height;g=e.x;h=e.y;if(!e.J())return}c.width=k+2*d.width;c.height=l+2*d.height;
- e=w.O();O.Ss(g,h,0,0,d.width,d.height,e);e.offset(-d.width,-d.height);w.ek(d);c.W.location=e;w.A(e)}}z.prototype.clearSelection=z.prototype.hw=function(){var a=0<this.selection.count;a&&this.Ia("ChangingSelection");Df(this);a&&this.Ia("ChangedSelection")};function Df(a){a=a.selection;if(0<a.count){for(var b=a.Te(),c=b.length,d=0;d<c;d++)b[d].cb=!1;a.Ta();a.clear();a.freeze()}}
- z.prototype.select=z.prototype.select=function(a){null!==a&&(w.k(a,C,z,"select:part"),a.layer.h===this&&(!a.cb||1<this.selection.count)&&(this.Ia("ChangingSelection"),Df(this),a.cb=!0,this.Ia("ChangedSelection")))};
- z.prototype.selectCollection=z.prototype.oF=function(a){this.Ia("ChangingSelection");Df(this);if(w.isArray(a))for(var b=w.tb(a),c=0;c<b;c++){var d=w.ob(a,c);d instanceof C||w.l("Diagram.selectCollection given something that is not a Part: "+d);d.cb=!0}else for(a=a.j;a.next();)d=a.value,d instanceof C||w.l("Diagram.selectCollection given something that is not a Part: "+d),d.cb=!0;this.Ia("ChangedSelection")};
- z.prototype.clearHighlighteds=z.prototype.wD=function(){var a=this.yw;if(0<a.count){for(var b=a.Te(),c=b.length,d=0;d<c;d++)b[d].mh=!1;a.Ta();a.clear();a.freeze()}};z.prototype.highlight=function(a){null!==a&&a.layer.h===this&&(w.k(a,C,z,"highlight:part"),!a.mh||1<this.yw.count)&&(this.wD(),a.mh=!0)};
- z.prototype.highlightCollection=function(a){this.wD();if(w.isArray(a))for(var b=w.tb(a),c=0;c<b;c++){var d=w.ob(a,c);d instanceof C||w.l("Diagram.highlightCollection given something that is not a Part: "+d);d.mh=!0}else for(a=a.j;a.next();)d=a.value,d instanceof C||w.l("Diagram.highlightCollection given something that is not a Part: "+d),d.mh=!0};
- z.prototype.scroll=z.prototype.scroll=function(a,b,c){void 0===c&&(c=1);var d="up"===b||"down"===b,e=0;"pixel"===a?e=c:"line"===a?e=c*(d?this.Ht:this.Gt):"page"===a?(a=d?this.qb.height:this.qb.width,a*=this.scale,0!==a&&(e=Math.max(a-(d?this.Ht:this.Gt),0),e*=c)):w.l("scrolling unit must be 'pixel', 'line', or 'page', not: "+a);e/=this.scale;c=this.position.copy();"up"===b?c.y=this.position.y-e:"down"===b?c.y=this.position.y+e:"left"===b?c.x=this.position.x-e:"right"===b?c.x=this.position.x+e:w.l("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+
- b);this.position=c};z.prototype.scrollToRect=z.prototype.RI=function(a){var b=this.qb;b.ak(a)||(a=a.hl,a.x-=b.width/2,a.y-=b.height/2,this.position=a)};z.prototype.centerRect=function(a){var b=this.qb;a=a.hl;a.x-=b.width/2;a.y-=b.height/2;this.position=a};z.prototype.transformDocToView=z.prototype.LA=function(a){var b=this.md;b.reset();1!==this.$b&&b.scale(this.$b);var c=this.Sa;(0!==c.x||0!==c.y)&&isFinite(c.x)&&isFinite(c.y)&&b.translate(-c.x,-c.y);return a.copy().transform(this.md)};
- z.prototype.transformViewToDoc=z.prototype.KF=function(a){var b=this.md;b.reset();1!==this.$b&&b.scale(this.$b);var c=this.Sa;(0!==c.x||0!==c.y)&&isFinite(c.x)&&isFinite(c.y)&&b.translate(-c.x,-c.y);return kb(a.copy(),this.md)};var Ff;z.None=Ff=w.v(z,"None",0);var sj;z.Uniform=sj=w.v(z,"Uniform",1);var tj;z.UniformToFill=tj=w.v(z,"UniformToFill",2);var Yg;z.CycleAll=Yg=w.v(z,"CycleAll",10);var bh;z.CycleNotDirected=bh=w.v(z,"CycleNotDirected",11);var dh;
- z.CycleNotDirectedFast=dh=w.v(z,"CycleNotDirectedFast",12);var eh;z.CycleNotUndirected=eh=w.v(z,"CycleNotUndirected",13);var Zg;z.CycleDestinationTree=Zg=w.v(z,"CycleDestinationTree",14);var ah;z.CycleSourceTree=ah=w.v(z,"CycleSourceTree",15);var Wi;z.DocumentScroll=Wi=w.v(z,"DocumentScroll",1);var Oj;z.InfiniteScroll=Oj=w.v(z,"InfiniteScroll",2);
- w.defineProperty(z,{qJ:"validCycle"},function(){return this.Pv},function(a){var b=this.Pv;b!==a&&(w.Ea(a,z,z,"validCycle"),this.Pv=a,this.i("validCycle",b,a))});w.defineProperty(z,{Mw:"linkSpacing"},function(){return this.xj},function(a){var b=this.xj;b!==a&&(w.o(a,z,"linkSpacing"),0>a&&w.ja(a,">= zero",z,"linkSpacing"),this.xj=a,this.i("linkSpacing",b,a))});w.w(z,{bn:"layers"},function(){return this.Yb.j});
- w.defineProperty(z,{Bf:"isModelReadOnly"},function(){var a=this.$d;return null===a?!1:a.xb},function(a){var b=this.$d;null!==b&&(b.xb=a)});w.defineProperty(z,{xb:"isReadOnly"},function(){return this.Ok},function(a){var b=this.Ok;b!==a&&(w.g(a,"boolean",z,"isReadOnly"),this.Ok=a,this.i("isReadOnly",b,a))});w.defineProperty(z,{isEnabled:"isEnabled"},function(){return this.Xe},function(a){var b=this.Xe;b!==a&&(w.g(a,"boolean",z,"isEnabled"),this.Xe=a,this.i("isEnabled",b,a))});
- w.defineProperty(z,{lz:"allowClipboard"},function(){return this.au},function(a){var b=this.au;b!==a&&(w.g(a,"boolean",z,"allowClipboard"),this.au=a,this.i("allowClipboard",b,a))});w.defineProperty(z,{Zj:"allowCopy"},function(){return this.pk},function(a){var b=this.pk;b!==a&&(w.g(a,"boolean",z,"allowCopy"),this.pk=a,this.i("allowCopy",b,a))});
- w.defineProperty(z,{Im:"allowDelete"},function(){return this.qk},function(a){var b=this.qk;b!==a&&(w.g(a,"boolean",z,"allowDelete"),this.qk=a,this.i("allowDelete",b,a))});w.defineProperty(z,{Xv:"allowDragOut"},function(){return this.bu},function(a){var b=this.bu;b!==a&&(w.g(a,"boolean",z,"allowDragOut"),this.bu=a,this.i("allowDragOut",b,a))});
- w.defineProperty(z,{lD:"allowDrop"},function(){return this.cu},function(a){var b=this.cu;b!==a&&(w.g(a,"boolean",z,"allowDrop"),this.cu=a,this.i("allowDrop",b,a))});w.defineProperty(z,{aw:"allowTextEdit"},function(){return this.zk},function(a){var b=this.zk;b!==a&&(w.g(a,"boolean",z,"allowTextEdit"),this.zk=a,this.i("allowTextEdit",b,a))});
- w.defineProperty(z,{Yv:"allowGroup"},function(){return this.rk},function(a){var b=this.rk;b!==a&&(w.g(a,"boolean",z,"allowGroup"),this.rk=a,this.i("allowGroup",b,a))});w.defineProperty(z,{bw:"allowUngroup"},function(){return this.Ak},function(a){var b=this.Ak;b!==a&&(w.g(a,"boolean",z,"allowUngroup"),this.Ak=a,this.i("allowUngroup",b,a))});
- w.defineProperty(z,{Fo:"allowInsert"},function(){return this.eu},function(a){var b=this.eu;b!==a&&(w.g(a,"boolean",z,"allowInsert"),this.eu=a,this.i("allowInsert",b,a))});w.defineProperty(z,{Bs:"allowLink"},function(){return this.sk},function(a){var b=this.sk;b!==a&&(w.g(a,"boolean",z,"allowLink"),this.sk=a,this.i("allowLink",b,a))});
- w.defineProperty(z,{Jm:"allowRelink"},function(){return this.uk},function(a){var b=this.uk;b!==a&&(w.g(a,"boolean",z,"allowRelink"),this.uk=a,this.i("allowRelink",b,a))});w.defineProperty(z,{fl:"allowMove"},function(){return this.tk},function(a){var b=this.tk;b!==a&&(w.g(a,"boolean",z,"allowMove"),this.tk=a,this.i("allowMove",b,a))});
- w.defineProperty(z,{Zv:"allowReshape"},function(){return this.vk},function(a){var b=this.vk;b!==a&&(w.g(a,"boolean",z,"allowReshape"),this.vk=a,this.i("allowReshape",b,a))});w.defineProperty(z,{Cs:"allowResize"},function(){return this.wk},function(a){var b=this.wk;b!==a&&(w.g(a,"boolean",z,"allowResize"),this.wk=a,this.i("allowResize",b,a))});
- w.defineProperty(z,{$v:"allowRotate"},function(){return this.xk},function(a){var b=this.xk;b!==a&&(w.g(a,"boolean",z,"allowRotate"),this.xk=a,this.i("allowRotate",b,a))});w.defineProperty(z,{wf:"allowSelect"},function(){return this.yk},function(a){var b=this.yk;b!==a&&(w.g(a,"boolean",z,"allowSelect"),this.yk=a,this.i("allowSelect",b,a))});
- w.defineProperty(z,{mD:"allowUndo"},function(){return this.fu},function(a){var b=this.fu;b!==a&&(w.g(a,"boolean",z,"allowUndo"),this.fu=a,this.i("allowUndo",b,a))});w.defineProperty(z,{cw:"allowZoom"},function(){return this.hu},function(a){var b=this.hu;b!==a&&(w.g(a,"boolean",z,"allowZoom"),this.hu=a,this.i("allowZoom",b,a))});
- w.defineProperty(z,{Mz:"hasVerticalScrollbar"},function(){return this.Mu},function(a){var b=this.Mu;b!==a&&(w.g(a,"boolean",z,"hasVerticalScrollbar"),this.Mu=a,zj(this),this.sa(),this.i("hasVerticalScrollbar",b,a),oj(this,!1))});w.defineProperty(z,{Lz:"hasHorizontalScrollbar"},function(){return this.Lu},function(a){var b=this.Lu;b!==a&&(w.g(a,"boolean",z,"hasHorizontalScrollbar"),this.Lu=a,zj(this),this.sa(),this.i("hasHorizontalScrollbar",b,a),oj(this,!1))});
- w.defineProperty(z,{af:"allowHorizontalScroll"},function(){return this.du},function(a){var b=this.du;b!==a&&(w.g(a,"boolean",z,"allowHorizontalScroll"),this.du=a,this.i("allowHorizontalScroll",b,a),oj(this,!1))});w.defineProperty(z,{bf:"allowVerticalScroll"},function(){return this.gu},function(a){var b=this.gu;b!==a&&(w.g(a,"boolean",z,"allowVerticalScroll"),this.gu=a,this.i("allowVerticalScroll",b,a),oj(this,!1))});
- w.defineProperty(z,{Gt:"scrollHorizontalLineChange"},function(){return this.wv},function(a){var b=this.wv;b!==a&&(w.g(a,"number",z,"scrollHorizontalLineChange"),0>a&&w.ja(a,">= 0",z,"scrollHorizontalLineChange"),this.wv=a,this.i("scrollHorizontalLineChange",b,a))});
- w.defineProperty(z,{Ht:"scrollVerticalLineChange"},function(){return this.xv},function(a){var b=this.xv;b!==a&&(w.g(a,"number",z,"scrollVerticalLineChange"),0>a&&w.ja(a,">= 0",z,"scrollVerticalLineChange"),this.xv=a,this.i("scrollVerticalLineChange",b,a))});w.defineProperty(z,{Q:"lastInput"},function(){return this.Rb},function(a){u&&w.k(a,he,z,"lastInput");this.Rb=a});w.defineProperty(z,{Cc:"firstInput"},function(){return this.Gk},function(a){u&&w.k(a,he,z,"firstInput");this.Gk=a});
- w.defineProperty(z,{gc:"currentCursor"},function(){return this.Tx},function(a){""===a&&(a=this.kq);this.Tx!==a&&(w.g(a,"string",z,"currentCursor"),null!==this.ab&&(this.Tx=a,this.ab.style.cursor=a,this.Qb.style.cursor=a))});w.defineProperty(z,{XJ:"defaultCursor"},function(){return this.kq},function(a){""===a&&(a="auto");var b=this.kq;b!==a&&(w.g(a,"string",z,"defaultCursor"),this.kq=a,this.i("defaultCursor",b,a))});
- w.defineProperty(z,{pK:"hasGestureZoom"},function(){return this.Vn},function(a){var b=this.Vn;b!==a&&(w.g(a,"boolean",z,"hasGestureZoom"),this.Vn=a,this.i("hasGestureZoom",b,a))});w.defineProperty(z,{click:"click"},function(){return this.ji},function(a){var b=this.ji;b!==a&&(null!==a&&w.g(a,"function",z,"click"),this.ji=a,this.i("click",b,a))});
- w.defineProperty(z,{Ps:"doubleClick"},function(){return this.qi},function(a){var b=this.qi;b!==a&&(null!==a&&w.g(a,"function",z,"doubleClick"),this.qi=a,this.i("doubleClick",b,a))});w.defineProperty(z,{sz:"contextClick"},function(){return this.li},function(a){var b=this.li;b!==a&&(null!==a&&w.g(a,"function",z,"contextClick"),this.li=a,this.i("contextClick",b,a))});
- w.defineProperty(z,{eA:"mouseOver"},function(){return this.Ai},function(a){var b=this.Ai;b!==a&&(null!==a&&w.g(a,"function",z,"mouseOver"),this.Ai=a,this.i("mouseOver",b,a))});w.defineProperty(z,{dA:"mouseHover"},function(){return this.zi},function(a){var b=this.zi;b!==a&&(null!==a&&w.g(a,"function",z,"mouseHover"),this.zi=a,this.i("mouseHover",b,a))});
- w.defineProperty(z,{cA:"mouseHold"},function(){return this.yi},function(a){var b=this.yi;b!==a&&(null!==a&&w.g(a,"function",z,"mouseHold"),this.yi=a,this.i("mouseHold",b,a))});w.defineProperty(z,{vI:"mouseDragOver"},function(){return this.jv},function(a){var b=this.jv;b!==a&&(null!==a&&w.g(a,"function",z,"mouseDragOver"),this.jv=a,this.i("mouseDragOver",b,a))});
- w.defineProperty(z,{bA:"mouseDrop"},function(){return this.xi},function(a){var b=this.xi;b!==a&&(null!==a&&w.g(a,"function",z,"mouseDrop"),this.xi=a,this.i("mouseDrop",b,a))});w.defineProperty(z,{KA:"toolTip"},function(){return this.Hi},function(a){var b=this.Hi;b!==a&&(null!==a&&w.k(a,da,z,"toolTip"),this.Hi=a,this.i("toolTip",b,a))});
- w.defineProperty(z,{contextMenu:"contextMenu"},function(){return this.mi},function(a){var b=this.mi;b!==a&&(null!==a&&w.k(a,da,z,"contextMenu"),this.mi=a,this.i("contextMenu",b,a))});w.defineProperty(z,{Jb:"commandHandler"},function(){return this.Kx},function(a){var b=this.Kx;b!==a&&(w.k(a,za,z,"commandHandler"),null!==a.h&&w.l("Cannot share CommandHandlers between Diagrams: "+a.toString()),null!==b&&b.Mc(null),this.Kx=a,a.Mc(this))});
- w.defineProperty(z,{zb:"toolManager"},function(){return this.ez},function(a){var b=this.ez;b!==a&&(w.k(a,zf,z,"toolManager"),null!==a.h&&w.l("Cannot share ToolManagers between Diagrams: "+a.toString()),null!==b&&b.Mc(null),this.ez=a,a.Mc(this))});w.defineProperty(z,{zz:"defaultTool"},function(){return this.Zx},function(a){var b=this.Zx;b!==a&&(w.k(a,Ue,z,"defaultTool"),this.Zx=a,this.Za===b&&(this.Za=a))});
- w.defineProperty(z,{Za:"currentTool"},function(){return this.Vx},function(a){var b=this.Vx;if(null!==b)for(b.ta&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop(),b=this.om.j;b.next();)b.value.sa();null===a&&(a=this.zz);null!==a&&(w.k(a,Ue,z,"currentTool"),this.Vx=a,a.Mc(this),a.doStart())});w.w(z,{selection:"selection"},function(){return this.Av});
- w.defineProperty(z,{nI:"maxSelectionCount"},function(){return this.ev},function(a){var b=this.ev;if(b!==a)if(w.g(a,"number",z,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.ev=a,this.i("maxSelectionCount",b,a),!this.na.lb&&(a=this.selection.count-a,0<a)){this.Ia("ChangingSelection");for(var b=this.selection.Te(),c=0;c<a;c++)b[c].cb=!1;this.Ia("ChangedSelection")}}else w.ja(a,">= 0",z,"maxSelectionCount")});
- w.defineProperty(z,{xI:"nodeSelectionAdornmentTemplate"},function(){return this.lv},function(a){var b=this.lv;b!==a&&(w.k(a,da,z,"nodeSelectionAdornmentTemplate"),this.lv=a,this.i("nodeSelectionAdornmentTemplate",b,a))});w.defineProperty(z,{FH:"groupSelectionAdornmentTemplate"},function(){return this.Iu},function(a){var b=this.Iu;b!==a&&(w.k(a,da,z,"groupSelectionAdornmentTemplate"),this.Iu=a,this.i("groupSelectionAdornmentTemplate",b,a))});
- w.defineProperty(z,{jI:"linkSelectionAdornmentTemplate"},function(){return this.$u},function(a){var b=this.$u;b!==a&&(w.k(a,da,z,"linkSelectionAdornmentTemplate"),this.$u=a,this.i("linkSelectionAdornmentTemplate",b,a))});w.w(z,{yw:"highlighteds"},function(){return this.Nu});
- w.defineProperty(z,{ei:"isModified"},function(){var a=this.na;return a.isEnabled?null!==a.Ti?!0:this.yy&&this.Wg!==a.Yi:this.yy},function(a){if(this.yy!==a){w.g(a,"boolean",z,"isModified");this.yy=a;var b=this.na;!a&&b.isEnabled&&(this.Wg=b.Yi);a||pk(this)}});function pk(a){var b=a.ei;a.cD!==b&&(a.cD=b,a.Ia("Modified"))}
- w.defineProperty(z,{ha:"model"},function(){return this.$d},function(a){var b=this.$d;if(b!==a){w.k(a,M,z,"model");this.Za.doCancel();null!==b&&b.na!==a.na&&b.na.wE&&w.l("Do not replace a Diagram.model while a transaction is in progress.");this.Tb.cj();this.hw();this.uf=!1;this.Qn=!0;this.Wg=-2;this.Nf=!1;var c=this.Kd;this.Kd=!0;this.Tb.Fl();null!==b&&(b.sA(this.fC),b instanceof X&&qk(this,b.hk),qk(this,b.rh));this.$d=a;a.iz(this.eC);rk(this,a.rh);a instanceof X&&sk(this,a.hk);a.sA(this.eC);a.iz(this.fC);
- this.Kd=c;this.zc||this.sa();null!==b&&(a.na.isEnabled=b.na.isEnabled)}});w.defineProperty(z,{Ua:null},function(){return this.YB},function(a){this.YB=a});w.w(z,{Ow:null},function(){return this.gG});
- function Zi(a,b){if(b.ha===a.ha){var c=b.Pd,d=b.propertyName;if(c===ue&&"S"===d[0])if("StartingFirstTransaction"===d)c=a.zb,c.nf.each(function(b){b.Mc(a)}),c.Yf.each(function(b){b.Mc(a)}),c.Zf.each(function(b){b.Mc(a)}),a.Kd||a.uf||(a.yu=!0,a.Qn&&(a.Nf=!0),a.Bh.Fl());else if("StartingUndo"===d||"StartingRedo"===d){var e=a.Tb;e.lh&&!a.mb&&e.cj();a.Ia("ChangingSelection")}else"StartedTransaction"===d&&(e=a.Tb,e.lh&&!a.mb&&e.cj(),a.Vu&&e.Fl());else if(a.Ua){a.Ua=!1;try{var g=b.Xf;if(""!==g)if(c===te){if("linkFromKey"===
- g){var h=b.object,k=a.Cg(h);if(null!==k){var l=b.newValue,m=a.ff(l);k.aa=m}}else if("linkToKey"===g)h=b.object,k=a.Cg(h),null!==k&&(l=b.newValue,m=a.ff(l),k.fa=m);else if("linkFromPortId"===g){if(h=b.object,k=a.Cg(h),null!==k){var n=b.newValue;"string"===typeof n&&(k.Sf=n)}}else if("linkToPortId"===g)h=b.object,k=a.Cg(h),null!==k&&(n=b.newValue,"string"===typeof n&&(k.Pg=n));else if("nodeGroupKey"===g){var h=b.object,p=a.bi(h);if(null!==p){var q=b.newValue;if(void 0!==q){var r=a.ff(q);p.Va=r instanceof
- F?r:null}else p.Va=null}}else if("linkLabelKeys"===g){if(h=b.object,k=a.Cg(h),null!==k){var s=b.oldValue,t=b.newValue;if(w.isArray(s))for(var v=w.tb(s),y=0;y<v;y++){var B=w.ob(s,y),m=a.ff(B);null!==m&&(m.Cd=null)}if(w.isArray(t))for(v=w.tb(t),y=0;y<v;y++)B=w.ob(t,y),m=a.ff(B),null!==m&&(m.Cd=k)}}else if("nodeParentKey"===g){var A=b.object,E=a.ff(b.newValue),N=a.sw(A);if(null!==N){var J=N.Us();null!==J?null===E?a.remove(J):a.Bd?J.aa=E:J.fa=E:tk(a,E,N)}}else if("parentLinkCategory"===g){var A=b.object,
- N=a.sw(A),W=b.newValue;null!==N&&"string"===typeof W&&(J=N.Us(),null!==J&&(J.Tc=W))}else if("nodeCategory"===g){var h=b.object,ea=a.bi(h),W=b.newValue;null!==ea&&"string"===typeof W&&(ea.Tc=W)}else if("linkCategory"===g){var h=b.object,T=a.Cg(h),W=b.newValue;null!==T&&"string"===typeof W&&(T.Tc=W)}else if("nodeDataArray"===g){var P=b.oldValue;qk(a,P);var aa=b.newValue;rk(a,aa)}else"linkDataArray"===g&&(P=b.oldValue,qk(a,P),aa=b.newValue,sk(a,aa));a.ei=!0}else c===ve?(aa=b.newValue,"nodeDataArray"===
- g&&w.$a(aa)?uk(a,aa):"linkDataArray"===g&&w.$a(aa)?vk(a,aa):"linkLabelKeys"===g&&Ze(aa)&&(k=a.Cg(b.object),m=a.ff(aa),null!==k&&null!==m&&(m.Cd=k)),a.ei=!0):c===we?(P=b.oldValue,"nodeDataArray"===g&&w.$a(P)?wk(a,P):"linkDataArray"===g&&w.$a(P)?wk(a,P):"linkLabelKeys"===g&&Ze(P)&&(m=a.ff(P),null!==m&&(m.Cd=null)),a.ei=!0):c===ue&&("SourceChanged"===g?Yi(a,b.object,b.propertyName):"ModelDisplaced"===g&&a.Gl());else if(c===te){var La=b.propertyName,h=b.object;if(h===a.ha){if("nodeKeyProperty"===La||
- "nodeCategoryProperty"===La||"linkFromKeyProperty"===La||"linkToKeyProperty"===La||"linkFromPortIdProperty"===La||"linkToPortIdProperty"===La||"linkLabelKeysProperty"===La||"nodeIsGroupProperty"===La||"nodeGroupKeyProperty"===La||"nodeParentKeyProperty"===La||"linkCategoryProperty"===La)a.na.lb||a.Gl()}else Yi(a,h,La);a.ei=!0}else if(c===ve||c===we)xk(a,b),a.ei=!0;else if(c===ue){if("FinishedUndo"===d||"FinishedRedo"===d)a.na.ti=!0,a.Ia("ChangedSelection"),mj(a),a.na.ti=!1;a.yu=!0;a.mf();e=a.Bh;e.jd&&
- 0===a.na.Ue&&oi(e);"CommittedTransaction"===d&&a.na.By&&(a.Wg=Math.min(a.Wg,a.na.Yi-1));pk(a);var Aa=b.YH;Aa&&a.Ow.clear();!a.Jy&&Aa&&(a.Jy=!0,w.setTimeout(function(){a.Za.standardMouseOver();a.Jy=!1},10))}}finally{a.Ua=!0}}}}
- function Yi(a,b,c){if("string"===typeof c){var d=a.bi(b);if(null!==d)d.Wb(c),a.ha instanceof Be&&(d=a.Cg(b),null!==d&&d.Wb(c));else{for(var d=null,e=a.fm.j;e.next();){for(var g=e.value,h=0;h<g.length;h++){var k=g[h];null!==k.mg&&(k=k.mg.za(b),null!==k&&(null===d&&(d=w.nb()),d.push(k)))}if(null!==d)break}if(null!==d){for(e=0;e<d.length;e++)d[e].Wb(c);w.xa(d)}}b===a.ha.st&&a.pJ(c)}}w.defineProperty(z,{lx:"skipsModelSourceBindings"},function(){return this.EC},function(a){this.EC=a});
- w.defineProperty(z,{Nt:null},function(){return this.Xy},function(a){this.Xy=a});function xk(a,b){var c=b.Pd===ve,d=c?b.Ig:b.Kg,e=c?b.newValue:b.oldValue,g=a.fm.za(b.object);if(Array.isArray(g))for(var h=0;h<g.length;h++){var k=g[h];if(c)yk(k,e,d);else{var l=d;if(!(0>l)){var m=l;zk(k)&&m++;k.Oe(m);Ak(k,m,l)}}}}function Tj(a,b){var c=b.ui;if(w.isArray(c)){var d=a.fm.za(c);if(null===d)d=[],d.push(b),a.fm.add(c,d);else{for(c=0;c<d.length;c++)if(d[c]===b)return;d.push(b)}}}
- function Xj(a,b){var c=b.ui;if(w.isArray(c)){var d=a.fm.za(c);if(null!==d)for(var e=0;e<d.length;e++)if(d[e]===b){d.splice(e,1);0===d.length&&a.fm.remove(c);break}}}function Sj(a,b){for(var c=b.va.p,d=c.length,e=0;e<d;e++){var g=c[e];g instanceof $i&&Bk(a,g)}}function Bk(a,b){var c=b.element;if(null!==c){var c=c.src,d=a.qo.za(c);if(null===d)d=[],d.push(b),a.qo.add(c,d);else{for(c=0;c<d.length;c++)if(d[c]===b)return;d.push(b)}}}
- function Wj(a,b){for(var c=b.va.p,d=c.length,e=0;e<d;e++){var g=c[e];g instanceof $i&&Ck(a,g)}}function Ck(a,b){var c=b.element;if(null!==c){var c=c.src,d=a.qo.za(c);if(null!==d)for(var e=0;e<d.length;e++)if(d[e]===b){d.splice(e,1);0===d.length&&a.qo.remove(c);break}}}
- z.prototype.clear=z.prototype.clear=function(){var a=null;null!==this.hd&&(a=this.hd.W);this.ha.clear();for(var b=this.Yb.length,c=0;c<b;c++)this.Yb.p[c].clear();this.lg.clear();this.Yl.clear();this.oo.clear();this.al.clear();this.lo.clear();this.kb.clear();this.ni.clear();this.Ek.clear();this.fm.clear();this.Av.Ta();this.Av.clear();this.Av.freeze();this.Nu.Ta();this.Nu.clear();this.Nu.freeze();tf=this.Bn=null;yf="";this.zu=(new x(NaN,NaN,NaN,NaN)).freeze();null!==a&&(this.add(a),this.kb.remove(a));
- this.sa()};
- z.prototype.reset=z.prototype.reset=function(){this.zc=!0;this.clear();this.Yb=new K(Te);this.$E();this.ZE();this.Sa=(new I(NaN,NaN)).freeze();this.$b=1;this.Pu=(new I(NaN,NaN)).freeze();this.Qu=NaN;this.gv=1E-4;this.dv=100;this.Tv=(new I(NaN,NaN)).freeze();this.Gu=(new x(NaN,NaN,NaN,NaN)).freeze();this.Rl=Ff;this.An=Pc;this.Mk=Ff;this.Xn=Pc;this.Ru=this.Ou=Xb;this.ku=(new vb(16,16,16,16)).freeze();this.Uu=!0;this.Pv=Yg;this.kq="auto";this.mi=this.Hi=this.xi=this.jv=this.yi=this.zi=this.Ai=this.li=
- this.qi=this.ji=null;this.Ok=!1;this.qk=this.pk=this.au=this.Xe=!0;this.cu=this.bu=!1;this.gu=this.du=this.Mu=this.Lu=this.hu=this.fu=this.yk=this.xk=this.wk=this.vk=this.tk=this.uk=this.sk=this.eu=this.Ak=this.rk=this.zk=!0;this.xv=this.wv=16;this.Ze=(new vb(5)).freeze();this.ev=999999999;this.Zd=null;cj(this);this.hd=null;this.Ei=!0;bj(this);this.Ub=new Ve;this.Ei=!1;this.ha=new X;this.uf=!1;this.Qn=!0;this.zc=this.Nf=!1;this.sa()};
- z.prototype.rebuildParts=z.prototype.Gl=function(){for(var a=this.jA.j;a.next();){var b=a.value,c=a.key;(!b.Td()||b instanceof F)&&w.l('Invalid node template in Diagram.nodeTemplateMap: template for "'+c+'" must be a Node or a simple Part, not a Group or Link: '+b)}for(a=this.Kz.j;a.next();)b=a.value,c=a.key,b instanceof F||w.l('Invalid group template in Diagram.groupTemplateMap: template for "'+c+'" must be a Group, not a normal Node or Link: '+b);for(a=this.Yz.j;a.next();)b=a.value,c=a.key,b instanceof
- G||w.l('Invalid link template in Diagram.linkTemplateMap: template for "'+c+'" must be a Link, not a normal Node or simple Part: '+b);a=w.nb();for(b=this.selection.j;b.next();)(c=b.value.data)&&a.push(c);for(var b=w.nb(),d=this.yw.j;d.next();)(c=d.value.data)&&b.push(c);c=w.nb();for(d=this.Jg.j;d.next();){var e=d.value;null!==e.data&&(c.push(e.data),c.push(e.location))}for(d=this.links.j;d.next();)e=d.value,null!==e.data&&(c.push(e.data),c.push(e.location));for(d=this.fi.j;d.next();)e=d.value,null!==
- e.data&&(c.push(e.data),c.push(e.location));d=this.ha;d instanceof X&&qk(this,d.hk);qk(this,d.rh);rk(this,d.rh);d instanceof X&&sk(this,d.hk);for(d=0;d<a.length;d++)e=this.bi(a[d]),null!==e&&(e.cb=!0);for(d=0;d<b.length;d++)e=this.bi(b[d]),null!==e&&(e.mh=!0);for(d=0;d<c.length;d+=2)e=this.bi(c[d]),null!==e&&(e.location=c[d+1]);w.xa(a);w.xa(b);w.xa(c)};
- function rk(a,b){if(null!==b){for(var c=a.ha,d=w.tb(b),e=0;e<d;e++){var g=w.ob(b,e);c.se(g)?uk(a,g,!1):c instanceof X&&vk(a,g)}if(c instanceof X||c instanceof Be){for(e=0;e<d;e++)g=w.ob(b,e),c.se(g)&&Dk(a,g);if(c instanceof X)for(c=a.links;c.next();)Ek(c.value)}Fk(a,!1)}}function uk(a,b,c){if(void 0!==b&&null!==b&&!a.na.lb&&!a.ni.contains(b)){void 0===c&&(c=!0);var d=a.Hz(b),e=Gk(a,b,d);null!==e&&(Cf(e),e=e.copy(),null!==e&&(e.ii=d,a.sn&&(e.Pk="Tool"),a.add(e),e.data=b,c&&Dk(a,b)))}}
- z.prototype.Hz=function(a){return this.ha.Hz(a)};var Hk=!1,Ik=!1;function Gk(a,b,c){var d=!1,e=a.ha;e instanceof X&&(d=e.Sz(b));d?(b=a.Kz.za(c),null===b&&(b=a.Kz.za(""),null===b&&(Ik||(Ik=!0,w.trace('No Group template found for category "'+c+'"'),w.trace(" Using default group template")),b=a.qB))):(b=a.jA.za(c),null===b&&(b=a.jA.za(""),null===b&&(Hk||(Hk=!0,w.trace('No Node template found for category "'+c+'"'),w.trace(" Using default node template")),b=a.sB)));return b}
- function Dk(a,b){var c=a.ha;if(c instanceof X||c instanceof Be){var d=c.Db(b);if(void 0!==d){var e=$e(c,d),g=a.bi(b);if(null!==e&&null!==g){for(e=e.j;e.next();){var h=e.value;if(c instanceof X){var k=c;if(k.se(h)){if(g instanceof F&&k.Xm(h)===d){var l=g,h=a.bi(h);null!==h&&(h.Va=l)}}else{var m=a.Cg(h);if(null!==m&&g instanceof D&&(l=g,k.ul(h)===d&&(m.aa=l),k.xl(h)===d&&(m.fa=l),h=k.fk(h),w.isArray(h)))for(k=0;k<w.tb(h);k++)if(w.ob(h,k)===d){l.Cd=m;break}}}else c instanceof Be&&(m=c,m.se(h)&&g instanceof
- D&&(l=g,m.Ym(h)===d&&(h=a.sw(h),tk(a,l,h))))}gf(c,d)}c instanceof X?(c=c.Xm(b),void 0!==c&&(c=a.ff(c),c instanceof F&&(g.Va=c))):c instanceof Be&&(c=c.Ym(b),void 0!==c&&g instanceof D&&(l=g,g=a.ff(c),tk(a,g,l)))}}}
- function tk(a,b,c){if(null!==b&&null!==c){var d=a.zb.BE,e=b,g=c;if(a.Bd)for(b=g.Vd;b.next();){if(b.value.fa===g)return}else for(e=c,g=b,b=e.Vd;b.next();)if(b.value.aa===e)return;null!==d&&$g(d,e,g,null,!0)||(d=a.uw(c.data),b=Jk(a,d),null!==b&&(Cf(b),b=b.copy(),null!==b&&(b.ii=d,b.aa=e,b.fa=g,a.add(b),b.data=c.data)))}}function sk(a,b){if(null!==b){for(var c=w.tb(b),d=0;d<c;d++){var e=w.ob(b,d);vk(a,e)}Fk(a,!1)}}
- function vk(a,b){if(void 0!==b&&null!==b&&!a.na.lb&&!a.Ek.contains(b)){var c=a.uw(b),d=Jk(a,c);if(null!==d&&(Cf(d),d=d.copy(),null!==d)){d.ii=c;var c=a.ha,e=c.yH(b);""!==e&&(d.Sf=e);e=c.ul(b);void 0!==e&&(e=a.ff(e),e instanceof D&&(d.aa=e));e=c.BH(b);""!==e&&(d.Pg=e);e=c.xl(b);void 0!==e&&(e=a.ff(e),e instanceof D&&(d.fa=e));c=c.fk(b);if(w.isArray(c))for(var e=w.tb(c),g=0;g<e;g++){var h=w.ob(c,g),h=a.ff(h);null!==h&&(h.Cd=d)}a.add(d);d.data=b}}}
- z.prototype.uw=function(a){var b=this.ha,c="";b instanceof X?c=b.uw(a):b instanceof Be&&(c=b.AH(a));return c};var Kk=!1;function Jk(a,b){var c=a.Yz.za(b);null===c&&(c=a.Yz.za(""),null===c&&(Kk||(Kk=!0,w.trace('No Link template found for category "'+b+'"'),w.trace(" Using default link template")),c=a.rB));return c}function qk(a,b){for(var c=w.tb(b),d=0;d<c;d++){var e=w.ob(b,d);wk(a,e)}}
- function wk(a,b){if(void 0!==b&&null!==b){var c=a.bi(b);if(null!==c){c.cb=!1;c.mh=!1;var d=c.layer;if(null!==d&&d.h===a){var e=a.ha;if(e instanceof X&&c instanceof D){var g=c,h=e.Db(g.data);if(void 0!==h){for(var k=g.Vd;k.next();)af(e,h,k.value.data);g.Af&&(k=g.Cd,null!==k&&af(e,h,k.data));if(g instanceof F)for(g=g.Jc;g.next();)k=g.value.data,e.se(k)&&af(e,h,k)}}else if(e instanceof Be&&c instanceof D){g=c;k=a.Cg(g.data);if(null!==k){k.cb=!1;k.mh=!1;var l=k.layer;if(null!==l){var m=l.Oe(-1,k,!1);
- 0<=m&&a.Lc(we,"parts",l,k,null,m,null);m=k.kt;null!==m&&m(k,l,null)}}k=a.Bd;for(g=g.Vd;g.next();)l=g.value,l=(k?l.fa:l.aa).data,e.se(l)&&af(e,h,l)}e=d.Oe(-1,c,!1);0<=e&&a.Lc(we,"parts",d,c,null,e,null);e=c.kt;null!==e&&e(c,d,null)}}}}z.prototype.findPartForKey=z.prototype.sH=function(a){if(null===a||void 0===a)return null;a=this.ha.yf(a);return null===a?null:this.ni.za(a)};
- z.prototype.findNodeForKey=z.prototype.ff=function(a){if(null===a||void 0===a)return null;a=this.ha.yf(a);if(null===a)return null;a=this.ni.za(a);return a instanceof D?a:null};z.prototype.findPartForData=z.prototype.bi=function(a){if(null===a)return null;var b=this.ni.za(a);return null!==b?b:b=this.Ek.za(a)};z.prototype.findNodeForData=z.prototype.sw=function(a){if(null===a)return null;a=this.ni.za(a);return a instanceof D?a:null};
- z.prototype.findLinkForData=z.prototype.Cg=function(a){return null===a?null:this.Ek.za(a)};z.prototype.findNodesByExample=function(a){for(var b=new L,c=this.oo.j;c.next();){var d=c.value,e=d.data;if(null!==e)for(var g=0;g<arguments.length;g++){var h=arguments[g];if(w.$a(h)&&Lk(this,e,h)){b.add(d);break}}}return b.j};
- z.prototype.findLinksByExample=function(a){for(var b=new L,c=this.lo.j;c.next();){var d=c.value,e=d.data;if(null!==e)for(var g=0;g<arguments.length;g++){var h=arguments[g];if(w.$a(h)&&Lk(this,e,h)){b.add(d);break}}}return b.j};function Lk(a,b,c){for(var d in c){var e=b[d],g=c[d];if(w.isArray(g)){if(!w.isArray(e)||e.length>=g.length)return!1;for(var h=0;h<e.length;h++){var k=e[h],l=g[h];if(void 0!==l&&!Mk(a,k,l))return!1}}else if(!Mk(a,e,g))return!1}return!0}
- function Mk(a,b,c){if("function"===typeof c){if(!c(b))return!1}else if(c instanceof RegExp){if(!b||!c.test(b.toString()))return!1}else if(w.$a(b)&&w.$a(c)){if(!Lk(a,b,c))return!1}else if(b!==c)return!1;return!0}w.defineProperty(z,{QK:"nodeTemplate"},function(){return this.Bi.za("")},function(a){var b=this.Bi.za("");b!==a&&(w.k(a,C,z,"nodeTemplate"),this.Bi.add("",a),this.i("nodeTemplate",b,a),this.na.lb||this.Gl())});
- w.defineProperty(z,{jA:"nodeTemplateMap"},function(){return this.Bi},function(a){var b=this.Bi;b!==a&&(w.k(a,ta,z,"nodeTemplateMap"),this.Bi=a,this.i("nodeTemplateMap",b,a),this.na.lb||this.Gl())});w.defineProperty(z,{oK:"groupTemplate"},function(){return this.Hk.za("")},function(a){var b=this.Hk.za("");b!==a&&(w.k(a,F,z,"groupTemplate"),this.Hk.add("",a),this.i("groupTemplate",b,a),this.na.lb||this.Gl())});
- w.defineProperty(z,{Kz:"groupTemplateMap"},function(){return this.Hk},function(a){var b=this.Hk;b!==a&&(w.k(a,ta,z,"groupTemplateMap"),this.Hk=a,this.i("groupTemplateMap",b,a),this.na.lb||this.Gl())});w.defineProperty(z,{EK:"linkTemplate"},function(){return this.yj.za("")},function(a){var b=this.yj.za("");b!==a&&(w.k(a,G,z,"linkTemplate"),this.yj.add("",a),this.i("linkTemplate",b,a),this.na.lb||this.Gl())});
- w.defineProperty(z,{Yz:"linkTemplateMap"},function(){return this.yj},function(a){var b=this.yj;b!==a&&(w.k(a,ta,z,"linkTemplateMap"),this.yj=a,this.i("linkTemplateMap",b,a),this.na.lb||this.Gl())});w.defineProperty(z,{VH:null},function(){return this.cm},function(a){this.cm=a});
- w.defineProperty(z,{Pe:"isMouseCaptured"},function(){return this.UB},function(a){var b=this.ab;null!==b&&(a?(this.Q.bubbles=!1,b.removeEventListener("mousemove",this.mp,!1),b.removeEventListener("mousedown",this.lp,!1),b.removeEventListener("mouseup",this.op,!1),b.removeEventListener("mousewheel",this.ph,!1),b.removeEventListener("DOMMouseScroll",this.ph,!1),b.removeEventListener("mouseout",this.np,!1),window.addEventListener("mousemove",this.mp,!0),window.addEventListener("mousedown",this.lp,!0),
- window.addEventListener("mouseup",this.op,!0),window.addEventListener("mousewheel",this.ph,!0),window.addEventListener("DOMMouseScroll",this.ph,!0),window.addEventListener("mouseout",this.np,!0),window.addEventListener("selectstart",this.preventDefault,!1)):(window.removeEventListener("mousemove",this.mp,!0),window.removeEventListener("mousedown",this.lp,!0),window.removeEventListener("mouseup",this.op,!0),window.removeEventListener("mousewheel",this.ph,!0),window.removeEventListener("DOMMouseScroll",
- this.ph,!0),window.removeEventListener("mouseout",this.np,!0),window.removeEventListener("selectstart",this.preventDefault,!1),b.addEventListener("mousemove",this.mp,!1),b.addEventListener("mousedown",this.lp,!1),b.addEventListener("mouseup",this.op,!1),b.addEventListener("mousewheel",this.ph,!1),b.addEventListener("DOMMouseScroll",this.ph,!1),b.addEventListener("mouseout",this.np,!1)),this.UB=a)});
- w.defineProperty(z,{position:"position"},function(){return this.Sa},function(a){var b=this.Sa;if(!b.N(a)){w.k(a,I,z,"position");var c=this.qb.copy();a=a.copy();if(!this.zc&&null!==this.ab){this.zc=!0;var d=this.scale;qj(this,a,this.Gc,this.Hb/d,this.Gb/d,this.An,!1);this.zc=!1}this.Sa=a.da();a=this.Tb;a.jd&&Bi(a,b,this.Sa);this.zc||this.xt(c,this.qb)}});w.defineProperty(z,{LH:"initialPosition"},function(){return this.Pu},function(a){this.Pu.N(a)||(w.k(a,I,z,"initialPosition"),this.Pu=a.da())});
- w.defineProperty(z,{MH:"initialScale"},function(){return this.Qu},function(a){this.Qu!==a&&(w.g(a,"number",z,"initialScale"),this.Qu=a)});w.defineProperty(z,{$s:"grid"},function(){null===this.hd&&ij(this);return this.hd},function(a){var b=this.hd;if(b!==a){null===b&&(ij(this),b=this.hd);w.k(a,H,z,"grid");a.type!==jj&&w.l("Diagram.grid must be a Panel of type Panel.Grid");var c=b.S;null!==c&&c.remove(b);this.hd=a;a.name="GRID";null!==c&&c.add(a);Cj(this);this.sa();this.i("grid",b,a)}});
- w.w(z,{qb:"viewportBounds"},function(){var a=this.bD;if(null===this.ab)return a;var b=this.Sa,c=this.$b;a.n(b.x,b.y,Math.max(this.Hb,0)/c,Math.max(this.Gb,0)/c);return a});w.defineProperty(z,{bE:"fixedBounds"},function(){return this.Gu},function(a){var b=this.Gu;b.N(a)||(w.k(a,x,z,"fixedBounds"),(u&&Infinity===a.width||-Infinity===a.width||Infinity===a.height||-Infinity===a.height)&&w.l("fixedBounds width/height must not be Infinity"),this.Gu=a=a.da(),this.xc(),this.i("fixedBounds",b,a))});
- w.defineProperty(z,{jF:"scrollMargin"},function(){return this.Vy},function(a){"number"===typeof a?a=new vb(a):w.k(a,vb,z,"scrollMargin");var b=this.Vy;b.N(a)||(this.Vy=a=a.da(),this.xc(),this.i("scrollMargin",b,a))});w.defineProperty(z,{kF:"scrollMode"},function(){return this.Wy},function(a){var b=this.Wy;b!==a&&(w.Ea(a,z,z,"scrollMode"),this.Wy=a,a===Wi&&oj(this,!1),this.i("scrollMode",b,a))});
- w.defineProperty(z,{QE:"positionComputation"},function(){return this.Py},function(a){var b=this.Py;b!==a&&(null!==a&&w.g(a,"function",z,"positionComputation"),this.Py=a,oj(this,!1),this.i("positionComputation",b,a))});w.defineProperty(z,{iF:"scaleComputation"},function(){return this.Ry},function(a){var b=this.Ry;b!==a&&(null!==a&&w.g(a,"function",z,"scaleComputation"),this.Ry=a,ak(this,this.scale,this.scale),this.i("scaleComputation",b,a))});w.w(z,{Gc:"documentBounds"},function(){return this.zu});
- function rj(a,b){a.si=!1;var c=a.zu;c.N(b)||(b=b.da(),a.zu=b,oj(a,!1),a.Ia("DocumentBoundsChanged",null,c.copy()),zj(a))}w.defineProperty(z,{scale:"scale"},function(){return this.$b},function(a){var b=this.$b;w.o(a,z,"scale");b!==a&&ak(this,b,a)});w.defineProperty(z,{Ho:"autoScale"},function(){return this.Rl},function(a){var b=this.Rl;b!==a&&(w.Ea(a,z,z,"autoScale"),this.Rl=a,this.i("autoScale",b,a),a!==Ff&&oj(this,!1))});
- w.defineProperty(z,{rK:"initialAutoScale"},function(){return this.Mk},function(a){var b=this.Mk;b!==a&&(w.Ea(a,z,z,"initialAutoScale"),this.Mk=a,this.i("initialAutoScale",b,a))});w.defineProperty(z,{NH:"initialViewportSpot"},function(){return this.Ru},function(a){var b=this.Ru;b!==a&&(w.k(a,Q,z,"initialViewportSpot"),a.rd()||w.l("initialViewportSpot must be a real Spot: "+a),this.Ru=a,this.i("initialViewportSpot",b,a))});
- w.defineProperty(z,{KH:"initialDocumentSpot"},function(){return this.Ou},function(a){var b=this.Ou;b!==a&&(w.k(a,Q,z,"initialDocumentSpot"),a.rd()||w.l("initialViewportSpot must be a real Spot: "+a),this.Ou=a,this.i("initialDocumentSpot",b,a))});w.defineProperty(z,{oh:"minScale"},function(){return this.gv},function(a){w.o(a,z,"minScale");var b=this.gv;b!==a&&(0<a?(this.gv=a,this.i("minScale",b,a),a>this.scale&&(this.scale=a)):w.ja(a,"> 0",z,"minScale"))});
- w.defineProperty(z,{nh:"maxScale"},function(){return this.dv},function(a){w.o(a,z,"maxScale");var b=this.dv;b!==a&&(0<a?(this.dv=a,this.i("maxScale",b,a),a<this.scale&&(this.scale=a)):w.ja(a,"> 0",z,"maxScale"))});w.defineProperty(z,{on:"zoomPoint"},function(){return this.Tv},function(a){this.Tv.N(a)||(w.k(a,I,z,"zoomPoint"),this.Tv=a=a.da())});
- w.defineProperty(z,{rz:"contentAlignment"},function(){return this.An},function(a){var b=this.An;b.N(a)||(w.k(a,Q,z,"contentAlignment"),this.An=a=a.da(),this.i("contentAlignment",b,a),oj(this,!1))});w.defineProperty(z,{sK:"initialContentAlignment"},function(){return this.Xn},function(a){var b=this.Xn;b.N(a)||(w.k(a,Q,z,"initialContentAlignment"),this.Xn=a=a.da(),this.i("initialContentAlignment",b,a))});
- w.defineProperty(z,{padding:"padding"},function(){return this.Ze},function(a){"number"===typeof a?a=new vb(a):w.k(a,vb,z,"padding");var b=this.Ze;b.N(a)||(this.Ze=a=a.da(),this.xc(),this.i("padding",b,a))});w.w(z,{Jg:"nodes"},function(){return this.oo.j});w.w(z,{links:"links"},function(){return this.lo.j});w.w(z,{fi:"parts"},function(){return this.kb.j});
- z.prototype.findTopLevelNodesAndLinks=function(){for(var a=new L(C),b=this.oo.j;b.next();){var c=b.value;c.dp&&a.add(c)}for(b=this.lo.j;b.next();)c=b.value,c.dp&&a.add(c);return a.j};z.prototype.findTopLevelGroups=function(){return this.al.j};w.defineProperty(z,{Ub:"layout"},function(){return this.Zd},function(a){var b=this.Zd;b!==a&&(w.k(a,Ve,z,"layout"),null!==b&&(b.h=null,b.group=null),this.Zd=a,a.h=this,a.group=null,this.iu=!0,this.i("layout",b,a),this.ne())});
- z.prototype.layoutDiagram=function(a){mj(this);a&&Fk(this,!0);Ej(this,!1)};function Fk(a,b){for(var c=a.al.j;c.next();)Nk(a,c.value,b);null!==a.Ub&&(b?a.Ub.Cf=!1:a.Ub.K())}function Nk(a,b,c){if(null!==b){for(var d=b.mm.j;d.next();)Nk(a,d.value,c);null!==b.Ub&&(c?b.Ub.Cf=!1:b.Ub.K())}}
- function Ej(a,b){if(!a.$x){var c=a.Ub,d=a.Vu;a.Vu=!0;var e=a.Ua;a.Ua=!0;try{a.ec("Layout");for(var g=a.al.j;g.next();)Ok(a,g.value,b);c.Cf||b&&!c.xE||(c.doLayout(a),mj(a),c.Cf=!0)}finally{a.fe("Layout"),a.iu=!c.Cf,a.Vu=d,a.Ua=e}}}function Ok(a,b,c){if(null!==b){for(var d=b.mm.j;d.next();)Ok(a,d.value,c);d=b.Ub;null===d||d.Cf||c&&!d.xE||(b.Ky=!b.location.J(),d.doLayout(b),b.K(Pk),d.Cf=!0,Gj(a,b))}}
- w.defineProperty(z,{Bd:"isTreePathToChildren"},function(){return this.Uu},function(a){var b=this.Uu;if(b!==a&&(w.g(a,"boolean",z,"isTreePathToChildren"),this.Uu=a,this.i("isTreePathToChildren",b,a),!this.na.lb))for(a=this.Jg;a.next();)Qk(a.value)});z.prototype.findTreeRoots=function(){for(var a=new K(D),b=this.Jg;b.next();){var c=b.value;c.dp&&null===c.Us()&&a.add(c)}return a.j};w.defineProperty(z,{ve:null},function(){return this.MB},function(a){this.MB=a});
- function Xi(a){function b(a){var b=a.toLowerCase(),h=new K("function");c.add(a,h);c.add(b,h);d.add(a,a);d.add(b,a)}var c=new ta("string",K),d=new ta("string","string");b("AnimationStarting");b("AnimationFinished");b("BackgroundSingleClicked");b("BackgroundDoubleClicked");b("BackgroundContextClicked");b("ClipboardChanged");b("ClipboardPasted");b("DocumentBoundsChanged");b("ExternalObjectsDropped");b("InitialLayoutCompleted");b("LayoutCompleted");b("LinkDrawn");b("LinkRelinked");b("LinkReshaped");b("Modified");
- b("ObjectSingleClicked");b("ObjectDoubleClicked");b("ObjectContextClicked");b("PartCreated");b("PartResized");b("PartRotated");b("SelectionMoved");b("SelectionCopied");b("SelectionDeleting");b("SelectionDeleted");b("SelectionGrouped");b("SelectionUngrouped");b("ChangingSelection");b("ChangedSelection");b("SubGraphCollapsed");b("SubGraphExpanded");b("TextEdited");b("TreeCollapsed");b("TreeExpanded");b("ViewportBoundsChanged");a.by=c;a.ay=d}
- function ua(a,b){var c=a.ay.za(b);return null!==c?c:a.ay.za(b.toLowerCase())}function Rk(a,b){var c=a.by.za(b);if(null!==c)return c;c=a.by.za(b.toLowerCase());if(null!==c)return c;w.l("Unknown DiagramEvent name: "+b);return null}z.prototype.addDiagramListener=z.prototype.jz=function(a,b){w.g(a,"string",z,"addDiagramListener:name");w.g(b,"function",z,"addDiagramListener:listener");var c=Rk(this,a);null!==c&&c.add(b)};
- z.prototype.removeDiagramListener=z.prototype.VE=function(a,b){w.g(a,"string",z,"removeDiagramListener:name");w.g(b,"function",z,"addDiagramListener:listener");var c=Rk(this,a);null!==c&&c.remove(b)};z.prototype.raiseDiagramEvent=z.prototype.Ia=function(a,b,c){u&&w.g(a,"string",z,"raiseDiagramEvent:name");var d=Rk(this,a),e=new ie;e.h=this;e.name=ua(this,a);void 0!==b&&(e.GA=b);void 0!==c&&(e.mA=c);a=d.length;if(1===a)d=d.ma(0),d(e);else if(0!==a)for(b=d.Te(),c=0;c<a;c++)d=b[c],d(e);return e.cancel};
- function Lg(a,b){var c=!1;a.qb.ak(b)&&(c=!0);c=a.Fz(b,function(a){return a.W},function(a){return a instanceof G},!0,function(a){return a instanceof G},c);if(0!==c.count)for(c=c.j;c.next();){var d=c.value;d.Zi&&d.dc()}}z.prototype.isUnoccupied=z.prototype.fp=function(a,b){void 0===b&&(b=null);return ja(this,!1,null,b).fp(a.x,a.y,a.width,a.height)};
- function ja(a,b,c,d){null===a.zd&&(a.zd=new Sk);if(a.zd.ap||a.zd.group!==c||a.zd.EA!==d){if(null===c){b=a.si?nj(a):a.Gc.copy();b.Tf(100,100);a.zd.initialize(b);b=w.eg();for(var e=a.Jg;e.next();){var g=e.value,h=g.layer;null!==h&&h.visible&&!h.Hc&&Tk(a,g,d,b)}}else for(c.ca.J()||c.xf(),b=c.ca.copy(),b.Tf(20,20),a.zd.initialize(b),b=w.eg(),e=c.Jc;e.next();)g=e.value,g instanceof D&&Tk(a,g,d,b);w.qc(b);a.zd.group=c;a.zd.EA=d;a.zd.ap=!1}else b&&Uk(a.zd);return a.zd}
- function Tk(a,b,c,d){if(b!==c)if(b.Na()&&b.canAvoid()){c=b.getAvoidableRect(d);d=a.zd.Lo;b=a.zd.Jo;for(var e=c.x+c.width,g=c.y+c.height,h=c.x;h<e;h+=d){for(var k=c.y;k<g;k+=b)Vk(a.zd,h,k);Vk(a.zd,h,g)}for(k=c.y;k<g;k+=b)Vk(a.zd,e,k);Vk(a.zd,e,g)}else if(b instanceof F)for(b=b.Jc;b.next();)e=b.value,e instanceof D&&Tk(a,e,c,d)}function Wk(a,b){null===a.zd||a.zd.ap||null!==b&&!b.canAvoid()||(a.zd.ap=!0)}
- z.prototype.simulatedMouseMove=z.prototype.kx=function(a,b,c){if(null!==bg){var d=bg.h;c instanceof z||(c=null);var e=cg;c!==e&&(null!==e&&e!==d&&null!==e.zb.Sd&&(hg(e),bg.Dw=!1,e.zb.Sd.doSimulatedDragLeave()),cg=c,null!==c&&c!==d&&null!==c.zb.Sd&&(og(),e=c.zb.Sd,kg.contains(e)||kg.add(e),c.zb.Sd.doSimulatedDragEnter()));if(null===c||c===d||!c.lD||c.xb||!c.Fo)return!1;d=c.zb.Sd;null!==d&&(null!==a?b=c.Tn(a):null===b&&(b=new I),c.Rb.ga=b,c.Rb.pl=!1,c.Rb.up=!1,d.doSimulatedDragOver());return!0}return!1};
- z.prototype.simulatedMouseUp=z.prototype.vF=function(a,b,c,d){if(null!==bg){null===d&&(d=b);b=cg;var e=bg.h;if(d!==b){if(null!==b&&b!==e&&null!==b.zb.Sd)return hg(b),bg.Dw=!1,b.zb.Sd.doSimulatedDragLeave(),!1;cg=d;null!==d&&null!==d.zb.Sd&&(og(),b=d.zb.Sd,kg.contains(b)||kg.add(b),d.zb.Sd.doSimulatedDragEnter())}if(null===d)return bg.doCancel(),!0;if(d!==this)return null!==a&&(c=d.Tn(a)),d.Rb.ga=c,d.Rb.pl=!1,d.Rb.up=!0,a=d.zb.Sd,null!==a&&a.doSimulatedDrop(),a=bg,null!==a&&(d=a.mayCopy(),a.Gf=d?"Copy":
- "Move",a.stopTool()),!0}return!1};w.defineProperty(z,{sD:"autoScrollRegion"},function(){return this.ku},function(a){"number"===typeof a?a=new vb(a):w.k(a,vb,z,"autoScrollRegion");var b=this.ku;b.N(a)||(this.ku=a=a.da(),this.xc(),this.i("autoScrollRegion",b,a))});function Gg(a,b){a.ju.assign(b);Xk(a,a.ju).Me(a.position)?hg(a):Yk(a)}
- function Yk(a){-1===a.vn&&(a.vn=w.setInterval(function(){if(-1!==a.vn){hg(a);var b=a.Q.event;if(null!==b){var c=Xk(a,a.ju);c.Me(a.position)||(a.position=c,a.Q.ga=a.KF(a.ju),a.kx(b,null,b.target.Z)||a.doMouseMove(),a.si=!0,rj(a,a.zg()),a.Yd=!0,a.mf(),Yk(a))}}},a.YF))}function hg(a){-1!==a.vn&&(w.clearInterval(a.vn),a.vn=-1)}
- function Xk(a,b){var c=a.position,d=a.sD;if(0>=d.top&&0>=d.left&&0>=d.right&&0>=d.bottom)return c;var e=a.qb,g=a.scale,e=w.nk(0,0,e.width*g,e.height*g),h=w.lc(0,0);if(b.x>=e.x&&b.x<e.x+d.left){var k=Math.max(a.Gt,1),k=k|0;h.x-=k;b.x<e.x+d.left/2&&(h.x-=k);b.x<e.x+d.left/4&&(h.x-=4*k)}else b.x<=e.x+e.width&&b.x>e.x+e.width-d.right&&(k=Math.max(a.Gt,1),k|=0,h.x+=k,b.x>e.x+e.width-d.right/2&&(h.x+=k),b.x>e.x+e.width-d.right/4&&(h.x+=4*k));b.y>=e.y&&b.y<e.y+d.top?(k=Math.max(a.Ht,1),k|=0,h.y-=k,b.y<e.y+
- d.top/2&&(h.y-=k),b.y<e.y+d.top/4&&(h.y-=4*k)):b.y<=e.y+e.height&&b.y>e.y+e.height-d.bottom&&(k=Math.max(a.Ht,1),k|=0,h.y+=k,b.y>e.y+e.height-d.bottom/2&&(h.y+=k),b.y>e.y+e.height-d.bottom/4&&(h.y+=4*k));h.Me(O.ok)||(c=new I(c.x+h.x/g,c.y+h.y/g));w.qc(e);w.A(h);return c}z.prototype.makeSVG=z.prototype.makeSvg=function(a){void 0===a&&(a=new xa);a.context="svg";a=Zk(this,a);return null!==a?a.Kl:null};
- z.prototype.makeImage=function(a){void 0===a&&(a=new xa);var b=(a.document||document).createElement("img");b.src=this.kI(a);return b};z.prototype.makeImageData=z.prototype.kI=function(a){void 0===a&&(a=new xa);var b=Zk(this,a);return null!==b?b.toDataURL(a.type,a.details):""};var $k=!1;
- function Zk(a,b){a.Tb.cj();a.mf();if(null===a.ab)return null;"object"!==typeof b&&w.l("properties argument must be an Object.");var c=!1,d=b.size||null,e=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(e="NaN");var g=b.maxSize;void 0===b.maxSize&&(c=!0,g="svg"===b.context?new pa(Infinity,Infinity):new pa(2E3,2E3));var h=b.position||null,k=b.parts||null,l=void 0===b.padding?1:b.padding,m=b.background||null,n=b.omitTemporary;void 0===n&&(n=!0);var p=b.document||document,q=b.elementFinished||null,r=
- b.showTemporary;void 0===r&&(r=!n);n=b.showGrid;void 0===n&&(n=r);null!==d&&isNaN(d.width)&&isNaN(d.height)&&(d=null);"number"===typeof l?l=new vb(l):l instanceof vb||(l=new vb(0));l.left=Math.max(l.left,0);l.right=Math.max(l.right,0);l.top=Math.max(l.top,0);l.bottom=Math.max(l.bottom,0);a.Mn=!1;ca(a);var s=new va(null,p),t=s.getContext("2d"),v=s;if(!(d||e||k||h))return s.width=a.Hb+Math.ceil(l.left+l.right),s.height=a.Gb+Math.ceil(l.top+l.bottom),"svg"===b.context&&(t=v=new cd(s.Rd,p,q),t instanceof
- cd&&(a.Mn=!0)),Nj(a,t,l,new pa(s.width,s.height),a.$b,a.Sa,k,m,r,n),a.Mn=!0,v;var y=a.Jb.kw,B=new I(0,0),A=a.Gc.copy();A.gJ(a.padding);if(r)for(var E=!0,E=a.Yb.p,N=E.length,J=0;J<N;J++){var W=E[J];if(W.visible&&W.Hc)for(var ea=W.kb.p,W=ea.length,T=0;T<W;T++){var P=ea[T];P.Fw&&P.Na()&&(P=P.ca,P.J()&&A.hi(P))}}B.x=A.x;B.y=A.y;if(null!==k){var aa,E=!0,ea=k.j;for(ea.reset();ea.next();)N=ea.value,N instanceof C&&(P=N,W=P.layer,null!==W&&!W.visible||null!==W&&!r&&W.Hc||!P.Na()||(P=P.ca,P.J()&&(E?(E=!1,
- aa=P.copy()):aa.hi(P))));E&&(aa=new x(0,0,0,0));A.width=aa.width;A.height=aa.height;B.x=aa.x;B.y=aa.y}null!==h&&h.J()&&(B=h,e||(e=y));E=ea=0;null!==l&&(ea=l.left+l.right,E=l.top+l.bottom);J=N=0;null!==d&&(N=d.width,J=d.height,isFinite(N)&&(N=Math.max(0,N-ea)),isFinite(J)&&(J=Math.max(0,J-E)));aa=h=0;null!==d&&null!==e?("NaN"===e&&(e=y),d.J()?(h=N,aa=J):isNaN(J)?(h=N,aa=A.height*e):(h=A.width*e,aa=J)):null!==d?d.J()?(e=Math.min(N/A.width,J/A.height),h=N,aa=J):isNaN(J)?(e=N/A.width,h=N,aa=A.height*
- e):(e=J/A.height,h=A.width*e,aa=J):null!==e?"NaN"===e&&g.J()?(e=Math.min((g.width-ea)/A.width,(g.height-E)/A.height),e>y?(e=y,h=A.width,aa=A.height):(h=g.width,aa=g.height)):(h=A.width*e,aa=A.height*e):(e=y,h=A.width,aa=A.height);null!==l?(h+=ea,aa+=E):l=new vb(0);null!==g&&(d=g.width,g=g.height,"svg"!==b.context&&c&&!$k&&(h>d||aa>g)&&(w.trace("Diagram.makeImage(data): Diagram width or height is larger than the default max size. ("+Math.ceil(h)+"x"+Math.ceil(aa)+" vs 2000x2000) Consider increasing the max size."),
- $k=!0),isNaN(d)&&(d=2E3),isNaN(g)&&(g=2E3),isFinite(d)&&(h=Math.min(h,d)),isFinite(g)&&(aa=Math.min(aa,g)));s.width=Math.ceil(h);s.height=Math.ceil(aa);"svg"===b.context&&(t=v=new cd(s.Rd,p,q),t instanceof cd&&(a.Mn=!0));Nj(a,t,l,new pa(Math.ceil(h),Math.ceil(aa)),e,B,k,m,r,n);a.Mn=!0;return v}z.inherit=function(a,b){w.g(a,"function",z,"inherit");w.g(b,"function",z,"inherit");b.nG&&w.l("Cannot inherit from "+w.Fg(b));w.Pa(a,b)};
- function dj(){this.qG="63ad05bbe23a1786468a4c741b6d2";this.qG===this._tk?this.Jh=!0:al(this,!1)}
- function al(a,b){var c="f",d=window[w.Ma("76a715b2f73f148a")][w.Ma("72ba13b5")];if(w.Ma("77bb5bb2f32603de")===window[w.Ma("76a715b2f73f148a")][w.Ma("6aba19a7ec351488")])try{a.Jh=!window[w.Ma("4da118b7ec2108")]([w.Ma("5bb806bfea351a904a84515e1b6d38b6")])([w.Ma("49bc19a1e6")])([w.Ma("59bd04a1e6380fa5539b")])([w.Ma("7bb8069ae7")]===w.Ma(w.adym));if(!1===a.Jh)return;a.Jh=!window[w.Ma("4da118b7ec2108")]([w.Ma("5bb806bfea351a904a84515e1b6d38b6")])([w.Ma("49bc19a1e6")])([w.Ma("59bd04a1e6380fa5539b6c7a197c31bb4cfd3e")])([w.Ma("7bb8069ae7")]===w.Ma(w.adym));
- if(!1===a.Jh)return}catch(e){}for(var g=d[w.Ma("76ad18b4f73e")],h=d[w.Ma("73a612b6fb191d")](w.Ma("35e7"))+2;h<g;h++)c+=d[h];d=c[w.Ma("73a612b6fb191d")](w.Ma(w.adym));0>d&&w.Ma(w.adym)!==w.Ma("7da71ca0ad381e90")&&(d=c[w.Ma("73a612b6fb191d")](w.Ma("76a715b2ef3e149757")));a.Jh=!(0<=d&&d<c[w.Ma("73a612b6fb191d")](w.Ma("35")));a.Jh&&(c=window.document[w.Ma("79ba13b2f7333e8846865a7d00")]("div"),d=w.Ma("02cncncn"),"."===d[0]&&(d=d[w.Ma("69bd14a0f724128a44")](1)),c[w.Ma("79a417a0f0181a8946")]=d,window.document[w.Ma("78a712aa")]?
- (window.document[w.Ma("78a712aa")][w.Ma("7bb806b6ed32388c4a875b")](c),d=window[w.Ma("7dad0290ec3b0b91578e5b40007031bf")](c)[w.Ma("7dad0283f1390b81519f4645156528bf")](w.Ma("78a704b7e62456904c9b12701b6532a8")),window.document[w.Ma("78a712aa")][w.Ma("68ad1bbcf533388c4a875b")](c),d&&-1!==d.indexOf(w.Ma(w.KG))&&-1!==d.indexOf(w.Ma(w.LG))&&(a.Jh=!1)):(a.Jh=null,b&&(a.Jh=!1)))}
- dj.prototype.Ol=function(a){a.Ve.setTransform(a.Ge,0,0,a.Ge,0,0);null===this.Jh&&al(this,!0);return 0<this.Jh&&this!==this.oG?!0:!1};dj.prototype.t=function(){this.oG=null};
- function ej(a,b){void 0!==b&&null!==b||w.l("Diagram setup requires an argument DIV.");null!==a.Qb&&w.l("Diagram has already completed setup.");"string"===typeof b?a.Qb=window.document.getElementById(b):b instanceof HTMLDivElement?a.Qb=b:w.l("No DIV or DIV id supplied: "+b);null===a.Qb&&w.l("Invalid DIV id; could not get element with id: "+b);void 0!==a.Qb.Z&&w.l("Invalid div id; div already has a Diagram associated with it.");"static"===window.getComputedStyle(a.Qb,null).position&&(a.Qb.style.position=
- "relative");a.Qb.style["-webkit-tap-highlight-color"]="rgba(255, 255, 255, 0)";a.Qb.style["-ms-touch-action"]="none";a.Qb.innerHTML="";a.Qb.Z=a;var c=new va(a);c.Rd.innerHTML="This text is displayed if your browser does not support the Canvas HTML element.";void 0!==c.style&&(c.style.position="absolute",c.style.top="0px",c.style.left="0px","rtl"===window.getComputedStyle(a.Qb,null).getPropertyValue("direction")&&(a.WB=!0),c.style.zIndex="2",c.style.sL="none",c.style.webkitUserSelect="none",c.style.MozUserSelect=
- "none");a.Hb=a.Qb.clientWidth||1;a.Gb=a.Qb.clientHeight||1;a.ab=c;a.Ve=c.getContext("2d");var d=a.Ve;a.Ge=a.computePixelRatio();Pj(a,a.Hb,a.Gb);a.Cx=d[w.Ma("7eba17a4ca3b1a8346")][w.Ma("78a118b7")](d,w.Ol,4,4);a.Qb.insertBefore(c.Rd,a.Qb.firstChild);c=new va(null);c.width=1;c.height=1;a.gy=c;a.CB=c.getContext("2d");var c=w.createElement("div"),d=w.createElement("div"),e=w.createElement("div"),g=w.createElement("div");c.style.position="absolute";c.style.overflow="auto";c.style.width=a.Hb+"px";c.style.height=
- a.Gb+"px";c.style.zIndex="1";d.style.position="absolute";d.style.overflow="auto";d.style.width=a.Hb+"px";d.style.height=a.Gb+"px";d.style.zIndex="1";e.style.position="absolute";e.style.width="1px";e.style.height="1px";g.style.position="absolute";g.style.width="1px";g.style.height="1px";a.Qb.appendChild(c);a.Qb.appendChild(d);c.appendChild(e);d.appendChild(g);c.onscroll=a.kC;c.onmousedown=a.nv;c.ontouchstart=a.nv;c.Z=a;c.BC=!0;d.onscroll=a.kC;d.onmousedown=a.nv;d.ontouchstart=a.nv;d.Z=a;d.CC=!0;a.Lj=
- c;a.Mj=d;a.Ty=e;a.Uy=g;a.RE=w.JD(function(){a.Dm=null;a.sa()},300,!1);a.OF=w.JD(function(){pi(a)},250,!1);a.preventDefault=function(a){a.preventDefault();return!1};a.mp=function(b){if(a.isEnabled){a.cm=!0;var c=a.Sc;w.Zm&&c.Cl?(b.preventDefault(),b.simulated=!0,a.cs=b):(a.Sc=a.Rb,a.Rb=c,vj(a,a,b,c,!0),a.kx(b,null,b.target.Z)||(a.doMouseMove(),a.Za.isBeyondDragSize()&&(If(a),a.hm=0)))}};a.lp=function(b){if(a.isEnabled){a.cm=!0;var c=a.Sc;if(w.Zm&&null!==a.cs)a.cs=b,b.preventDefault();else if(w.Zm&&
- 400>b.timeStamp-a.im)b.preventDefault();else if(a.Sc=a.Rb,a.Rb=c,vj(a,a,b,c,!0),c.pl=!0,c.cf=b.detail,a.Gk=c.copy(),!0===c.qq.simulated)b.preventDefault(),b.simulated=!0;else if(u&&u.LE&&(window.LE=a.To(c.ga)),bg=null,a.doMouseDown(),1===b.button)return b.preventDefault(),!1}};a.op=function(b){if(a.isEnabled){a.cm=!0;var c=a.Sc;if(w.Zm){if(400>b.timeStamp-a.im){b.preventDefault();return}a.im=b.timeStamp}if(w.Zm&&null!==a.cs)a.cs=null,b.preventDefault();else{a.Sc=a.Rb;a.Rb=c;vj(a,a,b,c,!0);c.up=!0;
- c.cf=b.detail;if(w.Tz||w.Uz)b.timeStamp-a.im<a.ZC&&!a.Za.isBeyondDragSize()?a.hm++:a.hm=1,a.im=b.timeStamp,c.cf=a.hm;c.bubbles=b.bubbles;b.target.Z&&(c.Mg=b.target.Z);a.vF(b,null,new I,c.Mg)||(a.doMouseUp(),hg(a),ia(a,c,b))}}};a.ph=function(b){if(a.isEnabled){var c=a.Sc;a.Sc=a.Rb;a.Rb=c;vj(a,a,b,c,!0);c.bubbles=!0;c.nl=void 0!==b.wheelDelta?b.wheelDelta:-40*b.detail;a.doMouseWheel();ia(a,c,b)}};a.np=function(){if(a.isEnabled){a.cm=!1;var b=a.Za;b.cancelWaitAfter();b instanceof zf&&b.hideToolTip()}};
- a.GF=function(b){if(a.isEnabled){a.Hv=!1;a.Ay=!0;var c=a.Sc;a.Sc=a.Rb;a.Rb=c;xj(a,b,b.targetTouches[0],c,1<b.touches.length);a.doMouseDown();2>b.touches.length&&uj(a,c);ia(a,c,b)}};a.FF=function(b){if(a.isEnabled){var c=a.Sc;a.Sc=a.Rb;a.Rb=c;var d=null;0<b.changedTouches.length?d=b.changedTouches[0]:0<b.targetTouches.length&&(d=b.targetTouches[0]);yj(a,b,d,c,1<b.touches.length);(a.Za.isBeyondDragSize()||1<b.touches.length)&&If(a);a.kx(d?d:b,null,c.Mg)||(a.doMouseMove(),ia(a,c,b))}};a.EF=function(b){if(a.isEnabled){If(a);
- if(a.Hv)return b.preventDefault(),!1;var c=a.Sc;a.Sc=a.Rb;a.Rb=c;if(1<b.touches.length)a.Vn&&(a.oy=!1);else{var d=null,e=null;0<b.changedTouches.length?e=b.changedTouches[0]:0<b.targetTouches.length&&(e=b.targetTouches[0]);c.h=a;c.cf=1;if(null!==e){var d=window.document.elementFromPoint(e.clientX,e.clientY),g,p;d&&d.Z?(p=e,g=d.Z):(p=b.changedTouches[0],g=a);wj(g,p,c);g=e.screenX;p=e.screenY;var q=a.$B;b.timeStamp-a.im<a.ZC&&!(25<Math.abs(q.x-g)||25<Math.abs(q.y-p))?a.hm++:a.hm=1;c.cf=a.hm;a.im=b.timeStamp;
- a.$B.n(g,p)}c.sd=0;c.button=0;c.pl=!1;c.up=!0;c.nl=0;c.$c=!1;c.bubbles=!1;c.event=b;c.timestamp=Date.now();c.Mg=null===d?b.target.Z:d.Z?d.Z:null;c.ye=null;a.vF(e?e:b,null,new I,c.Mg)||(a.doMouseUp(),ia(a,c,b),a.Ay=!1)}}};a.AI=function(b){if("touch"===b.pointerType){var c=a.vC;void 0===c[b.pointerId]&&(a.Br++,c[b.pointerId]=b);a.Mf[0]=null;a.Mf[1]=null;for(var d in c)if(null===a.Mf[0])a.Mf[0]=c[d];else if(null===a.Mf[1]){a.Mf[1]=c[d];break}a.isEnabled&&(a.Hv=!1,c=a.Sc,a.Sc=a.Rb,a.Rb=c,xj(a,b,b,c,1<
- a.Br),a.doMouseDown(),2>a.Br&&uj(a,c),ia(a,c,b))}};a.CI=function(b){if("touch"===b.pointerType&&!(2>a.Br)){var c=a.Mf;c[0].pointerId===b.pointerId&&(c[0]=b);c[1].pointerId===b.pointerId&&(c[1]=b);a.isEnabled&&(c=a.Sc,a.Sc=a.Rb,a.Rb=c,yj(a,b,b,c,!0),If(a),a.kx(b,null,c.Mg)||(a.doMouseMove(),ia(a,c,b)))}};a.BI=function(b){if("touch"===b.pointerType){var c=a.vC;void 0!==c[b.pointerId]&&(a.Br--,delete c[b.pointerId],c=a.Mf,null!==c[0]&&c[0].pointerId===b.pointerId&&(c[0]=null),null!==c[1]&&c[1].pointerId===
- b.pointerId&&(c[1]=null))}};ca(a);hj(a)}function bl(a){1<arguments.length&&w.l("Palette constructor can only take one optional argument, the DIV HTML element or its id.");z.call(this,a);this.Xv=!0;this.fl=!1;this.xb=!0;this.rz=Yb;this.Ub=new cl}w.Pa(bl,z);w.la("Palette",bl);
- function aj(a){1<arguments.length&&w.l("Overview constructor can only take one optional argument, the DIV HTML element or its id.");z.call(this,a);this.Bh.isEnabled=!1;this.zc=!0;this.Ij=null;this.dG=this.Cu=!0;this.WI("drawShadows",!1);var b=new C,c=new Y;c.stroke="magenta";c.pb=2;c.fill="transparent";c.name="BOXSHAPE";b.kk=!0;b.ex="BOXSHAPE";b.Pw="BOXSHAPE";b.eF="BOXSHAPE";b.cursor="move";b.add(c);this.Tl=b;c=new da;c.type=xh;c.kf=ac;var d=new yh;d.Uf=!0;c.add(d);d=new Y;d.Yj=ac;d.Kb="Rectangle";
- d.Ca=new pa(64,64);d.cursor="se-resize";d.alignment=jc;c.add(d);b.cF=c;this.Im=this.Zj=!1;this.wf=this.Cs=!0;this.sD=0;this.bz=w.createElement("canvas");this.pG=this.bz.getContext("2d");this.zb.Sd=new dl;this.zb.fF=new el;var e=this;this.click=function(){var a=e.Ij;if(null!==a){var b=a.qb,c=e.Q.ga;a.position=new I(c.x-b.width/2,c.y-b.height/2)}};this.NE=function(){fl(e)};this.ME=function(){null!==e.Ij&&(e.xc(),e.sa())};this.Ho=sj;this.zc=!1}w.Pa(aj,z);w.la("Overview",aj);
- function gl(a){a.zc||a.Kd||!1!==a.Nf||(a.Nf=!0,requestAnimationFrame(function(){if(a.Nf&&!a.Kd&&(a.Nf=!1,null!==a.Qb)){a.Kd=!0;mj(a);a.Gc.J()||rj(a,a.zg());null===a.Qb&&w.l("No div specified");null===a.ab&&w.l("No canvas specified");if(a.Yd){var b=a.Ij;if(null!==b&&!b.Tb.lh&&!b.Tb.jd){var b=a.Ve,c=a.bz;b.setTransform(1,0,0,1,0,0);b.clearRect(0,0,a.ab.width,a.ab.height);b.drawImage(c,0,0);c=a.md;c.reset();1!==a.$b&&c.scale(a.scale);0===a.position.x&&0===a.position.y||c.translate(-a.Sa.x,-a.Sa.y);b.setTransform(c.m11,
- c.m12,c.m21,c.m22,c.dx,c.dy);for(var c=a.Yb.p,d=c.length,e=0;e<d;e++)c[e].ef(b,a);a.Nk=!1;a.Yd=!1}}a.Kd=!1}}))}aj.prototype.computePixelRatio=function(){return 1};
- aj.prototype.ef=function(){null===this.Qb&&w.l("No div specified");null===this.ab&&w.l("No canvas specified");if(this.Yd){var a=this.Ij;if(null!==a&&!a.Tb.lh&&!a.Tb.jd){if(!this.dG){var b=a.zb.Sd;if(null!==b&&b.ta)return}Kj(this);b=a.$s;(null!==b&&b.visible&&isNaN(b.width)||isNaN(b.height))&&Cj(a);var c=this.ab,b=this.Ve,d=this.bz,e=this.pG;d.width=c.width;d.height=c.height;b.Zt="";b.setTransform(1,0,0,1,0,0);b.clearRect(0,0,this.ab.width,this.ab.height);var g=this.md;g.reset();1!==this.$b&&g.scale(this.scale);
- 0===this.position.x&&0===this.position.y||g.translate(-this.Sa.x,-this.Sa.y);b.setTransform(g.m11,g.m12,g.m21,g.m22,g.dx,g.dy);for(var h=this.Cu,k=this.qb,l=a.Yb.p,m=l.length,a=0;a<m;a++){var n=l[a],p=b,q=k,r=h;if(n.visible&&0!==n.Qc&&(void 0===r&&(r=!0),r||!n.Hc)){1!==n.Qc&&(p.globalAlpha=n.Qc);for(var r=this.scale,n=n.kb.p,s=n.length,t=0;t<s;t++){var v=n[t],y=v.ca;y.Gg(q)&&(1<y.width*r||1<y.height*r?v.ef(p,this):Ri(v,p))}p.globalAlpha=1}}e.drawImage(c.Rd,0,0);u&&u.Pi&&(e.fillStyle="red",e.fillRect(0,
- d.height/2,d.width,4));c=this.Yb.p;d=c.length;for(a=0;a<d;a++)c[a].ef(b,this);u&&(u.Cz||u.Pi)&&u.Bz(b,this,g);this.Yd=this.Nk=!1}}};
- w.defineProperty(aj,{lA:"observed"},function(){return this.Ij},function(a){var b=this.Ij;null!==a&&w.k(a,z,aj,"observed");a instanceof aj&&w.l("Overview.observed Diagram may not be an Overview itself: "+a);b!==a&&(null!==b&&(this.remove(this.jh),b.VE("ViewportBoundsChanged",this.NE),b.VE("DocumentBoundsChanged",this.ME),b.om.remove(this)),this.Ij=a,null!==a&&(a.jz("ViewportBoundsChanged",this.NE),a.jz("DocumentBoundsChanged",this.ME),a.om.add(this),this.add(this.jh),fl(this)),this.xc(),this.i("observed",
- b,a))});w.defineProperty(aj,{jh:"box"},function(){return this.Tl},function(a){var b=this.Tl;b!==a&&(this.Tl=a,this.remove(b),this.add(this.Tl),fl(this),this.i("box",b,a))});w.defineProperty(aj,{kK:"drawsTemporaryLayers"},function(){return this.Cu},function(a){this.Cu!==a&&(this.Cu=a,this.At())});
- function fl(a){var b=a.jh;if(null!==b){var c=a.Ij;if(null!==c){a.Yd=!0;var c=c.qb,d=b.jn,e=w.Ml();e.n(c.width,c.height);d.Ca=e;w.ek(e);a=2/a.scale;d instanceof Y&&(d.pb=a);b.location=new I(c.x-a/2,c.y-a/2)}}}aj.prototype.zg=function(){var a=this.Ij;return null===a?O.XF:a.Gc};aj.prototype.Oz=function(){!0!==this.Yd&&(this.Yd=!0,gl(this))};aj.prototype.xt=function(a){this.zc||(kj(this),this.sa(),zj(this),this.xc(),fl(this),this.Ia("ViewportBoundsChanged",null,a))};
- function dl(){Ef.call(this);this.Vk=null}w.Pa(dl,Ef);dl.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.h;if(null===a||!a.fl||!a.wf)return!1;var b=a.lA;if(null===b)return!1;if(null===this.findDraggablePart()){var c=b.qb;this.Vk=new I(c.width/2,c.height/2);a=a.Cc.ga;b.position=new I(a.x-this.Vk.x,a.y-this.Vk.y)}return!0};dl.prototype.doActivate=function(){this.Vk=null;Ef.prototype.doActivate.call(this)};
- dl.prototype.moveParts=function(){var a=this.h,b=a.lA;if(null!==b){var c=a.jh;if(null!==c){if(null===this.Vk){var d=a.Cc.ga,c=c.location;this.Vk=new I(d.x-c.x,d.y-c.y)}a=a.Q.ga;b.position=new I(a.x-this.Vk.x,a.y-this.Vk.y)}}};function el(){vh.call(this)}w.Pa(el,vh);el.prototype.resize=function(a){var b=this.h.lA;if(null!==b){var c=b.qb.copy();b.position=a.position;(c.width!==a.width||c.height!==a.height)&&0<a.width&&0<a.height&&(b.scale=Math.min(c.width/a.width,c.height/a.height))}};
- function oa(a){1<arguments.length&&w.l("Brush constructor can take at most one optional argument, the Brush type.");w.mc(this);this.La=!1;void 0===a?(this.ia=Qe,this.zn="black"):"string"===typeof a?(this.ia=Qe,u&&!na(a)&&w.l('Color "'+a+'" is not a valid color string for Brush constructor'),this.zn=a):(u&&w.Ea(a,oa,oa,"constructor:type"),this.ia=a,this.zn="black");var b=this.ia;b===Re?(this.yo=Yb,this.On=dc):this.On=b===Se?this.yo=ac:this.yo=Pb;this.Ev=0;this.Du=NaN;this.Ug=this.sv=this.Tg=null;this.Mx=
- this.Nx=0}w.la("Brush",oa);var Qe;oa.Solid=Qe=w.v(oa,"Solid",0);var Re;oa.Linear=Re=w.v(oa,"Linear",1);var Se;oa.Radial=Se=w.v(oa,"Radial",2);var hl;oa.Pattern=hl=w.v(oa,"Pattern",4);oa.prototype.copy=function(){var a=new oa;a.ia=this.ia;a.zn=this.zn;a.yo=this.yo.da();a.On=this.On.da();a.Ev=this.Ev;a.Du=this.Du;null!==this.Tg&&(a.Tg=this.Tg.copy());a.sv=this.sv;return a};oa.prototype.Ra=function(){this.freeze();Object.freeze(this);return this};
- oa.prototype.freeze=function(){this.La=!0;null!==this.Tg&&this.Tg.freeze();return this};oa.prototype.Ta=function(){Object.isFrozen(this)&&w.l("cannot thaw constant: "+this);this.La=!1;null!==this.Tg&&this.Tg.Ta();return this};
- oa.prototype.toString=function(){var a="Brush(";if(this.type===Qe)a+=this.color;else if(a=this.type===Re?a+"Linear ":this.type===Se?a+"Radial ":this.type===hl?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,null!==this.Ks)for(var b=this.Ks.j;b.next();)a+=" "+b.key+":"+b.value;return a+")"};
- oa.prototype.addColorStop=oa.prototype.addColorStop=function(a,b){w.G(this);("number"!==typeof a||!isFinite(a)||1<a||0>a)&&w.ja(a,"0 <= loc <= 1",oa,"addColorStop:loc");w.g(b,"string",oa,"addColorStop:color");u&&!na(b)&&w.l('Color "'+b+'" is not a valid color string for Brush.addColorStop');null===this.Tg&&(this.Tg=new ta("number","string"));this.Tg.add(a,b);this.ia===Qe&&(this.type=Re);this.Ug=null};
- w.defineProperty(oa,{type:"type"},function(){return this.ia},function(a){w.G(this,a);w.Ea(a,oa,oa,"type");this.ia=a;this.start.we()&&(a===Re?this.start=Yb:a===Se&&(this.start=ac));this.end.we()&&(a===Re?this.end=dc:a===Se&&(this.end=ac));this.Ug=null});w.defineProperty(oa,{color:"color"},function(){return this.zn},function(a){w.G(this,a);u&&!na(a)&&w.l('Color "'+a+'" is not a valid color string for Brush.color');this.zn=a;this.Ug=null});
- w.defineProperty(oa,{start:"start"},function(){return this.yo},function(a){w.G(this,a);w.k(a,Q,oa,"start");this.yo=a.da();this.Ug=null});w.defineProperty(oa,{end:"end"},function(){return this.On},function(a){w.G(this,a);w.k(a,Q,oa,"end");this.On=a.da();this.Ug=null});w.defineProperty(oa,{Ot:"startRadius"},function(){return this.Ev},function(a){w.G(this,a);w.o(a,oa,"startRadius");0>a&&w.ja(a,">= zero",oa,"startRadius");this.Ev=a;this.Ug=null});
- w.defineProperty(oa,{Qs:"endRadius"},function(){return this.Du},function(a){w.G(this,a);w.o(a,oa,"endRadius");0>a&&w.ja(a,">= zero",oa,"endRadius");this.Du=a;this.Ug=null});w.defineProperty(oa,{Ks:"colorStops"},function(){return this.Tg},function(a){w.G(this,a);u&&w.k(a,ta,oa,"colorStops");this.Tg=a;this.Ug=null});w.defineProperty(oa,{pattern:"pattern"},function(){return this.sv},function(a){w.G(this,a);this.sv=a;this.Ug=null});
- oa.randomColor=function(a,b){void 0===a&&(a=128);u&&(w.o(a,oa,"randomColor:min"),(0>a||255<a)&&w.ja(a,"0 <= min <= 255",oa,"randomColor:min"));void 0===b&&(b=Math.max(a,255));u&&(w.o(b,oa,"randomColor:max"),(b<a||255<b)&&w.ja(b,"min <= max <= 255",oa,"randomColor:max"));var c=Math.abs(b-a),d=Math.floor(a+Math.random()*c).toString(16),e=Math.floor(a+Math.random()*c).toString(16),c=Math.floor(a+Math.random()*c).toString(16);2>d.length&&(d="0"+d);2>e.length&&(e="0"+e);2>c.length&&(c="0"+c);return"#"+
- d+e+c};var il=w.createElement("canvas").getContext("2d"),na;oa.isValidColor=na=function(a){if("black"===a)return!0;if(""===a)return!1;u&&w.g(a,"string",oa,"isValidColor");il.fillStyle="#000000";var b=il.fillStyle;il.fillStyle=a;if(il.fillStyle!==b)return!0;il.fillStyle="#FFFFFF";b=il.fillStyle;il.fillStyle=a;return il.fillStyle!==b};
- function V(){w.mc(this);this.ka=30723;this.Qc=1;this.eh=null;this.cc="";this.uc=this.Pb=null;this.Sa=(new I(NaN,NaN)).freeze();this.sf=(new pa(NaN,NaN)).freeze();this.Ej=O.pn;this.Cj=O.WA;this.md=new ra;this.hj=new ra;this.Rk=new ra;this.$b=this.Au=1;this.un=0;this.Wh=jl;this.$q=O.Lp;this.Xc=(new x(NaN,NaN,NaN,NaN)).freeze();this.Ob=(new x(NaN,NaN,NaN,NaN)).freeze();this.Pc=(new x(0,0,NaN,NaN)).freeze();this.ms=this.rq=this.U=this.Cr=this.Dr=null;this.ns=this.sq=Infinity;this.Rp=this.Be=Pc;this.Rr=
- 0;this.Kj=1;this.Yp=0;this.mj=1;this.Vr=-Infinity;this.Ur=0;this.Wr=O.ok;this.Xr=mh;this.eq="";this.Oc=this.T=null;this.wn=-1;this.qm=this.ki=this.Vl=this.xo=null}w.$h(V);w.la("GraphObject",V);
- V.prototype.cloneProtected=function(a){a.ka=this.ka|6144;a.Qc=this.Qc;a.cc=this.cc;a.Pb=this.Pb;a.uc=this.uc;a.Sa.assign(this.Sa);a.sf.assign(this.sf);a.Ej=this.Ej.da();a.Cj=this.Cj.da();a.Rk=this.Rk.copy();a.$b=this.$b;a.un=this.un;a.Wh=this.Wh;a.$q=this.$q.da();a.Xc.assign(this.Xc);a.Ob.assign(this.Ob);a.Pc.assign(this.Pc);a.Cr=this.Cr;a.U=null!==this.U?this.U.copy():null;a.rq=this.rq;a.sq=this.sq;a.ms=this.ms;a.ns=this.ns;a.Be=this.Be.da();a.Rp=this.Rp.da();a.Rr=this.Rr;a.Kj=this.Kj;a.Yp=this.Yp;
- a.mj=this.mj;a.Vr=this.Vr;a.Ur=this.Ur;a.Wr=this.Wr.da();a.Xr=this.Xr;a.eq=this.eq;a.T=null!==this.T?this.T.copy():null;a.Oc=this.Oc;a.wn=this.wn;if(null!==this.Vl){a.Vl=w.il(this.Vl);for(var b=0;b<this.Vl.length;b++){var c=this.Vl[b];a[c]=this[c]}}null!==this.ki&&(a.ki=this.ki.copy())};V.prototype.ai=function(a){a.Dr=null;a.qm=null;a.V()};V.prototype.clone=function(){var a=new this.constructor;this.cloneProtected(a);return a};V.prototype.copy=function(){return this.clone()};
- V.prototype.toString=function(){return w.Fg(Object.getPrototypeOf(this))+"#"+w.ad(this)};var zh;V.None=zh=w.v(V,"None",0);var jl;V.Default=jl=w.v(V,"Default",0);var kl;V.Vertical=kl=w.v(V,"Vertical",4);var ll;V.Horizontal=ll=w.v(V,"Horizontal",5);var vd;V.Fill=vd=w.v(V,"Fill",3);var Bh;V.Uniform=Bh=w.v(V,"Uniform",1);var Lh;V.UniformToFill=Lh=w.v(V,"UniformToFill",2);function ml(a){a.T=new nl}
- V.prototype.Ne=function(){var a=new ol;a.tj=Pb;a.Vj=Pb;a.rj=10;a.Tj=10;a.qj=pl;a.Sj=pl;a.sj=0;a.Uj=0;this.U=a};function ql(a,b,c,d,e,g,h){var k=.001,l=g.length;a.moveTo(b,c);d-=b;k=e-c;0===d&&(d=.001);e=k/d;for(var m=Math.sqrt(d*d+k*k),n=0,p=!0,q=0===h?!1:!0;.1<=m;){if(q){k=g[n++%l];for(k-=h;0>k;)k+=g[n++%l],p=!p;q=!1}else k=g[n++%l];k>m&&(k=m);var r=Math.sqrt(k*k/(1+e*e));0>d&&(r=-r);b+=r;c+=e*r;p?a.lineTo(b,c):a.moveTo(b,c);m-=k;p=!p}}
- V.prototype.raiseChangedEvent=V.prototype.Lc=function(a,b,c,d,e,g,h){var k=this.W;null!==k&&(k.gn(a,b,c,d,e,g,h),0!==(this.ka&1024)&&c===this&&a===te&&rl(this,k,b))};
- function rl(a,b,c){var d=a.Vo();if(null!==d)for(var e=a.Oc.j;e.next();){var g=e.value,h=null;if(null!==g.kn){h=rf(g,d,a);if(null===h)continue;g.ox(a,h,c,null)}else if(g.St){var k=b.h;null!==k&&g.ox(a,k.ha.st,c,k)}else{var l=d.data;if(null===l)continue;k=b.h;null!==k&&k.lx||g.ox(a,l,c,k)}null!==h&&(k=d.qw(g.Ll),null!==k&&g.MF(k,h,c))}}V.prototype.qw=function(a){return this.wn===a?this:null};V.prototype.raiseChanged=V.prototype.i=function(a,b,c){this.Lc(te,a,this,b,c)};
- function sl(a,b,c,d,e){var g=a.Xc,h=a.Rk;h.reset();tl(a,h,b,c,d,e);a.Rk=h;g.x=b;g.y=c;g.width=d;g.height=e;h.gt()||h.JF(g)}function ul(a,b,c,d){if(!1===a.ag)return!1;d.multiply(a.transform);return c?a.Gg(b,d):a.Om(b,d)}
- V.prototype.$D=function(a,b,c){if(!1===this.ag)return!1;var d=this.Ha;b=a.bk(b);var e=!1;c&&(e=lb(a.x,a.y,0,0,0,d.height)<b||lb(a.x,a.y,0,d.height,d.width,d.height)<b||lb(a.x,a.y,d.width,d.height,d.width,0)<b||lb(a.x,a.y,d.width,0,0,0)<b);c||(e=lb(a.x,a.y,0,0,0,d.height)<b&&lb(a.x,a.y,0,d.height,d.width,d.height)<b&&lb(a.x,a.y,d.width,d.height,d.width,0)<b&&lb(a.x,a.y,d.width,0,0,0)<b);return e};V.prototype.fg=function(){return!0};
- V.prototype.containsPoint=V.prototype.Ka=function(a){u&&w.k(a,I,V,"containsPoint:p");var b=w.O();b.assign(a);this.transform.ib(b);var c=this.ca;if(!c.J())return!1;var d=this.h;if(null!==d&&d.Ay){var e=d.Iz("extraTouchThreshold"),g=d.Iz("extraTouchArea"),h=g/2,k=this.Ha,d=this.Xi()*d.scale,l=1/d;if(k.width*d<e&&k.height*d<e)return a=Hb(c.x-h*l,c.y-h*l,c.width+g*l,c.height+g*l,b.x,b.y),w.A(b),a}if(this instanceof da||this instanceof Y?Hb(c.x-5,c.y-5,c.width+10,c.height+10,b.x,b.y):c.Ka(b)){if(this.ki&&
- !this.ki.Ka(b))return!1;if(null!==this.uc&&c.Ka(b)||null!==this.Pb&&this.Pc.Ka(a))return!0;w.A(b);return this.$j(a)}w.A(b);return!1};V.prototype.$j=function(a){var b=this.Ha;return Hb(0,0,b.width,b.height,a.x,a.y)};
- V.prototype.containsRect=V.prototype.ak=function(a){u&&w.k(a,x,V,"containsRect:r");if(0===this.angle)return this.ca.ak(a);var b=this.Ha,b=w.nk(0,0,b.width,b.height),c=this.transform,d=!1,e=w.lc(a.x,a.y);b.Ka(c.ci(e))&&(e.n(a.x,a.bottom),b.Ka(c.ci(e))&&(e.n(a.right,a.bottom),b.Ka(c.ci(e))&&(e.n(a.right,a.y),b.Ka(c.ci(e))&&(d=!0))));w.A(e);w.qc(b);return d};
- V.prototype.containedInRect=V.prototype.Om=function(a,b){u&&w.k(a,x,V,"containedInRect:r");if(void 0===b)return a.ak(this.ca);var c=this.Ha,d=!1,e=w.lc(0,0);a.Ka(b.ib(e))&&(e.n(0,c.height),a.Ka(b.ib(e))&&(e.n(c.width,c.height),a.Ka(b.ib(e))&&(e.n(c.width,0),a.Ka(b.ib(e))&&(d=!0))));return d};
- V.prototype.intersectsRect=V.prototype.Gg=function(a,b){u&&w.k(a,x,V,"intersectsRect:r");if(void 0===b&&(b=this.transform,0===this.angle))return a.Gg(this.ca);var c=this.Ha,d=b,e=w.lc(0,0),g=w.lc(0,c.height),h=w.lc(c.width,c.height),k=w.lc(c.width,0),l=!1;if(a.Ka(d.ib(e))||a.Ka(d.ib(g))||a.Ka(d.ib(h))||a.Ka(d.ib(k)))l=!0;else{var c=w.nk(0,0,c.width,c.height),m=w.lc(a.x,a.y);c.Ka(d.ci(m))?l=!0:(m.n(a.x,a.bottom),c.Ka(d.ci(m))?l=!0:(m.n(a.right,a.bottom),c.Ka(d.ci(m))?l=!0:(m.n(a.right,a.y),c.Ka(d.ci(m))&&
- (l=!0))));w.A(m);w.qc(c);!l&&(O.Aw(a,e,g)||O.Aw(a,g,h)||O.Aw(a,h,k)||O.Aw(a,k,e))&&(l=!0)}w.A(e);w.A(g);w.A(h);w.A(k);return l};V.prototype.getDocumentPoint=V.prototype.vb=function(a,b){void 0===b&&(b=new I);a.we()&&w.l("getDocumentPoint:s Spot must be real: "+a.toString());var c=this.Ha;b.n(a.x*c.width+a.offsetX,a.y*c.height+a.offsetY);this.Of.ib(b);return b};
- V.prototype.getDocumentAngle=V.prototype.tl=function(){var a;a=this.Of;1===a.m11&&0===a.m12?a=0:(a=180*Math.atan2(a.m12,a.m11)/Math.PI,0>a&&(a+=360));return a};V.prototype.getDocumentScale=V.prototype.Xi=function(){if(0!==(this.ka&4096)===!1)return this.Au;var a=this.$b;return null!==this.S?a*this.S.Xi():a};V.prototype.getLocalPoint=V.prototype.gE=function(a,b){void 0===b&&(b=new I);b.assign(a);this.Of.ci(b);return b};
- V.prototype.getNearestIntersectionPoint=V.prototype.wl=function(a,b,c){return this.Yo(a.x,a.y,b.x,b.y,c)};f=V.prototype;f.Yo=function(a,b,c,d,e){var g=this.transform,h=1/(g.m11*g.m22-g.m12*g.m21),k=g.m22*h,l=-g.m12*h,m=-g.m21*h,n=g.m11*h,p=h*(g.m21*g.dy-g.m22*g.dx),q=h*(g.m12*g.dx-g.m11*g.dy);if(null!==this.gl)return g=this.ca,O.wl(g.left,g.top,g.right,g.bottom,a,b,c,d,e);h=a*k+b*m+p;a=a*l+b*n+q;b=c*k+d*m+p;c=c*l+d*n+q;e.n(0,0);d=this.Ha;c=O.wl(0,0,d.width,d.height,h,a,b,c,e);e.transform(g);return c};
- function Yh(a,b,c,d,e){if(!1!==Hj(a)){var g=a.margin,h=g.right+g.left,g=g.top+g.bottom;b=Math.max(b-h,0);c=Math.max(c-g,0);e=e||0;d=Math.max((d||0)-h,0);e=Math.max(e-g,0);var h=a.angle,g=0,g=a.Ca,k=0;a.pb&&(k=a.pb);90===h||270===h?(b=isFinite(g.height)?g.height+k:b,c=isFinite(g.width)?g.width+k:c):(b=isFinite(g.width)?g.width+k:b,c=isFinite(g.height)?g.height+k:c);var g=d||0,k=e||0,l=a instanceof H;switch(vl(a,!0)){case zh:k=g=0;l&&(c=b=Infinity);break;case vd:isFinite(b)&&b>d&&(g=b);isFinite(c)&&
- c>e&&(k=c);break;case ll:isFinite(b)&&b>d&&(g=b);k=0;l&&(c=Infinity);break;case kl:isFinite(c)&&c>e&&(k=c),g=0,l&&(b=Infinity)}var l=a.xe,m=a.Df;g>l.width&&m.width<l.width&&(g=l.width);k>l.height&&m.height<l.height&&(k=l.height);d=Math.max(g/a.scale,m.width);e=Math.max(k/a.scale,m.height);l.width<d&&(d=Math.min(m.width,d));l.height<e&&(e=Math.min(m.height,e));b=Math.min(l.width,b);c=Math.min(l.height,c);b=Math.max(d,b);c=Math.max(e,c);if(90===h||270===h)g=b,b=c,c=g,g=d,d=e,e=g;a.Xc.Ta();a.kp(b,c,
- d,e);a.Xc.freeze();a.Xc.J()||w.l("Non-real measuredBounds has been set. Object "+a+", measuredBounds: "+a.Xc.toString());Bj(a,!1)}}
- f.Fc=function(a,b,c,d,e){this.Xg();var g=w.eg();g.assign(this.Ob);this.Ob.Ta();if(!1===Ij(this)){var h=this.Ob;h.x=a;h.y=b;h.width=c;h.height=d}else this.Mi(a,b,c,d);this.Ob.freeze();this.ki=void 0===e?null:e;c=!1;void 0!==e?c=!0:null!==this.S&&(e=this.S.Pc,d=this.Ja,null!==this.gl&&(d=this.Ob),c=b+d.height,d=a+d.width,c=!(0<=a+.05&&d<=e.width+.05&&0<=b+.05&&c<=e.height+.05),this instanceof ya&&(a=this.Pc,this.cv>a.height||this.vj.Ye>a.width))&&(c=!0);this.ka=c?this.ka|256:this.ka&-257;this.Ob.J()||
- w.l("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ob.toString());this.Sw(g,this.Ob);w.qc(g)};f.Mi=function(){};
- function wl(a,b,c,d,e){var g=a.ca;g.x=b;g.y=c;g.width=d;g.height=e;if(!a.Ca.J()){g=a.Xc;c=a.margin;b=c.right+c.left;var h=c.top+c.bottom;c=g.width+b;g=g.height+h;d+=b;e+=h;b=vl(a,!0);c===d&&g===e&&(b=zh);switch(b){case zh:if(c>d||g>e)Bj(a,!0),Yh(a,c>d?d:c,g>e?e:g);break;case vd:Bj(a,!0);Yh(a,d,e,0,0);break;case ll:Bj(a,!0);Yh(a,d,g,0,0);break;case kl:Bj(a,!0),Yh(a,c,e,0,0)}}}
- f.Sw=function(){xl(this,!1);var a=this.W;null!==a&&null!==a.h&&(a.yl(),this.mv(a),this.sa(),a=this.W,null!==a&&(a.jn!==this&&a.dF!==this&&a.hF!==this||yl(a,!0)))};f.mv=function(a){null!==this.td&&yl(a,!0)};
- f.ef=function(a,b){if(this.visible){var c=this.opacity,d=1;if(1!==c){if(0===c)return;d=a.globalAlpha;a.globalAlpha=d*c}if(a instanceof cd)a:{if(this.visible){var e=null,g=a.Jw;if(this instanceof H&&(this.type===zl||this.type===Al))Bl(this,a,b);else{var h=this.Ob;if(0!==h.width&&0!==h.height&&!isNaN(h.x)&&!isNaN(h.y)){var k=this.transform,l=this.S;0!==(this.ka&4096)===!0&&Cl(this);var m=0!==(this.ka&256),n=!1;this instanceof ya&&Dl(this,a);if(m){n=l.fg()?l.Ha:l.ca;if(this.ki)var p=this.ki,q=p.x,r=
- p.y,s=p.width,p=p.height;else q=Math.max(h.x,n.x),r=Math.max(h.y,n.y),s=Math.min(h.right,n.right)-q,p=Math.min(h.bottom,n.bottom)-r;if(q>h.width+h.x||h.x>n.width+n.x||r>h.height+h.y||h.y>n.height+n.y)break a;n=!0;ed(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(q,r,s,p);a.clip()}q=!1;if(this instanceof C&&(q=!0,!this.Na()))break a;r=!1;s=b.fh;this.W&&s.drawShadows&&(r=this.W.gk);a.Ui.lf=[1,0,0,1,0,0];null!==this.uc&&(El(this,a,this.uc,!0,!0),this.uc instanceof oa&&this.uc.type===Se?(a.beginPath(),
- a.rect(h.x,h.y,h.width,h.height),Fl(a,this.uc)):a.fillRect(h.x,h.y,h.width,h.height));q&&this.gk&&s.drawShadows&&(ed(a,1,0,0,1,0,0),h=this.zm,a.shadowOffsetX=h.x,a.shadowOffsetY=h.y,a.shadowColor=this.ym,a.shadowBlur=this.xm/b.scale,a.hb());this instanceof H?ed(a,k.m11,k.m12,k.m21,k.m22,k.dx,k.dy):a.Ui.lf=[k.m11,k.m12,k.m21,k.m22,k.dx,k.dy];if(null!==this.Pb){var p=this.Ha,h=k=0,s=p.width,p=p.height,t=0;this instanceof Y&&(p=this.Xa.ub,k=p.x,h=p.y,s=p.width,p=p.height,t=this.qe);El(this,a,this.Pb,
- !0,!1);this.Pb instanceof oa&&this.Pb.type===Se?(a.beginPath(),a.rect(k-t/2,h-t/2,s+t,p+t),Fl(a,this.Pb)):a.fillRect(k-t/2,h-t/2,s+t,p+t)}s=h=k=0;r&&(null!==this.Pb||null!==this.uc||null!==l&&0!==(l.ka&512)||null!==l&&l.type===gj&&l.Rf()!==this)?(Gl(this,!0),k=a.shadowOffsetX,h=a.shadowOffsetY,s=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0):Gl(this,!1);this.ck(a,b);r&&0!==(this.ka&512)===!0&&(a.shadowOffsetX=k,a.shadowOffsetY=h,a.shadowBlur=s);q&&r&&(a.shadowOffsetX=0,a.shadowOffsetY=
- 0,a.shadowBlur=0);m&&(a.restore(),n&&a.zf.pop(),ca(b,a));this instanceof H&&(e=a.zf.pop());q&&r&&a.zf.pop();null!==a.VD&&(null===e&&(g===a.Jw?(ed(a,1,0,0,1,0,0),e=a.zf.pop()):e=a.Jw),a.VD(this,e))}}}}else{if(this instanceof H&&(this.type===zl||this.type===Al)){Bl(this,a,b);1!==c&&(a.globalAlpha=d);return}q=this.Ob;if(0!==q.width&&0!==q.height&&!isNaN(q.x)&&!isNaN(q.y)){u&&u.Pi&&u.jH(a,this);e=this.transform;g=this.S;0!==(this.ka&4096)===!0&&Cl(this);l=0!==(this.ka&256);this instanceof ya&&Dl(this,
- a);if(l){u&&u.UD&&w.trace("clip"+this.toString());m=g.fg()?g.Ha:g.ca;this.ki?(h=this.ki,n=h.x,r=h.y,k=h.width,h=h.height):(n=Math.max(q.x,m.x),r=Math.max(q.y,m.y),k=Math.min(q.right,m.right)-n,h=Math.min(q.bottom,m.bottom)-r);if(n>q.width+q.x||q.x>m.width+m.x||r>q.height+q.y||q.y>m.height+m.y){1!==c&&(a.globalAlpha=d);return}u&&u.UD&&u.lH(a,n,r,k,h);a.save();a.beginPath();a.rect(n,r,k,h);a.clip()}r=b.fh;m=!1;if(this instanceof C){m=!0;if(!this.Na()){1!==c&&(a.globalAlpha=d);return}this.gk&&r.drawShadows&&
- (n=this.zm,a.shadowOffsetX=n.x*b.scale*b.Ge,a.shadowOffsetY=n.y*b.scale*b.Ge,a.shadowColor=this.ym,a.shadowBlur=this.xm)}n=!1;this.W&&r.drawShadows&&(n=this.W.gk);null!==this.uc&&(El(this,a,this.uc,!0,!0),this.uc instanceof oa&&this.uc.type===Se?(a.beginPath(),a.rect(q.x,q.y,q.width,q.height),Fl(a,this.uc)):a.fillRect(q.x,q.y,q.width,q.height));e.gt()||a.transform(e.m11,e.m12,e.m21,e.m22,e.dx,e.dy);null!==this.Pb&&(h=this.Ha,r=q=0,k=h.width,h=h.height,s=0,this instanceof Y&&(h=this.Xa.ub,q=h.x,r=
- h.y,k=h.width,h=h.height,s=this.qe),El(this,a,this.Pb,!0,!1),this.Pb instanceof oa&&this.Pb.type===Se?(a.beginPath(),a.rect(q-s/2,r-s/2,k+s,h+s),Fl(a,this.Pb)):a.fillRect(q-s/2,r-s/2,k+s,h+s));u&&u.Pi&&u.kH(a,this);k=r=q=0;n&&(null!==this.Pb||null!==this.uc||null!==g&&0!==(g.ka&512)||null!==g&&(g.type===gj||g.type===xh)&&g.Rf()!==this)?(Gl(this,!0),q=a.shadowOffsetX,r=a.shadowOffsetY,k=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0):Gl(this,!1);this.ck(a,b);n&&0!==(this.ka&512)===
- !0&&(a.shadowOffsetX=q,a.shadowOffsetY=r,a.shadowBlur=k);m&&n&&(a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0);l?(a.restore(),this instanceof H?ca(b,a,!0):ca(b,a,!1)):e.gt()||(g=1/(e.m11*e.m22-e.m12*e.m21),a.transform(e.m22*g,-e.m12*g,-e.m21*g,e.m11*g,g*(e.m21*e.dy-e.m22*e.dx),g*(e.m12*e.dx-e.m11*e.dy)))}}1!==c&&(a.globalAlpha=d)}};
- function Bl(a,b,c){var d=a.Ob;0===d.width||0===d.height||isNaN(d.x)||isNaN(d.y)||(null!==a.uc&&(El(a,b,a.uc,!0,!0),a.uc instanceof oa&&a.uc.type===Se?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),Fl(b,a.uc)):b.fillRect(d.x,d.y,d.width,d.height)),null!==a.Pb&&(El(a,b,a.Pb,!0,!1),a.Pb instanceof oa&&a.Pb.type===Se?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),Fl(b,a.Pb)):b.fillRect(d.x,d.y,d.width,d.height)),a.ck(b,c))}f.ck=function(){};
- function Fl(a,b){if(b instanceof oa&&b.type===Se&&!(a instanceof cd)){var c=b.Nx,d=b.Mx;d>c?(a.scale(c/d,1),a.translate((d-c)/2,0)):c>d&&(a.scale(1,d/c),a.translate(0,(c-d)/2));a.$t?a.clip():a.fill();d>c?(a.translate(-(d-c)/2,0),a.scale(1/(c/d),1)):c>d&&(a.translate(0,-(c-d)/2),a.scale(1,1/(d/c)))}else a.$t?a.clip():a.fill()}function Hl(a){a.$t||a.stroke()}
- function El(a,b,c,d,e){if(null!==c){var g=1,h=1;if("string"===typeof c)d?b.Ql!==c&&(b.fillStyle=c,b.Ql=c):b.qn!==c&&(b.strokeStyle=c,b.qn=c);else if(c.type===Qe)c=c.color,d?b.Ql!==c&&(b.fillStyle=c,b.Ql=c):b.qn!==c&&(b.strokeStyle=c,b.qn=c);else{var k,h=a.Ha,g=h.width,h=h.height;if(e)var l=a.ca,g=l.width,h=l.height;var m=b instanceof CanvasRenderingContext2D;if(m&&(c.Ug&&c.type===hl||c.Nx===g&&c.Mx===h))k=c.Ug;else{var n=l=0,p=0,q=0,r=0,s=0,s=r=0;e&&(l=a.ca,g=l.width,h=l.height,r=l.x,s=l.y);l=c.start.x*
- g+c.start.offsetX;n=c.start.y*h+c.start.offsetY;p=c.end.x*g+c.end.offsetX;q=c.end.y*h+c.end.offsetY;l+=r;p+=r;n+=s;q+=s;c.type===Re?k=b.createLinearGradient(l,n,p,q):c.type===Se?(s=isNaN(c.Qs)?Math.max(g,h)/2:c.Qs,isNaN(c.Ot)?(r=0,s=Math.max(g,h)/2):r=c.Ot,k=b.createRadialGradient(l,n,r,p,q,s)):c.type===hl?k=b.createPattern(c.pattern,"repeat"):w.tc(c.type,"Brush type");if(c.type!==hl&&(a=c.Ks,null!==a))for(a=a.j;a.next();)k.addColorStop(a.key,a.value);m&&(c.Ug=k,c.Nx=g,c.Mx=h)}d?b.Ql!==k&&(b.fillStyle=
- k,b.Ql=k):b.qn!==k&&(b.strokeStyle=k,b.qn=k)}}}V.prototype.isContainedBy=V.prototype.Al=function(a){if(a instanceof H)a:{if(this!==a&&null!==a)for(var b=this.S;null!==b;){if(b===a){a=!0;break a}b=b.S}a=!1}else a=!1;return a};V.prototype.isVisibleObject=V.prototype.Dl=function(){if(!this.visible)return!1;var a=this.S;return null!==a?a.Dl():!0};
- function Cl(a){if(0!==(a.ka&2048)===!0){var b=a.md;b.reset();if(!a.Ob.J()||!a.Xc.J()){Il(a,!1);return}b.translate(a.Ob.x,a.Ob.y);b.translate(-a.Ja.x,-a.Ja.y);var c=a.Ha;tl(a,b,c.x,c.y,c.width,c.height);Il(a,!1);Jl(a,!0)}0!==(a.ka&4096)===!0&&(b=a.S,null===b?(a.hj.set(a.md),a.Au=a.scale,Jl(a,!1)):null!==b.Of&&(c=a.hj,c.reset(),b.fg()?c.multiply(b.hj):null!==b.S&&c.multiply(b.S.hj),c.multiply(a.md),a.Au=a.scale*b.Au,Jl(a,!1)))}
- function tl(a,b,c,d,e,g){1!==a.scale&&b.scale(a.scale);if(0!==a.angle){var h=ac;a.kf&&a.kf.rd()&&(h=a.kf);var k=w.O();if(a instanceof C&&a.ac!==a)for(c=a.ac,d=c.Ha,k.Lt(d.x,d.y,d.width,d.height,h),c.Rk.ib(k),k.offset(-c.Ja.x,-c.Ja.y),h=c.S;null!==h&&h!==a;)h.Rk.ib(k),k.offset(-h.Ja.x,-h.Ja.y),h=h.S;else k.Lt(c,d,e,g,h);b.rotate(a.angle,k.x,k.y);w.A(k)}}f=V.prototype;
- f.V=function(a){void 0===a&&(a=!1);if(!0!==Hj(this)){Bj(this,!0);xl(this,!0);var b=this.S;null!==b?a||b.V():(a=this.h,null!==a&&(a.lg.add(this),this instanceof D&&(a.na.lb||this.hf(),null!==this.Cd&&Kl(this.Cd)),a.ne(!0)));if(this instanceof H){if(this.ia===gj||this.ia===jh)a=this.Rf(),null!==a&&a.V(!0);a=this.va.p;for(var b=a.length,c=0;c<b;c++){var d=a[c];!0!==Hj(d)&&(d.Ca.J()||(d instanceof yh||d instanceof H||d instanceof ya||vl(d,!1)!==zh)&&d.V(!0))}}}};
- f.bp=function(){!1===Hj(this)&&(Bj(this,!0),xl(this,!0))};function Kl(a){if(!1===Ij(a)){if(null!==a.S)a.S.V();else{var b=a.h;null!==b&&(b.lg.add(a),a instanceof D&&a.hf(),b.ne())}xl(a,!0)}}f.Xg=function(){0!==(this.ka&2048)===!1&&(Il(this,!0),Jl(this,!0))};f.Nz=function(){Jl(this,!0)};f.sa=function(){var a=this.W;null!==a&&a.sa()};
- function vl(a,b){var c=a.stretch,d=a.S;if(null!==d&&d.ia===ga)return Ll(a,d.qd(a.kc),d.pd(a.column),b);if(null!==d&&d.ia===gj&&d.Rf()===a)return Ml(a,vd,b);if(c===jl){if(null!==d){if(d.ia===xh&&d.Rf()===a)return Ml(a,vd,b);c=d.Qd;return c===jl?Ml(a,zh,b):Ml(a,c,b)}return Ml(a,zh,b)}return Ml(a,c,b)}
- function Ll(a,b,c,d){var e=a.stretch;if(e!==jl)return Ml(a,e,d);var g=e=null;switch(b.stretch){case kl:g=!0;break;case vd:g=!0}switch(c.stretch){case ll:e=!0;break;case vd:e=!0}b=a.S.Qd;null===e&&(e=b===ll||b===vd);null===g&&(g=b===kl||b===vd);return!0===e&&!0===g?Ml(a,vd,d):!0===e?Ml(a,ll,d):!0===g?Ml(a,kl,d):Ml(a,zh,d)}
- function Ml(a,b,c){if(c)return b;if(b===zh)return zh;c=a.Ca;if(c.J())return zh;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===ll)return zh;if(b===vd)return kl}else{if(b===kl)return zh;if(b===vd)return ll}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===kl)return zh;if(b===vd)return ll}else{if(b===ll)return zh;if(b===vd)return kl}return b}
- w.defineProperty(V,{bx:"segmentOrientation"},function(){return this.Xr},function(a){var b=this.Xr;b!==a&&(u&&w.Ea(a,G,V,"segmentOrientation"),this.Xr=a,this.V(),this.i("segmentOrientation",b,a))});w.defineProperty(V,{bg:"segmentIndex"},function(){return this.Vr},function(a){u&&w.g(a,"number",V,"segmentIndex");a=Math.round(a);var b=this.Vr;b!==a&&(this.Vr=a,this.V(),this.i("segmentIndex",b,a))});
- w.defineProperty(V,{ax:"segmentFraction"},function(){return this.Ur},function(a){u&&w.g(a,"number",V,"segmentFraction");isNaN(a)?a=0:0>a?a=0:1<a&&(a=1);var b=this.Ur;b!==a&&(this.Ur=a,this.V(),this.i("segmentFraction",b,a))});w.defineProperty(V,{nF:"segmentOffset"},function(){return this.Wr},function(a){var b=this.Wr;b.N(a)||(u&&w.k(a,I,V,"segmentOffset"),this.Wr=a=a.da(),this.V(),this.i("segmentOffset",b,a))});
- w.defineProperty(V,{stretch:"stretch"},function(){return this.Wh},function(a){var b=this.Wh;b!==a&&(u&&w.Ea(a,V,V,"stretch"),this.Wh=a,this.V(),this.i("stretch",b,a))});w.defineProperty(V,{name:"name"},function(){return this.cc},function(a){var b=this.cc;b!==a&&(u&&w.g(a,"string",V,"name"),this.cc=a,null!==this.W&&(this.W.Uk=null),this.i("name",b,a))});
- w.defineProperty(V,{opacity:"opacity"},function(){return this.Qc},function(a){var b=this.Qc;b!==a&&(w.g(a,"number",V,"opacity"),(0>a||1<a)&&w.ja(a,"0 <= value <= 1",V,"opacity"),this.Qc=a,this.i("opacity",b,a),a=this.h,b=this.W,null!==a&&null!==b&&a.sa(Ti(b,b.ca)))});
- w.defineProperty(V,{visible:"visible"},function(){return 0!==(this.ka&1)},function(a){var b=0!==(this.ka&1);b!==a&&(u&&w.g(a,"boolean",V,"visible"),this.ka^=1,this.i("visible",b,a),b=this.S,null!==b?b.V():this instanceof C&&this.Qe(a),this.sa(),Nl(this))});w.defineProperty(V,{ag:"pickable"},function(){return 0!==(this.ka&2)},function(a){var b=0!==(this.ka&2);b!==a&&(u&&w.g(a,"boolean",V,"pickable"),this.ka^=2,this.i("pickable",b,a))});
- w.defineProperty(V,{uH:"fromLinkableDuplicates"},function(){return 0!==(this.ka&4)},function(a){var b=0!==(this.ka&4);b!==a&&(u&&w.g(a,"boolean",V,"fromLinkableDuplicates"),this.ka^=4,this.i("fromLinkableDuplicates",b,a))});w.defineProperty(V,{vH:"fromLinkableSelfNode"},function(){return 0!==(this.ka&8)},function(a){var b=0!==(this.ka&8);b!==a&&(u&&w.g(a,"boolean",V,"fromLinkableSelfNode"),this.ka^=8,this.i("fromLinkableSelfNode",b,a))});
- w.defineProperty(V,{jJ:"toLinkableDuplicates"},function(){return 0!==(this.ka&16)},function(a){var b=0!==(this.ka&16);b!==a&&(u&&w.g(a,"boolean",V,"toLinkableDuplicates"),this.ka^=16,this.i("toLinkableDuplicates",b,a))});w.defineProperty(V,{kJ:"toLinkableSelfNode"},function(){return 0!==(this.ka&32)},function(a){var b=0!==(this.ka&32);b!==a&&(u&&w.g(a,"boolean",V,"toLinkableSelfNode"),this.ka^=32,this.i("toLinkableSelfNode",b,a))});
- w.defineProperty(V,{Uf:"isPanelMain"},function(){return 0!==(this.ka&64)},function(a){var b=0!==(this.ka&64);b!==a&&(u&&w.g(a,"boolean",V,"isPanelMain"),this.ka^=64,this.V(),this.i("isPanelMain",b,a))});w.defineProperty(V,{Bw:"isActionable"},function(){return 0!==(this.ka&128)},function(a){var b=0!==(this.ka&128);b!==a&&(u&&w.g(a,"boolean",V,"isActionable"),this.ka^=128,this.i("isActionable",b,a))});
- w.defineProperty(V,{gl:"areaBackground"},function(){return this.uc},function(a){var b=this.uc;b!==a&&(u&&null!==a&&w.Gs(a,"GraphObject.areaBackground"),a instanceof oa&&a.freeze(),this.uc=a,this.sa(),this.i("areaBackground",b,a))});w.defineProperty(V,{background:"background"},function(){return this.Pb},function(a){var b=this.Pb;b!==a&&(u&&null!==a&&w.Gs(a,"GraphObject.background"),a instanceof oa&&a.freeze(),this.Pb=a,this.sa(),this.i("background",b,a))});
- function Gl(a,b){a.ka=b?a.ka|512:a.ka&-513}function Ol(a,b){a.ka=b?a.ka|1024:a.ka&-1025}function Il(a,b){a.ka=b?a.ka|2048:a.ka&-2049}function Jl(a,b){a.ka=b?a.ka|4096:a.ka&-4097}function Hj(a){return 0!==(a.ka&8192)}function Bj(a,b){a.ka=b?a.ka|8192:a.ka&-8193}function Ij(a){return 0!==(a.ka&16384)}function xl(a,b){a.ka=b?a.ka|16384:a.ka&-16385}w.w(V,{W:"part"},function(){if(this instanceof C)return this;if(this.qm)return this.qm;var a;for(a=this.S;a;){if(a instanceof C)return this.qm=a;a=a.S}return null});
- w.w(V,{S:"panel"},function(){return this.eh});V.prototype.Il=function(a){this.eh=a};w.w(V,{layer:"layer"},function(){var a=this.W;return null!==a?a.layer:null});w.w(V,{h:"diagram"},function(){var a=this.W;return null!==a?a.h:null},{configurable:!0});w.defineProperty(V,{position:"position"},function(){return this.Sa},function(a){var b=this.Sa;b.N(a)||(u&&w.k(a,I,V,"position"),a=a.da(),this.CA(a,b)&&this.i("position",b,a))});V.prototype.CA=function(a){this.Sa=a;Kl(this);this.Xg();return!0};
- V.prototype.tF=function(a,b){this.Sa.n(a,b);Pl(this,!0);this.Xg()};w.w(V,{ca:"actualBounds"},function(){return this.Ob});w.defineProperty(V,{scale:"scale"},function(){return this.$b},function(a){var b=this.$b;b!==a&&(u&&w.o(a,V,"scale"),0>=a&&w.l("GraphObject.scale must be greater than zero"),this.$b=a,this.Xg(),this.V(),this.i("scale",b,a))});
- w.defineProperty(V,{angle:"angle"},function(){return this.un},function(a){var b=this.un;b!==a&&(u&&w.o(a,V,"angle"),a%=360,0>a&&(a+=360),b!==a&&(this.un=a,this.V(),this.Xg(),this.i("angle",b,a)))});w.defineProperty(V,{Ca:"desiredSize"},function(){return this.sf},function(a){var b=this.sf;b.N(a)||(u&&w.k(a,pa,V,"desiredSize"),this.sf=a=a.da(),this.V(),this instanceof Y&&this.ue(),this.i("desiredSize",b,a),a=this.W,null!==a&&0!==(this.ka&1024)&&(rl(this,a,"width"),rl(this,a,"height")))});
- w.defineProperty(V,{width:"width"},function(){return this.sf.width},function(a){if(this.sf.width!==a){u&&w.g(a,"number",V,"width");var b=this.sf;this.sf=a=(new pa(a,this.sf.height)).freeze();this.V();this instanceof Y&&this.ue();this.i("desiredSize",b,a);b=this.W;null!==b&&0!==(this.ka&1024)&&rl(this,b,"width")}});
- w.defineProperty(V,{height:"height"},function(){return this.sf.height},function(a){if(this.sf.height!==a){u&&w.g(a,"number",V,"height");var b=this.sf;this.sf=a=(new pa(this.sf.width,a)).freeze();this.V();this instanceof Y&&this.ue();this.i("desiredSize",b,a);b=this.W;null!==b&&0!==(this.ka&1024)&&rl(this,b,"height")}});
- w.defineProperty(V,{Df:"minSize"},function(){return this.Ej},function(a){var b=this.Ej;b.N(a)||(u&&w.k(a,pa,V,"minSize"),a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),this.Ej=a,this.V(),this.i("minSize",b,a))});w.defineProperty(V,{xe:"maxSize"},function(){return this.Cj},function(a){var b=this.Cj;b.N(a)||(u&&w.k(a,pa,V,"maxSize"),a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),this.Cj=a,this.V(),this.i("maxSize",b,a))});
- w.w(V,{Ja:"measuredBounds"},function(){return this.Xc});w.w(V,{Ha:"naturalBounds"},function(){return this.Pc},{configurable:!0});w.defineProperty(V,{margin:"margin"},function(){return this.$q},function(a){"number"===typeof a?a=new vb(a):u&&w.k(a,vb,V,"margin");var b=this.$q;b.N(a)||(this.$q=a=a.da(),this.V(),this.i("margin",b,a))});w.w(V,{transform:null},function(){0!==(this.ka&2048)===!0&&Cl(this);return this.md});w.w(V,{Of:null},function(){0!==(this.ka&4096)===!0&&Cl(this);return this.hj});
- w.defineProperty(V,{alignment:"alignment"},function(){return this.Be},function(a){var b=this.Be;b.N(a)||(u&&w.k(a,Q,V,"alignment"),a.we()&&!a.Uc()&&w.l("alignment must be a real Spot or Spot.Default"),this.Be=a=a.da(),Kl(this),this.i("alignment",b,a))});w.defineProperty(V,{column:"column"},function(){return this.Yp},function(a){u&&w.o(a,V,"column");a=Math.round(a);var b=this.Yp;b!==a&&(0>a&&w.ja(a,">= 0",V,"column"),this.Yp=a,this.V(),this.i("column",b,a))});
- w.defineProperty(V,{NG:"columnSpan"},function(){return this.mj},function(a){u&&w.g(a,"number",V,"columnSpan");a=Math.round(a);var b=this.mj;b!==a&&(1>a&&w.ja(a,">= 1",V,"columnSpan"),this.mj=a,this.V(),this.i("columnSpan",b,a))});w.defineProperty(V,{kc:"row"},function(){return this.Rr},function(a){u&&w.o(a,V,"row");a=Math.round(a);var b=this.Rr;b!==a&&(0>a&&w.ja(a,">= 0",V,"row"),this.Rr=a,this.V(),this.i("row",b,a))});
- w.defineProperty(V,{rowSpan:"rowSpan"},function(){return this.Kj},function(a){u&&w.g(a,"number",V,"rowSpan");a=Math.round(a);var b=this.Kj;b!==a&&(1>a&&w.ja(a,">= 1",V,"rowSpan"),this.Kj=a,this.V(),this.i("rowSpan",b,a))});w.defineProperty(V,{Yj:"alignmentFocus"},function(){return this.Rp},function(a){var b=this.Rp;b.N(a)||(u&&w.k(a,Q,V,"alignmentFocus"),a.we()&&!a.Uc()&&w.l("alignmentFocus must be a real Spot or Spot.Default"),this.Rp=a=a.da(),this.V(),this.i("alignmentFocus",b,a))});
- w.defineProperty(V,{td:"portId"},function(){return this.Cr},function(a){var b=this.Cr;if(b!==a){u&&null!==a&&w.g(a,"string",V,"portId");var c=this.W;null===c||c instanceof D||(w.l("portID being set on a Link: "+a),c=null);null!==b&&null!==c&&Ql(c,this);this.Cr=a;if(null!==a&&c){c.Lh=!0;null===c.yd&&Rl(c);var d=this.td;null!==d&&c.yd.add(d,this)}this.i("portId",b,a)}});function Sl(a){var b={value:null};Tl(a,b);return b.value}
- function Tl(a,b){var c=a.S;return null===c||!Tl(c,b)&&a.visible?(b.value=a,!1):!0}function Nl(a){var b=a.W;b instanceof D&&(a=a.h,null===a||a.na.lb||b.hf())}w.defineProperty(V,{Eb:"toSpot"},function(){return null!==this.U?this.U.Vj:Pb},function(a){null===this.U&&this.Ne();var b=this.U.Vj;b.N(a)||(u&&w.k(a,Q,V,"toSpot"),a=a.da(),this.U.Vj=a,this.i("toSpot",b,a),Nl(this))});
- w.defineProperty(V,{Nl:"toEndSegmentLength"},function(){return null!==this.U?this.U.Tj:10},function(a){null===this.U&&this.Ne();var b=this.U.Tj;b!==a&&(u&&w.g(a,"number",V,"toEndSegmentLength"),0>a&&w.ja(a,">= 0",V,"toEndSegmentLength"),this.U.Tj=a,this.i("toEndSegmentLength",b,a),Nl(this))});
- w.defineProperty(V,{Rt:"toEndSegmentDirection"},function(){return null!==this.U?this.U.Sj:pl},function(a){null===this.U&&this.Ne();var b=this.U.Sj;b!==a&&(u&&w.Ea(a,D,V,"toEndSegmentDirection"),this.U.Sj=a,this.i("toEndSegmentDirection",b,a),Nl(this))});w.defineProperty(V,{Tt:"toShortLength"},function(){return null!==this.U?this.U.Uj:0},function(a){null===this.U&&this.Ne();var b=this.U.Uj;b!==a&&(u&&w.g(a,"number",V,"toShortLength"),this.U.Uj=a,this.i("toShortLength",b,a),Nl(this))});
- w.defineProperty(V,{BF:"toLinkable"},function(){return this.ms},function(a){var b=this.ms;b!==a&&(u&&null!==a&&w.g(a,"boolean",V,"toLinkable"),this.ms=a,this.i("toLinkable",b,a))});w.defineProperty(V,{lJ:"toMaxLinks"},function(){return this.ns},function(a){var b=this.ns;b!==a&&(u&&w.g(a,"number",V,"toMaxLinks"),0>a&&w.ja(a,">= 0",V,"toMaxLinks"),this.ns=a,this.i("toMaxLinks",b,a))});
- w.defineProperty(V,{Cb:"fromSpot"},function(){return null!==this.U?this.U.tj:Pb},function(a){null===this.U&&this.Ne();var b=this.U.tj;b.N(a)||(u&&w.k(a,Q,V,"fromSpot"),a=a.da(),this.U.tj=a,this.i("fromSpot",b,a),Nl(this))});
- w.defineProperty(V,{sl:"fromEndSegmentLength"},function(){return null!==this.U?this.U.rj:10},function(a){null===this.U&&this.Ne();var b=this.U.rj;b!==a&&(u&&w.g(a,"number",V,"fromEndSegmentLength"),0>a&&w.ja(a,">= 0",V,"fromEndSegmentLength"),this.U.rj=a,this.i("fromEndSegmentLength",b,a),Nl(this))});
- w.defineProperty(V,{Ys:"fromEndSegmentDirection"},function(){return null!==this.U?this.U.qj:pl},function(a){null===this.U&&this.Ne();var b=this.U.qj;b!==a&&(u&&w.Ea(a,D,V,"fromEndSegmentDirection"),this.U.qj=a,this.i("fromEndSegmentDirection",b,a),Nl(this))});w.defineProperty(V,{Zs:"fromShortLength"},function(){return null!==this.U?this.U.sj:0},function(a){null===this.U&&this.Ne();var b=this.U.sj;b!==a&&(u&&w.g(a,"number",V,"fromShortLength"),this.U.sj=a,this.i("fromShortLength",b,a),Nl(this))});
- w.defineProperty(V,{cE:"fromLinkable"},function(){return this.rq},function(a){var b=this.rq;b!==a&&(u&&null!==a&&w.g(a,"boolean",V,"fromLinkable"),this.rq=a,this.i("fromLinkable",b,a))});w.defineProperty(V,{wH:"fromMaxLinks"},function(){return this.sq},function(a){var b=this.sq;b!==a&&(u&&w.g(a,"number",V,"fromMaxLinks"),0>a&&w.ja(a,">= 0",V,"fromMaxLinks"),this.sq=a,this.i("fromMaxLinks",b,a))});
- w.defineProperty(V,{cursor:"cursor"},function(){return this.eq},function(a){var b=this.eq;b!==a&&(w.g(a,"string",V,"cursor"),this.eq=a,this.i("cursor",b,a))});w.defineProperty(V,{click:"click"},function(){return null!==this.T?this.T.ji:null},function(a){null===this.T&&ml(this);var b=this.T.ji;b!==a&&(null!==a&&w.g(a,"function",V,"click"),this.T.ji=a,this.i("click",b,a))});
- w.defineProperty(V,{Ps:"doubleClick"},function(){return null!==this.T?this.T.qi:null},function(a){null===this.T&&ml(this);var b=this.T.qi;b!==a&&(null!==a&&w.g(a,"function",V,"doubleClick"),this.T.qi=a,this.i("doubleClick",b,a))});w.defineProperty(V,{sz:"contextClick"},function(){return null!==this.T?this.T.li:null},function(a){null===this.T&&ml(this);var b=this.T.li;b!==a&&(null!==a&&w.g(a,"function",V,"contextClick"),this.T.li=a,this.i("contextClick",b,a))});
- w.defineProperty(V,{HE:"mouseEnter"},function(){return null!==this.T?this.T.kr:null},function(a){null===this.T&&ml(this);var b=this.T.kr;b!==a&&(null!==a&&w.g(a,"function",V,"mouseEnter"),this.T.kr=a,this.i("mouseEnter",b,a))});w.defineProperty(V,{IE:"mouseLeave"},function(){return null!==this.T?this.T.lr:null},function(a){null===this.T&&ml(this);var b=this.T.lr;b!==a&&(null!==a&&w.g(a,"function",V,"mouseLeave"),this.T.lr=a,this.i("mouseLeave",b,a))});
- w.defineProperty(V,{eA:"mouseOver"},function(){return null!==this.T?this.T.Ai:null},function(a){null===this.T&&ml(this);var b=this.T.Ai;b!==a&&(null!==a&&w.g(a,"function",V,"mouseOver"),this.T.Ai=a,this.i("mouseOver",b,a))});w.defineProperty(V,{dA:"mouseHover"},function(){return null!==this.T?this.T.zi:null},function(a){null===this.T&&ml(this);var b=this.T.zi;b!==a&&(null!==a&&w.g(a,"function",V,"mouseHover"),this.T.zi=a,this.i("mouseHover",b,a))});
- w.defineProperty(V,{cA:"mouseHold"},function(){return null!==this.T?this.T.yi:null},function(a){null===this.T&&ml(this);var b=this.T.yi;b!==a&&(null!==a&&w.g(a,"function",V,"mouseHold"),this.T.yi=a,this.i("mouseHold",b,a))});w.defineProperty(V,{tI:"mouseDragEnter"},function(){return null!==this.T?this.T.ir:null},function(a){null===this.T&&ml(this);var b=this.T.ir;b!==a&&(null!==a&&w.g(a,"function",V,"mouseDragEnter"),this.T.ir=a,this.i("mouseDragEnter",b,a))});
- w.defineProperty(V,{uI:"mouseDragLeave"},function(){return null!==this.T?this.T.jr:null},function(a){null===this.T&&ml(this);var b=this.T.jr;b!==a&&(null!==a&&w.g(a,"function",V,"mouseDragLeave"),this.T.jr=a,this.i("mouseDragLeave",b,a))});w.defineProperty(V,{bA:"mouseDrop"},function(){return null!==this.T?this.T.xi:null},function(a){null===this.T&&ml(this);var b=this.T.xi;b!==a&&(null!==a&&w.g(a,"function",V,"mouseDrop"),this.T.xi=a,this.i("mouseDrop",b,a))});
- w.defineProperty(V,{gD:"actionDown"},function(){return null!==this.T?this.T.Np:null},function(a){null===this.T&&ml(this);var b=this.T.Np;b!==a&&(null!==a&&w.g(a,"function",V,"actionDown"),this.T.Np=a,this.i("actionDown",b,a))});w.defineProperty(V,{hD:"actionMove"},function(){return null!==this.T?this.T.Op:null},function(a){null===this.T&&ml(this);var b=this.T.Op;b!==a&&(null!==a&&w.g(a,"function",V,"actionMove"),this.T.Op=a,this.i("actionMove",b,a))});
- w.defineProperty(V,{iD:"actionUp"},function(){return null!==this.T?this.T.Pp:null},function(a){null===this.T&&ml(this);var b=this.T.Pp;b!==a&&(null!==a&&w.g(a,"function",V,"actionUp"),this.T.Pp=a,this.i("actionUp",b,a))});w.defineProperty(V,{fD:"actionCancel"},function(){return null!==this.T?this.T.Mp:null},function(a){null===this.T&&ml(this);var b=this.T.Mp;b!==a&&(null!==a&&w.g(a,"function",V,"actionCancel"),this.T.Mp=a,this.i("actionCancel",b,a))});
- w.defineProperty(V,{KA:"toolTip"},function(){return null!==this.T?this.T.Hi:null},function(a){null===this.T&&ml(this);var b=this.T.Hi;b!==a&&(null!==a&&w.k(a,da,V,"toolTip"),this.T.Hi=a,this.i("toolTip",b,a))});w.defineProperty(V,{contextMenu:"contextMenu"},function(){return null!==this.T?this.T.mi:null},function(a){null===this.T&&ml(this);var b=this.T.mi;b!==a&&(null!==a&&w.k(a,da,V,"contextMenu"),this.T.mi=a,this.i("contextMenu",b,a))});
- V.prototype.bind=V.prototype.bind=function(a){a.ug=this;var b=this.Vo();null!==b&&Ul(b)&&w.l("Cannot add a Binding to a template that has already been copied: "+a);null===this.Oc&&(this.Oc=new K(of));this.Oc.add(a)};V.prototype.findTemplateBinder=V.prototype.Vo=function(){for(var a=this instanceof H?this:this.S;null!==a;){if(null!==a.Sl)return a;a=a.S}return null};V.fromSvg=V.fromSVG=function(a){return Vl(a)};V.prototype.setProperties=function(a){w.It(this,a)};var Wl;
- V.make=Wl=function(a,b){var c=arguments,d=null,e=null;if("function"===typeof a)e=a;else if("string"===typeof a){var g=Xl.za(a);"function"===typeof g?(c=w.il(arguments),d=g(c)):e=ba[a]}null===d&&(void 0===e&&(d=window.$,void 0!==d&&void 0!==d.noop&&w.l("GraphObject.make failed to complete. Is it conflicting with another $ var? (such as jQuery)"),w.l("GraphObject.make failed to complete, it may be conflicting with another var.")),null!==e&&e.constructor||w.l("GraphObject.make requires a class function or class name, not: "+
- a),d=new e);g=1;if(d instanceof z&&1<c.length){var h=d,e=c[1];if("string"===typeof e||e instanceof HTMLDivElement)ej(h,e),g++}for(;g<c.length;g++)e=c[g],void 0===e?w.l("Undefined value at argument "+g+" for object being constructed by GraphObject.make: "+d):Yl(d,e);return d};
- function Yl(a,b){if("string"===typeof b)if(a instanceof ya)a.text=b;else if(a instanceof Y)a.Kb=b;else if(a instanceof $i)a.source=b;else if(a instanceof H){var c=Ma(H,b);null!==c?a.type=c:w.l("Unknown Panel type as an argument to GraphObject.make: "+b)}else a instanceof oa?(c=Ma(oa,b),null!==c?a.type=c:w.l("Unknown Brush type as an argument to GraphObject.make: "+b)):a instanceof sd?(c=Ma(sd,b),null!==c?a.type=c:w.l("Unknown Geometry type as an argument to GraphObject.make: "+b)):a instanceof ee?
- (c=Ma(ee,b),null!==c?a.type=c:w.l("Unknown PathSegment type as an argument to GraphObject.make: "+b)):w.l("Unable to use a string as an argument to GraphObject.make: "+b);else if(b instanceof V)c=b,a instanceof H||w.l("A GraphObject can only be added to a Panel, not to: "+a),a.add(c);else if(b instanceof kf){var d=b,c=a,e;d.le&&c.qd?e=c.qd(d.index):!d.le&&c.pd?e=c.pd(d.index):w.l("A RowColumnDefinition can only be added to a Panel, not to: "+a);e.Ms(d)}else if(b instanceof la)a instanceof G&&b.Je===
- G?2===(b.value&2)?a.Zw=b:b===th||b===lh||b===kh?a.df=b:b===Zl||b===$l||b===am?a.zs=b:b!==bm&&b!==mh&&w.l("Unknown Link enum value for a Link property: "+b):a instanceof H&&b.Je===H?a.type=b:a instanceof ya&&b.Je===ya?a.PF=b:a instanceof Y&&(b===zh||b===Bh||b===Lh||b===jl)?a.fE=b:a instanceof $i&&(b===zh||b===Bh||b===Lh)?a.JH=b:a instanceof V&&b.Je===G?(c=a,0===b.name.indexOf("Orient")?c.bx=b:w.l("Unknown Link enum value for GraphObject.segmentOrientation property: "+b)):a instanceof V&&b.Je===V?a.stretch=
- b:a instanceof kf&&b.Je===kf?a.Mt=b:a instanceof z&&b.Je===z?a.Ho=b:a instanceof oa&&b.Je===oa?a.type=b:a instanceof sd&&b.Je===sd?a.type=b:a instanceof ee&&b.Je===ee?a.type=b:a instanceof of&&b.Je===of?a.mode=b:a instanceof se&&b.Je===se?a.Pd=b:a instanceof Z&&b.Je===Z?0===b.name.indexOf("Alignment")?a.alignment=b:0===b.name.indexOf("Arrangement")?a.Pf=b:0===b.name.indexOf("Compaction")?a.compaction=b:0===b.name.indexOf("Path")?a.path=b:0===b.name.indexOf("Sorting")?a.sorting=b:0===b.name.indexOf("Style")?
- a.nJ=b:w.l("Unknown enum value: "+b):a instanceof cm&&b.Je===cm?0===b.name.indexOf("Aggressive")?a.AG=b:0===b.name.indexOf("Cycle")?a.XG=b:0===b.name.indexOf("Init")?a.OH=b:0===b.name.indexOf("Layer")?a.dI=b:w.l("Unknown enum value: "+b):a instanceof cl&&b.Je===cl?b===dm||b===em||b===fm||b===gm?a.sorting=b:b===hm||b===im?a.Pf=b:b===jm||b===km?a.alignment=b:w.l("Unknown enum value: "+b):a instanceof lm&&b.Je===lm?b===mm||b===nm||b===om||b===pm||b===qm?a.sorting=b:b===rm||b===sm||b===tm||b===um?a.direction=
- b:b===Cm||b===Dm||b===Em||b===Fm?a.Pf=b:b===Gm||b===Hm?a.Qw=b:w.l("Unknown enum value: "+b):w.l("No property to set for this enum value: "+b);else if(b instanceof of)a instanceof V?a.bind(b):a instanceof kf?a.bind(b):w.l("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(b instanceof ud)a instanceof sd?a.Bb.add(b):w.l("A PathFigure can only be added to a Geometry, not to: "+a);else if(b instanceof ee)a instanceof ud?a.Oa.add(b):w.l("A PathSegment can only be added to a PathFigure, not to: "+
- a);else if(b instanceof Ve)a instanceof z?a.Ub=b:a instanceof F?a.Ub=b:w.l("A Layout can only be assigned to a Diagram or a Group, not to: "+a);else if(Array.isArray(b))for(c=0;c<b.length;c++)Yl(a,b[c]);else if("object"===typeof b&&null!==b)if(a instanceof oa){e=new xa;for(c in b)d=parseFloat(c),isNaN(d)?e[c]=b[c]:a.addColorStop(d,b[c]);w.It(a,e)}else if(a instanceof kf){void 0!==b.row?(e=b.row,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&w.l("Must specify non-negative integer row for RowColumnDefinition "+
- b),a.le=!0,a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&w.l("Must specify non-negative integer column for RowColumnDefinition "+b),a.le=!1,a.index=e);e=new xa;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);w.It(a,e)}else w.It(a,b);else w.l('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}var Xl=new ta("string","function");
- V.getBuilders=function(){var a=new ta("string","function"),b;for(b in Xl)if(b!==b.toLowerCase()){var c=Xl[b];"function"===typeof c&&a.add(b,c)}a.freeze();return a};var Im;V.defineBuilder=Im=function(a,b){w.g(a,"string",V,"defineBuilder:name");w.g(b,"function",V,"defineBuilder:func");var c=a.toLowerCase();""!==a&&"none"!==c&&a!==c||w.l("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);Xl.add(a,b)};var Jm;
- V.takeBuilderArgument=Jm=function(a,b,c){void 0===c&&(c=null);var d=a[1];if("function"===typeof c?c(d):"string"===typeof d)return a.splice(1,1),d;if(void 0===b)throw Error("no "+("function"===typeof c?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return b};
- Im("Button",function(){var a=new oa(Re);a.addColorStop(0,"white");a.addColorStop(1,"lightgray");var b=new oa(Re);b.addColorStop(0,"white");b.addColorStop(1,"dodgerblue");a=Wl(H,gj,{Bw:!0},{_buttonFillNormal:a,_buttonStrokeNormal:"gray",_buttonFillOver:b,_buttonStrokeOver:"blue"},Wl(Y,{name:"ButtonBorder",Kb:"Rectangle",C:new Q(0,0,2.761423749153968,2.761423749153968),D:new Q(1,1,-2.761423749153968,-2.761423749153968),fill:a,stroke:"gray"}));a.HE=function(a,b){var e=b.te("ButtonBorder");if(e instanceof
- Y){var g=b._buttonFillOver;b._buttonFillNormal=e.fill;e.fill=g;g=b._buttonStrokeOver;b._buttonStrokeNormal=e.stroke;e.stroke=g}};a.IE=function(a,b){var e=b.te("ButtonBorder");e instanceof Y&&(e.fill=b._buttonFillNormal,e.stroke=b._buttonStrokeNormal)};return a});
- Im("TreeExpanderButton",function(){var a=Wl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Wl(Y,{name:"ButtonIcon",Kb:"MinusLine",Ca:O.Kp},(new of("figure","isTreeExpanded",function(a,c){var d=c.S;return a?d._treeExpandedFigure:d._treeCollapsedFigure})).Rw()),{visible:!1},(new of("visible","isTreeLeaf",function(a){return!a})).Rw());a.click=function(a,c){var d=c.W;d instanceof da&&(d=d.Zh);if(d instanceof D){var e=d.h;if(null!==e){e=e.Jb;if(d.bd){if(!e.canCollapseTree(d))return}else if(!e.canExpandTree(d))return;
- a.$c=!0;d.bd?e.collapseTree(d):e.expandTree(d)}}};return a});
- Im("SubGraphExpanderButton",function(){var a=Wl("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Wl(Y,{name:"ButtonIcon",Kb:"MinusLine",Ca:O.Kp},(new of("figure","isSubGraphExpanded",function(a,c){var d=c.S;return a?d._subGraphExpandedFigure:d._subGraphCollapsedFigure})).Rw()));a.click=function(a,c){var d=c.W;d instanceof da&&(d=d.Zh);if(d instanceof F){var e=d.h;if(null!==e){e=e.Jb;if(d.me){if(!e.canCollapseSubGraph(d))return}else if(!e.canExpandSubGraph(d))return;a.$c=
- !0;d.me?e.collapseSubGraph(d):e.expandSubGraph(d)}}};return a});Im("ContextMenuButton",function(){var a=Wl("Button");a.stretch=ll;var b=a.te("ButtonBorder");b instanceof Y&&(b.Kb="Rectangle",b.C=new Q(0,0,2,3),b.D=new Q(1,1,-2,-2));return a});
- Im("PanelExpanderButton",function(a){var b=Jm(a,"COLLAPSIBLE");a=Wl("Button",Wl(Y,"TriangleUp",{Ca:new pa(6,4)},(new of("figure","visible",function(a){return a?"TriangleUp":"TriangleDown"})).Rw(b)));var c=a.te("ButtonBorder");c instanceof Y&&(c.stroke=null,c.fill="transparent");a.click=function(a,c){var g=c.h;if(null!==g){var h=c.W.te(b);null!==h&&(g.ec("Collapse/Expand Panel"),h.visible=!h.visible,g.fe("Collapse/Expand Panel"))}};return a});
- function nl(){this.mi=this.Hi=this.Mp=this.Pp=this.Op=this.Np=this.xi=this.jr=this.ir=this.yi=this.zi=this.Ai=this.lr=this.kr=this.li=this.qi=this.ji=null}nl.prototype.copy=function(){var a=new nl;a.ji=this.ji;a.qi=this.qi;a.li=this.li;a.kr=this.kr;a.lr=this.lr;a.Ai=this.Ai;a.zi=this.zi;a.yi=this.yi;a.ir=this.ir;a.jr=this.jr;a.xi=this.xi;a.Np=this.Np;a.Op=this.Op;a.Pp=this.Pp;a.Mp=this.Mp;a.Hi=this.Hi;a.mi=this.mi;return a};
- function H(a){V.call(this);void 0===a?0===arguments.length?this.ia=Nh:w.l("invalid argument to Panel constructor: undefined"):(w.Ea(a,H,H,"type"),this.ia=a);this.va=new K(V);this.Ze=O.Lp;this.Yg=!1;this.ia===jj&&(this.Yg=!0);this.Bq=!1;this.hq=Pc;this.pi=jl;this.ia===ga&&Km(this);this.Do=Bh;this.vq=(new pa(10,10)).freeze();this.wq=O.ok;this.Sl=this.Fh=null;this.Pq=NaN;this.ng=this.ui=null;this.eo="category";this.mg=null;this.Ji=new x(NaN,NaN,NaN,NaN);this.Cm=null;this.Lh=!1;this.Sr=null}w.Pa(H,V);
- w.$h(H);w.la("Panel",H);function Km(a){a.nj=O.Lp;a.Ih=1;a.oi=null;a.Xl=null;a.Hh=1;a.Gh=null;a.Wl=null;a.Nd=[];a.Fd=[];a.vm=Lm;a.Ul=Lm;a.Ii=0;a.vi=0}
- H.prototype.cloneProtected=function(a){V.prototype.cloneProtected.call(this,a);a.ia=this.ia;a.Ze=this.Ze.da();a.Yg=this.Yg;a.Bq=this.Bq;a.hq=this.hq.da();a.pi=this.pi;if(a.ia===ga){a.nj=this.nj.da();a.Ih=this.Ih;a.oi=this.oi;a.Xl=this.Xl;a.Hh=this.Hh;a.Gh=this.Gh;a.Wl=this.Wl;var b=[];if(0<this.Nd.length)for(var c=this.Nd,d=c.length,e=0;e<d;e++)if(void 0!==c[e]){var g=c[e].copy();g.Il(a);b[e]=g}a.Nd=b;b=[];if(0<this.Fd.length)for(c=this.Fd,d=c.length,e=0;e<d;e++)void 0!==c[e]&&(g=c[e].copy(),g.Il(a),
- b[e]=g);a.Fd=b;a.vm=this.vm;a.Ul=this.Ul;a.Ii=this.Ii;a.vi=this.vi}a.Do=this.Do;a.vq.assign(this.vq);a.wq=this.wq.da();a.Fh=this.Fh;a.Sl=this.Sl;a.Pq=this.Pq;a.ui=this.ui;a.ng=this.ng;a.eo=this.eo;a.Ji.assign(this.Ji);a.Lh=this.Lh;null!==this.Sr&&(a.Sr=this.Sr)};H.prototype.ai=function(a){V.prototype.ai.call(this,a);a.va=this.va;for(var b=a.va.p,c=b.length,d=0;d<c;d++)b[d].eh=a;a.Cm=null};
- H.prototype.copy=function(){var a=V.prototype.copy.call(this);if(null!==a){for(var b=this.va.p,c=b.length,d=0;d<c;d++){var e=b[d].copy(),g=a;e.Il(g);e.qm=null;var h=g.va,k=h.count;h.ie(k,e);h=g.W;if(null!==h){h.Uk=null;null!==e.td&&h instanceof D&&(h.Lh=!0);var l=g.h;null!==l&&l.na.lb||h.Lc(ve,"elements",g,null,e,null,k)}}return a}return null};H.prototype.toString=function(){return"Panel("+this.type+")#"+w.ad(this)};var Nh;H.Position=Nh=w.v(H,"Position",0);H.Horizontal=w.v(H,"Horizontal",1);var fj;
- H.Vertical=fj=w.v(H,"Vertical",2);var xh;H.Spot=xh=w.v(H,"Spot",3);var gj;H.Auto=gj=w.v(H,"Auto",4);var ga;H.Table=ga=w.v(H,"Table",5);H.Viewbox=w.v(H,"Viewbox",6);var zl;H.TableRow=zl=w.v(H,"TableRow",7);var Al;H.TableColumn=Al=w.v(H,"TableColumn",8);var jh;H.Link=jh=w.v(H,"Link",9);var jj;H.Grid=jj=w.v(H,"Grid",10);
- w.defineProperty(H,{type:"type"},function(){return this.ia},function(a){var b=this.ia;b!==a&&(u&&w.Ea(a,H,H,"type"),b!==zl&&b!==Al||w.l("Cannot change Panel.type when it is already a TableRow or a TableColumn: "+a),this.ia=a,this.ia===jj?this.Yg=!0:this.ia===ga&&Km(this),this.V(),this.i("type",b,a))});w.w(H,{elements:"elements"},function(){return this.va.j});w.w(H,{Ha:"naturalBounds"},function(){return this.Pc});
- w.defineProperty(H,{padding:"padding"},function(){return this.Ze},function(a){"number"===typeof a?(0>a&&w.ja(a,">= 0",H,"padding"),a=new vb(a)):(w.k(a,vb,H,"padding"),0>a.left&&w.ja(a.left,">= 0",H,"padding:value.left"),0>a.right&&w.ja(a.right,">= 0",H,"padding:value.right"),0>a.top&&w.ja(a.top,">= 0",H,"padding:value.top"),0>a.bottom&&w.ja(a.bottom,">= 0",H,"padding:value.bottom"));var b=this.Ze;b.N(a)||(this.Ze=a=a.da(),this.V(),this.i("padding",b,a))});
- w.defineProperty(H,{ml:"defaultAlignment"},function(){return this.hq},function(a){var b=this.hq;b.N(a)||(u&&w.k(a,Q,H,"defaultAlignment"),this.hq=a=a.da(),this.V(),this.i("defaultAlignment",b,a))});w.defineProperty(H,{Qd:"defaultStretch"},function(){return this.pi},function(a){var b=this.pi;b!==a&&(w.Ea(a,V,H,"defaultStretch"),this.pi=a,this.V(),this.i("defaultStretch",b,a))});
- w.defineProperty(H,{cK:"defaultSeparatorPadding"},function(){return void 0===this.nj?O.Lp:this.nj},function(a){if(void 0!==this.nj){"number"===typeof a?a=new vb(a):u&&w.k(a,vb,H,"defaultSeparatorPadding");var b=this.nj;b.N(a)||(this.nj=a=a.da(),this.i("defaultSeparatorPadding",b,a))}});
- w.defineProperty(H,{aK:"defaultRowSeparatorStroke"},function(){return void 0===this.oi?null:this.oi},function(a){var b=this.oi;b!==a&&(null===a||"string"===typeof a||a instanceof oa)&&(a instanceof oa&&a.freeze(),this.oi=a,this.i("defaultRowSeparatorStroke",b,a))});w.defineProperty(H,{bK:"defaultRowSeparatorStrokeWidth"},function(){return void 0===this.Ih?1:this.Ih},function(a){if(void 0!==this.Ih){var b=this.Ih;b!==a&&isFinite(a)&&0<=a&&(this.Ih=a,this.i("defaultRowSeparatorStrokeWidth",b,a))}});
- w.defineProperty(H,{$J:"defaultRowSeparatorDashArray"},function(){return void 0===this.Xl?null:this.Xl},function(a){if(void 0!==this.Xl){var b=this.Xl;if(b!==a){null===a||Array.isArray(a)||w.tc(a,"Array",H,"defaultRowSeparatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;e<c;e++){var g=a[e];"number"===typeof g&&0<=g&&isFinite(g)||w.l("defaultRowSeparatorDashArray:value "+g+" must be a positive number or zero.");d+=g}if(0===d){if(null===b)return;a=null}}this.Xl=a;this.sa();this.i("defaultRowSeparatorDashArray",
- b,a)}}});w.defineProperty(H,{VJ:"defaultColumnSeparatorStroke"},function(){return void 0===this.Gh?null:this.Gh},function(a){if(void 0!==this.Gh){var b=this.Gh;b!==a&&(null===a||"string"===typeof a||a instanceof oa)&&(a instanceof oa&&a.freeze(),this.Gh=a,this.i("defaultColumnSeparatorStroke",b,a))}});
- w.defineProperty(H,{WJ:"defaultColumnSeparatorStrokeWidth"},function(){return void 0===this.Hh?1:this.Hh},function(a){if(void 0!==this.Hh){var b=this.Hh;b!==a&&isFinite(a)&&0<=a&&(this.Hh=a,this.i("defaultColumnSeparatorStrokeWidth",b,a))}});
- w.defineProperty(H,{UJ:"defaultColumnSeparatorDashArray"},function(){return void 0===this.Wl?null:this.Wl},function(a){if(void 0!==this.Wl){var b=this.Wl;if(b!==a){null===a||Array.isArray(a)||w.tc(a,"Array",H,"defaultColumnSeparatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;e<c;e++){var g=a[e];"number"===typeof g&&0<=g&&isFinite(g)||w.l("defaultColumnSeparatorDashArray:value "+g+" must be a positive number or zero.");d+=g}if(0===d){if(null===b)return;a=null}}this.Wl=a;this.sa();this.i("defaultColumnSeparatorDashArray",
- b,a)}}});w.defineProperty(H,{uL:"viewboxStretch"},function(){return this.Do},function(a){var b=this.Do;b!==a&&(w.Ea(a,V,H,"viewboxStretch"),this.Do=a,this.i("viewboxStretch",b,a))});w.defineProperty(H,{ww:"gridCellSize"},function(){return this.vq},function(a){var b=this.vq;b.N(a)||(w.k(a,pa,H,"gridCellSize"),a.J()&&0!==a.width&&0!==a.height||w.l("Invalid Panel.gridCellSize: "+a),this.vq=a.da(),null!==this.h&&this===this.h.$s&&Cj(this.h),this.sa(),this.i("gridCellSize",b,a))});
- w.defineProperty(H,{iE:"gridOrigin"},function(){return this.wq},function(a){var b=this.wq;b.N(a)||(w.k(a,I,H,"gridOrigin"),a.J()||w.l("Invalid Panel.gridOrigin: "+a),this.wq=a.da(),null!==this.h&&Cj(this.h),this.sa(),this.i("gridOrigin",b,a))});f=H.prototype;f.mv=function(a){V.prototype.mv.call(this,a);for(var b=this.va.p,c=b.length,d=0;d<c;d++)b[d].mv(a)};
- f.ck=function(a,b){if(this.ia===jj){var c=this.Xi()*b.scale;0>=c&&(c=1);var d=this.ww,e=d.width,d=d.height,g=this.Ha,h=g.width,g=g.height,k=Math.ceil(h/e),l=Math.ceil(g/d),m=this.iE;a.save();a.beginPath();a.rect(0,0,h,g);a.clip();for(var n=[],p=this.va.p,q=p.length,r=0;r<q;r++){var s=p[r],t=[];n.push(t);if(s.visible)for(var s=gk(s.Kb),v=r+1;v<q;v++){var y=p[v];y.visible&&gk(y.Kb)===s&&(y=y.interval,2<=y&&t.push(y))}}p=this.va.p;q=p.length;for(r=0;r<q;r++){var B=p[r];if(B.visible){var t=n[r],s=B.interval,
- v=!1,A=!0,E=B.FA;null!==E&&(v=!0,void 0!==a.setLineDash?(a.setLineDash(E),a.lineDashOffset=B.ld):void 0!==a.webkitLineDash?(a.webkitLineDash=E,a.webkitLineDashOffset=B.ld):void 0!==a.mozDash?(a.mozDash=E,a.mozDashOffset=B.ld):A=!1);if("LineV"===B.Kb){a.lineWidth=B.pb;El(this,a,B.stroke,!1,!1);a.beginPath();for(var N=y=Math.floor(-m.x/e);N<=y+k;N++){var J=N*e+m.x;if(0<=J&&J<h&&Mm(N,s,t)&&(v&&!A?ql(a,J,0,J,g,E,B.ld):(a.moveTo(J,0),a.lineTo(J,g)),2>e*s*c))break}a.stroke()}else if("LineH"===B.Kb){a.lineWidth=
- B.pb;El(this,a,B.stroke,!1,!1);a.beginPath();for(N=y=Math.floor(-m.y/d);N<=y+l&&!(J=N*d+m.y,0<=J&&J<=g&&Mm(N,s,t)&&(v&&!A?ql(a,0,J,h,J,E,B.ld):(a.moveTo(0,J),a.lineTo(h,J)),2>d*s*c));N++);a.stroke()}else if("BarV"===B.Kb)for(El(this,a,B.fill,!0,!1),B=B.width,isNaN(B)&&(B=e),N=y=Math.floor(-m.x/e);N<=y+k&&!(J=N*e+m.x,0<=J&&J<h&&Mm(N,s,t)&&(a.fillRect(J,0,B,g),2>e*s*c));N++);else if("BarH"===B.Kb)for(El(this,a,B.fill,!0,!1),B=B.height,isNaN(B)&&(B=d),N=y=Math.floor(-m.y/d);N<=y+l&&!(J=N*d+m.y,0<=J&&
- J<=g&&Mm(N,s,t)&&(a.fillRect(0,J,h,B),2>d*s*c));N++);v&&(void 0!==a.setLineDash?(a.setLineDash(w.Ah),a.lineDashOffset=0):void 0!==a.webkitLineDash?(a.webkitLineDash=w.Ah,a.webkitLineDashOffset=0):void 0!==a.mozDash&&(a.mozDash=null,a.mozDashOffset=0))}}a.restore();ca(b,a,!1)}else{this.ia===ga&&(a.lineCap="butt",Nm(this,a,!0,this.Nd,!0),Nm(this,a,!1,this.Fd,!0),Om(this,a,!0,this.Nd),Om(this,a,!1,this.Fd),Nm(this,a,!0,this.Nd,!1),Nm(this,a,!1,this.Fd,!1));(c=this.sE)&&a.save();e=this.Rf();d=this.va.p;
- h=d.length;for(g=0;g<h;g++)k=d[g],c&&k===e&&(a.$t=!0),k.ef(a,b),c&&k===e&&(a.$t=!1);c&&(a.restore(),ca(b,a,!1));u&&u.nH&&this instanceof G&&u.mH(a,b,this)}};
- function Om(a,b,c,d){for(var e=d.length,g=a.ca,h=c?a.qd(0):a.pd(0),k=0;k<e;k++){var l=d[k];if(void 0!==l&&l!==h&&0!==l.Ya){var m=l.Cp;isNaN(m)&&(m=c?a.Ih:a.Hh);var n=l.Bp;null===n&&(n=c?a.oi:a.Gh);if(0!==m&&null!==n){El(a,b,n,!1,!1);var n=!1,p=!0,q=l.UI;null!==q&&(n=!0,void 0!==b.setLineDash?(b.setLineDash(q),b.lineDashOffset=a.ld):void 0!==b.webkitLineDash?(b.webkitLineDash=q,b.webkitLineDashOffset=a.ld):void 0!==b.mozDash?(b.mozDash=q,b.mozDashOffset=a.ld):p=!1);b.beginPath();var r=l.position+m;
- c?r>g.height&&(m-=r-g.height):r>g.width&&(m-=r-g.width);l=l.position+m/2;b.lineWidth=m;r=a.padding;c?(l+=r.top,m=r.left,r=g.width-r.right,n&&!p?ql(b,m,l,r,l,q,0):(b.moveTo(m,l),b.lineTo(r,l))):(l+=r.left,m=r.top,r=g.height-r.bottom,n&&!p?ql(b,l,m,l,r,q,0):(b.moveTo(l,m),b.lineTo(l,r)));b.stroke();n&&(void 0!==b.setLineDash?(b.setLineDash(w.Ah),b.lineDashOffset=0):void 0!==b.webkitLineDash?(b.webkitLineDash=w.Ah,b.webkitLineDashOffset=0):void 0!==b.mozDash&&(b.mozDash=null,b.mozDashOffset=0))}}}}
- function Nm(a,b,c,d,e){for(var g=d.length,h=a.ca,k=0;k<g;k++){var l=d[k];if(void 0!==l&&null!==l.background&&l.yz!==e&&0!==l.Ya){var m=c?h.height:h.width;if(!(l.position>m)){var n=l.Ag(),p=l.Cp;isNaN(p)&&(p=c?a.Ih:a.Hh);var q=l.Bp;null===q&&(q=c?a.oi:a.Gh);null===q&&(p=0);n-=p;p=l.position+p;n+=l.Ya;p+n>m&&(n=m-p);0>=n||(m=a.padding,El(a,b,l.background,!0,!1),c?b.fillRect(m.left,p+m.top,h.width-(m.left+m.right),n):b.fillRect(p+m.left,m.top,n,h.height-(m.top+m.bottom)))}}}}
- function Mm(a,b,c){if(0!==a%b)return!1;b=c.length;for(var d=0;d<b;d++)if(0===a%c[d])return!1;return!0}function gk(a){return"LineV"===a||"BarV"===a}
- f.Yo=function(a,b,c,d,e){var g=this.fg(),h=this.transform,k=1/(h.m11*h.m22-h.m12*h.m21),l=h.m22*k,m=-h.m12*k,n=-h.m21*k,p=h.m11*k,q=k*(h.m21*h.dy-h.m22*h.dx),r=k*(h.m12*h.dx-h.m11*h.dy);if(null!==this.gl)return h=this.ca,O.wl(h.left,h.top,h.right,h.bottom,a,b,c,d,e);if(null!==this.background)g=a*l+b*n+q,k=a*m+b*p+r,a=c*l+d*n+q,c=c*m+d*p+r,e.n(0,0),d=this.Ha,c=O.wl(0,0,d.width,d.height,g,k,a,c,e),e.transform(h);else{g||(l=1,n=m=0,p=1,r=q=0);k=a*l+b*n+q;a=a*m+b*p+r;l=c*l+d*n+q;d=c*m+d*p+r;e.n(l,d);
- m=(l-k)*(l-k)+(d-a)*(d-a);c=!1;p=this.va.p;r=p.length;n=w.O();for(q=0;q<r;q++)b=p[q],b.visible&&b.Yo(k,a,l,d,n)&&(c=!0,b=(k-n.x)*(k-n.x)+(a-n.y)*(a-n.y),b<m&&(m=b,e.set(n)));w.A(n);g&&e.transform(h)}return c};f.V=function(a){V.prototype.V.call(this,a);this.ia===gj&&(a=this.Rf(),null!==a&&a.V(!0));a=this.va.p;for(var b=a.length,c=0;c<b;c++){var d=a[c];!0!==Hj(d)&&(d.Ca.J()||(d instanceof yh||d instanceof H||d instanceof ya||vl(d,!1)!==zh)&&d.V(!0))}};
- f.bp=function(){if(!1===Hj(this)){Bj(this,!0);xl(this,!0);for(var a=this.va.p,b=a.length,c=0;c<b;c++)a[c].bp()}};f.Xg=function(){if(0!==(this.ka&2048)===!1){Il(this,!0);Jl(this,!0);for(var a=this.va.p,b=a.length,c=0;c<b;c++)a[c].Nz()}};f.Nz=function(){Jl(this,!0);for(var a=this.va.p,b=a.length,c=0;c<b;c++)a[c].Nz()};
- f.kp=function(a,b,c,d){var e=this.Ji;e.width=0;e.height=0;var g=this.Ca,h=this.Df;void 0===c&&(c=h.width,d=h.height);c=Math.max(c,h.width);d=Math.max(d,h.height);var k=this.xe;isNaN(g.width)||(a=Math.min(g.width,k.width));isNaN(g.height)||(b=Math.min(g.height,k.height));a=Math.max(c,a);b=Math.max(d,b);var l=this.padding;a=Math.max(a-l.left-l.right,0);b=Math.max(b-l.top-l.bottom,0);var m=this.va.p;if(0!==m.length){var n=this.ia.cc;switch(n){case "Position":var p=a,q=b,r=c,s=d,t=m.length;e.x=0;e.y=
- 0;e.width=0;for(var v=e.height=0;v<t;v++){var y=m[v];if(y.visible||y===this.ac){var B=y.margin,A=B.right+B.left,E=B.top+B.bottom;Yh(y,p,q,r,s);var N=y.Ja,J=Math.max(N.width+A,0),W=Math.max(N.height+E,0),ea=y.position.x,T=y.position.y;isFinite(ea)||(ea=0);isFinite(T)||(T=0);if(y instanceof Y){var P=y;if(P.Rz)var aa=P.pb/2,ea=ea-aa,T=T-aa}Ab(e,ea,T,J,W)}}break;case "Vertical":for(var La=a,Aa=c,Sa=m.length,qa=w.nb(),Ha=0;Ha<Sa;Ha++){var wa=m[Ha];if(wa.visible||wa===this.ac){var ec=vl(wa,!1);if(ec!==
- zh&&ec!==kl)qa.push(wa);else{var jd=wa.margin,Of=jd.right+jd.left,fc=jd.top+jd.bottom;Yh(wa,La,Infinity,Aa,0);var bf=wa.Ja,Pf=Math.max(bf.width+Of,0),Xa=Math.max(bf.height+fc,0);e.width=Math.max(e.width,Pf);e.height+=Xa}}}var fb=qa.length;if(0!==fb){this.Ca.width?La=Math.min(this.Ca.width,this.xe.width):0!==e.width&&(La=Math.min(e.width,this.xe.width));for(Ha=0;Ha<fb;Ha++)if(wa=qa[Ha],wa.visible||wa===this.ac)jd=wa.margin,Of=jd.right+jd.left,fc=jd.top+jd.bottom,Yh(wa,La,Infinity,Aa,0),bf=wa.Ja,Pf=
- Math.max(bf.width+Of,0),Xa=Math.max(bf.height+fc,0),e.width=Math.max(e.width,Pf),e.height+=Xa;w.xa(qa)}break;case "Horizontal":for(var Ea=b,Fa=d,ob=m.length,Jb=w.nb(),db=0;db<ob;db++){var lc=m[db];if(lc.visible||lc===this.ac){var je=vl(lc,!1);if(je!==zh&&je!==ll)Jb.push(lc);else{var pc=lc.margin,Rd=pc.right+pc.left,ke=pc.top+pc.bottom;Yh(lc,Infinity,Ea,0,Fa);var cf=lc.Ja,uf=Math.max(cf.width+Rd,0),Sd=Math.max(cf.height+ke,0);e.width+=uf;e.height=Math.max(e.height,Sd)}}}var Kb=Jb.length;if(0!==Kb){this.Ca.height?
- Ea=Math.min(this.Ca.height,this.xe.height):0!==e.height&&(Ea=Math.min(e.height,this.xe.height));for(db=0;db<Kb;db++)if(lc=Jb[db],lc.visible||lc===this.ac)pc=lc.margin,Rd=pc.right+pc.left,ke=pc.top+pc.bottom,Yh(lc,Infinity,Ea,0,Fa),cf=lc.Ja,uf=Math.max(cf.width+Rd,0),Sd=Math.max(cf.height+ke,0),e.width+=uf,e.height=Math.max(e.height,Sd);w.xa(Jb)}break;case "Spot":a:{var Bb=a,qc=b,Pg=c,Lb=d,Cb=m.length,gc=this.Rf(),pb=gc.margin,Ce=0,Td=0,rg=pb.right+pb.left,Qf=pb.top+pb.bottom;Yh(gc,Bb,qc,Pg,Lb);var Db=
- gc.Ja,kd=Db.width,rc=Db.height,zb=Math.max(kd+rg,0),Ic=Math.max(rc+Qf,0);e.x=-pb.left;e.y=-pb.top;e.width=zb;e.height=Ic;for(var Qb=0;Qb<Cb;Qb++){var Ra=m[Qb];if(Ra!==gc&&(Ra.visible||Ra===this.ac)){pb=Ra.margin;Ce=pb.right+pb.left;Td=pb.top+pb.bottom;Yh(Ra,Bb,qc,0,0);var Db=Ra.Ja,zb=Math.max(Db.width+Ce,0),Ic=Math.max(Db.height+Td,0),gb=Ra.alignment;gb.Uc()&&(gb=this.ml);gb.rd()||(gb=ac);var Eb=Ra.Yj;Eb.Uc()&&(Eb=ac);Ab(e,gb.x*kd+gb.offsetX-(Eb.x*Db.width-Eb.offsetX)-pb.left,gb.y*rc+gb.offsetY-(Eb.y*
- Db.height-Eb.offsetY)-pb.top,zb,Ic)}}var hc=gc.stretch;hc===jl&&(hc=vl(gc,!1));switch(hc){case zh:break a;case vd:if(!isFinite(Bb)&&!isFinite(qc))break a;break;case ll:if(!isFinite(Bb))break a;break;case kl:if(!isFinite(qc))break a}Db=gc.Ja;kd=Db.width;rc=Db.height;zb=Math.max(kd+rg,0);Ic=Math.max(rc+Qf,0);pb=gc.margin;e.x=-pb.left;e.y=-pb.top;e.width=zb;e.height=Ic;for(Qb=0;Qb<Cb;Qb++)Ra=m[Qb],Ra===gc||!Ra.visible&&Ra!==this.ac||(pb=Ra.margin,Ce=pb.right+pb.left,Td=pb.top+pb.bottom,Db=Ra.Ja,zb=Math.max(Db.width+
- Ce,0),Ic=Math.max(Db.height+Td,0),gb=Ra.alignment,gb.Uc()&&(gb=this.ml),gb.rd()||(gb=ac),Eb=Ra.Yj,Eb.Uc()&&(Eb=ac),Ab(e,gb.x*kd+gb.offsetX-(Eb.x*Db.width-Eb.offsetX)-pb.left,gb.y*rc+gb.offsetY-(Eb.y*Db.height-Eb.offsetY)-pb.top,zb,Ic))}break;case "Auto":var Ud=a,Vd=b,vf=c,De=d,Ee=m.length,Ub=this.Rf(),eb=Ub.margin,ic=eb.right+eb.left,Ac=eb.top+eb.bottom;Yh(Ub,Ud,Vd,vf,De);var ld=Ub.Ja,bb=Math.max(ld.width+ic,0),xb=Math.max(ld.height+Ac,0),mc=Pm(Ub),md=mc.x*bb+mc.offsetX,Qg=mc.y*xb+mc.offsetY,mc=Qm(Ub),
- Rg=mc.x*bb+mc.offsetX,Sg=mc.y*xb+mc.offsetY,Rf=Ud,Jc=Vd;isFinite(Ud)&&(Rf=Math.abs(md-Rg));isFinite(Vd)&&(Jc=Math.abs(Qg-Sg));var Rc=w.Ml();Rc.n(0,0);for(var Kc=0;Kc<Ee;Kc++){var qb=m[Kc];if(qb!==Ub&&(qb.visible||qb===this.ac)){var eb=qb.margin,le=eb.right+eb.left,rb=eb.top+eb.bottom;Yh(qb,Rf,Jc,0,0);ld=qb.Ja;bb=Math.max(ld.width+le,0);xb=Math.max(ld.height+rb,0);Rc.n(Math.max(bb,Rc.width),Math.max(xb,Rc.height))}}if(1===Ee)e.width=bb,e.height=xb,w.ek(Rc);else{var Bc=Pm(Ub),Fe=Qm(Ub),Fb=0,Gb=0;Fe.x!==
- Bc.x&&Fe.y!==Bc.y&&(Fb=Rc.width/Math.abs(Fe.x-Bc.x),Gb=Rc.height/Math.abs(Fe.y-Bc.y));w.ek(Rc);var nd=0;if(Ub instanceof Y){var Sc=Ub,nd=Sc.pb*Sc.scale;Ah(Sc)===Bh&&(Fb=Gb=Math.max(Fb,Gb))}var Fb=Fb+(Math.abs(Bc.offsetX)+Math.abs(Fe.offsetX)+nd),Gb=Gb+(Math.abs(Bc.offsetY)+Math.abs(Fe.offsetY)+nd),Wd=Ub.stretch;Wd===jl&&(Wd=vl(Ub,!1));switch(Wd){case zh:De=vf=0;break;case vd:isFinite(Ud)&&(Fb=Ud);isFinite(Vd)&&(Gb=Vd);break;case ll:isFinite(Ud)&&(Fb=Ud);De=0;break;case kl:vf=0,isFinite(Vd)&&(Gb=Vd)}Ub instanceof
- Y&&!Ub.Ca.J()&&(Sc=Ub,Sc.hh?Sc.Ck=null:Sc.Xa=null);Ub.bp();Yh(Ub,Fb,Gb,vf,De);e.width=Ub.Ja.width+ic;e.height=Ub.Ja.height+Ac}break;case "Table":for(var Xd=a,me=b,vm=c,Ci=d,Ka=m.length,Ge=w.nb(),Yd=w.nb(),ha=0;ha<Ka;ha++){var ma=m[ha],Tc=ma instanceof H?ma:null;if(null===Tc||Tc.type!==zl&&Tc.type!==Al||!ma.visible)Ge.push(ma);else{u&&(Tc.Ca.J()&&w.l(Tc.toString()+" TableRow/TableColumn Panels cannot have a desiredSize set: "+Tc.Ca.toString()),Tc.Df.N(O.pn)||w.l(Tc.toString()+" TableRow/TableColumn Panels cannot have a minSize set: "+
- Tc.Df.toString()),Tc.xe.N(O.WA)||w.l(Tc.toString()+" TableRow/TableColumn Panels cannot have a maxSize set: "+Tc.xe.toString()));Yd.push(ma);for(var Tg=Tc.va.p,Ch=Tg.length,Uc=0;Uc<Ch;Uc++){var Dh=Tg[Uc];Tc.type===zl?Dh.kc=ma.kc:Tc.type===Al&&(Dh.column=ma.column);Ge.push(Dh)}}}Ka=Ge.length;0===Ka&&(this.qd(0),this.pd(0));for(var Vb=[],ha=0;ha<Ka;ha++)ma=Ge[ha],Bj(ma,!0),xl(ma,!0),Vb[ma.kc]||(Vb[ma.kc]=[]),Vb[ma.kc][ma.column]||(Vb[ma.kc][ma.column]=[]),Vb[ma.kc][ma.column].push(ma);w.xa(Ge);for(var Ug=
- w.nb(),Vc=w.nb(),ne=w.nb(),Lc={count:0},od={count:0},Cc=Xd,pd=me,Sf=this.Nd,Ka=Sf.length,ha=0;ha<Ka;ha++){var fa=Sf[ha];void 0!==fa&&(fa.Ya=0)}Sf=this.Fd;Ka=Sf.length;for(ha=0;ha<Ka;ha++)fa=Sf[ha],void 0!==fa&&(fa.Ya=0);for(var oe=Vb.length,He=0,ha=0;ha<oe;ha++)Vb[ha]&&(He=Math.max(He,Vb[ha].length));for(var bk=Math.min(this.Ii,oe-1),ck=Math.min(this.vi,He-1),Dc=0,oe=Vb.length,ha=bk;ha<oe;ha++)if(Vb[ha]){var He=Vb[ha].length,hb=this.qd(ha);hb.Ya=0;for(Uc=ck;Uc<He;Uc++)if(Vb[ha][Uc]){var ib=this.pd(Uc);
- void 0===Ug[Uc]&&(ib.Ya=0,Ug[Uc]=!0);for(var dk=Vb[ha][Uc],Tf=dk.length,sg=0;sg<Tf;sg++)if(ma=dk[sg],ma.visible||ma===this.ac){var tg=1<ma.Kj||1<ma.mj;tg&&Vc.push(ma);var Rb=ma.margin,Uf=Rb.right+Rb.left,Vf=Rb.top+Rb.bottom,Zd=Ll(ma,hb,ib,!1),pe=ma.Ca,wm=!isNaN(pe.height),Eh=!isNaN(pe.width)&&wm;tg||Zd===zh||Eh||(void 0===Lc[Uc]&&(Lc[Uc]=-1,Lc.count++),void 0===od[ha]&&(od[ha]=-1,od.count++),ne.push(ma));Yh(ma,Infinity,Infinity,0,0);var Ie=ma.Ja,df=Math.max(Ie.width+Uf,0),Ed=Math.max(Ie.height+Vf,
- 0);1!==ma.Kj||Zd!==zh&&Zd!==ll||(fa=this.qd(ha),Dc=Math.max(Ed-fa.Ya,0),Dc>pd&&(Dc=pd),fa.Ya+=Dc,pd=Math.max(pd-Dc,0));1!==ma.mj||Zd!==zh&&Zd!==kl||(fa=this.pd(Uc),Dc=Math.max(df-fa.Ya,0),Dc>Cc&&(Dc=Cc),fa.Ya+=Dc,Cc=Math.max(Cc-Dc,0));tg&&ma.bp()}}}w.xa(Ug);for(var sc=0,$d=0,Ka=this.Ls,ha=0;ha<Ka;ha++)void 0!==this.Fd[ha]&&(sc+=this.pd(ha).Fb);Ka=this.Ft;for(ha=0;ha<Ka;ha++)void 0!==this.Nd[ha]&&($d+=this.qd(ha).Fb);for(var Cc=Math.max(Xd-sc,0),ek=pd=Math.max(me-$d,0),fk=Cc,Ka=ne.length,ha=0;ha<Ka;ha++){var ma=
- ne[ha],hb=this.qd(ma.kc),ib=this.pd(ma.column),Di=ma.Ja,Rb=ma.margin,Uf=Rb.right+Rb.left,Vf=Rb.top+Rb.bottom;Lc[ma.column]=0===ib.Ya?Math.max(Di.width+Uf,Lc[ma.column]):null;od[ma.kc]=0===hb.Ya?Math.max(Di.height+Vf,od[ma.kc]):null}var Vg=0,Ec=0;for(ha in od)"count"!==ha&&(Vg+=od[ha]);for(ha in Lc)"count"!==ha&&(Ec+=Lc[ha]);for(var sb=w.Ml(),ha=0;ha<Ka;ha++)if(ma=ne[ha],ma.visible||ma===this.ac){var hb=this.qd(ma.kc),ib=this.pd(ma.column),qe=0;isFinite(ib.width)?qe=ib.width:(qe=isFinite(Cc)&&null!==
- Lc[ma.column]?0===Ec?ib.Ya+Cc:Lc[ma.column]/Ec*fk:null!==Lc[ma.column]?Cc:ib.Ya||Cc,qe=Math.max(0,qe-ib.Ag()));var Mc=0;isFinite(hb.height)?Mc=hb.height:(Mc=isFinite(pd)&&null!==od[ma.kc]?0===Vg?hb.Ya+pd:od[ma.kc]/Vg*ek:null!==od[ma.kc]?pd:hb.Ya||pd,Mc=Math.max(0,Mc-hb.Ag()));sb.n(Math.max(ib.aj,Math.min(qe,ib.Wf)),Math.max(hb.aj,Math.min(Mc,hb.Wf)));Zd=Ll(ma,hb,ib,!1);switch(Zd){case ll:sb.height=Infinity;break;case kl:sb.width=Infinity}Rb=ma.margin;Uf=Rb.right+Rb.left;Vf=Rb.top+Rb.bottom;ma.bp();
- Yh(ma,sb.width,sb.height,ib.aj,hb.aj);Ie=ma.Ja;df=Math.max(Ie.width+Uf,0);Ed=Math.max(Ie.height+Vf,0);isFinite(Cc)&&(df=Math.min(df,sb.width));isFinite(pd)&&(Ed=Math.min(Ed,sb.height));var Wg=0,Wg=hb.Ya;hb.Ya=Math.max(hb.Ya,Ed);Dc=hb.Ya-Wg;pd=Math.max(pd-Dc,0);Wg=ib.Ya;ib.Ya=Math.max(ib.Ya,df);Dc=ib.Ya-Wg;Cc=Math.max(Cc-Dc,0)}w.xa(ne);for(var Je=w.Ml(),Ka=Vc.length,ha=0;ha<Ka;ha++)if(ma=Vc[ha],ma.visible||ma===this.ac){hb=this.qd(ma.kc);ib=this.pd(ma.column);sb.n(Math.max(ib.aj,Math.min(Xd,ib.Wf)),
- Math.max(hb.aj,Math.min(me,hb.Wf)));Zd=Ll(ma,hb,ib,!1);switch(Zd){case vd:0!==ib.Ya&&(sb.width=Math.min(sb.width,ib.Ya));0!==hb.Ya&&(sb.height=Math.min(sb.height,hb.Ya));break;case ll:0!==ib.Ya&&(sb.width=Math.min(sb.width,ib.Ya));break;case kl:0!==hb.Ya&&(sb.height=Math.min(sb.height,hb.Ya))}isFinite(ib.width)&&(sb.width=ib.width);isFinite(hb.height)&&(sb.height=hb.height);Je.n(0,0);for(var Sb=1;Sb<ma.Kj&&!(ma.kc+Sb>=this.Ft);Sb++)fa=this.qd(ma.kc+Sb),Je.height+=Math.max(fa.aj,isNaN(fa.$e)?fa.Wf:
- Math.min(fa.$e,fa.Wf));for(Sb=1;Sb<ma.mj&&!(ma.column+Sb>=this.Ls);Sb++)fa=this.pd(ma.column+Sb),Je.width+=Math.max(fa.aj,isNaN(fa.$e)?fa.Wf:Math.min(fa.$e,fa.Wf));sb.width+=Je.width;sb.height+=Je.height;Rb=ma.margin;Uf=Rb.right+Rb.left;Vf=Rb.top+Rb.bottom;Yh(ma,sb.width,sb.height,vm,Ci);for(var Ie=ma.Ja,df=Math.max(Ie.width+Uf,0),Ed=Math.max(Ie.height+Vf,0),Fh=0,Sb=0;Sb<ma.Kj&&!(ma.kc+Sb>=this.Ft);Sb++)fa=this.qd(ma.kc+Sb),Fh+=fa.total||0;if(Fh<Ed)for(var Fd=Ed-Fh;0<Fd;){var Gd=fa.Fb||0;isNaN(fa.height)&&
- fa.Wf>Gd&&(fa.Ya=Math.min(fa.Wf,Gd+Fd),fa.Fb!==Gd&&(Fd-=fa.Fb-Gd));if(-1===fa.index-1)break;fa=this.qd(fa.index-1)}for(var Wf=0,Sb=0;Sb<ma.mj&&!(ma.column+Sb>=this.Ls);Sb++)fa=this.pd(ma.column+Sb),Wf+=fa.total||0;if(Wf<df)for(Fd=df-Wf;0<Fd;){Gd=fa.Fb||0;isNaN(fa.width)&&fa.Wf>Gd&&(fa.Ya=Math.min(fa.Wf,Gd+Fd),fa.Fb!==Gd&&(Fd-=fa.Fb-Gd));if(-1===fa.index-1)break;fa=this.pd(fa.index-1)}}w.xa(Vc);w.ek(Je);w.ek(sb);for(var Xf=0,ef=0,Zd=vl(this,!0),Hd=this.Ca,Yf=this.xe,re=$d=sc=0,qd=0,Ka=this.Ls,ha=0;ha<
- Ka;ha++)void 0!==this.Fd[ha]&&(fa=this.pd(ha),isFinite(fa.width)?(re+=fa.width,re+=fa.Ag()):Rm(fa)===Sm?(re+=fa.Fb,re+=fa.Ag()):0!==fa.Fb&&(sc+=fa.Fb,sc+=fa.Ag()));var Xf=isFinite(Hd.width)?Math.min(Hd.width,Yf.width):Zd!==zh&&isFinite(Xd)?Xd:sc,Xf=Math.max(Xf,this.Df.width),Xf=Math.max(Xf-re,0),Gh=Math.max(Xf/sc,1);isFinite(Gh)||(Gh=1);for(ha=0;ha<Ka;ha++)void 0!==this.Fd[ha]&&(fa=this.pd(ha),isFinite(fa.width)||Rm(fa)===Sm||(fa.Ya=fa.Fb*Gh),fa.position=e.width,0!==fa.Fb&&(e.width+=fa.Fb,e.width+=
- fa.Ag()));Ka=this.Ft;for(ha=0;ha<Ka;ha++)void 0!==this.Nd[ha]&&(fa=this.qd(ha),isFinite(fa.height)?(qd+=fa.height,qd+=fa.Ag()):Rm(fa)===Sm?(qd+=fa.Fb,qd+=fa.Ag()):0!==fa.Fb&&($d+=fa.Fb,$d+=fa.Ag()));var ef=isFinite(Hd.height)?Math.min(Hd.height,Yf.height):Zd!==zh&&isFinite(me)?me:$d,ef=Math.max(ef,this.Df.height),ef=Math.max(ef-qd,0),Zf=Math.max(ef/$d,1);isFinite(Zf)||(Zf=1);for(ha=0;ha<Ka;ha++)void 0!==this.Nd[ha]&&(fa=this.qd(ha),isFinite(fa.height)||Rm(fa)===Sm||(fa.Ya=fa.Fb*Zf),fa.position=e.height,
- 0!==fa.Fb&&(e.height+=fa.Fb,e.height+=fa.Ag()));Ka=Yd.length;for(ha=0;ha<Ka;ha++){var Wb=Yd[ha];Wb.type===zl?(qe=e.width,fa=this.qd(Wb.kc),Mc=fa.Ya):(fa=this.pd(Wb.column),qe=fa.Ya,Mc=e.height);Wb.Xc.n(0,0,qe,Mc);Bj(Wb,!1);Vb[Wb.kc]||(Vb[Wb.kc]=[]);Vb[Wb.kc][Wb.column]||(Vb[Wb.kc][Wb.column]=[]);Vb[Wb.kc][Wb.column].push(Wb)}w.xa(Yd);this.Sr=Vb;break;case "Viewbox":var ug=a,vg=b,wf=c,Ei=d;1<m.length&&w.l("Viewbox Panel cannot contain more than one GraphObject.");var Ke=m[0];Ke.$b=1;Ke.bp();Yh(Ke,
- Infinity,Infinity,wf,Ei);var Fi=Ke.Ja,hk=Ke.margin,Op=hk.right+hk.left,Pp=hk.top+hk.bottom;if(isFinite(ug)||isFinite(vg)){var Zr=Ke.scale,ik=Fi.width,jk=Fi.height,Qp=Math.max(ug-Op,0),Rp=Math.max(vg-Pp,0),Gi=1;this.Do===Bh?0!==ik&&0!==jk&&(Gi=Math.min(Qp/ik,Rp/jk)):0!==ik&&0!==jk&&(Gi=Math.max(Qp/ik,Rp/jk));0===Gi&&(Gi=1E-4);Ke.$b*=Gi;Zr!==Ke.scale&&(Bj(Ke,!0),Yh(Ke,Infinity,Infinity,wf,Ei))}Fi=Ke.Ja;e.width=isFinite(ug)?ug:Math.max(Fi.width+Op,0);e.height=isFinite(vg)?vg:Math.max(Fi.height+Pp,0);
- break;case "Link":var Sp=m.length,wg=this instanceof da?this.Zh:this;if(wg instanceof G)if(0===Sp){var kk=this.Pc;tb(kk,0,0);var ae=this.Ja;ae.n(0,0,0,0)}else{var lk=this instanceof da?null:wg.path,ff=wg.hn,Le=this.Ji;Le.assign(ff);Le.x=0;var Hh=Le.y=0,Hi=wg.points,Hh=void 0!==this.pa?this.pa:Hi.count;this.ah.n(ff.x,ff.y);this.lj.clear();null!==lk&&(Tm(lk,ff.width,ff.height),ae=lk.Ja,Le.hi(ae),this.lj.add(ae));for(var Ih=w.zh(),Ii=w.O(),$f=w.O(),xm=0;xm<Sp;xm++){var Tb=m[xm];if(Tb!==lk)if(Tb.Uf&&
- Tb instanceof Y)Tm(Tb,ff.width,ff.height),ae=Tb.Ja,Le.hi(ae),this.lj.add(ae);else if(2>Hh)Yh(Tb,Infinity,Infinity),ae=Tb.Ja,Le.hi(ae),this.lj.add(ae);else{var ag=Tb.bg,Up=Tb.ax,ym=Tb.Yj;ym.we()&&(ym=ac);var Ji=Tb.bx,$r=Tb.nF,Ki=0,Li=0,mk=0;if(ag<-Hh||ag>=Hh){var Vp=wg.FE,Mi=wg.EE;Ji!==mh&&(mk=wg.computeAngle(Tb,Ji,Mi),Tb.angle=mk);Ki=Vp.x-ff.x;Li=Vp.y-ff.y}else{var xf,Jh;if(0<=ag)xf=Hi.ma(ag),Jh=ag<Hh-1?Hi.ma(ag+1):xf;else{var zm=Hh+ag;xf=Hi.ma(zm);Jh=0<zm?Hi.ma(zm-1):xf}Mi=0<=ag?xf.Vi(Jh):Jh.Vi(xf);
- Ji!==mh&&(mk=wg.computeAngle(Tb,Ji,Mi),Tb.un=mk);Ki=xf.x+(Jh.x-xf.x)*Up-ff.x;Li=xf.y+(Jh.y-xf.y)*Up-ff.y}Yh(Tb,Infinity,Infinity);var ae=Tb.Ja,kk=Tb.Ha,Ni=0;Tb instanceof Y&&(Ni=Tb.pb);var nk=kk.width+Ni,Am=kk.height+Ni;Ih.reset();Ih.translate(-ae.x,-ae.y);Ih.scale(Tb.scale,Tb.scale);Ih.rotate(Ji===mh?Tb.angle:Mi,nk/2,Am/2);var Kh=new x(0,0,nk,Am);Ii.Jt(Kh,ym);Ih.ib(Ii);var as=-Ii.x+Ni/2,bs=-Ii.y+Ni/2;$f.assign($r);isNaN($f.x)&&($f.x=0<=ag?nk/2+3:-(nk/2+3));isNaN($f.y)&&($f.y=-(Am/2+3));$f.rotate(Mi);
- Ki+=$f.x;Li+=$f.y;Kh.set(ae);Kh.x=Ki+as;Kh.y=Li+bs;this.lj.add(Kh);Le.hi(Kh)}}if(this.De)for(var Wp=this.Vf;Wp.next();)Yh(Wp.value,Infinity,Infinity);this.Ji=Le;var Bm=this.ah;Bm.n(Bm.x+Le.x,Bm.y+Le.y);tb(e,Le.width||0,Le.height||0);w.gf(Ih);w.A(Ii);w.A($f)}break;case "Grid":break;case "TableRow":case "TableColumn":w.l(this.toString()+" is not an element of a Table Panel. TableRow and TableColumn Panels can only be elements of a Table Panel.");break;default:w.l("Unknown panel type: "+n)}}var Me=e.width,
- Ne=e.height,ok=this.padding,cs=ok.top+ok.bottom,Me=Me+(ok.left+ok.right),Ne=Ne+cs;isFinite(g.width)&&(Me=g.width);isFinite(g.height)&&(Ne=g.height);Me=Math.min(k.width,Me);Ne=Math.min(k.height,Ne);Me=Math.max(h.width,Me);Ne=Math.max(h.height,Ne);Me=Math.max(c,Me);Ne=Math.max(d,Ne);e.width=Me;e.height=Ne;tb(this.Pc,Me,Ne);sl(this,0,0,Me,Ne)};
- H.prototype.findMainElement=H.prototype.Rf=function(){if(null===this.Cm){var a=this.va.p,b=a.length;if(0===b)return null;for(var c=0;c<b;c++){var d=a[c];if(!0===d.Uf)return this.Cm=d}this.Cm=a[0]}return this.Cm};
- H.prototype.Mi=function(a,b,c,d){var e=this.Ji,g=this.va.p,h=w.nk(0,0,0,0);if(0===g.length){var k=this.ca;k.x=a;k.y=b;k.width=c;k.height=d}else{if(!this.Ca.J()){var l=vl(this,!0),m=this.Xc,n=m.width,p=m.height,q=this.margin,r=q.left+q.right,s=q.top+q.bottom;n===c&&p===d&&(l=zh);switch(l){case zh:if(n>c||p>d)this.V(),Yh(this,n>c?c:n,p>d?d:p);break;case vd:this.V(!0);Yh(this,c+r,d+s,0,0);break;case ll:this.V(!0);Yh(this,c+r,p+s,0,0);break;case kl:this.V(!0),Yh(this,n+r,d+s,0,0)}}k=this.ca;k.x=a;k.y=
- b;k.width=c;k.height=d;var t=this.ia.cc;switch(t){case "Position":for(var v=g.length,y=e.x-this.padding.left,B=e.y-this.padding.top,A=0;A<v;A++){var E=g[A],N=E.Ja,J=E.margin,W=E.position.x,ea=E.position.y;h.x=isNaN(W)?-y:W-y;h.y=isNaN(ea)?-B:ea-B;if(E instanceof Y){var T=E;if(T.Rz){var P=T.pb/2;h.x-=P;h.y-=P}}h.x+=J.left;h.y+=J.top;h.width=N.width;h.height=N.height;E.visible&&E.Fc(h.x,h.y,h.width,h.height)}break;case "Vertical":for(var aa=g.length,La=this.padding.left,Aa=this.padding.top,Sa=0;Sa<
- aa;Sa++){var qa=La,Ha=g[Sa];if(Ha.visible){var wa=Ha.Ja,ec=Ha.margin,jd=ec.left+ec.right,Of=La+this.padding.right,fc=wa.width,bf=vl(Ha,!1);if(isNaN(Ha.Ca.width)&&bf===vd||bf===ll)fc=Math.max(e.width-jd-Of,0);var Pf=fc+jd+Of,Xa=Ha.alignment;Xa.Uc()&&(Xa=this.ml);Xa.rd()||(Xa=ac);Ha.Fc(qa+Xa.offsetX+ec.left+(e.width*Xa.x-Pf*Xa.x),Aa+Xa.offsetY+ec.top,fc,wa.height);Aa+=wa.height+ec.bottom+ec.top}}break;case "Horizontal":for(var fb=g.length,Ea=this.padding.top,Fa=this.padding.left,ob=0;ob<fb;ob++){var Jb=
- Ea,db=g[ob];if(db.visible){var lc=db.Ja,je=db.margin,pc=je.top+je.bottom,Rd=Ea+this.padding.bottom,ke=lc.height,cf=vl(db,!1);if(isNaN(db.Ca.height)&&cf===vd||cf===kl)ke=Math.max(e.height-pc-Rd,0);var uf=ke+pc+Rd,Sd=db.alignment;Sd.Uc()&&(Sd=this.ml);Sd.rd()||(Sd=ac);db.Fc(Fa+Sd.offsetX+je.left,Jb+Sd.offsetY+je.top+(e.height*Sd.y-uf*Sd.y),lc.width,ke);Fa+=lc.width+je.left+je.right}}break;case "Spot":var Kb=g.length,Bb=this.Rf(),qc=Bb.Ja,Pg=qc.width,Lb=qc.height,Cb=this.padding,gc=Cb.left,pb=Cb.top;
- h.x=gc-e.x;h.y=pb-e.y;Bb.Fc(h.x,h.y,Pg,Lb);for(var Ce=0;Ce<Kb;Ce++){var Td=g[Ce];if(Td!==Bb){var rg=Td.Ja,Qf=rg.width,Db=rg.height,kd=Td.alignment;kd.Uc()&&(kd=this.ml);kd.rd()||(kd=ac);var rc=Td.Yj;rc.Uc()&&(rc=ac);h.x=kd.x*Pg+kd.offsetX-(rc.x*Qf-rc.offsetX);h.y=kd.y*Lb+kd.offsetY-(rc.y*Db-rc.offsetY);h.x-=e.x;h.y-=e.y;Td.visible&&Td.Fc(gc+h.x,pb+h.y,Qf,Db)}}break;case "Auto":var zb=g.length,Ic=this.Rf(),Qb=Ic.Ja,Ra=w.eg();Ra.n(0,0,1,1);var gb=Ic.margin,Eb=gb.left,hc=gb.top,Ud=this.padding,Vd=Ud.left,
- vf=Ud.top;h.x=Eb;h.y=hc;h.width=Qb.width;h.height=Qb.height;Ic.Fc(Vd+h.x,vf+h.y,h.width,h.height);var De=Pm(Ic),Ee=Qm(Ic),Ub=0+De.y*Qb.height+De.offsetY,eb=0+Ee.x*Qb.width+Ee.offsetX,ic=0+Ee.y*Qb.height+Ee.offsetY;Ra.x=0+De.x*Qb.width+De.offsetX;Ra.y=Ub;Ab(Ra,eb,ic,0,0);Ra.x+=Eb+Vd;Ra.y+=hc+vf;for(var Ac=0;Ac<zb;Ac++){var ld=g[Ac];if(ld!==Ic){var bb=ld.Ja,gb=ld.margin,xb=Math.max(bb.width+gb.right+gb.left,0),mc=Math.max(bb.height+gb.top+gb.bottom,0),md=ld.alignment;md.Uc()&&(md=this.ml);md.rd()||
- (md=ac);h.x=Ra.width*md.x+md.offsetX-xb*md.x+gb.left+Ra.x;h.y=Ra.height*md.y+md.offsetY-mc*md.y+gb.top+Ra.y;h.width=Ra.width;h.height=Ra.height;ld.visible&&(Hb(Ra.x,Ra.y,Ra.width,Ra.height,h.x,h.y,bb.width,bb.height)?ld.Fc(h.x,h.y,bb.width,bb.height):ld.Fc(h.x,h.y,bb.width,bb.height,new x(Ra.x,Ra.y,Ra.width,Ra.height)))}}w.qc(Ra);break;case "Table":for(var Qg=g.length,Rg=this.padding,Sg=Rg.left,Rf=Rg.top,Jc=this.Sr,Rc=0,Kc=0,qb=Jc.length,le=0,rb=0;rb<qb;rb++)Jc[rb]&&(le=Math.max(le,Jc[rb].length));
- for(var Bc=Math.min(this.Ii,qb-1);Bc!==qb&&(void 0===this.Nd[Bc]||0===this.Nd[Bc].Fb);)Bc++;for(var Bc=Math.min(Bc,qb-1),Fe=-this.Nd[Bc].Sa,Fb=Math.min(this.vi,le-1);Fb!==le&&(void 0===this.Fd[Fb]||0===this.Fd[Fb].Fb);)Fb++;for(var Fb=Math.min(Fb,le-1),Gb=-this.Fd[Fb].Sa,nd=w.Ml(),rb=0;rb<qb;rb++)if(Jc[rb])for(var le=Jc[rb].length,Sc=this.qd(rb),Kc=Sc.Sa+Fe+Rf+Sc.AD(),Wd=0;Wd<le;Wd++)if(Jc[rb][Wd])for(var Xd=this.pd(Wd),Rc=Xd.Sa+Gb+Sg+Xd.AD(),me=Jc[rb][Wd],vm=me.length,Ci=0;Ci<vm;Ci++){var Ka=me[Ci],
- Ge=Ka.Ja,Yd=Ka instanceof H?Ka:null;if(null===Yd||Yd.type!==zl&&Yd.type!==Al){nd.n(0,0);for(var ha=1;ha<Ka.rowSpan&&!(rb+ha>=this.Ft);ha++){var ma=this.qd(rb+ha);nd.height+=ma.total}for(ha=1;ha<Ka.NG&&!(Wd+ha>=this.Ls);ha++){var Tc=this.pd(Wd+ha);nd.width+=Tc.total}var Tg=Xd.Fb+nd.width,Ch=Sc.Fb+nd.height;h.x=Rc;h.y=Kc;h.width=Tg;h.height=Ch;var Uc=Rc,Dh=Kc,Vb=Tg,Ug=Ch;Rc+Tg>e.width&&(Vb=Math.max(e.width-Rc,0));Kc+Ch>e.height&&(Ug=Math.max(e.height-Kc,0));var Vc=Ka.alignment,ne=0,Lc=0,od=0,Cc=0;if(Vc.Uc()){Vc=
- this.ml;Vc.rd()||(Vc=ac);var ne=Vc.x,Lc=Vc.y,od=Vc.offsetX,Cc=Vc.offsetY,pd=Xd.alignment,Sf=Sc.alignment;pd.rd()&&(ne=pd.x,od=pd.offsetX);Sf.rd()&&(Lc=Sf.y,Cc=Sf.offsetY)}else ne=Vc.x,Lc=Vc.y,od=Vc.offsetX,Cc=Vc.offsetY;if(isNaN(ne)||isNaN(Lc))Lc=ne=.5,Cc=od=0;var fa=Ge.width,oe=Ge.height,He=Ka.margin,bk=He.left+He.right,ck=He.top+He.bottom,Dc=Ll(Ka,Sc,Xd,!1);!isNaN(Ka.Ca.width)||Dc!==vd&&Dc!==ll||(fa=Math.max(Tg-bk,0));!isNaN(Ka.Ca.height)||Dc!==vd&&Dc!==kl||(oe=Math.max(Ch-ck,0));var hb=Ka.xe,ib=
- Ka.Df,fa=Math.min(hb.width,fa),oe=Math.min(hb.height,oe),fa=Math.max(ib.width,fa),oe=Math.max(ib.height,oe),dk=oe+ck;h.x+=h.width*ne-(fa+bk)*ne+od+He.left;h.y+=h.height*Lc-dk*Lc+Cc+He.top;Ka.visible&&(Hb(Uc,Dh,Vb,Ug,h.x,h.y,Ge.width,Ge.height)?Ka.Fc(h.x,h.y,fa,oe):Ka.Fc(h.x,h.y,fa,oe,new x(Uc,Dh,Vb,Ug)))}else{Ka.Xg();Ka.Ob.Ta();var Tf=Ka.Ob;Tf.x=Yd.type===zl?Sg:Rc;Tf.y=Yd.type===Al?Rf:Kc;Tf.width=Ge.width;Tf.height=Ge.height;Ka.Ob.freeze();xl(Ka,!1)}}w.ek(nd);for(rb=0;rb<Qg;rb++)Ka=g[rb],Yd=Ka instanceof
- H?Ka:null,null===Yd||Yd.type!==zl&&Yd.type!==Al||(Tf=Ka.Ob,Ka.Pc.Ta(),Ka.Pc.n(0,0,Tf.width,Tf.height),Ka.Pc.freeze());break;case "Viewbox":var sg=g[0],tg=sg.Ja,Rb=sg.margin,Uf=Rb.top+Rb.bottom,Vf=Math.max(tg.width+(Rb.right+Rb.left),0),Zd=Math.max(tg.height+Uf,0),pe=sg.alignment;pe.Uc()&&(pe=this.ml);pe.rd()||(pe=ac);h.x=e.width*pe.x-Vf*pe.x+pe.offsetX;h.y=e.height*pe.y-Zd*pe.y+pe.offsetY;h.width=tg.width;h.height=tg.height;sg.Fc(h.x,h.y,h.width,h.height);break;case "Link":var wm=g.length,Eh=this instanceof
- da?this.Zh:this;if(Eh instanceof G){var Ie=this instanceof da?null:Eh.path,df=this.lj.p,Ed=0;if(null!==Ie&&Ed<this.lj.count){var sc=df[Ed];Ed++;Ie.Fc(sc.x-this.Ji.x,sc.y-this.Ji.y,sc.width,sc.height)}for(var $d=0;$d<wm;$d++){var ek=g[$d];ek!==Ie&&Ed<this.lj.count&&(sc=df[Ed],Ed++,ek.Fc(sc.x-this.Ji.x,sc.y-this.Ji.y,sc.width,sc.height))}var fk=Eh.points,Di=fk.count;if(2<=Di&&this.De)for(var Vg=this.Vf;Vg.next();){var Ec=Vg.value,sb=Di,qe=fk,Mc=Ec.bg,Wg=Ec.ax,Je=Ec.Yj;Je.we()&&(Je=ac);var Sb=Ec.bx,
- Fh=Ec.nF,Fd=0,Gd=0,Wf=0;if(Mc<-sb||Mc>=sb){var Xf=this.FE,ef=this.EE;Sb!==mh&&(Wf=this.computeAngle(Ec,Sb,ef),Ec.angle=Wf);Fd=Xf.x;Gd=Xf.y}else{var Hd=void 0,Yf=void 0;if(0<=Mc)Hd=qe.p[Mc],Yf=Mc<sb-1?qe.p[Mc+1]:Hd;else var re=sb+Mc,Hd=qe.p[re],Yf=0<re?qe.p[re-1]:Hd;ef=0<=Mc?Hd.Vi(Yf):Yf.Vi(Hd);Sb!==mh&&(Wf=this.computeAngle(Ec,Sb,ef),Ec.angle=Wf);Fd=Hd.x+(Yf.x-Hd.x)*Wg;Gd=Hd.y+(Yf.y-Hd.y)*Wg}var qd=w.zh();qd.reset();qd.scale(Ec.scale,Ec.scale);qd.rotate(Ec.angle,0,0);var Gh=Ec.Ha,Zf=w.nk(0,0,Gh.width,
- Gh.height),Wb=w.O();Wb.Jt(Zf,Je);qd.ib(Wb);var ug=-Wb.x,vg=-Wb.y,wf=Fh.copy();isNaN(wf.x)&&(wf.x=0<=Mc?Wb.x+3:-(Wb.x+3));isNaN(wf.y)&&(wf.y=-(Wb.y+3));wf.rotate(ef);Fd+=wf.x;Gd+=wf.y;qd.JF(Zf);var ug=ug+Zf.x,vg=vg+Zf.y,Ei=w.lc(Fd+ug,Gd+vg);Ec.move(Ei);w.A(Ei);w.A(Wb);w.qc(Zf);w.gf(qd)}this instanceof da?this.qt():Eh.qt()}break;case "Grid":break;case "TableRow":case "TableColumn":w.l(this.toString()+" is not an element of a Table Panel.TableRow and TableColumn panels can only be elements of a Table Panel.");
- break;default:w.l("Unknown panel type: "+t)}w.qc(h)}};H.prototype.$j=function(a){var b=this.Ha;if(Hb(0,0,b.width,b.height,a.x,a.y)){for(var b=this.va.p,c=b.length,d=w.lc(0,0);c--;){var e=b[c];if(e.visible||e===this.ac)if(kb(d.set(a),e.transform),e.Ka(d))return w.A(d),!0}w.A(d);return null===this.Pb&&null===this.uc?!1:!0}return!1};H.prototype.qw=function(a){if(this.wn===a)return this;for(var b=this.va.p,c=b.length,d=0;d<c;d++){var e=b[d].qw(a);if(null!==e)return e}return null};
- function Um(a,b,c){c(a,b);if(b instanceof H){b=b.va.p;for(var d=b.length,e=0;e<d;e++)Um(a,b[e],c)}}function Rj(a,b){Vm(a,a,b)}function Vm(a,b,c){c(b);b=b.va.p;for(var d=b.length,e=0;e<d;e++){var g=b[e];g instanceof H&&Vm(a,g,c)}}H.prototype.walkVisualTree=function(a){Wm(this,this,a)};function Wm(a,b,c){c(b);if(b instanceof H){b=b.va.p;for(var d=b.length,e=0;e<d;e++)Wm(a,b[e],c)}}H.prototype.findInVisualTree=H.prototype.Rs=function(a){return Xm(this,this,a)};
- function Xm(a,b,c){if(c(b))return b;if(b instanceof H){b=b.va.p;for(var d=b.length,e=0;e<d;e++){var g=Xm(a,b[e],c);if(null!==g)return g}}return null}H.prototype.findObject=H.prototype.te=function(a){if(this.name===a)return this;for(var b=this.va.p,c=b.length,d=0;d<c;d++){var e=b[d];if(e.name===a)return e;if(e instanceof H)if(null===e.ui&&null===e.ng){if(e=e.te(a),null!==e)return e}else if(zk(e)&&(e=e.va.first(),null!==e&&(e=e.te(a),null!==e)))return e}return null};
- function Ym(a){a=a.va.p;for(var b=a.length,c=0,d=0;d<b;d++){var e=a[d];if(e instanceof H)c=Math.max(c,Ym(e));else if(e instanceof Y){a:{if(!e.hh)switch(e.Pn){case "None":case "Square":case "Ellipse":case "Circle":case "LineH":case "LineV":case "FramedRectangle":case "RoundedRectangle":case "Line1":case "Line2":case "Border":case "Cube1":case "Cube2":case "Junction":case "Cylinder1":case "Cylinder2":case "Cylinder3":case "Cylinder4":case "PlusLine":case "XLine":case "ThinCross":case "ThickCross":e=
- 0;break a}e=e.qe/2*e.Bm*e.Xi()}c=Math.max(c,e)}}return c}f=H.prototype;f.fg=function(){return!(this.type===zl||this.type===Al)};
- f.he=function(a,b,c){if(!1===this.ag)return null;void 0===b&&(b=null);void 0===c&&(c=null);if(Ij(this))return null;var d=this.Ha,e=1/this.Xi(),g=this.fg(),h=g?a:kb(w.lc(a.x,a.y),this.transform),k=this.h,l=10,m=5;null!==k&&(l=k.Iz("extraTouchArea"),m=l/2);if(Hb(-(m*e),-(m*e),d.width+l*e,d.height+l*e,h.x,h.y)){if(!this.Yg){var e=this.va.p,n=e.length,k=w.O(),m=(l=this.sE)?this.Rf():null;if(l&&(m.fg()?kb(k.set(a),m.transform):k.set(a),!m.Ka(k)))return w.A(k),g||w.A(h),null;for(;n--;){var p=e[n];if(p.visible||
- p===this.ac)if(p.fg()?kb(k.set(a),p.transform):k.set(a),!l||p!==m){var q=null;p instanceof H?q=p.he(k,b,c):!0===p.ag&&p.Ka(k)&&(q=p);if(null!==q&&(null!==b&&(q=b(q)),null!==q&&(null===c||c(q))))return w.A(k),g||w.A(h),q}}w.A(k)}if(null===this.background&&null===this.gl)return g||w.A(h),null;a=Hb(0,0,d.width,d.height,h.x,h.y)?this:null;g||w.A(h);return a}g||w.A(h);return null};
- f.To=function(a,b,c,d){if(!1===this.ag)return!1;void 0===b&&(b=null);void 0===c&&(c=null);d instanceof K||d instanceof L||(d=new K(V));var e=this.Ha,g=this.fg(),h=g?a:kb(w.lc(a.x,a.y),this.transform);if(Hb(0,0,e.width,e.height,h.x,h.y)){if(!this.Yg){for(var e=this.va.p,k=e.length,l=w.O();k--;){var m=e[k];if(m.visible||m===this.ac){m.fg()?kb(l.set(a),m.transform):l.set(a);var n=m,m=m instanceof H?m:null;(null!==m?m.To(l,b,c,d):n.Ka(l))&&!1!==n.ag&&(null!==b&&(n=b(n)),null===n||null!==c&&!c(n)||d.add(n))}}w.A(l)}g||
- w.A(h);return null!==this.background||null!==this.gl}g||w.A(h);return!1};
- f.dk=function(a,b,c,d,e,g){if(!1===this.ag)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var h=g;void 0===g&&(h=w.zh(),h.reset());h.multiply(this.transform);if(this.Om(a,h))return Zm(this,b,c,e),void 0===g&&w.gf(h),!0;if(this.Gg(a,h)){if(!this.Yg)for(var k=this.va.p,l=k.length;l--;){var m=k[l];if(m.visible||m===this.ac){var n=m.ca,p=this.Ha;if(!(n.x>p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof H?m:null;p=w.zh();p.set(h);if(null!==m?m.dk(a,b,c,d,e,p):ul(n,a,d,p))null!==
- b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);w.gf(p)}}}void 0===g&&w.gf(h);return d}void 0===g&&w.gf(h);return!1};function Zm(a,b,c,d){for(var e=a.va.p,g=e.length;g--;){var h=e[g];if(h.visible){var k=h.ca,l=a.Ha;k.x>l.width||k.y>l.height||0>k.x+k.width||0>k.y+k.height||(h instanceof H&&Zm(h,b,c,d),null!==b&&(h=b(h)),null===h||null!==c&&!c(h)||d.add(h))}}}
- f.Um=function(a,b,c,d,e,g){if(!1===this.ag)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var h=this.Ha,k=this.fg(),l=k?a:kb(w.lc(a.x,a.y),this.transform),m=k?b:kb(w.lc(b.x,b.y),this.transform),n=l.bk(m),p=0<l.x&&l.x<h.width&&0<l.y&&l.y<h.height||lb(l.x,l.y,0,0,0,h.height)<n||lb(l.x,l.y,0,h.height,h.width,h.height)<n||lb(l.x,l.y,h.width,h.height,h.width,0)<n||lb(l.x,l.y,h.width,0,0,0)<n,h=0<l.x&&l.x<h.width&&0<l.y&&l.y<h.height&&lb(l.x,l.y,0,0,0,h.height)<n&&lb(l.x,l.y,0,h.height,h.width,h.height)<
- n&&lb(l.x,l.y,h.width,h.height,h.width,0)<n&&lb(l.x,l.y,h.width,0,0,0)<n;k||(w.A(l),w.A(m));if(p){if(!this.Yg){k=w.O();l=w.O();m=this.va.p;for(n=m.length;n--;){var q=m[n];if(q.visible||q===this.ac){var r=q.ca,s=this.Ha;r.x>s.width||r.y>s.height||0>r.x+r.width||0>r.y+r.height||(q.fg()?(r=q.transform,kb(k.set(a),r),kb(l.set(b),r)):(k.set(a),l.set(b)),r=q,q=q instanceof H?q:null,null!==q?!q.Um(k,l,c,d,e,g):!r.$D(k,l,e))||(null!==c&&(r=c(r)),null===r||null!==d&&!d(r)||g.add(r))}}w.A(k);w.A(l)}return e?
- p:h}return!1};function Pm(a){var b=a.C;if(void 0===b||b===Pc)b=null;null===b&&a instanceof Y&&(a=a.Xa,null!==a&&(b=a.C));null===b&&(b=Xb);return b}function Qm(a){var b=a.D;if(void 0===b||b===Pc)b=null;null===b&&a instanceof Y&&(a=a.Xa,null!==a&&(b=a.D));null===b&&(b=jc);return b}H.prototype.add=H.prototype.add=function(a){w.k(a,V,H,"add:element");this.ie(this.va.count,a)};H.prototype.elt=H.prototype.ma=function(a){return this.va.ma(a)};
- H.prototype.insertAt=H.prototype.ie=function(a,b){b instanceof C&&w.l("Cannot add a Part to a Panel: "+b);if(this===b||this.Al(b))this===b&&w.l("Cannot make a Panel contain itself: "+this.toString()),w.l("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+b.toString());var c=b.S;null!==c&&c!==this&&w.l("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+b.toString()+", already contained by "+c.toString()+", cannot be shared by this Panel: "+
- this.toString());this.ia!==jj||b instanceof Y||w.l("Can only add Shapes to a Grid Panel, not: "+b);b.Il(this);b.qm=null;if(null!==this.jt){var d=b.data;null!==d&&"object"===typeof d&&(null===this.mg&&(this.mg=new ta(Object,H)),this.mg.add(d,b))}var e=this.va,d=-1;if(c===this){for(var g=-1,h=this.va.p,k=h.length,l=0;l<k;l++)if(h[l]===b){g=l;break}if(-1!==g){if(g===a||g+1>=e.count&&a>=e.count)return;e.ud(g);d=g}else w.l("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>
- a||a>e.count)a=e.count;e.ie(a,b);this.V();b.V();null!==b.td?this.Lh=!0:b instanceof H&&!0===b.Lh&&(this.Lh=!0);c=this.W;null!==c&&(c.Uk=null,c.Bj=NaN,this.Lh&&c instanceof D&&(c.Lh=!0),c.Lh&&(c.yd=null),e=this.h,null!==e&&e.na.lb||(-1!==d&&c.Lc(we,"elements",this,b,null,d,null),c.Lc(ve,"elements",this,null,b,null,a)))};H.prototype.remove=H.prototype.remove=function(a){w.k(a,V,H,"remove:element");for(var b=this.va.p,c=b.length,d=-1,e=0;e<c;e++)if(b[e]===a){d=e;break}-1!==d&&this.Oe(d)};
- H.prototype.removeAt=H.prototype.ud=function(a){u&&w.o(a,H,"removeAt:idx");0<=a&&this.Oe(a)};H.prototype.Oe=function(a){var b=this.va,c=b.ma(a);c.qm=null;c.Il(null);if(null!==this.mg){var d=c.data;"object"===typeof d&&this.mg.remove(d)}b.ud(a);Bj(this,!1);this.V();this.Cm===c&&(this.Cm=null);b=this.W;null!==b&&(b.Uk=null,b.Bj=NaN,d=this.h,null!==d&&d.na.lb||b.Lc(we,"elements",this,c,null,a,null))};w.w(H,{Ft:"rowCount"},function(){return void 0===this.Nd?0:this.Nd.length});
- H.prototype.getRowDefinition=H.prototype.qd=function(a){u&&w.o(a,H,"getRowDefinition:idx");0>a&&w.ja(a,">= 0",H,"getRowDefinition:idx");a=Math.round(a);var b=this.Nd;if(void 0===b[a]){var c=new kf;c.Il(this);c.le=!0;c.index=a;b[a]=c}return b[a]};H.prototype.removeRowDefinition=H.prototype.YE=function(a){u&&w.o(a,H,"removeRowDefinition:idx");0>a&&w.ja(a,">= 0",H,"removeRowDefinition:idx");a=Math.round(a);var b=this.Nd;this.Lc(we,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.V()};
- w.w(H,{Ls:"columnCount"},function(){return void 0===this.Fd?0:this.Fd.length});H.prototype.getColumnDefinition=H.prototype.pd=function(a){u&&w.o(a,H,"getColumnDefinition:idx");0>a&&w.ja(a,">= 0",H,"getColumnDefinition:idx");a=Math.round(a);var b=this.Fd;if(void 0===b[a]){var c=new kf;c.Il(this);c.le=!1;c.index=a;b[a]=c}return b[a]};
- H.prototype.removeColumnDefinition=H.prototype.UE=function(a){u&&w.o(a,H,"removeColumnDefinition:idx");0>a&&w.ja(a,">= 0",H,"removeColumnDefinition:idx");a=Math.round(a);var b=this.Fd;this.Lc(we,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.V()};
- w.defineProperty(H,{QI:"rowSizing"},function(){return void 0===this.vm?Lm:this.vm},function(a){if(void 0!==this.vm){var b=this.vm;b!==a&&(a!==Lm&&a!==Sm&&w.l("rowSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None"),this.vm=a,this.V(),this.i("rowSizing",b,a))}});
- w.defineProperty(H,{MG:"columnSizing"},function(){return void 0===this.Ul?Lm:this.Ul},function(a){if(void 0!==this.Ul){var b=this.Ul;b!==a&&(a!==Lm&&a!==Sm&&w.l("columnSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None"),this.Ul=a,this.V(),this.i("columnSizing",b,a))}});
- w.defineProperty(H,{DF:"topIndex"},function(){return void 0===this.Ii?0:this.Ii},function(a){if(void 0!==this.Ii){var b=this.Ii;b!==a&&((!isFinite(a)||0>a)&&w.l("topIndex must be greater than zero and a real number. Was "+a),this.Ii=a,this.V(),this.i("topIndex",b,a))}});
- w.defineProperty(H,{AE:"leftIndex"},function(){return void 0===this.vi?0:this.vi},function(a){if(void 0!==this.vi){var b=this.vi;b!==a&&((!isFinite(a)||0>a)&&w.l("leftIndex must be greater than zero and a real number. Was "+a),this.vi=a,this.V(),this.i("leftIndex",b,a))}});H.prototype.findRowForLocalY=function(a){if(0>a)return-1;if(this.type!==ga)return NaN;for(var b=0,c=this.Nd,d=c.length,e=this.Ii;e<d;e++){var g=c[e];if(void 0!==g&&(b+=g.total,a<b))return e}return-1};
- H.prototype.findColumnForLocalX=function(a){if(0>a)return-1;if(this.type!==ga)return NaN;for(var b=0,c=this.Fd,d=c.length,e=this.vi;e<d;e++){var g=c[e];if(void 0!==g&&(b+=g.total,a<b))return e}return-1};
- w.defineProperty(H,{data:"data"},function(){return this.Fh},function(a){var b=this.Fh;if(b!==a){var c=this instanceof C&&!(this instanceof da);c&&w.g(a,"object",H,"data");Cf(this);this.Fh=a;var d=this.h;null!==d&&(c?this instanceof G?(null!==b&&d.Ek.remove(b),null!==a&&d.Ek.add(a,this)):(null!==b&&d.ni.remove(b),null!==a&&d.ni.add(a,this)):(c=this.S,null!==c&&null!==c.mg&&(null!==b&&c.mg.remove(b),null!==a&&c.mg.add(a,this))));this.i("data",b,a);null!==d&&d.na.lb||null!==a&&this.Wb()}});
- w.defineProperty(H,{$H:"itemIndex"},function(){return this.Pq},function(a){var b=this.Pq;b!==a&&(this.Pq=a,this.i("itemIndex",b,a))});function Ul(a){a=a.Sl;return null!==a&&a.La}
- function Cf(a){var b=a.Sl;if(null===b)null!==a.data&&w.l("Template cannot have .data be non-null: "+a),a.Sl=b=new K(of);else if(b.La)return;var c=new K(V);Um(a,a,function(a,d){var e=d.Oc;if(null!==e)for(Ol(d,!1),e=e.j;e.next();){var g=e.value;g.mode===qf&&Ol(d,!0);if(null!==g.kn){var h=rf(g,a,d);null!==h&&(c.add(h),null===h.xo&&(h.xo=new K(of)),h.xo.add(g))}b.add(g)}if(d instanceof H&&d.type===ga){if(0<d.Nd.length)for(e=d.Nd,g=e.length,h=0;h<g;h++){var k=e[h];if(void 0!==k&&null!==k.Oc)for(var l=
- k.Oc.j;l.next();){var v=l.value;v.ug=k;v.$y=2;v.Jv=k.index;b.add(v)}}if(0<d.Fd.length)for(e=d.Fd,g=e.length,h=0;h<g;h++)if(k=e[h],void 0!==k&&null!==k.Oc)for(l=k.Oc.j;l.next();)v=l.value,v.ug=k,v.$y=1,v.Jv=k.index,b.add(v)}});for(var d=c.j;d.next();){var e=d.value;if(null!==e.xo){Ol(e,!0);for(var g=e.xo.j;g.next();){var h=g.value;null===e.Oc&&(e.Oc=new K(of));e.Oc.add(h)}}e.xo=null}for(d=b.j;d.next();)if(e=d.value,g=e.ug,null!==g){e.ug=null;var k=e.Qt,l=k.indexOf(".");0<l&&g instanceof H&&(h=k.substring(0,
- l),k=k.substr(l+1),l=g.te(h),null!==l?(g=l,e.Qt=k):w.trace('Warning: unable to find GraphObject named "'+h+'" for Binding: '+e.toString()));g instanceof kf?(e.Ll=w.ad(g.S),g.S.wn=e.Ll):(e.Ll=w.ad(g),g.wn=e.Ll)}b.freeze();a instanceof C&&(a.Td()&&(Yh(a,Infinity,Infinity),a.Fc()),u&&!$m&&Um(a,a,function(a,c){if(c instanceof H&&(c.type===gj||c.type===xh)&&1>=c.elements.count&&!(c instanceof C)){if(1===c.elements.count){var d=null!==c.jt;if(!d)for(var e=b.j;e.next();)if("itemArray"===e.value.Qt){d=!0;
- break}}d||(w.trace("Auto or Spot Panel should not have zero or one elements: "+c.toString()+" in "+a.toString()),$m=!0)}}))}var $m=!1;
- H.prototype.updateTargetBindings=H.prototype.Wb=function(a){var b=this.Sl;if(null!==b)for(void 0===a&&(a=""),b=b.j;b.next();){var c=b.value,d=c.xF;if(""===a||""===d||d===a)if(d=c.Qt,null!==c.SG||""!==d){var d=this.data,e=c.kn;if(null!==e)d=""===e?this:"."===e?this:".."===e?this:this.te(e);else{var g=this.h;null!==g&&c.St&&(d=g.ha.st)}if(null===d)u&&w.trace("Binding error: missing GraphObject named "+e+" in "+this.toString());else{var g=this,h=c.Ll;if(-1!==h){if(g=this.qw(h),null===g)continue}else null!==
- c.ug&&(g=c.ug);"."===e?d=g:".."===e&&(d=g.S);e=c.$y;if(0!==e){if(!(g instanceof H))continue;h=g;1===e?g=h.pd(c.Jv):2===e&&(g=h.qd(c.Jv))}void 0!==g&&c.MF(g,d)}}}};w.defineProperty(H,{jt:"itemArray"},function(){return this.ui},function(a){var b=this.ui;if(b!==a){u&&null!==a&&!w.isArray(a)&&w.l("Panel.itemArray must be an Array-like object or null, not: "+a);var c=this.h;null!==c&&null!==b&&Xj(c,this);this.ui=a;null!==c&&null!==a&&Tj(c,this);this.i("itemArray",b,a);null!==c&&c.na.lb||this.rA()}});
- function zk(a){return a.type===xh||a.type===gj||a.type===jh||a.type===ga&&0<a.va.length&&(a=a.va.ma(0),a.Uf&&a instanceof H&&(a.type===zl||a.type===Al))?!0:!1}H.prototype.rebuildItemElements=H.prototype.rA=function(){var a=0;for(zk(this)&&(a=1);this.va.length>a;)this.Oe(a);a=this.jt;if(null!==a)for(var b=w.tb(a),c=0;c<b;c++)yk(this,w.ob(a,c),c)};
- function yk(a,b,c){if(!(void 0===b||null===b||0>c)){var d=a.getCategoryForItemData(b,c),d=a.findTemplateForItemData(b,c,d);if(null!==d){Cf(d);d=d.copy();"object"===typeof b&&(null===a.mg&&(a.mg=new ta(Object,H)),a.mg.add(b,d));var e=c;zk(a)&&e++;a.ie(e,d);Ak(a,e,c);d.data=b}}}function Ak(a,b,c){for(a=a.va;b<a.length;){var d=a.ma(b);if(d instanceof H){var e=b,g=c;d.type===zl?d.kc=e:d.type===Al&&(d.column=e);d.$H=g}b++;c++}}
- function Qi(a){a=a.va.p;for(var b=a.length,c=0;c<b;c++){var d=a[c];if(d instanceof an||d instanceof H&&Qi(d))return!0}return!1}
- w.defineProperty(H,{AK:"itemTemplate"},function(){return null===this.ng?null:this.ng.za("")},function(a){if(null===this.ng){if(null===a)return;this.ng=new ta("string",H)}var b=this.ng.za("");b!==a&&(w.k(a,H,H,"itemTemplate"),(a instanceof C||a.Uf)&&w.l("itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.ng.add("",a),this.i("itemTemplate",b,a),a=this.h,null!==a&&a.na.lb||this.rA())});
- w.defineProperty(H,{aI:"itemTemplateMap"},function(){return this.ng},function(a){var b=this.ng;if(b!==a){w.k(a,ta,H,"itemTemplateMap");for(var c=a.j;c.next();){var d=c.value;(d instanceof C||d.Uf)&&w.l("Template in itemTemplateMap must not be a Part or be Panel.isPanelMain: "+d)}this.ng=a;this.i("itemTemplateMap",b,a);a=this.h;null!==a&&a.na.lb||this.rA()}});
- w.defineProperty(H,{zK:"itemCategoryProperty"},function(){return this.eo},function(a){var b=this.eo;b!==a&&("string"!==typeof a&&"function"!==typeof a&&w.tc(a,"string or function",H,"itemCategoryProperty"),this.eo=a,this.i("itemCategoryProperty",b,a))});
- H.prototype.getCategoryForItemData=function(a){if(null===a)return"";var b=this.eo,c="";if("function"===typeof b)c=b(a);else if("string"===typeof b&&"object"===typeof a){if(""===b)return"";c=w.yb(a,b)}else return"";if(void 0===c)return"";if("string"===typeof c)return c;w.l("Panel.getCategoryForItemData found a non-string category for "+a+": "+c);return""};var bn=!1,cn=null;
- H.prototype.findTemplateForItemData=function(a,b,c){a=this.aI;b=null;null!==a&&(b=a.za(c));null===b&&(bn||(bn=!0,w.trace('No item template Panel found for category "'+c+'" on '+this),w.trace(" Using default item template."),c=new H,a=new ya,a.bind(new of("text","",ka)),c.add(a),cn=c),b=cn);return b};w.defineProperty(H,{tK:"isAtomic"},function(){return this.Yg},function(a){var b=this.Yg;b!==a&&(w.g(a,"boolean",H,"isAtomic"),this.Yg=a,this.i("isAtomic",b,a))});
- w.defineProperty(H,{sE:"isClipping"},function(){return this.Bq},function(a){var b=this.Bq;b!==a&&(w.g(a,"boolean",H,"isClipping"),this.Bq=a,this.i("isClipping",b,a))});function kf(){w.mc(this);this.eh=null;this.Tu=!0;this.Jd=0;this.$e=NaN;this.Fj=0;this.Dj=Infinity;this.Be=Pc;this.Sa=this.Fb=0;this.Oc=null;this.ds=dn;this.Wh=jl;this.as=this.Nj=null;this.bs=NaN;this.Pb=this.Sh=null;this.dq=!1}w.la("RowColumnDefinition",kf);
- kf.prototype.copy=function(){var a=new kf;a.Tu=this.Tu;a.Jd=this.Jd;a.$e=this.$e;a.Fj=this.Fj;a.Dj=this.Dj;a.Be=this.Be;a.Fb=this.Fb;a.Sa=this.Sa;a.Wh=this.Wh;a.ds=this.ds;a.Nj=null===this.Nj?null:this.Nj.da();a.as=this.as;a.bs=this.bs;a.Sh=null;null!==this.Sh&&(a.Sh=w.il(this.Sh));a.Pb=this.Pb;a.dq=this.dq;a.Oc=this.Oc;return a};
- kf.prototype.Ms=function(a){w.k(a,kf,kf,"copyFrom:pd");a.le?this.height=a.height:this.width=a.width;this.aj=a.aj;this.Wf=a.Wf;this.alignment=a.alignment;this.stretch=a.stretch;this.Mt=a.Mt;this.Nj=null===a.Nj?null:a.Nj.da();this.Bp=a.Bp;this.Cp=a.Cp;this.Sh=null;a.Sh&&(this.Sh=w.il(a.Sh));this.background=a.background;this.yz=a.yz;this.Oc=a.Oc};kf.prototype.toString=function(){return"RowColumnDefinition "+(this.le?"(Row ":"(Column ")+this.index+") #"+w.ad(this)};var dn;
- kf.Default=dn=w.v(kf,"Default",0);var Sm;kf.None=Sm=w.v(kf,"None",1);var Lm;kf.ProportionalExtra=Lm=w.v(kf,"ProportionalExtra",2);kf.prototype.Il=function(a){this.eh=a};kf.prototype.computeEffectiveSpacingTop=kf.prototype.AD=function(){var a=0;if(0!==this.index){var b=this.eh,c=this.Bp;null===c&&null!==b&&(c=this.le?b.oi:b.Gh);null!==c&&(a=this.Cp,isNaN(a)&&(a=null!==b?this.le?b.Ih:b.Hh:0))}b=this.qF;if(null===b)if(b=this.eh,null!==b)b=b.nj;else return a;return a+(this.le?b.top:b.left)};
- kf.prototype.computeEffectiveSpacing=kf.prototype.Ag=function(){var a=0;if(0!==this.index){var b=this.eh,c=this.Bp;null===c&&null!==b&&(c=this.le?b.oi:b.Gh);null!==c&&(a=this.Cp,isNaN(a)&&(a=null!==b?this.le?b.Ih:b.Hh:0))}b=this.qF;if(null===b)if(b=this.eh,null!==b)b=b.nj;else return a;return a+(this.le?b.top+b.bottom:b.left+b.right)};
- kf.prototype.Yc=function(a,b,c,d,e){var g=this.eh;if(null!==g&&(g.Lc(te,a,this,b,c,d,e),null!==this.Oc&&(b=g.Vo(),null!==b&&(b=b.data,null!==b))))for(c=this.Oc.j;c.next();)c.value.ox(this,b,a,null)};w.w(kf,{S:"panel"},function(){return this.eh});w.defineProperty(kf,{le:"isRow"},function(){return this.Tu},function(a){this.Tu=a});w.defineProperty(kf,{index:"index"},function(){return this.Jd},function(a){this.Jd=a});
- w.defineProperty(kf,{height:"height"},function(){return this.$e},function(a){var b=this.$e;b!==a&&(u&&w.g(a,"number",kf,"height"),0>a&&w.ja(a,">= 0",kf,"height"),this.$e=a,this.Ya=this.Fb,null!==this.S&&this.S.V(),this.Yc("height",b,a))});w.defineProperty(kf,{width:"width"},function(){return this.$e},function(a){var b=this.$e;b!==a&&(u&&w.g(a,"number",kf,"width"),0>a&&w.ja(a,">= 0",kf,"width"),this.$e=a,this.Ya=this.Fb,null!==this.S&&this.S.V(),this.Yc("width",b,a))});
- w.defineProperty(kf,{aj:"minimum"},function(){return this.Fj},function(a){var b=this.Fj;b!==a&&(u&&w.g(a,"number",kf,"minimum"),(0>a||!isFinite(a))&&w.ja(a,">= 0",kf,"minimum"),this.Fj=a,this.Ya=this.Fb,null!==this.S&&this.S.V(),this.Yc("minimum",b,a))});w.defineProperty(kf,{Wf:"maximum"},function(){return this.Dj},function(a){var b=this.Dj;b!==a&&(u&&w.g(a,"number",kf,"maximum"),0>a&&w.ja(a,">= 0",kf,"maximum"),this.Dj=a,this.Ya=this.Fb,null!==this.S&&this.S.V(),this.Yc("maximum",b,a))});
- w.defineProperty(kf,{alignment:"alignment"},function(){return this.Be},function(a){var b=this.Be;b.N(a)||(u&&w.k(a,Q,kf,"alignment"),this.Be=a.da(),null!==this.S&&this.S.V(),this.Yc("alignment",b,a))});w.defineProperty(kf,{stretch:"stretch"},function(){return this.Wh},function(a){var b=this.Wh;b!==a&&(u&&w.Ea(a,V,kf,"stretch"),this.Wh=a,null!==this.S&&this.S.V(),this.Yc("stretch",b,a))});
- w.defineProperty(kf,{qF:"separatorPadding"},function(){return this.Nj},function(a){"number"===typeof a?a=new vb(a):null!==a&&u&&w.k(a,vb,kf,"separatorPadding");var b=this.Nj;null!==a&&null!==b&&b.N(a)||(null!==a&&(a=a.da()),this.Nj=a,null!==this.S&&this.S.V(),this.Yc("separatorPadding",b,a))});
- w.defineProperty(kf,{Bp:"separatorStroke"},function(){return this.as},function(a){var b=this.as;b!==a&&(null===a||"string"===typeof a||a instanceof oa)&&(a instanceof oa&&a.freeze(),this.as=a,null!==this.S&&this.S.V(),this.Yc("separatorStroke",b,a))});w.defineProperty(kf,{Cp:"separatorStrokeWidth"},function(){return this.bs},function(a){var b=this.bs;b!==a&&(this.bs=a,null!==this.S&&this.S.V(),this.Yc("separatorStrokeWidth",b,a))});
- w.defineProperty(kf,{UI:"separatorDashArray"},function(){return this.Sh},function(a){var b=this.Sh;if(b!==a){null===a||Array.isArray(a)||w.tc(a,"Array",kf,"separatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;e<c;e++){var g=a[e];"number"===typeof g&&0<=g&&isFinite(g)||w.l("separatorDashArray:value "+g+" must be a positive number or zero.");d+=g}if(0===d){if(null===b)return;a=null}}this.Sh=a;null!==this.S&&this.S.sa();this.Yc("separatorDashArray",b,a)}});
- w.defineProperty(kf,{background:"background"},function(){return this.Pb},function(a){var b=this.Pb;b!==a&&(null===a||"string"===typeof a||a instanceof oa)&&(a instanceof oa&&a.freeze(),this.Pb=a,null!==this.S&&this.S.sa(),this.Yc("background",b,a))});w.defineProperty(kf,{yz:"coversSeparators"},function(){return this.dq},function(a){var b=this.dq;b!==a&&(w.g(a,"boolean",kf,"coversSeparators"),this.dq=a,null!==this.S&&this.S.sa(),this.Yc("coversSeparators",b,a))});
- w.defineProperty(kf,{Mt:"sizing"},function(){return this.ds},function(a){var b=this.ds;b!==a&&(u&&w.Ea(a,kf,kf,"sizing"),this.ds=a,null!==this.S&&this.S.V(),this.Yc("sizing",b,a))});function Rm(a){if(a.Mt===dn){var b=a.eh;return a.le?b.QI:b.MG}return a.Mt}w.defineProperty(kf,{Ya:"actual"},function(){return this.Fb},function(a){this.Fb=isNaN(this.$e)?Math.max(Math.min(this.Dj,a),this.Fj):Math.max(Math.min(this.Dj,this.$e),this.Fj)});
- w.defineProperty(kf,{total:"total"},function(){return this.Fb+this.Ag()},function(a){this.Fb=isNaN(this.$e)?Math.max(Math.min(this.Dj,a),this.Fj):Math.max(Math.min(this.Dj,this.$e),this.Fj);this.Fb=Math.max(0,this.Fb-this.Ag())});w.defineProperty(kf,{position:"position"},function(){return this.Sa},function(a){this.Sa=a});
- kf.prototype.bind=kf.prototype.bind=function(a){a.ug=this;var b=this.S;null!==b&&(b=b.Vo(),null!==b&&Ul(b)&&w.l("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+a));null===this.Oc&&(this.Oc=new K(of));this.Oc.add(a)};
- function Y(){V.call(this);this.Xa=null;this.Pn="None";this.hh=!1;this.uq=jl;this.Ck=null;this.Ec=this.wd="black";this.qe=1;this.Ao="butt";this.Bo="miter";this.Bm=10;this.Am=null;this.ld=0;this.Gi=this.Fi=Pc;this.xr=this.wr=NaN;this.Cq=!1;this.Iq=!0;this.Ar=null;this.Sn=this.Co="None";this.zq=1}w.Pa(Y,V);w.la("Shape",Y);
- Y.prototype.cloneProtected=function(a){V.prototype.cloneProtected.call(this,a);a.Xa=this.Xa;a.Pn=this.Pn;a.hh=this.hh;a.uq=this.uq;a.Ck=this.Ck;a.wd=this.wd;a.Ec=this.Ec;a.qe=this.qe;a.Ao=this.Ao;a.Bo=this.Bo;a.Bm=this.Bm;a.Am=null;null!==this.Am&&(a.Am=w.il(this.Am));a.ld=this.ld;a.Fi=this.Fi.da();a.Gi=this.Gi.da();a.wr=this.wr;a.xr=this.xr;a.Cq=this.Cq;a.Iq=this.Iq;a.Ar=this.Ar;a.Co=this.Co;a.Sn=this.Sn;a.zq=this.zq};
- Y.prototype.toString=function(){return"Shape("+("None"!==this.Kb?this.Kb:"None"!==this.Hp?this.Hp:this.Gz)+")#"+w.ad(this)};
- function en(a,b,c,d){var e=.001,g=d.Ja,h=g.width,g=g.height,k=0,l=0,m=0,n=0,e=c.length;if(!(4>e)){for(var k=c[0],l=c[1],p=0,q=0,r=0,s=m=0,t=q=0,v=w.nb(),y=2;y<e;y+=2)m=c[y],n=c[y+1],p=m-k,q=n-l,0===p&&(p=.001),r=q/p,s=Math.atan2(q,p),q=Math.sqrt(p*p+q*q),k=[],k[0]=p,k[1]=s,k[2]=r,k[3]=q,v.push(k),t+=q,k=m,l=n;k=c[0];l=c[1];c=0;for(var e=h,n=h/2,y=0===n?!1:!0,q=0,m=v[q],p=m[0],s=m[1],r=m[2],m=m[3],B=0;.1<=t;){0===B&&(y?(e=h,c++,e-=n,t-=n,y=!1):(e=h,c++),0===e&&(e=1));if(e>t){w.xa(v);return}e>m?(B=
- e-m,e=m):B=0;var A=Math.sqrt(e*e/(1+r*r));0>p&&(A=-A);k+=A;l+=r*A;a.translate(k,l);a.rotate(s);a.translate(-(h/2),-(g/2));0===B&&d.ck(a,b);a.translate(h/2,g/2);a.rotate(-s);a.translate(-k,-l);t-=e;m-=e;if(0!==B){q++;if(q===v.length){w.xa(v);return}m=v[q];p=m[0];s=m[1];r=m[2];m=m[3];e=B}}w.xa(v)}}
- Y.prototype.ck=function(a,b){if(null!==this.Ec||null!==this.wd){null!==this.wd&&El(this,a,this.wd,!0,!1);null!==this.Ec&&El(this,a,this.Ec,!1,!1);var c=this.qe;if(0===c){var d=this.W;d instanceof da&&d.type===jh&&d.Bc instanceof Y&&(c=d.Bc.pb)}a.lineWidth=c;a.lineJoin=this.Bo;a.lineCap=this.Ao;a.miterLimit=this.Bm;var e=!1;this.W&&b.fh.drawShadows&&(e=this.W.gk);var g=!0;null!==this.Ec&&null===this.wd&&(g=!1);var d=!1,h=!0,k=this.FA;null!==k&&(d=!0,void 0!==a.setLineDash?(a.setLineDash(k),a.lineDashOffset=
- this.ld):void 0!==a.webkitLineDash?(a.webkitLineDash=k,a.webkitLineDashOffset=this.ld):void 0!==a.mozDash?(a.mozDash=k,a.mozDashOffset=this.ld):h=!1);var l=this.Xa;if(null!==l){if(l.ia===wd)a.beginPath(),d&&!h?ql(a,l.pc,l.vc,l.rb,l.Ab,k,this.ld):(a.moveTo(l.pc,l.vc),a.lineTo(l.rb,l.Ab)),null!==this.wd&&Fl(a,this.wd),0!==c&&null!==this.Ec&&Hl(a);else if(l.ia===xd){var m=l.pc,n=l.vc,p=l.rb,q=l.Ab,l=Math.min(m,p),r=Math.min(n,q),m=Math.abs(p-m),n=Math.abs(q-n);null!==this.wd&&(a.beginPath(),a.rect(l,
- r,m,n),Fl(a,this.wd));if(null!==this.Ec){var s=p=0,t=0;g&&e&&(p=a.shadowOffsetX,s=a.shadowOffsetY,t=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0);d&&!h?(h=w.nb(),h.push(l),h.push(r),h.push(l+m),h.push(r),h.push(l+m),h.push(r+n),h.push(l),h.push(r+n),h.push(l),h.push(r),a.beginPath(),fn(a,h,k,this.ld),Hl(a),w.xa(h)):0!==c&&(a.beginPath(),a.rect(l,r,m,n),Hl(a));g&&e&&(a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=t)}}else if(l.ia===yd)m=l.pc,n=l.vc,p=l.rb,q=l.Ab,l=Math.abs(p-m)/
- 2,r=Math.abs(q-n)/2,m=Math.min(m,p)+l,n=Math.min(n,q)+r,a.beginPath(),a.moveTo(m,n-r),a.bezierCurveTo(m+O.ya*l,n-r,m+l,n-O.ya*r,m+l,n),a.bezierCurveTo(m+l,n+O.ya*r,m+O.ya*l,n+r,m,n+r),a.bezierCurveTo(m-O.ya*l,n+r,m-l,n+O.ya*r,m-l,n),a.bezierCurveTo(m-l,n-O.ya*r,m-O.ya*l,n-r,m,n-r),a.closePath(),null!==this.wd&&Fl(a,this.wd),d&&!h&&(h=w.nb(),O.Ie(m,n-r,m+O.ya*l,n-r,m+l,n-O.ya*r,m+l,n,.5,h),O.Ie(m+l,n,m+l,n+O.ya*r,m+O.ya*l,n+r,m,n+r,.5,h),O.Ie(m,n+r,m-O.ya*l,n+r,m-l,n+O.ya*r,m-l,n,.5,h),O.Ie(m-l,n,
- m-l,n-O.ya*r,m-O.ya*l,n-r,m,n-r,.5,h),a.beginPath(),fn(a,h,k,this.ld),w.xa(h)),0!==c&&null!==this.Ec&&(t=s=p=0,g&&e&&(p=a.shadowOffsetX,s=a.shadowOffsetY,t=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0),Hl(a),g&&e&&(a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=t));else if(l.ia===td){r=l.pj;n=r.length;for(q=0;q<n;q++){m=r.p[q];a.beginPath();a.moveTo(m.Aa,m.Ba);for(var p=m.Oa.p,s=p.length,v=null,t=0;t<s;t++){var y=p[t];switch(y.ia){case Nd:a.moveTo(y.H,y.I);break;case Ad:a.lineTo(y.H,
- y.I);break;case Od:a.bezierCurveTo(y.kd,y.He,y.sg,y.tg,y.rb,y.Ab);break;case Pd:a.quadraticCurveTo(y.kd,y.He,y.rb,y.Ab);break;case Qd:if(y.radiusX===y.radiusY)v=Math.PI/180,a.arc(y.kd,y.He,y.radiusX,y.Se*v,(y.Se+y.cg)*v,0>y.cg);else{var v=ce(y,m),B=v.length;if(0===B){a.lineTo(y.ra,y.Da);break}for(var A=0;A<B;A++){var E=v[A];0===A&&a.lineTo(E[0],E[1]);a.bezierCurveTo(E[2],E[3],E[4],E[5],E[6],E[7])}}break;case be:A=B=0;if(null!==v&&v.type===Qd){v=ce(v,m);E=v.length;if(0===E){a.lineTo(y.ra,y.Da);break}v=
- v[E-1]||null;null!==v&&(B=v[6],A=v[7])}else B=null!==v?v.H:m.Aa,A=null!==v?v.I:m.Ba;v=de(y,m,B,A);B=v.length;if(0===B){a.lineTo(y.ra,y.Da);break}for(A=0;A<B;A++)E=v[A],a.bezierCurveTo(E[2],E[3],E[4],E[5],E[6],E[7]);break;default:w.l("Segment not of valid type")}y.Nh&&a.closePath();v=y}e?(t=s=p=0,m.ao?(!0===m.bm&&null!==this.wd?(Fl(a,this.wd),g=!0):g=!1,0!==c&&null!==this.Ec&&(g&&(p=a.shadowOffsetX,s=a.shadowOffsetY,t=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0),d&&!h||Hl(a),g&&
- (a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=t))):(g&&(p=a.shadowOffsetX,s=a.shadowOffsetY,t=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0),!0===m.bm&&null!==this.wd&&Fl(a,this.wd),0!==c&&null!==this.Ec&&(d&&!h||Hl(a)),g&&(a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=t))):(!0===m.bm&&null!==this.wd&&Fl(a,this.wd),0===c||null===this.Ec||d&&!h||Hl(a))}if(d&&!h)for(c=g,g=l.pj,h=g.length,l=0;l<h;l++){r=g.p[l];a.beginPath();n=w.nb();n.push(r.Aa);n.push(r.Ba);q=r.Aa;m=r.Ba;p=
- q;s=m;t=r.Oa.p;y=t.length;for(v=0;v<y;v++){B=t[v];switch(B.ia){case Nd:fn(a,n,k,this.ld);n.length=0;n.push(B.H);n.push(B.I);q=B.H;m=B.I;p=q;s=m;break;case Ad:n.push(B.H);n.push(B.I);q=B.H;m=B.I;break;case Od:O.Ie(q,m,B.kd,B.He,B.sg,B.tg,B.rb,B.Ab,.5,n);q=B.H;m=B.I;break;case Pd:O.tp(q,m,B.kd,B.He,B.rb,B.Ab,.5,n);q=B.H;m=B.I;break;case Qd:A=ce(B,r);E=A.length;if(0===E){n.push(B.ra);n.push(B.Da);q=B.ra;m=B.Da;break}for(var N=0;N<E;N++){var J=A[N];O.Ie(q,m,J[2],J[3],J[4],J[5],J[6],J[7],.5,n);q=J[6];
- m=J[7]}break;case be:A=de(B,r,q,m);E=A.length;if(0===E){n.push(B.ra);n.push(B.Da);q=B.ra;m=B.Da;break}for(N=0;N<E;N++)J=A[N],O.Ie(q,m,J[2],J[3],J[4],J[5],J[6],J[7],.5,n),q=J[6],m=J[7];break;default:w.l("Segment not of valid type")}B.Nh&&(n.push(p),n.push(s),fn(a,n,k,this.ld))}fn(a,n,k,this.ld);w.xa(n);null!==this.Ec&&(q=n=r=0,c&&e&&(r=a.shadowOffsetX,n=a.shadowOffsetY,q=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0),Hl(a),c&&e&&(a.shadowOffsetX=r,a.shadowOffsetY=n,a.shadowBlur=q))}}d&&
- (void 0!==a.setLineDash?(a.setLineDash(w.Ah),a.lineDashOffset=0):void 0!==a.webkitLineDash?(a.webkitLineDash=w.Ah,a.webkitLineDashOffset=0):void 0!==a.mozDash&&(a.mozDash=null,a.mozDashOffset=0));if(null!==this.OE){d=this.OE;Yh(d,Infinity,Infinity);k=d.Ja;d.Fc(0,0,k.width,k.height);a.save();k=this.od.Bb.first();a.beginPath();c=w.nb();c.push(k.Aa);c.push(k.Ba);e=k.Aa;g=k.Ba;h=e;l=g;r=k.Oa.p;n=r.length;for(q=0;q<n;q++){m=r[q];switch(m.ia){case Nd:en(a,b,c,d);c.length=0;c.push(m.H);c.push(m.I);e=m.H;
- g=m.I;h=e;l=g;break;case Ad:c.push(m.H);c.push(m.I);e=m.H;g=m.I;break;case Od:O.Ie(e,g,m.kd,m.He,m.sg,m.tg,m.rb,m.Ab,.5,c);e=m.H;g=m.I;break;case Pd:O.tp(e,g,m.kd,m.He,m.rb,m.Ab,.5,c);e=m.H;g=m.I;break;case Qd:p=ce(m,k);s=p.length;if(0===s){c.push(m.ra);c.push(m.Da);e=m.ra;g=m.Da;break}for(t=0;t<s;t++)y=p[t],O.Ie(e,g,y[2],y[3],y[4],y[5],y[6],y[7],.5,c),e=y[6],g=y[7];break;case be:p=de(m,k,e,g);s=p.length;if(0===s){c.push(m.ra);c.push(m.Da);e=m.ra;g=m.Da;break}for(t=0;t<s;t++)y=p[t],O.Ie(e,g,y[2],
- y[3],y[4],y[5],y[6],y[7],.5,c),e=y[6],g=y[7];break;default:w.l("Segment not of valid type")}m.Nh&&(c.push(h),c.push(l),en(a,b,c,d))}en(a,b,c,d);w.xa(c);a.restore()}}}};
- function fn(a,b,c,d){var e=.001,g=c.length,h=0,k=0,l=0,m=0,e=b.length;if(!(4>e))if(h=b[0],k=b[1],4===e)ql(a,h,k,b[2],b[3],c,d);else{a.moveTo(h,k);for(var n=0,p=0,q=0,r=p=l=0,s=w.nb(),t=2;t<e;t+=2)l=b[t],m=b[t+1],n=l-h,p=m-k,0===n&&(n=.001),q=p/n,p=Math.sqrt(n*n+p*p),h=[],h[0]=n,h[1]=q,h[2]=p,s.push(h),r+=p,h=l,k=m;h=b[0];k=b[1];b=0;for(var m=!0,e=c[b%g],t=0!==d,p=0,l=s[p],n=l[0],q=l[1],l=l[2],v=0;.1<=r;){0===v&&(e=c[b%g],b++,t&&(d%=e,e-=d,t=!1));e>r&&(e=r);e>l?(v=e-l,e=l):v=0;var y=Math.sqrt(e*e/
- (1+q*q));0>n&&(y=-y);h+=y;k+=q*y;m?a.lineTo(h,k):a.moveTo(h,k);r-=e;l-=e;if(0!==v){p++;if(p===s.length){w.xa(s);return}l=s[p];n=l[0];q=l[1];l=l[2];e=v}else m=!m}w.xa(s)}}Y.prototype.getDocumentPoint=Y.prototype.vb=function(a,b){void 0===b&&(b=new I);a.we()&&w.l("getDocumentPoint:s Spot must be real: "+a.toString());var c=this.Ha,d=this.pb;b.n(a.x*(c.width+d)-d/2+c.x+a.offsetX,a.y*(c.height+d)-d/2+c.y+a.offsetY);this.Of.ib(b);return b};
- Y.prototype.$j=function(a,b){var c=this.Xa;if(null===c||null===this.fill&&null===this.stroke)return!1;var d=c.ub,e=this.pb/2;c.type!==wd||b||(e+=2);var g=w.eg();g.assign(d);g.Tf(e+2,e+2);if(!g.Ka(a))return w.qc(g),!1;d=e+1E-4;if(c.type===wd){if(null===this.stroke)return!1;d=(c.H-c.Aa)*(a.x-c.Aa)+(c.I-c.Ba)*(a.y-c.Ba);if(0>(c.Aa-c.H)*(a.x-c.H)+(c.Ba-c.I)*(a.y-c.I)||0>d)return!1;w.qc(g);return O.Dd(c.Aa,c.Ba,c.H,c.I,e,a.x,a.y)}if(c.type===xd){var h=c.Aa,k=c.Ba,l=c.H,m=c.I,c=Math.min(h,l),n=Math.min(k,
- m),h=Math.abs(l-h),k=Math.abs(m-k);g.x=c;g.y=n;g.width=h;g.height=k;if(null===this.fill){g.Tf(-d,-d);if(g.Ka(a))return w.qc(g),!1;g.Tf(d,d)}null!==this.stroke&&g.Tf(e,e);e=g.Ka(a);w.qc(g);return e}if(c.type===yd){h=c.Aa;k=c.Ba;l=c.H;m=c.I;c=Math.min(h,l);n=Math.min(k,m);h=Math.abs(l-h);k=Math.abs(m-k);h/=2;k/=2;c=a.x-(c+h);n=a.y-(n+k);if(null===this.fill){h-=d;k-=d;if(0>=h||0>=k||1>=c*c/(h*h)+n*n/(k*k))return w.qc(g),!1;h+=d;k+=d}null!==this.stroke&&(h+=e,k+=e);w.qc(g);return 0>=h||0>=k?!1:1>=c*c/
- (h*h)+n*n/(k*k)}if(c.type===td)return w.qc(g),null===this.fill?ge(c,a.x,a.y,e):c.Ka(a,e,1<this.pb,b);w.l("Unknown Geometry type");return!1};
- Y.prototype.kp=function(a,b,c,d){var e=this.Ca,g=this.qe;a=Math.max(a,0);b=Math.max(b,0);var h;if(this.hh)h=this.Xa.ub;else{var k=this.Kb,l=O.xx[k];if(void 0===l){var m=O.Eg[k];"string"===typeof m&&(m=O.Eg[m]);"function"===typeof m?(l=m(null,100,100),O.xx[k]=l):w.l("Unsupported Figure:"+k)}h=l.ub}var k=h.width,l=h.height,m=h.width,n=h.height;switch(vl(this,!0)){case zh:d=c=0;break;case vd:m=Math.max(a-g,0);n=Math.max(b-g,0);break;case ll:m=Math.max(a-g,0);d=0;break;case kl:c=0,n=Math.max(b-g,0)}isFinite(e.width)&&
- (m=e.width);isFinite(e.height)&&(n=e.height);e=this.xe;h=this.Df;c=Math.max(c,h.width)-g;d=Math.max(d,h.height)-g;m=Math.min(e.width,m);n=Math.min(e.height,n);m=isFinite(m)?Math.max(c,m):Math.max(k,c);n=isFinite(n)?Math.max(d,n):Math.max(l,d);c=Ah(this);switch(c){case zh:break;case vd:k=m;l=n;break;case Bh:c=Math.min(m/k,n/l);isFinite(c)||(c=1);k*=c;l*=c;break;default:w.l(c+" is not a valid geometryStretch.")}if(this.hh)h=this.od,e=k,d=l,c=h.copy(),h=h.ub,e/=h.width,d/=h.height,isFinite(e)||(e=1),
- isFinite(d)||(d=1),1===e&&1===d||c.scale(e,d),this.Xa=c;else if(null===this.Xa||this.Xa.$n!==a-g||this.Xa.Zn!==b-g)this.Xa=O.makeGeometry(this,k,l);h=this.Xa.ub;Infinity===a||Infinity===b?sl(this,h.x-g/2,h.y-g/2,0===a&&0===k?0:h.width+g,0===b&&0===l?0:h.height+g):sl(this,-(g/2),-(g/2),m+g,n+g)};
- function Tm(a,b,c){if(!1!==Hj(a)){a.Xc.Ta();var d=a.qe;if(0===d){var e=a.W;e instanceof da&&e.type===jh&&e.Bc instanceof Y&&(d=e.Bc.pb)}d*=a.$b;sl(a,-(d/2),-(d/2),b+d,c+d);b=a.Xc;c=a.xe;d=a.Df;b.width=Math.min(c.width,b.width);b.height=Math.min(c.height,b.height);b.width=Math.max(d.width,b.width);b.height=Math.max(d.height,b.height);a.Xc.freeze();a.Xc.J()||w.l("Non-real measuredBounds has been set. Object "+a+", measuredBounds: "+a.Xc.toString());Bj(a,!1)}}
- function Ah(a){var b=a.fE;return a.hh?b===jl?vd:b:b===jl?O.xx[a.Kb].Qd:b}Y.prototype.Mi=function(a,b,c,d){wl(this,a,b,c,d)};Y.prototype.getNearestIntersectionPoint=Y.prototype.wl=function(a,b,c){return this.Yo(a.x,a.y,b.x,b.y,c)};
- Y.prototype.Yo=function(a,b,c,d,e){var g=this.transform,h=1/(g.m11*g.m22-g.m12*g.m21),k=g.m22*h,l=-g.m12*h,m=-g.m21*h,n=g.m11*h,p=h*(g.m21*g.dy-g.m22*g.dx),q=h*(g.m12*g.dx-g.m11*g.dy),g=a*k+b*m+p,h=a*l+b*n+q,k=c*k+d*m+p,l=c*l+d*n+q,m=this.pb/2,p=this.Xa;null===p&&(Yh(this,Infinity,Infinity),p=this.Xa);q=p.ub;n=!1;if(p.type===wd)if(1.5>=this.pb)n=O.qh(p.pc,p.vc,p.rb,p.Ab,g,h,k,l,e);else{var r=0,s=0;p.pc===p.rb?(r=m,s=0):(b=(p.Ab-p.vc)/(p.rb-p.pc),s=m/Math.sqrt(1+b*b),r=s*b);d=w.nb();b=new I;O.qh(p.pc+
- r,p.vc+s,p.rb+r,p.Ab+s,g,h,k,l,b)&&d.push(b);b=new I;O.qh(p.pc-r,p.vc-s,p.rb-r,p.Ab-s,g,h,k,l,b)&&d.push(b);b=new I;O.qh(p.pc+r,p.vc+s,p.pc-r,p.vc-s,g,h,k,l,b)&&d.push(b);b=new I;O.qh(p.rb+r,p.Ab+s,p.rb-r,p.Ab-s,g,h,k,l,b)&&d.push(b);b=d.length;if(0===b)return w.xa(d),!1;n=!0;s=Infinity;for(r=0;r<b;r++){var k=d[r],t=(k.x-g)*(k.x-g)+(k.y-h)*(k.y-h);t<s&&(s=t,e.x=k.x,e.y=k.y)}w.xa(d)}else if(p.type===xd)b=q.x-m,n=O.wl(b,q.y-m,q.x+q.width+m,q.y+q.height+m,g,h,k,l,e);else if(p.type===yd)a:if(b=q.copy().Tf(m,
- m),0===b.width)n=O.qh(b.x,b.y,b.x,b.y+b.height,g,h,k,l,e);else if(0===b.height)n=O.qh(b.x,b.y,b.x+b.width,b.y,g,h,k,l,e);else{a=b.width/2;var v=b.height/2;d=b.x+a;b=b.y+v;c=9999;g!==k&&(c=(h-l)/(g-k));if(9999>Math.abs(c)){n=h-b-c*(g-d);if(0>a*a*c*c+v*v-n*n){e.x=NaN;e.y=NaN;n=!1;break a}m=Math.sqrt(a*a*c*c+v*v-n*n);k=(-(a*a*c*n)+a*v*m)/(v*v+a*a*c*c)+d;a=(-(a*a*c*n)-a*v*m)/(v*v+a*a*c*c)+d;l=c*(k-d)+n+b;b=c*(a-d)+n+b;d=Math.abs((g-k)*(g-k))+Math.abs((h-l)*(h-l));h=Math.abs((g-a)*(g-a))+Math.abs((h-b)*
- (h-b));d<h?(e.x=k,e.y=l):(e.x=a,e.y=b)}else{k=v*v;l=g-d;k-=k/(a*a)*l*l;if(0>k){e.x=NaN;e.y=NaN;n=!1;break a}m=Math.sqrt(k);l=b+m;b-=m;d=Math.abs(l-h);h=Math.abs(b-h);d<h?(e.x=g,e.y=l):(e.x=g,e.y=b)}n=!0}else if(p.type===td){var y=0,B=0,A=t=0,q=w.O(),r=k-g,s=l-h,s=r*r+s*s;e.x=k;e.y=l;for(r=0;r<p.Bb.count;r++)for(var E=p.Bb.p[r],N=E.Oa,y=E.Aa,B=E.Ba,J=y,W=B,ea=0;ea<N.count;ea++){var T=N.p[ea],P=T.type,t=T.H,A=T.I,aa=!1;switch(P){case Nd:J=t;W=A;break;case Ad:aa=gn(y,B,t,A,g,h,k,l,q);break;case Od:var aa=
- T.Xb,P=T.rc,La=T.of,Aa=T.pf,aa=O.Ds(y,B,aa,P,La,Aa,t,A,g,h,k,l,.5,q);break;case Pd:aa=(y+2*T.Xb)/3;P=(B+2*T.rc)/3;La=(2*T.Xb+t)/3;Aa=(2*T.Xb+t)/3;aa=O.Ds(y,B,aa,P,La,Aa,t,A,g,h,k,l,.5,q);break;case Qd:case be:P=T.type===Qd?ce(T,E):de(T,E,y,B);La=P.length;if(0===La){aa=gn(y,B,T.ra,T.Da,g,h,k,l,q);break}for(A=0;A<La;A++)v=P[A],0===A&&gn(y,B,v[0],v[1],g,h,k,l,q)&&(t=hn(g,h,q,s,e),t<s&&(s=t,n=!0)),O.Ds(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7],g,h,k,l,.5,q)&&(t=hn(g,h,q,s,e),t<s&&(s=t,n=!0));t=v[6];A=v[7];
- break;default:w.l("Unknown Segment type: "+T.type)}y=t;B=A;aa&&(t=hn(g,h,q,s,e),t<s&&(s=t,n=!0));T.Cw&&(t=J,A=W,gn(y,B,t,A,g,h,k,l,q)&&(t=hn(g,h,q,s,e),t<s&&(s=t,n=!0)))}g=c-a;h=d-b;b=Math.sqrt(g*g+h*h);0!==b&&(g/=b,h/=b);e.x-=g*m;e.y-=h*m;w.A(q)}else w.l("Invalid Geometry type");if(!n)return!1;this.transform.ib(e);return!0};function hn(a,b,c,d,e){a=c.x-a;b=c.y-b;b=a*a+b*b;return b<d?(e.x=c.x,e.y=c.y,b):d}
- function gn(a,b,c,d,e,g,h,k,l){var m=!1,n=(e-h)*(b-d)-(g-k)*(a-c);if(0===n)return!1;l.x=((e*k-g*h)*(a-c)-(e-h)*(a*d-b*c))/n;l.y=((e*k-g*h)*(b-d)-(g-k)*(a*d-b*c))/n;(a>c?a-c:c-a)<(b>d?b-d:d-b)?(e=b<d?b:d,a=b<d?d:b,(l.y>e||O.wb(l.y,e))&&(l.y<a||O.wb(l.y,a))&&(m=!0)):(e=a<c?a:c,a=a<c?c:a,(l.x>e||O.wb(l.x,e))&&(l.x<a||O.wb(l.x,a))&&(m=!0));return m}
- Y.prototype.containedInRect=Y.prototype.Om=function(a,b){if(void 0===b)return a.ak(this.ca);var c=this.Xa;null===c&&(Yh(this,Infinity,Infinity),c=this.Xa);var c=c.ub,d=this.pb/2,e=!1,g=w.O();g.n(c.x-d,c.y-d);a.Ka(b.ib(g))&&(g.n(c.x-d,c.bottom+d),a.Ka(b.ib(g))&&(g.n(c.right+d,c.bottom+d),a.Ka(b.ib(g))&&(g.n(c.right+d,c.y-d),a.Ka(b.ib(g))&&(e=!0))));w.A(g);return e};
- Y.prototype.intersectsRect=Y.prototype.Gg=function(a,b){if(this.Om(a,b)||void 0===b&&(b=this.transform,a.ak(this.ca)))return!0;var c=w.zh();c.set(b);c.Pz();var d=a.left,e=a.right,g=a.top,h=a.bottom,k=w.O();k.n(d,g);c.ib(k);if(this.$j(k,!0))return w.A(k),!0;k.n(e,g);c.ib(k);if(this.$j(k,!0))return w.A(k),!0;k.n(d,h);c.ib(k);if(this.$j(k,!0))return w.A(k),!0;k.n(e,h);c.ib(k);if(this.$j(k,!0))return w.A(k),!0;var l=w.O(),m=w.O();c.set(b);c.fA(this.transform);c.Pz();l.x=e;l.y=g;l.transform(c);k.x=d;k.y=
- g;k.transform(c);var n=!1;jn(this,k,l,m)?n=!0:(k.x=e,k.y=h,k.transform(c),jn(this,k,l,m)?n=!0:(l.x=d,l.y=h,l.transform(c),jn(this,k,l,m)?n=!0:(k.x=d,k.y=g,k.transform(c),jn(this,k,l,m)&&(n=!0))));w.A(k);w.gf(c);w.A(l);w.A(m);return n};function jn(a,b,c,d){if(!a.wl(b,c,d))return!1;a=b.x;b=b.y;var e=c.x;c=c.y;var g=d.x;d=d.y;if(a===e){var h=0;a=0;b<c?(h=b,a=c):(h=c,a=b);return d>=h&&d<=a}a<e?(h=a,a=e):h=e;return g>=h&&g<=a}
- Y.prototype.$D=function(a,b,c){function d(a,b){for(var c=a.length,d=0;d<c;d+=2)if(b.Ro(a[d],a[d+1])>e)return!0;return!1}if(c&&null!==this.fill&&this.$j(a,!0))return!0;var e=a.bk(b);b=e;1.5<this.pb&&(e=this.pb/2+Math.sqrt(e),e*=e);var g=this.Xa;null===g&&(Yh(this,Infinity,Infinity),g=this.Xa);if(!c){var h=g.ub,k=h.x,l=h.y,m=h.x+h.width,h=h.y+h.height;if(mb(a.x,a.y,k,l)<=e&&mb(a.x,a.y,m,l)<=e&&mb(a.x,a.y,k,h)<=e&&mb(a.x,a.y,m,h)<=e)return!0}k=g.pc;l=g.vc;m=g.rb;h=g.Ab;if(g.type===wd){if(c=lb(a.x,a.y,
- k,l,m,h),g=(k-m)*(a.x-m)+(l-h)*(a.y-h),c<=(0<=(m-k)*(a.x-k)+(h-l)*(a.y-l)&&0<=g?e:b))return!0}else{if(g.type===xd)return b=!1,c&&(b=lb(a.x,a.y,k,l,k,h)<=e||lb(a.x,a.y,k,l,m,l)<=e||lb(a.x,a.y,m,l,m,h)<=e||lb(a.x,a.y,k,h,m,h)<=e),b;if(g.type===yd){b=a.x-(k+m)/2;var g=a.y-(l+h)/2,n=Math.abs(m-k)/2,p=Math.abs(h-l)/2;if(0===n||0===p)return c=lb(a.x,a.y,k,l,m,h),c<=e?!0:!1;if(c){if(a=O.dH(n,p,b,g),a*a<=e)return!0}else return mb(b,g,-n,0)>=e||mb(b,g,0,-p)>=e||mb(b,g,0,p)>=e||mb(b,g,n,0)>=e?!1:!0}else if(g.type===
- td){h=g.ub;k=h.x;l=h.y;m=h.x+h.width;h=h.y+h.height;if(a.x>m&&a.x<k&&a.y>h&&a.y<l&&lb(a.x,a.y,k,l,k,h)>e&&lb(a.x,a.y,k,l,m,l)>e&&lb(a.x,a.y,m,h,k,h)>e&&lb(a.x,a.y,m,h,m,l)>e)return!1;b=Math.sqrt(e);if(c){if(null===this.fill?ge(g,a.x,a.y,b):g.Ka(a,b,!0))return!0}else{c=g.Bb;for(b=0;b<c.count;b++){k=c.p[b];n=k.Aa;p=k.Ba;if(a.Ro(n,p)>e)return!1;l=k.Oa.p;m=l.length;for(h=0;h<m;h++){var q=l[h];switch(q.type){case Nd:case Ad:n=q.H;p=q.I;if(a.Ro(n,p)>e)return!1;break;case Od:g=w.nb();O.Ie(n,p,q.Xb,q.rc,
- q.of,q.pf,q.H,q.I,.8,g);n=d(g,a);w.xa(g);if(n)return!1;n=q.H;p=q.I;if(a.Ro(n,p)>e)return!1;break;case Pd:g=w.nb();O.tp(n,p,q.Xb,q.rc,q.H,q.I,.8,g);n=d(g,a);w.xa(g);if(n)return!1;n=q.H;p=q.I;if(a.Ro(n,p)>e)return!1;break;case Qd:case be:var r=q.type===Qd?ce(q,k):de(q,k,n,p),s=r.length;if(0===s){n=q.ra;p=q.Da;if(a.Ro(n,p)>e)return!1;break}q=null;g=w.nb();for(b=0;b<s;b++)if(q=r[b],g.length=0,O.Ie(q[0],q[1],q[2],q[3],q[4],q[5],q[6],q[7],.8,g),d(g,a))return w.xa(g),!1;w.xa(g);null!==q&&(n=q[6],p=q[7]);
- break;default:w.l("Unknown Segment type: "+q.type)}}}return!0}}}return!1};w.defineProperty(Y,{od:"geometry"},function(){return this.Ck?this.Ck:this.Xa},function(a){var b=this.Xa;if(b!==a){null!==a?(u&&w.k(a,sd,Y,"geometry"),this.Ck=this.Xa=a.freeze()):this.Ck=this.Xa=null;var c=this.W;null!==c&&(c.Bj=NaN);this.hh=!0;this.V();this.i("geometry",b,a);a=this.W;null!==a&&0!==(this.ka&1024)&&rl(this,a,"geometryString")}});
- w.defineProperty(Y,{xH:"geometryString"},function(){return null===this.od?"":this.od.toString()},function(a){var b=Dd(a);a=b.normalize();this.od=b;var b=w.O(),c=this.position;c.J()?b.n(c.x-a.x,c.y-a.y):b.n(-a.x,-a.y);this.position=b;w.A(b)});w.defineProperty(Y,{Rz:"isGeometryPositioned"},function(){return this.Cq},function(a){u&&w.g(a,"boolean",Y,"isGeometryPositioned");var b=this.Cq;b!==a&&(this.Cq=a,this.V(),this.i("isGeometryPositioned",b,a))});
- Y.prototype.ue=function(){this.hh?this.Ck=null:this.Xa=null;this.V()};w.defineProperty(Y,{fill:"fill"},function(){return this.wd},function(a){var b=this.wd;b!==a&&(u&&null!==a&&w.Gs(a,"Shape.fill"),a instanceof oa&&a.freeze(),this.wd=a,this.sa(),this.i("fill",b,a))});w.defineProperty(Y,{stroke:"stroke"},function(){return this.Ec},function(a){var b=this.Ec;b!==a&&(u&&null!==a&&w.Gs(a,"Shape.stroke"),a instanceof oa&&a.freeze(),this.Ec=a,this.sa(),this.i("stroke",b,a))});
- w.defineProperty(Y,{pb:"strokeWidth"},function(){return this.qe},function(a){var b=this.qe;if(b!==a)if(u&&w.o(a,Y,"strokeWidth"),0<=a){this.qe=a;this.V();var c=this.W;null!==c&&(c.Bj=NaN);this.i("strokeWidth",b,a)}else w.ja(a,"value >= 0",Y,"strokeWidth:value")});
- w.defineProperty(Y,{dJ:"strokeCap"},function(){return this.Ao},function(a){var b=this.Ao;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?w.ja(a,'"butt", "round", or "square"',Y,"strokeCap"):(this.Ao=a,this.sa(),this.i("strokeCap",b,a)))});
- w.defineProperty(Y,{nL:"strokeJoin"},function(){return this.Bo},function(a){var b=this.Bo;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?w.ja(a,'"miter", "bevel", or "round"',Y,"strokeJoin"):(this.Bo=a,this.sa(),this.i("strokeJoin",b,a)))});
- w.defineProperty(Y,{oL:"strokeMiterLimit"},function(){return this.Bm},function(a){var b=this.Bm;if(b!==a)if(u&&w.o(a,Y,"strokeMiterLimit"),0<a){this.Bm=a;this.sa();var c=this.W;null!==c&&(c.Bj=NaN);this.i("strokeMiterLimit",b,a)}else w.ja(a,"value > 0",Y,"strokeWidth:value")});
- w.defineProperty(Y,{FA:"strokeDashArray"},function(){return this.Am},function(a){var b=this.Am;if(b!==a){null===a||Array.isArray(a)||w.tc(a,"Array",Y,"strokeDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;e<c;e++){var g=a[e];"number"===typeof g&&0<=g&&isFinite(g)||w.l("strokeDashArray:value "+g+" must be a positive number or zero.");d+=g}if(0===d){if(null===b)return;a=null}}this.Am=a;this.sa();this.i("strokeDashArray",b,a)}});
- w.defineProperty(Y,{eJ:"strokeDashOffset"},function(){return this.ld},function(a){var b=this.ld;b!==a&&(u&&w.o(a,Y,"strokeDashOffset"),0<=a&&(this.ld=a,this.sa(),this.i("strokeDashOffset",b,a)))});
- w.defineProperty(Y,{Kb:"figure"},function(){return this.Pn},function(a){var b=this.Pn;if(b!==a){u&&w.g(a,"string",Y,"figure");var c=O.Eg[a];"function"===typeof c?c=a:(c=O.Eg[a.toLowerCase()])||w.l("Unknown Shape.figure: "+a);b!==c&&(a=this.W,null!==a&&(a.Bj=NaN),this.Pn=c,this.hh=!1,this.ue(),this.i("figure",b,c))}});
- w.defineProperty(Y,{Hp:"toArrow"},function(){return this.Co},function(a){var b=this.Co;!0===a?a="Standard":!1===a&&(a="");if(b!==a){u&&w.g(a,"string",Y,"toArrow");var c=O.uD(a);null===c?w.l("Unknown Shape.toArrow: "+a):b!==c&&(this.Co=c,this.hh=!1,this.ue(),kn(this),this.i("toArrow",b,c))}});
- w.defineProperty(Y,{Gz:"fromArrow"},function(){return this.Sn},function(a){var b=this.Sn;!0===a?a="Standard":!1===a&&(a="");if(b!==a){u&&w.g(a,"string",Y,"fromArrow");var c=O.uD(a);null===c?w.l("Unknown Shape.fromArrow: "+a):b!==c&&(this.Sn=c,this.hh=!1,this.ue(),kn(this),this.i("fromArrow",b,c))}});function kn(a){var b=a.h;null!==b&&b.na.lb||(a.bx=ln,"None"!==a.Co?(a.bg=-1,a.Yj=Xc):"None"!==a.Sn&&(a.bg=0,a.Yj=new Q(1-Xc.x,Xc.y)))}
- w.defineProperty(Y,{C:"spot1"},function(){return this.Fi},function(a){w.k(a,Q,Y,"spot1");var b=this.Fi;b.N(a)||(this.Fi=a=a.da(),this.V(),this.i("spot1",b,a))});w.defineProperty(Y,{D:"spot2"},function(){return this.Gi},function(a){w.k(a,Q,Y,"spot2");var b=this.Gi;b.N(a)||(this.Gi=a=a.da(),this.V(),this.i("spot2",b,a))});w.defineProperty(Y,{Dc:"parameter1"},function(){return this.wr},function(a){var b=this.wr;b!==a&&(this.wr=a,this.ue(),this.i("parameter1",b,a))});
- w.defineProperty(Y,{yt:"parameter2"},function(){return this.xr},function(a){var b=this.xr;b!==a&&(this.xr=a,this.ue(),this.i("parameter2",b,a))});w.w(Y,{Ha:"naturalBounds"},function(){if(null!==this.Xa)return this.Pc.assign(this.Xa.ub),this.Pc;var a=this.Ca;return new x(0,0,a.width,a.height)});w.defineProperty(Y,{vK:"isRectangular"},function(){return this.Iq},function(a){var b=this.Iq;b!==a&&(u&&w.g(a,"boolean",Y,"isRectangular"),this.Iq=a,this.V(),this.i("isRectangular",b,a))});
- w.defineProperty(Y,{OE:"pathObject"},function(){return this.Ar},function(a){var b=this.Ar;b!==a&&(u&&w.k(a,V,Y,"pathObject"),this.Ar=a,this.sa(),this.i("pathObject",b,a))});w.defineProperty(Y,{fE:"geometryStretch"},function(){return this.uq},function(a){var b=this.uq;b!==a&&(w.Ea(a,V,Y,"geometryStretch"),this.uq=a,this.i("geometryStretch",b,a))});
- w.defineProperty(Y,{interval:"interval"},function(){return this.zq},function(a){var b=this.zq;u&&w.o(a,Y,"interval");a=Math.floor(a);b!==a&&0<=a&&(this.zq=a,null!==this.h&&Cj(this.h),this.V(),this.i("interval",b,a))});Y.getFigureGenerators=function(){var a=new ta("string","function"),b;for(b in O.Eg)if(b!==b.toLowerCase()){var c=O.Eg[b];"function"===typeof c&&a.add(b,c)}a.freeze();return a};
- Y.defineFigureGenerator=function(a,b){w.g(a,"string",Y,"defineFigureGenerator:name");"string"===typeof b?""!==b&&O.Eg[b]||w.l("Shape.defineFigureGenerator synonym must not be empty or None or not a defined figure name: "+b):w.g(b,"function",Y,"defineFigureGenerator:func");var c=a.toLowerCase();""!==a&&"none"!==c&&a!==c||w.l("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);var d=O.Eg;d[a]=b;d[c]=a};
- Y.getArrowheadGeometries=function(){var a=new ta("string",sd),b;for(b in O.gj)if(b!==b.toLowerCase()){var c=O.gj[b];c instanceof sd&&a.add(b,c)}a.freeze();return a};
- Y.defineArrowheadGeometry=function(a,b){w.g(a,"string",Y,"defineArrowheadGeometry:name");var c=null;"string"===typeof b?(w.g(b,"string",Y,"defineArrowheadGeometry:pathstr"),c=Dd(b,!1)):(w.k(b,sd,Y,"defineArrowheadGeometry:pathstr"),c=b);var d=a.toLowerCase();""!==a&&"none"!==d&&a!==d||w.l("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var e=O.gj;e[a]=c;e[d]=a};
- function ya(){V.call(this);this.re="";this.Ec="black";this.Vg="13px sans-serif";this.be="start";this.Fq=!0;this.dm=this.em=!1;this.Xk=mn;this.Gm=nn;this.cv=this.Ee=0;this.Rn=this.Ey=this.Fy=null;this.vj=new on;this.oq=!1;this.tf=this.$k=this.ls=null;this.Qj=this.Pj=0;this.wi=Infinity;this.Xu=0}w.Pa(ya,V);w.la("TextBlock",ya);var pn=new xa,qn=0,rn=new xa,sn=0,tn="...",un="",vn=w.createElement("canvas").getContext("2d");ya.getEllipsis=function(){return tn};
- ya.setEllipsis=function(a){tn=a;rn=new xa;sn=0};ya.prototype.cloneProtected=function(a){V.prototype.cloneProtected.call(this,a);a.re=this.re;a.Ec=this.Ec;a.Vg=this.Vg;a.be=this.be;a.Fq=this.Fq;a.em=this.em;a.dm=this.dm;a.Gm=this.Gm;a.Xk=this.Xk;a.Ee=this.Ee;a.cv=this.cv;a.Fy=this.Fy;a.Ey=this.Ey;a.Rn=this.Rn;a.vj.Ms(this.vj);a.oq=this.oq;a.ls=this.ls;a.$k=this.$k;a.tf=this.tf;a.Pj=this.Pj;a.Qj=this.Qj;a.wi=this.wi;a.Xu=this.Xu};
- ya.prototype.toString=function(){return 22<this.re.length?'TextBlock("'+this.re.substring(0,20)+'"...)':'TextBlock("'+this.re+'")'};var wn;ya.None=wn=w.v(ya,"None",0);var xn;ya.WrapFit=xn=w.v(ya,"WrapFit",1);var nn;ya.WrapDesiredSize=nn=w.v(ya,"WrapDesiredSize",2);var mn;ya.OverflowClip=mn=w.v(ya,"OverflowClip",0);var yn;ya.OverflowEllipsis=yn=w.v(ya,"OverflowEllipsis",1);ya.prototype.V=function(){V.prototype.V.call(this);this.Ey=this.Fy=null};
- w.defineProperty(ya,{font:"font"},function(){return this.Vg},function(a){var b=this.Vg;b!==a&&(u&&(w.g(a,"string",ya,"font"),zn(a)||w.l('Not a valid font: "'+a+'"')),this.Vg=a,this.Rn=null,this.V(),this.i("font",b,a))});var zn;ya.isValidFont=zn=function(a){var b=vn.font;if(a===b||"10px sans-serif"===a)return!0;vn.font="10px sans-serif";var c;vn.font=a;var d=vn.font;if("10px sans-serif"!==d)return vn.font=b,!0;vn.font="19px serif";c=vn.font;vn.font=a;d=vn.font;vn.font=b;return d!==c};
- w.defineProperty(ya,{text:"text"},function(){return this.re},function(a){var b=this.re;a=null!==a&&void 0!==a?a.toString():"";b!==a&&(this.re=a,this.V(),this.i("text",b,a))});w.defineProperty(ya,{textAlign:"textAlign"},function(){return this.be},function(a){var b=this.be;b!==a&&(u&&w.g(a,"string",ya,"textAlign"),"start"===a||"end"===a||"left"===a||"right"===a||"center"===a?(this.be=a,this.sa(),this.i("textAlign",b,a)):w.ja(a,'"start", "end", "left", "right", or "center"',ya,"textAlign"))});
- w.w(ya,{Ha:"naturalBounds"},function(){if(!this.Pc.J()){var a=An(this,this.re,this.vj,999999).width,b=Bn(this,a,this.vj),c=this.Ca;isNaN(c.width)||(a=c.width);isNaN(c.height)||(b=c.height);tb(this.Pc,a,b)}return this.Pc});w.defineProperty(ya,{Hw:"isMultiline"},function(){return this.Fq},function(a){var b=this.Fq;b!==a&&(u&&w.g(a,"boolean",ya,"isMultiline"),this.Fq=a,this.V(),this.i("isMultiline",b,a))});
- w.defineProperty(ya,{yK:"isUnderline"},function(){return this.em},function(a){var b=this.em;b!==a&&(u&&w.g(a,"boolean",ya,"isUnderline"),this.em=a,this.sa(),this.i("isUnderline",b,a))});w.defineProperty(ya,{wK:"isStrikethrough"},function(){return this.dm},function(a){var b=this.dm;b!==a&&(u&&w.g(a,"boolean",ya,"isStrikethrough"),this.dm=a,this.sa(),this.i("isStrikethrough",b,a))});
- w.defineProperty(ya,{PF:"wrap"},function(){return this.Gm},function(a){var b=this.Gm;b!==a&&(u&&w.Ea(a,ya,ya,"wrap"),this.Gm=a,this.V(),this.i("wrap",b,a))});w.defineProperty(ya,{overflow:"overflow"},function(){return this.Xk},function(a){var b=this.Xk;b!==a&&(u&&w.Ea(a,ya,ya,"overflow"),this.Xk=a,this.V(),this.i("overflow",b,a))});
- w.defineProperty(ya,{stroke:"stroke"},function(){return this.Ec},function(a){var b=this.Ec;b!==a&&(u&&null!==a&&w.Gs(a,"TextBlock.stroke"),a instanceof oa&&a.freeze(),this.Ec=a,this.sa(),this.i("stroke",b,a))});w.w(ya,{fI:"lineCount"},function(){return this.Ee});w.defineProperty(ya,{Dz:"editable"},function(){return this.oq},function(a){var b=this.oq;b!==a&&(u&&w.g(a,"boolean",ya,"editable"),this.oq=a,this.i("editable",b,a))});
- w.defineProperty(ya,{AF:"textEditor"},function(){return this.ls},function(a){var b=this.ls;b!==a&&(a instanceof HTMLElement||w.l("textEditor must be an HTMLElement"),this.ls=a,this.i("textEditor",b,a))});w.defineProperty(ya,{Ez:"errorFunction"},function(){return this.tf},function(a){var b=this.tf;b!==a&&(null!==a&&w.g(a,"function",ya,"errorFunction"),this.tf=a,this.i("errorFunction",b,a))});function Dl(a,b){var c=a.Vg;null!==c&&b.Zt!==c&&(b.font=c,b.Zt=c)}
- ya.prototype.ck=function(a,b){if(null!==this.Ec&&0!==this.re.length&&null!==this.Vg){var c=this.Ha.width,d=Cn(this);a.textAlign=this.be;El(this,a,this.Ec,!0,!1);(this.em||this.dm)&&El(this,a,this.Ec,!1,!1);var e=this.vj,g=0,h=!1,k=w.lc(0,0);this.Of.ib(k);var l=w.lc(0,d);this.Of.ib(l);var m=k.bk(l);w.A(k);w.A(l);k=b.scale;8>m*k*k&&(h=!0);b.Ve!==a&&(h=!1);!1===b.vw("textGreeking")&&(h=!1);for(var m=this.Pj,k=this.Qj,l=this.Ee,n=0;n<l;n++){var p=e.qf[n],q=e.Ce[n];p>c&&(p=c);var g=g+m,r=q,q=a,s=g,t=c,
- v=d,y=0;h?("start"===this.be||"left"===this.be?y=0:"end"===this.be||"right"===this.be?y=t-p:"center"===this.be?y=(t-p)/2:w.l("textAlign must be start, end, left, right, or center"),q.fillRect(0+y,s+.25*v,p,1)):("start"===this.be||"left"===this.be?y=0:"end"===this.be||"right"===this.be?y=t:"center"===this.be?y=t/2:w.l("textAlign must be start, end, left, right, or center"),q.fillText(r,0+y,s+v-.25*v),r=v/20|0,0===r&&(r=1),"end"===this.be||"right"===this.be?y-=p:"center"===this.be&&(y-=p/2),this.em&&
- (q.beginPath(),q.lineWidth=r,q.moveTo(0+y,s+v-.2*v),q.lineTo(0+y+p,s+v-.2*v),q.stroke()),this.dm&&(q.beginPath(),q.lineWidth=r,s=s+v-v/2.2|0,0!==r%2&&(s+=.5),q.moveTo(0+y,s),q.lineTo(0+y+p,s),q.stroke()));g+=d+k}}};
- ya.prototype.kp=function(a,b,c,d){this.Xu=a;var e=this.vj;e.reset();var g=0,h=0;if(isNaN(this.Ca.width)){g=this.re.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===g.length)g=0;else if(this.Hw){for(var k=h=0,l=!1;!l;){var m=g.indexOf("\n",k);-1===m&&(m=g.length,l=!0);k=Dn(g.substr(k,m-k).replace(/^\s+|\s+$/g,""),this.Vg);k>h&&(h=k);k=m+1}g=h}else h=g.indexOf("\n",0),0<=h&&(g=g.substr(0,h)),g=k=Dn(g,this.Vg);g=Math.min(g,a/this.scale);g=Math.max(8,g)}else g=this.Ca.width;null!==this.S&&(g=Math.min(g,
- this.S.xe.width),g=Math.max(g,this.S.Df.width));h=Bn(this,g,e);m=h=isNaN(this.Ca.height)?Math.min(h,b/this.scale):this.Ca.height;if(0!==e.Ye&&1!==e.Ce.length&&this.Xk===yn&&(b=this.Vg,l=this.Xk===yn?En(b):0,k=this.Pj+this.Qj,k=Math.max(0,Cn(this)+k),m=Math.max(Math.floor(m/k)-1,0),!(m+1>=e.Ce.length))){k=e.Ce[m];for(a=Math.max(1,a-l);Dn(k,b)>a&&1<k.length;)k=k.substr(0,k.length-1);k+=tn;a=Dn(k,b);e.Ce[m]=k;e.Ce=e.Ce.slice(0,m+1);e.qf[m]=a;e.qf=e.qf.slice(0,m+1);e.Ki=e.Ce.length;e.Ye=Math.max(e.Ye,
- a);this.Ee=e.Ki}if(this.PF===xn||isNaN(this.Ca.width))g=e.Ye,isNaN(this.Ca.width)&&(g=Math.max(8,g));g=Math.max(c,g);h=Math.max(d,h);tb(this.Pc,g,h);sl(this,0,0,g,h)};ya.prototype.Mi=function(a,b,c,d){wl(this,a,b,c,d)};
- function An(a,b,c,d){b=b.replace(/^\s+|\s+$/g,"");var e=0,g=0,h=0,k=a.Vg,g=a.Pj+a.Qj,l=Math.max(0,Cn(a)+g),h=a.Xk===yn?En(k):0;if(a.Ee>=a.wi)return new pa(0,l);if(a.Gm===wn){c.Ki=1;g=Dn(b,k);if(0===h||g<=d)return c.Ye=g,c.qf.push(c.Ye),c.Ce.push(b),new pa(g,l);var m=Fn(b);b=b.substr(m.length);for(var n=Fn(b),g=Dn(m+n,k);0<n.length&&g<=d;)m+=n,b=b.substr(n.length),n=Fn(b),g=Dn((m+n).replace(/^\s+|\s+$/g,""),k);m+=n.replace(/^\s+|\s+$/g,"");for(d=Math.max(1,d-h);Dn(m,k)>d&&1<m.length;)m=m.substr(0,
- m.length-1);m+=tn;h=Dn(m,k);c.qf.push(h);c.Ye=h;c.Ce.push(m);return new pa(h,l)}var p=0;0===b.length&&(p=1,c.qf.push(0),c.Ce.push(b));for(;0<b.length;){m=Fn(b);for(b=b.substr(m.length);Dn(m,k)>d;){n=1;g=Dn(m.substr(0,n),k);for(h=0;g<=d;)n++,h=g,g=Dn(m.substr(0,n),k);1===n?(c.qf[a.Ee+p]=g,e=Math.max(e,g)):(c.qf[a.Ee+p]=h,e=Math.max(e,h));n--;1>n&&(n=1);c.Ce[a.Ee+p]=m.substr(0,n);p++;m=m.substr(n);if(a.Ee+p>a.wi)break}n=Fn(b);for(g=Dn(m+n,k);0<n.length&&g<=d;)m+=n,b=b.substr(n.length),n=Fn(b),g=Dn((m+
- n).replace(/^\s+|\s+$/g,""),k);m=m.replace(/^\s+|\s+$/g,"");if(""!==m&&(0===n.length?(c.qf.push(g),e=Math.max(e,g)):(h=Dn(m,k),c.qf.push(h),e=Math.max(e,h)),c.Ce.push(m),p++,a.Ee+p>a.wi))break}c.Ki=Math.min(a.wi,p);c.Ye=Math.max(c.Ye,e);return new pa(c.Ye,l*c.Ki)}function Fn(a){for(var b=a.length,c=0;c<b&&" "!==a.charAt(c);)c++;for(;c<b&&" "===a.charAt(c);)c++;return c>=b?a:a.substr(0,c)}function Dn(a,b){un!==b&&(un=vn.font=b);return vn.measureText(a).width}
- function Cn(a){if(null!==a.Rn)return a.Rn;var b=a.Vg;un!==b&&(un=vn.font=b);var c=0;void 0!==pn[b]&&5E3>qn?c=pn[b]:(c=1.3*vn.measureText("M").width,pn[b]=c,qn++);return a.Rn=c}function En(a){un!==a&&(un=vn.font=a);var b=0;void 0!==rn[a]&&5E3>sn?b=rn[a]:(b=vn.measureText(tn).width,rn[a]=b,sn++);return b}
- function Bn(a,b,c){var d=a.re.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),e=a.Pj+a.Qj,e=Math.max(0,Cn(a)+e);if(0===d.length)return c.Ye=0,a.Ee=1,e;if(!a.Hw){var g=d.indexOf("\n",0);0<=g&&(d=d.substr(0,g))}for(var g=0,h=a.Ee=0,k=-1,l=!1;!l;)k=d.indexOf("\n",h),-1===k&&(k=d.length,l=!0),h<=k&&(h=d.substr(h,k-h),a.Gm!==wn?(c.Ki=0,h=An(a,h,c,b),g+=h.height,a.Ee+=c.Ki):(An(a,h,c,b),g+=e,a.Ee++),a.Ee===a.wi&&(l=!0)),h=k+1;return a.cv=g}
- w.defineProperty(ya,{IA:"textValidation"},function(){return this.$k},function(a){var b=this.$k;b!==a&&(null!==a&&w.g(a,"function",ya,"textValidation"),this.$k=a,this.i("textValidation",b,a))});w.defineProperty(ya,{kL:"spacingAbove"},function(){return this.Pj},function(a){var b=this.Pj;b!==a&&(u&&w.g(a,"number",ya,"spacingAbove"),this.Pj=a,this.i("spacingAbove",b,a))});
- w.defineProperty(ya,{lL:"spacingBelow"},function(){return this.Qj},function(a){var b=this.Qj;b!==a&&(u&&w.g(a,"number",ya,"spacingBelow"),this.Qj=a,this.i("spacingBelow",b,a))});w.defineProperty(ya,{KK:"maxLines"},function(){return this.wi},function(a){var b=this.wi;b!==a&&(u&&w.g(a,"number",ya,"maxLines"),a=Math.floor(a),0>=a&&w.ja(a,"> 0",ya,"maxLines"),this.wi=a,this.i("maxLines",b,a),this.V())});w.w(ya,{LK:"metrics"},function(){return this.vj});
- function on(){this.Ye=this.Ki=0;this.qf=[];this.Ce=[]}on.prototype.reset=function(){this.Ye=this.Ki=0;this.qf=[];this.Ce=[]};on.prototype.Ms=function(a){this.Ki=a.Ki;this.Ye=a.Ye;this.qf=w.il(a.qf);this.Ce=w.il(a.Ce)};w.w(on,{NJ:"arrSize"},function(){return this.qf});w.w(on,{OJ:"arrText"},function(){return this.Ce});w.w(on,{JK:"maxLineWidth"},function(){return this.Ye});
- function $i(){V.call(this);this.We=null;this.fs="";this.Oj=(new x(NaN,NaN,NaN,NaN)).freeze();this.Wn=vd;this.ks=this.Rj=this.tf=null;this.vy=!1;this.Fu=!0;this.wo=null;this.iC=0}w.Pa($i,V);w.la("Picture",$i);var Gn=new xa,Hn=0,Vi=[];function In(){var a=Vi;if(0===a.length)for(var b=window.document.getElementsByTagName("canvas"),c=b.length,d=0;d<c;d++){var e=b[d];e.parentElement&&e.parentElement.Z&&a.push(e.parentElement.Z)}return a}var Jn;
- $i.clearCache=Jn=function(a){void 0===a&&(a="");w.g(a,"string",$i,"clearCache:url");""!==a?Gn[a]&&(delete Gn[a],Hn--):(Gn=new xa,Hn=0)};$i.prototype.cloneProtected=function(a){V.prototype.cloneProtected.call(this,a);a.element=this.We;a.fs=this.fs;a.Oj.assign(this.Oj);a.Wn=this.Wn;a.tf=this.tf;a.Rj=this.Rj;a.wo=this.wo};$i.prototype.toString=function(){return"Picture("+this.source+")#"+w.ad(this)};
- w.defineProperty($i,{element:"element"},function(){return this.We},function(a){var b=this.We;b!==a&&(null===a||a instanceof HTMLImageElement||a instanceof HTMLVideoElement||a instanceof HTMLCanvasElement||w.l("Picture.element must be an instance of Image, Canvas, or Video, not: "+a),this.vy=a instanceof HTMLCanvasElement,this.We=a,null!==a&&(!0===a.complete||void 0===a.complete?(a.Ku instanceof Event&&null!==this.tf&&this.tf(this,a.Ku),!0===a.xy&&null!==this.Rj&&this.Rj(this,null),a.xy=!0,this.Ca.J()||
- (Bj(this,!1),this.V())):a.IB||(a.addEventListener("load",function(b){Kn(a,b)}),a.addEventListener("error",function(b){Ln(a,b)}),a.IB=!0)),this.i("element",b,a),this.sa())});
- w.defineProperty($i,{source:"source"},function(){return this.fs},function(a){var b=this.fs;if(b!==a){w.g(a,"string",$i,"source");this.fs=a;var c=Gn,d=this.h;if(void 0!==c[a])var e=c[a].Go[0].source;else{30<Hn&&(Jn(),c=Gn);e=w.createElement("img");e.addEventListener("load",function(a){Kn(e,a)});e.addEventListener("error",function(a){Ln(e,a)});e.IB=!0;e.src=a;var g=this.wo;null!==g&&(e.crossOrigin=g(this));c[a]=new Mn(e);Hn++}null!==d&&Ck(d,this);this.element=e;null!==d&&Bk(d,this);this.sa();this.i("source",
- b,a)}});function Kn(a,b){a.xy=!0;a.Ku=!1;for(var c=null,d=In(),e=d.length,g=0;g<e;g++){var h=d[g],k=h.qo.za(a.src);if(null!==k){e=k.length;for(g=0;g<e;g++)c=k[g],c.Ca.J()||(h.uC.add(c),h.ne()),null!==c.Rj&&c.Rj(c,b);h.sa()}}}function Ln(a,b){a.Ku=b;for(var c=null,d=In(),e=d.length,g=0;g<e;g++)if(c=d[g].qo.za(a.src),null!==c){for(var e=c.length,h=w.nb(),g=0;g<e;g++)h.push(c[g]);for(g=0;g<e;g++)c=h[g],null!==c.tf&&c.tf(c,b);w.xa(h)}}
- w.defineProperty($i,{jL:"sourceCrossOrigin"},function(){return this.wo},function(a){if(this.wo!==a&&(null!==a&&w.g(a,"function",$i,"sourceCrossOrigin"),this.wo=a,null!==this.element)){var b=this.element.src;null===a&&"string"===typeof b?this.element.crossOrigin=null:null!==a&&(this.element.crossOrigin=a(this))}});w.defineProperty($i,{bj:"sourceRect"},function(){return this.Oj},function(a){var b=this.Oj;b.N(a)||(w.k(a,x,$i,"sourceRect"),this.Oj=a=a.da(),this.sa(),this.i("sourceRect",b,a))});
- w.defineProperty($i,{JH:"imageStretch"},function(){return this.Wn},function(a){var b=this.Wn;b!==a&&(w.Ea(a,V,$i,"imageStretch"),this.Wn=a,this.sa(),this.i("imageStretch",b,a))});w.defineProperty($i,{Ez:"errorFunction"},function(){return this.tf},function(a){var b=this.tf;b!==a&&(null!==a&&w.g(a,"function",$i,"errorFunction"),this.tf=a,this.i("errorFunction",b,a))});
- w.defineProperty($i,{rL:"successFunction"},function(){return this.Rj},function(a){var b=this.Rj;b!==a&&(null!==a&&w.g(a,"function",$i,"successFunction"),this.Rj=a,this.i("successFunction",b,a))});
- $i.prototype.ck=function(a,b){var c=this.We;if(null!==c){var d=c.src;null!==d&&""!==d||w.l("Element has no source attribute: "+c);if(!(c.Ku instanceof Event)&&!0===c.xy){var d=this.Ha,e=0,g=0,h=this.vy,k=h?+c.width:c.naturalWidth,h=h?+c.height:c.naturalHeight;void 0===k&&c.videoWidth&&(k=c.videoWidth);void 0===h&&c.videoHeight&&(h=c.videoHeight);k=k||d.width;h=h||d.height;if(0!==k&&0!==h){var l=k,m=h;this.bj.J()&&(e=this.Oj.x,g=this.Oj.y,k=this.Oj.width,h=this.Oj.height);var n=k,p=h,q=this.Wn;switch(q){case zh:if(this.bj.J())break;
- e+=Math.max((n-d.width)/2,0);g+=Math.max((p-d.height)/2,0);k=Math.min(d.width,n);h=Math.min(d.height,p);break;case vd:n=d.width;p=d.height;break;case Bh:case Lh:var r=0;q===Bh?(r=Math.min(d.height/p,d.width/n),n*=r,p*=r):q===Lh&&(r=Math.max(d.height/p,d.width/n),n*=r,p*=r,e+=(n-d.width)/2,g+=(p-d.height)/2,k*=1/(n/d.width),h*=1/(p/d.height),n=d.width,p=d.height)}this.iC=k*h;var q=this.Xi()*b.scale,s=this.iC/(n*q*p*q),r=Gn[this.source],q=null;if(void 0!==r&&16<s){2>r.Go.length&&(Nn(r,4,l,m),Nn(r,16,
- l,m));for(var l=r.Go,m=l.length,q=l[0],t=0;t<m;t++)if(l[t].vp*l[t].vp<s)q=l[t];else break}if(!b.Mn){if(null===this.ks)if(null===this.We)this.ks=!1;else{l=w.createElement("canvas").getContext("2d");l.drawImage(this.We,0,0);try{l.getImageData(0,0,1,1),this.ks=!1}catch(v){this.ks=!0}}if(this.ks)return}if(b.vw("pictureRatioOptimization")&&!b.wy&&void 0!==r&&null!==q&&1!==q.vp){a.save();r=q.vp;try{a.drawImage(q.source,e/r,g/r,Math.min(q.source.width,k/r),Math.min(q.source.height,h/r),Math.max((d.width-
- n)/2,0),Math.max((d.height-p)/2,0),Math.min(d.width,n),Math.min(d.height,p))}catch(y){u&&this.Fu&&w.trace(y.toString()),this.Fu=!1}a.restore()}else try{a.drawImage(c,e,g,k,h,Math.max((d.width-n)/2,0),Math.max((d.height-p)/2,0),Math.min(d.width,n),Math.min(d.height,p))}catch(B){u&&this.Fu&&w.trace(B.toString()),this.Fu=!1}}}}};w.w($i,{Ha:"naturalBounds"},function(){return this.Pc});
- $i.prototype.kp=function(a,b,c,d){var e=this.Ca,g=vl(this,!0),h=this.We,k=this.vy;if(k||!this.Dy&&h&&h.complete)this.Dy=!0;null===h&&(isFinite(a)||(a=0),isFinite(b)||(b=0));isFinite(e.width)||g===vd||g===ll?(isFinite(a)||(a=this.bj.J()?this.bj.width:k?+h.width:h.naturalWidth),c=0):null!==h&&!1!==this.Dy&&(a=this.bj.J()?this.bj.width:k?+h.width:h.naturalWidth);isFinite(e.height)||g===vd||g===kl?(isFinite(b)||(b=this.bj.J()?this.bj.height:k?+h.height:h.naturalHeight),d=0):null!==h&&!1!==this.Dy&&(b=
- this.bj.J()?this.bj.height:k?+h.height:h.naturalHeight);isFinite(e.width)&&(a=e.width);isFinite(e.height)&&(b=e.height);e=this.xe;g=this.Df;c=Math.max(c,g.width);d=Math.max(d,g.height);a=Math.min(e.width,a);b=Math.min(e.height,b);a=Math.max(c,a);b=Math.max(d,b);null===h||h.complete||(isFinite(a)||(a=0),isFinite(b)||(b=0));tb(this.Pc,a,b);sl(this,0,0,a,b)};$i.prototype.Mi=function(a,b,c,d){wl(this,a,b,c,d)};function Mn(a){this.Go=[new On(a,1)]}
- function Nn(a,b,c,d){var e=new va(null),g=e.getContext("2d"),h=1/b;e.width=c/b;e.height=d/b;b=new On(e.Rd,b);c=a.Go[a.Go.length-1];g.setTransform(h*c.vp,0,0,h*c.vp,0,0);g.drawImage(c.source,0,0);a.Go.push(b)}function On(a,b){this.source=a;this.vp=b}function sa(){this.q=new sd;this.bc=null}f=sa.prototype;f.reset=function(){this.q=new sd;this.bc=null};
- function R(a,b,c,d,e,g){null===a.q&&w.l("StreamGeometryContext has been closed");void 0!==e&&!0===e?(null===a.bc&&w.l("Need to call beginFigure first"),d=new ee(Nd),d.H=b,d.I=c,a.bc.Oa.add(d)):(a.bc=new ud,a.bc.Aa=b,a.bc.Ba=c,a.bc.ft=d,a.q.Bb.add(a.bc));void 0!==g&&(a.bc.ao=g)}function U(a){null===a.q&&w.l("StreamGeometryContext has been closed");null===a.bc&&w.l("Need to call beginFigure first");var b=a.bc.Oa.length;0<b&&a.bc.Oa.ma(b-1).close()}
- function Kd(a){null===a.q&&w.l("StreamGeometryContext has been closed");null===a.bc&&w.l("Need to call beginFigure first");0<a.bc.Oa.length&&(a.bc.ft=!0)}f.hb=function(a){null===this.q&&w.l("StreamGeometryContext has been closed");null===this.bc&&w.l("Need to call beginFigure first");this.bc.gk=a};f.moveTo=function(a,b,c){void 0===c&&(c=!1);null===this.q&&w.l("StreamGeometryContext has been closed");null===this.bc&&w.l("Need to call beginFigure first");var d=new ee(Nd);d.H=a;d.I=b;c&&d.close();this.bc.Oa.add(d)};
- f.lineTo=function(a,b,c){void 0===c&&(c=!1);null===this.q&&w.l("StreamGeometryContext has been closed");null===this.bc&&w.l("Need to call beginFigure first");var d=new ee(Ad);d.H=a;d.I=b;c&&d.close();this.bc.Oa.add(d)};function S(a,b,c,d,e,g,h,k){void 0===k&&(k=!1);null===a.q&&w.l("StreamGeometryContext has been closed");null===a.bc&&w.l("Need to call beginFigure first");var l=new ee(Od);l.Xb=b;l.rc=c;l.of=d;l.pf=e;l.H=g;l.I=h;k&&l.close();a.bc.Oa.add(l)}
- function Id(a,b,c,d,e){var g;void 0===g&&(g=!1);null===a.q&&w.l("StreamGeometryContext has been closed");null===a.bc&&w.l("Need to call beginFigure first");var h=new ee(Pd);h.Xb=b;h.rc=c;h.H=d;h.I=e;g&&h.close();a.bc.Oa.add(h)}f.arcTo=function(a,b,c,d,e,g,h){void 0===g&&(g=0);void 0===h&&(h=!1);null===this.q&&w.l("StreamGeometryContext has been closed");null===this.bc&&w.l("Need to call beginFigure first");var k=new ee(Qd);k.Se=a;k.cg=b;k.ra=c;k.Da=d;k.radiusX=e;k.radiusY=0!==g?g:e;h&&k.close();this.bc.Oa.add(k)};
- function Jd(a,b,c,d,e,g,h,k){var l;void 0===l&&(l=!1);null===a.q&&w.l("StreamGeometryContext has been closed");null===a.bc&&w.l("Need to call beginFigure first");b=new ee(be,h,k,b,c,d,e,g);l&&b.close();a.bc.Oa.add(b)}
- O.makeGeometry=function(a,b,c){var d=a.Ca,e=d.width,d=d.height;void 0!==b&&!isNaN(b)&&isFinite(b)&&(e=b);void 0!==c&&!isNaN(c)&&isFinite(c)&&(d=c);isFinite(e)||(e=100);isFinite(d)||(d=100);b=null;"None"!==a.Hp?b=O.gj[a.Hp]:"None"!==a.Gz?b=O.gj[a.Gz]:(c=O.Eg[a.Kb],"string"===typeof c&&(c=O.Eg[c]),void 0===c&&w.l("Unknown Shape.figure: "+a.Kb),b=c(a,e,d),b.$n=e,b.Zn=d);null===b&&(c=O.Eg.Rectangle,"function"===typeof c&&(b=c(a,e,d)));return b};
- O.Qi=function(a,b,c,d,e,g,h,k,l,m,n,p,q,r){var s=1-l;a=a*s+c*l;b=b*s+d*l;c=c*s+e*l;d=d*s+g*l;e=e*s+h*l;g=g*s+k*l;k=a*s+c*l;h=b*s+d*l;c=c*s+e*l;d=d*s+g*l;m.x=a;m.y=b;n.x=k;n.y=h;p.x=k*s+c*l;p.y=h*s+d*l;q.x=c;q.y=d;r.x=e;r.y=g};O.Oo=function(a){a=O.Sm(a);var b=w.nb();b[0]=a[0];for(var c=1,d=1;d<a.length;)b[c]=a[d],b[c+1]=a[d],b[c+2]=a[d+1],d+=2,c+=3;w.xa(a);return b};
- O.Sm=function(a){var b=O.jl(a),c=w.nb(),d=Math.floor(b.length/2),e=b.length-1;a=0===a%2?2:1;for(var g=0;g<e;g++){var h=b[g],k=b[g+1],l=b[(d+g-1)%e],m=b[(d+g+a)%e];c[2*g]=h;c[2*g+1]=O.vl(h.x,h.y,l.x,l.y,k.x,k.y,m.x,m.y,new I)}c[c.length]=c[0];w.xa(b);return c};O.vl=function(a,b,c,d,e,g,h,k,l){c=a-c;var m=e-h,n=h=0;0===c||0===m?0===c?(k=(g-k)/m,h=a,n=k*h+(g-k*e)):(d=(b-d)/c,h=e,n=d*h+(b-d*a)):(d=(b-d)/c,k=(g-k)/m,a=b-d*a,h=(g-k*e-a)/(d-k),n=d*h+a);l.n(h,n);return l};
- O.jl=function(a){for(var b=w.nb(),c=1.5*Math.PI,d=0,e=0;e<a;e++)d=2*Math.PI/a*e+c,b[e]=new I(.5+.5*Math.cos(d),.5+.5*Math.sin(d));b.push(b[0]);return b};O.SA=(new Q(.156,.156)).Ra();O.TA=(new Q(.844,.844)).Ra();
- O.Eg={None:"Rectangle",Rectangle:function(a,b,c){a=new sd;a.type=xd;a.Aa=0;a.Ba=0;a.H=b;a.I=c;return a},Square:function(a,b,c){a=new sd;a.Qd=Bh;a.type=xd;a.Aa=0;a.Ba=0;a.H=Math.min(b,c);a.I=Math.min(b,c);return a},Ellipse:function(a,b,c){a=new sd;a.type=yd;a.Aa=0;a.Ba=0;a.H=b;a.I=c;a.C=O.SA;a.D=O.TA;return a},Circle:function(a,b,c){a=new sd;a.Qd=Bh;a.type=yd;a.Aa=0;a.Ba=0;a.H=Math.min(b,c);a.I=Math.min(b,c);a.C=O.SA;a.D=O.TA;return a},Connector:"Ellipse",TriangleRight:function(a,b,c){a=new sd;var d=
- new ud,e=new ee;e.H=b;e.I=.5*c;d.Oa.add(e);b=new ee;b.H=0;b.I=c;d.Oa.add(b.close());a.Bb.add(d);a.C=new Q(0,.25);a.D=new Q(.5,.75);return a},TriangleDown:function(a,b,c){a=new sd;var d=new ud,e=new ee;e.H=b;e.I=0;d.Oa.add(e);e=new ee;e.H=.5*b;e.I=c;d.Oa.add(e.close());a.Bb.add(d);a.C=new Q(.25,0);a.D=new Q(.75,.5);return a},TriangleLeft:function(a,b,c){a=new sd;var d=new ud;d.Aa=b;d.Ba=c;var e=new ee;e.H=0;e.I=.5*c;d.Oa.add(e);c=new ee;c.H=b;c.I=0;d.Oa.add(c.close());a.Bb.add(d);a.C=new Q(.5,.25);
- a.D=new Q(1,.75);return a},TriangleUp:function(a,b,c){a=new sd;var d=new ud;d.Aa=b;d.Ba=c;var e=new ee;e.H=0;e.I=c;d.Oa.add(e);c=new ee;c.H=.5*b;c.I=0;d.Oa.add(c.close());a.Bb.add(d);a.C=new Q(.25,.5);a.D=new Q(.75,1);return a},Line1:function(a,b,c){a=new sd;a.type=wd;a.Aa=0;a.Ba=0;a.H=b;a.I=c;return a},Line2:function(a,b,c){a=new sd;a.type=wd;a.Aa=b;a.Ba=0;a.H=0;a.I=c;return a},MinusLine:"LineH",LineH:function(a,b,c){a=new sd;a.type=wd;a.Aa=0;a.Ba=c/2;a.H=b;a.I=c/2;return a},LineV:function(a,b,c){a=
- new sd;a.type=wd;a.Aa=b/2;a.Ba=0;a.H=b/2;a.I=c;return a},BarH:"Rectangle",BarV:"Rectangle",Curve1:function(a,b,c){var d=O.ya;a=w.s();R(a,0,0,!1);S(a,d*b,0,1*b,(1-d)*c,b,c);b=a.q;w.u(a);return b},Curve2:function(a,b,c){var d=O.ya;a=w.s();R(a,0,0,!1);S(a,0,d*c,(1-d)*b,c,b,c);b=a.q;w.u(a);return b},Curve3:function(a,b,c){var d=O.ya;a=w.s();R(a,1*b,0,!1);S(a,1*b,d*c,d*b,1*c,0,1*c);b=a.q;w.u(a);return b},Curve4:function(a,b,c){var d=O.ya;a=w.s();R(a,1*b,0,!1);S(a,(1-d)*b,0,0,(1-d)*c,0,1*c);b=a.q;w.u(a);
- return b},Alternative:"Triangle",Merge:"Triangle",Triangle:function(a,b,c){a=w.s();R(a,.5*b,0*c,!0);a.lineTo(0*b,1*c);a.lineTo(1*b,1*c,!0);b=a.q;b.C=new Q(.25,.5);b.D=new Q(.75,1);w.u(a);return b},Decision:"Diamond",Diamond:function(a,b,c){a=w.s();R(a,.5*b,0,!0);a.lineTo(0,.5*c);a.lineTo(.5*b,1*c);a.lineTo(1*b,.5*c,!0);b=a.q;b.C=new Q(.25,.25);b.D=new Q(.75,.75);w.u(a);return b},Pentagon:function(a,b,c){var d=O.jl(5);a=w.s();R(a,d[0].x*b,d[0].y*c,!0);for(var e=1;5>e;e++)a.lineTo(d[e].x*b,d[e].y*c);
- w.xa(d);U(a);b=a.q;b.C=new Q(.2,.22);b.D=new Q(.8,.9);w.u(a);return b},DataTransmission:"Hexagon",Hexagon:function(a,b,c){var d=O.jl(6);a=w.s();R(a,d[0].x*b,d[0].y*c,!0);for(var e=1;6>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.xa(d);U(a);b=a.q;b.C=new Q(.07,.25);b.D=new Q(.93,.75);w.u(a);return b},Heptagon:function(a,b,c){var d=O.jl(7);a=w.s();R(a,d[0].x*b,d[0].y*c,!0);for(var e=1;7>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.xa(d);U(a);b=a.q;b.C=new Q(.2,.15);b.D=new Q(.8,.85);w.u(a);return b},Octagon:function(a,
- b,c){var d=O.jl(8);a=w.s();R(a,d[0].x*b,d[0].y*c,!0);for(var e=1;8>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.xa(d);U(a);b=a.q;b.C=new Q(.15,.15);b.D=new Q(.85,.85);w.u(a);return b},Nonagon:function(a,b,c){var d=O.jl(9);a=w.s();R(a,d[0].x*b,d[0].y*c,!0);for(var e=1;9>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.xa(d);U(a);b=a.q;b.C=new Q(.17,.13);b.D=new Q(.82,.82);w.u(a);return b},Decagon:function(a,b,c){var d=O.jl(10);a=w.s();R(a,d[0].x*b,d[0].y*c,!0);for(var e=1;10>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.xa(d);U(a);
- b=a.q;b.C=new Q(.16,.16);b.D=new Q(.84,.84);w.u(a);return b},Dodecagon:function(a,b,c){var d=O.jl(12);a=w.s();R(a,d[0].x*b,d[0].y*c,!0);for(var e=1;12>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.xa(d);U(a);b=a.q;b.C=new Q(.16,.16);b.D=new Q(.84,.84);w.u(a);return b},FivePointedStar:function(a,b,c){var d=O.Sm(5);a=w.s();R(a,d[0].x*b,d[0].y*c,!0);for(var e=1;10>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.xa(d);U(a);b=a.q;b.C=new Q(.312,.383);b.D=new Q(.693,.765);w.u(a);return b},SixPointedStar:function(a,b,c){var d=
- O.Sm(6);a=w.s();R(a,d[0].x*b,d[0].y*c,!0);for(var e=1;12>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.xa(d);U(a);b=a.q;b.C=new Q(.17,.251);b.D=new Q(.833,.755);w.u(a);return b},SevenPointedStar:function(a,b,c){var d=O.Sm(7);a=w.s();R(a,d[0].x*b,d[0].y*c,!0);for(var e=1;14>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.xa(d);U(a);b=a.q;b.C=new Q(.363,.361);b.D=new Q(.641,.709);w.u(a);return b},EightPointedStar:function(a,b,c){var d=O.Sm(8);a=w.s();R(a,d[0].x*b,d[0].y*c,!0);for(var e=1;16>e;e++)a.lineTo(d[e].x*b,d[e].y*
- c);w.xa(d);U(a);b=a.q;b.C=new Q(.252,.255);b.D=new Q(.75,.75);w.u(a);return b},NinePointedStar:function(a,b,c){var d=O.Sm(9);a=w.s();R(a,d[0].x*b,d[0].y*c,!0);for(var e=1;18>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.xa(d);U(a);b=a.q;b.C=new Q(.355,.361);b.D=new Q(.645,.651);w.u(a);return b},TenPointedStar:function(a,b,c){var d=O.Sm(10);a=w.s();R(a,d[0].x*b,d[0].y*c,!0);for(var e=1;20>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.xa(d);U(a);b=a.q;b.C=new Q(.281,.261);b.D=new Q(.723,.748);w.u(a);return b},FivePointedBurst:function(a,
- b,c){var d=O.Oo(5);a=w.s();R(a,d[0].x*b,d[0].y*c,!0);for(var e=1;e<d.length;e+=3)S(a,d[e].x*b,d[e].y*c,d[e+1].x*b,d[e+1].y*c,d[e+2].x*b,d[e+2].y*c);w.xa(d);U(a);b=a.q;b.C=new Q(.312,.383);b.D=new Q(.693,.765);w.u(a);return b},SixPointedBurst:function(a,b,c){var d=O.Oo(6);a=w.s();R(a,d[0].x*b,d[0].y*c,!0);for(var e=1;e<d.length;e+=3)S(a,d[e].x*b,d[e].y*c,d[e+1].x*b,d[e+1].y*c,d[e+2].x*b,d[e+2].y*c);w.xa(d);U(a);b=a.q;b.C=new Q(.17,.251);b.D=new Q(.833,.755);w.u(a);return b},SevenPointedBurst:function(a,
- b,c){var d=O.Oo(7);a=w.s();R(a,d[0].x*b,d[0].y*c,!0);for(var e=1;e<d.length;e+=3)S(a,d[e].x*b,d[e].y*c,d[e+1].x*b,d[e+1].y*c,d[e+2].x*b,d[e+2].y*c);w.xa(d);U(a);b=a.q;b.C=new Q(.363,.361);b.D=new Q(.641,.709);w.u(a);return b},EightPointedBurst:function(a,b,c){var d=O.Oo(8);a=w.s();R(a,d[0].x*b,d[0].y*c,!0);for(var e=1;e<d.length;e+=3)S(a,d[e].x*b,d[e].y*c,d[e+1].x*b,d[e+1].y*c,d[e+2].x*b,d[e+2].y*c);w.xa(d);U(a);b=a.q;b.C=new Q(.252,.255);b.D=new Q(.75,.75);w.u(a);return b},NinePointedBurst:function(a,
- b,c){var d=O.Oo(9);a=w.s();R(a,d[0].x*b,d[0].y*c,!0);for(var e=1;e<d.length;e+=3)S(a,d[e].x*b,d[e].y*c,d[e+1].x*b,d[e+1].y*c,d[e+2].x*b,d[e+2].y*c);w.xa(d);U(a);b=a.q;b.C=new Q(.355,.361);b.D=new Q(.645,.651);w.u(a);return b},TenPointedBurst:function(a,b,c){var d=O.Oo(10);a=w.s();R(a,d[0].x*b,d[0].y*c,!0);for(var e=1;e<d.length;e+=3)S(a,d[e].x*b,d[e].y*c,d[e+1].x*b,d[e+1].y*c,d[e+2].x*b,d[e+2].y*c);w.xa(d);U(a);b=a.q;b.C=new Q(.281,.261);b.D=new Q(.723,.748);w.u(a);return b},Cloud:function(a,b,c){a=
- w.s();R(a,.08034461*b,.1944299*c,!0);S(a,-.09239631*b,.07836421*c,.1406031*b,-.0542823*c,.2008615*b,.05349299*c);S(a,.2450511*b,-.00697547*c,.3776197*b,-.01112067*c,.4338609*b,.074219*c);S(a,.4539471*b,0,.6066018*b,-.02526587*c,.6558228*b,.07004196*c);S(a,.6914277*b,-.01904177*c,.8921095*b,-.01220843*c,.8921095*b,.08370865*c);S(a,1.036446*b,.04105738*c,1.020377*b,.3022052*c,.9147671*b,.3194596*c);S(a,1.04448*b,.360238*c,.992256*b,.5219009*c,.9082935*b,.562044*c);S(a,1.032337*b,.5771781*c,1.018411*
- b,.8120651*c,.9212406*b,.8217117*c);S(a,1.028411*b,.9571472*c,.8556702*b,1.052487*c,.7592566*b,.9156953*c);S(a,.7431877*b,1.009325*c,.5624123*b,1.021761*c,.5101666*b,.9310455*c);S(a,.4820677*b,1.031761*c,.3030112*b,1.002796*c,.2609328*b,.9344623*c);S(a,.2329994*b,1.01518*c,.03213784*b,1.01518*c,.08034461*b,.870098*c);S(a,-.02812061*b,.9032597*c,-.01205169*b,.6835638*c,.06829292*b,.6545475*c);S(a,-.01812061*b,.6089503*c,-.00606892*b,.4555777*c,.06427569*b,.4265613*c);S(a,-.01606892*b,.3892545*c,-.01205169*
- b,.1944299*c,.08034461*b,.1944299*c);U(a);b=a.q;b.C=new Q(.1,.1);b.D=new Q(.9,.9);w.u(a);return b},Gate:"Crescent",Crescent:function(a,b,c){a=w.s();R(a,0,0,!0);S(a,1*b,0,1*b,1*c,0,1*c);S(a,.5*b,.75*c,.5*b,.25*c,0,0);U(a);b=a.q;b.C=new Q(.511,.19);b.D=new Q(.776,.76);w.u(a);return b},FramedRectangle:function(a,b,c){var d=w.s(),e=a?a.Dc:NaN;a=a?a.yt:NaN;isNaN(e)&&(e=.1);isNaN(a)&&(a=.1);R(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c,!0);R(d,e*b,a*c,!1,!0);d.lineTo(e*b,(1-a)*c);d.lineTo((1-
- e)*b,(1-a)*c);d.lineTo((1-e)*b,a*c,!0);b=d.q;b.C=new Q(e,a);b.D=new Q(1-e,1-a);w.u(d);return b},Delay:"HalfEllipse",HalfEllipse:function(a,b,c){var d=O.ya;a=w.s();R(a,0,0,!0);S(a,d*b,0,1*b,(.5-d/2)*c,1*b,.5*c);S(a,1*b,(.5+d/2)*c,d*b,1*c,0,1*c);U(a);b=a.q;b.C=new Q(0,.2);b.D=new Q(.75,.8);w.u(a);return b},Heart:function(a,b,c){a=w.s();R(a,.5*b,1*c,!0);S(a,.1*b,.8*c,0,.5*c,0*b,.3*c);S(a,0*b,0,.45*b,0,.5*b,.3*c);S(a,.55*b,0,1*b,0,1*b,.3*c);S(a,b,.5*c,.9*b,.8*c,.5*b,1*c);U(a);b=a.q;b.C=new Q(.15,.29);
- b.D=new Q(.86,.68);w.u(a);return b},Spade:function(a,b,c){a=w.s();R(a,.5*b,0,!0);a.lineTo(.51*b,.01*c);S(a,.6*b,.2*c,b,.25*c,b,.5*c);S(a,b,.8*c,.6*b,.8*c,.55*b,.7*c);S(a,.5*b,.75*c,.55*b,.95*c,.75*b,c);a.lineTo(.25*b,c);S(a,.45*b,.95*c,.5*b,.75*c,.45*b,.7*c);S(a,.4*b,.8*c,0,.8*c,0,.5*c);S(a,0,.25*c,.4*b,.2*c,.49*b,.01*c);U(a);b=a.q;b.C=new Q(.19,.26);b.D=new Q(.8,.68);w.u(a);return b},Club:function(a,b,c){a=w.s();R(a,.4*b,.6*c,!0);S(a,.5*b,.75*c,.45*b,.95*c,.15*b,1*c);a.lineTo(.85*b,c);S(a,.55*b,
- .95*c,.5*b,.75*c,.6*b,.6*c);var d=.2,e=.3,g=0,h=4*(Math.SQRT2-1)/3*d;S(a,(.5-d+e)*b,(.5+h+g)*c,(.5-h+e)*b,(.5+d+g)*c,(.5+e)*b,(.5+d+g)*c);S(a,(.5+h+e)*b,(.5+d+g)*c,(.5+d+e)*b,(.5+h+g)*c,(.5+d+e)*b,(.5+g)*c);S(a,(.5+d+e)*b,(.5-h+g)*c,(.5+h+e)*b,(.5-d+g)*c,(.5+e)*b,(.5-d+g)*c);S(a,(.5-h+e)*b,(.5-d+g)*c,(.5-d+e+.05)*b,(.5-h+g-.02)*c,.65*b,.36771243*c);d=.2;e=0;g=-.3;h=4*(Math.SQRT2-1)/3*d;S(a,(.5+h+e)*b,(.5+d+g)*c,(.5+d+e)*b,(.5+h+g)*c,(.5+d+e)*b,(.5+g)*c);S(a,(.5+d+e)*b,(.5-h+g)*c,(.5+h+e)*b,(.5-d+
- g)*c,(.5+e)*b,(.5-d+g)*c);S(a,(.5-h+e)*b,(.5-d+g)*c,(.5-d+e)*b,(.5-h+g)*c,(.5-d+e)*b,(.5+g)*c);S(a,(.5-d+e)*b,(.5+h+g)*c,(.5-h+e)*b,(.5+d+g)*c,.35*b,.36771243*c);d=.2;e=-.3;g=0;h=4*(Math.SQRT2-1)/3*d;S(a,(.5+d+e-.05)*b,(.5-h+g-.02)*c,(.5+h+e)*b,(.5-d+g)*c,(.5+e)*b,(.5-d+g)*c);S(a,(.5-h+e)*b,(.5-d+g)*c,(.5-d+e)*b,(.5-h+g)*c,(.5-d+e)*b,(.5+g)*c);S(a,(.5-d+e)*b,(.5+h+g)*c,(.5-h+e)*b,(.5+d+g)*c,(.5+e)*b,(.5+d+g)*c);S(a,(.5+h+e)*b,(.5+d+g)*c,(.5+d+e)*b,(.5+h+g)*c,.4*b,.6*c);U(a);b=a.q;b.C=new Q(.06,.39);
- b.D=new Q(.93,.58);w.u(a);return b},Ring:function(a,b,c){a=w.s();var d=4*(Math.SQRT2-1)/3*.5;R(a,b,.5*c,!0);S(a,b,(.5-d)*c,(.5+d)*b,0,.5*b,0);S(a,(.5-d)*b,0,0,(.5-d)*c,0,.5*c);S(a,0,(.5+d)*c,(.5-d)*b,c,.5*b,c);S(a,(.5+d)*b,c,b,(.5+d)*c,b,.5*c);d=4*(Math.SQRT2-1)/3*.4;R(a,.5*b,.1*c,!0,!0);S(a,(.5+d)*b,.1*c,.9*b,(.5-d)*c,.9*b,.5*c);S(a,.9*b,(.5+d)*c,(.5+d)*b,.9*c,.5*b,.9*c);S(a,(.5-d)*b,.9*c,.1*b,(.5+d)*c,.1*b,.5*c);S(a,.1*b,(.5-d)*c,(.5-d)*b,.1*c,.5*b,.1*c);b=a.q;b.C=new Q(.146,.146);b.D=new Q(.853,
- .853);b.Qd=Bh;w.u(a);return b},YinYang:function(a,b,c){var d=.5;a=w.s();d=.5;R(a,.5*b,0,!0);a.arcTo(270,180,.5*b,.5*b,.5*b);S(a,1*b,d*c,0,d*c,d*b,0,!0);var d=.1,e=.25;R(a,(.5+d)*b,e*c,!0,!0);a.arcTo(0,-360,.5*b,c*e,d*b);U(a);R(a,.5*b,0,!1);a.arcTo(270,-180,.5*b,.5*b,.5*b);a.hb(!1);e=.75;R(a,(.5+d)*b,e*c,!0);a.arcTo(0,360,.5*b,c*e,d*b);U(a);b=a.q;b.Qd=Bh;w.u(a);return b},Peace:function(a,b,c){a=w.s();var d=4*(Math.SQRT2-1)/3*.5;R(a,b,.5*c,!0);S(a,b,(.5-d)*c,(.5+d)*b,0,.5*b,0);S(a,(.5-d)*b,0,0,(.5-
- d)*c,0,.5*c);S(a,0,(.5+d)*c,(.5-d)*b,c,.5*b,c);S(a,(.5+d)*b,c,b,(.5+d)*c,b,.5*c);d=4*(Math.SQRT2-1)/3*.4;R(a,.5*b,.1*c,!0,!0);S(a,(.5+d)*b,.1*c,.9*b,(.5-d)*c,.9*b,.5*c);S(a,.9*b,(.5+d)*c,(.5+d)*b,.9*c,.5*b,.9*c);S(a,(.5-d)*b,.9*c,.1*b,(.5+d)*c,.1*b,.5*c);S(a,.1*b,(.5-d)*c,(.5-d)*b,.1*c,.5*b,.1*c);var d=.07,e=0,g=-.707*.11,h=4*(Math.SQRT2-1)/3*d;R(a,(.5+d+e)*b,(.5+g)*c,!0);S(a,(.5+d+e)*b,(.5-h+g)*c,(.5+h+e)*b,(.5-d+g)*c,(.5+e)*b,(.5-d+g)*c);S(a,(.5-h+e)*b,(.5-d+g)*c,(.5-d+e)*b,(.5-h+g)*c,(.5-d+e)*
- b,(.5+g)*c);S(a,(.5-d+e)*b,(.5+h+g)*c,(.5-h+e)*b,(.5+d+g)*c,(.5+e)*b,(.5+d+g)*c);S(a,(.5+h+e)*b,(.5+d+g)*c,(.5+d+e)*b,(.5+h+g)*c,(.5+d+e)*b,(.5+g)*c);d=.07;e=-.707*.11;g=.707*.11;h=4*(Math.SQRT2-1)/3*d;R(a,(.5+d+e)*b,(.5+g)*c,!0);S(a,(.5+d+e)*b,(.5-h+g)*c,(.5+h+e)*b,(.5-d+g)*c,(.5+e)*b,(.5-d+g)*c);S(a,(.5-h+e)*b,(.5-d+g)*c,(.5-d+e)*b,(.5-h+g)*c,(.5-d+e)*b,(.5+g)*c);S(a,(.5-d+e)*b,(.5+h+g)*c,(.5-h+e)*b,(.5+d+g)*c,(.5+e)*b,(.5+d+g)*c);S(a,(.5+h+e)*b,(.5+d+g)*c,(.5+d+e)*b,(.5+h+g)*c,(.5+d+e)*b,(.5+g)*
- c);d=.07;e=.707*.11;g=.707*.11;h=4*(Math.SQRT2-1)/3*d;R(a,(.5+d+e)*b,(.5+g)*c,!0);S(a,(.5+d+e)*b,(.5-h+g)*c,(.5+h+e)*b,(.5-d+g)*c,(.5+e)*b,(.5-d+g)*c);S(a,(.5-h+e)*b,(.5-d+g)*c,(.5-d+e)*b,(.5-h+g)*c,(.5-d+e)*b,(.5+g)*c);S(a,(.5-d+e)*b,(.5+h+g)*c,(.5-h+e)*b,(.5+d+g)*c,(.5+e)*b,(.5+d+g)*c);S(a,(.5+h+e)*b,(.5+d+g)*c,(.5+d+e)*b,(.5+h+g)*c,(.5+d+e)*b,(.5+g)*c);b=a.q;b.C=new Q(.146,.146);b.D=new Q(.853,.853);b.Qd=Bh;w.u(a);return b},NotAllowed:function(a,b,c){var d=O.ya,e=.5*d,g=.5;a=w.s();R(a,.5*b,(.5-
- g)*c,!0);S(a,(.5-e)*b,(.5-g)*c,(.5-g)*b,(.5-e)*c,(.5-g)*b,.5*c);S(a,(.5-g)*b,(.5+e)*c,(.5-e)*b,(.5+g)*c,.5*b,(.5+g)*c);S(a,(.5+e)*b,(.5+g)*c,(.5+g)*b,(.5+e)*c,(.5+g)*b,.5*c);S(a,(.5+g)*b,(.5-e)*c,(.5+e)*b,(.5-g)*c,.5*b,(.5-g)*c);var g=.4,e=.4*d,d=w.O(),h=w.O(),k=w.O(),l=w.O();O.Qi(.5,.5-g,.5+e,.5-g,.5+g,.5-e,.5+g,.5,.42,d,h,k,l,l);var m=w.O(),n=w.O(),p=w.O();O.Qi(.5,.5-g,.5+e,.5-g,.5+g,.5-e,.5+g,.5,.58,l,l,p,m,n);var q=w.O(),r=w.O(),s=w.O();O.Qi(.5,.5+g,.5-e,.5+g,.5-g,.5+e,.5-g,.5,.42,q,r,s,l,l);
- var t=w.O(),v=w.O(),y=w.O();O.Qi(.5,.5+g,.5-e,.5+g,.5-g,.5+e,.5-g,.5,.58,l,l,y,t,v);R(a,y.x*b,y.y*c,!0,!0);S(a,t.x*b,t.y*c,v.x*b,v.y*c,(.5-g)*b,.5*c);S(a,(.5-g)*b,(.5-e)*c,(.5-e)*b,(.5-g)*c,.5*b,(.5-g)*c);S(a,d.x*b,d.y*c,h.x*b,h.y*c,k.x*b,k.y*c);a.lineTo(y.x*b,y.y*c);U(a);R(a,s.x*b,s.y*c,!0,!0);a.lineTo(p.x*b,p.y*c);S(a,m.x*b,m.y*c,n.x*b,n.y*c,(.5+g)*b,.5*c);S(a,(.5+g)*b,(.5+e)*c,(.5+e)*b,(.5+g)*c,.5*b,(.5+g)*c);S(a,q.x*b,q.y*c,r.x*b,r.y*c,s.x*b,s.y*c);U(a);w.A(d);w.A(h);w.A(k);w.A(l);w.A(m);w.A(n);
- w.A(p);w.A(q);w.A(r);w.A(s);w.A(t);w.A(v);w.A(y);b=a.q;w.u(a);b.Qd=Bh;return b},Fragile:function(a,b,c){a=w.s();R(a,0,0,!0);a.lineTo(.25*b,0);a.lineTo(.2*b,.15*c);a.lineTo(.3*b,.25*c);a.lineTo(.29*b,.33*c);a.lineTo(.35*b,.25*c);a.lineTo(.3*b,.15*c);a.lineTo(.4*b,0);a.lineTo(1*b,0);S(a,1*b,.25*c,.75*b,.5*c,.55*b,.5*c);a.lineTo(.55*b,.9*c);a.lineTo(.7*b,.9*c);a.lineTo(.7*b,1*c);a.lineTo(.3*b,1*c);a.lineTo(.3*b,.9*c);a.lineTo(.45*b,.9*c);a.lineTo(.45*b,.5*c);S(a,.25*b,.5*c,0,.25*c,0,0);U(a);b=a.q;b.C=
- new Q(.25,0);b.D=new Q(.75,.4);w.u(a);return b},HourGlass:function(a,b,c){a=w.s();R(a,.65*b,.5*c,!0);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(.35*b,.5*c);a.lineTo(0,0);a.lineTo(1*b,0);U(a);b=a.q;w.u(a);return b},Lightning:function(a,b,c){a=w.s();R(a,0*b,.55*c,!0);a.lineTo(.75*b,0);a.lineTo(.25*b,.45*c);a.lineTo(.9*b,.48*c);a.lineTo(.4*b,1*c);a.lineTo(.65*b,.55*c);U(a);b=a.q;w.u(a);return b},Parallelogram1:function(a,b,c){a=a?a.Dc:NaN;isNaN(a)&&(a=.1);var d=w.s();R(d,a*b,0,!0);d.lineTo(1*b,0);d.lineTo((1-
- a)*b,1*c);d.lineTo(0,1*c);U(d);b=d.q;b.C=new Q(a,0);b.D=new Q(1-a,1);w.u(d);return b},Input:"Output",Output:function(a,b,c){a=w.s();R(a,0,1*c,!0);a.lineTo(.1*b,0);a.lineTo(1*b,0);a.lineTo(.9*b,1*c);U(a);b=a.q;b.C=new Q(.1,0);b.D=new Q(.9,1);w.u(a);return b},Parallelogram2:function(a,b,c){a=a?a.Dc:NaN;isNaN(a)&&(a=.25);var d=w.s();R(d,a*b,0,!0);d.lineTo(1*b,0);d.lineTo((1-a)*b,1*c);d.lineTo(0,1*c);U(d);b=d.q;b.C=new Q(a,0);b.D=new Q(1-a,1);w.u(d);return b},ThickCross:function(a,b,c){a=a?a.Dc:NaN;isNaN(a)&&
- (a=.25);var d=w.s();R(d,(.5-a/2)*b,0,!0);d.lineTo((.5+a/2)*b,0);d.lineTo((.5+a/2)*b,(.5-a/2)*c);d.lineTo(1*b,(.5-a/2)*c);d.lineTo(1*b,(.5+a/2)*c);d.lineTo((.5+a/2)*b,(.5+a/2)*c);d.lineTo((.5+a/2)*b,1*c);d.lineTo((.5-a/2)*b,1*c);d.lineTo((.5-a/2)*b,(.5+a/2)*c);d.lineTo(0,(.5+a/2)*c);d.lineTo(0,(.5-a/2)*c);d.lineTo((.5-a/2)*b,(.5-a/2)*c);U(d);b=d.q;b.C=new Q(.5-a/2,.5-a/2);b.D=new Q(.5+a/2,.5+a/2);w.u(d);return b},ThickX:function(a,b,c){a=.25/Math.SQRT2;var d=w.s();R(d,.3*b,0,!0);d.lineTo(.5*b,.2*c);
- d.lineTo(.7*b,0);d.lineTo(1*b,.3*c);d.lineTo(.8*b,.5*c);d.lineTo(1*b,.7*c);d.lineTo(.7*b,1*c);d.lineTo(.5*b,.8*c);d.lineTo(.3*b,1*c);d.lineTo(0,.7*c);d.lineTo(.2*b,.5*c);d.lineTo(0,.3*c);U(d);b=d.q;b.C=new Q(.5-a,.5-a);b.D=new Q(.5+a,.5+a);w.u(d);return b},ThinCross:function(a,b,c){var d=a?a.Dc:NaN;isNaN(d)&&(d=.1);a=w.s();R(a,(.5-d/2)*b,0,!0);a.lineTo((.5+d/2)*b,0);a.lineTo((.5+d/2)*b,(.5-d/2)*c);a.lineTo(1*b,(.5-d/2)*c);a.lineTo(1*b,(.5+d/2)*c);a.lineTo((.5+d/2)*b,(.5+d/2)*c);a.lineTo((.5+d/2)*
- b,1*c);a.lineTo((.5-d/2)*b,1*c);a.lineTo((.5-d/2)*b,(.5+d/2)*c);a.lineTo(0,(.5+d/2)*c);a.lineTo(0,(.5-d/2)*c);a.lineTo((.5-d/2)*b,(.5-d/2)*c);U(a);b=a.q;w.u(a);return b},ThinX:function(a,b,c){a=w.s();R(a,.1*b,0,!0);a.lineTo(.5*b,.4*c);a.lineTo(.9*b,0);a.lineTo(1*b,.1*c);a.lineTo(.6*b,.5*c);a.lineTo(1*b,.9*c);a.lineTo(.9*b,1*c);a.lineTo(.5*b,.6*c);a.lineTo(.1*b,1*c);a.lineTo(0,.9*c);a.lineTo(.4*b,.5*c);a.lineTo(0,.1*c);U(a);return a.q},RightTriangle:function(a,b,c){a=w.s();R(a,0,0,!0);a.lineTo(1*b,
- 1*c);a.lineTo(0,1*c);U(a);b=a.q;b.C=new Q(0,.5);b.D=new Q(.5,1);w.u(a);return b},RoundedIBeam:function(a,b,c){a=w.s();R(a,0,0,!0);a.lineTo(1*b,0);S(a,.5*b,.25*c,.5*b,.75*c,1*b,1*c);a.lineTo(0,1*c);S(a,.5*b,.75*c,.5*b,.25*c,0,0);U(a);b=a.q;w.u(a);return b},RoundedRectangle:function(a,b,c){var d=a?a.Dc:NaN;isNaN(d)&&(d=5);d=Math.min(d,b/3);d=Math.min(d,c/3);a=d*O.ya;var e=w.s();R(e,d,0,!0);e.lineTo(b-d,0);S(e,b-a,0,b,a,b,d);e.lineTo(b,c-d);S(e,b,c-a,b-a,c,b-d,c);e.lineTo(d,c);S(e,a,c,0,c-a,0,c-d);e.lineTo(0,
- d);S(e,0,a,a,0,d,0);U(e);b=e.q;1<a?(b.C=new Q(0,0,a,a),b.D=new Q(1,1,-a,-a)):(b.C=Xb,b.D=jc);w.u(e);return b},Border:function(a,b,c){var d=a?a.Dc:NaN;isNaN(d)&&(d=5);d=Math.min(d,b/3);d=Math.min(d,c/3);a=w.s();R(a,d,0,!0);a.lineTo(b-d,0);S(a,b-0,0,b,0,b,d);a.lineTo(b,c-d);S(a,b,c-0,b-0,c,b-d,c);a.lineTo(d,c);S(a,0,c,0,c-0,0,c-d);a.lineTo(0,d);S(a,0,0,0,0,d,0);U(a);b=a.q;b.C=Xb;b.D=jc;w.u(a);return b},SquareIBeam:function(a,b,c){var d=a?a.Dc:NaN;isNaN(d)&&(d=.2);a=w.s();R(a,0,0,!0);a.lineTo(1*b,0);
- a.lineTo(1*b,d*c);a.lineTo((.5+d/2)*b,d*c);a.lineTo((.5+d/2)*b,(1-d)*c);a.lineTo(1*b,(1-d)*c);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,(1-d)*c);a.lineTo((.5-d/2)*b,(1-d)*c);a.lineTo((.5-d/2)*b,d*c);a.lineTo(0,d*c);U(a);b=a.q;w.u(a);return b},Trapezoid:function(a,b,c){a=a?a.Dc:NaN;isNaN(a)&&(a=.2);var d=w.s();R(d,a*b,0,!0);d.lineTo((1-a)*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);U(d);b=d.q;b.C=new Q(a,0);b.D=new Q(1-a,1);w.u(d);return b},ManualLoop:"ManualOperation",ManualOperation:function(a,b,c){var d=
- a?a.Dc:NaN;isNaN(d)&&(d=0);a=w.s();R(a,d,0,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(.9*b,1*c);a.lineTo(.1*b,1*c);U(a);b=a.q;b.C=new Q(.1,0);b.D=new Q(.9,1);w.u(a);return b},GenderMale:function(a,b,c){a=w.s();var d=O.ya,e=.4*d,g=.4,h=w.O(),k=w.O(),l=w.O(),m=w.O();R(a,(.5-g)*b,.5*c,!0);S(a,(.5-g)*b,(.5-e)*c,(.5-e)*b,(.5-g)*c,.5*b,(.5-g)*c);O.Qi(.5,.5-g,.5+e,.5-g,.5+g,.5-e,.5+g,.5,.44,l,m,k,h,h);S(a,l.x*b,l.y*c,m.x*b,m.y*c,k.x*b,k.y*c);var n=w.lc(k.x,k.y);O.Qi(.5,.5-g,.5+e,.5-g,.5+g,.5-e,.5+g,.5,.56,
- h,h,k,l,m);var p=w.lc(k.x,k.y);a.lineTo((.1*n.x+.855)*b,.1*n.y*c);a.lineTo(.85*b,.1*n.y*c);a.lineTo(.85*b,0);a.lineTo(1*b,0);a.lineTo(1*b,.15*c);a.lineTo((.1*p.x+.9)*b,.15*c);a.lineTo((.1*p.x+.9)*b,(.1*p.y+.05*.9)*c);a.lineTo(p.x*b,p.y*c);S(a,l.x*b,l.y*c,m.x*b,m.y*c,(.5+g)*b,.5*c);S(a,(.5+g)*b,(.5+e)*c,(.5+e)*b,(.5+g)*c,.5*b,(.5+g)*c);S(a,(.5-e)*b,(.5+g)*c,(.5-g)*b,(.5+e)*c,(.5-g)*b,.5*c);g=.35;e=.35*d;R(a,.5*b,(.5-g)*c,!0,!0);S(a,(.5-e)*b,(.5-g)*c,(.5-g)*b,(.5-e)*c,(.5-g)*b,.5*c);S(a,(.5-g)*b,(.5+
- e)*c,(.5-e)*b,(.5+g)*c,.5*b,(.5+g)*c);S(a,(.5+e)*b,(.5+g)*c,(.5+g)*b,(.5+e)*c,(.5+g)*b,.5*c);S(a,(.5+g)*b,(.5-e)*c,(.5+e)*b,(.5-g)*c,.5*b,(.5-g)*c);R(a,(.5-g)*b,.5*c,!0);w.A(h);w.A(k);w.A(l);w.A(m);w.A(n);w.A(p);b=a.q;b.C=new Q(.202,.257);b.D=new Q(.692,.839);b.Qd=Bh;w.u(a);return b},GenderFemale:function(a,b,c){a=w.s();var d=.375,e=0,g=-.125,h=4*(Math.SQRT2-1)/3*d;R(a,(.525+e)*b,(.5+d+g)*c,!0);S(a,(.5+h+e)*b,(.5+d+g)*c,(.5+d+e)*b,(.5+h+g)*c,(.5+d+e)*b,(.5+g)*c);S(a,(.5+d+e)*b,(.5-h+g)*c,(.5+h+e)*
- b,(.5-d+g)*c,(.5+e)*b,(.5-d+g)*c);S(a,(.5-h+e)*b,(.5-d+g)*c,(.5-d+e)*b,(.5-h+g)*c,(.5-d+e)*b,(.5+g)*c);S(a,(.5-d+e)*b,(.5+h+g)*c,(.5-h+e)*b,(.5+d+g)*c,(.475+e)*b,(.5+d+g)*c);a.lineTo(.475*b,.85*c);a.lineTo(.425*b,.85*c);a.lineTo(.425*b,.9*c);a.lineTo(.475*b,.9*c);a.lineTo(.475*b,1*c);a.lineTo(.525*b,1*c);a.lineTo(.525*b,.9*c);a.lineTo(.575*b,.9*c);a.lineTo(.575*b,.85*c);a.lineTo(.525*b,.85*c);U(a);d=.325;e=0;g=-.125;h=4*(Math.SQRT2-1)/3*d;R(a,(.5+d+e)*b,(.5+g)*c,!0,!0);S(a,(.5+d+e)*b,(.5+h+g)*c,(.5+
- h+e)*b,(.5+d+g)*c,(.5+e)*b,(.5+d+g)*c);S(a,(.5-h+e)*b,(.5+d+g)*c,(.5-d+e)*b,(.5+h+g)*c,(.5-d+e)*b,(.5+g)*c);S(a,(.5-d+e)*b,(.5-h+g)*c,(.5-h+e)*b,(.5-d+g)*c,(.5+e)*b,(.5-d+g)*c);S(a,(.5+h+e)*b,(.5-d+g)*c,(.5+d+e)*b,(.5-h+g)*c,(.5+d+e)*b,(.5+g)*c);R(a,(.525+e)*b,(.5+d+g)*c,!0);b=a.q;b.C=new Q(.232,.136);b.D=new Q(.782,.611);b.Qd=Bh;w.u(a);return b},PlusLine:function(a,b,c){a=w.s();R(a,0,.5*c,!1);a.lineTo(1*b,.5*c);a.moveTo(.5*b,0);a.lineTo(.5*b,1*c);b=a.q;w.u(a);return b},XLine:function(a,b,c){a=w.s();
- R(a,0,1*c,!1);a.lineTo(1*b,0);a.moveTo(0,0);a.lineTo(1*b,1*c);b=a.q;w.u(a);return b},AsteriskLine:function(a,b,c){a=w.s();var d=.2/Math.SQRT2;R(a,d*b,(1-d)*c,!1);a.lineTo((1-d)*b,d*c);a.moveTo(d*b,d*c);a.lineTo((1-d)*b,(1-d)*c);a.moveTo(0*b,.5*c);a.lineTo(1*b,.5*c);a.moveTo(.5*b,0*c);a.lineTo(.5*b,1*c);b=a.q;w.u(a);return b},CircleLine:function(a,b,c){var d=.5*O.ya;a=w.s();R(a,1*b,.5*c,!1);S(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);S(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);S(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);
- S(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);b=a.q;b.C=new Q(.146,.146);b.D=new Q(.853,.853);b.Qd=Bh;w.u(a);return b},Pie:function(a,b,c){a=w.s();var d=4*(Math.SQRT2-1)/3*.5;R(a,(.5*Math.SQRT2/2+.5)*b,(.5-.5*Math.SQRT2/2)*c,!0);S(a,.7*b,0*c,.5*b,0*c,.5*b,0*c);S(a,(.5-d+0)*b,0*c,0*b,(.5-d+0)*c,0*b,.5*c);S(a,0*b,(.5+d+0)*c,(.5-d+0)*b,1*c,.5*b,1*c);S(a,(.5+d+0)*b,1*c,1*b,(.5+d+0)*c,1*b,.5*c);a.lineTo(.5*b,.5*c);U(a);b=a.q;w.u(a);return b},PiePiece:function(a,b,c){var d=O.ya/Math.SQRT2*.5,e=Math.SQRT2/2,g=1-
- Math.SQRT2/2;a=w.s();R(a,b,c,!0);S(a,b,(1-d)*c,(e+d)*b,(g+d)*c,e*b,g*c);a.lineTo(0,c);U(a);b=a.q;w.u(a);return b},StopSign:function(a,b,c){a=1/(Math.SQRT2+2);var d=w.s();R(d,a*b,0,!0);d.lineTo((1-a)*b,0);d.lineTo(1*b,a*c);d.lineTo(1*b,(1-a)*c);d.lineTo((1-a)*b,1*c);d.lineTo(a*b,1*c);d.lineTo(0,(1-a)*c);d.lineTo(0,a*c);U(d);b=d.q;b.C=new Q(a/2,a/2);b.D=new Q(1-a/2,1-a/2);w.u(d);return b},LogicImplies:function(a,b,c){var d=a?a.Dc:NaN;isNaN(d)&&(d=.2);a=w.s();R(a,(1-d)*b,0*c,!1);a.lineTo(1*b,.5*c);a.lineTo((1-
- d)*b,c);a.moveTo(0,.5*c);a.lineTo(b,.5*c);b=a.q;b.C=Xb;b.D=new Q(.8,.5);w.u(a);return b},LogicIff:function(a,b,c){var d=a?a.Dc:NaN;isNaN(d)&&(d=.2);a=w.s();R(a,(1-d)*b,0*c,!1);a.lineTo(1*b,.5*c);a.lineTo((1-d)*b,c);a.moveTo(0,.5*c);a.lineTo(b,.5*c);a.moveTo(d*b,0);a.lineTo(0,.5*c);a.lineTo(d*b,c);b=a.q;b.C=new Q(.2,0);b.D=new Q(.8,.5);w.u(a);return b},LogicNot:function(a,b,c){a=w.s();R(a,0,0,!1);a.lineTo(1*b,0);a.lineTo(1*b,1*c);b=a.q;w.u(a);return b},LogicAnd:function(a,b,c){a=w.s();R(a,0,1*c,!1);
- a.lineTo(.5*b,0);a.lineTo(1*b,1*c);b=a.q;b.C=new Q(.25,.5);b.D=new Q(.75,1);w.u(a);return b},LogicOr:function(a,b,c){a=w.s();R(a,0,0,!1);a.lineTo(.5*b,1*c);a.lineTo(1*b,0);b=a.q;b.C=new Q(.219,0);b.D=new Q(.78,.409);w.u(a);return b},LogicXor:function(a,b,c){a=w.s();R(a,.5*b,0,!1);a.lineTo(.5*b,1*c);a.moveTo(0,.5*c);a.lineTo(1*b,.5*c);var d=.5*O.ya;S(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);S(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);S(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);S(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);b=a.q;
- b.Qd=Bh;w.u(a);return b},LogicTruth:function(a,b,c){a=w.s();R(a,0,0,!1);a.lineTo(1*b,0);a.moveTo(.5*b,0);a.lineTo(.5*b,1*c);b=a.q;w.u(a);return b},LogicFalsity:function(a,b,c){a=w.s();R(a,0,1*c,!1);a.lineTo(1*b,1*c);a.moveTo(.5*b,1*c);a.lineTo(.5*b,0);b=a.q;w.u(a);return b},LogicThereExists:function(a,b,c){a=w.s();R(a,0,0,!1);a.lineTo(1*b,0);a.lineTo(1*b,.5*c);a.lineTo(0,.5*c);a.moveTo(1*b,.5*c);a.lineTo(1*b,1*c);a.lineTo(0,1*c);b=a.q;w.u(a);return b},LogicForAll:function(a,b,c){a=w.s();R(a,0,0,!1);
- a.lineTo(.5*b,1*c);a.lineTo(1*b,0);a.moveTo(.25*b,.5*c);a.lineTo(.75*b,.5*c);b=a.q;b.C=new Q(.25,0);b.D=new Q(.75,.5);w.u(a);return b},LogicIsDefinedAs:function(a,b,c){a=w.s();R(a,0,0,!1);a.lineTo(b,0);a.moveTo(0,.5*c);a.lineTo(b,.5*c);a.moveTo(0,c);a.lineTo(b,c);b=a.q;b.C=new Q(.01,.01);b.D=new Q(.99,.49);w.u(a);return b},LogicIntersect:function(a,b,c){var d=.5*O.ya;a=w.s();R(a,0,1*c,!1);a.lineTo(0,.5*c);S(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);S(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);a.lineTo(1*b,1*c);b=
- a.q;b.C=new Q(0,.5);b.D=jc;w.u(a);return b},LogicUnion:function(a,b,c){var d=.5*O.ya;a=w.s();R(a,1*b,0,!1);a.lineTo(1*b,.5*c);S(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);S(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);a.lineTo(0,0);b=a.q;b.C=Xb;b.D=new Q(1,.5);w.u(a);return b},Arrow:function(a,b,c){var d=a?a.Dc:NaN,e=a?a.yt:NaN;isNaN(d)&&(d=.3);isNaN(e)&&(e=.3);a=w.s();R(a,0,(.5-e/2)*c,!0);a.lineTo((1-d)*b,(.5-e/2)*c);a.lineTo((1-d)*b,0);a.lineTo(1*b,.5*c);a.lineTo((1-d)*b,1*c);a.lineTo((1-d)*b,(.5+e/2)*c);a.lineTo(0,
- (.5+e/2)*c);U(a);b=a.q;b.C=new Q(0,.5-e/2);d=O.vl(0,.5+e/2,1,.5+e/2,1-d,1,1,.5,w.O());b.D=new Q(d.x,d.y);w.A(d);w.u(a);return b},ISOProcess:"Chevron",Chevron:function(a,b,c){a=w.s();R(a,0,0,!0);a.lineTo(.5*b,0);a.lineTo(1*b,.5*c);a.lineTo(.5*b,1*c);a.lineTo(0,1*c);a.lineTo(.5*b,.5*c);U(a);b=a.q;w.u(a);return b},DoubleArrow:function(a,b,c){a=w.s();R(a,0,0,!0);a.lineTo(.3*b,.214*c);a.lineTo(.3*b,0);a.lineTo(1*b,.5*c);a.lineTo(.3*b,1*c);a.lineTo(.3*b,.786*c);a.lineTo(0,1*c);U(a);R(a,.3*b,.214*c,!1);
- a.lineTo(.3*b,.786*c);a.hb(!1);b=a.q;w.u(a);return b},DoubleEndArrow:function(a,b,c){a=w.s();R(a,1*b,.5*c,!0);a.lineTo(.7*b,1*c);a.lineTo(.7*b,.7*c);a.lineTo(.3*b,.7*c);a.lineTo(.3*b,1*c);a.lineTo(0,.5*c);a.lineTo(.3*b,0);a.lineTo(.3*b,.3*c);a.lineTo(.7*b,.3*c);a.lineTo(.7*b,0);U(a);b=a.q;c=O.vl(0,.5,.3,0,0,.3,.3,.3,w.O());b.C=new Q(c.x,c.y);c=O.vl(.7,1,1,.5,.7,.7,1,.7,c);b.D=new Q(c.x,c.y);w.A(c);w.u(a);return b},IBeamArrow:function(a,b,c){a=w.s();R(a,1*b,.5*c,!0);a.lineTo(.7*b,1*c);a.lineTo(.7*
- b,.7*c);a.lineTo(.2*b,.7*c);a.lineTo(.2*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(.2*b,0);a.lineTo(.2*b,.3*c);a.lineTo(.7*b,.3*c);a.lineTo(.7*b,0);U(a);b=a.q;b.C=new Q(0,.3);c=O.vl(.7,1,1,.5,.7,.7,1,.7,w.O());b.D=new Q(c.x,c.y);w.A(c);w.u(a);return b},Pointer:function(a,b,c){a=w.s();R(a,1*b,.5*c,!0);a.lineTo(0,1*c);a.lineTo(.2*b,.5*c);a.lineTo(0,0);U(a);b=a.q;b.C=new Q(.2,.35);c=O.vl(.2,.65,1,.65,0,1,1,.5,w.O());b.D=new Q(c.x,c.y);w.A(c);w.u(a);return b},RoundedPointer:function(a,b,c){a=w.s();
- R(a,1*b,.5*c,!0);a.lineTo(0,1*c);S(a,.5*b,.75*c,.5*b,.25*c,0,0);U(a);b=a.q;b.C=new Q(.4,.35);c=O.vl(.2,.65,1,.65,0,1,1,.5,w.O());b.D=new Q(c.x,c.y);w.A(c);w.u(a);return b},SplitEndArrow:function(a,b,c){a=w.s();R(a,1*b,.5*c,!0);a.lineTo(.7*b,1*c);a.lineTo(.7*b,.7*c);a.lineTo(0,.7*c);a.lineTo(.2*b,.5*c);a.lineTo(0,.3*c);a.lineTo(.7*b,.3*c);a.lineTo(.7*b,0);U(a);b=a.q;b.C=new Q(.2,.3);c=O.vl(.7,1,1,.5,.7,.7,1,.7,w.O());b.D=new Q(c.x,c.y);w.A(c);w.u(a);return b},MessageToUser:"SquareArrow",SquareArrow:function(a,
- b,c){a=w.s();R(a,1*b,.5*c,!0);a.lineTo(.7*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(.7*b,0);U(a);b=a.q;b.C=Xb;b.D=new Q(.7,1);w.u(a);return b},Cone1:function(a,b,c){var d=O.ya;a=.5*d;var e=.1*d,d=w.s();R(d,0,.9*c,!0);d.lineTo(.5*b,0);d.lineTo(1*b,.9*c);S(d,1*b,(.9+e)*c,(.5+a)*b,1*c,.5*b,1*c);S(d,(.5-a)*b,1*c,0,(.9+e)*c,0,.9*c);U(d);b=d.q;b.C=new Q(.25,.5);b.D=new Q(.75,.97);w.u(d);return b},Cone2:function(a,b,c){a=w.s();R(a,0,.9*c,!0);S(a,(1-.85/.9)*b,1*c,.85/.9*b,1*c,1*b,.9*c);a.lineTo(.5*b,
- 0);a.lineTo(0,.9*c);U(a);R(a,0,.9*c,!1);S(a,(1-.85/.9)*b,.8*c,.85/.9*b,.8*c,1*b,.9*c);a.hb(!1);b=a.q;b.C=new Q(.25,.5);b.D=new Q(.75,.82);w.u(a);return b},Cube1:function(a,b,c){a=w.s();R(a,.5*b,1*c,!0);a.lineTo(1*b,.85*c);a.lineTo(1*b,.15*c);a.lineTo(.5*b,0*c);a.lineTo(0*b,.15*c);a.lineTo(0*b,.85*c);U(a);R(a,.5*b,1*c,!1);a.lineTo(.5*b,.3*c);a.lineTo(0,.15*c);a.moveTo(.5*b,.3*c);a.lineTo(1*b,.15*c);a.hb(!1);b=a.q;b.C=new Q(0,.3);b.D=new Q(.5,.85);w.u(a);return b},Cube2:function(a,b,c){a=w.s();R(a,
- 0,.3*c,!0);a.lineTo(0*b,1*c);a.lineTo(.7*b,c);a.lineTo(1*b,.7*c);a.lineTo(1*b,0*c);a.lineTo(.3*b,0*c);U(a);R(a,0,.3*c,!1);a.lineTo(.7*b,.3*c);a.lineTo(1*b,0*c);a.moveTo(.7*b,.3*c);a.lineTo(.7*b,1*c);a.hb(!1);b=a.q;b.C=new Q(0,.3);b.D=new Q(.7,1);w.u(a);return b},MagneticData:"Cylinder1",Cylinder1:function(a,b,c){var d=O.ya;a=.5*d;var e=.1*d,d=w.s();R(d,0,.1*c,!0);S(d,0,(.1-e)*c,(.5-a)*b,0,.5*b,0);S(d,(.5+a)*b,0,1*b,(.1-e)*c,1*b,.1*c);d.lineTo(b,.9*c);S(d,1*b,(.9+e)*c,(.5+a)*b,1*c,.5*b,1*c);S(d,(.5-
- a)*b,1*c,0,(.9+e)*c,0,.9*c);d.lineTo(0,.1*c);R(d,0,.1*c,!1);S(d,0,(.1+e)*c,(.5-a)*b,.2*c,.5*b,.2*c);S(d,(.5+a)*b,.2*c,1*b,(.1+e)*c,1*b,.1*c);d.hb(!1);b=d.q;b.C=new Q(0,.2);b.D=new Q(1,.9);w.u(d);return b},Cylinder2:function(a,b,c){var d=O.ya;a=.5*d;var e=.1*d,d=w.s();R(d,0,.9*c,!0);d.lineTo(0,.1*c);S(d,0,(.1-e)*c,(.5-a)*b,0,.5*b,0);S(d,(.5+a)*b,0,1*b,(.1-e)*c,1*b,.1*c);d.lineTo(1*b,.9*c);S(d,1*b,(.9+e)*c,(.5+a)*b,1*c,.5*b,1*c);S(d,(.5-a)*b,1*c,0,(.9+e)*c,0,.9*c);R(d,0,.9*c,!1);S(d,0,(.9-e)*c,(.5-
- a)*b,.8*c,.5*b,.8*c);S(d,(.5+a)*b,.8*c,1*b,(.9-e)*c,1*b,.9*c);d.hb(!1);b=d.q;b.C=new Q(0,.1);b.D=new Q(1,.8);w.u(d);return b},Cylinder3:function(a,b,c){var d=O.ya;a=.1*d;var e=.5*d,d=w.s();R(d,.1*b,0,!0);d.lineTo(.9*b,0);S(d,(.9+a)*b,0,1*b,(.5-e)*c,1*b,.5*c);S(d,1*b,(.5+e)*c,(.9+a)*b,1*c,.9*b,1*c);d.lineTo(.1*b,1*c);S(d,(.1-a)*b,1*c,0,(.5+e)*c,0,.5*c);S(d,0,(.5-e)*c,(.1-a)*b,0,.1*b,0);R(d,.1*b,0,!1);S(d,(.1+a)*b,0,.2*b,(.5-e)*c,.2*b,.5*c);S(d,.2*b,(.5+e)*c,(.1+a)*b,1*c,.1*b,1*c);d.hb(!1);b=d.q;b.C=
- new Q(.2,0);b.D=new Q(.9,1);w.u(d);return b},DirectData:"Cylinder4",Cylinder4:function(a,b,c){var d=O.ya;a=.1*d;var e=.5*d,d=w.s();R(d,.9*b,0,!0);S(d,(.9+a)*b,0,1*b,(.5-e)*c,1*b,.5*c);S(d,1*b,(.5+e)*c,(.9+a)*b,1*c,.9*b,1*c);d.lineTo(.1*b,1*c);S(d,(.1-a)*b,1*c,0,(.5+e)*c,0,.5*c);S(d,0,(.5-e)*c,(.1-a)*b,0,.1*b,0);d.lineTo(.9*b,0);R(d,.9*b,0,!1);S(d,(.9-a)*b,0,.8*b,(.5-e)*c,.8*b,.5*c);S(d,.8*b,(.5+e)*c,(.9-a)*b,1*c,.9*b,1*c);d.hb(!1);b=d.q;b.C=new Q(.1,0);b.D=new Q(.8,1);w.u(d);return b},Prism1:function(a,
- b,c){a=w.s();R(a,.25*b,.25*c,!0);a.lineTo(.75*b,0);a.lineTo(b,.5*c);a.lineTo(.5*b,c);a.lineTo(0,c);U(a);R(a,.25*b,.25*c,!1);a.lineTo(.5*b,c);a.hb(!1);b=a.q;b.C=new Q(.408,.172);b.D=new Q(.833,.662);w.u(a);return b},Prism2:function(a,b,c){a=w.s();R(a,0,.25*c,!0);a.lineTo(.75*b,0);a.lineTo(1*b,.25*c);a.lineTo(.75*b,.75*c);a.lineTo(0,1*c);U(a);R(a,0,c,!1);a.lineTo(.25*b,.5*c);a.lineTo(b,.25*c);a.moveTo(0,.25*c);a.lineTo(.25*b,.5*c);a.hb(!1);b=a.q;b.C=new Q(.25,.5);b.D=new Q(.75,.75);w.u(a);return b},
- Pyramid1:function(a,b,c){a=w.s();R(a,.5*b,0,!0);a.lineTo(b,.75*c);a.lineTo(.5*b,1*c);a.lineTo(0,.75*c);U(a);R(a,.5*b,0,!1);a.lineTo(.5*b,1*c);a.hb(!1);b=a.q;b.C=new Q(.25,.367);b.D=new Q(.75,.875);w.u(a);return b},Pyramid2:function(a,b,c){a=w.s();R(a,.5*b,0,!0);a.lineTo(b,.85*c);a.lineTo(.5*b,1*c);a.lineTo(0,.85*c);U(a);R(a,.5*b,0,!1);a.lineTo(.5*b,.7*c);a.lineTo(0,.85*c);a.moveTo(.5*b,.7*c);a.lineTo(1*b,.85*c);a.hb(!1);b=a.q;b.C=new Q(.25,.367);b.D=new Q(.75,.875);w.u(a);return b},Actor:function(a,
- b,c){var d=O.ya,e=.2*d,g=.1*d,h=.5,k=.1;a=w.s();R(a,h*b,(k+.1)*c,!0);S(a,(h-e)*b,(k+.1)*c,(h-.2)*b,(k+g)*c,(h-.2)*b,k*c);S(a,(h-.2)*b,(k-g)*c,(h-e)*b,(k-.1)*c,h*b,(k-.1)*c);S(a,(h+e)*b,(k-.1)*c,(h+.2)*b,(k-g)*c,(h+.2)*b,k*c);S(a,(h+.2)*b,(k+g)*c,(h+e)*b,(k+.1)*c,h*b,(k+.1)*c);e=.05;g=d*e;R(a,.5*b,.2*c,!0);a.lineTo(.95*b,.2*c);h=.95;k=.25;S(a,(h+g)*b,(k-e)*c,(h+e)*b,(k-g)*c,(h+e)*b,k*c);a.lineTo(1*b,.6*c);a.lineTo(.85*b,.6*c);a.lineTo(.85*b,.35*c);e=.025;g=d*e;h=.825;k=.35;S(a,(h+e)*b,(k-g)*c,(h+g)*
- b,(k-e)*c,h*b,(k-e)*c);S(a,(h-g)*b,(k-e)*c,(h-e)*b,(k-g)*c,(h-e)*b,k*c);a.lineTo(.8*b,1*c);a.lineTo(.55*b,1*c);a.lineTo(.55*b,.7*c);e=.05;g=d*e;h=.5;k=.7;S(a,(h+e)*b,(k-g)*c,(h+g)*b,(k-e)*c,h*b,(k-e)*c);S(a,(h-g)*b,(k-e)*c,(h-e)*b,(k-g)*c,(h-e)*b,k*c);a.lineTo(.45*b,1*c);a.lineTo(.2*b,1*c);a.lineTo(.2*b,.35*c);e=.025;g=d*e;h=.175;k=.35;S(a,(h+e)*b,(k-g)*c,(h+g)*b,(k-e)*c,h*b,(k-e)*c);S(a,(h-g)*b,(k-e)*c,(h-e)*b,(k-g)*c,(h-e)*b,k*c);a.lineTo(.15*b,.6*c);a.lineTo(0*b,.6*c);a.lineTo(0*b,.25*c);e=.05;
- g=d*e;h=.05;k=.25;S(a,(h-e)*b,(k-g)*c,(h-g)*b,(k-e)*c,h*b,(k-e)*c);a.lineTo(.5*b,.2*c);b=a.q;b.C=new Q(.2,.2);b.D=new Q(.8,.65);w.u(a);return b},Card:function(a,b,c){a=w.s();R(a,1*b,0*c,!0);a.lineTo(1*b,1*c);a.lineTo(0*b,1*c);a.lineTo(0*b,.2*c);a.lineTo(.2*b,0*c);U(a);b=a.q;b.C=new Q(0,.2);b.D=jc;w.u(a);return b},Collate:function(a,b,c){a=w.s();R(a,.5*b,.5*c,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(.5*b,.5*c);R(a,.5*b,.5*c,!0);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(.5*b,.5*c);b=a.q;b.C=new Q(.25,
- 0);b.D=new Q(.75,.25);w.u(a);return b},CreateRequest:function(a,b,c){a=a?a.Dc:NaN;isNaN(a)&&(a=.1);var d=w.s();R(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);U(d);R(d,0,a*c,!1);d.lineTo(1*b,a*c);d.moveTo(0,(1-a)*c);d.lineTo(1*b,(1-a)*c);d.hb(!1);b=d.q;b.C=new Q(0,a);b.D=new Q(1,1-a);w.u(d);return b},Database:function(a,b,c){a=w.s();var d=O.ya,e=.5*d,d=.1*d;R(a,1*b,.1*c,!0);a.lineTo(1*b,.9*c);S(a,1*b,(.9+d)*c,(.5+e)*b,1*c,.5*b,1*c);S(a,(.5-e)*b,1*c,0,(.9+d)*c,0,.9*c);a.lineTo(0,.1*c);
- S(a,0,(.1-d)*c,(.5-e)*b,0,.5*b,0);S(a,(.5+e)*b,0,1*b,(.1-d)*c,1*b,.1*c);R(a,1*b,.1*c,!1);S(a,1*b,(.1+d)*c,(.5+e)*b,.2*c,.5*b,.2*c);S(a,(.5-e)*b,.2*c,0,(.1+d)*c,0,.1*c);a.moveTo(1*b,.2*c);S(a,1*b,(.2+d)*c,(.5+e)*b,.3*c,.5*b,.3*c);S(a,(.5-e)*b,.3*c,0,(.2+d)*c,0,.2*c);a.moveTo(1*b,.3*c);S(a,1*b,(.3+d)*c,(.5+e)*b,.4*c,.5*b,.4*c);S(a,(.5-e)*b,.4*c,0,(.3+d)*c,0,.3*c);a.hb(!1);b=a.q;b.C=new Q(0,.4);b.D=new Q(1,.9);w.u(a);return b},StoredData:"DataStorage",DataStorage:function(a,b,c){a=w.s();R(a,0,0,!0);
- a.lineTo(.75*b,0);S(a,1*b,0,1*b,1*c,.75*b,1*c);a.lineTo(0,1*c);S(a,.25*b,.9*c,.25*b,.1*c,0,0);U(a);b=a.q;b.C=new Q(.226,0);b.D=new Q(.81,1);w.u(a);return b},DiskStorage:function(a,b,c){a=w.s();var d=O.ya,e=.5*d,d=.1*d;R(a,1*b,.1*c,!0);a.lineTo(1*b,.9*c);S(a,1*b,(.9+d)*c,(.5+e)*b,1*c,.5*b,1*c);S(a,(.5-e)*b,1*c,0,(.9+d)*c,0,.9*c);a.lineTo(0,.1*c);S(a,0,(.1-d)*c,(.5-e)*b,0,.5*b,0);S(a,(.5+e)*b,0,1*b,(.1-d)*c,1*b,.1*c);R(a,1*b,.1*c,!1);S(a,1*b,(.1+d)*c,(.5+e)*b,.2*c,.5*b,.2*c);S(a,(.5-e)*b,.2*c,0,(.1+
- d)*c,0,.1*c);a.moveTo(1*b,.2*c);S(a,1*b,(.2+d)*c,(.5+e)*b,.3*c,.5*b,.3*c);S(a,(.5-e)*b,.3*c,0,(.2+d)*c,0,.2*c);a.hb(!1);b=a.q;b.C=new Q(0,.3);b.D=new Q(1,.9);w.u(a);return b},Display:function(a,b,c){a=w.s();R(a,.25*b,0,!0);a.lineTo(.75*b,0);S(a,1*b,0,1*b,1*c,.75*b,1*c);a.lineTo(.25*b,1*c);a.lineTo(0,.5*c);U(a);b=a.q;b.C=new Q(.25,0);b.D=new Q(.75,1);w.u(a);return b},DividedEvent:function(a,b,c){a=a?a.Dc:NaN;isNaN(a)?a=.2:.15>a&&(a=.15);var d=w.s(),e=.2*O.ya;R(d,0,.2*c,!0);S(d,0,(.2-e)*c,(.2-e)*b,
- 0,.2*b,0);d.lineTo(.8*b,0);S(d,(.8+e)*b,0,1*b,(.2-e)*c,1*b,.2*c);d.lineTo(1*b,.8*c);S(d,1*b,(.8+e)*c,(.8+e)*b,1*c,.8*b,1*c);d.lineTo(.2*b,1*c);S(d,(.2-e)*b,1*c,0,(.8+e)*c,0,.8*c);d.lineTo(0,.2*c);R(d,0,a*c,!1);d.lineTo(1*b,a*c);d.hb(!1);b=d.q;b.C=new Q(0,a);b.D=new Q(1,1-a);w.u(d);return b},DividedProcess:function(a,b,c){a=a?a.Dc:NaN;if(isNaN(a)||.1>a)a=.1;var d=w.s();R(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);U(d);R(d,0,a*c,!1);d.lineTo(1*b,a*c);d.hb(!1);b=d.q;b.C=new Q(0,a);b.D=
- jc;w.u(d);return b},Document:function(a,b,c){c/=.8;a=w.s();R(a,0,.7*c,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(1*b,.7*c);S(a,.5*b,.4*c,.5*b,1*c,0,.7*c);U(a);b=a.q;b.C=Xb;b.D=new Q(1,.6);w.u(a);return b},ExternalOrganization:function(a,b,c){a=a?a.Dc:NaN;if(isNaN(a)||.2>a)a=.2;var d=w.s();R(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);U(d);R(d,a*b,0,!1);d.lineTo(0,a*c);d.moveTo(1*b,a*c);d.lineTo((1-a)*b,0);d.moveTo(0,(1-a)*c);d.lineTo(a*b,1*c);d.moveTo((1-a)*b,1*c);d.lineTo(1*b,(1-
- a)*c);d.hb(!1);b=d.q;b.C=new Q(a/2,a/2);b.D=new Q(1-a/2,1-a/2);w.u(d);return b},ExternalProcess:function(a,b,c){a=w.s();R(a,.5*b,0,!0);a.lineTo(1*b,.5*c);a.lineTo(.5*b,1*c);a.lineTo(0,.5*c);U(a);R(a,.1*b,.4*c,!1);a.lineTo(.1*b,.6*c);a.moveTo(.9*b,.6*c);a.lineTo(.9*b,.4*c);a.moveTo(.6*b,.1*c);a.lineTo(.4*b,.1*c);a.moveTo(.4*b,.9*c);a.lineTo(.6*b,.9*c);a.hb(!1);b=a.q;b.C=new Q(.25,.25);b.D=new Q(.75,.75);w.u(a);return b},File:function(a,b,c){a=w.s();R(a,0,0,!0);a.lineTo(.75*b,0);a.lineTo(1*b,.25*c);
- a.lineTo(1*b,1*c);a.lineTo(0,1*c);U(a);R(a,.75*b,0,!1);a.lineTo(.75*b,.25*c);a.lineTo(1*b,.25*c);a.hb(!1);b=a.q;b.C=new Q(0,.25);b.D=jc;w.u(a);return b},Interrupt:function(a,b,c){a=w.s();R(a,1*b,.5*c,!0);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(1*b,.5*c);R(a,1*b,.5*c,!1);a.lineTo(1*b,1*c);R(a,1*b,.5*c,!1);a.lineTo(1*b,0);b=a.q;b.C=new Q(0,.25);b.D=new Q(.5,.75);w.u(a);return b},InternalStorage:function(a,b,c){var d=a?a.Dc:NaN;a=a?a.yt:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.1);var e=w.s();R(e,0,0,!0);e.lineTo(1*
- b,0);e.lineTo(1*b,1*c);e.lineTo(0,1*c);U(e);R(e,d*b,0,!1);e.lineTo(d*b,1*c);e.moveTo(0,a*c);e.lineTo(1*b,a*c);e.hb(!1);b=e.q;b.C=new Q(d,a);b.D=jc;w.u(e);return b},Junction:function(a,b,c){a=w.s();var d=1/Math.SQRT2,e=(1-1/Math.SQRT2)/2,g=.5*O.ya;R(a,1*b,.5*c,!0);S(a,1*b,(.5+g)*c,(.5+g)*b,1*c,.5*b,1*c);S(a,(.5-g)*b,1*c,0,(.5+g)*c,0,.5*c);S(a,0,(.5-g)*c,(.5-g)*b,0,.5*b,0);S(a,(.5+g)*b,0,1*b,(.5-g)*c,1*b,.5*c);R(a,(e+d)*b,(e+d)*c,!1);a.lineTo(e*b,e*c);a.moveTo(e*b,(e+d)*c);a.lineTo((e+d)*b,e*c);a.hb(!1);
- b=a.q;b.Qd=Bh;w.u(a);return b},LinedDocument:function(a,b,c){c/=.8;a=w.s();R(a,0,.7*c,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(1*b,.7*c);S(a,.5*b,.4*c,.5*b,1*c,0,.7*c);U(a);R(a,.1*b,0,!1);a.lineTo(.1*b,.75*c);a.hb(!1);b=a.q;b.C=new Q(.1,0);b.D=new Q(1,.6);w.u(a);return b},LoopLimit:function(a,b,c){a=w.s();R(a,0,1*c,!0);a.lineTo(0,.25*c);a.lineTo(.25*b,0);a.lineTo(.75*b,0);a.lineTo(1*b,.25*c);a.lineTo(1*b,1*c);U(a);b=a.q;b.C=new Q(0,.25);b.D=jc;w.u(a);return b},SequentialData:"MagneticTape",MagneticTape:function(a,
- b,c){a=w.s();var d=.5*O.ya;R(a,.5*b,1*c,!0);S(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);S(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);S(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);S(a,1*b,(.5+d)*c,(.5+d)*b,.9*c,.6*b,.9*c);a.lineTo(1*b,.9*c);a.lineTo(1*b,1*c);a.lineTo(.5*b,1*c);b=a.q;b.C=new Q(.15,.15);b.D=new Q(.85,.8);w.u(a);return b},ManualInput:function(a,b,c){a=w.s();R(a,1*b,0,!0);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.25*c);U(a);b=a.q;b.C=new Q(0,.25);b.D=jc;w.u(a);return b},MessageFromUser:function(a,b,c){a=a?a.Dc:
- NaN;isNaN(a)&&(a=.7);var d=w.s();R(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(a*b,.5*c);d.lineTo(1*b,1*c);d.lineTo(0,1*c);U(d);b=d.q;b.C=Xb;b.D=new Q(a,1);w.u(d);return b},MicroformProcessing:function(a,b,c){a=a?a.Dc:NaN;isNaN(a)&&(a=.25);var d=w.s();R(d,0,0,!0);d.lineTo(.5*b,a*c);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(.5*b,(1-a)*c);d.lineTo(0,1*c);U(d);b=d.q;b.C=new Q(0,a);b.D=new Q(1,1-a);w.u(d);return b},MicroformRecording:function(a,b,c){a=w.s();R(a,0,0,!0);a.lineTo(.75*b,.25*c);a.lineTo(1*b,.15*
- c);a.lineTo(1*b,.85*c);a.lineTo(.75*b,.75*c);a.lineTo(0,1*c);U(a);b=a.q;b.C=new Q(0,.25);b.D=new Q(1,.75);w.u(a);return b},MultiDocument:function(a,b,c){c/=.8;a=w.s();R(a,b,0,!0);a.lineTo(b,.5*c);S(a,.96*b,.47*c,.93*b,.45*c,.9*b,.44*c);a.lineTo(.9*b,.6*c);S(a,.86*b,.57*c,.83*b,.55*c,.8*b,.54*c);a.lineTo(.8*b,.7*c);S(a,.4*b,.4*c,.4*b,1*c,0,.7*c);a.lineTo(0,.2*c);a.lineTo(.1*b,.2*c);a.lineTo(.1*b,.1*c);a.lineTo(.2*b,.1*c);a.lineTo(.2*b,0);U(a);R(a,.1*b,.2*c,!1);a.lineTo(.8*b,.2*c);a.lineTo(.8*b,.54*
- c);a.moveTo(.2*b,.1*c);a.lineTo(.9*b,.1*c);a.lineTo(.9*b,.44*c);a.hb(!1);b=a.q;b.C=new Q(0,.25);b.D=new Q(.8,.77);w.u(a);return b},MultiProcess:function(a,b,c){a=w.s();R(a,.1*b,.1*c,!0);a.lineTo(.2*b,.1*c);a.lineTo(.2*b,0);a.lineTo(1*b,0);a.lineTo(1*b,.8*c);a.lineTo(.9*b,.8*c);a.lineTo(.9*b,.9*c);a.lineTo(.8*b,.9*c);a.lineTo(.8*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.2*c);a.lineTo(.1*b,.2*c);U(a);R(a,.2*b,.1*c,!1);a.lineTo(.9*b,.1*c);a.lineTo(.9*b,.8*c);a.moveTo(.1*b,.2*c);a.lineTo(.8*b,.2*c);a.lineTo(.8*
- b,.9*c);a.hb(!1);b=a.q;b.C=new Q(0,.2);b.D=new Q(.8,1);w.u(a);return b},OfflineStorage:function(a,b,c){a=a?a.Dc:NaN;isNaN(a)&&(a=.1);var d=1-a,e=w.s();R(e,0,0,!0);e.lineTo(1*b,0);e.lineTo(.5*b,1*c);U(e);R(e,.5*a*b,a*c,!1);e.lineTo((1-.5*a)*b,a*c);e.hb(!1);b=e.q;b.C=new Q(d/4+.5*a,a);b.D=new Q(3*d/4+.5*a,a+.5*d);w.u(e);return b},OffPageConnector:function(a,b,c){a=w.s();R(a,0,0,!0);a.lineTo(.75*b,0);a.lineTo(1*b,.5*c);a.lineTo(.75*b,1*c);a.lineTo(0,1*c);U(a);b=a.q;b.C=Xb;b.D=new Q(.75,1);w.u(a);return b},
- Or:function(a,b,c){a=w.s();var d=.5*O.ya;R(a,1*b,.5*c,!0);S(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);S(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);S(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);S(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);R(a,1*b,.5*c,!1);a.lineTo(0,.5*c);a.moveTo(.5*b,1*c);a.lineTo(.5*b,0);a.hb(!1);b=a.q;b.Qd=Bh;w.u(a);return b},PaperTape:function(a,b,c){c/=.8;a=w.s();R(a,0,.7*c,!0);a.lineTo(0,.3*c);S(a,.5*b,.6*c,.5*b,0,1*b,.3*c);a.lineTo(1*b,.7*c);S(a,.5*b,.4*c,.5*b,1*c,0,.7*c);U(a);b=a.q;b.C=new Q(0,.49);b.D=
- new Q(1,.75);w.u(a);return b},PrimitiveFromCall:function(a,b,c){var d=a?a.Dc:NaN;a=a?a.yt:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.3);var e=w.s();R(e,0,0,!0);e.lineTo(1*b,0);e.lineTo((1-a)*b,.5*c);e.lineTo(1*b,1*c);e.lineTo(0,1*c);U(e);b=e.q;b.C=new Q(d,0);b.D=new Q(1-a,1);w.u(e);return b},PrimitiveToCall:function(a,b,c){var d=a?a.Dc:NaN;a=a?a.yt:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.3);var e=w.s();R(e,0,0,!0);e.lineTo((1-a)*b,0);e.lineTo(1*b,.5*c);e.lineTo((1-a)*b,1*c);e.lineTo(0,1*c);U(e);b=e.q;b.C=new Q(d,
- 0);b.D=new Q(1-a,1);w.u(e);return b},Subroutine:"Procedure",Procedure:function(a,b,c){a=a?a.Dc:NaN;isNaN(a)&&(a=.1);var d=w.s();R(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);U(d);R(d,(1-a)*b,0,!1);d.lineTo((1-a)*b,1*c);d.moveTo(a*b,0);d.lineTo(a*b,1*c);d.hb(!1);b=d.q;b.C=new Q(a,0);b.D=new Q(1-a,1);w.u(d);return b},Process:function(a,b,c){a=a?a.Dc:NaN;isNaN(a)&&(a=.1);var d=w.s();R(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);U(d);R(d,a*b,0,!1);d.lineTo(a*b,1*c);d.hb(!1);
- b=d.q;b.C=new Q(a,0);b.D=jc;w.u(d);return b},Sort:function(a,b,c){a=w.s();R(a,.5*b,0,!0);a.lineTo(1*b,.5*c);a.lineTo(.5*b,1*c);a.lineTo(0,.5*c);U(a);R(a,0,.5*c,!1);a.lineTo(1*b,.5*c);a.hb(!1);b=a.q;b.C=new Q(.25,.25);b.D=new Q(.75,.5);w.u(a);return b},Start:function(a,b,c){a=w.s();R(a,.25*b,0,!0);R(a,.25*b,0,!0);a.arcTo(270,180,.75*b,.5*c,.25*b,.5*c);a.arcTo(90,180,.25*b,.5*c,.25*b,.5*c);R(a,.25*b,0,!1);a.lineTo(.25*b,1*c);a.moveTo(.75*b,0);a.lineTo(.75*b,1*c);a.hb(!1);b=a.q;b.C=new Q(.25,0);b.D=
- new Q(.75,1);w.u(a);return b},Terminator:function(a,b,c){a=w.s();R(a,.25*b,0,!0);a.arcTo(270,180,.75*b,.5*c,.25*b,.5*c);a.arcTo(90,180,.25*b,.5*c,.25*b,.5*c);b=a.q;b.C=new Q(.23,0);b.D=new Q(.77,1);w.u(a);return b},TransmittalTape:function(a,b,c){a=a?a.Dc:NaN;isNaN(a)&&(a=.1);var d=w.s();R(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(.75*b,(1-a)*c);d.lineTo(0,(1-a)*c);U(d);b=d.q;b.C=Xb;b.D=new Q(1,1-a);w.u(d);return b},AndGate:function(a,b,c){a=w.s();var d=.5*O.ya;R(a,0,0,!0);a.lineTo(.5*
- b,0);S(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);S(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);a.lineTo(0,1*c);U(a);b=a.q;b.C=Xb;b.D=new Q(.55,1);w.u(a);return b},Buffer:function(a,b,c){a=w.s();R(a,0,0,!0);a.lineTo(1*b,.5*c);a.lineTo(0,1*c);U(a);b=a.q;b.C=new Q(0,.25);b.D=new Q(.5,.75);w.u(a);return b},Clock:function(a,b,c){a=w.s();var d=.5*O.ya;R(a,1*b,.5*c,!0);S(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);S(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);S(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);S(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);
- R(a,1*b,.5*c,!1);a.lineTo(1*b,.5*c);R(a,.8*b,.75*c,!1);a.lineTo(.8*b,.25*c);a.lineTo(.6*b,.25*c);a.lineTo(.6*b,.75*c);a.lineTo(.4*b,.75*c);a.lineTo(.4*b,.25*c);a.lineTo(.2*b,.25*c);a.lineTo(.2*b,.75*c);a.hb(!1);b=a.q;b.Qd=Bh;w.u(a);return b},Ground:function(a,b,c){a=w.s();R(a,.5*b,0,!1);a.lineTo(.5*b,.4*c);a.moveTo(.2*b,.6*c);a.lineTo(.8*b,.6*c);a.moveTo(.3*b,.8*c);a.lineTo(.7*b,.8*c);a.moveTo(.4*b,1*c);a.lineTo(.6*b,1*c);b=a.q;w.u(a);return b},Inverter:function(a,b,c){a=w.s();var d=.1*O.ya;R(a,.8*
- b,.5*c,!0);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(.8*b,.5*c);R(a,1*b,.5*c,!0);S(a,1*b,(.5+d)*c,(.9+d)*b,.6*c,.9*b,.6*c);S(a,(.9-d)*b,.6*c,.8*b,(.5+d)*c,.8*b,.5*c);S(a,.8*b,(.5-d)*c,(.9-d)*b,.4*c,.9*b,.4*c);S(a,(.9+d)*b,.4*c,1*b,(.5-d)*c,1*b,.5*c);b=a.q;b.C=new Q(0,.25);b.D=new Q(.4,.75);w.u(a);return b},NandGate:function(a,b,c){a=w.s();var d=O.ya,e=.5*d,g=.4*d,d=.1*d;R(a,.8*b,.5*c,!0);S(a,.8*b,(.5+g)*c,(.4+e)*b,1*c,.4*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(.4*b,0);S(a,(.4+e)*b,0,.8*b,(.5-g)*
- c,.8*b,.5*c);R(a,1*b,.5*c,!0);S(a,1*b,(.5+d)*c,(.9+d)*b,.6*c,.9*b,.6*c);S(a,(.9-d)*b,.6*c,.8*b,(.5+d)*c,.8*b,.5*c);S(a,.8*b,(.5-d)*c,(.9-d)*b,.4*c,.9*b,.4*c);S(a,(.9+d)*b,.4*c,1*b,(.5-d)*c,1*b,.5*c);b=a.q;b.C=new Q(0,.05);b.D=new Q(.55,.95);w.u(a);return b},NorGate:function(a,b,c){a=w.s();var d=O.ya,e=.5,g=d*e,h=0,k=.5;R(a,.8*b,.5*c,!0);S(a,.7*b,(k+g)*c,(h+g)*b,(k+e)*c,0,1*c);S(a,.25*b,.75*c,.25*b,.25*c,0,0);S(a,(h+g)*b,(k-e)*c,.7*b,(k-g)*c,.8*b,.5*c);e=.1;g=.1*d;h=.9;k=.5;R(a,(h-e)*b,k*c,!0);S(a,
- (h-e)*b,(k-g)*c,(h-g)*b,(k-e)*c,h*b,(k-e)*c);S(a,(h+g)*b,(k-e)*c,(h+e)*b,(k-g)*c,(h+e)*b,k*c);S(a,(h+e)*b,(k+g)*c,(h+g)*b,(k+e)*c,h*b,(k+e)*c);S(a,(h-g)*b,(k+e)*c,(h-e)*b,(k+g)*c,(h-e)*b,k*c);b=a.q;b.C=new Q(.2,.25);b.D=new Q(.6,.75);w.u(a);return b},OrGate:function(a,b,c){a=w.s();var d=.5*O.ya;R(a,0,0,!0);S(a,(0+d+d)*b,0*c,.8*b,(.5-d)*c,1*b,.5*c);S(a,.8*b,(.5+d)*c,(0+d+d)*b,1*c,0,1*c);S(a,.25*b,.75*c,.25*b,.25*c,0,0);U(a);b=a.q;b.C=new Q(.2,.25);b.D=new Q(.75,.75);w.u(a);return b},XnorGate:function(a,
- b,c){a=w.s();var d=O.ya,e=.5,g=d*e,h=.2,k=.5;R(a,.1*b,0,!1);S(a,.35*b,.25*c,.35*b,.75*c,.1*b,1*c);R(a,.8*b,.5*c,!0);S(a,.7*b,(k+g)*c,(h+g)*b,(k+e)*c,.2*b,1*c);S(a,.45*b,.75*c,.45*b,.25*c,.2*b,0);S(a,(h+g)*b,(k-e)*c,.7*b,(k-g)*c,.8*b,.5*c);e=.1;g=.1*d;h=.9;k=.5;R(a,(h-e)*b,k*c,!0);S(a,(h-e)*b,(k-g)*c,(h-g)*b,(k-e)*c,h*b,(k-e)*c);S(a,(h+g)*b,(k-e)*c,(h+e)*b,(k-g)*c,(h+e)*b,k*c);S(a,(h+e)*b,(k+g)*c,(h+g)*b,(k+e)*c,h*b,(k+e)*c);S(a,(h-g)*b,(k+e)*c,(h-e)*b,(k+g)*c,(h-e)*b,k*c);b=a.q;b.C=new Q(.4,.25);
- b.D=new Q(.65,.75);w.u(a);return b},XorGate:function(a,b,c){a=w.s();var d=.5*O.ya;R(a,.1*b,0,!1);S(a,.35*b,.25*c,.35*b,.75*c,.1*b,1*c);R(a,.2*b,0,!0);S(a,(.2+d)*b,0*c,.9*b,(.5-d)*c,1*b,.5*c);S(a,.9*b,(.5+d)*c,(.2+d)*b,1*c,.2*b,1*c);S(a,.45*b,.75*c,.45*b,.25*c,.2*b,0);U(a);b=a.q;b.C=new Q(.4,.25);b.D=new Q(.8,.75);w.u(a);return b},Capacitor:function(a,b,c){a=w.s();R(a,0,0,!1);a.lineTo(0,1*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.q;w.u(a);return b},Resistor:function(a,b,c){a=w.s();R(a,0,.5*c,!1);a.lineTo(.1*
- b,0);a.lineTo(.2*b,1*c);a.lineTo(.3*b,0);a.lineTo(.4*b,1*c);a.lineTo(.5*b,0);a.lineTo(.6*b,1*c);a.lineTo(.7*b,.5*c);b=a.q;w.u(a);return b},Inductor:function(a,b,c){a=w.s();var d=.1*O.ya,e=.1;R(a,(e-.5*d)*b,c,!1);S(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.3;S(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);S(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.5;S(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);S(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.7;S(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);S(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.9;S(a,(e+.1)*b,0,(e+d)*b,c,
- (e+.5*d)*b,c);b=a.q;w.u(a);return b},ACvoltageSource:function(a,b,c){a=w.s();var d=.5*O.ya;R(a,0*b,.5*c,!1);S(a,0*b,(.5-d)*c,(.5-d)*b,0*c,.5*b,0*c);S(a,(.5+d)*b,0*c,1*b,(.5-d)*c,1*b,.5*c);S(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);S(a,(.5-d)*b,1*c,0*b,(.5+d)*c,0*b,.5*c);a.moveTo(.1*b,.5*c);S(a,.5*b,0*c,.5*b,1*c,.9*b,.5*c);b=a.q;b.Qd=Bh;w.u(a);return b},DCvoltageSource:function(a,b,c){a=w.s();R(a,0,.75*c,!1);a.lineTo(0,.25*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.q;w.u(a);return b},Diode:function(a,b,
- c){a=w.s();R(a,1*b,0,!1);a.lineTo(1*b,.5*c);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(1*b,.5*c);a.lineTo(1*b,1*c);b=a.q;b.C=new Q(0,.25);b.D=new Q(.5,.75);w.u(a);return b},Wifi:function(a,b,c){var d=b,e=c;b*=.38;c*=.6;a=w.s();var g=O.ya,h=.8*g,k=.8,l=0,m=.5,d=(d-b)/2,e=(e-c)/2;R(a,l*b+d,(m+k)*c+e,!0);S(a,(l-h)*b+d,(m+k)*c+e,(l-k)*b+d,(m+h)*c+e,(l-k)*b+d,m*c+e);S(a,(l-k)*b+d,(m-h)*c+e,(l-h)*b+d,(m-k)*c+e,l*b+d,(m-k)*c+e);S(a,l*b+d,(m-k)*c+e,(l-k+.5*h)*b+d,(m-h)*c+e,(l-k+.5*h)*b+d,m*c+e);S(a,(l-k+.5*h)*
- b+d,(m+h)*c+e,l*b+d,(m+k)*c+e,l*b+d,(m+k)*c+e);U(a);h=.4*g;k=.4;l=.2;m=.5;R(a,l*b+d,(m+k)*c+e,!0);S(a,(l-h)*b+d,(m+k)*c+e,(l-k)*b+d,(m+h)*c+e,(l-k)*b+d,m*c+e);S(a,(l-k)*b+d,(m-h)*c+e,(l-h)*b+d,(m-k)*c+e,l*b+d,(m-k)*c+e);S(a,l*b+d,(m-k)*c+e,(l-k+.5*h)*b+d,(m-h)*c+e,(l-k+.5*h)*b+d,m*c+e);S(a,(l-k+.5*h)*b+d,(m+h)*c+e,l*b+d,(m+k)*c+e,l*b+d,(m+k)*c+e);U(a);h=.2*g;k=.2;m=l=.5;R(a,(l-k)*b+d,m*c+e,!0);S(a,(l-k)*b+d,(m-h)*c+e,(l-h)*b+d,(m-k)*c+e,l*b+d,(m-k)*c+e);S(a,(l+h)*b+d,(m-k)*c+e,(l+k)*b+d,(m-h)*c+e,
- (l+k)*b+d,m*c+e);S(a,(l+k)*b+d,(m+h)*c+e,(l+h)*b+d,(m+k)*c+e,l*b+d,(m+k)*c+e);S(a,(l-h)*b+d,(m+k)*c+e,(l-k)*b+d,(m+h)*c+e,(l-k)*b+d,m*c+e);h=.4*g;k=.4;l=.8;m=.5;R(a,l*b+d,(m-k)*c+e,!0);S(a,(l+h)*b+d,(m-k)*c+e,(l+k)*b+d,(m-h)*c+e,(l+k)*b+d,m*c+e);S(a,(l+k)*b+d,(m+h)*c+e,(l+h)*b+d,(m+k)*c+e,l*b+d,(m+k)*c+e);S(a,l*b+d,(m+k)*c+e,(l+k-.5*h)*b+d,(m+h)*c+e,(l+k-.5*h)*b+d,m*c+e);S(a,(l+k-.5*h)*b+d,(m-h)*c+e,l*b+d,(m-k)*c+e,l*b+d,(m-k)*c+e);U(a);h=.8*g;k=.8;l=1;m=.5;R(a,l*b+d,(m-k)*c+e,!0);S(a,(l+h)*b+d,(m-
- k)*c+e,(l+k)*b+d,(m-h)*c+e,(l+k)*b+d,m*c+e);S(a,(l+k)*b+d,(m+h)*c+e,(l+h)*b+d,(m+k)*c+e,l*b+d,(m+k)*c+e);S(a,l*b+d,(m+k)*c+e,(l+k-.5*h)*b+d,(m+h)*c+e,(l+k-.5*h)*b+d,m*c+e);S(a,(l+k-.5*h)*b+d,(m-h)*c+e,l*b+d,(m-k)*c+e,l*b+d,(m-k)*c+e);U(a);b=a.q;w.u(a);return b},Email:function(a,b,c){a=w.s();R(a,0,0,!0);a.lineTo(1*b,0);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0);U(a);R(a,0,0,!1);a.lineTo(.5*b,.6*c);a.lineTo(1*b,0);a.moveTo(0,1*c);a.lineTo(.45*b,.54*c);a.moveTo(1*b,1*c);a.lineTo(.55*b,.54*c);a.hb(!1);
- b=a.q;w.u(a);return b},Ethernet:function(a,b,c){a=w.s();R(a,.35*b,0,!0);a.lineTo(.65*b,0);a.lineTo(.65*b,.4*c);a.lineTo(.35*b,.4*c);a.lineTo(.35*b,0);U(a);R(a,.1*b,1*c,!0,!0);a.lineTo(.4*b,1*c);a.lineTo(.4*b,.6*c);a.lineTo(.1*b,.6*c);a.lineTo(.1*b,1*c);U(a);R(a,.6*b,1*c,!0,!0);a.lineTo(.9*b,1*c);a.lineTo(.9*b,.6*c);a.lineTo(.6*b,.6*c);a.lineTo(.6*b,1*c);U(a);R(a,0,.5*c,!1);a.lineTo(1*b,.5*c);a.moveTo(.5*b,.5*c);a.lineTo(.5*b,.4*c);a.moveTo(.75*b,.5*c);a.lineTo(.75*b,.6*c);a.moveTo(.25*b,.5*c);a.lineTo(.25*
- b,.6*c);a.hb(!1);b=a.q;w.u(a);return b},Power:function(a,b,c){a=w.s();var d=O.ya,e=.4*d,g=.4,h=w.O(),k=w.O(),l=w.O(),m=w.O();O.Qi(.5,.5-g,.5+e,.5-g,.5+g,.5-e,.5+g,.5,.5,h,h,k,l,m);var n=w.lc(k.x,k.y);R(a,k.x*b,k.y*c,!0);S(a,l.x*b,l.y*c,m.x*b,m.y*c,(.5+g)*b,.5*c);S(a,(.5+g)*b,(.5+e)*c,(.5+e)*b,(.5+g)*c,.5*b,(.5+g)*c);S(a,(.5-e)*b,(.5+g)*c,(.5-g)*b,(.5+e)*c,(.5-g)*b,.5*c);O.Qi(.5-g,.5,.5-g,.5-e,.5-e,.5-g,.5,.5-g,.5,l,m,k,h,h);S(a,l.x*b,l.y*c,m.x*b,m.y*c,k.x*b,k.y*c);e=.3*d;g=.3;O.Qi(.5-g,.5,.5-g,.5-
- e,.5-e,.5-g,.5,.5-g,.5,l,m,k,h,h);a.lineTo(k.x*b,k.y*c);S(a,m.x*b,m.y*c,l.x*b,l.y*c,(.5-g)*b,.5*c);S(a,(.5-g)*b,(.5+e)*c,(.5-e)*b,(.5+g)*c,.5*b,(.5+g)*c);S(a,(.5+e)*b,(.5+g)*c,(.5+g)*b,(.5+e)*c,(.5+g)*b,.5*c);O.Qi(.5,.5-g,.5+e,.5-g,.5+g,.5-e,.5+g,.5,.5,h,h,k,l,m);S(a,m.x*b,m.y*c,l.x*b,l.y*c,k.x*b,k.y*c);U(a);R(a,.45*b,0,!0);a.lineTo(.45*b,.5*c);a.lineTo(.55*b,.5*c);a.lineTo(.55*b,0);U(a);w.A(h);w.A(k);w.A(l);w.A(m);w.A(n);b=a.q;b.C=new Q(.25,.55);b.D=new Q(.75,.8);w.u(a);return b},Fallout:function(a,
- b,c){a=w.s();var d=.5*O.ya;R(a,0*b,.5*c,!0);S(a,0*b,(.5-d)*c,(.5-d)*b,0*c,.5*b,0*c);S(a,(.5+d)*b,0*c,1*b,(.5-d)*c,1*b,.5*c);S(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);S(a,(.5-d)*b,1*c,0*b,(.5+d)*c,0*b,.5*c);var e=d=0;R(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);d=.4;e=0;U(a);R(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);d=.2;e=-.3;U(a);R(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+
- d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);U(a);b=a.q;b.Qd=Bh;w.u(a);return b},IrritationHazard:function(a,b,c){a=w.s();R(a,.2*b,0*c,!0);a.lineTo(.5*b,.3*c);a.lineTo(.8*b,0*c);a.lineTo(1*b,.2*c);a.lineTo(.7*b,.5*c);a.lineTo(1*b,.8*c);a.lineTo(.8*b,1*c);a.lineTo(.5*b,.7*c);a.lineTo(.2*b,1*c);a.lineTo(0*b,.8*c);a.lineTo(.3*b,.5*c);a.lineTo(0*b,.2*c);U(a);b=a.q;b.C=new Q(.3,.3);b.D=new Q(.7,.7);w.u(a);return b},ElectricalHazard:function(a,b,c){a=w.s();R(a,.37*b,0*c,!0);a.lineTo(.5*
- b,.11*c);a.lineTo(.77*b,.04*c);a.lineTo(.33*b,.49*c);a.lineTo(1*b,.37*c);a.lineTo(.63*b,.86*c);a.lineTo(.77*b,.91*c);a.lineTo(.34*b,1*c);a.lineTo(.34*b,.78*c);a.lineTo(.44*b,.8*c);a.lineTo(.65*b,.56*c);a.lineTo(0*b,.68*c);U(a);b=a.q;w.u(a);return b},FireHazard:function(a,b,c){a=w.s();R(a,.1*b,1*c,!0);S(a,-.25*b,.63*c,.45*b,.44*c,.29*b,0*c);S(a,.48*b,.17*c,.54*b,.35*c,.51*b,.42*c);S(a,.59*b,.29*c,.58*b,.28*c,.59*b,.18*c);S(a,.8*b,.34*c,.88*b,.43*c,.75*b,.6*c);S(a,.87*b,.48*c,.88*b,.43*c,.88*b,.31*
- c);S(a,1.17*b,.76*c,.82*b,.8*c,.9*b,1*c);U(a);b=a.q;b.C=new Q(.05,.645);b.D=new Q(.884,.908);w.u(a);return b},BpmnActivityLoop:function(a,b,c){a=w.s();var d=4*(Math.SQRT2-1)/3*.5;R(a,.65*b,1*c,!1);S(a,(1-d+0)*b,1*c,1*b,(.5+d+0)*c,1*b,.5*c);S(a,1*b,(.5-d+0)*c,(.5+d+0)*b,0*c,.5*b,0*c);S(a,(.5-d+0)*b,0*c,0*b,(.5-d+0)*c,0*b,.5*c);S(a,0*b,(.5+d+0)*c,(.5-d+0)*b,1*c,.35*b,.98*c);a.moveTo(.25*b,.8*c);a.lineTo(.35*b,1*c);a.lineTo(.1*b,1*c);b=a.q;w.u(a);return b},BpmnActivityParallel:function(a,b,c){a=w.s();
- R(a,0,0,!1);a.lineTo(0,1*c);a.moveTo(.5*b,0);a.lineTo(.5*b,1*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.q;w.u(a);return b},BpmnActivitySequential:function(a,b,c){a=w.s();R(a,0,0,!1);a.lineTo(1*b,0);a.moveTo(0,.5*c);a.lineTo(1*b,.5*c);a.moveTo(0,1*c);a.lineTo(1*b,1*c);b=a.q;w.u(a);return b},BpmnActivityAdHoc:function(a,b,c){a=w.s();R(a,0,0,!1);R(a,1*b,1*c,!1);R(a,0,.5*c,!1);S(a,.2*b,.35*c,.3*b,.35*c,.5*b,.5*c);S(a,.7*b,.65*c,.8*b,.65*c,1*b,.5*c);b=a.q;w.u(a);return b},BpmnActivityCompensation:function(a,
- b,c){a=w.s();R(a,0,.5*c,!0);a.lineTo(.5*b,0);a.lineTo(.5*b,.5*c);a.lineTo(1*b,1*c);a.lineTo(1*b,0);a.lineTo(.5*b,.5*c);a.lineTo(.5*b,1*c);U(a);b=a.q;w.u(a);return b},BpmnTaskMessage:function(a,b,c){a=w.s();R(a,0,.2*c,!0);a.lineTo(1*b,.2*c);a.lineTo(1*b,.8*c);a.lineTo(0,.8*c);a.lineTo(0,.8*c);U(a);R(a,0,.2*c,!1);a.lineTo(.5*b,.5*c);a.lineTo(1*b,.2*c);a.hb(!1);b=a.q;w.u(a);return b},BpmnTaskScript:function(a,b,c){a=w.s();R(a,.7*b,1*c,!0);a.lineTo(.3*b,1*c);S(a,.6*b,.5*c,0,.5*c,.3*b,0);a.lineTo(.7*b,
- 0);S(a,.4*b,.5*c,1*b,.5*c,.7*b,1*c);U(a);R(a,.45*b,.73*c,!1);a.lineTo(.7*b,.73*c);a.moveTo(.38*b,.5*c);a.lineTo(.63*b,.5*c);a.moveTo(.31*b,.27*c);a.lineTo(.56*b,.27*c);a.hb(!1);b=a.q;w.u(a);return b},BpmnTaskUser:function(a,b,c){a=w.s();R(a,0,0,!1);R(a,.335*b,(1-.555)*c,!0);a.lineTo(.335*b,.595*c);a.lineTo(.665*b,.595*c);a.lineTo(.665*b,(1-.555)*c);S(a,.88*b,.46*c,.98*b,.54*c,1*b,.68*c);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.68*c);S(a,.02*b,.54*c,.12*b,.46*c,.335*b,(1-.555)*c);a.lineTo(.365*
- b,.405*c);var d=.5-.285,e=Math.PI/4,g=4*(1-Math.cos(e))/(3*Math.sin(e)),e=g*d,g=g*d;S(a,(.5-(e+d)/2)*b,(d+(d+g)/2)*c,(.5-d)*b,(d+g)*c,(.5-d)*b,d*c);S(a,(.5-d)*b,(d-g)*c,(.5-e)*b,(d-d)*c,.5*b,(d-d)*c);S(a,(.5+e)*b,(d-d)*c,(.5+d)*b,(d-g)*c,(.5+d)*b,d*c);S(a,(.5+d)*b,(d+g)*c,(.5+(e+d)/2)*b,(d+(d+g)/2)*c,.635*b,.405*c);a.lineTo(.635*b,.405*c);a.lineTo(.665*b,(1-.555)*c);a.lineTo(.665*b,.595*c);a.lineTo(.335*b,.595*c);R(a,.2*b,1*c,!1);a.lineTo(.2*b,.8*c);R(a,.8*b,1*c,!1);a.lineTo(.8*b,.8*c);b=a.q;w.u(a);
- return b},BpmnEventConditional:function(a,b,c){a=w.s();R(a,.1*b,0,!0);a.lineTo(.9*b,0);a.lineTo(.9*b,1*c);a.lineTo(.1*b,1*c);U(a);R(a,.2*b,.2*c,!1);a.lineTo(.8*b,.2*c);a.moveTo(.2*b,.4*c);a.lineTo(.8*b,.4*c);a.moveTo(.2*b,.6*c);a.lineTo(.8*b,.6*c);a.moveTo(.2*b,.8*c);a.lineTo(.8*b,.8*c);a.hb(!1);b=a.q;w.u(a);return b},BpmnEventError:function(a,b,c){a=w.s();R(a,0,1*c,!0);a.lineTo(.33*b,0);a.lineTo(.66*b,.5*c);a.lineTo(1*b,0);a.lineTo(.66*b,1*c);a.lineTo(.33*b,.5*c);U(a);b=a.q;w.u(a);return b},BpmnEventEscalation:function(a,
- b,c){a=w.s();R(a,0,0,!1);R(a,1*b,1*c,!1);R(a,.1*b,1*c,!0);a.lineTo(.5*b,0);a.lineTo(.9*b,1*c);a.lineTo(.5*b,.5*c);U(a);b=a.q;w.u(a);return b},BpmnEventTimer:function(a,b,c){a=w.s();var d=.5*O.ya;R(a,1*b,.5*c,!0);S(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);S(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);S(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);S(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);R(a,.5*b,0,!1);a.lineTo(.5*b,.15*c);a.moveTo(.5*b,1*c);a.lineTo(.5*b,.85*c);a.moveTo(0,.5*c);a.lineTo(.15*b,.5*c);a.moveTo(1*b,.5*c);a.lineTo(.85*
- b,.5*c);a.moveTo(.5*b,.5*c);a.lineTo(.58*b,.1*c);a.moveTo(.5*b,.5*c);a.lineTo(.78*b,.54*c);a.hb(!1);b=a.q;b.Qd=Bh;w.u(a);return b}};for(var Pn in O.Eg)O.Eg[Pn.toLowerCase()]=Pn;
- O.dw={"":"",Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z",Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z",Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z",BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",OpenTriangle:"m 0,0 l 8,4 -8,4",BackwardOpenTriangle:"m 8,0 l -8,4 8,4",OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8",
- BackwardOpenTriangleLine:"m 8,0 l -8,4 8,4 m -8.5,0 l 0,-8",OpenTriangleTop:"m 0,0 l 8,4 m 0,4",BackwardOpenTriangleTop:"m 8,0 l -8,4 m 0,4",OpenTriangleBottom:"m 0,8 l 8,-4",BackwardOpenTriangleBottom:"m 0,4 l 8,4",HalfTriangleTop:"F1 m 0,0 l 0,4 8,0 z m 0,8",BackwardHalfTriangleTop:"F1 m 8,0 l 0,4 -8,0 z m 0,8",HalfTriangleBottom:"F1 m 0,4 l 0,4 8,-4 z",BackwardHalfTriangleBottom:"F1 m 8,4 l 0,4 -8,-4 z",ForwardSemiCircle:"m 4,0 b 270 180 0 4 4",BackwardSemiCircle:"m 4,8 b 90 180 0 -4 4",Feather:"m 0,0 l 3,4 -3,4",
- BackwardFeather:"m 3,0 l -3,4 3,4",DoubleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardDoubleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4",TripleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardTripleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4 m 3,-8 l -3,4 3,4",ForwardSlash:"m 0,8 l 5,-8",BackSlash:"m 0,0 l 5,8",DoubleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8",DoubleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8",TripleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8 m -2,8 l 4,-8",
- TripleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8 m -2,-8 l 4,8",Fork:"m 0,4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4",LineFork:"m 0,0 l 0,8 m 0,-4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardLineFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4 m 8,-8 l 0,8",CircleFork:"F1 m 6,4 b 0 360 -3 0 3 z m 0,0 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 6,0 b 0 360 -3 0 3",CircleLineFork:"F1 m 6,4 b 0 360 -3 0 3 z m 1,-4 l 0,8 m 0,-4 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",
- BackwardCircleLineFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 0,-4 l 0,8 m 7,-4 b 0 360 -3 0 3",Circle:"F1 m 8,4 b 0 360 -4 0 4 z",Block:"F1 m 0,0 l 0,8 8,0 0,-8 z",StretchedDiamond:"F1 m 0,3 l 5,-3 5,3 -5,3 -5,-3 z",Diamond:"F1 m 0,4 l 4,-4 4,4 -4,4 -4,-4 z",Chevron:"F1 m 0,0 l 5,0 3,4 -3,4 -5,0 3,-4 -3,-4 z",StretchedChevron:"F1 m 0,0 l 8,0 3,4 -3,4 -8,0 3,-4 -3,-4 z",NormalArrow:"F1 m 0,2 l 4,0 0,-2 4,4 -4,4 0,-2 -4,0 z",X:"m 0,0 l 8,8 m 0,-8 l -8,8",TailedNormalArrow:"F1 m 0,0 l 2,0 1,2 3,0 0,-2 2,4 -2,4 0,-2 -3,0 -1,2 -2,0 1,-4 -1,-4 z",
- DoubleTriangle:"F1 m 0,0 l 4,4 -4,4 0,-8 z m 4,0 l 4,4 -4,4 0,-8 z",BigEndArrow:"F1 m 0,0 l 5,2 0,-2 3,4 -3,4 0,-2 -5,2 0,-8 z",ConcaveTailArrow:"F1 m 0,2 h 4 v -2 l 4,4 -4,4 v -2 h -4 l 2,-2 -2,-2 z",RoundedTriangle:"F1 m 0,1 a 1,1 0 0 1 1,-1 l 7,3 a 0.5,1 0 0 1 0,2 l -7,3 a 1,1 0 0 1 -1,-1 l 0,-6 z",SimpleArrow:"F1 m 1,2 l -1,-2 2,0 1,2 -1,2 -2,0 1,-2 5,0 0,-2 2,2 -2,2 0,-2 z",AccelerationArrow:"F1 m 0,0 l 0,8 0.2,0 0,-8 -0.2,0 z m 2,0 l 0,8 1,0 0,-8 -1,0 z m 3,0 l 2,0 2,4 -2,4 -2,0 0,-8 z",BoxArrow:"F1 m 0,0 l 4,0 0,2 2,0 0,-2 2,4 -2,4 0,-2 -2,0 0,2 -4,0 0,-8 z",
- TriangleLine:"F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8",CircleEndedArrow:"F1 m 10,4 l -2,-3 0,2 -2,0 0,2 2,0 0,2 2,-3 z m -4,0 b 0 360 -3 0 3 z",DynamicWidthArrow:"F1 m 0,3 l 2,0 2,-1 2,-2 2,4 -2,4 -2,-2 -2,-1 -2,0 0,-2 z",EquilibriumArrow:"m 0,3 l 8,0 -3,-3 m 3,5 l -8,0 3,3",FastForward:"F1 m 0,0 l 3.5,4 0,-4 3.5,4 0,-4 1,0 0,8 -1,0 0,-4 -3.5,4 0,-4 -3.5,4 0,-8 z",Kite:"F1 m 0,4 l 2,-4 6,4 -6,4 -2,-4 z",HalfArrowTop:"F1 m 0,0 l 4,4 4,0 -8,-4 z m 0,8",HalfArrowBottom:"F1 m 0,8 l 4,-4 4,0 -8,4 z",
- OpposingDirectionDoubleArrow:"F1 m 0,4 l 2,-4 0,2 4,0 0,-2 2,4 -2,4 0,-2 -4,0 0,2 -2,-4 z",PartialDoubleTriangle:"F1 m 0,0 4,3 0,-3 4,4 -4,4 0,-3 -4,3 0,-8 z",LineCircle:"F1 m 0,0 l 0,8 m 7 -4 b 0 360 -3 0 3 z",DoubleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",TripleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",CircleLine:"F1 m 6 4 b 0 360 -3 0 3 z m 1,-4 l 0,8",DiamondCircle:"F1 m 8,4 l -4,4 -4,-4 4,-4 4,4 m 8,0 b 0 360 -4 0 4 z",PlusCircle:"F1 m 8,4 b 0 360 -4 0 4 l -8 0 z m -4 -4 l 0 8",
- OpenRightTriangleTop:"m 8,0 l 0,4 -8,0 m 0,4",OpenRightTriangleBottom:"m 8,8 l 0,-4 -8,0",Line:"m 0,0 l 0,8",DoubleLine:"m 0,0 l 0,8 m 2,0 l 0,-8",TripleLine:"m 0,0 l 0,8 m 2,0 l 0,-8 m 2,0 l 0,8",PentagonArrow:"F1 m 8,4 l -4,-4 -4,0 0,8 4,0 4,-4 z"};O.XI=function(){if(null!==O.dw){for(var a in O.dw){var b=Dd(O.dw[a],!1);O.gj[a]=b;a.toLowerCase()!==a&&(O.gj[a.toLowerCase()]=a)}O.dw=null}};
- O.uD=function(a){O.XI();var b=O.gj[a];if(void 0===b){b=a.toLowerCase();if("none"===b)return"None";b=O.gj[b]}return"string"===typeof b?b:b instanceof sd?a:null};
- function C(a){0===arguments.length?H.call(this):H.call(this,a);this.R=311807;this.Pk=this.ii="";this.Pr=this.Lr=this.Yr=this.Rq=null;this.$r="";this.Qg=this.Zr=this.wm=null;this.Nr="";this.so=null;this.Mr=(new pa(NaN,NaN)).freeze();this.Qr="";this.to=null;this.re="";this.Yu=this.bq=this.Dk=null;this.ah=(new I(NaN,NaN)).freeze();this.Yq="";this.Sk=null;this.Zq=Xb;this.hr=O.TF;this.ar=O.SF;this.lq=null;this.Sq=Qn;this.zm=(new I(6,6)).freeze();this.ym="gray";this.xm=4;this.aC=-1;this.cG=new x;this.Uk=
- null;this.Bj=NaN}w.Pa(C,H);w.la("Part",C);C.prototype.cloneProtected=function(a){H.prototype.cloneProtected.call(this,a);a.R=this.R&-4097|49152;a.ii=this.ii;a.Pk=this.Pk;a.Rq=this.Rq;a.Yr=this.Yr;a.Lr=this.Lr;a.Pr=this.Pr;a.$r=this.$r;a.Zr=this.Zr;a.Qg=null;a.Nr=this.Nr;a.Mr.assign(this.Mr);a.Qr=this.Qr;a.re=this.re;a.bq=this.bq;a.ah.assign(this.ah);a.Yq=this.Yq;a.Zq=this.Zq.da();a.hr=this.hr.da();a.ar=this.ar.da();a.lq=this.lq;a.Sq=this.Sq;a.zm.assign(this.zm);a.ym=this.ym;a.xm=this.xm};
- C.prototype.ai=function(a){H.prototype.ai.call(this,a);a.yl();a.wm=null;a.so=null;a.to=null;a.Sk=null;a.Uk=null};C.prototype.toString=function(){var a=w.Fg(Object.getPrototypeOf(this))+"#"+w.ad(this);null!==this.data&&(a+="("+ka(this.data)+")");return a};C.LayoutNone=0;var Qj;C.LayoutAdded=Qj=1;var Yj;C.LayoutRemoved=Yj=2;C.LayoutShown=4;C.LayoutHidden=8;C.LayoutNodeSized=16;var Pk;C.LayoutGroupLayout=Pk=32;C.LayoutNodeReplaced=64;var Qn;C.LayoutStandard=Qn=Qj|Yj|28|Pk|64;C.LayoutAll=16777215;
- C.prototype.gn=function(a,b,c,d,e,g,h){var k=this.h;null!==k&&(a===ve&&"elements"===b?e instanceof H?Rj(e,function(a){Tj(k,a);Sj(k,a)}):e instanceof $i&&Bk(k,e):a===we&&"elements"===b&&(e instanceof H?Rj(e,function(a){Xj(k,a);Wj(k,a)}):e instanceof $i&&Ck(k,e)),k.Lc(a,b,c,d,e,g,h))};C.prototype.updateTargetBindings=C.prototype.Wb=function(a){H.prototype.Wb.call(this,a);if(null!==this.data){a=this.va.p;for(var b=a.length,c=0;c<b;c++){var d=a[c];d instanceof H&&Rj(d,function(a){null!==a.data&&a.Wb()})}}};
- C.prototype.updateRelationshipsFromData=function(){var a=this.data;if(null!==a){var b=this.h;if(null!==b){var c=b.ha;if(c instanceof X){var d=c.Xm(a),b=b.sH(d),e=this.Va;b!==e&&(b=null!==e?c.Db(e.data):void 0,e=c.rp,"function"===typeof e?e(a,b):a[e]=b,c.ix(a,d))}}}};w.w(C,{Wv:"adornments"},function(){return null===this.Qg?Pa:this.Qg.yE});C.prototype.findAdornment=C.prototype.So=function(a){u&&w.g(a,"string",C,"findAdornment:category");var b=this.Qg;return null===b?null:b.za(a)};
- C.prototype.addAdornment=C.prototype.cl=function(a,b){if(null!==b){u&&(w.g(a,"string",C,"addAdornment:category"),w.k(b,da,C,"addAdornment:ad"));var c=null,d=this.Qg;null!==d&&(c=d.za(a));if(c!==b){if(null!==c){var e=c.h;null!==e&&e.remove(c)}null===d&&(this.Qg=d=new ta("string",da));b.ii!==a&&(b.Tc=a);d.add(a,b);c=this.h;null!==c&&(c.add(b),b.data=this.data)}}};
- C.prototype.removeAdornment=C.prototype.Hl=function(a){u&&w.g(a,"string",C,"removeAdornment:category");var b=this.Qg;if(null!==b){var c=b.za(a);if(null!==c){var d=c.h;null!==d&&d.remove(c)}b.remove(a);0===b.count&&(this.Qg=null)}};C.prototype.clearAdornments=C.prototype.Hs=function(){var a=this.Qg;if(null!==a){for(var b=w.nb(),a=a.j;a.next();)b.push(a.key);for(var a=b.length,c=0;c<a;c++)this.Hl(b[c]);w.xa(b)}};
- C.prototype.updateAdornments=function(){var a=this.h;if(null!==a){a:{if(this.cb&&this.pF){var b=this.jn;if(!(null!==b&&this.ca.J()&&this.Na()&&b.Dl()&&b.ca.J()))break a;var c=this.So("Selection");if(null===c){c=this.SI;null===c&&(c=this instanceof G?a.jI:this instanceof F?a.FH:a.xI);if(!(c instanceof da))break a;Cf(c);c=c.copy();null!==c&&(c.Tc="Selection",c.Bc=b)}if(null!==c){var d=c.placeholder;if(null!==d){var e=b.Xi(),g=0;b instanceof Y&&(g=b.pb);var h=w.Ml();h.n((b.Ha.width+g)*e,(b.Ha.height+
- g)*e);d.Ca=h;w.ek(h)}c.angle=b.tl();c.type!==jh&&(d=w.O(),c.location=b.vb(Xb,d),w.A(d));this.cl("Selection",c);break a}}this.Hl("Selection")}Rn(this,a);for(a=this.Wv;a.next();)b=a.value,b.Wb(),b.V()}};function Rn(a,b){b.zb.nf.each(function(b){b.isEnabled&&b.updateAdornments(a)})}w.w(C,{layer:"layer"},function(){return this.Yu});w.w(C,{h:"diagram"},function(){var a=this.Yu;return null!==a?a.h:null});
- w.defineProperty(C,{jf:"layerName"},function(){return this.Pk},function(a){var b=this.Pk;if(b!==a){w.g(a,"string",C,"layerName");var c=this.h;if(null===c||null!==c.ql(a)&&!c.sn)if(this.Pk=a,null!==c&&c.xc(),this.i("layerName",b,a),b=this.layer,null!==b&&b.name!==a&&(c=b.h,null!==c&&(a=c.ql(a),null!==a&&a!==b))){var d=b.Oe(-1,this,!0);0<=d&&c.Lc(we,"parts",b,this,null,d,!0);d=a.$o(99999999,this,!0);0<=d&&c.Lc(ve,"parts",a,null,this,!0,d);d=this.kt;if(null!==d){var e=c.Ua;c.Ua=!0;d(this,b,a);c.Ua=e}}}});
- w.defineProperty(C,{kt:"layerChanged"},function(){return this.Rq},function(a){var b=this.Rq;b!==a&&(null!==a&&w.g(a,"function",C,"layerChanged"),this.Rq=a,this.i("layerChanged",b,a))});C.prototype.invalidateAdornments=C.prototype.je=function(){var a=this.h;null!==a&&(kj(a),0!==(this.R&16384)!==!0&&(this.R|=16384,a.ne()))};function Pi(a){0!==(a.R&16384)!==!1&&(a.updateAdornments(),a.R&=-16385,a=a.h,null!==a&&(a.Yd=!0))}
- w.defineProperty(C,{location:"location"},function(){return this.ah},function(a){var b=this.ah;if(!(b.N(a)||this instanceof G)){u&&w.k(a,I,C,"location");a=a.da();var c=this.h;this.ah=a;if(!1===Ij(this)){var d=this.Sa,e=a.x-b.x,g=a.y-b.y,h=d.copy();d.n(h.x+e,h.y+g);Pl(this,!1);d.N(h)||null===c||this.i("position",h,d);null===c||this instanceof da||this instanceof G||(c=this.h.Bh,c.jd&&d.J()&&ri(c,this,"position",h.copy(),d.copy()))}this.i("location",b,a)}});
- function Pl(a,b){if(!1===Jj(a)){var c=a.h;null!==c&&(c.lg.add(a),a instanceof D&&!c.na.lb&&a.hf(),b||c.ne());Sn(a,!0)}}function Tn(a){if(!1!==Jj(a)){var b=a.position,c=a.location;c.J()&&b.J()||(Un(a,b,c),a.Xg());var b=a.Sa,c=a.Ob,d=c.copy();c.Ta();c.x=b.x;c.y=b.y;c.freeze();a.Sw(d,c);Sn(a,!1)}}
- w.w(C,{ac:"locationObject"},function(){if(null===this.Sk){var a=this.Pw;""!==a?(a=this.te(a),this.Sk=null!==a?a:this):this.Sk=this instanceof da?this.type!==jh&&null!==this.placeholder?this.placeholder:this:this}return this.Sk.visible?this.Sk:this});w.defineProperty(C,{rI:"minLocation"},function(){return this.hr},function(a){var b=this.hr;b.N(a)||(u&&w.k(a,I,C,"minLocation"),this.hr=a=a.da(),this.i("minLocation",b,a))});
- w.defineProperty(C,{mI:"maxLocation"},function(){return this.ar},function(a){var b=this.ar;b.N(a)||(u&&w.k(a,I,C,"maxLocation"),this.ar=a=a.da(),this.i("maxLocation",b,a))});w.defineProperty(C,{Pw:"locationObjectName"},function(){return this.Yq},function(a){var b=this.Yq;b!==a&&(u&&w.g(a,"string",C,"locationObjectName"),this.Yq=a,this.Sk=null,Kl(this),this.i("locationObjectName",b,a))});
- w.defineProperty(C,{kf:"locationSpot"},function(){return this.Zq},function(a){var b=this.Zq;b.N(a)||(u&&(w.k(a,Q,C,"locationSpot"),a.rd()||w.l("Part.locationSpot must be a specific Spot value, not: "+a)),this.Zq=a=a.da(),Kl(this),this.i("locationSpot",b,a))});C.prototype.move=C.prototype.move=function(a){this.position=a};C.prototype.moveTo=C.prototype.moveTo=function(a,b){var c=w.lc(a,b);this.move(c);w.A(c)};
- C.prototype.isVisible=C.prototype.Na=function(){if(!this.visible)return!1;var a=this.layer;if(null!==a&&!a.visible)return!1;a=this.Va;if(!(null===a||a.me&&a.Na()))return!1;if(this instanceof D){a=this.Vm();if(null!==a&&!a.bd)return!1;a=this.Cd;if(null!==a)return a.Na()}else if(this instanceof G){var b=!0,c=this.h;null!==c&&(b=c.Bd);c=this.aa;if(null!==c){if(this.Ic&&b&&!c.bd)return!1;if(c===a)return!0;c=c.findVisibleNode();if(null===c||c===a)return!1}c=this.fa;if(null!==c){if(this.Ic&&!b&&!c.bd)return!1;
- if(c===a)return!0;b=c.findVisibleNode();if(null===b||b===a)return!1}}return!0};C.prototype.Qe=function(a){var b=this.h;a?(this.K(4),this.je(),null!==b&&b.lg.add(this)):(this.K(8),this.Hs());this.yl();null!==b&&(b.xc(),b.sa())};
- C.prototype.findObject=C.prototype.te=function(a){if(this.name===a)return this;var b=this.Uk;null===b&&(this.Uk=b=new xa);if(void 0!==b[a])return b[a];for(var c=this.va.p,d=c.length,e=0;e<d;e++){var g=c[e];if(g.name===a)return b[a]=g;if(g instanceof H)if(null===g.ui&&null===g.ng){if(g=g.te(a),null!==g)return b[a]=g}else if(zk(g)&&(g=g.va.first(),null!==g&&g.name===a))return b[a]=g}return b[a]=null};
- function Vn(a,b,c,d){void 0===d&&(d=new I);c.we()&&(c=ac);var e=b.Ha;d.n(e.width*c.x+c.offsetX,e.height*c.y+c.offsetY);if(null===b||b===a)return d;b.transform.ib(d);for(b=b.S;null!==b&&b!==a;)b.transform.ib(d),b=b.S;a.Rk.ib(d);d.offset(-a.Xc.x,-a.Xc.y);return d}C.prototype.ensureBounds=C.prototype.xf=function(){Yh(this,Infinity,Infinity);this.Fc()};
- function Ti(a,b){var c;c=a.cG;var d;isNaN(a.Bj)&&(a.Bj=Ym(a));d=a.Bj;var e=2*d;if(!a.gk)return c.n(b.x-1-d,b.y-1-d,b.width+2+e,b.height+2+e),c;d=b.x;var e=b.y,g=b.width,h=b.height,k=a.shadowBlur,l=a.YI,g=g+k,h=h+k;d-=k/2;e-=k/2;0<l.x?g+=l.x:(d+=l.x,g-=l.x);0<l.y?h+=l.y:(e+=l.y,h-=l.y);c.n(d-1,e-1,g+2,h+2);return c}f=C.prototype;
- f.Fc=function(){this.Xg();if(!1===Ij(this))Tn(this);else{var a=w.eg();a.assign(this.Ob);Cl(this);this.Ob.Ta();var b=Oi(this);this.Mi(0,0,this.Xc.width,this.Xc.height);var c=this.position;Un(this,c,this.location);var d=this.Ob;d.x=c.x;d.y=c.y;d.freeze();this.Xg();this.Sw(a,d);a.N(d)?this.Ef(b):!this.Td()||O.F(a.width,d.width)&&O.F(a.height,d.height)||0<=this.aC&&this.K(16);w.qc(a);Sn(this,!1)}};
- f.Sw=function(a,b){xl(this,!1);var c=this.h;if(null!==c){this.yl();var d=!1,e=a.J();if(!1===c.si){var g=c.Gc,h=c.padding,k=g.x+h.left,l=g.y+h.top,m=g.width-2*h.right,g=g.height-2*h.bottom;e&&a.x>k&&a.y>l&&a.right<m&&a.bottom<g&&b.x>k&&b.y>l&&b.right<m&&b.bottom<g&&(d=!0)}0!==(this.R&65536)!==!0&&a.N(b)||Uj(this,d,c);c.sa()}};
- f.CA=function(a,b){if(!a.J()||this instanceof G)return!1;var c=this.h;if(null!==c&&!(this instanceof da)){var d=this.h.Bh;d.jd&&ri(d,this,"position",b.copy(),a.copy())}if(null!==c&&!0===c.na.lb)return!0;c=this.ah;d=c.copy();c.n(c.x+(a.x-b.x),c.y+(a.y-b.y));this.Sa=a;!1===Jj(this)&&!1===Ij(this)&&(Pl(this,!1),this.Xg(),Tn(this));c.N(d)||this.i("location",d,c);return!0};
- f.tF=function(a,b){var c=this.ah;!1===Jj(this)&&!1===Ij(this)?(this.ah.n(c.x+a-this.Sa.x,c.y+b-this.Sa.y),this.Sa.n(a,b),Pl(this,!0),this.Xg()):(c.n(NaN,NaN),this.Sa.n(a,b))};
- function Un(a,b,c){var d=NaN,e=NaN,g=w.O(),h=a.kf,k=a.ac;h.we()&&w.l("determineOffset: Part's locationSpot must be real: "+h.toString());var l=k.Ha,d=0;k.pb&&(d=k.qe);g.Lt(0,0,l.width+d,l.height+d,h);if(k!==a)for(k.pb&&g.offset(-d/2,-d/2),k.transform.ib(g),h=k.S;null!==h&&h!==a;)h.transform.ib(g),h=h.S;a.Rk.ib(g);g.offset(-a.Xc.x,-a.Xc.y);h=a.h;c.J()?(k=b.x,l=b.y,d=c.x-g.x,e=c.y-g.y,b.n(d,e),c=!1,null!==h&&(d=h.Bh,d.uj?c=!0:!d.jd||a instanceof da||ri(d,a,"position",new I(k,l),b),c||b.x===k&&b.y===
- l||(d=h.mb,h.mb=!0,a.i("position",new I(k,l),b),h.mb=d))):b.J()&&(d=b.x,e=b.y,b=c.copy(),c.n(d+g.x,e+g.y),c.N(b)||null===h||(d=h.mb,h.mb=!0,a.i("location",b,c),h.mb=d));w.A(g)}function Uj(a,b,c){yl(a,!1);a instanceof D&&Wk(c,a);a.layer.Hc||b||c.xc();b=a.Ob;var d=c.qb;d.J()?(Oi(a)?yb(b,d)||a.Ef(!1):b.Gg(d)&&a.Ef(!0),a.updateAdornments()):c.Nk=!0}f.Bl=function(){return!0};
- function Ri(a,b){var c=a.Ob;if(0!==c.width&&0!==c.height&&!isNaN(c.x)&&!isNaN(c.y)&&a.Na()){var d=a.transform,e=a.S,g=a.hj;g.reset();null!==e&&(e.fg()?g.multiply(e.Of):null!==e.S&&g.multiply(e.S.Of));g.multiply(a.md);null!==a.uc&&(El(a,b,a.uc,!0,!0),b.fillRect(c.x,c.y,c.width,c.height));null===a.uc&&null===a.Pb&&(El(a,b,"rgba(0,0,0,0.4)",!0,!1),b.fillRect(c.x,c.y,c.width,c.height));null!==a.Pb&&(d.gt()||b.transform(d.m11,d.m12,d.m21,d.m22,d.dx,d.dy),e=a.Ha,c=e.width,e=e.height,El(a,b,a.Pb,!0,!1),
- b.fillRect(0,0,c+0,e+0),d.gt()||(c=1/(d.m11*d.m22-d.m12*d.m21),b.transform(d.m22*c,-d.m12*c,-d.m21*c,d.m11*c,c*(d.m21*d.dy-d.m22*d.dx),c*(d.m12*d.dx-d.m11*d.dy))))}}f.Td=function(){return!0};
- w.defineProperty(C,{Tc:"category"},function(){return this.ii},function(a){var b=this.ii;if(b!==a){w.g(a,"string",C,"category");var c=this.h,d=this.data,e=null;if(null!==c&&null!==d&&!(this instanceof da)){var g=c.ha.na;g.isEnabled&&!g.lb&&(e=this.clone(),e.va.ce(this.va))}this.ii=a;this.i("category",b,a);null===c||null===d||this instanceof da?(e=this.Zh,null!==e&&(a=e.Qg,null!==a&&a.remove(b),e.cl(this.Tc,this))):(g=c.ha,g.na.lb||(this instanceof G?(g instanceof X?g.rF(d,a):g instanceof Be&&g.VI(d,
- a),c=Jk(c,a),null!==c&&(Cf(c),c=c.copy(),null!==c&&Wn(this,c,b,a))):(null!==g&&g.gx(d,a),c=Gk(c,d,a),null!==c&&(Cf(c),c=c.copy(),null===c||c instanceof G||(c.location=this.location,Wn(this,c,b,a)))),null!==e&&(b=this.clone(),b.va.ce(this.va),this.i("self",e,b))))}});w.defineProperty(C,{self:"self"},function(){return this},function(a){Wn(this,a,this.Tc,a.Tc)});var Xn=!1;
- function Wn(a,b,c,d){b.constructor===a.constructor||Xn||(Xn=!0,w.trace('Should not change the class of the Part when changing category from "'+c+'" to "'+d+'"'),w.trace(" Old class: "+w.Fg(a)+", new class: "+w.Fg(b)+", part: "+a.toString()));a.Hs();var e=a.data;c=a.jf;var g=a.cb,h=a.mh,k=!0,l=!0,m=!1;if(a instanceof D)var n=a,k=n.$i,l=n.bd,m=n.Ip;b.ai(a);b.cloneProtected(a);a.ii=d;a.V();a.sa();b=a.h;d=!0;null!==b&&(d=b.mb,b.mb=!0);a.Fh=e;null!==e&&a.Wb();null!==b&&(b.mb=d);e=a.jf;e!==c&&(a.Pk=c,
- a.jf=e);a instanceof D&&(n=a,n.$i=k,n.bd=l,n.Ip=m,n.Td()&&n.K(64));a.cb=g;a.mh=h}C.prototype.canCopy=function(){if(!this.GD)return!1;var a=this.layer;if(null===a)return!0;if(!a.Zj)return!1;a=a.h;return null===a?!0:a.Zj?!0:!1};C.prototype.canDelete=function(){if(!this.MD)return!1;var a=this.layer;if(null===a)return!0;if(!a.Im)return!1;a=a.h;return null===a?!0:a.Im?!0:!1};
- C.prototype.canEdit=function(){if(!this.zF)return!1;var a=this.layer;if(null===a)return!0;if(!a.aw)return!1;a=a.h;return null===a?!0:a.aw?!0:!1};C.prototype.canGroup=function(){if(!this.kE)return!1;var a=this.layer;if(null===a)return!0;if(!a.Yv)return!1;a=a.h;return null===a?!0:a.Yv?!0:!1};C.prototype.canMove=function(){if(!this.JE)return!1;var a=this.layer;if(null===a)return!0;if(!a.fl)return!1;a=a.h;return null===a?!0:a.fl?!0:!1};
- C.prototype.canReshape=function(){if(!this.aF)return!1;var a=this.layer;if(null===a)return!0;if(!a.Zv)return!1;a=a.h;return null===a?!0:a.Zv?!0:!1};C.prototype.canResize=function(){if(!this.bF)return!1;var a=this.layer;if(null===a)return!0;if(!a.Cs)return!1;a=a.h;return null===a?!0:a.Cs?!0:!1};C.prototype.canRotate=function(){if(!this.gF)return!1;var a=this.layer;if(null===a)return!0;if(!a.$v)return!1;a=a.h;return null===a?!0:a.$v?!0:!1};
- C.prototype.canSelect=function(){if(!this.kk)return!1;var a=this.layer;if(null===a)return!0;if(!a.wf)return!1;a=a.h;return null===a?!0:a.wf?!0:!1};w.defineProperty(C,{GD:"copyable"},function(){return 0!==(this.R&1)},function(a){var b=0!==(this.R&1);b!==a&&(u&&w.g(a,"boolean",C,"copyable"),this.R^=1,this.i("copyable",b,a))});
- w.defineProperty(C,{MD:"deletable"},function(){return 0!==(this.R&2)},function(a){var b=0!==(this.R&2);b!==a&&(u&&w.g(a,"boolean",C,"deletable"),this.R^=2,this.i("deletable",b,a))});w.defineProperty(C,{zF:"textEditable"},function(){return 0!==(this.R&4)},function(a){var b=0!==(this.R&4);b!==a&&(u&&w.g(a,"boolean",C,"textEditable"),this.R^=4,this.i("textEditable",b,a),this.je())});
- w.defineProperty(C,{kE:"groupable"},function(){return 0!==(this.R&8)},function(a){var b=0!==(this.R&8);b!==a&&(u&&w.g(a,"boolean",C,"groupable"),this.R^=8,this.i("groupable",b,a))});w.defineProperty(C,{JE:"movable"},function(){return 0!==(this.R&16)},function(a){var b=0!==(this.R&16);b!==a&&(u&&w.g(a,"boolean",C,"movable"),this.R^=16,this.i("movable",b,a))});
- w.defineProperty(C,{pF:"selectionAdorned"},function(){return 0!==(this.R&32)},function(a){var b=0!==(this.R&32);b!==a&&(u&&w.g(a,"boolean",C,"selectionAdorned"),this.R^=32,this.i("selectionAdorned",b,a),this.je())});w.defineProperty(C,{Fw:"isInDocumentBounds"},function(){return 0!==(this.R&64)},function(a){var b=0!==(this.R&64);if(b!==a){u&&w.g(a,"boolean",C,"isInDocumentBounds");this.R^=64;var c=this.h;null!==c&&c.xc();this.i("isInDocumentBounds",b,a)}});
- w.defineProperty(C,{Wz:"isLayoutPositioned"},function(){return 0!==(this.R&128)},function(a){var b=0!==(this.R&128);b!==a&&(u&&w.g(a,"boolean",C,"isLayoutPositioned"),this.R^=128,this.i("isLayoutPositioned",b,a),this.K(a?4:8))});w.defineProperty(C,{kk:"selectable"},function(){return 0!==(this.R&256)},function(a){var b=0!==(this.R&256);b!==a&&(u&&w.g(a,"boolean",C,"selectable"),this.R^=256,this.i("selectable",b,a),this.je())});
- w.defineProperty(C,{aF:"reshapable"},function(){return 0!==(this.R&512)},function(a){var b=0!==(this.R&512);b!==a&&(u&&w.g(a,"boolean",C,"reshapable"),this.R^=512,this.i("reshapable",b,a),this.je())});w.defineProperty(C,{bF:"resizable"},function(){return 0!==(this.R&1024)},function(a){var b=0!==(this.R&1024);b!==a&&(u&&w.g(a,"boolean",C,"resizable"),this.R^=1024,this.i("resizable",b,a),this.je())});
- w.defineProperty(C,{gF:"rotatable"},function(){return 0!==(this.R&2048)},function(a){var b=0!==(this.R&2048);b!==a&&(u&&w.g(a,"boolean",C,"rotatable"),this.R^=2048,this.i("rotatable",b,a),this.je())});
- w.defineProperty(C,{cb:"isSelected"},function(){return 0!==(this.R&4096)},function(a){var b=0!==(this.R&4096);if(b!==a){u&&w.g(a,"boolean",C,"isSelected");var c=this.h;if(!a||this.canSelect()&&!(null!==c&&c.selection.count>=c.nI)){this.R^=4096;var d=!1;if(null!==c){d=c.mb;c.mb=!0;var e=c.selection;e.Ta();a?e.add(this):e.remove(this);e.freeze()}this.i("isSelected",b,a);this.je();a=this.TI;null!==a&&a(this);null!==c&&(c.ne(),c.mb=d)}}});
- w.defineProperty(C,{mh:"isHighlighted"},function(){return 0!==(this.R&524288)},function(a){var b=0!==(this.R&524288);if(b!==a){u&&w.g(a,"boolean",C,"isHighlighted");this.R^=524288;var c=this.h;null!==c&&(c=c.yw,c.Ta(),a?c.add(this):c.remove(this),c.freeze());this.i("isHighlighted",b,a);this.sa()}});w.defineProperty(C,{gk:"isShadowed"},function(){return 0!==(this.R&8192)},function(a){var b=0!==(this.R&8192);b!==a&&(u&&w.g(a,"boolean",C,"isShadowed"),this.R^=8192,this.i("isShadowed",b,a),this.sa())});
- function Jj(a){return 0!==(a.R&32768)}function Sn(a,b){a.R=b?a.R|32768:a.R&-32769}function yl(a,b){a.R=b?a.R|65536:a.R&-65537}function Oi(a){return 0!==(a.R&131072)}C.prototype.Ef=function(a){this.R=a?this.R|131072:this.R&-131073};function Yn(a,b){a.R=b?a.R|1048576:a.R&-1048577}w.defineProperty(C,{qE:"isAnimated"},function(){return 0!==(this.R&262144)},function(a){var b=0!==(this.R&262144);b!==a&&(u&&w.g(a,"boolean",C,"isAnimated"),this.R^=262144,this.i("isAnimated",b,a))});
- w.defineProperty(C,{ex:"selectionObjectName"},function(){return this.$r},function(a){var b=this.$r;b!==a&&(u&&w.g(a,"string",C,"selectionObjectName"),this.$r=a,this.wm=null,this.i("selectionObjectName",b,a))});w.defineProperty(C,{SI:"selectionAdornmentTemplate"},function(){return this.Yr},function(a){var b=this.Yr;b!==a&&(u&&w.k(a,da,C,"selectionAdornmentTemplate"),this instanceof G&&(a.type=jh),this.Yr=a,this.i("selectionAdornmentTemplate",b,a))});
- w.w(C,{jn:"selectionObject"},function(){if(null===this.wm){var a=this.ex;null!==a&&""!==a?(a=this.te(a),this.wm=null!==a?a:this):this instanceof G?(a=this.path,this.wm=null!==a?a:this):this.wm=this}return this.wm});w.defineProperty(C,{TI:"selectionChanged"},function(){return this.Zr},function(a){var b=this.Zr;b!==a&&(null!==a&&w.g(a,"function",C,"selectionChanged"),this.Zr=a,this.i("selectionChanged",b,a))});
- w.defineProperty(C,{cF:"resizeAdornmentTemplate"},function(){return this.Lr},function(a){var b=this.Lr;b!==a&&(u&&w.k(a,da,C,"resizeAdornmentTemplate"),this.Lr=a,this.i("resizeAdornmentTemplate",b,a))});w.defineProperty(C,{eF:"resizeObjectName"},function(){return this.Nr},function(a){var b=this.Nr;b!==a&&(u&&w.g(a,"string",C,"resizeObjectName"),this.Nr=a,this.so=null,this.i("resizeObjectName",b,a))});
- w.w(C,{dF:"resizeObject"},function(){if(null===this.so){var a=this.eF;null!==a&&""!==a?(a=this.te(a),this.so=null!==a?a:this):this.so=this}return this.so});w.defineProperty(C,{JI:"resizeCellSize"},function(){return this.Mr},function(a){var b=this.Mr;b.N(a)||(u&&w.k(a,pa,C,"resizeCellSize"),this.Mr=a=a.da(),this.i("resizeCellSize",b,a))});
- w.defineProperty(C,{LI:"rotateAdornmentTemplate"},function(){return this.Pr},function(a){var b=this.Pr;b!==a&&(u&&w.k(a,da,C,"rotateAdornmentTemplate"),this.Pr=a,this.i("rotateAdornmentTemplate",b,a))});w.defineProperty(C,{MI:"rotateObjectName"},function(){return this.Qr},function(a){var b=this.Qr;b!==a&&(u&&w.g(a,"string",C,"rotateObjectName"),this.Qr=a,this.to=null,this.i("rotateObjectName",b,a))});
- w.w(C,{hF:"rotateObject"},function(){if(null===this.to){var a=this.MI;null!==a&&""!==a?(a=this.te(a),this.to=null!==a?a:this):this.to=this}return this.to});w.defineProperty(C,{text:"text"},function(){return this.re},function(a){var b=this.re;b!==a&&(u&&w.g(a,"string",C,"text"),this.re=a,this.i("text",b,a))});
- w.defineProperty(C,{Va:"containingGroup"},function(){return this.Dk},function(a){if(this.Td()){var b=this.Dk;if(b!==a){u&&null!==a&&w.k(a,F,C,"containingGroup");null===a||this!==a&&!a.di(this)||(this===a&&w.l("Cannot make a Group a member of itself: "+this.toString()),w.l("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString()));this.K(Yj);var c=this.h;null!==b?Zn(b,this):this instanceof F&&null!==c&&c.al.remove(this);this.Dk=a;null!==a?$n(a,this):this instanceof
- F&&null!==c&&c.al.add(this);this.K(Qj);if(null!==c){var d=this.data,e=c.ha;null!==d&&e instanceof X&&e.ix(d,e.Db(null!==a?a.data:null))}d=this.CD;null!==d&&(e=!0,null!==c&&(e=c.Ua,c.Ua=!0),d(this,b,a),null!==c&&(c.Ua=e));if(this instanceof F)for(c=new L(C),Af(c,this,!0,0,!0),c=c.j;c.next();)if(d=c.value,d instanceof D)for(d=d.Vd;d.next();)Ek(d.value);if(this instanceof D)for(d=this.Vd;d.next();)Ek(d.value);this.i("containingGroup",b,a);null!==a&&a.mx()}}else w.l("cannot set the Part.containingGroup of a Link or Adornment")});
- f=C.prototype;f.yl=function(){var a=this.Va;null!==a&&(a.V(),null!==a.Nb&&a.Nb.V(),a.hf())};f.sa=function(){var a=this.h;null!==a&&!Ij(this)&&!Jj(this)&&this.Na()&&this.Ob.J()&&a.sa(Ti(this,this.Ob))};f.ct=function(a){var b=this.Dk;null===b||a||$n(b,this)};f.dt=function(a){var b=this.Dk;null===b||a||Zn(b,this)};f.Tm=function(){var a=this.data;if(null!==a){var b=this.h;null!==b&&(b=b.ha,null!==b&&b.uA(a))}};
- w.defineProperty(C,{CD:"containingGroupChanged"},function(){return this.bq},function(a){var b=this.bq;b!==a&&(null!==a&&w.g(a,"function",C,"containingGroupChanged"),this.bq=a,this.i("containingGroupChanged",b,a))});C.prototype.findSubGraphLevel=function(){return ao(this,this)};function ao(a,b){var c=b.Va;return null!==c?1+ao(a,c):b instanceof D&&(c=b.Cd,null!==c)?ao(a,c):0}C.prototype.findTopLevelPart=function(){return bo(this,this)};
- function bo(a,b){var c=b.Va;return null!==c?bo(a,c):b instanceof D&&(c=b.Cd,null!==c)?bo(a,c):b}w.w(C,{dp:"isTopLevel"},function(){return null!==this.Va||this instanceof D&&this.Af?!1:!0});C.prototype.isMemberOf=C.prototype.di=function(a){return a instanceof F?co(this,this,a):!1};function co(a,b,c){if(b===c||null===c)return!1;var d=b.Va;return null===d||d!==c&&!co(a,d,c)?b instanceof D&&(b=b.Cd,null!==b)?co(a,b,c):!1:!0}
- C.prototype.findCommonContainingGroup=C.prototype.rH=function(a){if(null===a)return null;u&&w.k(a,C,C,"findCommonContainingGroup:other");if(this===a)return this.Va;for(var b=this;null!==b;)b instanceof F&&Yn(b,!0),b=b.Va;for(var c=null,b=a;null!==b;){if(0!==(b.R&1048576)){c=b;break}b=b.Va}for(b=this;null!==b;)b instanceof F&&Yn(b,!1),b=b.Va;return c};
- w.defineProperty(C,{eI:"layoutConditions"},function(){return this.Sq},function(a){var b=this.Sq;b!==a&&(u&&w.g(a,"number",C,"layoutConditions"),this.Sq=a,this.i("layoutConditions",b,a))});C.prototype.canLayout=function(){if(!this.Wz||!this.Na())return!1;var a=this.layer;return null!==a&&a.Hc||this instanceof D&&this.Af?!1:!0};
- C.prototype.invalidateLayout=C.prototype.K=function(a){void 0===a&&(a=16777215);var b;this.Wz&&0!==(a&this.eI)?(b=this.layer,null!==b&&b.Hc||this instanceof D&&this.Af?b=!1:(b=this.h,b=null!==b&&b.na.lb?!1:!0)):b=!1;if(b)if(b=this.Dk,null!==b){var c=b.Ub;null!==c?c.K():b.K(a)}else a=this.h,null!==a&&(c=a.Ub,null!==c&&c.K())};function Vj(a){if(!a.Na())return!1;a=a.layer;return null!==a&&a.Hc?!1:!0}
- w.defineProperty(C,{QD:"dragComputation"},function(){return this.lq},function(a){var b=this.lq;b!==a&&(null!==a&&w.g(a,"function",C,"dragComputation"),this.lq=a,this.i("dragComputation",b,a))});w.defineProperty(C,{YI:"shadowOffset"},function(){return this.zm},function(a){var b=this.zm;b.N(a)||(u&&w.k(a,I,C,"shadowOffset"),this.zm=a=a.da(),this.sa(),this.i("shadowOffset",b,a))});
- w.defineProperty(C,{shadowColor:"shadowColor"},function(){return this.ym},function(a){var b=this.ym;b!==a&&(u&&w.g(a,"string",C,"shadowColor"),this.ym=a,this.sa(),this.i("shadowColor",b,a))});w.defineProperty(C,{shadowBlur:"shadowBlur"},function(){return this.xm},function(a){var b=this.xm;b!==a&&(u&&w.g(a,"number",C,"shadowBlur"),this.xm=a,this.sa(),this.i("shadowBlur",b,a))});
- function da(a){0===arguments.length?C.call(this,Nh):C.call(this,a);this.jf="Adornment";this.Lb=null;this.R&=-257;this.ah=new I(NaN,NaN);this.lj=new K(x);this.Nb=null}w.Pa(da,C);w.la("Adornment",da);da.prototype.toString=function(){var a=this.Zh;return"Adornment("+this.Tc+")"+(null!==a?a.toString():"")};da.prototype.updateRelationshipsFromData=function(){};
- da.prototype.qt=function(){var a=this.Bc.W,b=this.Bc;if(a instanceof G&&b instanceof Y){var c=a.path,b=c.Xa;a.qt();for(var b=c.Xa,a=this.va.p,c=a.length,d=0;d<c;d++){var e=a[d];e.Uf&&e instanceof Y&&(e.Xa=b)}}};w.w(da,{placeholder:"placeholder"},function(){return this.Nb});
- w.defineProperty(da,{Bc:"adornedObject"},function(){return this.Lb},function(a){u&&null!==a&&w.k(a,V,C,"adornedObject:value");var b=this.Zh,c=null;null!==a&&(c=a.W);null===b||null!==a&&b===c||b.Hl(this.Tc);this.Lb=a;null!==c&&c.cl(this.Tc,this)});w.w(da,{Zh:"adornedPart"},function(){var a=this.Lb;return null!==a?a.W:null});da.prototype.Bl=function(){var a=this.Lb;if(null===a)return!0;a=a.W;return null===a||!Ij(a)};da.prototype.Td=function(){return!1};w.w(da,{Va:"containingGroup"},function(){return null});
- da.prototype.gn=function(a,b,c,d,e,g,h){if(a===ve&&"elements"===b)if(e instanceof yh){var k=e;null===this.Nb?this.Nb=k:this.Nb!==k&&w.l("Cannot insert a second Placeholder into the visual tree of an Adornment.")}else e instanceof H&&(k=e.Rs(function(a){return a instanceof yh}),k instanceof yh&&(null===this.Nb?this.Nb=k:this.Nb!==k&&w.l("Cannot insert a second Placeholder into the visual tree of an Adornment.")));else a===we&&"elements"===b&&null!==this.Nb&&(d===this.Nb?this.Nb=null:d instanceof H&&
- this.Nb.Al(d)&&(this.Nb=null));C.prototype.gn.call(this,a,b,c,d,e,g,h)};da.prototype.updateAdornments=function(){};da.prototype.Tm=function(){};function D(a){0===arguments.length?C.call(this,Nh):C.call(this,a);this.oc=new K(G);this.io=this.Qk=this.Vq=this.Uq=null;this.Lq=!0;this.us=!1;this.ps=null;this.Vp=this.Mq=!0;this.Wp=O.WF;this.yd=this.Ch=null;this.Er=eo;this.Wj=!1}w.Pa(D,C);w.la("Node",D);
- D.prototype.cloneProtected=function(a){C.prototype.cloneProtected.call(this,a);a.Uq=this.Uq;a.Vq=this.Vq;a.Qk=this.Qk;a.Lq=this.Lq;a.us=this.us;a.ps=this.ps;a.Mq=this.Mq;a.Vp=this.Vp;a.Wp=this.Wp.da();a.Er=this.Er};D.prototype.ai=function(a){C.prototype.ai.call(this,a);a.hf();a.Ch=this.Ch;a.yd=null};var fo;D.DirectionDefault=fo=w.v(D,"DirectionDefault",0);D.DirectionAbsolute=w.v(D,"DirectionAbsolute",1);var ho;D.DirectionRotatedNode=ho=w.v(D,"DirectionRotatedNode",2);var pl;
- D.DirectionRotatedNodeOrthogonal=pl=w.v(D,"DirectionRotatedNodeOrthogonal",3);D.SpreadingNone=w.v(D,"SpreadingNone",10);var eo;D.SpreadingEvenly=eo=w.v(D,"SpreadingEvenly",11);var io;D.SpreadingPacked=io=w.v(D,"SpreadingPacked",12);function jo(a,b){null!==b&&(null===a.Ch&&(a.Ch=new L(ko)),a.Ch.add(b))}
- D.prototype.gn=function(a,b,c,d,e,g,h){a===ve&&"elements"===b?this.yd=null:a===we&&"elements"===b&&(null===this.h?this.yd=null:d instanceof V&&Um(this,d,function(a,b){Ql(a,b,!0)}));C.prototype.gn.call(this,a,b,c,d,e,g,h)};D.prototype.invalidateConnectedLinks=D.prototype.hf=function(a){void 0===a&&(a=null);for(var b=this.Vd;b.next();){var c=b.value;null!==a&&a.contains(c)||(lo(this,c.nd),lo(this,c.Wd),c.dc())}};function lo(a,b){if(null!==b){b.Dr=null;var c=a.Va;null===c||c.me||lo(c,c.rl(""))}}
- D.prototype.Bl=function(){return!0};w.defineProperty(D,{DI:"portSpreading"},function(){return this.Er},function(a){var b=this.Er;b!==a&&(u&&w.Ea(a,D,D,"portSpreading"),this.Er=a,this.i("portSpreading",b,a),a=this.h,null!==a&&a.na.lb||this.hf())});w.defineProperty(D,{tD:"avoidable"},function(){return this.Vp},function(a){var b=this.Vp;if(b!==a){u&&w.g(a,"boolean",D,"avoidable");this.Vp=a;var c=this.h;null!==c&&Wk(c,this);this.i("avoidable",b,a)}});
- w.defineProperty(D,{EG:"avoidableMargin"},function(){return this.Wp},function(a){"number"===typeof a?a=new vb(a):w.k(a,vb,D,"avoidableMargin");var b=this.Wp;if(!b.N(a)){this.Wp=a=a.da();var c=this.h;null!==c&&Wk(c,this);this.i("avoidableMargin",b,a)}});D.prototype.canAvoid=function(){return this.tD&&!this.Af};D.prototype.getAvoidableRect=function(a){a.set(this.ca);a.Vv(this.EG);return a};D.prototype.findVisibleNode=function(){for(var a=this;null!==a&&!a.Na();)a=a.Va;return a};
- D.prototype.Qe=function(a){C.prototype.Qe.call(this,a);for(var b=this.Vd;b.next();)b.value.Qe(a)};w.w(D,{Vd:"linksConnected"},function(){return this.oc.j});D.prototype.findLinksConnected=D.prototype.YD=function(a){void 0===a&&(a=null);if(null===a)return this.oc.j;u&&w.g(a,"string",D,"findLinksConnected:pid");var b=new Ta(this.oc),c=this;b.fn=function(b){return b.aa===c&&b.Sf===a||b.fa===c&&b.Pg===a};return b};
- D.prototype.findLinksOutOf=D.prototype.rw=function(a){void 0===a&&(a=null);u&&null!==a&&w.g(a,"string",D,"findLinksOutOf:pid");var b=new Ta(this.oc),c=this;b.fn=function(b){return b.aa!==c?!1:null===a?!0:b.Sf===a};return b};D.prototype.findLinksInto=D.prototype.Dg=function(a){void 0===a&&(a=null);u&&null!==a&&w.g(a,"string",D,"findLinksInto:pid");var b=new Ta(this.oc),c=this;b.fn=function(b){return b.fa!==c?!1:null===a?!0:b.Pg===a};return b};
- D.prototype.findNodesConnected=D.prototype.ZD=function(a){void 0===a&&(a=null);u&&null!==a&&w.g(a,"string",D,"findNodesConnected:pid");for(var b=null,c=null,d=this.oc.j;d.next();){var e=d.value;if(e.aa===this){if(null===a||e.Sf===a)e=e.fa,null!==b?b.add(e):null!==c&&c!==e?(b=new L(D),b.add(c),b.add(e)):c=e}else e.fa!==this||null!==a&&e.Pg!==a||(e=e.aa,null!==b?b.add(e):null!==c&&c!==e?(b=new L(D),b.add(c),b.add(e)):c=e)}return null!==b?b.j:null!==c?new Qa(c):Pa};
- D.prototype.findNodesOutOf=function(a){void 0===a&&(a=null);u&&null!==a&&w.g(a,"string",D,"findNodesOutOf:pid");for(var b=null,c=null,d=this.oc.j;d.next();){var e=d.value;e.aa!==this||null!==a&&e.Sf!==a||(e=e.fa,null!==b?b.add(e):null!==c&&c!==e?(b=new L(D),b.add(c),b.add(e)):c=e)}return null!==b?b.j:null!==c?new Qa(c):Pa};
- D.prototype.findNodesInto=function(a){void 0===a&&(a=null);u&&null!==a&&w.g(a,"string",D,"findNodesInto:pid");for(var b=null,c=null,d=this.oc.j;d.next();){var e=d.value;e.fa!==this||null!==a&&e.Pg!==a||(e=e.aa,null!==b?b.add(e):null!==c&&c!==e?(b=new L(D),b.add(c),b.add(e)):c=e)}return null!==b?b.j:null!==c?new Qa(c):Pa};
- D.prototype.findLinksBetween=function(a,b,c){void 0===b&&(b=null);void 0===c&&(c=null);u&&(w.k(a,D,D,"findLinksBetween:othernode"),null!==b&&w.g(b,"string",D,"findLinksBetween:pid"),null!==c&&w.g(c,"string",D,"findLinksBetween:otherpid"));var d=new Ta(this.oc),e=this;d.fn=function(d){return(d.aa!==e||d.fa!==a||null!==b&&d.Sf!==b||null!==c&&d.Pg!==c)&&(d.aa!==a||d.fa!==e||null!==c&&d.Sf!==c||null!==b&&d.Pg!==b)?!1:!0};return d};
- D.prototype.findLinksTo=function(a,b,c){void 0===b&&(b=null);void 0===c&&(c=null);u&&(w.k(a,D,D,"findLinksTo:othernode"),null!==b&&w.g(b,"string",D,"findLinksTo:pid"),null!==c&&w.g(c,"string",D,"findLinksTo:otherpid"));var d=new Ta(this.oc),e=this;d.fn=function(d){return d.aa!==e||d.fa!==a||null!==b&&d.Sf!==b||null!==c&&d.Pg===c?!1:!0};return d};
- w.defineProperty(D,{gI:"linkConnected"},function(){return this.Uq},function(a){var b=this.Uq;b!==a&&(null!==a&&w.g(a,"function",D,"linkConnected"),this.Uq=a,this.i("linkConnected",b,a))});w.defineProperty(D,{hI:"linkDisconnected"},function(){return this.Vq},function(a){var b=this.Vq;b!==a&&(null!==a&&w.g(a,"function",D,"linkDisconnected"),this.Vq=a,this.i("linkDisconnected",b,a))});
- w.defineProperty(D,{Nw:"linkValidation"},function(){return this.Qk},function(a){var b=this.Qk;b!==a&&(null!==a&&w.g(a,"function",D,"linkValidation"),this.Qk=a,this.i("linkValidation",b,a))});
- function mo(a,b,c){lo(a,c);if(!a.oc.contains(b)){a.oc.add(b);var d=a.gI;if(null!==d){var e=!0,g=a.h;null!==g&&(e=g.Ua,g.Ua=!0);d(a,b,c);null!==g&&(g.Ua=e)}b.Ic&&(c=b.aa,b=b.fa,null!==c&&null!==b&&c!==b&&(d=!0,g=a.h,null!==g&&(d=g.Bd),a=d?b:c,e=d?c:b,a.Wj||(a.Wj=e),!e.$i||null!==g&&g.na.lb||(d?c===e&&(e.$i=!1):b===e&&(e.$i=!1))))}}
- function no(a,b,c){lo(a,c);if(a.oc.remove(b)){var d=a.hI,e=a.h;if(null!==d){var g=!0;null!==e&&(g=e.Ua,e.Ua=!0);d(a,b,c);null!==e&&(e.Ua=g)}b.Ic&&(c=!0,null!==e&&(c=e.Bd),a=c?b.fa:b.aa,b=c?b.aa:b.fa,null!==a&&(a.Wj=!1),null===b||b.$i||(0===b.oc.count?(b.Wj=null,null!==e&&e.na.lb||(b.$i=!0)):Qk(b)))}}
- function Qk(a){a.Wj=!1;if(0!==a.oc.count){var b=!0,c=a.h;if(null===c||!c.na.lb){null!==c&&(b=c.Bd);for(c=a.oc.j;c.next();){var d=c.value;if(d.Ic)if(b){if(d.aa===a){a.$i=!1;return}}else if(d.fa===a){a.$i=!1;return}}a.$i=!0}}}
- D.prototype.updateRelationshipsFromData=function(){C.prototype.updateRelationshipsFromData.call(this);var a=this.data;if(null!==a){var b=this.h;if(null!==b){var c=b.ha;if(c instanceof Be){var d=c.Ym(a),b=b.ff(d),e=this.Vm();b!==e&&(b=null!==e?c.Db(e.data):void 0,e=c.sp,"function"===typeof e?e(a,b):a[e]=b,c.yh(a,d))}}}};D.prototype.ct=function(a){C.prototype.ct.call(this,a);a||Qk(this);var b=this.io;null===b||a||oo(b,this)};
- D.prototype.dt=function(a){C.prototype.dt.call(this,a);var b=this.io;null===b||a||null===b.De||(b.De.remove(this),b.V())};D.prototype.Tm=function(){if(0<this.oc.count){var a=this.h;if(null===a)return;for(var b=this.oc.copy().j;b.next();)a.remove(b.value)}this.Cd=null;C.prototype.Tm.call(this)};w.w(D,{Af:"isLinkLabel"},function(){return null!==this.io});
- w.defineProperty(D,{Cd:"labeledLink"},function(){return this.io},function(a){var b=this.io;if(b!==a){u&&null!==a&&w.k(a,G,D,"labeledLink");var c=this.h,d=this.data;if(null!==b&&(null!==b.De&&(b.De.remove(this),b.V()),null!==c&&null!==d&&!c.na.lb)){var e=b.data,g=c.ha;if(null!==e&&g instanceof X){var h=g.Db(d);void 0!==h&&g.WE(e,h)}}this.io=a;null!==a&&(oo(a,this),null===c||null===d||c.na.lb||(e=a.data,g=c.ha,null!==e&&g instanceof X&&(h=g.Db(d),void 0!==h&&g.kz(e,h))));Kl(this);this.i("labeledLink",
- b,a)}});D.prototype.findPort=D.prototype.rl=function(a){u&&w.g(a,"string",D,"findPort:pid");if(null===this.yd){if(""===a&&!1===this.Lh)return this;Rl(this)}var b=this.yd.za(a);return null!==b||""!==a&&(b=this.yd.za(""),null!==b)?b:this};w.w(D,{port:"port"},function(){return this.rl("")});w.w(D,{ports:"ports"},function(){null===this.yd&&Rl(this);return this.yd.yE});
- function Rl(a){null===a.yd?a.yd=new ta("string",V):a.yd.clear();Um(a,a,function(a,c){var d=c.td;null!==d&&a.yd.add(d,c)});0===a.yd.count&&a.yd.add("",a)}function Ql(a,b,c){var d=b.td;if(null!==d&&(null!==a.yd&&a.yd.remove(d),b=a.h,null!==b&&c)){c=null;for(d=a.YD(d);d.next();)a=d.value,null===c&&(c=w.nb()),c.push(a);if(null!==c){for(d=0;d<c.length;d++)a=c[d],b.remove(a);w.xa(c)}}}
- D.prototype.isInTreeOf=function(a){if(null===a||a===this)return!1;var b=!0,c=this.h;null!==c&&(b=c.Bd);c=this;if(b)for(;c!==a;){for(var b=null,d=c.oc.j;d.next();){var e=d.value;if(e.Ic&&(b=e.aa,b!==c&&b!==this))break}if(b===this||null===b||b===c)return!1;c=b}else for(;c!==a;){b=null;for(d=c.oc.j;d.next()&&(e=d.value,!e.Ic||(b=e.fa,b===c||b===this)););if(b===this||null===b||b===c)return!1;c=b}return!0};
- D.prototype.findTreeRoot=function(){var a=!0,b=this.h;null!==b&&(a=b.Bd);b=this;if(a)for(;;){for(var a=null,c=b.oc.j;c.next();){var d=c.value;if(d.Ic&&(a=d.aa,a!==b&&a!==this))break}if(a===this)return this;if(null===a||a===b)return b;b=a}else for(;;){a=null;for(c=b.oc.j;c.next()&&(d=c.value,!d.Ic||(a=d.fa,a===b||a===this)););if(a===this)return this;if(null===a||a===b)return b;b=a}};
- D.prototype.findCommonTreeParent=function(a){if(null===a)return null;u&&w.k(a,D,D,"findCommonTreeParent:other");if(this===a)return this;for(var b=this;null!==b;)Yn(b,!0),b=b.Vm();for(var c=null,b=a;null!==b;){if(0!==(b.R&1048576)){c=b;break}b=b.Vm()}for(b=this;null!==b;)Yn(b,!1),b=b.Vm();return c};
- D.prototype.findTreeParentLink=D.prototype.Us=function(){var a=!0,b=this.h;null!==b&&(a=b.Bd);b=this.oc.j;if(a)for(;b.next();){if(a=b.value,a.Ic&&a.aa!==this)return a}else for(;b.next();)if(a=b.value,a.Ic&&a.fa!==this)return a;return null};
- D.prototype.findTreeParentNode=D.prototype.Vm=function(){var a=this.Wj;if(null===a)return null;if(a instanceof D)return a;var b=!0,a=this.h;null!==a&&(b=a.Bd);a=this.oc.j;if(b)for(;a.next();){if(b=a.value,b.Ic&&(b=b.aa,b!==this))return this.Wj=b}else for(;a.next();)if(b=a.value,b.Ic&&(b=b.fa,b!==this))return this.Wj=b;return this.Wj=null};D.prototype.findTreeLevel=function(){return po(this,this)};function po(a,b){var c=b.Vm();return null===c?0:1+po(a,c)}
- D.prototype.findTreeChildrenLinks=D.prototype.tw=function(){var a=!0,b=this.h;null!==b&&(a=b.Bd);if(a){var a=new Ta(this.oc),c=this;a.fn=function(a){return a.Ic&&a.aa===c?!0:!1}}else a=new Ta(this.oc),c=this,a.fn=function(a){return a.Ic&&a.fa===c?!0:!1};return a};
- D.prototype.findTreeChildrenNodes=D.prototype.aE=function(){var a=!0,b=this.h;null!==b&&(a=b.Bd);var c=b=null,d=this.oc.j;if(a)for(;d.next();)a=d.value,a.Ic&&a.aa===this&&(a=a.fa,null!==b?b.add(a):null!==c&&c!==a?(b=new K(D),b.add(c),b.add(a)):c=a);else for(;d.next();)a=d.value,a.Ic&&a.fa===this&&(a=a.aa,null!==b?b.add(a):null!==c&&c!==a?(b=new K(D),b.add(c),b.add(a)):c=a);return null!==b?b.j:null!==c?new Qa(c):Pa};
- D.prototype.findTreeParts=function(a){void 0===a&&(a=Infinity);w.g(a,"number",D,"collapseTree:level");var b=new L(C);Af(b,this,!1,a,!0);return b};D.prototype.collapseTree=D.prototype.collapseTree=function(a){void 0===a&&(a=1);w.o(a,D,"collapseTree:level");1>a&&(a=1);var b=this.h;if(null!==b&&!b.ve){var c=b.Tb;0!==b.na.Ue&&c.Fl();b.ve=!0;var c=b.Bd,d=new L(D);d.add(this);qo(this,d,c,a,this.bd);b.ve=!1}};
- function qo(a,b,c,d,e){if(1<d)for(e=c?a.rw():a.Dg();e.next();){var g=e.value;g.Ic&&(g=g.Jz(a),null===g||g===a||b.contains(g)||(b.add(g),qo(g,b,c,d-1,g.bd)))}else ro(a,b,c,e)}function ro(a,b,c,d){for(var e=c?a.rw():a.Dg();e.next();){var g=e.value;g.Ic&&(g=g.Jz(a),null===g||g===a||b.contains(g)||(b.add(g),d&&(g.yl(),g.Qe(!1)),g.bd&&(g.Ip=g.bd,ro(g,b,c,g.Ip))))}a.bd=!1}
- D.prototype.expandTree=D.prototype.expandTree=function(a){void 0===a&&(a=2);w.o(a,D,"expandTree:level");2>a&&(a=2);var b=this.h;if(null!==b&&!b.ve){var c=b.Tb;0!==b.na.Ue&&c.Fl();b.ve=!0;var d=b.Bd,e=new L(D);e.add(this);so(this,e,d,a,this.bd,c,this);b.ve=!1}};function so(a,b,c,d,e,g,h){for(var k=c?a.rw():a.Dg();k.next();){var l=k.value;l.Ic&&(e||l.wg||l.dc(),l=l.Jz(a),null!==l&&l!==a&&!b.contains(l)&&(b.add(l),e||(l.Qe(!0),l.yl(),Ai(g,l,h)),2<d||l.Ip))&&(l.Ip=!1,so(l,b,c,d-1,l.bd,g,h))}a.bd=!0}
- w.defineProperty(D,{bd:"isTreeExpanded"},function(){return this.Lq},function(a){var b=this.Lq;if(b!==a){u&&w.g(a,"boolean",D,"isTreeExpanded");this.Lq=a;var c=this.h;this.i("isTreeExpanded",b,a);b=this.mJ;if(null!==b){var d=!0;null!==c&&(d=c.Ua,c.Ua=!0);b(this);null!==c&&(c.Ua=d)}a?null===c||c.ve||(0!==c.na.Ue&&c.Tb.Fl(),c.ve=!0,a=c.Bd,b=new L(D),b.add(this),so(this,b,a,2,!1,c.Tb,this),c.ve=!1):null===c||c.ve||(0!==c.na.Ue&&c.Tb.Fl(),c.ve=!0,a=c.Bd,b=new L(D),b.add(this),ro(this,b,a,!0),c.ve=!1)}});
- w.defineProperty(D,{Ip:"wasTreeExpanded"},function(){return this.us},function(a){var b=this.us;b!==a&&(u&&w.g(a,"boolean",D,"wasTreeExpanded"),this.us=a,this.i("wasTreeExpanded",b,a))});w.defineProperty(D,{mJ:"treeExpandedChanged"},function(){return this.ps},function(a){var b=this.ps;b!==a&&(null!==a&&w.g(a,"function",D,"treeExpandedChanged"),this.ps=a,this.i("treeExpandedChanged",b,a))});
- w.defineProperty(D,{$i:"isTreeLeaf"},function(){return this.Mq},function(a){var b=this.Mq;b!==a&&(u&&w.g(a,"boolean",D,"isTreeLeaf"),this.Mq=a,this.i("isTreeLeaf",b,a))});
- function G(){C.call(this,jh);this.kg=null;this.Kh="";this.vg=this.tq=null;this.Xh="";this.os=null;this.Kr=this.Jr=this.Ir=!1;this.Nq=!0;this.Qp=mh;this.cq=0;this.fq=mh;this.gq=NaN;this.sm=bm;this.es=.5;this.De=null;this.Rc=(new K(I)).freeze();this.uo=this.Fe=null;this.wg=!1;this.Qy=null;this.Zy=!1;this.xn=this.ri=this.Xa=null;this.rf=0;this.Jn=this.Fn=null;this.lj=new K(x);this.cz=new I;this.QC=this.OC=null;this.Lx=!1;this.U=null}w.Pa(G,C);w.la("Link",G);
- G.prototype.cloneProtected=function(a){C.prototype.cloneProtected.call(this,a);a.Kh=this.Kh;a.tq=this.tq;a.Xh=this.Xh;a.os=this.os;a.Ir=this.Ir;a.Jr=this.Jr;a.Kr=this.Kr;a.Nq=this.Nq;a.Qp=this.Qp;a.cq=this.cq;a.fq=this.fq;a.gq=this.gq;a.sm=this.sm;a.es=this.es;a.U=null!==this.U?this.U.copy():null};G.prototype.ai=function(a){C.prototype.ai.call(this,a);this.Kh=a.Kh;this.Xh=a.Xh;a.Fe=null;a.dc();a.xn=this.xn;a.rf=this.rf};var bm;G.Normal=bm=w.v(G,"Normal",1);G.Orthogonal=w.v(G,"Orthogonal",2);
- G.AvoidsNodes=w.v(G,"AvoidsNodes",6);var to;G.AvoidsNodesStraight=to=w.v(G,"AvoidsNodesStraight",7);var mh;G.None=mh=w.v(G,"None",0);var th;G.Bezier=th=w.v(G,"Bezier",9);var lh;G.JumpGap=lh=w.v(G,"JumpGap",10);var kh;G.JumpOver=kh=w.v(G,"JumpOver",11);var Zl;G.End=Zl=w.v(G,"End",17);var $l;G.Scale=$l=w.v(G,"Scale",18);var am;G.Stretch=am=w.v(G,"Stretch",19);var ln;G.OrientAlong=ln=w.v(G,"OrientAlong",21);var uo;G.OrientPlus90=uo=w.v(G,"OrientPlus90",22);var vo;
- G.OrientMinus90=vo=w.v(G,"OrientMinus90",23);var wo;G.OrientOpposite=wo=w.v(G,"OrientOpposite",24);var xo;G.OrientUpright=xo=w.v(G,"OrientUpright",25);var yo;G.OrientPlus90Upright=yo=w.v(G,"OrientPlus90Upright",26);var zo;G.OrientMinus90Upright=zo=w.v(G,"OrientMinus90Upright",27);var Ao;G.OrientUpright45=Ao=w.v(G,"OrientUpright45",28);G.prototype.Ne=function(){this.U=new ol};
- G.prototype.Bl=function(){var a=this.aa;if(null!==a){var b=a.findVisibleNode();null!==b&&(a=b);if(Ij(a)||Jj(a))return!1}a=this.fa;return null!==a&&(b=a.findVisibleNode(),null!==b&&(a=b),Ij(a)||Jj(a))?!1:!0};G.prototype.CA=function(){return!1};G.prototype.Td=function(){return!1};
- G.prototype.computeAngle=function(a,b,c){a=0;switch(b){default:case mh:a=0;break;case ln:a=c;break;case uo:a=c+90;break;case vo:a=c-90;break;case wo:a=c+180;break;case xo:a=O.wt(c);90<a&&270>a&&(a-=180);break;case yo:a=O.wt(c+90);90<a&&270>a&&(a-=180);break;case zo:a=O.wt(c-90);90<a&&270>a&&(a-=180);break;case Ao:a=O.wt(c);if(45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return O.wt(a)};
- w.defineProperty(G,{aa:"fromNode"},function(){return this.kg},function(a){var b=this.kg;if(b!==a){u&&null!==a&&w.k(a,D,G,"fromNode");var c=this.nd;null!==b&&(this.vg!==b&&no(b,this,c),Bo(this),this.K(Yj));this.kg=a;this.ri=null;this.dc();var d=this.h;if(null!==d){var e=this.data,g=d.ha;if(null!==e)if(g instanceof X){var h=null!==a?a.data:null;g.hx(e,g.Db(h))}else g instanceof Be&&(h=null!==a?a.data:null,d.Bd?g.yh(e,g.Db(h)):(null!==b&&g.yh(b.data,void 0),g.yh(h,g.Db(null!==this.vg?this.vg.data:null))))}e=
- this.nd;g=this.dE;null!==g&&(h=!0,null!==d&&(h=d.Ua,d.Ua=!0),g(this,c,e),null!==d&&(d.Ua=h));null!==a&&(this.vg!==a&&mo(a,this,e),Co(this),this.K(Qj));this.i("fromNode",b,a);Ek(this)}});
- w.defineProperty(G,{Sf:"fromPortId"},function(){return this.Kh},function(a){var b=this.Kh;if(b!==a){u&&w.g(a,"string",G,"fromPortId");var c=this.nd;null!==c&&lo(this.aa,c);Bo(this);this.Kh=a;var d=this.nd;null!==d&&lo(this.aa,d);var e=this.h;if(null!==e){var g=this.data,h=e.ha;null!==g&&h instanceof X&&h.zA(g,a)}c!==d&&(this.ri=null,this.dc(),g=this.dE,null!==g&&(h=!0,null!==e&&(h=e.Ua,e.Ua=!0),g(this,c,d),null!==e&&(e.Ua=h)));Co(this);this.i("fromPortId",b,a)}});
- w.w(G,{nd:"fromPort"},function(){var a=this.kg;return null===a?null:a.rl(this.Kh)});w.defineProperty(G,{dE:"fromPortChanged"},function(){return this.tq},function(a){var b=this.tq;b!==a&&(null!==a&&w.g(a,"function",G,"fromPortChanged"),this.tq=a,this.i("fromPortChanged",b,a))});
- w.defineProperty(G,{fa:"toNode"},function(){return this.vg},function(a){var b=this.vg;if(b!==a){u&&null!==a&&w.k(a,D,G,"toNode");var c=this.Wd;null!==b&&(this.kg!==b&&no(b,this,c),Bo(this),this.K(Yj));this.vg=a;this.ri=null;this.dc();var d=this.h;if(null!==d){var e=this.data,g=d.ha;if(null!==e)if(g instanceof X){var h=null!==a?a.data:null;g.jx(e,g.Db(h))}else g instanceof Be&&(h=null!==a?a.data:null,d.Bd?(null!==b&&g.yh(b.data,void 0),g.yh(h,g.Db(null!==this.kg?this.kg.data:null))):g.yh(e,g.Db(h)))}e=
- this.Wd;g=this.CF;null!==g&&(h=!0,null!==d&&(h=d.Ua,d.Ua=!0),g(this,c,e),null!==d&&(d.Ua=h));null!==a&&(this.kg!==a&&mo(a,this,e),Co(this),this.K(Qj));this.i("toNode",b,a);Ek(this)}});
- w.defineProperty(G,{Pg:"toPortId"},function(){return this.Xh},function(a){var b=this.Xh;if(b!==a){u&&w.g(a,"string",G,"toPortId");var c=this.Wd;null!==c&&lo(this.fa,c);Bo(this);this.Xh=a;var d=this.Wd;null!==d&&lo(this.fa,d);var e=this.h;if(null!==e){var g=this.data,h=e.ha;null!==g&&h instanceof X&&h.DA(g,a)}c!==d&&(this.ri=null,this.dc(),g=this.CF,null!==g&&(h=!0,null!==e&&(h=e.Ua,e.Ua=!0),g(this,c,d),null!==e&&(e.Ua=h)));Co(this);this.i("toPortId",b,a)}});
- w.w(G,{Wd:"toPort"},function(){var a=this.vg;return null===a?null:a.rl(this.Xh)});w.defineProperty(G,{CF:"toPortChanged"},function(){return this.os},function(a){var b=this.os;b!==a&&(null!==a&&w.g(a,"function",G,"toPortChanged"),this.os=a,this.i("toPortChanged",b,a))});w.defineProperty(G,{Cb:"fromSpot"},function(){return null!==this.U?this.U.tj:Pc},function(a){null===this.U&&this.Ne();var b=this.U.tj;b.N(a)||(u&&w.k(a,Q,G,"fromSpot"),a=a.da(),this.U.tj=a,this.i("fromSpot",b,a),this.dc())});
- w.defineProperty(G,{sl:"fromEndSegmentLength"},function(){return null!==this.U?this.U.rj:NaN},function(a){null===this.U&&this.Ne();var b=this.U.rj;b!==a&&(u&&w.g(a,"number",G,"fromEndSegmentLength"),0>a&&w.ja(a,">= 0",G,"fromEndSegmentLength"),this.U.rj=a,this.i("fromEndSegmentLength",b,a),this.dc())});
- w.defineProperty(G,{Ys:"fromEndSegmentDirection"},function(){return null!==this.U?this.U.qj:fo},function(a){null===this.U&&this.Ne();var b=this.U.qj;b!==a&&(u&&w.Ea(a,D,G,"fromEndSegmentDirection"),this.U.qj=a,this.i("fromEndSegmentDirection",b,a),this.dc())});w.defineProperty(G,{Zs:"fromShortLength"},function(){return null!==this.U?this.U.sj:NaN},function(a){null===this.U&&this.Ne();var b=this.U.sj;b!==a&&(u&&w.g(a,"number",G,"fromShortLength"),this.U.sj=a,this.i("fromShortLength",b,a),this.dc())});
- w.defineProperty(G,{Eb:"toSpot"},function(){return null!==this.U?this.U.Vj:Pc},function(a){null===this.U&&this.Ne();var b=this.U.Vj;b.N(a)||(u&&w.k(a,Q,G,"toSpot"),a=a.da(),this.U.Vj=a,this.i("toSpot",b,a),this.dc())});
- w.defineProperty(G,{Nl:"toEndSegmentLength"},function(){return null!==this.U?this.U.Tj:NaN},function(a){null===this.U&&this.Ne();var b=this.U.Tj;b!==a&&(u&&w.g(a,"number",G,"toEndSegmentLength"),0>a&&w.ja(a,">= 0",G,"toEndSegmentLength"),this.U.Tj=a,this.i("toEndSegmentLength",b,a),this.dc())});
- w.defineProperty(G,{Rt:"toEndSegmentDirection"},function(){return null!==this.U?this.U.Sj:fo},function(a){null===this.U&&this.Ne();var b=this.U.Sj;b!==a&&(u&&w.Ea(a,D,G,"toEndSegmentDirection"),this.U.Sj=a,this.i("toEndSegmentDirection",b,a),this.dc())});w.defineProperty(G,{Tt:"toShortLength"},function(){return null!==this.U?this.U.Uj:NaN},function(a){null===this.U&&this.Ne();var b=this.U.Uj;b!==a&&(u&&w.g(a,"number",G,"toShortLength"),this.U.Uj=a,this.i("toShortLength",b,a),this.dc())});
- function Ek(a){var b=a.aa,c=a.fa;null!==b?null!==c?Do(a,b.rH(c)):Do(a,null):Do(a,null)}function Do(a,b){var c=a.Dk;if(c!==b){null!==c&&Zn(c,a);a.Dk=b;null!==b&&$n(b,a);var d=a.CD;if(null!==d){var e=!0,g=a.h;null!==g&&(e=g.Ua,g.Ua=!0);d(a,c,b);null!==g&&(g.Ua=e)}!a.wg||a.OC!==c&&a.QC!==c||a.dc()}}G.prototype.yl=function(){var a=this.Va;null!==a&&this.aa!==a&&this.fa!==a&&C.prototype.yl.call(this)};
- G.prototype.getOtherNode=G.prototype.Jz=function(a){u&&w.k(a,D,G,"getOtherNode:node");var b=this.aa;return a===b?this.fa:b};G.prototype.getOtherPort=function(a){u&&w.k(a,V,G,"getOtherPort:port");var b=this.nd;return a===b?this.Wd:b};w.w(G,{uK:"isLabeledLink"},function(){return null===this.De?!1:0<this.De.count});w.w(G,{Vf:"labelNodes"},function(){return null===this.De?Pa:this.De.j});function oo(a,b){null===a.De&&(a.De=new L(D));a.De.add(b);a.V()}
- G.prototype.ct=function(a){C.prototype.ct.call(this,a);Eo(this)&&nh(this,this.ca);if(!a){a=this.kg;var b=this.vg;null!==a&&(mo(a,this,this.nd),Co(this));null!==b&&(mo(b,this,this.Wd),Co(this))}};G.prototype.dt=function(a){C.prototype.dt.call(this,a);Eo(this)&&nh(this,this.ca);if(!a){a=this.kg;var b=this.vg;null!==a&&(no(a,this,this.nd),Bo(this));null!==b&&(no(b,this,this.Wd),Bo(this))}};
- G.prototype.Tm=function(){this.wg=!0;if(null!==this.De){var a=this.h;if(null===a)return;for(var b=this.De.copy().j;b.next();)a.remove(b.value)}b=this.data;null!==b&&(a=this.h,null!==a&&(a=a.ha,a instanceof X?a.tA(b):a instanceof Be&&a.yh(b,void 0)))};
- G.prototype.updateRelationshipsFromData=function(){var a=this.data;if(null!==a){var b=this.h;if(null!==b){var c=b.ha;if(c instanceof X){var d=c.ul(a),e=b.ff(d),g=this.aa;e!==g&&(e=null!==g?c.Db(g.data):void 0,g=c.gp,"function"===typeof g?g(a,e):a[g]=e,c.hx(a,d));d=c.xl(a);e=b.ff(d);g=this.fa;e!==g&&(e=null!==g?c.Db(g.data):void 0,g=c.ip,"function"===typeof g?g(a,e):a[g]=e,c.jx(a,d));var h=c.fk(a);if(0<h.length||0<this.Vf.count){if(1===h.length&&1===this.Vf.count&&(b=h[0],d=this.Vf.first(),c.Db(d.data)===
- b))return;var d=(new L).ce(h),k=new L;this.Vf.each(function(a){null!==a.data&&(a=c.Db(a.data),void 0!==a&&k.add(a))});b=k.copy();b.TE(d);d=d.copy();d.TE(k);if(0<b.count||0<d.count)h.length=0,k.each(function(a){h.push(a)}),b.each(function(b){c.WE(a,b)}),d.each(function(b){c.kz(a,b)})}}}}};
- G.prototype.move=G.prototype.move=function(a){var b=this.position,c=b.x;isNaN(c)&&(c=0);b=b.y;isNaN(b)&&(b=0);c=a.x-c;b=a.y-b;C.prototype.move.call(this,a);this.El(c,b);for(a=this.Vf;a.next();){var d=a.value,e=d.position;d.moveTo(e.x+c,e.y+b)}};w.defineProperty(G,{GI:"relinkableFrom"},function(){return this.Ir},function(a){var b=this.Ir;b!==a&&(u&&w.g(a,"boolean",G,"relinkableFrom"),this.Ir=a,this.i("relinkableFrom",b,a),this.je())});
- w.defineProperty(G,{HI:"relinkableTo"},function(){return this.Jr},function(a){var b=this.Jr;b!==a&&(u&&w.g(a,"boolean",G,"relinkableTo"),this.Jr=a,this.i("relinkableTo",b,a),this.je())});G.prototype.canRelinkFrom=function(){if(!this.GI)return!1;var a=this.layer;if(null===a)return!0;if(!a.Jm)return!1;a=a.h;return null===a||a.Jm?!0:!1};G.prototype.canRelinkTo=function(){if(!this.HI)return!1;var a=this.layer;if(null===a)return!0;if(!a.Jm)return!1;a=a.h;return null===a||a.Jm?!0:!1};
- w.defineProperty(G,{Dt:"resegmentable"},function(){return this.Kr},function(a){var b=this.Kr;b!==a&&(u&&w.g(a,"boolean",G,"resegmentable"),this.Kr=a,this.i("resegmentable",b,a),this.je())});w.defineProperty(G,{Ic:"isTreeLink"},function(){return this.Nq},function(a){var b=this.Nq;b!==a&&(u&&w.g(a,"boolean",G,"isTreeLink"),this.Nq=a,this.i("isTreeLink",b,a),null!==this.aa&&Qk(this.aa),null!==this.fa&&Qk(this.fa))});w.w(G,{path:"path"},function(){var a=this.Rf();return a instanceof Y?a:null});
- w.w(G,{hn:"routeBounds"},function(){this.updateRoute();var a=new x;var b=Infinity,c=Infinity,d=this.pa;if(0===d)a.n(NaN,NaN,0,0);else{if(1===d)d=this.m(0),b=Math.min(d.x,b),c=Math.min(d.y,c),a.n(d.x,d.y,0,0);else if(2===d){var e=this.m(0),g=this.m(1),b=Math.min(e.x,g.x),c=Math.min(e.y,g.y);a.n(e.x,e.y,0,0);a.ej(g)}else if(this.computeCurve()===th&&3<=d&&!this.jc)if(e=this.m(0),b=e.x,c=e.y,a.n(b,c,0,0),3===d)d=this.m(1),b=Math.min(d.x,b),c=Math.min(d.y,c),g=this.m(2),b=Math.min(g.x,b),c=Math.min(g.y,
- c),O.Io(e.x,e.y,d.x,d.y,d.x,d.y,g.x,g.y,.5,a);else for(var h=3;h<d;h+=3){var k=this.m(h-2);h+3>=d&&(h=d-1);var l=this.m(h-1),g=this.m(h);O.Io(e.x,e.y,k.x,k.y,l.x,l.y,g.x,g.y,.5,a);b=Math.min(g.x,b);c=Math.min(g.y,c);e=g}else for(e=this.m(0),g=this.m(1),b=Math.min(e.x,g.x),c=Math.min(e.y,g.y),a.n(e.x,e.y,0,0),a.ej(g),h=2;h<d;h++)e=this.m(h),b=Math.min(e.x,b),c=Math.min(e.y,c),a.ej(e);this.cz.n(b-a.x,c-a.y)}return this.Qy=a});w.w(G,{FE:"midPoint"},function(){this.updateRoute();return this.computeMidPoint(new I)});
- G.prototype.computeMidPoint=function(a){var b=this.pa;if(0===b)return a.assign(O.UF),a;if(1===b)return a.assign(this.m(0)),a;if(2===b){var c=this.m(0),d=this.m(1);a.n((c.x+d.x)/2,(c.y+d.y)/2);return a}if(this.computeCurve()===th&&3<=b&&!this.jc){if(3===b)return this.m(1);var b=(b-1)/3|0,e=3*(b/2|0);1===b%2?(c=this.m(e),d=this.m(e+1),b=this.m(e+2),e=this.m(e+3),O.HG(c.x,c.y,d.x,d.y,b.x,b.y,e.x,e.y,a)):a.assign(this.m(e));return a}for(var e=0,g=w.nb(),h=0;h<b-1;h++)c=0,c=this.m(h),d=this.m(h+1),O.wb(c.x,
- d.x)?(c=d.y-c.y,0>c&&(c=-c)):O.wb(c.y,d.y)?(c=d.x-c.x,0>c&&(c=-c)):c=Math.sqrt(c.bk(d)),g.push(c),e+=c;for(d=h=c=0;c<e/2&&h<b;){d=g[h];if(c+d>e/2)break;c+=d;h++}w.xa(g);b=this.m(h);g=this.m(h+1);b.x===g.x?b.y>g.y?a.n(b.x,b.y-(e/2-c)):a.n(b.x,b.y+(e/2-c)):b.y===g.y?b.x>g.x?a.n(b.x-(e/2-c),b.y):a.n(b.x+(e/2-c),b.y):(e=(e/2-c)/d,a.n(b.x+e*(g.x-b.x),b.y+e*(g.y-b.y)));return a};w.w(G,{EE:"midAngle"},function(){this.updateRoute();return this.computeMidAngle()});
- G.prototype.computeMidAngle=function(){var a=this.pa;if(2>a)return NaN;if(this.computeCurve()===th&&4<=a&&!this.jc){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){var c=Math.floor(c),a=this.m(c),b=this.m(c+1),d=this.m(c+2),c=this.m(c+3);return O.GG(a.x,a.y,b.x,b.y,d.x,d.y,c.x,c.y)}if(0<c&&c+1<a)return a=this.m(c-1),b=this.m(c+1),a.Vi(b)}d=a/2|0;if(0===a%2)return a=this.m(d-1),b=this.m(d),a.Vi(b);var a=this.m(d-1),b=this.m(d),d=this.m(d+1),c=a.bk(b),e=b.bk(d);return c>e?a.Vi(b):b.Vi(d)};
- w.defineProperty(G,{points:"points"},function(){return this.Rc},function(a){var b=this.Rc;if(b!==a){var c=null;if(Array.isArray(a)){var d=0===a.length%2;if(d)for(var e=0;e<a.length;e++)if("number"!==typeof a[e]||isNaN(a[e])){d=!1;break}if(d)for(c=new K(I),d=0;d<a.length/2;d++)e=(new I(a[2*d],a[2*d+1])).freeze(),c.add(e);else{for(var g=!0,d=0;d<a.length;d++)if(e=a[d],!w.$a(e)||"number"!==typeof e.x||isNaN(e.x)||"number"!==typeof e.y||isNaN(e.y)){g=!1;break}if(g)for(c=new K(I),d=0;d<a.length;d++)e=
- a[d],c.add((new I(e.x,e.y)).freeze());else w.l("Link.points array must contain only an even number of numbers or objects with x and y properties, not: "+a)}}else if(a instanceof K)for(c=a.copy(),a=c.j;a.next();)a.value.freeze();else w.l("Link.points value is not an instance of List or Array: "+a);c.freeze();this.Rc=c;this.ue();Fo(this);a=this.h;null!==a&&(a.na.lb||a.Ow.add(this),a.Tb.jd&&(this.uo=c));this.i("points",b,c)}});w.w(G,{pa:"pointsCount"},function(){return this.Rc.count});
- G.prototype.getPoint=G.prototype.m=function(a){return this.Rc.p[a]};G.prototype.setPoint=G.prototype.Ff=function(a,b){u&&(w.k(b,I,G,"setPoint"),b.J()||w.l("Link.setPoint called with a Point that does not have real numbers: "+b.toString()));null===this.Fe&&w.l("Call Link.startRoute before modifying the points of the route.");this.Rc.Lg(a,b)};
- G.prototype.setPointAt=G.prototype.ba=function(a,b,c){u&&(w.o(b,G,"setPointAt:x"),w.o(c,G,"setPointAt:y"));null===this.Fe&&w.l("Call Link.startRoute before modifying the points of the route.");this.Rc.Lg(a,new I(b,c))};G.prototype.insertPoint=function(a,b){u&&(w.k(b,I,G,"insertPoint"),b.J()||w.l("Link.insertPoint called with a Point that does not have real numbers: "+b.toString()));null===this.Fe&&w.l("Call Link.startRoute before modifying the points of the route.");this.Rc.ie(a,b)};
- G.prototype.insertPointAt=G.prototype.B=function(a,b,c){u&&(w.o(b,G,"insertPointAt:x"),w.o(c,G,"insertPointAt:y"));null===this.Fe&&w.l("Call Link.startRoute before modifying the points of the route.");this.Rc.ie(a,new I(b,c))};G.prototype.addPoint=G.prototype.Yh=function(a){u&&(w.k(a,I,G,"addPoint"),a.J()||w.l("Link.addPoint called with a Point that does not have real numbers: "+a.toString()));null===this.Fe&&w.l("Call Link.startRoute before modifying the points of the route.");this.Rc.add(a)};
- G.prototype.addPointAt=G.prototype.dl=function(a,b){u&&(w.o(a,G,"insertPointAt:x"),w.o(b,G,"insertPointAt:y"));null===this.Fe&&w.l("Call Link.startRoute before modifying the points of the route.");this.Rc.add(new I(a,b))};G.prototype.removePoint=G.prototype.XE=function(a){null===this.Fe&&w.l("Call Link.startRoute before modifying the points of the route.");this.Rc.ud(a)};
- G.prototype.clearPoints=G.prototype.Mo=function(){null===this.Fe&&w.l("Call Link.startRoute before modifying the points of the route.");this.Rc.clear()};G.prototype.movePoints=G.prototype.El=function(a,b){for(var c=new K(I),d=this.Rc.j;d.next();){var e=d.value;c.add((new I(e.x+a,e.y+b)).freeze())}c.freeze();d=this.Rc;this.Rc=c;this.ue();Fo(this);e=this.h;null!==e&&e.Tb.jd&&(this.uo=c);this.i("points",d,c)};G.prototype.startRoute=G.prototype.Jl=function(){null===this.Fe&&(this.Fe=this.Rc,this.Rc=this.Rc.copy())};
- G.prototype.commitRoute=G.prototype.Ri=function(){if(null!==this.Fe){for(var a=this.Fe,b=this.Rc,c=Infinity,d=Infinity,e=a.p,g=e.length,h=0;h<g;h++)var k=e[h],c=Math.min(k.x,c),d=Math.min(k.y,d);for(var l=Infinity,m=Infinity,n=b.p,p=n.length,h=0;h<p;h++)k=n[h],l=Math.min(k.x,l),m=Math.min(k.y,m),k.freeze();b.freeze();if(p===g)for(h=0;h<p;h++){if(g=e[h],k=n[h],g.x-c!==k.x-l||g.y-d!==k.y-m){this.ue();break}}else this.ue();this.Fe=null;c=this.h;null!==c&&c.Tb.jd&&(this.uo=b);Fo(this);this.i("points",
- a,b)}};G.prototype.rollbackRoute=G.prototype.KI=function(){null!==this.Fe&&(this.Rc=this.Fe,this.Fe=null)};function Fo(a){0===a.Rc.count?a.wg=!1:(a.wg=!0,a.Fn=a.m(0).copy(),a.Jn=a.m(a.pa-1).copy(),Go(a,!1))}G.prototype.invalidateRoute=G.prototype.dc=function(){if(!(this.Zy||this.h&&(this.h.Ow.contains(this)||this.h.na.lb))){var a=this.path;null!==a&&(this.wg=!1,this.ue(),a.V())}};w.defineProperty(G,{Gp:null},function(){return this.Zy},function(a){this.Zy=a});
- G.prototype.updateRoute=function(){if(!this.wg&&!this.Lx){var a=!0;try{this.Lx=!0,this.Jl(),a=this.computePoints()}finally{this.Lx=!1,a?this.Ri():this.KI()}}};
- G.prototype.computePoints=function(){var a=this.h;if(null===a)return!1;var b=this.aa,c=null;null===b?(a.tm||(a.tv=new Y,a.tv.Ca=O.pn,a.tv.pb=0,a.tm=new D,a.tm.add(a.tv),a.tm.xf()),this.Fn&&(a.tm.position=a.tm.location=this.Fn,a.tm.xf(),b=a.tm,c=a.tv)):c=this.nd;if(null!==c){var d=Sl(c);d!==b&&b.Na()?c=d:(d=b.findVisibleNode(),null!==d&&d!==b?(b=d,c=d.rl("")):b=d)}this.OC=b;if(null===b||null===c||!b.location.J())return!1;var d=this.fa,e=null;null===d?(a.um||(a.uv=new Y,a.uv.Ca=O.pn,a.uv.pb=0,a.um=
- new D,a.um.add(a.uv),a.um.xf()),this.Jn&&(a.um.position=a.um.location=this.Jn,a.um.xf(),d=a.um,e=a.uv)):e=this.Wd;null!==e&&(a=Sl(e),a!==d&&d.Na()?e=a:(a=d.findVisibleNode(),null!==a&&a!==d?(d=a,e=a.rl("")):d=a));this.QC=d;if(null===d||null===e||!d.location.J())return!1;var a=this.pa,g=Ho(this,c),h=Io(this,e),k=c===e&&null!==c,l=this.jc,m=this.df===th;this.ri=k&&!l?m=!0:!1;var n=this.zs===mh||k;if(l||g!==Pb||h!==Pb||k){m=this.Zi;n&&(l&&m||k)&&this.Mo();var p=k?this.computeCurviness():0,q=this.getLinkPoint(b,
- c,g,!0,l,d,e),r=0,s=0,t=0;if(l||g!==Pb||k){var v=this.computeEndSegmentLength(b,c,g,!0),t=this.getLinkDirection(b,c,q,g,!0,l,d,e);k&&(t-=l?90:30,0>p&&(t-=180));0>t?t+=360:360<=t&&(t-=360);k&&(v+=Math.abs(p));0===t?r=v:90===t?s=v:180===t?r=-v:270===t?s=-v:(r=v*Math.cos(t*Math.PI/180),s=v*Math.sin(t*Math.PI/180));if(g.we()&&k){var y=c.vb(ac,w.O()),B=w.lc(y.x+1E3*r,y.y+1E3*s);this.getLinkPointFromPoint(b,c,y,B,!0,q);w.A(y);w.A(B)}}var v=this.getLinkPoint(d,e,h,!1,l,b,c),A=0,E=0,N=0;if(l||h!==Pb||k)y=
- this.computeEndSegmentLength(d,e,h,!1),N=this.getLinkDirection(d,e,v,h,!1,l,b,c),k&&(N+=l?0:30,0>p&&(N+=180)),0>N?N+=360:360<=N&&(N-=360),k&&(y+=Math.abs(p)),0===N?A=y:90===N?E=y:180===N?A=-y:270===N?E=-y:(A=y*Math.cos(N*Math.PI/180),E=y*Math.sin(N*Math.PI/180)),h.we()&&k&&(y=e.vb(ac,w.O()),B=w.lc(y.x+1E3*A,y.y+1E3*E),this.getLinkPointFromPoint(d,e,y,B,!1,v),w.A(y),w.A(B));e=q;if(l||g!==Pb||k)e=new I(q.x+r,q.y+s);c=v;if(l||h!==Pb||k)c=new I(v.x+A,v.y+E);!n&&!l&&g===Pb&&3<a&&this.adjustPoints(0,q,
- a-2,c)?this.Ff(a-1,v):!n&&!l&&h===Pb&&3<a&&this.adjustPoints(1,e,a-1,v)?this.Ff(0,q):!n&&!l&&4<a&&this.adjustPoints(1,e,a-2,c)?(this.Ff(0,q),this.Ff(a-1,v)):!n&&l&&6<=a&&!m&&this.adjustPoints(1,e,a-2,c)?(this.Ff(0,q),this.Ff(a-1,v)):(this.Mo(),this.Yh(q),(l||g!==Pb||k)&&this.Yh(e),l&&this.addOrthoPoints(e,t,c,N,b,d),(l||h!==Pb||k)&&this.Yh(c),this.Yh(v))}else g=!1,!n&&3<=a&&(n=this.getLinkPoint(b,c,Pb,!0,!1,d,e),h=this.getLinkPoint(d,e,Pb,!1,!1,b,c),g=this.adjustPoints(0,n,a-1,h))&&(n=this.getLinkPoint(b,
- c,Pb,!0,!1,d,e),h=this.getLinkPoint(d,e,Pb,!1,!1,b,c),this.adjustPoints(0,n,a-1,h)),g||(this.Mo(),m?(a=this.getLinkPoint(b,c,Pb,!0,!1,d,e),n=this.getLinkPoint(d,e,Pb,!1,!1,b,c),g=n.x-a.x,h=n.y-a.y,k=this.computeCurviness(),m=l=0,q=a.x+g/3,t=a.y+h/3,r=q,s=t,O.F(h,0)?s=0<g?s-k:s+k:(l=-g/h,m=Math.sqrt(k*k/(l*l+1)),0>k&&(m=-m),r=(0>h?-1:1)*m+q,s=l*(r-q)+t),q=a.x+2*g/3,t=a.y+2*h/3,v=q,A=t,O.F(h,0)?A=0<g?A-k:A+k:(v=(0>h?-1:1)*m+q,A=l*(v-q)+t),this.Mo(),this.Yh(a),this.dl(r,s),this.dl(v,A),this.Yh(n),this.Ff(0,
- this.getLinkPoint(b,c,Pb,!0,!1,d,e)),this.Ff(3,this.getLinkPoint(d,e,Pb,!1,!1,b,c))):(a=d,d=this.getLinkPoint(b,c,Pb,!0,!1,a,e),e=this.getLinkPoint(a,e,Pb,!1,!1,b,c),this.hasCurviness()?(h=e.x-d.x,b=e.y-d.y,c=this.computeCurviness(),a=d.x+h/2,n=d.y+b/2,g=a,k=n,O.F(b,0)?k=0<h?k-c:k+c:(h=-h/b,g=Math.sqrt(c*c/(h*h+1)),0>c&&(g=-g),g=(0>b?-1:1)*g+a,k=h*(g-a)+n),this.Yh(d),this.dl(g,k)):this.Yh(d),this.Yh(e)));return!0};
- function Jo(a,b){Math.abs(b.x-a.x)>Math.abs(b.y-a.y)?(b.x=b.x>=a.x?a.x+9E9:a.x-9E9,b.y=a.y):(b.y=b.y>=a.y?a.y+9E9:a.y-9E9,b.x=a.x);return b}
- G.prototype.getLinkPointFromPoint=function(a,b,c,d,e,g){void 0===g&&(g=new I);if(null===a||null===b)return g.assign(c),g;a.Na()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));var h=e=0,k=0,l=0;a=null;e=b.S;null===e||e.fg()||(e=e.S);if(null===e)e=d.x,h=d.y,k=c.x,l=c.y;else{a=e.Of;e=1/(a.m11*a.m22-a.m12*a.m21);var k=a.m22*e,l=-a.m12*e,m=-a.m21*e,n=a.m11*e,p=e*(a.m21*a.dy-a.m22*a.dx),q=e*(a.m12*a.dx-a.m11*a.dy);e=d.x*k+d.y*m+p;h=d.x*l+d.y*n+q;k=c.x*k+c.y*m+p;l=c.x*l+c.y*n+q}b.Yo(e,h,k,l,g);null!==
- a&&g.transform(a);return g};function Ko(a,b){var c=b.Dr;null===c&&(c=new Lo,c.port=b,c.Kc=b.W,b.Dr=c);return Mo(c,a)}
- G.prototype.getLinkPoint=function(a,b,c,d,e,g,h,k){void 0===k&&(k=new I);if(c.rd())return b.vb(c,k),k;if(c.cp()&&(c=Ko(this,b),null!==c)){k.assign(c.hp);if(e&&this.Zw===to){var l=Ko(this,h);if(c.Rm<l.Rm){c=w.O();var l=w.O(),m=new x(b.vb(Xb,c),b.vb(jc,l)),n=this.computeSpot(!d);a=this.getLinkPoint(g,h,n,!d,e,a,b,l);a.x>=m.x&&a.x<=m.x+m.width?k.x=a.x:a.y>=m.y&&a.y<=m.y+m.height&&(k.y=a.y);w.A(c);w.A(l)}}return k}g=b.vb(ac,w.O());l=c=null;this.pa>(e?6:2)?(l=d?this.m(1):this.m(this.pa-2),e&&(l=Jo(g,l.copy()))):
- (c=w.O(),l=h.vb(ac,c),e&&(l=Jo(g,l)));this.getLinkPointFromPoint(a,b,g,l,d,k);w.A(g);null!==c&&w.A(c);return k};
- G.prototype.getLinkDirection=function(a,b,c,d,e,g,h,k){a:if(d.rd())c=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x<d.y?d.x>1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5<d.x?45:0;else{if(d.cp()){var l=Ko(this,b);if(null!==l)switch(l.oe){case w.dd:c=270;break a;case w.Nc:c=180;break a;default:case w.Wc:c=0;break a;case w.Vc:c=90;break a}}var l=b.vb(ac,w.O()),m=null,n=null;this.pa>(g?6:2)?(n=e?this.m(1):this.m(this.pa-2),n=g?Jo(l,n.copy()):c):(m=w.O(),n=k.vb(ac,m));c=0;c=Math.abs(n.x-l.x)>Math.abs(n.y-l.y)?n.x>=
- l.x?0:180:n.y>=l.y?90:270;w.A(l);null!==m&&w.A(m)}d.we()&&h.di(a)&&(c+=180,360<=c&&(c-=360));a=fo;a=e?this.Ys:this.Rt;a===fo&&(a=e?b.Ys:b.Rt);switch(a){case ho:b=b.tl();c+=b;360<=c&&(c-=360);break;case fo:case pl:b=b.tl();if(0===b)break;45<=b&&135>b?c+=90:135<=b&&225>b?c+=180:225<=b&&315>b&&(c+=270);360<=c&&(c-=360)}return c};
- G.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.cp()&&(a=Ko(this,b),null!==a))return a.nw;a=NaN;a=d?this.sl:this.Nl;null!==b&&isNaN(a)&&(a=d?b.sl:b.Nl);isNaN(a)&&(a=10);return a};G.prototype.computeSpot=function(a){return a?Ho(this,this.nd):Io(this,this.Wd)};function Ho(a,b){if(null===b)return ac;var c=a.Cb;c.Uc()&&(void 0===b&&(b=a.nd),null!==b&&(c=b.Cb));return c===Pc?Pb:c}
- function Io(a,b){if(null===b)return ac;var c=a.Eb;c.Uc()&&(void 0===b&&(b=a.Wd),null!==b&&(c=b.Eb));return c===Pc?Pb:c}G.prototype.computeOtherPoint=function(a,b){var c=b.vb(ac),d;d=b.Dr;d=null!==d?Mo(d,this):null;null!==d&&(c=d.hp);return c};G.prototype.computeShortLength=function(a){return a?No(this):Oo(this)};function No(a){var b=a.Zs;isNaN(b)&&(a=a.nd,null!==a&&(b=a.Zs));return isNaN(b)?0:b}function Oo(a){var b=a.Tt;isNaN(b)&&(a=a.Wd,null!==a&&(b=a.Tt));return isNaN(b)?0:b}
- G.prototype.dk=function(a,b,c,d,e,g){if(!1===this.ag)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var h=g;void 0===g&&(h=w.zh(),h.reset());h.multiply(this.transform);if(this.Om(a,h))return Zm(this,b,c,e),void 0===g&&w.gf(h),!0;if(this.Gg(a,h)){var k=!1;if(!this.Yg)for(var l=this.va.p,m=l.length;m--;){var n=l[m];if(n.visible||n===this.ac){var p=n.ca,q=this.Ha;if(!(p.x>q.width||p.y>q.height||0>p.x+p.width||0>p.y+p.height)){p=w.zh();p.set(h);if(n instanceof H)k=n.dk(a,b,c,d,e,p);else if(this.path===
- n){var k=n,r=a,s=d,q=p;if(!1===k.ag)k=!1;else if(q.multiply(k.transform),s)b:{var t=r,v=q;if(k.Om(t,v))k=!0;else{if(void 0===v&&(v=k.transform,t.ak(k.ca))){k=!0;break b}var q=t.left,r=t.right,s=t.top,t=t.bottom,y=w.O(),B=w.O(),A=w.O(),E=w.zh();E.set(v);E.fA(k.transform);E.Pz();B.x=r;B.y=s;B.transform(E);y.x=q;y.y=s;y.transform(E);v=!1;jn(k,y,B,A)?v=!0:(y.x=r,y.y=t,y.transform(E),jn(k,y,B,A)?v=!0:(B.x=q,B.y=t,B.transform(E),jn(k,y,B,A)?v=!0:(y.x=q,y.y=s,y.transform(E),jn(k,y,B,A)&&(v=!0))));w.gf(E);
- w.A(y);w.A(B);w.A(A);k=v}}else k=k.Om(r,q)}else k=ul(n,a,d,p);k&&(null!==b&&(n=b(n)),n&&(null===c||c(n))&&e.add(n));w.gf(p)}}}void 0===g&&w.gf(h);return k||null!==this.background||null!==this.gl}void 0===g&&w.gf(h);return!1};w.w(G,{jc:"isOrthogonal"},function(){return 2===(this.sm.value&2)});w.w(G,{Zi:"isAvoiding"},function(){return 4===(this.sm.value&4)});G.prototype.computeCurve=function(){if(null===this.ri){var a=this.nd,b=this.jc;this.ri=null!==a&&a===this.Wd&&!b}return this.ri?th:this.df};
- G.prototype.computeCorner=function(){if(this.df===th)return 0;var a=this.xz;if(isNaN(a)||0>a)a=10;return a};G.prototype.computeCurviness=function(){var a=this.jw;if(isNaN(a)){var b=this.rf;if(0!==b){var a=10,c=this.h;null!==c&&(a=c.Mw);c=Math.abs(b);a=a/2+((c-1)/2|0)*a;0===c%2&&(a=-a);0>b&&(a=-a)}else a=10}return a};G.prototype.computeThickness=function(){var a=this.path;return null!==a?Math.max(a.pb,1):1};G.prototype.hasCurviness=function(){return!isNaN(this.jw)||0!==this.rf&&!this.jc};
- G.prototype.adjustPoints=function(a,b,c,d){var e=this.zs;if(this.jc){if(e===$l)return!1;e===am&&(e=Zl)}switch(e){case $l:var g=this.m(a),h=this.m(c);if(!g.N(b)||!h.N(d)){var e=g.x,g=g.y,k=h.x-e,l=h.y-g,m=Math.sqrt(k*k+l*l);if(!O.F(m,0)){var n=0;O.F(k,0)?n=0>l?-Math.PI/2:Math.PI/2:(n=Math.atan(l/Math.abs(k)),0>k&&(n=Math.PI-n));var h=b.x,p=b.y,l=d.x-h,q=d.y-p,r=Math.sqrt(l*l+q*q),k=0;O.F(l,0)?k=0>q?-Math.PI/2:Math.PI/2:(k=Math.atan(q/Math.abs(l)),0>l&&(k=Math.PI-k));m=r/m;n=k-n;this.Ff(a,b);for(a+=
- 1;a<c;a++)b=this.m(a),k=b.x-e,l=b.y-g,b=Math.sqrt(k*k+l*l),O.F(b,0)||(q=0,O.F(k,0)?q=0>l?-Math.PI/2:Math.PI/2:(q=Math.atan(l/Math.abs(k)),0>k&&(q=Math.PI-q)),k=q+n,b*=m,this.ba(a,h+b*Math.cos(k),p+b*Math.sin(k)));this.Ff(c,d)}}return!0;case am:g=this.m(a);p=this.m(c);if(!g.N(b)||!p.N(d)){var e=g.x,g=g.y,h=p.x,p=p.y,m=(h-e)*(h-e)+(p-g)*(p-g),k=b.x,n=b.y,l=d.x,q=d.y,r=0,s=1,r=0!==l-k?(q-n)/(l-k):9E9;0!==r&&(s=Math.sqrt(1+1/(r*r)));this.Ff(a,b);for(a+=1;a<c;a++){b=this.m(a);var t=b.x,v=b.y,y=.5;0!==
- m&&(y=((e-t)*(e-h)+(g-v)*(g-p))/m);var B=e+y*(h-e),A=g+y*(p-g);b=Math.sqrt((t-B)*(t-B)+(v-A)*(v-A));v<r*(t-B)+A&&(b=-b);0<r&&(b=-b);t=k+y*(l-k);y=n+y*(q-n);0!==r?(b=t+b/s,this.ba(a,b,y-(b-t)/r)):this.ba(a,t,y+b)}this.Ff(c,d)}return!0;case Zl:return this.jc&&(e=this.m(a),g=this.m(a+1),h=this.m(a+2),O.F(e.y,g.y)?O.F(g.x,h.x)?this.ba(a+1,g.x,b.y):O.F(g.y,h.y)&&this.ba(a+1,b.x,g.y):O.F(e.x,g.x)&&(O.F(g.y,h.y)?this.ba(a+1,b.x,g.y):O.F(g.x,h.x)&&this.ba(a+1,g.x,b.y)),e=this.m(c),g=this.m(c-1),h=this.m(c-
- 2),O.F(e.y,g.y)?O.F(g.x,h.x)?this.ba(c-1,g.x,d.y):O.F(g.y,h.y)&&this.ba(c-1,d.x,g.y):O.F(e.x,g.x)&&(O.F(g.y,h.y)?this.ba(c-1,d.x,g.y):O.F(g.x,h.x)&&this.ba(c-1,g.x,d.y))),this.Ff(a,b),this.Ff(c,d),!0;default:return!1}};
- G.prototype.addOrthoPoints=function(a,b,c,d,e,g){b=-45<=b&&45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=-45<=d&&45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.ca.copy(),k=g.ca.copy();if(h.J()&&k.J()){h.Tf(8,8);k.Tf(8,8);h.ej(a);k.ej(c);var l,m;if(0===b)if(c.x>a.x||270===d&&c.y<a.y&&k.right>a.x||90===d&&c.y>a.y&&k.right>a.x)l=new I(c.x,a.y),m=new I(c.x,(a.y+c.y)/2),180===d?(l.x=this.computeMidOrthoPosition(a.x,c.x,!1),m.x=l.x,m.y=c.y):270===d&&c.y<a.y||90===d&&c.y>a.y?(l.x=a.x<k.left?this.computeMidOrthoPosition(a.x,
- k.left,!1):a.x<k.right&&(270===d&&a.y<k.top||90===d&&a.y>k.bottom)?this.computeMidOrthoPosition(a.x,c.x,!1):k.right,m.x=l.x,m.y=c.y):0===d&&a.x<k.left&&a.y>k.top&&a.y<k.bottom&&(l.x=a.x,l.y=a.y<c.y?Math.min(c.y,k.top):Math.max(c.y,k.bottom),m.y=l.y);else{l=new I(a.x,c.y);m=new I((a.x+c.x)/2,c.y);if(180===d||90===d&&c.y<h.top||270===d&&c.y>h.bottom)180===d&&(k.Ka(a)||h.Ka(c))?l.y=this.computeMidOrthoPosition(a.y,c.y,!0):c.y<a.y&&(180===d||90===d)?l.y=this.computeMidOrthoPosition(h.top,Math.max(c.y,
- k.bottom),!0):c.y>a.y&&(180===d||270===d)&&(l.y=this.computeMidOrthoPosition(h.bottom,Math.min(c.y,k.top),!0)),m.x=c.x,m.y=l.y;if(l.y>h.top&&l.y<h.bottom)if(c.x>=h.left&&c.x<=a.x||a.x<=k.right&&a.x>=c.x){if(90===d||270===d)l=new I(Math.max((a.x+c.x)/2,a.x),a.y),m=new I(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.y<a.y?Math.min(c.y,0===d?h.top:Math.min(h.top,k.top)):Math.max(c.y,0===d?h.bottom:Math.max(h.bottom,k.bottom)),m.x=c.x,m.y=l.y}else if(180===b)if(c.x<a.x||270===d&&c.y<a.y&&k.left<a.x||
- 90===d&&c.y>a.y&&k.left<a.x)l=new I(c.x,a.y),m=new I(c.x,(a.y+c.y)/2),0===d?(l.x=this.computeMidOrthoPosition(a.x,c.x,!1),m.x=l.x,m.y=c.y):270===d&&c.y<a.y||90===d&&c.y>a.y?(l.x=a.x>k.right?this.computeMidOrthoPosition(a.x,k.right,!1):a.x>k.left&&(270===d&&a.y<k.top||90===d&&a.y>k.bottom)?this.computeMidOrthoPosition(a.x,c.x,!1):k.left,m.x=l.x,m.y=c.y):180===d&&a.x>k.right&&a.y>k.top&&a.y<k.bottom&&(l.x=a.x,l.y=a.y<c.y?Math.min(c.y,k.top):Math.max(c.y,k.bottom),m.y=l.y);else{l=new I(a.x,c.y);m=new I((a.x+
- c.x)/2,c.y);if(0===d||90===d&&c.y<h.top||270===d&&c.y>h.bottom)0===d&&(k.Ka(a)||h.Ka(c))?l.y=this.computeMidOrthoPosition(a.y,c.y,!0):c.y<a.y&&(0===d||90===d)?l.y=this.computeMidOrthoPosition(h.top,Math.max(c.y,k.bottom),!0):c.y>a.y&&(0===d||270===d)&&(l.y=this.computeMidOrthoPosition(h.bottom,Math.min(c.y,k.top),!0)),m.x=c.x,m.y=l.y;if(l.y>h.top&&l.y<h.bottom)if(c.x<=h.right&&c.x>=a.x||a.x>=k.left&&a.x<=c.x){if(90===d||270===d)l=new I(Math.min((a.x+c.x)/2,a.x),a.y),m=new I(l.x,c.y)}else l.y=270===
- d||(0===d||180===d)&&c.y<a.y?Math.min(c.y,180===d?h.top:Math.min(h.top,k.top)):Math.max(c.y,180===d?h.bottom:Math.max(h.bottom,k.bottom)),m.x=c.x,m.y=l.y}else if(90===b)if(c.y>a.y||180===d&&c.x<a.x&&k.bottom>a.y||0===d&&c.x>a.x&&k.bottom>a.y)l=new I(a.x,c.y),m=new I((a.x+c.x)/2,c.y),270===d?(l.y=this.computeMidOrthoPosition(a.y,c.y,!0),m.x=c.x,m.y=l.y):180===d&&c.x<a.x||0===d&&c.x>a.x?(l.y=a.y<k.top?this.computeMidOrthoPosition(a.y,k.top,!0):a.y<k.bottom&&(180===d&&a.x<k.left||0===d&&a.x>k.right)?
- this.computeMidOrthoPosition(a.y,c.y,!0):k.bottom,m.x=c.x,m.y=l.y):90===d&&a.y<k.top&&a.x>k.left&&a.x<k.right&&(l.x=a.x<c.x?Math.min(c.x,k.left):Math.max(c.x,k.right),l.y=a.y,m.x=l.x);else{l=new I(c.x,a.y);m=new I(c.x,(a.y+c.y)/2);if(270===d||0===d&&c.x<h.left||180===d&&c.x>h.right)270===d&&(k.Ka(a)||h.Ka(c))?l.x=this.computeMidOrthoPosition(a.x,c.x,!1):c.x<a.x&&(270===d||0===d)?l.x=this.computeMidOrthoPosition(h.left,Math.max(c.x,k.right),!1):c.x>a.x&&(270===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,
- Math.min(c.x,k.left),!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x<h.right)if(c.y>=h.top&&c.y<=a.y||a.y<=k.bottom&&a.y>=c.y){if(0===d||180===d)l=new I(a.x,Math.max((a.y+c.y)/2,a.y)),m=new I(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x<a.x?Math.min(c.x,90===d?h.left:Math.min(h.left,k.left)):Math.max(c.x,90===d?h.right:Math.max(h.right,k.right)),m.x=l.x,m.y=c.y}else if(c.y<a.y||180===d&&c.x<a.x&&k.top<a.y||0===d&&c.x>a.x&&k.top<a.y)l=new I(a.x,c.y),m=new I((a.x+c.x)/2,c.y),90===d?(l.y=this.computeMidOrthoPosition(a.y,
- c.y,!0),m.x=c.x,m.y=l.y):180===d&&c.x<a.x||0===d&&c.x>=a.x?(l.y=a.y>k.bottom?this.computeMidOrthoPosition(a.y,k.bottom,!0):a.y>k.top&&(180===d&&a.x<k.left||0===d&&a.x>k.right)?this.computeMidOrthoPosition(a.y,c.y,!0):k.top,m.x=c.x,m.y=l.y):270===d&&a.y>k.bottom&&a.x>k.left&&a.x<k.right&&(l.x=a.x<c.x?Math.min(c.x,k.left):Math.max(c.x,k.right),l.y=a.y,m.x=l.x);else{l=new I(c.x,a.y);m=new I(c.x,(a.y+c.y)/2);if(90===d||0===d&&c.x<h.left||180===d&&c.x>h.right)90===d&&(k.Ka(a)||h.Ka(c))?l.x=this.computeMidOrthoPosition(a.x,
- c.x,!1):c.x<a.x&&(90===d||0===d)?l.x=this.computeMidOrthoPosition(h.left,Math.max(c.x,k.right),!1):c.x>a.x&&(90===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,Math.min(c.x,k.left),!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x<h.right)if(c.y<=h.bottom&&c.y>=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l=new I(a.x,Math.min((a.y+c.y)/2,a.y)),m=new I(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x<a.x?Math.min(c.x,270===d?h.left:Math.min(h.left,k.left)):Math.max(c.x,270===d?h.right:Math.max(h.right,
- k.right)),m.x=l.x,m.y=c.y}var n=l,p=m;if(this.Zi){var q=this.h,r;(r=null===q)||(q.Tb.lh?r=!1:(r=q.Za,r=r instanceof Ef?!r.Gv||r.QH:!0),r=!r);if(r||h.Ka(c)&&!g.di(e)||k.Ka(a)&&!e.di(g)||e===g||this.layer.Hc)a=!1;else if(e=ja(q,!0,this.Va,null),e.fp(Math.min(a.x,n.x),Math.min(a.y,n.y),Math.abs(a.x-n.x),Math.abs(a.y-n.y))&&e.fp(Math.min(n.x,p.x),Math.min(n.y,p.y),Math.abs(n.x-p.x),Math.abs(n.y-p.y))&&e.fp(Math.min(p.x,c.x),Math.min(p.y,c.y),Math.abs(p.x-c.x),Math.abs(p.y-c.y)))a=!1;else if(h=h.copy().hi(k),
- h.Tf(2*e.Lo,2*e.Jo),Po(e,a,b,c,d,h),k=Qo(e,c.x,c.y),e.abort||999999!==k||(Uk(e),k=e.wF,h.Tf(e.Lo*k,e.Jo*k),Po(e,a,b,c,d,h),k=Qo(e,c.x,c.y)),e.abort||999999!==k||(Uk(e),k=e.zE,h.Tf(e.Lo*k,e.Jo*k),Po(e,a,b,c,d,h),k=Qo(e,c.x,c.y)),!e.abort&&999999===k&&e.NF&&(Uk(e),Po(e,a,b,c,d,e.ub),k=Qo(e,c.x,c.y)),!e.abort&&999999>k&&0!==Qo(e,c.x,c.y)){Ro(this,e,c.x,c.y,d,!0);d=this.m(2);if(4>this.pa)0===b||180===b?(d.x=a.x,d.y=c.y):(d.x=c.x,d.y=a.y),this.ba(2,d.x,d.y),this.B(3,d.x,d.y);else if(c=this.m(3),0===b||
- 180===b)O.F(d.x,c.x)?(b=0===b?Math.max(d.x,a.x):Math.min(d.x,a.x),this.ba(2,b,a.y),this.ba(3,b,c.y)):O.F(d.y,c.y)?(Math.abs(a.y-d.y)<=e.Jo/2&&(this.ba(2,d.x,a.y),this.ba(3,c.x,a.y)),this.B(2,d.x,a.y)):this.ba(2,a.x,d.y);else if(90===b||270===b)O.F(d.y,c.y)?(b=90===b?Math.max(d.y,a.y):Math.min(d.y,a.y),this.ba(2,a.x,b),this.ba(3,c.x,b)):O.F(d.x,c.x)?(Math.abs(a.x-d.x)<=e.Lo/2&&(this.ba(2,a.x,d.y),this.ba(3,a.x,c.y)),this.B(2,a.x,d.y)):this.ba(2,d.x,a.y);a=!0}else a=!1}else a=!1;a||(this.Yh(l),this.Yh(m))}};
- G.prototype.computeMidOrthoPosition=function(a,b){if(this.hasCurviness()){var c=this.computeCurviness();return(a+b)/2+c}return(a+b)/2};function qg(a){if(!a.Zi)return!1;var b=a.points.p,c=b.length;if(4>c)return!1;a=ja(a.h,!0,a.Va,null);for(var d=1;d<c-2;d++){var e=b[d],g=b[d+1];if(!a.fp(Math.min(e.x,g.x),Math.min(e.y,g.y),Math.abs(e.x-g.x),Math.abs(e.y-g.y)))return!0}return!1}
- function Ro(a,b,c,d,e,g){var h=b.Lo,k=b.Jo,l=Qo(b,c,d),m=c,n=d;for(0===e?m+=h:90===e?n+=k:180===e?m-=h:n-=k;1<l&&Qo(b,m,n)===l-1;)c=m,d=n,0===e?m+=h:90===e?n+=k:180===e?m-=h:n-=k,l-=1;if(g){if(1<l)if(180===e||0===e)c=Math.floor(c/h)*h+h/2;else if(90===e||270===e)d=Math.floor(d/k)*k+k/2}else c=Math.floor(c/h)*h+h/2,d=Math.floor(d/k)*k+k/2;1<l&&(g=e,m=c,n=d,0===e?(g=90,n+=k):90===e?(g=180,m-=h):180===e?(g=270,n-=k):270===e&&(g=0,m+=h),Qo(b,m,n)===l-1?Ro(a,b,m,n,g,!1):(m=c,n=d,0===e?(g=270,n-=k):90===
- e?(g=0,m+=h):180===e?(g=90,n+=k):270===e&&(g=180,m-=h),Qo(b,m,n)===l-1&&Ro(a,b,m,n,g,!1)));a.dl(c,d)}G.prototype.findClosestSegment=function(a){u&&w.k(a,I,G,"findClosestSegment:p");var b=a.x;a=a.y;for(var c=this.m(0),d=this.m(1),e=lb(b,a,c.x,c.y,d.x,d.y),g=0,h=1;h<this.pa-1;h++){var c=this.m(h+1),k=lb(b,a,d.x,d.y,c.x,c.y),d=c;k<e&&(g=h,e=k)}return g};G.prototype.invalidateGeometry=G.prototype.ue=function(){this.Xa=null;this.V()};
- w.w(G,{od:"geometry"},function(){null===this.Xa&&(this.updateRoute(),this.Xa=this.makeGeometry());return this.Xa});G.prototype.qt=function(){if(null===this.Xa&&!1!==this.wg){this.Xa=this.makeGeometry();var a=this.path;if(null!==a){a.Xa=this.Xa;for(var b=this.va.p,c=b.length,d=0;d<c;d++){var e=b[d];e!==a&&e.Uf&&e instanceof Y&&(e.Xa=this.Xa)}}}};
- G.prototype.makeGeometry=function(){var a=this.pa;if(2>a){var b=new sd(td),c=new ud(0,0);b.Bb.add(c);return b}var d=!1,b=this.h;null!==b&&0!==b.na.Ue&&Eo(this)&&(d=!0);var c=b=0,e=this.m(0).copy(),g=e.copy(),b=this.Rc.p,h=this.computeCurve();if(h===th&&3<=a&&!O.wb(this.Ep,0))if(3===a)var k=this.m(1),b=Math.min(e.x,k.x),c=Math.min(e.y,k.y),k=this.m(2),b=Math.min(b,k.x),c=Math.min(c,k.y);else{if(this.jc)for(k=0;k<a;k++)c=b[k],g.x=Math.min(c.x,g.x),g.y=Math.min(c.y,g.y);else for(k=3;k<a;k+=3)k+3>=a&&
- (k=a-1),b=this.m(k),g.x=Math.min(b.x,g.x),g.y=Math.min(b.y,g.y);b=g.x;c=g.y}else{for(k=0;k<a;k++)c=b[k],g.x=Math.min(c.x,g.x),g.y=Math.min(c.y,g.y);b=g.x;c=g.y}b-=this.cz.x;c-=this.cz.y;e.x-=b;e.y-=c;if(2===a){var l=this.m(1).copy();l.x-=b;l.y-=c;0!==No(this)&&So(this,e,!0,g);0!==Oo(this)&&So(this,l,!1,g);b=new sd(wd);b.Aa=e.x;b.Ba=e.y;b.H=l.x;b.I=l.y}else{l=w.s();0!==No(this)&&So(this,e,!0,g);R(l,e.x,e.y,!1,!1);if(h===th&&3<=a&&!O.wb(this.Ep,0))if(3===a)k=this.m(1),a=k.x-b,d=k.y-c,k=this.m(2).copy(),
- k.x-=b,k.y-=c,0!==Oo(this)&&So(this,k,!1,g),S(l,a,d,a,d,k.x,k.y);else if(this.jc){for(var g=new I(b,c),e=this.m(1).copy(),h=new I(b,c),a=new I(b,c),d=this.m(0),m=null,n=this.Ep/3,k=1;k<this.pa-1;k++){var m=this.m(k),p=d,q=m,r=this.m(To(this,m,k,!1));if(!O.wb(p.x,q.x)||!O.wb(q.x,r.x))if(!O.wb(p.y,q.y)||!O.wb(q.y,r.y)){var s=n,t=h,v=a;isNaN(s)&&(s=this.Ep/3);var y=p.x,p=p.y,B=q.x,q=q.y,A=r.x,r=r.y,E=s*Uo(y,p,B,q),s=s*Uo(B,q,A,r);O.wb(p,q)&&O.wb(B,A)&&(B>y?r>q?(t.x=B-E,t.y=q-E,v.x=B+s,v.y=q+s):(t.x=
- B-E,t.y=q+E,v.x=B+s,v.y=q-s):r>q?(t.x=B+E,t.y=q-E,v.x=B-s,v.y=q+s):(t.x=B+E,t.y=q+E,v.x=B-s,v.y=q-s));O.wb(y,B)&&O.wb(q,r)&&(q>p?(A>B?(t.x=B-E,t.y=q-E,v.x=B+s):(t.x=B+E,t.y=q-E,v.x=B-s),v.y=q+s):(A>B?(t.x=B-E,t.y=q+E,v.x=B+s):(t.x=B+E,t.y=q+E,v.x=B-s),v.y=q-s));if(O.wb(y,B)&&O.wb(B,A)||O.wb(p,q)&&O.wb(q,r))y=.5*(y+A),p=.5*(p+r),t.x=y,t.y=p,v.x=y,v.y=p;1===k?(e.x=.5*(d.x+m.x),e.y=.5*(d.y+m.y)):2===k&&O.wb(d.x,this.m(0).x)&&O.wb(d.y,this.m(0).y)&&(e.x=.5*(d.x+m.x),e.y=.5*(d.y+m.y));S(l,e.x-b,e.y-c,
- h.x-b,h.y-c,m.x-b,m.y-c);g.set(h);e.set(a);d=m}}k=d.x;d=d.y;g=this.m(this.pa-1);k=.5*(k+g.x);d=.5*(d+g.y);S(l,a.x-b,a.y-c,k-b,d-c,g.x-b,g.y-c)}else for(k=3;k<a;k+=3)d=this.m(k-2),k+3>=a&&(k=a-1),g=this.m(k-1),e=this.m(k),k===a-1&&0!==Oo(this)&&(e=e.copy(),So(this,e,!1,O.ok)),S(l,d.x-b,d.y-c,g.x-b,g.y-c,e.x-b,e.y-c);else{g=w.O();g.assign(this.m(0));for(k=1;k<a;){k=To(this,g,k,1<k);t=this.m(k);if(k>=a-1){g!==t&&(0!==Oo(this)&&(t=t.copy(),So(this,t,!1,O.ok)),Vo(this,l,-b,-c,g,t,d));break}k=To(this,t,
- k+1,k<a-3);e=l;h=-b;m=-c;n=g;v=this.m(k);y=g;p=d;O.F(n.y,t.y)&&O.F(t.x,v.x)?(s=this.computeCorner(),s=Math.min(s,Math.abs(t.x-n.x)/2),s=B=Math.min(s,Math.abs(v.y-t.y)/2),O.F(s,0)?(Vo(this,e,h,m,n,t,p),y.assign(t)):(q=t.x,A=t.y,r=q,E=A,q=t.x>n.x?t.x-s:t.x+s,E=v.y>t.y?t.y+B:t.y-B,Vo(this,e,h,m,n,new I(q,A),p),Id(e,t.x+h,t.y+m,r+h,E+m),y.n(r,E))):O.F(n.x,t.x)&&O.F(t.y,v.y)?(s=this.computeCorner(),B=Math.min(s,Math.abs(t.y-n.y)/2),B=s=Math.min(B,Math.abs(v.x-t.x)/2),O.F(s,0)?(Vo(this,e,h,m,n,t,p),y.assign(t)):
- (q=t.x,E=A=t.y,A=t.y>n.y?t.y-B:t.y+B,r=v.x>t.x?t.x+s:t.x-s,Vo(this,e,h,m,n,new I(q,A),p),Id(e,t.x+h,t.y+m,r+h,E+m),y.n(r,E))):(Vo(this,e,h,m,n,t,p),y.assign(t))}w.A(g)}b=l.q;w.u(l)}return b};function Uo(a,b,c,d){a=c-a;if(isNaN(a)||Infinity===a||-Infinity===a)return NaN;0>a&&(a=-a);b=d-b;if(isNaN(b)||Infinity===b||-Infinity===b)return NaN;0>b&&(b=-b);return O.wb(a,0)?b:O.wb(b,0)?a:Math.sqrt(a*a+b*b)}
- function So(a,b,c,d){var e=a.pa;if(!(2>e))if(c){var g=a.m(1);c=g.x-d.x;d=g.y-d.y;g=Uo(b.x,b.y,c,d);0!==g&&(e=2===e?.5*g:g,a=No(a),a>e&&(a=e),c=a*(c-b.x)/g,a=a*(d-b.y)/g,b.x+=c,b.y+=a)}else g=a.m(e-2),c=g.x-d.x,d=g.y-d.y,g=Uo(b.x,b.y,c,d),0!==g&&(e=2===e?.5*g:g,a=Oo(a),a>e&&(a=e),c=a*(b.x-c)/g,a=a*(b.y-d)/g,b.x-=c,b.y-=a)}
- function To(a,b,c,d){for(var e=a.pa,g=b;O.wb(b.x,g.x)&&O.wb(b.y,g.y);){if(c>=e)return e-1;g=a.m(c++)}if(!O.wb(b.x,g.x)&&!O.wb(b.y,g.y))return c-1;for(var h=g;O.wb(b.x,g.x)&&O.wb(g.x,h.x)&&(!d||(b.y>=g.y?g.y>=h.y:g.y<=h.y))||O.wb(b.y,g.y)&&O.wb(g.y,h.y)&&(!d||(b.x>=g.x?g.x>=h.x:g.x<=h.x));){if(c>=e)return e-1;h=a.m(c++)}return c-2}
- function Vo(a,b,c,d,e,g,h){if(!h&&Eo(a)){h=[];var k=0;a.Na()&&(k=Wo(a,e,g,h));var l=e.x,l=e.y;if(0<k)if(O.F(e.y,g.y))if(e.x<g.x)for(var m=0;m<k;){var n=Math.max(e.x,Math.min(h[m++]-5,g.x-10));b.lineTo(n+c,g.y+d);for(var l=n+c,p=Math.min(n+10,g.x);m<k;){var q=h[m];if(q<p+10)m++,p=Math.min(q+5,g.x);else break}q=(n+p)/2+c;q=g.y-10+d;n=p+c;p=g.y+d;a.df===lh?R(b,n,p,!1,!1):S(b,l,q,n,q,n,p)}else for(m=k-1;0<=m;){n=Math.min(e.x,Math.max(h[m--]+5,g.x+10));b.lineTo(n+c,g.y+d);l=n+c;for(p=Math.max(n-10,g.x);0<=
- m;)if(q=h[m],q>p-10)m--,p=Math.max(q-5,g.x);else break;q=g.y-10+d;n=p+c;p=g.y+d;a.df===lh?R(b,n,p,!1,!1):S(b,l,q,n,q,n,p)}else if(O.F(e.x,g.x))if(e.y<g.y)for(m=0;m<k;){n=Math.max(e.y,Math.min(h[m++]-5,g.y-10));b.lineTo(g.x+c,n+d);l=n+d;for(p=Math.min(n+10,g.y);m<k;)if(q=h[m],q<p+10)m++,p=Math.min(q+5,g.y);else break;q=g.x-10+c;n=g.x+c;p+=d;a.df===lh?R(b,n,p,!1,!1):S(b,q,l,q,p,n,p)}else for(m=k-1;0<=m;){n=Math.min(e.y,Math.max(h[m--]+5,g.y+10));b.lineTo(g.x+c,n+d);l=n+d;for(p=Math.max(n-10,g.y);0<=
- m;)if(q=h[m],q>p-10)m--,p=Math.max(q-5,g.y);else break;q=g.x-10+c;n=g.x+c;p+=d;a.df===lh?R(b,n,p,!1,!1):S(b,q,l,q,p,n,p)}}b.lineTo(g.x+c,g.y+d)}
- function Wo(a,b,c,d){var e=a.h;if(null===e||b.N(c))return 0;for(e=e.bn;e.next();){var g=e.value;if(null!==g&&g.visible)for(var g=g.kb.p,h=g.length,k=0;k<h;k++){var l=g[k];if(l instanceof G){if(l===a)return 0<d.length&&d.sort(function(a,b){return a-b}),d.length;if(l.Na()&&Eo(l)){var m=l.hn;m.J()&&a.hn.Gg(m)&&!a.usesSamePort(l)&&(m=l.path,null!==m&&m.Dl()&&Xo(b,c,d,l))}}}}0<d.length&&d.sort(function(a,b){return a-b});return d.length}
- function Xo(a,b,c,d){for(var e=O.F(a.y,b.y),g=d.pa,h=d.m(0),k=w.O(),l=1;l<g;l++){var m=d.m(l);if(l<g-1){var n=d.m(l+1);if(h.y===m.y&&m.y===n.y){if(m.x>h.x&&n.x>m.x||m.x<h.x&&n.x<m.x)m=n,l++}else h.x===m.x&&m.x===n.x&&(m.y>h.y&&n.y>m.y||m.y<h.y&&n.y<m.y)&&(m=n,l++)}a:{var n=k,p=a.x,q=a.y,r=b.x,s=b.y,t=h.x,h=h.y,v=m.x,y=m.y;if(!O.F(p,r)){if(O.F(q,s)&&O.F(t,v)&&Math.min(p,r)<t&&Math.max(p,r)>t&&Math.min(h,y)<q&&Math.max(h,y)>q&&!O.F(h,y)){n.x=t;n.y=q;n=!0;break a}}else if(!O.F(q,s)&&O.F(h,y)&&Math.min(q,
- s)<h&&Math.max(q,s)>h&&Math.min(t,v)<p&&Math.max(t,v)>p&&!O.F(t,v)){n.x=p;n.y=h;n=!0;break a}n.x=0;n.y=0;n=!1}n&&(e?c.push(k.x):c.push(k.y));h=m}w.A(k)}w.w(G,{Vs:"firstPickIndex"},function(){return 2>=this.pa?0:this.jc||Ho(this)!==Pb?1:0});w.w(G,{Kw:"lastPickIndex"},function(){var a=this.pa;return 0===a?0:2>=a?a-1:this.jc||Io(this)!==Pb?a-2:a-1});function Eo(a){a=a.df;return a===kh||a===lh}function Go(a,b){if(b||Eo(a)){var c=a.h;null===c||c.Yl.contains(a)||null===a.Qy||c.Yl.add(a,a.Qy)}}
- function nh(a,b){var c=a.layer;if(null!==c&&c.visible&&!c.Hc){var d=c.h;if(null!==d)for(var e=!1,d=d.bn;d.next();){var g=d.value;if(g.visible)if(g===c)for(var e=!0,h=!1,g=g.kb.p,k=g.length,l=0;l<k;l++){var m=g[l];m instanceof G&&(m===a?h=!0:h&&Yo(a,m,b))}else if(e)for(g=g.kb.p,k=g.length,l=0;l<k;l++)m=g[l],m instanceof G&&Yo(a,m,b)}}}function Yo(a,b,c){if(null!==b&&null!==b.Xa&&Eo(b)){var d=b.hn;d.J()&&(a.hn.Gg(d)||c.Gg(d))&&(a.usesSamePort(b)||b.ue())}}
- G.prototype.usesSamePort=function(a){var b=this.pa,c=a.pa;if(0<b&&0<c){var d=this.m(0),e=a.m(0);if(d.Me(e))return!0;b=this.m(b-1);a=a.m(c-1);if(b.Me(a)||d.Me(a)||b.Me(e))return!0}else if(this.aa===a.aa||this.fa===a.fa||this.aa==a.fa||this.fa==a.aa)return!0;return!1};G.prototype.Qe=function(a){C.prototype.Qe.call(this,a);if(null!==this.De)for(var b=this.De.j;b.next();)b.value.Qe(a)};
- w.defineProperty(G,{zs:"adjusting"},function(){return this.Qp},function(a){var b=this.Qp;b!==a&&(u&&w.Ea(a,G,G,"adjusting"),this.Qp=a,this.i("adjusting",b,a))});w.defineProperty(G,{xz:"corner"},function(){return this.cq},function(a){var b=this.cq;b!==a&&(u&&w.g(a,"number",G,"corner"),this.cq=a,this.ue(),this.i("corner",b,a))});
- w.defineProperty(G,{df:"curve"},function(){return this.fq},function(a){var b=this.fq;b!==a&&(u&&w.Ea(a,G,G,"curve"),this.fq=a,this.dc(),Go(this,b===lh||b===kh||a===lh||a===kh),this.i("curve",b,a))});w.defineProperty(G,{jw:"curviness"},function(){return this.gq},function(a){var b=this.gq;b!==a&&(u&&w.g(a,"number",G,"curviness"),this.gq=a,this.dc(),this.i("curviness",b,a))});
- w.defineProperty(G,{Zw:"routing"},function(){return this.sm},function(a){var b=this.sm;b!==a&&(u&&w.Ea(a,G,G,"routing"),this.sm=a,this.ri=null,this.dc(),Go(this,2===(b.value&2)||2===(a.value&2)),this.i("routing",b,a))});w.defineProperty(G,{Ep:"smoothness"},function(){return this.es},function(a){var b=this.es;b!==a&&(u&&w.g(a,"number",G,"smoothness"),this.es=a,this.ue(),this.i("smoothness",b,a))});
- function Co(a){var b=a.kg;if(null!==b){var c=a.vg;if(null!==c){var d=a.Kh,e=a.Xh;a:{if(null!==c&&null!==b.Ch)for(a=b.Ch.j;a.next();){var g=a.value;if(g.qp===b&&g.ut===c&&g.Uw===d&&g.Vw===e||g.qp===c&&g.ut===b&&g.Uw===e&&g.Vw===d){a=g;break a}}a=null}for(var h=null,k=null,l=b.oc.p,m=l.length,g=0;g<m;g++){var n=l[g];if(n.kg===b&&n.Kh===d&&n.vg===c&&n.Xh===e||n.kg===c&&n.Kh===e&&n.vg===b&&n.Xh===d)null===k?k=n:(null===h&&(h=new K(G),h.add(k)),h.add(n))}if(null!==h)for(null===a&&(a=new ko,a.qp=b,a.Uw=
- d,a.ut=c,a.Vw=e,jo(b,a),jo(c,a)),a.links=h,b=h.p,g=0;g<b.length;g++)if(n=b[g],0===n.rf){c=1;for(d=0;d<b.length;d++)Math.abs(b[d].rf)===c&&(c++,d=-1);n.xn=a;n.rf=n.aa===a.qp?c:-c;c=n.h;(null===c||c.uf)&&n.dc()}}}}
- function Bo(a){var b=a.xn;if(null!==b){var c=a.rf;a.xn=null;a.rf=0;b.links.remove(a);if(2>b.links.count)1===b.links.count&&(c=b.links.p[0],c.xn=null,c.rf=0,c.dc()),c=b.qp,null!==b&&null!==c.Ch&&c.Ch.remove(b),c=b.ut,null!==b&&null!==c.Ch&&c.Ch.remove(b);else for(c=Math.abs(c),a=0===c%2,b=b.links.j;b.next();){var d=b.value,e=Math.abs(d.rf),g=0===e%2;e>c&&a===g&&(d.rf=0<d.rf?d.rf-2:d.rf+2,d.dc())}}}function ko(){w.mc(this);this.links=this.Vw=this.ut=this.Uw=this.qp=null}
- w.ge(ko,{qp:!0,Uw:!0,ut:!0,Vw:!0,links:!0,spacing:!0});function Sk(){w.mc(this);this.EA=this.group=null;this.ap=!0;this.abort=!1;this.Lf=this.Kf=1;this.cr=this.br=-1;this.vd=this.Ed=8;this.nc=null;this.NF=!1;this.wF=22;this.zE=111}w.ge(Sk,{group:!0,EA:!0,ap:!0,abort:!0,NF:!0,wF:!0,zE:!0});
- Sk.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.Kf=Math.floor((a.x-this.Ed)/this.Ed)*this.Ed;this.Lf=Math.floor((b-this.vd)/this.vd)*this.vd;this.br=Math.ceil((c+2*this.Ed)/this.Ed)*this.Ed;this.cr=Math.ceil((d+2*this.vd)/this.vd)*this.vd;a=1+(Math.ceil((this.br-this.Kf)/this.Ed)|0);b=1+(Math.ceil((this.cr-this.Lf)/this.vd)|0);if(null===this.nc||this.Em<a-1||this.Fm<b-1){c=[];for(d=0;d<=a;d++){for(var e=[],g=0;g<=b;g++)e[g]=0;c[d]=e}this.nc=
- c;this.Em=a-1;this.Fm=b-1}if(null!==this.nc)for(a=0;a<=this.Em;a++)for(b=0;b<=this.Fm;b++)this.nc[a][b]=999999}};w.w(Sk,{ub:null},function(){return new x(this.Kf,this.Lf,this.br-this.Kf,this.cr-this.Lf)});w.defineProperty(Sk,{Lo:null},function(){return this.Ed},function(a){0<a&&a!==this.Ed&&(this.Ed=a,this.initialize(this.ub))});w.defineProperty(Sk,{Jo:null},function(){return this.vd},function(a){0<a&&a!==this.vd&&(this.vd=a,this.initialize(this.ub))});
- function Zo(a,b,c){return a.Kf<=b&&b<=a.br&&a.Lf<=c&&c<=a.cr}function Qo(a,b,c){if(!Zo(a,b,c))return 0;b-=a.Kf;b/=a.Ed;c-=a.Lf;c/=a.vd;return a.nc[b|0][c|0]}function Vk(a,b,c){Zo(a,b,c)&&(b-=a.Kf,b/=a.Ed,c-=a.Lf,c/=a.vd,a.nc[b|0][c|0]=0)}function Uk(a){if(null!==a.nc)for(var b=0;b<=a.Em;b++)for(var c=0;c<=a.Fm;c++)1<=a.nc[b][c]&&(a.nc[b][c]|=999999)}
- Sk.prototype.fp=function(a,b,c,d){if(a>this.br||a+c<this.Kf||b>this.cr||b+d<this.Lf)return!0;a=(a-this.Kf)/this.Ed|0;b=(b-this.Lf)/this.vd|0;c=Math.max(0,c)/this.Ed+1|0;var e=Math.max(0,d)/this.vd+1|0;0>a&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.Em)|0;for(c=Math.min(b+e-1,this.Fm)|0;a<=d;a++)for(e=b;e<=c;e++)if(0===this.nc[a][e])return!1;return!0};
- function $o(a,b,c,d,e,g,h,k,l){if(!(b<g||b>h||c<k||c>l)){var m,n;m=b|0;n=c|0;var p=a.nc[m][n];if(1<=p&&999999>p)for(e?n+=d:m+=d,p+=1;g<=m&&m<=h&&k<=n&&n<=l&&!(p>=a.nc[m][n]);)a.nc[m][n]=p,p+=1,e?n+=d:m+=d;m=e?n:m;if(e)if(0<d)for(c+=d;c<m;c+=d)$o(a,b,c,1,!e,g,h,k,l),$o(a,b,c,-1,!e,g,h,k,l);else for(c+=d;c>m;c+=d)$o(a,b,c,1,!e,g,h,k,l),$o(a,b,c,-1,!e,g,h,k,l);else if(0<d)for(b+=d;b<m;b+=d)$o(a,b,c,1,!e,g,h,k,l),$o(a,b,c,-1,!e,g,h,k,l);else for(b+=d;b>m;b+=d)$o(a,b,c,1,!e,g,h,k,l),$o(a,b,c,-1,!e,g,h,
- k,l)}}function ap(a,b,c,d,e,g,h,k,l,m,n){for(var p=b|0,q=c|0,r=a.nc[p][q];0===r&&p>k&&p<l&&q>m&&q<n;)if(h?q+=g:p+=g,r=a.nc[p][q],1>=Math.abs(p-d)&&1>=Math.abs(q-e))return a.abort=!0,0;p=b|0;q=c|0;r=a.nc[p][q];b=1;for(a.nc[p][q]=b;0===r&&p>k&&p<l&&q>m&&q<n;)h?q+=g:p+=g,r=a.nc[p][q],a.nc[p][q]=b,b+=1;return h?q:p}
- function Po(a,b,c,d,e,g){if(null!==a.nc){a.abort=!1;var h=b.x,k=b.y;if(Zo(a,h,k)){var h=h-a.Kf,h=h/a.Ed,k=k-a.Lf,k=k/a.vd,l=d.x,m=d.y;if(Zo(a,l,m))if(l-=a.Kf,l/=a.Ed,m-=a.Lf,m/=a.vd,1>=Math.abs(h-l)&&1>=Math.abs(k-m))a.abort=!0;else{var n=g.x;b=g.y;d=g.x+g.width;var p=g.y+g.height,n=n-a.Kf,n=n/a.Ed;b-=a.Lf;b/=a.vd;d-=a.Kf;d/=a.Ed;p-=a.Lf;p/=a.vd;g=Math.max(0,Math.min(a.Em,n|0));d=Math.min(a.Em,Math.max(0,d|0));b=Math.max(0,Math.min(a.Fm,b|0));var p=Math.min(a.Fm,Math.max(0,p|0)),h=h|0,k=k|0,l=l|0,
- m=m|0,n=h,q=k,r=0===c||90===c?1:-1;(c=90===c||270===c)?q=ap(a,h,k,l,m,r,c,g,d,b,p):n=ap(a,h,k,l,m,r,c,g,d,b,p);if(!a.abort){a:{c=0===e||90===e?1:-1;e=90===e||270===e;for(var r=l|0,s=m|0,t=a.nc[r][s];0===t&&r>g&&r<d&&s>b&&s<p;)if(e?s+=c:r+=c,t=a.nc[r][s],1>=Math.abs(r-h)&&1>=Math.abs(s-k)){a.abort=!0;break a}r=l|0;s=m|0;t=a.nc[r][s];for(a.nc[r][s]=999999;0===t&&r>g&&r<d&&s>b&&s<p;)e?s+=c:r+=c,t=a.nc[r][s],a.nc[r][s]=999999}a.abort||($o(a,n,q,1,!1,g,d,b,p),$o(a,n,q,-1,!1,g,d,b,p),$o(a,n,q,1,!0,g,d,
- b,p),$o(a,n,q,-1,!0,g,d,b,p))}}}}}function Lo(){w.mc(this);this.port=this.Kc=null;this.Hg=[];this.pp=!1}w.ge(Lo,{Kc:!0,port:!0,Hg:!0,pp:!0});Lo.prototype.toString=function(){for(var a=this.Hg,b=this.Kc.toString()+" "+a.length.toString()+":",c=0;c<a.length;c++){var d=a[c];null!==d&&(b+="\n "+d.toString())}return b};
- function bp(a,b,c,d){b=b.offsetY;switch(b){case w.Vc:return 90;case w.Nc:return 180;case w.dd:return 270;case w.Wc:return 0}switch(b){case w.Vc|w.dd:return 180<c?270:90;case w.Nc|w.Wc:return 90<c&&270>=c?180:0}a=180*Math.atan2(a.height,a.width)/Math.PI;switch(b){case w.Nc|w.dd:return c>a&&c<=180+a?180:270;case w.dd|w.Wc:return c>180-a&&c<=360-a?270:0;case w.Wc|w.Vc:return c>a&&c<=180+a?90:0;case w.Vc|w.Nc:return c>180-a&&c<=360-a?180:90;case w.Nc|w.dd|w.Wc:return 90<c&&c<=180+a?180:c>180+a&&c<=360-
- a?270:0;case w.dd|w.Wc|w.Vc:return 180<c&&c<=360-a?270:c>a&&180>=c?90:0;case w.Wc|w.Vc|w.Nc:return c>a&&c<=180-a?90:c>180-a&&270>=c?180:0;case w.Vc|w.Nc|w.dd:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&b!==(w.Nc|w.dd|w.Wc|w.Vc)&&(c-=15,0>c&&(c+=360));return c>a&&c<180-a?90:c>=180-a&&c<=180+a?180:c>180+a&&c<360-a?270:0}
- function Mo(a,b){var c=a.Hg;if(0===c.length){a:if(!a.pp){c=a.pp;a.pp=!0;var d,e=null,g=a.Kc,g=g instanceof F?g:null;if(null===g||g.me)d=a.Kc.YD(a.port.td);else{if(!g.ca.J()){a.pp=c;break a}e=g;d=e.XD()}var h=a.Hg.length=0,k=a.port.vb(Xb,w.O()),l=a.port.vb(jc,w.O()),g=w.nk(k.x,k.y,0,0);g.ej(l);w.A(k);w.A(l);k=w.lc(g.x+g.width/2,g.y+g.height/2);for(d=d.j;d.next();)if(l=d.value,l.Na()){var m=Pb,n=l.nd===a.port||l.aa.di(e),m=n?Ho(l,a.port):Io(l,a.port);if(m.cp()&&(n=n?l.Wd:l.nd,null!==n)){var p=n.W;if(null!==
- p){var n=l.computeOtherPoint(p,n),p=k.Vi(n),m=bp(g,m,p,l.jc),q=0;0===m?(q=w.Wc,180<p&&(p-=360)):q=90===m?w.Vc:180===m?w.Nc:w.dd;m=a.Hg[h];void 0===m?(m=new cp(l,p,q),a.Hg[h]=m):(m.link=l,m.angle=p,m.oe=q);m.Tw.set(n);h++}}}w.A(k);a.Hg.sort(Lo.prototype.wI);e=a.Hg.length;k=-1;for(h=d=0;h<e;h++)m=a.Hg[h],void 0!==m&&(m.oe!==k&&(k=m.oe,d=0),m.Zo=d,d++);k=-1;d=0;for(h=e-1;0<=h;h--)m=a.Hg[h],void 0!==m&&(m.oe!==k&&(k=m.oe,d=m.Zo+1),m.Rm=d);h=a.Hg;n=a.port;e=a.Kc.DI;k=w.O();d=w.O();l=w.O();m=w.O();n.vb(Xb,
- k);n.vb(Zb,d);n.vb(jc,l);n.vb(cc,m);var r=q=p=n=0;if(e===io)for(var s=0;s<h.length;s++){var t=h[s];if(null!==t){var v=t.link.computeThickness();switch(t.oe){case w.Vc:q+=v;break;case w.Nc:r+=v;break;case w.dd:n+=v;break;default:case w.Wc:p+=v}}}for(var y=0,B=0,A=1,s=0;s<h.length;s++)if(t=h[s],null!==t){var E,N;if(y!=t.oe){y=t.oe;switch(y){case w.Vc:E=l;N=m;break;case w.Nc:E=m;N=k;break;case w.dd:E=k;N=d;break;default:case w.Wc:E=d,N=l}var J=N.x-E.x;N=N.y-E.y;switch(y){case w.Vc:q>Math.abs(J)?(A=Math.abs(J)/
- q,q=Math.abs(J)):A=1;break;case w.Nc:r>Math.abs(N)?(A=Math.abs(N)/r,r=Math.abs(N)):A=1;break;case w.dd:n>Math.abs(J)?(A=Math.abs(J)/n,n=Math.abs(J)):A=1;break;default:case w.Wc:p>Math.abs(N)?(A=Math.abs(N)/p,p=Math.abs(N)):A=1}B=0}var W=t.hp;if(e===io){v=t.link.computeThickness();v*=A;W.set(E);switch(y){case w.Vc:W.x=E.x+J/2+q/2-B-v/2;break;case w.Nc:W.y=E.y+N/2+r/2-B-v/2;break;case w.dd:W.x=E.x+J/2-n/2+B+v/2;break;default:case w.Wc:W.y=E.y+N/2-p/2+B+v/2}B+=v}else v=.5,e===eo&&(v=(t.Zo+1)/(t.Rm+1)),
- W.x=E.x+J*v,W.y=E.y+N*v}w.A(k);w.A(d);w.A(l);w.A(m);E=a.Hg;for(J=0;J<E.length;J++)N=E[J],null!==N&&(N.nw=a.computeEndSegmentLength(N));a.pp=c;w.qc(g)}c=a.Hg}for(g=0;g<c.length;g++)if(E=c[g],null!==E&&E.link===b)return E;return null}Lo.prototype.wI=function(a,b){return a===b?0:null===a?-1:null===b?1:a.oe<b.oe?-1:a.oe>b.oe?1:a.angle<b.angle?-1:a.angle>b.angle?1:0};
- Lo.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.Kc,this.port,Pb,b.nd===this.port),d=a.Zo;if(0>d)return c;var e=a.Rm;if(1>=e||!b.jc)return c;var b=a.Tw,g=a.hp;if(a.oe===w.Nc||a.oe===w.Vc)d=e-1-d;return((a=a.oe===w.Nc||a.oe===w.Wc)?b.y<g.y:b.x<g.x)?c+8*d:(a?b.y===g.y:b.x===g.x)?c:c+8*(e-1-d)};function cp(a,b,c){this.link=a;this.angle=b;this.oe=c;this.Tw=new I;this.Rm=this.Zo=0;this.hp=new I;this.nw=0}
- w.ge(cp,{link:!0,angle:!0,oe:!0,Tw:!0,Zo:!0,Rm:!0,hp:!0,nw:!0});cp.prototype.toString=function(){return this.link.toString()+" "+this.angle.toString()+" "+this.oe.toString()+":"+this.Zo.toString()+"/"+this.Rm.toString()+" "+this.hp.toString()+" "+this.nw.toString()+" "+this.Tw.toString()};function ol(){this.Vj=this.tj=Pc;this.Tj=this.rj=NaN;this.Sj=this.qj=fo;this.Uj=this.sj=NaN}
- ol.prototype.copy=function(){var a=new ol;a.tj=this.tj.da();a.Vj=this.Vj.da();a.rj=this.rj;a.Tj=this.Tj;a.qj=this.qj;a.Sj=this.Sj;a.sj=this.sj;a.Uj=this.Uj;return a};function F(a){0===arguments.length?D.call(this,Nh):D.call(this,a);this.er=new L(C);this.mm=new L(F);this.Tk=this.fr=this.dr=null;this.ss=!1;this.Kq=!0;this.ts=!1;this.Nb=this.hs=null;this.Zp=!1;this.$p=!0;this.xq=this.aq=!1;this.Zd=new Ve;this.Zd.group=this;this.Ky=!1}w.Pa(F,D);w.la("Group",F);
- F.prototype.cloneProtected=function(a){D.prototype.cloneProtected.call(this,a);a.dr=this.dr;a.fr=this.fr;a.Tk=this.Tk;a.ss=this.ss;a.Kq=this.Kq;a.ts=this.ts;a.hs=this.hs;var b=a.Rs(function(a){return a instanceof yh});a.Nb=b instanceof yh?b:null;a.Zp=this.Zp;a.$p=this.$p;a.aq=this.aq;a.xq=this.xq;null!==this.Zd?(a.Zd=this.Zd.copy(),a.Zd.group=a):(null!==a.Zd&&(a.Zd.group=null),a.Zd=null)};
- F.prototype.ai=function(a){D.prototype.ai.call(this,a);var b=a.Uo();for(a=a.Jc;a.next();){var c=a.value;c.V();c.K(8);c.Hs();if(c instanceof D)c.hf(b);else if(c instanceof G)for(c=c.Vf;c.next();)c.value.hf(b)}};
- F.prototype.gn=function(a,b,c,d,e,g,h){if(a===ve&&"elements"===b)if(e instanceof yh){var k=e;null===this.Nb?this.Nb=k:this.Nb!==k&&w.l("Cannot insert a second Placeholder into the visual tree of a Group.")}else e instanceof H&&(k=e.Rs(function(a){return a instanceof yh}),k instanceof yh&&(null===this.Nb?this.Nb=k:this.Nb!==k&&w.l("Cannot insert a second Placeholder into the visual tree of a Group.")));else a===we&&"elements"===b&&null!==this.Nb&&(d===this.Nb?this.Nb=null:d instanceof H&&this.Nb.Al(d)&&
- (this.Nb=null));D.prototype.gn.call(this,a,b,c,d,e,g,h)};F.prototype.Mi=function(a,b,c,d){this.Sk=this.Nb;H.prototype.Mi.call(this,a,b,c,d)};F.prototype.Bl=function(){if(!D.prototype.Bl.call(this))return!1;for(var a=this.Jc;a.next();){var b=a.value;if(b instanceof D){if(b.Na()&&Ij(b))return!1}else if(b instanceof G&&b.Na()&&Ij(b)&&b.aa!==this&&b.fa!==this)return!1}return!0};w.w(F,{placeholder:"placeholder"},function(){return this.Nb});
- w.defineProperty(F,{BD:"computesBoundsAfterDrag"},function(){return this.Zp},function(a){var b=this.Zp;b!==a&&(w.g(a,"boolean",F,"computesBoundsAfterDrag"),this.Zp=a,this.i("computesBoundsAfterDrag",b,a))});w.defineProperty(F,{PG:"computesBoundsIncludingLinks"},function(){return this.$p},function(a){w.g(a,"boolean",F,"computesBoundsIncludingLinks");var b=this.$p;b!==a&&(this.$p=a,this.i("computesBoundsIncludingLinks",b,a))});
- w.defineProperty(F,{QG:"computesBoundsIncludingLocation"},function(){return this.aq},function(a){w.g(a,"boolean",F,"computesBoundsIncludingLocation");var b=this.aq;b!==a&&(this.aq=a,this.i("computesBoundsIncludingLocation",b,a))});w.defineProperty(F,{GH:"handlesDragDropForMembers"},function(){return this.xq},function(a){w.g(a,"boolean",F,"handlesDragDropForMembers");var b=this.xq;b!==a&&(this.xq=a,this.i("handlesDragDropForMembers",b,a))});w.w(F,{Jc:"memberParts"},function(){return this.er.j});
- function $n(a,b){if(a.er.add(b)){b instanceof F&&a.mm.add(b);var c=a.oI;if(null!==c){var d=!0,e=a.h;null!==e&&(d=e.Ua,e.Ua=!0);c(a,b);null!==e&&(e.Ua=d)}a.Na()&&a.me||b.Qe(!1)}c=a.Nb;null===c&&(c=a);c.V()}function Zn(a,b){if(a.er.remove(b)){b instanceof F&&a.mm.remove(b);var c=a.pI;if(null!==c){var d=!0,e=a.h;null!==e&&(d=e.Ua,e.Ua=!0);c(a,b);null!==e&&(e.Ua=d)}a.Na()&&a.me||b.Qe(!0)}c=a.Nb;null===c&&(c=a);c.V()}
- F.prototype.Tm=function(){if(0<this.er.count){var a=this.h;if(null===a)return;for(var b=this.er.copy().j;b.next();)a.remove(b.value)}D.prototype.Tm.call(this)};F.prototype.mx=function(){var a=this.layer;null!==a&&a.mx(this)};w.defineProperty(F,{Ub:"layout"},function(){return this.Zd},function(a){var b=this.Zd;b!==a&&(null!==a&&w.k(a,Ve,F,"layout"),null!==b&&(b.h=null,b.group=null),this.Zd=a,null!==a&&(a.h=this.h,a.group=this),this.i("layout",b,a))});
- w.defineProperty(F,{oI:"memberAdded"},function(){return this.dr},function(a){var b=this.dr;b!==a&&(null!==a&&w.g(a,"function",F,"memberAdded"),this.dr=a,this.i("memberAdded",b,a))});w.defineProperty(F,{pI:"memberRemoved"},function(){return this.fr},function(a){var b=this.fr;b!==a&&(null!==a&&w.g(a,"function",F,"memberRemoved"),this.fr=a,this.i("memberRemoved",b,a))});
- w.defineProperty(F,{aA:"memberValidation"},function(){return this.Tk},function(a){var b=this.Tk;b!==a&&(null!==a&&w.g(a,"function",F,"memberValidation"),this.Tk=a,this.i("memberValidation",b,a))});F.prototype.canAddMembers=function(a){var b=this.h;if(null===b)return!1;b=b.Jb;for(a=Gf(a).j;a.next();)if(!b.isValidMember(this,a.value))return!1;return!0};
- F.prototype.addMembers=function(a,b){var c=this.h;if(null===c)return!1;for(var c=c.Jb,d=!0,e=Gf(a).j;e.next();){var g=e.value;!b||c.isValidMember(this,g)?g.Va=this:d=!1}return d};w.defineProperty(F,{oJ:"ungroupable"},function(){return this.ss},function(a){var b=this.ss;b!==a&&(w.g(a,"boolean",F,"ungroupable"),this.ss=a,this.i("ungroupable",b,a))});F.prototype.canUngroup=function(){if(!this.oJ)return!1;var a=this.layer;if(null!==a&&!a.bw)return!1;a=a.h;return null===a||a.bw?!0:!1};
- F.prototype.invalidateConnectedLinks=F.prototype.hf=function(a){void 0===a&&(a=null);D.prototype.hf.call(this,a);for(var b=this.XD();b.next();){var c=b.value;if(null===a||!a.contains(c)){var d=c.aa;null!==d&&d.di(this)&&!d.Na()?c.dc():(d=c.fa,null!==d&&d.di(this)&&!d.Na()&&c.dc())}}};F.prototype.findExternalLinksConnected=F.prototype.XD=function(){var a=this.Uo();a.add(this);for(var b=new L(G),c=a.j;c.next();){var d=c.value;if(d instanceof D)for(d=d.Vd;d.next();){var e=d.value;a.contains(e)||b.add(e)}}return b.j};
- F.prototype.findExternalNodesConnected=function(){var a=this.Uo();a.add(this);for(var b=new L(D),c=a.j;c.next();){var d=c.value;if(d instanceof D)for(d=d.Vd;d.next();){var e=d.value,g=e.aa;a.contains(g)&&g!==this||b.add(g);e=e.fa;a.contains(e)&&e!==this||b.add(e)}}return b.j};F.prototype.findSubGraphParts=F.prototype.Uo=function(){var a=new L(C);Af(a,this,!0,0,!0);a.remove(this);return a};F.prototype.Qe=function(a){D.prototype.Qe.call(this,a);for(var b=this.Jc;b.next();)b.value.Qe(a)};
- F.prototype.collapseSubGraph=F.prototype.collapseSubGraph=function(){var a=this.h;if(null!==a&&!a.ve){a.ve=!0;var b=this.Uo();dp(this,b);a.ve=!1}};function dp(a,b){for(var c=a.Jc;c.next();){var d=c.value;d.Qe(!1);if(d instanceof F){var e=d;e.me&&(e.OA=e.me,dp(e,b))}if(d instanceof D)d.hf(b);else if(d instanceof G)for(d=d.Vf;d.next();)d.value.hf(b)}a.me=!1}
- F.prototype.expandSubGraph=F.prototype.expandSubGraph=function(){var a=this.h;if(null!==a&&!a.ve){var b=a.Tb;0!==a.na.Ue&&b.Fl();a.ve=!0;var c=this.Uo();ep(this,c,b,this);a.ve=!1}};function ep(a,b,c,d){for(var e=a.Jc;e.next();){var g=e.value;g.Qe(!0);if(g instanceof F){var h=g;h.OA&&(h.OA=!1,ep(h,b,c,d))}if(g instanceof D)g.hf(b),Ai(c,g,d);else if(g instanceof G)for(g=g.Vf;g.next();)g.value.hf(b)}a.me=!0}
- w.defineProperty(F,{me:"isSubGraphExpanded"},function(){return this.Kq},function(a){var b=this.Kq;if(b!==a){w.g(a,"boolean",F,"isSubGraphExpanded");this.Kq=a;var c=this.h;this.i("isSubGraphExpanded",b,a);b=this.fJ;if(null!==b){var d=!0;null!==c&&(d=c.Ua,c.Ua=!0);b(this);null!==c&&(c.Ua=d)}null!==c&&c.na.lb?null!==this.Nb&&this.Nb.V():a?this.expandSubGraph():this.collapseSubGraph()}});
- w.defineProperty(F,{OA:"wasSubGraphExpanded"},function(){return this.ts},function(a){var b=this.ts;b!==a&&(w.g(a,"boolean",F,"wasSubGraphExpanded"),this.ts=a,this.i("wasSubGraphExpanded",b,a))});w.defineProperty(F,{fJ:"subGraphExpandedChanged"},function(){return this.hs},function(a){var b=this.hs;b!==a&&(null!==a&&w.g(a,"function",F,"subGraphExpandedChanged"),this.hs=a,this.i("subGraphExpandedChanged",b,a))});
- F.prototype.move=F.prototype.move=function(a){var b=this.position,c=b.x;isNaN(c)&&(c=0);b=b.y;isNaN(b)&&(b=0);var c=a.x-c,b=a.y-b,d=w.lc(c,b);D.prototype.move.call(this,a);for(a=this.Uo().j;a.next();){var e=a.value;if(!(e instanceof G||e instanceof D&&e.Af)){var g=e.position,h=e.location;g.J()?(d.x=g.x+c,d.y=g.y+b,e.position=d):h.J()&&(d.x=h.x+c,d.y=h.y+b,e.location=d)}}for(a.reset();a.next();)e=a.value,e instanceof G&&(g=e.position,d.x=g.x+c,d.y=g.y+b,e.move(d));w.A(d)};
- function yh(){V.call(this);this.Ze=O.Lp;this.Tr=new x(NaN,NaN,NaN,NaN)}w.Pa(yh,V);w.la("Placeholder",yh);yh.prototype.cloneProtected=function(a){V.prototype.cloneProtected.call(this,a);a.Ze=this.Ze.da();a.Tr=this.Tr.copy()};yh.prototype.$j=function(a){if(null===this.background&&null===this.gl)return!1;var b=this.Ha;return Hb(0,0,b.width,b.height,a.x,a.y)};
- yh.prototype.kp=function(){var a=this.W;null!==a&&(a instanceof F||a instanceof da)||w.l("Placeholder is not inside a Group or Adornment.");if(a instanceof F){var b=this.computeBorder(this.Tr),c=this.Pc;tb(c,b.width||0,b.height||0);sl(this,0,0,c.width,c.height);for(var c=a.Jc,d=!1;c.next();)if(c.value.Na()){d=!0;break}!d||isNaN(b.x)||isNaN(b.y)||(c=new I,c.Jt(b,a.kf),a.location=new I(c.x,c.y))}else{var b=this.Ca,c=this.Pc,d=this.padding,e=d.left+d.right,g=d.top+d.bottom;if(b.J())tb(c,b.width+e||0,
- b.height+g||0),sl(this,-d.left,-d.top,c.width,c.height);else{var h=a.Bc,k=h.vb(Xb,w.O()),b=w.nk(k.x,k.y,0,0);b.ej(h.vb(jc,k));b.ej(h.vb(Zb,k));b.ej(h.vb(cc,k));a.ah.n(b.x,b.y);tb(c,b.width+e||0,b.height+g||0);sl(this,-d.left,-d.top,c.width,c.height);w.A(k);w.qc(b)}}};yh.prototype.Mi=function(a,b,c,d){var e=this.ca;e.x=a;e.y=b;e.width=c;e.height=d};
- yh.prototype.computeBorder=function(a){var b=this.W;if(b instanceof F){var c=b;if(c.BD&&this.Tr.J()){var d=c.h;if(null!==d&&(d=d.Za,d instanceof Ef&&!d.mq&&null!==d.ic&&!d.ic.contains(c)))return a.assign(this.Tr),a}}var c=w.eg(),d=this.computeMemberBounds(c),e=this.padding;a.n(d.x-e.left,d.y-e.top,d.width+e.left+e.right,d.height+e.top+e.bottom);w.qc(c);b instanceof F&&(c=b,c.QG&&c.location.J()&&a.ej(c.location));return a};
- yh.prototype.computeMemberBounds=function(a){if(!(this.W instanceof F))return a.n(0,0,0,0),a;for(var b=this.W,c=Infinity,d=Infinity,e=-Infinity,g=-Infinity,h=b.Jc;h.next();){var k=h.value;if(k.Na()){if(k instanceof G){var l=k;if(!b.PG)continue;if(Hj(l))continue;if(l.aa===b||l.fa===b)continue}k=k.ca;k.left<c&&(c=k.left);k.top<d&&(d=k.top);k.right>e&&(e=k.right);k.bottom>g&&(g=k.bottom)}}isFinite(c)&&isFinite(d)?a.n(c,d,e-c,g-d):(b=b.location,c=this.padding,a.n(b.x+c.left,b.y+c.top,0,0));return a};
- w.defineProperty(yh,{padding:"padding"},function(){return this.Ze},function(a){"number"===typeof a?((isNaN(a)||0>a)&&w.ja(a,">= 0",yh,"padding"),a=new vb(a)):(w.k(a,vb,yh,"padding"),(isNaN(a.left)||0>a.left)&&w.ja(a.left,">= 0",yh,"padding:value.left"),(isNaN(a.right)||0>a.right)&&w.ja(a.right,">= 0",yh,"padding:value.right"),(isNaN(a.top)||0>a.top)&&w.ja(a.top,">= 0",yh,"padding:value.top"),(isNaN(a.bottom)||0>a.bottom)&&w.ja(a.bottom,">= 0",yh,"padding:value.bottom"));var b=this.Ze;b.N(a)||(this.Ze=
- a=a.da(),this.i("padding",b,a))});function Ve(){0<arguments.length&&w.cd(Ve);w.mc(this);this.ty=this.Z=null;this.Eq=this.Gq=!0;this.Oq=!1;this.Sp=(new I(0,0)).freeze();this.Hq=this.Jq=!0;this.wB="";this.co=!1;this.Ly=null}w.la("Layout",Ve);Ve.prototype.cloneProtected=function(a){a.Gq=this.Gq;a.Eq=this.Eq;a.Oq=this.Oq;a.Sp.assign(this.Sp);a.Jq=this.Jq;a.Hq=this.Hq;a.wB=this.wB;this.Eq||(a.co=!0)};Ve.prototype.copy=function(){var a=new this.constructor;this.cloneProtected(a);return a};
- Ve.prototype.toString=function(){var a=w.Fg(Object.getPrototypeOf(this)),a=a+"(";null!==this.group&&(a+=" in "+this.group);null!==this.h&&(a+=" for "+this.h);return a+")"};w.defineProperty(Ve,{h:"diagram"},function(){return this.Z},function(a){null!==a&&w.k(a,z,Ve,"diagram");this.Z=a});w.defineProperty(Ve,{group:"group"},function(){return this.ty},function(a){this.ty!==a&&(null!==a&&w.k(a,F,Ve,"group"),this.ty=a,null!==a&&(this.Z=a.h))});
- w.defineProperty(Ve,{WH:"isOngoing"},function(){return this.Gq},function(a){this.Gq!==a&&(w.g(a,"boolean",Ve,"isOngoing"),this.Gq=a)});w.defineProperty(Ve,{TH:"isInitial"},function(){return this.Eq},function(a){w.g(a,"boolean",Ve,"isInitial");this.Eq=a;a||(this.co=!0)});w.defineProperty(Ve,{Iw:"isViewportSized"},function(){return this.Oq},function(a){this.Oq!==a&&(w.g(a,"boolean",Ve,"isViewportSized"),(this.Oq=a)&&this.K())});
- w.defineProperty(Ve,{it:"isRouting"},function(){return this.Jq},function(a){this.Jq!==a&&(w.g(a,"boolean",Ve,"isRouting"),this.Jq=a)});w.defineProperty(Ve,{xE:"isRealtime"},function(){return this.Hq},function(a){this.Hq!==a&&(w.g(a,"boolean",Ve,"isRealtime"),this.Hq=a)});w.defineProperty(Ve,{Cf:"isValidLayout"},function(){return this.co},function(a){this.co!==a&&(w.g(a,"boolean",Ve,"isValidLayout"),this.co=a,a||(a=this.h,null!==a&&(a.iu=!0)))});
- Ve.prototype.invalidateLayout=Ve.prototype.K=function(){if(this.co){var a=this.h;if(null!==a&&!a.na.lb){var b=a.Tb;!b.bo&&(b.lh&&b.cj(),this.WH&&a.uf||this.TH&&!a.uf)&&(this.Cf=!1,a.ne())}}};w.defineProperty(Ve,{network:"network"},function(){return this.Ly},function(a){var b=this.Ly;b!==a&&(null!==a&&w.k(a,Da,Ve,"network"),null!==b&&(b.Ub=null),this.Ly=a,null!==a&&(a.Ub=this))});Ve.prototype.createNetwork=function(){return new Da};
- Ve.prototype.makeNetwork=function(a){var b=this.createNetwork();b.Ub=this;a instanceof z?(b.Xj(a.Jg,!0),b.Xj(a.links,!0)):a instanceof F?b.Xj(a.Jc):b.Xj(a.j);return b};Ve.prototype.updateParts=function(){var a=this.h;if(null===a&&null!==this.network)for(var b=this.network.vertexes.j;b.next();){var c=b.value.Kc;if(null!==c&&(a=c.h,null!==a))break}this.Cf=!0;try{null!==a&&a.ec("Layout"),this.commitLayout()}finally{null!==a&&a.fe("Layout")}};
- Ve.prototype.commitLayout=function(){for(var a=this.network.vertexes.j;a.next();)a.value.commit();if(this.it)for(a=this.network.edges.j;a.next();)a.value.commit()};
- Ve.prototype.doLayout=function(a){null===a&&w.l("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");var b=new L(C);a instanceof z?(fp(this,b,a.Jg,!0,this.gA,!0,!1,!0),fp(this,b,a.fi,!0,this.gA,!0,!1,!0)):a instanceof F?fp(this,b,a.Jc,!1,this.gA,!0,!1,!0):b.ce(a.j);var c=b.count;if(0<c){a=this.h;null!==a&&a.ec("Layout");for(var c=Math.ceil(Math.sqrt(c)),d=this.de.x,e=d,g=this.de.y,h=0,k=0,b=b.j;b.next();){var l=b.value;l.xf();var m=l.Ja,n=m.width,
- m=m.height;l.moveTo(e,g);l.Ky=!1;e+=Math.max(n,50)+20;k=Math.max(k,Math.max(m,50));h>=c-1?(h=0,e=d,g+=k+20,k=0):h++}null!==a&&a.fe("Layout")}this.Cf=!0};Ve.prototype.gA=function(a){return!a.location.J()||a instanceof F&&a.Ky?!0:!1};
- function fp(a,b,c,d,e,g,h,k){for(c=c.j;c.next();){var l=c.value;d&&!l.dp||null!==e&&!e(l)||!l.canLayout()||(g&&l instanceof D?l.Af||(l instanceof F?null===l.Ub?fp(a,b,l.Jc,!1,e,g,h,k):b.add(l):b.add(l)):h&&l instanceof G?b.add(l):!k||!l.Td()||l instanceof D||b.add(l))}}
- Ve.prototype.collectParts=function(a){var b=new L(C);a instanceof z?(fp(this,b,a.Jg,!0,null,!0,!0,!0),fp(this,b,a.links,!0,null,!0,!0,!0),fp(this,b,a.fi,!0,null,!0,!0,!0)):a instanceof F?fp(this,b,a.Jc,!1,null,!0,!0,!0):fp(this,b,a.j,!1,null,!0,!0,!0);return b};w.defineProperty(Ve,{de:"arrangementOrigin"},function(){return this.Sp},function(a){w.k(a,I,Ve,"arrangementOrigin");this.Sp.N(a)||(this.Sp.assign(a),this.K())});
- Ve.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.vb(Xb),(isNaN(c.x)||isNaN(c.y))&&c.set(a),c.x+=b.padding.left,c.y+=b.padding.top);return c}return a};function Da(){w.mc(this);this.Zd=null;this.clear()}w.la("LayoutNetwork",Da);
- Da.prototype.clear=function(){if(this.vertexes)for(var a=this.vertexes.j;a.next();){var b=a.value;b.clear();b.network=null}if(this.edges)for(a=this.edges.j;a.next();)b=a.value,b.clear(),b.network=null;this.vertexes=new L(Ga);this.edges=new L(Ia);this.kA=new ta(D,Ga);this.Zz=new ta(G,Ia)};
- Da.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutNetwork"+(null!==this.Ub?"("+this.Ub.toString()+")":"");if(0>=a)return b;b+=" vertexes: "+this.vertexes.count+" edges: "+this.edges.count;if(1<a){for(var c=this.vertexes.j;c.next();)b+="\n "+c.value.toString(a-1);for(c=this.edges.j;c.next();)b+="\n "+c.value.toString(a-1)}return b};w.defineProperty(Da,{Ub:"layout"},function(){return this.Zd},function(a){u&&null!==a&&w.k(a,Ve,Da,"layout");this.Zd=a});Da.prototype.createVertex=function(){return new Ga};
- Da.prototype.createEdge=function(){return new Ia};
- Da.prototype.addParts=Da.prototype.Xj=function(a,b,c){if(null!==a){void 0===b&&(b=!1);w.g(b,"boolean",Da,"addParts:toplevelonly");void 0===c&&(c=null);null===c&&(c=function(a){if(a instanceof D)return!a.Af;if(a instanceof G){var b=a.aa;if(null===b||b.Af)return!1;a=a.fa;return null===a||a.Af?!1:!0}return!1});for(a=a.j;a.next();){var d=a.value;if(d instanceof D&&(!b||d.dp)&&d.canLayout()&&c(d))if(d instanceof F&&null===d.Ub)this.Xj(d.Jc,!1);else if(null===this.Wm(d)){var e=this.createVertex();e.Kc=
- d;this.el(e)}}for(a.reset();a.next();)if(d=a.value,d instanceof G&&(!b||d.dp)&&d.canLayout()&&c(d)&&null===this.pw(d)){var g=d.aa,e=d.fa;null!==g&&null!==e&&g!==e&&(g=this.findGroupVertex(g),e=this.findGroupVertex(e),null!==g&&null!==e&&this.jp(g,e,d))}}};Da.prototype.findGroupVertex=function(a){if(null===a)return null;var b=a.findVisibleNode();if(null===b)return null;a=this.Wm(b);if(null!==a)return a;for(b=b.Va;null!==b;){a=this.Wm(b);if(null!==a)return a;b=b.Va}return null};
- Da.prototype.addVertex=Da.prototype.el=function(a){if(null!==a){u&&w.k(a,Ga,Da,"addVertex:vertex");this.vertexes.add(a);var b=a.Kc;null!==b&&this.kA.add(b,a);a.network=this}};Da.prototype.addNode=Da.prototype.ys=function(a){if(null===a)return null;u&&w.k(a,D,Da,"addNode:node");var b=this.Wm(a);null===b&&(b=this.createVertex(),b.Kc=a,this.el(b));return b};
- Da.prototype.deleteVertex=Da.prototype.PD=function(a){if(null!==a&&(u&&w.k(a,Ga,Da,"deleteVertex:vertex"),gp(this,a))){for(var b=a.Re,c=b.count-1;0<=c;c--){var d=b.ma(c);this.Po(d)}b=a.Le;for(c=b.count-1;0<=c;c--)d=b.ma(c),this.Po(d)}};function gp(a,b){if(null===b)return!1;var c=a.vertexes.remove(b);c&&(a.kA.remove(b.Kc),b.network=null);return c}Da.prototype.deleteNode=function(a){null!==a&&(u&&w.k(a,D,Da,"deleteNode:node"),a=this.Wm(a),null!==a&&this.PD(a))};
- Da.prototype.findVertex=Da.prototype.Wm=function(a){if(null===a)return null;u&&w.k(a,D,Da,"findVertex:node");return this.kA.za(a)};Da.prototype.addEdge=Da.prototype.Eo=function(a){if(null!==a){u&&w.k(a,Ia,Da,"addEdge:edge");this.edges.add(a);var b=a.link;null!==b&&null===this.pw(b)&&this.Zz.add(b,a);b=a.toVertex;null!==b&&b.kD(a);b=a.fromVertex;null!==b&&b.jD(a);a.network=this}};
- Da.prototype.addLink=function(a){if(null===a)return null;u&&w.k(a,G,Da,"addLink:link");var b=a.aa,c=a.fa,d=this.pw(a);null===d?(d=this.createEdge(),d.link=a,null!==b&&(d.fromVertex=this.ys(b)),null!==c&&(d.toVertex=this.ys(c)),this.Eo(d)):(d.fromVertex=null!==b?this.ys(b):null,d.toVertex=null!==c?this.ys(c):null);return d};Da.prototype.deleteEdge=Da.prototype.Po=function(a){if(null!==a){u&&w.k(a,Ia,Da,"deleteEdge:edge");var b=a.toVertex;null!==b&&b.OD(a);b=a.fromVertex;null!==b&&b.ND(a);hp(this,a)}};
- function hp(a,b){null!==b&&a.edges.remove(b)&&(a.Zz.remove(b.link),b.network=null)}Da.prototype.deleteLink=function(a){null!==a&&(u&&w.k(a,G,Da,"deleteLink:link"),a=this.pw(a),null!==a&&this.Po(a))};Da.prototype.findEdge=Da.prototype.pw=function(a){if(null===a)return null;u&&w.k(a,G,Da,"findEdge:link");return this.Zz.za(a)};
- Da.prototype.linkVertexes=Da.prototype.jp=function(a,b,c){if(null===a||null===b)return null;u&&(w.k(a,Ga,Da,"linkVertexes:fromVertex"),w.k(b,Ga,Da,"linkVertexes:toVertex"),null!==c&&w.k(c,G,Da,"linkVertexes:link"));if(a.network===this&&b.network===this){var d=this.createEdge();d.link=c;d.fromVertex=a;d.toVertex=b;this.Eo(d);return d}return null};
- Da.prototype.reverseEdge=Da.prototype.Yw=function(a){if(null!==a){u&&w.k(a,Ia,Da,"reverseEdge:edge");var b=a.fromVertex,c=a.toVertex;null!==b&&null!==c&&(b.ND(a),c.OD(a),a.Yw(),b.kD(a),c.jD(a))}};Da.prototype.deleteSelfEdges=Da.prototype.lw=function(){for(var a=w.nb(),b=this.edges.j;b.next();){var c=b.value;c.fromVertex===c.toVertex&&a.push(c)}b=a.length;for(c=0;c<b;c++)this.Po(a[c]);w.xa(a)};
- Da.prototype.deleteArtificialVertexes=function(){for(var a=w.nb(),b=this.vertexes.j;b.next();){var c=b.value;null===c.Kc&&a.push(c)}c=a.length;for(b=0;b<c;b++)this.PD(a[b]);c=w.nb();for(b=this.edges.j;b.next();){var d=b.value;null===d.link&&c.push(d)}d=c.length;for(b=0;b<d;b++)this.Po(c[b]);w.xa(a);w.xa(c)};function ip(a){for(var b=w.nb(),c=a.edges.j;c.next();){var d=c.value;null!==d.fromVertex&&null!==d.toVertex||b.push(d)}c=b.length;for(d=0;d<c;d++)a.Po(b[d]);w.xa(b)}
- Da.prototype.splitIntoSubNetworks=Da.prototype.bJ=function(){this.deleteArtificialVertexes();ip(this);this.lw();for(var a=new K(Da),b=!0;b;)for(var b=!1,c=this.vertexes.j;c.next();){var d=c.value;if(0<d.Re.count||0<d.Le.count){b=this.Ub.createNetwork();a.add(b);jp(this,b,d);b=!0;break}}a.sort(function(a,b){return null===a||null===b||a===b?0:b.vertexes.count-a.vertexes.count});return a};
- function jp(a,b,c){if(null!==c&&c.network!==b){gp(a,c);b.el(c);for(var d=c.sc;d.next();){var e=d.value;e.network!==b&&(hp(a,e),b.Eo(e),jp(a,b,e.fromVertex))}for(d=c.hc;d.next();)c=d.value,c.network!==b&&(hp(a,c),b.Eo(c),jp(a,b,c.toVertex))}}Da.prototype.findAllParts=function(){for(var a=new L(C),b=this.vertexes.j;b.next();)a.add(b.value.Kc);for(b=this.edges.j;b.next();)a.add(b.value.link);return a};
- function Ga(){w.mc(this);this.network=null;this.ea=(new x(0,0,10,10)).freeze();this.P=(new I(5,5)).freeze();this.clear()}w.la("LayoutVertex",Ga);Ga.prototype.clear=function(){this.xd=this.Fh=null;this.Re=new K(Ia);this.Le=new K(Ia)};
- Ga.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutVertex#"+w.ad(this);if(0<a&&(b+=null!==this.Kc?"("+this.Kc.toString()+")":"",1<a)){a="";for(var c=!0,d=this.Re.j;d.next();){var e=d.value;c?c=!1:a+=",";a+=e.toString(0)}e="";c=!0;for(d=this.Le.j;d.next();){var g=d.value;c?c=!1:e+=",";e+=g.toString(0)}b+=" sources: "+a+" destinations: "+e}return b};
- w.defineProperty(Ga,{data:"data"},function(){return this.Fh},function(a){this.Fh=a;if(null!==a){var b=a.bounds;a=b.x;var c=b.y,d=b.width,b=b.height;this.P.n(d/2,b/2);this.ea.n(a,c,d,b)}});
- w.defineProperty(Ga,{Kc:"node"},function(){return this.xd},function(a){if(this.xd!==a){u&&null!==a&&w.k(a,D,Ga,"node");this.xd=a;a.xf();var b=a.ca,c=b.x,d=b.y,e=b.width,b=b.height;isNaN(c)&&(c=0);isNaN(d)&&(d=0);this.ea.n(c,d,e,b);if(!(a instanceof F)&&(a=a.ac.vb(ac),a.J())){this.P.n(a.x-c,a.y-d);return}this.P.n(e/2,b/2)}});w.defineProperty(Ga,{ub:"bounds"},function(){return this.ea},function(a){this.ea.N(a)||(u&&w.k(a,x,Ga,"bounds"),this.ea.assign(a))});
- w.defineProperty(Ga,{focus:"focus"},function(){return this.P},function(a){this.P.N(a)||(u&&w.k(a,I,Ga,"focus"),this.P.assign(a))});w.defineProperty(Ga,{ra:"centerX"},function(){return this.ea.x+this.P.x},function(a){var b=this.ea;b.x+this.P.x!==a&&(u&&w.o(a,Ga,"centerX"),b.Ta(),b.x=a-this.P.x,b.freeze())});w.defineProperty(Ga,{Da:"centerY"},function(){return this.ea.y+this.P.y},function(a){var b=this.ea;b.y+this.P.y!==a&&(u&&w.o(a,Ga,"centerY"),b.Ta(),b.y=a-this.P.y,b.freeze())});
- w.defineProperty(Ga,{Ws:"focusX"},function(){return this.P.x},function(a){var b=this.P;b.x!==a&&(b.Ta(),b.x=a,b.freeze())});w.defineProperty(Ga,{Xs:"focusY"},function(){return this.P.y},function(a){var b=this.P;b.y!==a&&(b.Ta(),b.y=a,b.freeze())});w.defineProperty(Ga,{x:"x"},function(){return this.ea.x},function(a){var b=this.ea;b.x!==a&&(b.Ta(),b.x=a,b.freeze())});w.defineProperty(Ga,{y:"y"},function(){return this.ea.y},function(a){var b=this.ea;b.y!==a&&(b.Ta(),b.y=a,b.freeze())});
- w.defineProperty(Ga,{width:"width"},function(){return this.ea.width},function(a){var b=this.ea;b.width!==a&&(b.Ta(),b.width=a,b.freeze())});w.defineProperty(Ga,{height:"height"},function(){return this.ea.height},function(a){var b=this.ea;b.height!==a&&(b.Ta(),b.height=a,b.freeze())});
- Ga.prototype.commit=function(){var a=this.Fh;if(null!==a){var b=this.ub,c=a.bounds;w.$a(c)?(c.x=b.x,c.y=b.y,c.width=b.width,c.height=b.height):a.bounds=b.copy()}else if(a=this.Kc,null!==a){b=this.ub;if(!(a instanceof F)){var c=a.ca,d=a.ac.vb(ac);if(c.J()&&d.J()){a.moveTo(b.x+this.Ws-(d.x-c.x),b.y+this.Xs-(d.y-c.y));return}}a.moveTo(b.x,b.y)}};Ga.prototype.addSourceEdge=Ga.prototype.kD=function(a){null!==a&&(u&&w.k(a,Ia,Ga,"addSourceEdge:edge"),this.Re.contains(a)||this.Re.add(a))};
- Ga.prototype.deleteSourceEdge=Ga.prototype.OD=function(a){null!==a&&(u&&w.k(a,Ia,Ga,"deleteSourceEdge:edge"),this.Re.remove(a))};Ga.prototype.addDestinationEdge=Ga.prototype.jD=function(a){null!==a&&(u&&w.k(a,Ia,Ga,"addDestinationEdge:edge"),this.Le.contains(a)||this.Le.add(a))};Ga.prototype.deleteDestinationEdge=Ga.prototype.ND=function(a){null!==a&&(u&&w.k(a,Ia,Ga,"deleteDestinationEdge:edge"),this.Le.remove(a))};
- w.w(Ga,{aJ:"sourceVertexes"},function(){for(var a=new L(Ga),b=this.sc;b.next();)a.add(b.value.fromVertex);return a.j});w.w(Ga,{cH:"destinationVertexes"},function(){for(var a=new L(Ga),b=this.hc;b.next();)a.add(b.value.toVertex);return a.j});w.w(Ga,{vertexes:"vertexes"},function(){for(var a=new L(Ga),b=this.sc;b.next();)a.add(b.value.fromVertex);for(b=this.hc;b.next();)a.add(b.value.toVertex);return a.j});w.w(Ga,{sc:"sourceEdges"},function(){return this.Re.j});w.w(Ga,{hc:"destinationEdges"},function(){return this.Le.j});
- w.w(Ga,{edges:"edges"},function(){for(var a=new K(Ia),b=this.sc;b.next();)a.add(b.value);for(b=this.hc;b.next();)a.add(b.value);return a.j});w.w(Ga,{qH:"edgesCount"},function(){return this.Re.count+this.Le.count});var kp;Ga.standardComparer=kp=function(a,b){u&&w.k(a,Ga,Ga,"standardComparer:m");u&&w.k(b,Ga,Ga,"standardComparer:n");var c=a.xd,d=b.xd;return c?d?(c=c.text,d=d.text,c<d?-1:c>d?1:0):1:null!==d?-1:0};
- Ga.smartComparer=function(a,b){u&&w.k(a,Ga,Ga,"smartComparer:m");u&&w.k(b,Ga,Ga,"smartComparer:n");if(null!==a){if(null!==b){var c=a.xd,d=b.xd;if(null!==c){if(null!==d){for(var c=c.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),d=d.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),e=0;e<c.length;e++)if(""!==d[e]&&void 0!==d[e]){var g=parseFloat(c[e]),h=parseFloat(d[e]);if(isNaN(g)){if(!isNaN(h))return 1;if(0!==c[e].localeCompare(d[e]))return c[e].localeCompare(d[e])}else{if(isNaN(h))return-1;
- if(0!==g-h)return g-h}}else if(""!==c[e])return 1;return""!==d[e]&&void 0!==d[e]?-1:0}return 1}return null!==d?-1:0}return 1}return null!==b?-1:0};function Ia(){w.mc(this);this.network=null;this.clear()}w.la("LayoutEdge",Ia);Ia.prototype.clear=function(){this.toVertex=this.fromVertex=this.link=this.data=null};
- Ia.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutEdge#"+w.ad(this);0<a&&(b+=null!==this.link?"("+this.link.toString()+")":"",1<a&&(b+=" "+(this.fromVertex?this.fromVertex.toString():"null")+" --\x3e "+(this.toVertex?this.toVertex.toString():"null")));return b};Ia.prototype.Yw=function(){var a=this.fromVertex;this.fromVertex=this.toVertex;this.toVertex=a};Ia.prototype.commit=function(){};
- Ia.prototype.getOtherVertex=Ia.prototype.zH=function(a){u&&w.k(a,Ga,Ia,"getOtherVertex:v");return this.toVertex===a?this.fromVertex:this.fromVertex===a?this.toVertex:null};function cl(){0<arguments.length&&w.cd(cl);Ve.call(this);this.Iw=!0;this.vs=this.ws=NaN;this.jj=(new pa(NaN,NaN)).freeze();this.Vh=(new pa(10,10)).freeze();this.Be=jm;this.ed=hm;this.Uh=dm;this.Eh=lp}w.Pa(cl,Ve);w.la("GridLayout",cl);
- cl.prototype.cloneProtected=function(a){Ve.prototype.cloneProtected.call(this,a);a.ws=this.ws;a.vs=this.vs;a.jj.assign(this.jj);a.Vh.assign(this.Vh);a.Be=this.Be;a.ed=this.ed;a.Uh=this.Uh;a.Eh=this.Eh};
- cl.prototype.doLayout=function(a){null===a&&w.l("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");this.de=this.initialOrigin(this.de);var b=this.h,c=new L(C);a instanceof z?(b=a,fp(this,c,a.Jg,!0,null,!0,!0,!0),fp(this,c,a.links,!0,null,!0,!0,!0),fp(this,c,a.fi,!0,null,!0,!0,!0)):a instanceof F?(b=a.h,fp(this,c,a.Jc,!1,null,!0,!0,!0)):c.ce(a.j);for(a=c.copy().j;a.next();){var d=a.value;if(d instanceof G){var e=d;if(null!==e.aa||null!==e.fa){c.remove(e);
- continue}}d.xf();if(d instanceof F)for(d=d.Jc;d.next();)c.remove(d.value)}e=c.Te();if(0!==e.length){switch(this.sorting){case gm:e.reverse();break;case dm:e.sort(this.comparer);break;case em:e.sort(this.comparer),e.reverse()}var g=this.rJ;isNaN(g)&&(g=0);var h=this.QF,h=isNaN(h)&&null!==b?Math.max(b.qb.width-b.padding.left-b.padding.right,0):Math.max(this.QF,0);0>=g&&0>=h&&(g=1);c=this.spacing.width;isFinite(c)||(c=0);a=this.spacing.height;isFinite(a)||(a=0);null!==b&&b.ec("Layout");d=[];switch(this.alignment){case km:var k=
- c,l=a,m=Math.max(this.Ko.width,1);if(!isFinite(m))for(var n=m=0;n<e.length;n++)var p=e[n],q=p.Ja,m=Math.max(m,q.width);var m=Math.max(m+k,1),r=Math.max(this.Ko.height,1);if(!isFinite(r))for(n=r=0;n<e.length;n++)p=e[n],q=p.Ja,r=Math.max(r,q.height);for(var r=Math.max(r+l,1),s=this.Pf,t=this.de.x,v=t,y=this.de.y,B=0,A=0,n=0;n<e.length;n++){var p=e[n],q=p.Ja,E=Math.ceil((q.width+k)/m)*m,N=Math.ceil((q.height+l)/r)*r,J=0;switch(s){case im:J=Math.abs(v-q.width);break;default:J=v+q.width}if(0<g&&B>g-1||
- 0<h&&0<B&&J>h)d.push(new x(0,y,h+k,A)),B=0,v=t,y+=A,A=0;A=Math.max(A,N);N=0;switch(s){case im:N=-q.width;break;default:N=0}p.moveTo(v+N,y);switch(s){case im:v-=E;break;default:v+=E}B++}d.push(new x(0,y,h+k,A));break;case jm:k=g;l=c;m=a;n=Math.max(this.Ko.width,1);p=y=E=0;q=w.O();for(g=0;g<e.length;g++)r=e[g],s=r.Ja,t=Vn(r,r.ac,r.kf,q),E=Math.max(E,t.x),y=Math.max(y,s.width-t.x),p=Math.max(p,t.y);v=this.Pf;switch(v){case im:E+=l;break;default:y+=l}var n=isFinite(n)?Math.max(n+l,1):Math.max(E+y,1),
- W=y=this.de.x,B=this.de.y,A=0;h>=E&&(h-=E);for(var E=N=0,J=Math.max(this.Ko.height,1),ea=p=0,T=!0,P=w.O(),g=0;g<e.length;g++){r=e[g];s=r.Ja;t=Vn(r,r.ac,r.kf,q);if(0<A)switch(v){case im:W=Math.floor((W-y-(s.width-t.x))/n)*n+y;break;default:W=Math.ceil((W-y+t.x)/n)*n+y}else switch(v){case im:N=W+t.x+s.width;break;default:N=W-t.x}var aa=0;switch(v){case im:aa=-(W+t.x)+N;break;default:aa=W+s.width-t.x-N}if(0<k&&A>k-1||0<h&&0<A&&aa>h){d.push(new x(0,T?B-p:B,h+l,ea+p+m));for(W=0;W<A&&g!==A;W++){var aa=
- e[g-A+W],La=Vn(aa,aa.ac,aa.kf,P);aa.moveTo(aa.position.x,aa.position.y+p-La.y)}ea+=m;B=T?B+ea:B+(ea+p);A=ea=p=0;W=y;T=!1}W===y&&(E=v===im?Math.max(E,s.width-t.x):Math.min(E,-t.x));p=Math.max(p,t.y);ea=Math.max(ea,s.height-t.y);isFinite(J)&&(ea=Math.max(ea,Math.max(s.height,J)-t.y));T?r.moveTo(W-t.x,B-t.y):r.moveTo(W-t.x,B);switch(v){case im:W-=t.x+l;break;default:W+=s.width-t.x+l}A++}d.push(new x(0,B,h+l,(T?ea:ea+p)+m));for(W=0;W<A&&g!==A;W++)aa=e[g-A+W],La=Vn(aa,aa.ac,aa.kf,q),aa.moveTo(aa.position.x,
- aa.position.y+p-La.y);w.A(q);w.A(P);if(v===im)for(g=0;g<d.length;g++)e=d[g],e.width+=E,e.x-=E;else for(g=0;g<d.length;g++)e=d[g],e.x>E&&(e.width+=e.x-E,e.x=E)}for(k=g=h=e=0;k<d.length;k++)l=d[k],e=Math.min(e,l.x),h=Math.min(h,l.y),g=Math.max(g,l.x+l.width);this.Pf===im?this.commitLayers(d,new I(e+c/2-(g+e),h-a/2)):this.commitLayers(d,new I(e-c/2,h-a/2));null!==b&&b.fe("Layout");this.Cf=!0}};cl.prototype.commitLayers=function(){};
- w.defineProperty(cl,{QF:"wrappingWidth"},function(){return this.ws},function(a){this.ws!==a&&(w.g(a,"number",cl,"wrappingWidth"),0<a||isNaN(a))&&(this.ws=a,this.Iw=isNaN(a),this.K())});w.defineProperty(cl,{rJ:"wrappingColumn"},function(){return this.vs},function(a){this.vs!==a&&(w.g(a,"number",cl,"wrappingColumn"),0<a||isNaN(a))&&(this.vs=a,this.K())});w.defineProperty(cl,{Ko:"cellSize"},function(){return this.jj},function(a){w.k(a,pa,cl,"cellSize");this.jj.N(a)||(this.jj.assign(a),this.K())});
- w.defineProperty(cl,{spacing:"spacing"},function(){return this.Vh},function(a){w.k(a,pa,cl,"spacing");this.Vh.N(a)||(this.Vh.assign(a),this.K())});w.defineProperty(cl,{alignment:"alignment"},function(){return this.Be},function(a){this.Be!==a&&(w.Ea(a,cl,cl,"alignment"),a===jm||a===km)&&(this.Be=a,this.K())});w.defineProperty(cl,{Pf:"arrangement"},function(){return this.ed},function(a){this.ed!==a&&(w.Ea(a,cl,cl,"arrangement"),a===hm||a===im)&&(this.ed=a,this.K())});
- w.defineProperty(cl,{sorting:"sorting"},function(){return this.Uh},function(a){this.Uh!==a&&(w.Ea(a,cl,cl,"sorting"),a===fm||a===gm||a===dm||a===em)&&(this.Uh=a,this.K())});w.defineProperty(cl,{comparer:"comparer"},function(){return this.Eh},function(a){this.Eh!==a&&(w.g(a,"function",cl,"comparer"),this.Eh=a,this.K())});var lp;cl.standardComparer=lp=function(a,b){u&&w.k(a,C,cl,"standardComparer:a");u&&w.k(b,C,cl,"standardComparer:b");var c=a.text,d=b.text;return c<d?-1:c>d?1:0};
- cl.smartComparer=function(a,b){u&&w.k(a,C,cl,"standardComparer:a");u&&w.k(b,C,cl,"standardComparer:b");if(null!==a){if(null!==b){for(var c=a.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),d=b.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),e=0;e<c.length;e++)if(""!==d[e]&&void 0!==d[e]){var g=parseFloat(c[e]),h=parseFloat(d[e]);if(isNaN(g)){if(!isNaN(h))return 1;if(0!==c[e].localeCompare(d[e]))return c[e].localeCompare(d[e])}else{if(isNaN(h))return-1;
- if(0!==g-h)return g-h}}else if(""!==c[e])return 1;return""!==d[e]&&void 0!==d[e]?-1:0}return 1}return null!==b?-1:0};var km;cl.Position=km=w.v(cl,"Position",0);var jm;cl.Location=jm=w.v(cl,"Location",1);var hm;cl.LeftToRight=hm=w.v(cl,"LeftToRight",2);var im;cl.RightToLeft=im=w.v(cl,"RightToLeft",3);var fm;cl.Forward=fm=w.v(cl,"Forward",4);var gm;cl.Reverse=gm=w.v(cl,"Reverse",5);var dm;cl.Ascending=dm=w.v(cl,"Ascending",6);var em;cl.Descending=em=w.v(cl,"Descending",7);
- function lm(){0<arguments.length&&w.cd(lm);Ve.call(this);this.jy=this.Nn=this.Hd=0;this.nq=360;this.iy=Em;this.Fk=0;this.EB=Em;this.pu=this.yg=this.YC=0;this.Qv=new mp;this.su=this.pm=0;this.mG=600;this.Fr=NaN;this.Up=1;this.gs=0;this.js=360;this.ed=Em;this.qa=tm;this.Uh=qm;this.Eh=kp;this.Vh=6;this.sr=Hm}w.Pa(lm,Ve);w.la("CircularLayout",lm);
- lm.prototype.cloneProtected=function(a){Ve.prototype.cloneProtected.call(this,a);a.Fr=this.Fr;a.Up=this.Up;a.gs=this.gs;a.js=this.js;a.ed=this.ed;a.qa=this.qa;a.Uh=this.Uh;a.Eh=this.Eh;a.Vh=this.Vh;a.sr=this.sr};lm.prototype.createNetwork=function(){return new np};
- lm.prototype.doLayout=function(a){null===a&&w.l("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");null===this.network&&(this.network=this.makeNetwork(a));a=this.network.vertexes;if(1>=a.count)1===a.count&&(a=a.first(),a.ra=0,a.Da=0);else{var b=new K(op);b.ce(a.j);a=new K(op);var c=new K(op),d;d=this.sort(b);var e=this.iy,g=this.EB,h=this.Hd,k=this.Nn,l=this.jy,m=this.nq,b=this.Fk,n=this.YC,p=this.yg,q=this.pu,e=this.Pf,g=this.Qw,h=this.EI;if(!isFinite(h)||
- 0>=h)h=NaN;k=this.DG;if(!isFinite(k)||0>=k)k=1;l=this.Se;isFinite(l)||(l=0);m=this.cg;if(!isFinite(m)||360<m||1>m)m=360;b=this.spacing;isFinite(b)||(b=NaN);e===Fm&&g===Gm?e=Em:e===Fm&&g!==Gm&&(g=Gm,e=this.Pf);if((this.direction===rm||this.direction===sm)&&this.sorting!==qm){for(var r=0;!(r>=d.length);r+=2){a.add(d.ma(r));if(r+1>=d.length)break;c.add(d.ma(r+1))}this.direction===rm?(this.Pf===Fm&&a.reverse(),d=new K(op),d.ce(a),d.ce(c)):(this.Pf===Fm&&c.reverse(),d=new K(op),d.ce(c),d.ce(a))}for(var s=
- d.length,t=n=0,r=0;r<d.length;r++){var p=l+m*t*(this.direction===tm?1:-1)/s,v=d.ma(r).diameter;isNaN(v)&&(v=pp(d.ma(r),p));360>m&&(0===r||r===d.length-1)&&(v/=2);n+=v;t++}if(isNaN(h)||e===Fm){isNaN(b)&&(b=6);if(e!==Em&&e!==Fm){v=-Infinity;for(r=0;r<s;r++){var q=d.ma(r),y=d.ma(r===s-1?0:r+1);isNaN(q.diameter)&&pp(q,0);isNaN(y.diameter)&&pp(y,0);v=Math.max(v,(q.diameter+y.diameter)/2)}q=v+b;e===Cm?(p=2*Math.PI/s,h=(v+b)/p):h=qp(this,q*(360<=m?s:s-1),k,l*Math.PI/180,m*Math.PI/180)}else h=qp(this,n+(360<=
- m?s:s-1)*(e!==Fm?b:1.6*b),k,l*Math.PI/180,m*Math.PI/180);p=h*k}else if(p=h*k,t=rp(this,h,p,l*Math.PI/180,m*Math.PI/180),isNaN(b)){if(e===Em||e===Fm)b=(t-n)/(360<=m?s:s-1)}else if(e===Em||e===Fm)r=(t-n)/(360<=m?s:s-1),r<b?(h=qp(this,n+b*(360<=m?s:s-1),k,l*Math.PI/180,m*Math.PI/180),p=h*k):b=r;else{v=-Infinity;for(r=0;r<s;r++)q=d.ma(r),y=d.ma(r===s-1?0:r+1),isNaN(q.diameter)&&pp(q,0),isNaN(y.diameter)&&pp(y,0),v=Math.max(v,(q.diameter+y.diameter)/2);q=v+b;r=qp(this,q*(360<=m?s:s-1),k,l*Math.PI/180,
- m*Math.PI/180);r>h?(h=r,p=h*k):q=t/(360<=m?s:s-1)}this.iy=e;this.EB=g;this.Hd=h;this.Nn=k;this.jy=l;this.nq=m;this.Fk=b;this.YC=n;this.yg=p;this.pu=q;b=d;d=this.iy;e=this.Hd;g=this.jy;k=this.nq;l=this.Fk;m=this.yg;n=this.pu;if(this.direction!==rm&&this.direction!==sm||d!==Fm)if(this.direction===rm||this.direction===sm){h=0;switch(d){case Dm:h=180*sp(this,e,m,g,n)/Math.PI;break;case Em:n=b=0;h=a.first();null!==h&&(b=pp(h,Math.PI/2));h=c.first();null!==h&&(n=pp(h,Math.PI/2));h=180*sp(this,e,m,g,l+(b+
- n)/2)/Math.PI;break;case Cm:h=k/b.length}if(this.direction===rm){switch(d){case Dm:tp(this,a,g,um);break;case Em:up(this,a,g,um);break;case Cm:vp(this,a,k/2,g,um)}switch(d){case Dm:tp(this,c,g+h,tm);break;case Em:up(this,c,g+h,tm);break;case Cm:vp(this,c,k/2,g+h,tm)}}else{switch(d){case Dm:tp(this,c,g,um);break;case Em:up(this,c,g,um);break;case Cm:vp(this,c,k/2,g,um)}switch(d){case Dm:tp(this,a,g+h,tm);break;case Em:up(this,a,g+h,tm);break;case Cm:vp(this,a,k/2,g+h,tm)}}}else switch(d){case Dm:tp(this,
- b,g,this.direction);break;case Em:up(this,b,g,this.direction);break;case Cm:vp(this,b,k,g,this.direction);break;case Fm:wp(this,b,k,g,this.direction)}else wp(this,b,k,g-k/2,tm)}this.updateParts();this.network=null;this.Cf=!0};
- function vp(a,b,c,d,e){var g=a.nq,h=a.Hd;a=a.yg;d=d*Math.PI/180;c=c*Math.PI/180;for(var k=b.length,l=0;l<k;l++){var m=d+(e===tm?l*c/(360<=g?k:k-1):-(l*c)/k),n=b.ma(l),p=h*Math.tan(m)/a,p=Math.sqrt((h*h+a*a*p*p)/(1+p*p));n.ra=p*Math.cos(m);n.Da=p*Math.sin(m);n.actualAngle=180*m/Math.PI}}
- function up(a,b,c,d){var e=a.Hd,g=a.yg,h=a.Fk;c=c*Math.PI/180;for(var k=b.length,l=0;l<k;l++){var m=b.ma(l),n=b.ma(l===k-1?0:l+1),p=g*Math.sin(c);m.ra=e*Math.cos(c);m.Da=p;m.actualAngle=180*c/Math.PI;isNaN(m.diameter)&&pp(m,0);isNaN(n.diameter)&&pp(n,0);m=sp(a,e,g,d===tm?c:-c,(m.diameter+n.diameter)/2+h);c+=d===tm?m:-m}}
- function tp(a,b,c,d){var e=a.Hd,g=a.yg,h=a.pu;c=c*Math.PI/180;for(var k=b.length,l=0;l<k;l++){var m=b.ma(l);m.ra=e*Math.cos(c);m.Da=g*Math.sin(c);m.actualAngle=180*c/Math.PI;m=sp(a,e,g,d===tm?c:-c,h);c+=d===tm?m:-m}}function wp(a,b,c,d,e){var g=a.su,g=a.nq;a.pm=0;a.Qv=new mp;if(360>c){for(g=d+(e===tm?g:-g);0>g;)g+=360;g%=360;180<g&&(g-=360);g*=Math.PI/180;a.su=g;xp(a,b,c,d,e)}else yp(a,b,c,d,e);a.Qv.commit(b)}
- function yp(a,b,c,d,e){var g=a.Hd,h=a.Fk,k=a.Nn,l=g*Math.cos(d*Math.PI/180),m=a.yg*Math.sin(d*Math.PI/180),n=b.Te();if(3===n.length)n[0].ra=g,n[0].Da=0,n[1].ra=n[0].ra-n[0].width/2-n[1].width/2-h,n[1].y=n[0].y,n[2].ra=(n[0].ra+n[1].ra)/2,n[2].y=n[0].y-n[2].height-h;else if(4===n.length)n[0].ra=g,n[0].Da=0,n[2].ra=-n[0].ra,n[2].Da=n[0].Da,n[1].ra=0,n[1].y=Math.min(n[0].y,n[2].y)-n[1].height-h,n[3].ra=0,n[3].y=Math.max(n[0].y+n[0].height+h,n[2].y+n[2].height+h);else{for(var g=w.O(),p=0;p<n.length;p++){n[p].ra=
- l;n[p].Da=m;if(p>=n.length-1)break;zp(a,l,m,n,p,e,g)||Ap(a,l,m,n,p,e,g);l=g.x;m=g.y}w.A(g);a.pm++;if(!(23<a.pm)){var l=n[0].ra,m=n[0].Da,g=n[n.length-1].ra,p=n[n.length-1].Da,q=Math.abs(l-g)-((n[0].width+n[n.length-1].width)/2+h),r=Math.abs(m-p)-((n[0].height+n[n.length-1].height)/2+h),h=0;1>Math.abs(r)?Math.abs(l-g)<(n[0].width+n[n.length-1].width)/2&&(h=0):h=0<r?r:1>Math.abs(q)?0:q;q=!1;q=Math.abs(g)>Math.abs(p)?0<g!==m>p:0<p!==l<g;if(q=e===tm?q:!q)h=-Math.abs(h),h=Math.min(h,-n[n.length-1].width),
- h=Math.min(h,-n[n.length-1].height);a.Qv.compare(h,n);1<Math.abs(h)&&(a.Hd=8>a.pm?a.Hd-h/(2*Math.PI):5>n.length&&10<h?a.Hd/2:a.Hd-(0<h?1.7:-2.3),a.yg=a.Hd*k,yp(a,b,c,d,e))}}}
- function xp(a,b,c,d,e){for(var g=a.Hd,h=a.yg,k=a.Nn,l=g*Math.cos(d*Math.PI/180),m=h*Math.sin(d*Math.PI/180),n=w.O(),p=b.Te(),q=0;q<p.length;q++){p[q].ra=l;p[q].Da=m;if(q>=p.length-1)break;zp(a,l,m,p,q,e,n)||Ap(a,l,m,p,q,e,n);l=n.x;m=n.y}w.A(n);a.pm++;if(!(23<a.pm)){l=Math.atan2(m,l);l=e===tm?a.su-l:l-a.su;l=Math.abs(l)<Math.abs(l-2*Math.PI)?l:l-2*Math.PI;g=l*(g+h)/2;h=a.Qv;if(Math.abs(g)<Math.abs(h.Wo))for(h.Wo=g,h.nn=[],h.Jp=[],l=0;l<p.length;l++)h.nn[l]=p[l].ub.x,h.Jp[l]=p[l].ub.y;1<Math.abs(g)&&
- (a.Hd=8>a.pm?a.Hd-g/(2*Math.PI):a.Hd-(0<g?1.7:-2.3),a.yg=a.Hd*k,xp(a,b,c,d,e))}}function zp(a,b,c,d,e,g,h){var k=a.Hd,l=a.yg,m=0,n=0;a=(d[e].width+d[e+1].width)/2+a.Fk;var p=!1;if(0<=c!==(g===tm)){if(m=b+a,m>k){m=b-a;if(m<-k)return h.x=m,h.y=n,!1;p=!0}}else if(m=b-a,m<-k){m=b+a;if(m>k)return h.x=m,h.y=n,!1;p=!0}n=Math.sqrt(1-Math.min(1,m*m/(k*k)))*l;0>c!==p&&(n=-n);if(Math.abs(c-n)>(d[e].height+d[e+1].height)/2)return h.x=m,h.y=n,!1;h.x=m;h.y=n;return!0}
- function Ap(a,b,c,d,e,g,h){var k=a.Hd,l=a.yg,m=0,n=0;a=(d[e].height+d[e+1].height)/2+a.Fk;d=!1;if(0<=b!==(g===tm)){if(n=c-a,n<-l){n=c+a;if(n>l){h.x=m;h.y=n;return}d=!0}}else if(n=c+a,n>l){n=c-a;if(n<-l){h.x=m;h.y=n;return}d=!0}m=Math.sqrt(1-Math.min(1,n*n/(l*l)))*k;0>b!==d&&(m=-m);h.x=m;h.y=n}lm.prototype.commitLayout=function(){this.commitNodes();this.it&&this.commitLinks()};
- lm.prototype.commitNodes=function(){for(var a=this.vG,b=this.network.vertexes.j;b.next();){var c=b.value;c.x+=a.x;c.y+=a.y;c.commit()}};lm.prototype.commitLinks=function(){for(var a=this.network.edges.j;a.next();)a.value.commit()};
- function rp(a,b,c,d,e){var g=a.mG;if(.001>Math.abs(a.Nn-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;for(var h=0,k=0,k=void 0!==d&&void 0!==e?e/(g+1):Math.PI/(2*(g+1)),l=0,m=0;m<=g;m++)l=void 0!==d&&void 0!==e?d+m*e/g:m*Math.PI/(2*g),l=Math.sin(l),h+=Math.sqrt(1-a*a*l*l)*k;return void 0!==d&&void 0!==e?(b>c?b:c)*h:4*(b>c?b:c)*h}function qp(a,b,c,d,e){var g=0,g=void 0!==d&&void 0!==e?rp(a,1,c,d,e):rp(a,1,c);return b/g}
- function sp(a,b,c,d,e){if(.001>Math.abs(a.Nn-1))return e/b;var g=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c,h=0;a=2*Math.PI/(700*a.network.vertexes.count);b>c&&(d+=Math.PI/2);for(var k=0;;k++){var l=Math.sin(d+k*a),h=h+(b>c?b:c)*Math.sqrt(1-g*g*l*l)*a;if(h>=e)return k*a}}
- lm.prototype.sort=function(a){switch(this.sorting){case om:break;case pm:a.reverse();break;case mm:a.sort(this.comparer);break;case nm:a.sort(this.comparer);a.reverse();break;case qm:for(var b=[],c=0;c<a.length;c++)b.push(0);for(var d=new K(op),c=0;c<a.length;c++){var e=-1,g=-1;if(0===c)for(var h=0;h<a.length;h++){var k=a.ma(h).qH;k>e&&(e=k,g=h)}else for(h=0;h<a.length;h++)k=b[h],k>e&&(e=k,g=h);d.add(a.ma(g));b[g]=-1;g=a.ma(g);e=0;for(h=g.sc;h.next();)e=a.indexOf(h.value.fromVertex),0>e||0<=b[e]&&
- b[e]++;for(g=g.hc;g.next();)e=a.indexOf(g.value.toVertex),0>e||0<=b[e]&&b[e]++}a=[];for(b=0;b<d.length;b++){h=d.ma(b);a[b]=[];for(var l=0,c=h.hc;c.next();)l=d.indexOf(c.value.toVertex),l!==b&&0>a[b].indexOf(l)&&a[b].push(l);for(c=h.sc;c.next();)l=d.indexOf(c.value.fromVertex),l!==b&&0>a[b].indexOf(l)&&a[b].push(l)}h=[];for(b=0;b<a.length;b++)h[b]=0;for(var c=[],k=[],m=[],e=[],g=new K(op),n=0,b=0;b<a.length;b++){var p=a[b].length;if(1===p)e.push(b);else if(0===p)g.add(d.ma(b));else{if(0===n)c.push(b);
- else{for(var q=Infinity,r=Infinity,s=-1,t=[],p=0;p<c.length;p++)0>a[c[p]].indexOf(c[p===c.length-1?0:p+1])&&t.push(p===c.length-1?0:p+1);if(0===t.length)for(p=0;p<c.length;p++)t.push(p);for(p=0;p<t.length;p++){var v=t[p],y,l=a[b];y=k;for(var B=m,A=h,E=v,N=c,J=0,W=0;W<y.length;W++){var ea=A[y[W]],T=A[B[W]],P=0,aa=0;ea<T?(P=ea,aa=T):(P=T,aa=ea);if(P<E&&E<=aa)for(ea=0;ea<l.length;ea++)T=l[ea],0>N.indexOf(T)||P<A[T]&&A[T]<aa||P===A[T]||aa===A[T]||J++;else for(ea=0;ea<l.length;ea++)T=l[ea],0>N.indexOf(T)||
- P<A[T]&&A[T]<aa&&P!==A[T]&&aa!==A[T]&&J++}y=J;for(A=B=0;A<a[b].length;A++)l=c.indexOf(a[b][A]),0<=l&&(l=Math.abs(v-(l>=v?l+1:l)),B+=l<c.length+1-l?l:c.length+1-l);for(A=0;A<k.length;A++)l=h[k[A]],E=h[m[A]],l>=v&&l++,E>=v&&E++,l>E&&(N=E,E=l,l=N),E-l<(c.length+2)/2===(l<v&&v<=E)&&B++;if(y<q||y===q&&B<r)q=y,r=B,s=v}c.splice(s,0,b);for(p=0;p<c.length;p++)h[c[p]]=p;for(p=0;p<a[b].length;p++)q=a[b][p],0<=c.indexOf(q)&&(k.push(b),m.push(q))}n++}}k=!1;for(m=c.length;;){k=!0;for(h=0;h<e.length;h++)if(b=e[h],
- n=a[b][0],l=c.indexOf(n),0<=l){for(r=p=0;r<a[n].length;r++)q=a[n][r],q=c.indexOf(q),0>q||q===l||(s=q>l?q-l:l-q,p+=q<l!==s>m-s?1:-1);c.splice(0>p?l:l+1,0,b);e.splice(h,1);h--}else k=!1;if(k)break;else c.push(e[0]),e.splice(0,1)}for(b=0;b<c.length;b++)l=c[b],g.add(d.ma(l));return g;default:w.l("Invalid sorting type.")}return a};w.defineProperty(lm,{EI:"radius"},function(){return this.Fr},function(a){this.Fr!==a&&(w.g(a,"number",lm,"radius"),0<a||isNaN(a))&&(this.Fr=a,this.K())});
- w.defineProperty(lm,{DG:"aspectRatio"},function(){return this.Up},function(a){this.Up!==a&&(w.g(a,"number",lm,"aspectRatio"),0<a&&(this.Up=a,this.K()))});w.defineProperty(lm,{Se:"startAngle"},function(){return this.gs},function(a){this.gs!==a&&(w.g(a,"number",lm,"startAngle"),this.gs=a,this.K())});w.defineProperty(lm,{cg:"sweepAngle"},function(){return this.js},function(a){this.js!==a&&(w.g(a,"number",lm,"sweepAngle"),this.js=0<a&&360>=a?a:360,this.K())});
- w.defineProperty(lm,{Pf:"arrangement"},function(){return this.ed},function(a){this.ed!==a&&(w.Ea(a,lm,lm,"arrangement"),a===Fm||a===Em||a===Dm||a===Cm)&&(this.ed=a,this.K())});w.defineProperty(lm,{direction:"direction"},function(){return this.qa},function(a){this.qa!==a&&(w.Ea(a,lm,lm,"direction"),a===tm||a===um||a===rm||a===sm)&&(this.qa=a,this.K())});
- w.defineProperty(lm,{sorting:"sorting"},function(){return this.Uh},function(a){this.Uh!==a&&(w.Ea(a,lm,lm,"sorting"),a===om||a===pm||a===mm||nm||a===qm)&&(this.Uh=a,this.K())});w.defineProperty(lm,{comparer:"comparer"},function(){return this.Eh},function(a){this.Eh!==a&&(w.g(a,"function",lm,"comparer"),this.Eh=a,this.K())});w.defineProperty(lm,{spacing:"spacing"},function(){return this.Vh},function(a){this.Vh!==a&&(w.g(a,"number",lm,"spacing"),this.Vh=a,this.K())});
- w.defineProperty(lm,{Qw:"nodeDiameterFormula"},function(){return this.sr},function(a){this.sr!==a&&(w.Ea(a,lm,lm,"nodeDiameterFormula"),a===Hm||a===Gm)&&(this.sr=a,this.K())});w.w(lm,{wG:"actualXRadius"},function(){return this.Hd});w.w(lm,{xG:"actualYRadius"},function(){return this.yg});w.w(lm,{sJ:"actualSpacing"},function(){return this.Fk});w.w(lm,{vG:"actualCenter"},function(){return isNaN(this.de.x)||isNaN(this.de.y)?new I(0,0):new I(this.de.x+this.wG,this.de.y+this.xG)});var Em;
- lm.ConstantSpacing=Em=w.v(lm,"ConstantSpacing",0);var Dm;lm.ConstantDistance=Dm=w.v(lm,"ConstantDistance",1);var Cm;lm.ConstantAngle=Cm=w.v(lm,"ConstantAngle",2);var Fm;lm.Packed=Fm=w.v(lm,"Packed",3);var tm;lm.Clockwise=tm=w.v(lm,"Clockwise",4);var um;lm.Counterclockwise=um=w.v(lm,"Counterclockwise",5);var rm;lm.BidirectionalLeft=rm=w.v(lm,"BidirectionalLeft",6);var sm;lm.BidirectionalRight=sm=w.v(lm,"BidirectionalRight",7);var om;lm.Forwards=om=w.v(lm,"Forwards",8);var pm;
- lm.Reverse=pm=w.v(lm,"Reverse",9);var mm;lm.Ascending=mm=w.v(lm,"Ascending",10);var nm;lm.Descending=nm=w.v(lm,"Descending",11);var qm;lm.Optimized=qm=w.v(lm,"Optimized",12);var Hm;lm.Pythagorean=Hm=w.v(lm,"Pythagorean",13);var Gm;lm.Circular=Gm=w.v(lm,"Circular",14);function mp(){this.Wo=-Infinity;this.Jp=this.nn=null}
- mp.prototype.compare=function(a,b){if(0<a&&0>this.Wo||Math.abs(a)<Math.abs(this.Wo)&&!(0>a&&0<this.Wo)){this.Wo=a;this.nn=[];this.Jp=[];for(var c=0;c<b.length;c++)this.nn[c]=b[c].ub.x,this.Jp[c]=b[c].ub.y}};mp.prototype.commit=function(a){if(null!==this.nn&&null!==this.Jp)for(var b=0;b<this.nn.length;b++){var c=a.ma(b);c.x=this.nn[b];c.y=this.Jp[b]}};function np(){Da.call(this)}w.Pa(np,Da);w.la("CircularNetwork",np);np.prototype.createVertex=function(){return new op};np.prototype.createEdge=function(){return new Bp};
- function op(){Ga.call(this);this.actualAngle=this.diameter=NaN}w.Pa(op,Ga);w.la("CircularVertex",op);
- function pp(a,b){var c=a.network;if(null===c)return NaN;c=c.Ub;if(null===c)return NaN;if(c.Pf===Fm)if(c.Qw===Gm)a.diameter=Math.max(a.width,a.height);else{var c=Math.abs(Math.sin(b)),d=Math.abs(Math.cos(b));if(0===c)return a.width;if(0===d)return a.height;a.diameter=Math.min(a.height/c,a.width/d)}else a.diameter=c.Qw===Gm?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.diameter}function Bp(){Ia.call(this)}w.Pa(Bp,Ia);w.la("CircularEdge",Bp);
- function Cp(){0<arguments.length&&w.cd(Cp);Ve.call(this);this.xg=null;this.Qq=0;this.gg=(new pa(100,100)).freeze();this.Tp=!1;this.Th=!0;this.Dh=!1;this.mo=100;this.pq=1;this.Mh=1E3;this.Gr=Math;this.In=.05;this.Hn=50;this.En=150;this.Gn=0;this.jq=10;this.iq=5}w.Pa(Cp,Ve);w.la("ForceDirectedLayout",Cp);
- Cp.prototype.cloneProtected=function(a){Ve.prototype.cloneProtected.call(this,a);a.gg.assign(this.gg);a.Tp=this.Tp;a.Th=this.Th;a.Dh=this.Dh;a.mo=this.mo;a.pq=this.pq;a.Mh=this.Mh;a.Gr=this.Gr;a.In=this.In;a.Hn=this.Hn;a.En=this.En;a.Gn=this.Gn;a.jq=this.jq;a.iq=this.iq};Cp.prototype.createNetwork=function(){return new Dp};
- Cp.prototype.doLayout=function(a){null===a&&w.l("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");null===this.network&&(this.network=this.makeNetwork(a));a=this.$z;if(0<this.network.vertexes.count){this.network.lw();for(var b=this.network.vertexes.j;b.next();){var c=b.value;c.charge=this.electricalCharge(c);c.mass=this.gravitationalMass(c)}for(b=this.network.edges.j;b.next();)c=b.value,c.stiffness=this.springStiffness(c),c.length=this.springLength(c);
- this.mz();this.Qq=0;if(this.needsClusterLayout()){b=this.network;for(c=b.bJ().j;c.next();){this.network=c.value;for(var d=this.network.vertexes.j;d.next();){var e=d.value;e.$f=e.vertexes.count;e.jk=1;e.Nm=null;e.xh=null}Ep(this,0,a)}this.network=b;c.reset();u&&w.k(b,Dp,Cp,"arrangeConnectedGraphs:singletons");for(var d=this.pD,g=c.count,h=!0,k=e=0,l=w.nb(),m=0;m<g+b.vertexes.count+2;m++)l[m]=null;g=0;c.reset();for(var n=w.eg();c.next();)if(m=c.value,this.zg(m,n),h)h=!1,e=n.x+n.width/2,k=n.y+n.height/
- 2,l[0]=new I(n.x+n.width+d.width,n.y),l[1]=new I(n.x,n.y+n.height+d.height),g=2;else{var p=Fp(l,g,e,k,n.width,n.height,d),q=l[p],r=new I(q.x+n.width+d.width,q.y),s=new I(q.x,q.y+n.height+d.height);p+1<g&&l.splice(p+1,0,null);l[p]=r;l[p+1]=s;g++;p=q.x-n.x;q=q.y-n.y;for(m=m.vertexes.j;m.next();)r=m.value,r.ra+=p,r.Da+=q}w.qc(n);for(m=b.vertexes.j;m.next();)h=m.value,n=h.ub,2>g?(e=n.x+n.width/2,k=n.y+n.height/2,l[0]=new I(n.x+n.width+d.width,n.y),l[1]=new I(n.x,n.y+n.height+d.height),g=2):(p=Fp(l,g,
- e,k,n.width,n.height,d),q=l[p],r=new I(q.x+n.width+d.width,q.y),s=new I(q.x,q.y+n.height+d.height),p+1<g&&l.splice(p+1,0,null),l[p]=r,l[p+1]=s,g++,h.ra=q.x+h.width/2,h.Da=q.y+h.height/2);w.xa(l);for(c.reset();c.next();){d=c.value;for(e=d.vertexes.j;e.next();)b.el(e.value);for(d=d.edges.j;d.next();)b.Eo(d.value)}}Gp(this,a);this.updateParts()}this.mo=a;this.network=null;this.Cf=!0};
- Cp.prototype.needsClusterLayout=function(){if(3>this.network.vertexes.count)return!1;for(var a=0,b=0,c=this.network.vertexes.first().ub,d=this.network.vertexes.j;d.next();){if(d.value.ub.Gg(c)&&(a++,2<a))return!0;if(10<b)break;b++}return!1};Cp.prototype.zg=function(a,b){for(var c=!0,d=a.vertexes.j;d.next();){var e=d.value;c?(c=!1,b.set(e.ub)):b.hi(e.ub)}return b};
- function Hp(a,b,c){u&&(w.o(b,Cp,"computeClusterLayoutIterations:level"),w.o(c,Cp,"computeClusterLayoutIterations:maxiter"));return Math.max(Math.min(a.network.vertexes.count,c*(b+1)/11),10)}
- function Ep(a,b,c){u&&(w.o(b,Cp,"layoutClusters:level"),w.o(c,Cp,"layoutClusters:maxiter"));if(Ip(a,b)){var d=a.Mh;a.Mh*=1+1/(b+1);var e=Jp(a,b),g=Math.max(0,Hp(a,b,c));a.$z+=g;Ep(a,b+1,c);Gp(a,g);Kp(a,e,b);c=a.xg;null===c?c=new K(Lp):c.clear();c.ce(e.vertexes);c.sort(function(a,b){return null===a||null===b||a===b?0:b.$f-a.$f});for(e=c.j;e.next();)Mp(a,e.value,b);a.Mh=d}}
- function Ip(a,b){u&&w.o(b,Cp,"hasClusters:level");if(10<b||3>a.network.vertexes.count)return!1;null===a.xg?a.xg=new K(Lp):a.xg.clear();a.xg.ce(a.network.vertexes);var c=a.xg;c.sort(function(a,b){return null===a||null===b||a===b?0:b.$f-a.$f});for(var d=c.count-1;0<=d&&1>=c.ma(d).$f;)d--;return 1<c.count-d}
- function Jp(a,b){u&&w.o(b,Cp,"pushSubNetwork:level");for(var c=a.network,d=new Dp,e=a.xg.j;e.next();){var g=e.value;if(1<g.$f){d.el(g);var h=new Np;h.vx=g.$f;h.yx=g.width;h.ux=g.height;h.QA=g.P.x;h.RA=g.P.y;null===g.xh&&(g.xh=new K(Np));g.xh.add(h);g.xA=g.xh.count-1}else break}for(var k=c.edges.j;k.next();)if(e=k.value,e.fromVertex.network===d&&e.toVertex.network===d)d.Eo(e);else if(e.fromVertex.network===d){var l=e.fromVertex.Nm;null===l&&(l=new K(Lp),e.fromVertex.Nm=l);l.add(e.toVertex);e.fromVertex.$f--;
- e.fromVertex.jk+=e.toVertex.jk}else e.toVertex.network===d&&(l=e.toVertex.Nm,null===l&&(l=new K(Lp),e.toVertex.Nm=l),l.add(e.fromVertex),e.toVertex.$f--,e.toVertex.jk+=e.fromVertex.jk);for(e=d.edges.j;e.next();)g=e.value,g.length*=Math.max(1,O.sqrt((g.fromVertex.jk+g.toVertex.jk)/(4*b+1)));for(e=d.vertexes.j;e.next();)if(g=e.value,l=g.Nm,null!==l&&0<l.count&&(h=g.xh.ma(g.xh.count-1),h=h.vx-g.$f,!(0>=h))){for(var m=0,n=0,p=l.count-h;p<l.count;p++){for(var q=l.ma(p),r=null,k=q.edges.j;k.next();){var s=
- k.value;if(s.zH(q)===g){r=s;break}}null!==r&&(n+=r.length,m+=q.width*q.height)}l=g.ra;k=g.Da;p=g.width;q=g.height;r=g.P;s=p*q;1>s&&(s=1);m=O.sqrt((m+s+n*n*4/(h*h))/s);h=(m-1)*p/2;m=(m-1)*q/2;g.ub=new x(l-r.x-h,k-r.y-m,p+2*h,q+2*m);g.focus=new I(r.x+h,r.y+m)}a.network=d;return c}
- function Kp(a,b,c){u&&(w.k(b,Dp,Cp,"popNetwork:oldnet"),w.o(c,Cp,"popNetwork:level"));for(c=a.network.vertexes.j;c.next();){var d=c.value;d.network=b;if(null!==d.xh){var e=d.xh.ma(d.xA);d.$f=e.vx;var g=e.QA,h=e.RA;d.ub=new x(d.ra-g,d.Da-h,e.yx,e.ux);d.focus=new I(g,h);d.xA--}}for(c=a.network.edges.j;c.next();)c.value.network=b;a.network=b}
- function Mp(a,b,c){u&&(w.k(b,Lp,Cp,"surroundNode:oldnet"),w.o(c,Cp,"surroundNode:level"));var d=b.Nm;if(null!==d&&0!==d.count){c=b.ra;var e=b.Da,g=b.width,h=b.height;null!==b.xh&&0<b.xh.count&&(h=b.xh.ma(0),g=h.yx,h=h.ux);for(var g=O.sqrt(g*g+h*h)/2,k=!1,l=h=0,m=0,n=b.vertexes.j;n.next();){var p=n.value;1>=p.$f?l++:(k=!0,m++,h+=Math.atan2(b.Da-p.Da,b.ra-p.ra))}if(0!==l)for(0<m&&(h/=m),m=b=0,b=k?2*Math.PI/(l+1):2*Math.PI/l,0===l%2&&(m=b/2),1<d.count&&d.sort(function(a,b){return null===a||null===b||
- a===b?0:b.width*b.height-a.width*a.height}),k=0===l%2?0:1,d=d.j;d.next();)if(l=d.value,!(1<l.$f||a.isFixed(l))){n=null;for(p=l.edges.j;p.next();){n=p.value;break}var p=l.width,q=l.height,p=O.sqrt(p*p+q*q)/2,n=g+n.length+p,p=h+(b*(k/2>>1)+m)*(0===k%2?1:-1);l.ra=c+n*Math.cos(p);l.Da=e+n*Math.sin(p);k++}}}
- function Fp(a,b,c,d,e,g,h){var k=9E19,l=-1,m=0;a:for(;m<b;m++){var n=a[m],p=n.x-c,q=n.y-d,p=p*p+q*q;if(p<k){for(q=m-1;0<=q;q--)if(a[q].y>n.y&&a[q].x-n.x<e+h.width)continue a;for(q=m+1;q<b;q++)if(a[q].x>n.x&&a[q].y-n.y<g+h.height)continue a;l=m;k=p}}return l}Cp.prototype.mz=function(){if(this.comments)for(var a=this.network.vertexes.j;a.next();)this.addComments(a.value)};
- Cp.prototype.addComments=function(a){var b=a.Kc;if(null!==b)for(b=b.ZD();b.next();){var c=b.value;if("Comment"===c.Tc&&c.Na()){var d=this.network.Wm(c);null===d&&(d=this.network.ys(c));d.charge=this.YG;for(var c=null,e=d.hc;e.next();){var g=e.value;if(g.toVertex===a){c=g;break}}if(null===c)for(e=d.sc;e.next();)if(g=e.value,g.fromVertex===a){c=g;break}null===c&&(c=this.network.jp(a,d,null));c.length=this.ZG}}};
- function Tp(a,b){u&&(w.k(a,Lp,Cp,"getNodeDistance:vertexA"),w.k(b,Lp,Cp,"getNodeDistance:vertexB"));var c=a.ea,d=c.x,e=c.y,g=c.width,c=c.height,h=b.ea,k=h.x,l=h.y,m=h.width,h=h.height;return d+g<k?e>l+h?(d=d+g-k,e=e-l-h,O.sqrt(d*d+e*e)):e+c<l?(d=d+g-k,e=e+c-l,O.sqrt(d*d+e*e)):k-(d+g):d>k+m?e>l+h?(d=d-k-m,e=e-l-h,O.sqrt(d*d+e*e)):e+c<l?(d=d-k-m,e=e+c-l,O.sqrt(d*d+e*e)):d-(k+m):e>l+h?e-(l+h):e+c<l?l-(e+c):.1}
- function Gp(a,b){u&&w.o(b,Cp,"performIterations:num");a.xg=null;for(var c=a.Qq+b;a.Qq<c&&(a.Qq++,Xp(a)););a.xg=null}
- function Xp(a){null===a.xg&&(a.xg=new K(Lp),a.xg.ce(a.network.vertexes));var b=a.xg.p;if(0>=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.ra,e=d,g=c.Da,h=g,c=1;c<b.length;c++){var k=b[c];k.forceX=0;k.forceY=0;var l=k.ra,k=k.Da,d=Math.min(d,l),e=Math.max(e,l),g=Math.min(g,k),h=Math.max(h,k)}(g=e-d>h-g)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.ra-b.ra}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.Da-b.Da});for(var h=a.Mh,m=0,n=0,p=0,c=0;c<b.length;c++){var k=
- b[c],l=k.ea,q=k.P,d=l.x+q.x,l=l.y+q.y,n=k.charge*a.electricalFieldX(d,l),p=k.charge*a.electricalFieldY(d,l),n=n+k.mass*a.gravitationalFieldX(d,l),p=p+k.mass*a.gravitationalFieldY(d,l);k.forceX+=n;k.forceY+=p;for(q=c+1;q<b.length;q++)if(e=b[q],e!==k){var r=e.ea,n=e.P,p=r.x+n.x,r=r.y+n.y;if(d-p>h||p-d>h){if(g)break}else if(l-r>h||r-l>h){if(!g)break}else{var s=Tp(k,e);1>s?(n=a.Xw,null===n&&(a.Xw=n=new Na(0)),m=n.random(),s=n.random(),d>p?(n=Math.abs(e.ea.right-k.ea.x),n=(1+n)*m):d<p?(n=Math.abs(e.ea.x-
- k.ea.right),n=-(1+n)*m):(n=Math.max(e.width,k.width),n=(1+n)*m-n/2),l>r?(p=Math.abs(e.ea.bottom-k.ea.y),p=(1+p)*s):d<p?(p=Math.abs(e.ea.y-k.ea.bottom),p=-(1+p)*s):(p=Math.max(e.height,k.height),p=(1+p)*s-p/2)):(m=-(k.charge*e.charge)/(s*s),n=(p-d)/s*m,p=(r-l)/s*m);k.forceX+=n;k.forceY+=p;e.forceX-=n;e.forceY-=p}}}for(c=a.network.edges.j;c.next();)g=c.value,k=g.fromVertex,e=g.toVertex,l=k.ea,q=k.P,d=l.x+q.x,l=l.y+q.y,r=e.ea,n=e.P,p=r.x+n.x,r=r.y+n.y,s=Tp(k,e),1>s?(n=a.Xw,null===n&&(a.Xw=n=new Na(0)),
- m=n.random(),s=n.random(),n=(d>p?1:-1)*(1+(e.width>k.width)?e.width:k.width)*m,p=(l>r?1:-1)*(1+(e.height>k.height)?e.height:k.height)*s):(m=g.stiffness*(s-g.length),n=(p-d)/s*m,p=(r-l)/s*m),k.forceX+=n,k.forceY+=p,e.forceX-=n,e.forceY-=p;c=0;d=Math.max(a.Mh/20,50);for(e=0;e<b.length;e++)k=b[e],a.isFixed(k)?a.moveFixedVertex(k):(g=k.forceX,h=k.forceY,g<-d?g=-d:g>d&&(g=d),h<-d?h=-d:h>d&&(h=d),k.ra+=g,k.Da+=h,c=Math.max(c,g*g+h*h));return c>a.WD*a.WD}Cp.prototype.moveFixedVertex=function(){};
- Cp.prototype.commitLayout=function(){this.BA();this.commitNodes();this.it&&this.commitLinks()};Cp.prototype.BA=function(){if(this.Dp)for(var a=this.network.edges.j;a.next();){var b=a.value.link;null!==b&&(b.Cb=Pc,b.Eb=Pc)}};Cp.prototype.commitNodes=function(){var a=0,b=0;if(this.CG){var c=w.eg();this.zg(this.network,c);b=this.de;a=b.x-c.x;b=b.y-c.y;w.qc(c)}for(var c=w.eg(),d=this.network.vertexes.j;d.next();){var e=d.value;if(0!==a||0!==b)c.assign(e.ub),c.x+=a,c.y+=b,e.ub=c;e.commit()}w.qc(c)};
- Cp.prototype.commitLinks=function(){for(var a=this.network.edges.j;a.next();)a.value.commit()};Cp.prototype.springStiffness=function(a){a=a.stiffness;return isNaN(a)?this.In:a};Cp.prototype.springLength=function(a){a=a.length;return isNaN(a)?this.Hn:a};Cp.prototype.electricalCharge=function(a){a=a.charge;return isNaN(a)?this.En:a};Cp.prototype.electricalFieldX=function(){return 0};Cp.prototype.electricalFieldY=function(){return 0};
- Cp.prototype.gravitationalMass=function(a){a=a.mass;return isNaN(a)?this.Gn:a};Cp.prototype.gravitationalFieldX=function(){return 0};Cp.prototype.gravitationalFieldY=function(){return 0};Cp.prototype.isFixed=function(a){return a.isFixed};w.w(Cp,{SJ:"currentIteration"},function(){return this.Qq});w.defineProperty(Cp,{pD:"arrangementSpacing"},function(){return this.gg},function(a){w.k(a,pa,Cp,"arrangementSpacing");this.gg.N(a)||(this.gg.assign(a),this.K())});
- w.defineProperty(Cp,{CG:"arrangesToOrigin"},function(){return this.Tp},function(a){this.Tp!==a&&(w.g(a,"boolean",Cp,"arrangesToOrigin"),this.Tp=a,this.K())});w.defineProperty(Cp,{Dp:"setsPortSpots"},function(){return this.Th},function(a){this.Th!==a&&(w.g(a,"boolean",Cp,"setsPortSpots"),this.Th=a,this.K())});w.defineProperty(Cp,{comments:"comments"},function(){return this.Dh},function(a){this.Dh!==a&&(w.g(a,"boolean",Cp,"comments"),this.Dh=a,this.K())});
- w.defineProperty(Cp,{$z:"maxIterations"},function(){return this.mo},function(a){this.mo!==a&&(w.g(a,"number",Cp,"maxIterations"),0<=a&&(this.mo=a,this.K()))});w.defineProperty(Cp,{WD:"epsilonDistance"},function(){return this.pq},function(a){this.pq!==a&&(w.g(a,"number",Cp,"epsilonDistance"),0<a&&(this.pq=a,this.K()))});w.defineProperty(Cp,{qK:"infinityDistance"},function(){return this.Mh},function(a){this.Mh!==a&&(w.g(a,"number",Cp,"infinityDistance"),1<a&&(this.Mh=a,this.K()))});
- w.defineProperty(Cp,{Xw:"randomNumberGenerator"},function(){return this.Gr},function(a){this.Gr!==a&&(null!==a&&"function"!==typeof a.random&&w.l('ForceDirectedLayout.randomNumberGenerator must have a "random()" function on it: '+a),this.Gr=a)});w.defineProperty(Cp,{eK:"defaultSpringStiffness"},function(){return this.In},function(a){this.In!==a&&(w.g(a,"number",Cp,"defaultSpringStiffness"),this.In=a,this.K())});
- w.defineProperty(Cp,{dK:"defaultSpringLength"},function(){return this.Hn},function(a){this.Hn!==a&&(w.g(a,"number",Cp,"defaultSpringLength"),this.Hn=a,this.K())});w.defineProperty(Cp,{YJ:"defaultElectricalCharge"},function(){return this.En},function(a){this.En!==a&&(w.g(a,"number",Cp,"defaultElectricalCharge"),this.En=a,this.K())});w.defineProperty(Cp,{ZJ:"defaultGravitationalMass"},function(){return this.Gn},function(a){this.Gn!==a&&(w.g(a,"number",Cp,"defaultGravitationalMass"),this.Gn=a,this.K())});
- w.defineProperty(Cp,{ZG:"defaultCommentSpringLength"},function(){return this.jq},function(a){this.jq!==a&&(w.g(a,"number",Cp,"defaultCommentSpringLength"),this.jq=a,this.K())});w.defineProperty(Cp,{YG:"defaultCommentElectricalCharge"},function(){return this.iq},function(a){this.iq!==a&&(w.g(a,"number",Cp,"defaultCommentElectricalCharge"),this.iq=a,this.K())});function Np(){this.RA=this.QA=this.ux=this.yx=this.vx=0}function Dp(){Da.call(this)}w.Pa(Dp,Da);w.la("ForceDirectedNetwork",Dp);
- Dp.prototype.createVertex=function(){return new Lp};Dp.prototype.createEdge=function(){return new Yp};function Lp(){Ga.call(this);this.isFixed=!1;this.mass=this.charge=NaN;this.jk=this.$f=this.forceY=this.forceX=0;this.xh=this.Nm=null;this.xA=0}w.Pa(Lp,Ga);w.la("ForceDirectedVertex",Lp);function Yp(){Ia.call(this);this.length=this.stiffness=NaN}w.Pa(Yp,Ia);w.la("ForceDirectedEdge",Yp);
- function cm(){0<arguments.length&&w.cd(cm);Ve.call(this);this.Gd=this.jm=25;this.qa=0;this.Dn=Zp;this.ko=$p;this.Yn=aq;this.gm=4;this.tn=bq;this.Ci=cq;this.Th=!0;this.xj=4;this.Mb=this.bv=this.sb=-1;this.Jf=this.gr=0;this.Sb=this.If=this.og=this.Zg=this.Xd=null;this.nr=0;this.mr=this.lm=null;this.pg=0;this.or=null;this.bh=[];this.bh.length=100}w.Pa(cm,Ve);w.la("LayeredDigraphLayout",cm);
- cm.prototype.cloneProtected=function(a){Ve.prototype.cloneProtected.call(this,a);a.jm=this.jm;a.Gd=this.Gd;a.qa=this.qa;a.Dn=this.Dn;a.ko=this.ko;a.Yn=this.Yn;a.gm=this.gm;a.tn=this.tn;a.Ci=this.Ci;a.Th=this.Th;a.xj=this.xj};cm.prototype.createNetwork=function(){return new dq};
- cm.prototype.doLayout=function(a){null===a&&w.l("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");null===this.network&&(this.network=this.makeNetwork(a));this.de=this.initialOrigin(this.de);this.bv=-1;this.Jf=this.gr=0;this.or=this.mr=this.lm=null;for(a=0;a<this.bh.length;a++)this.bh[a]=null;if(0<this.network.vertexes.count){this.network.lw();for(a=this.network.edges.j;a.next();)a.value.rev=!1;switch(this.Dn){default:case eq:var b=0,c=this.network.vertexes.count-
- 1;a=[];a.length=c+1;for(var d=this.network.vertexes.j;d.next();)d.value.valid=!0;for(;null!==fq(this.network);){for(d=gq(this.network);null!==d;)a[c]=d,c--,d.valid=!1,d=gq(this.network);for(d=hq(this.network);null!==d;)a[b]=d,b++,d.valid=!1,d=hq(this.network);for(var d=null,e=0,g=this.network.vertexes.j;g.next();){var h=g.value;if(h.valid){for(var k=0,l=h.hc;l.next();)l.value.toVertex.valid&&k++;for(var l=0,m=h.sc;m.next();)m.value.fromVertex.valid&&l++;if(null===d||e<k-l)d=h,e=k-l}}null!==d&&(a[b]=
- d,b++,d.valid=!1)}for(b=0;b<this.network.vertexes.count;b++)a[b].index=b;for(a=this.network.edges.j;a.next();)b=a.value,b.fromVertex.index>b.toVertex.index&&(this.network.Yw(b),b.rev=!0);break;case Zp:for(b=this.network.vertexes.j;b.next();)a=b.value,a.Qo=-1,a.finish=-1;for(a=this.network.edges.j;a.next();)a.value.forest=!1;this.nr=0;for(b.reset();b.next();)c=b.value,0===c.sc.count&&iq(this,c);for(b.reset();b.next();)c=b.value,-1===c.Qo&&iq(this,c);for(a.reset();a.next();)b=a.value,b.forest||(c=b.fromVertex,
- d=c.finish,e=b.toVertex,g=e.finish,e.Qo<c.Qo&&d<g&&(this.network.Yw(b),b.rev=!0))}for(a=this.network.vertexes.j;a.next();)a.value.layer=-1;this.sb=-1;this.assignLayers();for(a.reset();a.next();)this.sb=Math.max(this.sb,a.value.layer);a=[];for(c=this.network.edges.j;c.next();)b=c.value,b.valid=!1,a.push(b);for(c=0;c<a.length;c++)if(b=a[c],!b.valid&&(null!==b.fromVertex.xd&&null!==b.toVertex.xd||b.fromVertex.layer!==b.toVertex.layer)){l=h=k=g=0;e=b.fromVertex;d=b.toVertex;if(null!==b.link){k=b.link;
- if(null===k)continue;var n=e.xd,g=d.xd;if(null===n||null===g)continue;var p=k.aa,h=k.fa,q=k.nd,l=k.Wd;b.rev&&(k=p,m=q,p=h,q=l,h=k,l=m);var r=e.P,k=b.toVertex.P,s=b.rev?d.ea:e.ea,m=w.O();s.J()?(Vn(p,q,ac,m),m.J()||m.assign(r)):m.assign(r);n!==p&&s.J()&&p.Na()&&(n=e.ea,n.J()&&(m.x+=s.x-n.x,m.y+=s.y-n.y));p=b.rev?e.ea:d.ea;n=w.O();p.J()?(Vn(h,l,ac,n),n.J()||n.assign(k)):n.assign(k);g!==h&&p.J()&&h.Na()&&(g=d.ea,g.J()&&(n.x+=p.x-g.x,n.y+=p.y-g.y));90===this.qa||270===this.qa?(g=Math.round((m.x-r.x)/this.Gd),
- h=m.x,k=Math.round((n.x-k.x)/this.Gd),l=n.x):(g=Math.round((m.y-r.y)/this.Gd),h=m.y,k=Math.round((n.y-k.y)/this.Gd),l=n.y);w.A(m);w.A(n);b.portFromColOffset=g;b.portFromPos=h;b.portToColOffset=k;b.portToPos=l}else b.portFromColOffset=0,b.portFromPos=0,b.portToColOffset=0,b.portToPos=0;m=e.layer;r=d.layer;n=b;p=0;s=n.link;if(null!==s){var t=s.nd,v=s.Wd;if(null!==t&&null!==v){var y=s.aa,q=s.fa;if(null!==y&&null!==q){var B=t.Cb,A=v.Eb;this.Dp||(s.Cb.Uc()||(B=s.Cb),s.Eb.Uc()||(A=s.Eb));if(B.Uc()||B===
- Pb)B=jq(this,!0);if(A.Uc()||A===Pb)A=jq(this,!1);var E=s.jc,N=s.getLinkPoint(y,t,B,!0,E,q,v,w.O()),B=s.getLinkDirection(y,t,N,B,!0,E,q,v);w.A(N);B===kq(this,n,!0)?p+=1:this.Dp&&null!==y&&1===y.ports.count&&n.rev&&(p+=1);N=s.getLinkPoint(q,v,A,!1,E,y,t,w.O());s=s.getLinkDirection(q,v,N,A,!1,E,y,t);w.A(N);s===kq(this,n,!1)?p+=2:this.Dp&&null!==q&&1===q.ports.count&&n.rev&&(p+=2)}}}n=1===p||3===p?!0:!1;if(p=2===p||3===p?!0:!1)q=this.network.createVertex(),q.xd=null,q.Km=1,q.layer=m,q.near=e,this.network.el(q),
- e=this.network.jp(e,q,b.link),e.valid=!1,e.rev=b.rev,e.portFromColOffset=g,e.portToColOffset=0,e.portFromPos=h,e.portToPos=0,e=q;s=1;n&&s--;if(m-r>s&&0<m){b.valid=!1;q=this.network.createVertex();q.xd=null;q.Km=2;q.layer=m-1;this.network.el(q);e=this.network.jp(e,q,b.link);e.valid=!0;e.rev=b.rev;e.portFromColOffset=p?0:g;e.portToColOffset=0;e.portFromPos=p?0:h;e.portToPos=0;e=q;for(m--;m-r>s&&0<m;)q=this.network.createVertex(),q.xd=null,q.Km=3,q.layer=m-1,this.network.el(q),e=this.network.jp(e,q,
- b.link),e.valid=!0,e.rev=b.rev,e.portFromColOffset=0,e.portToColOffset=0,e.portFromPos=0,e.portToPos=0,e=q,m--;e=this.network.jp(q,d,b.link);e.valid=!n;n&&(q.near=d);e.rev=b.rev;e.portFromColOffset=0;e.portToColOffset=k;e.portFromPos=0;e.portToPos=l}else b.valid=!0}b=this.Xd=[];for(c=0;c<=this.sb;c++)b[c]=0;for(a=this.network.vertexes.j;a.next();)c=a.value,c.index=-1;this.initializeIndices();this.bv=-1;for(c=this.Jf=this.gr=0;c<=this.sb;c++)b[c]>b[this.Jf]&&(this.bv=b[c]-1,this.Jf=c),b[c]<b[this.gr]&&
- (this.gr=c);this.or=[];for(c=0;c<b.length;c++)this.or[c]=[];for(a.reset();a.next();)b=a.value,c=this.or[b.layer],c[b.index]=b;this.Mb=-1;for(a=0;a<=this.sb;a++){b=lq(this,a);c=0;d=this.Xd[a];for(e=0;e<d;e++)g=b[e],c+=this.nodeMinColumnSpace(g,!0),g.column=c,c+=1,c+=this.nodeMinColumnSpace(g,!1);this.Mb=Math.max(this.Mb,c-1);mq(this,a,b)}this.reduceCrossings();this.straightenAndPack();this.updateParts()}this.network=null;this.Cf=!0};
- cm.prototype.linkMinLength=function(a){var b=a.toVertex,c=0;for(a=a.fromVertex.hc;a.next();)a.value.toVertex===b&&c++;return 1<c?2:1};function nq(a){var b=a.fromVertex.xd;a=a.toVertex.xd;return null===b&&null===a?8:null===b||null===a?4:1}cm.prototype.nodeMinLayerSpace=function(a,b){return null===a.xd?0:90===this.qa||270===this.qa?b?a.P.y+10:a.ea.height-a.P.y+10:b?a.P.x+10:a.ea.width-a.P.x+10};
- cm.prototype.nodeMinColumnSpace=function(a,b){if(null===a.xd)return 0;var c=b?a.iA:a.hA;if(null!==c)return c;c=this.qa;return 90===c||270===c?b?a.iA=a.P.x/this.Gd+1|0:a.hA=(a.ea.width-a.P.x)/this.Gd+1|0:b?a.iA=a.P.y/this.Gd+1|0:a.hA=(a.ea.height-a.P.y)/this.Gd+1|0};function oq(a){null===a.lm&&(a.lm=[]);for(var b=0,c=a.network.vertexes.j;c.next();){var d=c.value;a.lm[b]=d.layer;b++;a.lm[b]=d.column;b++;a.lm[b]=d.index;b++}return a.lm}
- function pq(a,b){for(var c=0,d=a.network.vertexes.j;d.next();){var e=d.value;e.layer=b[c];c++;e.column=b[c];c++;e.index=b[c];c++}}
- function qq(a,b,c){u&&(w.o(b,cm,"crossingMatrix:unfixedLayer"),w.o(c,cm,"crossingMatrix:direction"));var d=lq(a,b),e=a.Xd[b];if(null===a.mr||a.mr.length<e*e)a.mr=[];for(var g=a.mr,h=0;h<e;h++){var k=0,l=d[h],m=l.near,n=0;if(null!==m&&m.layer===l.layer)if(n=m.index,n>h)for(var p=h+1;p<n;p++)l=d[p],l.near===m&&l.Km===m.Km||k++;else for(p=h-1;p>n;p--)l=d[p],l.near===m&&l.Km===m.Km||k++;var m=0,q,r=q=p=l=0,s,t=0,v=0;s=0;var y;if(0<=c)for(n=d[h].Re,m=0;m<n.count;m++)if(q=n.p[m],q.valid&&q.fromVertex.layer!==
- b)for(l=q.fromVertex.index,p=q.portToPos,q=q.portFromPos,r=m+1;r<n.count;r++)s=n.p[r],s.valid&&s.fromVertex.layer!==b&&(t=s.fromVertex.index,v=s.portToPos,s=s.portFromPos,p<v&&(l>t||l===t&&q>s)&&k++,v<p&&(t>l||t===l&&s>q)&&k++);if(0>=c)for(n=d[h].Le,m=0;m<n.count;m++)if(q=n.p[m],q.valid&&q.toVertex.layer!==b)for(l=q.toVertex.index,p=q.portToPos,q=q.portFromPos,r=m+1;r<n.count;r++)s=n.p[r],s.valid&&s.toVertex.layer!==b&&(t=s.toVertex.index,v=s.portToPos,s=s.portFromPos,q<s&&(l>t||l===t&&p>v)&&k++,
- s<q&&(t>l||t===l&&v>p)&&k++);g[h*e+h]=k;for(n=h+1;n<e;n++){var B=0,A=0;if(0<=c)for(k=d[h].Re,y=d[n].Re,m=0;m<k.count;m++)if(q=k.p[m],q.valid&&q.fromVertex.layer!==b)for(l=q.fromVertex.index,q=q.portFromPos,r=0;r<y.count;r++)s=y.p[r],s.valid&&s.fromVertex.layer!==b&&(t=s.fromVertex.index,s=s.portFromPos,(l<t||l===t&&q<s)&&A++,(t<l||t===l&&s<q)&&B++);if(0>=c)for(k=d[h].Le,y=d[n].Le,m=0;m<k.count;m++)if(q=k.p[m],q.valid&&q.toVertex.layer!==b)for(l=q.toVertex.index,p=q.portToPos,r=0;r<y.count;r++)s=y.p[r],
- s.valid&&s.toVertex.layer!==b&&(t=s.toVertex.index,v=s.portToPos,(l<t||l===t&&p<v)&&A++,(t<l||t===l&&v<p)&&B++);g[h*e+n]=B;g[n*e+h]=A}}mq(a,b,d);return g}cm.prototype.countCrossings=function(){for(var a=0,b=0;b<=this.sb;b++)for(var c=qq(this,b,1),d=this.Xd[b],e=0;e<d;e++)for(var g=e;g<d;g++)a+=c[e*d+g];return a};
- function rq(a){for(var b=0,c=0;c<=a.sb;c++){for(var d=a,e=c,g=lq(d,e),h=d.Xd[e],k=0,l=0;l<h;l++){var m=null,m=g[l].Le,n,p=0,q=0;if(null!==m)for(var r=0;r<m.count;r++)n=m.p[r],n.valid&&n.toVertex.layer!==e&&(p=n.fromVertex.column+n.portFromColOffset,q=n.toVertex.column+n.portToColOffset,k+=(Math.abs(p-q)+1)*nq(n))}mq(d,e,g);b+=k}return b}
- cm.prototype.normalize=function(){var a=Infinity;this.Mb=-1;for(var b=this.network.vertexes.j;b.next();){var c=b.value,a=Math.min(a,c.column-this.nodeMinColumnSpace(c,!0));this.Mb=Math.max(this.Mb,c.column+this.nodeMinColumnSpace(c,!1))}for(b.reset();b.next();)b.value.column-=a;this.Mb-=a};
- function sq(a,b,c){u&&(w.o(b,cm,"barycenters:unfixedLayer"),w.o(c,cm,"barycenters:direction"));for(var d=lq(a,b),e=a.Xd[b],g=[],h=0;h<e;h++){var k=d[h],l=null;0>=c&&(l=k.Re);var m=null;0<=c&&(m=k.Le);var n=0,p=0,q=k.near;null!==q&&q.layer===k.layer&&(n+=q.column-1,p++);if(null!==l)for(q=0;q<l.count;q++){var k=l.p[q],r=k.fromVertex;k.valid&&!k.rev&&r.layer!==b&&(n+=r.column+k.portFromColOffset,p++)}if(null!==m)for(l=0;l<m.count;l++)k=m.p[l],q=k.toVertex,k.valid&&!k.rev&&q.layer!==b&&(n+=q.column+k.portToColOffset,
- p++);g[h]=0===p?-1:n/p}mq(a,b,d);return g}
- function tq(a,b,c){u&&(w.o(b,cm,"medians:unfixedLayer"),w.o(c,cm,"medians:direction"));for(var d=lq(a,b),e=a.Xd[b],g=[],h=0;h<e;h++){var k=d[h],l=null;0>=c&&(l=k.Re);var m=null;0<=c&&(m=k.Le);var n=0,p=[],q=k.near;null!==q&&q.layer===k.layer&&(p[n]=q.column-1,n++);if(null!==l)for(q=0;q<l.count;q++){var k=l.p[q],r=k.fromVertex;k.valid&&!k.rev&&r.layer!==b&&(p[n]=r.column+k.portFromColOffset,n++)}if(null!==m)for(l=0;l<m.count;l++)k=m.p[l],q=k.toVertex,k.valid&&!k.rev&&q.layer!==b&&(p[n]=q.column+k.portToColOffset,
- n++);0===n?g[h]=-1:(p.sort(function(a,b){return a-b}),m=n>>1,g[h]=n&1?p[m]:p[m-1]+p[m]>>1)}mq(a,b,d);return g}function uq(a,b,c,d,e,g){if(b.component===d){b.component=c;var h=0,k=0;if(e)for(var l=b.hc;l.next();){var k=l.value,m=k.toVertex,h=b.layer-m.layer,k=a.linkMinLength(k);h===k&&uq(a,m,c,d,e,g)}if(g)for(l=b.sc;l.next();)k=l.value,m=k.fromVertex,h=m.layer-b.layer,k=a.linkMinLength(k),h===k&&uq(a,m,c,d,e,g)}}
- function vq(a,b,c,d,e,g){if(b.component===d){b.component=c;if(e)for(var h=b.hc;h.next();)vq(a,h.value.toVertex,c,d,e,g);if(g)for(b=b.sc;b.next();)vq(a,b.value.fromVertex,c,d,e,g)}}function fq(a){for(a=a.vertexes.j;a.next();){var b=a.value;if(b.valid)return b}return null}function gq(a){for(a=a.vertexes.j;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.hc;d.next();)if(d.value.toVertex.valid){c=!1;break}if(c)return b}}return null}
- function hq(a){for(a=a.vertexes.j;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.sc;d.next();)if(d.value.fromVertex.valid){c=!1;break}if(c)return b}}return null}function iq(a,b){b.Qo=a.nr;a.nr++;for(var c=b.hc;c.next();){var d=c.value,e=d.toVertex;-1===e.Qo&&(d.forest=!0,iq(a,e))}b.finish=a.nr;a.nr++}
- cm.prototype.assignLayers=function(){switch(this.ko){case wq:xq(this);break;case yq:for(var a=0,b=this.network.vertexes.j;b.next();)a=zq(this,b.value),this.sb=Math.max(a,this.sb);for(b.reset();b.next();)a=b.value,a.layer=this.sb-a.layer;break;default:case $p:xq(this);for(b=this.network.vertexes.j;b.next();)b.value.valid=!1;for(b.reset();b.next();)a=b.value,0===a.sc.count&&Aq(this,a);a=Infinity;for(b.reset();b.next();)a=Math.min(a,b.value.layer);this.sb=-1;for(b.reset();b.next();){var c=b.value;c.layer-=
- a;this.sb=Math.max(this.sb,c.layer)}}};function xq(a){for(var b=a.network.vertexes.j;b.next();){var c=Bq(a,b.value);a.sb=Math.max(c,a.sb)}}function Bq(a,b){var c=0;if(-1===b.layer){for(var d=b.hc;d.next();)var e=d.value,g=e.toVertex,e=a.linkMinLength(e),c=Math.max(c,Bq(a,g)+e);b.layer=c}else c=b.layer;return c}function zq(a,b){var c=0;if(-1===b.layer){for(var d=b.sc;d.next();)var e=d.value,g=e.fromVertex,e=a.linkMinLength(e),c=Math.max(c,zq(a,g)+e);b.layer=c}else c=b.layer;return c}
- function Aq(a,b){if(!b.valid){b.valid=!0;for(var c=b.hc;c.next();)Aq(a,c.value.toVertex);for(c=a.network.vertexes.j;c.next();)c.value.component=-1;for(var d=b.Re.p,e=d.length,g=0;g<e;g++){var h=d[g],k=a.linkMinLength(h);h.fromVertex.layer-h.toVertex.layer>k&&uq(a,h.fromVertex,0,-1,!0,!1)}for(uq(a,b,1,-1,!0,!0);0!==b.component;){for(var k=0,d=Infinity,l=0,m=null,n=a.network.vertexes.j;n.next();){var p=n.value;if(1===p.component){for(var q=0,r=!1,s=p.Re.p,e=s.length,g=0;g<e;g++){var h=s[g],t=h.fromVertex,
- q=q+1;1!==t.component&&(k+=1,t=t.layer-p.layer,h=a.linkMinLength(h),d=Math.min(d,t-h))}h=p.Le.p;e=h.length;for(g=0;g<e;g++)s=h[g].toVertex,q-=1,1!==s.component?k-=1:r=!0;(null===m||q<l)&&!r&&(m=p,l=q)}}if(0<k){for(c.reset();c.next();)e=c.value,1===e.component&&(e.layer+=d);b.component=0}else m.component=0}for(c=a.network.vertexes.j;c.next();)c.value.component=-1;for(uq(a,b,1,-1,!0,!1);0!==b.component;){g=0;e=Infinity;d=0;k=null;for(l=a.network.vertexes.j;l.next();)if(m=l.value,1===m.component){n=
- 0;p=!1;h=m.Re.p;q=h.length;for(r=0;r<q;r++)s=h[r].fromVertex,n+=1,1!==s.component?g+=1:p=!0;h=m.Le.p;q=h.length;for(r=0;r<q;r++)s=h[r],t=s.toVertex,n-=1,1!==t.component&&(g-=1,t=m.layer-t.layer,s=a.linkMinLength(s),e=Math.min(e,t-s));(null===k||n>d)&&!p&&(k=m,d=n)}if(0>g){for(c.reset();c.next();)g=c.value,1===g.component&&(g.layer-=e);b.component=0}else k.component=0}}}
- function kq(a,b,c){return 90===a.qa?c&&!b.rev||!c&&b.rev?270:90:180===a.qa?c&&!b.rev||!c&&b.rev?0:180:270===a.qa?c&&!b.rev||!c&&b.rev?90:270:c&&!b.rev||!c&&b.rev?180:0}
- cm.prototype.initializeIndices=function(){switch(this.Yn){default:case Cq:for(var a=this.network.vertexes.j;a.next();){var b=a.value,c=b.layer;b.index=this.Xd[c];this.Xd[c]++}break;case aq:a=this.network.vertexes.j;for(b=this.sb;0<=b;b--)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&Dq(this,c);break;case Eq:for(a=this.network.vertexes.j,b=0;b<=this.sb;b++)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&Fq(this,c)}};
- function Dq(a,b){var c=b.layer;b.index=a.Xd[c];a.Xd[c]++;for(var c=b.Le.Te(),d=!0;d;)for(var d=!1,e=0;e<c.length-1;e++){var g=c[e],h=c[e+1];g.portFromColOffset>h.portFromColOffset&&(d=!0,c[e]=h,c[e+1]=g)}for(e=0;e<c.length;e++)d=c[e],d.valid&&(d=d.toVertex,-1===d.index&&Dq(a,d))}
- function Fq(a,b){var c=b.layer;b.index=a.Xd[c];a.Xd[c]++;for(var c=b.Re.Te(),d=!0,e=0;d;)for(d=!1,e=0;e<c.length-1;e++){var g=c[e],h=c[e+1];g.portToColOffset>h.portToColOffset&&(d=!0,c[e]=h,c[e+1]=g)}for(e=0;e<c.length;e++)d=c[e],d.valid&&(d=d.fromVertex,-1===d.index&&Fq(a,d))}
- cm.prototype.reduceCrossings=function(){for(var a=this.countCrossings(),b=oq(this),c=0,d=0,e=0,c=0;c<this.gm;c++){for(d=0;d<=this.sb;d++)Gq(this,d,1),Hq(this,d,1);e=this.countCrossings();e<a&&(a=e,b=oq(this));for(d=this.sb;0<=d;d--)Gq(this,d,-1),Hq(this,d,-1);e=this.countCrossings();e<a&&(a=e,b=oq(this))}pq(this,b);for(c=0;c<this.gm;c++){for(d=0;d<=this.sb;d++)Gq(this,d,0),Hq(this,d,0);e=this.countCrossings();e<a&&(a=e,b=oq(this));for(d=this.sb;0<=d;d--)Gq(this,d,0),Hq(this,d,0);e=this.countCrossings();
- e<a&&(a=e,b=oq(this))}pq(this,b);var g=!1,h=c=0,k=0,d=0;switch(this.tn){case Iq:break;case Jq:for(k=a+1;(d=this.countCrossings())<k;)for(k=d,c=this.sb;0<=c;c--)for(h=0;h<=c;h++){for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=Hq(this,d,-1)||g;e=this.countCrossings();e>=a?pq(this,b):(a=e,b=oq(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=Hq(this,d,1)||g;e=this.countCrossings();e>=a?pq(this,b):(a=e,b=oq(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=Hq(this,d,1)||g;e>=a?pq(this,b):(a=e,b=oq(this));for(g=!0;g;)for(g=!1,
- d=h;d<=c;d++)g=Hq(this,d,-1)||g;e>=a?pq(this,b):(a=e,b=oq(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=Hq(this,d,0)||g;e>=a?pq(this,b):(a=e,b=oq(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=Hq(this,d,0)||g;e>=a?pq(this,b):(a=e,b=oq(this))}break;default:case bq:for(c=this.sb,h=0,k=a+1;(d=this.countCrossings())<k;){k=d;for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=Hq(this,d,-1)||g;e=this.countCrossings();e>=a?pq(this,b):(a=e,b=oq(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=Hq(this,d,1)||g;e=this.countCrossings();
- e>=a?pq(this,b):(a=e,b=oq(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=Hq(this,d,1)||g;e>=a?pq(this,b):(a=e,b=oq(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=Hq(this,d,-1)||g;e>=a?pq(this,b):(a=e,b=oq(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=Hq(this,d,0)||g;e>=a?pq(this,b):(a=e,b=oq(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=Hq(this,d,0)||g;e>=a?pq(this,b):(a=e,b=oq(this))}}pq(this,b)};
- function Gq(a,b,c){u&&(w.o(b,cm,"medianBarycenterCrossingReduction:unfixedLayer"),w.o(c,cm,"medianBarycenterCrossingReduction:direction"));var d=0,e=lq(a,b),g=a.Xd[b],h=tq(a,b,c);c=sq(a,b,c);for(d=0;d<g;d++)-1===c[d]&&(c[d]=e[d].column),-1===h[d]&&(h[d]=e[d].column);for(var k=!0,l;k;)for(k=!1,d=0;d<g-1;d++)if(h[d+1]<h[d]||h[d+1]===h[d]&&c[d+1]<c[d])k=!0,l=h[d],h[d]=h[d+1],h[d+1]=l,l=c[d],c[d]=c[d+1],c[d+1]=l,l=e[d],e[d]=e[d+1],e[d+1]=l;for(d=h=0;d<g;d++)l=e[d],l.index=d,h+=a.nodeMinColumnSpace(l,
- !0),l.column=h,h+=1,h+=a.nodeMinColumnSpace(l,!1);mq(a,b,e)}
- function Hq(a,b,c){var d=lq(a,b),e=a.Xd[b];c=qq(a,b,c);var g=0,h;h=[];for(g=0;g<e;g++)h[g]=-1;var k;k=[];for(g=0;g<e;g++)k[g]=-1;for(var l=!1,m=!0;m;)for(m=!1,g=0;g<e-1;g++){var n=c[d[g].index*e+d[g+1].index],p=c[d[g+1].index*e+d[g].index],q=0,r=0,s=d[g].column,t=d[g+1].column,v=a.nodeMinColumnSpace(d[g],!0),y=a.nodeMinColumnSpace(d[g],!1),B=a.nodeMinColumnSpace(d[g+1],!0),A=a.nodeMinColumnSpace(d[g+1],!1),v=s-v+B,y=t-y+A,B=B=0,E=d[g].sc.j;for(E.reset();E.next();)if(A=E.value,A.valid&&A.fromVertex.layer===
- b){A=A.fromVertex;for(B=0;d[B]!==A;)B++;B<g&&(q+=2*(g-B),r+=2*(g+1-B));B===g+1&&(q+=1);B>g+1&&(q+=4*(B-g),r+=4*(B-(g+1)))}E=d[g].hc.j;for(E.reset();E.next();)if(A=E.value,A.valid&&A.toVertex.layer===b){A=A.toVertex;for(B=0;d[B]!==A;)B++;B===g+1&&(r+=1)}E=d[g+1].sc.j;for(E.reset();E.next();)if(A=E.value,A.valid&&A.fromVertex.layer===b){A=A.fromVertex;for(B=0;d[B]!==A;)B++;B<g&&(q+=2*(g+1-B),r+=2*(g-B));B===g&&(r+=1);B>g+1&&(q+=4*(B-(g+1)),r+=4*(B-g))}E=d[g+1].hc.j;for(E.reset();E.next();)if(A=E.value,
- A.valid&&A.toVertex.layer===b){A=A.toVertex;for(B=0;d[B]!==A;)B++;B===g&&(q+=1)}var B=A=0,E=h[d[g].index],N=k[d[g].index],J=h[d[g+1].index],W=k[d[g+1].index];-1!==E&&(A+=Math.abs(E-s),B+=Math.abs(E-y));-1!==N&&(A+=Math.abs(N-s),B+=Math.abs(N-y));-1!==J&&(A+=Math.abs(J-t),B+=Math.abs(J-v));-1!==W&&(A+=Math.abs(W-t),B+=Math.abs(W-v));if(r<q-.5||r===q&&p<n-.5||r===q&&p===n&&B<A-.5)m=l=!0,d[g].column=y,d[g+1].column=v,n=d[g],d[g]=d[g+1],d[g+1]=n}for(g=0;g<e;g++)d[g].index=g;mq(a,b,d);return l}
- cm.prototype.straightenAndPack=function(){var a=0,b=!1,c=0!==(this.Ci&Kq),a=this.Ci===cq;1E3<this.network.edges.count&&!a&&(c=!1);if(c){b=[];for(a=a=0;a<=this.sb;a++)b[a]=0;for(var d=0,e=this.network.vertexes.j;e.next();){var g=e.value,a=g.layer,d=g.column,g=this.nodeMinColumnSpace(g,!1);b[a]=Math.max(b[a],d+g)}for(e.reset();e.next();)g=e.value,a=g.layer,d=g.column,g.column=(8*(this.Mb-b[a])>>1)+8*d;this.Mb*=8}if(0!==(this.Ci&Lq))for(b=!0;b;){b=!1;for(a=this.Jf+1;a<=this.sb;a++)b=Mq(this,a,1)||b;
- for(a=this.Jf-1;0<=a;a--)b=Mq(this,a,-1)||b;b=Mq(this,this.Jf,0)||b}if(0!==(this.Ci&Nq)){for(a=this.Jf+1;a<=this.sb;a++)Oq(this,a,1);for(a=this.Jf-1;0<=a;a--)Oq(this,a,-1);Oq(this,this.Jf,0)}c&&(Pq(this,-1),Pq(this,1));if(0!==(this.Ci&Lq))for(b=!0;b;){b=!1;b=Mq(this,this.Jf,0)||b;for(a=this.Jf+1;a<=this.sb;a++)b=Mq(this,a,0)||b;for(a=this.Jf-1;0<=a;a--)b=Mq(this,a,0)||b}};
- function Mq(a,b,c){u&&(w.o(b,cm,"bendStraighten:unfixedLayer"),w.o(c,cm,"bendStraighten:direction"));for(var d=!1;Qq(a,b,c);)d=!0;return d}
- function Qq(a,b,c){u&&(w.o(b,cm,"shiftbendStraighten:unfixedLayer"),w.o(c,cm,"shiftbendStraighten:direction"));var d=0,e=lq(a,b),g=a.Xd[b],h=sq(a,b,-1);if(0<c)for(d=0;d<g;d++)h[d]=-1;var k=sq(a,b,1);if(0>c)for(d=0;d<g;d++)k[d]=-1;for(var l=!1,m=!0;m;)for(m=!1,d=0;d<g;d++){var n=e[d].column,p=a.nodeMinColumnSpace(e[d],!0),q=a.nodeMinColumnSpace(e[d],!1),r=0,r=0>d-1||n-e[d-1].column-1>p+a.nodeMinColumnSpace(e[d-1],!1)?n-1:n,p=0,p=d+1>=g||e[d+1].column-n-1>q+a.nodeMinColumnSpace(e[d+1],!0)?n+1:n,s=q=
- 0,t=0,v=0,y=0,B=0;if(0>=c)for(var A=e[d].sc.j;A.next();){var E=A.value;E.valid&&E.fromVertex.layer!==b&&(v=nq(E),y=E.portFromColOffset,B=E.portToColOffset,E=E.fromVertex.column,q+=(Math.abs(n+B-(E+y))+1)*v,s+=(Math.abs(r+B-(E+y))+1)*v,t+=(Math.abs(p+B-(E+y))+1)*v)}if(0<=c)for(A=e[d].hc.j;A.next();)E=A.value,E.valid&&E.toVertex.layer!==b&&(v=nq(E),y=E.portFromColOffset,B=E.portToColOffset,E=E.toVertex.column,q+=(Math.abs(n+y-(E+B))+1)*v,s+=(Math.abs(r+y-(E+B))+1)*v,t+=(Math.abs(p+y-(E+B))+1)*v);B=
- y=v=0;A=h[e[d].index];E=k[e[d].index];-1!==A&&(v+=Math.abs(A-n),y+=Math.abs(A-r),B+=Math.abs(A-p));-1!==E&&(v+=Math.abs(E-n),y+=Math.abs(E-r),B+=Math.abs(E-p));if(s<q||s===q&&y<v)m=l=!0,e[d].column=r;if(t<q||t===q&&B<v)m=l=!0,e[d].column=p}mq(a,b,e);a.normalize();return l}
- function Oq(a,b,c){u&&(w.o(b,cm,"medianStraighten:unfixedLayer"),w.o(c,cm,"medianStraighten:direction"));var d=0,e=lq(a,b),g=a.Xd[b],h=tq(a,b,c);c=[];for(d=0;d<g;d++)c[d]=h[d];for(h=!0;h;)for(h=!1,d=0;d<g;d++){var k=e[d].column,l=a.nodeMinColumnSpace(e[d],!0),m=a.nodeMinColumnSpace(e[d],!1),n=0,p=0,q=0,q=p=0;-1===c[d]?0===d&&d===g-1?n=k:0===d?(p=e[d+1].column,n=p-k===m+a.nodeMinColumnSpace(e[d+1],!0)?k-1:k):d===g-1?(q=e[d-1].column,n=k-q===l+a.nodeMinColumnSpace(e[d-1],!1)?k+1:k):(q=e[d-1].column,
- q=q+a.nodeMinColumnSpace(e[d-1],!1)+l+1,p=e[d+1].column,p=p-a.nodeMinColumnSpace(e[d+1],!0)-m-1,n=(q+p)/2|0):0===d&&d===g-1?n=c[d]:0===d?(p=e[d+1].column,p=p-a.nodeMinColumnSpace(e[d+1],!0)-m-1,n=Math.min(c[d],p)):d===g-1?(q=e[d-1].column,q=q+a.nodeMinColumnSpace(e[d-1],!1)+l+1,n=Math.max(c[d],q)):(q=e[d-1].column,q=q+a.nodeMinColumnSpace(e[d-1],!1)+l+1,p=e[d+1].column,p=p-a.nodeMinColumnSpace(e[d+1],!0)-m-1,q<c[d]&&c[d]<p?n=c[d]:q>=c[d]?n=q:p<=c[d]&&(n=p));n!==k&&(h=!0,e[d].column=n)}mq(a,b,e);a.normalize()}
- function Rq(a,b){u&&(w.o(b,cm,"packAux:column"),w.o(1,cm,"packAux:direction"));for(var c=!0,d=a.network.vertexes.j;d.next();){var e=d.value,g=a.nodeMinColumnSpace(e,!0),h=a.nodeMinColumnSpace(e,!1);if(e.column-g<=b&&e.column+h>=b){c=!1;break}}e=!1;if(c)for(d.reset();d.next();)c=d.value,c.column>b&&(c.column-=1,e=!0);return e}
- function Sq(a,b){u&&(w.o(b,cm,"tightPackAux:column"),w.o(1,cm,"tightPackAux:direction"));for(var c=b,c=b+1,d=0,e=[],g=[],d=0;d<=a.sb;d++)e[d]=!1,g[d]=!1;for(var h=a.network.vertexes.j;h.next();){var d=h.value,k=d.column-a.nodeMinColumnSpace(d,!0),l=d.column+a.nodeMinColumnSpace(d,!1);k<=b&&l>=b&&(e[d.layer]=!0);k<=c&&l>=c&&(g[d.layer]=!0)}k=!0;c=!1;for(d=0;d<=a.sb;d++)k=k&&!(e[d]&&g[d]);if(k)for(h.reset();h.next();)e=h.value,e.column>b&&(e.column-=1,c=!0);return c}
- function Pq(a,b){u&&w.o(b,cm,"componentPack:direction");for(var c=0;c<=a.Mb;c++)for(;Rq(a,c););a.normalize();for(c=0;c<a.Mb;c++)for(;Sq(a,c););a.normalize();var c=0,d,e=0,g=0,h=0;if(0<b)for(c=0;c<=a.Mb;c++)for(d=oq(a),e=rq(a),g=e+1;e<g;)g=e,Tq(a,c,1),h=rq(a),h>e?pq(a,d):h<e&&(e=h,d=oq(a));if(0>b)for(c=a.Mb;0<=c;c--)for(d=oq(a),e=rq(a),g=e+1;e<g;)g=e,Tq(a,c,-1),h=rq(a),h>e?pq(a,d):h<e&&(e=h,d=oq(a));a.normalize()}
- function Tq(a,b,c){a.pg=0;for(var d=a.network.vertexes.j;d.next();)d.value.component=-1;if(0<c)for(d.reset();d.next();){var e=d.value;e.column-a.nodeMinColumnSpace(e,!0)<=b&&(e.component=a.pg)}if(0>c)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.pg);a.pg++;for(d.reset();d.next();)b=d.value,-1===b.component&&(vq(a,b,a.pg,-1,!0,!0),a.pg++);var g=0;b=[];for(g=0;g<a.pg*a.pg;g++)b[g]=!1;e=[];for(g=0;g<(a.sb+1)*(a.Mb+1);g++)e[g]=-1;for(d.reset();d.next();)for(var g=
- d.value,h=g.layer,k=Math.max(0,g.column-a.nodeMinColumnSpace(g,!0)),l=Math.min(a.Mb,g.column+a.nodeMinColumnSpace(g,!1));k<=l;k++)e[h*(a.Mb+1)+k]=g.component;for(g=0;g<=a.sb;g++){if(0<c)for(k=0;k<a.Mb;k++)-1!==e[g*(a.Mb+1)+k]&&-1!==e[g*(a.Mb+1)+k+1]&&e[g*(a.Mb+1)+k]!==e[g*(a.Mb+1)+k+1]&&(b[e[g*(a.Mb+1)+k]*a.pg+e[g*(a.Mb+1)+k+1]]=!0);if(0>c)for(k=a.Mb;0<k;k--)-1!==e[g*(a.Mb+1)+k]&&-1!==e[g*(a.Mb+1)+k-1]&&e[g*(a.Mb+1)+k]!==e[g*(a.Mb+1)+k-1]&&(b[e[g*(a.Mb+1)+k]*a.pg+e[g*(a.Mb+1)+k-1]]=!0)}e=[];for(g=
- 0;g<a.pg;g++)e[g]=!0;h=new K("number");h.add(0);for(l=0;0!==h.count;)if(l=h.p[h.count-1],h.ud(h.count-1),e[l])for(e[l]=!1,g=0;g<a.pg;g++)b[l*a.pg+g]&&h.ie(0,g);if(0<c)for(d.reset();d.next();)a=d.value,e[a.component]&&(a.column-=1);if(0>c)for(d.reset();d.next();)c=d.value,e[c.component]&&(c.column+=1)}
- cm.prototype.commitLayout=function(){if(this.Dp)for(var a=jq(this,!0),b=jq(this,!1),c=this.network.edges.j;c.next();){var d=c.value.link;null!==d&&(d.Cb=a,d.Eb=b)}this.commitNodes();this.qz();this.it&&this.commitLinks()};function jq(a,b){return 270===a.qa?b?Qc:Yc:90===a.qa?b?Yc:Qc:180===a.qa?b?Wc:Xc:b?Xc:Wc}
- cm.prototype.commitNodes=function(){this.Zg=[];this.og=[];this.If=[];this.Sb=[];for(var a=0;a<=this.sb;a++)this.Zg[a]=0,this.og[a]=0,this.If[a]=0,this.Sb[a]=0;for(a=this.network.vertexes.j;a.next();){var b=a.value,c=b.layer;this.Zg[c]=Math.max(this.Zg[c],this.nodeMinLayerSpace(b,!0));this.og[c]=Math.max(this.og[c],this.nodeMinLayerSpace(b,!1))}for(var b=0,d=this.jm,c=0;c<=this.sb;c++){var e=d;0>=this.Zg[c]+this.og[c]&&(e=0);0<c&&(b+=e/2);90===this.qa||0===this.qa?(b+=this.og[c],this.If[c]=b,b+=this.Zg[c]):
- (b+=this.Zg[c],this.If[c]=b,b+=this.og[c]);c<this.sb&&(b+=e/2);this.Sb[c]=b}d=b;b=this.de;for(c=0;c<=this.sb;c++)270===this.qa?this.If[c]=b.y+this.If[c]:90===this.qa?(this.If[c]=b.y+d-this.If[c],this.Sb[c]=d-this.Sb[c]):180===this.qa?this.If[c]=b.x+this.If[c]:(this.If[c]=b.x+d-this.If[c],this.Sb[c]=d-this.Sb[c]);for(a.reset();a.next();){var c=a.value,d=c.layer,e=c.column|0,g=0,h=0;270===this.qa||90===this.qa?(g=b.x+this.Gd*e,h=this.If[d]):(g=this.If[d],h=b.y+this.Gd*e);c.ra=g;c.Da=h;c.commit()}};
- cm.prototype.qz=function(){for(var a=0,b=this.jm,c=0;c<=this.sb;c++)a+=this.Zg[c],a+=this.og[c];for(var a=a+this.sb*b,b=[],c=this.Gd*this.Mb,d=this.lI;0<=d;d--)270===this.qa?0===d?b.push(new x(0,0,c,Math.abs(this.Sb[0]))):b.push(new x(0,this.Sb[d-1],c,Math.abs(this.Sb[d-1]-this.Sb[d]))):90===this.qa?0===d?b.push(new x(0,this.Sb[0],c,Math.abs(this.Sb[0]-a))):b.push(new x(0,this.Sb[d],c,Math.abs(this.Sb[d-1]-this.Sb[d]))):180===this.qa?0===d?b.push(new x(0,0,Math.abs(this.Sb[0]),c)):b.push(new x(this.Sb[d-
- 1],0,Math.abs(this.Sb[d-1]-this.Sb[d]),c)):0===d?b.push(new x(this.Sb[0],0,Math.abs(this.Sb[0]-a),c)):b.push(new x(this.Sb[d],0,Math.abs(this.Sb[d-1]-this.Sb[d]),c));this.commitLayers(b,O.ok)};cm.prototype.commitLayers=function(){};
- cm.prototype.commitLinks=function(){for(var a=this.network.edges.j,b;a.next();)b=a.value.link,null!==b&&(b.Jl(),b.Mo(),b.Ri());for(a.reset();a.next();)b=a.value.link,null!==b&&b.updateRoute();for(a.reset();a.next();){var c=a.value;b=c.link;if(null!==b){b.Jl();var d=b,e=d.aa,g=d.fa,h=d.nd,k=d.Wd;if(c.valid){if(b.df===th&&4===b.pa){if(c.rev)var l=e,e=g,g=l,m=h,h=k,k=m;if(c.fromVertex.column===c.toVertex.column){var n=b.getLinkPoint(e,h,b.computeSpot(!0),!0,!1,g,k),p=b.getLinkPoint(g,k,b.computeSpot(!1),
- !1,!1,e,h);n.J()||n.set(e.ca.hl);p.J()||p.set(g.ca.hl);b.Mo();b.dl(n.x,n.y);b.dl((2*n.x+p.x)/3,(2*n.y+p.y)/3);b.dl((n.x+2*p.x)/3,(n.y+2*p.y)/3);b.dl(p.x,p.y)}else{var q=!1,r=!1;null!==h&&b.computeSpot(!0)===Pb&&(q=!0);null!==k&&b.computeSpot(!1)===Pb&&(r=!0);if(q||r){var s=b.m(0).x,t=b.m(0).y,v=b.m(1).x,y=b.m(1).y,B=b.m(2).x,A=b.m(2).y,E=b.m(3).x,N=b.m(3).y;if(q){90===this.qa||270===this.qa?(v=s,y=(t+N)/2):(v=(s+E)/2,y=t);b.ba(1,v,y);var J=b.getLinkPoint(e,h,b.computeSpot(!0),!0,!1,g,k);J.J()||J.set(e.ca.hl);
- b.ba(0,J.x,J.y)}r&&(90===this.qa||270===this.qa?(B=E,A=(t+N)/2):(B=(s+E)/2,A=N),b.ba(2,B,A),J=b.getLinkPoint(g,k,b.computeSpot(!1),!1,!1,e,h),J.J()||J.set(g.ca.hl),b.ba(3,J.x,J.y))}}}b.Ri()}else if(c.fromVertex.layer===c.toVertex.layer)b.Ri();else{var W=!1,ea=!1,T=0,P=b.Vs+1;if(b.jc)ea=!0,T=b.pa,4<T&&b.points.removeRange(2,T-3);else if(b.df===th)W=!0,T=b.pa,4<T&&b.points.removeRange(2,T-3),P=2;else{var T=b.pa,aa=b.computeSpot(!0)===Pb,La=b.computeSpot(!1)===Pb;2<T&&aa&&La?b.points.removeRange(1,T-
- 2):3<T&&aa&&!La?b.points.removeRange(1,T-3):3<T&&!aa&&La?b.points.removeRange(2,T-2):4<T&&!aa&&!La&&b.points.removeRange(2,T-3)}var Aa=c.fromVertex,Sa=c.toVertex,qa,Ha;if(c.rev){for(var wa=0;null!==Sa&&Aa!==Sa;){Ha=qa=null;for(var ec=Sa.sc.j;ec.next();){var jd=ec.value;if(jd.link===c.link&&(qa=jd.fromVertex,Ha=jd.toVertex,null===qa.xd))break}qa!==Aa&&(Xa=b.m(P-1).x,fb=b.m(P-1).y,Ea=qa.ra,Fa=qa.Da,ea?180===this.qa||0===this.qa?2===P?(b.B(P++,Xa,fb),b.B(P++,Xa,Fa)):(lc=null!==Ha?Ha.Da:fb,lc!==Fa&&(ob=
- this.Sb[qa.layer-1],b.B(P++,ob,fb),b.B(P++,ob,Fa))):2===P?(b.B(P++,Xa,fb),b.B(P++,Ea,fb)):(je=null!==Ha?Ha.ra:Xa,je!==Ea&&(ob=this.Sb[qa.layer-1],b.B(P++,Xa,ob),b.B(P++,Ea,ob))):2===P?W?(Jb=Math.max(10,this.Zg[Sa.layer]),db=Math.max(10,this.og[Sa.layer]),180===this.qa?(wa=Sa.ea.x,b.B(P++,wa-Jb,Fa),b.B(P++,wa,Fa),b.B(P++,wa+db,Fa)):90===this.qa?(wa=Sa.ea.y+Sa.ea.height,b.B(P++,Ea,wa+db),b.B(P++,Ea,wa),b.B(P++,Ea,wa-Jb)):270===this.qa?(wa=Sa.ea.y,b.B(P++,Ea,wa-Jb),b.B(P++,Ea,wa),b.B(P++,Ea,wa+db)):
- (wa=Sa.ea.x+Sa.ea.width,b.B(P++,wa+db,Fa),b.B(P++,wa,Fa),b.B(P++,wa-Jb,Fa))):(b.B(P++,Xa,fb),180===this.qa||0===this.qa?b.B(P++,Xa,Fa):b.B(P++,Ea,fb),b.B(P++,Ea,Fa)):(Jb=Math.max(10,this.Zg[qa.layer]),db=Math.max(10,this.og[qa.layer]),180===this.qa?(W&&b.B(P++,Ea-Jb,Fa),b.B(P++,Ea,Fa),W&&b.B(P++,Ea+db,Fa)):90===this.qa?(W&&b.B(P++,Ea,Fa+db),b.B(P++,Ea,Fa),W&&b.B(P++,Ea,Fa-Jb)):270===this.qa?(W&&b.B(P++,Ea,Fa-Jb),b.B(P++,Ea,Fa),W&&b.B(P++,Ea,Fa+db)):(W&&b.B(P++,Ea+db,Fa),b.B(P++,Ea,Fa),W&&b.B(P++,
- Ea-Jb,Fa))));Sa=qa}if(null===k||b.computeSpot(!1)!==Pb)if(Xa=b.m(P-1).x,fb=b.m(P-1).y,Ea=b.m(P).x,Fa=b.m(P).y,ea){var Of=this.og[Aa.layer],fc=0;180===this.qa||0===this.qa?(fc=fb,fc>=Aa.ea.y&&fc<=Aa.ea.bottom&&(wa=Aa.ra+Of,fc=fc<Aa.ea.y+Aa.ea.height/2?Aa.ea.y-this.Gd/2:Aa.ea.bottom+this.Gd/2,b.B(P++,wa,fb),b.B(P++,wa,fc)),b.B(P++,Ea,fc)):(fc=Xa,fc>=Aa.ea.x&&fc<=Aa.ea.right&&(wa=Aa.Da+Of,fc=fc<Aa.ea.x+Aa.ea.width/2?Aa.ea.x-this.Gd/2:Aa.ea.right+this.Gd/2,b.B(P++,Xa,wa),b.B(P++,fc,wa)),b.B(P++,fc,Fa));
- b.B(P++,Ea,Fa)}else W?(Jb=Math.max(10,this.Zg[Aa.layer]),db=Math.max(10,this.og[Aa.layer]),180===this.qa?(wa=Aa.ea.x+Aa.ea.width,b.ba(P-2,wa,fb),b.ba(P-1,wa+db,fb)):90===this.qa?(wa=Aa.ea.y,b.ba(P-2,Xa,wa),b.ba(P-1,Xa,wa-Jb)):270===this.qa?(wa=Aa.ea.y+Aa.ea.height,b.ba(P-2,Xa,wa),b.ba(P-1,Xa,wa+db)):(wa=Aa.ea.x,b.ba(P-2,wa,fb),b.ba(P-1,wa-Jb,fb))):(180===this.qa||0===this.qa?b.B(P++,Ea,fb):b.B(P++,Xa,Fa),b.B(P++,Ea,Fa))}else{for(;null!==Aa&&Aa!==Sa;){Ha=qa=null;for(var bf=Aa.hc.j;bf.next();){var Pf=
- bf.value;if(Pf.link===c.link&&(qa=Pf.toVertex,Ha=Pf.fromVertex,null!==Ha.xd&&(Ha=null),null===qa.xd))break}var Xa=0,fb=0,Ea=0,Fa=0,ob=0,Jb=0,db=0;if(qa!==Sa)if(Xa=b.m(P-1).x,fb=b.m(P-1).y,Ea=qa.ra,Fa=qa.Da,ea)if(180===this.qa||0===this.qa){var lc=null!==Ha?Ha.Da:fb;lc!==Fa&&(ob=this.Sb[qa.layer],2===P&&(ob=0===this.qa?Math.max(ob,Xa):Math.min(ob,Xa)),b.B(P++,ob,fb),b.B(P++,ob,Fa))}else{var je=null!==Ha?Ha.ra:Xa;je!==Ea&&(ob=this.Sb[qa.layer],2===P&&(ob=90===this.qa?Math.max(ob,fb):Math.min(ob,fb)),
- b.B(P++,Xa,ob),b.B(P++,Ea,ob))}else Jb=Math.max(10,this.Zg[qa.layer]),db=Math.max(10,this.og[qa.layer]),180===this.qa?(b.B(P++,Ea+db,Fa),W&&b.B(P++,Ea,Fa),b.B(P++,Ea-Jb,Fa)):90===this.qa?(b.B(P++,Ea,Fa-Jb),W&&b.B(P++,Ea,Fa),b.B(P++,Ea,Fa+db)):270===this.qa?(b.B(P++,Ea,Fa+db),W&&b.B(P++,Ea,Fa),b.B(P++,Ea,Fa-Jb)):(b.B(P++,Ea-Jb,Fa),W&&b.B(P++,Ea,Fa),b.B(P++,Ea+db,Fa));Aa=qa}ea&&(Xa=b.m(P-1).x,fb=b.m(P-1).y,Ea=b.m(P).x,Fa=b.m(P).y,180===this.qa||0===this.qa?fb!==Fa&&(ob=0===this.qa?Math.min(Math.max((Ea+
- Xa)/2,this.Sb[Sa.layer]),Ea):Math.max(Math.min((Ea+Xa)/2,this.Sb[Sa.layer]),Ea),b.B(P++,ob,fb),b.B(P++,ob,Fa)):Xa!==Ea&&(ob=90===this.qa?Math.min(Math.max((Fa+fb)/2,this.Sb[Sa.layer]),Fa):Math.max(Math.min((Fa+fb)/2,this.Sb[Sa.layer]),Fa),b.B(P++,Xa,ob),b.B(P++,Ea,ob)))}if(null!==d&&W){if(null!==h){if(b.computeSpot(!0)===Pb){var pc=b.m(0),Rd=b.m(2);pc.N(Rd)||b.ba(1,(pc.x+Rd.x)/2,(pc.y+Rd.y)/2)}J=b.getLinkPoint(e,h,Pb,!0,!1,g,k);J.J()||J.set(e.ca.hl);b.ba(0,J.x,J.y)}null!==k&&(b.computeSpot(!1)===
- Pb&&(pc=b.m(b.pa-1),Rd=b.m(b.pa-3),pc.N(Rd)||b.ba(b.pa-2,(pc.x+Rd.x)/2,(pc.y+Rd.y)/2)),J=b.getLinkPoint(g,k,Pb,!1,!1,e,h),J.J()||J.set(g.ca.hl),b.ba(b.pa-1,J.x,J.y))}b.Ri();c.commit()}}}for(var ke=new K(G),cf=this.network.edges.j;cf.next();){var uf=cf.value.link;null!==uf&&uf.jc&&!ke.contains(uf)&&ke.add(uf)}if(0<ke.count)if(90===this.qa||270===this.qa){for(var Sd=0,Kb=new K(Uq),Bb,qc,Pg=ke.j;Pg.next();){var Lb=Pg.value;if(null!==Lb&&Lb.jc)for(var Cb=2;Cb<Lb.pa-3;Cb++)if(Bb=Lb.m(Cb),qc=Lb.m(Cb+1),
- this.F(Bb.y,qc.y)&&!this.F(Bb.x,qc.x)){var gc=new Uq;gc.layer=Math.floor(Bb.y/2);var pb=Lb.m(0),Ce=Lb.m(Lb.pa-1);gc.first=pb.x*pb.x+pb.y;gc.Ud=Ce.x*Ce.x+Ce.y;gc.Ke=Math.min(Bb.x,qc.x);gc.ee=Math.max(Bb.x,qc.x);gc.index=Cb;gc.link=Lb;if(Cb+2<Lb.pa){var Td=Lb.m(Cb-1),rg=Lb.m(Cb+2),Qf=0;Td.y<Bb.y?Qf=rg.y<Bb.y?3:Bb.x<qc.x?2:1:Td.y>Bb.y&&(Qf=rg.y>Bb.y?0:qc.x<Bb.x?2:1);gc.gi=Qf}Kb.add(gc)}}if(1<Kb.count){Kb.sort(this.mF);for(var Db=0;Db<Kb.count;){for(var kd=Kb.p[Db].layer,rc=Db+1;rc<Kb.count&&Kb.p[rc].layer===
- kd;)rc++;if(1<rc-Db)for(var zb=Db;zb<rc;){for(var Ic=Kb.p[zb].ee,Qb=Db+1;Qb<rc&&Kb.p[Qb].Ke<Ic;)Ic=Math.max(Ic,Kb.p[Qb].ee),Qb++;var Ra=Qb-zb;if(1<Ra){Kb.Fp(this.$w,zb,zb+Ra);for(var gb=1,Eb=Kb.p[zb].Ud,Cb=zb;Cb<Qb;Cb++){var hc=Kb.p[Cb];hc.Ud!==Eb&&(gb++,Eb=hc.Ud)}Kb.Fp(this.lF,zb,zb+Ra);for(var Ud=1,Eb=Kb.p[zb].first,Cb=zb;Cb<Qb;Cb++)hc=Kb.p[Cb],hc.first!==Eb&&(Ud++,Eb=hc.first);var Vd=!0,vf=Ud;gb<Ud?(Vd=!1,vf=gb,Eb=Kb.p[zb].Ud,Kb.Fp(this.$w,zb,zb+Ra)):Eb=Kb.p[zb].first;for(var De=0,Cb=zb;Cb<Qb;Cb++){hc=
- Kb.p[Cb];(Vd?hc.first:hc.Ud)!==Eb&&(De++,Eb=Vd?hc.first:hc.Ud);Lb=hc.link;Bb=Lb.m(hc.index);qc=Lb.m(hc.index+1);var Ee=this.Mw*(De-(vf-1)/2);if(!Lb.Zi||Vq(Bb.x,Bb.y+Ee,qc.x,qc.y+Ee))Sd++,Lb.Jl(),Lb.ba(hc.index,Bb.x,Bb.y+Ee),Lb.ba(hc.index+1,qc.x,qc.y+Ee),Lb.Ri()}}zb=Qb}Db=rc}}}else{for(var Ub=0,eb=new K(Uq),ic,Ac,ld=ke.j;ld.next();){var bb=ld.value;if(null!==bb&&bb.jc)for(var xb=2;xb<bb.pa-3;xb++)if(ic=bb.m(xb),Ac=bb.m(xb+1),this.F(ic.x,Ac.x)&&!this.F(ic.y,Ac.y)){var mc=new Uq;mc.layer=Math.floor(ic.x/
- 2);var md=bb.m(0),Qg=bb.m(bb.pa-1);mc.first=md.x+md.y*md.y;mc.Ud=Qg.x+Qg.y*Qg.y;mc.Ke=Math.min(ic.y,Ac.y);mc.ee=Math.max(ic.y,Ac.y);mc.index=xb;mc.link=bb;if(xb+2<bb.pa){var Rg=bb.m(xb-1),Sg=bb.m(xb+2),Rf=0;Rg.x<ic.x?Rf=Sg.x<ic.x?3:ic.y<Ac.y?2:1:Rg.x>ic.x&&(Rf=Sg.x>ic.x?0:Ac.y<ic.y?2:1);mc.gi=Rf}eb.add(mc)}}if(1<eb.count){eb.sort(this.mF);for(var Jc=0;Jc<eb.count;){for(var Rc=eb.p[Jc].layer,Kc=Jc+1;Kc<eb.count&&eb.p[Kc].layer===Rc;)Kc++;if(1<Kc-Jc)for(var qb=Jc;qb<Kc;){for(var le=eb.p[qb].ee,rb=Jc+
- 1;rb<Kc&&eb.p[rb].Ke<le;)le=Math.max(le,eb.p[rb].ee),rb++;var Bc=rb-qb;if(1<Bc){eb.Fp(this.$w,qb,qb+Bc);for(var Fe=1,Fb=eb.p[qb].Ud,xb=qb;xb<rb;xb++){var Gb=eb.p[xb];Gb.Ud!==Fb&&(Fe++,Fb=Gb.Ud)}eb.Fp(this.lF,qb,qb+Bc);for(var nd=1,Fb=eb.p[qb].first,xb=qb;xb<rb;xb++)Gb=eb.p[xb],Gb.first!==Fb&&(nd++,Fb=Gb.first);var Sc=!0,Wd=nd;Fe<nd?(Sc=!1,Wd=Fe,Fb=eb.p[qb].Ud,eb.Fp(this.$w,qb,qb+Bc)):Fb=eb.p[qb].first;for(var Xd=0,xb=qb;xb<rb;xb++){Gb=eb.p[xb];(Sc?Gb.first:Gb.Ud)!==Fb&&(Xd++,Fb=Sc?Gb.first:Gb.Ud);
- bb=Gb.link;ic=bb.m(Gb.index);Ac=bb.m(Gb.index+1);var me=this.Mw*(Xd-(Wd-1)/2);if(!bb.Zi||Vq(ic.x+me,ic.y,Ac.x+me,Ac.y))Ub++,bb.Jl(),bb.ba(Gb.index,ic.x+me,ic.y),bb.ba(Gb.index+1,Ac.x+me,Ac.y),bb.Ri()}}qb=rb}Jc=Kc}}}};cm.prototype.mF=function(a,b){return a instanceof Uq&&b instanceof Uq&&a!==b?a.layer<b.layer?-1:a.layer>b.layer?1:a.Ke<b.Ke?-1:a.Ke>b.Ke?1:a.ee<b.ee?-1:a.ee>b.ee?1:0:0};
- cm.prototype.lF=function(a,b){return a instanceof Uq&&b instanceof Uq&&a!==b?a.first<b.first?-1:a.first>b.first||a.gi<b.gi?1:a.gi>b.gi||a.Ke<b.Ke?-1:a.Ke>b.Ke?1:a.ee<b.ee?-1:a.ee>b.ee?1:0:0};cm.prototype.$w=function(a,b){return a instanceof Uq&&b instanceof Uq&&a!==b?a.Ud<b.Ud?-1:a.Ud>b.Ud||a.gi<b.gi?1:a.gi>b.gi||a.Ke<b.Ke?-1:a.Ke>b.Ke?1:a.ee<b.ee?-1:a.ee>b.ee?1:0:0};cm.prototype.F=function(a,b){u&&(w.o(a,cm,"isApprox:a"),w.o(b,cm,"isApprox:b"));var c=a-b;return-1<c&&1>c};
- function Vq(a,b,c,d){u&&(w.o(a,cm,"isUnoccupied2:px"),w.o(b,cm,"isUnoccupied2:py"),w.o(c,cm,"isUnoccupied2:qx"),w.o(d,cm,"isUnoccupied2:qy"));return!0}function lq(a,b){var c,d=a.Xd[b];if(d>=a.bh.length){c=[];for(var e=0;e<a.bh.length;e++)c[e]=a.bh[e];a.bh=c}void 0===a.bh[d]||null===a.bh[d]?c=[]:(c=a.bh[d],a.bh[d]=null);d=a.or[b];for(e=0;e<d.length;e++){var g=d[e];c[g.index]=g}return c}function mq(a,b,c){a.bh[a.Xd[b]]=c}
- w.defineProperty(cm,{layerSpacing:"layerSpacing"},function(){return this.jm},function(a){this.jm!==a&&(w.g(a,"number",cm,"layerSpacing"),0<=a&&(this.jm=a,this.K()))});w.defineProperty(cm,{PJ:"columnSpacing"},function(){return this.Gd},function(a){this.Gd!==a&&(w.g(a,"number",cm,"columnSpacing"),0<=a&&(this.Gd=a,this.K()))});w.defineProperty(cm,{direction:"direction"},function(){return this.qa},function(a){this.qa!==a&&(w.g(a,"number",cm,"direction"),this.qa=a,this.K())});
- w.defineProperty(cm,{XG:"cycleRemoveOption"},function(){return this.Dn},function(a){this.Dn!==a&&(w.Ea(a,cm,cm,"cycleRemoveOption"),a===eq||a===Zp)&&(this.Dn=a,this.K())});w.defineProperty(cm,{dI:"layeringOption"},function(){return this.ko},function(a){this.ko!==a&&(w.Ea(a,cm,cm,"layeringOption"),a===$p||a===wq||a===yq)&&(this.ko=a,this.K())});
- w.defineProperty(cm,{OH:"initializeOption"},function(){return this.Yn},function(a){this.Yn!==a&&(w.Ea(a,cm,cm,"initializeOption"),a===aq||a===Eq||a===Cq)&&(this.Yn=a,this.K())});w.defineProperty(cm,{BK:"iterations"},function(){return this.gm},function(a){this.gm!==a&&(w.o(a,dq,"iterations"),0<=a&&(this.gm=a,this.K()))});w.defineProperty(cm,{AG:"aggressiveOption"},function(){return this.tn},function(a){this.tn!==a&&(w.Ea(a,cm,cm,"aggressiveOption"),a===Iq||a===bq||a===Jq)&&(this.tn=a,this.K())});
- w.defineProperty(cm,{ZK:"packOption"},function(){return this.Ci},function(a){this.Ci!==a&&(w.g(a,"number",cm,"packOption"),0<=a&&8>a&&(this.Ci=a,this.K()))});w.defineProperty(cm,{Dp:"setsPortSpots"},function(){return this.Th},function(a){this.Th!==a&&(w.g(a,"boolean",cm,"setsPortSpots"),this.Th=a,this.K())});w.defineProperty(cm,{Mw:"linkSpacing"},function(){return this.xj},function(a){this.xj!==a&&(w.g(a,"number",cm,"linkSpacing"),0<=a&&(this.xj=a,this.K()))});w.w(cm,{lI:"maxLayer"},function(){return this.sb});
- w.w(cm,{HK:"maxIndex"},function(){return this.bv});w.w(cm,{GK:"maxColumn"},function(){return this.Mb});w.w(cm,{NK:"minIndexLayer"},function(){return this.gr});w.w(cm,{IK:"maxIndexLayer"},function(){return this.Jf});var Zp;cm.CycleDepthFirst=Zp=w.v(cm,"CycleDepthFirst",0);var eq;cm.CycleGreedy=eq=w.v(cm,"CycleGreedy",1);var $p;cm.LayerOptimalLinkLength=$p=w.v(cm,"LayerOptimalLinkLength",0);var wq;cm.LayerLongestPathSink=wq=w.v(cm,"LayerLongestPathSink",1);var yq;
- cm.LayerLongestPathSource=yq=w.v(cm,"LayerLongestPathSource",2);var aq;cm.InitDepthFirstOut=aq=w.v(cm,"InitDepthFirstOut",0);var Eq;cm.InitDepthFirstIn=Eq=w.v(cm,"InitDepthFirstIn",1);var Cq;cm.InitNaive=Cq=w.v(cm,"InitNaive",2);var Iq;cm.AggressiveNone=Iq=w.v(cm,"AggressiveNone",0);var bq;cm.AggressiveLess=bq=w.v(cm,"AggressiveLess",1);var Jq;cm.AggressiveMore=Jq=w.v(cm,"AggressiveMore",2);cm.PackNone=0;var Kq;cm.PackExpand=Kq=1;var Lq;cm.PackStraighten=Lq=2;var Nq;cm.PackMedian=Nq=4;var cq;
- cm.PackAll=cq=7;function Uq(){this.index=this.ee=this.Ke=this.Ud=this.first=this.layer=0;this.link=null;this.gi=0}w.ge(Uq,{layer:!0,first:!0,Ud:!0,Ke:!0,ee:!0,index:!0,link:!0,gi:!0});function dq(){Da.call(this)}w.Pa(dq,Da);w.la("LayeredDigraphNetwork",dq);dq.prototype.createVertex=function(){return new Wq};dq.prototype.createEdge=function(){return new Xq};
- function Wq(){Ga.call(this);this.index=this.column=this.layer=-1;this.component=NaN;this.near=null;this.valid=!1;this.finish=this.Qo=NaN;this.Km=0;this.hA=this.iA=null}w.Pa(Wq,Ga);w.la("LayeredDigraphVertex",Wq);function Xq(){Ia.call(this);this.forest=this.rev=this.valid=!1;this.portToPos=this.portFromPos=NaN;this.portToColOffset=this.portFromColOffset=0}w.Pa(Xq,Ia);w.la("LayeredDigraphEdge",Xq);
- function Z(){0<arguments.length&&w.cd(Z);Ve.call(this);this.Ad=new L(Object);this.zr=Yq;this.Hf=Zq;this.qs=$q;this.Zu=ar;this.aB=null;this.Dh=!0;this.ed=br;this.gg=(new pa(10,10)).freeze();this.wa=new cr;this.ua=new cr;this.az=[]}w.Pa(Z,Ve);w.la("TreeLayout",Z);Z.prototype.cloneProtected=function(a){Ve.prototype.cloneProtected.call(this,a);a.zr=this.zr;a.qs=this.qs;a.Zu=this.Zu;a.Dh=this.Dh;a.ed=this.ed;a.gg.assign(this.gg);a.wa.copyInheritedPropertiesFrom(this.wa);a.ua.copyInheritedPropertiesFrom(this.ua)};
- Z.prototype.createNetwork=function(){return new dr};Z.prototype.makeNetwork=function(a){function b(a){if(a instanceof D)return!a.Af&&"Comment"!==a.Tc;if(a instanceof G){var b=a.aa;if(null===b||b.Af||"Comment"===b.Tc)return!1;a=a.fa;return null===a||a.Af||"Comment"===a.Tc?!1:!0}return!1}var c=this.createNetwork();c.Ub=this;a instanceof z?(c.Xj(a.Jg,!0,b),c.Xj(a.links,!0,b)):a instanceof F?c.Xj(a.Jc,!1,b):c.Xj(a.j,!1,b);return c};
- Z.prototype.doLayout=function(a){null===a&&w.l("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");null===this.network&&(this.network=this.makeNetwork(a));this.Pf!==er&&(this.de=this.initialOrigin(this.de));var b=this.h;null===b&&a instanceof z&&(b=a);this.Hf=this.path===Yq&&null!==b?b.Bd?Zq:fr:this.path===Yq?Zq:this.path;if(0<this.network.vertexes.count){this.network.lw();for(a=this.network.vertexes.j;a.next();)b=a.value,b.initialized=!1,b.level=
- 0,b.parent=null,b.children=[];if(0<this.Ad.count){a=new L(cr);for(b=this.Ad.j;b.next();){var c=b.value;c instanceof D?(c=this.network.Wm(c),null!==c&&a.add(c)):c instanceof cr&&a.add(c)}this.Ad=a}0===this.Ad.count&&this.findRoots();for(a=this.Ad.copy().j;a.next();)b=a.value,b.initialized||(b.initialized=!0,gr(this,b));for(a=this.Ad.j;a.next();)b=a.value,b instanceof cr&&hr(this,b);for(a=this.Ad.j;a.next();)b=a.value,b instanceof cr&&ir(this,b);for(a=this.Ad.j;a.next();)b=a.value,b instanceof cr&&
- jr(this,b);this.mz();if(this.Xz===kr){c=[];for(a=this.network.vertexes.j;a.next();){var d=a.value,b=d.parent;null==b&&(b=d);var b=0===b.angle||180===b.angle,e=c[d.level];void 0===e&&(e=0);c[d.level]=Math.max(e,b?d.width:d.height)}for(d=0;d<c.length;d++)void 0===c[d]&&(c[d]=0);this.aB=c;for(a=this.network.vertexes.j;a.next();)d=a.value,b=d.parent,null===b&&(b=d),0===b.angle||180===b.angle?(180===b.angle&&(d.Ws+=c[d.level]-d.width),d.width=c[d.level]):(270===b.angle&&(d.Xs+=c[d.level]-d.height),d.height=
- c[d.level])}else if(this.Xz===lr)for(a=this.network.vertexes.j;a.next();){c=a.value;b=0===c.angle||180===c.angle;e=-1;for(d=0;d<c.children.length;d++)var g=c.children[d],e=Math.max(e,b?g.width:g.height);if(0<=e)for(d=0;d<c.children.length;d++)g=c.children[d],b?(180===c.angle&&(g.Ws+=e-g.width),g.width=e):(270===c.angle&&(g.Xs+=e-g.height),g.height=e)}for(a=this.Ad.j;a.next();)b=a.value,b instanceof cr&&this.layoutTree(b);this.arrangeTrees();this.updateParts()}this.network=null;this.Ad=new L(Object);
- this.Cf=!0};
- Z.prototype.findRoots=function(){for(var a=this.network.vertexes.j;a.next();){var b=a.value;switch(this.Hf){case Zq:0===b.sc.count&&this.Ad.add(b);break;case fr:0===b.hc.count&&this.Ad.add(b);break;default:w.l("Unhandled path value "+this.Hf.toString())}}if(0===this.Ad.count){for(var a=999999,b=null,c=this.network.vertexes.j;c.next();){var d=c.value;switch(this.Hf){case Zq:d.sc.count<a&&(a=d.sc.count,b=d);break;case fr:d.hc.count<a&&(a=d.hc.count,b=d);break;default:w.l("Unhandled path value "+this.Hf.toString())}}null!==
- b&&this.Ad.add(b)}};
- function gr(a,b){if(null!==b){u&&w.k(b,cr,Z,"walkTree:v");switch(a.Hf){case Zq:if(0<b.hc.count){for(var c=new K(cr),d=b.cH;d.next();){var e=d.value;mr(a,b,e)&&c.add(e)}0<c.count&&(b.children=c.Te())}break;case fr:if(0<b.sc.count){c=new K(cr);for(d=b.aJ;d.next();)e=d.value,mr(a,b,e)&&c.add(e);0<c.count&&(b.children=c.Te())}break;default:w.l("Unhandled path value"+a.Hf.toString())}c=b.children;d=c.length;for(e=0;e<d;e++){var g=c[e];g.initialized=!0;g.level=b.level+1;g.parent=b;a.Ad.remove(g)}for(e=0;e<
- d;e++)g=c[e],gr(a,g)}}function mr(a,b,c){u&&w.k(b,cr,Z,"walkOK:v");u&&w.k(c,cr,Z,"walkOK:c");if(c.initialized){var d;if(null===b)d=!1;else{u&&w.k(c,cr,Z,"isAncestor:a");u&&w.k(b,cr,Z,"isAncestor:b");for(d=b.parent;null!==d&&d!==c;)d=d.parent;d=d===c}if(d||c.level>b.level)return!1;a.removeChild(c.parent,c)}return!0}
- Z.prototype.removeChild=function(a,b){if(null!==a&&null!==b){u&&w.k(a,cr,Z,"removeChild:p");u&&w.k(b,cr,Z,"removeChild:c");for(var c=a.children,d=0,e=0;e<c.length;e++)c[e]===b&&d++;if(0<d){for(var d=Array(c.length-d),g=0,e=0;e<c.length;e++)c[e]!==b&&(d[g++]=c[e]);a.children=d}}};
- function hr(a,b){if(null!==b){u&&w.k(b,cr,Z,"initializeTree:v");a.initializeTreeVertexValues(b);b.alignment===nr&&a.sortTreeVertexChildren(b);for(var c=0,d=b.Mm,e=0,g=b.children,h=g.length,k=0;k<h;k++){var l=g[k];hr(a,l);c+=l.descendantCount+1;d=Math.max(d,l.maxChildrenCount);e=Math.max(e,l.maxGenerationCount)}b.descendantCount=c;b.maxChildrenCount=d;b.maxGenerationCount=0<d?e+1:0}}
- function or(a,b){u&&w.k(b,cr,Z,"mom:v");switch(a.qs){default:case $q:return null!==b.parent?b.parent:a.wa;case pr:return null===b.parent?a.wa:null===b.parent.parent?a.ua:b.parent;case qr:if(null!==b.parent)return null!==b.parent.parent?b.parent.parent:a.ua;case rr:var c=!0;if(0===b.Mm)c=!1;else for(var d=b.children,e=d.length,g=0;g<e;g++)if(0<d[g].Mm){c=!1;break}return c&&null!==b.parent?a.ua:null!==b.parent?b.parent:a.wa}}
- Z.prototype.initializeTreeVertexValues=function(a){u&&w.k(a,cr,Z,"initializeTreeVertexValues:v");var b=or(this,a);a.copyInheritedPropertiesFrom(b);if(null!==a.parent&&a.parent.alignment===nr){for(var b=a.angle,c=a.parent.children,d=0;d<c.length&&a!==c[d];)d++;0===d%2?d!==c.length-1&&(b=90===b?180:180===b?270:270===b?180:270):b=90===b?0:180===b?90:270===b?0:90;a.angle=b}a.initialized=!0};
- function ir(a,b){if(null!==b){u&&w.k(b,cr,Z,"assignTree:v");a.assignTreeVertexValues(b);for(var c=b.children,d=c.length,e=0;e<d;e++)ir(a,c[e])}}Z.prototype.assignTreeVertexValues=function(){};function jr(a,b){if(null!==b){u&&w.k(b,cr,Z,"sortTree:v");b.alignment!==nr&&a.sortTreeVertexChildren(b);for(var c=b.children,d=c.length,e=0;e<d;e++)jr(a,c[e])}}
- Z.prototype.sortTreeVertexChildren=function(a){u&&w.k(a,cr,Z,"sortTreeVertexChildren:v");switch(a.sorting){case sr:break;case tr:a.children.reverse();break;case ur:a.children.sort(a.comparer);break;case vr:a.children.sort(a.comparer);a.children.reverse();break;default:w.l("Unhandled sorting value "+a.sorting.toString())}};Z.prototype.mz=function(){if(this.comments)for(var a=this.network.vertexes.j;a.next();)this.addComments(a.value)};
- Z.prototype.addComments=function(a){u&&w.k(a,cr,Z,"addComments:v");var b=a.angle,c=a.parent,d=0,e=wr,e=!1;null!==c&&(d=c.angle,e=c.alignment,e=xr(e));var b=90===b||270===b,d=90===d||270===d,c=0===a.Mm,g=0,h=0,k=0,l=a.commentSpacing;if(null!==a.Kc)for(var m=a.Kc.ZD();m.next();){var n=m.value;"Comment"===n.Tc&&n.Na()&&(null===a.comments&&(a.comments=[]),a.comments.push(n),n.xf(),n=n.Ja,b&&!c||!e&&!d&&c||e&&d&&c?(g=Math.max(g,n.width),h+=n.height+Math.abs(k)):(g+=n.width+Math.abs(k),h=Math.max(h,n.height)),
- k=l)}null!==a.comments&&(b&&!c||!e&&!d&&c||e&&d&&c?(g+=Math.abs(a.commentMargin),h=Math.max(0,h-a.height)):(h+=Math.abs(a.commentMargin),g=Math.max(0,g-a.width)),e=w.nk(0,0,a.ea.width+g,a.ea.height+h),a.ub=e,w.qc(e))};function xr(a){return a===yr||a===nr||a===zr||a===Ar}function Br(a){return a===yr||a===nr}
- function Cr(a){u&&w.k(a,cr,Z,"isLeftSideBus:v");var b=a.parent;if(null!==b){var c=b.alignment;if(xr(c)){if(Br(c)){b=b.children;for(c=0;c<b.length&&a!==b[c];)c++;return 0===c%2}if(c===zr)return!0}}return!1}
- Z.prototype.layoutComments=function(a){u&&w.k(a,cr,Z,"layoutComments:v");if(null!==a.comments){var b=a.Kc.Ja,c=a.parent,d=a.angle,e=0,g=wr,g=!1;null!==c&&(e=c.angle,g=c.alignment,g=xr(g));for(var c=90===d||270===d,d=90===e||270===e,h=0===a.Mm,k=Cr(a),l=0,m=a.comments,n=m.length,p=w.O(),q=0;q<n;q++){var r=m[q],s=r.Ja;if(c&&!h||!g&&!d&&h||g&&d&&h){if(135<e&&!g||d&&k)if(0<=a.commentMargin)for(p.n(a.ea.x-a.commentMargin-s.width,a.ea.y+l),r.move(p),r=r.Dg();r.next();){var t=r.value;t.Cb=Wc;t.Eb=Xc}else for(p.n(a.ea.x+
- 2*a.P.x-a.commentMargin,a.ea.y+l),r.move(p),r=r.Dg();r.next();)t=r.value,t.Cb=Xc,t.Eb=Wc;else if(0<=a.commentMargin)for(p.n(a.ea.x+2*a.P.x+a.commentMargin,a.ea.y+l),r.move(p),r=r.Dg();r.next();)t=r.value,t.Cb=Xc,t.Eb=Wc;else for(p.n(a.ea.x+a.commentMargin-s.width,a.ea.y+l),r.move(p),r=r.Dg();r.next();)t=r.value,t.Cb=Wc,t.Eb=Xc;l=0<=a.commentSpacing?l+(s.height+a.commentSpacing):l+(a.commentSpacing-s.height)}else{if(135<e&&!g||!d&&k)if(0<=a.commentMargin)for(p.n(a.ea.x+l,a.ea.y-a.commentMargin-s.height),
- r.move(p),r=r.Dg();r.next();)t=r.value,t.Cb=Qc,t.Eb=Yc;else for(p.n(a.ea.x+l,a.ea.y+2*a.P.y-a.commentMargin),r.move(p),r=r.Dg();r.next();)t=r.value,t.Cb=Yc,t.Eb=Qc;else if(0<=a.commentMargin)for(p.n(a.ea.x+l,a.ea.y+2*a.P.y+a.commentMargin),r.move(p),r=r.Dg();r.next();)t=r.value,t.Cb=Yc,t.Eb=Qc;else for(p.n(a.ea.x+l,a.ea.y+a.commentMargin-s.height),r.move(p),r=r.Dg();r.next();)t=r.value,t.Cb=Qc,t.Eb=Yc;l=0<=a.commentSpacing?l+(s.width+a.commentSpacing):l+(a.commentSpacing-s.width)}}w.A(p);b=l-a.commentSpacing-
- (c?b.height:b.width);if(this.Hf===Zq)for(e=a.hc;e.next();)a=e.value.link,null===a||a.Zi||(a.sl=0<b?b:NaN);else for(e=a.sc;e.next();)a=e.value.link,null===a||a.Zi||(a.Nl=0<b?b:NaN)}};
- Z.prototype.layoutTree=function(a){if(null!==a){u&&w.k(a,cr,Z,"layoutTree:v");for(var b=a.children,c=b.length,d=0;d<c;d++)this.layoutTree(b[d]);switch(a.compaction){case Dr:Er(this,a);break;case Fr:if(a.alignment===nr)Er(this,a);else if(u&&w.k(a,cr,Z,"layoutTreeBlock:v"),0===a.Mm){var d=a.parent,b=!1,c=0,e=wr;null!==d&&(c=d.angle,e=d.alignment,b=xr(e));d=Cr(a);a.oa.n(0,0);a.gb.n(a.width,a.height);null===a.parent||null===a.comments||(180!==c&&270!==c||b)&&!d?a.Qa.n(0,0):180===c&&!b||(90===c||270===
- c)&&d?a.Qa.n(a.width-2*a.P.x,0):a.Qa.n(0,a.height-2*a.P.y);a.lt=null;a.Et=null}else{for(var g=Gr(a),b=90===g||270===g,h=0,k=a.children,l=k.length,m=0;m<l;m++)var n=k[m],h=Math.max(h,b?n.gb.width:n.gb.height);var p=a.alignment,d=p===Hr,q=p===Ir,r=xr(p),s=Math.max(0,a.breadthLimit),c=Jr(a),t=a.nodeSpacing,v=Kr(a),y=a.rowSpacing,B=0;if(d||q||a.zp||a.Ap&&1===a.maxGenerationCount)B=Math.max(0,a.rowIndent);var d=a.width,e=a.height,A=0,E=0,N=0,J=null,W=null,ea=0,T=0,P=0,aa=0,La=0,Aa=0,Sa=0,qa=0,n=0;r&&!Br(p)&&
- 135<g&&k.reverse();if(Br(p))if(1<l)for(m=0;m<l;m++)0===m%2&&m!==l-1?qa=Math.max(qa,b?k[m].gb.width:k[m].gb.height):0!==m%2&&(n=Math.max(n,b?k[m].gb.width:k[m].gb.height));else 1===l&&(qa=b?k[0].gb.width:k[0].gb.height);if(r){switch(p){case yr:T=135>g?Lr(a,k,qa,A,E):Mr(a,k,qa,A,E);qa=T.x;A=T.width;E=T.height;break;case zr:for(m=0;m<l;m++){var n=k[m],Ha=n.gb,J=0===Aa?0:y;b?(n.oa.n(h-Ha.width,aa+J),A=Math.max(A,Ha.width),E=Math.max(E,aa+J+Ha.height),aa+=J+Ha.height):(n.oa.n(P+J,h-Ha.height),A=Math.max(A,
- P+J+Ha.width),E=Math.max(E,Ha.height),P+=J+Ha.width);Aa++}break;case Ar:for(m=0;m<l;m++)n=k[m],Ha=n.gb,J=0===Aa?0:y,b?(n.oa.n(t/2+a.P.x,aa+J),A=Math.max(A,Ha.width),E=Math.max(E,aa+J+Ha.height),aa+=J+Ha.height):(n.oa.n(P+J,t/2+a.P.y),A=Math.max(A,P+J+Ha.width),E=Math.max(E,Ha.height),P+=J+Ha.width),Aa++}J=Nr(this,2);W=Nr(this,2);b?(J[0].n(0,0),J[1].n(0,E),W[0].n(A,0)):(J[0].n(0,0),J[1].n(A,0),W[0].n(0,E));W[1].n(A,E)}else for(m=0;m<l;m++){n=k[m];Ha=n.gb;if(b){0<s&&0<Aa&&P+t+Ha.width>s&&(P<h&&Or(a,
- p,h-P,0,Sa,m-1),La++,Aa=0,Sa=m,N=E,P=0,aa=135<g?-E-y:E+y);Pr(this,n,0,aa);var wa=0;if(0===Aa){if(J=n.lt,W=n.Et,ea=Ha.width,T=Ha.height,null===J||null===W||g!==Gr(n))J=Nr(this,2),W=Nr(this,2),J[0].n(0,0),J[1].n(0,T),W[0].n(ea,0),W[1].n(ea,T)}else{var ec=w.nb(),T=Qr(this,a,n,J,W,ea,T,ec),wa=T.x,J=ec[0],W=ec[1],ea=T.width,T=T.height;w.xa(ec);P<Ha.width&&0>wa&&(Rr(a,-wa,0,Sa,m-1),Sr(J,-wa,0),Sr(W,-wa,0),wa=0)}n.oa.n(wa,aa);A=Math.max(A,ea);E=Math.max(E,N+(0===La?0:y)+Ha.height);P=ea}else{0<s&&0<Aa&&aa+
- t+Ha.height>s&&(aa<h&&Or(a,p,0,h-aa,Sa,m-1),La++,Aa=0,Sa=m,N=A,aa=0,P=135<g?-A-y:A+y);Pr(this,n,P,0);wa=0;if(0===Aa){if(J=n.lt,W=n.Et,ea=Ha.width,T=Ha.height,null===J||null===W||g!==Gr(n))J=Nr(this,2),W=Nr(this,2),J[0].n(0,0),J[1].n(ea,0),W[0].n(0,T),W[1].n(ea,T)}else ec=w.nb(),T=Qr(this,a,n,J,W,ea,T,ec),wa=T.x,J=ec[0],W=ec[1],ea=T.width,T=T.height,w.xa(ec),aa<Ha.height&&0>wa&&(Rr(a,0,-wa,Sa,m-1),Sr(J,0,-wa),Sr(W,0,-wa),wa=0);n.oa.n(P,wa);E=Math.max(E,T);A=Math.max(A,N+(0===La?0:y)+Ha.width);aa=T}Aa++}0<
- La&&(b?(E+=Math.max(0,c),P<A&&Or(a,p,A-P,0,Sa,l-1),0<B&&(q||Rr(a,B,0,0,l-1),A+=B)):(A+=Math.max(0,c),aa<E&&Or(a,p,0,E-aa,Sa,l-1),0<B&&(q||Rr(a,0,B,0,l-1),E+=B)));q=h=0;switch(p){case Tr:b?h+=A/2-a.P.x-v/2:q+=E/2-a.P.y-v/2;break;case wr:0<La?b?h+=A/2-a.P.x-v/2:q+=E/2-a.P.y-v/2:b?(m=k[0].oa.x+k[0].Qa.x,qa=k[l-1].oa.x+k[l-1].Qa.x+2*k[l-1].P.x,h+=m+(qa-m)/2-a.P.x-v/2):(m=k[0].oa.y+k[0].Qa.y,qa=k[l-1].oa.y+k[l-1].Qa.y+2*k[l-1].P.y,q+=m+(qa-m)/2-a.P.y-v/2);break;case Hr:b?(h-=v,A+=v):(q-=v,E+=v);break;
- case Ir:b?(h+=A-a.width+v,A+=v):(q+=E-a.height+v,E+=v);break;case yr:b?h=1<l?h+(qa+t/2-a.P.x):h+(k[0].P.x-a.P.x+k[0].Qa.x):q=1<l?q+(qa+t/2-a.P.y):q+(k[0].P.y-a.P.y+k[0].Qa.y);break;case zr:b?h+=A+t/2-a.P.x:q+=E+t/2-a.P.y;break;case Ar:break;default:w.l("Unhandled alignment value "+p.toString())}for(m=0;m<l;m++)n=k[m],b?n.oa.n(n.oa.x+n.Qa.x-h,n.oa.y+(135<g?(r?-E:-n.gb.height)+n.Qa.y-c:e+c+n.Qa.y)):n.oa.n(n.oa.x+(135<g?(r?-A:-n.gb.width)+n.Qa.x-c:d+c+n.Qa.x),n.oa.y+n.Qa.y-q);l=k=0;r?b?(A=Ur(a,A,h),
- 0>h&&(h=0),135<g&&(q+=E+c),E+=e+c,p===Ar&&(k+=t/2+a.P.x),l+=e+c):(135<g&&(h+=A+c),A+=d+c,E=Vr(a,E,q),0>q&&(q=0),p===Ar&&(l+=t/2+a.P.y),k+=d+c):b?(null===a.comments?d>A&&(p=Wr(p,d-A,0),k=p.x,l=p.y,A=d,h=0):A=Ur(a,A,h),0>h&&(k-=h,h=0),135<g&&(q+=E+c),E=Math.max(Math.max(E,e),E+e+c),l+=e+c):(135<g&&(h+=A+c),A=Math.max(Math.max(A,d),A+d+c),null===a.comments?e>E&&(p=Wr(p,0,e-E),k=p.x,l=p.y,E=e,q=0):E=Vr(a,E,q),0>q&&(l-=q,q=0),k+=d+c);if(0<La)g=Nr(this,4),p=Nr(this,4),b?(g[2].n(0,e+c),g[3].n(g[2].x,E),
- p[2].n(A,g[2].y),p[3].n(p[2].x,g[3].y)):(g[2].n(d+c,0),g[3].n(A,g[2].y),p[2].n(g[2].x,E),p[3].n(g[3].x,p[2].y));else{g=Nr(this,J.length+2);p=Nr(this,W.length+2);for(m=0;m<J.length;m++)r=J[m],g[m+2].n(r.x+k,r.y+l);for(m=0;m<W.length;m++)r=W[m],p[m+2].n(r.x+k,r.y+l)}b?(g[0].n(h,0),g[1].n(g[0].x,e),g[2].y<g[1].y&&(g[2].x>g[0].x?g[2].assign(g[1]):g[1].assign(g[2])),g[3].y<g[2].y&&(g[3].x>g[0].x?g[3].assign(g[2]):g[2].assign(g[3])),p[0].n(h+d,0),p[1].n(p[0].x,e),p[2].y<p[1].y&&(p[2].x<p[0].x?p[2].assign(p[1]):
- p[1].assign(p[2])),p[3].y<p[2].y&&(p[3].x<p[0].x?p[3].assign(p[2]):p[2].assign(p[3])),g[2].y-=c/2,p[2].y-=c/2):(g[0].n(0,q),g[1].n(d,g[0].y),g[2].x<g[1].x&&(g[2].y>g[0].y?g[2].assign(g[1]):g[1].assign(g[2])),g[3].x<g[2].x&&(g[3].y>g[0].y?g[3].assign(g[2]):g[2].assign(g[3])),p[0].n(0,q+e),p[1].n(d,p[0].y),p[2].x<p[1].x&&(p[2].y<p[0].y?p[2].assign(p[1]):p[1].assign(p[2])),p[3].x<p[2].x&&(p[3].y<p[0].y?p[3].assign(p[2]):p[2].assign(p[3])),g[2].x-=c/2,p[2].x-=c/2);Xr(this,J);Xr(this,W);a.lt=g;a.Et=p;
- a.Qa.n(h,q);a.gb.n(A,E)}break;default:w.l("Unhandled compaction value "+a.compaction.toString())}}};
- function Er(a,b){u&&w.k(b,cr,Z,"layoutTreeNone:v");if(0===b.Mm){var c=!1,d=0,e=wr;null!==b.parent&&(d=b.parent.angle,e=b.parent.alignment,c=xr(e));e=Cr(b);b.oa.n(0,0);b.gb.n(b.width,b.height);null===b.parent||null===b.comments||(180!==d&&270!==d||c)&&!e?b.Qa.n(0,0):180===d&&!c||(90===d||270===d)&&e?b.Qa.n(b.width-2*b.P.x,0):b.Qa.n(0,b.height-2*b.P.y)}else{for(var c=Gr(b),d=90===c||270===c,g=0,e=b.children,h=e.length,k=0;k<h;k++)var l=e[k],g=Math.max(g,d?l.gb.width:l.gb.height);var m=b.alignment,n=
- m===Hr,p=m===Ir,q=xr(m),r=Math.max(0,b.breadthLimit),s=Jr(b),t=b.nodeSpacing,v=Kr(b),y=n||p?0:v/2,B=b.rowSpacing,A=0;if(n||p||b.zp||b.Ap&&1===b.maxGenerationCount)A=Math.max(0,b.rowIndent);var n=b.width,E=b.height,N=0,J=0,W=0,ea=0,T=0,P=0,aa=0,La=0,Aa=0,Sa=0;q&&!Br(m)&&135<c&&e.reverse();if(Br(m))if(1<h)for(k=0;k<h;k++){var l=e[k],qa=l.gb;0===k%2&&k!==h-1?Aa=Math.max(Aa,(d?qa.width:qa.height)+Yr(l)-t):0!==k%2&&(Sa=Math.max(Sa,(d?qa.width:qa.height)+Yr(l)-t))}else 1===h&&(Aa=d?e[0].gb.width:e[0].gb.height);
- if(q)switch(m){case yr:case nr:J=135>c?Lr(b,e,Aa,N,J):Mr(b,e,Aa,N,J);Aa=J.x;N=J.width;J=J.height;break;case zr:for(k=0;k<h;k++)l=e[k],qa=l.gb,r=0===aa?0:B,d?(l.oa.n(g-qa.width,T+r),N=Math.max(N,qa.width),J=Math.max(J,T+r+qa.height),T+=r+qa.height):(l.oa.n(ea+r,g-qa.height),N=Math.max(N,ea+r+qa.width),J=Math.max(J,qa.height),ea+=r+qa.width),aa++;break;case Ar:for(g=0;g<h;g++)l=e[g],qa=l.gb,r=0===aa?0:B,d?(l.oa.n(t/2+b.P.x,T+r),N=Math.max(N,qa.width),J=Math.max(J,T+r+qa.height),T+=r+qa.height):(l.oa.n(ea+
- r,t/2+b.P.y),N=Math.max(N,ea+r+qa.width),J=Math.max(J,qa.height),ea+=r+qa.width),aa++}else for(k=0;k<h;k++)l=e[k],qa=l.gb,d?(0<r&&0<aa&&ea+t+qa.width>r&&(ea<g&&Or(b,m,g-ea,0,La,k-1),P++,aa=0,La=k,W=J,ea=0,T=135<c?-J-B:J+B),Sa=0===aa?y:t,Pr(a,l,0,T),l.oa.n(ea+Sa,T),N=Math.max(N,ea+Sa+qa.width),J=Math.max(J,W+(0===P?0:B)+qa.height),ea+=Sa+qa.width):(0<r&&0<aa&&T+t+qa.height>r&&(T<g&&Or(b,m,0,g-T,La,k-1),P++,aa=0,La=k,W=N,T=0,ea=135<c?-N-B:N+B),Sa=0===aa?y:t,Pr(a,l,ea,0),l.oa.n(ea,T+Sa),J=Math.max(J,
- T+Sa+qa.height),N=Math.max(N,W+(0===P?0:B)+qa.width),T+=Sa+qa.height),aa++;0<P&&(d?(J+=Math.max(0,s),ea<N&&Or(b,m,N-ea,0,La,h-1),0<A&&(p||Rr(b,A,0,0,h-1),N+=A)):(N+=Math.max(0,s),T<J&&Or(b,m,0,J-T,La,h-1),0<A&&(p||Rr(b,0,A,0,h-1),J+=A)));A=p=0;switch(m){case Tr:d?p+=N/2-b.P.x-v/2:A+=J/2-b.P.y-v/2;break;case wr:0<P?d?p+=N/2-b.P.x-v/2:A+=J/2-b.P.y-v/2:d?(m=e[0].oa.x+e[0].Qa.x,t=e[h-1].oa.x+e[h-1].Qa.x+2*e[h-1].P.x,p+=m+(t-m)/2-b.P.x-v/2):(m=e[0].oa.y+e[0].Qa.y,t=e[h-1].oa.y+e[h-1].Qa.y+2*e[h-1].P.y,
- A+=m+(t-m)/2-b.P.y-v/2);break;case Hr:d?(p-=v,N+=v):(A-=v,J+=v);break;case Ir:d?(p+=N-b.width+v,N+=v):(A+=J-b.height+v,J+=v);break;case yr:case nr:d?p=1<h?p+(Aa+t/2-b.P.x):p+(e[0].P.x-b.P.x+e[0].Qa.x):A=1<h?A+(Aa+t/2-b.P.y):A+(e[0].P.y-b.P.y+e[0].Qa.y);break;case zr:d?p+=N+t/2-b.P.x:A+=J+t/2-b.P.y;break;case Ar:break;default:w.l("Unhandled alignment value "+m.toString())}for(k=0;k<h;k++)l=e[k],d?l.oa.n(l.oa.x+l.Qa.x-p,l.oa.y+(135<c?(q?-J:-l.gb.height)+l.Qa.y-s:E+s+l.Qa.y)):l.oa.n(l.oa.x+(135<c?(q?
- -N:-l.gb.width)+l.Qa.x-s:n+s+l.Qa.x),l.oa.y+l.Qa.y-A);d?(N=Ur(b,N,p),0>p&&(p=0),135<c&&(A+=J+s),J+=E+s):(135<c&&(p+=N+s),N+=n+s,J=Vr(b,J,A),0>A&&(A=0));b.Qa.n(p,A);b.gb.n(N,J)}}
- function Lr(a,b,c,d,e){u&&w.k(a,cr,Z,"layoutBusChildrenPosDir:v");var g=b.length;if(0===g)return new x(c,0,d,e);if(1===g){var h=b[0];d=h.gb.width;e=h.gb.height;return new x(c,0,d,e)}for(var k=a.nodeSpacing,l=a.rowSpacing,m=90===Gr(a),n=0,p=0,q=0,r=0;r<g;r++)if(!(0!==r%2||1<g&&r===g-1)){var h=b[r],s=h.gb,t=0===n?0:l;if(m){var v=Yr(h)-k;h.oa.n(c-(s.width+v),q+t);d=Math.max(d,s.width+v);e=Math.max(e,q+t+s.height);q+=t+s.height}else v=Yr(h)-k,h.oa.n(p+t,c-(s.height+v)),e=Math.max(e,s.height+v),d=Math.max(d,
- p+t+s.width),p+=t+s.width;n++}var n=0,y=p,B=q;m?(p=c+k,q=0):(p=0,q=c+k);for(r=0;r<g;r++)0!==r%2&&(h=b[r],s=h.gb,t=0===n?0:l,m?(v=Yr(h)-k,h.oa.n(p+v,q+t),d=Math.max(d,p+s.width+v),e=Math.max(e,q+t+s.height),q+=t+s.height):(v=Yr(h)-k,h.oa.n(p+t,q+v),d=Math.max(d,p+t+s.width),e=Math.max(e,q+s.height+v),p+=t+s.width),n++);1<g&&1===g%2&&(h=b[g-1],s=h.gb,b=ds(h,m?Math.max(Math.abs(B),Math.abs(q)):Math.max(Math.abs(y),Math.abs(p))),m?(h.oa.n(c+k/2-h.P.x-h.Qa.x,e+b),m=c+k/2-h.P.x-h.Qa.x,d=Math.max(d,m+s.width),
- 0>m&&(d-=m),e=Math.max(e,Math.max(B,q)+b+s.height),0>h.oa.x&&(c=es(a,h.oa.x,!1,c,k))):(h.oa.n(d+b,c+k/2-h.P.y-h.Qa.y),d=Math.max(d,Math.max(y,p)+b+s.width),m=c+k/2-h.P.y-h.Qa.y,e=Math.max(e,m+s.height),0>m&&(e-=m),0>h.oa.y&&(c=es(a,h.oa.y,!0,c,k))));return new x(c,0,d,e)}
- function Mr(a,b,c,d,e){u&&w.k(a,cr,Z,"layoutBusChildrenNegDir:v");var g=b.length;if(0===g)return new x(c,0,d,e);if(1===g){var h=b[0];d=h.gb.width;e=h.gb.height;return new x(c,0,d,e)}for(var k=a.nodeSpacing,l=a.rowSpacing,m=270===Gr(a),n=0,p=0,q=0,r=0;r<g;r++)if(!(0!==r%2||1<g&&r===g-1)){var h=b[r],s=h.gb,t=0===n?0:l;if(m){var v=Yr(h)-k,q=q-(t+s.height);h.oa.n(c-(s.width+v),q);d=Math.max(d,s.width+v);e=Math.max(e,Math.abs(q))}else v=Yr(h)-k,p-=t+s.width,h.oa.n(p,c-(s.height+v)),e=Math.max(e,s.height+
- v),d=Math.max(d,Math.abs(p));n++}var n=0,y=p,B=q;m?(p=c+k,q=0):(p=0,q=c+k);for(r=0;r<g;r++)0!==r%2&&(h=b[r],s=h.gb,t=0===n?0:l,m?(v=Yr(h)-k,q-=t+s.height,h.oa.n(p+v,q),d=Math.max(d,p+s.width+v),e=Math.max(e,Math.abs(q))):(v=Yr(h)-k,p-=t+s.width,h.oa.n(p,q+v),e=Math.max(e,q+s.height+v),d=Math.max(d,Math.abs(p))),n++);1<g&&1===g%2&&(h=b[g-1],s=h.gb,l=ds(h,m?Math.max(Math.abs(B),Math.abs(q)):Math.max(Math.abs(y),Math.abs(p))),m?(h.oa.n(c+k/2-h.P.x-h.Qa.x,-e-s.height-l),p=c+k/2-h.P.x-h.Qa.x,d=Math.max(d,
- p+s.width),0>p&&(d-=p),e=Math.max(e,Math.abs(Math.min(B,q))+l+s.height),0>h.oa.x&&(c=es(a,h.oa.x,!1,c,k))):(h.oa.n(-d-s.width-l,c+k/2-h.P.y-h.Qa.y),d=Math.max(d,Math.abs(Math.min(y,p))+l+s.width),p=c+k/2-h.P.y-h.Qa.y,e=Math.max(e,p+s.height),0>p&&(e-=p),0>h.oa.y&&(c=es(a,h.oa.y,!0,c,k))));for(r=0;r<g;r++)h=b[r],m?h.oa.n(h.oa.x,h.oa.y+e):h.oa.n(h.oa.x+d,h.oa.y);return new x(c,0,d,e)}function Yr(a){u&&w.k(a,cr,Z,"fixRelativePostions:child");return null===a.parent?0:a.parent.nodeSpacing}
- function ds(a){u&&w.k(a,cr,Z,"fixRelativePostions:lastchild");return null===a.parent?0:a.parent.rowSpacing}function es(a,b,c,d,e){u&&w.k(a,cr,Z,"fixRelativePostions:v");a=a.children;for(var g=a.length,h=0;h<g;h++)c?a[h].oa.n(a[h].oa.x,a[h].oa.y-b):a[h].oa.n(a[h].oa.x-b,a[h].oa.y);b=a[g-1];return Math.max(d,c?b.Qa.y+b.P.y-e/2:b.Qa.x+b.P.x-e/2)}
- function Ur(a,b,c){u&&w.k(a,cr,Z,"calculateSubwidth:v");switch(a.alignment){case wr:case Tr:var d=b;c+a.width>d&&(d=c+a.width);0>c&&(d-=c);return d;case Hr:return a.width>b?a.width:b;case Ir:return 2*a.P.x>b?a.width:b+a.width-2*a.P.x;case yr:case nr:return d=Math.min(0,c),c=Math.max(b,c+a.width),Math.max(a.width,c-d);case zr:return a.width-a.P.x+a.nodeSpacing/2+b;case Ar:return Math.max(a.width,a.P.x+a.nodeSpacing/2+b);default:return b}}
- function Vr(a,b,c){u&&w.k(a,cr,Z,"calculateSubheight:v");switch(a.alignment){case wr:case Tr:var d=b;c+a.height>d&&(d=c+a.height);0>c&&(d-=c);return d;case Hr:return a.height>b?a.height:b;case Ir:return 2*a.P.y>b?a.height:b+a.height-2*a.P.y;case yr:case nr:return d=Math.min(0,c),c=Math.max(b,c+a.height),Math.max(a.height,c-d);case zr:return a.height-a.P.y+a.nodeSpacing/2+b;case Ar:return Math.max(a.height,a.P.y+a.nodeSpacing/2+b);default:return b}}
- function Wr(a,b,c){u&&w.k(a,la,Z,"alignOffset:align");switch(a){case Tr:b/=2;c/=2;break;case wr:b/=2;c/=2;break;case Hr:c=b=0;break;case Ir:break;default:w.l("Unhandled alignment value "+a.toString())}return new I(b,c)}function Or(a,b,c,d,e,g){u&&w.k(a,cr,Z,"shiftRelPosAlign:v");u&&w.k(b,la,Z,"shiftRelPosAlign:align");b=Wr(b,c,d);Rr(a,b.x,b.y,e,g)}function Rr(a,b,c,d,e){u&&w.k(a,cr,Z,"shiftRelPos:v");if(0!==b||0!==c)for(a=a.children;d<=e;d++){var g=a[d].oa;g.x+=b;g.y+=c}}
- function Pr(a,b,c,d){u&&(w.k(b,cr,Z,"recordMidPoints:v"),w.g(c,"number",Z,"recordMidPoints:x"),w.g(d,"number",Z,"recordMidPoints:y"));var e=b.parent;switch(a.Hf){case Zq:for(a=b.sc;a.next();)b=a.value,b.fromVertex===e&&b.Hr.n(c,d);break;case fr:for(a=b.hc;a.next();)b=a.value,b.toVertex===e&&b.Hr.n(c,d);break;default:w.l("Unhandled path value "+a.Hf.toString())}}function Sr(a,b,c){for(var d=0;d<a.length;d++){var e=a[d];e.x+=b;e.y+=c}}
- function Qr(a,b,c,d,e,g,h,k){u&&w.k(b,cr,Z,"mergeFringes:parent");u&&w.k(c,cr,Z,"mergeFringes:child");var l=Gr(b),m=90===l||270===l,n=b.nodeSpacing;b=d;var p=e;d=g;e=h;var q=c.lt,r=c.Et;h=c.gb;var s=m?Math.max(e,h.height):Math.max(d,h.width);if(null===q||l!==Gr(c))q=Nr(a,2),r=Nr(a,2),m?(q[0].n(0,0),q[1].n(0,h.height),r[0].n(h.width,0),r[1].n(r[0].x,q[1].y)):(q[0].n(0,0),q[1].n(h.width,0),r[0].n(0,h.height),r[1].n(q[1].x,r[0].y));if(m){c=d;d=9999999;if(!(null===p||2>p.length||null===q||2>q.length))for(m=
- l=0;l<p.length&&m<q.length;){e=p[l];var t=q[m];g=t.x;var v=t.y;g+=c;var y=e;l+1<p.length&&(y=p[l+1]);var B=t,t=B.x,B=B.y;m+1<q.length&&(B=q[m+1],t=B.x,B=B.y,t+=c);var A=d;e.y===v?A=g-e.x:e.y>v&&e.y<B?A=g+(e.y-v)/(B-v)*(t-g)-e.x:v>e.y&&v<y.y&&(A=g-(e.x+(v-e.y)/(y.y-e.y)*(y.x-e.x)));A<d&&(d=A);y.y<=e.y?l++:B<=v?m++:(y.y<=B&&l++,B<=y.y&&m++)}c-=d;c+=n;l=q;m=c;if(null===b||2>b.length||null===l||2>l.length)d=null;else{n=Nr(a,b.length+l.length);for(d=g=e=0;g<l.length&&l[g].y<b[0].y;)v=l[g++],n[d++].n(v.x+
- m,v.y);for(;e<b.length;)v=b[e++],n[d++].n(v.x,v.y);for(e=b[b.length-1].y;g<l.length&&l[g].y<=e;)g++;for(;g<l.length&&l[g].y>e;)v=l[g++],n[d++].n(v.x+m,v.y);l=Nr(a,d);for(e=0;e<d;e++)l[e].assign(n[e]);Xr(a,n);d=l}g=r;v=c;if(null===p||2>p.length||null===g||2>g.length)e=null;else{n=Nr(a,p.length+g.length);for(m=y=l=0;l<p.length&&p[l].y<g[0].y;)e=p[l++],n[m++].n(e.x,e.y);for(;y<g.length;)e=g[y++],n[m++].n(e.x+v,e.y);for(g=g[g.length-1].y;l<p.length&&p[l].y<=g;)l++;for(;l<p.length&&p[l].y>g;)e=p[l++],
- n[m++].n(e.x,e.y);e=Nr(a,m);for(l=0;l<m;l++)e[l].assign(n[l]);Xr(a,n)}g=Math.max(0,c)+h.width;h=s}else{c=e;d=9999999;if(!(null===p||2>p.length||null===q||2>q.length))for(m=l=0;l<p.length&&m<q.length;)e=p[l],t=q[m],g=t.x,v=t.y,v+=c,y=e,l+1<p.length&&(y=p[l+1]),B=t,t=B.x,B=B.y,m+1<q.length&&(B=q[m+1],t=B.x,B=B.y,B+=c),A=d,e.x===g?A=v-e.y:e.x>g&&e.x<t?A=v+(e.x-g)/(t-g)*(B-v)-e.y:g>e.x&&g<y.x&&(A=v-(e.y+(g-e.x)/(y.x-e.x)*(y.y-e.y))),A<d&&(d=A),y.x<=e.x?l++:t<=g?m++:(y.x<=t&&l++,t<=y.x&&m++);c-=d;c+=n;
- l=q;m=c;if(null===b||2>b.length||null===l||2>l.length)d=null;else{n=Nr(a,b.length+l.length);for(d=g=e=0;g<l.length&&l[g].x<b[0].x;)v=l[g++],n[d++].n(v.x,v.y+m);for(;e<b.length;)v=b[e++],n[d++].n(v.x,v.y);for(e=b[b.length-1].x;g<l.length&&l[g].x<=e;)g++;for(;g<l.length&&l[g].x>e;)v=l[g++],n[d++].n(v.x,v.y+m);l=Nr(a,d);for(e=0;e<d;e++)l[e].assign(n[e]);Xr(a,n);d=l}g=r;v=c;if(null===p||2>p.length||null===g||2>g.length)e=null;else{n=Nr(a,p.length+g.length);for(m=y=l=0;l<p.length&&p[l].x<g[0].x;)e=p[l++],
- n[m++].n(e.x,e.y);for(;y<g.length;)e=g[y++],n[m++].n(e.x,e.y+v);for(g=g[g.length-1].x;l<p.length&&p[l].x<=g;)l++;for(;l<p.length&&p[l].x>g;)e=p[l++],n[m++].n(e.x,e.y);e=Nr(a,m);for(l=0;l<m;l++)e[l].assign(n[l]);Xr(a,n)}g=s;h=Math.max(0,c)+h.height}Xr(a,b);Xr(a,q);Xr(a,p);Xr(a,r);k[0]=d;k[1]=e;return new x(c,0,g,h)}function Nr(a,b){var c=a.az[b];if(void 0!==c&&(c=c.pop(),void 0!==c))return c;for(var c=[],d=0;d<b;d++)c[d]=new I;return c}
- function Xr(a,b){var c=b.length,d=a.az[c];void 0===d&&(d=[],a.az[c]=d);d.push(b)}
- Z.prototype.arrangeTrees=function(){if(this.ed===er)for(var a=this.Ad.j;a.next();){var b=a.value;if(b instanceof cr){var c=b.Kc;if(null!==c){var d=c.position,c=d.x,d=d.y;isFinite(c)||(c=0);isFinite(d)||(d=0);fs(this,b,c,d)}}}else for(a=this.de,b=a.x,c=a.y,a=this.Ad.j;a.next();)if(d=a.value,d instanceof cr)switch(fs(this,d,b+d.Qa.x,c+d.Qa.y),this.ed){case br:c+=d.gb.height+this.gg.height;break;case gs:b+=d.gb.width+this.gg.width;break;default:w.l("Unhandled arrangement value "+this.ed.toString())}};
- function fs(a,b,c,d){if(null!==b){u&&w.k(b,cr,Z,"assignAbsolutePositions:v");b.x=c;b.y=d;b=b.children;for(var e=b.length,g=0;g<e;g++){var h=b[g];fs(a,h,c+h.oa.x,d+h.oa.y)}}}Z.prototype.commitLayout=function(){this.BA();this.commitNodes();this.qz();this.it&&this.commitLinks()};Z.prototype.commitNodes=function(){for(var a=this.network.vertexes.j;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)};
- Z.prototype.qz=function(){if(this.Xz===kr){for(var a=this.aB,b=[],c=null,d=this.network.vertexes.j;d.next();){var e=d.value;null===c?c=e.ub.copy():c.hi(e.ub);var g=b[e.level],g=void 0===g?Jr(e):Math.max(g,Jr(e));b[e.level]=g}for(d=0;d<b.length;d++)void 0===b[d]&&(b[d]=0);90===this.angle||270===this.angle?(c.Tf(this.nodeSpacing/2,this.layerSpacing),e=new I(-this.nodeSpacing/2,-this.layerSpacing/2)):(c.Tf(this.layerSpacing,this.nodeSpacing/2),e=new I(-this.layerSpacing/2,-this.nodeSpacing/2));var g=
- [],c=90===this.angle||270===this.angle?c.width:c.height,h=0;if(180===this.angle||270===this.angle)for(d=0;d<a.length;d++)h+=a[d]+b[d];for(d=0;d<a.length;d++){var k=a[d]+b[d];270===this.angle?(h-=k,g.push(new x(0,h,c,k))):90===this.angle?(g.push(new x(0,h,c,k)),h+=k):180===this.angle?(h-=k,g.push(new x(h,0,k,c))):(g.push(new x(h,0,k,c)),h+=k)}this.commitLayers(g,e)}};Z.prototype.commitLayers=function(){};Z.prototype.commitLinks=function(){for(var a=this.network.edges.j;a.next();)a.value.commit()};
- Z.prototype.BA=function(){for(var a=this.Ad.j;a.next();){var b=a.value;b instanceof cr&&hs(this,b)}};function hs(a,b){if(null!==b){u&&w.k(b,cr,Z,"setPortSpotsTree:v");a.setPortSpots(b);for(var c=b.children,d=c.length,e=0;e<d;e++)hs(a,c[e])}}
- Z.prototype.setPortSpots=function(a){u&&w.k(a,cr,Z,"setPortSpots:v");var b=a.alignment;if(xr(b)){u&&w.k(a,cr,Z,"setPortSpotsBus:v");u&&w.k(b,la,Z,"setPortSpots:align");var c=this.Hf===Zq,d=Gr(a),e;switch(d){case 0:e=Xc;break;case 90:e=Yc;break;case 180:e=Wc;break;default:e=Qc}var g=a.children,h=g.length;switch(b){case yr:case nr:for(b=0;b<h;b++){var k=g[b],k=(c?k.sc:k.hc).first();if(null!==k&&(k=k.link,null!==k)){var l=90===d||270===d?Wc:Qc;if(1===h||b===h-1&&1===h%2)switch(d){case 0:l=Wc;break;case 90:l=
- Qc;break;case 180:l=Xc;break;default:l=Yc}else 0===b%2&&(l=90===d||270===d?Xc:Yc);c?(a.setsPortSpot&&(k.Cb=e),a.setsChildPortSpot&&(k.Eb=l)):(a.setsPortSpot&&(k.Cb=l),a.setsChildPortSpot&&(k.Eb=e))}}break;case zr:l=90===d||270===d?Xc:Yc;for(d=c?a.hc:a.sc;d.next();)k=d.value.link,null!==k&&(c?(a.setsPortSpot&&(k.Cb=e),a.setsChildPortSpot&&(k.Eb=l)):(a.setsPortSpot&&(k.Cb=l),a.setsChildPortSpot&&(k.Eb=e)));break;case Ar:for(l=90===d||270===d?Wc:Qc,d=c?a.hc:a.sc;d.next();)k=d.value.link,null!==k&&(c?
- (a.setsPortSpot&&(k.Cb=e),a.setsChildPortSpot&&(k.Eb=l)):(a.setsPortSpot&&(k.Cb=l),a.setsChildPortSpot&&(k.Eb=e)))}}else if(c=Gr(a),this.Hf===Zq)for(e=a.hc;e.next();){if(d=e.value.link,null!==d){if(a.setsPortSpot)if(a.portSpot.Uc())switch(c){case 0:d.Cb=Xc;break;case 90:d.Cb=Yc;break;case 180:d.Cb=Wc;break;default:d.Cb=Qc}else d.Cb=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Uc())switch(c){case 0:d.Eb=Wc;break;case 90:d.Eb=Qc;break;case 180:d.Eb=Xc;break;default:d.Eb=Yc}else d.Eb=a.childPortSpot}}else for(e=
- a.sc;e.next();)if(d=e.value.link,null!==d){if(a.setsPortSpot)if(a.portSpot.Uc())switch(c){case 0:d.Eb=Xc;break;case 90:d.Eb=Yc;break;case 180:d.Eb=Wc;break;default:d.Eb=Qc}else d.Eb=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Uc())switch(c){case 0:d.Cb=Wc;break;case 90:d.Cb=Qc;break;case 180:d.Cb=Xc;break;default:d.Cb=Yc}else d.Cb=a.childPortSpot}};function Gr(a){a=a.angle;return 45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}
- function Jr(a){u&&w.k(a,cr,Z,"computeLayerSpacing:v");var b=Gr(a),b=90===b||270===b,c=a.layerSpacing;if(0<a.layerSpacingParentOverlap)var d=Math.min(1,a.layerSpacingParentOverlap),c=c-(b?a.height*d:a.width*d);c<(b?-a.height:-a.width)&&(c=b?-a.height:-a.width);return c}function Kr(a){u&&w.k(a,cr,Z,"computeNodeIndent:v");var b=Gr(a),b=90===b||270===b,c=a.nodeIndent;if(0<a.nodeIndentPastParent)var d=Math.min(1,a.nodeIndentPastParent),c=c+(b?a.width*d:a.height*d);return c=Math.max(0,c)}
- w.defineProperty(Z,{iL:"roots"},function(){return this.Ad},function(a){this.Ad!==a&&(w.k(a,L,Z,"roots"),this.Ad=a,this.K())});w.defineProperty(Z,{path:"path"},function(){return this.zr},function(a){this.zr!==a&&(w.Ea(a,Z,Z,"path"),this.zr=a,this.K())});w.defineProperty(Z,{nJ:"treeStyle"},function(){return this.qs},function(a){this.ed!==a&&(w.Ea(a,Z,Z,"treeStyle"),a===$q||a===qr||a===rr||a===pr)&&(this.qs=a,this.K())});
- w.defineProperty(Z,{Xz:"layerStyle"},function(){return this.Zu},function(a){this.ed!==a&&(w.Ea(a,Z,Z,"layerStyle"),a===ar||a===lr||a===kr)&&(this.Zu=a,this.K())});w.defineProperty(Z,{comments:"comments"},function(){return this.Dh},function(a){this.Dh!==a&&(w.g(a,"boolean",Z,"comments"),this.Dh=a,this.K())});w.defineProperty(Z,{Pf:"arrangement"},function(){return this.ed},function(a){this.ed!==a&&(w.Ea(a,Z,Z,"arrangement"),a===br||a===gs||a===er)&&(this.ed=a,this.K())});
- w.defineProperty(Z,{pD:"arrangementSpacing"},function(){return this.gg},function(a){w.k(a,pa,Z,"arrangementSpacing");this.gg.N(a)||(this.gg.assign(a),this.K())});w.defineProperty(Z,{hL:"rootDefaults"},function(){return this.wa},function(a){this.wa!==a&&(w.k(a,cr,Z,"rootDefaults"),this.wa=a,this.K())});w.defineProperty(Z,{BJ:"alternateDefaults"},function(){return this.ua},function(a){this.ua!==a&&(w.k(a,cr,Z,"alternateDefaults"),this.ua=a,this.K())});
- w.defineProperty(Z,{sorting:"sorting"},function(){return this.wa.sorting},function(a){this.wa.sorting!==a&&(w.Ea(a,Z,Z,"sorting"),a===sr||a===tr||a===ur||vr)&&(this.wa.sorting=a,this.K())});w.defineProperty(Z,{comparer:"comparer"},function(){return this.wa.comparer},function(a){this.wa.comparer!==a&&(w.g(a,"function",Z,"comparer"),this.wa.comparer=a,this.K())});
- w.defineProperty(Z,{angle:"angle"},function(){return this.wa.angle},function(a){this.wa.angle!==a&&(w.g(a,"number",Z,"angle"),0===a||90===a||180===a||270===a)&&(this.wa.angle=a,this.K())});w.defineProperty(Z,{alignment:"alignment"},function(){return this.wa.alignment},function(a){this.wa.alignment!==a&&(w.Ea(a,Z,Z,"alignment"),this.wa.alignment=a,this.K())});
- w.defineProperty(Z,{nodeIndent:"nodeIndent"},function(){return this.wa.nodeIndent},function(a){this.wa.nodeIndent!==a&&(w.g(a,"number",Z,"nodeIndent"),0<=a&&(this.wa.nodeIndent=a,this.K()))});w.defineProperty(Z,{nodeIndentPastParent:"nodeIndentPastParent"},function(){return this.wa.nodeIndentPastParent},function(a){this.wa.nodeIndentPastParent!==a&&(w.g(a,"number",Z,"nodeIndentPastParent"),0<=a&&1>=a&&(this.wa.nodeIndentPastParent=a,this.K()))});
- w.defineProperty(Z,{nodeSpacing:"nodeSpacing"},function(){return this.wa.nodeSpacing},function(a){this.wa.nodeSpacing!==a&&(w.g(a,"number",Z,"nodeSpacing"),this.wa.nodeSpacing=a,this.K())});w.defineProperty(Z,{layerSpacing:"layerSpacing"},function(){return this.wa.layerSpacing},function(a){this.wa.layerSpacing!==a&&(w.g(a,"number",Z,"layerSpacing"),this.wa.layerSpacing=a,this.K())});
- w.defineProperty(Z,{layerSpacingParentOverlap:"layerSpacingParentOverlap"},function(){return this.wa.layerSpacingParentOverlap},function(a){this.wa.layerSpacingParentOverlap!==a&&(w.g(a,"number",Z,"layerSpacingParentOverlap"),0<=a&&1>=a&&(this.wa.layerSpacingParentOverlap=a,this.K()))});w.defineProperty(Z,{compaction:"compaction"},function(){return this.wa.compaction},function(a){this.wa.compaction!==a&&(w.Ea(a,Z,Z,"compaction"),a===Dr||a===Fr)&&(this.wa.compaction=a,this.K())});
- w.defineProperty(Z,{breadthLimit:"breadthLimit"},function(){return this.wa.breadthLimit},function(a){this.wa.breadthLimit!==a&&(w.g(a,"number",Z,"breadthLimit"),0<=a&&(this.wa.breadthLimit=a,this.K()))});w.defineProperty(Z,{rowSpacing:"rowSpacing"},function(){return this.wa.rowSpacing},function(a){this.wa.rowSpacing!==a&&(w.g(a,"number",Z,"rowSpacing"),this.wa.rowSpacing=a,this.K())});
- w.defineProperty(Z,{rowIndent:"rowIndent"},function(){return this.wa.rowIndent},function(a){this.wa.rowIndent!==a&&(w.g(a,"number",Z,"rowIndent"),0<=a&&(this.wa.rowIndent=a,this.K()))});w.defineProperty(Z,{commentSpacing:"commentSpacing"},function(){return this.wa.commentSpacing},function(a){this.wa.commentSpacing!==a&&(w.g(a,"number",Z,"commentSpacing"),this.wa.commentSpacing=a,this.K())});
- w.defineProperty(Z,{commentMargin:"commentMargin"},function(){return this.wa.commentMargin},function(a){this.wa.commentMargin!==a&&(w.g(a,"number",Z,"commentMargin"),this.wa.commentMargin=a,this.K())});w.defineProperty(Z,{setsPortSpot:"setsPortSpot"},function(){return this.wa.setsPortSpot},function(a){this.wa.setsPortSpot!==a&&(w.g(a,"boolean",Z,"setsPortSpot"),this.wa.setsPortSpot=a,this.K())});
- w.defineProperty(Z,{portSpot:"portSpot"},function(){return this.wa.portSpot},function(a){w.k(a,Q,Z,"portSpot");this.wa.portSpot.N(a)||(this.wa.portSpot=a,this.K())});w.defineProperty(Z,{setsChildPortSpot:"setsChildPortSpot"},function(){return this.wa.setsChildPortSpot},function(a){this.wa.setsChildPortSpot!==a&&(w.g(a,"boolean",Z,"setsChildPortSpot"),this.wa.setsChildPortSpot=a,this.K())});
- w.defineProperty(Z,{childPortSpot:"childPortSpot"},function(){return this.wa.childPortSpot},function(a){w.k(a,Q,Z,"childPortSpot");this.wa.childPortSpot.N(a)||(this.wa.childPortSpot=a,this.K())});w.defineProperty(Z,{MJ:"alternateSorting"},function(){return this.ua.sorting},function(a){this.ua.sorting!==a&&(w.Ea(a,Z,Z,"alternateSorting"),a===sr||a===tr||a===ur||vr)&&(this.ua.sorting=a,this.K())});
- w.defineProperty(Z,{AJ:"alternateComparer"},function(){return this.ua.comparer},function(a){this.ua.comparer!==a&&(w.g(a,"function",Z,"alternateComparer"),this.ua.comparer=a,this.K())});w.defineProperty(Z,{uJ:"alternateAngle"},function(){return this.ua.angle},function(a){this.ua.angle!==a&&(w.g(a,"number",Z,"alternateAngle"),0===a||90===a||180===a||270===a)&&(this.ua.angle=a,this.K())});
- w.defineProperty(Z,{tJ:"alternateAlignment"},function(){return this.ua.alignment},function(a){this.ua.alignment!==a&&(w.Ea(a,Z,Z,"alternateAlignment"),this.ua.alignment=a,this.K())});w.defineProperty(Z,{EJ:"alternateNodeIndent"},function(){return this.ua.nodeIndent},function(a){this.ua.nodeIndent!==a&&(w.g(a,"number",Z,"alternateNodeIndent"),0<=a&&(this.ua.nodeIndent=a,this.K()))});
- w.defineProperty(Z,{FJ:"alternateNodeIndentPastParent"},function(){return this.ua.nodeIndentPastParent},function(a){this.ua.nodeIndentPastParent!==a&&(w.g(a,"number",Z,"alternateNodeIndentPastParent"),0<=a&&1>=a&&(this.ua.nodeIndentPastParent=a,this.K()))});w.defineProperty(Z,{GJ:"alternateNodeSpacing"},function(){return this.ua.nodeSpacing},function(a){this.ua.nodeSpacing!==a&&(w.g(a,"number",Z,"alternateNodeSpacing"),this.ua.nodeSpacing=a,this.K())});
- w.defineProperty(Z,{CJ:"alternateLayerSpacing"},function(){return this.ua.layerSpacing},function(a){this.ua.layerSpacing!==a&&(w.g(a,"number",Z,"alternateLayerSpacing"),this.ua.layerSpacing=a,this.K())});w.defineProperty(Z,{DJ:"alternateLayerSpacingParentOverlap"},function(){return this.ua.layerSpacingParentOverlap},function(a){this.ua.layerSpacingParentOverlap!==a&&(w.g(a,"number",Z,"alternateLayerSpacingParentOverlap"),0<=a&&1>=a&&(this.ua.layerSpacingParentOverlap=a,this.K()))});
- w.defineProperty(Z,{zJ:"alternateCompaction"},function(){return this.ua.compaction},function(a){this.ua.compaction!==a&&(w.Ea(a,Z,Z,"alternateCompaction"),a===Dr||a===Fr)&&(this.ua.compaction=a,this.K())});w.defineProperty(Z,{vJ:"alternateBreadthLimit"},function(){return this.ua.breadthLimit},function(a){this.ua.breadthLimit!==a&&(w.g(a,"number",Z,"alternateBreadthLimit"),0<=a&&(this.ua.breadthLimit=a,this.K()))});
- w.defineProperty(Z,{JJ:"alternateRowSpacing"},function(){return this.ua.rowSpacing},function(a){this.ua.rowSpacing!==a&&(w.g(a,"number",Z,"alternateRowSpacing"),this.ua.rowSpacing=a,this.K())});w.defineProperty(Z,{IJ:"alternateRowIndent"},function(){return this.ua.rowIndent},function(a){this.ua.rowIndent!==a&&(w.g(a,"number",Z,"alternateRowIndent"),0<=a&&(this.ua.rowIndent=a,this.K()))});
- w.defineProperty(Z,{yJ:"alternateCommentSpacing"},function(){return this.ua.commentSpacing},function(a){this.ua.commentSpacing!==a&&(w.g(a,"number",Z,"alternateCommentSpacing"),this.ua.commentSpacing=a,this.K())});w.defineProperty(Z,{xJ:"alternateCommentMargin"},function(){return this.ua.commentMargin},function(a){this.ua.commentMargin!==a&&(w.g(a,"number",Z,"alternateCommentMargin"),this.ua.commentMargin=a,this.K())});
- w.defineProperty(Z,{LJ:"alternateSetsPortSpot"},function(){return this.ua.setsPortSpot},function(a){this.ua.setsPortSpot!==a&&(w.g(a,"boolean",Z,"alternateSetsPortSpot"),this.ua.setsPortSpot=a,this.K())});w.defineProperty(Z,{HJ:"alternatePortSpot"},function(){return this.ua.portSpot},function(a){w.k(a,Q,Z,"alternatePortSpot");this.ua.portSpot.N(a)||(this.ua.portSpot=a,this.K())});
- w.defineProperty(Z,{KJ:"alternateSetsChildPortSpot"},function(){return this.ua.setsChildPortSpot},function(a){this.ua.setsChildPortSpot!==a&&(w.g(a,"boolean",Z,"alternateSetsChildPortSpot"),this.ua.setsChildPortSpot=a,this.K())});w.defineProperty(Z,{wJ:"alternateChildPortSpot"},function(){return this.ua.childPortSpot},function(a){w.k(a,Q,Z,"alternateChildPortSpot");this.ua.childPortSpot.N(a)||(this.ua.childPortSpot=a,this.K())});var Yq;Z.PathDefault=Yq=w.v(Z,"PathDefault",-1);var Zq;
- Z.PathDestination=Zq=w.v(Z,"PathDestination",0);var fr;Z.PathSource=fr=w.v(Z,"PathSource",1);var sr;Z.SortingForwards=sr=w.v(Z,"SortingForwards",10);var tr;Z.SortingReverse=tr=w.v(Z,"SortingReverse",11);var ur;Z.SortingAscending=ur=w.v(Z,"SortingAscending",12);var vr;Z.SortingDescending=vr=w.v(Z,"SortingDescending",13);var Tr;Z.AlignmentCenterSubtrees=Tr=w.v(Z,"AlignmentCenterSubtrees",20);var wr;Z.AlignmentCenterChildren=wr=w.v(Z,"AlignmentCenterChildren",21);var Hr;
- Z.AlignmentStart=Hr=w.v(Z,"AlignmentStart",22);var Ir;Z.AlignmentEnd=Ir=w.v(Z,"AlignmentEnd",23);var yr;Z.AlignmentBus=yr=w.v(Z,"AlignmentBus",24);var nr;Z.AlignmentBusBranching=nr=w.v(Z,"AlignmentBusBranching",25);var zr;Z.AlignmentTopLeftBus=zr=w.v(Z,"AlignmentTopLeftBus",26);var Ar;Z.AlignmentBottomRightBus=Ar=w.v(Z,"AlignmentBottomRightBus",27);var Dr;Z.CompactionNone=Dr=w.v(Z,"CompactionNone",30);var Fr;Z.CompactionBlock=Fr=w.v(Z,"CompactionBlock",31);var $q;
- Z.StyleLayered=$q=w.v(Z,"StyleLayered",40);var rr;Z.StyleLastParents=rr=w.v(Z,"StyleLastParents",41);var qr;Z.StyleAlternating=qr=w.v(Z,"StyleAlternating",42);var pr;Z.StyleRootOnly=pr=w.v(Z,"StyleRootOnly",43);var br;Z.ArrangementVertical=br=w.v(Z,"ArrangementVertical",50);var gs;Z.ArrangementHorizontal=gs=w.v(Z,"ArrangementHorizontal",51);var er;Z.ArrangementFixedRoots=er=w.v(Z,"ArrangementFixedRoots",52);var ar;Z.LayerIndividual=ar=w.v(Z,"LayerIndividual",60);var lr;
- Z.LayerSiblings=lr=w.v(Z,"LayerSiblings",61);var kr;Z.LayerUniform=kr=w.v(Z,"LayerUniform",62);function dr(){Da.call(this)}w.Pa(dr,Da);w.la("TreeNetwork",dr);dr.prototype.createVertex=function(){return new cr};dr.prototype.createEdge=function(){return new is};
- function cr(){Ga.call(this);this.initialized=!1;this.parent=null;this.children=[];this.maxGenerationCount=this.maxChildrenCount=this.descendantCount=this.level=0;this.comments=null;this.oa=new I(0,0);this.gb=new pa(0,0);this.Qa=new I(0,0);this.Ap=this.zp=this.OI=!1;this.Et=this.lt=null;this.sorting=sr;this.comparer=kp;this.angle=0;this.alignment=wr;this.nodeIndentPastParent=this.nodeIndent=0;this.nodeSpacing=20;this.layerSpacing=50;this.layerSpacingParentOverlap=0;this.compaction=Fr;this.breadthLimit=
- 0;this.rowSpacing=25;this.commentSpacing=this.rowIndent=10;this.commentMargin=20;this.setsPortSpot=!0;this.portSpot=Pc;this.setsChildPortSpot=!0;this.childPortSpot=Pc}w.Pa(cr,Ga);w.la("TreeVertex",cr);
- cr.prototype.copyInheritedPropertiesFrom=function(a){null!==a&&(this.sorting=a.sorting,this.comparer=a.comparer,this.angle=a.angle,this.alignment=a.alignment,this.nodeIndent=a.nodeIndent,this.nodeIndentPastParent=a.nodeIndentPastParent,this.nodeSpacing=a.nodeSpacing,this.layerSpacing=a.layerSpacing,this.layerSpacingParentOverlap=a.layerSpacingParentOverlap,this.compaction=a.compaction,this.breadthLimit=a.breadthLimit,this.rowSpacing=a.rowSpacing,this.rowIndent=a.rowIndent,this.commentSpacing=a.commentSpacing,
- this.commentMargin=a.commentMargin,this.setsPortSpot=a.setsPortSpot,this.portSpot=a.portSpot,this.setsChildPortSpot=a.setsChildPortSpot,this.childPortSpot=a.childPortSpot)};w.w(cr,{Mm:"childrenCount"},function(){return this.children.length});w.defineProperty(cr,{gL:"relativePosition"},function(){return this.oa},function(a){this.oa.set(a)});w.defineProperty(cr,{qL:"subtreeSize"},function(){return this.gb},function(a){this.gb.set(a)});
- w.defineProperty(cr,{pL:"subtreeOffset"},function(){return this.Qa},function(a){this.Qa.set(a)});function is(){Ia.call(this);this.Hr=new I(0,0)}w.Pa(is,Ia);w.la("TreeEdge",is);
- is.prototype.commit=function(){var a=this.link;if(null!==a&&!a.Zi){var b=this.network.Ub,c=null,d=null;switch(b.Hf){case Zq:c=this.fromVertex;d=this.toVertex;break;case fr:c=this.toVertex;d=this.fromVertex;break;default:w.l("Unhandled path value "+b.Hf.toString())}if(null!==c&&null!==d)if(b=this.Hr,0!==b.x||0!==b.y||c.OI){var d=c.ub,e=Gr(c),g=Jr(c),h=c.rowSpacing;a.updateRoute();var k=a.df===th,l=a.jc,m=0,n,p;a.Jl();if(l||k){for(m=2;4<a.pa;)a.XE(2);n=a.m(1);p=a.m(2)}else{for(m=1;3<a.pa;)a.XE(1);n=
- a.m(0);p=a.m(a.pa-1)}var q=a.m(a.pa-1),r=0;0===e?(c.alignment===Ir?(r=d.bottom+b.y,0===b.y&&n.y>q.y+c.rowIndent&&(r=Math.min(r,Math.max(n.y,r-Kr(c))))):c.alignment===Hr?(r=d.top+b.y,0===b.y&&n.y<q.y-c.rowIndent&&(r=Math.max(r,Math.min(n.y,r+Kr(c))))):r=c.zp||c.Ap&&1===c.maxGenerationCount?d.top-c.Qa.y+b.y:d.y+d.height/2+b.y,k?(a.B(m,n.x,r),m++,a.B(m,d.right+g,r),m++,a.B(m,d.right+g+(b.x-h)/3,r),m++,a.B(m,d.right+g+2*(b.x-h)/3,r),m++,a.B(m,d.right+g+(b.x-h),r),m++,a.B(m,p.x,r)):(l&&(a.B(m,d.right+
- g/2,n.y),m++),a.B(m,d.right+g/2,r),m++,a.B(m,d.right+g+b.x-(l?h/2:h),r),m++,l&&a.B(m,a.m(m-1).x,p.y))):90===e?(c.alignment===Ir?(r=d.right+b.x,0===b.x&&n.x>q.x+c.rowIndent&&(r=Math.min(r,Math.max(n.x,r-Kr(c))))):c.alignment===Hr?(r=d.left+b.x,0===b.x&&n.x<q.x-c.rowIndent&&(r=Math.max(r,Math.min(n.x,r+Kr(c))))):r=c.zp||c.Ap&&1===c.maxGenerationCount?d.left-c.Qa.x+b.x:d.x+d.width/2+b.x,k?(a.B(m,r,n.y),m++,a.B(m,r,d.bottom+g),m++,a.B(m,r,d.bottom+g+(b.y-h)/3),m++,a.B(m,r,d.bottom+g+2*(b.y-h)/3),m++,
- a.B(m,r,d.bottom+g+(b.y-h)),m++,a.B(m,r,p.y)):(l&&(a.B(m,n.x,d.bottom+g/2),m++),a.B(m,r,d.bottom+g/2),m++,a.B(m,r,d.bottom+g+b.y-(l?h/2:h)),m++,l&&a.B(m,p.x,a.m(m-1).y))):180===e?(c.alignment===Ir?(r=d.bottom+b.y,0===b.y&&n.y>q.y+c.rowIndent&&(r=Math.min(r,Math.max(n.y,r-Kr(c))))):c.alignment===Hr?(r=d.top+b.y,0===b.y&&n.y<q.y-c.rowIndent&&(r=Math.max(r,Math.min(n.y,r+Kr(c))))):r=c.zp||c.Ap&&1===c.maxGenerationCount?d.top-c.Qa.y+b.y:d.y+d.height/2+b.y,k?(a.B(m,n.x,r),m++,a.B(m,d.left-g,r),m++,a.B(m,
- d.left-g+(b.x+h)/3,r),m++,a.B(m,d.left-g+2*(b.x+h)/3,r),m++,a.B(m,d.left-g+(b.x+h),r),m++,a.B(m,p.x,r)):(l&&(a.B(m,d.left-g/2,n.y),m++),a.B(m,d.left-g/2,r),m++,a.B(m,d.left-g+b.x+(l?h/2:h),r),m++,l&&a.B(m,a.m(m-1).x,p.y))):270===e?(c.alignment===Ir?(r=d.right+b.x,0===b.x&&n.x>q.x+c.rowIndent&&(r=Math.min(r,Math.max(n.x,r-Kr(c))))):c.alignment===Hr?(r=d.left+b.x,0===b.x&&n.x<q.x-c.rowIndent&&(r=Math.max(r,Math.min(n.x,r+Kr(c))))):r=c.zp||c.Ap&&1===c.maxGenerationCount?d.left-c.Qa.x+b.x:d.x+d.width/
- 2+b.x,k?(a.B(m,r,n.y),m++,a.B(m,r,d.top-g),m++,a.B(m,r,d.top-g+(b.y+h)/3),m++,a.B(m,r,d.top-g+2*(b.y+h)/3),m++,a.B(m,r,d.top-g+(b.y+h)),m++,a.B(m,r,p.y)):(l&&(a.B(m,n.x,d.top-g/2),m++),a.B(m,r,d.top-g/2),m++,a.B(m,r,d.top-g+b.y+(l?h/2:h)),m++,l&&a.B(m,p.x,a.m(m-1).y))):w.l("Invalid angle "+e);a.Ri()}else e=c,g=d,u&&w.k(e,cr,is,"adjustRouteForAngleChange:parent"),u&&w.k(g,cr,is,"adjustRouteForAngleChange:child"),a=this.link,c=Gr(e),c!==Gr(g)&&(b=Jr(e),d=e.ub,e=g.ub,0===c&&e.left-d.right<b+1||90===
- c&&e.top-d.bottom<b+1||180===c&&d.left-e.right<b+1||270===c&&d.top-e.bottom<b+1||(a.updateRoute(),e=a.df===th,g=a.jc,h=xr(this.fromVertex.alignment),a.Jl(),0===c?(c=d.right+b/2,e?4===a.pa&&(b=a.m(3).y,a.ba(1,c-20,a.m(1).y),a.B(2,c-20,b),a.B(3,c,b),a.B(4,c+20,b),a.ba(5,a.m(5).x,b)):g?h?a.ba(3,a.m(2).x,a.m(4).y):6===a.pa&&(a.ba(2,c,a.m(2).y),a.ba(3,c,a.m(3).y)):4===a.pa?a.B(2,c,a.m(2).y):3===a.pa?a.ba(1,c,a.m(2).y):2===a.pa&&a.B(1,c,a.m(1).y)):90===c?(b=d.bottom+b/2,e?4===a.pa&&(c=a.m(3).x,a.ba(1,a.m(1).x,
- b-20),a.B(2,c,b-20),a.B(3,c,b),a.B(4,c,b+20),a.ba(5,c,a.m(5).y)):g?h?a.ba(3,a.m(2).x,a.m(4).y):6===a.pa&&(a.ba(2,a.m(2).x,b),a.ba(3,a.m(3).x,b)):4===a.pa?a.B(2,a.m(2).x,b):3===a.pa?a.ba(1,a.m(2).x,b):2===a.pa&&a.B(1,a.m(1).x,b)):180===c?(c=d.left-b/2,e?4===a.pa&&(b=a.m(3).y,a.ba(1,c+20,a.m(1).y),a.B(2,c+20,b),a.B(3,c,b),a.B(4,c-20,b),a.ba(5,a.m(5).x,b)):g?h?a.ba(3,a.m(2).x,a.m(4).y):6===a.pa&&(a.ba(2,c,a.m(2).y),a.ba(3,c,a.m(3).y)):4===a.pa?a.B(2,c,a.m(2).y):3===a.pa?a.ba(1,c,a.m(2).y):2===a.pa&&
- a.B(1,c,a.m(1).y)):270===c&&(b=d.top-b/2,e?4===a.pa&&(c=a.m(3).x,a.ba(1,a.m(1).x,b+20),a.B(2,c,b+20),a.B(3,c,b),a.B(4,c,b-20),a.ba(5,c,a.m(5).y)):g?h?a.ba(3,a.m(2).x,a.m(4).y):6===a.pa&&(a.ba(2,a.m(2).x,b),a.ba(3,a.m(3).x,b)):4===a.pa?a.B(2,a.m(2).x,b):3===a.pa?a.ba(1,a.m(2).x,b):2===a.pa&&a.B(1,a.m(1).x,b)),a.Ri()))}};w.defineProperty(is,{fL:"relativePoint"},function(){return this.Hr},function(a){this.Hr.set(a)});function js(){this.Un=[]}
- function Vl(a){var b=new js,c=null;"string"===typeof a?c=(new DOMParser).parseFromString(a,"text/xml"):a instanceof Document&&(c=a.implementation.createDocument("http://www.w3.org/2000/svg","svg",null),c.appendChild(c.importNode(a.documentElement,!0)));if(null===c)return null;a=c.getElementsByTagName("svg");if(0===a.length)return null;var d=a[0],e=c.getElementsByTagName("linearGradient"),g=c.getElementsByTagName("radialGradient");for(a=0;a<e.length;a++){for(var h=e[a],k=Wl(oa,Re,{start:Zc,end:$c}),
- l=h.childNodes,m=0;m<l.length;m++)if("stop"===l[m].tagName){var n=ks(b,l[m],"stop-color");if(null!==n&&""!==n){var p=ks(b,l[m],"offset");if(null===p||""===p)p="0";var q=parseFloat(p);isNaN(q)&&(q=0);k.addColorStop((-1!==p.indexOf("%")?.01:1)*q,n)}}h=h.getAttribute("id");"string"===typeof h&&(b["_brush"+h]=k)}for(a=0;a<g.length;a++){h=g[a];k=Wl(oa,Se,{start:ac,end:ac});l=h.childNodes;for(m=0;m<l.length;m++)if("stop"===l[m].tagName&&(n=ks(b,l[m],"stop-color"),null!==n&&""!==n)){p=ks(b,l[m],"offset");
- if(null===p||""===p)p="0";q=parseFloat(p);isNaN(q)&&(q=0);k.addColorStop((-1!==p.indexOf("%")?.01:1)*q,n)}h=h.getAttribute("id");"string"===typeof h&&(b["_brush"+h]=k)}for(e=!0;e;)for(e=!1,g=c.getElementsByTagName("use"),a=0;a<g.length;a++)k=g[a],0===k.childNodes.length&&(h=k.href,void 0!==h&&(h=c.getElementById(h.baseVal.substring(1)),null!==h&&(h=h.cloneNode(!0),h.removeAttribute("id"),l=parseFloat(k.getAttribute("x")),isNaN(l)&&(l=0),m=parseFloat(k.getAttribute("y")),isNaN(m)&&(m=0),n=k.getAttribute("transform"),
- null===n&&(n=""),k.setAttribute("transform",n+" translate("+l+","+m+")"),k.appendChild(h),"use"===h.tagName&&(e=!0))));ls(b,d,null);c=new H;if(0===b.Un.length)return c;if(1===b.Un.length)return b.Un[0];for(a=0;a<b.Un.length;a++)c.add(b.Un[a]);return c}function ms(a,b){var c=a.getAttribute(b);"string"!==typeof c&&a.style&&(c=a.style[b]);return"string"!==typeof c?null:c}
- function ks(a,b,c){var d=b.getAttribute(c);"string"!==typeof d&&b.style&&(d=b.style[c]);return"string"!==typeof d||""===d||"inherit"===d?(b=b.parentNode,"g"===b.tagName||"use"===b.tagName?ks(a,b,c):null):d}
- function ls(a,b,c){var d=b.tagName;if(("g"===d||"svg"===d||"use"===d||"symbol"===d)&&"none"!==ks(a,b,"display")){for(var d=b.childNodes,e=0;e<d.length;e++){var g=d[e],h=null;if(void 0!==g.getAttribute){var k=g.getAttribute("transform");switch(g.tagName){case "g":null===k?ls(a,g,null):(h=new H,ls(a,g,h));break;case "use":null===k?ls(a,g,null):(h=new H,ls(a,g,h));break;case "symbol":if("use"!==b.tagName)break;h=new H;ls(a,g,h);var l=h,m=a,n=g;ks(m,n,"preserveAspectRatio");ks(m,n,"viewBox");l.scale=
- 1;break;case "path":l=g;h=new Y;l=l.getAttribute("d");"string"===typeof l&&(h.xH=Cd(l));break;case "line":var p=g,h=new Y,l=parseFloat(p.getAttribute("x1"));isNaN(l)&&(l=0);m=parseFloat(p.getAttribute("y1"));isNaN(m)&&(m=0);n=parseFloat(p.getAttribute("x2"));isNaN(n)&&(n=0);p=parseFloat(p.getAttribute("y2"));isNaN(p)&&(p=0);var q=new sd(wd);h.position=new I(Math.min(l,n),Math.min(m,p));0<(n-l)/(p-m)?(q.Aa=0,q.Ba=0,q.H=Math.abs(n-l),q.I=Math.abs(p-m)):(q.Aa=0,q.Ba=Math.abs(p-m),q.H=Math.abs(n-l),q.I=
- 0);h.od=q;break;case "circle":n=g;h=new Y;l=parseFloat(n.getAttribute("r"));isNaN(l)||0>l?h=null:(m=parseFloat(n.getAttribute("cx")),isNaN(m)&&(m=0),n=parseFloat(n.getAttribute("cy")),isNaN(n)&&(n=0),p=new sd(yd),p.Aa=0,p.Ba=0,p.H=2*l,p.I=2*l,h.position=new I(m-l,n-l),h.od=p);break;case "ellipse":p=g;h=new Y;l=parseFloat(p.getAttribute("rx"));isNaN(l)||0>l?h=null:(m=parseFloat(p.getAttribute("ry")),isNaN(m)||0>m?h=null:(n=parseFloat(p.getAttribute("cx")),isNaN(n)&&(n=0),p=parseFloat(p.getAttribute("cy")),
- isNaN(p)&&(p=0),q=new sd(yd),q.Aa=0,q.Ba=0,q.H=2*l,q.I=2*m,h.position=new I(n-l,p-m),h.od=q));break;case "rect":q=g;h=new Y;l=parseFloat(q.getAttribute("width"));if(isNaN(l)||0>l)h=null;else if(m=parseFloat(q.getAttribute("height")),isNaN(m)||0>m)h=null;else{n=parseFloat(q.getAttribute("x"));isNaN(n)&&(n=0);p=parseFloat(q.getAttribute("y"));isNaN(p)&&(p=0);var r=q.getAttribute("rx"),s=q.getAttribute("ry"),q=parseFloat(r);if(isNaN(q)||0>q)q=0;var t=parseFloat(s);if(isNaN(t)||0>t)t=0;null!==r&&""!==
- r||null===s||""===s?null===r||""===r||null!==s&&""!==s||(t=q):q=t;q=Math.min(q,l/2);t=Math.min(t,m/2);s=void 0;0===q&&0===t?(s=new sd(xd),s.Aa=0,s.Ba=0,s.H=l,s.I=m):(s=O.ya/2,r=w.s(),R(r,q,0,!0),r.lineTo(l-q,0),S(r,l-q*s,0,l,t*s,l,t),r.lineTo(l,m-t),S(r,l,m-t*s,l-q*s,m,l-q,m),r.lineTo(q,m),S(r,q*s,m,0,m-t*s,0,m-t),r.lineTo(0,t),S(r,0,t*s,q*s,0,q,0),U(r),s=r.q,w.u(r));h.position=new I(n,p);h.od=s}break;case "polygon":h=ns(g);break;case "polyline":h=ns(g)}if(null!==h){if(h instanceof Y){m=h;l=ks(a,
- g,"fill");null!==l&&-1!==l.indexOf("url")?(l=l.substring(l.indexOf("#")+1,l.length-1),l=a["_brush"+l],m.fill=l instanceof oa?l:"black"):m.fill=null===l?"black":"none"===l?null:l;l=ks(a,g,"stroke");null!==l&&-1!==l.indexOf("url")?(l=l.substring(l.indexOf("#")+1,l.length-1),l=a["_brush"+l],m.stroke=l instanceof oa?l:"black"):m.stroke="none"===l?null:l;l=parseFloat(ks(a,g,"stroke-width"));isNaN(l)||(m.pb=l);l=ks(a,g,"stroke-linecap");null!==l&&(m.dJ=l);l=ks(a,g,"stroke-dasharray");if(null!==l&&""!==
- l){n=l.split(",");p=[];for(l=0;l<n.length;l++)q=parseFloat(n[l]),!isNaN(q)&&0<q&&p.push(q);m.FA=p}g=ks(a,g,"stroke-dashoffset");null!==g&&""!==g&&(g=parseFloat(g),isNaN(g)||(m.eJ=g));m.Rz=!0}if(null!==k){k=k.split(")");g=!0;for(l=0;l<k.length;l++)/\(.*[^0-9\.,\s-]/.test(k[l])&&(g=!1),/\(.*[0-9]-[0-9]/.test(k[l])&&(g=!1);if(g)for(l=k.length-1;0<=l;l--)if(m=k[l],""!==m)switch(n=m.indexOf("("),g=m.substring(0,n).replace(/\s*/,""),n=m.substring(n+1).split(/\s*[\s,]\s*/),g){case "rotate":os(a,h,n);break;
- case "translate":g=h;m=parseFloat(n[0]);isNaN(m)&&(m=0);n=parseFloat(n[1]);isNaN(n)&&(n=0);if(0!==m||0!==n)p=g.position.copy(),isNaN(p.x)&&(p.x=0),isNaN(p.y)&&(p.y=0),g.position=new I(m+p.x,n+p.y);break;case "scale":ps(a,h,n);break;case "skewX":qs(a,h,n);break;case "skewY":rs(a,h,n);break;case "matrix":ss(a,h,n)}}if(h instanceof H){k=h;l=g=0;m=k.position.copy();isNaN(m.x)&&(m.x=0);isNaN(m.y)&&(m.y=0);for(n=k.elements.j;n.next();)p=n.value.position.copy(),isNaN(p.x)&&(p.x=0),isNaN(p.y)&&(p.y=0),p.x<
- g&&(g=p.x),p.y<l&&(l=p.y);m.x+=g;m.y+=l;k.position=m}null===c?a.Un.push(h):c.add(h)}}}if(null!==h){a=ms(b,"visibility");if("hidden"===a||"collapse"===a)h.visible=!1;b=ms(b,"opacity");null!==b&&""!==b&&(b=parseFloat(b),isNaN(b)||(h.opacity=b))}}}
- function ss(a,b,c){var d=parseFloat(c[0]),e=parseFloat(c[1]),g=parseFloat(c[2]),h=parseFloat(c[3]),k=parseFloat(c[4]),l=parseFloat(c[5]);if(!isNaN(d+e+g+h+k+l)){var m=b.position.copy();isNaN(m.x)&&(m.x=0);isNaN(m.y)&&(m.y=0);if(b instanceof Y){c=b.od.copy();if(c.type===xd)c=a.rs(c);else if(c.type===yd)c=ts(c);else if(c.type===wd){c.type=td;a=new ud(c.Aa,c.Ba);var n=new ee(Ad,c.H,c.I);a.Oa.add(n);c.Bb.add(a)}c.offset(m.x,m.y);c.transform(d,e,g,h,k-m.x,l-m.y);a=c.normalize();b.od=c;m.x-=a.x;m.y-=a.y;
- b.position=m}else if(b instanceof H){for(b=b.elements.j;b.next();)e=b.value,d=e.position.copy(),d.x+=m.x,d.y+=m.y,e.position=d;for(b.reset();b.next();)ss(a,b.value,c);for(b.reset();b.next();)a=b.value,d=a.position.copy(),d.x-=m.x,d.y-=m.y,a.position=d}}}
- function os(a,b,c){var d=parseFloat(c[0]);isNaN(d)&&(d=0);var e=parseFloat(c[1]);isNaN(e)&&(e=0);var g=parseFloat(c[2]);isNaN(g)&&(g=0);if(0!==d){var h=d*Math.PI/180,k=b.position.copy();isNaN(k.x)&&(k.x=0);isNaN(k.y)&&(k.y=0);if(b instanceof Y){c=b.od.copy();c.type===yd?c=ts(c):c.type===xd&&(c=a.rs(c));if(c.type===td)c.rotate(d,e-k.x,g-k.y),g=c.normalize(),b.od=c,k.x-=g.x,k.y-=g.y,b.position=k;else{var d=c.Aa-e+k.x,l=c.Ba-g+k.y,m=c.H-e+k.x,n=c.I-g+k.y;a=d*Math.cos(h)-l*Math.sin(h)+e-k.x;d=l*Math.cos(h)+
- d*Math.sin(h)+g-k.y;e=m*Math.cos(h)-n*Math.sin(h)+e-k.x;g=n*Math.cos(h)+m*Math.sin(h)+g-k.y;m=Math.min(a,e);n=Math.min(d,g);c.Aa=a-m;c.Ba=d-n;c.H=e-m;c.I=g-n;k.x+=m;k.y+=n;b.position=k;b.od=c}b.fill instanceof oa&&(k=b.fill.copy(),c=Math.atan((.5-k.start.y)/(.5-k.start.x)),isNaN(c)||(c+=h,k.start=new Q((1-Math.cos(c))/2,(1-Math.sin(c))/2),k.end=new Q((1+Math.cos(c))/2,(1+Math.sin(c))/2)),b.fill=k);b.stroke instanceof oa&&(k=b.stroke.copy(),c=Math.atan((.5-k.start.y)/(.5-k.start.x)),isNaN(c)||(c+=
- h,k.start=new Q((1-Math.cos(c))/2,(1-Math.sin(c))/2),k.end=new Q((1+Math.cos(c))/2,(1+Math.sin(c))/2)),b.stroke=k)}else if(b instanceof H){for(b=b.elements.j;b.next();)g=b.value,h=g.position.copy(),h.x+=k.x,h.y+=k.y,g.position=h;for(b.reset();b.next();)os(a,b.value,c);for(b.reset();b.next();)c=b.value,h=c.position.copy(),h.x-=k.x,h.y-=k.y,c.position=h}}}
- function ps(a,b,c){var d=parseFloat(c[0]);isNaN(d)&&(d=1);var e=parseFloat(c[1]);isNaN(e)&&(e=d);if(1!==d||1!==e){var g=b.position.copy();isNaN(g.x)&&(g.x=0);isNaN(g.y)&&(g.y=0);if(b instanceof Y)a=b.od.copy(),g.x*=d,g.y*=e,b.position=g,a.scale(d,e),b.od=a;else if(b instanceof H){for(b=b.elements.j;b.next();)e=b.value,d=e.position.copy(),d.x+=g.x,d.y+=g.y,e.position=d;for(b.reset();b.next();)ps(a,b.value,c);for(b.reset();b.next();)a=b.value,d=a.position.copy(),d.x-=g.x,d.y-=g.y,a.position=d}}}
- function qs(a,b,c){var d=parseFloat(c[0]);if(!isNaN(d)){var d=d*Math.PI/180,e=b.position.copy();isNaN(e.x)&&(e.x=0);isNaN(e.y)&&(e.y=0);if(b instanceof Y){c=b.od.copy();if(c.type===xd)c=a.rs(c);else if(c.type===yd)c=ts(c);else if(c.type===wd){c.type=td;a=new ud(c.Aa,c.Ba);var g=new ee(Ad,c.H,c.I);a.Oa.add(g);c.Bb.add(a)}c.offset(e.x,e.y);c.transform(1,0,Math.tan(d),1,-e.x,-e.y);a=c.normalize();b.od=c;e.x-=a.x;e.y-=a.y;b.position=e}else if(b instanceof H){for(b=b.elements.j;b.next();)d=b.value.position.copy(),
- d.x+=e.x,d.y+=e.y,b.value.position=d;for(b.reset();b.next();)qs(a,b.value,c);for(b.reset();b.next();)a=b.value,d=a.position.copy(),d.x-=e.x,d.y-=e.y,a.position=d}}}
- function rs(a,b,c){var d=parseFloat(c[0]);if(!isNaN(d)){var d=d*Math.PI/180,e=b.position.copy();isNaN(e.x)&&(e.x=0);isNaN(e.y)&&(e.y=0);if(b instanceof Y){c=b.od.copy();if(c.type===xd)c=a.rs(c);else if(c.type===yd)c=ts(c);else if(c.type===wd){c.type=td;a=new ud(c.Aa,c.Ba);var g=new ee(Ad,c.H,c.I);a.Oa.add(g);c.Bb.add(a)}c.offset(e.x,e.y);c.transform(1,Math.tan(d),0,1,-e.x,-e.y);a=c.normalize();b.od=c;e.x-=a.x;e.y-=a.y;b.position=e}else if(b instanceof H){for(b=b.elements.j;b.next();)g=b.value,d=g.position.copy(),
- d.x+=e.x,d.y+=e.y,g.position=d;for(b.reset();b.next();)rs(a,b.value,c);for(b.reset();b.next();)a=b.value,d=a.position.copy(),d.x-=e.x,d.y-=e.y,a.position=d}}}
- function ns(a){var b=!1;if("polygon"===a.tagName)b=!0;else if("polyline"!==a.tagName)return null;var c=new Y,d=a.getAttribute("points");a=new sd;var e=new K(ud),g=d.split(/\s*[\s,]\s*/);if(4>g.length)return null;for(var d=null,h=new K(ee),k=1;k<g.length;k+=2){var l=parseFloat(g[k-1]),m=parseFloat(g[k]);if("number"!==typeof l||isNaN(l)||"number"!==typeof m||isNaN(m))return null;1===k?d=new ud(l,m):h.add(new ee(Ad,l,m))}b&&(b=new ee(Ad,d.Aa,d.Ba),b.close(),h.add(b));d.Oa=h;e.add(d);a.Bb=e;b=a.normalize();
- c.position=new I(-b.x,-b.y);c.od=a;return c}
- function ts(a){var b=a.Aa,c=a.Ba,d=a.H,e=a.I,g=Math.abs(d-b)/2,h=Math.abs(e-c)/2,b=Math.min(b,d)+g,c=Math.min(c,e)+h;new I;e=new ud(b,c-h);d=new ee(Od);d.Xb=b+O.ya*g;d.rc=c-h;d.of=b+g;d.pf=c-O.ya*h;d.H=b+g;d.I=c;e.Oa.add(d);d=new ee(Od);d.Xb=b+g;d.rc=c+O.ya*h;d.of=b+O.ya*g;d.pf=c+h;d.H=b;d.I=c+h;e.Oa.add(d);d=new ee(Od);d.Xb=b-O.ya*g;d.rc=c+h;d.of=b-g;d.pf=c+O.ya*h;d.H=b-g;d.I=c;e.Oa.add(d);d=new ee(Od);d.Xb=b-g;d.rc=c-O.ya*h;d.of=b-O.ya*g;d.pf=c-h;d.H=b;d.I=c-h;e.Oa.add(d);a.type=td;a.Bb.add(e);
- return a}js.prototype.rs=function(a){var b=a.Aa,c=a.Ba,d=a.H,e=a.I,g=Math.min(b,d),h=Math.min(c,e),b=Math.abs(d-b),c=Math.abs(e-c),e=new ud(g,h);e.Oa.add(new ee(Ad,g+b,h));e.Oa.add(new ee(Ad,g+b,h+c));e.Oa.add((new ee(Ad,g,h+c)).close());a.type=td;a.Bb.add(e);return a};function an(){V.call(this);this.We=null}w.Pa(an,V);an.prototype.cloneProtected=function(a){V.prototype.cloneProtected.call(this,a);a.element=this.We.cloneNode(!0)};
- an.prototype.toString=function(){return"HTMLHost("+this.We.toString()+")#"+w.ad(this)};an.prototype.ck=function(a,b){var c=this.We;if(null!==c){var d=this.vb(ac);d.x-=this.ca.width/2;d.y-=this.ca.height/2;d.x-=this.ca.x;d.y-=this.ca.y;var d=b.LA(d),e=b.ol;null===e||e.contains(c)||e.appendChild(c);e=this.transform;c.style.transform="matrix("+e.m11+","+e.m12+","+e.m21+","+e.m22+","+e.dx+","+e.dy+")";c.style.transformOrigin="0 0";e=d.y;c.style.left=d.x+"px";c.style.top=e+"px"}};
- an.prototype.kp=function(a,b,c,d){var e=this.Ca;isFinite(e.width)&&(a=e.width);isFinite(e.height)&&(b=e.height);var e=this.xe,g=this.Df;c=Math.max(c,g.width);d=Math.max(d,g.height);a=Math.min(e.width,a);b=Math.min(e.height,b);a=Math.max(c,a);b=Math.max(d,b);c=this.We;null!==c&&(b=c.getBoundingClientRect(),a=b.width,b=b.height);tb(this.Pc,a,b);sl(this,0,0,a,b)};an.prototype.Mi=function(a,b,c,d){wl(this,a,b,c,d)};w.w(an,{Ha:"naturalBounds"},function(){return this.Pc});
- w.defineProperty(an,{element:"element"},function(){return this.We},function(a){var b=this.We;b!==a&&(a instanceof HTMLElement||w.l("HTMLHost.element must be an instance of HTMLElement."),this.We=a,a.className="HTMLHost",this.i("element",b,a),this.sa())});ba.version="1.5.17";
- window&&(window.module&&"object"===typeof window.module&&"object"===typeof window.module.exports?window.module.exports=ba:window.define&&"function"===typeof window.define&&window.define.amd?(window.go=ba,window.define(ba)):window.go=ba);"undefined"!==typeof module&&"object"===typeof module.exports&&(module.exports=ba); })(window);
|