You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Message__index.29070380....

1243 lines
2.0 MiB

(self.webpackChunk=self.webpackChunk||[]).push([[67],{71749:function(){"use strict"},30483:function(){"use strict"},71736:function(yn,qn){"use strict";qn.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},39132:function(yn,qn){"use strict";qn.Z={flex_box_center:"flex_box_center___vG4eV",flex_space_between:"flex_space_between___qVVxe",flex_box_vertical_center:"flex_box_vertical_center___P8Z8s",flex_box_center_end:"flex_box_center_end___VMme3",flex_box_column:"flex_box_column___VMHwm",dropdownmenus:"dropdownmenus___oVzoj",popupClassNames:"popupClassNames___OcZq7",selectdown:"selectdown___mmcA8"}},18023:function(){"use strict";function yn(Ut,et,nt,gt){nt===void 0&&(nt=0),gt===void 0&&(gt=1/0),this._name=Ut,this._defaultValue=et,this._minimum=nt,this._maximum=gt}Object.defineProperty(yn.prototype,"name",{get:function(){return this._name},set:function(Ut){if(typeof Ut!="string"||Ut==="")throw new Error("Shape name must be a valid string.");this._name=Ut}}),Object.defineProperty(yn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(Ut){if(typeof Ut!="number"||isNaN(Ut))throw new Error("The default value must be a real number, not: "+Ut);this._defaultValue=Ut}}),Object.defineProperty(yn.prototype,"minimum",{get:function(){return this._minimum},set:function(Ut){if(typeof Ut!="number"||isNaN(Ut))throw new Error("Minimum must be a real number, not: "+Ut);this._minimum=Ut}}),Object.defineProperty(yn.prototype,"maximum",{get:function(){return this._maximum},set:function(Ut){if(typeof Ut!="number"||isNaN(Ut))throw new Error("Maximum must be a real number, not: "+Ut);this._maximum=Ut}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(Ut,et){var nt=go.Shape._FigureParameters[Ut];return nt?nt[et]:null},go.Shape.setFigureParameter=function(Ut,et,nt){if(!(nt instanceof yn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+nt);if(nt.defaultValue<nt.minimum||nt.defaultValue>nt.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+nt.defaultValue);var gt=go.Shape._FigureParameters[Ut];gt||(gt=[],go.Shape._FigureParameters[Ut]=gt),gt[et]=nt};var qn=[];function ee(Ut,et){var nt=qn.pop();return nt===void 0?new go.Point(Ut,et):(nt.x=Ut,nt.y=et,nt)}function Tt(){var Ut=qn.pop();return Ut===void 0?new go.Point:Ut}function Be(Ut){qn.push(Ut)}function Ne(Ut,et,nt,gt,lt,ct,yt,Lt,Nt){Nt||(Nt=new go.Point);var Vt=Ut-nt,Jt=lt-yt,Ae=NaN,he=NaN;if(Vt===0)if(Jt===0)Ut===nt&&(Ae=Ut,he=et);else{var le=(ct-Lt)/Jt,We=ct-le*lt;Ae=Ut,he=le*Ae+We}else if(Jt===0){var me=(et-gt)/Vt,Je=et-me*Ut;Ae=lt,he=me*Ae+Je}else{var me=(et-gt)/Vt,le=(ct-Lt)/Jt,Je=et-me*Ut,We=ct-le*lt;Ae=(We-Je)/(me-le),he=me*Ae+Je}return Nt.x=Ae,Nt.y=he,Nt}function ln(Ut,et,nt,gt,lt,ct,yt,Lt,Nt,Vt,Jt,Ae,he,le){var We=1-Nt,me=Nt,Je=Ut*We+nt*me,fn=et*We+gt*me,sn=nt*We+lt*me,ui=gt*We+ct*me,hi=lt*We+yt*me,Si=ct*We+Lt*me,fr=Je*We+sn*me,qt=fn*We+ui*me,Ht=sn*We+hi*me,je=ui*We+Si*me,Nn=fr*We+Ht*me,Kn=qt*We+je*me;Vt.x=Je,Vt.y=fn,Jt.x=fr,Jt.y=qt,Ae.x=Nn,Ae.y=Kn,he.x=Ht,he.y=je,le.x=hi,le.y=Si}var be=new go.Spot(.156,.156),we=new go.Spot(.844,.844),ne=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new yn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;(isNaN(gt)||gt<0)&&(gt=5),gt=Math.min(gt,et/3),gt=Math.min(gt,nt/3);var lt=gt*ne,ct=new go.Geometry().add(new go.PathFigure(gt,0,!0).add(new go.PathSegment(go.PathSegment.Line,et-gt,0)).add(new go.PathSegment(go.PathSegment.Bezier,et,gt,et-lt,0,et,lt)).add(new go.PathSegment(go.PathSegment.Line,et,nt-gt)).add(new go.PathSegment(go.PathSegment.Bezier,et-gt,nt,et,nt-lt,et-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,gt,nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,nt-gt,lt,nt,0,nt-lt)).add(new go.PathSegment(go.PathSegment.Line,0,gt)).add(new go.PathSegment(go.PathSegment.Bezier,gt,0,0,lt,lt,0).close()));return lt>1&&(ct.spot1=new go.Spot(0,0,lt,lt),ct.spot2=new go.Spot(1,1,-lt,-lt)),ct}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(et,nt).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(et,nt).add(new go.PathSegment(go.PathSegment.Line,0,nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(Ut,et,nt){var gt=new go.Geometry(go.Geometry.Line);return gt.startX=0,gt.startY=nt/2,gt.endX=et,gt.endY=nt/2,gt}),go.Shape.defineFigureGenerator("LineV",function(Ut,et,nt){var gt=new go.Geometry(go.Geometry.Line);return gt.startX=et/2,gt.startY=0,gt.endX=et/2,gt.endY=nt,gt}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt/2,!1).add(new go.PathSegment(go.PathSegment.Line,et,nt/2)).add(new go.PathSegment(go.PathSegment.Move,et/2,0)).add(new go.PathSegment(go.PathSegment.Line,et/2,nt)))}),go.Shape.defineFigureGenerator("XLine",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)))}),go.Shape.defineFigureGenerator("LineRight",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(.25*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.25*et,nt)))}),go.Shape.defineFigureGenerator("LineDown",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,.25*nt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,.75*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)))}),go.Shape.defineFigureGenerator("LineLeft",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(.75*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.75*et,nt)))}),go.Shape.defineFigureGenerator("LineUp",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,.75*nt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,.25*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(Ut,et,nt){var gt=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(gt*et,(1-gt)*nt,!1).add(new go.PathSegment(go.PathSegment.Line,(1-gt)*et,gt*nt)).add(new go.PathSegment(go.PathSegment.Move,gt*et,gt*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-gt)*et,(1-gt)*nt)).add(new go.PathSegment(go.PathSegment.Move,0,nt/2)).add(new go.PathSegment(go.PathSegment.Line,et,nt/2)).add(new go.PathSegment(go.PathSegment.Move,et/2,0)).add(new go.PathSegment(go.PathSegment.Line,et/2,nt)))}),go.Shape.defineFigureGenerator("CircleLine",function(Ut,et,nt){var gt=et/2,lt=new go.Geometry().add(new go.PathFigure(et,et/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,gt,gt,gt,gt).close()));return lt.spot1=be,lt.spot2=we,lt.defaultStretch=go.GraphObject.Uniform,lt}),go.Shape.defineFigureGenerator("Line1",function(Ut,et,nt){var gt=new go.Geometry(go.Geometry.Line);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}),go.Shape.defineFigureGenerator("Line2",function(Ut,et,nt){var gt=new go.Geometry(go.Geometry.Line);return gt.startX=et,gt.startY=0,gt.endX=0,gt.endY=nt,gt}),go.Shape.defineFigureGenerator("Curve1",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,et,nt,ne*et,0,et,(1-ne)*nt)))}),go.Shape.defineFigureGenerator("Curve2",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,et,nt,0,ne*nt,(1-ne)*et,nt)))}),go.Shape.defineFigureGenerator("Curve3",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,ne*nt,ne*et,nt)))}),go.Shape.defineFigureGenerator("Curve4",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,(1-ne)*et,0,0,(1-ne)*nt)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new yn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;isNaN(gt)?gt=.1:gt<-1?gt=-1:gt>1&&(gt=1);var lt=Math.abs(gt)*et;if(gt===0){var ct=new go.Geometry(go.Geometry.Rectangle);return ct.startX=0,ct.startY=0,ct.endX=et,ct.endY=nt,ct}else{var ct=new go.Geometry;return gt>0?ct.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):ct.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et-lt,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,lt,nt).close())),lt<et/2&&ct.setSpots(lt/et,0,(et-lt)/et,1),ct}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new yn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;isNaN(gt)?gt=10:gt<-et?gt=-et:gt>et&&(gt=et);var lt=Math.abs(gt);if(gt===0){var ct=new go.Geometry(go.Geometry.Rectangle);return ct.startX=0,ct.startY=0,ct.endX=et,ct.endY=nt,ct}else{var ct=new go.Geometry;return gt>0?ct.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):ct.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et-lt,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,lt,nt).close())),lt<et/2&&ct.setSpots(lt/et,0,(et-lt)/et,1),ct}}),go.Shape.setFigureParameter("Trapezoid1",0,new yn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;isNaN(gt)?gt=.2:gt<.5?gt=-.5:gt>.5&&(gt=.5);var lt=Math.abs(gt)*et;if(gt===0){var ct=new go.Geometry(go.Geometry.Rectangle);return ct.startX=0,ct.startY=0,ct.endX=et,ct.endY=nt,ct}else{var ct=new go.Geometry;return gt>0?ct.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,et-lt,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):ct.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,lt,nt).close())),lt<et/2&&ct.setSpots(lt/et,0,(et-lt)/et,1),ct}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new yn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;isNaN(gt)?gt=20:gt<-et?gt=-et/2:gt>et&&(gt=et/2);var lt=Math.abs(gt);if(gt===0){var ct=new go.Geometry(go.Geometry.Rectangle);return ct.startX=0,ct.startY=0,ct.endX=et,ct.endY=nt,ct}else{var ct=new go.Geometry;return gt>0?ct.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,et-lt,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):ct.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,lt,nt).close())),lt<et/2&&ct.setSpots(lt/et,0,(et-lt)/et,1),ct}}),go.Shape.setFigureParameter("ManualOperation",0,new yn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;isNaN(gt)?gt=10:gt<-et?gt=-et/2:gt>et&&(gt=et/2);var lt=Math.abs(gt);if(gt===0){var ct=new go.Geometry(go.Geometry.Rectangle);return ct.startX=0,ct.startY=0,ct.endX=et,ct.endY=nt,ct}else{var ct=new go.Geometry;return gt>0?ct.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,lt,nt).close())):ct.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,et-lt,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())),lt<et/2&&ct.setSpots(lt/et,0,(et-lt)/et,1),ct}});var De=[];function fe(){var Ut=De.pop();return Ut===void 0?[]:Ut}function Qe(Ut){Ut.length=0,De.push(Ut)}function gn(Ut){for(var et=fe(),nt=.5,gt=.5,lt=Math.PI*1.5,ct=0,yt=0;yt<Ut;yt++)ct=2*Math.PI/Ut*yt+lt,et[yt]=new go.Point(gt+nt*Math.cos(ct),gt+nt*Math.sin(ct));return et.push(et[0]),et}function Xe(Ut){var et=kn(Ut),nt=fe();nt[0]=et[0];for(var gt=1,lt=1;gt<et.length;gt+=2,lt+=3)nt[lt]=et[gt],nt[lt+1]=et[gt],nt[lt+2]=et[gt+1];return Qe(et),nt}function kn(Ut){for(var et=gn(Ut),nt=fe(),gt=Math.floor(et.length/2),lt=et.length-1,ct=Ut%2===0?2:1,yt=0;yt<lt;yt++){var Lt=et[yt],Nt=et[yt+1],Vt=et[(gt+yt-1)%lt],Jt=et[(gt+yt+ct)%lt];nt[yt*2]=Lt,nt[yt*2+1]=Ne(Lt.x,Lt.y,Vt.x,Vt.y,Nt.x,Nt.y,Jt.x,Jt.y,new go.Point)}return nt[nt.length]=nt[0],Qe(et),nt}go.Shape.defineFigureGenerator("Pentagon",function(Ut,et,nt){var gt=gn(5),lt=new go.Geometry,ct=new go.PathFigure(gt[0].x*et,gt[0].y*nt,!0);lt.add(ct);for(var yt=1;yt<5;yt++)ct.add(new go.PathSegment(go.PathSegment.Line,gt[yt].x*et,gt[yt].y*nt));return ct.add(new go.PathSegment(go.PathSegment.Line,gt[0].x*et,gt[0].y*nt).close()),Qe(gt),lt.spot1=new go.Spot(.2,.22),lt.spot2=new go.Spot(.8,.9),lt}),go.Shape.defineFigureGenerator("Hexagon",function(Ut,et,nt){var gt=gn(6),lt=new go.Geometry,ct=new go.PathFigure(gt[0].x*et,gt[0].y*nt,!0);lt.add(ct);for(var yt=1;yt<6;yt++)ct.add(new go.PathSegment(go.PathSegment.Line,gt[yt].x*et,gt[yt].y*nt));return ct.add(new go.PathSegment(go.PathSegment.Line,gt[0].x*et,gt[0].y*nt).close()),Qe(gt),lt.spot1=new go.Spot(.07,.25),lt.spot2=new go.Spot(.93,.75),lt}),go.Shape.defineFigureGenerator("Heptagon",function(Ut,et,nt){var gt=gn(7),lt=new go.Geometry,ct=new go.PathFigure(gt[0].x*et,gt[0].y*nt,!0);lt.add(ct);for(var yt=1;yt<7;yt++)ct.add(new go.PathSegment(go.PathSegment.Line,gt[yt].x*et,gt[yt].y*nt));return ct.add(new go.PathSegment(go.PathSegment.Line,gt[0].x*et,gt[0].y*nt).close()),Qe(gt),lt.spot1=new go.Spot(.2,.15),lt.spot2=new go.Spot(.8,.85),lt}),go.Shape.defineFigureGenerator("Octagon",function(Ut,et,nt){var gt=gn(8),lt=new go.Geometry,ct=new go.PathFigure(gt[0].x*et,gt[0].y*nt,!0);lt.add(ct);for(var yt=1;yt<8;yt++)ct.add(new go.PathSegment(go.PathSegment.Line,gt[yt].x*et,gt[yt].y*nt));return ct.add(new go.PathSegment(go.PathSegment.Line,gt[0].x*et,gt[0].y*nt).close()),Qe(gt),lt.spot1=new go.Spot(.15,.15),lt.spot2=new go.Spot(.85,.85),lt}),go.Shape.defineFigureGenerator("Nonagon",function(Ut,et,nt){var gt=gn(9),lt=new go.Geometry,ct=new go.PathFigure(gt[0].x*et,gt[0].y*nt,!0);lt.add(ct);for(var yt=1;yt<9;yt++)ct.add(new go.PathSegment(go.PathSegment.Line,gt[yt].x*et,gt[yt].y*nt));return ct.add(new go.PathSegment(go.PathSegment.Line,gt[0].x*et,gt[0].y*nt).close()),Qe(gt),lt.spot1=new go.Spot(.17,.13),lt.spot2=new go.Spot(.82,.82),lt}),go.Shape.defineFigureGenerator("Decagon",function(Ut,et,nt){var gt=gn(10),lt=new go.Geometry,ct=new go.PathFigure(gt[0].x*et,gt[0].y*nt,!0);lt.add(ct);for(var yt=1;yt<10;yt++)ct.add(new go.PathSegment(go.PathSegment.Line,gt[yt].x*et,gt[yt].y*nt));return ct.add(new go.PathSegment(go.PathSegment.Line,gt[0].x*et,gt[0].y*nt).close()),Qe(gt),lt.spot1=new go.Spot(.16,.16),lt.spot2=new go.Spot(.84,.84),lt}),go.Shape.defineFigureGenerator("Dodecagon",function(Ut,et,nt){var gt=gn(12),lt=new go.Geometry,ct=new go.PathFigure(gt[0].x*et,gt[0].y*nt,!0);lt.add(ct);for(var yt=1;yt<12;yt++)ct.add(new go.PathSegment(go.PathSegment.Line,gt[yt].x*et,gt[yt].y*nt));return ct.add(new go.PathSegment(go.PathSegment.Line,gt[0].x*et,gt[0].y*nt).close()),Qe(gt),lt.spot1=new go.Spot(.16,.16),lt.spot2=new go.Spot(.84,.84),lt}),go.Shape.defineFigureGenerator("FivePointedStar",function(Ut,et,nt){var gt=kn(5),lt=new go.Geometry,ct=new go.PathFigure(gt[0].x*et,gt[0].y*nt,!0);lt.add(ct);for(var yt=1;yt<10;yt++)ct.add(new go.PathSegment(go.PathSegment.Line,gt[yt].x*et,gt[yt].y*nt));return ct.add(new go.PathSegment(go.PathSegment.Line,gt[0].x*et,gt[0].y*nt).close()),Qe(gt),lt.spot1=new go.Spot(.266,.333),lt.spot2=new go.Spot(.733,.733),lt}),go.Shape.defineFigureGenerator("SixPointedStar",function(Ut,et,nt){var gt=kn(6),lt=new go.Geometry,ct=new go.PathFigure(gt[0].x*et,gt[0].y*nt,!0);lt.add(ct);for(var yt=1;yt<12;yt++)ct.add(new go.PathSegment(go.PathSegment.Line,gt[yt].x*et,gt[yt].y*nt));return ct.add(new go.PathSegment(go.PathSegment.Line,gt[0].x*et,gt[0].y*nt).close()),Qe(gt),lt.spot1=new go.Spot(.17,.25),lt.spot2=new go.Spot(.83,.75),lt}),go.Shape.defineFigureGenerator("SevenPointedStar",function(Ut,et,nt){var gt=kn(7),lt=new go.Geometry,ct=new go.PathFigure(gt[0].x*et,gt[0].y*nt,!0);lt.add(ct);for(var yt=1;yt<14;yt++)ct.add(new go.PathSegment(go.PathSegment.Line,gt[yt].x*et,gt[yt].y*nt));return ct.add(new go.PathSegment(go.PathSegment.Line,gt[0].x*et,gt[0].y*nt).close()),Qe(gt),lt.spot1=new go.Spot(.222,.277),lt.spot2=new go.Spot(.777,.666),lt}),go.Shape.defineFigureGenerator("EightPointedStar",function(Ut,et,nt){var gt=kn(8),lt=new go.Geometry,ct=new go.PathFigure(gt[0].x*et,gt[0].y*nt,!0);lt.add(ct);for(var yt=1;yt<16;yt++)ct.add(new go.PathSegment(go.PathSegment.Line,gt[yt].x*et,gt[yt].y*nt));return ct.add(new go.PathSegment(go.PathSegment.Line,gt[0].x*et,gt[0].y*nt).close()),Qe(gt),lt.spot1=new go.Spot(.25,.25),lt.spot2=new go.Spot(.75,.75),lt}),go.Shape.defineFigureGenerator("NinePointedStar",function(Ut,et,nt){var gt=kn(9),lt=new go.Geometry,ct=new go.PathFigure(gt[0].x*et,gt[0].y*nt,!0);lt.add(ct);for(var yt=1;yt<18;yt++)ct.add(new go.PathSegment(go.PathSegment.Line,gt[yt].x*et,gt[yt].y*nt));return ct.add(new go.PathSegment(go.PathSegment.Line,gt[0].x*et,gt[0].y*nt).close()),Qe(gt),lt.spot1=new go.Spot(.222,.277),lt.spot2=new go.Spot(.777,.666),lt}),go.Shape.defineFigureGenerator("TenPointedStar",function(Ut,et,nt){var gt=kn(10),lt=new go.Geometry,ct=new go.PathFigure(gt[0].x*et,gt[0].y*nt,!0);lt.add(ct);for(var yt=1;yt<20;yt++)ct.add(new go.PathSegment(go.PathSegment.Line,gt[yt].x*et,gt[yt].y*nt));return ct.add(new go.PathSegment(go.PathSegment.Line,gt[0].x*et,gt[0].y*nt).close()),Qe(gt),lt.spot1=new go.Spot(.281,.261),lt.spot2=new go.Spot(.723,.748),lt}),go.Shape.defineFigureGenerator("FivePointedBurst",function(Ut,et,nt){var gt=Xe(5),lt=new go.Geometry,ct=new go.PathFigure(gt[0].x*et,gt[0].y*nt,!0);lt.add(ct);for(var yt=1;yt<gt.length;yt+=3)ct.add(new go.PathSegment(go.PathSegment.Bezier,gt[yt+2].x*et,gt[yt+2].y*nt,gt[yt].x*et,gt[yt].y*nt,gt[yt+1].x*et,gt[yt+1].y*nt));return ct.segments.last().close(),Qe(gt),lt.spot1=new go.Spot(.222,.277),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("SixPointedBurst",function(Ut,et,nt){var gt=Xe(6),lt=new go.Geometry,ct=new go.PathFigure(gt[0].x*et,gt[0].y*nt,!0);lt.add(ct);for(var yt=1;yt<gt.length;yt+=3)ct.add(new go.PathSegment(go.PathSegment.Bezier,gt[yt+2].x*et,gt[yt+2].y*nt,gt[yt].x*et,gt[yt].y*nt,gt[yt+1].x*et,gt[yt+1].y*nt));return ct.segments.last().close(),Qe(gt),lt.spot1=new go.Spot(.17,.222),lt.spot2=new go.Spot(.833,.777),lt}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(Ut,et,nt){var gt=Xe(7),lt=new go.Geometry,ct=new go.PathFigure(gt[0].x*et,gt[0].y*nt,!0);lt.add(ct);for(var yt=1;yt<gt.length;yt+=3)ct.add(new go.PathSegment(go.PathSegment.Bezier,gt[yt+2].x*et,gt[yt+2].y*nt,gt[yt].x*et,gt[yt].y*nt,gt[yt+1].x*et,gt[yt+1].y*nt));return ct.segments.last().close(),Qe(gt),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("EightPointedBurst",function(Ut,et,nt){var gt=Xe(8),lt=new go.Geometry,ct=new go.PathFigure(gt[0].x*et,gt[0].y*nt,!0);lt.add(ct);for(var yt=1;yt<gt.length;yt+=3)ct.add(new go.PathSegment(go.PathSegment.Bezier,gt[yt+2].x*et,gt[yt+2].y*nt,gt[yt].x*et,gt[yt].y*nt,gt[yt+1].x*et,gt[yt+1].y*nt));return ct.segments.last().close(),Qe(gt),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("NinePointedBurst",function(Ut,et,nt){var gt=Xe(9),lt=new go.Geometry,ct=new go.PathFigure(gt[0].x*et,gt[0].y*nt,!0);lt.add(ct);for(var yt=1;yt<gt.length;yt+=3)ct.add(new go.PathSegment(go.PathSegment.Bezier,gt[yt+2].x*et,gt[yt+2].y*nt,gt[yt].x*et,gt[yt].y*nt,gt[yt+1].x*et,gt[yt+1].y*nt));return ct.segments.last().close(),Qe(gt),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("TenPointedBurst",function(Ut,et,nt){var gt=Xe(10),lt=new go.Geometry,ct=new go.PathFigure(gt[0].x*et,gt[0].y*nt,!0);lt.add(ct);for(var yt=1;yt<gt.length;yt+=3)ct.add(new go.PathSegment(go.PathSegment.Bezier,gt[yt+2].x*et,gt[yt+2].y*nt,gt[yt].x*et,gt[yt].y*nt,gt[yt+1].x*et,gt[yt+1].y*nt));return ct.segments.last().close(),Qe(gt),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.setFigureParameter("FramedRectangle",0,new yn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new yn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN,lt=Ut?Ut.parameter2:NaN;isNaN(gt)&&(gt=8),isNaN(lt)&&(lt=8);var ct=new go.Geometry,yt=new go.PathFigure(0,0,!0);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),gt<et/2&&lt<nt/2&&(yt.add(new go.PathSegment(go.PathSegment.Move,gt,lt)),yt.add(new go.PathSegment(go.PathSegment.Line,gt,nt-lt)),yt.add(new go.PathSegment(go.PathSegment.Line,et-gt,nt-lt)),yt.add(new go.PathSegment(go.PathSegment.Line,et-gt,lt).close())),ct.setSpots(0,0,1,1,gt,lt,-gt,-lt),ct}),go.Shape.setFigureParameter("Ring",0,new yn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;(isNaN(gt)||gt<0)&&(gt=8);var lt=et/2,ct=new go.Geometry,yt=new go.PathFigure(et,et/2,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Arc,0,360,lt,lt,lt,lt).close());var Lt=Math.max(lt-gt,0);return Lt>0&&(yt.add(new go.PathSegment(go.PathSegment.Move,et/2+Lt,et/2)),yt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,lt,lt,Lt,Lt).close())),ct.spot1=be,ct.spot2=we,ct.defaultStretch=go.GraphObject.Uniform,ct}),go.Shape.defineFigureGenerator("Cloud",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(.08034461*et,.1944299*nt,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*et,.05349299*nt,-.09239631*et,.07836421*nt,.1406031*et,-.0542823*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*et,.074219*nt,.2450511*et,-.00697547*nt,.3776197*et,-.01112067*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*et,.07004196*nt,.4539471*et,0,.6066018*et,-.02526587*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*et,.08370865*nt,.6914277*et,-.01904177*nt,.8921095*et,-.01220843*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*et,.3194596*nt,1.036446*et,.04105738*nt,1.020377*et,.3022052*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*et,.562044*nt,1.04448*et,.360238*nt,.992256*et,.5219009*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*et,.8217117*nt,1.032337*et,.5771781*nt,1.018411*et,.8120651*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*et,.9156953*nt,1.028411*et,.9571472*nt,.8556702*et,1.052487*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*et,.9310455*nt,.7431877*et,1.009325*nt,.5624123*et,1.021761*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*et,.9344623*nt,.4820677*et,1.031761*nt,.3030112*et,1.002796*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*et,.870098*nt,.2329994*et,1.01518*nt,.03213784*et,1.01518*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*et,.6545475*nt,-.02812061*et,.9032597*nt,-.01205169*et,.6835638*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*et,.4265613*nt,-.01812061*et,.6089503*nt,-.00606892*et,.4555777*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*et,.1944299*nt,-.01606892*et,.3892545*nt,-.01205169*et,.1944299*nt))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(Ut,et,nt){var gt=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(gt*et,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-gt)*et,0)).add(new go.PathSegment(go.PathSegment.Line,et,gt*nt)).add(new go.PathSegment(go.PathSegment.Line,et,(1-gt)*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-gt)*et,nt)).add(new go.PathSegment(go.PathSegment.Line,gt*et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,(1-gt)*nt)).add(new go.PathSegment(go.PathSegment.Line,0,gt*nt).close())).setSpots(gt/2,gt/2,1-gt/2,1-gt/2)}),go.Shape.setFigureParameter("Pie",0,new yn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new yn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN,lt=Ut?Ut.parameter2:NaN;isNaN(gt)&&(gt=0),isNaN(lt)&&(lt=315);var ct=gt%360;ct<0&&(ct+=360);var yt=lt%360,Lt=Math.min(et,nt)/2;return new go.Geometry().add(new go.PathFigure(Lt,Lt).add(new go.PathSegment(go.PathSegment.Arc,ct,yt,Lt,Lt,Lt,Lt).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(Ut,et,nt){var gt=ne/Math.SQRT2*.5,lt=Math.SQRT2/2,ct=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(et,nt,!0).add(new go.PathSegment(go.PathSegment.Bezier,lt*et,ct*nt,et,(1-gt)*nt,(lt+gt)*et,(ct+gt)*nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close()))}),go.Shape.setFigureParameter("ThickCross",0,new yn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;(isNaN(gt)||gt<0)&&(gt=30);var lt=Math.min(gt,et)/2,ct=et/2,yt=nt/2;return new go.Geometry().add(new go.PathFigure(ct-lt,0,!0).add(new go.PathSegment(go.PathSegment.Line,ct+lt,0)).add(new go.PathSegment(go.PathSegment.Line,ct+lt,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,et,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,et,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,ct+lt,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,ct+lt,nt)).add(new go.PathSegment(go.PathSegment.Line,ct-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,ct-lt,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,ct-lt,yt-lt).close()))}),go.Shape.setFigureParameter("ThinCross",0,new yn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;(isNaN(gt)||gt<0)&&(gt=10);var lt=Math.min(gt,et)/2,ct=et/2,yt=nt/2;return new go.Geometry().add(new go.PathFigure(ct-lt,0,!0).add(new go.PathSegment(go.PathSegment.Line,ct+lt,0)).add(new go.PathSegment(go.PathSegment.Line,ct+lt,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,et,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,et,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,ct+lt,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,ct+lt,nt)).add(new go.PathSegment(go.PathSegment.Line,ct-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,ct-lt,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,ct-lt,yt-lt).close()))}),go.Shape.setFigureParameter("ThickX",0,new yn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;if((isNaN(gt)||gt<0)&&(gt=30),et===0||nt===0){var lt=new go.Geometry(go.Geometry.Rectangle);return lt.startX=0,lt.startY=0,lt.endX=et,lt.endY=nt,lt}else{var ct=et/2,yt=nt/2,Lt=Math.atan2(nt,et),Nt=gt-Math.min(Math.cos(Lt)*gt/2,ct),Vt=gt-Math.min(Math.sin(Lt)*gt/2,yt),lt=new go.Geometry,Jt=new go.PathFigure(Nt,0,!0);return lt.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Line,ct,.2*nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,et-Nt,0)),Jt.add(new go.PathSegment(go.PathSegment.Line,et,Vt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.8*et,yt)),Jt.add(new go.PathSegment(go.PathSegment.Line,et,nt-Vt)),Jt.add(new go.PathSegment(go.PathSegment.Line,et-Nt,nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,ct,.8*nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,Nt,nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,0,nt-Vt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.2*et,yt)),Jt.add(new go.PathSegment(go.PathSegment.Line,0,Vt).close()),lt}}),go.Shape.setFigureParameter("ThinX",0,new yn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;(isNaN(gt)||gt<0)&&(gt=10);var lt=new go.Geometry,ct=new go.PathFigure(.1*et,0,!0);return lt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.5*et,.4*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.9*et,0)),ct.add(new go.PathSegment(go.PathSegment.Line,et,.1*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.6*et,.5*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.1*et,nt)),ct.add(new go.PathSegment(go.PathSegment.Line,0,.9*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.4*et,.5*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt).close()),lt}),go.Shape.setFigureParameter("SquareIBeam",0,new yn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;isNaN(gt)&&(gt=.2);var lt=new go.Geometry,ct=new go.PathFigure(0,0,!0);return lt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,et,0)),ct.add(new go.PathSegment(go.PathSegment.Line,et,gt*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,(.5+gt/2)*et,gt*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,(.5+gt/2)*et,(1-gt)*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,et,(1-gt)*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ct.add(new go.PathSegment(go.PathSegment.Line,0,nt)),ct.add(new go.PathSegment(go.PathSegment.Line,0,(1-gt)*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,(.5-gt/2)*et,(1-gt)*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,(.5-gt/2)*et,gt*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,0,gt*nt).close()),lt}),go.Shape.setFigureParameter("RoundedIBeam",0,new yn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;isNaN(gt)&&(gt=.5);var lt=new go.Geometry,ct=new go.PathFigure(0,0,!0);return lt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,et,0)),ct.add(new go.PathSegment(go.PathSegment.Bezier,et,nt,Math.abs(1-gt)*et,.25*nt,Math.abs(1-gt)*et,.75*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,0,nt)),ct.add(new go.PathSegment(go.PathSegment.Bezier,0,0,gt*et,.75*nt,gt*et,.25*nt).close()),lt}),go.Shape.defineFigureGenerator("HalfEllipse",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,ne*et,0,et,(.5-ne/2)*nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,(.5+ne/2)*nt,ne*et,nt).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,0,et,nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*et,.75*nt,.5*et,.25*nt).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,nt,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*nt,.1*et,.8*nt,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.3*nt,0,0,.45*et,0)).add(new go.PathSegment(go.PathSegment.Bezier,et,.3*nt,.55*et,0,et,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,.5*nt,.9*et,.8*nt).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*et,.01*nt)).add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,.6*et,.2*nt,et,.25*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.55*et,.7*nt,et,.8*nt,.6*et,.8*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.75*et,nt,.5*et,.75*nt,.55*et,.95*nt)).add(new go.PathSegment(go.PathSegment.Line,.25*et,nt)).add(new go.PathSegment(go.PathSegment.Bezier,.45*et,.7*nt,.45*et,.95*nt,.5*et,.75*nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,.4*et,.8*nt,0,.8*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.49*et,.01*nt,0,.25*nt,.4*et,.2*nt).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(.4*et,.6*nt,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.15*et,nt,.5*et,.75*nt,.45*et,.95*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.6*et,.6*nt,.55*et,.95*nt,.5*et,.75*nt));var ct=.2,yt=.3,Lt=0,Nt=ct*ne;return lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*et,(.5+ct+Lt)*nt,(.5-ct+yt)*et,(.5+Nt+Lt)*nt,(.5-Nt+yt)*et,(.5+ct+Lt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ct+yt)*et,(.5+Lt)*nt,(.5+Nt+yt)*et,(.5+ct+Lt)*nt,(.5+ct+yt)*et,(.5+Nt+Lt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*et,(.5-ct+Lt)*nt,(1-.5+ct+yt)*et,(.5-Nt+Lt)*nt,(.5+Nt+yt)*et,(.5-ct+Lt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.65*et,.36771243*nt,(.5-Nt+yt)*et,(.5-ct+Lt)*nt,(.5-ct+yt+.05)*et,(.5-Nt+Lt-.02)*nt)),ct=.2,yt=0,Lt=-.3,Nt=ct*ne,lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ct+yt)*et,(.5+Lt)*nt,(.5+Nt+yt)*et,(.5+ct+Lt)*nt,(.5+ct+yt)*et,(.5+Nt+Lt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*et,(.5-ct+Lt)*nt,(1-.5+ct+yt)*et,(.5-Nt+Lt)*nt,(.5+Nt+yt)*et,(.5-ct+Lt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ct+yt)*et,(.5+Lt)*nt,(.5-Nt+yt)*et,(.5-ct+Lt)*nt,(.5-ct+yt)*et,(.5-Nt+Lt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Nt+yt)*et,(.5+ct+Lt)*nt,(.5-ct+yt)*et,(.5+Nt+Lt)*nt,(.5-Nt+yt)*et,(.5+ct+Lt)*nt)),ct=.2,yt=-.3,Lt=0,Nt=ct*ne,lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*et,(.5-ct+Lt)*nt,(1-.5+ct+yt-.05)*et,(.5-Nt+Lt-.02)*nt,(.5+Nt+yt)*et,(.5-ct+Lt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ct+yt)*et,(.5+Lt)*nt,(.5-Nt+yt)*et,(.5-ct+Lt)*nt,(.5-ct+yt)*et,(.5-Nt+Lt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*et,(.5+ct+Lt)*nt,(.5-ct+yt)*et,(.5+Nt+Lt)*nt,(.5-Nt+yt)*et,(.5+ct+Lt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,.6*nt,(.5+Nt+yt)*et,(.5+ct+Lt)*nt,(.5+ct+yt)*et,(.5+Nt+Lt)*nt).close()),gt.setSpots(.06,.33,.93,.68),gt}),go.Shape.defineFigureGenerator("YinYang",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(et*.5,0,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,180,et*.5,et*.5,et*.5,et*.5)),lt.add(new go.PathSegment(go.PathSegment.Arc,90,-180,et*.5,et*.75,et*.25,et*.25)),lt.add(new go.PathSegment(go.PathSegment.Arc,90,180,et*.5,et*.25,et*.25,et*.25));var ct=.1,yt=.5,Lt=.25;return lt.add(new go.PathSegment(go.PathSegment.Move,(yt+ct)*et,Lt*nt)),lt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,et*yt,nt*Lt,ct*et,ct*et).close()),lt=new go.PathFigure(et*.5,0,!1),gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,-180,et*.5,et*.5,et*.5,et*.5)),Lt=.75,lt=new go.PathFigure((yt+ct)*et,Lt*nt,!0),gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,0,360,et*yt,nt*Lt,ct*et,ct*et).close()),gt.defaultStretch=go.GraphObject.Uniform,gt}),go.Shape.defineFigureGenerator("Peace",function(Ut,et,nt){var gt=.8535533905932737,lt=.5*et,ct=.5*nt;return new go.Geometry().add(new go.PathFigure(lt,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,lt,ct,lt,ct)).add(new go.PathSegment(go.PathSegment.Line,lt,nt)).add(new go.PathSegment(go.PathSegment.Move,lt,ct)).add(new go.PathSegment(go.PathSegment.Line,(1-gt)*et,gt*nt)).add(new go.PathSegment(go.PathSegment.Move,lt,ct)).add(new go.PathSegment(go.PathSegment.Line,gt*et,gt*nt)))}),go.Shape.defineFigureGenerator("NotAllowed",function(Ut,et,nt){var gt=new go.Geometry,lt=ne*.5,ct=.5,yt=.5,Lt=.5,Nt=new go.PathFigure(yt*et,(Lt-ct)*nt);gt.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-ct)*et,Lt*nt,(yt-lt)*et,(Lt-ct)*nt,(yt-ct)*et,(Lt-lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt+ct)*nt,(yt-ct)*et,(Lt+lt)*nt,(yt-lt)*et,(Lt+ct)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+ct)*et,Lt*nt,(yt+lt)*et,(Lt+ct)*nt,(yt+ct)*et,(Lt+lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt-ct)*nt,(yt+ct)*et,(Lt-lt)*nt,(yt+lt)*et,(Lt-ct)*nt)),ct=.4,lt=ne*.4;var Vt=Tt(),Jt=Tt(),Ae=Tt(),he=Tt();ln(yt,Lt-ct,yt+lt,Lt-ct,yt+ct,Lt-lt,yt+ct,Lt,.42,Vt,Jt,Ae,he,he);var le=Tt(),We=Tt(),me=Tt();ln(yt,Lt-ct,yt+lt,Lt-ct,yt+ct,Lt-lt,yt+ct,Lt,.58,he,he,me,le,We);var Je=Tt(),fn=Tt(),sn=Tt();ln(yt,Lt+ct,yt-lt,Lt+ct,yt-ct,Lt+lt,yt-ct,Lt,.42,Je,fn,sn,he,he);var ui=Tt(),hi=Tt(),Si=Tt();return ln(yt,Lt+ct,yt-lt,Lt+ct,yt-ct,Lt+lt,yt-ct,Lt,.58,he,he,Si,ui,hi),Nt.add(new go.PathSegment(go.PathSegment.Move,Si.x*et,Si.y*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-ct)*et,Lt*nt,ui.x*et,ui.y*nt,hi.x*et,hi.y*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt-ct)*nt,(yt-ct)*et,(Lt-lt)*nt,(yt-lt)*et,(Lt-ct)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,Ae.x*et,Ae.y*nt,Vt.x*et,Vt.y*nt,Jt.x*et,Jt.y*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,Si.x*et,Si.y*nt).close()),Nt.add(new go.PathSegment(go.PathSegment.Move,sn.x*et,sn.y*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,me.x*et,me.y*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+ct)*et,Lt*nt,le.x*et,le.y*nt,We.x*et,We.y*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt+ct)*nt,(yt+ct)*et,(Lt+lt)*nt,(yt+lt)*et,(Lt+ct)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,sn.x*et,sn.y*nt,Je.x*et,Je.y*nt,fn.x*et,fn.y*nt).close()),Be(Vt),Be(Jt),Be(Ae),Be(he),Be(le),Be(We),Be(me),Be(Je),Be(fn),Be(sn),Be(ui),Be(hi),Be(Si),gt.defaultStretch=go.GraphObject.Uniform,gt}),go.Shape.defineFigureGenerator("Fragile",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*et,0)).add(new go.PathSegment(go.PathSegment.Line,.2*et,.15*nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.25*nt)).add(new go.PathSegment(go.PathSegment.Line,.29*et,.33*nt)).add(new go.PathSegment(go.PathSegment.Line,.35*et,.25*nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.15*nt)).add(new go.PathSegment(go.PathSegment.Line,.4*et,0)).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*et,.5*nt,et,.25*nt,.75*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.55*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.45*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.45*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.5*nt,0,.25*nt).close()))}),go.Shape.setFigureParameter("HourGlass",0,new yn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;(isNaN(gt)||gt<0)&&(gt=30),gt>et&&(gt=et);var lt=(et-gt)/2,ct=lt+gt;return new go.Geometry().add(new go.PathFigure(ct,.5*nt).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt)).add(new go.PathSegment(go.PathSegment.Line,lt,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,et,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,.55*nt).add(new go.PathSegment(go.PathSegment.Line,.6*et,0)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.45*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.45*nt)).add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.55*nt).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(Ut,et,nt){var gt=new go.Geometry,lt=ne*.4,ct=.4,yt=.5,Lt=.5,Nt=Tt(),Vt=Tt(),Jt=Tt(),Ae=Tt(),he=new go.PathFigure((yt-ct)*et,Lt*nt,!1);gt.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt-ct)*nt,(yt-ct)*et,(Lt-lt)*nt,(yt-lt)*et,(Lt-ct)*nt)),ln(yt,Lt-ct,yt+lt,Lt-ct,yt+ct,Lt-lt,yt+ct,Lt,.44,Jt,Ae,Vt,Nt,Nt),he.add(new go.PathSegment(go.PathSegment.Bezier,Vt.x*et,Vt.y*nt,Jt.x*et,Jt.y*nt,Ae.x*et,Ae.y*nt));var le=ee(Vt.x,Vt.y);ln(yt,Lt-ct,yt+lt,Lt-ct,yt+ct,Lt-lt,yt+ct,Lt,.56,Nt,Nt,Vt,Jt,Ae);var We=ee(Vt.x,Vt.y);he.add(new go.PathSegment(go.PathSegment.Line,(le.x*.1+.95*.9)*et,le.y*.1*nt)),he.add(new go.PathSegment(go.PathSegment.Line,.85*et,le.y*.1*nt)),he.add(new go.PathSegment(go.PathSegment.Line,.85*et,0)),he.add(new go.PathSegment(go.PathSegment.Line,et,0)),he.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),he.add(new go.PathSegment(go.PathSegment.Line,(We.x*.1+.9)*et,.15*nt)),he.add(new go.PathSegment(go.PathSegment.Line,(We.x*.1+.9)*et,(We.y*.1+.05*.9)*nt)),he.add(new go.PathSegment(go.PathSegment.Line,We.x*et,We.y*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,(yt+ct)*et,Lt*nt,Jt.x*et,Jt.y*nt,Ae.x*et,Ae.y*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt+ct)*nt,(yt+ct)*et,(Lt+lt)*nt,(yt+lt)*et,(Lt+ct)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,(yt-ct)*et,Lt*nt,(yt-lt)*et,(Lt+ct)*nt,(yt-ct)*et,(Lt+lt)*nt)),ct=.35,lt=ne*.35;var me=new go.PathFigure(yt*et,(Lt-ct)*nt,!1);gt.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,(yt-ct)*et,Lt*nt,(yt-lt)*et,(Lt-ct)*nt,(yt-ct)*et,(Lt-lt)*nt)),me.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt+ct)*nt,(yt-ct)*et,(Lt+lt)*nt,(yt-lt)*et,(Lt+ct)*nt)),me.add(new go.PathSegment(go.PathSegment.Bezier,(yt+ct)*et,Lt*nt,(yt+lt)*et,(Lt+ct)*nt,(yt+ct)*et,(Lt+lt)*nt)),me.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt-ct)*nt,(yt+ct)*et,(Lt-lt)*nt,(yt+lt)*et,(Lt-ct)*nt));var Je=new go.PathFigure((yt-ct)*et,Lt*nt,!1);return gt.add(Je),Be(Nt),Be(Vt),Be(Jt),Be(Ae),Be(le),Be(We),gt.spot1=new go.Spot(.202,.257),gt.spot2=new go.Spot(.792,.739),gt.defaultStretch=go.GraphObject.Uniform,gt}),go.Shape.defineFigureGenerator("GenderFemale",function(Ut,et,nt){var gt=new go.Geometry,lt=.375,ct=0,yt=-.125,Lt=lt*ne,Nt=new go.PathFigure((.525+ct)*et,(.5+lt+yt)*nt,!1);gt.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+ct)*et,(.5+yt)*nt,(.5+Lt+ct)*et,(.5+lt+yt)*nt,(.5+lt+ct)*et,(.5+Lt+yt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ct)*et,(.5-lt+yt)*nt,(1-.5+lt+ct)*et,(.5-Lt+yt)*nt,(.5+Lt+ct)*et,(.5-lt+yt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+ct)*et,(.5+yt)*nt,(.5-Lt+ct)*et,(.5-lt+yt)*nt,(.5-lt+ct)*et,(.5-Lt+yt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(.475+ct)*et,(.5+lt+yt)*nt,(.5-lt+ct)*et,(.5+Lt+yt)*nt,(.5-Lt+ct)*et,(.5+lt+yt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.475*et,.85*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.425*et,.85*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.425*et,.9*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.475*et,.9*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.475*et,nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.525*et,nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.525*et,.9*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.575*et,.9*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.575*et,.85*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.525*et,.85*nt).close()),lt=.325,ct=0,yt=-.125,Lt=lt*ne;var Nt=new go.PathFigure((1-.5+lt+ct)*et,(.5+yt)*nt,!1);gt.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ct)*et,(.5+lt+yt)*nt,(.5+lt+ct)*et,(.5+Lt+yt)*nt,(.5+Lt+ct)*et,(.5+lt+yt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+ct)*et,(.5+yt)*nt,(.5-Lt+ct)*et,(.5+lt+yt)*nt,(.5-lt+ct)*et,(.5+Lt+yt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ct)*et,(.5-lt+yt)*nt,(.5-lt+ct)*et,(.5-Lt+yt)*nt,(.5-Lt+ct)*et,(.5-lt+yt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+ct)*et,(.5+yt)*nt,(.5+Lt+ct)*et,(.5-lt+yt)*nt,(1-.5+lt+ct)*et,(.5-Lt+yt)*nt));var Nt=new go.PathFigure((.525+ct)*et,(.5+lt+yt)*nt,!1);return gt.add(Nt),gt.spot1=new go.Spot(.232,.136),gt.spot2=new go.Spot(.682,.611),gt.defaultStretch=go.GraphObject.Uniform,gt}),go.Shape.defineFigureGenerator("LogicImplies",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;return isNaN(gt)&&(gt=.2),new go.Geometry().add(new go.PathFigure((1-gt)*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-gt)*et,nt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;return isNaN(gt)&&(gt=.2),new go.Geometry().add(new go.PathFigure((1-gt)*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-gt)*et,nt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Move,gt*et,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,gt*et,nt))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)))}),go.Shape.defineFigureGenerator("LogicAnd",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,et,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(Ut,et,nt){var gt=new go.Geometry().add(new go.PathFigure(.5*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*et,.5*nt,.5*et,.5*nt)));return gt.defaultStretch=go.GraphObject.Uniform,gt}),go.Shape.defineFigureGenerator("LogicTruth",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,.5*et,0)).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Move,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Move,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt)))}),go.Shape.defineFigureGenerator("LogicForAll",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,.25*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.75*et,.5*nt))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Move,0,nt)).add(new go.PathSegment(go.PathSegment.Line,et,nt))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(Ut,et,nt){var gt=.5;return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,0,gt*nt)).add(new go.PathSegment(go.PathSegment.Arc,180,180,gt*et,gt*nt,gt*et,gt*nt)).add(new go.PathSegment(go.PathSegment.Line,et,nt))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(Ut,et,nt){var gt=.5;return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,gt*nt)).add(new go.PathSegment(go.PathSegment.Arc,0,180,gt*et,gt*nt,gt*et,gt*nt)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new yn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new yn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;isNaN(gt)&&(gt=.3);var lt=Ut?Ut.parameter2:NaN;isNaN(lt)&&(lt=.3);var ct=(1-gt)*et,yt=(.5-lt/2)*nt,Lt=(.5+lt/2)*nt,Nt=new go.Geometry,Vt=new go.PathFigure(0,yt,!0);Nt.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Line,ct,yt)),Vt.add(new go.PathSegment(go.PathSegment.Line,ct,0)),Vt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),Vt.add(new go.PathSegment(go.PathSegment.Line,ct,nt)),Vt.add(new go.PathSegment(go.PathSegment.Line,ct,Lt)),Vt.add(new go.PathSegment(go.PathSegment.Line,0,Lt).close()),Nt.spot1=new go.Spot(0,yt/nt);var Jt=Ne(0,Lt/nt,1,Lt/nt,ct/et,1,1,.5,Tt());return Nt.spot2=new go.Spot(Jt.x,Jt.y),Be(Jt),Nt}),go.Shape.setFigureParameter("Arrow2",0,new yn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new yn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;isNaN(gt)&&(gt=30),gt>et&&(gt=et);var lt=Ut?Ut.parameter2:NaN;isNaN(lt)&&(lt=30),lt=Math.min(lt,nt/2);var ct=et-gt,yt=(nt-lt)/2,Lt=yt+lt,Nt=new go.Geometry,Vt=new go.PathFigure(0,yt,!0);Nt.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Line,ct,yt)),Vt.add(new go.PathSegment(go.PathSegment.Line,ct,0)),Vt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),Vt.add(new go.PathSegment(go.PathSegment.Line,ct,nt)),Vt.add(new go.PathSegment(go.PathSegment.Line,ct,Lt)),Vt.add(new go.PathSegment(go.PathSegment.Line,0,Lt).close()),Nt.spot1=new go.Spot(0,yt/nt);var Jt=Ne(0,Lt/nt,1,Lt/nt,ct/et,1,1,.5,Tt());return Nt.spot2=new go.Spot(Jt.x,Jt.y),Be(Jt),Nt}),go.Shape.defineFigureGenerator("Chevron",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,0,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt).close()),gt}),go.Shape.defineFigureGenerator("DoubleArrow",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,0,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,.214*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,1*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,1*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,.786*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,1*nt).close()),gt}),go.Shape.setFigureParameter("DoubleEndArrow",0,new yn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;isNaN(gt)&&(gt=.3);var lt=(.5-gt/2)*nt,ct=(.5+gt/2)*nt,yt=new go.Geometry,Lt=new go.PathFigure(et,.5*nt,!0);yt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,ct)),Lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,ct)),Lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,0)),Lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close());var Nt=Ne(0,.5,.3,0,0,lt/nt,.1,lt/nt,Tt());return yt.spot1=new go.Spot(Nt.x,Nt.y),Nt=Ne(.7,1,1,.5,0,ct/nt,1,ct/nt,Nt),yt.spot2=new go.Spot(Nt.x,Nt.y),Be(Nt),yt}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new yn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new yn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;isNaN(gt)&&(gt=40);var lt=Ut?Ut.parameter2:NaN;isNaN(lt)&&(lt=100);var ct=(nt-gt)/2,yt=ct+gt,Lt=(nt-lt)/2,Nt=Lt+lt;(gt>nt||lt>nt)&&(lt>gt?(gt=gt*nt/lt,ct=(nt-gt)/2,yt=ct+gt,Lt=0,Nt=nt):(ct=0,yt=nt,Lt=0,Nt=nt));var Vt=new go.Geometry,Jt=new go.PathFigure(et,.5*nt,!0);Vt.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Line,.7*et,Nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.7*et,yt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.3*et,yt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.3*et,Nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.3*et,Lt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.3*et,ct)),Jt.add(new go.PathSegment(go.PathSegment.Line,.7*et,ct)),Jt.add(new go.PathSegment(go.PathSegment.Line,.7*et,Lt).close());var Ae=Ne(0,.5,.3,Lt/nt,0,ct/nt,1,ct/nt,Tt());return Vt.spot1=new go.Spot(Ae.x,Ae.y),Ae=Ne(.7,Nt/nt,1,.5,0,yt/nt,1,yt/nt,Ae),Vt.spot2=new go.Spot(Ae.x,Ae.y),Be(Ae),Vt}),go.Shape.setFigureParameter("IBeamArrow",0,new yn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;isNaN(gt)&&(gt=.3);var lt=(.5-gt/2)*nt,ct=(.5+gt/2)*nt,yt=new go.Geometry,Lt=new go.PathFigure(et,.5*nt,!0);yt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,ct)),Lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,ct)),Lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),Lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,0)),Lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),yt.spot1=new go.Spot(0,lt/nt);var Nt=Ne(.7,1,1,.5,0,ct/nt,1,ct/nt,Tt());return yt.spot2=new go.Spot(Nt.x,Nt.y),Be(Nt),yt}),go.Shape.setFigureParameter("IBeamArrow2",0,new yn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new yn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;isNaN(gt)&&(gt=40);var lt=Ut?Ut.parameter2:NaN;isNaN(lt)&&(lt=100);var ct=(nt-gt)/2,yt=ct+gt,Lt=(nt-lt)/2,Nt=Lt+lt;(gt>nt||lt>nt)&&(lt>gt?(gt=gt*nt/lt,ct=(nt-gt)/2,yt=ct+gt,Lt=0,Nt=nt):(ct=0,yt=nt,Lt=0,Nt=nt));var Vt=new go.Geometry,Jt=new go.PathFigure(et,.5*nt,!0);Vt.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Line,.7*et,Nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.7*et,yt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.2*et,yt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.2*et,Nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,0,Nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,0,Lt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.2*et,Lt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.2*et,ct)),Jt.add(new go.PathSegment(go.PathSegment.Line,.7*et,ct)),Jt.add(new go.PathSegment(go.PathSegment.Line,.7*et,Lt).close()),Vt.spot1=new go.Spot(0,ct/nt);var Ae=Ne(.7,Nt/nt,1,.5,0,yt/nt,1,yt/nt,Tt());return Vt.spot2=new go.Spot(Ae.x,Ae.y),Be(Ae),Vt}),go.Shape.setFigureParameter("Pointer",0,new yn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;isNaN(gt)&&(gt=.1);var lt=new go.Geometry,ct=new go.PathFigure(et,.5*nt,!0);lt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,0,nt)),ct.add(new go.PathSegment(go.PathSegment.Line,gt*et,.5*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),lt.spot1=new go.Spot(gt,.35);var yt=Ne(.2,.65,1,.65,0,1,1,.5,Tt());return lt.spot2=new go.Spot(yt.x,yt.y),Be(yt),lt}),go.Shape.setFigureParameter("RoundedPointer",0,new yn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;isNaN(gt)&&(gt=.3);var lt=new go.Geometry,ct=new go.PathFigure(et,.5*nt,!0);lt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,0,nt)),ct.add(new go.PathSegment(go.PathSegment.Bezier,0,0,gt*et,.75*nt,gt*et,.25*nt).close()),lt.spot1=new go.Spot(gt,.35);var yt=Ne(0,.65,1,.65,0,1,1,.5,Tt());return lt.spot2=new go.Spot(yt.x,yt.y),Be(yt),lt}),go.Shape.setFigureParameter("SplitEndArrow",0,new yn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;isNaN(gt)&&(gt=.4);var lt=(.5-gt/2)*nt,ct=(.5+gt/2)*nt,yt=new go.Geometry,Lt=new go.PathFigure(et,.5*nt,!0);yt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,ct)),Lt.add(new go.PathSegment(go.PathSegment.Line,0,ct)),Lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.5*nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),yt.spot1=new go.Spot(.2,.3);var Nt=Ne(.7,1,1,.5,0,ct/nt,1,ct/nt,Tt());return yt.spot2=new go.Spot(Nt.x,Nt.y),Be(Nt),yt}),go.Shape.setFigureParameter("SplitEndArrow2",0,new yn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;isNaN(gt)&&(gt=50);var lt=(nt-gt)/2,ct=lt+gt;gt>nt&&(lt=0,ct=nt);var yt=new go.Geometry,Lt=new go.PathFigure(et,.5*nt,!0);yt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,ct)),Lt.add(new go.PathSegment(go.PathSegment.Line,0,ct)),Lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.5*nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),yt.spot1=new go.Spot(.2,lt/nt);var Nt=Ne(.7,1,1,.5,0,ct/nt,1,ct/nt,Tt());return yt.spot2=new go.Spot(Nt.x,Nt.y),Be(Nt),yt}),go.Shape.setFigureParameter("SquareArrow",0,new yn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;isNaN(gt)&&(gt=.7);var lt=new go.Geometry,ct=new go.PathFigure(et,.5*nt,!0);return lt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,gt*et,nt)),ct.add(new go.PathSegment(go.PathSegment.Line,0,nt)),ct.add(new go.PathSegment(go.PathSegment.Line,0,0)),ct.add(new go.PathSegment(go.PathSegment.Line,gt*et,0).close()),lt.spot1=go.Spot.TopLeft,lt.spot2=new go.Spot(gt,1),lt}),go.Shape.defineFigureGenerator("Cone1",function(Ut,et,nt){var gt=new go.Geometry,lt=ne*.5,ct=ne*.1,yt=new go.PathFigure(0,.9*nt,!0);return gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.9+ct)*nt,(.5+lt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-lt)*et,nt,0,(.9+ct)*nt).close()),gt.spot1=new go.Spot(.25,.5),gt.spot2=new go.Spot(.75,.97),gt}),go.Shape.defineFigureGenerator("Cone2",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,.9*nt,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,et,.9*nt,(1-.85/.9)*et,nt,.85/.9*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.9*nt).close());var ct=new go.PathFigure(0,.9*nt,!1);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Bezier,et,.9*nt,(1-.85/.9)*et,.8*nt,.85/.9*et,.8*nt)),gt.spot1=new go.Spot(.25,.5),gt.spot2=new go.Spot(.75,.82),gt}),go.Shape.defineFigureGenerator("Cube1",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(.5*et,nt,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.15*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.85*nt).close());var ct=new go.PathFigure(.5*et,nt,!1);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.5*et,.3*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,0,.15*nt)),ct.add(new go.PathSegment(go.PathSegment.Move,.5*et,.3*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),gt.spot1=new go.Spot(0,.3),gt.spot2=new go.Spot(.5,.85),gt}),go.Shape.defineFigureGenerator("Cube2",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,.3*nt,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,0).close());var ct=new go.PathFigure(0,.3*nt,!1);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.7*et,.3*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,et,0)),ct.add(new go.PathSegment(go.PathSegment.Move,.7*et,.3*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),gt.spot1=new go.Spot(0,.3),gt.spot2=new go.Spot(.7,1),gt}),go.Shape.defineFigureGenerator("Cylinder1",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;isNaN(gt)&&(gt=5),gt=Math.min(gt,nt/3);var lt=new go.Geometry,ct=ne*.5,yt=new go.PathFigure(0,gt,!0);lt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,ne*gt,(.5-ct)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,1*et,gt,(.5+ct)*et,0,1*et,ne*gt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt-gt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,1*nt,1*et,nt-ne*gt,(.5+ct)*et,1*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-gt,(.5-ct)*et,1*nt,0,nt-ne*gt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,gt));var Lt=new go.PathFigure(et,gt,!1);return lt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,2*gt,1*et,2*gt-ne*gt,(.5+ct)*et,2*gt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt,(.5-ct)*et,2*gt,0,2*gt-ne*gt)),lt.spot1=new go.Spot(0,0,0,2*gt),lt.spot2=new go.Spot(1,1),lt}),go.Shape.defineFigureGenerator("Cylinder2",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;isNaN(gt)&&(gt=5),gt=Math.min(gt,nt/3);var lt=new go.Geometry,ct=ne*.5,yt=new go.PathFigure(0,nt-gt,!0);lt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,0,gt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,ne*gt,(.5-ct)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,gt,(.5+ct)*et,0,et,ne*gt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt-gt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,nt-ne*gt,(.5+ct)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-gt,(.5-ct)*et,nt,0,nt-ne*gt));var Lt=new go.PathFigure(0,nt-gt,!1);return lt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt-2*gt,0,nt-gt-ne*gt,(.5-ct)*et,nt-2*gt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,et,nt-gt,(.5+ct)*et,nt-2*gt,et,nt-gt-ne*gt)),lt.spot1=new go.Spot(0,0),lt.spot2=new go.Spot(1,1,0,-2*gt),lt}),go.Shape.defineFigureGenerator("Cylinder3",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;isNaN(gt)&&(gt=5),gt=Math.min(gt,et/3);var lt=new go.Geometry,ct=ne*.5,yt=new go.PathFigure(gt,0,!0);lt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et-gt,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,et-ne*gt,0,et,(.5-ct)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et-gt,nt,et,(.5+ct)*nt,et-ne*gt,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,gt,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,ne*gt,nt,0,(.5+ct)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,gt,0,0,(.5-ct)*nt,ne*gt,0));var Lt=new go.PathFigure(gt,0,!1);return lt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,2*gt,.5*nt,gt+ne*gt,0,2*gt,(.5-ct)*nt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,gt,nt,2*gt,(.5+ct)*nt,gt+ne*gt,nt)),lt.spot1=new go.Spot(0,0,2*gt,0),lt.spot2=new go.Spot(1,1),lt}),go.Shape.defineFigureGenerator("Cylinder4",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;isNaN(gt)&&(gt=5),gt=Math.min(gt,et/3);var lt=new go.Geometry,ct=ne*.5,yt=new go.PathFigure(et-gt,0,!0);lt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,et-ne*gt,0,et,(.5-ct)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et-gt,nt,et,(.5+ct)*nt,et-ne*gt,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,gt,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,ne*gt,nt,0,(.5+ct)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,gt,0,0,(.5-ct)*nt,ne*gt,0)),yt.add(new go.PathSegment(go.PathSegment.Line,et-gt,0));var Lt=new go.PathFigure(et-gt,0,!1);return lt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,et-2*gt,.5*nt,et-gt-ne*gt,0,et-2*gt,(.5-ct)*nt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,et-gt,nt,et-2*gt,(.5+ct)*nt,et-gt-ne*gt,nt)),lt.spot1=new go.Spot(0,0),lt.spot2=new go.Spot(1,1,-2*gt,0),lt}),go.Shape.defineFigureGenerator("Prism1",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(.25*et,.25*nt,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var ct=new go.PathFigure(.25*et,.25*nt,!1);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),gt.spot1=new go.Spot(.408,.172),gt.spot2=new go.Spot(.833,.662),gt}),go.Shape.defineFigureGenerator("Prism2",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,.25*nt,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var ct=new go.PathFigure(0,nt,!1);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.25*et,.5*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),ct.add(new go.PathSegment(go.PathSegment.Move,0,.25*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.25*et,.5*nt)),gt.spot1=new go.Spot(.25,.5),gt.spot2=new go.Spot(.75,.75),gt}),go.Shape.defineFigureGenerator("Pyramid1",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(.5*et,0,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.75*nt).close());var ct=new go.PathFigure(.5*et,0,!1);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),gt.spot1=new go.Spot(.25,.367),gt.spot2=new go.Spot(.75,.875),gt}),go.Shape.defineFigureGenerator("Pyramid2",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(.5*et,0,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.85*nt).close());var ct=new go.PathFigure(.5*et,0,!1);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.5*et,.7*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,0,.85*nt)),ct.add(new go.PathSegment(go.PathSegment.Move,.5*et,.7*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),gt.spot1=new go.Spot(.25,.367),gt.spot2=new go.Spot(.75,.875),gt}),go.Shape.defineFigureGenerator("Actor",function(Ut,et,nt){var gt=new go.Geometry,lt=.2,ct=.1,yt=ne*lt,Lt=ne*ct,Nt=.5,Vt=.1,Jt=new go.PathFigure(Nt*et,(Vt+ct)*nt,!0);gt.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-lt)*et,Vt*nt,(Nt-yt)*et,(Vt+ct)*nt,(Nt-lt)*et,(Vt+Lt)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(Vt-ct)*nt,(Nt-lt)*et,(Vt-Lt)*nt,(Nt-yt)*et,(Vt-ct)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+lt)*et,Vt*nt,(Nt+yt)*et,(Vt-ct)*nt,(Nt+lt)*et,(Vt-Lt)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(Vt+ct)*nt,(Nt+lt)*et,(Vt+Lt)*nt,(Nt+yt)*et,(Vt+ct)*nt));var Ae=.05,he=ne*Ae;Nt=.05,Vt=.25;var le=new go.PathFigure(.5*et,.2*nt,!0);return gt.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.95*et,.2*nt)),Nt=.95,Vt=.25,le.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+Ae)*et,Vt*nt,(Nt+he)*et,(Vt-Ae)*nt,(Nt+Ae)*et,(Vt-he)*nt)),le.add(new go.PathSegment(go.PathSegment.Line,et,.6*nt)),le.add(new go.PathSegment(go.PathSegment.Line,.85*et,.6*nt)),le.add(new go.PathSegment(go.PathSegment.Line,.85*et,.35*nt)),Ae=.025,he=ne*Ae,Nt=.825,Vt=.35,le.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(Vt-Ae)*nt,(Nt+Ae)*et,(Vt-he)*nt,(Nt+he)*et,(Vt-Ae)*nt)),le.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-Ae)*et,Vt*nt,(Nt-he)*et,(Vt-Ae)*nt,(Nt-Ae)*et,(Vt-he)*nt)),le.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),le.add(new go.PathSegment(go.PathSegment.Line,.55*et,nt)),le.add(new go.PathSegment(go.PathSegment.Line,.55*et,.7*nt)),Ae=.05,he=ne*Ae,Nt=.5,Vt=.7,le.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(Vt-Ae)*nt,(Nt+Ae)*et,(Vt-he)*nt,(Nt+he)*et,(Vt-Ae)*nt)),le.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-Ae)*et,Vt*nt,(Nt-he)*et,(Vt-Ae)*nt,(Nt-Ae)*et,(Vt-he)*nt)),le.add(new go.PathSegment(go.PathSegment.Line,.45*et,nt)),le.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),le.add(new go.PathSegment(go.PathSegment.Line,.2*et,.35*nt)),Ae=.025,he=ne*Ae,Nt=.175,Vt=.35,le.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(Vt-Ae)*nt,(Nt+Ae)*et,(Vt-he)*nt,(Nt+he)*et,(Vt-Ae)*nt)),le.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-Ae)*et,Vt*nt,(Nt-he)*et,(Vt-Ae)*nt,(Nt-Ae)*et,(Vt-he)*nt)),le.add(new go.PathSegment(go.PathSegment.Line,.15*et,.6*nt)),le.add(new go.PathSegment(go.PathSegment.Line,0,.6*nt)),le.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),Ae=.05,he=ne*Ae,Nt=.05,Vt=.25,le.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(Vt-Ae)*nt,(Nt-Ae)*et,(Vt-he)*nt,(Nt-he)*et,(Vt-Ae)*nt)),le.add(new go.PathSegment(go.PathSegment.Line,.5*et,.2*nt)),gt.spot1=new go.Spot(.2,.2),gt.spot2=new go.Spot(.8,.65),gt}),go.Shape.setFigureParameter("Card",0,new yn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;isNaN(gt)&&(gt=.2);var lt=new go.Geometry,ct=new go.PathFigure(et,0,!0);return lt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ct.add(new go.PathSegment(go.PathSegment.Line,0,nt)),ct.add(new go.PathSegment(go.PathSegment.Line,0,gt*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,gt*et,0).close()),lt.spot1=new go.Spot(0,gt),lt.spot2=go.Spot.BottomRight,lt}),go.Shape.defineFigureGenerator("Collate",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(.5*et,.5*nt,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt));var ct=new go.PathFigure(.5*et,.5*nt,!0);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ct.add(new go.PathSegment(go.PathSegment.Line,0,nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),gt.spot1=new go.Spot(.25,0),gt.spot2=new go.Spot(.75,.25),gt}),go.Shape.defineFigureGenerator("CreateRequest",function(Ut,et,nt){var gt=new go.Geometry,lt=Ut?Ut.parameter1:NaN;isNaN(lt)&&(lt=.1);var ct=new go.PathFigure(0,0,!0);gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,et,0)),ct.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ct.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var yt=new go.PathFigure(0,lt*nt,!1);return gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,lt*nt)),yt.add(new go.PathSegment(go.PathSegment.Move,0,(1-lt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,(1-lt)*nt)),gt}),go.Shape.defineFigureGenerator("Database",function(Ut,et,nt){var gt=new go.Geometry,lt=ne*.5,ct=ne*.1,yt=new go.PathFigure(et,.1*nt,!0);gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.9+ct)*nt,(.5+lt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-lt)*et,nt,0,(.9+ct)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,(.1-ct)*nt,(.5-lt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,.1*nt,(.5+lt)*et,0,et,(.1-ct)*nt));var Lt=new go.PathFigure(et,.1*nt,!1);return gt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,et,(.1+ct)*nt,(.5+lt)*et,.2*nt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*nt,(.5-lt)*et,.2*nt,0,(.1+ct)*nt)),Lt.add(new go.PathSegment(go.PathSegment.Move,et,.2*nt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.3*nt,et,(.2+ct)*nt,(.5+lt)*et,.3*nt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*nt,(.5-lt)*et,.3*nt,0,(.2+ct)*nt)),Lt.add(new go.PathSegment(go.PathSegment.Move,et,.3*nt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.4*nt,et,(.3+ct)*nt,(.5+lt)*et,.4*nt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*nt,(.5-lt)*et,.4*nt,0,(.3+ct)*nt)),gt.spot1=new go.Spot(0,.4),gt.spot2=new go.Spot(1,.9),gt}),go.Shape.defineFigureGenerator("DataStorage",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,0,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.75*et,nt,et,0,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.9*nt,.25*et,.1*nt).close()),gt.spot1=new go.Spot(.226,0),gt.spot2=new go.Spot(.81,1),gt}),go.Shape.defineFigureGenerator("DiskStorage",function(Ut,et,nt){var gt=new go.Geometry,lt=ne*.5,ct=ne*.1,yt=new go.PathFigure(et,.1*nt,!0);gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.9+ct)*nt,(.5+lt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-lt)*et,nt,0,(.9+ct)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,(.1-ct)*nt,(.5-lt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,.1*nt,(.5+lt)*et,0,et,(.1-ct)*nt));var Lt=new go.PathFigure(et,.1*nt,!1);return gt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,et,(.1+ct)*nt,(.5+lt)*et,.2*nt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*nt,(.5-lt)*et,.2*nt,0,(.1+ct)*nt)),Lt.add(new go.PathSegment(go.PathSegment.Move,et,.2*nt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.3*nt,et,(.2+ct)*nt,(.5+lt)*et,.3*nt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*nt,(.5-lt)*et,.3*nt,0,(.2+ct)*nt)),gt.spot1=new go.Spot(0,.3),gt.spot2=new go.Spot(1,.9),gt}),go.Shape.defineFigureGenerator("Display",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(.25*et,0,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.75*et,nt,et,0,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt).close()),gt.spot1=new go.Spot(.25,0),gt.spot2=new go.Spot(.75,1),gt}),go.Shape.defineFigureGenerator("DividedEvent",function(Ut,et,nt){var gt=new go.Geometry,lt=Ut?Ut.parameter1:NaN;isNaN(lt)?lt=.2:lt<.15&&(lt=.15);var ct=ne*.2,yt=new go.PathFigure(0,.2*nt,!0);gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,0,(.2-ct)*nt,(.2-ct)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,.8*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,.2*nt,(.8+ct)*et,0,et,(.2-ct)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,nt,et,(.8+ct)*nt,(.8+ct)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*nt,(.2-ct)*et,nt,0,(.8+ct)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt));var Lt=new go.PathFigure(0,lt*nt,!1);return gt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,et,lt*nt)),gt}),go.Shape.defineFigureGenerator("DividedProcess",function(Ut,et,nt){var gt=new go.Geometry,lt=Ut?Ut.parameter1:NaN;(isNaN(lt)||lt<.1)&&(lt=.1);var ct=new go.PathFigure(0,0,!0);gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,et,0)),ct.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ct.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var yt=new go.PathFigure(0,lt*nt,!1);return gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,lt*nt)),gt}),go.Shape.defineFigureGenerator("Document",function(Ut,et,nt){var gt=new go.Geometry;nt=nt/.8;var lt=new go.PathFigure(0,.7*nt,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.5*et,.4*nt,.5*et,nt).close()),gt.spot1=go.Spot.TopLeft,gt.spot2=new go.Spot(1,.6),gt}),go.Shape.defineFigureGenerator("ExternalOrganization",function(Ut,et,nt){var gt=new go.Geometry,lt=Ut?Ut.parameter1:NaN;(isNaN(lt)||lt<.2)&&(lt=.2);var ct=new go.PathFigure(0,0,!0);gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,et,0)),ct.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ct.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var yt=new go.PathFigure(lt*et,0,!1);return gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,0,lt*nt)),yt.add(new go.PathSegment(go.PathSegment.Move,et,lt*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Move,0,(1-lt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,lt*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Move,(1-lt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,(1-lt)*nt)),gt}),go.Shape.defineFigureGenerator("ExternalProcess",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(.5*et,0,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt).close());var ct=new go.PathFigure(.1*et,.4*nt,!1);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.1*et,.6*nt)),ct.add(new go.PathSegment(go.PathSegment.Move,.9*et,.6*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt)),ct.add(new go.PathSegment(go.PathSegment.Move,.6*et,.1*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.4*et,.1*nt)),ct.add(new go.PathSegment(go.PathSegment.Move,.4*et,.9*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.6*et,.9*nt)),gt.spot1=new go.Spot(.25,.25),gt.spot2=new go.Spot(.75,.75),gt}),go.Shape.defineFigureGenerator("File",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,0,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var ct=new go.PathFigure(.75*et,0,!1);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.75*et,.25*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),gt.spot1=new go.Spot(0,.25),gt.spot2=go.Spot.BottomRight,gt}),go.Shape.defineFigureGenerator("Interrupt",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(et,.5*nt,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt));var ct=new go.PathFigure(et,.5*nt,!1);gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,et,nt));var yt=new go.PathFigure(et,.5*nt,!1);return gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.spot1=new go.Spot(0,.25),gt.spot2=new go.Spot(.5,.75),gt}),go.Shape.defineFigureGenerator("InternalStorage",function(Ut,et,nt){var gt=new go.Geometry,lt=Ut?Ut.parameter1:NaN,ct=Ut?Ut.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(ct)&&(ct=.1);var yt=new go.PathFigure(0,0,!0);gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var Lt=new go.PathFigure(lt*et,0,!1);return gt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,lt*et,nt)),Lt.add(new go.PathSegment(go.PathSegment.Move,0,ct*nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,et,ct*nt)),gt}),go.Shape.defineFigureGenerator("Junction",function(Ut,et,nt){var gt=new go.Geometry,lt=1/Math.SQRT2,ct=(1-1/Math.SQRT2)/2,yt=ne*.5,Lt=.5,Nt=new go.PathFigure(et,Lt*nt,!0);gt.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,Lt*et,nt,et,(Lt+yt)*nt,(Lt+yt)*et,nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,0,Lt*nt,(Lt-yt)*et,nt,0,(Lt+yt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,Lt*et,0,0,(Lt-yt)*nt,(Lt-yt)*et,0)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,et,Lt*nt,(Lt+yt)*et,0,et,(Lt-yt)*nt));var Vt=new go.PathFigure((ct+lt)*et,(ct+lt)*nt,!1);return gt.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Line,ct*et,ct*nt)),Vt.add(new go.PathSegment(go.PathSegment.Move,ct*et,(ct+lt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Line,(ct+lt)*et,ct*nt)),gt}),go.Shape.defineFigureGenerator("LinedDocument",function(Ut,et,nt){var gt=new go.Geometry;nt=nt/.8;var lt=new go.PathFigure(0,.7*nt,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.5*et,.4*nt,.5*et,nt).close());var ct=new go.PathFigure(.1*et,0,!1);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.1*et,.75*nt)),gt.spot1=new go.Spot(.1,0),gt.spot2=new go.Spot(1,.6),gt}),go.Shape.defineFigureGenerator("LoopLimit",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,nt,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt).close()),gt.spot1=new go.Spot(0,.25),gt.spot2=go.Spot.BottomRight,gt}),go.Shape.defineFigureGenerator("MagneticTape",function(Ut,et,nt){var gt=new go.Geometry,lt=ne*.5,ct=.5,yt=new go.PathFigure(.5*et,nt,!0);return gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,ct*nt,(ct-lt)*et,nt,0,(ct+lt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,ct*et,0,0,(ct-lt)*nt,(ct-lt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,ct*nt,(ct+lt)*et,0,et,(ct-lt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,(ct+.1)*et,.9*nt,et,(ct+lt)*nt,(ct+lt)*et,.9*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),gt.spot1=new go.Spot(.15,.15),gt.spot2=new go.Spot(.85,.8),gt}),go.Shape.defineFigureGenerator("ManualInput",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(et,0,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt).close()),gt.spot1=new go.Spot(0,.25),gt.spot2=go.Spot.BottomRight,gt}),go.Shape.defineFigureGenerator("MessageFromUser",function(Ut,et,nt){var gt=new go.Geometry,lt=Ut?Ut.parameter1:NaN;isNaN(lt)&&(lt=.7);var ct=new go.PathFigure(0,0,!0);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,et,0)),ct.add(new go.PathSegment(go.PathSegment.Line,lt*et,.5*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ct.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),gt.spot1=go.Spot.TopLeft,gt}),go.Shape.defineFigureGenerator("MicroformProcessing",function(Ut,et,nt){var gt=new go.Geometry,lt=Ut?Ut.parameter1:NaN;isNaN(lt)&&(lt=.25);var ct=new go.PathFigure(0,0,!0);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.5*et,lt*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,et,0)),ct.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.5*et,(1-lt)*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),gt}),go.Shape.defineFigureGenerator("MicroformRecording",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,0,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),gt.spot1=new go.Spot(0,.25),gt.spot2=new go.Spot(1,.75),gt}),go.Shape.defineFigureGenerator("MultiDocument",function(Ut,et,nt){var gt=new go.Geometry;nt=nt/.8;var lt=new go.PathFigure(et,0,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,.44*nt,.96*et,.47*nt,.93*et,.45*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.54*nt,.86*et,.57*nt,.83*et,.55*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.4*et,.4*nt,.4*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,0).close());var ct=new go.PathFigure(.1*et,.2*nt,!1);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*et,.54*nt)),ct.add(new go.PathSegment(go.PathSegment.Move,.2*et,.1*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.9*et,.1*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.9*et,.44*nt)),gt.spot1=new go.Spot(0,.25),gt.spot2=new go.Spot(.8,.77),gt}),go.Shape.defineFigureGenerator("MultiProcess",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(.1*et,.1*nt,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.9*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.9*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.2*nt).close());var ct=new go.PathFigure(.2*et,.1*nt,!1);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.9*et,.1*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)),ct.add(new go.PathSegment(go.PathSegment.Move,.1*et,.2*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*et,.9*nt)),gt.spot1=new go.Spot(0,.2),gt.spot2=new go.Spot(.8,1),gt}),go.Shape.defineFigureGenerator("OfflineStorage",function(Ut,et,nt){var gt=new go.Geometry,lt=Ut?Ut.parameter1:NaN;isNaN(lt)&&(lt=.1);var ct=1-lt,yt=new go.PathFigure(0,0,!0);gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt).close());var Lt=new go.PathFigure(.5*lt*et,lt*nt,!1);return gt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,(1-.5*lt)*et,lt*nt)),gt}),go.Shape.defineFigureGenerator("OffPageConnector",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,0,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),gt.spot1=go.Spot.TopLeft,gt.spot2=new go.Spot(.75,1),gt}),go.Shape.defineFigureGenerator("Or",function(Ut,et,nt){var gt=new go.Geometry,lt=ne*.5,ct=.5,yt=new go.PathFigure(et,ct*nt,!0);gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,ct*et,nt,et,(ct+lt)*nt,(ct+lt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,ct*nt,(ct-lt)*et,nt,0,(ct+lt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,ct*et,0,0,(ct-lt)*nt,(ct-lt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,ct*nt,(ct+lt)*et,0,et,(ct-lt)*nt));var Lt=new go.PathFigure(et,.5*nt,!1);return gt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),Lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),gt}),go.Shape.defineFigureGenerator("PaperTape",function(Ut,et,nt){var gt=new go.Geometry;nt=nt/.8;var lt=new go.PathFigure(0,.7*nt,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.3*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,et,.3*nt,.5*et,.6*nt,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.5*et,.4*nt,.5*et,nt).close()),gt.spot1=new go.Spot(0,.49),gt.spot2=new go.Spot(1,.75),gt}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(Ut,et,nt){var gt=new go.Geometry,lt=Ut?Ut.parameter1:NaN,ct=Ut?Ut.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(ct)&&(ct=.3);var yt=new go.PathFigure(0,0,!0);return gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,(1-ct)*et,.5*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),gt}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(Ut,et,nt){var gt=new go.Geometry,lt=Ut?Ut.parameter1:NaN,ct=Ut?Ut.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(ct)&&(ct=.3);var yt=new go.PathFigure(0,0,!0);return gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,(1-ct)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,(1-ct)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),gt}),go.Shape.defineFigureGenerator("Procedure",function(Ut,et,nt){var gt=new go.Geometry,lt=Ut?Ut.parameter1:NaN;isNaN(lt)&&(lt=.1);var ct=new go.PathFigure(0,0,!0);gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,et,0)),ct.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ct.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var yt=new go.PathFigure((1-lt)*et,0,!1);return gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Move,lt*et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,lt*et,nt)),gt}),go.Shape.defineFigureGenerator("Process",function(Ut,et,nt){var gt=new go.Geometry,lt=Ut?Ut.parameter1:NaN;isNaN(lt)&&(lt=.1);var ct=new go.PathFigure(0,0,!0);gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,et,0)),ct.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ct.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var yt=new go.PathFigure(lt*et,0,!1);return gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,lt*et,nt)),gt.spot2=go.Spot.BottomRight,gt}),go.Shape.defineFigureGenerator("Sort",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(.5*et,0,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt).close());var ct=new go.PathFigure(0,.5*nt,!1);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),gt.spot1=new go.Spot(.25,.25),gt.spot2=new go.Spot(.75,.5),gt}),go.Shape.defineFigureGenerator("Start",function(Ut,et,nt){var gt=new go.Geometry,lt=Ut?Ut.parameter1:NaN;isNaN(lt)&&(lt=.25);var ct=new go.PathFigure(lt*et,0,!0);gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*et,.5*nt,.25*et,.5*nt)),ct.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*et,.5*nt,.25*et,.5*nt));var yt=new go.PathFigure(lt*et,0,!1);return gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,lt*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Move,(1-lt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*et,nt)),gt.spot1=new go.Spot(lt,0),gt.spot2=new go.Spot(1-lt,1),gt}),go.Shape.defineFigureGenerator("Terminator",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(.25*et,0,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*et,.5*nt,.25*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*et,.5*nt,.25*et,.5*nt)),gt.spot1=new go.Spot(.23,0),gt.spot2=new go.Spot(.77,1),gt}),go.Shape.defineFigureGenerator("TransmittalTape",function(Ut,et,nt){var gt=new go.Geometry,lt=Ut?Ut.parameter1:NaN;isNaN(lt)&&(lt=.1);var ct=new go.PathFigure(0,0,!0);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,et,0)),ct.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.75*et,(1-lt)*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,0,(1-lt)*nt).close()),gt.spot1=go.Spot.TopLeft,gt}),go.Shape.defineFigureGenerator("AndGate",function(Ut,et,nt){var gt=new go.Geometry,lt=ne*.5,ct=new go.PathFigure(0,0,!0);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),ct.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(.5+lt)*et,0,et,(.5-lt)*nt)),ct.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.5+lt)*nt,(.5+lt)*et,nt)),ct.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),gt.spot1=go.Spot.TopLeft,gt.spot2=new go.Spot(.55,1),gt}),go.Shape.defineFigureGenerator("Buffer",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,0,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),gt.spot1=new go.Spot(0,.25),gt.spot2=new go.Spot(.5,.75),gt}),go.Shape.defineFigureGenerator("Clock",function(Ut,et,nt){var gt=new go.Geometry,lt=ne*.5,ct=.5,yt=new go.PathFigure(et,ct*nt,!0);gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,ct*et,nt,et,(ct+lt)*nt,(ct+lt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,ct*nt,(ct-lt)*et,nt,0,(ct+lt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,ct*et,0,0,(ct-lt)*nt,(ct-lt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,ct*nt,(ct+lt)*et,0,et,(ct-lt)*nt));var Lt=new go.PathFigure(et,ct*nt,!1);gt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,et,ct*nt));var Nt=new go.PathFigure(.8*et,.75*nt,!1);return gt.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.25*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.25*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.75*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.75*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.25*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.25*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.75*nt)),gt}),go.Shape.defineFigureGenerator("Ground",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(.5*et,0,!1);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.3*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.4*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,nt)),gt}),go.Shape.defineFigureGenerator("Inverter",function(Ut,et,nt){var gt=new go.Geometry,lt=ne*.1,ct=.1,yt=.9,Lt=.5,Nt=new go.PathFigure(.8*et,.5*nt,!0);gt.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,0,0)),Nt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.5*nt));var Vt=new go.PathFigure((yt+ct)*et,Lt*nt,!0);return gt.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt+ct)*nt,(yt+ct)*et,(Lt+lt)*nt,(yt+lt)*et,(Lt+ct)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-ct)*et,Lt*nt,(yt-lt)*et,(Lt+ct)*nt,(yt-ct)*et,(Lt+lt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt-ct)*nt,(yt-ct)*et,(Lt-lt)*nt,(yt-lt)*et,(Lt-ct)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+ct)*et,Lt*nt,(yt+lt)*et,(Lt-ct)*nt,(yt+ct)*et,(Lt-lt)*nt)),gt.spot1=new go.Spot(0,.25),gt.spot2=new go.Spot(.4,.75),gt}),go.Shape.defineFigureGenerator("NandGate",function(Ut,et,nt){var gt=new go.Geometry,lt=ne*.5,ct=ne*.4,yt=ne*.1,Lt=.1,Nt=.9,Vt=.5,Jt=new go.PathFigure(.8*et,.5*nt,!0);gt.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,nt,.8*et,(.5+ct)*nt,(.4+lt)*et,nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,0,0)),Jt.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(.4+lt)*et,0,.8*et,(.5-ct)*nt));var Ae=new go.PathFigure((Nt+Lt)*et,Vt*nt,!0);return gt.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(Vt+Lt)*nt,(Nt+Lt)*et,(Vt+yt)*nt,(Nt+yt)*et,(Vt+Lt)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-Lt)*et,Vt*nt,(Nt-yt)*et,(Vt+Lt)*nt,(Nt-Lt)*et,(Vt+yt)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(Vt-Lt)*nt,(Nt-Lt)*et,(Vt-yt)*nt,(Nt-yt)*et,(Vt-Lt)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+Lt)*et,Vt*nt,(Nt+yt)*et,(Vt-Lt)*nt,(Nt+Lt)*et,(Vt-yt)*nt)),gt.spot1=new go.Spot(0,.05),gt.spot2=new go.Spot(.55,.95),gt}),go.Shape.defineFigureGenerator("NorGate",function(Ut,et,nt){var gt=new go.Geometry,lt=.5,ct=ne*lt,yt=0,Lt=.5,Nt=new go.PathFigure(.8*et,.5*nt,!0);gt.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.7*et,(Lt+ct)*nt,(yt+ct)*et,(Lt+lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.75*nt,.25*et,.25*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(yt+ct)*et,(Lt-lt)*nt,.7*et,(Lt-ct)*nt)),lt=.1,ct=ne*.1,yt=.9,Lt=.5;var Vt=new go.PathFigure((yt-lt)*et,Lt*nt,!0);return gt.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt-lt)*nt,(yt-lt)*et,(Lt-ct)*nt,(yt-ct)*et,(Lt-lt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Lt*nt,(yt+ct)*et,(Lt-lt)*nt,(yt+lt)*et,(Lt-ct)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt+lt)*nt,(yt+lt)*et,(Lt+ct)*nt,(yt+ct)*et,(Lt+lt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Lt*nt,(yt-ct)*et,(Lt+lt)*nt,(yt-lt)*et,(Lt+ct)*nt)),gt.spot1=new go.Spot(.2,.25),gt.spot2=new go.Spot(.6,.75),gt}),go.Shape.defineFigureGenerator("OrGate",function(Ut,et,nt){var gt=new go.Geometry,lt=.5,ct=ne*lt,yt=0,Lt=.5,Nt=new go.PathFigure(0,0,!0);return gt.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(yt+ct+ct)*et,(Lt-lt)*nt,.8*et,(Lt-ct)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.8*et,(Lt+ct)*nt,(yt+ct+ct)*et,(Lt+lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.75*nt,.25*et,.25*nt).close()),gt.spot1=new go.Spot(.2,.25),gt.spot2=new go.Spot(.75,.75),gt}),go.Shape.defineFigureGenerator("XnorGate",function(Ut,et,nt){var gt=new go.Geometry,lt=.5,ct=ne*lt,yt=.2,Lt=.5,Nt=new go.PathFigure(.1*et,0,!1);gt.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,nt,.35*et,.25*nt,.35*et,.75*nt));var Vt=new go.PathFigure(.8*et,.5*nt,!0);gt.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,nt,.7*et,(Lt+ct)*nt,(yt+ct)*et,(Lt+lt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,.45*et,.75*nt,.45*et,.25*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(yt+ct)*et,(Lt-lt)*nt,.7*et,(Lt-ct)*nt)),lt=.1,ct=ne*.1,yt=.9,Lt=.5;var Jt=new go.PathFigure((yt-lt)*et,Lt*nt,!0);return gt.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt-lt)*nt,(yt-lt)*et,(Lt-ct)*nt,(yt-ct)*et,(Lt-lt)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Lt*nt,(yt+ct)*et,(Lt-lt)*nt,(yt+lt)*et,(Lt-ct)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt+lt)*nt,(yt+lt)*et,(Lt+ct)*nt,(yt+ct)*et,(Lt+lt)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Lt*nt,(yt-ct)*et,(Lt+lt)*nt,(yt-lt)*et,(Lt+ct)*nt)),gt.spot1=new go.Spot(.4,.25),gt.spot2=new go.Spot(.65,.75),gt}),go.Shape.defineFigureGenerator("XorGate",function(Ut,et,nt){var gt=new go.Geometry,lt=.5,ct=ne*lt,yt=.2,Lt=.5,Nt=new go.PathFigure(.1*et,0,!1);gt.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,nt,.35*et,.25*nt,.35*et,.75*nt));var Vt=new go.PathFigure(.2*et,0,!0);return gt.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(yt+ct)*et,(Lt-lt)*nt,.9*et,(Lt-ct)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,nt,.9*et,(Lt+ct)*nt,(yt+ct)*et,(Lt+lt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,.45*et,.75*nt,.45*et,.25*nt).close()),gt.spot1=new go.Spot(.4,.25),gt.spot2=new go.Spot(.8,.75),gt}),go.Shape.defineFigureGenerator("Capacitor",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,0,!1);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt}),go.Shape.defineFigureGenerator("Resistor",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,.5*nt,!1);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.5*nt)),gt}),go.Shape.defineFigureGenerator("Inductor",function(Ut,et,nt){var gt=new go.Geometry,lt=ne*.1,ct=.1,yt=.1,Lt=.5,Nt=new go.PathFigure((yt-lt*.5)*et,nt,!1);return gt.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+ct)*et,0,(yt-lt)*et,nt,(yt-ct)*et,0)),yt=.3,Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,nt,(yt+ct)*et,0,(yt+lt)*et,nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+ct)*et,0,(yt-lt)*et,nt,(yt-ct)*et,0)),yt=.5,Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,nt,(yt+ct)*et,0,(yt+lt)*et,nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+ct)*et,0,(yt-lt)*et,nt,(yt-ct)*et,0)),yt=.7,Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,nt,(yt+ct)*et,0,(yt+lt)*et,nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+ct)*et,0,(yt-lt)*et,nt,(yt-ct)*et,0)),yt=.9,Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt*.5)*et,nt,(yt+ct)*et,0,(yt+lt)*et,nt)),gt}),go.Shape.defineFigureGenerator("ACvoltageSource",function(Ut,et,nt){var gt=new go.Geometry,lt=ne*.5,ct=.5,yt=.5,Lt=.5,Nt=new go.PathFigure((yt-ct)*et,Lt*nt,!1);return gt.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt-ct)*nt,(yt-ct)*et,(Lt-lt)*nt,(yt-lt)*et,(Lt-ct)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+ct)*et,Lt*nt,(yt+lt)*et,(Lt-ct)*nt,(yt+ct)*et,(Lt-lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt+ct)*nt,(yt+ct)*et,(Lt+lt)*nt,(yt+lt)*et,(Lt+ct)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-ct)*et,Lt*nt,(yt-lt)*et,(Lt+ct)*nt,(yt-ct)*et,(Lt+lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Move,(yt-ct+.1)*et,Lt*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+ct-.1)*et,Lt*nt,yt*et,(Lt-ct)*nt,yt*et,(Lt+ct)*nt)),gt}),go.Shape.defineFigureGenerator("DCvoltageSource",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,.75*nt,!1);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt}),go.Shape.defineFigureGenerator("Diode",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(et,0,!1);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.spot1=new go.Spot(0,.25),gt.spot2=new go.Spot(.5,.75),gt}),go.Shape.defineFigureGenerator("Wifi",function(Ut,et,nt){var gt=new go.Geometry,lt=et,ct=nt;et=et*.38,nt=nt*.6;var yt=ne*.8,Lt=.8,Nt=0,Vt=.5,Jt=(lt-et)/2,Ae=(ct-nt)/2,he=new go.PathFigure(Nt*et+Jt,(Vt+Lt)*nt+Ae,!0);gt.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-Lt)*et+Jt,Vt*nt+Ae,(Nt-yt)*et+Jt,(Vt+Lt)*nt+Ae,(Nt-Lt)*et+Jt,(Vt+yt)*nt+Ae)),he.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Jt,(Vt-Lt)*nt+Ae,(Nt-Lt)*et+Jt,(Vt-yt)*nt+Ae,(Nt-yt)*et+Jt,(Vt-Lt)*nt+Ae)),he.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-Lt+yt*.5)*et+Jt,Vt*nt+Ae,Nt*et+Jt,(Vt-Lt)*nt+Ae,(Nt-Lt+yt*.5)*et+Jt,(Vt-yt)*nt+Ae)),he.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Jt,(Vt+Lt)*nt+Ae,(Nt-Lt+yt*.5)*et+Jt,(Vt+yt)*nt+Ae,Nt*et+Jt,(Vt+Lt)*nt+Ae).close()),yt=ne*.4,Lt=.4,Nt=.2,Vt=.5;var le=new go.PathFigure(Nt*et+Jt,(Vt+Lt)*nt+Ae,!0);gt.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-Lt)*et+Jt,Vt*nt+Ae,(Nt-yt)*et+Jt,(Vt+Lt)*nt+Ae,(Nt-Lt)*et+Jt,(Vt+yt)*nt+Ae)),le.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Jt,(Vt-Lt)*nt+Ae,(Nt-Lt)*et+Jt,(Vt-yt)*nt+Ae,(Nt-yt)*et+Jt,(Vt-Lt)*nt+Ae)),le.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-Lt+yt*.5)*et+Jt,Vt*nt+Ae,Nt*et+Jt,(Vt-Lt)*nt+Ae,(Nt-Lt+yt*.5)*et+Jt,(Vt-yt)*nt+Ae)),le.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Jt,(Vt+Lt)*nt+Ae,(Nt-Lt+yt*.5)*et+Jt,(Vt+yt)*nt+Ae,Nt*et+Jt,(Vt+Lt)*nt+Ae).close()),yt=ne*.2,Lt=.2,Nt=.5,Vt=.5;var We=new go.PathFigure((Nt-Lt)*et+Jt,Vt*nt+Ae,!0);gt.add(We),We.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Jt,(Vt-Lt)*nt+Ae,(Nt-Lt)*et+Jt,(Vt-yt)*nt+Ae,(Nt-yt)*et+Jt,(Vt-Lt)*nt+Ae)),We.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+Lt)*et+Jt,Vt*nt+Ae,(Nt+yt)*et+Jt,(Vt-Lt)*nt+Ae,(Nt+Lt)*et+Jt,(Vt-yt)*nt+Ae)),We.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Jt,(Vt+Lt)*nt+Ae,(Nt+Lt)*et+Jt,(Vt+yt)*nt+Ae,(Nt+yt)*et+Jt,(Vt+Lt)*nt+Ae)),We.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-Lt)*et+Jt,Vt*nt+Ae,(Nt-yt)*et+Jt,(Vt+Lt)*nt+Ae,(Nt-Lt)*et+Jt,(Vt+yt)*nt+Ae)),yt=ne*.4,Lt=.4,Nt=.8,Vt=.5;var me=new go.PathFigure(Nt*et+Jt,(Vt-Lt)*nt+Ae,!0);gt.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+Lt)*et+Jt,Vt*nt+Ae,(Nt+yt)*et+Jt,(Vt-Lt)*nt+Ae,(Nt+Lt)*et+Jt,(Vt-yt)*nt+Ae)),me.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Jt,(Vt+Lt)*nt+Ae,(Nt+Lt)*et+Jt,(Vt+yt)*nt+Ae,(Nt+yt)*et+Jt,(Vt+Lt)*nt+Ae)),me.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+Lt-yt*.5)*et+Jt,Vt*nt+Ae,Nt*et+Jt,(Vt+Lt)*nt+Ae,(Nt+Lt-yt*.5)*et+Jt,(Vt+yt)*nt+Ae)),me.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Jt,(Vt-Lt)*nt+Ae,(Nt+Lt-yt*.5)*et+Jt,(Vt-yt)*nt+Ae,Nt*et+Jt,(Vt-Lt)*nt+Ae).close()),yt=ne*.8,Lt=.8,Nt=1,Vt=.5;var Je=new go.PathFigure(Nt*et+Jt,(Vt-Lt)*nt+Ae,!0);return gt.add(Je),Je.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+Lt)*et+Jt,Vt*nt+Ae,(Nt+yt)*et+Jt,(Vt-Lt)*nt+Ae,(Nt+Lt)*et+Jt,(Vt-yt)*nt+Ae)),Je.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Jt,(Vt+Lt)*nt+Ae,(Nt+Lt)*et+Jt,(Vt+yt)*nt+Ae,(Nt+yt)*et+Jt,(Vt+Lt)*nt+Ae)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+Lt-yt*.5)*et+Jt,Vt*nt+Ae,Nt*et+Jt,(Vt+Lt)*nt+Ae,(Nt+Lt-yt*.5)*et+Jt,(Vt+yt)*nt+Ae)),Je.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Jt,(Vt-Lt)*nt+Ae,(Nt+Lt-yt*.5)*et+Jt,(Vt-yt)*nt+Ae,Nt*et+Jt,(Vt-Lt)*nt+Ae).close()),gt}),go.Shape.defineFigureGenerator("Email",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,0,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var ct=new go.PathFigure(0,0,!1);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,et,0)),ct.add(new go.PathSegment(go.PathSegment.Move,0,nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.45*et,.54*nt)),ct.add(new go.PathSegment(go.PathSegment.Move,et,nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.55*et,.54*nt)),gt}),go.Shape.defineFigureGenerator("Ethernet",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(.35*et,0,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.65*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*et,0).close());var ct=new go.PathFigure(.1*et,nt,!0,!0);gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.4*et,.6*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.1*et,.6*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.1*et,nt).close());var yt=new go.PathFigure(.6*et,nt,!0,!0);gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.6*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.6*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.6*et,nt).close());var Lt=new go.PathFigure(0,.5*nt,!1);return gt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),Lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.5*nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.4*nt)),Lt.add(new go.PathSegment(go.PathSegment.Move,.75*et,.5*nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.6*nt)),Lt.add(new go.PathSegment(go.PathSegment.Move,.25*et,.5*nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.6*nt)),gt}),go.Shape.defineFigureGenerator("Power",function(Ut,et,nt){var gt=new go.Geometry,lt=ne*.4,ct=.4,yt=.5,Lt=.5,Nt=Tt(),Vt=Tt(),Jt=Tt(),Ae=Tt();ln(yt,Lt-ct,yt+lt,Lt-ct,yt+ct,Lt-lt,yt+ct,Lt,.5,Nt,Nt,Vt,Jt,Ae);var he=ee(Vt.x,Vt.y),le=new go.PathFigure(Vt.x*et,Vt.y*nt,!0);gt.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,(yt+ct)*et,Lt*nt,Jt.x*et,Jt.y*nt,Ae.x*et,Ae.y*nt)),le.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt+ct)*nt,(yt+ct)*et,(Lt+lt)*nt,(yt+lt)*et,(Lt+ct)*nt)),le.add(new go.PathSegment(go.PathSegment.Bezier,(yt-ct)*et,Lt*nt,(yt-lt)*et,(Lt+ct)*nt,(yt-ct)*et,(Lt+lt)*nt)),ln(yt-ct,Lt,yt-ct,Lt-lt,yt-lt,Lt-ct,yt,Lt-ct,.5,Jt,Ae,Vt,Nt,Nt),le.add(new go.PathSegment(go.PathSegment.Bezier,Vt.x*et,Vt.y*nt,Jt.x*et,Jt.y*nt,Ae.x*et,Ae.y*nt)),lt=ne*.3,ct=.3,ln(yt-ct,Lt,yt-ct,Lt-lt,yt-lt,Lt-ct,yt,Lt-ct,.5,Jt,Ae,Vt,Nt,Nt),le.add(new go.PathSegment(go.PathSegment.Line,Vt.x*et,Vt.y*nt)),le.add(new go.PathSegment(go.PathSegment.Bezier,(yt-ct)*et,Lt*nt,Ae.x*et,Ae.y*nt,Jt.x*et,Jt.y*nt)),le.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt+ct)*nt,(yt-ct)*et,(Lt+lt)*nt,(yt-lt)*et,(Lt+ct)*nt)),le.add(new go.PathSegment(go.PathSegment.Bezier,(yt+ct)*et,Lt*nt,(yt+lt)*et,(Lt+ct)*nt,(yt+ct)*et,(Lt+lt)*nt)),ln(yt,Lt-ct,yt+lt,Lt-ct,yt+ct,Lt-lt,yt+ct,Lt,.5,Nt,Nt,Vt,Jt,Ae),le.add(new go.PathSegment(go.PathSegment.Bezier,Vt.x*et,Vt.y*nt,Ae.x*et,Ae.y*nt,Jt.x*et,Jt.y*nt).close());var le=new go.PathFigure(.45*et,0,!0);return gt.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.45*et,.5*nt)),le.add(new go.PathSegment(go.PathSegment.Line,.55*et,.5*nt)),le.add(new go.PathSegment(go.PathSegment.Line,.55*et,0).close()),Be(Nt),Be(Vt),Be(Jt),Be(Ae),Be(he),gt.spot1=new go.Spot(.25,.45),gt.spot2=new go.Spot(.75,.8),gt}),go.Shape.defineFigureGenerator("Fallout",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,nt/2,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,180,360,et/2,nt/2,et/2,nt/2));function ct(yt,Lt,Nt){yt.add(new go.PathSegment(go.PathSegment.Move,(.3+Lt)*et,(.8+Nt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,(.5+Lt)*et,(.5+Nt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,(.1+Lt)*et,(.5+Nt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,(.3+Lt)*et,(.8+Nt)*nt).close())}return ct(lt,0,0),ct(lt,.4,0),ct(lt,.2,-.3),gt}),go.Shape.defineFigureGenerator("IrritationHazard",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(.2*et,0,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.3*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt).close()),gt.spot1=new go.Spot(.3,.3),gt.spot2=new go.Spot(.7,.7),gt}),go.Shape.defineFigureGenerator("ElectricalHazard",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(.37*et,0,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.11*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.77*et,.04*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*et,.49*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.37*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.63*et,.86*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.77*et,.91*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.34*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.34*et,.78*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.44*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.56*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.68*nt).close()),gt}),go.Shape.defineFigureGenerator("FireHazard",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(.1*et,nt,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.29*et,0,-.25*et,.63*nt,.45*et,.44*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.51*et,.42*nt,.48*et,.17*nt,.54*et,.35*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.59*et,.18*nt,.59*et,.29*nt,.58*et,.28*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.75*et,.6*nt,.8*et,.34*nt,.88*et,.43*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.88*et,.31*nt,.87*et,.48*nt,.88*et,.43*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,nt,1.17*et,.76*nt,.82*et,.8*nt).close()),gt.spot1=new go.Spot(.07,.445),gt.spot2=new go.Spot(.884,.958),gt}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(Ut,et,nt){var gt=new go.Geometry,lt=.5,ct=0,yt=0,Lt=lt*ne,Nt=.4*Math.SQRT2/2+.5,Vt=.5-.5*Math.SQRT2/2,Jt=1,Ae=.5,he=.5,le=0,We=new go.PathFigure(Nt*et,(1-Vt)*nt,!1);return gt.add(We),We.add(new go.PathSegment(go.PathSegment.Bezier,Jt*et,Ae*nt,Jt*et,.7*nt,Jt*et,Ae*nt)),We.add(new go.PathSegment(go.PathSegment.Bezier,(he+ct)*et,(le+ct)*nt,(.5+lt+ct)*et,(.5-Lt+ct)*nt,(.5+Lt+ct)*et,(.5-lt+ct)*nt)),We.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+ct)*et,(.5+yt)*nt,(.5-Lt+ct)*et,(.5-lt+yt)*nt,(.5-lt+ct)*et,(.5-Lt+yt)*nt)),We.add(new go.PathSegment(go.PathSegment.Bezier,(.35+ct)*et,.9*nt,(.5-lt+ct)*et,(.5+Lt+yt)*nt,(.5-Lt+ct)*et,.9*nt)),We.add(new go.PathSegment(go.PathSegment.Move,(.25+ct)*et,.8*nt)),We.add(new go.PathSegment(go.PathSegment.Line,(.35+ct)*et,.9*nt)),We.add(new go.PathSegment(go.PathSegment.Line,(.2+ct)*et,.95*nt)),gt}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,0,!1);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,0,!1);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,0,!1);gt.add(lt);var ct=new go.PathFigure(et,nt,!1);gt.add(ct);var yt=new go.PathFigure(0,.5*nt,!1);return gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.5*nt,.2*et,.35*nt,.3*et,.35*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,.7*et,.65*nt,.8*et,.65*nt)),gt}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,.5*nt,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt).close()),gt}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,.2*nt,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt).close());var lt=new go.PathFigure(0,.2*nt,!1);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),gt}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(.7*et,nt,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,0,.6*et,.5*nt,0,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.7*et,nt,.4*et,.5*nt,et,.5*nt).close());var ct=new go.PathFigure(.45*et,.73*nt,!1);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.7*et,.73*nt)),ct.add(new go.PathSegment(go.PathSegment.Move,.38*et,.5*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.63*et,.5*nt)),ct.add(new go.PathSegment(go.PathSegment.Move,.31*et,.27*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.56*et,.27*nt)),gt}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,0,!1);gt.add(lt);var ct=new go.PathFigure(.335*et,(1-.555)*nt,!0);gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.335*et,(1-.405)*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.405)*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.555)*nt)),ct.add(new go.PathSegment(go.PathSegment.Bezier,et,.68*nt,(1-.12)*et,.46*nt,(1-.02)*et,.54*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ct.add(new go.PathSegment(go.PathSegment.Line,0,nt)),ct.add(new go.PathSegment(go.PathSegment.Line,0,.68*nt)),ct.add(new go.PathSegment(go.PathSegment.Bezier,.335*et,(1-.555)*nt,.02*et,.54*nt,.12*et,.46*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.365*et,(1-.595)*nt));var yt=.5-.285,Lt=.5,Nt=yt,Vt=Math.PI/4,Jt=4*(1-Math.cos(Vt))/(3*Math.sin(Vt)),Ae=Jt*.5,he=yt,le=yt,We=Jt*he,me=Jt*le;ct.add(new go.PathSegment(go.PathSegment.Bezier,(Lt-he)*et,Nt*nt,(Lt-(We+he)/2)*et,(Nt+(le+me)/2)*nt,(Lt-he)*et,(Nt+me)*nt)),ct.add(new go.PathSegment(go.PathSegment.Bezier,Lt*et,(Nt-le)*nt,(Lt-he)*et,(Nt-me)*nt,(Lt-We)*et,(Nt-le)*nt)),ct.add(new go.PathSegment(go.PathSegment.Bezier,(Lt+he)*et,Nt*nt,(Lt+We)*et,(Nt-le)*nt,(Lt+he)*et,(Nt-me)*nt)),ct.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*et,(1-.595)*nt,(Lt+he)*et,(Nt+me)*nt,(Lt+(We+he)/2)*et,(Nt+(le+me)/2)*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*et,(1-.595)*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.555)*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.405)*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.335*et,(1-.405)*nt));var Je=new go.PathFigure(.2*et,nt,!1);gt.add(Je),Je.add(new go.PathSegment(go.PathSegment.Line,.2*et,.8*nt));var fn=new go.PathFigure(.8*et,nt,!1);return gt.add(fn),fn.add(new go.PathSegment(go.PathSegment.Line,.8*et,.8*nt)),gt}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(.1*et,0,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,nt).close());var ct=new go.PathFigure(.2*et,.2*nt,!1);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),ct.add(new go.PathSegment(go.PathSegment.Move,.2*et,.4*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*et,.4*nt)),ct.add(new go.PathSegment(go.PathSegment.Move,.2*et,.6*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*et,.6*nt)),ct.add(new go.PathSegment(go.PathSegment.Move,.2*et,.8*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*et,.8*nt)),gt}),go.Shape.defineFigureGenerator("BpmnEventError",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,nt,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.33*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*et,.5*nt).close()),gt}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,0,!1);gt.add(lt);var ct=new go.PathFigure(et,nt,!1);gt.add(ct);var yt=new go.PathFigure(.1*et,nt,!0);return gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt).close()),gt}),go.Shape.defineFigureGenerator("Caution",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(.05*et,nt,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,.8*nt,0,nt,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.55*et,.1*nt,.5*et,0,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.95*et,.9*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,nt,et,nt,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.05*et,nt));var ct=.05;return lt.add(new go.PathSegment(go.PathSegment.Move,(.5-ct)*et,.875*nt)),lt.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*et,.875*nt,ct*et,ct*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.325*nt,.575*et,.725*nt,.625*et,.375*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.75*nt,.375*et,.375*nt,.425*et,.725*nt)),gt}),go.Shape.defineFigureGenerator("Recycle",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(.45*et,.95*nt,!1);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.95*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.185*et,.85*nt,.17*et,.95*nt,.15*et,.9*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.235*et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,.625*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*et,.65*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.275*et,.45*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.05*et,.45*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.05*et,.575*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.1875*et,.95*nt,0,.675*nt,0,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.45*et,.95*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.775*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.22*et,.775*nt));var ct=new go.PathFigure(.475*et,.2*nt,!1);gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.4*et,.4*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.225*et,.3*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.275*et,.175*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.325*et,.05*nt)),ct.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,.05*nt,.35*et,0,.375*et,0)),ct.add(new go.PathSegment(go.PathSegment.Line,.575*et,.375*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.525*et,.4*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.75*et,.475*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.85*et,.315*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*et,.32*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.65*et,.05*nt)),ct.add(new go.PathSegment(go.PathSegment.Bezier,.575*et,0,.65*et,.05*nt,.625*et,0)),ct.add(new go.PathSegment(go.PathSegment.Line,.38*et,.0105*nt));var yt=new go.PathFigure(.675*et,.575*nt,!1);return gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.875*et,.525*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,.775*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.85*et,.95*nt,et,.8*nt,et,.85*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.95*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.65*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.85*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.725*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.775*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.775*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,.775*nt)),yt.add(new go.PathSegment(go.PathSegment.Move,.675*et,.575*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.775*et,.775*nt)),gt}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(Ut,et,nt){var gt=new go.Geometry,lt=.5,ct=ne*.5,yt=new go.PathFigure(et,lt*nt,!0);gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,lt*et,nt,et,(lt+ct)*nt,(lt+ct)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,lt*nt,(lt-ct)*et,nt,0,(lt+ct)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,lt*et,0,0,(lt-ct)*nt,(lt-ct)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,lt*nt,(lt+ct)*et,0,et,(lt-ct)*nt));var Lt=new go.PathFigure(lt*et,0,!1);return gt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,lt*et,.15*nt)),Lt.add(new go.PathSegment(go.PathSegment.Move,lt*et,nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,lt*et,.85*nt)),Lt.add(new go.PathSegment(go.PathSegment.Move,0,lt*nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.15*et,lt*nt)),Lt.add(new go.PathSegment(go.PathSegment.Move,et,lt*nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.85*et,lt*nt)),Lt.add(new go.PathSegment(go.PathSegment.Move,lt*et,lt*nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.58*et,.1*nt)),Lt.add(new go.PathSegment(go.PathSegment.Move,lt*et,lt*nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.78*et,.54*nt)),gt}),go.Shape.defineFigureGenerator("Package",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,.15*nt,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var ct=new go.PathFigure(0,.15*nt,!0);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,0,0)),ct.add(new go.PathSegment(go.PathSegment.Line,.6*et,0)),ct.add(new go.PathSegment(go.PathSegment.Line,.65*et,.15*nt).close()),gt.spot1=new go.Spot(0,.1),gt.spot2=new go.Spot(1,1),gt}),go.Shape.defineFigureGenerator("Class",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,0,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var ct=new go.PathFigure(0,.2*nt,!1);gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt).close());var yt=new go.PathFigure(0,.5*nt,!1);return gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt).close()),gt}),go.Shape.defineFigureGenerator("Component",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(et,nt,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt).close());var ct=new go.PathFigure(0,.2*nt,!0);gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.45*et,.2*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.45*et,.4*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,0,.4*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt).close());var yt=new go.PathFigure(0,.6*nt,!0);return gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.6*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.8*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,.6*nt).close()),gt}),go.Shape.defineFigureGenerator("Boat Shipment",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(.15*et,.6*nt,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.15*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*et,.6*nt));var ct=new go.PathFigure(.15*et,.6*nt,!1);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.85*et,.6*nt)),gt}),go.Shape.defineFigureGenerator("Customer/Supplier",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(et,nt,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*et,.33*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*et,.33*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.33*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt).close()),gt}),go.Shape.defineFigureGenerator("Workcell",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,nt,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),gt}),go.Shape.defineFigureGenerator("Supermarket",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,0,!1);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.33*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.33*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,et,.33*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.66*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.66*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,et,.66*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt}),go.Shape.defineFigureGenerator("TruckShipment",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,0,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var ct=new go.PathFigure(et,.8*nt,!0);gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,et,.4*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.6*et,.4*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.6*et,.8*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt).close());var yt=.1,Lt=ne*.1,Nt=.2,Vt=.9,Jt=new go.PathFigure((Nt-yt)*et,Vt*nt,!0);gt.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(Vt-yt)*nt,(Nt-yt)*et,(Vt-Lt)*nt,(Nt-Lt)*et,(Vt-yt)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+yt)*et,Vt*nt,(Nt+Lt)*et,(Vt-yt)*nt,(Nt+yt)*et,(Vt-Lt)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(Vt+yt)*nt,(Nt+yt)*et,(Vt+Lt)*nt,(Nt+Lt)*et,(Vt+yt)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-yt)*et,Vt*nt,(Nt-Lt)*et,(Vt+yt)*nt,(Nt-yt)*et,(Vt+Lt)*nt).close()),yt=.1,Lt=ne*.1,Nt=.8,Vt=.9;var Ae=new go.PathFigure((Nt-yt)*et,Vt*nt,!0);return gt.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(Vt-yt)*nt,(Nt-yt)*et,(Vt-Lt)*nt,(Nt-Lt)*et,(Vt-yt)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+yt)*et,Vt*nt,(Nt+Lt)*et,(Vt-yt)*nt,(Nt+yt)*et,(Vt-Lt)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(Vt+yt)*nt,(Nt+yt)*et,(Vt+Lt)*nt,(Nt+Lt)*et,(Vt+yt)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-yt)*et,Vt*nt,(Nt-Lt)*et,(Vt+yt)*nt,(Nt-yt)*et,(Vt+Lt)*nt).close()),gt}),go.Shape.defineFigureGenerator("KanbanPost",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(.2*et,0,!1);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,0)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),gt}),go.Shape.defineFigureGenerator("Forklift",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,0,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0));var ct=new go.PathFigure(0,.5*nt,!0);gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.5*et,.8*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt));var yt=new go.PathFigure(.5*et,.8*nt,!0);gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.1*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.1*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.8*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.8*nt));var Lt=new go.PathFigure(.5*et,.7*nt,!1);gt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt));var Nt=.1,Vt=ne*.1,Jt=.1,Ae=.9,he=new go.PathFigure((Jt-Nt)*et,Ae*nt,!0);gt.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,Jt*et,(Ae-Nt)*nt,(Jt-Nt)*et,(Ae-Vt)*nt,(Jt-Vt)*et,(Ae-Nt)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,(Jt+Nt)*et,Ae*nt,(Jt+Vt)*et,(Ae-Nt)*nt,(Jt+Nt)*et,(Ae-Vt)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,Jt*et,(Ae+Nt)*nt,(Jt+Nt)*et,(Ae+Vt)*nt,(Jt+Vt)*et,(Ae+Nt)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,(Jt-Nt)*et,Ae*nt,(Jt-Vt)*et,(Ae+Nt)*nt,(Jt-Nt)*et,(Ae+Vt)*nt)),Nt=.1,Vt=ne*.1,Jt=.4,Ae=.9;var le=new go.PathFigure((Jt-Nt)*et,Ae*nt,!0);return gt.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,Jt*et,(Ae-Nt)*nt,(Jt-Nt)*et,(Ae-Vt)*nt,(Jt-Vt)*et,(Ae-Nt)*nt)),le.add(new go.PathSegment(go.PathSegment.Bezier,(Jt+Nt)*et,Ae*nt,(Jt+Vt)*et,(Ae-Nt)*nt,(Jt+Nt)*et,(Ae-Vt)*nt)),le.add(new go.PathSegment(go.PathSegment.Bezier,Jt*et,(Ae+Nt)*nt,(Jt+Nt)*et,(Ae+Vt)*nt,(Jt+Vt)*et,(Ae+Nt)*nt)),le.add(new go.PathSegment(go.PathSegment.Bezier,(Jt-Nt)*et,Ae*nt,(Jt-Vt)*et,(Ae+Nt)*nt,(Jt-Nt)*et,(Ae+Vt)*nt)),gt}),go.Shape.defineFigureGenerator("RailShipment",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(.1*et,.4*nt,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.9*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.9*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.4*nt).close());var ct=new go.PathFigure(.45*et,.7*nt,!1);gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.55*et,.7*nt));var yt=new go.PathFigure(.55*et,.4*nt,!0);gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.9*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.9*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.4*nt).close());var Jt=.05,Ae=ne*.05,he=.175,le=.95,Lt=new go.PathFigure((he-Jt)*et,le*nt,!0);gt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,he*et,(le-Jt)*nt,(he-Jt)*et,(le-Ae)*nt,(he-Ae)*et,(le-Jt)*nt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(he+Jt)*et,le*nt,(he+Ae)*et,(le-Jt)*nt,(he+Jt)*et,(le-Ae)*nt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,he*et,(le+Jt)*nt,(he+Jt)*et,(le+Ae)*nt,(he+Ae)*et,(le+Jt)*nt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(he-Jt)*et,le*nt,(he-Ae)*et,(le+Jt)*nt,(he-Jt)*et,(le+Ae)*nt));var Jt=.05,Ae=ne*.05,he=.375,le=.95,Nt=new go.PathFigure((he-Jt)*et,le*nt,!0);gt.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,he*et,(le-Jt)*nt,(he-Jt)*et,(le-Ae)*nt,(he-Ae)*et,(le-Jt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(he+Jt)*et,le*nt,(he+Ae)*et,(le-Jt)*nt,(he+Jt)*et,(le-Ae)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,he*et,(le+Jt)*nt,(he+Jt)*et,(le+Ae)*nt,(he+Ae)*et,(le+Jt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(he-Jt)*et,le*nt,(he-Ae)*et,(le+Jt)*nt,(he-Jt)*et,(le+Ae)*nt));var Jt=.05,Ae=ne*.05,he=.625,le=.95,Vt=new go.PathFigure((he-Jt)*et,le*nt,!0);gt.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,he*et,(le-Jt)*nt,(he-Jt)*et,(le-Ae)*nt,(he-Ae)*et,(le-Jt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(he+Jt)*et,le*nt,(he+Ae)*et,(le-Jt)*nt,(he+Jt)*et,(le-Ae)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,he*et,(le+Jt)*nt,(he+Jt)*et,(le+Ae)*nt,(he+Ae)*et,(le+Jt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(he-Jt)*et,le*nt,(he-Ae)*et,(le+Jt)*nt,(he-Jt)*et,(le+Ae)*nt));var Jt=.05,Ae=ne*.05,he=.825,le=.95,We=new go.PathFigure((he-Jt)*et,le*nt,!0);gt.add(We),We.add(new go.PathSegment(go.PathSegment.Bezier,he*et,(le-Jt)*nt,(he-Jt)*et,(le-Ae)*nt,(he-Ae)*et,(le-Jt)*nt)),We.add(new go.PathSegment(go.PathSegment.Bezier,(he+Jt)*et,le*nt,(he+Ae)*et,(le-Jt)*nt,(he+Jt)*et,(le-Ae)*nt)),We.add(new go.PathSegment(go.PathSegment.Bezier,he*et,(le+Jt)*nt,(he+Jt)*et,(le+Ae)*nt,(he+Ae)*et,(le+Jt)*nt)),We.add(new go.PathSegment(go.PathSegment.Bezier,(he-Jt)*et,le*nt,(he-Ae)*et,(le+Jt)*nt,(he-Jt)*et,(le+Ae)*nt).close());var me=new go.PathFigure(0,nt,!1);return gt.add(me),me.add(new go.PathSegment(go.PathSegment.Line,et,nt).close()),gt}),go.Shape.defineFigureGenerator("Warehouse",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,0,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var ct=new go.PathFigure(0,.2*nt,!1);gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt).close());var yt=new go.PathFigure(.15*et,nt,!0);gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.15*et,.5*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.5*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.15*et,nt).close());var Lt=.05,Nt=ne*.05,Vt=.35,Jt=.775,Ae=new go.PathFigure((Vt-Lt)*et,Jt*nt,!0);return gt.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Vt*et,(Jt-Lt)*nt,(Vt-Lt)*et,(Jt-Nt)*nt,(Vt-Nt)*et,(Jt-Lt)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Vt+Lt)*et,Jt*nt,(Vt+Nt)*et,(Jt-Lt)*nt,(Vt+Lt)*et,(Jt-Nt)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Vt*et,(Jt+Lt)*nt,(Vt+Lt)*et,(Jt+Nt)*nt,(Vt+Nt)*et,(Jt+Lt)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Vt-Lt)*et,Jt*nt,(Vt-Nt)*et,(Jt+Lt)*nt,(Vt-Lt)*et,(Jt+Nt)*nt).close()),gt}),go.Shape.defineFigureGenerator("ControlCenter",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,nt,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.1*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt).close()),gt}),go.Shape.defineFigureGenerator("Bluetooth",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,.75*nt,!1);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),gt}),go.Shape.defineFigureGenerator("Bookmark",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,0,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.4*nt)),gt}),go.Shape.defineFigureGenerator("Bookmark",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,0,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.4*nt)),gt}),go.Shape.defineFigureGenerator("Globe",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(.5*et,0,!1);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,.75*et,0,et,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,.75*nt,.75*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,.25*et,nt,0,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,.25*nt,.25*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,.15*et,.25*nt,.15*et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,.85*et,.75*nt,.85*et,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.1675*et,.15*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8325*et,.15*nt,.35*et,.3*nt,.65*et,.3*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.1675*et,.85*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8325*et,.85*nt,.35*et,.7*nt,.65*et,.7*nt)),gt}),go.Shape.defineFigureGenerator("Wave",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,.25*nt,!1);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.25*nt,.1*et,0,.2*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.7*et,.25*nt,.425*et,.5*nt,.575*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,et,.25*nt,.8*et,0,.9*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.75*nt,.1*et,.5*nt,.2*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.7*et,.75*nt,.425*et,nt,.575*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,et,.75*nt,.8*et,.5*nt,.9*et,.5*nt)),gt}),go.Shape.defineFigureGenerator("Operator",function(Ut,et,nt){var gt=new go.Geometry,lt=.3,ct=ne*.3,yt=.5,Lt=.7,Nt=new go.PathFigure((yt-lt)*et,Lt*nt,!0);gt.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt-lt)*nt,(yt-lt)*et,(Lt-ct)*nt,(yt-ct)*et,(Lt-lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Lt*nt,(yt+ct)*et,(Lt-lt)*nt,(yt+lt)*et,(Lt-ct)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt+lt)*nt,(yt+lt)*et,(Lt+ct)*nt,(yt+ct)*et,(Lt+lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Lt*nt,(yt-ct)*et,(Lt+lt)*nt,(yt-lt)*et,(Lt+ct)*nt));var Vt=new go.PathFigure(0,.7*nt,!1);return gt.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.7*nt,0,0,et,0)),gt}),go.Shape.defineFigureGenerator("TripleFanBlades",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(.5*et,0,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.65*nt,.65*et,.3*nt,.65*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,.35*et,.5*nt,.35*et,.3*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.65*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.3*et,.6*nt,.1*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.65*nt,.2*et,nt,.35*et,.95*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.65*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,et,nt,.7*et,.6*nt,.9*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.65*nt,.8*et,nt,.65*et,.95*nt)),gt}),go.Shape.defineFigureGenerator("CentrifugalPump",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(et,0,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,0,.075*nt,0,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,nt,0,nt,.4*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.4*nt,.8*et,nt,.85*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt}),go.Shape.defineFigureGenerator("Battery",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,nt,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.4*et,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.1*nt));var ct=new go.PathFigure(0,.6*nt,!1);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Move,0,.4*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,et,.4*nt)),gt}),go.Shape.defineFigureGenerator("Delete",function(Ut,et,nt){var gt=new go.Geometry,lt=.5,ct=ne*.5,yt=.5,Lt=.5,Nt=new go.PathFigure((yt-lt)*et,Lt*nt,!0);gt.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt-lt)*nt,(yt-lt)*et,(Lt-ct)*nt,(yt-ct)*et,(Lt-lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Lt*nt,(yt+ct)*et,(Lt-lt)*nt,(yt+lt)*et,(Lt-ct)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt+lt)*nt,(yt+lt)*et,(Lt+ct)*nt,(yt+ct)*et,(Lt+lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Lt*nt,(yt-ct)*et,(Lt+lt)*nt,(yt-lt)*et,(Lt+ct)*nt));var Vt=new go.PathFigure(.15*et,.5*nt,!1);return gt.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.5*nt)),gt}),go.Shape.defineFigureGenerator("Flag",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,.1*nt,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.1*nt,.15*et,0,.35*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,et,.1*nt,.65*et,.2*nt,.85*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.5*nt,.85*et,.6*nt,.65*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,.35*et,.4*nt,.15*et,.4*nt).close()),gt}),go.Shape.defineFigureGenerator("Help",function(Ut,et,nt){var gt=new go.Geometry,lt=.5,ct=ne*.5,yt=.5,Lt=.5,Nt=new go.PathFigure((yt-lt)*et,Lt*nt,!1);gt.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt-lt)*nt,(yt-lt)*et,(Lt-ct)*nt,(yt-ct)*et,(Lt-lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Lt*nt,(yt+ct)*et,(Lt-lt)*nt,(yt+lt)*et,(Lt-ct)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt+lt)*nt,(yt+lt)*et,(Lt+ct)*nt,(yt+ct)*et,(Lt+lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Lt*nt,(yt-ct)*et,(Lt+lt)*nt,(yt-lt)*et,(Lt+ct)*nt).close()),lt=.05,ct=ne*.05,yt=.5,Lt=.8;var Vt=new go.PathFigure((yt-lt)*et,Lt*nt,!1);return gt.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt-lt)*nt,(yt-lt)*et,(Lt-ct)*nt,(yt-ct)*et,(Lt-lt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Lt*nt,(yt+ct)*et,(Lt-lt)*nt,(yt+lt)*et,(Lt-ct)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt+lt)*nt,(yt+lt)*et,(Lt+ct)*nt,(yt+ct)*et,(Lt+lt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Lt*nt,(yt-ct)*et,(Lt+lt)*nt,(yt-lt)*et,(Lt+ct)*nt).close()),Vt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.7*nt)),Vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,.75*et,.475*nt,.75*et,.225*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.35*nt,.4*et,.2*nt,.3*et,.25*nt)),gt}),go.Shape.defineFigureGenerator("Location",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,nt,!0).add(new go.PathSegment(go.PathSegment.Line,.75*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,.975*et,.025*nt,.5*et,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*et,.5*nt,.5*et,0,.025*et,.025*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.5*et,.2*nt)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*et,.3*nt,.1*et,.1*nt).close()))}),go.Shape.defineFigureGenerator("Lock",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,.5*nt,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt));var ct=new go.PathFigure(.2*et,.5*nt,!1);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Move,.2*et,.5*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.2*et,.3*nt)),ct.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.3*nt,.25*et,0,.75*et,0)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*et,.5*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*et,.3*nt)),gt}),go.Shape.defineFigureGenerator("Unlocked",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,.5*nt,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt));var ct=new go.PathFigure(.2*et,.5*nt,!1);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Move,.2*et,.5*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.2*et,.3*nt)),ct.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.3*nt,.25*et,0,.75*et,0)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*et,.35*nt)),gt}),go.Shape.defineFigureGenerator("Gear",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(.9375*et,.56246875*nt,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*et,.4375*nt)).add(new go.PathSegment(go.PathSegment.Line,.80621875*et,.4375*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.763*et,.3316875*nt,.79840625*et,.39915625*nt,.7834375*et,.3635*nt)).add(new go.PathSegment(go.PathSegment.Line,.8566875*et,.23796875*nt)).add(new go.PathSegment(go.PathSegment.Line,.76825*et,.14959375*nt)).add(new go.PathSegment(go.PathSegment.Line,.67596875*et,.24184375*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*et,.19378125*nt,.64228125*et,.2188125*nt,.603875*et,.2021875*nt)).add(new go.PathSegment(go.PathSegment.Line,.5625*et,.0625*nt)).add(new go.PathSegment(go.PathSegment.Line,.4375*et,.0625*nt)).add(new go.PathSegment(go.PathSegment.Line,.4375*et,.19378125*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*et,.239375*nt,.39759375*et,.20190625*nt,.36053125*et,.2176875*nt)).add(new go.PathSegment(go.PathSegment.Line,.2379375*et,.14959375*nt)).add(new go.PathSegment(go.PathSegment.Line,.14953125*et,.2379375*nt)).add(new go.PathSegment(go.PathSegment.Line,.23934375*et,.3278125*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*et,.4375*nt,.21765625*et,.36059375*nt,.201875*et,.397625*nt)).add(new go.PathSegment(go.PathSegment.Line,.0625*et,.4375*nt)).add(new go.PathSegment(go.PathSegment.Line,.0625*et,.5625*nt)).add(new go.PathSegment(go.PathSegment.Line,.1938125*et,.5625*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*et,.67596875*nt,.20221875*et,.603875*nt,.21884375*et,.64228125*nt)).add(new go.PathSegment(go.PathSegment.Line,.1495625*et,.76825*nt)).add(new go.PathSegment(go.PathSegment.Line,.238*et,.8566875*nt)).add(new go.PathSegment(go.PathSegment.Line,.3316875*et,.76296875*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*et,.80621875*nt,.36353125*et,.78340625*nt,.3991875*et,.79840625*nt)).add(new go.PathSegment(go.PathSegment.Line,.43753125*et,.9375*nt)).add(new go.PathSegment(go.PathSegment.Line,.5625*et,.9375*nt)).add(new go.PathSegment(go.PathSegment.Line,.5625*et,.80621875*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*et,.760625*nt,.602375*et,.79809375*nt,.63946875*et,.78234375*nt)).add(new go.PathSegment(go.PathSegment.Line,.76828125*et,.8566875*nt)).add(new go.PathSegment(go.PathSegment.Line,.85671875*et,.76825*nt)).add(new go.PathSegment(go.PathSegment.Line,.76065625*et,.67221875*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*et,.56246875*nt,.78234375*et,.63940625*nt,.798125*et,.602375*nt)).add(new go.PathSegment(go.PathSegment.Line,.9375*et,.56246875*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.5*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*et,.5*nt,.1*et,.1*nt).close()))}),go.Shape.defineFigureGenerator("Hand",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,.5*nt,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,.3*nt,0,.375*nt,.05*et,.325*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.45*et,.075*nt,.3*et,.225*nt,.4*et,.175*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.525*et,.075*nt,.46*et,.05*nt,.525*et,.05*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.4*nt,.525*et,.275*nt,.475*et,.325*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,.55*nt,et,.4*nt,et,.55*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.425*et,.55*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.55*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.6*et,.7*nt,.675*et,.55*nt,.675*et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.575*et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.575*et,.85*nt,.65*et,.7*nt,.65*et,.85*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.85*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.525*et,.85*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.535*et,nt,.61*et,.85*nt,.61*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,.435*et,nt,0,nt).close()),gt}),go.Shape.defineFigureGenerator("Map",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,.2*nt,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.25*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),lt.add(new go.PathSegment(go.PathSegment.Move,.25*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.8*nt)),gt}),go.Shape.defineFigureGenerator("Eject",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,nt,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt*.7)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*.7).close());var ct=new go.PathFigure(0,nt*.6,!0);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,et,.6*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.5*et,0).close()),gt}),go.Shape.defineFigureGenerator("Pencil",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*et,.1*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.1*et,.2*nt).close()))}),go.Shape.defineFigureGenerator("Building",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(et*1,nt*1,!1);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*.85)),lt.add(new go.PathSegment(go.PathSegment.Line,.046*et,nt*.85)),lt.add(new go.PathSegment(go.PathSegment.Line,.046*et,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,.046*et,nt*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*et,nt*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*et,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*et,nt*.85)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt*.85).close());var ct=new go.PathFigure(.126*et,.85*nt,!1);gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.126*et,.45*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.322*et,.45*nt)),ct.add(new go.PathSegment(go.PathSegment.Line,.322*et,.85*nt).close());var yt=new go.PathFigure(.402*et,.85*nt,!1);gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.402*et,.45*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.598*et,.45*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.598*et,.85*nt).close());var Lt=new go.PathFigure(.678*et,.85*nt,!1);gt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,.678*et,.45*nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.874*et,.45*nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.874*et,.85*nt).close());var Nt=new go.PathFigure(.5*et,.1*nt,!1);return gt.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*et,.3*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*et,.3*nt).close()),gt}),go.Shape.defineFigureGenerator("Staircase",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,nt*1,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*.8)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.8)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.6)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.6)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.4)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*.4)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*.2)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.2)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.15)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.15)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.15,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.15,nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*.95).close()),gt}),go.Shape.defineFigureGenerator("5Bars",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,nt*1,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*.184,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.184,nt*(1-.184)).close());var ct=new go.PathFigure(et*.204,nt,!0);gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,et*.204,nt*(1-.184))),ct.add(new go.PathSegment(go.PathSegment.Line,et*.388,nt*(1-.184*2))),ct.add(new go.PathSegment(go.PathSegment.Line,et*.388,nt*1).close());var yt=new go.PathFigure(et*.408,nt,!0);gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et*.408,nt*(1-.184*2))),yt.add(new go.PathSegment(go.PathSegment.Line,et*.592,nt*(1-.184*3))),yt.add(new go.PathSegment(go.PathSegment.Line,et*.592,nt*1).close());var Lt=new go.PathFigure(et*.612,nt,!0);gt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,et*.612,nt*(1-.184*3))),Lt.add(new go.PathSegment(go.PathSegment.Line,et*.796,nt*(1-.184*4))),Lt.add(new go.PathSegment(go.PathSegment.Line,et*.796,nt*1).close());var Nt=new go.PathFigure(et*.816,nt,!0);return gt.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,et*.816,nt*(1-.184*4))),Nt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-.184*5))),Nt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1).close()),gt}),go.Shape.defineFigureGenerator("PC",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,0,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,0).close());var ct=new go.PathFigure(et*.055,.07*nt,!0);gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.07)),ct.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.1)),ct.add(new go.PathSegment(go.PathSegment.Line,et*.055,nt*.1).close());var yt=new go.PathFigure(et*.055,.13*nt,!0);gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.13)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.16)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.055,nt*.16).close());var Lt=new go.PathFigure(et*.055,.18*nt,!0);gt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.18)),Lt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.21)),Lt.add(new go.PathSegment(go.PathSegment.Line,et*.055,nt*.21).close());var Nt=new go.PathFigure(et*1,0,!0);return gt.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,et*.4,0)),Nt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.65)),Nt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.65).close()),gt}),go.Shape.defineFigureGenerator("Plane",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(.55*et,nt,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.475*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.35*et,.525*nt,0,.4*nt,.225*et,.45*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.475*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*et,.35*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.325*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.325*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,.2*nt,.975*et,0,et,.08*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.45*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.95*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.55*et,nt).close()),gt}),go.Shape.defineFigureGenerator("Key",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(et*1,nt*.5,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*.9,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,.35*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.45,.35*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.15,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.35*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.65*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.15,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.45,.65*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,.65*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.6,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.65,.55*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.7,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.75,.55*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.8,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.85,.575*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.9,.6*nt).close()),lt.add(new go.PathSegment(go.PathSegment.Move,.17*et,.425*nt)),lt.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*et,.5*nt,.075*et,.075*nt).close()),gt}),go.Shape.defineFigureGenerator("FilmTape",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(0,0,!1);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,180,et*0,et*.3,et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.08,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.08,nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*1),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*1),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*2),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*2),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*3),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*3),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*4),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*4),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*5),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*5),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*6),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*6),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*7),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*7),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*8),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*8),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*9),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*9),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*10),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*10),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*11),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*11),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*12),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*12),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*13),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*13),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*14),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*14),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*15),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*15),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1));var ct=new go.PathFigure(0,0,!1);gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*0)),ct.add(new go.PathSegment(go.PathSegment.Arc,270,-180,et*1,et*.3,et*.055)),ct.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1));var yt=new go.PathFigure(et*.11,nt*.1,!1);gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*1+.028*0),nt*.1)),yt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*1+.028*0),nt*.8)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.11,nt*.8).close());var Lt=new go.PathFigure(et*(.11+.24133333*1+.028*1),nt*.1,!1);gt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*1),nt*.1)),Lt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*1),nt*.8)),Lt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*1+.028*1),nt*.8).close());var Nt=new go.PathFigure(et*(.11+.24133333*2+.028*2),nt*.1,!1);return gt.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*3+.028*2),nt*.1)),Nt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*3+.028*2),nt*.8)),Nt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*2),nt*.8).close()),gt}),go.Shape.defineFigureGenerator("FloppyDisk",function(Ut,et,nt){var gt=new go.Geometry,lt=8,ct=lt*ne,yt=new go.PathFigure(lt,0,!1);gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et*.86,0)),yt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.14)),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt-lt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et-lt,nt,et,nt-ct,et-ct,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,lt,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-lt,ct,nt,0,nt-ct)),yt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,lt,0,0,ct,ct,0).close());var Lt=new go.PathFigure(et*.83,0,!1);gt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,et*.83,nt*.3)),Lt.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*.3)),Lt.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*0).close());var Nt=new go.PathFigure(et*.83,nt*1,!1);gt.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,et*.83,nt*.5)),Nt.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*.5)),Nt.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*1).close());var Vt=new go.PathFigure(et*.78,nt*.05,!1);return gt.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.05)),Vt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.25)),Vt.add(new go.PathSegment(go.PathSegment.Line,et*.78,nt*.25).close()),gt}),go.Shape.defineFigureGenerator("SpeechBubble",function(Ut,et,nt){var gt=Ut?Ut.parameter1:NaN;(isNaN(gt)||gt<0)&&(gt=15),gt=Math.min(gt,et/3),gt=Math.min(gt,nt/3);var lt=gt*ne,ct=nt*.8,yt=new go.Geometry,Lt=new go.PathFigure(gt,0,!0);return yt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,et-gt,0)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,et,gt,et-lt,0,et,lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,et,ct-gt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,et-gt,ct,et,ct-lt,et-lt,ct)),Lt.add(new go.PathSegment(go.PathSegment.Line,et*.7,ct)),Lt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,et*.55,ct)),Lt.add(new go.PathSegment(go.PathSegment.Line,gt,ct)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,0,ct-gt,lt,ct,0,ct-lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,0,gt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,gt,0,0,lt,lt,0).close()),lt>1?(yt.spot1=new go.Spot(0,0,lt,lt),yt.spot2=new go.Spot(1,.8,-lt,-lt)):(yt.spot1=go.Spot.TopLeft,yt.spot2=new go.Spot(1,.8)),yt}),go.Shape.defineFigureGenerator("Repeat",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(et*0,nt*.45,!0);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*.9)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.9)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.65,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*.45).close());var ct=new go.PathFigure(et*1,nt*.55,!0);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*1)),ct.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.55)),ct.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*.55)),ct.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*.1)),ct.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.1)),ct.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*0)),ct.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),ct.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*.55).close()),gt}),go.Shape.defineFigureGenerator("Windows",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close()).add(new go.PathSegment(go.PathSegment.Move,.4*et,.4*nt)).add(new go.PathSegment(go.PathSegment.Line,.4*et,.8*nt)).add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)).add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.2*et,.1*nt)).add(new go.PathSegment(go.PathSegment.Line,.2*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.1*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.1*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Line,.1*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt).close()))}),go.Shape.defineFigureGenerator("Terminal",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(et*0,nt*.1,!1);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.9)),lt.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*.9).close());var ct=new go.PathFigure(et*.1,nt*.2,!0);gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,et*.1,nt*.25)),ct.add(new go.PathSegment(go.PathSegment.Line,et*.22,nt*.285)),ct.add(new go.PathSegment(go.PathSegment.Line,et*.1,nt*.32)),ct.add(new go.PathSegment(go.PathSegment.Line,et*.1,nt*.37)),ct.add(new go.PathSegment(go.PathSegment.Line,et*.275,nt*.32)),ct.add(new go.PathSegment(go.PathSegment.Line,et*.275,nt*.25).close());var yt=new go.PathFigure(et*.28,nt*.37,!0);return gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.37)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.41)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.28,nt*.41).close()),gt}),go.Shape.defineFigureGenerator("Beaker",function(Ut,et,nt){var gt=new go.Geometry,lt=15,ct=lt*ne,yt=new go.PathFigure(et*.62,nt*.475,!0);return gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt-lt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et-lt,nt,et,nt-ct,et-ct,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,lt,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-lt,ct,nt,0,nt-ct)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.38,nt*.475)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.38,nt*.03)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*0)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*0)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.62,nt*.03).close()),ct>1?(gt.spot1=new go.Spot(0,0,ct,ct),gt.spot2=new go.Spot(1,1,-ct,-ct)):(gt.spot1=go.Spot.TopLeft,gt.spot2=go.Spot.BottomRight),gt}),go.Shape.defineFigureGenerator("Download",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(et*0,nt*1,!0);gt.add(lt);var ct=.1/.3;lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-ct))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.755,nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.93,nt*(1-ct))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*(1-ct))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.61,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.39,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*(1-ct))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.07,nt*(1-ct))),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.755),nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.8),nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*(1-ct)).close());var yt=new go.PathFigure(et*.4,nt*0,!0);return gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.44)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.26,nt*.44)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.66)),yt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.26),nt*.44)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.44)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*0).close()),gt}),go.Shape.defineFigureGenerator("Bin",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(et*0,nt*1,!0);gt.add(lt);var ct=.1/.3;return lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-ct))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.755,nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.93,nt*(1-ct))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*(1-ct))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.61,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.39,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*(1-ct))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.07,nt*(1-ct))),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.755),nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.8),nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*(1-ct)).close()),gt}),go.Shape.defineFigureGenerator("Upload",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(et*0,nt*1,!0);gt.add(lt);var ct=.1/.3;lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-ct))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.755,nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.93,nt*(1-ct))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*(1-ct))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.61,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.39,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*(1-ct))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.07,nt*(1-ct))),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.755),nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.8),nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*(1-ct)).close());var yt=new go.PathFigure(et*.5,nt*0,!0);return gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et*.26,nt*.25)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.25)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.63)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.63)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.25)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.74,nt*.25).close()),gt}),go.Shape.defineFigureGenerator("EmptyDrink",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(et*.15,nt*0,!1);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*.85,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*1).close()),gt}),go.Shape.defineFigureGenerator("Drink",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(et*.15,nt*0,!1);gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*.85,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*1).close());var ct=new go.PathFigure(et*.235,nt*.28,!0);return gt.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,et*.765,nt*.28)),ct.add(new go.PathSegment(go.PathSegment.Line,et*.655,nt*.97)),ct.add(new go.PathSegment(go.PathSegment.Line,et*.345,nt*.97).close()),gt}),go.Shape.defineFigureGenerator("4Arrows",function(Ut,et,nt){var gt=new go.Geometry,lt=new go.PathFigure(et*.5,nt*0,!0);return gt.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*.65,nt*.25)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.25)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.5)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.65)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.65,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.65)),lt.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*.5)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.25)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.25).close()),gt}),go.Shape.defineFigureGenerator("Connector","Ellipse"),go.Shape.defineFigureGenerator("Alternative","TriangleUp"),go.Shape.defineFigureGenerator("Merge","TriangleUp"),go.Shape.defineFigureGenerator("Decision","Diamond"),go.Shape.defineFigureGenerator("DataTransmissions","Hexagon"),go.Shape.defineFigureGenerator("Gate","Crescent"),go.Shape.defineFigureGenerator("Delay","HalfEllipse"),go.Shape.defineFigureGenerator("Input","Parallelogram1"),go.Shape.defineFigureGenerator("ManualLoop","ManualOperation"),go.Shape.defineFigureGenerator("ISOProcess","Chevron"),go.Shape.defineFigureGenerator("MessageToUser","SquareArrow"),go.Shape.defineFigureGenerator("MagneticData","Cylinder1"),go.Shape.defineFigureGenerator("DirectData","Cylinder4"),go.Shape.defineFigureGenerator("StoredData","DataStorage"),go.Shape.defineFigureGenerator("SequentialData","MagneticTape"),go.Shape.defineFigureGenerator("Subroutine","Procedure")},61016:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var yn={},qn="5.0",ee={},Tt=null,Be=!1,Ne=!1,ln=null,be=!1,we=null,ne=null,De=0;De<arguments.length;De++){var fe=arguments[De];if(fe!==null)switch(typeof fe){case"number":qn=fe.toFixed(1);break;case"string":fe.match(new RegExp("^[0-9]\\.[0-9]+$"))?qn=fe:ln=fe;break;case"object":typeof fe.is3D!="undefined"?Tt=fe:ee=fe;break;case"boolean":Be=fe,Ne=!0;break}}Tt===null&&(Tt={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},ee.material_id!==void 0&&!Ne&&(Be=!0)),ln!==null&&ee.id===void 0&&(ee.id=ln);var Qe="",gn="",Xe=!1,kn=null,Ut=null,et=null,nt=!1,gt=null,lt=null,ct=null,yt=null,Lt=null;ee.height!==void 0&&(ee.height=Math.round(ee.height)),ee.width!==void 0&&(ee.width=Math.round(ee.width));var Nt=function(He){return parseFloat(He)>4?parseFloat(He):5};yn.setHTML5Codebase=function(He,mn){ne=He,je(He,mn)},yn.setJavaCodebase=yn.setJavaCodebaseVersion=yn.isCompiledInstalled=yn.setPreCompiledScriptPath=yn.setPreCompiledResourcePath=function(){},yn.setHTML5CodebaseVersion=function(He,mn){var Cn=parseFloat(He);if(Cn!==NaN&&Cn<5){console.log("The GeoGebra HTML5 codebase version "+Cn+" is deprecated. Using version latest instead.");return}we=He,Ht(He,mn)},yn.getHTML5CodebaseVersion=function(){return Ut},yn.getParameters=function(){return ee},yn.setFontsCSSURL=function(He){yt=He},yn.setGiacJSURL=function(He){},yn.setJNLPFile=function(He){Qe=He},yn.setJNLPBaseDir=function(He){},yn.inject=function(){function He(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var mn="auto",Cn=ee.id,Jn,bn=!1,ve=0;ve<arguments.length;ve++){var Le=arguments[ve];typeof Le=="string"?(Le=Le.toLowerCase(),Le.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?mn=Le:Cn=arguments[ve]):typeof Le=="boolean"?bn=Le:Le instanceof HTMLElement&&(Jn=Le)}Sn();function Sn(){if(!be){setTimeout(Sn,200);return}mn=fr(mn);var xn=Jn||document.getElementById(Cn);if(!xn){console.log("possibly bug on ajax loading? ");return}if(yn.removeExistingApplet(xn,!1),ee.width===void 0&&xn.clientWidth&&(ee.width=xn.clientWidth),ee.height===void 0&&xn.clientHeight&&(ee.height=xn.clientHeight),!(ee.width&&ee.height)&&mn==="html5"&&(delete ee.width,delete ee.height),kn=mn,mn==="screenshot")fn(xn,ee);else{var Kt=!1;ee.hasOwnProperty("playButton")&&ee.playButton||ee.hasOwnProperty("clickToLoad")&&ee.clickToLoad?Kt=!0:ee.hasOwnProperty("playButtonAutoDecide")&&ee.playButtonAutoDecide&&(Kt=(!Vt()||He())&&Jt()),Kt?(kn="screenshot",ui(xn,ee,bn,mn)):Je(xn,ee,bn)}}};function Vt(){try{return window.self!==window.top}catch(He){return!0}}function Jt(){return ee.hasOwnProperty("screenshotGenerator")&&ee.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}yn.getViews=function(){return Tt},yn.isJavaInstalled=function(){return!1};var Ae=function(He){var mn=function(ve){var Le=JSON.parse(ve),Sn=function(Et){return Et.type=="G"||Et.type=="E"},xn=Le.elements?Le.elements.filter(Sn)[0]:Le;if(!xn||!xn.url){Cn();return}ee.fileName=xn.url,he(xn.settings||{}),Tt.is3D=!0;var Kt="https://www.geogebra.org/images/";yn.setPreviewImage(gt||xn.previewUrl,Kt+"GeoGebra_loading.png",Kt+"applet_play.png"),He()},Cn=function(){ee.onError&&ee.onError(),Nn("Error: Fetching material (id "+ee.material_id+") failed.",ee)},Jn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",bn="/materials/"+ee.material_id+"?scope=basic";le("https://"+Jn+"/api/proxy.php?path="+encodeURIComponent(bn),mn,Cn)};function he(He){var mn=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Cn){He[Cn]=!!He[Cn]}),mn.forEach(function(Cn){ee[Cn]===void 0&&He[Cn]!==void 0&&(ee[Cn]=He[Cn])}),ee.showToolBarHelp===void 0&&(ee.showToolBarHelp=ee.showToolBar)}function le(He,mn,Cn){var Jn=new XMLHttpRequest;Jn.open("GET",He),Jn.onload=function(){mn(Jn.responseText)},Jn.onerror=Cn,Jn.send()}yn.isHTML5Installed=function(){return!0},yn.getLoadedAppletType=function(){return kn},yn.setPreviewImage=function(He,mn,Cn){gt=He,lt=mn,ct=Cn},yn.removeExistingApplet=function(He,mn){var Cn;typeof He=="string"&&(He=document.getElementById(He)),kn=null;var Jn=null;for(Cn=0;Cn<He.childNodes.length;Cn++){var bn=He.childNodes[Cn],ve=bn.className;ve==="applet_screenshot"?mn?(bn.style.display="block",kn="screenshot"):bn.style.display="none":ve!=="applet_scaler prerender"&&(He.removeChild(bn),Jn=ve&&ve.indexOf("appletParameters")!=-1?bn.id:null,Cn--)}var Le=ee.id!==void 0?ee.id:Jn,Sn=window[Le];Sn&&typeof Sn.getBase64=="function"&&(Sn.remove(),window[Le]=null)},yn.refreshHitPoints=function(){if(Nt(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var He=yn.getAppletObject();return He&&typeof He.recalculateEnvironments=="function"?(He.recalculateEnvironments(),!0):!1},yn.startAnimation=function(){var He=yn.getAppletObject();return He&&typeof He.startAnimation=="function"?(He.startAnimation(),!0):!1},yn.stopAnimation=function(){var He=yn.getAppletObject();return He&&typeof He.stopAnimation=="function"?(He.stopAnimation(),!0):!1},yn.getAppletObject=function(){var He=ee.id!==void 0?ee.id:"ggbApplet";return window[He]},yn.resize=function(){};var We=function(He,mn,Cn){var Jn=document.createElement("param");Jn.setAttribute("name",mn),Jn.setAttribute("value",Cn),He.appendChild(Jn)},me=function(He){return He&&He!=="false"},Je=function(He,mn,Cn){Nt(Ut)<=4.2&&(Cn=!0);var Jn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Ut||ggbHTML5LoadedCodebaseIsWebSimple&&!nt)&&(Jn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var bn=document.createElement("div");bn.classList.add("appletParameters","notranslate");var ve=mn.width,Le=mn.height;if(mn.disableAutoScale=mn.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():mn.disableAutoScale,mn.width!==void 0)if(Nt(Ut)<=4.4)me(mn.showToolBar)&&(mn.height-=7),me(mn.showAlgebraInput)&&(mn.height-=37),mn.width<605&&me(mn.showToolBar)&&(mn.width=605,ve=605);else{var Sn=100;(me(mn.showToolBar)||me(mn.showMenuBar))&&(mn.hasOwnProperty("customToolBar")&&(mn.customToolbar=mn.customToolBar),Sn=me(mn.showMenuBar)?245:155),ve<Sn&&(mn.width=Sn,ve=Sn)}bn.style.border="none",bn.style.display="inline-block";for(var xn in mn)mn.hasOwnProperty(xn)&&xn!=="appletOnLoad"&&bn.setAttribute("data-param-"+xn,mn[xn]);yt&&bn.setAttribute("data-param-fontscssurl",yt),yn.resize=function(){GGBAppletUtils.responsiveResize(He,mn)},window.addEventListener("resize",function(Ln){yn.resize()});var Kt=typeof mn.appletOnLoad=="function"?mn.appletOnLoad:function(){};if(!Cn&&mn.width!==void 0){mn.hasOwnProperty("showSplash")||bn.setAttribute("data-param-showSplash","false");var Et=He.querySelector(".applet_scaler.prerender"),Ft=Et!==null;if(Ft)var Dt=Et.querySelector(".ggb_preview");else{var Dt=Si(ve,Le,mn.borderColor,!1);Et=document.createElement("div"),Et.className="applet_scaler",Et.style.position="relative",Et.style.display="block",Et.style.width=ve+"px",Et.style.height=Le+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Et,"66%"),Nt(Ut)>=5?(mn.appletOnLoad=function(Ln){var Ci=He.querySelector(".ggb_preview");Ci&&Ci.parentNode.removeChild(Ci),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Et),window.GGBT_wsf_view&&$(window).trigger("resize"),Kt(Ln)},Ft||Et.appendChild(Dt)):bn.appendChild(Dt),Et.appendChild(bn),Ft||He.appendChild(Et),setTimeout(function(){yn.resize()},1)}else{var Wt=document.createElement("div");Wt.className="applet_scaler",Wt.style.position="relative",Wt.style.display="block",Wt.appendChild(bn),He.appendChild(Wt),mn.appletOnLoad=function(Ln){yn.resize(),Kt(Ln)}}function kt(Ln,Ci){Ci&&typeof Ci.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Ln,Ci.appletOnLoad):renderGGBElement(Ln),Nn("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Ci)}function Ue(Ln,Ci){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Ln,params:Ci}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(gi){kt(gi.article,gi.params)}),html5AppletsToProcess=null)},Nt(Ut)<5&&(Ln.className+=" geogebraweb")):kt(Ln,Ci)}if(Jn){scriptLoadStarted=!0;for(var Tn=0;Tn<bn.childNodes.length;Tn++){var Ei=bn.childNodes[Tn].tagName;Ei==="TABLE"&&(bn.removeChild(bn.childNodes[Tn]),Tn--)}if(ggbHTML5LoadedScript!==null){var Xn=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Xn!=null&&Xn.parentNode.removeChild(Xn)}var si=document.createElement("script"),Qi=function(){Ue(bn,mn)};si.src=gn+et,ggbHTML5LoadedCodebaseIsWebSimple=nt,ggbHTML5LoadedCodebaseVersion=Ut,ggbHTML5LoadedScript=si.src,Nn("GeoGebra HTML5 codebase loaded: '"+gn+"'.",mn),!ne&&(!we||we=="5.0")?(nt?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Qi()):gn.requirejs?__webpack_require__.e(12).then(function(){var Ln=[__webpack_require__(12)];Qi.apply(null,Ln)}.bind(this)).catch(__webpack_require__.oe):(si.onload=Qi,He.appendChild(si))}else Ue(bn,mn);mn.height=Le,mn.width=ve},fn=function(He,mn,Cn){var Jn=Si(mn.width,mn.height,mn.borderColor,Cn),bn=document.createElement("div");bn.style.position="relative",bn.style.display="block",bn.style.width=mn.width+"px",bn.style.height=mn.height+"px",bn.className="applet_screenshot applet_scaler"+(Cn?" applet_screenshot_play":""),bn.appendChild(Jn);var ve=GGBAppletUtils.getScale(mn,He,Cn);Cn?(He.appendChild(hi()),window.GGBT_wsf_view||(He.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(bn,"66%"),He.appendChild(bn),ve!==1&&!isNaN(ve)&&(GGBAppletUtils.scaleElement(bn,ve),bn.style.width=mn.width+"px",bn.style.height=mn.height+"px",bn.parentNode.style.width=mn.width*ve+"px",bn.parentNode.style.height=mn.height*ve+"px"),yn.resize=function(){sn(He,Jn,bn,Cn)},window.addEventListener("resize",function(Le){yn.resize()}),yn.resize()};function sn(He,mn,Cn,Jn){if(He.contains(mn)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(He.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(He)}var bn=GGBAppletUtils.getScale(ee,He,Jn);Cn.parentNode!==null&&(!isNaN(bn)&&bn!==1?(GGBAppletUtils.scaleElement(Cn,bn),Cn.parentNode.style.width=ee.width*bn+"px",Cn.parentNode.style.height=ee.height*bn+"px"):(GGBAppletUtils.scaleElement(Cn,1),Cn.parentNode.style.width=ee.width+"px",Cn.parentNode.style.height=ee.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(He),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}yn.onExitFullscreen=function(He,mn){mn.appendChild(He)};var ui=function(He,mn,Cn,Jn){fn(He,mn,!0);for(var bn=function(){var Sn=[];for(Le=0;Le<He.childNodes.length;Le++)Sn.push(He.childNodes[Le]);if(window.GGBT_wsf_view){var xn=window.GGBT_wsf_view.renderFullScreen(He,mn.id),Kt=document.getElementById("fullscreencontainer"),Et=jQuery(He).find(".fullscreencontent");Et.length>0?(xn.remove(),Et.attr("id","fullscreencontent").show(),jQuery(Kt).append(Et),window.dispatchEvent(new Event("resize"))):Je(xn,mn,!1),window.GGBT_wsf_view.launchFullScreen(Kt)}else kn=Jn,Je(He,mn,!1);if(!window.GGBT_wsf_view)for(Le=0;Le<Sn.length;Le++)He.removeChild(Sn[Le])},ve=He.getElementsByClassName("ggb_preview_play"),Le=0;Le<ve.length;Le++)ve[Le].addEventListener("click",bn,!1),ve[Le].addEventListener("ontouchstart",bn,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(He),Jt()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},hi=function(){var He=document.createElement("div");if(He.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var mn='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',Cn=document.createElement("style");Cn.styleSheet?Cn.styleSheet.cssText=mn:Cn.appendChild(document.createTextNode(mn)),document.getElementsByTagName("head")[0].appendChild(Cn)}return He},Si=function(He,mn,Cn,Jn){var bn=document.createElement("div");bn.className="ggb_preview",bn.style.position="absolute",bn.style.zIndex="90",bn.style.width=He-2+"px",bn.style.height=mn-2+"px",bn.style.top="0px",bn.style.left="0px",bn.style.overflow="hidden",bn.style.backgroundColor="white";var ve="lightgrey";Cn!==void 0&&(Cn==="none"?ve="transparent":ve=Cn),bn.style.border="1px solid "+ve;var Le=document.createElement("img");if(Le.style.position="relative",Le.style.zIndex="1000",Le.style.top="-1px",Le.style.left="-1px",gt!==null&&Le.setAttribute("src",gt),Le.style.opacity=.7,lt!==null){var Sn,xn,Kt;if(!Jn){Sn=document.createElement("img"),Sn.style.position="absolute",Sn.style.zIndex="1001",Sn.style.opacity=1,Le.style.opacity=.3,xn=360,xn>He/4*3&&(xn=He/4*3),Kt=xn/5.8,Sn.setAttribute("src",lt),Sn.setAttribute("width",xn),Sn.setAttribute("height",Kt);var Et=(He-xn)/2,Ft=(mn-Kt)/2;Sn.style.left=Et+"px",Sn.style.top=Ft+"px",bn.appendChild(Sn)}}return bn.appendChild(Le),bn},fr=function(He){return He=He.toLowerCase(),He==="html5"||He==="screenshot"?He:"html5"},qt=["web","webSimple","web3d","tablet","tablet3d","phone"],Ht=function(He,mn){if(Ut=He,mn){je(Ut,!0);return}var Cn=!Be;if(Cn){var Jn=Nt(Ut);!isNaN(Jn)&&Jn<4.4&&(Cn=!1)}var bn,ve;window.location.protocol.substr(0,4)==="http"?bn=window.location.protocol:bn="http:";var Le=Ut.indexOf("//");Le>0?ve=Ut:Le===0?ve=bn+Ut:ve="https://www.geogebra.org/apps/5.2.814.0/";for(var Sn in qt)if(Ut.slice(qt[Sn].length*-1)===qt[Sn]||Ut.slice((qt[Sn].length+1)*-1)===qt[Sn]+"/"){je(ve,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Cn&&!Tt.is3D&&!Tt.AV&&!Tt.SV&&!Tt.CV&&!Tt.EV2&&!Tt.CP&&!Tt.PC&&!Tt.DA&&!Tt.FI&&!Tt.PV&&!me(ee.showToolBar)&&!me(ee.showMenuBar)&&!me(ee.showAlgebraInput)&&!me(ee.enableRightClick)&&(!ee.appName||ee.appName=="classic")?ve+="webSimple/":ve+="web3d/",je(ve,!1)},je=function(He,mn){if(He.requirejs){gn=He;return}He.slice(-1)!=="/"&&(He+="/"),gn=He,mn===null&&(mn=He.indexOf("http")===-1),Xe=mn,et="web.nocache.js",nt=!1;var Cn=gn.split("/");Cn.length>1&&(!mn&&Cn[Cn.length-2]==="webSimple"?(et="webSimple.nocache.js",nt=!0):qt.indexOf(Cn[Cn.length-2])>=0&&(et=Cn[Cn.length-2]+".nocache.js")),Cn=He.split("/"),Ut=Cn[Cn.length-3],Ut.substr(0,4)==="test"?Ut=Ut.substr(4,1)+"."+Ut.substr(5,1):(Ut.substr(0,3)==="war"||Ut.substr(0,4)==="beta")&&(Ut="5.0");var Jn=parseFloat(Ut);Jn!==NaN&&Jn<5&&He.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Jn+" is deprecated. Using version latest instead."),Ht("5.0",mn))},Nn=function(He,mn){window.console&&window.console.log&&(!mn||typeof mn.showLogging=="undefined"||mn.showLogging&&mn.showLogging!=="false")&&console.log(He)};ee.material_id!==void 0?Ae(Kn):Kn();function Kn(){var He=qn;we!==null?He=we:parseFloat(He)<5&&(He="5.0"),Ht(He,!1),ne!==null&&je(ne,Xe),be=!0}return yn},GGBAppletUtils=function(){"use strict";function yn(){return window.GGBT_wsf_edit!==void 0}function qn(be,we){we!=1?(be.style.transformOrigin="0% 0% 0px",be.style.webkitTransformOrigin="0% 0% 0px",be.style.transform="scale("+we+","+we+")",be.style.webkitTransform="scale("+we+","+we+")",be.style.maxWidth="initial",be.querySelector(".ggb_preview")!==null&&(be.querySelector(".ggb_preview").style.maxWidth="initial"),be.querySelectorAll(".ggb_preview img")[0]!==void 0&&(be.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),be.querySelectorAll(".ggb_preview img")[1]!==void 0&&(be.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(be.style.transform="none",be.style.webkitTransform="none")}function ee(be,we,ne,De,fe,Qe){var gn=null;if(Qe!=null&&Qe!="")for(var Xe=be.parentNode;Xe!=null;)if((" "+Xe.className+" ").indexOf(" "+Qe+" ")>-1){gn=Xe;break}else Xe=Xe.parentNode;var kn=0,Ut=0,et=0,nt=0,gt=0,lt=0,ct=0;if(gn)kn=gn.offsetWidth,Ut=Math.max(De?gn.offsetWidth:0,gn.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(kn=Math.min(window.innerWidth,document.documentElement.clientWidth),Ut=Math.min(window.innerHeight,document.documentElement.clientHeight),et=kn):(kn=window.innerWidth,Ut=window.innerHeight,et=window.innerWidth),be){var yt=be.getBoundingClientRect();yt.left>0&&yt.left<=kn&&(fe===void 0||!fe)&&(document.dir==="rtl"?(gt=kn-yt.width-yt.left,lt=et<=480?10:30):(lt=yt.left,gt=et<=480?10:30),nt=lt+gt)}if(be&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var Lt=be.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(nt=40,ct=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(nt=0,ct=40)}}return be&&((ne===void 0||!ne)&&we>0&&we+nt<kn?kn=we:kn-=nt,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ne===void 0||!ne)&&(Ut-=ct)),{width:kn,height:Ut}}function Tt(be,we,ne,De,fe){if(be.isScreenshoGenerator)return 1;var Qe=De!==void 0&&De,gn=be.noScaleMargin!=null&&be.noScaleMargin,Xe=function(Lt){return Lt&&Lt!=="false"},kn=Xe(be.autoHeight),Ut=ee(we,be.width,ne,kn,Qe&&window.GGBT_wsf_view||gn,fe),et=parseInt(Ut.width),nt=be.width,gt=be.height;if(nt===void 0){var lt=we.querySelector(".appletParameters");lt&&(nt=lt.offsetWidth,gt=lt.offsetHeight)}var ct=et/nt,yt=Qe?1:Ut.height/gt;return ne!==void 0&&!ne&&(ct=Math.min(1,ct),yt=Math.min(1,yt)),Math.min(ct,yt)}function Be(be,we,ne){var De=1,fe,Qe=!1;if(be.hasOwnProperty("allowUpscale")&&(Qe=be.allowUpscale),be.hasOwnProperty("scale")&&(De=parseFloat(be.scale),(isNaN(De)||De===null||De===0)&&(De=1),De>1&&(Qe=!0)),we&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Qe=!0),!(be.hasOwnProperty("disableAutoScale")&&be.disableAutoScale))fe=Tt(be,we,Qe,ne,be.scaleContainerClass);else return De;return Qe&&(!be.hasOwnProperty("scale")||De===1)?fe:Math.min(De,fe)}function Ne(be){var we=Math.min(window.innerWidth,document.documentElement.clientWidth),ne=Math.min(window.innerHeight,document.documentElement.clientHeight),De=be.getBoundingClientRect(),fe=(we-De.width)/2,Qe=(ne-De.height)/2;Qe<0&&(Qe=0),be.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(fe<40?be.style.left="40px":be.style.left=fe+"px",be.style.top=Qe+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Qe<40?be.style.top="40px":be.style.top=Qe+"px",be.style.left=fe+"px")}function ln(be,we){var ne=be.querySelector(".appletParameters");if(ne){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(we.id!==ne.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(be)}if(ne.parentElement&&/fullscreen/.test(ne.parentElement.className))return;var De=Be(we,be);yn()&&ne.setAttribute("data-param-scale",De);for(var fe=null,Qe=0;Qe<be.childNodes.length;Qe++)if(be.childNodes[Qe].className!==void 0&&be.childNodes[Qe].className.match(/^applet_scaler/)){fe=be.childNodes[Qe];break}if(fe!==null&&fe.querySelector(".noscale")!==null)return;var gn=we.id!==void 0?we.id:"ggbApplet",Xe=window[gn];(Xe==null||!Xe.recalculateEnvironments)&&fe!==null&&!fe.className.match(/fullscreen/)&&(fe.parentNode.style.transform="",!isNaN(De)&&De!==1?(fe.parentNode.style.width=we.width*De+"px",fe.parentNode.style.height=we.height*De+"px",qn(fe,De)):(qn(fe,1),fe.parentNode.style.width=we.width+"px",fe.parentNode.style.height=we.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Ne(be),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(ne).parents(".content-added-content"))}}return{responsiveResize:ln,isFlexibleWorksheetEditor:yn,positionCenter:Ne,getScale:Be,scaleElement:qn}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var yn=n.location.search;return yn.indexOf(J)!=-1||yn.indexOf(K)!=-1}function q(yn,qn){}webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(yn){var qn=s[L].bindings;s[L].bindings=function(){for(var ee=qn?qn():{},Tt=yn[webModule.__softPermutationId],Be=O;Be<Tt.length;Be++){var Ne=Tt[Be];ee[Ne[O]]=Ne[P]}return ee}};var t;function u(){return v(),t}function v(){if(!t){var yn=o.createElement(Q);if(yn.id=L,yn.style.cssText=R+S,yn.tabIndex=-1,o.body.appendChild(yn),t=yn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var qn=document.compatMode==U?V:W;t.write(qn+X),t.close()}}}function w(yn){function qn(Tt){function Be(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Ne=Be();if(Ne){Tt();return}function ln(){if(!Ne){if(!Be())return;Ne=!0,Tt(),o.removeEventListener&&o.removeEventListener(Z,ln,!1),be&&clearInterval(be)}}o.addEventListener&&o.addEventListener(Z,ln,!1);var be=setInterval(function(){ln()},$)}function ee(Tt){var Be=u(),Ne=Be.body,ln=Be.createElement(_);ln.language=ab,ln.crossOrigin=W,ln.src=Tt,webModule.__errFn&&(ln.onerror=function(){webModule.__errFn(L,new Error(bb+Tt))}),Ne.appendChild(ln)}qn(function(){ee(yn)})}webModule.__startLoadingFragment=function(yn){return C(yn)},webModule.__installRunAsyncCode=function(yn){var qn=u(),ee=qn.body,Tt=qn.createElement(_);Tt.language=ab,Tt.text=yn,ee.appendChild(Tt),ee.removeChild(Tt)};function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(yn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(yn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(yn){var qn=c[yn];return qn==null?null:qn},r=d,webModule.__errFn=e}function B(){function yn(be){var we=be.lastIndexOf(rb);we==-1&&(we=be.length);var ne=be.indexOf(sb);ne==-1&&(ne=be.length);var De=be.lastIndexOf(tb,Math.min(ne,we));return De>=O?be.substring(O,De+P):W}function qn(be){if(!be.match(/^\w+:\/\//)){var we=o.createElement(ub);we.src=be+vb,be=yn(we.src)}return be}function ee(){var be=__gwt_getMetaProperty(wb);return be!=null?be:W}function Tt(){for(var be=o.getElementsByTagName(_),we=O;we<be.length;++we)if(be[we].src.indexOf(xb)!=-1)return yn(be[we].src);return W}function Be(){var be=o.getElementsByTagName(yb);return be.length>O?be[be.length-P].href:W}function Ne(){var be=o.location;return be.href==be.protocol+zb+be.host+be.pathname+be.search+be.hash}var ln=ee();return ln==W&&(ln=Tt()),ln==W&&(ln=Be()),ln==W&&Ne()&&(ln=yn(o.location.href)),ln=qn(ln),ln}function C(yn){return yn.match(/^\//)||yn.match(/^[a-zA-Z]+:\/\//)?yn:webModule.__moduleBase+yn}function D(){var yn=[],qn=O,ee=[],Tt=[];function Be(be){var we=Tt[be](),ne=ee[be];if(we in ne)return we;var De=[];for(var fe in ne)De[ne[fe]]=fe;throw r&&r(be,De,we),null}if(__gwt_isKnownPropertyValue=function(be,we){return we in ee[be]},webModule.__getPropMap=function(){var be={};for(var we in ee)ee.hasOwnProperty(we)&&(be[we]=Be(we));return be},webModule.__computePropValue=Be,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Ne;try{Ne=Cb;var ln=Ne.indexOf(Db);ln!=-1&&(qn=parseInt(Ne.substring(ln+P),$),Ne=Ne.substring(O,ln))}catch(be){}return webModule.__softPermutationId=qn,C(Ne+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},15476:function(yn,qn,ee){"use strict";ee.d(qn,{Ax:function(){return ln},Ds:function(){return be},KI:function(){return ne},SI:function(){return Ne},f1:function(){return Be}});var Tt=ee(11320);function Be(De){let fe=!0;if(De.length>0){for(let Qe=0;Qe<De.length;Qe++)if(De[Qe].compile_success==0||!De[Qe].compile_success){fe=!1;break}}else fe=!1;return fe}function Ne(De,fe=""){let Qe=[];for(let gn=0;gn<De.length;gn++){let Xe=De[gn],kn=fe?`${fe}/${Xe.name}`:`${Xe.name}`;Qe.push({title:Xe.name,type:Xe.type,isLeaf:Xe.type!=="tree",key:kn})}return Qe}function ln(De,fe,Qe){for(let gn=0;gn<De.length;gn++){let Xe=De[gn];if(Xe.key===fe){Xe.children=Qe;break}Xe.children&&ln(Xe.children,fe,Qe)}return De}function be(De,fe,Qe){let gn;return function(){let Xe=this,kn=arguments,Ut=function(){gn=null,Qe||De.apply(Xe,kn)},et=Qe&&!gn;clearTimeout(gn),gn=setTimeout(Ut,fe),et&&De.apply(Xe,kn)}}const we=!0,ne=Tt.Z.API_SERVER},63205:function(yn,qn,ee){"use strict";ee.d(qn,{Z:function(){return gn}});var Tt=ee(67294),Be={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Ne=ee(94184),ln=ee.n(Ne),be=ee(74330),we=ee(15979),ne=ee(33170),De=ee(28706),fe=(Xe,kn,Ut)=>new Promise((et,nt)=>{var gt=yt=>{try{ct(Ut.next(yt))}catch(Lt){nt(Lt)}},lt=yt=>{try{ct(Ut.throw(yt))}catch(Lt){nt(Lt)}},ct=yt=>yt.done?et(yt.value):Promise.resolve(yt.value).then(gt,lt);ct((Ut=Ut.apply(Xe,kn)).next())}),gn=({data:Xe,className:kn,fullWidth:Ut,style:et={},onClose:nt,onOk:gt,showFullTools:lt,noAssociationId:ct})=>{const yt=(0,Tt.useRef)(null),Lt=(0,Tt.useRef)(null),Nt=(0,Tt.useRef)(null),Vt=(0,Tt.useRef)(null),[Jt,Ae]=(0,Tt.useState)(!1),[he,le]=(0,Tt.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,Tt.useEffect)(()=>(Nt.current||(Nt.current=document.createElement("style"),document.head.appendChild(Nt.current)),Xe!=null&&Xe.visible?(document.body.setAttribute("data-custom","y-hidden"),Nt.current.innerHTML=" html { overflow-y: hidden; }",Xe!=null&&Xe.src&&We()):(document.body.removeAttribute("data-custom"),Nt.current&&(document.head.removeChild(Nt.current),Nt.current=null)),()=>{document.body.removeAttribute("data-custom"),Nt.current&&(document.head.removeChild(Nt.current),Nt.current=null)}),[Xe==null?void 0:Xe.visible]);const We=()=>fe(void 0,null,function*(){Ae(!0),le("\u6B63\u5728\u52A0\u8F7D\u4E2D");const sn=yield(0,De.ZJ)(Xe==null?void 0:Xe.src);yt.current.src="",yt.current.src=sn,yt.current.onload=function(){fn()},Ae(!1),le("")}),me=sn=>fe(void 0,null,function*(){Ae(!0),le("\u6B63\u5728\u4FDD\u5B58\u4E2D");const ui=yield(0,ne.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Xe.title,file:sn.dataUrl}});ui!=null&&ui.id&&!ct?(yield(0,ne.ZP)(`/api/attachments/${Xe.id}/add_subitem.json`,{method:"post",body:{subitem_id:ui==null?void 0:ui.id,settings:JSON.stringify(sn.state)}})).status===0&&gt():ui!=null&&ui.id&&gt(ui),Ae(!1),le("")}),Je=()=>{const sn=document.querySelector('a[href="https://markerjs.com/"]');sn&&sn.parentNode&&(sn.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"\u9009\u62E9"},{name:'[data-action="delete"]',title:"\u5220\u9664\u5143\u7D20"},{name:'[data-action="undo"]',title:"\u64A4\u9500"},{name:'[data-type-name="FrameMarker"]',title:"\u77E9\u5F62"},{name:'[data-type-name="FreehandMarker"]',title:"\u753B\u7EBF"},{name:'[data-type-name="ArrowMarker"]',title:"\u7BAD\u5934"},{name:'[data-type-name="TextMarker"]',title:"\u6587\u672C"},{name:'[data-type-name="EllipseMarker"]',title:"\u692D\u5706"},{name:'[data-type-name="HighlightMarker"]',title:"\u65B9\u5757"},{name:'[data-type-name="CalloutMarker"]',title:"\u6CE8\u91CA"},{name:'[data-action="render"]',title:"\u4FDD\u5B58"},{name:'[data-action="close"]',title:"\u9000\u51FA"}].forEach(hi=>{const Si=document.querySelector(hi.name);Si&&Si.setAttribute("title",hi.title)})},fn=()=>{Lt.current=new we.hP(yt.current),Lt.current.targetRoot=Vt.current,Lt.current.addEventListener("render",me),Lt.current.addEventListener("beforeclose",nt),lt&&(Lt.current.availableMarkerTypes=Lt.current.ALL_MARKER_TYPES,Lt.current.uiStyleSettings.redoButtonVisible=!0,Lt.current.uiStyleSettings.notesButtonVisible=!0,Lt.current.uiStyleSettings.zoomButtonVisible=!0,Lt.current.uiStyleSettings.zoomOutButtonVisible=!0,Lt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=Lt.current.uiStyleSettings,Lt.current.show(),Xe!=null&&Xe.snapshotData&&Lt.current.restoreState(Xe.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Je()},300)};return Tt.createElement(Tt.Fragment,null,(Xe==null?void 0:Xe.visible)&&Tt.createElement(be.Z,{spinning:Jt,tip:he,style:{position:"absolute",width:"100vw"}},Tt.createElement("div",{ref:Vt,className:ln()(Be.imageDimensions,kn,Ut?Be.fullWidth:""),style:et},Tt.createElement("img",{className:Be.img,ref:yt}))))}},36527:function(yn,qn,ee){"use strict";var Tt=ee(67294),Be=ee(71230),Ne=ee(15746),ln=ee(55238),be=ee(85804),we=ee(65226),ne=ee(71736),De=ee(84279),fe=ee(67294);const Qe=(0,Tt.forwardRef)(({callback:gn,showSaveButton:Xe,value:kn=""},Ut)=>{const et=(0,Tt.useRef)(),nt=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],gt=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r
x=a + r\\text{cos}\\theta \\ \r
y=b + r\\text{sin}\\theta \r
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
\\end{array} `},{value:`\\begin{array}{l} \r
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
\\left\\{\\begin{matrix} \r
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
\\end{matrix}\\right. \r
\\end{array} `},{value:`\\begin{array}{l} \r
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
\\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r
a \\perp \\alpha \\ \r
b \\perp \\alpha \r
\\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
a \\parallel \\partial ,b \\parallel \\partial \r
\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
a \\perp m,a \\perp n \r
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
a^{2}+b^{2}=c^{2} \r
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
\\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
a,b \\in R^{+} \\ \r
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
\\end{array}`},{value:`\\begin{array}{c} \r
a,b \\in R \\ \r
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
\\end{array}`},{value:`\\begin{array}{c} \r
H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r
\\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
\\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r
P \\left( \\emptyset \\right) =0 \\\\ \r
P \\left( S \\right) =1 \r
\\end{array}`},{value:`\\begin{array}{c} \r
\\forall A \\in S \\\\ \r
P \\left( A \\right) \\ge 0 \r
\\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
\\end{array}`},{value:`\\begin{array}{c} \r
P_{n}=n! \\\\ \r
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
\\end{array}`}]}]}],lt=Lt=>{et.current.setValue(et.current.getValue()+" "+Lt.value+" ")},ct=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:fe.createElement(Be.Z,{className:ne.Z.lists,gutter:[10,10]},nt.map((Lt,Nt)=>fe.createElement(Ne.Z,{flex:"110px",className:ne.Z.item},fe.createElement("div",null,fe.createElement(we.Z,{value:`$$${Lt.value}$$`}),Lt.name),fe.createElement("div",{className:ne.Z.children},Lt.children.map((Vt,Jt)=>fe.createElement("div",{key:Jt},fe.createElement("h1",null,Vt.name),fe.createElement(Be.Z,{gutter:[10,10]},Vt.data.map((Ae,he)=>fe.createElement(Ne.Z,{key:he,onClick:()=>lt(Ae),className:ne.Z.diamond},fe.createElement(we.Z,{value:"`$$"+Ae.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:fe.createElement(Be.Z,{className:ne.Z.lists,gutter:[10,10]},gt.map((Lt,Nt)=>fe.createElement(Ne.Z,{flex:"110px",className:ne.Z.item},fe.createElement("div",null,fe.createElement(we.Z,{value:"`$$"+Lt.value+"$$`"}),Lt.name),fe.createElement("div",{className:ne.Z.children},Lt.children.map((Vt,Jt)=>fe.createElement("div",{key:Jt},Vt.name&&fe.createElement("h1",null,Vt.name),fe.createElement(Be.Z,{gutter:[10,10]},Vt.data.map((Ae,he)=>fe.createElement(Ne.Z,{key:he,onClick:()=>lt(Ae),className:ne.Z.diamond},fe.createElement(we.Z,{value:"`$$"+Ae.value+"$$`"}))))))))))}],yt=()=>{var Lt=document.createElement("div");Lt.innerHTML=et.current.getValue();var Nt=Lt.innerText;return gn&&gn(Nt),Nt};return(0,Tt.useImperativeHandle)(Ut,()=>({getData:yt})),fe.createElement("div",{className:ne.Z.mathWrap},fe.createElement(ln.default,{defaultActiveKey:"1",items:ct}),fe.createElement("math-field",{locale:"zh_cn",className:ne.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:et,style:{width:800,marginTop:30,fontSize:18}},kn||""),Xe&&fe.createElement("div",{className:ne.Z.button},fe.createElement(be.ZP,{size:"large",onClick:yt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});qn.Z=Qe},26194:function(yn,qn,ee){"use strict";var Tt=ee(67294),Be=ee(4977),Ne=ee(85804),ln=Object.defineProperty,be=Object.defineProperties,we=Object.getOwnPropertyDescriptors,ne=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable,Qe=(Ut,et,nt)=>et in Ut?ln(Ut,et,{enumerable:!0,configurable:!0,writable:!0,value:nt}):Ut[et]=nt,gn=(Ut,et)=>{for(var nt in et||(et={}))De.call(et,nt)&&Qe(Ut,nt,et[nt]);if(ne)for(var nt of ne(et))fe.call(et,nt)&&Qe(Ut,nt,et[nt]);return Ut},Xe=(Ut,et)=>be(Ut,we(et));const kn=({img:Ut,buttonProps:et={},styles:nt={},customText:gt,ButtonText:lt,ButtonClick:ct,Buttonclass:yt,ButtonTwo:Lt,imgStyles:Nt,loading:Vt=!1,className:Jt=""})=>Tt.createElement("section",{className:`tc animated fadeIn ${Jt}`,style:gn({color:"#999",margin:"100px auto",visibility:Vt?"hidden":"visible"},nt)},Tt.createElement("img",{src:Ut||Be,style:Xe(gn({},Nt),{pointerEvents:"none",userSelect:"none"})}),Tt.createElement("p",{className:"mt20 font14"},gt||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),lt&&Tt.createElement(Ne.ZP,gn({className:yt,onClick:ct},et),lt),Lt&&Lt);qn.Z=kn},20819:function(yn,qn,ee){"use strict";ee.d(qn,{Z:function(){return yt}});var Tt=ee(67294),Be={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Ne=ee(85804),ln=ee(30153),be=ee(36295),we=ee(83062),ne=ee(28706),De=ee(15835),fe=ee(26194),Qe=ee(11320),gn=ee(66540),Xe=ee(67294),kn=Object.defineProperty,Ut=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,gt=(Lt,Nt,Vt)=>Nt in Lt?kn(Lt,Nt,{enumerable:!0,configurable:!0,writable:!0,value:Vt}):Lt[Nt]=Vt,lt=(Lt,Nt)=>{for(var Vt in Nt||(Nt={}))et.call(Nt,Vt)&&gt(Lt,Vt,Nt[Vt]);if(Ut)for(var Vt of Ut(Nt))nt.call(Nt,Vt)&&gt(Lt,Vt,Nt[Vt]);return Lt},ct=(Lt,Nt,Vt)=>new Promise((Jt,Ae)=>{var he=me=>{try{We(Vt.next(me))}catch(Je){Ae(Je)}},le=me=>{try{We(Vt.throw(me))}catch(Je){Ae(Je)}},We=me=>me.done?Jt(me.value):Promise.resolve(me.value).then(he,le);We((Vt=Vt.apply(Lt,Nt)).next())}),yt=({editOffice:Lt="view",data:Nt,issaver:Vt,onSaver:Jt,theme:Ae,type:he,filename:le,monacoEditor:We,className:me,style:Je,close:fn,onClose:sn,hasMask:ui,disabledDownload:hi,onImgDimensions:Si,showNodata:fr,recordInfo:qt})=>{const[Ht,je]=(0,Tt.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Nn,Kn]=(0,Tt.useState)(""),[He,mn]=(0,Tt.useState)(),Cn=window.ENV==="build"?"/react/build":"",Jn=location.host.startsWith("localhost")?Qe.Z.PROXY_SERVER:Qe.Z.API_SERVER,ve=10*(1024*1024),Le=(0,Tt.useRef)();Nt!=null&&Nt.startsWith("/api")&&he!=="txt"&&(Nt=Qe.Z.API_SERVER+Nt);const Sn=Dt=>Dt.substring(Dt.lastIndexOf("/")+1).split(".").pop();le&&We&&(We.filename=le),(0,Tt.useEffect)(()=>{var Dt,Wt;const kt=(Wt=(Dt=document.cookie)==null?void 0:Dt.replace(/\s/g,""))==null?void 0:Wt.split(";");kt==null||kt.map(Ue=>{let Tn=Ue.split("=");Tn[0]==="_educoder_session"&&Kn(Tn[1])})},[]),(0,Tt.useEffect)(()=>{he==="office"&&(Nt.indexOf("bigfilescdn.")>-1||Nt.indexOf("bigfiles1")>-1?mn({url:Nt,fileType:Sn(Nt),model:Nt.indexOf("model=edit")?"edit":"view"}):Kt())},[he,Nt]);function xn(Dt){return ct(this,null,function*(){Dt.data.type==="pdfdata"&&(Jt(Dt.data.data),window.removeEventListener("message",xn,!1)),console.log("mess---:",Dt.data)})}const Kt=()=>ct(void 0,null,function*(){console.log("data:",Nt);let Dt=Nt;Nt.startsWith("http")||(Dt=location.origin+Dt);let Wt=new URL(Dt).pathname.split("/").pop();const kt=yield(0,De.gJ)({attachment_id:Wt});kt.url=Jn+kt.url,mn(kt)}),Et=()=>{if(Nt.startsWith("http")||Nt.startsWith("blob:")){Ft();return}(0,ne.Sv)(le||"educoder",Nt,le)},Ft=()=>{qt&&(0,gn.fc)({id:qt==null?void 0:qt.id,watch_type:1,course_id:qt==null?void 0:qt.course_id}),(0,ne.Nd)(le||"educoder",decodeURIComponent(Nt))};return Xe.createElement("div",{style:lt({},Je||{}),className:`${ui&&Be.bgBlack} ${he?Be.wrp:"hide"}`},fn&&Xe.createElement("div",{className:Be.close,ref:Le},!!Si&&Xe.createElement(we.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Le.current},Xe.createElement("span",{onClick:()=>{sn(),Si()}},Xe.createElement("i",{className:"icon-yulanpizhu"}))),!hi&&Xe.createElement(we.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Le.current},Xe.createElement("span",{onClick:Ft},Xe.createElement("i",{className:"icon-quxiaozhiding"}))),Vt&&Xe.createElement(we.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>Le.current},Xe.createElement("span",{className:"",onClick:()=>{const Dt=document.getElementById("pdfiframe");window.addEventListener("message",xn,!1),setTimeout(()=>{Dt.contentWindow.postMessage("getData","*")},300)}},Xe.createElement("i",{className:"icon-baocun"}))),Xe.createElement(we.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Le.current},Xe.createElement("span",{className:"",onClick:()=>{sn()}},Xe.createElement("i",{className:"icon-guanbi1"})))),Xe.createElement("div",{className:`${Be[me]} ${me} ${Be.monaco} ${he==="txt"?"show":"hide"}`},he==="txt"&&Xe.createElement(Xe.Fragment,null,Xe.createElement(be.ZP,lt({},We)))),he==="audio"&&Xe.createElement("audio",{src:`${(Nt==null?void 0:Nt.indexOf("http://"))>-1||(Nt==null?void 0:Nt.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Nt}`,autoPlay:!0}),he==="video"&&Xe.createElement(Xe.Fragment,null,(Nt==null?void 0:Nt.indexOf("http"))>-1?Xe.createElement("video",{controls:!0,src:`${Nt}`,autoPlay:!0}):Xe.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Nt}`,autoPlay:!0})),he==="office"&&He&&Xe.createElement("iframe",{src:`${Cn}/office.html?key=${He.key}&url=${btoa(He.url)}&callbackUrl=${Jn+(He.callbackUrl||"")}&fileType=${He.fileType}&title=${He.title||""}&model=${Lt}&officeServer=${Qe.Z.ONLYOFFICE}&disabledDownload=${!!hi}`}),he==="html"&&Xe.createElement("iframe",{src:Nt+"&disposition=inline"}),he==="pdf"&&Xe.createElement("iframe",{id:"pdfiframe",src:`${Cn}/js/pdfview/index.html?filename=${le||"educoder.pdf"}&url=${encodeURIComponent(Nt)}&disabledDownload=${!!hi}&model=${Lt}`}),he==="image"&&Xe.createElement("img",{src:`${(Nt==null?void 0:Nt.indexOf("http://"))>-1||(Nt==null?void 0:Nt.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Nt}`}),(he==="other"||he==="download")&&Xe.createElement(Xe.Fragment,null,fr?Xe.createElement(fe.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:Xe.createElement(Ne.ZP,{icon:Xe.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Et,disabled:hi},"\u4E0B\u8F7D")}):Xe.createElement(Ne.ZP,{type:"primary",size:"middle",onClick:Et,disabled:hi},Xe.createElement(ln.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},65226:function(yn,qn,ee){"use strict";ee.d(qn,{z:function(){return he},Z:function(){return le}});var Tt=ee(67294),Be=ee(81897),Ne=ee(51161),ln=ee(11771),be=ee(67631),we=ee.n(be),ne=ee(11320),De=ee(28706),fe=ee(20527),Qe=ee(25934),gn=ee(20819),Xe=ee(67294),Ut=({html:We})=>{const me=(0,Tt.useRef)(null),Je=(0,Tt.useRef)(null),fn=`.markdown-body p {
margin: 0 0 16px 0 !important;
line-height: 28px;
white-space: pre-wrap;
}
ol,
ul,
li {
list-style-type: none
}
ol,
ul,
dl {
margin-bottom: 0px;
}
.markdown-body {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
color: #333;
overflow: hidden;
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
word-break: break-word;
font-size: 16px;
line-height: 1.6;
white-space: normal;
word-wrap: break-word;
position: relative;
}
.markdown-body ul>li {
list-style-type: disc;
}
.markdown-body ol>li {
list-style-type: decimal;
}
.markdown-body a {
background: transparent;
}
.markdown-body a:active,
.markdown-body a:hover {
outline: 0;
}
.markdown-body strong {
font-weight: bold;
}
.markdown-body h1 {
font-size: 2em;
margin: 0.67em 0;
}
.markdown-body img {
border: 0;
}
.markdown-body hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
.markdown-body pre {
overflow: auto;
}
.markdown-body code,
.markdown-body kbd,
.markdown-body pre {
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
font-size: 1em;
}
.markdown-body input {
color: inherit;
font: inherit;
margin: 0;
}
.markdown-body html input[disabled] {
cursor: default;
}
.markdown-body input {
line-height: normal;
}
.markdown-body input[type="checkbox"] {
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
.markdown-body table {
border-collapse: collapse;
border-spacing: 0;
}
.markdown-body td,
.markdown-body th {
padding: 0;
}
.markdown-body * {
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body input {
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
}
.markdown-body a {
color: #4183c4;
text-decoration: none;
}
.markdown-body a:hover,
.markdown-body a:active {
text-decoration: underline;
}
.markdown-body hr {
height: 0;
margin: 15px 0;
overflow: hidden;
background: transparent;
border: 0;
border-bottom: 1px solid #ddd;
}
.markdown-body hr:before {
display: table;
content: "";
}
.markdown-body hr:after {
display: table;
clear: both;
content: "";
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
margin-top: 15px;
margin-bottom: 15px;
line-height: 1.1;
}
.markdown-body h1 {
font-size: 30px;
}
.markdown-body h2 {
font-size: 21px;
}
.markdown-body h3 {
font-size: 16px;
}
.markdown-body h4 {
font-size: 14px;
}
.markdown-body h5 {
font-size: 12px;
}
.markdown-body h6 {
font-size: 11px;
}
.markdown-body blockquote {
margin: 0;
}
.markdown-body ul,
.markdown-body ol {
padding: 0;
margin-top: 0;
margin-bottom: 0;
}
ul.linenums,
ol.linenums {
padding: 16px 0 0 56px !important;
}
.markdown-body ul,
.markdown-body ol {
padding-left: 2em;
}
.markdown-body ol ol,
.markdown-body ul ol {
list-style-type: lower-roman;
}
.markdown-body ul ul ol,
.markdown-body ul ol ol,
.markdown-body ol ul ol,
.markdown-body ol ol ol {
list-style-type: lower-alpha;
}
.markdown-body dd {
margin-left: 0;
}
.markdown-body code {
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 12px;
}
.markdown-body pre {
margin-top: 0;
margin-bottom: 0;
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
.markdown-body .octicon {
font: normal normal 16px octicons-anchor;
line-height: 1;
display: inline-block;
text-decoration: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.markdown-body .octicon-link:before {
content: '\f05c';
}
.markdown-body>*:first-child {
margin-top: 0 !important;
}
.markdown-body>*:last-child {
margin-bottom: 0 !important;
}
.markdown-body .anchor {
position: absolute;
top: 0;
left: 0;
display: block;
padding-right: 6px;
padding-left: 30px;
margin-left: -30px;
}
.markdown-body .anchor:focus {
outline: none;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
position: relative;
margin-top: 1em;
margin-bottom: 16px;
font-weight: bold;
line-height: 1.4;
}
.markdown-body h1 .octicon-link,
.markdown-body h2 .octicon-link,
.markdown-body h3 .octicon-link,
.markdown-body h4 .octicon-link,
.markdown-body h5 .octicon-link,
.markdown-body h6 .octicon-link {
display: none;
color: #000;
vertical-align: middle;
}
.markdown-body h1:hover .anchor,
.markdown-body h2:hover .anchor,
.markdown-body h3:hover .anchor,
.markdown-body h4:hover .anchor,
.markdown-body h5:hover .anchor,
.markdown-body h6:hover .anchor {
padding-left: 8px;
margin-left: -30px;
text-decoration: none;
}
.markdown-body h1:hover .anchor .octicon-link,
.markdown-body h2:hover .anchor .octicon-link,
.markdown-body h3:hover .anchor .octicon-link,
.markdown-body h4:hover .anchor .octicon-link,
.markdown-body h5:hover .anchor .octicon-link,
.markdown-body h6:hover .anchor .octicon-link {
display: inline-block;
}
.markdown-body h1 {
padding-bottom: 0.3em;
font-size: 2.25em;
line-height: 1.2;
border-bottom: 1px solid #eee;
}
.markdown-body h1 .anchor {
line-height: 1;
}
.markdown-body h2 {
padding-bottom: 0.3em;
font-size: 1.75em;
line-height: 1.225;
border-bottom: 1px solid #eee;
}
.markdown-body h2 .anchor {
line-height: 1;
}
.markdown-body h3 {
font-size: 1.5em;
line-height: 1.43;
}
.markdown-body h3 .anchor {
line-height: 1.2;
}
.markdown-body h4 {
font-size: 1.25em;
}
.markdown-body h4 .anchor {
line-height: 1.2;
}
.markdown-body h5 {
font-size: 1em;
}
.markdown-body h5 .anchor {
line-height: 1.1;
}
.markdown-body h6 {
font-size: 1em;
color: #777;
}
.markdown-body h6 .anchor {
line-height: 1.1;
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}
.markdown-body ul ul,
.markdown-body ul ol,
.markdown-body ol ol,
.markdown-body ol ul {
margin-top: 0;
margin-bottom: 0;
}
.markdown-body li>p {
margin-top: 16px;
}
.markdown-body dl {
padding: 0;
}
.markdown-body dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: bold;
}
.markdown-body dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
.markdown-body blockquote {
padding: 0 15px;
color: #777;
border-left: 4px solid #ddd;
}
.markdown-body blockquote> :first-child {
margin-top: 0;
}
.markdown-body blockquote> :last-child {
margin-bottom: 0;
}
.markdown-body table {
display: block;
width: 100%;
overflow: auto;
word-break: normal;
word-break: keep-all;
}
.markdown-body table th {
font-weight: bold;
text-align: revert;
}
.markdown-body table th,
.markdown-body table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
.markdown-body table tr {
background-color: #fff;
border-top: 1px solid #ccc;
}
.markdown-body table tr:nth-child(2n) {
background-color: #f8f8f8;
}
.markdown-body img {
max-width: 100%;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body code {
padding: 0;
padding-top: 0.2em;
padding-bottom: 0.2em;
margin: 0;
font-size: 85%;
background-color: rgba(0, 0, 0, 0.04);
border-radius: 3px;
}
.markdown-body code:has(.katex) {
background-color: transparent;
}
.markdown-body code:before,
.markdown-body code:after {
letter-spacing: -0.2em;
content: "\\00a0";
}
.markdown-body pre>code {
padding: 0;
margin: 0;
font-size: 100%;
word-break: normal;
white-space: pre;
background: transparent;
border: 0;
}
.markdown-body .highlight {
margin-bottom: 16px;
}
.markdown-body .highlight pre,
.markdown-body pre {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: #f7f7f7;
border-radius: 3px;
}
.markdown-body .highlight pre {
margin-bottom: 0;
word-break: normal;
}
.markdown-body pre {
word-wrap: normal;
}
.markdown-body pre code {
display: inline;
max-width: initial;
padding: 0;
margin: 0;
overflow: initial;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
.markdown-body pre code:before,
.markdown-body pre code:after {
content: normal;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .pl-c {
color: #969896;
}
.markdown-body .pl-c1,
.markdown-body .pl-mdh,
.markdown-body .pl-mm,
.markdown-body .pl-mp,
.markdown-body .pl-mr,
.markdown-body .pl-s1 .pl-v,
.markdown-body .pl-s3,
.markdown-body .pl-sc,
.markdown-body .pl-sv {
color: #0086b3;
}
.markdown-body .pl-e,
.markdown-body .pl-en {
color: #795da3;
}
.markdown-body .pl-s1 .pl-s2,
.markdown-body .pl-smi,
.markdown-body .pl-smp,
.markdown-body .pl-stj,
.markdown-body .pl-vo,
.markdown-body .pl-vpf {
color: #333;
}
.markdown-body .pl-ent {
color: #63a35c;
}
.markdown-body .pl-k,
.markdown-body .pl-s,
.markdown-body .pl-st {
color: #a71d5d;
}
.markdown-body .pl-pds,
.markdown-body .pl-s1,
.markdown-body .pl-s1 .pl-pse .pl-s2,
.markdown-body .pl-sr,
.markdown-body .pl-sr .pl-cce,
.markdown-body .pl-sr .pl-sra,
.markdown-body .pl-sr .pl-sre,
.markdown-body .pl-src {
color: #df5000;
}
.markdown-body .pl-mo,
.markdown-body .pl-v {
color: #1d3e81;
}
.markdown-body .pl-id {
color: #b52a1d;
}
.markdown-body .pl-ii {
background-color: #b52a1d;
color: #f8f8f8;
}
.markdown-body .pl-sr .pl-cce {
color: #63a35c;
font-weight: bold;
}
.markdown-body .pl-ml {
color: #693a17;
}
.markdown-body .pl-mh,
.markdown-body .pl-mh .pl-en,
.markdown-body .pl-ms {
color: #1d3e81;
font-weight: bold;
}
.markdown-body .pl-mq {
color: #008080;
}
.markdown-body .pl-mi {
color: #333;
font-style: italic;
}
.markdown-body .pl-mb {
color: #333;
font-weight: bold;
}
.markdown-body .pl-md,
.markdown-body .pl-mdhf {
background-color: #ffecec;
color: #bd2c00;
}
.markdown-body .pl-mdht,
.markdown-body .pl-mi1 {
background-color: #eaffea;
color: #55a532;
}
.markdown-body .pl-mdr {
color: #795da3;
font-weight: bold;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .task-list-item {
list-style-type: none;
}
.markdown-body .task-list-item+.task-list-item {
margin-top: 3px;
}
.markdown-body .task-list-item input {
float: left;
margin: 0.3em 0 0.25em -1.6em;
vertical-align: middle;
}
.markdown-body :checked+.radio-label {
z-index: 1;
position: relative;
border-color: #4183c4;
}
/*! Pretty printing styles. Used with prettify.js. */
/* SPAN elements with the classes below are added by prettyprint. */
.pln {
color: #000
}
/* plain text */
@media screen {
.str {
color: #080
}
/* string content */
.kwd {
color: #008
}
/* a keyword */
.com {
color: #800
}
/* a comment */
.typ {
color: #606
}
/* a type name */
.lit {
color: #066
}
/* a literal value */
/* punctuation, lisp open bracket, lisp close bracket */
.pun,
.opn,
.clo {
color: #660
}
.tag {
color: #008
}
/* a markup tag name */
.atn {
color: #606
}
/* a markup attribute name */
.atv {
color: #080
}
/* a markup attribute value */
.dec,
.var {
color: #606
}
/* a declaration; a variable name */
.fun {
color: red
}
/* a function name */
}
/* Use higher contrast and text-weight for printable form. */
@media print,
projection {
.str {
color: #060
}
.kwd {
color: #006;
font-weight: bold
}
.com {
color: #600;
font-style: italic
}
.typ {
color: #404;
font-weight: bold
}
.lit {
color: #044
}
.pun,
.opn,
.clo {
color: #440
}
.tag {
color: #006;
font-weight: bold
}
.atn {
color: #404
}
.atv {
color: #060
}
}
/* Put a border around prettyprinted code snippets. */
pre.prettyprint {
padding: 2px;
/* border: 1px solid #888 */
}
/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
margin-top: 0;
margin-bottom: 0
}
/* IE indents via margin-left */
li.L0,
li.L1,
li.L2,
li.L3,
li.L5,
li.L6,
li.L7,
li.L8 {
list-style-type: none
}
/* Alternate shading for lines */
li.L1,
li.L3,
li.L5,
li.L7,
li.L9 {
background: #eee
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}`;return(0,Tt.useEffect)(()=>{const sn=me.current.attachShadow({mode:"open"});Je.current=document.createElement("div"),Je.current.className="markdown-body",Je.current.innerHTML=We,sn.appendChild(Je.current);const ui=document.createElement("style");return ui.textContent=fn,sn.appendChild(ui),()=>{sn.innerHTML=""}},[]),(0,Tt.useEffect)(()=>{Je.current&&(Je.current.innerHTML=We)},[We]),Xe.createElement("div",{ref:me})};function et(We){const me=["onabort","onanimationend","onanimationiteration","onanimationstart","onauxclick","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncopy","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitionend","onvolumechange","onwaiting","onwheel"],Je=new RegExp(`\\b(${me.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return We.replace(Je,"").trim()}var nt=Object.defineProperty,gt=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,yt=(We,me,Je)=>me in We?nt(We,me,{enumerable:!0,configurable:!0,writable:!0,value:Je}):We[me]=Je,Lt=(We,me)=>{for(var Je in me||(me={}))lt.call(me,Je)&&yt(We,Je,me[Je]);if(gt)for(var Je of gt(me))ct.call(me,Je)&&yt(We,Je,me[Je]);return We};const Nt="@\u2581\u2581@",Vt="@\u2581@",Jt=/<pre[^>]*>/g;function Ae(We){let me=document.createElement("div");return me.innerHTML=We,me.childNodes.length===0?"":me.childNodes[0].nodeValue}const he=(We,me)=>{We=We||"";const Je=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,fn=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,sn=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,ui=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return me?We.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Je,(hi,Si,fr,qt,Ht,je,Nn)=>{const Kn=Si||qt||je,He=fr||Ht||Nn||"?";return ne.Z.API_SERVER+"/api/attachments/"+Kn+He+"&t="+(0,De.Jn)(Kn,Date.now())+(hi.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(We=We.replace(ui,(hi,Si,fr,qt,Ht,je,Nn)=>{const Kn=Si||qt||je,He=fr||Ht||Nn||"?";return ne.Z.API_SERVER+"/attachments/download/"+Kn+He+"&t="+(0,De.Jn)(Kn,Date.now())+(hi.indexOf(")")>-1?")":"&")}).replace(Je,(hi,Si,fr,qt,Ht,je,Nn)=>{const Kn=Si||qt||je,He=fr||Ht||Nn||"?";return ne.Z.API_SERVER+"/api/attachments/"+Kn+He+"&t="+(0,De.Jn)(Kn,Date.now())+(hi.indexOf(")")>-1?")":"&")}).replace(fn,(hi,Si,fr,qt,Ht)=>{const je=Si||qt,Nn=fr||Ht||"";return'"'+ne.Z.API_SERVER+"/api/attachments/"+je+Nn+je+Nn+"&t="+(0,De.Jn)(je,Date.now())}).replace(sn,(hi,Si,fr,qt,Ht)=>{const je=Si||qt,Nn=fr||Ht||"";return"("+ne.Z.API_SERVER+"/files/uploads/"+je+Nn+je+Nn+"&t="+(0,De.Jn)(je,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`),We)};var le=({value:We="",className:me,showTextOnly:Je,showLines:fn,style:sn={},stylesPrev:ui={},highlightKeywords:hi,showProgramFill:Si,isProgramFill:fr,disabledFill:qt=!1,programFillValue:Ht,onFillChange:je=He=>{},onFillBlur:Nn=()=>{},onFillFocus:Kn=()=>{}})=>{let He=et(String(We||""));const[mn,Cn]=(0,Tt.useState)(""),[Jn,bn]=(0,Tt.useState)("office"),[ve,Le]=(0,Tt.useState)([]),Sn=(0,Tt.useRef)("a"+(0,Qe.Z)()),xn={},Kt=Ln=>/<style[\s\S]*?>/i.test(Ln||""),Et=(Ln,Ci,gi)=>{const qi=document.createElement(Ln===Vt?"input":"textarea");qi.style.width="100%",qi.style.height=Ln===Vt?"40px":"151px",qi.rows=5,qi.spellcheck=!1,qi.name="edu-program-fill",qi.placeholder="\u8BF7\u8F93\u5165",qi.dataset.id=Ci;const fi=Object.keys(xn).length;return xn[fi]=qi,`<span class="edu-program-fill-wrap ${Ln===Vt?"":"show"}" style="width:${Ln===Vt?"600px":"100%"}" title=${gi||""}><span>${qi.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Ft(Ln){return Ln=Ln.replace(/!\[.*?\]\(.*?\)/g,""),Ln=Ln.replace(/\[.*?\]\(.*?\)/g,""),Ln=Ln.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Ln=Ln.replace(/<embed.*?>/g,""),Ln=Ln.replace(/<img.*?>/g,""),Ln=Ln.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Ln=Ln.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Ln=Ln.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Ln=Ln.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Ln}const Dt=Ln=>!Je&&Kt(He)?Ln:Ln.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Ci,gi){let qi=gi.replace(/(\n|\r)/g,"").split("}"),fi=[];return qi.map(Pr=>{Pr!=""&&fi.push(`.${Sn.current} ${Pr}`)}),`<style>${fi.join("}")}</style>`}),Wt=(0,Tt.useMemo)(()=>{try{const qi=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,fi=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Pr=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,kr=/\(\/attachments\/download\//g;He=He.replace(kr,"("+ne.Z.API_SERVER+"/attachments/download/").replace(qi,"("+ne.Z.API_SERVER+"/api/attachments/").replace(fi,'"'+ne.Z.API_SERVER+"/api/attachments/").replace(Pr,'"'+ne.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`)}catch(qi){}if(Si){let qi=-1;return He=He.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(fi,Pr,kr){var yr;return++qi,Et(fi,qi,(yr=Ht==null?void 0:Ht[qi])==null?void 0:yr.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${Dt(He||"")}</pre>`}let Ln=Dt(He);Ln=(0,Ne.ZP)(Ln);const Ci=(0,Ne.ez)();He.match(/\[TOC\]/)&&(Ln=Ln.replace("<p>[TOC]</p>",(0,Ne.Qv)()),(0,Ne.Iy)()),Ln=Ln.replace(/(__special_katext_id_\d+__)/g,(qi,fi)=>{const{type:Pr,expression:kr}=Ci[fi];return(0,fe.renderToString)(Ae(kr)||"",{displayMode:Pr==="block",throwOnError:!1,output:"html"})}),Ln=Ln.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Ne.AL)();const gi=document.createElement("div");if(gi.innerHTML=Ln,Je)return gi.innerText;if(hi){const qi=hi.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Ei(gi,qi),gi.innerHTML}return setTimeout(()=>Qi(),500),gi.innerHTML},[He,hi]);(0,Tt.useEffect)(()=>{Xn.current&&Xn.current.querySelectorAll(["input","textarea"]).forEach(Ci=>{Ci.oninput=kt,Ci.onblur=Ue,Ci.onfocus=Tn})},[ve]),(0,Tt.useEffect)(()=>{var Ln,Ci,gi,qi,fi;if(Ht!=null&&Ht.length)try{const Pr=Xn.current.querySelectorAll(".edu-program-fill-score"),kr=Xn.current.querySelectorAll('[name="edu-program-fill"]');for(const[yr,or]of kr.entries())or.value=((Ln=Ht==null?void 0:Ht[yr])==null?void 0:Ln.value)||"",((Ci=Ht==null?void 0:Ht[yr])==null?void 0:Ci.type)==="warning"?or.className="program-fill-warning":((gi=Ht==null?void 0:Ht[yr])==null?void 0:gi.type)==="success"?or.className="program-fill-success":or.className="";for(const[yr,or]of Pr.entries())or.innerHTML=(qi=Ht==null?void 0:Ht[yr])!=null&&qi.score?`${(fi=Ht==null?void 0:Ht[yr])==null?void 0:fi.score}\u5206`:"";Le(Ht)}catch(Pr){console.log(Pr,"error")}},[Ht]);const kt=Ln=>{ve[Ln.target.dataset.id]=ve[Ln.target.dataset.id]||{},ve[Ln.target.dataset.id].value=Ln.target.value,Le([...ve]),je(ve,Ln.target.dataset.id)},Ue=Ln=>{ve[Ln.target.dataset.id]=ve[Ln.target.dataset.id]||{},ve[Ln.target.dataset.id].value=Ln.target.value,Le([...ve]),Nn(ve,Ln.target.dataset.id)},Tn=Ln=>{ve[Ln.target.dataset.id]=ve[Ln.target.dataset.id]||{},ve[Ln.target.dataset.id].value=Ln.target.value,Le([...ve]),Kn(ve,Ln.target.dataset.id)};function Ei(Ln,Ci){return Ln.childNodes.forEach(gi=>{var qi;if(gi.childNodes.length>0)Ei(gi,Ci);else if(gi.nodeName!=="IMG")if(gi.innerHTML)gi.innerHTML=(qi=gi.innerHTML)==null?void 0:qi.replace(new RegExp(Ci,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const fi=document.createElement("span");fi.innerHTML=gi.textContent.replace(new RegExp(Ci,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),gi.replaceWith(fi)}})}const Xn=(0,Tt.useRef)();Ne.jb.WebkitLineClamp=fn,fn&&(sn=Lt(Lt({},sn),Ne.jb));function si(Ln){let Ci=Ln.target;if(Ci.tagName.toUpperCase()==="A"){let gi=Ci.getAttribute("href");if(gi.indexOf("office")>-1)Ln.preventDefault(),Cn(gi),bn("office");else if(gi.indexOf("application/pdf")>-1)Ln.preventDefault(),Cn(gi),bn("pdf");else if(gi.indexOf("text/html")>-1)Ln.preventDefault(),Cn(gi),bn("html");else if(gi.startsWith("#")){Ln.preventDefault();let qi=document.getElementById(gi.replace("#",""));qi&&qi.scrollIntoView(!0)}}}const Qi=()=>{var Ln;const Ci=(Ln=Xn.current)==null?void 0:Ln.querySelectorAll("video");Ci==null||Ci.forEach(gi=>{if(gi.oncontextmenu=()=>!1,gi.src.indexOf(".m3u8")>-1&&!gi.canPlayType("application/vnd.apple.mpegurl")){if(we().isSupported()){var qi=new(we());qi.loadSource(gi.src),qi.attachMedia(gi)}}})};return(0,Tt.useEffect)(()=>{if(Xn.current&&Wt&&Wt.match(Jt)&&window.PR.prettyPrint(),Xn.current)return Xn.current.addEventListener("click",si),()=>{var Ln;(Ln=Xn.current)==null||Ln.removeEventListener("click",si),(0,Ne.AL)(),(0,Ne.Iy)()}},[Wt,Xn.current,si]),(0,Tt.useEffect)(()=>{var Ln;const Ci=gi=>{gi.preventDefault(),gi.clipboardData.setData("text",window.getSelection().toString())};return(Ln=Xn.current)==null||Ln.addEventListener("copy",Ci),()=>{var gi;(gi=Xn.current)==null||gi.removeEventListener("copy",Ci)}},[Xn.current]),Tt.createElement(Tt.Fragment,null,Je&&Tt.createElement("div",{ref:Xn},Wt),!Je&&!Kt(Wt)&&Tt.createElement("div",{ref:Xn,style:Lt({},sn),className:`${me||""} ${qt?"disabled-fill":""} markdown-body ${Sn.current}`,dangerouslySetInnerHTML:{__html:Wt}}),!Je&&Kt(Wt)&&Tt.createElement(Ut,{html:Wt}),Tt.createElement(gn.Z,{close:!0,data:mn,type:mn!=null&&mn.length?Jn:"",style:Lt({},ui),onClose:()=>Cn("")}))}},57444:function(yn,qn,ee){"use strict";ee.d(qn,{h:function(){return Lt}});var Tt=ee(67294),Be=ee(88044),Ne=ee(91773),ln=ee(85804),be=ee(4631),we=ee.n(be),ne=ee(71749),De=ee(30483),fe=Object.defineProperty,Qe=Object.defineProperties,gn=Object.getOwnPropertyDescriptors,Xe=Object.getOwnPropertySymbols,kn=Object.prototype.hasOwnProperty,Ut=Object.prototype.propertyIsEnumerable,et=(Nt,Vt,Jt)=>Vt in Nt?fe(Nt,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Nt[Vt]=Jt,nt=(Nt,Vt)=>{for(var Jt in Vt||(Vt={}))kn.call(Vt,Jt)&&et(Nt,Jt,Vt[Jt]);if(Xe)for(var Jt of Xe(Vt))Ut.call(Vt,Jt)&&et(Nt,Jt,Vt[Jt]);return Nt},gt=(Nt,Vt)=>Qe(Nt,gn(Vt));const lt=Be.default.Option,ct={labelCol:{span:4},wrapperCol:{span:20}},yt={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};qn.Z=({callback:Nt,onCancel:Vt})=>{const[Jt,Ae]=(0,Tt.useState)("python");function he(We){Ae(yt[We][1])}function le(We){Nt(We)}return Tt.createElement(Ne.default,gt(nt({},ct),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:le,style:{width:500}}),Tt.createElement(Ne.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},Tt.createElement(Be.default,{getPopupContainer:We=>We.parentNode,onChange:he},Object.keys(yt).map(We=>Tt.createElement(lt,{key:We,value:We},yt[We][0])))),Tt.createElement(Ne.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},Tt.createElement(Lt,{mode:Jt})),Tt.createElement("div",{className:"flex-container flex-end"},Tt.createElement(ln.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Tt.createElement(ln.ZP,{type:"ghost",onClick:Vt},"\u53D6\u6D88")))};function Lt({value:Nt,onChange:Vt,mode:Jt,options:Ae={}}){const he=(0,Tt.useRef)(),[le,We]=(0,Tt.useState)();return(0,Tt.useEffect)(()=>{if(le){let me=function(Je){const fn=Je.getValue();Vt&&Vt(fn)};return le.on("change",me),()=>{le.off("change",me)}}},[le,Vt]),(0,Tt.useEffect)(()=>{le&&le.setOption("mode",Jt)},[le,Jt]),(0,Tt.useEffect)(()=>{le&&(Nt!==le.getValue()||Nt==="")&&setTimeout(()=>{le.setValue(Nt||"")},300)},[le,Nt]),(0,Tt.useEffect)(()=>{if(he.current&&!le){const me=we().fromTextArea(he.current,nt({mode:Jt,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Ae));We(me)}},[he.current,le]),Tt.createElement("div",{className:"my-codemirror-container"},Tt.createElement("textarea",{ref:he}))}},35567:function(yn,qn,ee){"use strict";ee.d(qn,{Z:function(){return di}});var Tt=ee(67294),Be=ee(4631),Ne=ee.n(Be),ln=ee(91033),be=ee(71749),we=ee(57341),ne=ee(82801),De=ee(88386),fe=ee(49047),Qe=ee(80785),gn=ee(65226),Xe=({value:ke="",className:Ee,showTextOnly:ue,showLines:Ie,style:On={}})=>{const zn=(0,Tt.useMemo)(()=>"",[ke]);return Tt.createElement(Tt.Fragment,null,Tt.createElement("div",{dangerouslySetInnerHTML:{__html:zn}}))},kn=Object.defineProperty,Ut=Object.defineProperties,et=Object.getOwnPropertyDescriptors,nt=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable,ct=(ke,Ee,ue)=>Ee in ke?kn(ke,Ee,{enumerable:!0,configurable:!0,writable:!0,value:ue}):ke[Ee]=ue,yt=(ke,Ee)=>{for(var ue in Ee||(Ee={}))gt.call(Ee,ue)&&ct(ke,ue,Ee[ue]);if(nt)for(var ue of nt(Ee))lt.call(Ee,ue)&&ct(ke,ue,Ee[ue]);return ke},Lt=(ke,Ee)=>Ut(ke,et(Ee));let Nt=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u516C\u5F0F",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"md-iconfont icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function Vt({onActionCallback:ke,title:Ee,icon:ue,actionName:Ie,className:On="",children:zn}){function Zn(){ke(Ie)}return Tt.createElement("a",{title:Ee,className:On,onClick:Zn},Tt.createElement("i",{className:`${ue}`}),zn)}var Jt=({watch:ke,showNullButton:Ee,showNullProgramButton:ue,onActionCallback:Ie,fullScreen:On,insertTemp:zn,hidetoolBar:Zn,extraUse:Fe})=>{const Se=[...Nt,{title:`${ke?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${ke?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return Tt.createElement("ul",{className:"markdown-toolbar-container"},!Zn&&Se.map((Pn,ti)=>Tt.createElement("li",{key:ti},Pn.actionName?Tt.createElement(Vt,Lt(yt({},Pn),{onActionCallback:Ie})):Tt.createElement("span",{className:"v-line"}))),Ee?Tt.createElement("li",null,Tt.createElement(Vt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ie},Tt.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,ue?Tt.createElement(Tt.Fragment,null,Tt.createElement("li",null,Tt.createElement(Vt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Ie},Tt.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),Tt.createElement("li",null,Tt.createElement(Vt,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Ie},Tt.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,zn&&Tt.createElement("li",null,Tt.createElement(Vt,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${zn}`,onActionCallback:Ie},Tt.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Fe&&Tt.createElement("li",null,Fe),Tt.createElement("li",{className:"btn-full-screen"},Tt.createElement(Vt,{icon:`${On?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:On?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ie})))},Ae=ee(76621),he=ee(91773),le=ee(28802),We=ee(85804),me=Object.defineProperty,Je=Object.defineProperties,fn=Object.getOwnPropertyDescriptors,sn=Object.getOwnPropertySymbols,ui=Object.prototype.hasOwnProperty,hi=Object.prototype.propertyIsEnumerable,Si=(ke,Ee,ue)=>Ee in ke?me(ke,Ee,{enumerable:!0,configurable:!0,writable:!0,value:ue}):ke[Ee]=ue,fr=(ke,Ee)=>{for(var ue in Ee||(Ee={}))ui.call(Ee,ue)&&Si(ke,ue,Ee[ue]);if(sn)for(var ue of sn(Ee))hi.call(Ee,ue)&&Si(ke,ue,Ee[ue]);return ke},qt=(ke,Ee)=>Je(ke,fn(Ee));const Ht={labelCol:{span:4},wrapperCol:{span:20}};var je=({callback:ke,onCancel:Ee})=>{function ue(Ie){ke(Ie)}return Tt.createElement(he.default,qt(fr({},Ht),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:ue,style:{width:500}}),Tt.createElement(he.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},Tt.createElement(le.default,null)),Tt.createElement(he.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},Tt.createElement(le.default,null)),Tt.createElement("div",{className:"flex-container flex-end"},Tt.createElement(We.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Tt.createElement(We.ZP,{type:"ghost",onClick:Ee},"\u53D6\u6D88")))},Nn=ee(57444),Kn=ee(70859),He=ee(62844),mn=ee(71230),Cn=ee(63205),Jn=ee(67294),bn=({callback:ke,onCancel:Ee})=>{const ue=document.createElement("canvas"),Ie=ue.getContext("2d");ue.width=1e3,ue.height=800,Ie.fillStyle="#ffffff",Ie.fillRect(0,0,ue.width,ue.height);const On=ue.toDataURL("image/png");return Jn.createElement(He.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Jn.createElement(mn.Z,{style:{height:"100vh"}},Jn.createElement(Cn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:On,visible:!0,title:String(Date.now())},onOk:zn=>{ke({src:zn.url})},onClose:Ee})))},ve=ee(23495);function Le(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(Le,go.CommandHandler),Le.prototype.canAlignSelection=function(){var ke=this.diagram;return!(ke===null||ke.isReadOnly||ke.isModelReadOnly||ke.selection.count<2)},Le.prototype.alignLeft=function(){var ke=this.diagram;ke.startTransaction("aligning left");var Ee=1/0;ke.selection.each(function(ue){ue instanceof go.Link||(Ee=Math.min(ue.position.x,Ee))}),ke.selection.each(function(ue){ue instanceof go.Link||ue.move(new go.Point(Ee,ue.position.y))}),ke.commitTransaction("aligning left")},Le.prototype.alignRight=function(){var ke=this.diagram;ke.startTransaction("aligning right");var Ee=-1/0;ke.selection.each(function(ue){if(!(ue instanceof go.Link)){var Ie=ue.actualBounds.x+ue.actualBounds.width;Ee=Math.max(Ie,Ee)}}),ke.selection.each(function(ue){ue instanceof go.Link||ue.move(new go.Point(Ee-ue.actualBounds.width,ue.position.y))}),ke.commitTransaction("aligning right")},Le.prototype.alignTop=function(){var ke=this.diagram;ke.startTransaction("alignTop");var Ee=1/0;ke.selection.each(function(ue){ue instanceof go.Link||(Ee=Math.min(ue.position.y,Ee))}),ke.selection.each(function(ue){ue instanceof go.Link||ue.move(new go.Point(ue.position.x,Ee))}),ke.commitTransaction("alignTop")},Le.prototype.alignBottom=function(){var ke=this.diagram;ke.startTransaction("aligning bottom");var Ee=-1/0;ke.selection.each(function(ue){if(!(ue instanceof go.Link)){var Ie=ue.actualBounds.y+ue.actualBounds.height;Ee=Math.max(Ie,Ee)}}),ke.selection.each(function(ue){ue instanceof go.Link||ue.move(new go.Point(ue.actualBounds.x,Ee-ue.actualBounds.height))}),ke.commitTransaction("aligning bottom")},Le.prototype.alignCenterX=function(){var ke=this.diagram,Ee=ke.selection.first();if(Ee){ke.startTransaction("aligning Center X");var ue=Ee.actualBounds.x+Ee.actualBounds.width/2;ke.selection.each(function(Ie){Ie instanceof go.Link||Ie.move(new go.Point(ue-Ie.actualBounds.width/2,Ie.actualBounds.y))}),ke.commitTransaction("aligning Center X")}},Le.prototype.alignCenterY=function(){var ke=this.diagram,Ee=ke.selection.first();if(Ee){ke.startTransaction("aligning Center Y");var ue=Ee.actualBounds.y+Ee.actualBounds.height/2;ke.selection.each(function(Ie){Ie instanceof go.Link||Ie.move(new go.Point(Ie.actualBounds.x,ue-Ie.actualBounds.height/2))}),ke.commitTransaction("aligning Center Y")}},Le.prototype.alignColumn=function(ke){var Ee=this.diagram;Ee.startTransaction("align Column"),ke===void 0&&(ke=0),ke=parseFloat(ke);var ue=new Array;Ee.selection.each(function(Fe){Fe instanceof go.Link||ue.push(Fe)});for(var Ie=0;Ie<ue.length-1;Ie++){var On=ue[Ie],zn=On.actualBounds.y+On.actualBounds.height+ke,Zn=ue[Ie+1];Zn.move(new go.Point(On.actualBounds.x,zn))}Ee.commitTransaction("align Column")},Le.prototype.alignRow=function(ke){ke===void 0&&(ke=0),ke=parseFloat(ke);var Ee=this.diagram;Ee.startTransaction("align Row");var ue=new Array;Ee.selection.each(function(Fe){Fe instanceof go.Link||ue.push(Fe)});for(var Ie=0;Ie<ue.length-1;Ie++){var On=ue[Ie],zn=On.actualBounds.x+On.actualBounds.width+ke,Zn=ue[Ie+1];Zn.move(new go.Point(zn,On.actualBounds.y))}Ee.commitTransaction("align Row")},Le.prototype.canRotate=function(ke){var Ee=this.diagram;return!(Ee===null||Ee.isReadOnly||Ee.isModelReadOnly||Ee.selection.count<1)},Le.prototype.rotate=function(ke){ke===void 0&&(ke=90);var Ee=this.diagram;Ee.startTransaction("rotate "+ke.toString());var Ee=this.diagram;Ee.selection.each(function(ue){ue instanceof go.Link||ue instanceof go.Group||(ue.angle+=ke)}),Ee.commitTransaction("rotate "+ke.toString())},Le.prototype.pullToFront=function(){var ke=this.diagram;ke.startTransaction("pullToFront");var Ee=new go.Map;ke.selection.each(function(ue){Ee.set(ue.layer,0)}),Ee.iteratorKeys.each(function(ue){var Ie=0;ue.parts.each(function(On){if(!On.isSelected){var zn=On.zOrder;isNaN(zn)?On.zOrder=0:Ie=Math.max(Ie,zn)}}),Ee.set(ue,Ie)}),ke.selection.each(function(ue){Le._assignZOrder(ue,Ee.get(ue.layer)+1)}),ke.commitTransaction("pullToFront")},Le.prototype.pushToBack=function(){var ke=this.diagram;ke.startTransaction("pushToBack");var Ee=new go.Map;ke.selection.each(function(ue){Ee.set(ue.layer,0)}),Ee.iteratorKeys.each(function(ue){var Ie=0;ue.parts.each(function(On){if(!On.isSelected){var zn=On.zOrder;isNaN(zn)?On.zOrder=0:Ie=Math.min(Ie,zn)}}),Ee.set(ue,Ie)}),ke.selection.each(function(ue){Le._assignZOrder(ue,Ee.get(ue.layer)-1-Le._findGroupDepth(ue))}),ke.commitTransaction("pushToBack")},Le._assignZOrder=function(ke,Ee,ue){ue===void 0&&(ue=ke),ke.layer===ue.layer&&(ke.zOrder=Ee),ke instanceof go.Group&&ke.memberParts.each(function(Ie){Le._assignZOrder(Ie,Ee+1,ue)})},Le._findGroupDepth=function(ke){if(ke instanceof go.Group){var Ee=0;return ke.memberParts.each(function(ue){Ee=Math.max(Ee,Le._findGroupDepth(ue))}),Ee+1}else return 0},Le.prototype.doKeyDown=function(){var ke=this.diagram;if(ke!==null){var Ee=ke.lastInput;if(Ee.key==="Up"||Ee.key==="Down"||Ee.key==="Left"||Ee.key==="Right"){var ue=this.arrowKeyBehavior;if(ue==="none")return;if(ue==="select"){this._arrowKeySelect();return}else if(ue==="move"){this._arrowKeyMove();return}else if(ue==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},Le.prototype._getAllParts=function(){var ke=new Array;return this.diagram.nodes.each(function(Ee){ke.push(Ee)}),this.diagram.parts.each(function(Ee){ke.push(Ee)}),ke},Le.prototype._arrowKeyMove=function(){var ke=this.diagram,Ee=ke.lastInput,ue=0,Ie=0;if(Ee.control||Ee.meta)ue=1,Ie=1;else if(ke.grid!==null){var On=ke.grid.gridCellSize;Ie=On.width,ue=On.height}ke.startTransaction("arrowKeyMove"),ke.selection.each(function(zn){Ee.key==="Up"?zn.move(new go.Point(zn.actualBounds.x,zn.actualBounds.y-ue)):Ee.key==="Down"?zn.move(new go.Point(zn.actualBounds.x,zn.actualBounds.y+ue)):Ee.key==="Left"?zn.move(new go.Point(zn.actualBounds.x-Ie,zn.actualBounds.y)):Ee.key==="Right"&&zn.move(new go.Point(zn.actualBounds.x+Ie,zn.actualBounds.y))}),ke.commitTransaction("arrowKeyMove")},Le.prototype._arrowKeySelect=function(){var ke=this.diagram,Ee=ke.lastInput,ue=null;Ee.key==="Up"?ue=this._findNearestPartTowards(270):Ee.key==="Down"?ue=this._findNearestPartTowards(90):Ee.key==="Left"?ue=this._findNearestPartTowards(180):Ee.key==="Right"&&(ue=this._findNearestPartTowards(0)),ue!==null&&(Ee.shift?ue.isSelected=!0:Ee.control||Ee.meta?ue.isSelected=!ue.isSelected:ke.select(ue))},Le.prototype._findNearestPartTowards=function(ke){var Ee=this.diagram.selection.first();if(Ee===null)return null;for(var ue=Ee.actualBounds.center,Ie=this._getAllParts(),On=1/0,zn=Ee,Zn=0;Zn<Ie.length;Zn++){var Fe=Ie[Zn];if(Fe!==Ee&&Fe.canSelect()){var Se=Fe.actualBounds.center,Pn=ue.directionPoint(Se),ti=this._angleCloseness(Pn,ke);if(ti<=45){var nn=ue.distanceSquaredPoint(Se);nn*=1+Math.sin(ti*Math.PI/180),nn<On&&(On=nn,zn=Fe)}}}return zn},Le.prototype._angleCloseness=function(ke,Ee){return Math.min(Math.abs(Ee-ke),Math.min(Math.abs(Ee+360-ke),Math.abs(Ee-360-ke)))},Le.prototype._arrowKeyTree=function(){var ke=this.diagram,Ee=ke.selection.first();if(Ee instanceof go.Node){var ue=ke.lastInput;if(ue.key==="Right"){if(!Ee.isTreeLeaf)if(!Ee.isTreeExpanded)ke.commandHandler.canExpandTree(Ee)&&ke.commandHandler.expandTree(Ee);else{var Ie=this._sortTreeChildrenByY(Ee).first();Ie!==null&&ke.select(Ie)}}else if(ue.key==="Left")if(!Ee.isTreeLeaf&&Ee.isTreeExpanded)ke.commandHandler.canCollapseTree(Ee)&&ke.commandHandler.collapseTree(Ee);else{var On=Ee.findTreeParentNode();On!==null&&ke.select(On)}else if(ue.key==="Up"){var On=Ee.findTreeParentNode();if(On!==null){var zn=this._sortTreeChildrenByY(On),Zn=zn.indexOf(Ee);if(Zn>0){for(var Fe=zn.elt(Zn-1);Fe!==null&&Fe.isTreeExpanded&&!Fe.isTreeLeaf;){var Se=this._sortTreeChildrenByY(Fe);Fe=Se.last()}Fe!==null&&ke.select(Fe)}else ke.select(On)}}else if(ue.key==="Down")if(Ee.isTreeExpanded&&!Ee.isTreeLeaf){var Ie=this._sortTreeChildrenByY(Ee).first();Ie!==null&&ke.select(Ie)}else for(;Ee!==null;){var On=Ee.findTreeParentNode();if(On===null)break;var zn=this._sortTreeChildrenByY(On),Zn=zn.indexOf(Ee);if(Zn<zn.length-1){ke.select(zn.elt(Zn+1));break}else Ee=On}var Pn=ke.selection.first();Pn!==null&&ke.scrollToRect(Pn.actualBounds)}},Le.prototype._sortTreeChildrenByY=function(ke){var Ee=new go.List().addAll(ke.findTreeChildrenNodes());return Ee.sort(function(ue,Ie){var On=ue.location,zn=Ie.location;return On.y<zn.y?-1:On.y>zn.y?1:On.x<zn.x?-1:On.x>zn.x?1:0}),Ee},Le.prototype.copyToClipboard=function(ke){go.CommandHandler.prototype.copyToClipboard.call(this,ke),this._lastPasteOffset.set(this.pasteOffset)},Le.prototype.pasteFromClipboard=function(){var ke=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(ke,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),ke},Object.defineProperty(Le.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(ke){if(ke!=="move"&&ke!=="select"&&ke!=="scroll"&&ke!=="tree"&&ke!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+ke);this._arrowKeyBehavior=ke}}),Object.defineProperty(Le.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(ke){if(!(ke instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+ke);this._pasteOffset.set(ke)}});var Sn=Le,xn=ee(18023),Kt=ee(15746),Et=ee(33170),Ft={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},Dt=ee(52262),Wt=ee(67294),kt=(ke,Ee,ue)=>new Promise((Ie,On)=>{var zn=Se=>{try{Fe(ue.next(Se))}catch(Pn){On(Pn)}},Zn=Se=>{try{Fe(ue.throw(Se))}catch(Pn){On(Pn)}},Fe=Se=>Se.done?Ie(Se.value):Promise.resolve(Se.value).then(zn,Zn);Fe((ue=ue.apply(ke,Ee)).next())});function Ue({onCancel:ke,callback:Ee}){let ue=(0,Tt.useRef)(),Ie=(0,Tt.useRef)(),On=(0,Tt.useRef)(),zn=(0,Tt.useRef)(!1);const Zn=(0,Tt.useRef)(!1),[Fe,Se]=(0,Tt.useState)(0);function Pn(){const nn=ve.bx.make,pe={red:"#ff3333",blue:"#3358ff",green:"#25ad23",magenta:"#d533ff",purple:"#7d33ff",orange:"#ff6233",brown:"#8e571e",white:"#ffffff",black:"#000000",beige:"#fffcd5",extralightblue:"#d5ebff",extralightred:"#f2dfe0",lightblue:"#a5d2fa",lightgray:"#cccccc",lightgreen:"#b3e6b3",lightred:"#fcbbbd"};ue.current=new ve.S0(Ie.current,{padding:20,grid:nn(ve.s_,"Grid",nn(ve.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),nn(ve.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:ce=>{var $n=ce.diagram.commandHandler.addTopLevelParts(ce.diagram.selection,!0);$n||ce.diagram.currentTool.doCancel()},commandHandler:nn(Sn),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:ce=>{var $n=ce.subject;$n.location=$n.location.copy().snapToGridPoint(ce.diagram.grid.gridOrigin,ce.diagram.grid.gridCellSize),setTimeout(()=>{ce.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:ce=>{var $n=ce.subject;setTimeout(()=>{ce.diagram.commandHandler.editTextBlock()})},LinkRelinked:ce=>{var $n=ce.parameter.part;$n.invalidateConnectedLinks();var mi=ce.subject;ce.diagram.toolManager.linkingTool.isForwards?mi.toNode.invalidateConnectedLinks():mi.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),ue.current.nodeTemplate=nn(ve.NB,"Auto",{locationSpot:ve.z6.Center,locationObjectName:"SHAPE",desiredSize:new ve.$u(120,60),minSize:new ve.$u(40,40),resizable:!0,resizeCellSize:new ve.$u(10,10),rotatable:!0},new ve.KX("location","loc",ve.E9.parse).makeTwoWay(ve.E9.stringify),new ve.KX("desiredSize","size",ve.$u.parse).makeTwoWay(ve.$u.stringify),nn(ve.bn,{name:"SHAPE",fill:pe.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:ve.z6.AllSides,toSpot:ve.z6.AllSides},new ve.KX("figure"),new ve.KX("fill"),new ve.KX("stroke","borderColor"),new ve.KX("strokeWidth","thickness"),new ve.KX("strokeDashArray","dash")),nn(ve.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),nn(ve.al,{margin:1,textAlign:"center",overflow:ve.al.OverflowEllipsis,editable:!0},new ve.KX("text").makeTwoWay(),new ve.KX("stroke","color"))),ue.current.nodeTemplate.toolTip=nn("ToolTip",nn(ve.s_,"Vertical",{maxSize:new ve.$u(200,NaN)},nn(ve.al,{font:"bold 10pt sans-serif",textAlign:"center"},new ve.KX("text")),nn(ve.al,{font:"10pt sans-serif",textAlign:"center"},new ve.KX("text","details"))));function Un(ce,$n){var mi=(Yn,hr)=>{Yn.handled=!0,Yn.diagram.model.commit(Mi=>{var xi=hr.part.adornedPart,ci=new ve.E9().setRectSpot(xi.actualBounds,ce);ci.subtract(xi.location),ci.scale(2,2),ci.x+=Math.sign(ci.x)*130,ci.y+=Math.sign(ci.y)*130,ci.add(xi.location),ci.snapToGridPoint(Yn.diagram.grid.gridOrigin,Yn.diagram.grid.gridCellSize);var Ni=Mi.copyNodeData(xi.data);Mi.setGroupKeyForNodeData(Ni,Mi.getGroupKeyForNodeData(xi.data)),Mi.addNodeData(Ni);var Vi={from:xi.key,to:Mi.getKeyForNodeData(Ni)};Mi.addLinkData(Vi);var Ke=Yn.diagram.findNodeForData(Ni);Ke.location=ci,Yn.diagram.select(Ke),setTimeout(()=>{Yn.diagram.commandHandler.editTextBlock()},20)})};return nn(ve.bn,{figure:$n,alignment:ce,alignmentFocus:ce.opposite(),width:ce.equals(ve.z6.Top)||ce.equals(ve.z6.Bottom)?25:18,height:ce.equals(ve.z6.Top)||ce.equals(ve.z6.Bottom)?18:25,fill:"orange",stroke:pe.white,strokeWidth:4,mouseEnter:(Yn,hr)=>hr.fill="dodgerblue",mouseLeave:(Yn,hr)=>hr.fill="orange",isActionable:!0,click:mi,contextClick:mi})}function pi(ce){return nn(ve.bn,{fill:"orange",stroke:"rgba(0, 0, 0, 0)",strokeWidth:15,background:"transparent",geometryString:"F1 M0 0 b 0 360 -4 0 4 z M10 0 b 0 360 -4 0 4 z M20 0 b 0 360 -4 0 4",isActionable:!0,cursor:"context-menu",mouseEnter:($n,mi)=>mi.fill="dodgerblue",mouseLeave:($n,mi)=>mi.fill="orange",click:($n,mi)=>{$n.diagram.commandHandler.showContextMenu(mi.part.adornedPart)}},ce||{})}ue.current.nodeTemplate.selectionAdornmentTemplate=nn(ve.uz,"Spot",nn(ve.Vm,{padding:10}),Un(ve.z6.Top,"TriangleUp"),Un(ve.z6.Left,"TriangleLeft"),Un(ve.z6.Right,"TriangleRight"),Un(ve.z6.Bottom,"TriangleDown"),pi({alignment:new ve.z6(.75,0)}));function Oi(ce,$n){return(mi,Yn)=>{mi.handled=!0,mi.diagram.model.commit(hr=>{hr.set(Yn.part.adornedPart.data,ce,$n)})}}function on(ce,$n){return $n||($n="color"),nn(ve.bn,{width:16,height:16,stroke:"lightgray",fill:ce,margin:1,background:"transparent",mouseEnter:(mi,Yn)=>Yn.stroke="dodgerblue",mouseLeave:(mi,Yn)=>Yn.stroke="lightgray",click:Oi($n,ce),contextClick:Oi($n,ce)})}function ni(){return[nn("ContextMenuButton",nn(ve.s_,"Horizontal",on(pe.white,"fill"),on(pe.beige,"fill"),on(pe.extralightblue,"fill"),on(pe.extralightred,"fill"))),nn("ContextMenuButton",nn(ve.s_,"Horizontal",on(pe.lightgray,"fill"),on(pe.lightgreen,"fill"),on(pe.lightblue,"fill"),on(pe.lightred,"fill")))]}function ie(){return[nn("ContextMenuButton",nn(ve.s_,"Horizontal",on(pe.black),on(pe.green),on(pe.blue),on(pe.red))),nn("ContextMenuButton",nn(ve.s_,"Horizontal",on(pe.white),on(pe.magenta),on(pe.purple),on(pe.orange)))]}function se(ce,$n){return $n||($n="thickness"),nn(ve.bn,"LineH",{width:16,height:16,strokeWidth:ce,margin:1,background:"transparent",mouseEnter:(mi,Yn)=>Yn.background="dodgerblue",mouseLeave:(mi,Yn)=>Yn.background="transparent",click:Oi($n,ce),contextClick:Oi($n,ce)})}function ye(ce,$n){return $n||($n="dash"),nn(ve.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:ce,margin:1,background:"transparent",mouseEnter:(mi,Yn)=>Yn.background="dodgerblue",mouseLeave:(mi,Yn)=>Yn.background="transparent",click:Oi($n,ce),contextClick:Oi($n,ce)})}function Ce(){return[nn("ContextMenuButton",nn(ve.s_,"Horizontal",se(1),se(2),se(3),se(4))),nn("ContextMenuButton",nn(ve.s_,"Horizontal",ye(null),ye([2,4]),ye([4,4])))]}function Oe(ce,$n){return $n||($n="figure"),nn(ve.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:ce,margin:1,background:"transparent",mouseEnter:(mi,Yn)=>Yn.fill="dodgerblue",mouseLeave:(mi,Yn)=>Yn.fill="lightgray",click:Oi($n,ce),contextClick:Oi($n,ce)})}ue.current.nodeTemplate.contextMenu=nn("ContextMenu",nn("ContextMenuButton",nn(ve.s_,"Horizontal",Oe("Rectangle"),Oe("RoundedRectangle"),Oe("Ellipse"),Oe("Diamond"))),nn("ContextMenuButton",nn(ve.s_,"Horizontal",Oe("Parallelogram2"),Oe("ManualOperation"),Oe("Procedure"),Oe("Cylinder1"))),nn("ContextMenuButton",nn(ve.s_,"Horizontal",Oe("Terminator"),Oe("CreateRequest"),Oe("Document"),Oe("TriangleDown"))),ni(),ie(),Ce()),ue.current.groupTemplate=nn(ve.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:ve.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(ce,$n)=>{var mi=$n.addMembers($n.diagram.selection,!0);mi||$n.diagram.currentTool.doCancel()},avoidable:!1},new ve.KX("location","loc",ve.E9.parse).makeTwoWay(ve.E9.stringify),nn(ve.s_,"Auto",{name:"BODY"},nn(ve.bn,{parameter1:10,fill:pe.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:ve.z6.AllSides,toSpot:ve.z6.AllSides},new ve.KX("fill"),new ve.KX("stroke","color"),new ve.KX("strokeWidth","thickness"),new ve.KX("strokeDashArray","dash")),nn(ve.Vm,{background:"transparent",margin:20})),nn(ve.al,{alignment:ve.z6.Top,alignmentFocus:ve.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new ve.KX("text"),new ve.KX("stroke","color"))),ue.current.groupTemplate.selectionAdornmentTemplate=nn(ve.uz,"Spot",nn(ve.s_,"Auto",nn(ve.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),nn(ve.Vm,{margin:1.5})),pi({alignment:ve.z6.TopRight,alignmentFocus:ve.z6.BottomRight})),ue.current.groupTemplate.contextMenu=nn("ContextMenu",ni(),ie(),Ce()),ue.current.linkTemplate=nn(ve.rU,{layerName:"Foreground",routing:ve.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new ve.KX("fromSpot","fromSpot",ve.z6.parse),new ve.KX("toSpot","toSpot",ve.z6.parse),new ve.KX("fromShortLength","dir",ce=>ce>=1?10:0),new ve.KX("toShortLength","dir",ce=>ce>=1?10:0),new ve.KX("points").makeTwoWay(),nn(ve.bn,{strokeWidth:2},new ve.KX("stroke","color"),new ve.KX("strokeWidth","thickness"),new ve.KX("strokeDashArray","dash")),nn(ve.bn,{segmentIndex:0,segmentOffset:new ve.E9(15,0),segmentOrientation:ve.rU.OrientAlong,alignmentFocus:ve.z6.Right,figure:"circle",width:10,strokeWidth:0},new ve.KX("fill","color"),new ve.KX("visible","dir",ce=>ce===1)),nn(ve.bn,{segmentIndex:-1,segmentOffset:new ve.E9(-10,6),segmentOrientation:ve.rU.OrientPlus90,alignmentFocus:ve.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new ve.KX("fill","color"),new ve.KX("visible","dir",ce=>ce>=1),new ve.KX("width","thickness",ce=>7+3*ce),new ve.KX("height","thickness",ce=>7+3*ce),new ve.KX("segmentOffset","thickness",ce=>new ve.E9(-15,4+1.5*ce))),nn(ve.bn,{segmentIndex:0,segmentOffset:new ve.E9(15,-6),segmentOrientation:ve.rU.OrientMinus90,alignmentFocus:ve.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new ve.KX("fill","color"),new ve.KX("visible","dir",ce=>ce===2),new ve.KX("width","thickness",ce=>7+3*ce),new ve.KX("height","thickness",ce=>7+3*ce),new ve.KX("segmentOffset","thickness",ce=>new ve.E9(-15,4+1.5*ce))),nn(ve.al,{alignmentFocus:new ve.z6(0,1,-4,0),editable:!0},new ve.KX("text").makeTwoWay(),new ve.KX("stroke","color"))),ue.current.linkTemplate.selectionAdornmentTemplate=nn(ve.uz,nn(ve.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Ze(2)},new ve.KX("pathPattern","thickness",Ze)),pi({alignmentFocus:new ve.z6(0,0,-6,-4)}));function Ze(ce){return nn(ve.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(ce+4).toString()+" H3"})}function En(ce){var $n="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return ce===0?$n="M0 0 M16 16 M0 8 L16 8":ce===2&&($n="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),nn(ve.bn,{geometryString:$n,margin:2,background:"transparent",mouseEnter:(mi,Yn)=>Yn.background="dodgerblue",mouseLeave:(mi,Yn)=>Yn.background="transparent",click:Oi("dir",ce),contextClick:Oi("dir",ce)})}function Wn(ce){var $n=(mi,Yn)=>{mi.handled=!0,mi.diagram.model.commit(hr=>{var Mi=Yn.part.adornedPart;hr.set(Mi.data,ce?"toSpot":"fromSpot",ve.z6.stringify(ve.z6.AllSides)),(ce?Mi.toNode:Mi.fromNode).invalidateConnectedLinks()})};return nn(ve.bn,{width:12,height:12,fill:"transparent",mouseEnter:(mi,Yn)=>Yn.background="dodgerblue",mouseLeave:(mi,Yn)=>Yn.background="transparent",click:$n,contextClick:$n})}function Te(ce,$n){var mi=0,Yn=ve.z6.RightSide;ce.equals(ve.z6.Top)?(mi=270,Yn=ve.z6.TopSide):ce.equals(ve.z6.Left)?(mi=180,Yn=ve.z6.LeftSide):ce.equals(ve.z6.Bottom)&&(mi=90,Yn=ve.z6.BottomSide),$n||(mi-=180);var hr=(Mi,xi)=>{Mi.handled=!0,Mi.diagram.model.commit(ci=>{var Ni=xi.part.adornedPart;ci.set(Ni.data,$n?"toSpot":"fromSpot",ve.z6.stringify(Yn)),($n?Ni.toNode:Ni.fromNode).invalidateConnectedLinks()})};return nn(ve.bn,{alignment:ce,alignmentFocus:ce.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:mi,background:"transparent",mouseEnter:(Mi,xi)=>xi.background="dodgerblue",mouseLeave:(Mi,xi)=>xi.background="transparent",click:hr,contextClick:hr})}ue.current.linkTemplate.contextMenu=nn("ContextMenu",ie(),Ce(),nn("ContextMenuButton",nn(ve.s_,"Horizontal",En(0),En(1),En(2))),nn("ContextMenuButton",nn(ve.s_,"Horizontal",nn(ve.s_,"Spot",Wn(!1),Te(ve.z6.Top,!1),Te(ve.z6.Left,!1),Te(ve.z6.Right,!1),Te(ve.z6.Bottom,!1)),nn(ve.s_,"Spot",{margin:new ve.Zt(0,0,0,2)},Wn(!0),Te(ve.z6.Top,!0),Te(ve.z6.Left,!0),Te(ve.z6.Right,!0),Te(ve.z6.Bottom,!0)))));const pn=`{ "class": "GraphLinksModel",
"nodeDataArray": [
{"text":"Find Problem","key":-9,"loc":"-20 -140","color":"#3358ff","fill":"white","figure":"Procedure","thickness":3},
{"text":"What do we want?","key":-10,"loc":"-65 -324.305","group":-16,"figure":"Ellipse","fill":"white"},
{"text":"What do our users want?","key":-11,"loc":"105 -334.305","group":-20,"figure":"Ellipse","fill":"#ffffff","color":"black"},
{"text":"Meetings","key":-12,"loc":"-65 -444.305","group":-16,"figure":"TriangleDown","fill":"#ffffff"},
{"text":"Reviews","key":-13,"loc":"105 -454.305","group":-20,"figure":"TriangleDown","fill":"#ffffff","color":"black"},
{"text":"Can we solve it?","key":-14,"loc":"190 -140","color":"#7d33ff","fill":"#ffffff","figure":"Diamond","size":"140 80","thickness":3},
{"isGroup":true,"text":"Internal","key":-16,"loc":"-65 -384.305","fill":"#d5ebff","dash":null,"thickness":1,"group":-22},
{"isGroup":true,"text":"External","key":-20,"loc":"105 -394.305","fill":"#d5ebff","dash":null,"thickness":1,"group":-22},
{"isGroup":true,"text":"Sources","key":-22,"loc":"20 -400","fill":"#a5d2fa","dash":[4,4],"color":"#3358ff"}
],
"linkDataArray": [
{"from":-12,"to":-10,"points":[-65,-414.305,-65,-404.305,-65,-384.305,-65,-384.305,-65,-364.305,-65,-354.305],"dash":null,"dir":1},
{"from":-13,"to":-11,"points":[105,-424.305,105,-414.305,105,-394.305,105,-394.305,105,-374.305,105,-364.305],"dash":null,"color":"#000000","dir":1},
{"from":-10,"to":-9,"points":[-65,-294.305,-65,-284.305,-65,-232.1525,-40,-232.1525,-40,-180,-40,-170],"dir":2,"dash":[4,4]},
{"from":-11,"to":-9,"points":[105,-304.305,105,-294.305,105,-237.1525,0,-237.1525,0,-180,0,-170],"dash":[4,4],"dir":2},
{"from":-9,"to":-14,"points":[40,-150,58,-150,80,-150,80,-153.33333333333331,102,-153.33333333333331,120,-153.33333333333331],"dir":1,"color":"#3358ff"},
{"from":-14,"to":-9,"points":[190,-100,190,-90,-20,-90,-20,-95,-20,-100,-20,-110],"fromSpot":"BottomSide","toSpot":"BottomSide","text":"No","color":"#ff3333","thickness":2,"dir":1},
{"from":-9,"to":-14,"points":[40,-130,58,-130,80,-130,80,-126.66666666666666,102,-126.66666666666666,120,-126.66666666666666]}
]}`;var ri=["Rectangle","Square","RoundedRectangle","Border","Ellipse","Circle","TriangleRight","TriangleDown","TriangleLeft","TriangleUp","Triangle","Diamond","LineH","LineV","None","BarH","BarV","MinusLine","PlusLine","XLine","LineRight","LineDown","LineLeft","LineUp"];function Ji(ce){return console.log("shapeName:",ce),ri.indexOf(ce)>=0}var zi=new ve.YI(On.current,{maxSelectionCount:1,linkTemplate:nn(ve.rU,{locationSpot:ve.z6.Center,selectionAdornmentTemplate:nn(ve.uz,"Link",{locationSpot:ve.z6.Center},nn(ve.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),nn(ve.bn,{toArrow:"Standard",stroke:null}))},{routing:ve.rU.AvoidsNodes,curve:ve.rU.JumpOver,corner:5,toShortLength:4},new ve.KX("points"),nn(ve.bn,{isPanelMain:!0,strokeWidth:2}),nn(ve.bn,{toArrow:"Standard",stroke:null})),model:new ve.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...ve.bn.getFigureGenerators().toArray().map(ce=>({text:"\u672A\u547D\u540D",size:"100 100",figure:ce.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return ue.current.addDiagramListener("TextEdited",function(ce){var $n;const mi=ce.subject.part;var Yn=($n=document.activeElement)==null?void 0:$n.value;typeof Yn=="string"&&Yn.trim()===""&&ue.current.model.commit(function(hr){hr.set(mi.data,"text","\u672A\u547D\u540D"),ue.current.commandHandler.stopCommand()},"increment")}),zi.nodeTemplate=nn(ve.NB,"Auto",{locationSpot:ve.z6.Center},new ve.KX("location","location",ve.E9.parse).makeTwoWay(ve.E9.stringify),nn(ve.bn,"Circle",{fill:"white",stroke:"gray",strokeWidth:2,width:20,height:20,portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromLinkableSelfNode:!0,toLinkableSelfNode:!0},new ve.KX("stroke").makeTwoWay(),new ve.KX("fill").makeTwoWay(),new ve.KX("figure")),nn(ve.al,{margin:new ve.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new ve.$u(16,16),maxSize:new ve.$u(10,NaN),textAlign:"center",editable:!0},new ve.KX("key").makeTwoWay())),setTimeout(()=>{ue.current.grid=nn(ve.s_,"Grid",nn(ve.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),nn(ve.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),ue.current.grid.visible=!0,ue.current.grid.gridCellStroke="darkgray",ue.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=ue.current,ue.current}const ti=()=>kt(this,null,function*(){var nn,pe=ue.current.makeImage();const Un=yield(0,Et.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:pe.src,file_data:JSON.stringify({login:(nn=(0,Dt.eY)())==null?void 0:nn.login,data:JSON.parse(ue.current.model.toJson())})}});Ee({src:Un.url})});return(0,Tt.useEffect)(()=>(setTimeout(()=>{Pn()},500),Se(Fe+1),()=>{ue.current=null}),[]),Wt.createElement("div",{ref:Zn,className:"body-overflow-initial"},Wt.createElement(He.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!Fe,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:Wt.createElement(mn.Z,null,Wt.createElement(Kt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Wt.createElement(Kt.Z,{onClick:()=>{var nn,pe,Un=ue.current.selection.first();if(zn.current=!zn.current,document.activeElement&&Un){let pi=(pe=(nn=document.activeElement)==null?void 0:nn.value)==null?void 0:pe.trim();typeof pi=="string"&&ue.current.model.commit(function(Oi){Oi.set(Un.data,"text",pi||"\u672A\u547D\u540D"),ue.current.commandHandler.stopCommand()},"increment")}Se(Fe+1)}},Wt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:ke},Wt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:zn.current?"none":"block"},className:Ft.flowChartWrp},Wt.createElement("div",{style:{display:"flex",height:"100%"}},Wt.createElement("div",{style:{width:"300px",height:"100%"}},Wt.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),Wt.createElement("div",{style:{height:"calc(100% - 50px)"},className:Ft.myPaletteDiv,ref:On})),Wt.createElement("div",{style:{flex:1,position:"relative"}},Wt.createElement("div",{ref:Ie,style:{height:"80vh"}}))),Wt.createElement("div",{className:"tr"},Wt.createElement(We.ZP,{size:"large",onClick:ti,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var Tn=Ue,Ei=ee(98813),Xn=ee(37720);const si=Ei.ZP.Group,Qi={margin:"0 8px"};var Ln=({callback:ke,onCancel:Ee})=>{function ue(Ie){ke(Ie)}return Tt.createElement(he.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:ue},Tt.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},Tt.createElement("span",{style:Qi},"\u5355\u5143\u683C\u6570\uFF1A"),Tt.createElement("span",{style:Qi},"\u884C\u6570"),Tt.createElement(he.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},Tt.createElement(Xn.Z,null)),Tt.createElement("span",{style:Qi},"\u5217\u6570"),Tt.createElement(he.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},Tt.createElement(Xn.Z,null))),Tt.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},Tt.createElement("span",{style:Qi},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),Tt.createElement(he.default.Item,{name:"align"},Tt.createElement(si,null,Tt.createElement(Ei.ZP,{value:"default"},Tt.createElement("i",{className:"fa fa-align-justify"})),Tt.createElement(Ei.ZP,{value:"left"},Tt.createElement("i",{className:"fa fa-align-left"})),Tt.createElement(Ei.ZP,{value:"center"},Tt.createElement("i",{className:"fa fa-align-center"})),Tt.createElement(Ei.ZP,{value:"right"},Tt.createElement("i",{className:"fa fa-align-right"}))))),Tt.createElement("div",{className:"flex-container flex-end"},Tt.createElement(We.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Tt.createElement(We.ZP,{type:"ghost",onClick:Ee},"\u53D6\u6D88")))},Ci=ee(59637),gi=ee(61016),qi=ee.n(gi),Pr=(0,Tt.forwardRef)(({use3d:ke,width:Ee,height:ue,callback:Ie,showSaveButton:On},zn)=>{const Zn=(0,Tt.useRef)(),Fe=(0,Tt.useRef)(),[Se,Pn]=(0,Tt.useState)(!1),ti=(0,Tt.useRef)({id:Zn,appName:"graphing",width:Ee||1e3,height:ue||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,Tt.useEffect)(()=>{Fe.current=new(qi())(ti.current,!0),window.onload=function(){Fe.current.inject("applet_container")}},[]);const nn=()=>{var pe=window.ggbApplet.getPNGBase64(1,!0,72);return Ie&&Ie(pe),pe};return(0,Tt.useEffect)(()=>{ti.current.appName=Se?"3D":"graphing",Fe.current.inject("applet_container")},[Se]),(0,Tt.useEffect)(()=>{Pn(ke)},[ke]),(0,Tt.useImperativeHandle)(zn,()=>({getImgData:nn})),Tt.createElement(Tt.Fragment,null,Tt.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Zn}),Tt.createElement(mn.Z,{align:"middle"},Tt.createElement(Kt.Z,{flex:1},Tt.createElement(Ci.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Se,onChange:pe=>Pn(pe)})),Tt.createElement(Kt.Z,null,Tt.createElement(We.ZP,{size:"large",onClick:nn,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),kr=ee(36527),yr=ee(2453);const or="link",Es="upload-image",Wr="add-flowchart",Wo="draw-image",Fo="add-flowchart",$r="code-block",ur="add-table",So="------------",Er={default:So,left:`:${So}`,center:`:${So}:`,right:`${So}:`};var bo=ee(99914);function Ss(){}let Ms=0;const $s=1e4,xo="\u2581",er="@\u2581\u2581@",en="@\u2581@",Bt=`
**\u6A21\u677F\u6807\u9898**
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`,Qn=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"];function Dn(ke){return/^\d+$/.test(ke)?`${ke}px`:ke}const un=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",wn={[un+"-B"]:"bold",[un+"-I"]:"italic"},Hn={[or]:"\u6DFB\u52A0\u94FE\u63A5",[$r]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Es]:"\u6DFB\u52A0\u56FE\u7247",[Wo]:"\u6DFB\u52A0\u753B\u56FE",[Wr]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[ur]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var di=({defaultValue:ke="",onChange:Ee,width:ue="100%",height:Ie=400,miniToolbar:On=!1,isFocus:zn=!1,watch:Zn,insertTemp:Fe,mode:Se="markdown",id:Pn="markdown-editor-id",showResizeBar:ti=!1,noStorage:nn=!1,showNullButton:pe=!1,showNullProgramButton:Un=!1,hidetoolBar:pi=!1,fullScreen:Oi=!1,onBlur:on,onCMBeforeChange:ni,onFullScreen:ie,className:se="",disablePaste:ye=!1,disabled:Ce=!1,disabledFill:Oe=!1,placeholder:Ze="",values:En="",extraUse:Wn})=>{const[Te,pn]=(0,Tt.useState)(null),[ri,Ji]=(0,Tt.useState)(ke),[zi,ce]=(0,Tt.useState)(Zn),[$n,mi]=(0,Tt.useState)(Oi),[Yn,hr]=(0,Tt.useState)(""),[Mi,xi]=(0,Tt.useState)(0),[ci,Ni]=(0,Tt.useState)(Ie),[Vi,Ke]=(0,Tt.useState)(!1),[ki,Ye]=(0,Tt.useState)(0),[rr,Ro]=(0,Tt.useState)(0),gr=(0,Tt.useRef)(),lo=(0,Tt.useRef)(),pr=(0,Tt.useRef)(),_i=(0,Tt.useRef)();(0,Tt.useEffect)(()=>{const Ui=window.scrollY||window.pageYOffset;Ji(En),Te==null||Te.setValue(En),window.scrollTo(0,Ui)},[En]),(0,Tt.useEffect)(()=>{ie==null||ie($n)},[$n]),(0,Tt.useEffect)(()=>{if(gr.current){let Ui=function(Yi,an){var Nr;if(ye){an.preventDefault();return}const Xr=an.clipboardData;if(Xr){const _o=Xr.types.toString(),Ao=Xr.items;if(_o==="Files"||Xr.types.indexOf("Files")>-1){if(an.preventDefault(),Se=="stex")return;try{let fo=Ao[1];((Nr=Ao[0])==null?void 0:Nr.kind)==="file"&&(fo=Ao[0]);const Yo=fo.getAsFile(),ga=Yo.name.split(".").pop();(0,Kn.I)(Yo,js=>{var Ca,fl,Me;js.id?((Ca=Yo==null?void 0:Yo.type)==null?void 0:Ca.indexOf("image"))>-1?ii.replaceSelection(`<img width="100%" src="/api/attachments/${js.id}?type=${js.content_type})" alt="" />`):((fl=Yo==null?void 0:Yo.type)==null?void 0:fl.indexOf("video"))>-1?ii.replaceSelection(`<video width="100%" controls src="/api/attachments/${js.id}"></video>`):((Me=Yo==null?void 0:Yo.type)==null?void 0:Me.indexOf("pdf"))>-1?ii.replaceSelection(`<a href="/api/attachments/${js.id}?type=${Yo.type}&disposition=inline" target="_blank">${Yo.name}</a>`):Qn.includes(ga)?ii.replaceSelection(`<a href="/api/attachments/${js.id}?type=office&disposition=inline" target="_blank">${Yo.name}</a>`):ii.replaceSelection(`[${Yo.name}](/api/attachments/${js.id}?type=${js.content_type})`):(js==null?void 0:js.status)===401&&(document.location.href="/user/login")})}catch(fo){yr.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const ii=Ne().fromTextArea(gr.current,{mode:Se,lineNumbers:!On,lineWrapping:!0,value:ke,autoCloseTags:!0,autoCloseBrackets:!0});return ii.on("keyup",function(Yi,an){an.keyCode===8&&(Yi.getValue()==""?ii.setOption("placeholder",Ze):ii.setOption("placeholder",null))}),ii.on("keydown",function(Yi,an){if(an.keyCode===8){var Nr=qr(Yi);Nr&&an.preventDefault()}}),zn&&ii.focus(),ii.on("paste",Ui),Ce&&ii.on("beforeChange",function(Yi,an){(an.origin==="paste"||an.origin==="+input")&&an.cancel()}),pn(ii),()=>{ii.off("paste",Ui)}}},[]);const cr=(0,Tt.useCallback)(()=>{if(lo.current)try{}catch(Ui){console.log(Ui,"---- to set md editor body height")}},[ci,lo,$n]);(0,Tt.useEffect)(()=>{function Ui(){let ii=new ln.Z(Yi=>{for(let an of Yi)(an.target.offsetHeight>0||an.target.offsetWidth>0)&&(cr(),Te.setSize("100%","100%"),Te.refresh())});return ii.observe(gr.current.parentElement),ii}if(Te){const ii=Ui();return()=>{var Yi,an;(Yi=gr.current)!=null&&Yi.parentElement&&ii.unobserve((an=gr.current)==null?void 0:an.parentElement)}}},[Te,cr]),(0,Tt.useEffect)(()=>{if(Te){let Ui=[];for(const[ii,Yi]of Object.entries(wn)){let an={[ii]:()=>{Fr(Yi)}};Ui.push(an),Te.addKeyMap(an)}return()=>{for(let ii of Ui)Te.removeKeyMap(ii)}}},[Te]),(0,Tt.useEffect)(()=>{Oi!==$n&&mi(Oi)},[Oi]),(0,bo.Z)(()=>{if(!nn&&Mi>0){let Ui=new Date().getTime(),ii=window.sessionStorage.getItem(Pn);Ui>=Mi+$s&&(!ii||ii!==ri)&&(window.sessionStorage.setItem(Pn,ri),Ke(!0))}},$s),(0,Tt.useEffect)(()=>{ce(Zn)},[Te,Zn]),(0,Tt.useEffect)(()=>{Te&&zn&&Te.focus()},[Te,zn]),(0,Tt.useEffect)(()=>{if(zi&&Te){let Ui=function(Yi){let an=Yi.target;if(_i.current){let Nr=an.scrollTop/an.scrollHeight;_i.current.scrollTop=_i.current.scrollHeight*Nr}};const ii=Te.getScrollerElement();return ii.addEventListener("scroll",Ui),()=>{ii.removeEventListener("scroll",Ui)}}},[Te,zi]),(0,Tt.useEffect)(()=>{if(Te&&ni){let Ui=function(ii,Yi){ni(ii,Yi)};return Te.on("beforeChange",Ui),()=>{Te.off("beforeChange",Ui)}}},[Te,ni]),(0,Tt.useEffect)(()=>{if(Te&&on){let Ui=function(){on(Te.getValue())};return Te.on("blur",Ui),()=>{Te.off("blur",Ui)}}},[Te,on]);function qr(Ui,ii){var Yi=Ui.getDoc(),an=Yi.getCursor(),Nr=Yi.getLine(an.line),Xr=Nr.charAt(an.ch-1),_o=Nr.lastIndexOf("@\u2581@",an.ch),Ao=Nr.lastIndexOf("@\u2581\u2581@",an.ch),fo=_o>Ao?_o:Ao,Yo=_o>Ao?3:4;if(er.indexOf(Xr)===-1)return null;if(console.log("change1:",ii,Ui,Nr,an,fo,_o,Ao,Xr),fo>=0&&an.ch-fo<5){var ga=fo+Yo;return Yi.replaceRange("",{line:an.line,ch:fo},{line:an.line,ch:ga}),{line:an.line,ch:ga}}return null}(0,Tt.useEffect)(()=>{if(Te){let Ui=function(ii,Yi){const an=ii.getValue();Ji(an),xi(new Date().getTime()),ii.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ee&&(Un?Ee(an,el(an)):Ee(an))};return Te.on("change",Ui),()=>{Te.off("change",Ui)}}},[Te,Ee]),(0,Tt.useEffect)(()=>{if(Te)if(ke==null)Te.setValue(""),Ji("");else{const Ui=window.scrollY||window.pageYOffset;ke!==Te.getValue()&&(Te.setValue(ke),Ji(ke),Te.setCursor(Ce?1:Te.lineCount(),0),window.scrollTo(0,Ui))}},[Te,ke]);const Fr=(0,Tt.useCallback)(Ui=>{const ii=Te.getCursor(),Yi=Te.getSelection();let an=Yi.split(`
`);switch(Ui){case"bold":return Te.replaceSelection("**"+Yi+"**"),Yi===""&&Te.setCursor(ii.line,ii.ch+2),Te.focus();case"italic":return Te.replaceSelection("*"+Yi+"*"),Yi===""&&Te.setCursor(ii.line,ii.ch+1),Te.focus();case"code":return Te.replaceSelection("`"+Yi+"`"),Yi===""&&Te.setCursor(ii.line,ii.ch+1),Te.focus();case"inline-latex":return hr("inline-latex"),Te.focus();case"latex":return Te.replaceSelection("```latex\n"+Yi+"\n```"),Te.setCursor(ii.line+1,Yi.length+1),Te.focus();case"line-break":return Te.replaceSelection(`<br/>
`),Te.focus();case"list-ul":return Yi===""?Te.replaceSelection("- "+Yi):Te.replaceSelection(an.map(Nr=>Nr===""?"":`- ${Nr}`).join(`
`)),Te.focus();case"list-ol":return Yi===""?Te.replaceSelection("1. "+Yi):Te.replaceSelection(an.map((Nr,Xr)=>Nr===""?"":`${Xr+1}. ${Nr}`).join(`
`)),Te.focus();case"add-null-ch":return Yi===""&&Te.setCursor(ii.line,ii.ch),Te.replaceSelection(xo),Te.focus();case"add-signal":return Yi===""&&Te.setCursor(ii.line,ii.ch),Te.replaceSelection(en),Te.focus();case"add-multiple":return Yi===""&&Te.setCursor(ii.line,ii.ch),Te.replaceSelection(er),Te.focus();case"inster-template-1":return Yi===""&&Te.setCursor(ii.line,ii.ch),Te.replaceSelection(Bt),Te.focus();case"eraser":return Te.setValue(""),Te.focus();case"trigger-watch":return ce(!zi),Te.focus();case"trigger-full-screen":return mi(!$n),Te.focus();case or:hr(or);return;case $r:hr($r);return;case Es:hr(Es);return;case Wo:hr(Wo);return;case"maths-latex":hr("maths-latex");return;case Wr:hr(Wr);return;case ur:hr(ur);return;default:throw new Error}},[Te,zi,$n]),Rn=(0,Tt.useCallback)((Ui,ii)=>{var Yi,an,Nr,Xr,_o,Ao;switch(hr(""),Yn){case or:const{title:Ca,link:fl}=Ui;return Te.replaceSelection(`[${Ca}](${fl})`),Te.focus();case $r:const{language:Me,content:fa}=Ui;return Te.replaceSelection(["```"+Me,fa,"```"].join(`
`)),Te.focus();case"maths-latex":for(var fo=atob(Ui),Yo=new Uint8Array(fo.length),ga=0;ga<fo.length;ga++)Yo[ga]=fo.charCodeAt(ga);var js=new Blob([Yo],{type:"image/png"});(0,Kn.I)(js,sr=>{sr.id?Te.replaceSelection(`![,](/api/attachments/${sr.id}?type=${sr.content_type})`):(sr==null?void 0:sr.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":Te.replaceSelection("`$$"+Ui+"$$`");break;case Es:case Wo:case Fo:const{src:Ll,alt:ZA}=Ui,Go=ii,LA=(Nr=(an=(Yi=Go==null?void 0:Go.name)==null?void 0:Yi.split("."))==null?void 0:an.pop)==null?void 0:Nr.call(an);return((Xr=Go==null?void 0:Go.type)==null?void 0:Xr.indexOf("image"))>-1||!(Go!=null&&Go.type)?Go!=null&&Go.align||Go!=null&&Go.width?Te.replaceSelection(`<p style="text-align:${Go.align||"initial"}"><img width="${Go.width?Go.width+"%":"initial"}" src="${Ll}" alt="${ZA||""}" /></p>`):Te.replaceSelection(`<img width="100%" src="${Ll}" alt="${ZA||""}" />`):((_o=Go==null?void 0:Go.type)==null?void 0:_o.indexOf("video"))>-1?Te.replaceSelection(`<video width="100%" controls src="${Ll}"></video>`):((Ao=Go==null?void 0:Go.type)==null?void 0:Ao.indexOf("pdf"))>-1?Te.replaceSelection(`<a href="${Ll}?type=${Go.type}&disposition=inline" target="_blank">${Go.name}</a>`):Qn.includes(LA)?Te.replaceSelection(`<a href="${Ll}?type=office&disposition=inline" target="_blank">${Go.name}</a>`):Te.replaceSelection(`[${Go.name}](${Ll})`),Te.focus();case ur:const{row:fh,col:JA,align:Yr}=Ui;let $o=`
`;for(let sr=0;sr<fh;sr++){let dr=[],Zr=[];for(let Bo=0;Bo<JA;Bo++)sr===1&&Zr.push(Er[Yr]),dr.push(" ");sr===1&&($o+=`| ${Zr.join(" | ")} |
`),$o+=`| ${dr.join(JA===1?"":" | ")} |
`}return Te.replaceSelection($o+`
`),Te.focus();default:throw new Error}},[Te,Yn]),Rt=(0,Tt.useMemo)(()=>{switch(Yn){case or:return Tt.createElement(je,{callback:Rn,onCancel:Gr});case $r:return Tt.createElement(Nn.Z,{callback:Rn,onCancel:Gr});case Es:return Tt.createElement(Kn.Z,{callback:Rn,onCancel:Gr});case Wr:return Tt.createElement(Tn,{callback:Rn,onCancel:Gr});case ur:return Tt.createElement(Ln,{callback:Rn,onCancel:Gr});case"maths-latex":return Tt.createElement(Pr,{showSaveButton:!0,callback:Rn});case"inline-latex":return Tt.createElement(kr.Z,{showSaveButton:!0,callback:Rn});default:return null}},[Yn]);function Gr(){hr("")}(0,Tt.useEffect)(()=>{if(pr.current){let Ui=function(_o){Nr=!0,Xr=_o.pageY},ii=function(){Nr=!1},Yi=function(_o){if(Nr){let Ao=_o.pageY-Xr;Ao<0&&(Ao=0),Ao>300&&(Ao=300);let fo=Ie+Ao+"px";Ni(fo)}},an=pr.current,Nr=!1,Xr=0;return an.addEventListener("mousedown",Ui),document.addEventListener("mousemove",Yi),document.addEventListener("mouseup",ii),()=>{an.removeEventListener("mousedown",Ui),document.removeEventListener("mousemove",Yi),document.removeEventListener("mouseup",ii)}}},[Te,pr]),(0,Tt.useEffect)(()=>{Ni(Ie)},[Ie]);const ps=Dn(ue),xs=Dn(ci),Lo={width:ps,height:xs},os=(0,Tt.useMemo)(()=>{if(Mi){let Ui=new Date(Mi),ii=Ui.getHours(),Yi=Ui.getMinutes(),an=Ui.getSeconds();return ii=ii<10?"0"+ii:ii,Yi=Yi<10?"0"+Yi:Yi,an=an<10?"0"+an:an,`${ii}:${Yi}:${an}`}return 0},[Mi]),el=Ui=>{const ii=[];if(Un){let Yi=-1;Ui=Ui.replace(/(@▁▁@|@▁@)/g,function(an,Nr,Xr){ii.push({multiLine:an!==en})})}return ii};function gl(){window.sessionStorage.removeItem(Pn),Ke(!1),xi(0)}function Ra(){Ke(!1),xi(0),Te.setValue(window.sessionStorage.getItem(Pn))}(0,Tt.useEffect)(()=>{Hn[Yn]&&Yn!==Wo&&Yn!==Wr&&setTimeout(()=>{const Ui=document.getElementsByClassName("markdown-popup-form")[0],ii=window.innerWidth/2-Ui.offsetWidth/2,Yi=window.innerHeight/2-Ui.offsetHeight/2;Ye(ii),Ro(Yi)},0)},[Yn]);const _r=Ui=>{Ui.preventDefault();const ii=Ui.clientX-ki,Yi=Ui.clientY-rr;document.body.onmousemove=an=>{let Nr=an.clientX-ii,Xr=an.clientY-Yi;const _o=document.getElementsByClassName("markdown-popup-form")[0],Ao=window.innerWidth-_o.offsetWidth,fo=window.innerHeight-_o.offsetHeight;Nr=Math.max(0,Math.min(Nr,Ao)),Xr=Math.max(0,Math.min(Xr,fo)),To(an.clientX,an.clientY,ii,Yi)&&(Ye(Nr),Ro(Xr))},document.body.onmouseup=function(){document.body.onmousemove=null}},To=(Ui,ii,Yi,an)=>{const Nr=document.body.clientHeight,Xr=document.body.clientWidth;return Ui<20&&Yi>Ui||Ui>Xr-20&&Yi<Ui||ii<20&&an>ii||ii>Nr-20&&an<ii?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return Tt.createElement(Tt.Fragment,null,Tt.createElement("div",{className:"markdown-editor-wrapper",ref:lo},Tt.createElement("div",{className:`markdown-editor-container ${se} ${zi?"on-preview":""} ${On?"mini":""} ${$n?"full-screen":""}`,style:Lo},Tt.createElement(Jt,{insertTemp:Fe,watch:zi,fullScreen:$n,showNullButton:pe,showNullProgramButton:Un,onActionCallback:Fr,hidetoolBar:pi,extraUse:Wn}),Tt.createElement("div",{className:"markdown-editor-body"},Tt.createElement("div",{className:"codemirror-container"},Tt.createElement("textarea",{ref:gr,placeholder:Ze})),zi?Tt.createElement("div",{ref:_i,className:"preview-container"},Se==="stex"&&Tt.createElement(Xe,{value:ri}),Se!=="stex"&&Tt.createElement(gn.Z,{disabledFill:Oe,showProgramFill:Un,value:ri})):null))),ti?Tt.createElement("a",{ref:pr,className:"editor-resize"}):null,Yn===Wo&&Tt.createElement(bn,{callback:Rn,onCancel:Gr}),Yn===Wr&&Tt.createElement(Tn,{callback:Rn,onCancel:Gr}),Tt.createElement(Ae.Z,null,Hn[Yn]&&Yn!==Wo&&Yn!==Wr?Tt.createElement(He.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:ki,top:rr},title:Tt.createElement("div",{style:{cursor:"move"},onMouseDown:_r},Hn[Yn]),open:!0,onCancel:Gr,footer:null,destroyOnClose:!0,width:Yn===Wr?"1200px":null,height:Yn===Wr?"80vh":null,className:"markdown-popup-form"},Rt):null))}},70859:function(yn,qn,ee){"use strict";ee.d(qn,{Z:function(){return Vt},I:function(){return Ae}});var Tt=ee(91773),Be=ee(2453),Ne=ee(28802),ln=ee(78957),be=ee(37720),we=ee(98813),ne=ee(85804),De=ee(15476),fe=ee(67294),Qe=ee(67294),gn=Object.defineProperty,Xe=Object.defineProperties,kn=Object.getOwnPropertyDescriptors,Ut=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,gt=(he,le,We)=>le in he?gn(he,le,{enumerable:!0,configurable:!0,writable:!0,value:We}):he[le]=We,lt=(he,le)=>{for(var We in le||(le={}))et.call(le,We)&&gt(he,We,le[We]);if(Ut)for(var We of Ut(le))nt.call(le,We)&&gt(he,We,le[We]);return he},ct=(he,le)=>Xe(he,kn(le));const{useForm:yt}=Tt.default,Lt={width:280,marginRight:10},Nt={labelCol:{span:5},wrapperCol:{span:19}};var Vt=({callback:he,onCancel:le})=>{const[We]=yt();let me=(0,fe.useRef)();function Je(ui){me.current.width=We.getFieldValue("width"),me.current.align=We.getFieldValue("align"),he(ui,me.current)}function fn(ui,hi){if(ui.status===-1){Be.ZP.error(ui.message);return}We.setFieldsValue({src:`/api/attachments/${ui.id}`,type:hi.type})}function sn(ui){let hi=ui.target.files[0];me.current=hi,Ae(hi,fn)}return Qe.createElement(Tt.default,ct(lt({form:We},Nt),{className:"upload-image-panel",onFinish:Je,style:{width:470,overflow:"hidden"}}),Qe.createElement(Tt.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},Qe.createElement("div",{className:"flex-container"},Qe.createElement(Tt.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},Qe.createElement(Ne.default,{style:Lt})),Qe.createElement(Jt,{onFileChange:sn}))),Qe.createElement(Tt.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},Qe.createElement(Ne.default,{style:{width:264}})),Qe.createElement(Tt.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},Qe.createElement(ln.Z,null,Qe.createElement(Tt.default.Item,{name:"width",style:{margin:0}},Qe.createElement(be.Z,{style:{width:264}})),Qe.createElement("span",{className:"ml8"},"%"))),Qe.createElement(Tt.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},Qe.createElement(we.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"\u5DE6\u5BF9\u9F50"},{value:"center",label:"\u5C45\u4E2D\u5BF9\u9F50"},{value:"right",label:"\u53F3\u5BF9\u9F50"}]})),Qe.createElement("aside",null,Qe.createElement(Tt.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},Qe.createElement(ne.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Qe.createElement(ne.ZP,{type:"default",onClick:le},"\u53D6\u6D88"))))};function Jt({onFileChange:he}){return Qe.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",Qe.createElement("input",{type:"file",onChange:he}))}function Ae(he,le){if(!he)throw new String("\u6CA1\u6709\u6587\u4EF6");let We=new FormData;We.append("editormd-image-file",he),We.append("file_param_name","editormd-image-file"),We.append("byxhr","true");var me=new window.XMLHttpRequest;me.withCredentials=!0,me.addEventListener("load",function(Je){le(JSON.parse(Je.target.responseText),he)},!1),me.addEventListener("error",function(Je){console.error(Je)},!1),me.open("POST",`${De.KI}/api/attachments.json`),me.send(We)}},76621:function(yn,qn,ee){"use strict";ee.d(qn,{Z:function(){return Ne}});var Tt=ee(67294),Be=ee(73935);class Ne extends Tt.Component{constructor(be){super(be);const we=window.document;this.node=we.createElement("div"),we.body.appendChild(this.node)}render(){const{children:be}=this.props;return(0,Be.createPortal)(be,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},36295:function(yn,qn,ee){"use strict";ee.d(qn,{SV:function(){return ve},ZP:function(){return bn}});var Tt=ee(67294),Be=ee(91033);const Ne={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},ln={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},be={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
`)},{label:"if",content:["if () {"," $0","}"].join(`
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
`)},{label:"include <vector>",content:["#include <vector>"].join(`
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
`)},{label:"include <map>",content:["#include <map>"].join(`
`)},{label:"include <string>",content:["#include <string>"].join(`
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
`)}]},we={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
`)}]},ne={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(`
`)}]};var De=ee(84204),fe=ee.n(De),Qe=(Le,Sn,xn)=>new Promise((Kt,Et)=>{var Ft=kt=>{try{Wt(xn.next(kt))}catch(Ue){Et(Ue)}},Dt=kt=>{try{Wt(xn.throw(kt))}catch(Ue){Et(Ue)}},Wt=kt=>kt.done?Kt(kt.value):Promise.resolve(kt.value).then(Ft,Dt);Wt((xn=xn.apply(Le,Sn)).next())});const gn={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},Xe=(Le,Sn,xn,Kt)=>{const Et=Sn.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:xn.lineNumber,endColumn:xn.column});return Array.from(new Set(Et.match(/\b\w{2,}\b/g)||[])).map(Dt=>({label:Dt,kind:Le.languages.CompletionItemKind.Text,insertText:Dt,range:Kt}))},kn=(Le,Sn,xn,Kt)=>{Le.languages.registerCompletionItemProvider(Sn,{provideCompletionItems(Et,Ft){const Dt=Et.getWordUntilPosition(Ft),Wt={startLineNumber:Ft.lineNumber,endLineNumber:Ft.lineNumber,startColumn:Dt.startColumn,endColumn:Dt.endColumn},kt=Et.getLineContent(Ft.lineNumber).substring(Dt.startColumn-2,Dt.endColumn);return{suggestions:[...Xe(Le,Et,Ft,Wt),...xn.map(Tn=>({label:Tn,kind:Le.languages.CompletionItemKind.Keyword,documentation:Tn,insertText:Tn,insertTextRules:Le.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Wt})),...Kt.map(Tn=>({label:Tn.label,kind:Le.languages.CompletionItemKind.Snippet,documentation:Tn.content,insertText:kt.startsWith("#")?Tn.content.replace(/#/,""):Tn.content,insertTextRules:Le.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Wt}))]}}})};var Ut=Le=>{gn.languages.forEach(Sn=>{Le.languages.registerDocumentFormattingEditProvider(Sn,{provideDocumentFormattingEdits(xn){return Qe(this,null,function*(){const Kt=fe()(xn.getValue(),{indent_size:2,indent_char:" ",max_preserve_newlines:2,preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:0,indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1});return[{range:xn.getFullModelRange(),text:Kt}]})}})}),kn(Le,"java",ln.keywords,ln.quickKey),kn(Le,"cpp",be.keywords,be.quickKey),kn(Le,"c",Ne.keywords,[]),kn(Le,"python",we.keywords,we.quickKey),kn(Le,"scala",ne.keywords,ne.quickKey)};const et="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var nt=Object.defineProperty,gt=(Le,Sn,xn)=>Sn in Le?nt(Le,Sn,{enumerable:!0,configurable:!0,writable:!0,value:xn}):Le[Sn]=xn,lt=(Le,Sn,xn)=>gt(Le,typeof Sn!="symbol"?Sn+"":Sn,xn);const ct=class p1{constructor(Sn,xn,Kt){this.placeholder=Sn,this.editor=xn,this.monaco=Kt,xn.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return p1.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};lt(ct,"ID","editor.widget.placeholderHint");var Lt=ct,Nt=ee(84144),Vt=ee(2453),Jt=ee(83062),Ae=ee(96486),he=ee(33054),le=ee(74855),We=Object.defineProperty,me=Object.defineProperties,Je=Object.getOwnPropertyDescriptors,fn=Object.getOwnPropertySymbols,sn=Object.prototype.hasOwnProperty,ui=Object.prototype.propertyIsEnumerable,hi=(Le,Sn,xn)=>Sn in Le?We(Le,Sn,{enumerable:!0,configurable:!0,writable:!0,value:xn}):Le[Sn]=xn,Si=(Le,Sn)=>{for(var xn in Sn||(Sn={}))sn.call(Sn,xn)&&hi(Le,xn,Sn[xn]);if(fn)for(var xn of fn(Sn))ui.call(Sn,xn)&&hi(Le,xn,Sn[xn]);return Le},fr=(Le,Sn)=>me(Le,Je(Sn)),qt=(Le,Sn)=>{var xn={};for(var Kt in Le)sn.call(Le,Kt)&&Sn.indexOf(Kt)<0&&(xn[Kt]=Le[Kt]);if(Le!=null&&fn)for(var Kt of fn(Le))Sn.indexOf(Kt)<0&&ui.call(Le,Kt)&&(xn[Kt]=Le[Kt]);return xn},Ht=(Le,Sn,xn)=>new Promise((Kt,Et)=>{var Ft=kt=>{try{Wt(xn.next(kt))}catch(Ue){Et(Ue)}},Dt=kt=>{try{Wt(xn.throw(kt))}catch(Ue){Et(Ue)}},Wt=kt=>kt.done?Kt(kt.value):Promise.resolve(kt.value).then(Ft,Dt);Wt((xn=xn.apply(Le,Sn)).next())});function je(Le){return/^\d+$/.test(Le)?`${Le}px`:Le}function Nn(){}let Kn=!1;const He={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function mn(Le=[]){let Sn=Le;if(Array.isArray(Le)){for(let xn=0;xn<Le.length;xn++){let Kt=He[Le[xn]];if(Kt)return Kt}return Sn[0]}return He[Sn]||Sn}let Cn=null;const Jn=()=>Ht(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(Le){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",Le)}});var bn=Le=>{var Sn=Le,{width:xn="100%",height:Kt="100%",value:Et,language:Ft="javascript",style:Dt={},options:Wt={},overrideServices:kt={},theme:Ue="vs-dark",onEditBlur:Tn,isCopy:Ei=!1,onSave:Xn,autoHeight:si=!1,forbidCopy:Qi=!1,onChange:Ln=Nn,editorDidMount:Ci=Nn,onFocus:gi=Nn,onBreakPoint:qi=Nn,breakPointValue:fi=[],filename:Pr="educoder.txt",errorLine:kr,errorContent:yr="",highlightLine:or,openBreakPoint:Es=!1,placeholder:Wr="",showMiniMap:Wo=!0}=Sn,Fo=qt(Sn,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const $r=(0,Tt.useRef)(),ur=(0,Tt.useRef)({}),So=(0,Tt.useRef)(),Er=(0,Tt.useRef)(),bo=(0,Tt.useRef)([]),Ss=(0,Tt.useRef)(!1),Ms=(0,Tt.useRef)(),$s=(0,Tt.useRef)(),xo=(0,Tt.useRef)(!1),[er,en]=(0,Tt.useState)(!1);function Bt(){let Fe;return $r.current&&(Fe=new Be.Z(Se=>{for(let Pn of Se)(Pn.target.offsetHeight>0||Pn.target.offsetWidth>0)&&ur.current.instance.layout()}),Fe.observe($r.current)),Fe}function Qn(){Vt.ZP.warning({content:decodeURIComponent(et),key:"monaco-editor-tip"})}const Dn=()=>{let Fe=ur.current.instance;if(Et!=null&&Fe&&er){const Se=Fe.getModel();Se&&Et!==Se.getValue()&&(Kn=!0,Se.setValue(Et),Fe.layout(),Kn=!1)}};(0,Tt.useEffect)(()=>{const Fe=he.Z.subscribe("formatDocument",Se=>{var Pn;let ti=ur.current.instance;(Pn=ti==null?void 0:ti.getAction)==null||Pn.call(ti,"editor.action.formatDocument").run()});return window.updateMonacoValue=Se=>{Ln(Se)},Fe},[]),(0,Tt.useEffect)(()=>{var Fe;let Se=ur.current.instance;Er.current&&clearTimeout(Er.current),Er.current=setTimeout(()=>{Dn()},500),Et&&(Et!=null&&Et.length)&&((Fe=Se==null?void 0:Se.updateOptions)==null||Fe.call(Se,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Et.split(/\r\n|\r|\n/g).length))+3,5)}))},[Et,er,ur.current]),(0,Tt.useEffect)(()=>{if(kr&&ur.current&&ur.current.instance){let Se=ur.current.instance;Se.changeViewZones(function(Pn){var ti=document.createElement("div");ti.style.padding="10px 20px",ti.style.width="calc(100% - 20px)",ti.className="my-error-line-wrp",ti.innerHTML=yr,Pn.addZone({afterLineNumber:kr||11,heightInLines:3,domNode:ti})});var Fe={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};Se.addOverlayWidget(Fe),Se.revealPositionInCenter({lineNumber:20,column:1})}},[kr,ur.current,er]);const cn=(Fe="",Se)=>{if(!Fe||Fe.trim()==="")return!0;const ti=ur.current.instance.getModel().getLineTokens(Se);let nn=!1;for(let pe=0;pe<2;pe++)ti.getStandardTokenType(pe)===1&&(nn=!0);return nn};(0,Tt.useEffect)(()=>{var Fe;const Se=(Fe=ur.current)==null?void 0:Fe.instance;if(Se&&er&&Qi){const Pn=Se.onDidBlurEditorWidget(()=>{xo.current=!1}),ti=Se.onDidFocusEditorText(()=>{xo.current=!0});return()=>{Pn.dispose(),ti.dispose()}}},[ur.current,er,Qi]),(0,Tt.useEffect)(()=>{var Fe;if((Fe=ur.current)!=null&&Fe.instance&&er&&Es){let Se=ur.current.instance,Pn=Se.getModel();if(!Pn)return;(()=>{var Ce;let Oe=[],Ze=[];const En=Pn.getAllDecorations();for(let Te of En)Te.options.className==="highlighted-line"&&(Oe.push((Ce=Te==null?void 0:Te.range)==null?void 0:Ce.startLineNumber),Ze.push(Te==null?void 0:Te.id));if(or===Oe[0])return;Pn.deltaDecorations(Ze,[]);const Wn=Pn.getLineCount();or&&or<=Wn&&(Se.deltaDecorations([],[{range:new Cn.Range(or,1,or,Pn.getLineMaxColumn(or)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Se.revealLineInCenter(or))})();const nn=(Ce=!1)=>{var Oe;let Ze=[],En=[];const Wn=Pn.getAllDecorations();for(let Te of Wn)Te.options.linesDecorationsClassName==="breakpoints-select"&&(Ze.push((Oe=Te==null?void 0:Te.range)==null?void 0:Oe.startLineNumber),En.push(Te==null?void 0:Te.id));if(Ce)return{lines:Ze,ids:En};qi(Ze)},pe=Ce=>Ht(void 0,null,function*(){let Oe={range:new Cn.Range(Ce,1,Ce,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Pn.deltaDecorations([],[Oe]),nn()}),Un=Ce=>Ht(void 0,null,function*(){let Oe=[];const Ze=Se.getLineDecorations(Ce);for(let En of Ze)En.options.linesDecorationsClassName==="breakpoints-select"&&Oe.push(En.id);yield Pn.deltaDecorations(Oe,[]),nn()}),pi=Ce=>{let Oe=Se.getLineDecorations(Ce);for(let Ze of Oe)if(Ze.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Ae.isEqual)(fi,nn(!0).lines)){Pn.deltaDecorations(nn(!0).ids,[]);const Ce=fi.map(Oe=>({range:new Cn.Range(Oe,1,Oe,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Pn.deltaDecorations([],Ce)}const Oi=Se.onDidChangeModelContent(Ce=>{let Oe=Se.getPosition();if(Oe){let Ze=Oe.lineNumber;clearTimeout($s.current),$s.current=setTimeout(()=>{cn(Pn.getLineContent(Ze),Ze)?Un(Ze):pi(Ze)?(Un(Ze),pe(Ze)):nn()},100)}}),on=Se.onMouseDown(Ce=>{var Oe,Ze,En;if(Ce.target.detail&&((En=(Ze=(Oe=Ce.target)==null?void 0:Oe.element)==null?void 0:Ze.className)!=null&&En.includes("line-numbers"))){let Wn=Ce.target.position.lineNumber;if(cn(Pn.getLineContent(Wn),Wn))return;pi(Wn)?Un(Wn):pe(Wn)}}),ni=Ce=>{let Oe={range:new Cn.Range(Ce,1,Ce,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};bo.current=Se.deltaDecorations(bo.current,[Oe])},ie=()=>{bo.current=Se.deltaDecorations(bo.current,[])},se=Se.onMouseMove(Ce=>{var Oe,Ze,En;if(ie(),Ce.target.detail&&((En=(Ze=(Oe=Ce.target)==null?void 0:Oe.element)==null?void 0:Ze.className)!=null&&En.includes("line-numbers"))){let Wn=Ce.target.position.lineNumber;if(cn(Pn.getLineContent(Wn),Wn))return;ni(Wn)}}),ye=Se.onMouseLeave(()=>{ie()});return()=>{Oi.dispose(),on.dispose(),se.dispose(),ye.dispose()}}},[ur.current,er,fi,or,Es,Ft]),(0,Tt.useEffect)(()=>{var Fe;(Fe=ur.current)!=null&&Fe.instance&&Es&&ur.current.instance.setPosition({lineNumber:0,column:0})},[or]);function un(){let Fe=ur.current.instance;if(Fe){const Se=Fe.getSelection(),Pn=ur.current.pastePos||{},ti=new Cn.Range(Pn.startLineNumber||Se.endLineNumber,Pn.startColumn||Se.endColumn,Pn.endLineNumber||Se.endLineNumber,Pn.endColumn||Se.endColumn);setTimeout(()=>{Fe.executeEdits("",[{range:ti,text:""}])},300)}}function wn(Fe){(window.navigator.platform.match("Mac")?Fe.metaKey:Fe.ctrlKey)&&Fe.keyCode==83&&(Fe.preventDefault(),Xn())}const Hn=()=>{if(si&&ur.current.instance){const Fe=ur.current.instance.getContentHeight();zn(Fe<Kt?Kt:Fe)}else zn(Kt)};function di(Fe){var Se=document.createEvent("MouseEvents");Se.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Fe.dispatchEvent(Se)}const ke=Fe=>{if(!xo.current)return;const{keyCode:Se,ctrlKey:Pn,metaKey:ti,target:nn,type:pe}=Fe;return(pe==="paste"||(Se===67||Se===86)&&(ti||Pn))&&nn.nodeName==="TEXTAREA"&&(Qn(),Fe.preventDefault()),!1};function Ee(Fe,Se){var Pn=window.URL||window.webkitURL||window,ti=new Blob([Se]),nn=document.createElementNS("http://www.w3.org/1999/xhtml","a");nn.href=Pn.createObjectURL(ti),nn.download=Fe,di(nn)}(0,Tt.useEffect)(()=>{Hn()},[Hn]),(0,Tt.useEffect)(()=>{$r.current&&!er&&Promise.all([ee.e(5552),ee.e(9651)]).then(ee.bind(ee,55826)).then(Fe=>{try{Cn=Fe,ur.current.instance=Cn.editor.create($r.current,{value:Et,language:mn(Ft),theme:Ue,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Wo||!1}},kt);const Se=ur.current.instance;let nn=[...Nt.BH._menuItems].find(Oi=>Oi[0]._debugName=="EditorContext")[1],pe=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Un=(Oi,on)=>{var ni,ie;let se=Oi._first;do on.includes((ie=(ni=se.element)==null?void 0:ni.command)==null?void 0:ie.id)&&Oi._remove(se);while(se=se.next)};if(Ci(Se,Cn),setTimeout(()=>{Hn(),ur.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Ee(Pr||"educoder.txt",Se.getValue())}})},500),ur.current.subscription=Se.onDidChangeModelContent(Oi=>{Ss.current?clearTimeout(Ms.current):(Hn(),Ln(Se.getValue(),Oi)),Ms.current=setTimeout(()=>{Ss.current=!1},500)}),window.Monaco||Ut(Cn,mn(Ft)),Qi&&(Un(nn,pe),$r.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",ke),window.removeEventListener("paste",ke),window.addEventListener("keydown",ke),window.addEventListener("paste",ke)),window.Monaco=Cn,Tn&&Se.onDidBlurEditorWidget(()=>{Tn(Se.getValue())}),gi&&Se.onDidFocusEditorText(()=>{Qi&&Jn(),gi(Se.getValue())}),Qi){Jn();try{Se.onDidPaste(Oi=>{const on=Se.getSelection(),ni=ur.current.pastePos||{},ie=new Cn.Range(ni.startLineNumber||on.endLineNumber,ni.startColumn||on.endColumn,ni.endLineNumber||on.endLineNumber,ni.endColumn||on.endColumn);Se.executeEdits("",[{range:Oi.range,text:""}])})}catch(Oi){}}let pi=Bt();return Wr&&typeof Wr=="string"&&new Lt(Wr,Se,Cn),en(!0),()=>{const Oi=ur.current.instance;Oi.dispose();const on=Oi.getModel();on&&on.dispose(),ur.current.subscription&&ur.current.subscription.dispose(),pi.unobserve($r.current)}}catch(Se){}})},[]),(0,Tt.useEffect)(()=>{if(ur.current.instance&&er)return document.addEventListener("keydown",wn,!1),()=>{document.removeEventListener("keydown",wn)}},[Xn,er]),(0,Tt.useEffect)(()=>{let Fe=ur.current.instance;if(Fe&&er){let Se=mn(Ft);Cn.editor.setModelLanguage(Fe.getModel(),Se)}},[Ft,er]),(0,Tt.useEffect)(()=>{ur.current.instance&&er&&Cn.editor.setTheme(Ue)},[Ue,er]),(0,Tt.useEffect)(()=>{let Fe=ur.current.instance;So.current=Wt,Fe&&er&&(Fe.updateOptions(Si({},Wt)),setTimeout(()=>{Fe.getModel().updateOptions(Si({},Wt))},200))},[JSON.stringify(Wt),er]),(0,Tt.useEffect)(()=>{let Fe=ur.current.instance;Fe&&er&&Fe.layout()},[xn,Kt,er]);const[ue,Ie]=(0,Tt.useState)(je(xn)),[On,zn]=(0,Tt.useState)(je(Kt)),Zn=fr(Si({},Dt),{width:ue,height:On,position:"relative"});return Tt.createElement("div",{className:"my-monaco-editor",ref:$r,style:Zn},Ei&&Tt.createElement(le.CopyToClipboard,{text:Et,onCopy:()=>Vt.ZP.success("\u590D\u5236\u6210\u529F")},Tt.createElement(Jt.Z,{title:"\u590D\u5236\u4EE3\u7801"},Tt.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},Tt.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function ve({width:Le="100%",height:Sn="100%",original:xn,modified:Kt,language:Et,options:Ft={}}){const Dt=(0,Tt.useRef)(),[Wt,kt]=(0,Tt.useState)(null);function Ue(si){let Qi;return Dt.current&&(Qi=new Be.Z(Ln=>{for(let Ci of Ln)(Ci.target.offsetHeight>0||Ci.target.offsetWidth>0)&&si.layout()}),Qi.observe(Dt.current)),Qi}(0,Tt.useEffect)(()=>(Dt.current&&Promise.all([ee.e(5552),ee.e(9404)]).then(ee.bind(ee,50048)).then(si=>{Cn=si;const Qi=Cn.editor.createDiffEditor(Dt.current,fr(Si({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Ft),{wordWrap:!0}));kt(Qi);let Ln=Ue(Qi);return()=>{Qi.dispose();const Ci=Qi.getModel();Ci&&Ci.dispose(),Ln.unobserve(Dt.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,Tt.useEffect)(()=>{Wt&&Wt.setModel({original:Cn.editor.createModel(xn,Et),modified:Cn.editor.createModel(Kt,Et)})},[xn,Kt,Et,Wt]);const Tn=je(Le),Ei=je(Sn),Xn={width:Tn,height:Ei};return Tt.createElement("div",{className:"my-diff-editor",ref:Dt,style:Xn})}},5476:function(yn,qn,ee){"use strict";ee.d(qn,{Z:function(){return gn}});var Tt={flex_box_center:"flex_box_center___AQ53o",flex_space_between:"flex_space_between___i2aIa",flex_box_vertical_center:"flex_box_vertical_center___sPEKB",flex_box_center_end:"flex_box_center_end___GhSSH",flex_box_column:"flex_box_column___R9_Hb",list:"list___jb2Ay",wrap:"wrap___VsQDr",lockWrap:"lockWrap___g1k1T",li:"li___IxCLC",cover:"cover___Mu8wr",img:"img___IpFLA",movebq:"movebq___mF7wt",bq:"bq___Bil0T",sign:"sign___DXJ4d",name:"name___l7FoJ",e:"e___pXQUG",unit:"unit___wCIFR",tags:"tags___w_Mil",tag1:"tag1___dxm7r",tag2:"tag2___llZkf"},Be=ee(74330),Ne=ee(83062),ln=ee(94184),be=ee.n(ln),we=ee(28706),ne=ee(26194),De=ee(52262),fe=ee(67294),gn=({className:Xe,dataSource:kn=[],col:Ut=4,right:et,bottom:nt=23,precision:gt=0,wrapWidth:lt=1200,trackEventItems:ct,loading:yt,onRemove:Lt=()=>{},isCurrent:Nt=!0,showAlias:Vt=!1})=>{const Jt=Math.floor((lt-(Ut-1)*et)/Ut),Ae=[{name:"\u63A8\u8350\u81EA\u5B66",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png"},{name:"101\u8BA1\u5212",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png"},{name:"\u56FD\u5BB6\u4E00\u6D41",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png"},{name:"\u7701\u7EA7\u4E00\u6D41",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png"},{name:"\u7CBE\u54C1\u8BFE\u7A0B",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png"},{name:"\u519B\u961F\u4E00\u6D41",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png"},{name:"\u65B0\u578B\u6559\u6750",ptimg:"/images/xxjc.png",swimg:"/images/sw_xxjc.png"}];return fe.createElement(Be.Z,{spinning:yt},fe.createElement("div",{className:be()(Tt.list,Xe)},!!(kn!=null&&kn.length)&&(kn==null?void 0:kn.map((he,le)=>{var We;const{name:me,id:Je,identifier:fn,featured:sn,school_name:ui,image_url:hi,excellent:Si,is_plan:fr}=he;return fe.createElement("div",{key:Je,className:Tt.wrap,style:{width:Jt,marginRight:(1+le)%Ut===0?0:et+gt,marginBottom:nt}},fe.createElement("a",{className:Tt.li,onClick:qt=>{qt.preventDefault(),qt.stopPropagation(),ct&&(0,we.L9)([ct]),(0,we.xg)(`/paths/${fn}`)}},fe.createElement("div",{className:Tt.img},fe.createElement("img",{className:Tt.cover,src:`${hi}`}),Nt&&(0,De.bg)()&&(he==null?void 0:he.studying)&&fe.createElement("div",{className:`${Tt.movebq} user-path-items`,onClick:qt=>{qt.stopPropagation(),Lt(he)}},fe.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),fe.createElement("span",{className:"c-red"},"\u79FB\u9664")),(We=he==null?void 0:he.subject_tags)==null?void 0:We.map((qt,Ht)=>{var je,Nn;if(Ht===0){const He=(je=Ae.find(mn=>mn.name==qt))==null?void 0:je.swimg;return fe.createElement("img",{className:Tt.sign,src:He,style:{left:"-4px"}})}const Kn=(Nn=Ae.find(He=>He.name==qt))==null?void 0:Nn.ptimg;return fe.createElement("img",{className:Tt.sign,src:Kn,style:{left:`${48+52*(Ht-1)+2*Ht}px`}})}),fe.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(he==null?void 0:he.excellent)&&fe.createElement("div",{className:Tt.bq},"\u5F00\u653E\u8BFE\u7A0B"))),fe.createElement("div",{className:Tt.name},fe.createElement(Ne.Z,{title:Vt&&(he!=null&&he.excellent_alias_name)?fe.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${me}`,fe.createElement("br",null),fe.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${he==null?void 0:he.excellent_alias_name}`)):me},fe.createElement("span",{className:Tt.e},Vt&&(he==null?void 0:he.excellent_alias_name)||me))),fe.createElement(Ne.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${ui}`},fe.createElement("div",{className:Tt.unit},fe.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),ui)),fe.createElement("div",{className:Tt.tags},fe.createElement("div",null,fe.createElement(Ne.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},fe.createElement("span",null,fe.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),fe.createElement("span",null,he.stages_count))),fe.createElement(Ne.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},fe.createElement("span",null,fe.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),fe.createElement("span",null,he.members_count)))))))})),!kn.length&&fe.createElement(ne.Z,null)))}},30001:function(yn,qn,ee){"use strict";ee.d(qn,{jL:function(){return be},w9:function(){return je},QD:function(){return kr},cQ:function(){return hi.Z},op:function(){return Ln},O5:function(){return Dn},_b:function(){return Fo},t7:function(){return lt},Gi:function(){return Jn},YG:function(){return mn},qp:function(){return gn},vr:function(){return Es},qE:function(){return qi},Je:function(){return Lt},wb:function(){return ui},cq:function(){return Kt},tp:function(){return Ut}});var Tt=ee(67294),Be={flex_box_center:"flex_box_center___NeSU8",flex_space_between:"flex_space_between___ImTGl",flex_box_vertical_center:"flex_box_vertical_center___BtRd9",flex_box_center_end:"flex_box_center_end___qcLe3",flex_box_column:"flex_box_column___Ze_3q",banner:"banner___PoUBO",content:"content___XoDjy",btns:"btns___Pb35j"},Ne="data:image/png;base64,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",be=({dataSource:cn=[],img:un,imgWidth:wn=346,title:Hn,sunTitle:di,bannerExtraContent:ke})=>Tt.createElement("div",{className:Be.banner},Tt.createElement("div",{className:Be.content},Tt.createElement("aside",null,Tt.createElement("p",null,Tt.createElement("b",null,Hn),Tt.createElement("span",null,di)),cn.length>0&&Tt.createElement("div",{className:Be.btns},cn.map((Ee,ue)=>Tt.createElement("div",{key:ue,onClick:Ee.click},Ee.name,Ee.sign?Tt.createElement("img",{src:Ne,width:39}):null))),ke),un&&Tt.createElement("img",{style:{marginTop:33,marginRight:38},src:un,width:wn}))),we={flex_box_center:"flex_box_center___hG6RI",flex_space_between:"flex_space_between___ss3Fh",flex_box_vertical_center:"flex_box_vertical_center___K80p9",flex_box_center_end:"flex_box_center_end___qmXX3",flex_box_column:"flex_box_column___GFV8F",row:"row___aXJjm",title:"title___HUKL0",tagsWrap:"tagsWrap___XB2W3",action:"action___VdHb1",bar:"bar___t1kKC",tag:"tag___V7Eft",name:"name___Hk1Ip",num:"num___xQpcH",active:"active___XryTX",tagsBorderWrap:"tagsBorderWrap___OMxjs"},ne=ee(94184),De=ee.n(ne),fe=ee(96486),gn=({dataSource:cn=[],value:un,onChange:wn,onTitleChange:Hn,className:di,title:ke,titleWidth:Ee=41,style:ue={},fontColor:Ie="#6A7283",showCount:On})=>{const[zn,Zn]=(0,Tt.useState)(0),[Fe,Se]=(0,Tt.useState)(!1),Pn=(0,Tt.useRef)(null),ti=(0,Tt.useRef)(null);return(0,Tt.useEffect)(()=>{var nn;cn.length!==0&&(((nn=Pn==null?void 0:Pn.current)==null?void 0:nn.clientHeight)>97?Zn(1):Zn(0)),cn.length===0&&Zn(0),Se(!1)},[cn]),Tt.createElement("div",{className:De()(we.row,di),style:ue},Tt.createElement("div",{onClick:(0,fe.throttle)(()=>Hn==null?void 0:Hn(),2e3),style:{width:Ee,marginTop:Fe?12:4},className:`${we.title} ${Hn?"current":""}`},ke),Tt.createElement("div",{className:Fe?`${we.tagsWrap} ${we.tagsBorderWrap}`:we.tagsWrap},Tt.createElement("div",{className:we.bar,ref:ti,style:zn>0?{height:zn===1?97:"auto",overflow:zn===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},Tt.createElement("div",{className:we.tag,ref:Pn},cn==null?void 0:cn.map(nn=>Tt.createElement("span",{onClick:()=>wn(nn.id),key:nn.id,style:{color:Ie},className:un===nn.id?we.active:""},Tt.createElement("span",{title:nn.name,className:we.name},nn.name),!!On&&Tt.createElement("span",{className:we.num},nn.count))))),!!zn&&Tt.createElement(Tt.Fragment,null,zn===1?Tt.createElement("div",{onClick:()=>{var nn;Zn(2),((nn=Pn==null?void 0:Pn.current)==null?void 0:nn.clientHeight)>245?Se(!0):Se(!1)},className:we.action},"\u5C55\u5F00",Tt.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):Tt.createElement("div",{onClick:()=>{ti.current.scrollTop=0,Zn(1),Se(!1)},className:we.action},"\u6536\u8D77",Tt.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},Xe={flex_box_center:"flex_box_center___aK2n3",flex_space_between:"flex_space_between___HX0Oh",flex_box_vertical_center:"flex_box_vertical_center___LJOJr",flex_box_center_end:"flex_box_center_end___SCakF",flex_box_column:"flex_box_column___AYv4m",tabs:"tabs___GTqPV",active:"active___F26E8"},Ut=({dataSource:cn=[],value:un,onChange:wn,className:Hn,style:di={}})=>Tt.createElement("div",{style:di,className:De()(Xe.tabs,Hn)},cn.map(ke=>Tt.createElement("span",{onClick:()=>wn(ke.id),className:un===ke.id?Xe.active:"",key:ke.id},ke.name))),et={flex_box_center:"flex_box_center___yX6Oa",flex_space_between:"flex_space_between___t7oqF",flex_box_vertical_center:"flex_box_vertical_center___dEIHy",flex_box_center_end:"flex_box_center_end___taQDF",flex_box_column:"flex_box_column___xY_Lr",input:"input___PW2zI",dropdown:"dropdown___vSy8B",menu:"menu___NiyBu",text:"text___Grueu",b1:"b1___ZKryM",b2:"b2___aKyGa"},nt=ee(28802),lt=({dataSource:cn=[],value:un="",onChange:wn,onInputChange:Hn=()=>{},className:di,style:ke={},placeholder:Ee,allowClear:ue=!1})=>{var Ie;const[On,zn]=(0,Tt.useState)(""),[Zn,Fe]=(0,Tt.useState)("");(0,Tt.useEffect)(()=>{var ti;let nn=un;(ti=JSON.stringify(un))!=null&&ti.includes("{")&&(zn(un.id),nn=un.value||"");try{Fe(decodeURIComponent(nn||""))}catch(pe){Fe(decodeURIComponent(nn||""))}},[un]);const Se=()=>{wn(encodeURIComponent(Zn),On||null)},Pn=ti=>{ti!==On&&(zn(ti),wn(encodeURIComponent(Zn),ti))};return Tt.createElement("div",{className:De()(et.input,di),style:ke},!!cn.length&&Tt.createElement("div",{className:et.dropdown},Tt.createElement("div",{className:et.text},(Ie=cn.find(ti=>ti.id===On))==null?void 0:Ie.name,Tt.createElement("i",{className:"iconfont icon-zhankai4"}),Tt.createElement("b",{className:et.b1}),Tt.createElement("b",{className:et.b2})),Tt.createElement("div",{className:et.menu},cn.map((ti,nn)=>Tt.createElement("div",{key:nn,onClick:()=>Pn(ti.id)},ti.name)))),Tt.createElement(nt.default,{onPressEnter:Se,value:Zn,onChange:ti=>{Fe(ti.target.value),Hn(encodeURIComponent(ti.target.value),On||null)},bordered:!1,placeholder:Ee}),Tt.createElement("i",{onClick:Se,className:"iconfont icon-sousuo9 font14 pl10 current"}))},ct={flex_box_center:"flex_box_center___tol8o",flex_space_between:"flex_space_between___Z235C",flex_box_vertical_center:"flex_box_vertical_center___Wq1sZ",flex_box_center_end:"flex_box_center_end___LLxom",flex_box_column:"flex_box_column___DbMSN",quickPager:"quickPager___GM30J",disabled:"disabled___Ozc8I"},Lt=({value:cn,onChange:un,className:wn,total:Hn,pageSize:di,style:ke={}})=>{const Ee=cn<2,ue=cn>=Math.ceil(Hn/di);return Hn<=di?Tt.createElement(Tt.Fragment,null):Tt.createElement("div",{className:De()(ct.quickPager,wn),style:ke},Tt.createElement("div",{onClick:()=>{Ee||un(cn-1,"prev")},className:Ee?ct.disabled:""},"\u4E0A\u4E00\u9875"),Tt.createElement("div",{onClick:()=>{ue||un(cn+1,"next")},className:ue?ct.disabled:""},"\u4E0B\u4E00\u9875"))},Nt={flex_box_center:"flex_box_center___FO7TP",flex_space_between:"flex_space_between___LotYx",flex_box_vertical_center:"flex_box_vertical_center___bWdaw",flex_box_center_end:"flex_box_center_end___mVJ1o",flex_box_column:"flex_box_column___M83Mm",list:"list___oOsiS",wrap:"wrap___G6T7F",lockWrap:"lockWrap___Rl79E",li:"li___oZZ7l",cover:"cover___b2bYW",img:"img___IQX7w",sign:"sign___HkT6C",name:"name___SsJx8",e:"e___TMqq0",tags:"tags___bcjyo",rate:"rate___YACg7"},Vt=ee(74330),Jt=ee(83062),Ae=ee(57097),he=ee(11320),le=ee(28706),We=ee(96908),me=ee(57177),Je=ee(81378),fn=ee(26194),ui=({className:cn,dataSource:un=[],col:wn=4,right:Hn,bottom:di=23,precision:ke=0,wrapWidth:Ee=1200,trackEventItems:ue,loading:Ie})=>{const On=Math.floor((Ee-(wn-1)*Hn)/wn);return Tt.createElement(Vt.Z,{spinning:Ie},Tt.createElement("div",{className:De()(Nt.list,cn)},!!un.length&&un.map((zn,Zn)=>{const{name:Fe,id:Se,identifier:Pn,power:ti,cover_image_id:nn,pic:pe}=zn;return Tt.createElement("div",{className:Nt.wrap,key:Se,style:{width:On,marginRight:(1+Zn)%wn===0?0:Hn+ke,marginBottom:di}},Tt.createElement("a",{target:"_blank",href:`/shixuns/${Pn}/challenges`,className:Nt.li,onClick:Un=>{Un.preventDefault(),ue&&(0,le.L9)([ue]),ti&&(0,le.xg)(`/shixuns/${Pn}/challenges`)}},Tt.createElement("div",{className:Nt.img},Tt.createElement("img",{className:Nt.cover,src:`${pe}`}),zn.is_jupyter&&Tt.createElement("img",{className:Nt.sign,src:We}),zn.is_jupyter_lab&&Tt.createElement("img",{className:Nt.sign,src:me}),zn.is_unity_3d&&Tt.createElement("img",{className:Nt.sign,src:Je})),Tt.createElement("div",{className:Nt.name},Tt.createElement(Jt.Z,{title:Fe||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},Tt.createElement("span",{className:Nt.e},Fe||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),Tt.createElement("div",{className:Nt.tags},Tt.createElement(Jt.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},Tt.createElement("span",null,Tt.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),Tt.createElement("span",null,zn.challenges_count))),!!zn.myshixuns_count&&Tt.createElement(Jt.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},Tt.createElement("span",null,Tt.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),Tt.createElement("span",null,zn.myshixuns_count))),Tt.createElement(Jt.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},Tt.createElement("span",null,Tt.createElement("span",null,zn.level))),Tt.createElement("div",{className:Nt.rate},Tt.createElement(Ae.Z,{allowHalf:!0,disabled:!0,defaultValue:zn.score_info}),Tt.createElement("span",null,"\xA0",zn.score_info?`${zn.score_info}\u5206`:"5\u5206")))),!ti&&Tt.createElement("div",{className:Nt.lockWrap},Tt.createElement("img",{src:`${he.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),Tt.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!un.length&&Tt.createElement(fn.Z,null)))},hi=ee(5476),Si={flex_box_center:"flex_box_center___eMcr7",flex_space_between:"flex_space_between___HcNca",flex_box_vertical_center:"flex_box_vertical_center___ZnvVN",flex_box_center_end:"flex_box_center_end___fdgDf",flex_box_column:"flex_box_column___SEKvd",list:"list___L1hmU",wrap:"wrap___pKgcW",lockWrap:"lockWrap___SMhkK",top:"top___udHSB",sign:"sign___uwRpq",name:"name___Fpf90",img:"img___AMLhL",text:"text___KiTb7",btns:"btns___i6IuZ",bottom:"bottom____k2sh"},fr="data:image/png;base64,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",qt=ee(67294),je=({className:cn,dataSource:un=[],col:wn=4,right:Hn,bottom:di=23,precision:ke=0,wrapWidth:Ee=1200,trackEventItems:ue,loading:Ie,handleVery:On=()=>!0})=>{const zn=Math.floor((Ee-(wn-1)*Hn)/wn);return qt.createElement(Vt.Z,{spinning:Ie},qt.createElement("div",{className:De()(Si.list,cn)},!!un.length&&un.map((Zn,Fe)=>{const{subject_identifier:Se,id:Pn,identifier:ti,power:nn}=Zn,pe=Zn.is_public!=0&&Zn.is_public;return qt.createElement("div",{className:Si.wrap,key:Pn,style:{width:zn,marginRight:(1+Fe)%wn===0?0:Hn+ke,marginBottom:di}},qt.createElement("a",{className:Si.li,onClick:Un=>{Un.preventDefault(),On(Zn==null?void 0:Zn.first_category_url)&&(ue&&(0,le.L9)([ue]),(0,le.xg)(Zn.first_category_url))}},qt.createElement("div",{className:Si.top},qt.createElement(Jt.Z,{title:Zn.name},qt.createElement("div",{className:Si.name},Zn.name)),qt.createElement("img",{className:Si.img,src:he.Z.IMG_SERVER+"/images/"+Zn.avatar_url}),qt.createElement("div",{className:Si.text,title:Zn.creator},Zn.creator),Se&&qt.createElement("div",{className:Si.btns},qt.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),qt.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),pe&&qt.createElement("div",{className:Si.sign},"\u516C\u5F00")),qt.createElement("div",{className:Si.bottom},Zn.visits>0&&qt.createElement(Jt.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},qt.createElement("span",null,qt.createElement("i",{className:"iconfont icon-liulanyan"}),qt.createElement("span",null,Zn.visits))),Zn.course_members_count>0&&qt.createElement(Jt.Z,{title:"\u6210\u5458",placement:"bottom"},qt.createElement("span",null,qt.createElement("i",{className:"iconfont icon-chengyuan"}),Zn.course_members_count)),Zn.tasks_count>0&&qt.createElement(Jt.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},qt.createElement("span",null,qt.createElement("i",{className:"iconfont icon-zuoye"}),Zn.tasks_count)),Zn.is_end?qt.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):qt.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!Zn.is_accessible&&qt.createElement("div",{className:Si.lockWrap},qt.createElement("img",{src:`${he.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),qt.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!un.length&&qt.createElement(fn.Z,null)))},Nn={flex_box_center:"flex_box_center___d27mZ",flex_space_between:"flex_space_between___qfRU9",flex_box_vertical_center:"flex_box_vertical_center___fCRld",flex_box_center_end:"flex_box_center_end___ORMV8",flex_box_column:"flex_box_column___PNKtZ",tabs:"tabs___alpa7",tabsWrap:"tabsWrap___aCQjw",tab:"tab___MKLr4",active:"active___nl_4v"},Kn=ee(35973),mn=({dataSource:cn=[],value:un,onChange:wn,className:Hn,style:di={},tabBarExtraContent:ke})=>Tt.createElement("div",{className:De()(Nn.tabs,Hn),style:di},Tt.createElement("div",{className:Nn.tabsWrap},cn.map((Ee,ue)=>!(Ee!=null&&Ee.hide)&&Tt.createElement("aside",{className:Nn.tab,onClick:()=>{wn(Ee.id),Ee.link&&Kn.history.push(Ee.link)},key:ue},Tt.createElement("div",{className:un===Ee.id?Nn.active:""},Ee.name),(Ee==null?void 0:Ee.resetCount)==null&&(Ee==null?void 0:Ee.total)!==void 0&&Tt.createElement("span",null,"\uFF08",Ee==null?void 0:Ee.total,"\uFF09"),(Ee==null?void 0:Ee.resetCount)!==void 0&&(Ee==null?void 0:Ee.total)!==void 0&&Tt.createElement(Jt.Z,{title:(Ee==null?void 0:Ee.tip)!=null?Ee==null?void 0:Ee.tip:""},Tt.createElement("span",{style:{color:"#9096A3"}},"\uFF08",Tt.createElement("span",{style:{color:"#000"}},Ee==null?void 0:Ee.resetCount),"/",Tt.createElement("span",null,Ee==null?void 0:Ee.total),"\uFF09"))))),Tt.createElement("div",{className:Nn.tabBar},ke)),Jn=({className:cn,style:un={},children:wn})=>Tt.createElement("div",{className:De()(cn),style:un},wn),bn={flex_box_center:"flex_box_center___e6HxQ",flex_space_between:"flex_space_between___RnXYe",flex_box_vertical_center:"flex_box_vertical_center___lVxPk",flex_box_center_end:"flex_box_center_end___bu8yv",flex_box_column:"flex_box_column___JczGj",orderWrap:"orderWrap___ZfyGX",orderIconWrap:"orderIconWrap___XTB_O",orderAsc:"orderAsc___KWHmA",orderDesc:"orderDesc___rHdbB",active:"active___a7eSP",cursorPointer:"cursorPointer___gs9kL",orderTextWrap:"orderTextWrap___teAKn"},ve=ee(85418),Le=ee(50136);const Sn=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var Kt=({sortValue:cn,dropValue:un,className:wn,onSort:Hn,onDrop:di,dataSource:ke=Sn})=>{var Ee;return Tt.createElement("div",{className:De()(bn.orderWrap,wn)},Tt.createElement(ve.Z,{dropdownRender:()=>Tt.createElement(Le.default,null,ke.map((ue,Ie)=>Tt.createElement(Le.default.Item,{key:Ie,onClick:()=>di(ue.id)},ue.name)))},Tt.createElement("span",{className:bn.orderTextWrap},(Ee=ke.find(ue=>un===ue.id))==null?void 0:Ee.name)),Tt.createElement("span",{className:bn.orderIconWrap},Tt.createElement("span",{className:bn.orderAsc},Tt.createElement("i",{className:cn==="asc"?`iconfont icon-sanjiaoxing-up font12 ${bn.cursorPointer} ${bn.active}`:`iconfont icon-sanjiaoxing-up font12 ${bn.cursorPointer}`,onClick:()=>Hn(cn==="asc"?"desc":"asc")})),Tt.createElement("span",{className:bn.orderDesc},Tt.createElement("i",{className:cn==="desc"?`iconfont icon-sanjiaoxing-down font12 ${bn.cursorPointer} ${bn.active}`:`iconfont icon-sanjiaoxing-down font12 ${bn.cursorPointer}`,onClick:()=>Hn(cn==="asc"?"desc":"asc")}))))},Et={flex_box_center:"flex_box_center___LCi0B",flex_space_between:"flex_space_between___hzONe",flex_box_vertical_center:"flex_box_vertical_center___ZyQRE",flex_box_center_end:"flex_box_center_end___XKM74",flex_box_column:"flex_box_column___p8LCU",btn:"btn___In02G","mediacy-round":"mediacy-round___uveEv","mediacy-default":"mediacy-default___dDxsd",default:"default___K791v"},Ft=ee(85804),Dt=Object.defineProperty,Wt=Object.getOwnPropertySymbols,kt=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,Tn=(cn,un,wn)=>un in cn?Dt(cn,un,{enumerable:!0,configurable:!0,writable:!0,value:wn}):cn[un]=wn,Ei=(cn,un)=>{for(var wn in un||(un={}))kt.call(un,wn)&&Tn(cn,wn,un[wn]);if(Wt)for(var wn of Wt(un))Ue.call(un,wn)&&Tn(cn,wn,un[wn]);return cn},Xn=(cn,un)=>{var wn={};for(var Hn in cn)kt.call(cn,Hn)&&un.indexOf(Hn)<0&&(wn[Hn]=cn[Hn]);if(cn!=null&&Wt)for(var Hn of Wt(cn))un.indexOf(Hn)<0&&Ue.call(cn,Hn)&&(wn[Hn]=cn[Hn]);return wn},si=(cn,un,wn)=>new Promise((Hn,di)=>{var ke=Ie=>{try{ue(wn.next(Ie))}catch(On){di(On)}},Ee=Ie=>{try{ue(wn.throw(Ie))}catch(On){di(On)}},ue=Ie=>Ie.done?Hn(Ie.value):Promise.resolve(Ie.value).then(ke,Ee);ue((wn=wn.apply(cn,un)).next())}),Ln=cn=>{var un=cn,{className:wn,style:Hn,children:di,loading:ke=!1,openLoading:Ee,onClick:ue=()=>{},size:Ie="middle",shape:On="round"}=un,zn=Xn(un,["className","style","children","loading","openLoading","onClick","size","shape"]);const[Zn,Fe]=(0,Tt.useState)(!1);return Tt.createElement(Ft.ZP,Ei({onClick:(0,fe.throttle)(Se=>si(void 0,null,function*(){Ee&&Fe(!0);try{yield ue(Se)}catch(Pn){console.log("error",Pn)}Ee&&Fe(!1)}),2e3,{leading:!0,trailing:!1}),className:De()(Et.btn,Et[`${Ie}-${On}`],wn),style:Hn,size:Ie,shape:On,loading:Zn||ke},zn),di)},Ci={flex_box_center:"flex_box_center___TB7bQ",flex_space_between:"flex_space_between___oBlTb",flex_box_vertical_center:"flex_box_vertical_center___b5XbB",flex_box_center_end:"flex_box_center_end___CNhe7",flex_box_column:"flex_box_column___yHXKW",head:"head___ghH72",node:"node___mjPEy"},qi=({className:cn,style:un,children:wn=null,onClick:Hn,title:di})=>Tt.createElement("div",{className:De()(Ci.head,cn),style:un},Tt.createElement("span",{className:"primary-hover",onClick:Hn},Tt.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),Tt.createElement("b",{title:di},di),Tt.createElement("div",{className:Ci.node},wn)),fi={flex_box_center:"flex_box_center___AlHuF",flex_space_between:"flex_space_between___vN2LW",flex_box_vertical_center:"flex_box_vertical_center___Ac7D2",flex_box_center_end:"flex_box_center_end___y38I7",flex_box_column:"flex_box_column___iQE6P",btns:"btns___sNgTb",confirm:"confirm___Ozirl",cancel:"cancel___aiq1I"},kr=({confirmShow:cn=!0,confirmTitle:un,confirmClick:wn,cancelShow:Hn=!0,cancelTitle:di,cancelClick:ke,className:Ee,style:ue,confirmLoading:Ie=!1})=>Tt.createElement("div",{className:De()(fi.btns,Ee),style:ue},cn&&Tt.createElement(Ft.ZP,{loading:Ie,onClick:wn,type:"primary",className:fi.confirm},un),Hn&&Tt.createElement(Ft.ZP,{onClick:ke,className:fi.cancel},di)),yr={flex_box_center:"flex_box_center___jkpdr",flex_space_between:"flex_space_between___OtsL8",flex_box_vertical_center:"flex_box_vertical_center___rbcb_",flex_box_center_end:"flex_box_center_end___zBR21",flex_box_column:"flex_box_column___nS_eP",fixedBottom:"fixedBottom___oJl7m",wrap:"wrap___A3Oq1",center:"center____VL1y"},Es=({className:cn,style:un={},LeftContent:wn,children:Hn,RightContent:di})=>Tt.createElement("div",{className:De()(yr.fixedBottom,cn),style:un},Tt.createElement("div",{className:yr.wrap},Tt.createElement("div",{className:yr.left},wn),Tt.createElement("div",{className:yr.center},Hn),Tt.createElement("div",{className:yr.right},di))),Wr={flex_box_center:"flex_box_center___tY8Yn",flex_space_between:"flex_space_between___vHdYA",flex_box_vertical_center:"flex_box_vertical_center___pa61F",flex_box_center_end:"flex_box_center_end___HyDXt",flex_box_column:"flex_box_column___UjZek",crumbs:"crumbs___V41Oe",hover:"hover___bEIVd"},Fo=({className:cn,style:un={},dataSource:wn=[]})=>Tt.createElement("div",{className:De()(Wr.crumbs,cn),style:un},wn.map((Hn,di)=>di<wn.length-1?Tt.createElement(Tt.Fragment,{key:di},Hn.path||Hn.onClick?Tt.createElement("span",{className:Wr.hover,onClick:Hn!=null&&Hn.onClick?Hn.onClick:()=>Kn.history.push(Hn.path)},Hn.name):Tt.createElement("span",null,Hn.name),Tt.createElement("span",null,"\xA0",">","\xA0")):Tt.createElement("span",{key:di,style:{color:"#5F6368"}},Hn.name))),$r=ee(55054),ur=Object.defineProperty,So=Object.defineProperties,Er=Object.getOwnPropertyDescriptors,bo=Object.getOwnPropertySymbols,Ss=Object.prototype.hasOwnProperty,Ms=Object.prototype.propertyIsEnumerable,$s=(cn,un,wn)=>un in cn?ur(cn,un,{enumerable:!0,configurable:!0,writable:!0,value:wn}):cn[un]=wn,xo=(cn,un)=>{for(var wn in un||(un={}))Ss.call(un,wn)&&$s(cn,wn,un[wn]);if(bo)for(var wn of bo(un))Ms.call(un,wn)&&$s(cn,wn,un[wn]);return cn},er=(cn,un)=>So(cn,Er(un)),en=(cn,un)=>{var wn={};for(var Hn in cn)Ss.call(cn,Hn)&&un.indexOf(Hn)<0&&(wn[Hn]=cn[Hn]);if(cn!=null&&bo)for(var Hn of bo(cn))un.indexOf(Hn)<0&&Ms.call(cn,Hn)&&(wn[Hn]=cn[Hn]);return wn};const{Countdown:Bt}=$r.default;var Dn=cn=>{var un=cn,{onChange:wn}=un,Hn=en(un,["onChange"]);const[di,ke]=(0,Tt.useState)(null);(0,Tt.useEffect)(()=>{typeof di=="number"&&di>=0&&wn(di)},[di]);const Ee=ue=>{const Ie=Math.floor(ue/1e3);ke(Ie)};return Tt.createElement(Bt,er(xo({},Hn),{onChange:Ee}))}},99914:function(yn,qn,ee){"use strict";ee.d(qn,{Z:function(){return Be}});var Tt=ee(67294);function Be(Ne,ln){const be=(0,Tt.useRef)();(0,Tt.useEffect)(()=>{be.current=Ne}),(0,Tt.useEffect)(()=>{function we(){be.current()}if(ln!==null){let ne=setInterval(we,ln);return()=>clearInterval(ne)}},[ln])}},15210:function(yn,qn,ee){"use strict";ee.r(qn),ee.d(qn,{default:function(){return ve}});var Tt=ee(67294),Be=ee(2453),Ne=ee(62844),ln=ee(74330),be=ee(55241),we=ee(98813),ne=ee(78957),De={flex_box_center:"flex_box_center___Ja97S",flex_space_between:"flex_space_between___RJu4E",flex_box_vertical_center:"flex_box_vertical_center___jhPTF",flex_box_center_end:"flex_box_center_end___ZtezU",flex_box_column:"flex_box_column___MqeI4",wrap:"wrap___k3OOZ",head:"head___h6t3O",empty:"empty___S6QaM",content:"content___sMZPl",left:"left___J41Si",title:"title___GUZvZ",add:"add___zhwIv",leftBar:"leftBar___u_UUF",li:"li___Hnrra",active:"active___N4MxL",right:"right___eLWWO",rightBar:"rightBar___fMTLo",center:"center____NDzP",tabs:"tabs___jdS5u",cut:"cut___w1Pz_",action:"action___QkQ0f",tagBtn:"tagBtn___g2gHo",actActive:"actActive___ESHzD",answers:"answers___dVktP",btn:"btn___BnDvU",disableBtn:"disableBtn___WYJSQ",open_md:"open_md___Qcc2e",tip_container:"tip_container___cApBC",container_text:"container_text___riFvY",btn_send:"btn_send___jN38z",hide:"hide___wZuLt","md-container":"md-container___Am7nQ",unsolved:"unsolved___z4SON",box:"box____EpoE",hot:"hot___oUwVX",animation:"animation___YQjk7",stop:"stop___R1QBJ",disabledElement:"disabledElement___jKwzo",text:"text___Si2da",md_editor:"md_editor___vGEmh"},fe=ee(33170),Qe=ee(35973),gn=ee(28706),Xe=ee(11320),kn=ee(39132),Ut=ee(94699),et=ee.n(Ut),nt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAHgCAYAAAB91L6VAAAAAXNSR0IArs4c6QAAQABJREFUeAHtnQecVcXZ/+fctnc7ve+ilCCINJWo2IgQS2J7TUhilBQNxsSQ2NONpmlM3uQ1/k3QxJqYhJhYo1GjooCiIoogIKDiLh0Wlu23nv8zF5bcu+zdvWVmzsw5v/l8LnvKnOd55juH+9xpz1i2bfsZEgiAAAiAAAiAgFICPqXaoAwEQAAEQAAEQCBFAA4YLwIIgAAIgAAIOEAADtgB6FAJAiAAAiAAAnDAeAdAAARAAARAwAECcMAOQIdKEAABEAABEIADxjsAAiAAAiAAAg4QgAN2ADpUggAIgAAIgAAcMN4BEAABEAABEHCAABywA9ChEgRAAARAAATggPEOgAAIgAAIgIADBOCAHYAOlSAAAiAAAiAAB4x3AARAAARAAAQcIAAH7AB0qAQBEAABEAABOGC8AyAAAiAAAiDgAAE4YAegQyUIgAAIgAAIwAHjHQABEAABEAABBwjAATsAHSpBAARAAARAAA4Y7wAIgAAIgAAIOEAADtgB6FAJAiAAAiAAAnDAeAdAAARAAARAwAECcMAOQIdKEAABEAABEIADxjsAAiAAAiAAAg4QgAN2ADpUggAIgAAIgAAcMN4BEAABEAABEHCAABywA9ChEgRAAARAAATggPEOgAAIgAAIgIADBOCAHYAOlSAAAiAAAiAAB4x3AARAAARAAAQcIAAH7AB0qAQBEAABEAABOGC8AyAAAiAAAiDgAAE4YAegQyUIgAAIgAAIwAHjHQABEAABEAABBwjAATsAHSpBAARAAARAAA4Y7wAIgAAIgAAIOEAADtgB6FAJAiAAAiAAAnDAeAdAAARAAARAwAECcMAOQIdKEAABEAABEIADxjsAAiAAAiAAAg4QgAN2ADpUggAIgAAIgAAcMN4BEAABEAABEHCAABywA9ChEgRAAARAAATggPEOgAAIgAAIgIADBOCAHYAOlSAAAiAAAiAAB4x3AARAAARAAAQcIAAH7AB0qAQBEAABEAABOGC8AyAAAiAAAiDgAAE4YAegQyUIgAAIgAAIwAHjHQABEAABEAABBwjAATsAHSpBAARAAARAAA4Y7wAIgAAIgAAIOEAADtgB6FAJAiAAAiAAAnDAeAdAAARAAARAwAECcMAOQIdKEAABEAABEIADxjsAAiAAAiAAAg4QgAN2ADpUggAIgAAIgAAcMN4BEAABEAABEHCAABywA9ChEgRAAARAAATggPEOgAAIgAAIgIADBOCAHYAOlSAAAiAAAiAAB4x3AARAAARAAAQcIAAH7AB0qAQBEAABEAABOGC8AyAAAiAAAiDgAAE4YAegQyUIgAAIgAAIwAHjHQABEAABEAABBwjAATsAHSpBAARAAARAAA4Y7wAIgAAIgAAIOEAADtgB6FAJAiAAAiAAAnDAeAdAAARAAARAwAECcMAOQIdKEAABEAABEIADxjsAAiAAAiAAAg4QgAN2ADpUggAIgAAIgAAcMN4BEAABEAABEHCAABywA9ChEgRAAARAAATggPEOgAAIgAAIgIADBAIO6IRKLxNYtMjafc01A9sjkeEsFhvGP0nLGshsuw/9Gqy2bbua8PQ58Km2GSuxbDvILCtIx0GOzufz3R6eNu3mgQsXtvNzJBAAARAwkQAcsIm1prnNe2fPrmjZvn0si0TG2onEWDL3I3YyOdqyrOF0PJScbLfvXTJLucjxMnLQ/N8XSqqrvzHkrbfW8RMkEAABEDCZQLdfhCYXCLYrJECt2e1XXfWReEvLFHKwU/mHHOUEcpVDu7OCHG93l3u/Zlk7/X7/VSM2bPhr75mRAwRAAATMIAAHbEY9aWHl5hNOGGLv3HkiGXMitWyn0d/J5FLLZRpHreblwX79Lhi6fPkWmXogGwRAAARUE4ADVk3cIH2bjz76cLu5+aRkInESjcOeRC3YMSrNt3y+P9fOmjWPLVgQUakXukAABEBABQE4YBWUTdFx2WUlmxctOoVat2fR50xq3Y7uNL3AzuPOx/P6azGWsPz+b9ds3PjrvB5EZhAAARAwiAAcsEGVJcPULccdNzTZ0HA2d7g0fnsaOdoyGXpylmlZMSsU+nTNunVP5PwMMoIACICAgQTggA2stGJN3jFjRv/ozp0XUNfyZ1Jdy7Syp1iZIp7nLV8WCl0E5yuCJmSAAAjoTgAOWPcaEmRf48yZlc1btpxvx+OfIZGndS4FUtm13FNRyPnazO+/pHbdun/0lA/3QAAEQMAtBOCA3VKTWcqxZfz46YlodB5LJuc43r2cxUZ+2QoErqjZsOFPPWTBLRAAARBwFQE4YFdV5/7C7DvppKqm7dsvpC7meTSuO0n3Ivr8/p+Q812gu52wDwRAAAREEoADFknTYVnbJk0aG2tru4olEp/XubWbjonW+b5Uc911N6VfwzEIgAAIeIEAzcGx/V4oqJvLuPWooz4aa2m5hsZRzyXHq8WEqlx4k70NgYEDpw577bWtueRHHhAAARBwEwG0gA2uzfojjviEHY1eQz+iTuLF0GVCVa5IrZKSS+B8c6WFfCAAAm4jAAdsYI3SxKoz4x0dPybTpxhofspkGve9HcuNTK092A0CICCCABywCIqKZGweP/7EZCTyE2rx8njM5ibL2lVx+OHfN7cAsBwEQAAEiicAB1w8Q+kS6o86amqypYW3eM+QrkyBApp49dO+zz7bokAVVIAACICAtgTggLWtGsZ2TZ8+sL2h4ee0hvcLZCbNWTI/USHerz35ZCw5Mr8qUQIQAIEiCRgzY7bIcpr1+J13+upGj76ibdeutbTH7hdpcpUrnC+vBF8w+AN2zz0xsyoE1oIACICAeAJYhiSeaVESaZz3JBrnvY3GeY8qSpCOD1vW2yPff5/vI4wEAiAAAp4ngC5oTV6BLbNm9Uls2vRr2pXoYk1MEm4GzXy+V7hQCAQBEAABQwnAAWtQcan1vJHI76mreagG5kgxgfrQE6WDB/9NinAIBQEQAAEDCcABO1hpTWecUd24ceNv3NzqPYjXsp4fsGTJjoPnOAABEAABjxOAA3boBeDBNBIdHQuo1TvMIROUqrV8vgeVKoQyEAABENCcAGZBq66g+fMDNMP5VxTJ6nHPOF/LilPgjYdVo4Y+EAABENCZAGZBK6ydHZMn10aam/9KM5ynK1TruCoa/11R+8EHniqz49BhAAiAgPYE0AWtqIrqx407mzZOuJtavX0VqdRHjc/3mj7GwBIQAAEQ0IMAuqBl18ONN/o/HD361mQ0+rAnnS/na1lrZGOGfBAAARAwjQBawBJrLDXLef36vzHbniVRjfaiaf3vZu2NhIEgAAIgoJgAHLAk4FumTBkdb2p6jJzvOEkqzBEbCGw1x1hYCgIgAAJqCMABS+C85YgjTk5EIn8n0f0liDdOpD8QQOxn42oNBoMACMgmgDFgwYQ3jx37xXg0+jSN98L5HmCbTCSSgjFDHAiAAAgYTwAOWGAVfjhmzHcT8fgfqNs5KFCs8aKSyWSV8YVAAUAABEBAMAF0QQsCWj9mzC0skbhakDh3iYlGPRHty12VhtKAAAjIJoBAHMUSXrTIqrv00jsonvNXihXl4udfoFCUK11cPhTNYQI05GNblhWjoC8xCnQTo/ctluR/Dxx3Xkv95deCwTiNi0TpmX2W39/oLylpDA4fvnfAo4+2OVwUqPcQATjgYiqbr/G9//77WDL52WLE4FkQAAE9CJBDjpMljRkfy2qkteyN5NwbydHvor91dji8ORgO1w2dN28bmzcPcxz0qD7jrIADLrTKeEznJ574O/2iPrtQEXgOBEDAbALcYZNT3ppyypa1mc7r+IfR2ne/319XOmzY+32ffbbF7FLCelkE4IALIXvnnb66m29+kJzvpwp5HM+AAAh4gwA5ZvLPbBO1oN+mbvHV5JhXBcvLVw356lc3oOXsjXegp1LCAfdEJ8u9ujFj7qYx37lZbuMyCIAACPRGoIOc8xpyzKvIMa9iweCqkurqlYOWLdvd24O47x4CcMB51mX96NG30bKar+X5GLKDAAiAQC4E1jKfb5EvEHixpG/fRXDIuSAzNw8ccB51R/v4/tROJq/P4xFkBQEQAIGCCVAr+R1qIS+yg8EXS/r3f3Hw0qUNBQvDg9oRgAPOsUqo2/lq6na+JcfsyAYCIAACQgmkxpMtazVvIftDoaeHz5r1H3bbbXzWNpKhBOCAc6i4zePHn5fs6Pg7zaag/wNIIAACIOA8Afoy2kOt44dZKLSw5sorX8CkLufrJF8L4IB7IVY/ceI0u7V1ETnfsl6y4jYIgAAIOEPAsnbR8qd/+IPBhcN///vF7NRT+exrJM0JwAH3UEHbjjlmeKyh4RV6kxFKsQdOuAUCIKAPAWoZb6PlTg+xcHhh7erVr+hjGSzpSgAOuCuRA+e7zz23rPXtt1+i0ylZsuAyCIAACOhNwLLW+/z+34SOP/7+wfff36G3sd6zDg44S53XjRr1Dwq0cW6W27gMAiAAAsYQoFZxA8W8/n3pkCF3DFiyZIcxhrvcUDjgbiqYlhtdQ8uNbu7mFi6BAAiAgLkELCtKzvgv/rKyXw9fvXq1uQVxh+VwwF3qsf7II0+w29ufp9YvtmrswganIAAC7iFAk7ae9YXDvxmxZs3T7imVWSWBA06rrx0zZvSPbN26giZdDU+7jEMQAAEQcC8BilPtKym5tmbt2ufcW0g9SwYHnFYvNO77L2r5np52CYcgAAIg4AkC1CJ+zF9Vde3wt956zxMF1qCQPg1s0MKE+jFjvgPnq0VVwAgQAAEHCND33znxpqZV9F14c+PMmZUOmOA5lWgBU5VvmTDh2ER7+xLqevZ77g1AgUEABECgKwHL2klRtr5f+4c/3IOgHl3hiDuHA77sspIPn3lmOSEdLw4rJIEACICAKwi86Q+Hrxqxdu1iV5RGs0J43gFTd8styUTias3qBeaAAAiAgDYEqDV8b9nEifMHPPpomzZGucAQTzvgrRMnHhdvbX2Jup4xFu6ClxlFAAEQkEjAst4NlpZ+btg777wtUYunRHvW8eyYOzcca2u7G87XU+87CgsCIFAoAdseF2tvf4W2Zv1aoSLwXCYBz7aAKdrVryja1TczceAMBEAABEAgBwKPhA477CtDX3hhbw55kSULAU864G2TJk2JNTe/htZvlrcCl0EABECgFwK0brjeCocvqlmzZmkvWXE7CwFPdkGT870NzjfLG4HLIAACIJADAVo3XMPD9lJv4vfYokUUYhopXwKeawHT+MVFdiJxb76gkB8EQAAEQCArgYdHHnvs59nChdGsOXDjEAKecsA8usu+Dz9cx2x78CEkcAEEQAAEQKBgAtQl/VzFEUf8T78nn2wtWIjHHvRUF3RTXd2P4Hw99oajuCAAAkoIUJf0aS3r1j27bebMvkoUukCJZ1rAmydNmpBsaVlBLwm2GXTBi4sigAAI6EmABoPX+AcPPn34smXb9LRQH6s80wJONDffAuerz4sHS0AABNxJgCa4Tojv2LF4y5Qpo91ZQnGl8oQDrp8wYQYhO1McNkgCARAAARDogcBhtLPSS1smTjyqhzyev+UJB2x3dPzE8zUNACAAAiCgkgBNdqVQvy/wkL8q1Zqky/UOePOECadT1/NJJlUKbAUBEAABlxDoE2ttfWLzUUcd6ZLyCC2G6x1wsr39x0KJQRgIgAAIgEA+BPrQBNgnt0+dWpPPQ17I62oHXD9u3KdoQsA0L1QkyggCIAACuhKg7+HhkcbGJ7FEKbOGXO2Ak9HoDZnFxRkIgAAIgIBDBMbHNm16lM2ZE3JIv3ZqXeuAN48bdw7RHq8dcRgEAiAAAh4lQC3hE+rfeON2jxb/kGK71gFT6/eaQ0qLCyAAAiAAAo4SSCaTX64fO/YyR43QRLkrI2HVTZx4vN3aulgTxjCjFwI+n+9BZllbe8lW2G3bLqP/8O7dQNyy1hO/xwqDg6cKIUD7iH+rp6A+PCay5fO9WYjsbM9Qy7GKNpGZl+2+cdctK+YLh2d5fStDVzrgDw8//CF6Ic8z7qX0qMFDHnqIlRx9tJTS2y0trO4o98YCKD/zTDbgjjuksIPQ7glQYB9Gqyu6v0lX+/3oR6zyC1/Ier+QG9GVK9m281z3lba9vH//aQOWL99ZCBM3POO6LuhtkyaNpVikfPwXyRQC8bg0S62SEmmyIRgEVBGI19erUqVSz5DWhoY/qFSomy7XOeBYW9vV1F3junLp9uKItIe69ESKy5QVDFLvNvYKz4SCM9MIuNQB82o4i/Zod+8QUS8vmqsc1faTT+5H4yQX9VJm3NaNgMQWcKqoIax60K3KYU9+BOJ1dfk9YFBu+s7+Bd+tziCThZnqKgcc27btYiITFkYHgtQQkNkCphJYAexAqaYioUUWARe3gDmycKKl5QE2f77n/qO6ygEn4/FLZf0HKEZuxQUXsMF//jPrd9NNrGruXFY6YwYLDBlSjEhXPWtLbgHDAbvqdfFkYdzcAk5VqG1Prn/ySc8tHXXNL44DWw5qGXgjMHIkC59wQuqT/u1BS6VY7L33WGzjxv1/+TF94h9+yOxYLD2ru48lt4AZWsDufn/cXjr6/xHf5v697ZOJxPdpD+G/D3/rrffcXqWd5XONA7Yjka90Fkq3v/7+/bs1ySovZ6FJk1KfjAyJRMoJp5xzFwedbG7OyOqGE+ktYL/fDZhQBo8SSJDzlf1/RBO04URT0/8jW87QxB7pZrjCATedcUY1SyYvkE6rQAW+vn3ze5IcRmDUqNSndPbsjGcTO3fubyV3ccxG/0KmHxxSExywVLwQnknAEvy+xVw8ASuTHGMU4GQWzYr+fO3GjX/ues+N565wwI0bN15ES49Kda0gf79+wkzzDxrE+Icdf3yGzFR39vvvZ3ZnU9e2Cd3ZNAsyoyzCT3yumuogHA8EiiVgVVQIFejyCViHsKJlib/Yc9ZZj/R78snWQ2667IIrHDBV2Jd1rhefQAecrZyp7myK+BTqGvWpa3f2gXFm3r2dbGrKJk7tddkOGOuA1danx7X5qquFEnD9BKyutGx7cOv69ddRs+WGrrfcdm68A94+bdo46reYrHPFiGwB513Onrqzd+1i8S5d2XxCmNHd2XkDwgMgIJaAr6pKqECvtYA5POoVu3Lr9OkLhr32mpwY8UJrqHBhxjvg6L59cwovvvwneRSmvMeA5ZuV0uAfOJDxT8lxx2VotNvaWCy9O5s7Ze6o+ezsaDQjrwknFBjfBDNho0sIwAEXX5E0pFgWb2i4iSRdWrw0fSUY74Cp+1lrB5zqjjLMAVhlZSw0cWLqk/Hq8u5smhCy8ytfSU0Ey7in8wm6oHWuHdfZBgcsqEqTyblbJk78v+GrV68SJFE7MUY3DahyJhJRLdf+dta0ivHfTl3S//Lu7MMPZ8ndu6WrEqrApt/TSCCggADv8fLnu+qhB7ts2nUpuWdPDznce4v+1/rira0/cG8JGTO6BRzv6NC69ctfHEfHfyW8ucmGBpbYt0+CZHkipW72IM9sSDaQgG/AAMYExh63SktZLQ3/pBL/IcmD1vAPHafea35MPVO0fCf1l987eP1A3tQqAz7RkT/D//IPz3fguPNv6hqPSkfXU+uOO//SNR4YiF9LDUHRMBT/m6ShqiTNI4muX8+ib7213wbBdUbbqJzP40SPePvtNYJFayHOaAdsJZOf1r1t46oWML2yfPY0EgiAQPcEAjU13d8QcZUPpfA1xgfWGafv8ZV+LEJVvjL4RLGGa69lHa++mu+jPean73cr0dr6Xcrkyk12jO2Cpn1/p9CvvrE91p4GN93WAuaTs4xLvCWABAIKCEh1wArsL1QFL/eg++5jwdraQkVkfY43tLZOnjwmawaDbxjrgGPt7eeYwF3XGdCFsjOyBcy755BAQAGBwIgRCrToqcIqKWGVF18s3Dj63+uPt7R8W7hgDQQa64BpnMKIeKHZ4kBrUPcFmWCkA0YLuKC6xkP5E/BqC7iTVGjKlM5DoX+pt/PCXdOnDxQqVANhRjrgHTNm9KcR/2M04NerCW5rAfP1wKYljwSyN61aXGlvkGK4ezn5aIMZKcm2Q2179mi74U6hZTZyElZk586PU7eEET8eXNUCppmP8c2bC33Xsj93YFJJ9gxF3pG833CR1hX1eHTNGrb3hhuKkmHSw32/9z2hs4x52fkEoo6lS3PGkJo13E1uvgQpNGFCN3e8cylBqyRkJSuRuIzdeOMt7IYbErJ0qJZrpAOmQfkzTRnVc1MLOLZp0/4lDoLfUtG7x3Q1L9sXZtd8Jp7z6GSx++830fSCbO5z/fXMErjMhxsRXbmSNXznOwXZk/4Q3/ebx2T3cpIZt5q+84fXP/DA+TU33PCQWxgb0YrMgL1okUXjAR/PuKbxiZtawNLGfyW3gPkaRiQQkE2AR4/zepIdt5rWOH/dTYyNc8BbLr/8WHLAtNrdjOSqFrCk8V8rILkjhgccQAIByQRCRx4pWYP+4qX9SD9QdPruPym1AY/+KHKy0DgHnIhGT8+pZBpk4tPyeVxltyRpE7Akx8rGJCy3vIF6l8Pr47+8diIUEUt2og14xK91km10FvnGOWDqgjglS1m0u+y6IBwmtoAN3L1JuxcZBvVKgM9jKJk2rdd8bs6Q2LKFJSg0pfRk259nNBQpXY8CBWY54PnzA0T9owq4CFHhujCUsqJgSWwB25GIkLqEEBDoiUBo0iRmVVT0lMX19yJvvqmkjNQNXVP3ta/NVKJMshLJg29ird/y7LPTaCZcqVip8qTF1q1jW2fPZsExYzI/o0czKxyWp1iC5MSOHSzZ2ipBMomUOAYMByynyiA1k0D4+OMzL3jwLLJihbpSRyJzSdnz6hTK0WSUA47HYifKwSBHKl/+EqPN7PknPaW2LBs+fL9TJmccHDv2oINO7R+cnlmTY5mTK2QuQ4ID1uQFcrkZ4RNOcHkJey+eUgecTJ6/a86cywcuXNjeu2X65jDKAdP63xmmrP/tqcqpCyUV0IIHtWhftCgjq5+2MzukxUwtaP/gwRn5VJ9IdcCC13Wms4EDTqeBYxkE+GTLkmOMCMwno/gpmfz/GQ8KoyqRHyiPrFrFJ+Q+okqnDD1GOWACMEMGBJ1kJmize/7pWLYswywfjS8ddMxpreZU7FmJY6idRkibAU0K+BeYrAQHLIss5HYSCB99tNR3uFOPzn95MBPV6+2T0eh5xAQOWMWLwdd+mbT+VzSTZEtLaop/12n+3HkFDz/8UOdM10RuDI4WsOgahTy3ECg9w4h9YaTiVtr9fKAktCLmk4wm5rLbbotLLZxE4ca0gKNNTa5v/RZSz6muH5rsFaVPerKoVRygvTkPtpr5RDDecqa/hczWlLoPsMQu6GS70UNE6VXa63Gfq65i1d/4Rq/5dM0QpTWk284/X1fzurWL/z8rgwNmkeXLu+Uj+WKf+mefPbWGsf9I1iNNvDEOmAgcK42CCwXTr0PGYzfzD/tP5vsZGDIk0zEfcM4+Gn/uLtnkxBLbtnV3S8g1qV3QbW1CbIQQEOiOQAl1P/sHum6XvO6K2uO1yBtv9Hhf1k17fzd05hecLGUS5JrjgJPJyRLK70mR8e3bGf+0L1mSUX5/dfV+x5w2K5u3mBN79tDuj/Kmv4kOrp9eKBsOOB0HjgUTKDvzTMES94tr+9e/WJz/eJaQeM9Y2dlnC5PM54ckGhuFyctLUDLJC3JFXs9olNkMB3znnT7yAEdpxM2VpiT27WMJ+iXb0eXXrMxlQhykTAcsbe2yK98AFCofAnw5oZTuZ1q+uOcHP2CJvXvzMSfnvFVf/KJQB9zx+us56xadkZoFw+snTx5fs3LlWtGyVcgzIhLW9jvu+AiBNiYAh4qKU6lD9nZ+Mh0w7z5HAgEZBEqOO475hw4VLprvTSzL+XJjRe/a5ND470HudkvLrIMnhh0Y4YDjbW3ofjbsxcrV3NROSBIjYaEFnGtNIF++BCovvDDfR3LK3/r44znlKzSTcAfsYAuYM6D5LrMLZeH0c0Y44GQyOcVpUNAvh4Ds3aIwBiyn3rwulW+0Unb66cIx8FUNbU8/LVxup8DUskWa1yEqJXbuZLG6OlHiCpJD+wOcwr70pWBBDzv8kBEOmGEClsOviTz1vlK5Iwt8/TQSCIgmUH7BBYwFxX/nt9OKhWRzs2hzD8ormTiRMdq5SVSKvPaaKFEFy+FRsba88oqRwbiNcMAEGC3ggl9PvR+U3QJONjXpDQDWGUmg8nOfk2J36yNyAzuFpoj9Ku3QwAHzikjG4x+TUiGShWrvgHcfc8wgmgE9SDIHiHeIgCW7BQwH7FDNuldt6YwZLMAjzQlOSVru1/7ii4KlZoormTo180KRZzq0gHkRaKKokbthaO+A29vaxhb5juBxjQn4ysqkWmfDAUvlK1Q4LesxIVVdfrkUM3nrV3Y8ZZEOOEnLFmPr10thkbdQy5rO+HJVw5L+Bsfjow1jCnPzIIAu6DxguT2rxGAvotCVTJ7MwtQClpFaFi6UIfagzABtgeofNuzgebEHEZr9LDNATz72kR0V226/fVI+z+iQV3sHTF0LaAHr8KZIsgEOWBJYiJVCoPprX5MiN/r22yz67rtSZHcKFb1ncdcd2zr1OPU32tZm3EQs7R0wsyxxc+adejOgNysBX2Vl1nsibmASlgiKkMEJ8LCspR//uBQYslu/3GjRLXfdHDA1x+V0TUip8f1C9XfAiYTRXdB8zCU4ahRLBZyQWJGmipbqgONx5qXdkEx9B0yxW1brl69Vb33sMekY+OQxUYn/sI2t1Sz6YzJ5nKjyqZKjfSxom7eADRgbylZh/X/6UxYcP56xWIzFPvyQxTZuTH14APPU8fvvs6SHNwzwVVVlQ1f09aRTAeKLthwCdCPg79uXlZ93nhSz+OQrmWt/udGhj3yEZdvtrJBCRV59lUegKuRRmc8ctm3mzL5DX3hBThBtCZZr7YB3TZ8+kJyvvG9oCUC7ivRRxJxUokX7nXvzds2T2LKF8Q3vUx/uoA8450RDQ9esrjuX6YD5Lk5IBhHQeBa0VV5Ou4bImaXd/MAD0ivJ9d3PBwjGduzgC51fkA5UkAKtHTAtQTJ+/Jf/cu4t+fnsRPqETz45IytvwXU641RrmRxznBx0nBy2hr8+M2zP9URmFzRfV4kEAiIIWBKiXnG7+EYG0XXrRJjYowy3T8DqLLwVjfJ9A+CAO4EU9TcSEb/avSiD8nvYV1FBfT+h/B5Ky+3r04fxDb/5Jz3xeLFx6rru6pxjH3zA+D2TkkwH7IUeBJPquldbNR5qkuWAVbR++fyTMO3cJCqlGga6jf8eKBwtRxIb6ksUtCxytG4BUwxocYvWsgCQeZkHbJeRUgHVaVw5NbacroDGZOL19Yc6Zmo16zob2JI4Bowu6PSXA8dFEZCwY1di+3bW9tRTRZmVy8O8+9nijQFBqeOVV7RZ/3tIkWzbqJ3z9HbAjA09BLBBFw6O/6qy2edjgZEjU5/Sj30sQ2ty9+5uHXN827aMfKpPcumiL9QmdEEXSs6h5ySNsYoojYwWcNPdd0uPfMXLXn722SIQHJTB9yvWOI1nc+aE2MKFUY1tPGia3g7Ysox2wLJawAdrL48DPgOyhH8++tGMp+zW1v2OuXNW9oFJYHGasW3TMh7ZyZfDGHmhNsABF0pu/3ORFSvYrnnzihOSz9MK3rd8zEnPK3oZoU07HrX85S/pKqQc896yMsFrlzuWLJFiqwih1AUdqF+zZmINYytEyJMtQ28HnEwa7YCVt4ALeFv47M7QpEmpT8bj9GXInXD6ODOP1BNdsyYjW7EnMlvA6IIusnZo6RzG0Q8wFDwJq/nBB5mKrTJLTzmFWQKD3aSGuOh7QesUiRxD9sEBC6gkox2wTi3gvOuCxrwCo0enPp3Rf/jC+61nnZW3qGwPpPYCLmKSWja5ndcTu3Z1HuIvCBRFQGgXNP2wab7nnqLsyfXh8nPOyTVrTvk6Xnopp3xOZkomk8eS/judtCFX3XpHwrJtox2wzO7VXCtYZD7eGhaZZPcQJHbsEGkuZHmZgMBJWDzsZFzBu8l3Gis97TShtdZugAO2bJs7YCOStg64cebMSpvmDxhBMYuR/v79s9wx87JoByy7hwAO2Mz3LJvVvBXKxzSdSMJawNT63XfHHUqKUDp7NrPCYXG6yHadx38PFtS2x+8+91y5+5weVFbcgbYOuH33bqNbv7xa0ALu+eUUGRqvqyY+yQVxoLtSMfucz/Bnfr8jhRDlgFv+9jcW37pVSRkqL7xQqJ4OCj9pQthcarj5O9avnya08JKEaeuAk7HYEEllViYWLeCeUfsHDuw5QxF3VXTxFWEeHi2AQMk0B79TRXRBR6PKWr983+KS6dMLoJz9kfbnnst+U7M7dixmRDe0tg6YppP30axO8zbHbS3gOEXaEpn8tCxKVkL3syyyzsjly4CqL7/cGeWkVUQLuPnPf2aq1t1XfeUrwlm1PfOMcJmyBFIrGA64GLjJRKKqmOd1eNZNLeAEdZuJ7tKV2QKGA9bhf4A4G/pcfTULHHaYOIF5Sip2HTAfEtl32215ai0se2DECFZ25pmFPZzlqeiqVcq6zrOYkN/lRIIvRdI+adsCJnLV2tPrwUD+H1bk+rseVCm5xTeDEJ38gwaJFnlQHhzwQRRGHwToHRnwi1+wqq9+1dlyFLkOuPG3v2UJRdtjVl1yCU1AEfvV3vr4487yz1M7tYBH8a0J83xMeXZtA3EQQKMdsNu6n2O0+YPo5B8ib5hfVVefaCY6ySs55hhW8+abjplk0YQrXX7EFtMFHd+8mTXfd58Sjv7qalYxZ45YXRRjvu2xx8TKVCCN5oFMIDVax83U1gHT77dq7bZ7zuOlkb3EJg9ThGQVvQSJGxUYKm+iO4/Yg1QkAXKAfEcuJBoDLmIS1t6bbmI2TcBSkSpo5rNF639FJj75ysRJjcR8HHHQ2gGL7acQWOvGt4Al7YQkEHFeokQ7YIu6yGR2QfNWBxIICCNQoANuf/ZZ1kYfFYlvfypj8lXTnUYElToEMU3kPeKQi5pd0NYBEyeju6Dd1gKOC46ClZqAJXFNZwIOWLOvGrPNsQoImco3Otlzww3KCl516aXCYw/wrQc7li9XVgaRiigiFm8Ba530dcDJpNGzoGWHWVT5VtktLSy+c6dQlf7hw4XKSxfGt15MdnSkX8IxCBRFoJAu6MZbb1W27Ij/oJXR+lU1c7uoysn2MFrA2cj0fp26D9AC7h2Tkhyiu5+50XyphKyE7mdZZD0sN88uaL5pQfP99ysDxpdpiR775WXoWLZMWRkkKDostTewBMGiROrbArYssTMJRBHLUQ6fNRzhoduoNWZ6kuKAa2jHTkkJE7AkgfWw2HxmQScbGtjua65h1IhQQqzkqKPEz3ymuM97brxRif2ylBB9/+a1a8fKki9CrrazoOntDYoooFMy+Lq5zrVzfGlAcOxYFhwzhgVpi7/UXzqX2Q0rstzGOWCM/4qsfsjiBHJdB0xOdze1RlVthcknM/b78Y9pmrYltJ6a/vhHJmPpoVAjcxBGIY35RKx3csjqSBZtHbBlWUFVvyBlk0/s28cSNJGh62QGvh9uYNQoFiJnzPfe7fwb5BF/8uzyklkGGQ44VUZJRsfr6iRJhlivEsh1DHjvz3/O2l98URmmSgq6EaK4zyJT9O23WeOvfy1SpGOy7Hhc64lY2jpg6j4wugWcyxvHQztG33kn9UnPz/+z851fUi1l3mru/JCTtshpq04yHHDg8MOlFcMNv9ylwYHgQwgkm5oOudb1Qi5d0Hyf36a77ur6qLRz3vXc99prhcpP7t3Ldl9xhbJ1y0KN706Ybcv7oulOX57XtHXANIU8qGYEJU9iCrLTrzbGnV7K8T399EGN1CuQ6rY+2I3d6Zjpr7SACYkEi3/44UEbRBzwjcJlrgGW8YNBRLkhQ08CiVxm+PfSI9X21FNsz/e+p6yAoSOOYIPuvjv3rvEcLOPzVXZcdBGLuSmITTIpL9pPDkx7y6KtA7apC5rGgXuz31P3eZc8n+HLP127ufjGD6lx5s4x5gPOudhwj7w7l7b2EsqZ/4CQlZK8u58mwSCBQK4Ecpk131MLuO2JJ9juK69k/IezqsTf8W1nny1UXZKWG/KPmxI1WuStdxQASlsHbPokLAF1k5cI/h+Sf7ouG+DRcdK7sDuPA7W1OQVsl9GaDH7kI3mVLZ/MMuzNRz/ymkegY2nv0QqzOeCmBQsYX+9rU0+RyqRqkpfKMknRZdvDpMgVJFRbB2xR5wrav8XXMv9FG3nrrdQnXZpVUsL4RKhOh3zwL00KY2lRf2Q4NN5Sl5VER+ySZSfk6kEg9u67LL59e+/GdOmC5tsL8qVGJu2R23sh3ZeDfEh/dtllJWzBgoiOpdPWAVMXdABd0PJeGTsSYVH68uGf9MSXNQRojW6nQ46sWJF+W8hxaALfpEROkrFtohxLIVUHAs0PPJCTGemzoDuWLGEN112nLMpVTgYiU1YC9W+8MZSiDmzKmsHBG9o6YC9PwnLwfWA2bT0Wo0lX/MNoFxQZSaoDFhyzWkb5IVMPAnzyVctDD+VkDI8FbVN408abb05FuHLLEsmcCm96prY2Pg68ScdiaOuAdYQFm4onwENQ+mjCmKwko8tclq2Q6yyBPT/8IeM9Qbmk6OrVrIFmOWOJWy60NMsTjWo7E1pbB0xd0HHqgg5pVpUwp0gCJVOnFikh++N2WxtDEI7sfHDnvwR413Nb2hK//97p/mjPT3/a/Q1c1Z+AxjOhtY0FTV3Q6ub06/8KucZCmQ44unZtqgvdNbBQECkEWv/5T7b3ppukyIZQ/QjQcMEQ/azab5HuLWBducGuAgnIHP/lUcWQQCArAVqnu++OO9i+3/yGOtewxiIrJ7fdsO1KXYukrQOmFnAC/0V0fW0Ks4tH8godeWRhD+fwVGzNmhxyIYvnCJDjbV+0iO295Ramyyz5kmnTWEjSeviWhx/OeWzbE++CZZXrWk5tHfCBMWBducGuAgjw+NYWBQaRlSI0UcbLKbZuHWt77DEvIzhYdj65Kr5tW2pOQPvzz7MExTjWKZWfdx6rvPhiKSbxsJiJHCeXSTFAN6HJpLZb22rrgPkYMFrAur3Jxdkjs/XLePzsDRuKM9Dwp1uffJLxD5L+BHg8dFkp2doqS7SpcuX96i+SiLaTsGh/S0zCKrJydXs8NHGiNJO487WjUWnyIRgERBLgIWJlJJt2WFMZk1pGGSTI1LYLWl8HTFtMS6gIiHSQgMwWcBTjvw7WLFTnS8Aql+MTkhQiEymTAE24kwM7U01BZ9o6YIKmbfd4QaQ9/pDl97PQpEnSKETefFOabAgGAdEEfLIccA57G4sui+7yaPKnnO4GAQXX1gHzzRgElA8iNCHA1//6qqulWRNZvlyabAgGAdEEZLWA+SYRSF0IoAXcBUhup9r+OMjNfORKJ1B62mnpp0KPk/SrP7Z+vVCZEAYCMgmgBSyTbqZsmswrb8Zbpqq8z3R2cu15lwYPaEug9GMfk2ZblHZsQmAFaXghWAIBWcvxMAbcTWXxAASaJjhgTSvGTWbxDRiCkoIOcE4dr7/uJlwoiwcIoAXsgUrOoYj6OmDLasvBfmQxgECZxNYvLz7Gfw14CWDiQQK+0lLGAnLmmPLhGCRzCGjrgKnfHg7YnPeoR0tljv+yWIxFVq7sUT9ugoBOBGRux5nct0+nosKWXgjI+RnWi9Kcbtu21DFg/4ABLDBE200yckJkRKZgkIWPO06aqXz7wdDYsdLkOyWYj+XFPvywV/V+2ls5NG5cr/mQQRyBjmXLitp1yz9woDhjukhK7N7d5QpOdSagrwOW3ALmsVj70gbbSGYTCIwezYY8/rjZhejGeh6/eOcll3RzJ/NSePp0NoB2+EFSR6B+wgTGI04VmviPJlkJDlgWWTlyte2CpolrcrugsR2ZnDcKUoUQsHza/tcUUj4vC5HpgJNoAXf3amn7n0lbwygWdEd3JIVdgwMWhhKCJBDQd+WEhMJ6S6SPhr9kpURDgyzRxsqljX38uhqvrQOmhVtyZxPAAev6TsIuTgAO2LXvgcwWMBzwoa8NbW0LB3wolp6v2D7flp5zFHk3mSxSAB4HAYkE4IAlwnVWNJ8AKiPxJUjYEexQstSYgwM+FEsvV2xbrgNGC7iXCsBtRwnAATuKX6ZyWV3QGP/NUmvogs4CpqfLodDWnm4Xew+hC4sliOelEsAkLKl4nRQeGDpUinrMgM6KlcJK6Jm0HQMOhcNSHTBDF7SebySs2k8ALWBXvgk8LHFg2DApZUvs3ClFrulCaQw4pmsZtHXAJf37y+2C1rVGYBcIEAEsQ3Lna+AfNIixUEhK4eJb5bZZpBitQCiNAcMB58u577PPttBMUHmbW6IFnG+VID8IgECRBPjGJLJSAg64W7Q03Bjv9oYGF7VtAafYyJyIhUlYGrx+MCErAYwBZ0Vj8g2/RAeMFnCWNwNd0FnA9HKZxkukdUPbaAH3Qh+3HSWAMWBH8ctSLrMFHN8i7etSFg4lcikQB7qgCyLt871X0HO5PIQWcC6UkMcpAnDATpGXqlemA07AAXdbd5iE1S2W3i9SC3hd77kKzAEHXCA4PKaCACZhqaCsXocsB2y3tbEEtiLstkIxCatbLL1fpC8hOODeMSGHGwmgBezGWmWBmhop5cL4b3asNAkLXdDZ8WS/EygrW5v9bpF30AIuEiAel0oADlgqXieEWyUl0hwwZkBnr1HqScUs6Ox4st8Z8uab9dR90Jo9RxF3MAmrCHh4VDoBOGDpiFUrCI4axZik2e2xTZtUF8cYfdQCluNDBBDQexnS/gK+K6Cch4hAKMpDkOCCTgQkfVHrVESv2RIcM0ZakeMffCBNtumCqQUsd2e9IgBp74CljQOjBVzEa4NHpRNAC1g6YtUKZDrgGBxw9ur0+Zqy33T2jvYOmKJhyRsHdpY9tINAVgL0qz3rPdwwk0Bw7FhphqMF3CNatIB7xNPDTSsYlOOA0QLugTpuOU4ADtjxKhBtgDQHHIsxBOHIXls03KhtCziQ3Ww97gTC4TcSHR3CjWlfvJht+8QnhMv1ikC+qfigP/6RsYDcV8iORNjOuXNZsqXFK2hT5eTlziXFN29mrQ89lEtWV+QpP/982l5d7P7qqTW0DQ258ylgBYVF/0+Chx2Wu448csbr6pidSOTxhLeyUl+Sti1gud+eAuqZz4SuGzVqN/2KGSBA3EERyaYmFl2z5uA5DvIjMOAXv5DufLlFzffcwzpeey0/4zyUO7JqFYtce61nSlx21lnMKisTWt72559nu77xDaEyuwoLjBwp7f8Lxn+70j7kHA74ECT5XXiDsp+e3yPILYtAydSprPzTn5Yl/qDcJEX22fe73x08xwEImEogNGGCNNP5+uKK884rSH7k7bdZ7P33C3rWlId0ngWtfQs4VcmWtYLZNhywBm88D5HY78YblViy7/bbGe+pQAIB0wmEjjxSWhHCJ53E+KeQ1P7cc2znpZcW8qgxz9A8Innb2hZJQf9Z0FRAfzC4oshy4nFBBCo+8xkWOuooQdKyi+GB5ZsfeCB7BtwBAYMIqPg/UwiO0o99jMmKT12IPTKeoUZDowy5ImQa4YADJSW8CxrJYQL+6mrWR9F4Y+Ovf81ynYjkMBaoB4FeCYQmTuw1jyMZaLZ95ec/74hqVUqpAbddla589RjhgAevXFlHM9ka8i0c8osl0Oeaa5ivb1+xQruRFlu3jrU+/HA3d3AJBMwjEKytZb6qKm0Nr5gzh1mhkLb2FWtYaWXl1mJlyHreCAecKrxloRUs6y3IQW746KNZhaJfynt//nNmY512DrWCLCYQ0LX7uZOdr18/Vk6zy92YqOHWXr14sbYTSUxywK+48QUxoUx8lmV/vuxIQXCIjhdfZO0vvWQCFtgIAjkR0Lb7Oc36iosvTjtz1eE2nUtjjgMuKVmiM0g329aH1kgG+E4ushMFE9jzk5/I1gL5IKCUAF+2p3sqmTaNyVwq5Vj5LQsOWAT80okTl1ELTNuNlUWUUUcZofHjWdVllykxjc96jm3cqEQXlICACgK0BIaFpkxRoapoHZVubAXDARf9XqQEDFy4sJ0OsBxJDM6cpFgU8i/V9Sw53CQ3Jrl3L9v3m9/kZBcygYApBHj3Mx/CMSGVn3uu1pPFCmKouQM2IxDHAfI+n29JMpH4aEEVgYfyJlBFC/RVjV813norS1DkK6TCCfDlJBWf/WzhAhx+Mvbuu2w3zbR3Uyo55hhjimOVlrKKCy5gTRT+1TUJDlhgVfr9S1gicbVAiRCVhUCItk7rc9VVWe6KvRylcHgtf/ubWKEelOYfPFjZDyYpeONxKWKdFBo+9lgn1eetu/Kii9zlgG1b2yVIvHKMagFXDRr04r4tW+K0MYNRduf9v8DhB/iawAH/93+MqVgbSDvL7LnhhryWHfF1i8HDD5dOibfIWh55RLoeKHAvgRJavmdS4pMtS2fMYO1Ll5pkdlZbfcHgpqw3NbhhlCPj67n2jRr1MnE7WQN2rjWhz5VXsiBNvlKRWh58kEXeeis/VbRGuOqrX83vmQJy80hc/IsosWtXAU/jkbwJKFjmlrdNRTwQHD2a8TW2piU+GcstDjjcv/8Gnfmbswypk6JlPdV5iL/iCYSnT1c26zlJe7Du5euL80ytjz3Gkrt35/lU/tn55JlqRTPA87fOhU8UsM+uzhT4/yUTU+msWSwwZIiJpmfYTLsgtQxYsmRHxkXNToxzwP7SUjhgSS+Rr6KCDfjf/1UScIMXYe9Pf1rQbkd2NMqa7r1XEoVMsTz6l3+A0K2oMxXgzLUEwieeKK1sHa+8wlhM0qpMWv1QceGF0mxXJdhm7D1VugrVY5wDHr569Wr6ZbO50ALjuewE+v3oR8w/fHj2DALvdFDXbksR8Z5517Xd0SHQou5FWeEwWsHdoxF/1UVd0HwJn0wH3P7006ztP/8RXwcHJPLZ9HwNs8mJwlBqH1TAOAeceiF8vn+b/GLoaHv52WezclqCoCLxsdU93/1uUaoStG649aGHipKR68MVNDMUreBcaRWRz0Vd0KFJk6Suqe14/XXW8ve/FwG750f9AweystNP7zmT7nctCw5YRh35QiFslSMQbPCww1h/2gBBVdpHWw3G6uqKVtd0992MKfjSRiu46KrynIDSU06RVma7pYXxHcM6KGa6zAmCpkfGsn0+OGAZb+GIb33rWepe2CZDttdk8olGA26/nVnl5UqKHluzhjX94Q9CdMU++IC1S+yGSzcSreB0GjjujUDpyfIWakRWrEgt27MpdnrrP/7RmykF3y+hSWShj3yk4OedfjDg92MMWEolzJuXpF83f5Ei22NC+1JXcOjII9WUmr4wdl97LeNfHKJS0113iRLVoxzeCq6aN6/HPLgJApwA3/s3NHmyNBgdr712UHaL5GEYk1vBdr9+6w+C0vTAzDFgghkoLX1AU6bGmFV2xhmscu5cZfbuu+MOFqUWsMjEx8J4JC0ViX8Z+fv3V6HKmzpcMgmrlM9+9sn7ao0sX37w/Yi99x7jLWJZqfz885lPUe+YyDLQRN3dI15+ebtImTJkyXtLZFibJpNmQ6+i3ZFWpl3CYR4EAiNGsAEFrMHNQ0VGVh5Vah91dctIaAXLoOqATAXj+SpKVXrqqfLU0BK8roFrWiVOxuJDU9wJG5iM8A3GOmD+Qvj8/vsNfDEcN5mP+w783e+YVVmpxhbqcm7gXc/05SEjtT31FEts2SJD9CEy0Qo+BIm4Cy5oAVu0c1jp7NnimHSR1EGtX76KID21PvGE1CV5JnZD24Y0zox2wKXV1X+hyVjiBhTT32oXH/enTe9V7XLEMe4jZx9ZtUoaUT6mrGoHF75jDMaCJVWlC1rA4eOOY74+fSQBYqxj8eJDZCdpVnTbk08ecl3UhSBNxAp/1KxN6CyfL8/4tqJo5SfHaAc8YPnynRTt5On8iuzt3HzLuvJPfUoZhOg777B9t90mXR/fTclubpauhytAK1gSZhe0gMvOPFMSnP1i22npUXdJ5ppgro/vkmRS8oXD6IJWUWHUDY3JWDmCLpk6lfWjnYeUJepybqCNHWxZIfPSCsJbAc1//WvaFXmHqVbwV74iTwEkG0mAWl1Sg1fw+OextWu7ZRN59VUW3ywvQCCfsMmDcxiRLCsy4lOfWmeCrUa3gDngmtNOe4wmY+0zAbaTNvJITnzclykML7f3lltYdIO6zUia772XBiTUjEjw2eN+A3e6cfIddLtuvm7WJ3GWfPuSJRR3hvr8ukn8uszJWIzGtis/97luNOt3ybLtd9gNN6j5Iiiy+MY7YLZgQcRnWWpiEhYJ26nHeUzXgTQDmW/YrirxYPHN99yjSl1KT3zrVtb2r38p0YlWsATMWZyLBE1SRMrufu5u/De9IC08KIdEhhXkgHmMa90TxYgwovuZczTfAVMhaIcktd/0ur+BXezjmyyUKJxEkdy3jzVcdVXWX+tdzBN6KirKVi5GVX7hC2gF5wLKA3lo3SmT6oDJsbZ3MwErHW2cVgJ0vMy3S5eT/LRFId+qUPfk8/le193GTvtc4YCHrV69jLqhX+wsFP7+l0AVdZWq3lqs4brrWHy7M2vg+WxrPh6mIqEVrIKyGTpKjj1W6hhp5M03c4r7LH0ylsLAPYXWPEWtW1ros6qfC6hWKEufr6TkZ8mOjlNkyTdRbumMGazvD3+o1PSWP/+ZtT3zjFKdXZXxwBwDFbX4+Vgw15fYs6erGcaf8+ApexVu0pFsajKWWcWcOVJtb8/x/1Tbv/+dWg0ga41/+IQTWHD0aMYjcOmYaFnq3hGrVr2jo23d2eQaB1yzdu1zH44a9Sr1e5q1YK27WhFwLXj44WwAhX5kCsdsYuvXsz0//rEA64sT0f788yz+/vssMGpUcYJyeNoqK2NVNCOaTzhzW0o2NrL2F9Gx1Fu9+ioqWNlZZ/WWraj7bbT/by6JB+loffxxqb1efCnjnptuysUc9XksS14fvITSuKILupMLbVOobk+9TqUa/uXB4AfRjkP8r6rE/+Pvnj//kCg9qvSn6+EzQlNbFaZflHicmhHdt69EDRCtM4Hyc85hfDhCVorRSoLYpk05i5fdDV1BcQR8Esubc0G7y+j3G9P9zM13lQOuWbfuCa/Hh07NeKaWr4rWX/r7v+cHP2BR6rLUJfFt2pJ79yoxJ9UKxk5JSljrqESX7udONjxWdGyjvK1wefd2+XnndarT6i99/8EBO1kjvmDQ063g/j/7GQvT2K/K1Epbosn+1Z1veWg+AGt+QF2MFrSC862h/PPzQBf8B6ZOKXTEEVK3HuRlbaVY5/mmloUL830kr/xaRsaiABw1EycaMwOaA3dVC5gXqGbBAr5DtRFRULi9IlP1FVcoDTPJbY+tW8d461fHlHLAkjaA6FrezrHgrtdxLo5AoLZWaSCZXCyX3fqN02QnHs4139T6yCNSg9IEJ0xgJdOm5WuW1Pw0AWs5W7hQzo4vkix3nQNmp55q02LxmyXx0lZs+bnnsj5XX63UPru1le36+tcZb23qmBIUuq/l4YeVmYZWsFzUKjcQyaUkfFex8v/5n1yyFpynhTvSAlJi1y7W/sILBTyZ+yO67ZJEATiMmzHoPgdM70/txRfzXZI+yP1VMjtnmELgqdzbt5MWX+8bo9nGOqfmP/5RmXl879SqSy9Vps9rinTbhars9NOZr7paajW0PfpowfJlDwuV08xvv8TQm/kWnJai/jvfZ5zO70oHnIoD6ve7b11IN29LaOxYNpDWobJQqJu78i41/f73rFXiFmiiLOexqDsWLRIlrlc5qehYErej69UAl2tCQJEAABtgSURBVGbgY46ho47SqnR8+ZnMFFmxgsXq6wtWwVvAyYaGgp/v9UH6zpHdBd+rDf/N0FjzzW8u+++pGUfudMDEnlrB91B4uNVmVENhVgaGDmWD7r9f6XIjbmkHrQ1tvPXWwox24CmV4SlTrWDJX8wOIHRMpUVf8nxuQz8N1penQ+BBbmR3ibf+85/pKvM+5ruQpcaC834y9wf4mmA+Oc7pRMOOz7J585JO25GvftcE4jik4LQbhvW3v32dtbcvshmjHml3JT91fQ267z7G47OqTHFaj7iLr/dNmvOuty9dmtrGLTh+vBJUvBWcio5FgSxMTtzBDC1wDFJIuWkHniBNvJIV1akYG6suu6yYx3t91qZ5FTygRrGJd0NXXnJJsWKyPu8fPpyVzpzJ2p57LmseFTfoR0D+U8VVGNaLDvc6YCp4zZo1S+tGj76PJZNf7IWDUbf55I+BFGgjSN3PKlNq0hWtdzUxZCBvBff/1a+U4OocC977y18q0SdLCS9HaPJkWeKNlRs68kgWPukkqfa3PfGEkP9nfG1+lOKjy+y+55MPnXTA1LqyrQEDnI1/W+Db4HzfQYGG5/pYyZAh11MFSRwIydUSMfn4dmADf/tbVnLMMWIE5iqFokvtph2OVO7vm6tpueTjrYnEjh25ZBWSp/KLX2R+jAULYambkOqvflW6Sc0PPihMh+w1weGTT2bBkSOF2ZuvIOrhfGvEyy87s/tLvsZ2ye96Bzx46dIGiof8nS7lNvKUb3nWn2IOl86erdx+HpTf6U0Wiik0Hw9rpi57VamzFaxKH/SoIRCsqZEe95nHVOe7H4lKbbwrW/J6+AoaC3YqUfezcbOfO1m53gHzgtZu3Hg3tYKNCtLdWUHpf/tSwIvyCy5Iv6TkuIV+jfMxTdNTM+3UZLe1KStGaka05GUqygoDRSkClXyCneRJRy1/+YtQ2gnan1v2j2c+G5oPjTmR/KFQ8YPlThhOOj3hgDlbf3n516kFGXeIc9Fq+3zzm6zyS18qWk6+AjpeeontueGGfB/TMj8fu5bdHZdecIt2yanEuuB0JEYf+wcMkL7sxm5pYS0Ux1x0kr0mmK+HLj/7bNFm5yJv0/C1a1/LJaOOeTzjgIevXr3Ktqzf6lgJvdlUReOJ1d/6Vm/ZhN/n+8HuoiUgdtzY3y2HMGm+5x5Gk/IOuS7rAq87PmMdyXwCfa68Unorj/9ATDY3C4fVsWQJS2zbJlxuukAnImPRnJi/p9tg2rFnHDCvmMpx435EreDNJlVS5Wc+w/o60ALlE5Z20vIFGV8GTvKP1dVJ745LL1+qFSxxGUi6LhzLIxAcM4ZVfPaz8hRwyfTDsIn/QJSQ+LJBGS3rdFNDkyaxEvqoTLQNpNxdJyQXxlMOuN+TT7bSbknzJTMVJp7Hd+5Hk59UpySNGe2kpQXxLVtUq1aiT/V4dhUNHaAVrKRqpSnp973vSR/7bfv3v1l8s7z2Ad+1THZS2QqmxtTGmlWrxM1Wkw2nG/mecsC8/CPeffcx6rbQviu67Iwz2AC+bpVmPqtMPADATnIYUZqJ6dbEQ/xFBc4y7Y0TWsG9EXL2fpI2FekplZ54IgufempPWYTckx2xLfbhhyzymtzh0jIaB1a2/M6yjO5+5i+N5xwwL3TtSSddR47tVX6sYyo77bTUWl9aPqXWPBrr3UVrHEUugVBbgNy1KW8F01iwr6oqdwORUxmBxM6dWXXxMIt9v/vdrPdF3ehYvFjJ/zvZk7FSO0R9+tOisPQox2949zMvnCcdMLvnnlhJdfVnqW25p8caduAmD+s28He/Y4zC8KlOu2k7w3aK8+yF1Pb00yxeRKD7fBnxcIpVGAvOF5uS/Int2WM48GV/KkKY7rvtNiVlbaMNVGQvxUvFh5bfc7eWT6xVAk2iEm86YAI65M036/3h8BfICVMgFT1S6SmnsEG0yxALBpUbtIfWGLc+9phyvU4p5JNSmu++W6l6PhaMVrBS5Dkp61jW/SY6vrIy1ueaa3KSUUymCOnvWL68GBE5P5ukdfBt//pXzvkLyRigqFg8OpbM5PP71f7nlVQYzzpgzpPWjz1Fi+q12LYw5XzvvFP5toKcw16aZd38pz/xQ0+l1JIPWhusKqVawV/+sip10JMDgQRNNMy2pzXfhck/aFAOUorL0qgoRnmnlbK7obkevn2ktGRZ0dDgwfdLk69QsKcdMOdce/31P6TxYEf7XXm38yCnnO+NN7Im2tLQi4m3BniUL5WpihwwWsEqifesqyXLzOCSKVOY7B2PuGXt//mPstZvJ4mO119nfFczmamU5rEERoyQooLG5R9JhRiWIl2tUM87YL6HZPmwYReSE1YXqT+tjstmzWKDFixwpuV7002s6d5706zx3mEzL7/CQCNoBevzjvHdvVKBWbqY5AuH969AkBxykq/73Uux3Z1I0lvBNAZceeGFcooWCv1BjmD1UuGAifmAJUt2BEpLP0/jwQmVVcCXGqUmXDkw5ruXNjiXtehfJcNidcUp4IiIfVfzsQOt4Hxoycu77/bbGY+T3DX1ue46Fhg1qutl4ectf/0ri23cKFxuLgJb//lP6RHhUvGhQ6FczMk5D31Hv1e7Zs3zOT+geUY44AMVNPyddxZZgcC1quqr4rzz2ED6AlA+25m2FeQTrpoUT0BSxbUQPbLXX3a1Ca3grkTUn3csXcqaeM9TlxQ+7jglMdeTjY2s8dZbu2hXdxqnmd88PKXM5Ovfn5WdeaZYFYHAH8UKdFYaHHAa/5oNG26jtbc/S7sk5bCSQtr1/9//pR0iFK/zpS35ds+f78kJVz1VZHTNGtbxstrNstAK7qlG5N6LvvNO6v+BTT9G05OvvJz1V+QUG3/xC5YgJ+xkUrExSSVF1BOWLCtWVl19rzB5GgiCA+5SCSM3bvwhzYymhbhyUhVtZ5YKLyl/nVxGAez29lRs59Ynnsi4jpP9BFQH5kAr2Jk3j//Q2kFjk4k9h4YA6Pv970ubOJRe2sirrzLe/ex0aqMJYDzsrMxUMm0aC02YIEQFTb7664Dly7NHTRGiRa0QOOBueI98771vkBP+Sze3irrUl9YUqoiq09VI3t3Fv3TaKdoOUvcEOigAierxOLSCu68LGVeT5HAbrr+e7aTlMXxbyq6Jr0SQvtkCKeUTvxpojLlr67urPSrO7UiEtT76qHRVopYkUdwGis3rrqQ+3JIh/EbOnfvFuvvuq6L/KJ8QYXL42GOZr18/Jnqz7Vxs4+O9qp1LLnbplId/IfJuQb4BhspUMnmysB9GPMJRcvduleZrq4s7lzhtvxen+Md8M/r2RYuYHY12a29gyBDWn296kuV+tw8VcJG/Yw3f+Q7jO3Lpkvj3UfCww6Sa46fvPYq/z+xEUXNcn6LIV6ulGuqAcIteCsUDkQ6UskCVO+bODUeWLHmSGMkN61KgfXgMBEAABLxAIFBWNotPlHVbWeGAe6nRxpkzK5s2bXqOpmtM6yUrboMACIAACAgmQNsOvlH7/vsfFSxWC3EYA+6lGvq88EJzePDgsyhQx7u9ZMVtEAABEAABwQRo8tUvBYvURhwccA5VMWjZst3BAQNm0y8x141B5FB8ZAEBEAABRwjwwBs11133D0eUK1CKLug8IO876aSqxs2bKYQMOzWPx5AVBEAABECgAAIUHGlu7YYNDxbwqBGPoAWcRzVVL17cNPLUU8+kJUrOL+LLw25kBQEQAAHTCFDr953au+4SvhxUJw5oARdYG/VjxtycTCSuKfBxPAYCIAACINADAVr3e8GItWvlL1TuwQbZt+CAiyBcN2bM11gi8RuaIY2ehCI44lEQAAEQSCdA821ep5nPx6dfc+MxHEcRtVq7ceMdtHXZHOoqaS9CDB4FARAAARBII2CVlPwg7dS1h2gBC6jauokTj2etrY9QS7i/AHEQAQIgAAJeJrBo5AcfzPICALSABdRy7erVrwSqqmbQWuGVAsRBBAiAAAh4kgD1JiZ9FRXKtoV1GjIcsKAaGLZy5caRxxxzvM/n+3+CREIMCIAACHiLgM93V82qVW96pdDogpZQ0/Xjxp1Ngd//gC5pCXAhEgRAwJUEqPXbQBtDHDH0hRf2urKA3RQKLeBuoBR7qebddx8PDBw4lbqkXyxWFp4HARAAAS8QoJCT3/eS8+V1Cgcs6c0e9tprW0feffcseql+RL/sitqHS5KJEAsCIAACWhCg78gVNX/84x+0MEahEeiCVgC7fsKEGXZHx59oW8MaBeqgAgRAAASMIUDO1w5UVJw4bNWqV40xWpChaAELAtmTmJo1a5b6R42aSptSL+wpH+6BAAiAgOcI+P13edH58npGC1jx214/fvxpyY6O/yO1RyhWDXUgAAIgoBuBTZXjx0/u9+STrboZpsIetIBVUE7TUbN27XMjzz57Co0Nf4e6Xjz50qXhwCEIgIBHCaS6nsvKLvWq8+XVjhawgy//tmOOGR7bu/dXdjL5KQfNgGoQAAEQUE6AYibcUfPee/OVK9ZIIRywBpWR6paORG5jtj1OA3NgAgiAAAhIJUCt3/fLJk2aMuDRR9ukKtJcOLqgNaigVLf0KaegW1qDuoAJIAACcgnwrmfaxOYSrztfThktYLnvWt7SN59wwpDkjh3XsmRyHkXSKs1bAB4AARAAAY0J0PyXn9e+954ndjvqrRrggHsj5ND9XdOnD+zYs+dqGh/+Kq0frnDIDKgFARAAAWEEaJ/fl2q//e1ZbN68pDChBguCA9a88raffHK/yNat36IW8RU0RlylubkwDwRAAAS6J2BZO/1Dhkwb8fLL27vP4L2rcMCG1HnTGWdUN27YMJ8c8Xzqmu5riNkwEwRAAAQYjfsmrXD4TD7fBTj+SwAO+L8sjDhqnDmzsrm+/uvJZPIb1CIebITRMBIEQMDTBKxA4KbaDRtu8jSEbgoPB9wNFCMuzZ8fqHvmmXNYNHoJOeLZ1CrGjHYjKg5GgoC3CNC47zO1d9/9CXbqqfQ1hZROAA44nYahx9unTq2JNTd/mSZsfYkmbI0wtBgwGwRAwH0E1vYZMWJG9eLFTe4rWvElggMunqE+EhYtsrZcfvkZ8Y6OS+hX5yfJGQf0MQ6WgAAIeIqAZe3y9et3fM3y5Zs8Ve48CgsHnAcsk7LuPvHEwW07dnzBjscvJrvHm2Q7bAUBEDCcgGVFfKWls2veeedlw0si1Xw4YKl49RC+dfLkMbHW1nOsZPJsGi8+gQZi/HpYBitAAATcSIAmXV1Mk67+4sayiSwTHLBImgbI2jFjRv/orl2fSMZiZ9PSgI+TMy43wGyYCAIgYAgBzHjOvaLggHNn5b6cl11WUv/ii7NYLHYOLWv6BBVwiPsKiRKBAAioIuDz+2+v2bjxW6r0ma4HDtj0GhRo/7ZJk8bG29tPoGAfM8ghn0At5HHUQqY/SCAAAiDQMwGK8XwvxXi+tOdcuJtOAA44nQaOMwjwMJixnTtPsGOx41Njx7Z9LGUIZ2TCCQiAgOcJkPN9qPb66y9EjOf8XgU44Px4eTv3l74U3Lp8+bR4Wxt3xONpmdMR/C8550HeBoPSg4B3CdCSx3/VfvKTF7Dbbot7l0JhJYcDLowbnkojsGXWrD6J7dvH25HIEdR9PZ4+R1C/NXfOh1EXNiJ0pbHCIQi4iQA532drZ88+jy1YEHFTuVSVBQ5YFWkv6qFJXttff/2wRCQylGZdD6KW8hBqNfOJXkPISQ+mYx7Legg564FYGuXFFwRlNpzAIyOPPfZCtnBh1PByOGY+HLBj6KH4IAGK4LX7mmsGtsdi/ckxh8kxh/lfWqxckjpOJPb/pXN6JkzOmt8P0TEmiB2EiAOhBGx7Cr175wqV6SJhNOb759q5c7/Mbrgh4aJiKS8KHLBy5FAIAiCgO4H6MWMuTiYS9+hupxP2kfP9Pc12vsIJ3W7TifE5t9UoygMCIFA0Aduy0LLrhiI531vgfLsBU+AlBOsvEBweAwEQcDUBGulA6iRAYz0J5vdfWbtx4x2d1/C3eAJwwMUzhAQQAAGXESCHUwUPfKBSLavJFwx+dsS77z7jsmp2vDjogna8CmAACICAdgRsu592NjlgEP0Q+cBXWTkDzlcOfDhgOVwhFQRAwGAC1PodaLD5QkynNb5LSoYNO65m5cq1QgRCyCEE4IAPQYILIAACnieQSEz0MgOabLWg9pRTZg9eurTByxxklx1jwLIJQz4IgICJBKaaaHTRNltWs8/nm0c7Gv29aFkQ0CsBtIB7RYQMIAACXiKwY/LkWuqC7uulMqfKalkrg5WVx8L5qqt5OGB1rKEJBEDAAAKxaNRzrV/L779r5OzZJwxbuXKjAVXkGhPRBe2aqkRBQAAERBCg7Te944Ata6cVCl1Ru27dP0Wwg4z8CKAFnB8v5AYBEHA5ATuZnOnyIqaKRxOtHgoPHXoUnK9ztY0WsHPsoRkEQEAzApuPPvpw2oRhhmZmCTWHlhfttoLBK2reffchoYIhLG8CaAHnjQwPgAAIuJVAsrHxIreWjZcr1eodNGginK8etYwWsB71ACtAAAR0IJBMutMBW9a7/lDoWyPWrXtWB8ywYT8BtIDxJoAACIAAEaibOPF4Wn402k0wqLu5hVq93x75yU9OhvPVr2bRAtavTmARCICAAwTs9vavO6BWnkqf76/+gQOvHb5s2TZ5SiC5GAIWTTjwFyMAz4IACICA6QQ2T5x4dLK1dRm1gGn/AePTC8GKiu8PW7XqVeNL4vICoAXs8gpG8UAABHonkGhr+wXlMtr5Unfz61ZJyfdr1q59rvcSI4cOBOCAdagF2AACIOAYgc3jxp3DbPsUxwwoUjH9aljjC4d/OGLt2keKFIXHFRPAJCzFwKEOBEBAIwLz5wcSsdjPNbIoZ1OoxfsatXjn1N5zz2Q435yxaZURY8BaVQeMAQEQUEngw9Gjb2XJ5JUqdRaji1q7No1TPxUoKfnl8HXrXipGFp51ngAcsPN1AAtAAAQcILDliCPOj0cipmy710EbJiz0lZX9csTbb69xABdUSiAABywBKkSCAAjoTWDr5MljYs3Nr1F7skpvS9laXyBwV2DEiAeGvvDCXs1thXl5EsAkrDyBITsIgIDZBHbMnRsm57tQW+drWRGfZf2Ddim6k8Z2l5hNG9b3RAAOuCc6uAcCIOAuApddVtKxeDHfhGCSTgWjsd0k2bOI+f1/C9bU/BOtXZ1qR54tcMDy2EIyCICARgR2zZlT2r58OV+qc5oOZh2YULWMxnb/WjZkyEMDlizZoYNdsEEdAThgdayhCQRAwCECe846q7xt3brHNFjv20EIFpHTfSpUWfnYkDffrHcICdRqQAAOWINKgAkgAALyCOyYMaN/ZOvWh0nDCfK09CDZsupoze6TtAfvU+FJk54fuHBhew+5cctDBOCAPVTZKCoIeI0ALTU6ORGJ/InWzg5TWPZN1MJdbFvWS6HS0iVD3357g0LdUGUQAThggyoLpoIACORIYNEiq+6SS75HQTZ+QM5X2oYzNI7bTo72bWZZK/w+31J/dfXiocuXb8nRSmTzOAE4YI+/ACg+CLiNwOapU0clGhsXULlmCi2bZe2kMeQ1tL/uW8znW+ErLX1rxBVXrGPz5vEZzEggkDcBOOC8keEBEAABHQlsmzmzb6yu7vu0xerlZF8oXxupNZugZ7ZTa3YLtWrfJ0e7noLlr2clJRsq+/bdUL14cVO+MpEfBHoigEhYPdHBPRAAAf0JzJkTqnvjjcuou/lacpwV9KUWo27nGE18ipHxfNYxd5yN/EP3U8fkbBvJwe6mluxWmhy1lVVVbRnxs5/tYKeeSo8igYAaAnDAajhDCwiAAAiAAAhkEMB2hBk4cAICIAACIAACagjAAavhDC0gAAIgAAIgkEEADjgDB05AAARAAARAQA0BOGA1nKEFBEAABEAABDIIwAFn4MAJCIAACIAACKghAAeshjO0gAAIgAAIgEAGATjgDBw4AQEQAAEQAAE1BOCA1XCGFhAAARAAARDIIAAHnIEDJyAAAiAAAiCghgAcsBrO0AICIAACIAACGQTggDNw4AQEQAAEQAAE1BCAA1bDGVpAAARAAARAIIMAHHAGDpyAAAiAAAiAgBoCcMBqOEMLCIAACIAACGQQgAPOwIETEAABEAABEFBDAA5YDWdoAQEQAAEQAIEMAnDAGThwAgIgAAIgAAJqCMABq+EMLSAAAiAAAiCQQQAOOAMHTkAABEAABEBADQE4YDWcoQUEQAAEQAAEMgjAAWfgwAkIgAAIgAAIqCEAB6yGM7SAAAiAAAiAQAYBOOAMHDgBARAAARAAATUE4IDVcIYWEAABEAABEMggAAecgQMnIAACIAACIKCGABywGs7QAgIgAAIgAAIZBOCAM3DgBARAAARAAATUEIADVsMZWkAABEAABEAggwAccAYOnIAACIAACICAGgJwwGo4QwsIgAAIgAAIZBCAA87AgRMQAAEQAAEQUEMADlgNZ2gBARAAARAAgQwCcMAZOHACAiAAAiAAAmoIwAGr4QwtIAACIAACIJBBAA44AwdOQAAEQAAEQEANAThgNZyhBQRAAARAAAQyCMABZ+DACQiAAAiAAAioIQAHrIYztIAACIAACIBABgE44AwcOAEBEAABEAABNQTggNVwhhYQAAEQAAEQyCAAB5yBAycgAAIgAAIgoIYAHLAaztACAiAAAiAAAhkE4IAzcOAEBEAABEAABNQQgANWwxlaQAAEQAAEQCCDABxwBg6cgAAIgAAIgIAaAnDAajhDCwiAAAiAAAhkEIADzsCBExAAARAAARBQQwAOWA1naAEBEAABEACBDAJwwBk4cAICIAACIAACagjAAavhDC0gAAIgAAIgkEEADjgDB05AAARAAARAQA0BOGA1nKEFBEAABEAABDIIwAFn4MAJCIAACIAACKghAAeshjO0gAAIgAAIgEAGATjgDBw4AQEQAAEQAAE1BOCA1XCGFhAAARAAARDIIAAHnIEDJyAAAiAAAiCghgAcsBrO0AICIAACIAACGQTggDNw4AQEQAAEQAAE1BCAA1bDGVpAAARAAARAIIMAHHAGDpyAAAiAAAiAgBoCcMBqOEMLCIAACIAACGQQgAPOwIETEAABEAABEFBDAA5YDWdoAQEQAAEQAIEMAnDAGThwAgIgAAIgAAJqCMABq+EMLSAAAiAAAiCQQQAOOAMHTkAABEAABEBADQE4YDWcoQUEQAAEQAAEMgjAAWfgwAkIgAAIgAAIqCEAB6yGM7SAAAiAAAiAQAYBOOAMHDgBARAAARAAATUE4IDVcIYWEAABEAABEMggAAecgQMnIAACIAACIKCGwP8HMXtRHzz6PSEAAAAASUVORK5CYII=",gt=ee(35567),lt=ee(65226),ct=ee(74855),yt=ee(80599),Lt=ee.n(yt),Nt=(Le,Sn,xn)=>new Promise((Kt,Et)=>{var Ft=kt=>{try{Wt(xn.next(kt))}catch(Ue){Et(Ue)}},Dt=kt=>{try{Wt(xn.throw(kt))}catch(Ue){Et(Ue)}},Wt=kt=>kt.done?Kt(kt.value):Promise.resolve(kt.value).then(Ft,Dt);Wt((xn=xn.apply(Le,Sn)).next())});const Vt=Le=>{const Sn=/```[a-z]*\n([\s\S]*?)```/g;return Le.replace(Sn,(xn,Kt)=>`<code>${Kt.trim()}</code>`)},Jt=(Le,Sn,xn)=>{const Kt={markdown:"text/markdown",html:"text/html"},Et=new Blob([Le],{type:Kt[xn]}),Ft=URL.createObjectURL(Et),Dt=document.createElement("a");Dt.href=Ft,Dt.download=Sn,Dt.click(),URL.revokeObjectURL(Ft)},Ae=Le=>et()(Le).format("YYYY-MM-DD HH:mm:ss"),he=(Le,Sn,xn)=>Le.map((Kt,Et)=>`
${Et!==0?`
<div class="message">
<p class="user-name">${Sn}<span class="timestamp">${Ae(Kt.updated_at)}</span></p>
<pre class="code">${Vt(Kt.question)}</pre>
</div>`:""}
<div class="message">
<p class="user-name">${xn}<span class="timestamp">${Ae(Kt.updated_at)}</span></p>
<pre class="code">${Vt(Kt.answer)}</pre>
</div>
`).join(""),le=(Le,Sn,xn)=>Le.map((Kt,Et)=>`${Et!==0?`${Sn}
${Ae(Kt.updated_at)}
${Kt.question}
`:""}${xn}
${Ae(Kt.updated_at)}
${Kt.answer}
`).join(""),We=(Le,Sn)=>Nt(void 0,null,function*(){const xn=he(Le.data,Le.my_user_name,Le.user_name),Kt=le(Le.data,Le.my_user_name,Le.user_name),Et=`export-id-${String(Math.random()).slice(-6)}`,Ft=`
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
.wrap {
font-family: Arial, sans-serif;
line-height: 1.6;
color: #333;
padding: 20px 20px 0 20px;
background-color: #f9f9f9;
position:fixed;
left: 0;
top: 0;
z-index: 100;
width: 100vw;
height: 100vh;
overflow: auto;
box-sizing: border-box;
}
.message {
margin-bottom: 20px;
padding: 10px;
border-radius: 5px;
background-color: #fff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.user-name {
font-weight: bold;
color: #333;
margin: 0;
}
.timestamp {
display: block;
font-size: 0.8em;
color: #666;
margin-top: 5px;
}
pre.code {
background-color: #f5f5f5;
padding: 10px;
border-radius: 5px;
overflow-x: auto;
white-space: pre-wrap;
word-wrap: break-word;
margin: 10px 0 0;
}
</style>
</head>
<body>
<div class='wrap' id=${Et}>
${xn}
</div>
</body>
</html>
`;if(Sn.key==="html")Jt(Ft,`\u4E0E${Le.user_name}\u5BF9\u8BDD\u5185\u5BB9.html`,"html");else if(Sn.key==="markdown")Jt(Kt,`\u4E0E${Le.user_name}\u5BF9\u8BDD\u5185\u5BB9.md`,"markdown");else if(Sn.key==="pdf"){const Dt=Ne.default.info({icon:null,width:460,title:"\u63D0\u793A",content:"\u6B63\u5728\u5BFC\u51FAPDF\u4E2D...",maskClosable:!1,keyboard:!1,okButtonProps:{style:{display:"none"}}}),Wt=document.createElement("div");Wt.innerHTML=Ft.replaceAll("box-shadow","// box-shadow"),document.body.appendChild(Wt);const kt=document.getElementById(Et);if(!kt){console.error("PDF \u5143\u7D20\u672A\u627E\u5230");return}kt.style.width="auto",kt.style.height="auto",kt.style.position="initial";const Ue={html2canvas:{letterRendering:!0,useCORS:!0,allowTaint:!1},jsPDF:{unit:"in",format:"letter",orientation:"portrait"},pagebreak:{mode:["avoid-all"]}};Lt()().set(Ue).from(kt).toPdf().get("pdf").save(`\u4E0E${Le.user_name}\u5BF9\u8BDD\u5185\u5BB9.pdf`).finally(()=>{Dt.destroy(),document.body.removeChild(Wt)})}});var me={cursor:"cursor___XqlqI"},fn=({text:Le,open:Sn=!1,onTextChange:xn})=>{const[Kt,Et]=(0,Tt.useState)(""),[Ft,Dt]=(0,Tt.useState)(0),[Wt,kt]=(0,Tt.useState)(!0);return(0,Tt.useEffect)(()=>{if(Sn)if(Ft<Le.length){kt(!1);const Ue=setTimeout(()=>{Et(Tn=>Tn+Le[Ft]),Dt(Ft+1),xn()},50);return()=>clearTimeout(Ue)}else kt(!0),xn();else Et(Le),Dt(0),kt(!0)},[Ft,Le,Sn]),Tt.createElement(lt.Z,{value:Kt+(Wt?"":`<span class='${me.cursor}'></span>`)})},sn={menuWrap:"menuWrap___GDodS",menuMask:"menuMask___dldKr",menu:"menu___OrkS3",itemTwo:"itemTwo___gOXTT",item:"item___XhZWJ",itemDisabled:"itemDisabled___pRoiI",menuWrapRight:"menuWrapRight___Tgo4N"},ui=ee(30001),hi=ee(94184),Si=ee.n(hi),qt=({disabled:Le=!1,recoverDisabled:Sn=!1,onFileType:xn,onRecover:Kt,onEmpty:Et})=>{const[Ft,Dt]=(0,Tt.useState)(!1),[Wt,kt]=(0,Tt.useState)(!1),Ue=(0,Tt.useRef)(null),Tn=[{key:"html",label:"\u5BFC\u51FA\u6210HTML"},{key:"markdown",label:"\u5BFC\u51FA\u6210Markdown"},{key:"pdf",label:"\u5BFC\u51FA\u6210PDF"}],Ei=()=>{if(!Le){if(Ue.current){const Xn=Ue.current.getBoundingClientRect(),si=window.innerWidth-Xn.right;kt(si>300)}Dt(!0)}};return console.log(Wt),Tt.createElement("div",{ref:Ue,className:Si()(sn.menuWrap,Wt&&sn.menuWrapRight),onMouseEnter:Ei,onMouseLeave:()=>Dt(!1)},Tt.createElement(ui.op,{disabled:Le},Tt.createElement("i",{className:"iconfont icon-gengduo6 font12 mr5"}),"\u66F4\u591A\u64CD\u4F5C"),Tt.createElement("div",{className:sn.menuMask,style:{display:Ft?"block":"none"}},Tt.createElement("div",{className:sn.menu},Tt.createElement("div",{className:sn.itemOne},Tt.createElement("div",{className:sn.item,style:{cursor:"auto"}},Tt.createElement("span",null,"\u5BFC\u51FA\u5BF9\u8BDD"),Tt.createElement("div",{className:sn.itemTwo},Tn.map(Xn=>Tt.createElement("div",{key:Xn.key,onClick:()=>{Dt(!1),xn(Xn)},className:sn.item},Xn.label)))),Sn?Tt.createElement("div",{className:sn.itemDisabled},"\u6062\u590D\u5BF9\u8BDD"):Tt.createElement("div",{onClick:Xn=>{Dt(!1),Kt(Xn)},className:sn.item},"\u6062\u590D\u5BF9\u8BDD"),Tt.createElement("div",{onClick:Xn=>{Dt(!1),Et(Xn)},className:sn.item},"\u6E05\u7A7A\u5BF9\u8BDD")))))},Ht=ee(67294),je=Object.defineProperty,Nn=Object.getOwnPropertySymbols,Kn=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,mn=(Le,Sn,xn)=>Sn in Le?je(Le,Sn,{enumerable:!0,configurable:!0,writable:!0,value:xn}):Le[Sn]=xn,Cn=(Le,Sn)=>{for(var xn in Sn||(Sn={}))Kn.call(Sn,xn)&&mn(Le,xn,Sn[xn]);if(Nn)for(var xn of Nn(Sn))He.call(Sn,xn)&&mn(Le,xn,Sn[xn]);return Le},Jn=(Le,Sn,xn)=>new Promise((Kt,Et)=>{var Ft=kt=>{try{Wt(xn.next(kt))}catch(Ue){Et(Ue)}},Dt=kt=>{try{Wt(xn.throw(kt))}catch(Ue){Et(Ue)}},Wt=kt=>kt.done?Kt(kt.value):Promise.resolve(kt.value).then(Ft,Dt);Wt((xn=xn.apply(Le,Sn)).next())}),ve=({})=>{var Le,Sn,xn,Kt;const{id:Et,position:Ft}=(0,gn.oP)(),[Dt,Wt]=(0,Tt.useState)(!0),[kt,Ue]=(0,Tt.useState)(!1),Tn=(0,Tt.useRef)("bottomRight"),Ei=(0,Tt.useRef)();let[Xn,si]=(0,Tt.useState)({});const[Qi,Ln]=(0,Tt.useState)(Number(Et)),[Ci,gi]=(0,Tt.useState)([]),[qi,fi]=(0,Tt.useState)(1),[Pr,kr]=(0,Tt.useState)(Number(Ft)),yr=(0,Tt.useRef)(Number(Ft)),[or,Es]=(0,Tt.useState)([]),[Wr,Wo]=(0,Tt.useState)(!1),[Fo,$r]=(0,Tt.useState)(!0),ur=(0,Tt.useRef)(null),So=(0,Tt.useRef)(1),[Er,bo]=(0,Tt.useState)({});let[Ss,Ms]=(0,Tt.useState)("");const[$s,xo]=(0,Tt.useState)(!1),[er,en]=(0,Tt.useState)(!1),[Bt]=(0,Qe.useSearchParams)();(0,Tt.useEffect)(()=>((0,Qe.getDvaApp)()._store.dispatch({type:"globalSetting/footerToggle",payload:!1}),()=>{(0,Qe.getDvaApp)()._store.dispatch({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,Tt.useEffect)(()=>{Qn()},[]),(0,Tt.useEffect)(()=>{ur.current.scrollTop=ur.current.scrollHeight},[qi]),(0,Tt.useEffect)(()=>{const Se=document.getElementById("wechat_QR_code_ids");return Se.classList.add("hide"),()=>{Se.classList.remove("hide")}},[]);const Qn=()=>Jn(void 0,null,function*(){var Se,Pn;const ti=yield(0,fe.ZP)("/api/chats.json",{method:"post",body:{to_user_id:Et}});if((ti==null?void 0:ti.status)===0){const nn=yield(0,fe.ZP)("/api/chats.json",{method:"get",params:{to_user_id:Et,challenge_id:Number(Ft)||""}});if(nn!=null&&nn.data){$r(!1),gi((nn==null?void 0:nn.data)||[]);const pe=(Pn=(Se=nn==null?void 0:nn.data)==null?void 0:Se.find(Un=>Un.to_user_id===Number(Et)))==null?void 0:Pn.id;Ln(pe),Dn(pe),un(pe,Ft)}}}),Dn=Se=>Jn(void 0,null,function*(){const Pn=yield(0,fe.ZP)("/api/chats/challenge_list.json",{method:"get",params:{id:Se,challenge_id:Pr||""}});Pn!=null&&Pn.challenges&&Es([{id:0,subject:"\u5168\u90E8"},...Pn.challenges])}),cn=(Se,Pn)=>Jn(void 0,null,function*(){const ti=yield(0,fe.ZP)("/api/chats.json",{method:"get",params:{to_user_id:Se,challenge_id:Pn||""}});ti!=null&&ti.data&&gi((ti==null?void 0:ti.data)||[]),$r(!1)}),un=(Se,Pn,ti)=>Jn(void 0,null,function*(){var nn;Wt(!0);const pe=yield(0,fe.ZP)(`/api/chats/${Se}.json`,{method:"get",params:{challenge_id:Number(Pn)||""}});if(pe!=null&&pe.data){ti&&(pe.data[pe.data.length-1].open=!0),bo(Cn({},pe)||{}),Wo(!0),Ue(!1);const Un=(nn=Ci==null?void 0:Ci.find(pi=>pi.id===Se))==null?void 0:nn.to_user_id;window.location.host==="gpt.educoder.net"?Bt.get("homeworkId")?Qe.history.replace(`/chatgpt?id=0&position=0&homeworkId=${Bt.get("homeworkId")}`):Qe.history.replace("/chatgpt?id=0&position=0"):Bt.get("homeworkId")?Qe.history.replace(`/chatgpt?id=${Un||Et}&position=${Pn}&homeworkId=${Bt.get("homeworkId")}`):Qe.history.replace(`/chatgpt?id=${Un||Et}&position=${Pn}`),ti&&(fi(Math.random()),cn(Un,Pn))}Wt(!1)}),wn=Se=>{var Pn;Ms(Se),(Pn=Se==null?void 0:Se.trim())==null||Pn.length},Hn=Se=>{So.current=So.current+1,Ln(Se),kr(0),Ms(""),Ue(!1),un(Se,0),Dn(Se)},di=()=>Jn(void 0,null,function*(){var Se;if(Ss.trim().length===0){Be.ZP.error("\u4E0D\u80FD\u8F93\u5165\u7EAF\u7A7A\u683C");return}if(!Ss){Be.ZP.warning("\u8BF7\u8F93\u5165\u4F60\u8981\u95EE\u7684\u95EE\u9898");return}Ue(!0);const Pn=et()().format("YYYY-MM-DDTHH:mm:ss.SSSZ"),ti=Cn({},Er);(Se=ti==null?void 0:ti.data)==null||Se.push({id:0,updated_at:Pn,question:Ss,answer:Ht.createElement("div",{className:De.animation},"\u8001\u5E08\u6B63\u5728\u56DE\u7B54\u4E2D\uFF0C\u8BF7\u7A0D\u540E")}),bo(ti),fi(qi+1),Ms(""),So.current=So.current+1;const nn=So.current,pe=yield(0,fe.ZP)("/api/chats/get_answer",{method:"post",body:{chat_id:Qi,to_user_id:Et,question:Ss,challenge_id:Pr||"",time:Pn}});nn===So.current&&(pe==null?void 0:pe.status)===0&&un(Qi,Pr,!0)}),ke=()=>{un(Qi,Pr),cn(Et,Pr),xo(!1)},Ee=(Se,Pn,ti="")=>Jn(void 0,null,function*(){Wt(!0);let nn={};Bt.get("homeworkId")?nn={id:Se,satisfied:Pn,content:ti,homework_common_id:Bt.get("homeworkId")}:nn={id:Se,satisfied:Pn,content:ti};const pe=yield(0,fe.ZP)("/api/chats/praise.json",{method:"post",body:nn});(pe==null?void 0:pe.status)===0&&un(Qi,Pr)}),ue=Se=>{Se.shiftKey&&Se.keyCode===13||Se.keyCode===13&&(Se.preventDefault(),di())},Ie=Se=>Jn(void 0,null,function*(){Ne.default.confirm({icon:null,centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u8BF7\u786E\u8BA4\u662F\u5426\u5C06\u8BE5\u95EE\u7B54\u5185\u5BB9\u8FDB\u884C\u5220\u9664\uFF1F",onOk:()=>Jn(void 0,null,function*(){(yield(0,fe.ZP)("/api/chats/delete_one.json",{method:"delete",body:{id:Se}})).status===0&&(Be.ZP.success("\u5220\u9664\u6210\u529F"),un(Qi,Pr))})})}),On=()=>Jn(void 0,null,function*(){Wt(!0),So.current=So.current+1,(yield(0,fe.ZP)("/api/chats/stop_one.json",{method:"delete",body:{challenge_id:Pr,id:Qi}})).status===0&&un(Qi,Pr),Wt(!1)}),zn=[`\u8BF7${Er==null?void 0:Er.user_name}\u8001\u5E08\u5C1D\u8BD5\u518D\u56DE\u7B54\u4E00\u6B21`,"\u53EF\u80FD\u542F\u7528\u4E86\u673A\u5668\u4EBA\uFF0C\u8BF7\u8001\u5E08\u4EB2\u81EA\u56DE\u7B54"],Zn=Se=>{We(Er,Se)},Fe=()=>{};return Ht.createElement("div",{className:De.wrap},Ht.createElement("div",{className:De.head},Ht.createElement("b",null,"\u5B9E\u8BAD >"),"\u6559\u5B66\u8F85\u5BFC\uFF08beta\u7248\u672C\uFF09"),Ht.createElement("div",{className:De.content},Ht.createElement(ln.Z,{spinning:Fo},Ht.createElement("div",{className:De.left,onClick:()=>{en(!1)}},Ht.createElement("div",{className:De.title},Ht.createElement("span",null,"\u95EE\u7B54\u5217\u8868"),Ht.createElement("div",{className:Si()(De.add,kt&&De.disabledElement),onClick:()=>Jn(void 0,null,function*(){if(kt)return;$r(!0);const Se=yield(0,fe.ZP)("/api/chats.json",{method:"post",body:{to_user_id:Et,new_chat:!0}});if(Se.status===0){const Pn=Se==null?void 0:Se.id;if(Pn===Qi){Be.ZP.warning("\u5F53\u524D\u5DF2\u7ECF\u5728\u65B0\u5BF9\u8BDD\u7A97\u53E3"),$r(!1);return}yield cn(-1,0),Ln(Pn),kr(0),yield un(Pn,0)}$r(!1)})})),Ht.createElement("div",{className:De.leftBar},Ci.map(Se=>Ht.createElement("div",{key:Se.id,onClick:()=>Hn(Se.id),className:`${De.li} ${Se.id===Qi?De.active:""}`},Se!=null&&Se.avatar?Ht.createElement("img",{src:`${Xe.Z.IMG_SERVER}/images/${Se==null?void 0:Se.avatar}`}):Ht.createElement("img",{src:nt}),Ht.createElement("aside",null,Ht.createElement("p",null,Ht.createElement("b",{title:Se.user_name},Se.user_name),Ht.createElement("span",null,Se.time)),Ht.createElement("div",null,Se.last_message))))))),Ht.createElement("div",{className:De.right},Wr&&Ht.createElement("div",{className:De.title,onClick:()=>{en(!1)}},Ht.createElement("section",{className:De.center},Ht.createElement("span",null,"\u4E0E",Er==null?void 0:Er.user_name,"\u8001\u5E08\u6C9F\u901A\u4E2D\u2026"),Ht.createElement("div",{className:De.tabs},Ht.createElement("i",{className:"iconfont icon-lianjie3"}),Ht.createElement("span",null,"\u5F53\u524D\u5BF9\u8BDD\u5173\u8054\uFF1A",Er!=null&&Er.challenge_name?`${(Sn=(Le=Er==null?void 0:Er.data[0])==null?void 0:Le.shixun)==null?void 0:Sn.name} \u5B9E\u8BAD---\u7B2C${Er==null?void 0:Er.challenge_position}\u5173`:"\u5168\u90E8"),Ht.createElement("span",{onClick:()=>{kt||(yr.current=Pr,xo(!0))},className:Si()(De.cut,kt&&De.disabledElement)},"\u5207\u6362")),Ht.createElement(qt,{disabled:kt,recoverDisabled:!(Er!=null&&Er.can_recycle),onFileType:Zn,onRecover:()=>Jn(void 0,null,function*(){Wt(!0),(yield(0,fe.ZP)("/api/chats/recycle.json",{method:"post",body:{challenge_id:Pr,id:Qi}})).status===0&&(Be.ZP.success("\u6062\u590D\u5BF9\u8BDD\u6210\u529F"),cn(Et,Pr),un(Qi,Pr)),Wt(!1)}),onEmpty:()=>{Ne.default.confirm({icon:null,centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u8BF7\u786E\u8BA4\u662F\u5426\u5C06\u5F53\u524D\u5BF9\u8BDD\u7A97\u53E3\u4E2D\u7684\u5BF9\u8BDD\u5185\u5BB9\u5168\u90E8\u6E05\u7A7A\uFF1F",onOk:()=>Jn(void 0,null,function*(){(yield(0,fe.ZP)("/api/chats/clean.json",{method:"delete",body:{challenge_id:Pr,id:Qi}})).status===0&&(Be.ZP.success("\u6E05\u7A7A\u5BF9\u8BDD\u6210\u529F"),cn(Et,Pr),un(Qi,Pr))})})}}))),Ht.createElement("div",{onClick:()=>{en(!1)},className:De.rightBar,ref:ur},Ht.createElement(ln.Z,{spinning:Dt},!((xn=Er==null?void 0:Er.data)!=null&&xn.length)&&Ht.createElement("div",{className:De.empty}),(Kt=Er==null?void 0:Er.data)==null?void 0:Kt.map((Se,Pn)=>{var ti,nn,pe;return Ht.createElement(Tt.Fragment,{key:Pn},!!Se.question&&Ht.createElement("div",{className:De.li},Ht.createElement("img",{src:`${Xe.Z.IMG_SERVER}/images/${Er==null?void 0:Er.my_avatar}`,style:{borderRadius:"50%",width:56,height:56}}),Ht.createElement("aside",null,Ht.createElement("p",null,Ht.createElement("b",null,Er.my_user_name),Ht.createElement("span",null,et()(Se.updated_at).format("YYYY-MM-DD HH:mm"))),Ht.createElement(lt.Z,{value:Se.question}),Ht.createElement("div",{className:De.action},Ht.createElement(ct.CopyToClipboard,{text:Se.question,onCopy:()=>Be.ZP.success("\u5185\u5BB9\u5DF2\u590D\u5236\u5230\u7C98\u8D34\u677F\u4E2D")},Ht.createElement("div",{className:De.tagBtn},Ht.createElement("i",{className:"iconfont icon-fuzhi8"}),"\u590D\u5236")),!kt&&Ht.createElement("div",{onClick:()=>Ie(Se.id),className:De.tagBtn},Ht.createElement("i",{className:"iconfont icon-shanchu8"}),"\u5220\u9664")))),!!Se.answer&&Ht.createElement("div",{style:Pn===0?{borderTop:0}:{},className:`${De.li} ${De.active}`},Er!=null&&Er.avatar?Ht.createElement("img",{src:`${Xe.Z.IMG_SERVER}/images/${Er==null?void 0:Er.avatar}`,style:{borderRadius:"50%",width:56,height:56}}):Ht.createElement("img",{src:nt,style:{borderRadius:"50%",width:56,height:56}}),Ht.createElement("aside",null,Ht.createElement("p",null,Ht.createElement("div",{style:{display:"flex"}},Ht.createElement("b",{style:{marginRight:"20px"}},Er.user_name),(ti=Se.shixun)!=null&&ti.name?Ht.createElement("span",{style:{display:"flex",alignItems:"center"}},"\u5F53\u524D\u5BF9\u8BDD\u5173\u8054\uFF1A",(nn=Se.shixun)==null?void 0:nn.name," \u5B9E\u8BAD---\u7B2C",(pe=Se.challenge)==null?void 0:pe.position,"\u5173"):Ht.createElement("span",{style:{display:"flex",alignItems:"center"}},"\u5F53\u524D\u5BF9\u8BDD\u5173\u8054\uFF1A\u5168\u90E8")),Ht.createElement("span",null,et()(Se.updated_at).format("YYYY-MM-DD HH:mm"))),Se.id===0?Se.answer:Ht.createElement(fn,{onTextChange:Fe,open:!!(Se!=null&&Se.open),text:Se.answer}),Se.id===0&&Ht.createElement("div",{className:De.action},Ht.createElement("div",{onClick:On,className:De.tagBtn},Ht.createElement("i",{className:"iconfont icon-tingzhishengcheng"}),"\u505C\u6B62\u751F\u6210")),(Se==null?void 0:Se.id)!==0&&Ht.createElement("div",{className:De.action},!!Se.question&&Ht.createElement(Ht.Fragment,null,Ht.createElement("div",{onClick:()=>{Ss=Se.question,di()},className:De.tagBtn},Ht.createElement("i",{className:"iconfont icon-zhongxinshengcheng"}),"\u91CD\u65B0\u751F\u6210"),Ht.createElement(ct.CopyToClipboard,{text:Se.answer,onCopy:()=>Be.ZP.success("\u5185\u5BB9\u5DF2\u590D\u5236\u5230\u7C98\u8D34\u677F\u4E2D")},Ht.createElement("div",{className:De.tagBtn},Ht.createElement("i",{className:"iconfont icon-fuzhi8"}),"\u590D\u5236")),!kt&&Ht.createElement("div",{onClick:()=>Ie(Se.id),className:De.tagBtn},Ht.createElement("i",{className:"iconfont icon-shanchu8"}),"\u5220\u9664")),Ht.createElement("span",{style:{marginLeft:"auto"},onClick:()=>{Ee(Se.id,Se.satisfied===1?-1:1)},className:`mr30 ${Se.satisfied===1?De.actActive:""}`},Ht.createElement("i",{className:"iconfont icon-yijiejue"}),"\u5DF2\u89E3\u51B3"),Ht.createElement(be.Z,{autoAdjustOverflow:!1,destroyTooltipOnHide:!0,open:Xn[Pn],getPopupContainer:Un=>Un,placement:Tn.current,content:Ht.createElement("div",{className:De.box,onMouseLeave:Un=>{clearTimeout(Ei.current),Xn[Pn]=!1,si(Cn({},Xn))},onMouseOver:()=>{clearTimeout(Ei.current)}},Ht.createElement("p",null,"\u62B1\u6B49\u8BA9\u4F60\u5931\u671B\u4E86\uFF0C\u8BF7\u7EE7\u7EED\u5C1D\u8BD5\uFF1A"),zn.map((Un,pi)=>{const Oi=Un===Se.content;return Ht.createElement("div",{onClick:()=>{Ee(Se.id,Oi?-1:0,Oi?"":Un)},className:Oi?De.hot:"",key:Un},Un)}))},Ht.createElement("span",{onMouseOver:Un=>{clearTimeout(Ei.current),window.innerHeight-Un.target.getBoundingClientRect().top<350?Tn.current="topRight":Tn.current="bottomRight",Xn={},Xn[Pn]=!0,si(Cn({},Xn))},onMouseOut:Un=>{Ei.current=setTimeout(()=>{clearTimeout(Ei.current),Xn[Pn]=!1,si(Cn({},Xn))},800)},className:`${De.unsolved} ${Se.satisfied===0?De.actActive:""}`},Ht.createElement("i",{className:"iconfont icon-weijiejuezhengchang"}),"\u672A\u89E3\u51B3"))))))}))),Wr&&Ht.createElement("div",{className:De.answers},!er&&Ht.createElement("div",{className:De.open_md,onClick:()=>{en(!0)}},"\u8BF7\u8F93\u5165\u4F60\u7684\u95EE\u9898"),Ht.createElement("div",{className:er?"md_container":"md_container hide",style:{marginTop:20}},Ht.createElement(gt.Z,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:Ss,height:240,width:1e3,onChange:wn,className:De.md_editor}),Ht.createElement("div",{className:De.tip_container,style:{display:"flex"},onClick:()=>{en(!1)}},Ht.createElement("div",{className:De.btn_send,onClick:di},"\u53D1\u9001")))))),Ht.createElement(Ne.default,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,onCancel:()=>{kr(yr.current),xo(!1)},onOk:ke,open:$s,wrapClassName:kn.Z.CustomCss,title:"\u66F4\u6362\u5173\u8054",width:"666px"},Ht.createElement("div",null,Ht.createElement(we.ZP.Group,{value:Pr,onChange:Se=>kr(Se.target.value)},Ht.createElement(ne.Z,{direction:"vertical"},or==null?void 0:or.map(Se=>{var Pn;return Ht.createElement(we.ZP,{key:Se.id,value:Se.id},Se.id===0?Se.subject:`${(Pn=Se.shixun)==null?void 0:Pn.name} \u5B9E\u8BAD---\u7B2C${Se==null?void 0:Se.challenge_position}\u5173`)}))))))}},51161:function(yn,qn,ee){"use strict";ee.d(qn,{AL:function(){return Lt},Iy:function(){return gn},Qv:function(){return Ut},ez:function(){return yt},jb:function(){return Xe}});var Tt=ee(47084),Be=ee.n(Tt),Ne=ee(90621),ln=ee.n(Ne);let be=1;function we(he,le){const We=he.match(/^(\s+)(?:```)/);if(We===null)return le;const me=We[1];return le.split(`
`).map(Je=>{const fn=Je.match(/^\s+/);if(fn===null)return Je;const[sn]=fn;return sn.length>=me.length?Je.slice(me.length):Je}).join(`
`)}let ne=[],De=["<ul>"];const fe=new(Be()).Renderer,Qe=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function gn(){ne.length=0,De=["<ul>"]}const Xe={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function kn(he,le,We,me){if(le>=he.length||he[le].level<=We)return le;var Je=he[le];me.push("<li><a href='#"+be+Je.anchor+"'>"+Je.text+"</a>"),le++;var fn=[];return le=kn(he,le,Je.level,fn),fn.length>0&&(me.push("<ul>"),fn.forEach(function(sn){me.push(sn)}),me.push("</ul>")),me.push("</li>"),le=kn(he,le,We,me),le}function Ut(){return kn(ne,0,0,De),De.push("</ul>"),De.join("")}const et={heading(he){const le=Qe.exec(he);if(be+=1,le)return{type:"heading",raw:le[0],depth:le[1].length,text:le[2]}},fences(he){const le=this.rules.block.fences.exec(he);if(le){const We=le[0];let me=we(We,le[3]||"");const Je=le[2]?le[2].trim():le[2];if(["latex","katex","math"].indexOf(Je)>=0){const fn=lt(),sn=me;me=fn,ct[fn]={type:"block",expression:sn}}return{type:"code",raw:We,lang:Je,text:me}}}},nt=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let gt=0;const lt=()=>`__special_katext_id_${gt++}__`;let ct={};function yt(){return ct}function Lt(){gt=0,ct={}}function Nt(he){return he=he.replace(nt,(le,We)=>{const me=lt();return ct[me]={type:"inline",expression:We},me}),he}const Vt=fe.listitem;fe.listitem=function(he){return Vt(Nt(he))};const Jt=fe.paragraph;fe.paragraph=function(he){return Jt(Nt(he))};const Ae=fe.tablecell;fe.tablecell=function(he,le){return Ae(Nt(he),le)},fe.code=function(he,le,We){const me=(le||"").match(/\S*/)[0];return me?["latex","katex","math"].indexOf(me)>=0?`<p class='editormd-tex'>${he}</p>`:`<pre class="prettyprint linenums"><code class="language-${le}">${We?he:(0,Ne.escape)(he,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(We?he:(0,Ne.escape)(he,!0))+"</code></pre>"},fe.heading=function(he,le,We){let me=this.options.headerPrefix+We.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ne.push({anchor:me,level:le,text:he}),"<h"+le+' id="'+be+me+'">'+he+"</h"+le+">"},Be().setOptions({silent:!0,gfm:!0,pedantic:!1}),Be().use({tokenizer:et,renderer:fe}),qn.ZP=Be()},88386:function(yn,qn,ee){(function(Tt){Tt(ee(4631))})(function(Tt){Tt.defineOption("placeholder","",function(De,fe,Qe){var gn=Qe&&Qe!=Tt.Init;if(fe&&!gn)De.on("blur",be),De.on("change",we),De.on("swapDoc",we),Tt.on(De.getInputField(),"compositionupdate",De.state.placeholderCompose=function(){ln(De)}),we(De);else if(!fe&&gn){De.off("blur",be),De.off("change",we),De.off("swapDoc",we),Tt.off(De.getInputField(),"compositionupdate",De.state.placeholderCompose),Be(De);var Xe=De.getWrapperElement();Xe.className=Xe.className.replace(" CodeMirror-empty","")}fe&&!De.hasFocus()&&be(De)});function Be(De){De.state.placeholder&&(De.state.placeholder.parentNode.removeChild(De.state.placeholder),De.state.placeholder=null)}function Ne(De){Be(De);var fe=De.state.placeholder=document.createElement("pre");fe.style.cssText="height: 0; overflow: visible",fe.style.direction=De.getOption("direction"),fe.className="CodeMirror-placeholder CodeMirror-line-like";var Qe=De.getOption("placeholder");typeof Qe=="string"&&(Qe=document.createTextNode(Qe)),fe.appendChild(Qe),De.display.lineSpace.insertBefore(fe,De.display.lineSpace.firstChild)}function ln(De){setTimeout(function(){var fe=!1,Qe=De.getInputField();Qe.nodeName=="TEXTAREA"?fe=!Qe.value:De.lineCount()==1&&(fe=!/[^\u200b]/.test(Qe.querySelector(".CodeMirror-line").textContent)),fe?Ne(De):Be(De)},20)}function be(De){ne(De)&&Ne(De)}function we(De){var fe=De.getWrapperElement(),Qe=ne(De);fe.className=fe.className.replace(" CodeMirror-empty","")+(Qe?" CodeMirror-empty":""),Qe?Ne(De):Be(De)}function ne(De){return De.lineCount()===1&&De.getLine(0)===""}})},82801:function(yn,qn,ee){(function(Tt){Tt(ee(4631))})(function(Tt){var Be={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Ne=Tt.Pos;Tt.defineOption("autoCloseBrackets",!1,function(et,nt,gt){gt&&gt!=Tt.Init&&(et.removeKeyMap(be),et.state.closeBrackets=null),nt&&(we(ln(nt,"pairs")),et.state.closeBrackets=nt,et.addKeyMap(be))});function ln(et,nt){return nt=="pairs"&&typeof et=="string"?et:typeof et=="object"&&et[nt]!=null?et[nt]:Be[nt]}var be={Backspace:fe,Enter:Qe};function we(et){for(var nt=0;nt<et.length;nt++){var gt=et.charAt(nt),lt="'"+gt+"'";be[lt]||(be[lt]=ne(gt))}}we(Be.pairs+"`");function ne(et){return function(nt){return Xe(nt,et)}}function De(et){var nt=et.state.closeBrackets;if(!nt||nt.override)return nt;var gt=et.getModeAt(et.getCursor());return gt.closeBrackets||nt}function fe(et){var nt=De(et);if(!nt||et.getOption("disableInput"))return Tt.Pass;for(var gt=ln(nt,"pairs"),lt=et.listSelections(),ct=0;ct<lt.length;ct++){if(!lt[ct].empty())return Tt.Pass;var yt=kn(et,lt[ct].head);if(!yt||gt.indexOf(yt)%2!=0)return Tt.Pass}for(var ct=lt.length-1;ct>=0;ct--){var Lt=lt[ct].head;et.replaceRange("",Ne(Lt.line,Lt.ch-1),Ne(Lt.line,Lt.ch+1),"+delete")}}function Qe(et){var nt=De(et),gt=nt&&ln(nt,"explode");if(!gt||et.getOption("disableInput"))return Tt.Pass;for(var lt=et.listSelections(),ct=0;ct<lt.length;ct++){if(!lt[ct].empty())return Tt.Pass;var yt=kn(et,lt[ct].head);if(!yt||gt.indexOf(yt)%2!=0)return Tt.Pass}et.operation(function(){var Lt=et.lineSeparator()||`
`;et.replaceSelection(Lt+Lt,null),et.execCommand("goCharLeft"),lt=et.listSelections();for(var Nt=0;Nt<lt.length;Nt++){var Vt=lt[Nt].head.line;et.indentLine(Vt,null,!0),et.indentLine(Vt+1,null,!0)}})}function gn(et){var nt=Tt.cmpPos(et.anchor,et.head)>0;return{anchor:new Ne(et.anchor.line,et.anchor.ch+(nt?-1:1)),head:new Ne(et.head.line,et.head.ch+(nt?1:-1))}}function Xe(et,nt){var gt=De(et);if(!gt||et.getOption("disableInput"))return Tt.Pass;var lt=ln(gt,"pairs"),ct=lt.indexOf(nt);if(ct==-1)return Tt.Pass;for(var yt=ln(gt,"closeBefore"),Lt=ln(gt,"triples"),Nt=lt.charAt(ct+1)==nt,Vt=et.listSelections(),Jt=ct%2==0,Ae,he=0;he<Vt.length;he++){var le=Vt[he],We=le.head,me,Je=et.getRange(We,Ne(We.line,We.ch+1));if(Jt&&!le.empty())me="surround";else if((Nt||!Jt)&&Je==nt)Nt&&Ut(et,We)?me="both":Lt.indexOf(nt)>=0&&et.getRange(We,Ne(We.line,We.ch+3))==nt+nt+nt?me="skipThree":me="skip";else if(Nt&&We.ch>1&&Lt.indexOf(nt)>=0&&et.getRange(Ne(We.line,We.ch-2),We)==nt+nt){if(We.ch>2&&/\bstring/.test(et.getTokenTypeAt(Ne(We.line,We.ch-2))))return Tt.Pass;me="addFour"}else if(Nt){var fn=We.ch==0?" ":et.getRange(Ne(We.line,We.ch-1),We);if(!Tt.isWordChar(Je)&&fn!=nt&&!Tt.isWordChar(fn))me="both";else return Tt.Pass}else if(Jt&&(Je.length===0||/\s/.test(Je)||yt.indexOf(Je)>-1))me="both";else return Tt.Pass;if(!Ae)Ae=me;else if(Ae!=me)return Tt.Pass}var sn=ct%2?lt.charAt(ct-1):nt,ui=ct%2?nt:lt.charAt(ct+1);et.operation(function(){if(Ae=="skip")et.execCommand("goCharRight");else if(Ae=="skipThree")for(var hi=0;hi<3;hi++)et.execCommand("goCharRight");else if(Ae=="surround"){for(var Si=et.getSelections(),hi=0;hi<Si.length;hi++)Si[hi]=sn+Si[hi]+ui;et.replaceSelections(Si,"around"),Si=et.listSelections().slice();for(var hi=0;hi<Si.length;hi++)Si[hi]=gn(Si[hi]);et.setSelections(Si)}else Ae=="both"?(et.replaceSelection(sn+ui,null),et.triggerElectric(sn+ui),et.execCommand("goCharLeft")):Ae=="addFour"&&(et.replaceSelection(sn+sn+sn+sn,"before"),et.execCommand("goCharRight"))})}function kn(et,nt){var gt=et.getRange(Ne(nt.line,nt.ch-1),Ne(nt.line,nt.ch+1));return gt.length==2?gt:null}function Ut(et,nt){var gt=et.getTokenAt(Ne(nt.line,nt.ch+1));return/\bstring/.test(gt.type)&&gt.start==nt.ch&&(nt.ch==0||!/\bstring/.test(et.getTokenTypeAt(nt)))}})},57341:function(yn,qn,ee){(function(Tt){Tt(ee(4631),ee(4786))})(function(Tt){Tt.defineOption("autoCloseTags",!1,function(fe,Qe,gn){if(gn!=Tt.Init&&gn&&fe.removeKeyMap("autoCloseTags"),!!Qe){var Xe={name:"autoCloseTags"};(typeof Qe!="object"||Qe.whenClosing!==!1)&&(Xe["'/'"]=function(kn){return we(kn)}),(typeof Qe!="object"||Qe.whenOpening!==!1)&&(Xe["'>'"]=function(kn){return ln(kn)}),fe.addKeyMap(Xe)}});var Be=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Ne=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function ln(fe){if(fe.getOption("disableInput"))return Tt.Pass;for(var Qe=fe.listSelections(),gn=[],Xe=fe.getOption("autoCloseTags"),kn=0;kn<Qe.length;kn++){if(!Qe[kn].empty())return Tt.Pass;var Ut=Qe[kn].head,et=fe.getTokenAt(Ut),nt=Tt.innerMode(fe.getMode(),et.state),gt=nt.state,lt=nt.mode.xmlCurrentTag&&nt.mode.xmlCurrentTag(gt),ct=lt&&lt.name;if(!ct)return Tt.Pass;var yt=nt.mode.configuration=="html",Lt=typeof Xe=="object"&&Xe.dontCloseTags||yt&&Be,Nt=typeof Xe=="object"&&Xe.indentTags||yt&&Ne;et.end>Ut.ch&&(ct=ct.slice(0,ct.length-et.end+Ut.ch));var Vt=ct.toLowerCase();if(!ct||et.type=="string"&&(et.end!=Ut.ch||!/[\"\']/.test(et.string.charAt(et.string.length-1))||et.string.length==1)||et.type=="tag"&&lt.close||et.string.indexOf("/")==Ut.ch-et.start-1||Lt&&ne(Lt,Vt)>-1||De(fe,nt.mode.xmlCurrentContext&&nt.mode.xmlCurrentContext(gt)||[],ct,Ut,!0))return Tt.Pass;var Jt=typeof Xe=="object"&&Xe.emptyTags;if(Jt&&ne(Jt,ct)>-1){gn[kn]={text:"/>",newPos:Tt.Pos(Ut.line,Ut.ch+2)};continue}var Ae=Nt&&ne(Nt,Vt)>-1;gn[kn]={indent:Ae,text:">"+(Ae?`
`:"")+"</"+ct+">",newPos:Ae?Tt.Pos(Ut.line+1,0):Tt.Pos(Ut.line,Ut.ch+1)}}for(var he=typeof Xe=="object"&&Xe.dontIndentOnAutoClose,kn=Qe.length-1;kn>=0;kn--){var le=gn[kn];fe.replaceRange(le.text,Qe[kn].head,Qe[kn].anchor,"+insert");var We=fe.listSelections().slice(0);We[kn]={head:le.newPos,anchor:le.newPos},fe.setSelections(We),!he&&le.indent&&(fe.indentLine(le.newPos.line,null,!0),fe.indentLine(le.newPos.line+1,null,!0))}}function be(fe,Qe){for(var gn=fe.listSelections(),Xe=[],kn=Qe?"/":"</",Ut=fe.getOption("autoCloseTags"),et=typeof Ut=="object"&&Ut.dontIndentOnSlash,nt=0;nt<gn.length;nt++){if(!gn[nt].empty())return Tt.Pass;var gt=gn[nt].head,lt=fe.getTokenAt(gt),ct=Tt.innerMode(fe.getMode(),lt.state),yt=ct.state;if(Qe&&(lt.type=="string"||lt.string.charAt(0)!="<"||lt.start!=gt.ch-1))return Tt.Pass;var Lt,Nt=ct.mode.name!="xml"&&fe.getMode().name=="htmlmixed";if(Nt&&ct.mode.name=="javascript")Lt=kn+"script";else if(Nt&&ct.mode.name=="css")Lt=kn+"style";else{var Vt=ct.mode.xmlCurrentContext&&ct.mode.xmlCurrentContext(yt);if(!Vt||Vt.length&&De(fe,Vt,Vt[Vt.length-1],gt))return Tt.Pass;Lt=kn+Vt[Vt.length-1]}fe.getLine(gt.line).charAt(lt.end)!=">"&&(Lt+=">"),Xe[nt]=Lt}if(fe.replaceSelections(Xe),gn=fe.listSelections(),!et)for(var nt=0;nt<gn.length;nt++)(nt==gn.length-1||gn[nt].head.line<gn[nt+1].head.line)&&fe.indentLine(gn[nt].head.line)}function we(fe){return fe.getOption("disableInput")?Tt.Pass:be(fe,!0)}Tt.commands.closeTag=function(fe){return be(fe)};function ne(fe,Qe){if(fe.indexOf)return fe.indexOf(Qe);for(var gn=0,Xe=fe.length;gn<Xe;++gn)if(fe[gn]==Qe)return gn;return-1}function De(fe,Qe,gn,Xe,kn){if(!Tt.scanForClosingTag)return!1;var Ut=Math.min(fe.lastLine()+1,Xe.line+500),et=Tt.scanForClosingTag(fe,Xe,null,Ut);if(!et||et.tag!=gn)return!1;for(var nt=kn?1:0,gt=Qe.length-1;gt>=0&&Qe[gt]==gn;gt--)++nt;Xe=et.to;for(var gt=1;gt<nt;gt++){var lt=Tt.scanForClosingTag(fe,Xe,null,Ut);if(!lt||lt.tag!=gn)return!1;Xe=lt.to}return!0}})},4786:function(yn,qn,ee){(function(Tt){Tt(ee(4631))})(function(Tt){"use strict";var Be=Tt.Pos;function Ne(gt,lt){return gt.line-lt.line||gt.ch-lt.ch}var ln="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",be=ln+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",we=new RegExp("<(/?)(["+ln+"]["+be+"]*)","g");function ne(gt,lt,ct,yt){this.line=lt,this.ch=ct,this.cm=gt,this.text=gt.getLine(lt),this.min=yt?Math.max(yt.from,gt.firstLine()):gt.firstLine(),this.max=yt?Math.min(yt.to-1,gt.lastLine()):gt.lastLine()}function De(gt,lt){var ct=gt.cm.getTokenTypeAt(Be(gt.line,lt));return ct&&/\btag\b/.test(ct)}function fe(gt){if(!(gt.line>=gt.max))return gt.ch=0,gt.text=gt.cm.getLine(++gt.line),!0}function Qe(gt){if(!(gt.line<=gt.min))return gt.text=gt.cm.getLine(--gt.line),gt.ch=gt.text.length,!0}function gn(gt){for(;;){var lt=gt.text.indexOf(">",gt.ch);if(lt==-1){if(fe(gt))continue;return}if(!De(gt,lt+1)){gt.ch=lt+1;continue}var ct=gt.text.lastIndexOf("/",lt),yt=ct>-1&&!/\S/.test(gt.text.slice(ct+1,lt));return gt.ch=lt+1,yt?"selfClose":"regular"}}function Xe(gt){for(;;){var lt=gt.ch?gt.text.lastIndexOf("<",gt.ch-1):-1;if(lt==-1){if(Qe(gt))continue;return}if(!De(gt,lt+1)){gt.ch=lt;continue}we.lastIndex=lt,gt.ch=lt;var ct=we.exec(gt.text);if(ct&&ct.index==lt)return ct}}function kn(gt){for(;;){we.lastIndex=gt.ch;var lt=we.exec(gt.text);if(!lt){if(fe(gt))continue;return}if(!De(gt,lt.index+1)){gt.ch=lt.index+1;continue}return gt.ch=lt.index+lt[0].length,lt}}function Ut(gt){for(;;){var lt=gt.ch?gt.text.lastIndexOf(">",gt.ch-1):-1;if(lt==-1){if(Qe(gt))continue;return}if(!De(gt,lt+1)){gt.ch=lt;continue}var ct=gt.text.lastIndexOf("/",lt),yt=ct>-1&&!/\S/.test(gt.text.slice(ct+1,lt));return gt.ch=lt+1,yt?"selfClose":"regular"}}function et(gt,lt){for(var ct=[];;){var yt=kn(gt),Lt,Nt=gt.line,Vt=gt.ch-(yt?yt[0].length:0);if(!yt||!(Lt=gn(gt)))return;if(Lt!="selfClose")if(yt[1]){for(var Jt=ct.length-1;Jt>=0;--Jt)if(ct[Jt]==yt[2]){ct.length=Jt;break}if(Jt<0&&(!lt||lt==yt[2]))return{tag:yt[2],from:Be(Nt,Vt),to:Be(gt.line,gt.ch)}}else ct.push(yt[2])}}function nt(gt,lt){for(var ct=[];;){var yt=Ut(gt);if(!yt)return;if(yt=="selfClose"){Xe(gt);continue}var Lt=gt.line,Nt=gt.ch,Vt=Xe(gt);if(!Vt)return;if(Vt[1])ct.push(Vt[2]);else{for(var Jt=ct.length-1;Jt>=0;--Jt)if(ct[Jt]==Vt[2]){ct.length=Jt;break}if(Jt<0&&(!lt||lt==Vt[2]))return{tag:Vt[2],from:Be(gt.line,gt.ch),to:Be(Lt,Nt)}}}}Tt.registerHelper("fold","xml",function(gt,lt){for(var ct=new ne(gt,lt.line,0);;){var yt=kn(ct);if(!yt||ct.line!=lt.line)return;var Lt=gn(ct);if(!Lt)return;if(!yt[1]&&Lt!="selfClose"){var Nt=Be(ct.line,ct.ch),Vt=et(ct,yt[2]);return Vt&&Ne(Vt.from,Nt)>0?{from:Nt,to:Vt.from}:null}}}),Tt.findMatchingTag=function(gt,lt,ct){var yt=new ne(gt,lt.line,lt.ch,ct);if(!(yt.text.indexOf(">")==-1&&yt.text.indexOf("<")==-1)){var Lt=gn(yt),Nt=Lt&&Be(yt.line,yt.ch),Vt=Lt&&Xe(yt);if(!(!Lt||!Vt||Ne(yt,lt)>0)){var Jt={from:Be(yt.line,yt.ch),to:Nt,tag:Vt[2]};return Lt=="selfClose"?{open:Jt,close:null,at:"open"}:Vt[1]?{open:nt(yt,Vt[2]),close:Jt,at:"close"}:(yt=new ne(gt,Nt.line,Nt.ch,ct),{open:Jt,close:et(yt,Vt[2]),at:"open"})}}},Tt.findEnclosingTag=function(gt,lt,ct,yt){for(var Lt=new ne(gt,lt.line,lt.ch,ct);;){var Nt=nt(Lt,yt);if(!Nt)break;var Vt=new ne(gt,lt.line,lt.ch,ct),Jt=et(Vt,Nt.tag);if(Jt)return{open:Nt,close:Jt}}},Tt.scanForClosingTag=function(gt,lt,ct,yt){var Lt=new ne(gt,lt.line,lt.ch,yt?{from:0,to:yt}:null);return et(Lt,ct)}})},4631:function(yn){(function(qn,ee){yn.exports=ee()})(this,function(){"use strict";var qn=navigator.userAgent,ee=navigator.platform,Tt=/gecko\/\d/i.test(qn),Be=/MSIE \d/.test(qn),Ne=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(qn),ln=/Edge\/(\d+)/.exec(qn),be=Be||Ne||ln,we=be&&(Be?document.documentMode||6:+(ln||Ne)[1]),ne=!ln&&/WebKit\//.test(qn),De=ne&&/Qt\/\d+\.\d+/.test(qn),fe=!ln&&/Chrome\//.test(qn),Qe=/Opera\//.test(qn),gn=/Apple Computer/.test(navigator.vendor),Xe=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(qn),kn=/PhantomJS/.test(qn),Ut=!ln&&/AppleWebKit/.test(qn)&&/Mobile\/\w+/.test(qn),et=/Android/.test(qn),nt=Ut||et||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(qn),gt=Ut||/Mac/.test(ee),lt=/\bCrOS\b/.test(qn),ct=/win/i.test(ee),yt=Qe&&qn.match(/Version\/(\d*\.\d*)/);yt&&(yt=Number(yt[1])),yt&&yt>=15&&(Qe=!1,ne=!0);var Lt=gt&&(De||Qe&&(yt==null||yt<12.11)),Nt=Tt||be&&we>=9;function Vt(it){return new RegExp("(^|\\s)"+it+"(?:$|\\s)\\s*")}var Jt=function(it,st){var ht=it.className,ut=Vt(st).exec(ht);if(ut){var dt=ht.slice(ut.index+ut[0].length);it.className=ht.slice(0,ut.index)+(dt?ut[1]+dt:"")}};function Ae(it){for(var st=it.childNodes.length;st>0;--st)it.removeChild(it.firstChild);return it}function he(it,st){return Ae(it).appendChild(st)}function le(it,st,ht,ut){var dt=document.createElement(it);if(ht&&(dt.className=ht),ut&&(dt.style.cssText=ut),typeof st=="string")dt.appendChild(document.createTextNode(st));else if(st)for(var Pt=0;Pt<st.length;++Pt)dt.appendChild(st[Pt]);return dt}function We(it,st,ht,ut){var dt=le(it,st,ht,ut);return dt.setAttribute("role","presentation"),dt}var me;document.createRange?me=function(it,st,ht,ut){var dt=document.createRange();return dt.setEnd(ut||it,ht),dt.setStart(it,st),dt}:me=function(it,st,ht){var ut=document.body.createTextRange();try{ut.moveToElementText(it.parentNode)}catch(dt){return ut}return ut.collapse(!0),ut.moveEnd("character",ht),ut.moveStart("character",st),ut};function Je(it,st){if(st.nodeType==3&&(st=st.parentNode),it.contains)return it.contains(st);do if(st.nodeType==11&&(st=st.host),st==it)return!0;while(st=st.parentNode)}function fn(){var it;try{it=document.activeElement}catch(st){it=document.body||null}for(;it&&it.shadowRoot&&it.shadowRoot.activeElement;)it=it.shadowRoot.activeElement;return it}function sn(it,st){var ht=it.className;Vt(st).test(ht)||(it.className+=(ht?" ":"")+st)}function ui(it,st){for(var ht=it.split(" "),ut=0;ut<ht.length;ut++)ht[ut]&&!Vt(ht[ut]).test(st)&&(st+=" "+ht[ut]);return st}var hi=function(it){it.select()};Ut?hi=function(it){it.selectionStart=0,it.selectionEnd=it.value.length}:be&&(hi=function(it){try{it.select()}catch(st){}});function Si(it){var st=Array.prototype.slice.call(arguments,1);return function(){return it.apply(null,st)}}function fr(it,st,ht){st||(st={});for(var ut in it)it.hasOwnProperty(ut)&&(ht!==!1||!st.hasOwnProperty(ut))&&(st[ut]=it[ut]);return st}function qt(it,st,ht,ut,dt){st==null&&(st=it.search(/[^\s\u00a0]/),st==-1&&(st=it.length));for(var Pt=ut||0,bt=dt||0;;){var jt=it.indexOf(" ",Pt);if(jt<0||jt>=st)return bt+(st-Pt);bt+=jt-Pt,bt+=ht-bt%ht,Pt=jt+1}}var Ht=function(){this.id=null,this.f=null,this.time=0,this.handler=Si(this.onTimeout,this)};Ht.prototype.onTimeout=function(it){it.id=0,it.time<=+new Date?it.f():setTimeout(it.handler,it.time-+new Date)},Ht.prototype.set=function(it,st){this.f=st;var ht=+new Date+it;(!this.id||ht<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,it),this.time=ht)};function je(it,st){for(var ht=0;ht<it.length;++ht)if(it[ht]==st)return ht;return-1}var Nn=50,Kn={toString:function(){return"CodeMirror.Pass"}},He={scroll:!1},mn={origin:"*mouse"},Cn={origin:"+move"};function Jn(it,st,ht){for(var ut=0,dt=0;;){var Pt=it.indexOf(" ",ut);Pt==-1&&(Pt=it.length);var bt=Pt-ut;if(Pt==it.length||dt+bt>=st)return ut+Math.min(bt,st-dt);if(dt+=Pt-ut,dt+=ht-dt%ht,ut=Pt+1,dt>=st)return ut}}var bn=[""];function ve(it){for(;bn.length<=it;)bn.push(Le(bn)+" ");return bn[it]}function Le(it){return it[it.length-1]}function Sn(it,st){for(var ht=[],ut=0;ut<it.length;ut++)ht[ut]=st(it[ut],ut);return ht}function xn(it,st,ht){for(var ut=0,dt=ht(st);ut<it.length&&ht(it[ut])<=dt;)ut++;it.splice(ut,0,st)}function Kt(){}function Et(it,st){var ht;return Object.create?ht=Object.create(it):(Kt.prototype=it,ht=new Kt),st&&fr(st,ht),ht}var Ft=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Dt(it){return/\w/.test(it)||it>"\x80"&&(it.toUpperCase()!=it.toLowerCase()||Ft.test(it))}function Wt(it,st){return st?st.source.indexOf("\\w")>-1&&Dt(it)?!0:st.test(it):Dt(it)}function kt(it){for(var st in it)if(it.hasOwnProperty(st)&&it[st])return!1;return!0}var Ue=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Tn(it){return it.charCodeAt(0)>=768&&Ue.test(it)}function Ei(it,st,ht){for(;(ht<0?st>0:st<it.length)&&Tn(it.charAt(st));)st+=ht;return st}function Xn(it,st,ht){for(var ut=st>ht?-1:1;;){if(st==ht)return st;var dt=(st+ht)/2,Pt=ut<0?Math.ceil(dt):Math.floor(dt);if(Pt==st)return it(Pt)?st:ht;it(Pt)?ht=Pt:st=Pt+ut}}function si(it,st,ht,ut){if(!it)return ut(st,ht,"ltr",0);for(var dt=!1,Pt=0;Pt<it.length;++Pt){var bt=it[Pt];(bt.from<ht&&bt.to>st||st==ht&&bt.to==st)&&(ut(Math.max(bt.from,st),Math.min(bt.to,ht),bt.level==1?"rtl":"ltr",Pt),dt=!0)}dt||ut(st,ht,"ltr")}var Qi=null;function Ln(it,st,ht){var ut;Qi=null;for(var dt=0;dt<it.length;++dt){var Pt=it[dt];if(Pt.from<st&&Pt.to>st)return dt;Pt.to==st&&(Pt.from!=Pt.to&&ht=="before"?ut=dt:Qi=dt),Pt.from==st&&(Pt.from!=Pt.to&&ht!="before"?ut=dt:Qi=dt)}return ut!=null?ut:Qi}var Ci=function(){var it="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",st="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ht(Zt){return Zt<=247?it.charAt(Zt):1424<=Zt&&Zt<=1524?"R":1536<=Zt&&Zt<=1785?st.charAt(Zt-1536):1774<=Zt&&Zt<=2220?"r":8192<=Zt&&Zt<=8203?"w":Zt==8204?"b":"L"}var ut=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,dt=/[stwN]/,Pt=/[LRr]/,bt=/[Lb1n]/,jt=/[1n]/;function Ot(Zt,Pe,te){this.level=Zt,this.from=Pe,this.to=te}return function(Zt,Pe){var te=Pe=="ltr"?"L":"R";if(Zt.length==0||Pe=="ltr"&&!ut.test(Zt))return!1;for(var Ve=Zt.length,Ge=[],Fn=0;Fn<Ve;++Fn)Ge.push(ht(Zt.charCodeAt(Fn)));for(var In=0,_n=te;In<Ve;++In){var oi=Ge[In];oi=="m"?Ge[In]=_n:_n=oi}for(var bi=0,Bi=te;bi<Ve;++bi){var Di=Ge[bi];Di=="1"&&Bi=="r"?Ge[bi]="n":Pt.test(Di)&&(Bi=Di,Di=="r"&&(Ge[bi]="R"))}for(var ar=1,wi=Ge[0];ar<Ve-1;++ar){var Cr=Ge[ar];Cr=="+"&&wi=="1"&&Ge[ar+1]=="1"?Ge[ar]="1":Cr==","&&wi==Ge[ar+1]&&(wi=="1"||wi=="n")&&(Ge[ar]=wi),wi=Cr}for(var Io=0;Io<Ve;++Io){var ks=Ge[Io];if(ks==",")Ge[Io]="N";else if(ks=="%"){var Zo=void 0;for(Zo=Io+1;Zo<Ve&&Ge[Zo]=="%";++Zo);for(var ba=Io&&Ge[Io-1]=="!"||Zo<Ve&&Ge[Zo]=="1"?"1":"N",Rs=Io;Rs<Zo;++Rs)Ge[Rs]=ba;Io=Zo-1}}for(var Ps=0,va=te;Ps<Ve;++Ps){var _s=Ge[Ps];va=="L"&&_s=="1"?Ge[Ps]="L":Pt.test(_s)&&(va=_s)}for(var vi=0;vi<Ve;++vi)if(dt.test(Ge[vi])){var Hr=void 0;for(Hr=vi+1;Hr<Ve&&dt.test(Ge[Hr]);++Hr);for(var Do=(vi?Ge[vi-1]:te)=="L",Po=(Hr<Ve?Ge[Hr]:te)=="L",Ys=Do==Po?Do?"L":"R":te,Kr=vi;Kr<Hr;++Kr)Ge[Kr]=Ys;vi=Hr-1}for(var wr=[],Ta,as=0;as<Ve;)if(bt.test(Ge[as])){var Su=as;for(++as;as<Ve&&bt.test(Ge[as]);++as);wr.push(new Ot(0,Su,as))}else{var sl=as,na=wr.length,Na=Pe=="rtl"?1:0;for(++as;as<Ve&&Ge[as]!="L";++as);for(var mo=sl;mo<as;)if(jt.test(Ge[mo])){sl<mo&&(wr.splice(na,0,new Ot(1,sl,mo)),na+=Na);var bs=mo;for(++mo;mo<as&&jt.test(Ge[mo]);++mo);wr.splice(na,0,new Ot(2,bs,mo)),na+=Na,sl=mo}else++mo;sl<as&&wr.splice(na,0,new Ot(1,sl,as))}return Pe=="ltr"&&(wr[0].level==1&&(Ta=Zt.match(/^\s+/))&&(wr[0].from=Ta[0].length,wr.unshift(new Ot(0,0,Ta[0].length))),Le(wr).level==1&&(Ta=Zt.match(/\s+$/))&&(Le(wr).to-=Ta[0].length,wr.push(new Ot(0,Ve-Ta[0].length,Ve)))),Pe=="rtl"?wr.reverse():wr}}();function gi(it,st){var ht=it.order;return ht==null&&(ht=it.order=Ci(it.text,st)),ht}var qi=[],fi=function(it,st,ht){if(it.addEventListener)it.addEventListener(st,ht,!1);else if(it.attachEvent)it.attachEvent("on"+st,ht);else{var ut=it._handlers||(it._handlers={});ut[st]=(ut[st]||qi).concat(ht)}};function Pr(it,st){return it._handlers&&it._handlers[st]||qi}function kr(it,st,ht){if(it.removeEventListener)it.removeEventListener(st,ht,!1);else if(it.detachEvent)it.detachEvent("on"+st,ht);else{var ut=it._handlers,dt=ut&&ut[st];if(dt){var Pt=je(dt,ht);Pt>-1&&(ut[st]=dt.slice(0,Pt).concat(dt.slice(Pt+1)))}}}function yr(it,st){var ht=Pr(it,st);if(ht.length)for(var ut=Array.prototype.slice.call(arguments,2),dt=0;dt<ht.length;++dt)ht[dt].apply(null,ut)}function or(it,st,ht){return typeof st=="string"&&(st={type:st,preventDefault:function(){this.defaultPrevented=!0}}),yr(it,ht||st.type,it,st),ur(st)||st.codemirrorIgnore}function Es(it){var st=it._handlers&&it._handlers.cursorActivity;if(st)for(var ht=it.curOp.cursorActivityHandlers||(it.curOp.cursorActivityHandlers=[]),ut=0;ut<st.length;++ut)je(ht,st[ut])==-1&&ht.push(st[ut])}function Wr(it,st){return Pr(it,st).length>0}function Wo(it){it.prototype.on=function(st,ht){fi(this,st,ht)},it.prototype.off=function(st,ht){kr(this,st,ht)}}function Fo(it){it.preventDefault?it.preventDefault():it.returnValue=!1}function $r(it){it.stopPropagation?it.stopPropagation():it.cancelBubble=!0}function ur(it){return it.defaultPrevented!=null?it.defaultPrevented:it.returnValue==!1}function So(it){Fo(it),$r(it)}function Er(it){return it.target||it.srcElement}function bo(it){var st=it.which;return st==null&&(it.button&1?st=1:it.button&2?st=3:it.button&4&&(st=2)),gt&&it.ctrlKey&&st==1&&(st=3),st}var Ss=function(){if(be&&we<9)return!1;var it=le("div");return"draggable"in it||"dragDrop"in it}(),Ms;function $s(it){if(Ms==null){var st=le("span","\u200B");he(it,le("span",[st,document.createTextNode("x")])),it.firstChild.offsetHeight!=0&&(Ms=st.offsetWidth<=1&&st.offsetHeight>2&&!(be&&we<8))}var ht=Ms?le("span","\u200B"):le("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ht.setAttribute("cm-text",""),ht}var xo;function er(it){if(xo!=null)return xo;var st=he(it,document.createTextNode("A\u062EA")),ht=me(st,0,1).getBoundingClientRect(),ut=me(st,1,2).getBoundingClientRect();return Ae(it),!ht||ht.left==ht.right?!1:xo=ut.right-ht.right<3}var en=`
b`.split(/\n/).length!=3?function(it){for(var st=0,ht=[],ut=it.length;st<=ut;){var dt=it.indexOf(`
`,st);dt==-1&&(dt=it.length);var Pt=it.slice(st,it.charAt(dt-1)=="\r"?dt-1:dt),bt=Pt.indexOf("\r");bt!=-1?(ht.push(Pt.slice(0,bt)),st+=bt+1):(ht.push(Pt),st=dt+1)}return ht}:function(it){return it.split(/\r\n?|\n/)},Bt=window.getSelection?function(it){try{return it.selectionStart!=it.selectionEnd}catch(st){return!1}}:function(it){var st;try{st=it.ownerDocument.selection.createRange()}catch(ht){}return!st||st.parentElement()!=it?!1:st.compareEndPoints("StartToEnd",st)!=0},Qn=function(){var it=le("div");return"oncopy"in it?!0:(it.setAttribute("oncopy","return;"),typeof it.oncopy=="function")}(),Dn=null;function cn(it){if(Dn!=null)return Dn;var st=he(it,le("span","x")),ht=st.getBoundingClientRect(),ut=me(st,0,1).getBoundingClientRect();return Dn=Math.abs(ht.left-ut.left)>1}var un={},wn={};function Hn(it,st){arguments.length>2&&(st.dependencies=Array.prototype.slice.call(arguments,2)),un[it]=st}function di(it,st){wn[it]=st}function ke(it){if(typeof it=="string"&&wn.hasOwnProperty(it))it=wn[it];else if(it&&typeof it.name=="string"&&wn.hasOwnProperty(it.name)){var st=wn[it.name];typeof st=="string"&&(st={name:st}),it=Et(st,it),it.name=st.name}else{if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(it))return ke("application/xml");if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(it))return ke("application/json")}return typeof it=="string"?{name:it}:it||{name:"null"}}function Ee(it,st){st=ke(st);var ht=un[st.name];if(!ht)return Ee(it,"text/plain");var ut=ht(it,st);if(ue.hasOwnProperty(st.name)){var dt=ue[st.name];for(var Pt in dt)dt.hasOwnProperty(Pt)&&(ut.hasOwnProperty(Pt)&&(ut["_"+Pt]=ut[Pt]),ut[Pt]=dt[Pt])}if(ut.name=st.name,st.helperType&&(ut.helperType=st.helperType),st.modeProps)for(var bt in st.modeProps)ut[bt]=st.modeProps[bt];return ut}var ue={};function Ie(it,st){var ht=ue.hasOwnProperty(it)?ue[it]:ue[it]={};fr(st,ht)}function On(it,st){if(st===!0)return st;if(it.copyState)return it.copyState(st);var ht={};for(var ut in st){var dt=st[ut];dt instanceof Array&&(dt=dt.concat([])),ht[ut]=dt}return ht}function zn(it,st){for(var ht;it.innerMode&&(ht=it.innerMode(st),!(!ht||ht.mode==it));)st=ht.state,it=ht.mode;return ht||{mode:it,state:st}}function Zn(it,st,ht){return it.startState?it.startState(st,ht):!0}var Fe=function(it,st,ht){this.pos=this.start=0,this.string=it,this.tabSize=st||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=ht};Fe.prototype.eol=function(){return this.pos>=this.string.length},Fe.prototype.sol=function(){return this.pos==this.lineStart},Fe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Fe.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Fe.prototype.eat=function(it){var st=this.string.charAt(this.pos),ht;if(typeof it=="string"?ht=st==it:ht=st&&(it.test?it.test(st):it(st)),ht)return++this.pos,st},Fe.prototype.eatWhile=function(it){for(var st=this.pos;this.eat(it););return this.pos>st},Fe.prototype.eatSpace=function(){for(var it=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>it},Fe.prototype.skipToEnd=function(){this.pos=this.string.length},Fe.prototype.skipTo=function(it){var st=this.string.indexOf(it,this.pos);if(st>-1)return this.pos=st,!0},Fe.prototype.backUp=function(it){this.pos-=it},Fe.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=qt(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?qt(this.string,this.lineStart,this.tabSize):0)},Fe.prototype.indentation=function(){return qt(this.string,null,this.tabSize)-(this.lineStart?qt(this.string,this.lineStart,this.tabSize):0)},Fe.prototype.match=function(it,st,ht){if(typeof it=="string"){var ut=function(bt){return ht?bt.toLowerCase():bt},dt=this.string.substr(this.pos,it.length);if(ut(dt)==ut(it))return st!==!1&&(this.pos+=it.length),!0}else{var Pt=this.string.slice(this.pos).match(it);return Pt&&Pt.index>0?null:(Pt&&st!==!1&&(this.pos+=Pt[0].length),Pt)}},Fe.prototype.current=function(){return this.string.slice(this.start,this.pos)},Fe.prototype.hideFirstChars=function(it,st){this.lineStart+=it;try{return st()}finally{this.lineStart-=it}},Fe.prototype.lookAhead=function(it){var st=this.lineOracle;return st&&st.lookAhead(it)},Fe.prototype.baseToken=function(){var it=this.lineOracle;return it&&it.baseToken(this.pos)};function Se(it,st){if(st-=it.first,st<0||st>=it.size)throw new Error("There is no line "+(st+it.first)+" in the document.");for(var ht=it;!ht.lines;)for(var ut=0;;++ut){var dt=ht.children[ut],Pt=dt.chunkSize();if(st<Pt){ht=dt;break}st-=Pt}return ht.lines[st]}function Pn(it,st,ht){var ut=[],dt=st.line;return it.iter(st.line,ht.line+1,function(Pt){var bt=Pt.text;dt==ht.line&&(bt=bt.slice(0,ht.ch)),dt==st.line&&(bt=bt.slice(st.ch)),ut.push(bt),++dt}),ut}function ti(it,st,ht){var ut=[];return it.iter(st,ht,function(dt){ut.push(dt.text)}),ut}function nn(it,st){var ht=st-it.height;if(ht)for(var ut=it;ut;ut=ut.parent)ut.height+=ht}function pe(it){if(it.parent==null)return null;for(var st=it.parent,ht=je(st.lines,it),ut=st.parent;ut;st=ut,ut=ut.parent)for(var dt=0;ut.children[dt]!=st;++dt)ht+=ut.children[dt].chunkSize();return ht+st.first}function Un(it,st){var ht=it.first;t:do{for(var ut=0;ut<it.children.length;++ut){var dt=it.children[ut],Pt=dt.height;if(st<Pt){it=dt;continue t}st-=Pt,ht+=dt.chunkSize()}return ht}while(!it.lines);for(var bt=0;bt<it.lines.length;++bt){var jt=it.lines[bt],Ot=jt.height;if(st<Ot)break;st-=Ot}return ht+bt}function pi(it,st){return st>=it.first&&st<it.first+it.size}function Oi(it,st){return String(it.lineNumberFormatter(st+it.firstLineNumber))}function on(it,st,ht){if(ht===void 0&&(ht=null),!(this instanceof on))return new on(it,st,ht);this.line=it,this.ch=st,this.sticky=ht}function ni(it,st){return it.line-st.line||it.ch-st.ch}function ie(it,st){return it.sticky==st.sticky&&ni(it,st)==0}function se(it){return on(it.line,it.ch)}function ye(it,st){return ni(it,st)<0?st:it}function Ce(it,st){return ni(it,st)<0?it:st}function Oe(it,st){return Math.max(it.first,Math.min(st,it.first+it.size-1))}function Ze(it,st){if(st.line<it.first)return on(it.first,0);var ht=it.first+it.size-1;return st.line>ht?on(ht,Se(it,ht).text.length):En(st,Se(it,st.line).text.length)}function En(it,st){var ht=it.ch;return ht==null||ht>st?on(it.line,st):ht<0?on(it.line,0):it}function Wn(it,st){for(var ht=[],ut=0;ut<st.length;ut++)ht[ut]=Ze(it,st[ut]);return ht}var Te=function(it,st){this.state=it,this.lookAhead=st},pn=function(it,st,ht,ut){this.state=st,this.doc=it,this.line=ht,this.maxLookAhead=ut||0,this.baseTokens=null,this.baseTokenPos=1};pn.prototype.lookAhead=function(it){var st=this.doc.getLine(this.line+it);return st!=null&&it>this.maxLookAhead&&(this.maxLookAhead=it),st},pn.prototype.baseToken=function(it){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=it;)this.baseTokenPos+=2;var st=this.baseTokens[this.baseTokenPos+1];return{type:st&&st.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-it}},pn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},pn.fromSaved=function(it,st,ht){return st instanceof Te?new pn(it,On(it.mode,st.state),ht,st.lookAhead):new pn(it,On(it.mode,st),ht)},pn.prototype.save=function(it){var st=it!==!1?On(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Te(st,this.maxLookAhead):st};function ri(it,st,ht,ut){var dt=[it.state.modeGen],Pt={};xi(it,st.text,it.doc.mode,ht,function(Zt,Pe){return dt.push(Zt,Pe)},Pt,ut);for(var bt=ht.state,jt=function(Zt){ht.baseTokens=dt;var Pe=it.state.overlays[Zt],te=1,Ve=0;ht.state=!0,xi(it,st.text,Pe.mode,ht,function(Ge,Fn){for(var In=te;Ve<Ge;){var _n=dt[te];_n>Ge&&dt.splice(te,1,Ge,dt[te+1],_n),te+=2,Ve=Math.min(Ge,_n)}if(Fn)if(Pe.opaque)dt.splice(In,te-In,Ge,"overlay "+Fn),te=In+2;else for(;In<te;In+=2){var oi=dt[In+1];dt[In+1]=(oi?oi+" ":"")+"overlay "+Fn}},Pt),ht.state=bt,ht.baseTokens=null,ht.baseTokenPos=1},Ot=0;Ot<it.state.overlays.length;++Ot)jt(Ot);return{styles:dt,classes:Pt.bgClass||Pt.textClass?Pt:null}}function Ji(it,st,ht){if(!st.styles||st.styles[0]!=it.state.modeGen){var ut=zi(it,pe(st)),dt=st.text.length>it.options.maxHighlightLength&&On(it.doc.mode,ut.state),Pt=ri(it,st,ut);dt&&(ut.state=dt),st.stateAfter=ut.save(!dt),st.styles=Pt.styles,Pt.classes?st.styleClasses=Pt.classes:st.styleClasses&&(st.styleClasses=null),ht===it.doc.highlightFrontier&&(it.doc.modeFrontier=Math.max(it.doc.modeFrontier,++it.doc.highlightFrontier))}return st.styles}function zi(it,st,ht){var ut=it.doc,dt=it.display;if(!ut.mode.startState)return new pn(ut,!0,st);var Pt=ci(it,st,ht),bt=Pt>ut.first&&Se(ut,Pt-1).stateAfter,jt=bt?pn.fromSaved(ut,bt,Pt):new pn(ut,Zn(ut.mode),Pt);return ut.iter(Pt,st,function(Ot){ce(it,Ot.text,jt);var Zt=jt.line;Ot.stateAfter=Zt==st-1||Zt%5==0||Zt>=dt.viewFrom&&Zt<dt.viewTo?jt.save():null,jt.nextLine()}),ht&&(ut.modeFrontier=jt.line),jt}function ce(it,st,ht,ut){var dt=it.doc.mode,Pt=new Fe(st,it.options.tabSize,ht);for(Pt.start=Pt.pos=ut||0,st==""&&$n(dt,ht.state);!Pt.eol();)mi(dt,Pt,ht.state),Pt.start=Pt.pos}function $n(it,st){if(it.blankLine)return it.blankLine(st);if(it.innerMode){var ht=zn(it,st);if(ht.mode.blankLine)return ht.mode.blankLine(ht.state)}}function mi(it,st,ht,ut){for(var dt=0;dt<10;dt++){ut&&(ut[0]=zn(it,ht).mode);var Pt=it.token(st,ht);if(st.pos>st.start)return Pt}throw new Error("Mode "+it.name+" failed to advance stream.")}var Yn=function(it,st,ht){this.start=it.start,this.end=it.pos,this.string=it.current(),this.type=st||null,this.state=ht};function hr(it,st,ht,ut){var dt=it.doc,Pt=dt.mode,bt;st=Ze(dt,st);var jt=Se(dt,st.line),Ot=zi(it,st.line,ht),Zt=new Fe(jt.text,it.options.tabSize,Ot),Pe;for(ut&&(Pe=[]);(ut||Zt.pos<st.ch)&&!Zt.eol();)Zt.start=Zt.pos,bt=mi(Pt,Zt,Ot.state),ut&&Pe.push(new Yn(Zt,bt,On(dt.mode,Ot.state)));return ut?Pe:new Yn(Zt,bt,Ot.state)}function Mi(it,st){if(it)for(;;){var ht=it.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!ht)break;it=it.slice(0,ht.index)+it.slice(ht.index+ht[0].length);var ut=ht[1]?"bgClass":"textClass";st[ut]==null?st[ut]=ht[2]:new RegExp("(?:^|\\s)"+ht[2]+"(?:$|\\s)").test(st[ut])||(st[ut]+=" "+ht[2])}return it}function xi(it,st,ht,ut,dt,Pt,bt){var jt=ht.flattenSpans;jt==null&&(jt=it.options.flattenSpans);var Ot=0,Zt=null,Pe=new Fe(st,it.options.tabSize,ut),te,Ve=it.options.addModeClass&&[null];for(st==""&&Mi($n(ht,ut.state),Pt);!Pe.eol();){if(Pe.pos>it.options.maxHighlightLength?(jt=!1,bt&&ce(it,st,ut,Pe.pos),Pe.pos=st.length,te=null):te=Mi(mi(ht,Pe,ut.state,Ve),Pt),Ve){var Ge=Ve[0].name;Ge&&(te="m-"+(te?Ge+" "+te:Ge))}if(!jt||Zt!=te){for(;Ot<Pe.start;)Ot=Math.min(Pe.start,Ot+5e3),dt(Ot,Zt);Zt=te}Pe.start=Pe.pos}for(;Ot<Pe.pos;){var Fn=Math.min(Pe.pos,Ot+5e3);dt(Fn,Zt),Ot=Fn}}function ci(it,st,ht){for(var ut,dt,Pt=it.doc,bt=ht?-1:st-(it.doc.mode.innerMode?1e3:100),jt=st;jt>bt;--jt){if(jt<=Pt.first)return Pt.first;var Ot=Se(Pt,jt-1),Zt=Ot.stateAfter;if(Zt&&(!ht||jt+(Zt instanceof Te?Zt.lookAhead:0)<=Pt.modeFrontier))return jt;var Pe=qt(Ot.text,null,it.options.tabSize);(dt==null||ut>Pe)&&(dt=jt-1,ut=Pe)}return dt}function Ni(it,st){if(it.modeFrontier=Math.min(it.modeFrontier,st),!(it.highlightFrontier<st-10)){for(var ht=it.first,ut=st-1;ut>ht;ut--){var dt=Se(it,ut).stateAfter;if(dt&&(!(dt instanceof Te)||ut+dt.lookAhead<st)){ht=ut+1;break}}it.highlightFrontier=Math.min(it.highlightFrontier,ht)}}var Vi=!1,Ke=!1;function ki(){Vi=!0}function Ye(){Ke=!0}function rr(it,st,ht){this.marker=it,this.from=st,this.to=ht}function Ro(it,st){if(it)for(var ht=0;ht<it.length;++ht){var ut=it[ht];if(ut.marker==st)return ut}}function gr(it,st){for(var ht,ut=0;ut<it.length;++ut)it[ut]!=st&&(ht||(ht=[])).push(it[ut]);return ht}function lo(it,st){it.markedSpans=it.markedSpans?it.markedSpans.concat([st]):[st],st.marker.attachLine(it)}function pr(it,st,ht){var ut;if(it)for(var dt=0;dt<it.length;++dt){var Pt=it[dt],bt=Pt.marker,jt=Pt.from==null||(bt.inclusiveLeft?Pt.from<=st:Pt.from<st);if(jt||Pt.from==st&&bt.type=="bookmark"&&(!ht||!Pt.marker.insertLeft)){var Ot=Pt.to==null||(bt.inclusiveRight?Pt.to>=st:Pt.to>st);(ut||(ut=[])).push(new rr(bt,Pt.from,Ot?null:Pt.to))}}return ut}function _i(it,st,ht){var ut;if(it)for(var dt=0;dt<it.length;++dt){var Pt=it[dt],bt=Pt.marker,jt=Pt.to==null||(bt.inclusiveRight?Pt.to>=st:Pt.to>st);if(jt||Pt.from==st&&bt.type=="bookmark"&&(!ht||Pt.marker.insertLeft)){var Ot=Pt.from==null||(bt.inclusiveLeft?Pt.from<=st:Pt.from<st);(ut||(ut=[])).push(new rr(bt,Ot?null:Pt.from-st,Pt.to==null?null:Pt.to-st))}}return ut}function cr(it,st){if(st.full)return null;var ht=pi(it,st.from.line)&&Se(it,st.from.line).markedSpans,ut=pi(it,st.to.line)&&Se(it,st.to.line).markedSpans;if(!ht&&!ut)return null;var dt=st.from.ch,Pt=st.to.ch,bt=ni(st.from,st.to)==0,jt=pr(ht,dt,bt),Ot=_i(ut,Pt,bt),Zt=st.text.length==1,Pe=Le(st.text).length+(Zt?dt:0);if(jt)for(var te=0;te<jt.length;++te){var Ve=jt[te];if(Ve.to==null){var Ge=Ro(Ot,Ve.marker);Ge?Zt&&(Ve.to=Ge.to==null?null:Ge.to+Pe):Ve.to=dt}}if(Ot)for(var Fn=0;Fn<Ot.length;++Fn){var In=Ot[Fn];if(In.to!=null&&(In.to+=Pe),In.from==null){var _n=Ro(jt,In.marker);_n||(In.from=Pe,Zt&&(jt||(jt=[])).push(In))}else In.from+=Pe,Zt&&(jt||(jt=[])).push(In)}jt&&(jt=qr(jt)),Ot&&Ot!=jt&&(Ot=qr(Ot));var oi=[jt];if(!Zt){var bi=st.text.length-2,Bi;if(bi>0&&jt)for(var Di=0;Di<jt.length;++Di)jt[Di].to==null&&(Bi||(Bi=[])).push(new rr(jt[Di].marker,null,null));for(var ar=0;ar<bi;++ar)oi.push(Bi);oi.push(Ot)}return oi}function qr(it){for(var st=0;st<it.length;++st){var ht=it[st];ht.from!=null&&ht.from==ht.to&&ht.marker.clearWhenEmpty!==!1&&it.splice(st--,1)}return it.length?it:null}function Fr(it,st,ht){var ut=null;if(it.iter(st.line,ht.line+1,function(Ge){if(Ge.markedSpans)for(var Fn=0;Fn<Ge.markedSpans.length;++Fn){var In=Ge.markedSpans[Fn].marker;In.readOnly&&(!ut||je(ut,In)==-1)&&(ut||(ut=[])).push(In)}}),!ut)return null;for(var dt=[{from:st,to:ht}],Pt=0;Pt<ut.length;++Pt)for(var bt=ut[Pt],jt=bt.find(0),Ot=0;Ot<dt.length;++Ot){var Zt=dt[Ot];if(!(ni(Zt.to,jt.from)<0||ni(Zt.from,jt.to)>0)){var Pe=[Ot,1],te=ni(Zt.from,jt.from),Ve=ni(Zt.to,jt.to);(te<0||!bt.inclusiveLeft&&!te)&&Pe.push({from:Zt.from,to:jt.from}),(Ve>0||!bt.inclusiveRight&&!Ve)&&Pe.push({from:jt.to,to:Zt.to}),dt.splice.apply(dt,Pe),Ot+=Pe.length-3}}return dt}function Rn(it){var st=it.markedSpans;if(st){for(var ht=0;ht<st.length;++ht)st[ht].marker.detachLine(it);it.markedSpans=null}}function Rt(it,st){if(st){for(var ht=0;ht<st.length;++ht)st[ht].marker.attachLine(it);it.markedSpans=st}}function Gr(it){return it.inclusiveLeft?-1:0}function ps(it){return it.inclusiveRight?1:0}function xs(it,st){var ht=it.lines.length-st.lines.length;if(ht!=0)return ht;var ut=it.find(),dt=st.find(),Pt=ni(ut.from,dt.from)||Gr(it)-Gr(st);if(Pt)return-Pt;var bt=ni(ut.to,dt.to)||ps(it)-ps(st);return bt||st.id-it.id}function Lo(it,st){var ht=Ke&&it.markedSpans,ut;if(ht)for(var dt=void 0,Pt=0;Pt<ht.length;++Pt)dt=ht[Pt],dt.marker.collapsed&&(st?dt.from:dt.to)==null&&(!ut||xs(ut,dt.marker)<0)&&(ut=dt.marker);return ut}function os(it){return Lo(it,!0)}function el(it){return Lo(it,!1)}function gl(it,st){var ht=Ke&&it.markedSpans,ut;if(ht)for(var dt=0;dt<ht.length;++dt){var Pt=ht[dt];Pt.marker.collapsed&&(Pt.from==null||Pt.from<st)&&(Pt.to==null||Pt.to>st)&&(!ut||xs(ut,Pt.marker)<0)&&(ut=Pt.marker)}return ut}function Ra(it,st,ht,ut,dt){var Pt=Se(it,st),bt=Ke&&Pt.markedSpans;if(bt)for(var jt=0;jt<bt.length;++jt){var Ot=bt[jt];if(Ot.marker.collapsed){var Zt=Ot.marker.find(0),Pe=ni(Zt.from,ht)||Gr(Ot.marker)-Gr(dt),te=ni(Zt.to,ut)||ps(Ot.marker)-ps(dt);if(!(Pe>=0&&te<=0||Pe<=0&&te>=0)&&(Pe<=0&&(Ot.marker.inclusiveRight&&dt.inclusiveLeft?ni(Zt.to,ht)>=0:ni(Zt.to,ht)>0)||Pe>=0&&(Ot.marker.inclusiveRight&&dt.inclusiveLeft?ni(Zt.from,ut)<=0:ni(Zt.from,ut)<0)))return!0}}}function _r(it){for(var st;st=os(it);)it=st.find(-1,!0).line;return it}function To(it){for(var st;st=el(it);)it=st.find(1,!0).line;return it}function Ui(it){for(var st,ht;st=el(it);)it=st.find(1,!0).line,(ht||(ht=[])).push(it);return ht}function ii(it,st){var ht=Se(it,st),ut=_r(ht);return ht==ut?st:pe(ut)}function Yi(it,st){if(st>it.lastLine())return st;var ht=Se(it,st),ut;if(!an(it,ht))return st;for(;ut=el(ht);)ht=ut.find(1,!0).line;return pe(ht)+1}function an(it,st){var ht=Ke&&st.markedSpans;if(ht){for(var ut=void 0,dt=0;dt<ht.length;++dt)if(ut=ht[dt],!!ut.marker.collapsed){if(ut.from==null)return!0;if(!ut.marker.widgetNode&&ut.from==0&&ut.marker.inclusiveLeft&&Nr(it,st,ut))return!0}}}function Nr(it,st,ht){if(ht.to==null){var ut=ht.marker.find(1,!0);return Nr(it,ut.line,Ro(ut.line.markedSpans,ht.marker))}if(ht.marker.inclusiveRight&&ht.to==st.text.length)return!0;for(var dt=void 0,Pt=0;Pt<st.markedSpans.length;++Pt)if(dt=st.markedSpans[Pt],dt.marker.collapsed&&!dt.marker.widgetNode&&dt.from==ht.to&&(dt.to==null||dt.to!=ht.from)&&(dt.marker.inclusiveLeft||ht.marker.inclusiveRight)&&Nr(it,st,dt))return!0}function Xr(it){it=_r(it);for(var st=0,ht=it.parent,ut=0;ut<ht.lines.length;++ut){var dt=ht.lines[ut];if(dt==it)break;st+=dt.height}for(var Pt=ht.parent;Pt;ht=Pt,Pt=ht.parent)for(var bt=0;bt<Pt.children.length;++bt){var jt=Pt.children[bt];if(jt==ht)break;st+=jt.height}return st}function _o(it){if(it.height==0)return 0;for(var st=it.text.length,ht,ut=it;ht=os(ut);){var dt=ht.find(0,!0);ut=dt.from.line,st+=dt.from.ch-dt.to.ch}for(ut=it;ht=el(ut);){var Pt=ht.find(0,!0);st-=ut.text.length-Pt.from.ch,ut=Pt.to.line,st+=ut.text.length-Pt.to.ch}return st}function Ao(it){var st=it.display,ht=it.doc;st.maxLine=Se(ht,ht.first),st.maxLineLength=_o(st.maxLine),st.maxLineChanged=!0,ht.iter(function(ut){var dt=_o(ut);dt>st.maxLineLength&&(st.maxLineLength=dt,st.maxLine=ut)})}var fo=function(it,st,ht){this.text=it,Rt(this,st),this.height=ht?ht(this):1};fo.prototype.lineNo=function(){return pe(this)},Wo(fo);function Yo(it,st,ht,ut){it.text=st,it.stateAfter&&(it.stateAfter=null),it.styles&&(it.styles=null),it.order!=null&&(it.order=null),Rn(it),Rt(it,ht);var dt=ut?ut(it):1;dt!=it.height&&nn(it,dt)}function ga(it){it.parent=null,Rn(it)}var js={},Ca={};function fl(it,st){if(!it||/^\s*$/.test(it))return null;var ht=st.addModeClass?Ca:js;return ht[it]||(ht[it]=it.replace(/\S+/g,"cm-$&"))}function Me(it,st){var ht=We("span",null,null,ne?"padding-right: .1px":null),ut={pre:We("pre",[ht],"CodeMirror-line"),content:ht,col:0,pos:0,cm:it,trailingSpace:!1,splitSpaces:it.getOption("lineWrapping")};st.measure={};for(var dt=0;dt<=(st.rest?st.rest.length:0);dt++){var Pt=dt?st.rest[dt-1]:st.line,bt=void 0;ut.pos=0,ut.addToken=Ll,er(it.display.measure)&&(bt=gi(Pt,it.doc.direction))&&(ut.addToken=Go(ut.addToken,bt)),ut.map=[];var jt=st!=it.display.externalMeasured&&pe(Pt);fh(Pt,ut,Ji(it,Pt,jt)),Pt.styleClasses&&(Pt.styleClasses.bgClass&&(ut.bgClass=ui(Pt.styleClasses.bgClass,ut.bgClass||"")),Pt.styleClasses.textClass&&(ut.textClass=ui(Pt.styleClasses.textClass,ut.textClass||""))),ut.map.length==0&&ut.map.push(0,0,ut.content.appendChild($s(it.display.measure))),dt==0?(st.measure.map=ut.map,st.measure.cache={}):((st.measure.maps||(st.measure.maps=[])).push(ut.map),(st.measure.caches||(st.measure.caches=[])).push({}))}if(ne){var Ot=ut.content.lastChild;(/\bcm-tab\b/.test(Ot.className)||Ot.querySelector&&Ot.querySelector(".cm-tab"))&&(ut.content.className="cm-tab-wrap-hack")}return yr(it,"renderLine",it,st.line,ut.pre),ut.pre.className&&(ut.textClass=ui(ut.pre.className,ut.textClass||"")),ut}function fa(it){var st=le("span","\u2022","cm-invalidchar");return st.title="\\u"+it.charCodeAt(0).toString(16),st.setAttribute("aria-label",st.title),st}function Ll(it,st,ht,ut,dt,Pt,bt){if(st){var jt=it.splitSpaces?ZA(st,it.trailingSpace):st,Ot=it.cm.state.specialChars,Zt=!1,Pe;if(!Ot.test(st))it.col+=st.length,Pe=document.createTextNode(jt),it.map.push(it.pos,it.pos+st.length,Pe),be&&we<9&&(Zt=!0),it.pos+=st.length;else{Pe=document.createDocumentFragment();for(var te=0;;){Ot.lastIndex=te;var Ve=Ot.exec(st),Ge=Ve?Ve.index-te:st.length-te;if(Ge){var Fn=document.createTextNode(jt.slice(te,te+Ge));be&&we<9?Pe.appendChild(le("span",[Fn])):Pe.appendChild(Fn),it.map.push(it.pos,it.pos+Ge,Fn),it.col+=Ge,it.pos+=Ge}if(!Ve)break;te+=Ge+1;var In=void 0;if(Ve[0]==" "){var _n=it.cm.options.tabSize,oi=_n-it.col%_n;In=Pe.appendChild(le("span",ve(oi),"cm-tab")),In.setAttribute("role","presentation"),In.setAttribute("cm-text"," "),it.col+=oi}else Ve[0]=="\r"||Ve[0]==`
`?(In=Pe.appendChild(le("span",Ve[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),In.setAttribute("cm-text",Ve[0]),it.col+=1):(In=it.cm.options.specialCharPlaceholder(Ve[0]),In.setAttribute("cm-text",Ve[0]),be&&we<9?Pe.appendChild(le("span",[In])):Pe.appendChild(In),it.col+=1);it.map.push(it.pos,it.pos+1,In),it.pos++}}if(it.trailingSpace=jt.charCodeAt(st.length-1)==32,ht||ut||dt||Zt||Pt||bt){var bi=ht||"";ut&&(bi+=ut),dt&&(bi+=dt);var Bi=le("span",[Pe],bi,Pt);if(bt)for(var Di in bt)bt.hasOwnProperty(Di)&&Di!="style"&&Di!="class"&&Bi.setAttribute(Di,bt[Di]);return it.content.appendChild(Bi)}it.content.appendChild(Pe)}}function ZA(it,st){if(it.length>1&&!/ /.test(it))return it;for(var ht=st,ut="",dt=0;dt<it.length;dt++){var Pt=it.charAt(dt);Pt==" "&&ht&&(dt==it.length-1||it.charCodeAt(dt+1)==32)&&(Pt="\xA0"),ut+=Pt,ht=Pt==" "}return ut}function Go(it,st){return function(ht,ut,dt,Pt,bt,jt,Ot){dt=dt?dt+" cm-force-border":"cm-force-border";for(var Zt=ht.pos,Pe=Zt+ut.length;;){for(var te=void 0,Ve=0;Ve<st.length&&(te=st[Ve],!(te.to>Zt&&te.from<=Zt));Ve++);if(te.to>=Pe)return it(ht,ut,dt,Pt,bt,jt,Ot);it(ht,ut.slice(0,te.to-Zt),dt,Pt,null,jt,Ot),Pt=null,ut=ut.slice(te.to-Zt),Zt=te.to}}}function LA(it,st,ht,ut){var dt=!ut&&ht.widgetNode;dt&&it.map.push(it.pos,it.pos+st,dt),!ut&&it.cm.display.input.needsContentAttribute&&(dt||(dt=it.content.appendChild(document.createElement("span"))),dt.setAttribute("cm-marker",ht.id)),dt&&(it.cm.display.input.setUneditable(dt),it.content.appendChild(dt)),it.pos+=st,it.trailingSpace=!1}function fh(it,st,ht){var ut=it.markedSpans,dt=it.text,Pt=0;if(!ut){for(var bt=1;bt<ht.length;bt+=2)st.addToken(st,dt.slice(Pt,Pt=ht[bt]),fl(ht[bt+1],st.cm.options));return}for(var jt=dt.length,Ot=0,Zt=1,Pe="",te,Ve,Ge=0,Fn,In,_n,oi,bi;;){if(Ge==Ot){Fn=In=_n=Ve="",bi=null,oi=null,Ge=1/0;for(var Bi=[],Di=void 0,ar=0;ar<ut.length;++ar){var wi=ut[ar],Cr=wi.marker;if(Cr.type=="bookmark"&&wi.from==Ot&&Cr.widgetNode)Bi.push(Cr);else if(wi.from<=Ot&&(wi.to==null||wi.to>Ot||Cr.collapsed&&wi.to==Ot&&wi.from==Ot)){if(wi.to!=null&&wi.to!=Ot&&Ge>wi.to&&(Ge=wi.to,In=""),Cr.className&&(Fn+=" "+Cr.className),Cr.css&&(Ve=(Ve?Ve+";":"")+Cr.css),Cr.startStyle&&wi.from==Ot&&(_n+=" "+Cr.startStyle),Cr.endStyle&&wi.to==Ge&&(Di||(Di=[])).push(Cr.endStyle,wi.to),Cr.title&&((bi||(bi={})).title=Cr.title),Cr.attributes)for(var Io in Cr.attributes)(bi||(bi={}))[Io]=Cr.attributes[Io];Cr.collapsed&&(!oi||xs(oi.marker,Cr)<0)&&(oi=wi)}else wi.from>Ot&&Ge>wi.from&&(Ge=wi.from)}if(Di)for(var ks=0;ks<Di.length;ks+=2)Di[ks+1]==Ge&&(In+=" "+Di[ks]);if(!oi||oi.from==Ot)for(var Zo=0;Zo<Bi.length;++Zo)LA(st,0,Bi[Zo]);if(oi&&(oi.from||0)==Ot){if(LA(st,(oi.to==null?jt+1:oi.to)-Ot,oi.marker,oi.from==null),oi.to==null)return;oi.to==Ot&&(oi=!1)}}if(Ot>=jt)break;for(var ba=Math.min(jt,Ge);;){if(Pe){var Rs=Ot+Pe.length;if(!oi){var Ps=Rs>ba?Pe.slice(0,ba-Ot):Pe;st.addToken(st,Ps,te?te+Fn:Fn,_n,Ot+Ps.length==Ge?In:"",Ve,bi)}if(Rs>=ba){Pe=Pe.slice(ba-Ot),Ot=ba;break}Ot=Rs,_n=""}Pe=dt.slice(Pt,Pt=ht[Zt++]),te=fl(ht[Zt++],st.cm.options)}}}function JA(it,st,ht){this.line=st,this.rest=Ui(st),this.size=this.rest?pe(Le(this.rest))-ht+1:1,this.node=this.text=null,this.hidden=an(it,st)}function Yr(it,st,ht){for(var ut=[],dt,Pt=st;Pt<ht;Pt=dt){var bt=new JA(it.doc,Se(it.doc,Pt),Pt);dt=Pt+bt.size,ut.push(bt)}return ut}var $o=null;function sr(it){$o?$o.ops.push(it):it.ownsGroup=$o={ops:[it],delayedCallbacks:[]}}function dr(it){var st=it.delayedCallbacks,ht=0;do{for(;ht<st.length;ht++)st[ht].call(null);for(var ut=0;ut<it.ops.length;ut++){var dt=it.ops[ut];if(dt.cursorActivityHandlers)for(;dt.cursorActivityCalled<dt.cursorActivityHandlers.length;)dt.cursorActivityHandlers[dt.cursorActivityCalled++].call(null,dt.cm)}}while(ht<st.length)}function Zr(it,st){var ht=it.ownsGroup;if(ht)try{dr(ht)}finally{$o=null,st(ht)}}var Bo=null;function Pi(it,st){var ht=Pr(it,st);if(ht.length){var ut=Array.prototype.slice.call(arguments,2),dt;$o?dt=$o.delayedCallbacks:Bo?dt=Bo:(dt=Bo=[],setTimeout(lf,0));for(var Pt=function(jt){dt.push(function(){return ht[jt].apply(null,ut)})},bt=0;bt<ht.length;++bt)Pt(bt)}}function lf(){var it=Bo;Bo=null;for(var st=0;st<it.length;++st)it[st]()}function EA(it,st,ht,ut){for(var dt=0;dt<st.changes.length;dt++){var Pt=st.changes[dt];Pt=="text"?Vn(it,st):Pt=="gutter"?es(it,st,ht,ut):Pt=="class"?ts(it,st):Pt=="widget"&&Ml(it,st,ut)}st.changes=null}function El(it){return it.node==it.text&&(it.node=le("div",null,null,"position: relative"),it.text.parentNode&&it.text.parentNode.replaceChild(it.node,it.text),it.node.appendChild(it.text),be&&we<8&&(it.node.style.zIndex=2)),it.node}function fg(it,st){var ht=st.bgClass?st.bgClass+" "+(st.line.bgClass||""):st.line.bgClass;if(ht&&(ht+=" CodeMirror-linebackground"),st.background)ht?st.background.className=ht:(st.background.parentNode.removeChild(st.background),st.background=null);else if(ht){var ut=El(st);st.background=ut.insertBefore(le("div",null,ht),ut.firstChild),it.display.input.setUneditable(st.background)}}function dh(it,st){var ht=it.display.externalMeasured;return ht&&ht.line==st.line?(it.display.externalMeasured=null,st.measure=ht.measure,ht.built):Me(it,st)}function Vn(it,st){var ht=st.text.className,ut=dh(it,st);st.text==st.node&&(st.node=ut.pre),st.text.parentNode.replaceChild(ut.pre,st.text),st.text=ut.pre,ut.bgClass!=st.bgClass||ut.textClass!=st.textClass?(st.bgClass=ut.bgClass,st.textClass=ut.textClass,ts(it,st)):ht&&(st.text.className=ht)}function ts(it,st){fg(it,st),st.line.wrapClass?El(st).className=st.line.wrapClass:st.node!=st.text&&(st.node.className="");var ht=st.textClass?st.textClass+" "+(st.line.textClass||""):st.line.textClass;st.text.className=ht||""}function es(it,st,ht,ut){if(st.gutter&&(st.node.removeChild(st.gutter),st.gutter=null),st.gutterBackground&&(st.node.removeChild(st.gutterBackground),st.gutterBackground=null),st.line.gutterClass){var dt=El(st);st.gutterBackground=le("div",null,"CodeMirror-gutter-background "+st.line.gutterClass,"left: "+(it.options.fixedGutter?ut.fixedPos:-ut.gutterTotalWidth)+"px; width: "+ut.gutterTotalWidth+"px"),it.display.input.setUneditable(st.gutterBackground),dt.insertBefore(st.gutterBackground,st.text)}var Pt=st.line.gutterMarkers;if(it.options.lineNumbers||Pt){var bt=El(st),jt=st.gutter=le("div",null,"CodeMirror-gutter-wrapper","left: "+(it.options.fixedGutter?ut.fixedPos:-ut.gutterTotalWidth)+"px");if(it.display.input.setUneditable(jt),bt.insertBefore(jt,st.text),st.line.gutterClass&&(jt.className+=" "+st.line.gutterClass),it.options.lineNumbers&&(!Pt||!Pt["CodeMirror-linenumbers"])&&(st.lineNumber=jt.appendChild(le("div",Oi(it.options,ht),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+ut.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+it.display.lineNumInnerWidth+"px"))),Pt)for(var Ot=0;Ot<it.display.gutterSpecs.length;++Ot){var Zt=it.display.gutterSpecs[Ot].className,Pe=Pt.hasOwnProperty(Zt)&&Pt[Zt];Pe&&jt.appendChild(le("div",[Pe],"CodeMirror-gutter-elt","left: "+ut.gutterLeft[Zt]+"px; width: "+ut.gutterWidth[Zt]+"px"))}}}function Ml(it,st,ht){st.alignable&&(st.alignable=null);for(var ut=Vt("CodeMirror-linewidget"),dt=st.node.firstChild,Pt=void 0;dt;dt=Pt)Pt=dt.nextSibling,ut.test(dt.className)&&st.node.removeChild(dt);aA(it,st,ht)}function Du(it,st,ht,ut){var dt=dh(it,st);return st.text=st.node=dt.pre,dt.bgClass&&(st.bgClass=dt.bgClass),dt.textClass&&(st.textClass=dt.textClass),ts(it,st),es(it,st,ht,ut),aA(it,st,ut),st.node}function aA(it,st,ht){if(Xi(it,st.line,st,ht,!0),st.rest)for(var ut=0;ut<st.rest.length;ut++)Xi(it,st.rest[ut],st,ht,!1)}function Xi(it,st,ht,ut,dt){if(st.widgets)for(var Pt=El(ht),bt=0,jt=st.widgets;bt<jt.length;++bt){var Ot=jt[bt],Zt=le("div",[Ot.node],"CodeMirror-linewidget"+(Ot.className?" "+Ot.className:""));Ot.handleMouseEvents||Zt.setAttribute("cm-ignore-events","true"),co(Ot,Zt,ht,ut),it.display.input.setUneditable(Zt),dt&&Ot.above?Pt.insertBefore(Zt,ht.gutter||ht.text):Pt.appendChild(Zt),Pi(Ot,"redraw")}}function co(it,st,ht,ut){if(it.noHScroll){(ht.alignable||(ht.alignable=[])).push(st);var dt=ut.wrapperWidth;st.style.left=ut.fixedPos+"px",it.coverGutter||(dt-=ut.gutterTotalWidth,st.style.paddingLeft=ut.gutterTotalWidth+"px"),st.style.width=dt+"px"}it.coverGutter&&(st.style.zIndex=5,st.style.position="relative",it.noHScroll||(st.style.marginLeft=-ut.gutterTotalWidth+"px"))}function lA(it){if(it.height!=null)return it.height;var st=it.doc.cm;if(!st)return 0;if(!Je(document.body,it.node)){var ht="position: relative;";it.coverGutter&&(ht+="margin-left: -"+st.display.gutters.offsetWidth+"px;"),it.noHScroll&&(ht+="width: "+st.display.wrapper.clientWidth+"px;"),he(st.display.measure,le("div",[it.node],null,ht))}return it.height=it.node.parentNode.offsetHeight}function da(it,st){for(var ht=Er(st);ht!=it.wrapper;ht=ht.parentNode)if(!ht||ht.nodeType==1&&ht.getAttribute("cm-ignore-events")=="true"||ht.parentNode==it.sizer&&ht!=it.mover)return!0}function Pa(it){return it.lineSpace.offsetTop}function dl(it){return it.mover.offsetHeight-it.lineSpace.offsetHeight}function Fa(it){if(it.cachedPaddingH)return it.cachedPaddingH;var st=he(it.measure,le("pre","x","CodeMirror-line-like")),ht=window.getComputedStyle?window.getComputedStyle(st):st.currentStyle,ut={left:parseInt(ht.paddingLeft),right:parseInt(ht.paddingRight)};return!isNaN(ut.left)&&!isNaN(ut.right)&&(it.cachedPaddingH=ut),ut}function Ga(it){return Nn-it.display.nativeBarWidth}function Ks(it){return it.display.scroller.clientWidth-Ga(it)-it.display.barWidth}function ls(it){return it.display.scroller.clientHeight-Ga(it)-it.display.barHeight}function Af(it,st,ht){var ut=it.options.lineWrapping,dt=ut&&Ks(it);if(!st.measure.heights||ut&&st.measure.width!=dt){var Pt=st.measure.heights=[];if(ut){st.measure.width=dt;for(var bt=st.text.firstChild.getClientRects(),jt=0;jt<bt.length-1;jt++){var Ot=bt[jt],Zt=bt[jt+1];Math.abs(Ot.bottom-Zt.bottom)>2&&Pt.push((Ot.bottom+Zt.top)/2-ht.top)}}Pt.push(ht.bottom-ht.top)}}function Ns(it,st,ht){if(it.line==st)return{map:it.measure.map,cache:it.measure.cache};for(var ut=0;ut<it.rest.length;ut++)if(it.rest[ut]==st)return{map:it.measure.maps[ut],cache:it.measure.caches[ut]};for(var dt=0;dt<it.rest.length;dt++)if(pe(it.rest[dt])>ht)return{map:it.measure.maps[dt],cache:it.measure.caches[dt],before:!0}}function dg(it,st){st=_r(st);var ht=pe(st),ut=it.display.externalMeasured=new JA(it.doc,st,ht);ut.lineN=ht;var dt=ut.built=Me(it,ut);return ut.text=dt.pre,he(it.display.lineMeasure,dt.pre),ut}function Hl(it,st,ht,ut){return cl(it,uo(it,st),ht,ut)}function MA(it,st){if(st>=it.display.viewFrom&&st<it.display.viewTo)return it.display.view[ja(it,st)];var ht=it.display.externalMeasured;if(ht&&st>=ht.lineN&&st<ht.lineN+ht.size)return ht}function uo(it,st){var ht=pe(st),ut=MA(it,ht);ut&&!ut.text?ut=null:ut&&ut.changes&&(EA(it,ut,ht,ff(it)),it.curOp.forceUpdate=!0),ut||(ut=dg(it,st));var dt=Ns(ut,st,ht);return{line:st,view:ut,rect:null,map:dt.map,cache:dt.cache,before:dt.before,hasHeights:!1}}function cl(it,st,ht,ut,dt){st.before&&(ht=-1);var Pt=ht+(ut||""),bt;return st.cache.hasOwnProperty(Pt)?bt=st.cache[Pt]:(st.rect||(st.rect=st.view.text.getBoundingClientRect()),st.hasHeights||(Af(it,st.view,st.rect),st.hasHeights=!0),bt=Xo(it,st,ht,ut),bt.bogus||(st.cache[Pt]=bt)),{left:bt.left,right:bt.right,top:dt?bt.rtop:bt.top,bottom:dt?bt.rbottom:bt.bottom}}var cg={left:0,right:0,top:0,bottom:0};function pg(it,st,ht){for(var ut,dt,Pt,bt,jt,Ot,Zt=0;Zt<it.length;Zt+=3)if(jt=it[Zt],Ot=it[Zt+1],st<jt?(dt=0,Pt=1,bt="left"):st<Ot?(dt=st-jt,Pt=dt+1):(Zt==it.length-3||st==Ot&&it[Zt+3]>st)&&(Pt=Ot-jt,dt=Pt-1,st>=Ot&&(bt="right")),dt!=null){if(ut=it[Zt+2],jt==Ot&&ht==(ut.insertLeft?"left":"right")&&(bt=ht),ht=="left"&&dt==0)for(;Zt&&it[Zt-2]==it[Zt-3]&&it[Zt-1].insertLeft;)ut=it[(Zt-=3)+2],bt="left";if(ht=="right"&&dt==Ot-jt)for(;Zt<it.length-3&&it[Zt+3]==it[Zt+4]&&!it[Zt+5].insertLeft;)ut=it[(Zt+=3)+2],bt="right";break}return{node:ut,start:dt,end:Pt,collapse:bt,coverStart:jt,coverEnd:Ot}}function uf(it,st){var ht=cg;if(st=="left")for(var ut=0;ut<it.length&&(ht=it[ut]).left==ht.right;ut++);else for(var dt=it.length-1;dt>=0&&(ht=it[dt]).left==ht.right;dt--);return ht}function Xo(it,st,ht,ut){var dt=pg(st.map,ht,ut),Pt=dt.node,bt=dt.start,jt=dt.end,Ot=dt.collapse,Zt;if(Pt.nodeType==3){for(var Pe=0;Pe<4;Pe++){for(;bt&&Tn(st.line.text.charAt(dt.coverStart+bt));)--bt;for(;dt.coverStart+jt<dt.coverEnd&&Tn(st.line.text.charAt(dt.coverStart+jt));)++jt;if(be&&we<9&&bt==0&&jt==dt.coverEnd-dt.coverStart?Zt=Pt.parentNode.getBoundingClientRect():Zt=uf(me(Pt,bt,jt).getClientRects(),ut),Zt.left||Zt.right||bt==0)break;jt=bt,bt=bt-1,Ot="right"}be&&we<11&&(Zt=nd(it.display.measure,Zt))}else{bt>0&&(Ot=ut="right");var te;it.options.lineWrapping&&(te=Pt.getClientRects()).length>1?Zt=te[ut=="right"?te.length-1:0]:Zt=Pt.getBoundingClientRect()}if(be&&we<9&&!bt&&(!Zt||!Zt.left&&!Zt.right)){var Ve=Pt.parentNode.getClientRects()[0];Ve?Zt={left:Ve.left,right:Ve.left+Ou(it.display),top:Ve.top,bottom:Ve.bottom}:Zt=cg}for(var Ge=Zt.top-st.rect.top,Fn=Zt.bottom-st.rect.top,In=(Ge+Fn)/2,_n=st.view.measure.heights,oi=0;oi<_n.length-1&&!(In<_n[oi]);oi++);var bi=oi?_n[oi-1]:0,Bi=_n[oi],Di={left:(Ot=="right"?Zt.right:Zt.left)-st.rect.left,right:(Ot=="left"?Zt.left:Zt.right)-st.rect.left,top:bi,bottom:Bi};return!Zt.left&&!Zt.right&&(Di.bogus=!0),it.options.singleCursorHeightPerLine||(Di.rtop=Ge,Di.rbottom=Fn),Di}function nd(it,st){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!cn(it))return st;var ht=screen.logicalXDPI/screen.deviceXDPI,ut=screen.logicalYDPI/screen.deviceYDPI;return{left:st.left*ht,right:st.right*ht,top:st.top*ut,bottom:st.bottom*ut}}function hf(it){if(it.measure&&(it.measure.cache={},it.measure.heights=null,it.rest))for(var st=0;st<it.rest.length;st++)it.measure.caches[st]={}}function La(it){it.display.externalMeasure=null,Ae(it.display.lineMeasure);for(var st=0;st<it.display.view.length;st++)hf(it.display.view[st])}function pl(it){La(it),it.display.cachedCharWidth=it.display.cachedTextHeight=it.display.cachedPaddingH=null,it.options.lineWrapping||(it.display.maxLineChanged=!0),it.display.lineNumChars=null}function As(){return fe&&et?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function io(){return fe&&et?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function jo(it){var st=0;if(it.widgets)for(var ht=0;ht<it.widgets.length;++ht)it.widgets[ht].above&&(st+=lA(it.widgets[ht]));return st}function Qs(it,st,ht,ut,dt){if(!dt){var Pt=jo(st);ht.top+=Pt,ht.bottom+=Pt}if(ut=="line")return ht;ut||(ut="local");var bt=Xr(st);if(ut=="local"?bt+=Pa(it.display):bt-=it.display.viewOffset,ut=="page"||ut=="window"){var jt=it.display.lineSpace.getBoundingClientRect();bt+=jt.top+(ut=="window"?0:io());var Ot=jt.left+(ut=="window"?0:As());ht.left+=Ot,ht.right+=Ot}return ht.top+=bt,ht.bottom+=bt,ht}function mg(it,st,ht){if(ht=="div")return st;var ut=st.left,dt=st.top;if(ht=="page")ut-=As(),dt-=io();else if(ht=="local"||!ht){var Pt=it.display.sizer.getBoundingClientRect();ut+=Pt.left,dt+=Pt.top}var bt=it.display.lineSpace.getBoundingClientRect();return{left:ut-bt.left,top:dt-bt.top}}function Hu(it,st,ht,ut,dt){return ut||(ut=Se(it.doc,st.line)),Qs(it,ut,Hl(it,ut,st.ch,dt),ht)}function Ko(it,st,ht,ut,dt,Pt){ut=ut||Se(it.doc,st.line),dt||(dt=uo(it,ut));function bt(Fn,In){var _n=cl(it,dt,Fn,In?"right":"left",Pt);return In?_n.left=_n.right:_n.right=_n.left,Qs(it,ut,_n,ht)}var jt=gi(ut,it.doc.direction),Ot=st.ch,Zt=st.sticky;if(Ot>=ut.text.length?(Ot=ut.text.length,Zt="before"):Ot<=0&&(Ot=0,Zt="after"),!jt)return bt(Zt=="before"?Ot-1:Ot,Zt=="before");function Pe(Fn,In,_n){var oi=jt[In],bi=oi.level==1;return bt(_n?Fn-1:Fn,bi!=_n)}var te=Ln(jt,Ot,Zt),Ve=Qi,Ge=Pe(Ot,te,Zt=="before");return Ve!=null&&(Ge.other=Pe(Ot,Ve,Zt!="before")),Ge}function gf(it,st){var ht=0;st=Ze(it.doc,st),it.options.lineWrapping||(ht=Ou(it.display)*st.ch);var ut=Se(it.doc,st.line),dt=Xr(ut)+Pa(it.display);return{left:ht,right:ht,top:dt,bottom:dt+ut.height}}function qA(it,st,ht,ut,dt){var Pt=on(it,st,ht);return Pt.xRel=dt,ut&&(Pt.outside=ut),Pt}function kl(it,st,ht){var ut=it.doc;if(ht+=it.display.viewOffset,ht<0)return qA(ut.first,0,null,-1,-1);var dt=Un(ut,ht),Pt=ut.first+ut.size-1;if(dt>Pt)return qA(ut.first+ut.size-1,Se(ut,Pt).text.length,null,1,1);st<0&&(st=0);for(var bt=Se(ut,dt);;){var jt=rn(it,bt,dt,st,ht),Ot=gl(bt,jt.ch+(jt.xRel>0||jt.outside>0?1:0));if(!Ot)return jt;var Zt=Ot.find(1);if(Zt.line==dt)return Zt;bt=Se(ut,dt=Zt.line)}}function Li(it,st,ht,ut){ut-=jo(st);var dt=st.text.length,Pt=Xn(function(bt){return cl(it,ht,bt-1).bottom<=ut},dt,0);return dt=Xn(function(bt){return cl(it,ht,bt).top>ut},Pt,dt),{begin:Pt,end:dt}}function id(it,st,ht,ut){ht||(ht=uo(it,st));var dt=Qs(it,st,cl(it,ht,ut),"line").top;return Li(it,st,ht,dt)}function re(it,st,ht,ut){return it.bottom<=ht?!1:it.top>ht?!0:(ut?it.left:it.right)>st}function rn(it,st,ht,ut,dt){dt-=Xr(st);var Pt=uo(it,st),bt=jo(st),jt=0,Ot=st.text.length,Zt=!0,Pe=gi(st,it.doc.direction);if(Pe){var te=(it.options.lineWrapping?nc:ec)(it,st,ht,Pt,Pe,ut,dt);Zt=te.level!=1,jt=Zt?te.from:te.to-1,Ot=Zt?te.to:te.from-1}var Ve=null,Ge=null,Fn=Xn(function(ar){var wi=cl(it,Pt,ar);return wi.top+=bt,wi.bottom+=bt,re(wi,ut,dt,!1)?(wi.top<=dt&&wi.left<=ut&&(Ve=ar,Ge=wi),!0):!1},jt,Ot),In,_n,oi=!1;if(Ge){var bi=ut-Ge.left<Ge.right-ut,Bi=bi==Zt;Fn=Ve+(Bi?0:1),_n=Bi?"after":"before",In=bi?Ge.left:Ge.right}else{!Zt&&(Fn==Ot||Fn==jt)&&Fn++,_n=Fn==0?"after":Fn==st.text.length?"before":cl(it,Pt,Fn-(Zt?1:0)).bottom+bt<=dt==Zt?"after":"before";var Di=Ko(it,on(ht,Fn,_n),"line",st,Pt);In=Di.left,oi=dt<Di.top?-1:dt>=Di.bottom?1:0}return Fn=Ei(st.text,Fn,1),qA(ht,Fn,_n,oi,ut-In)}function ec(it,st,ht,ut,dt,Pt,bt){var jt=Xn(function(te){var Ve=dt[te],Ge=Ve.level!=1;return re(Ko(it,on(ht,Ge?Ve.to:Ve.from,Ge?"before":"after"),"line",st,ut),Pt,bt,!0)},0,dt.length-1),Ot=dt[jt];if(jt>0){var Zt=Ot.level!=1,Pe=Ko(it,on(ht,Zt?Ot.from:Ot.to,Zt?"after":"before"),"line",st,ut);re(Pe,Pt,bt,!0)&&Pe.top>bt&&(Ot=dt[jt-1])}return Ot}function nc(it,st,ht,ut,dt,Pt,bt){var jt=Li(it,st,ut,bt),Ot=jt.begin,Zt=jt.end;/\s/.test(st.text.charAt(Zt-1))&&Zt--;for(var Pe=null,te=null,Ve=0;Ve<dt.length;Ve++){var Ge=dt[Ve];if(!(Ge.from>=Zt||Ge.to<=Ot)){var Fn=Ge.level!=1,In=cl(it,ut,Fn?Math.min(Zt,Ge.to)-1:Math.max(Ot,Ge.from)).right,_n=In<Pt?Pt-In+1e9:In-Pt;(!Pe||te>_n)&&(Pe=Ge,te=_n)}}return Pe||(Pe=dt[dt.length-1]),Pe.from<Ot&&(Pe={from:Ot,to:Pe.to,level:Pe.level}),Pe.to>Zt&&(Pe={from:Pe.from,to:Zt,level:Pe.level}),Pe}var zs;function AA(it){if(it.cachedTextHeight!=null)return it.cachedTextHeight;if(zs==null){zs=le("pre",null,"CodeMirror-line-like");for(var st=0;st<49;++st)zs.appendChild(document.createTextNode("x")),zs.appendChild(le("br"));zs.appendChild(document.createTextNode("x"))}he(it.measure,zs);var ht=zs.offsetHeight/50;return ht>3&&(it.cachedTextHeight=ht),Ae(it.measure),ht||1}function Ou(it){if(it.cachedCharWidth!=null)return it.cachedCharWidth;var st=le("span","xxxxxxxxxx"),ht=le("pre",[st],"CodeMirror-line-like");he(it.measure,ht);var ut=st.getBoundingClientRect(),dt=(ut.right-ut.left)/10;return dt>2&&(it.cachedCharWidth=dt),dt||10}function ff(it){for(var st=it.display,ht={},ut={},dt=st.gutters.clientLeft,Pt=st.gutters.firstChild,bt=0;Pt;Pt=Pt.nextSibling,++bt){var jt=it.display.gutterSpecs[bt].className;ht[jt]=Pt.offsetLeft+Pt.clientLeft+dt,ut[jt]=Pt.clientWidth}return{fixedPos:$A(st),gutterTotalWidth:st.gutters.offsetWidth,gutterLeft:ht,gutterWidth:ut,wrapperWidth:st.wrapper.clientWidth}}function $A(it){return it.scroller.getBoundingClientRect().left-it.sizer.getBoundingClientRect().left}function No(it){var st=AA(it.display),ht=it.options.lineWrapping,ut=ht&&Math.max(5,it.display.scroller.clientWidth/Ou(it.display)-3);return function(dt){if(an(it.doc,dt))return 0;var Pt=0;if(dt.widgets)for(var bt=0;bt<dt.widgets.length;bt++)dt.widgets[bt].height&&(Pt+=dt.widgets[bt].height);return ht?Pt+(Math.ceil(dt.text.length/ut)||1)*st:Pt+st}}function Ki(it){var st=it.doc,ht=No(it);st.iter(function(ut){var dt=ht(ut);dt!=ut.height&&nn(ut,dt)})}function ta(it,st,ht,ut){var dt=it.display;if(!ht&&Er(st).getAttribute("cm-not-content")=="true")return null;var Pt,bt,jt=dt.lineSpace.getBoundingClientRect();try{Pt=st.clientX-jt.left,bt=st.clientY-jt.top}catch(te){return null}var Ot=kl(it,Pt,bt),Zt;if(ut&&Ot.xRel>0&&(Zt=Se(it.doc,Ot.line).text).length==Ot.ch){var Pe=qt(Zt,Zt.length,it.options.tabSize)-Zt.length;Ot=on(Ot.line,Math.max(0,Math.round((Pt-Fa(it.display).left)/Ou(it.display))-Pe))}return Ot}function ja(it,st){if(st>=it.display.viewTo||(st-=it.display.viewFrom,st<0))return null;for(var ht=it.display.view,ut=0;ut<ht.length;ut++)if(st-=ht[ut].size,st<0)return ut}function Eo(it,st,ht,ut){st==null&&(st=it.doc.first),ht==null&&(ht=it.doc.first+it.doc.size),ut||(ut=0);var dt=it.display;if(ut&&ht<dt.viewTo&&(dt.updateLineNumbers==null||dt.updateLineNumbers>st)&&(dt.updateLineNumbers=st),it.curOp.viewChanged=!0,st>=dt.viewTo)Ke&&ii(it.doc,st)<dt.viewTo&&ss(it);else if(ht<=dt.viewFrom)Ke&&Yi(it.doc,ht+ut)>dt.viewFrom?ss(it):(dt.viewFrom+=ut,dt.viewTo+=ut);else if(st<=dt.viewFrom&&ht>=dt.viewTo)ss(it);else if(st<=dt.viewFrom){var Pt=ca(it,ht,ht+ut,1);Pt?(dt.view=dt.view.slice(Pt.index),dt.viewFrom=Pt.lineN,dt.viewTo+=ut):ss(it)}else if(ht>=dt.viewTo){var bt=ca(it,st,st,-1);bt?(dt.view=dt.view.slice(0,bt.index),dt.viewTo=bt.lineN):ss(it)}else{var jt=ca(it,st,st,-1),Ot=ca(it,ht,ht+ut,1);jt&&Ot?(dt.view=dt.view.slice(0,jt.index).concat(Yr(it,jt.lineN,Ot.lineN)).concat(dt.view.slice(Ot.index)),dt.viewTo+=ut):ss(it)}var Zt=dt.externalMeasured;Zt&&(ht<Zt.lineN?Zt.lineN+=ut:st<Zt.lineN+Zt.size&&(dt.externalMeasured=null))}function mr(it,st,ht){it.curOp.viewChanged=!0;var ut=it.display,dt=it.display.externalMeasured;if(dt&&st>=dt.lineN&&st<dt.lineN+dt.size&&(ut.externalMeasured=null),!(st<ut.viewFrom||st>=ut.viewTo)){var Pt=ut.view[ja(it,st)];if(Pt.node!=null){var bt=Pt.changes||(Pt.changes=[]);je(bt,ht)==-1&&bt.push(ht)}}}function ss(it){it.display.viewFrom=it.display.viewTo=it.doc.first,it.display.view=[],it.display.viewOffset=0}function ca(it,st,ht,ut){var dt=ja(it,st),Pt,bt=it.display.view;if(!Ke||ht==it.doc.first+it.doc.size)return{index:dt,lineN:ht};for(var jt=it.display.viewFrom,Ot=0;Ot<dt;Ot++)jt+=bt[Ot].size;if(jt!=st){if(ut>0){if(dt==bt.length-1)return null;Pt=jt+bt[dt].size-st,dt++}else Pt=jt-st;st+=Pt,ht+=Pt}for(;ii(it.doc,ht)!=ht;){if(dt==(ut<0?0:bt.length-1))return null;ht+=ut*bt[dt-(ut<0?1:0)].size,dt+=ut}return{index:dt,lineN:ht}}function ro(it,st,ht){var ut=it.display,dt=ut.view;dt.length==0||st>=ut.viewTo||ht<=ut.viewFrom?(ut.view=Yr(it,st,ht),ut.viewFrom=st):(ut.viewFrom>st?ut.view=Yr(it,st,ut.viewFrom).concat(ut.view):ut.viewFrom<st&&(ut.view=ut.view.slice(ja(it,st))),ut.viewFrom=st,ut.viewTo<ht?ut.view=ut.view.concat(Yr(it,ut.viewTo,ht)):ut.viewTo>ht&&(ut.view=ut.view.slice(0,ja(it,ht)))),ut.viewTo=ht}function Ka(it){for(var st=it.display.view,ht=0,ut=0;ut<st.length;ut++){var dt=st[ut];!dt.hidden&&(!dt.node||dt.changes)&&++ht}return ht}function us(it){it.display.input.showSelection(it.display.input.prepareSelection())}function tu(it,st){st===void 0&&(st=!0);for(var ht=it.doc,ut={},dt=ut.cursors=document.createDocumentFragment(),Pt=ut.selection=document.createDocumentFragment(),bt=0;bt<ht.sel.ranges.length;bt++)if(!(!st&&bt==ht.sel.primIndex)){var jt=ht.sel.ranges[bt];if(!(jt.from().line>=it.display.viewTo||jt.to().line<it.display.viewFrom)){var Ot=jt.empty();(Ot||it.options.showCursorWhenSelecting)&&Dr(it,jt.head,dt),Ot||Qr(it,jt,Pt)}}return ut}function Dr(it,st,ht){var ut=Ko(it,st,"div",null,null,!it.options.singleCursorHeightPerLine),dt=ht.appendChild(le("div","\xA0","CodeMirror-cursor"));if(dt.style.left=ut.left+"px",dt.style.top=ut.top+"px",dt.style.height=Math.max(0,ut.bottom-ut.top)*it.options.cursorHeight+"px",ut.other){var Pt=ht.appendChild(le("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Pt.style.display="",Pt.style.left=ut.other.left+"px",Pt.style.top=ut.other.top+"px",Pt.style.height=(ut.other.bottom-ut.other.top)*.85+"px"}}function Vs(it,st){return it.top-st.top||it.left-st.left}function Qr(it,st,ht){var ut=it.display,dt=it.doc,Pt=document.createDocumentFragment(),bt=Fa(it.display),jt=bt.left,Ot=Math.max(ut.sizerWidth,Ks(it)-ut.sizer.offsetLeft)-bt.right,Zt=dt.direction=="ltr";function Pe(Bi,Di,ar,wi){Di<0&&(Di=0),Di=Math.round(Di),wi=Math.round(wi),Pt.appendChild(le("div",null,"CodeMirror-selected","position: absolute; left: "+Bi+`px;
top: `+Di+"px; width: "+(ar==null?Ot-Bi:ar)+`px;
height: `+(wi-Di)+"px"))}function te(Bi,Di,ar){var wi=Se(dt,Bi),Cr=wi.text.length,Io,ks;function Zo(Ps,va){return Hu(it,on(Bi,Ps),"div",wi,va)}function ba(Ps,va,_s){var vi=id(it,wi,null,Ps),Hr=va=="ltr"==(_s=="after")?"left":"right",Do=_s=="after"?vi.begin:vi.end-(/\s/.test(wi.text.charAt(vi.end-1))?2:1);return Zo(Do,Hr)[Hr]}var Rs=gi(wi,dt.direction);return si(Rs,Di||0,ar==null?Cr:ar,function(Ps,va,_s,vi){var Hr=_s=="ltr",Do=Zo(Ps,Hr?"left":"right"),Po=Zo(va-1,Hr?"right":"left"),Ys=Di==null&&Ps==0,Kr=ar==null&&va==Cr,wr=vi==0,Ta=!Rs||vi==Rs.length-1;if(Po.top-Do.top<=3){var as=(Zt?Ys:Kr)&&wr,Su=(Zt?Kr:Ys)&&Ta,sl=as?jt:(Hr?Do:Po).left,na=Su?Ot:(Hr?Po:Do).right;Pe(sl,Do.top,na-sl,Do.bottom)}else{var Na,mo,bs,pA;Hr?(Na=Zt&&Ys&&wr?jt:Do.left,mo=Zt?Ot:ba(Ps,_s,"before"),bs=Zt?jt:ba(va,_s,"after"),pA=Zt&&Kr&&Ta?Ot:Po.right):(Na=Zt?ba(Ps,_s,"before"):jt,mo=!Zt&&Ys&&wr?Ot:Do.right,bs=!Zt&&Kr&&Ta?jt:Po.left,pA=Zt?ba(va,_s,"after"):Ot),Pe(Na,Do.top,mo-Na,Do.bottom),Do.bottom<Po.top&&Pe(jt,Do.bottom,null,Po.top),Pe(bs,Po.top,pA-bs,Po.bottom)}(!Io||Vs(Do,Io)<0)&&(Io=Do),Vs(Po,Io)<0&&(Io=Po),(!ks||Vs(Do,ks)<0)&&(ks=Do),Vs(Po,ks)<0&&(ks=Po)}),{start:Io,end:ks}}var Ve=st.from(),Ge=st.to();if(Ve.line==Ge.line)te(Ve.line,Ve.ch,Ge.ch);else{var Fn=Se(dt,Ve.line),In=Se(dt,Ge.line),_n=_r(Fn)==_r(In),oi=te(Ve.line,Ve.ch,_n?Fn.text.length+1:null).end,bi=te(Ge.line,_n?0:null,Ge.ch).start;_n&&(oi.top<bi.top-2?(Pe(oi.right,oi.top,null,oi.bottom),Pe(jt,bi.top,bi.left,bi.bottom)):Pe(oi.right,oi.top,bi.left-oi.right,oi.bottom)),oi.bottom<bi.top&&Pe(jt,oi.bottom,null,bi.top)}ht.appendChild(Pt)}function to(it){if(it.state.focused){var st=it.display;clearInterval(st.blinker);var ht=!0;st.cursorDiv.style.visibility="",it.options.cursorBlinkRate>0?st.blinker=setInterval(function(){it.hasFocus()||Ru(it),st.cursorDiv.style.visibility=(ht=!ht)?"":"hidden"},it.options.cursorBlinkRate):it.options.cursorBlinkRate<0&&(st.cursorDiv.style.visibility="hidden")}}function Co(it){it.state.focused||(it.display.input.focus(),Or(it))}function zo(it){it.state.delayingBlurEvent=!0,setTimeout(function(){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1,Ru(it))},100)}function Or(it,st){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1),it.options.readOnly!="nocursor"&&(it.state.focused||(yr(it,"focus",it,st),it.state.focused=!0,sn(it.display.wrapper,"CodeMirror-focused"),!it.curOp&&it.display.selForContextMenu!=it.doc.sel&&(it.display.input.reset(),ne&&setTimeout(function(){return it.display.input.reset(!0)},20)),it.display.input.receivedFocus()),to(it))}function Ru(it,st){it.state.delayingBlurEvent||(it.state.focused&&(yr(it,"blur",it,st),it.state.focused=!1,Jt(it.display.wrapper,"CodeMirror-focused")),clearInterval(it.display.blinker),setTimeout(function(){it.state.focused||(it.display.shift=!1)},150))}function Ri(it){for(var st=it.display,ht=st.lineDiv.offsetTop,ut=0;ut<st.view.length;ut++){var dt=st.view[ut],Pt=it.options.lineWrapping,bt=void 0,jt=0;if(!dt.hidden){if(be&&we<8){var Ot=dt.node.offsetTop+dt.node.offsetHeight;bt=Ot-ht,ht=Ot}else{var Zt=dt.node.getBoundingClientRect();bt=Zt.bottom-Zt.top,!Pt&&dt.text.firstChild&&(jt=dt.text.firstChild.getBoundingClientRect().right-Zt.left-1)}var Pe=dt.line.height-bt;if((Pe>.005||Pe<-.005)&&(nn(dt.line,bt),Gu(dt.line),dt.rest))for(var te=0;te<dt.rest.length;te++)Gu(dt.rest[te]);if(jt>it.display.sizerWidth){var Ve=Math.ceil(jt/Ou(it.display));Ve>it.display.maxLineLength&&(it.display.maxLineLength=Ve,it.display.maxLine=dt.line,it.display.maxLineChanged=!0)}}}}function Gu(it){if(it.widgets)for(var st=0;st<it.widgets.length;++st){var ht=it.widgets[st],ut=ht.node.parentNode;ut&&(ht.height=ut.offsetHeight)}}function br(it,st,ht){var ut=ht&&ht.top!=null?Math.max(0,ht.top):it.scroller.scrollTop;ut=Math.floor(ut-Pa(it));var dt=ht&&ht.bottom!=null?ht.bottom:ut+it.wrapper.clientHeight,Pt=Un(st,ut),bt=Un(st,dt);if(ht&&ht.ensure){var jt=ht.ensure.from.line,Ot=ht.ensure.to.line;jt<Pt?(Pt=jt,bt=Un(st,Xr(Se(st,jt))+it.wrapper.clientHeight)):Math.min(Ot,st.lastLine())>=bt&&(Pt=Un(st,Xr(Se(st,Ot))-it.wrapper.clientHeight),bt=Ot)}return{from:Pt,to:Math.max(bt,Pt+1)}}function ic(it,st){if(!or(it,"scrollCursorIntoView")){var ht=it.display,ut=ht.sizer.getBoundingClientRect(),dt=null;if(st.top+ut.top<0?dt=!0:st.bottom+ut.top>(window.innerHeight||document.documentElement.clientHeight)&&(dt=!1),dt!=null&&!kn){var Pt=le("div","\u200B",null,`position: absolute;
top: `+(st.top-ht.viewOffset-Pa(it.display))+`px;
height: `+(st.bottom-st.top+Ga(it)+ht.barHeight)+`px;
left: `+st.left+"px; width: "+Math.max(2,st.right-st.left)+"px;");it.display.lineSpace.appendChild(Pt),Pt.scrollIntoView(dt),it.display.lineSpace.removeChild(Pt)}}}function kA(it,st,ht,ut){ut==null&&(ut=0);var dt;!it.options.lineWrapping&&st==ht&&(st=st.ch?on(st.line,st.sticky=="before"?st.ch-1:st.ch,"after"):st,ht=st.sticky=="before"?on(st.line,st.ch+1,"before"):st);for(var Pt=0;Pt<5;Pt++){var bt=!1,jt=Ko(it,st),Ot=!ht||ht==st?jt:Ko(it,ht);dt={left:Math.min(jt.left,Ot.left),top:Math.min(jt.top,Ot.top)-ut,right:Math.max(jt.left,Ot.left),bottom:Math.max(jt.bottom,Ot.bottom)+ut};var Zt=rd(it,dt),Pe=it.doc.scrollTop,te=it.doc.scrollLeft;if(Zt.scrollTop!=null&&(ju(it,Zt.scrollTop),Math.abs(it.doc.scrollTop-Pe)>1&&(bt=!0)),Zt.scrollLeft!=null&&(TA(it,Zt.scrollLeft),Math.abs(it.doc.scrollLeft-te)>1&&(bt=!0)),!bt)break}return dt}function vg(it,st){var ht=rd(it,st);ht.scrollTop!=null&&ju(it,ht.scrollTop),ht.scrollLeft!=null&&TA(it,ht.scrollLeft)}function rd(it,st){var ht=it.display,ut=AA(it.display);st.top<0&&(st.top=0);var dt=it.curOp&&it.curOp.scrollTop!=null?it.curOp.scrollTop:ht.scroller.scrollTop,Pt=ls(it),bt={};st.bottom-st.top>Pt&&(st.bottom=st.top+Pt);var jt=it.doc.height+dl(ht),Ot=st.top<ut,Zt=st.bottom>jt-ut;if(st.top<dt)bt.scrollTop=Ot?0:st.top;else if(st.bottom>dt+Pt){var Pe=Math.min(st.top,(Zt?jt:st.bottom)-Pt);Pe!=dt&&(bt.scrollTop=Pe)}var te=it.options.fixedGutter?0:ht.gutters.offsetWidth,Ve=it.curOp&&it.curOp.scrollLeft!=null?it.curOp.scrollLeft:ht.scroller.scrollLeft-te,Ge=Ks(it)-ht.gutters.offsetWidth,Fn=st.right-st.left>Ge;return Fn&&(st.right=st.left+Ge),st.left<10?bt.scrollLeft=0:st.left<Ve?bt.scrollLeft=Math.max(0,st.left+te-(Fn?0:10)):st.right>Ge+Ve-3&&(bt.scrollLeft=st.right+(Fn?0:10)-Ge),bt}function df(it,st){st!=null&&(hA(it),it.curOp.scrollTop=(it.curOp.scrollTop==null?it.doc.scrollTop:it.curOp.scrollTop)+st)}function bA(it){hA(it);var st=it.getCursor();it.curOp.scrollToPos={from:st,to:st,margin:it.options.cursorScrollMargin}}function uA(it,st,ht){(st!=null||ht!=null)&&hA(it),st!=null&&(it.curOp.scrollLeft=st),ht!=null&&(it.curOp.scrollTop=ht)}function Rr(it,st){hA(it),it.curOp.scrollToPos=st}function hA(it){var st=it.curOp.scrollToPos;if(st){it.curOp.scrollToPos=null;var ht=gf(it,st.from),ut=gf(it,st.to);cf(it,ht,ut,st.margin)}}function cf(it,st,ht,ut){var dt=rd(it,{left:Math.min(st.left,ht.left),top:Math.min(st.top,ht.top)-ut,right:Math.max(st.right,ht.right),bottom:Math.max(st.bottom,ht.bottom)+ut});uA(it,dt.scrollLeft,dt.scrollTop)}function ju(it,st){Math.abs(it.doc.scrollTop-st)<2||(Tt||Gl(it,{top:st}),ch(it,st,!0),Tt&&Gl(it),ou(it,100))}function ch(it,st,ht){st=Math.max(0,Math.min(it.display.scroller.scrollHeight-it.display.scroller.clientHeight,st)),!(it.display.scroller.scrollTop==st&&!ht)&&(it.doc.scrollTop=st,it.display.scrollbars.setScrollTop(st),it.display.scroller.scrollTop!=st&&(it.display.scroller.scrollTop=st))}function TA(it,st,ht,ut){st=Math.max(0,Math.min(st,it.display.scroller.scrollWidth-it.display.scroller.clientWidth)),!((ht?st==it.doc.scrollLeft:Math.abs(it.doc.scrollLeft-st)<2)&&!ut)&&(it.doc.scrollLeft=st,vf(it),it.display.scroller.scrollLeft!=st&&(it.display.scroller.scrollLeft=st),it.display.scrollbars.setScrollLeft(st))}function ml(it){var st=it.display,ht=st.gutters.offsetWidth,ut=Math.round(it.doc.height+dl(it.display));return{clientHeight:st.scroller.clientHeight,viewHeight:st.wrapper.clientHeight,scrollWidth:st.scroller.scrollWidth,clientWidth:st.scroller.clientWidth,viewWidth:st.wrapper.clientWidth,barLeft:it.options.fixedGutter?ht:0,docHeight:ut,scrollHeight:ut+Ga(it)+st.barHeight,nativeBarWidth:st.nativeBarWidth,gutterWidth:ht}}var eu=function(it,st,ht){this.cm=ht;var ut=this.vert=le("div",[le("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),dt=this.horiz=le("div",[le("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");ut.tabIndex=dt.tabIndex=-1,it(ut),it(dt),fi(ut,"scroll",function(){ut.clientHeight&&st(ut.scrollTop,"vertical")}),fi(dt,"scroll",function(){dt.clientWidth&&st(dt.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,be&&we<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};eu.prototype.update=function(it){var st=it.scrollWidth>it.clientWidth+1,ht=it.scrollHeight>it.clientHeight+1,ut=it.nativeBarWidth;if(ht){this.vert.style.display="block",this.vert.style.bottom=st?ut+"px":"0";var dt=it.viewHeight-(st?ut:0);this.vert.firstChild.style.height=Math.max(0,it.scrollHeight-it.clientHeight+dt)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(st){this.horiz.style.display="block",this.horiz.style.right=ht?ut+"px":"0",this.horiz.style.left=it.barLeft+"px";var Pt=it.viewWidth-it.barLeft-(ht?ut:0);this.horiz.firstChild.style.width=Math.max(0,it.scrollWidth-it.clientWidth+Pt)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&it.clientHeight>0&&(ut==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:ht?ut:0,bottom:st?ut:0}},eu.prototype.setScrollLeft=function(it){this.horiz.scrollLeft!=it&&(this.horiz.scrollLeft=it),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},eu.prototype.setScrollTop=function(it){this.vert.scrollTop!=it&&(this.vert.scrollTop=it),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},eu.prototype.zeroWidthHack=function(){var it=gt&&!Xe?"12px":"18px";this.horiz.style.height=this.vert.style.width=it,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ht,this.disableVert=new Ht},eu.prototype.enableZeroWidthBar=function(it,st,ht){it.style.pointerEvents="auto";function ut(){var dt=it.getBoundingClientRect(),Pt=ht=="vert"?document.elementFromPoint(dt.right-1,(dt.top+dt.bottom)/2):document.elementFromPoint((dt.right+dt.left)/2,dt.bottom-1);Pt!=it?it.style.pointerEvents="none":st.set(1e3,ut)}st.set(1e3,ut)},eu.prototype.clear=function(){var it=this.horiz.parentNode;it.removeChild(this.horiz),it.removeChild(this.vert)};var Ol=function(){};Ol.prototype.update=function(){return{bottom:0,right:0}},Ol.prototype.setScrollLeft=function(){},Ol.prototype.setScrollTop=function(){},Ol.prototype.clear=function(){};function Rl(it,st){st||(st=ml(it));var ht=it.display.barWidth,ut=it.display.barHeight;pf(it,st);for(var dt=0;dt<4&&ht!=it.display.barWidth||ut!=it.display.barHeight;dt++)ht!=it.display.barWidth&&it.options.lineWrapping&&Ri(it),pf(it,ml(it)),ht=it.display.barWidth,ut=it.display.barHeight}function pf(it,st){var ht=it.display,ut=ht.scrollbars.update(st);ht.sizer.style.paddingRight=(ht.barWidth=ut.right)+"px",ht.sizer.style.paddingBottom=(ht.barHeight=ut.bottom)+"px",ht.heightForcer.style.borderBottom=ut.bottom+"px solid transparent",ut.right&&ut.bottom?(ht.scrollbarFiller.style.display="block",ht.scrollbarFiller.style.height=ut.bottom+"px",ht.scrollbarFiller.style.width=ut.right+"px"):ht.scrollbarFiller.style.display="",ut.bottom&&it.options.coverGutterNextToScrollbar&&it.options.fixedGutter?(ht.gutterFiller.style.display="block",ht.gutterFiller.style.height=ut.bottom+"px",ht.gutterFiller.style.width=st.gutterWidth+"px"):ht.gutterFiller.style.display=""}var od={native:eu,null:Ol};function sd(it){it.display.scrollbars&&(it.display.scrollbars.clear(),it.display.scrollbars.addClass&&Jt(it.display.wrapper,it.display.scrollbars.addClass)),it.display.scrollbars=new od[it.options.scrollbarStyle](function(st){it.display.wrapper.insertBefore(st,it.display.scrollbarFiller),fi(st,"mousedown",function(){it.state.focused&&setTimeout(function(){return it.display.input.focus()},0)}),st.setAttribute("cm-not-content","true")},function(st,ht){ht=="horizontal"?TA(it,st):ju(it,st)},it),it.display.scrollbars.addClass&&sn(it.display.wrapper,it.display.scrollbars.addClass)}var rc=0;function nu(it){it.curOp={cm:it,viewChanged:!1,startHeight:it.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++rc},sr(it.curOp)}function iu(it){var st=it.curOp;st&&Zr(st,function(ht){for(var ut=0;ut<ht.ops.length;ut++)ht.ops[ut].cm.curOp=null;Jc(ht)})}function Jc(it){for(var st=it.ops,ht=0;ht<st.length;ht++)qc(st[ht]);for(var ut=0;ut<st.length;ut++)$c(st[ut]);for(var dt=0;dt<st.length;dt++)oc(st[dt]);for(var Pt=0;Pt<st.length;Pt++)Qo(st[Pt]);for(var bt=0;bt<st.length;bt++)ru(st[bt])}function qc(it){var st=it.cm,ht=st.display;sc(st),it.updateMaxLine&&Ao(st),it.mustUpdate=it.viewChanged||it.forceUpdate||it.scrollTop!=null||it.scrollToPos&&(it.scrollToPos.from.line<ht.viewFrom||it.scrollToPos.to.line>=ht.viewTo)||ht.maxLineChanged&&st.options.lineWrapping,it.update=it.mustUpdate&&new Ku(st,it.mustUpdate&&{top:it.scrollTop,ensure:it.scrollToPos},it.forceUpdate)}function $c(it){it.updatedDisplay=it.mustUpdate&&mf(it.cm,it.update)}function oc(it){var st=it.cm,ht=st.display;it.updatedDisplay&&Ri(st),it.barMeasure=ml(st),ht.maxLineChanged&&!st.options.lineWrapping&&(it.adjustWidthTo=Hl(st,ht.maxLine,ht.maxLine.text.length).left+3,st.display.sizerWidth=it.adjustWidthTo,it.barMeasure.scrollWidth=Math.max(ht.scroller.clientWidth,ht.sizer.offsetLeft+it.adjustWidthTo+Ga(st)+st.display.barWidth),it.maxScrollLeft=Math.max(0,ht.sizer.offsetLeft+it.adjustWidthTo-Ks(st))),(it.updatedDisplay||it.selectionChanged)&&(it.preparedSelection=ht.input.prepareSelection())}function Qo(it){var st=it.cm;it.adjustWidthTo!=null&&(st.display.sizer.style.minWidth=it.adjustWidthTo+"px",it.maxScrollLeft<st.doc.scrollLeft&&TA(st,Math.min(st.display.scroller.scrollLeft,it.maxScrollLeft),!0),st.display.maxLineChanged=!1);var ht=it.focus&&it.focus==fn();it.preparedSelection&&st.display.input.showSelection(it.preparedSelection,ht),(it.updatedDisplay||it.startHeight!=st.doc.height)&&Rl(st,it.barMeasure),it.updatedDisplay&&au(st,it.barMeasure),it.selectionChanged&&to(st),st.state.focused&&it.updateInput&&st.display.input.reset(it.typing),ht&&Co(it.cm)}function ru(it){var st=it.cm,ht=st.display,ut=st.doc;if(it.updatedDisplay&&oo(st,it.update),ht.wheelStartX!=null&&(it.scrollTop!=null||it.scrollLeft!=null||it.scrollToPos)&&(ht.wheelStartX=ht.wheelStartY=null),it.scrollTop!=null&&ch(st,it.scrollTop,it.forceScroll),it.scrollLeft!=null&&TA(st,it.scrollLeft,!0,!0),it.scrollToPos){var dt=kA(st,Ze(ut,it.scrollToPos.from),Ze(ut,it.scrollToPos.to),it.scrollToPos.margin);ic(st,dt)}var Pt=it.maybeHiddenMarkers,bt=it.maybeUnhiddenMarkers;if(Pt)for(var jt=0;jt<Pt.length;++jt)Pt[jt].lines.length||yr(Pt[jt],"hide");if(bt)for(var Ot=0;Ot<bt.length;++Ot)bt[Ot].lines.length&&yr(bt[Ot],"unhide");ht.wrapper.offsetHeight&&(ut.scrollTop=st.display.scroller.scrollTop),it.changeObjs&&yr(st,"changes",st,it.changeObjs),it.update&&it.update.finish()}function Jr(it,st){if(it.curOp)return st();nu(it);try{return st()}finally{iu(it)}}function Bs(it,st){return function(){if(it.curOp)return st.apply(it,arguments);nu(it);try{return st.apply(it,arguments)}finally{iu(it)}}}function Us(it){return function(){if(this.curOp)return it.apply(this,arguments);nu(this);try{return it.apply(this,arguments)}finally{iu(this)}}}function Is(it){return function(){var st=this.cm;if(!st||st.curOp)return it.apply(this,arguments);nu(st);try{return it.apply(this,arguments)}finally{iu(st)}}}function ou(it,st){it.doc.highlightFrontier<it.display.viewTo&&it.state.highlight.set(st,Si(ms,it))}function ms(it){var st=it.doc;if(!(st.highlightFrontier>=it.display.viewTo)){var ht=+new Date+it.options.workTime,ut=zi(it,st.highlightFrontier),dt=[];st.iter(ut.line,Math.min(st.first+st.size,it.display.viewTo+500),function(Pt){if(ut.line>=it.display.viewFrom){var bt=Pt.styles,jt=Pt.text.length>it.options.maxHighlightLength?On(st.mode,ut.state):null,Ot=ri(it,Pt,ut,!0);jt&&(ut.state=jt),Pt.styles=Ot.styles;var Zt=Pt.styleClasses,Pe=Ot.classes;Pe?Pt.styleClasses=Pe:Zt&&(Pt.styleClasses=null);for(var te=!bt||bt.length!=Pt.styles.length||Zt!=Pe&&(!Zt||!Pe||Zt.bgClass!=Pe.bgClass||Zt.textClass!=Pe.textClass),Ve=0;!te&&Ve<bt.length;++Ve)te=bt[Ve]!=Pt.styles[Ve];te&&dt.push(ut.line),Pt.stateAfter=ut.save(),ut.nextLine()}else Pt.text.length<=it.options.maxHighlightLength&&ce(it,Pt.text,ut),Pt.stateAfter=ut.line%5==0?ut.save():null,ut.nextLine();if(+new Date>ht)return ou(it,it.options.workDelay),!0}),st.highlightFrontier=ut.line,st.modeFrontier=Math.max(st.modeFrontier,ut.line),dt.length&&Jr(it,function(){for(var Pt=0;Pt<dt.length;Pt++)mr(it,dt[Pt],"text")})}}var Ku=function(it,st,ht){var ut=it.display;this.viewport=st,this.visible=br(ut,it.doc,st),this.editorIsHidden=!ut.wrapper.offsetWidth,this.wrapperHeight=ut.wrapper.clientHeight,this.wrapperWidth=ut.wrapper.clientWidth,this.oldDisplayWidth=Ks(it),this.force=ht,this.dims=ff(it),this.events=[]};Ku.prototype.signal=function(it,st){Wr(it,st)&&this.events.push(arguments)},Ku.prototype.finish=function(){for(var it=0;it<this.events.length;it++)yr.apply(null,this.events[it])};function sc(it){var st=it.display;!st.scrollbarsClipped&&st.scroller.offsetWidth&&(st.nativeBarWidth=st.scroller.offsetWidth-st.scroller.clientWidth,st.heightForcer.style.height=Ga(it)+"px",st.sizer.style.marginBottom=-st.nativeBarWidth+"px",st.sizer.style.borderRightWidth=Ga(it)+"px",st.scrollbarsClipped=!0)}function ac(it){if(it.hasFocus())return null;var st=fn();if(!st||!Je(it.display.lineDiv,st))return null;var ht={activeElt:st};if(window.getSelection){var ut=window.getSelection();ut.anchorNode&&ut.extend&&Je(it.display.lineDiv,ut.anchorNode)&&(ht.anchorNode=ut.anchorNode,ht.anchorOffset=ut.anchorOffset,ht.focusNode=ut.focusNode,ht.focusOffset=ut.focusOffset)}return ht}function Ea(it){if(!(!it||!it.activeElt||it.activeElt==fn())&&(it.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(it.activeElt.nodeName)&&it.anchorNode&&Je(document.body,it.anchorNode)&&Je(document.body,it.focusNode))){var st=window.getSelection(),ht=document.createRange();ht.setEnd(it.anchorNode,it.anchorOffset),ht.collapse(!1),st.removeAllRanges(),st.addRange(ht),st.extend(it.focusNode,it.focusOffset)}}function mf(it,st){var ht=it.display,ut=it.doc;if(st.editorIsHidden)return ss(it),!1;if(!st.force&&st.visible.from>=ht.viewFrom&&st.visible.to<=ht.viewTo&&(ht.updateLineNumbers==null||ht.updateLineNumbers>=ht.viewTo)&&ht.renderedView==ht.view&&Ka(it)==0)return!1;vs(it)&&(ss(it),st.dims=ff(it));var dt=ut.first+ut.size,Pt=Math.max(st.visible.from-it.options.viewportMargin,ut.first),bt=Math.min(dt,st.visible.to+it.options.viewportMargin);ht.viewFrom<Pt&&Pt-ht.viewFrom<20&&(Pt=Math.max(ut.first,ht.viewFrom)),ht.viewTo>bt&&ht.viewTo-bt<20&&(bt=Math.min(dt,ht.viewTo)),Ke&&(Pt=ii(it.doc,Pt),bt=Yi(it.doc,bt));var jt=Pt!=ht.viewFrom||bt!=ht.viewTo||ht.lastWrapHeight!=st.wrapperHeight||ht.lastWrapWidth!=st.wrapperWidth;ro(it,Pt,bt),ht.viewOffset=Xr(Se(it.doc,ht.viewFrom)),it.display.mover.style.top=ht.viewOffset+"px";var Ot=Ka(it);if(!jt&&Ot==0&&!st.force&&ht.renderedView==ht.view&&(ht.updateLineNumbers==null||ht.updateLineNumbers>=ht.viewTo))return!1;var Zt=ac(it);return Ot>4&&(ht.lineDiv.style.display="none"),ad(it,ht.updateLineNumbers,st.dims),Ot>4&&(ht.lineDiv.style.display=""),ht.renderedView=ht.view,Ea(Zt),Ae(ht.cursorDiv),Ae(ht.selectionDiv),ht.gutters.style.height=ht.sizer.style.minHeight=0,jt&&(ht.lastWrapHeight=st.wrapperHeight,ht.lastWrapWidth=st.wrapperWidth,ou(it,400)),ht.updateLineNumbers=null,!0}function oo(it,st){for(var ht=st.viewport,ut=!0;;ut=!1){if(!ut||!it.options.lineWrapping||st.oldDisplayWidth==Ks(it)){if(ht&&ht.top!=null&&(ht={top:Math.min(it.doc.height+dl(it.display)-ls(it),ht.top)}),st.visible=br(it.display,it.doc,ht),st.visible.from>=it.display.viewFrom&&st.visible.to<=it.display.viewTo)break}else ut&&(st.visible=br(it.display,it.doc,ht));if(!mf(it,st))break;Ri(it);var dt=ml(it);us(it),Rl(it,dt),au(it,dt),st.force=!1}st.signal(it,"update",it),(it.display.viewFrom!=it.display.reportedViewFrom||it.display.viewTo!=it.display.reportedViewTo)&&(st.signal(it,"viewportChange",it,it.display.viewFrom,it.display.viewTo),it.display.reportedViewFrom=it.display.viewFrom,it.display.reportedViewTo=it.display.viewTo)}function Gl(it,st){var ht=new Ku(it,st);if(mf(it,ht)){Ri(it),oo(it,ht);var ut=ml(it);us(it),Rl(it,ut),au(it,ut),ht.finish()}}function ad(it,st,ht){var ut=it.display,dt=it.options.lineNumbers,Pt=ut.lineDiv,bt=Pt.firstChild;function jt(Fn){var In=Fn.nextSibling;return ne&&gt&&it.display.currentWheelTarget==Fn?Fn.style.display="none":Fn.parentNode.removeChild(Fn),In}for(var Ot=ut.view,Zt=ut.viewFrom,Pe=0;Pe<Ot.length;Pe++){var te=Ot[Pe];if(!te.hidden)if(!te.node||te.node.parentNode!=Pt){var Ve=Du(it,te,Zt,ht);Pt.insertBefore(Ve,bt)}else{for(;bt!=te.node;)bt=jt(bt);var Ge=dt&&st!=null&&st<=Zt&&te.lineNumber;te.changes&&(je(te.changes,"gutter")>-1&&(Ge=!1),EA(it,te,Zt,ht)),Ge&&(Ae(te.lineNumber),te.lineNumber.appendChild(document.createTextNode(Oi(it.options,Zt)))),bt=te.node.nextSibling}Zt+=te.size}for(;bt;)bt=jt(bt)}function su(it){var st=it.gutters.offsetWidth;it.sizer.style.marginLeft=st+"px"}function au(it,st){it.display.sizer.style.minHeight=st.docHeight+"px",it.display.heightForcer.style.top=st.docHeight+"px",it.display.gutters.style.height=st.docHeight+it.display.barHeight+Ga(it)+"px"}function vf(it){var st=it.display,ht=st.view;if(!(!st.alignWidgets&&(!st.gutters.firstChild||!it.options.fixedGutter))){for(var ut=$A(st)-st.scroller.scrollLeft+it.doc.scrollLeft,dt=st.gutters.offsetWidth,Pt=ut+"px",bt=0;bt<ht.length;bt++)if(!ht[bt].hidden){it.options.fixedGutter&&(ht[bt].gutter&&(ht[bt].gutter.style.left=Pt),ht[bt].gutterBackground&&(ht[bt].gutterBackground.style.left=Pt));var jt=ht[bt].alignable;if(jt)for(var Ot=0;Ot<jt.length;Ot++)jt[Ot].style.left=Pt}it.options.fixedGutter&&(st.gutters.style.left=ut+dt+"px")}}function vs(it){if(!it.options.lineNumbers)return!1;var st=it.doc,ht=Oi(it.options,st.first+st.size-1),ut=it.display;if(ht.length!=ut.lineNumChars){var dt=ut.measure.appendChild(le("div",[le("div",ht)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Pt=dt.firstChild.offsetWidth,bt=dt.offsetWidth-Pt;return ut.lineGutter.style.width="",ut.lineNumInnerWidth=Math.max(Pt,ut.lineGutter.offsetWidth-bt)+1,ut.lineNumWidth=ut.lineNumInnerWidth+bt,ut.lineNumChars=ut.lineNumInnerWidth?ht.length:-1,ut.lineGutter.style.width=ut.lineNumWidth+"px",su(it.display),!0}return!1}function Ds(it,st){for(var ht=[],ut=!1,dt=0;dt<it.length;dt++){var Pt=it[dt],bt=null;if(typeof Pt!="string"&&(bt=Pt.style,Pt=Pt.className),Pt=="CodeMirror-linenumbers")if(st)ut=!0;else continue;ht.push({className:Pt,style:bt})}return st&&!ut&&ht.push({className:"CodeMirror-linenumbers",style:null}),ht}function zu(it){var st=it.gutters,ht=it.gutterSpecs;Ae(st),it.lineGutter=null;for(var ut=0;ut<ht.length;++ut){var dt=ht[ut],Pt=dt.className,bt=dt.style,jt=st.appendChild(le("div",null,"CodeMirror-gutter "+Pt));bt&&(jt.style.cssText=bt),Pt=="CodeMirror-linenumbers"&&(it.lineGutter=jt,jt.style.width=(it.lineNumWidth||1)+"px")}st.style.display=ht.length?"":"none",su(it)}function nl(it){zu(it.display),Eo(it),vf(it)}function lu(it,st,ht,ut){var dt=this;this.input=ht,dt.scrollbarFiller=le("div",null,"CodeMirror-scrollbar-filler"),dt.scrollbarFiller.setAttribute("cm-not-content","true"),dt.gutterFiller=le("div",null,"CodeMirror-gutter-filler"),dt.gutterFiller.setAttribute("cm-not-content","true"),dt.lineDiv=We("div",null,"CodeMirror-code"),dt.selectionDiv=le("div",null,null,"position: relative; z-index: 1"),dt.cursorDiv=le("div",null,"CodeMirror-cursors"),dt.measure=le("div",null,"CodeMirror-measure"),dt.lineMeasure=le("div",null,"CodeMirror-measure"),dt.lineSpace=We("div",[dt.measure,dt.lineMeasure,dt.selectionDiv,dt.cursorDiv,dt.lineDiv],null,"position: relative; outline: none");var Pt=We("div",[dt.lineSpace],"CodeMirror-lines");dt.mover=le("div",[Pt],null,"position: relative"),dt.sizer=le("div",[dt.mover],"CodeMirror-sizer"),dt.sizerWidth=null,dt.heightForcer=le("div",null,null,"position: absolute; height: "+Nn+"px; width: 1px;"),dt.gutters=le("div",null,"CodeMirror-gutters"),dt.lineGutter=null,dt.scroller=le("div",[dt.sizer,dt.heightForcer,dt.gutters],"CodeMirror-scroll"),dt.scroller.setAttribute("tabIndex","-1"),dt.wrapper=le("div",[dt.scrollbarFiller,dt.gutterFiller,dt.scroller],"CodeMirror"),be&&we<8&&(dt.gutters.style.zIndex=-1,dt.scroller.style.paddingRight=0),!ne&&!(Tt&&nt)&&(dt.scroller.draggable=!0),it&&(it.appendChild?it.appendChild(dt.wrapper):it(dt.wrapper)),dt.viewFrom=dt.viewTo=st.first,dt.reportedViewFrom=dt.reportedViewTo=st.first,dt.view=[],dt.renderedView=null,dt.externalMeasured=null,dt.viewOffset=0,dt.lastWrapHeight=dt.lastWrapWidth=0,dt.updateLineNumbers=null,dt.nativeBarWidth=dt.barHeight=dt.barWidth=0,dt.scrollbarsClipped=!1,dt.lineNumWidth=dt.lineNumInnerWidth=dt.lineNumChars=null,dt.alignWidgets=!1,dt.cachedCharWidth=dt.cachedTextHeight=dt.cachedPaddingH=null,dt.maxLine=null,dt.maxLineLength=0,dt.maxLineChanged=!1,dt.wheelDX=dt.wheelDY=dt.wheelStartX=dt.wheelStartY=null,dt.shift=!1,dt.selForContextMenu=null,dt.activeTouch=null,dt.gutterSpecs=Ds(ut.gutters,ut.lineNumbers),zu(dt),ht.init(dt)}var za=0,hs=null;be?hs=-.53:Tt?hs=15:fe?hs=-.7:gn&&(hs=-1/3);function jl(it){var st=it.wheelDeltaX,ht=it.wheelDeltaY;return st==null&&it.detail&&it.axis==it.HORIZONTAL_AXIS&&(st=it.detail),ht==null&&it.detail&&it.axis==it.VERTICAL_AXIS?ht=it.detail:ht==null&&(ht=it.wheelDelta),{x:st,y:ht}}function Va(it){var st=jl(it);return st.x*=hs,st.y*=hs,st}function Hs(it,st){var ht=jl(st),ut=ht.x,dt=ht.y,Pt=it.display,bt=Pt.scroller,jt=bt.scrollWidth>bt.clientWidth,Ot=bt.scrollHeight>bt.clientHeight;if(ut&&jt||dt&&Ot){if(dt&&gt&&ne){t:for(var Zt=st.target,Pe=Pt.view;Zt!=bt;Zt=Zt.parentNode)for(var te=0;te<Pe.length;te++)if(Pe[te].node==Zt){it.display.currentWheelTarget=Zt;break t}}if(ut&&!Tt&&!Qe&&hs!=null){dt&&Ot&&ju(it,Math.max(0,bt.scrollTop+dt*hs)),TA(it,Math.max(0,bt.scrollLeft+ut*hs)),(!dt||dt&&Ot)&&Fo(st),Pt.wheelStartX=null;return}if(dt&&hs!=null){var Ve=dt*hs,Ge=it.doc.scrollTop,Fn=Ge+Pt.wrapper.clientHeight;Ve<0?Ge=Math.max(0,Ge+Ve-50):Fn=Math.min(it.doc.height,Fn+Ve+50),Gl(it,{top:Ge,bottom:Fn})}za<20&&(Pt.wheelStartX==null?(Pt.wheelStartX=bt.scrollLeft,Pt.wheelStartY=bt.scrollTop,Pt.wheelDX=ut,Pt.wheelDY=dt,setTimeout(function(){if(Pt.wheelStartX!=null){var In=bt.scrollLeft-Pt.wheelStartX,_n=bt.scrollTop-Pt.wheelStartY,oi=_n&&Pt.wheelDY&&_n/Pt.wheelDY||In&&Pt.wheelDX&&In/Pt.wheelDX;Pt.wheelStartX=Pt.wheelStartY=null,oi&&(hs=(hs*za+oi)/(za+1),++za)}},200)):(Pt.wheelDX+=ut,Pt.wheelDY+=dt))}}var vl=function(it,st){this.ranges=it,this.primIndex=st};vl.prototype.primary=function(){return this.ranges[this.primIndex]},vl.prototype.equals=function(it){if(it==this)return!0;if(it.primIndex!=this.primIndex||it.ranges.length!=this.ranges.length)return!1;for(var st=0;st<this.ranges.length;st++){var ht=this.ranges[st],ut=it.ranges[st];if(!ie(ht.anchor,ut.anchor)||!ie(ht.head,ut.head))return!1}return!0},vl.prototype.deepCopy=function(){for(var it=[],st=0;st<this.ranges.length;st++)it[st]=new so(se(this.ranges[st].anchor),se(this.ranges[st].head));return new vl(it,this.primIndex)},vl.prototype.somethingSelected=function(){for(var it=0;it<this.ranges.length;it++)if(!this.ranges[it].empty())return!0;return!1},vl.prototype.contains=function(it,st){st||(st=it);for(var ht=0;ht<this.ranges.length;ht++){var ut=this.ranges[ht];if(ni(st,ut.from())>=0&&ni(it,ut.to())<=0)return ht}return-1};var so=function(it,st){this.anchor=it,this.head=st};so.prototype.from=function(){return Ce(this.anchor,this.head)},so.prototype.to=function(){return ye(this.anchor,this.head)},so.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ma(it,st,ht){var ut=it&&it.options.selectionsMayTouch,dt=st[ht];st.sort(function(Ve,Ge){return ni(Ve.from(),Ge.from())}),ht=je(st,dt);for(var Pt=1;Pt<st.length;Pt++){var bt=st[Pt],jt=st[Pt-1],Ot=ni(jt.to(),bt.from());if(ut&&!bt.empty()?Ot>0:Ot>=0){var Zt=Ce(jt.from(),bt.from()),Pe=ye(jt.to(),bt.to()),te=jt.empty()?bt.from()==bt.head:jt.from()==jt.head;Pt<=ht&&--ht,st.splice(--Pt,2,new so(te?Pe:Zt,te?Zt:Pe))}}return new vl(st,ht)}function NA(it,st){return new vl([new so(it,st||it)],0)}function Au(it){return it.text?on(it.from.line+it.text.length-1,Le(it.text).length+(it.text.length==1?it.from.ch:0)):it.to}function uu(it,st){if(ni(it,st.from)<0)return it;if(ni(it,st.to)<=0)return Au(st);var ht=it.line+st.text.length-(st.to.line-st.from.line)-1,ut=it.ch;return it.line==st.to.line&&(ut+=Au(st).ch-st.to.ch),on(ht,ut)}function yg(it,st){for(var ht=[],ut=0;ut<it.sel.ranges.length;ut++){var dt=it.sel.ranges[ut];ht.push(new so(uu(dt.anchor,st),uu(dt.head,st)))}return Ma(it.cm,ht,it.sel.primIndex)}function ph(it,st,ht){return it.line==st.line?on(ht.line,it.ch-st.ch+ht.ch):on(ht.line+(it.line-st.line),it.ch)}function wg(it,st,ht){for(var ut=[],dt=on(it.first,0),Pt=dt,bt=0;bt<st.length;bt++){var jt=st[bt],Ot=ph(jt.from,dt,Pt),Zt=ph(Au(jt),dt,Pt);if(dt=jt.to,Pt=Zt,ht=="around"){var Pe=it.sel.ranges[bt],te=ni(Pe.head,Pe.anchor)<0;ut[bt]=new so(te?Zt:Ot,te?Ot:Zt)}else ut[bt]=new so(Ot,Ot)}return new vl(ut,it.sel.primIndex)}function Br(it){it.doc.mode=Ee(it.options,it.doc.modeOption),Sg(it)}function Sg(it){it.doc.iter(function(st){st.stateAfter&&(st.stateAfter=null),st.styles&&(st.styles=null)}),it.doc.modeFrontier=it.doc.highlightFrontier=it.doc.first,ou(it,100),it.state.modeGen++,it.curOp&&Eo(it)}function ld(it,st){return st.from.ch==0&&st.to.ch==0&&Le(st.text)==""&&(!it.cm||it.cm.options.wholeLineUpdateBefore)}function yf(it,st,ht,ut){function dt(bi){return ht?ht[bi]:null}function Pt(bi,Bi,Di){Yo(bi,Bi,Di,ut),Pi(bi,"change",bi,st)}function bt(bi,Bi){for(var Di=[],ar=bi;ar<Bi;++ar)Di.push(new fo(Zt[ar],dt(ar),ut));return Di}var jt=st.from,Ot=st.to,Zt=st.text,Pe=Se(it,jt.line),te=Se(it,Ot.line),Ve=Le(Zt),Ge=dt(Zt.length-1),Fn=Ot.line-jt.line;if(st.full)it.insert(0,bt(0,Zt.length)),it.remove(Zt.length,it.size-Zt.length);else if(ld(it,st)){var In=bt(0,Zt.length-1);Pt(te,te.text,Ge),Fn&&it.remove(jt.line,Fn),In.length&&it.insert(jt.line,In)}else if(Pe==te)if(Zt.length==1)Pt(Pe,Pe.text.slice(0,jt.ch)+Ve+Pe.text.slice(Ot.ch),Ge);else{var _n=bt(1,Zt.length-1);_n.push(new fo(Ve+Pe.text.slice(Ot.ch),Ge,ut)),Pt(Pe,Pe.text.slice(0,jt.ch)+Zt[0],dt(0)),it.insert(jt.line+1,_n)}else if(Zt.length==1)Pt(Pe,Pe.text.slice(0,jt.ch)+Zt[0]+te.text.slice(Ot.ch),dt(0)),it.remove(jt.line+1,Fn);else{Pt(Pe,Pe.text.slice(0,jt.ch)+Zt[0],dt(0)),Pt(te,Ve+te.text.slice(Ot.ch),Ge);var oi=bt(1,Zt.length-1);Fn>1&&it.remove(jt.line+1,Fn-1),it.insert(jt.line+1,oi)}Pi(it,"change",it,st)}function Kl(it,st,ht){function ut(dt,Pt,bt){if(dt.linked)for(var jt=0;jt<dt.linked.length;++jt){var Ot=dt.linked[jt];if(Ot.doc!=Pt){var Zt=bt&&Ot.sharedHist;ht&&!Zt||(st(Ot.doc,Zt),ut(Ot.doc,dt,Zt))}}}ut(it,null,!0)}function Cs(it,st){if(st.cm)throw new Error("This document is already in use.");it.doc=st,st.cm=it,Ki(it),Br(it),xg(it),it.options.lineWrapping||Ao(it),it.options.mode=st.modeOption,Eo(it)}function xg(it){(it.doc.direction=="rtl"?sn:Jt)(it.display.lineDiv,"CodeMirror-rtl")}function tp(it){Jr(it,function(){xg(it),Eo(it)})}function mh(it){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=it||1}function wf(it,st){var ht={from:se(st.from),to:Au(st),text:Pn(it,st.from,st.to)};return hu(it,ht,st.from.line,st.to.line+1),Kl(it,function(ut){return hu(ut,ht,st.from.line,st.to.line+1)},!0),ht}function vh(it){for(;it.length;){var st=Le(it);if(st.ranges)it.pop();else break}}function yh(it,st){if(st)return vh(it.done),Le(it.done);if(it.done.length&&!Le(it.done).ranges)return Le(it.done);if(it.done.length>1&&!it.done[it.done.length-2].ranges)return it.done.pop(),Le(it.done)}function Bg(it,st,ht,ut){var dt=it.history;dt.undone.length=0;var Pt=+new Date,bt,jt;if((dt.lastOp==ut||dt.lastOrigin==st.origin&&st.origin&&(st.origin.charAt(0)=="+"&&dt.lastModTime>Pt-(it.cm?it.cm.options.historyEventDelay:500)||st.origin.charAt(0)=="*"))&&(bt=yh(dt,dt.lastOp==ut)))jt=Le(bt.changes),ni(st.from,st.to)==0&&ni(st.from,jt.to)==0?jt.to=Au(st):bt.changes.push(wf(it,st));else{var Ot=Le(dt.done);for((!Ot||!Ot.ranges)&&wh(it.sel,dt.done),bt={changes:[wf(it,st)],generation:dt.generation},dt.done.push(bt);dt.done.length>dt.undoDepth;)dt.done.shift(),dt.done[0].ranges||dt.done.shift()}dt.done.push(ht),dt.generation=++dt.maxGeneration,dt.lastModTime=dt.lastSelTime=Pt,dt.lastOp=dt.lastSelOp=ut,dt.lastOrigin=dt.lastSelOrigin=st.origin,jt||yr(it,"historyAdded")}function Ad(it,st,ht,ut){var dt=st.charAt(0);return dt=="*"||dt=="+"&&ht.ranges.length==ut.ranges.length&&ht.somethingSelected()==ut.somethingSelected()&&new Date-it.history.lastSelTime<=(it.cm?it.cm.options.historyEventDelay:500)}function Cg(it,st,ht,ut){var dt=it.history,Pt=ut&&ut.origin;ht==dt.lastSelOp||Pt&&dt.lastSelOrigin==Pt&&(dt.lastModTime==dt.lastSelTime&&dt.lastOrigin==Pt||Ad(it,Pt,Le(dt.done),st))?dt.done[dt.done.length-1]=st:wh(st,dt.done),dt.lastSelTime=+new Date,dt.lastSelOrigin=Pt,dt.lastSelOp=ht,ut&&ut.clearRedo!==!1&&vh(dt.undone)}function wh(it,st){var ht=Le(st);ht&&ht.ranges&&ht.equals(it)||st.push(it)}function hu(it,st,ht,ut){var dt=st["spans_"+it.id],Pt=0;it.iter(Math.max(it.first,ht),Math.min(it.first+it.size,ut),function(bt){bt.markedSpans&&((dt||(dt=st["spans_"+it.id]={}))[Pt]=bt.markedSpans),++Pt})}function pa(it){if(!it)return null;for(var st,ht=0;ht<it.length;++ht)it[ht].marker.explicitlyCleared?st||(st=it.slice(0,ht)):st&&st.push(it[ht]);return st?st.length?st:null:it}function zl(it,st){var ht=st["spans_"+it.id];if(!ht)return null;for(var ut=[],dt=0;dt<st.text.length;++dt)ut.push(pa(ht[dt]));return ut}function Gi(it,st){var ht=zl(it,st),ut=cr(it,st);if(!ht)return ut;if(!ut)return ht;for(var dt=0;dt<ht.length;++dt){var Pt=ht[dt],bt=ut[dt];if(Pt&&bt)t:for(var jt=0;jt<bt.length;++jt){for(var Ot=bt[jt],Zt=0;Zt<Pt.length;++Zt)if(Pt[Zt].marker==Ot.marker)continue t;Pt.push(Ot)}else bt&&(ht[dt]=bt)}return ht}function QA(it,st,ht){for(var ut=[],dt=0;dt<it.length;++dt){var Pt=it[dt];if(Pt.ranges){ut.push(ht?vl.prototype.deepCopy.call(Pt):Pt);continue}var bt=Pt.changes,jt=[];ut.push({changes:jt});for(var Ot=0;Ot<bt.length;++Ot){var Zt=bt[Ot],Pe=void 0;if(jt.push({from:Zt.from,to:Zt.to,text:Zt.text}),st)for(var te in Zt)(Pe=te.match(/^spans_(\d+)$/))&&je(st,Number(Pe[1]))>-1&&(Le(jt)[te]=Zt[te],delete Zt[te])}}return ut}function Sf(it,st,ht,ut){if(ut){var dt=it.anchor;if(ht){var Pt=ni(st,dt)<0;Pt!=ni(ht,dt)<0?(dt=st,st=ht):Pt!=ni(st,ht)<0&&(st=ht)}return new so(dt,st)}else return new so(ht||st,st)}function Sh(it,st,ht,ut,dt){dt==null&&(dt=it.cm&&(it.cm.display.shift||it.extend)),ea(it,new vl([Sf(it.sel.primary(),st,ht,dt)],0),ut)}function Vl(it,st,ht){for(var ut=[],dt=it.cm&&(it.cm.display.shift||it.extend),Pt=0;Pt<it.sel.ranges.length;Pt++)ut[Pt]=Sf(it.sel.ranges[Pt],st[Pt],null,dt);var bt=Ma(it.cm,ut,it.sel.primIndex);ea(it,bt,ht)}function gu(it,st,ht,ut){var dt=it.sel.ranges.slice(0);dt[st]=ht,ea(it,Ma(it.cm,dt,it.sel.primIndex),ut)}function fu(it,st,ht,ut){ea(it,NA(st,ht),ut)}function xh(it,st,ht){var ut={ranges:st.ranges,update:function(dt){this.ranges=[];for(var Pt=0;Pt<dt.length;Pt++)this.ranges[Pt]=new so(Ze(it,dt[Pt].anchor),Ze(it,dt[Pt].head))},origin:ht&&ht.origin};return yr(it,"beforeSelectionChange",it,ut),it.cm&&yr(it.cm,"beforeSelectionChange",it.cm,ut),ut.ranges!=st.ranges?Ma(it.cm,ut.ranges,ut.ranges.length-1):st}function Vu(it,st,ht){var ut=it.history.done,dt=Le(ut);dt&&dt.ranges?(ut[ut.length-1]=st,Wu(it,st,ht)):ea(it,st,ht)}function ea(it,st,ht){Wu(it,st,ht),Cg(it,it.sel,it.cm?it.cm.curOp.id:NaN,ht)}function Wu(it,st,ht){(Wr(it,"beforeSelectionChange")||it.cm&&Wr(it.cm,"beforeSelectionChange"))&&(st=xh(it,st,ht));var ut=ht&&ht.bias||(ni(st.primary().head,it.sel.primary().head)<0?-1:1);ud(it,_u(it,st,ut,!0)),!(ht&&ht.scroll===!1)&&it.cm&&bA(it.cm)}function ud(it,st){st.equals(it.sel)||(it.sel=st,it.cm&&(it.cm.curOp.updateInput=1,it.cm.curOp.selectionChanged=!0,Es(it.cm)),Pi(it,"cursorActivity",it))}function Wl(it){ud(it,_u(it,it.sel,null,!1))}function _u(it,st,ht,ut){for(var dt,Pt=0;Pt<st.ranges.length;Pt++){var bt=st.ranges[Pt],jt=st.ranges.length==it.sel.ranges.length&&it.sel.ranges[Pt],Ot=Pg(it,bt.anchor,jt&&jt.anchor,ht,ut),Zt=Pg(it,bt.head,jt&&jt.head,ht,ut);(dt||Ot!=bt.anchor||Zt!=bt.head)&&(dt||(dt=st.ranges.slice(0,Pt)),dt[Pt]=new so(Ot,Zt))}return dt?Ma(it.cm,dt,st.primIndex):st}function _l(it,st,ht,ut,dt){var Pt=Se(it,st.line);if(Pt.markedSpans)for(var bt=0;bt<Pt.markedSpans.length;++bt){var jt=Pt.markedSpans[bt],Ot=jt.marker,Zt="selectLeft"in Ot?!Ot.selectLeft:Ot.inclusiveLeft,Pe="selectRight"in Ot?!Ot.selectRight:Ot.inclusiveRight;if((jt.from==null||(Zt?jt.from<=st.ch:jt.from<st.ch))&&(jt.to==null||(Pe?jt.to>=st.ch:jt.to>st.ch))){if(dt&&(yr(Ot,"beforeCursorEnter"),Ot.explicitlyCleared))if(Pt.markedSpans){--bt;continue}else break;if(!Ot.atomic)continue;if(ht){var te=Ot.find(ut<0?1:-1),Ve=void 0;if((ut<0?Pe:Zt)&&(te=xf(it,te,-ut,te&&te.line==st.line?Pt:null)),te&&te.line==st.line&&(Ve=ni(te,ht))&&(ut<0?Ve<0:Ve>0))return _l(it,te,st,ut,dt)}var Ge=Ot.find(ut<0?-1:1);return(ut<0?Zt:Pe)&&(Ge=xf(it,Ge,ut,Ge.line==st.line?Pt:null)),Ge?_l(it,Ge,st,ut,dt):null}}return st}function Pg(it,st,ht,ut,dt){var Pt=ut||1,bt=_l(it,st,ht,Pt,dt)||!dt&&_l(it,st,ht,Pt,!0)||_l(it,st,ht,-Pt,dt)||!dt&&_l(it,st,ht,-Pt,!0);return bt||(it.cantEdit=!0,on(it.first,0))}function xf(it,st,ht,ut){return ht<0&&st.ch==0?st.line>it.first?Ze(it,on(st.line-1)):null:ht>0&&st.ch==(ut||Se(it,st.line)).text.length?st.line<it.first+it.size-1?on(st.line+1,0):null:new on(st.line,st.ch+ht)}function gs(it){it.setSelection(on(it.firstLine(),0),on(it.lastLine()),He)}function Yu(it,st,ht){var ut={canceled:!1,from:st.from,to:st.to,text:st.text,origin:st.origin,cancel:function(){return ut.canceled=!0}};return ht&&(ut.update=function(dt,Pt,bt,jt){dt&&(ut.from=Ze(it,dt)),Pt&&(ut.to=Ze(it,Pt)),bt&&(ut.text=bt),jt!==void 0&&(ut.origin=jt)}),yr(it,"beforeChange",it,ut),it.cm&&yr(it.cm,"beforeChange",it.cm,ut),ut.canceled?(it.cm&&(it.cm.curOp.updateInput=2),null):{from:ut.from,to:ut.to,text:ut.text,origin:ut.origin}}function du(it,st,ht){if(it.cm){if(!it.cm.curOp)return Bs(it.cm,du)(it,st,ht);if(it.cm.state.suppressEdits)return}if(!((Wr(it,"beforeChange")||it.cm&&Wr(it.cm,"beforeChange"))&&(st=Yu(it,st,!0),!st))){var ut=Vi&&!ht&&Fr(it,st.from,st.to);if(ut)for(var dt=ut.length-1;dt>=0;--dt)Xu(it,{from:ut[dt].from,to:ut[dt].to,text:dt?[""]:st.text,origin:st.origin});else Xu(it,st)}}function Xu(it,st){if(!(st.text.length==1&&st.text[0]==""&&ni(st.from,st.to)==0)){var ht=yg(it,st);Bg(it,st,ht,it.cm?it.cm.curOp.id:NaN),Bh(it,st,ht,cr(it,st));var ut=[];Kl(it,function(dt,Pt){!Pt&&je(ut,dt.history)==-1&&(fd(dt.history,st),ut.push(dt.history)),Bh(dt,st,null,cr(dt,st))})}}function Fg(it,st,ht){var ut=it.cm&&it.cm.state.suppressEdits;if(!(ut&&!ht)){for(var dt=it.history,Pt,bt=it.sel,jt=st=="undo"?dt.done:dt.undone,Ot=st=="undo"?dt.undone:dt.done,Zt=0;Zt<jt.length&&(Pt=jt[Zt],!(ht?Pt.ranges&&!Pt.equals(it.sel):!Pt.ranges));Zt++);if(Zt!=jt.length){for(dt.lastOrigin=dt.lastSelOrigin=null;;)if(Pt=jt.pop(),Pt.ranges){if(wh(Pt,Ot),ht&&!Pt.equals(it.sel)){ea(it,Pt,{clearRedo:!1});return}bt=Pt}else if(ut){jt.push(Pt);return}else break;var Pe=[];wh(bt,Ot),Ot.push({changes:Pe,generation:dt.generation}),dt.generation=Pt.generation||++dt.maxGeneration;for(var te=Wr(it,"beforeChange")||it.cm&&Wr(it.cm,"beforeChange"),Ve=function(In){var _n=Pt.changes[In];if(_n.origin=st,te&&!Yu(it,_n,!1))return jt.length=0,{};Pe.push(wf(it,_n));var oi=In?yg(it,_n):Le(jt);Bh(it,_n,oi,Gi(it,_n)),!In&&it.cm&&it.cm.scrollIntoView({from:_n.from,to:Au(_n)});var bi=[];Kl(it,function(Bi,Di){!Di&&je(bi,Bi.history)==-1&&(fd(Bi.history,_n),bi.push(Bi.history)),Bh(Bi,_n,null,Gi(Bi,_n))})},Ge=Pt.changes.length-1;Ge>=0;--Ge){var Fn=Ve(Ge);if(Fn)return Fn.v}}}}function hd(it,st){if(st!=0&&(it.first+=st,it.sel=new vl(Sn(it.sel.ranges,function(dt){return new so(on(dt.anchor.line+st,dt.anchor.ch),on(dt.head.line+st,dt.head.ch))}),it.sel.primIndex),it.cm)){Eo(it.cm,it.first,it.first-st,st);for(var ht=it.cm.display,ut=ht.viewFrom;ut<ht.viewTo;ut++)mr(it.cm,ut,"gutter")}}function Bh(it,st,ht,ut){if(it.cm&&!it.cm.curOp)return Bs(it.cm,Bh)(it,st,ht,ut);if(st.to.line<it.first){hd(it,st.text.length-1-(st.to.line-st.from.line));return}if(!(st.from.line>it.lastLine())){if(st.from.line<it.first){var dt=st.text.length-1-(it.first-st.from.line);hd(it,dt),st={from:on(it.first,0),to:on(st.to.line+dt,st.to.ch),text:[Le(st.text)],origin:st.origin}}var Pt=it.lastLine();st.to.line>Pt&&(st={from:st.from,to:on(Pt,Se(it,Pt).text.length),text:[st.text[0]],origin:st.origin}),st.removed=Pn(it,st.from,st.to),ht||(ht=yg(it,st)),it.cm?lc(it.cm,st,ut):yf(it,st,ut),Wu(it,ht,He),it.cantEdit&&Pg(it,on(it.firstLine(),0))&&(it.cantEdit=!1)}}function lc(it,st,ht){var ut=it.doc,dt=it.display,Pt=st.from,bt=st.to,jt=!1,Ot=Pt.line;it.options.lineWrapping||(Ot=pe(_r(Se(ut,Pt.line))),ut.iter(Ot,bt.line+1,function(Ge){if(Ge==dt.maxLine)return jt=!0,!0})),ut.sel.contains(st.from,st.to)>-1&&Es(it),yf(ut,st,ht,No(it)),it.options.lineWrapping||(ut.iter(Ot,Pt.line+st.text.length,function(Ge){var Fn=_o(Ge);Fn>dt.maxLineLength&&(dt.maxLine=Ge,dt.maxLineLength=Fn,dt.maxLineChanged=!0,jt=!1)}),jt&&(it.curOp.updateMaxLine=!0)),Ni(ut,Pt.line),ou(it,400);var Zt=st.text.length-(bt.line-Pt.line)-1;st.full?Eo(it):Pt.line==bt.line&&st.text.length==1&&!ld(it.doc,st)?mr(it,Pt.line,"text"):Eo(it,Pt.line,bt.line+1,Zt);var Pe=Wr(it,"changes"),te=Wr(it,"change");if(te||Pe){var Ve={from:Pt,to:bt,text:st.text,removed:st.removed,origin:st.origin};te&&Pi(it,"change",it,Ve),Pe&&(it.curOp.changeObjs||(it.curOp.changeObjs=[])).push(Ve)}it.display.selForContextMenu=null}function Zu(it,st,ht,ut,dt){var Pt;ut||(ut=ht),ni(ut,ht)<0&&(Pt=[ut,ht],ht=Pt[0],ut=Pt[1]),typeof st=="string"&&(st=it.splitLines(st)),du(it,{from:ht,to:ut,text:st,origin:dt})}function yl(it,st,ht,ut){ht<it.line?it.line+=ut:st<it.line&&(it.line=st,it.ch=0)}function gd(it,st,ht,ut){for(var dt=0;dt<it.length;++dt){var Pt=it[dt],bt=!0;if(Pt.ranges){Pt.copied||(Pt=it[dt]=Pt.deepCopy(),Pt.copied=!0);for(var jt=0;jt<Pt.ranges.length;jt++)yl(Pt.ranges[jt].anchor,st,ht,ut),yl(Pt.ranges[jt].head,st,ht,ut);continue}for(var Ot=0;Ot<Pt.changes.length;++Ot){var Zt=Pt.changes[Ot];if(ht<Zt.from.line)Zt.from=on(Zt.from.line+ut,Zt.from.ch),Zt.to=on(Zt.to.line+ut,Zt.to.ch);else if(st<=Zt.to.line){bt=!1;break}}bt||(it.splice(0,dt+1),dt=0)}}function fd(it,st){var ht=st.from.line,ut=st.to.line,dt=st.text.length-(ut-ht)-1;gd(it.done,ht,ut,dt),gd(it.undone,ht,ut,dt)}function Ju(it,st,ht,ut){var dt=st,Pt=st;return typeof st=="number"?Pt=Se(it,Oe(it,st)):dt=pe(st),dt==null?null:(ut(Pt,dt)&&it.cm&&mr(it.cm,dt,ht),Pt)}function Ch(it){this.lines=it,this.parent=null;for(var st=0,ht=0;ht<it.length;++ht)it[ht].parent=this,st+=it[ht].height;this.height=st}Ch.prototype={chunkSize:function(){return this.lines.length},removeInner:function(it,st){for(var ht=it,ut=it+st;ht<ut;++ht){var dt=this.lines[ht];this.height-=dt.height,ga(dt),Pi(dt,"delete")}this.lines.splice(it,st)},collapse:function(it){it.push.apply(it,this.lines)},insertInner:function(it,st,ht){this.height+=ht,this.lines=this.lines.slice(0,it).concat(st).concat(this.lines.slice(it));for(var ut=0;ut<st.length;++ut)st[ut].parent=this},iterN:function(it,st,ht){for(var ut=it+st;it<ut;++it)if(ht(this.lines[it]))return!0}};function Vo(it){this.children=it;for(var st=0,ht=0,ut=0;ut<it.length;++ut){var dt=it[ut];st+=dt.chunkSize(),ht+=dt.height,dt.parent=this}this.size=st,this.height=ht,this.parent=null}Vo.prototype={chunkSize:function(){return this.size},removeInner:function(it,st){this.size-=st;for(var ht=0;ht<this.children.length;++ht){var ut=this.children[ht],dt=ut.chunkSize();if(it<dt){var Pt=Math.min(st,dt-it),bt=ut.height;if(ut.removeInner(it,Pt),this.height-=bt-ut.height,dt==Pt&&(this.children.splice(ht--,1),ut.parent=null),(st-=Pt)==0)break;it=0}else it-=dt}if(this.size-st<25&&(this.children.length>1||!(this.children[0]instanceof Ch))){var jt=[];this.collapse(jt),this.children=[new Ch(jt)],this.children[0].parent=this}},collapse:function(it){for(var st=0;st<this.children.length;++st)this.children[st].collapse(it)},insertInner:function(it,st,ht){this.size+=st.length,this.height+=ht;for(var ut=0;ut<this.children.length;++ut){var dt=this.children[ut],Pt=dt.chunkSize();if(it<=Pt){if(dt.insertInner(it,st,ht),dt.lines&&dt.lines.length>50){for(var bt=dt.lines.length%25+25,jt=bt;jt<dt.lines.length;){var Ot=new Ch(dt.lines.slice(jt,jt+=25));dt.height-=Ot.height,this.children.splice(++ut,0,Ot),Ot.parent=this}dt.lines=dt.lines.slice(0,bt),this.maybeSpill()}break}it-=Pt}},maybeSpill:function(){if(!(this.children.length<=10)){var it=this;do{var st=it.children.splice(it.children.length-5,5),ht=new Vo(st);if(it.parent){it.size-=ht.size,it.height-=ht.height;var dt=je(it.parent.children,it);it.parent.children.splice(dt+1,0,ht)}else{var ut=new Vo(it.children);ut.parent=it,it.children=[ut,ht],it=ut}ht.parent=it.parent}while(it.children.length>10);it.parent.maybeSpill()}},iterN:function(it,st,ht){for(var ut=0;ut<this.children.length;++ut){var dt=this.children[ut],Pt=dt.chunkSize();if(it<Pt){var bt=Math.min(st,Pt-it);if(dt.iterN(it,bt,ht))return!0;if((st-=bt)==0)break;it=0}else it-=Pt}}};var UA=function(it,st,ht){if(ht)for(var ut in ht)ht.hasOwnProperty(ut)&&(this[ut]=ht[ut]);this.doc=it,this.node=st};UA.prototype.clear=function(){var it=this.doc.cm,st=this.line.widgets,ht=this.line,ut=pe(ht);if(!(ut==null||!st)){for(var dt=0;dt<st.length;++dt)st[dt]==this&&st.splice(dt--,1);st.length||(ht.widgets=null);var Pt=lA(this);nn(ht,Math.max(0,ht.height-Pt)),it&&(Jr(it,function(){Lg(it,ht,-Pt),mr(it,ut,"widget")}),Pi(it,"lineWidgetCleared",it,this,ut))}},UA.prototype.changed=function(){var it=this,st=this.height,ht=this.doc.cm,ut=this.line;this.height=null;var dt=lA(this)-st;dt&&(an(this.doc,ut)||nn(ut,ut.height+dt),ht&&Jr(ht,function(){ht.curOp.forceUpdate=!0,Lg(ht,ut,dt),Pi(ht,"lineWidgetChanged",ht,it,pe(ut))}))},Wo(UA);function Lg(it,st,ht){Xr(st)<(it.curOp&&it.curOp.scrollTop||it.doc.scrollTop)&&df(it,ht)}function Bf(it,st,ht,ut){var dt=new UA(it,ht,ut),Pt=it.cm;return Pt&&dt.noHScroll&&(Pt.display.alignWidgets=!0),Ju(it,st,"widget",function(bt){var jt=bt.widgets||(bt.widgets=[]);if(dt.insertAt==null?jt.push(dt):jt.splice(Math.min(jt.length-1,Math.max(0,dt.insertAt)),0,dt),dt.line=bt,Pt&&!an(it,bt)){var Ot=Xr(bt)<it.scrollTop;nn(bt,bt.height+lA(dt)),Ot&&df(Pt,dt.height),Pt.curOp.forceUpdate=!0}return!0}),Pt&&Pi(Pt,"lineWidgetAdded",Pt,dt,typeof st=="number"?st:pe(st)),dt}var Cf=0,ge=function(it,st){this.lines=[],this.type=st,this.doc=it,this.id=++Cf};ge.prototype.clear=function(){if(!this.explicitlyCleared){var it=this.doc.cm,st=it&&!it.curOp;if(st&&nu(it),Wr(this,"clear")){var ht=this.find();ht&&Pi(this,"clear",ht.from,ht.to)}for(var ut=null,dt=null,Pt=0;Pt<this.lines.length;++Pt){var bt=this.lines[Pt],jt=Ro(bt.markedSpans,this);it&&!this.collapsed?mr(it,pe(bt),"text"):it&&(jt.to!=null&&(dt=pe(bt)),jt.from!=null&&(ut=pe(bt))),bt.markedSpans=gr(bt.markedSpans,jt),jt.from==null&&this.collapsed&&!an(this.doc,bt)&&it&&nn(bt,AA(it.display))}if(it&&this.collapsed&&!it.options.lineWrapping)for(var Ot=0;Ot<this.lines.length;++Ot){var Zt=_r(this.lines[Ot]),Pe=_o(Zt);Pe>it.display.maxLineLength&&(it.display.maxLine=Zt,it.display.maxLineLength=Pe,it.display.maxLineChanged=!0)}ut!=null&&it&&this.collapsed&&Eo(it,ut,dt+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,it&&Wl(it.doc)),it&&Pi(it,"markerCleared",it,this,ut,dt),st&&iu(it),this.parent&&this.parent.clear()}},ge.prototype.find=function(it,st){it==null&&this.type=="bookmark"&&(it=1);for(var ht,ut,dt=0;dt<this.lines.length;++dt){var Pt=this.lines[dt],bt=Ro(Pt.markedSpans,this);if(bt.from!=null&&(ht=on(st?Pt:pe(Pt),bt.from),it==-1))return ht;if(bt.to!=null&&(ut=on(st?Pt:pe(Pt),bt.to),it==1))return ut}return ht&&{from:ht,to:ut}},ge.prototype.changed=function(){var it=this,st=this.find(-1,!0),ht=this,ut=this.doc.cm;!st||!ut||Jr(ut,function(){var dt=st.line,Pt=pe(st.line),bt=MA(ut,Pt);if(bt&&(hf(bt),ut.curOp.selectionChanged=ut.curOp.forceUpdate=!0),ut.curOp.updateMaxLine=!0,!an(ht.doc,dt)&&ht.height!=null){var jt=ht.height;ht.height=null;var Ot=lA(ht)-jt;Ot&&nn(dt,dt.height+Ot)}Pi(ut,"markerChanged",ut,it)})},ge.prototype.attachLine=function(it){if(!this.lines.length&&this.doc.cm){var st=this.doc.cm.curOp;(!st.maybeHiddenMarkers||je(st.maybeHiddenMarkers,this)==-1)&&(st.maybeUnhiddenMarkers||(st.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(it)},ge.prototype.detachLine=function(it){if(this.lines.splice(je(this.lines,it),1),!this.lines.length&&this.doc.cm){var st=this.doc.cm.curOp;(st.maybeHiddenMarkers||(st.maybeHiddenMarkers=[])).push(this)}},Wo(ge);function cu(it,st,ht,ut,dt){if(ut&&ut.shared)return Ac(it,st,ht,ut,dt);if(it.cm&&!it.cm.curOp)return Bs(it.cm,cu)(it,st,ht,ut,dt);var Pt=new ge(it,dt),bt=ni(st,ht);if(ut&&fr(ut,Pt,!1),bt>0||bt==0&&Pt.clearWhenEmpty!==!1)return Pt;if(Pt.replacedWith&&(Pt.collapsed=!0,Pt.widgetNode=We("span",[Pt.replacedWith],"CodeMirror-widget"),ut.handleMouseEvents||Pt.widgetNode.setAttribute("cm-ignore-events","true"),ut.insertLeft&&(Pt.widgetNode.insertLeft=!0)),Pt.collapsed){if(Ra(it,st.line,st,ht,Pt)||st.line!=ht.line&&Ra(it,ht.line,st,ht,Pt))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ye()}Pt.addToHistory&&Bg(it,{from:st,to:ht,origin:"markText"},it.sel,NaN);var jt=st.line,Ot=it.cm,Zt;if(it.iter(jt,ht.line+1,function(te){Ot&&Pt.collapsed&&!Ot.options.lineWrapping&&_r(te)==Ot.display.maxLine&&(Zt=!0),Pt.collapsed&&jt!=st.line&&nn(te,0),lo(te,new rr(Pt,jt==st.line?st.ch:null,jt==ht.line?ht.ch:null)),++jt}),Pt.collapsed&&it.iter(st.line,ht.line+1,function(te){an(it,te)&&nn(te,0)}),Pt.clearOnEnter&&fi(Pt,"beforeCursorEnter",function(){return Pt.clear()}),Pt.readOnly&&(ki(),(it.history.done.length||it.history.undone.length)&&it.clearHistory()),Pt.collapsed&&(Pt.id=++Cf,Pt.atomic=!0),Ot){if(Zt&&(Ot.curOp.updateMaxLine=!0),Pt.collapsed)Eo(Ot,st.line,ht.line+1);else if(Pt.className||Pt.startStyle||Pt.endStyle||Pt.css||Pt.attributes||Pt.title)for(var Pe=st.line;Pe<=ht.line;Pe++)mr(Ot,Pe,"text");Pt.atomic&&Wl(Ot.doc),Pi(Ot,"markerAdded",Ot,Pt)}return Pt}var Yl=function(it,st){this.markers=it,this.primary=st;for(var ht=0;ht<it.length;++ht)it[ht].parent=this};Yl.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var it=0;it<this.markers.length;++it)this.markers[it].clear();Pi(this,"clear")}},Yl.prototype.find=function(it,st){return this.primary.find(it,st)},Wo(Yl);function Ac(it,st,ht,ut,dt){ut=fr(ut),ut.shared=!1;var Pt=[cu(it,st,ht,ut,dt)],bt=Pt[0],jt=ut.widgetNode;return Kl(it,function(Ot){jt&&(ut.widgetNode=jt.cloneNode(!0)),Pt.push(cu(Ot,Ze(Ot,st),Ze(Ot,ht),ut,dt));for(var Zt=0;Zt<Ot.linked.length;++Zt)if(Ot.linked[Zt].isParent)return;bt=Le(Pt)}),new Yl(Pt,bt)}function Pf(it){return it.findMarks(on(it.first,0),it.clipPos(on(it.lastLine())),function(st){return st.parent})}function Ff(it,st){for(var ht=0;ht<st.length;ht++){var ut=st[ht],dt=ut.find(),Pt=it.clipPos(dt.from),bt=it.clipPos(dt.to);if(ni(Pt,bt)){var jt=cu(it,Pt,bt,ut.primary,ut.primary.type);ut.markers.push(jt),jt.parent=ut}}}function Eg(it){for(var st=function(ut){var dt=it[ut],Pt=[dt.primary.doc];Kl(dt.primary.doc,function(Ot){return Pt.push(Ot)});for(var bt=0;bt<dt.markers.length;bt++){var jt=dt.markers[bt];je(Pt,jt.doc)==-1&&(jt.parent=null,dt.markers.splice(bt--,1))}},ht=0;ht<it.length;ht++)st(ht)}var uc=0,Os=function(it,st,ht,ut,dt){if(!(this instanceof Os))return new Os(it,st,ht,ut,dt);ht==null&&(ht=0),Vo.call(this,[new Ch([new fo("",null)])]),this.first=ht,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ht;var Pt=on(ht,0);this.sel=NA(Pt),this.history=new mh(null),this.id=++uc,this.modeOption=st,this.lineSep=ut,this.direction=dt=="rtl"?"rtl":"ltr",this.extend=!1,typeof it=="string"&&(it=this.splitLines(it)),yf(this,{from:Pt,to:Pt,text:it}),ea(this,NA(Pt),He)};Os.prototype=Et(Vo.prototype,{constructor:Os,iter:function(it,st,ht){ht?this.iterN(it-this.first,st-it,ht):this.iterN(this.first,this.first+this.size,it)},insert:function(it,st){for(var ht=0,ut=0;ut<st.length;++ut)ht+=st[ut].height;this.insertInner(it-this.first,st,ht)},remove:function(it,st){this.removeInner(it-this.first,st)},getValue:function(it){var st=ti(this,this.first,this.first+this.size);return it===!1?st:st.join(it||this.lineSeparator())},setValue:Is(function(it){var st=on(this.first,0),ht=this.first+this.size-1;du(this,{from:st,to:on(ht,Se(this,ht).text.length),text:this.splitLines(it),origin:"setValue",full:!0},!0),this.cm&&uA(this.cm,0,0),ea(this,NA(st),He)}),replaceRange:function(it,st,ht,ut){st=Ze(this,st),ht=ht?Ze(this,ht):st,Zu(this,it,st,ht,ut)},getRange:function(it,st,ht){var ut=Pn(this,Ze(this,it),Ze(this,st));return ht===!1?ut:ut.join(ht||this.lineSeparator())},getLine:function(it){var st=this.getLineHandle(it);return st&&st.text},getLineHandle:function(it){if(pi(this,it))return Se(this,it)},getLineNumber:function(it){return pe(it)},getLineHandleVisualStart:function(it){return typeof it=="number"&&(it=Se(this,it)),_r(it)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(it){return Ze(this,it)},getCursor:function(it){var st=this.sel.primary(),ht;return it==null||it=="head"?ht=st.head:it=="anchor"?ht=st.anchor:it=="end"||it=="to"||it===!1?ht=st.to():ht=st.from(),ht},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Is(function(it,st,ht){fu(this,Ze(this,typeof it=="number"?on(it,st||0):it),null,ht)}),setSelection:Is(function(it,st,ht){fu(this,Ze(this,it),Ze(this,st||it),ht)}),extendSelection:Is(function(it,st,ht){Sh(this,Ze(this,it),st&&Ze(this,st),ht)}),extendSelections:Is(function(it,st){Vl(this,Wn(this,it),st)}),extendSelectionsBy:Is(function(it,st){var ht=Sn(this.sel.ranges,it);Vl(this,Wn(this,ht),st)}),setSelections:Is(function(it,st,ht){if(it.length){for(var ut=[],dt=0;dt<it.length;dt++)ut[dt]=new so(Ze(this,it[dt].anchor),Ze(this,it[dt].head));st==null&&(st=Math.min(it.length-1,this.sel.primIndex)),ea(this,Ma(this.cm,ut,st),ht)}}),addSelection:Is(function(it,st,ht){var ut=this.sel.ranges.slice(0);ut.push(new so(Ze(this,it),Ze(this,st||it))),ea(this,Ma(this.cm,ut,ut.length-1),ht)}),getSelection:function(it){for(var st=this.sel.ranges,ht,ut=0;ut<st.length;ut++){var dt=Pn(this,st[ut].from(),st[ut].to());ht=ht?ht.concat(dt):dt}return it===!1?ht:ht.join(it||this.lineSeparator())},getSelections:function(it){for(var st=[],ht=this.sel.ranges,ut=0;ut<ht.length;ut++){var dt=Pn(this,ht[ut].from(),ht[ut].to());it!==!1&&(dt=dt.join(it||this.lineSeparator())),st[ut]=dt}return st},replaceSelection:function(it,st,ht){for(var ut=[],dt=0;dt<this.sel.ranges.length;dt++)ut[dt]=it;this.replaceSelections(ut,st,ht||"+input")},replaceSelections:Is(function(it,st,ht){for(var ut=[],dt=this.sel,Pt=0;Pt<dt.ranges.length;Pt++){var bt=dt.ranges[Pt];ut[Pt]={from:bt.from(),to:bt.to(),text:this.splitLines(it[Pt]),origin:ht}}for(var jt=st&&st!="end"&&wg(this,ut,st),Ot=ut.length-1;Ot>=0;Ot--)du(this,ut[Ot]);jt?Vu(this,jt):this.cm&&bA(this.cm)}),undo:Is(function(){Fg(this,"undo")}),redo:Is(function(){Fg(this,"redo")}),undoSelection:Is(function(){Fg(this,"undo",!0)}),redoSelection:Is(function(){Fg(this,"redo",!0)}),setExtending:function(it){this.extend=it},getExtending:function(){return this.extend},historySize:function(){for(var it=this.history,st=0,ht=0,ut=0;ut<it.done.length;ut++)it.done[ut].ranges||++st;for(var dt=0;dt<it.undone.length;dt++)it.undone[dt].ranges||++ht;return{undo:st,redo:ht}},clearHistory:function(){var it=this;this.history=new mh(this.history.maxGeneration),Kl(this,function(st){return st.history=it.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(it){return it&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(it){return this.history.generation==(it||this.cleanGeneration)},getHistory:function(){return{done:QA(this.history.done),undone:QA(this.history.undone)}},setHistory:function(it){var st=this.history=new mh(this.history.maxGeneration);st.done=QA(it.done.slice(0),null,!0),st.undone=QA(it.undone.slice(0),null,!0)},setGutterMarker:Is(function(it,st,ht){return Ju(this,it,"gutter",function(ut){var dt=ut.gutterMarkers||(ut.gutterMarkers={});return dt[st]=ht,!ht&&kt(dt)&&(ut.gutterMarkers=null),!0})}),clearGutter:Is(function(it){var st=this;this.iter(function(ht){ht.gutterMarkers&&ht.gutterMarkers[it]&&Ju(st,ht,"gutter",function(){return ht.gutterMarkers[it]=null,kt(ht.gutterMarkers)&&(ht.gutterMarkers=null),!0})})}),lineInfo:function(it){var st;if(typeof it=="number"){if(!pi(this,it)||(st=it,it=Se(this,it),!it))return null}else if(st=pe(it),st==null)return null;return{line:st,handle:it,text:it.text,gutterMarkers:it.gutterMarkers,textClass:it.textClass,bgClass:it.bgClass,wrapClass:it.wrapClass,widgets:it.widgets}},addLineClass:Is(function(it,st,ht){return Ju(this,it,st=="gutter"?"gutter":"class",function(ut){var dt=st=="text"?"textClass":st=="background"?"bgClass":st=="gutter"?"gutterClass":"wrapClass";if(!ut[dt])ut[dt]=ht;else{if(Vt(ht).test(ut[dt]))return!1;ut[dt]+=" "+ht}return!0})}),removeLineClass:Is(function(it,st,ht){return Ju(this,it,st=="gutter"?"gutter":"class",function(ut){var dt=st=="text"?"textClass":st=="background"?"bgClass":st=="gutter"?"gutterClass":"wrapClass",Pt=ut[dt];if(Pt)if(ht==null)ut[dt]=null;else{var bt=Pt.match(Vt(ht));if(!bt)return!1;var jt=bt.index+bt[0].length;ut[dt]=Pt.slice(0,bt.index)+(!bt.index||jt==Pt.length?"":" ")+Pt.slice(jt)||null}else return!1;return!0})}),addLineWidget:Is(function(it,st,ht){return Bf(this,it,st,ht)}),removeLineWidget:function(it){it.clear()},markText:function(it,st,ht){return cu(this,Ze(this,it),Ze(this,st),ht,ht&&ht.type||"range")},setBookmark:function(it,st){var ht={replacedWith:st&&(st.nodeType==null?st.widget:st),insertLeft:st&&st.insertLeft,clearWhenEmpty:!1,shared:st&&st.shared,handleMouseEvents:st&&st.handleMouseEvents};return it=Ze(this,it),cu(this,it,it,ht,"bookmark")},findMarksAt:function(it){it=Ze(this,it);var st=[],ht=Se(this,it.line).markedSpans;if(ht)for(var ut=0;ut<ht.length;++ut){var dt=ht[ut];(dt.from==null||dt.from<=it.ch)&&(dt.to==null||dt.to>=it.ch)&&st.push(dt.marker.parent||dt.marker)}return st},findMarks:function(it,st,ht){it=Ze(this,it),st=Ze(this,st);var ut=[],dt=it.line;return this.iter(it.line,st.line+1,function(Pt){var bt=Pt.markedSpans;if(bt)for(var jt=0;jt<bt.length;jt++){var Ot=bt[jt];!(Ot.to!=null&&dt==it.line&&it.ch>=Ot.to||Ot.from==null&&dt!=it.line||Ot.from!=null&&dt==st.line&&Ot.from>=st.ch)&&(!ht||ht(Ot.marker))&&ut.push(Ot.marker.parent||Ot.marker)}++dt}),ut},getAllMarks:function(){var it=[];return this.iter(function(st){var ht=st.markedSpans;if(ht)for(var ut=0;ut<ht.length;++ut)ht[ut].from!=null&&it.push(ht[ut].marker)}),it},posFromIndex:function(it){var st,ht=this.first,ut=this.lineSeparator().length;return this.iter(function(dt){var Pt=dt.text.length+ut;if(Pt>it)return st=it,!0;it-=Pt,++ht}),Ze(this,on(ht,st))},indexFromPos:function(it){it=Ze(this,it);var st=it.ch;if(it.line<this.first||it.ch<0)return 0;var ht=this.lineSeparator().length;return this.iter(this.first,it.line,function(ut){st+=ut.text.length+ht}),st},copy:function(it){var st=new Os(ti(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return st.scrollTop=this.scrollTop,st.scrollLeft=this.scrollLeft,st.sel=this.sel,st.extend=!1,it&&(st.history.undoDepth=this.history.undoDepth,st.setHistory(this.getHistory())),st},linkedDoc:function(it){it||(it={});var st=this.first,ht=this.first+this.size;it.from!=null&&it.from>st&&(st=it.from),it.to!=null&&it.to<ht&&(ht=it.to);var ut=new Os(ti(this,st,ht),it.mode||this.modeOption,st,this.lineSep,this.direction);return it.sharedHist&&(ut.history=this.history),(this.linked||(this.linked=[])).push({doc:ut,sharedHist:it.sharedHist}),ut.linked=[{doc:this,isParent:!0,sharedHist:it.sharedHist}],Ff(ut,Pf(this)),ut},unlinkDoc:function(it){if(it instanceof jr&&(it=it.doc),this.linked)for(var st=0;st<this.linked.length;++st){var ht=this.linked[st];if(ht.doc==it){this.linked.splice(st,1),it.unlinkDoc(this),Eg(Pf(this));break}}if(it.history==this.history){var ut=[it.id];Kl(it,function(dt){return ut.push(dt.id)},!0),it.history=new mh(null),it.history.done=QA(this.history.done,ut),it.history.undone=QA(this.history.undone,ut)}},iterLinkedDocs:function(it){Kl(this,it)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(it){return this.lineSep?it.split(this.lineSep):en(it)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Is(function(it){it!="rtl"&&(it="ltr"),it!=this.direction&&(this.direction=it,this.iter(function(st){return st.order=null}),this.cm&&tp(this.cm))})}),Os.prototype.eachLine=Os.prototype.iter;var Ph=0;function Lf(it){var st=this;if(gc(st),!(or(st,it)||da(st.display,it))){Fo(it),be&&(Ph=+new Date);var ht=ta(st,it,!0),ut=it.dataTransfer.files;if(!(!ht||st.isReadOnly()))if(ut&&ut.length&&window.FileReader&&window.File)for(var dt=ut.length,Pt=Array(dt),bt=0,jt=function(){++bt==dt&&Bs(st,function(){ht=Ze(st.doc,ht);var Ge={from:ht,to:ht,text:st.doc.splitLines(Pt.filter(function(Fn){return Fn!=null}).join(st.doc.lineSeparator())),origin:"paste"};du(st.doc,Ge),Vu(st.doc,NA(Ze(st.doc,ht),Ze(st.doc,Au(Ge))))})()},Ot=function(Ge,Fn){if(st.options.allowDropFileTypes&&je(st.options.allowDropFileTypes,Ge.type)==-1){jt();return}var In=new FileReader;In.onerror=function(){return jt()},In.onload=function(){var _n=In.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(_n)){jt();return}Pt[Fn]=_n,jt()},In.readAsText(Ge)},Zt=0;Zt<ut.length;Zt++)Ot(ut[Zt],Zt);else{if(st.state.draggingText&&st.doc.sel.contains(ht)>-1){st.state.draggingText(it),setTimeout(function(){return st.display.input.focus()},20);return}try{var Pe=it.dataTransfer.getData("Text");if(Pe){var te;if(st.state.draggingText&&!st.state.draggingText.copy&&(te=st.listSelections()),Wu(st.doc,NA(ht,ht)),te)for(var Ve=0;Ve<te.length;++Ve)Zu(st.doc,"",te[Ve].anchor,te[Ve].head,"drag");st.replaceSelection(Pe,"around","paste"),st.display.input.focus()}}catch(Ge){}}}}function Ef(it,st){if(be&&(!it.state.draggingText||+new Date-Ph<100)){So(st);return}if(!(or(it,st)||da(it.display,st))&&(st.dataTransfer.setData("Text",it.getSelection()),st.dataTransfer.effectAllowed="copyMove",st.dataTransfer.setDragImage&&!gn)){var ht=le("img",null,null,"position: fixed; left: 0; top: 0;");ht.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Qe&&(ht.width=ht.height=1,it.display.wrapper.appendChild(ht),ht._top=ht.offsetTop),st.dataTransfer.setDragImage(ht,0,0),Qe&&ht.parentNode.removeChild(ht)}}function hc(it,st){var ht=ta(it,st);if(ht){var ut=document.createDocumentFragment();Dr(it,ht,ut),it.display.dragCursor||(it.display.dragCursor=le("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),it.display.lineSpace.insertBefore(it.display.dragCursor,it.display.cursorDiv)),he(it.display.dragCursor,ut)}}function gc(it){it.display.dragCursor&&(it.display.lineSpace.removeChild(it.display.dragCursor),it.display.dragCursor=null)}function fc(it){if(document.getElementsByClassName){for(var st=document.getElementsByClassName("CodeMirror"),ht=[],ut=0;ut<st.length;ut++){var dt=st[ut].CodeMirror;dt&&ht.push(dt)}ht.length&&ht[0].operation(function(){for(var Pt=0;Pt<ht.length;Pt++)it(ht[Pt])})}}var il=!1;function ka(){il||(Fh(),il=!0)}function Fh(){var it;fi(window,"resize",function(){it==null&&(it=setTimeout(function(){it=null,fc(dd)},100))}),fi(window,"blur",function(){return fc(Ru)})}function dd(it){var st=it.display;st.cachedCharWidth=st.cachedTextHeight=st.cachedPaddingH=null,st.scrollbarsClipped=!1,it.setSize()}for(var gA={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Mg=0;Mg<10;Mg++)gA[Mg+48]=gA[Mg+96]=String(Mg);for(var Mf=65;Mf<=90;Mf++)gA[Mf]=String.fromCharCode(Mf);for(var kg=1;kg<=12;kg++)gA[kg+111]=gA[kg+63235]="F"+kg;var Wa={};Wa.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Wa.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Wa.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Wa.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Wa.default=gt?Wa.macDefault:Wa.pcDefault;function cd(it){var st=it.split(/-(?!$)/);it=st[st.length-1];for(var ht,ut,dt,Pt,bt=0;bt<st.length-1;bt++){var jt=st[bt];if(/^(cmd|meta|m)$/i.test(jt))Pt=!0;else if(/^a(lt)?$/i.test(jt))ht=!0;else if(/^(c|ctrl|control)$/i.test(jt))ut=!0;else if(/^s(hift)?$/i.test(jt))dt=!0;else throw new Error("Unrecognized modifier name: "+jt)}return ht&&(it="Alt-"+it),ut&&(it="Ctrl-"+it),Pt&&(it="Cmd-"+it),dt&&(it="Shift-"+it),it}function pd(it){var st={};for(var ht in it)if(it.hasOwnProperty(ht)){var ut=it[ht];if(/^(name|fallthrough|(de|at)tach)$/.test(ht))continue;if(ut=="..."){delete it[ht];continue}for(var dt=Sn(ht.split(" "),cd),Pt=0;Pt<dt.length;Pt++){var bt=void 0,jt=void 0;Pt==dt.length-1?(jt=dt.join(" "),bt=ut):(jt=dt.slice(0,Pt+1).join(" "),bt="...");var Ot=st[jt];if(!Ot)st[jt]=bt;else if(Ot!=bt)throw new Error("Inconsistent bindings for "+jt)}delete it[ht]}for(var Zt in st)it[Zt]=st[Zt];return it}function rl(it,st,ht,ut){st=ys(st);var dt=st.call?st.call(it,ut):st[it];if(dt===!1)return"nothing";if(dt==="...")return"multi";if(dt!=null&&ht(dt))return"handled";if(st.fallthrough){if(Object.prototype.toString.call(st.fallthrough)!="[object Array]")return rl(it,st.fallthrough,ht,ut);for(var Pt=0;Pt<st.fallthrough.length;Pt++){var bt=rl(it,st.fallthrough[Pt],ht,ut);if(bt)return bt}}}function Lh(it){var st=typeof it=="string"?it:gA[it.keyCode];return st=="Ctrl"||st=="Alt"||st=="Shift"||st=="Mod"}function bg(it,st,ht){var ut=it;return st.altKey&&ut!="Alt"&&(it="Alt-"+it),(Lt?st.metaKey:st.ctrlKey)&&ut!="Ctrl"&&(it="Ctrl-"+it),(Lt?st.ctrlKey:st.metaKey)&&ut!="Mod"&&(it="Cmd-"+it),!ht&&st.shiftKey&&ut!="Shift"&&(it="Shift-"+it),it}function md(it,st){if(Qe&&it.keyCode==34&&it.char)return!1;var ht=gA[it.keyCode];return ht==null||it.altGraphKey?!1:(it.keyCode==3&&it.code&&(ht=it.code),bg(ht,it,st))}function ys(it){return typeof it=="string"?Wa[it]:it}function Ws(it,st){for(var ht=it.doc.sel.ranges,ut=[],dt=0;dt<ht.length;dt++){for(var Pt=st(ht[dt]);ut.length&&ni(Pt.from,Le(ut).to)<=0;){var bt=ut.pop();if(ni(bt.from,Pt.from)<0){Pt.from=bt.from;break}}ut.push(Pt)}Jr(it,function(){for(var jt=ut.length-1;jt>=0;jt--)Zu(it.doc,"",ut[jt].from,ut[jt].to,"+delete");bA(it)})}function vd(it,st,ht){var ut=Ei(it.text,st+ht,ht);return ut<0||ut>it.text.length?null:ut}function fs(it,st,ht){var ut=vd(it,st.ch,ht);return ut==null?null:new on(st.line,ut,ht<0?"after":"before")}function Eh(it,st,ht,ut,dt){if(it){st.doc.direction=="rtl"&&(dt=-dt);var Pt=gi(ht,st.doc.direction);if(Pt){var bt=dt<0?Le(Pt):Pt[0],jt=dt<0==(bt.level==1),Ot=jt?"after":"before",Zt;if(bt.level>0||st.doc.direction=="rtl"){var Pe=uo(st,ht);Zt=dt<0?ht.text.length-1:0;var te=cl(st,Pe,Zt).top;Zt=Xn(function(Ve){return cl(st,Pe,Ve).top==te},dt<0==(bt.level==1)?bt.from:bt.to-1,Zt),Ot=="before"&&(Zt=vd(ht,Zt,1))}else Zt=dt<0?bt.to:bt.from;return new on(ut,Zt,Ot)}}return new on(ut,dt<0?ht.text.length:0,dt<0?"before":"after")}function Mh(it,st,ht,ut){var dt=gi(st,it.doc.direction);if(!dt)return fs(st,ht,ut);ht.ch>=st.text.length?(ht.ch=st.text.length,ht.sticky="before"):ht.ch<=0&&(ht.ch=0,ht.sticky="after");var Pt=Ln(dt,ht.ch,ht.sticky),bt=dt[Pt];if(it.doc.direction=="ltr"&&bt.level%2==0&&(ut>0?bt.to>ht.ch:bt.from<ht.ch))return fs(st,ht,ut);var jt=function(oi,bi){return vd(st,oi instanceof on?oi.ch:oi,bi)},Ot,Zt=function(oi){return it.options.lineWrapping?(Ot=Ot||uo(it,st),id(it,st,Ot,oi)):{begin:0,end:st.text.length}},Pe=Zt(ht.sticky=="before"?jt(ht,-1):ht.ch);if(it.doc.direction=="rtl"||bt.level==1){var te=bt.level==1==ut<0,Ve=jt(ht,te?1:-1);if(Ve!=null&&(te?Ve<=bt.to&&Ve<=Pe.end:Ve>=bt.from&&Ve>=Pe.begin)){var Ge=te?"before":"after";return new on(ht.line,Ve,Ge)}}var Fn=function(oi,bi,Bi){for(var Di=function(Io,ks){return ks?new on(ht.line,jt(Io,1),"before"):new on(ht.line,Io,"after")};oi>=0&&oi<dt.length;oi+=bi){var ar=dt[oi],wi=bi>0==(ar.level!=1),Cr=wi?Bi.begin:jt(Bi.end,-1);if(ar.from<=Cr&&Cr<ar.to||(Cr=wi?ar.from:jt(ar.to,-1),Bi.begin<=Cr&&Cr<Bi.end))return Di(Cr,wi)}},In=Fn(Pt+ut,ut,Pe);if(In)return In;var _n=ut>0?Pe.end:jt(Pe.begin,-1);return _n!=null&&!(ut>0&&_n==st.text.length)&&(In=Fn(ut>0?0:dt.length-1,ut,Zt(_n)),In)?In:null}var pu={selectAll:gs,singleSelection:function(it){return it.setSelection(it.getCursor("anchor"),it.getCursor("head"),He)},killLine:function(it){return Ws(it,function(st){if(st.empty()){var ht=Se(it.doc,st.head.line).text.length;return st.head.ch==ht&&st.head.line<it.lastLine()?{from:st.head,to:on(st.head.line+1,0)}:{from:st.head,to:on(st.head.line,ht)}}else return{from:st.from(),to:st.to()}})},deleteLine:function(it){return Ws(it,function(st){return{from:on(st.from().line,0),to:Ze(it.doc,on(st.to().line+1,0))}})},delLineLeft:function(it){return Ws(it,function(st){return{from:on(st.from().line,0),to:st.from()}})},delWrappedLineLeft:function(it){return Ws(it,function(st){var ht=it.charCoords(st.head,"div").top+5,ut=it.coordsChar({left:0,top:ht},"div");return{from:ut,to:st.from()}})},delWrappedLineRight:function(it){return Ws(it,function(st){var ht=it.charCoords(st.head,"div").top+5,ut=it.coordsChar({left:it.display.lineDiv.offsetWidth+100,top:ht},"div");return{from:st.from(),to:ut}})},undo:function(it){return it.undo()},redo:function(it){return it.redo()},undoSelection:function(it){return it.undoSelection()},redoSelection:function(it){return it.redoSelection()},goDocStart:function(it){return it.extendSelection(on(it.firstLine(),0))},goDocEnd:function(it){return it.extendSelection(on(it.lastLine()))},goLineStart:function(it){return it.extendSelectionsBy(function(st){return kh(it,st.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(it){return it.extendSelectionsBy(function(st){return yd(it,st.head)},{origin:"+move",bias:1})},goLineEnd:function(it){return it.extendSelectionsBy(function(st){return bh(it,st.head.line)},{origin:"+move",bias:-1})},goLineRight:function(it){return it.extendSelectionsBy(function(st){var ht=it.cursorCoords(st.head,"div").top+5;return it.coordsChar({left:it.display.lineDiv.offsetWidth+100,top:ht},"div")},Cn)},goLineLeft:function(it){return it.extendSelectionsBy(function(st){var ht=it.cursorCoords(st.head,"div").top+5;return it.coordsChar({left:0,top:ht},"div")},Cn)},goLineLeftSmart:function(it){return it.extendSelectionsBy(function(st){var ht=it.cursorCoords(st.head,"div").top+5,ut=it.coordsChar({left:0,top:ht},"div");return ut.ch<it.getLine(ut.line).search(/\S/)?yd(it,st.head):ut},Cn)},goLineUp:function(it){return it.moveV(-1,"line")},goLineDown:function(it){return it.moveV(1,"line")},goPageUp:function(it){return it.moveV(-1,"page")},goPageDown:function(it){return it.moveV(1,"page")},goCharLeft:function(it){return it.moveH(-1,"char")},goCharRight:function(it){return it.moveH(1,"char")},goColumnLeft:function(it){return it.moveH(-1,"column")},goColumnRight:function(it){return it.moveH(1,"column")},goWordLeft:function(it){return it.moveH(-1,"word")},goGroupRight:function(it){return it.moveH(1,"group")},goGroupLeft:function(it){return it.moveH(-1,"group")},goWordRight:function(it){return it.moveH(1,"word")},delCharBefore:function(it){return it.deleteH(-1,"codepoint")},delCharAfter:function(it){return it.deleteH(1,"char")},delWordBefore:function(it){return it.deleteH(-1,"word")},delWordAfter:function(it){return it.deleteH(1,"word")},delGroupBefore:function(it){return it.deleteH(-1,"group")},delGroupAfter:function(it){return it.deleteH(1,"group")},indentAuto:function(it){return it.indentSelection("smart")},indentMore:function(it){return it.indentSelection("add")},indentLess:function(it){return it.indentSelection("subtract")},insertTab:function(it){return it.replaceSelection(" ")},insertSoftTab:function(it){for(var st=[],ht=it.listSelections(),ut=it.options.tabSize,dt=0;dt<ht.length;dt++){var Pt=ht[dt].from(),bt=qt(it.getLine(Pt.line),Pt.ch,ut);st.push(ve(ut-bt%ut))}it.replaceSelections(st)},defaultTab:function(it){it.somethingSelected()?it.indentSelection("add"):it.execCommand("insertTab")},transposeChars:function(it){return Jr(it,function(){for(var st=it.listSelections(),ht=[],ut=0;ut<st.length;ut++)if(st[ut].empty()){var dt=st[ut].head,Pt=Se(it.doc,dt.line).text;if(Pt){if(dt.ch==Pt.length&&(dt=new on(dt.line,dt.ch-1)),dt.ch>0)dt=new on(dt.line,dt.ch+1),it.replaceRange(Pt.charAt(dt.ch-1)+Pt.charAt(dt.ch-2),on(dt.line,dt.ch-2),dt,"+transpose");else if(dt.line>it.doc.first){var bt=Se(it.doc,dt.line-1).text;bt&&(dt=new on(dt.line,1),it.replaceRange(Pt.charAt(0)+it.doc.lineSeparator()+bt.charAt(bt.length-1),on(dt.line-1,bt.length-1),dt,"+transpose"))}}ht.push(new so(dt,dt))}it.setSelections(ht)})},newlineAndIndent:function(it){return Jr(it,function(){for(var st=it.listSelections(),ht=st.length-1;ht>=0;ht--)it.replaceRange(it.doc.lineSeparator(),st[ht].anchor,st[ht].head,"+input");st=it.listSelections();for(var ut=0;ut<st.length;ut++)it.indentLine(st[ut].from().line,null,!0);bA(it)})},openLine:function(it){return it.replaceSelection(`
`,"start")},toggleOverwrite:function(it){return it.toggleOverwrite()}};function kh(it,st){var ht=Se(it.doc,st),ut=_r(ht);return ut!=ht&&(st=pe(ut)),Eh(!0,it,ut,st,1)}function bh(it,st){var ht=Se(it.doc,st),ut=To(ht);return ut!=ht&&(st=pe(ut)),Eh(!0,it,ht,st,-1)}function yd(it,st){var ht=kh(it,st.line),ut=Se(it.doc,ht.line),dt=gi(ut,it.doc.direction);if(!dt||dt[0].level==0){var Pt=Math.max(ht.ch,ut.text.search(/\S/)),bt=st.line==ht.line&&st.ch<=Pt&&st.ch;return on(ht.line,bt?0:Pt,ht.sticky)}return ht}function Th(it,st,ht){if(typeof st=="string"&&(st=pu[st],!st))return!1;it.display.input.ensurePolled();var ut=it.display.shift,dt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),ht&&(it.display.shift=!1),dt=st(it)!=Kn}finally{it.display.shift=ut,it.state.suppressEdits=!1}return dt}function wd(it,st,ht){for(var ut=0;ut<it.state.keyMaps.length;ut++){var dt=rl(st,it.state.keyMaps[ut],ht,it);if(dt)return dt}return it.options.extraKeys&&rl(st,it.options.extraKeys,ht,it)||rl(st,it.options.keyMap,ht,it)}var fA=new Ht;function qu(it,st,ht,ut){var dt=it.state.keySeq;if(dt){if(Lh(st))return"handled";if(/\'$/.test(st)?it.state.keySeq=null:fA.set(50,function(){it.state.keySeq==dt&&(it.state.keySeq=null,it.display.input.reset())}),Tg(it,dt+" "+st,ht,ut))return!0}return Tg(it,st,ht,ut)}function Tg(it,st,ht,ut){var dt=wd(it,st,ut);return dt=="multi"&&(it.state.keySeq=st),dt=="handled"&&Pi(it,"keyHandled",it,st,ht),(dt=="handled"||dt=="multi")&&(Fo(ht),to(it)),!!dt}function Ng(it,st){var ht=md(st,!0);return ht?st.shiftKey&&!it.state.keySeq?qu(it,"Shift-"+ht,st,function(ut){return Th(it,ut,!0)})||qu(it,ht,st,function(ut){if(typeof ut=="string"?/^go[A-Z]/.test(ut):ut.motion)return Th(it,ut)}):qu(it,ht,st,function(ut){return Th(it,ut)}):!1}function Qg(it,st,ht){return qu(it,"'"+ht+"'",st,function(ut){return Th(it,ut,!0)})}var mu=null;function Ug(it){var st=this;if(!(it.target&&it.target!=st.display.input.getField())&&(st.curOp.focus=fn(),!or(st,it))){be&&we<11&&it.keyCode==27&&(it.returnValue=!1);var ht=it.keyCode;st.display.shift=ht==16||it.shiftKey;var ut=Ng(st,it);Qe&&(mu=ut?ht:null,!ut&&ht==88&&!Qn&&(gt?it.metaKey:it.ctrlKey)&&st.replaceSelection("",null,"cut")),Tt&&!gt&&!ut&&ht==46&&it.shiftKey&&!it.ctrlKey&&document.execCommand&&document.execCommand("cut"),ht==18&&!/\bCodeMirror-crosshair\b/.test(st.display.lineDiv.className)&&Sd(st)}}function Sd(it){var st=it.display.lineDiv;sn(st,"CodeMirror-crosshair");function ht(ut){(ut.keyCode==18||!ut.altKey)&&(Jt(st,"CodeMirror-crosshair"),kr(document,"keyup",ht),kr(document,"mouseover",ht))}fi(document,"keyup",ht),fi(document,"mouseover",ht)}function xd(it){it.keyCode==16&&(this.doc.sel.shift=!1),or(this,it)}function Xl(it){var st=this;if(!(it.target&&it.target!=st.display.input.getField())&&!(da(st.display,it)||or(st,it)||it.ctrlKey&&!it.altKey||gt&&it.metaKey)){var ht=it.keyCode,ut=it.charCode;if(Qe&&ht==mu){mu=null,Fo(it);return}if(!(Qe&&(!it.which||it.which<10)&&Ng(st,it))){var dt=String.fromCharCode(ut==null?ht:ut);dt!="\b"&&(Qg(st,it,dt)||st.display.input.onKeyPress(it))}}}var dc=400,Nh=function(it,st,ht){this.time=it,this.pos=st,this.button=ht};Nh.prototype.compare=function(it,st,ht){return this.time+dc>it&&ni(st,this.pos)==0&&ht==this.button};var IA,$u;function kf(it,st){var ht=+new Date;return $u&&$u.compare(ht,it,st)?(IA=$u=null,"triple"):IA&&IA.compare(ht,it,st)?($u=new Nh(ht,it,st),IA=null,"double"):(IA=new Nh(ht,it,st),$u=null,"single")}function wl(it){var st=this,ht=st.display;if(!(or(st,it)||ht.activeTouch&&ht.input.supportsTouch())){if(ht.input.ensurePolled(),ht.shift=it.shiftKey,da(ht,it)){ne||(ht.scroller.draggable=!1,setTimeout(function(){return ht.scroller.draggable=!0},100));return}if(!Nf(st,it)){var ut=ta(st,it),dt=bo(it),Pt=ut?kf(ut,dt):"single";window.focus(),dt==1&&st.state.selectingText&&st.state.selectingText(it),!(ut&&bf(st,dt,ut,Pt,it))&&(dt==1?ut?Bd(st,ut,Pt,it):Er(it)==ht.scroller&&Fo(it):dt==2?(ut&&Sh(st.doc,ut),setTimeout(function(){return ht.input.focus()},20)):dt==3&&(Nt?st.display.input.onContextMenu(it):zo(st)))}}}function bf(it,st,ht,ut,dt){var Pt="Click";return ut=="double"?Pt="Double"+Pt:ut=="triple"&&(Pt="Triple"+Pt),Pt=(st==1?"Left":st==2?"Middle":"Right")+Pt,qu(it,bg(Pt,dt),dt,function(bt){if(typeof bt=="string"&&(bt=pu[bt]),!bt)return!1;var jt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),jt=bt(it,ht)!=Kn}finally{it.state.suppressEdits=!1}return jt})}function Ig(it,st,ht){var ut=it.getOption("configureMouse"),dt=ut?ut(it,st,ht):{};if(dt.unit==null){var Pt=lt?ht.shiftKey&&ht.metaKey:ht.altKey;dt.unit=Pt?"rectangle":st=="single"?"char":st=="double"?"word":"line"}return(dt.extend==null||it.doc.extend)&&(dt.extend=it.doc.extend||ht.shiftKey),dt.addNew==null&&(dt.addNew=gt?ht.metaKey:ht.ctrlKey),dt.moveOnDrag==null&&(dt.moveOnDrag=!(gt?ht.altKey:ht.ctrlKey)),dt}function Bd(it,st,ht,ut){be?setTimeout(Si(Co,it),0):it.curOp.focus=fn();var dt=Ig(it,ht,ut),Pt=it.doc.sel,bt;it.options.dragDrop&&Ss&&!it.isReadOnly()&&ht=="single"&&(bt=Pt.contains(st))>-1&&(ni((bt=Pt.ranges[bt]).from(),st)<0||st.xRel>0)&&(ni(bt.to(),st)>0||st.xRel<0)?Cd(it,ut,st,dt):cc(it,ut,st,dt)}function Cd(it,st,ht,ut){var dt=it.display,Pt=!1,bt=Bs(it,function(Zt){ne&&(dt.scroller.draggable=!1),it.state.draggingText=!1,kr(dt.wrapper.ownerDocument,"mouseup",bt),kr(dt.wrapper.ownerDocument,"mousemove",jt),kr(dt.scroller,"dragstart",Ot),kr(dt.scroller,"drop",bt),Pt||(Fo(Zt),ut.addNew||Sh(it.doc,ht,null,null,ut.extend),ne&&!gn||be&&we==9?setTimeout(function(){dt.wrapper.ownerDocument.body.focus({preventScroll:!0}),dt.input.focus()},20):dt.input.focus())}),jt=function(Zt){Pt=Pt||Math.abs(st.clientX-Zt.clientX)+Math.abs(st.clientY-Zt.clientY)>=10},Ot=function(){return Pt=!0};ne&&(dt.scroller.draggable=!0),it.state.draggingText=bt,bt.copy=!ut.moveOnDrag,dt.scroller.dragDrop&&dt.scroller.dragDrop(),fi(dt.wrapper.ownerDocument,"mouseup",bt),fi(dt.wrapper.ownerDocument,"mousemove",jt),fi(dt.scroller,"dragstart",Ot),fi(dt.scroller,"drop",bt),zo(it),setTimeout(function(){return dt.input.focus()},20)}function Qh(it,st,ht){if(ht=="char")return new so(st,st);if(ht=="word")return it.findWordAt(st);if(ht=="line")return new so(on(st.line,0),Ze(it.doc,on(st.line+1,0)));var ut=ht(it,st);return new so(ut.from,ut.to)}function cc(it,st,ht,ut){var dt=it.display,Pt=it.doc;Fo(st);var bt,jt,Ot=Pt.sel,Zt=Ot.ranges;if(ut.addNew&&!ut.extend?(jt=Pt.sel.contains(ht),jt>-1?bt=Zt[jt]:bt=new so(ht,ht)):(bt=Pt.sel.primary(),jt=Pt.sel.primIndex),ut.unit=="rectangle")ut.addNew||(bt=new so(ht,ht)),ht=ta(it,st,!0,!0),jt=-1;else{var Pe=Qh(it,ht,ut.unit);ut.extend?bt=Sf(bt,Pe.anchor,Pe.head,ut.extend):bt=Pe}ut.addNew?jt==-1?(jt=Zt.length,ea(Pt,Ma(it,Zt.concat([bt]),jt),{scroll:!1,origin:"*mouse"})):Zt.length>1&&Zt[jt].empty()&&ut.unit=="char"&&!ut.extend?(ea(Pt,Ma(it,Zt.slice(0,jt).concat(Zt.slice(jt+1)),0),{scroll:!1,origin:"*mouse"}),Ot=Pt.sel):gu(Pt,jt,bt,mn):(jt=0,ea(Pt,new vl([bt],0),mn),Ot=Pt.sel);var te=ht;function Ve(Bi){if(ni(te,Bi)!=0)if(te=Bi,ut.unit=="rectangle"){for(var Di=[],ar=it.options.tabSize,wi=qt(Se(Pt,ht.line).text,ht.ch,ar),Cr=qt(Se(Pt,Bi.line).text,Bi.ch,ar),Io=Math.min(wi,Cr),ks=Math.max(wi,Cr),Zo=Math.min(ht.line,Bi.line),ba=Math.min(it.lastLine(),Math.max(ht.line,Bi.line));Zo<=ba;Zo++){var Rs=Se(Pt,Zo).text,Ps=Jn(Rs,Io,ar);Io==ks?Di.push(new so(on(Zo,Ps),on(Zo,Ps))):Rs.length>Ps&&Di.push(new so(on(Zo,Ps),on(Zo,Jn(Rs,ks,ar))))}Di.length||Di.push(new so(ht,ht)),ea(Pt,Ma(it,Ot.ranges.slice(0,jt).concat(Di),jt),{origin:"*mouse",scroll:!1}),it.scrollIntoView(Bi)}else{var va=bt,_s=Qh(it,Bi,ut.unit),vi=va.anchor,Hr;ni(_s.anchor,vi)>0?(Hr=_s.head,vi=Ce(va.from(),_s.anchor)):(Hr=_s.anchor,vi=ye(va.to(),_s.head));var Do=Ot.ranges.slice(0);Do[jt]=Pd(it,new so(Ze(Pt,vi),Hr)),ea(Pt,Ma(it,Do,jt),mn)}}var Ge=dt.wrapper.getBoundingClientRect(),Fn=0;function In(Bi){var Di=++Fn,ar=ta(it,Bi,!0,ut.unit=="rectangle");if(ar)if(ni(ar,te)!=0){it.curOp.focus=fn(),Ve(ar);var wi=br(dt,Pt);(ar.line>=wi.to||ar.line<wi.from)&&setTimeout(Bs(it,function(){Fn==Di&&In(Bi)}),150)}else{var Cr=Bi.clientY<Ge.top?-20:Bi.clientY>Ge.bottom?20:0;Cr&&setTimeout(Bs(it,function(){Fn==Di&&(dt.scroller.scrollTop+=Cr,In(Bi))}),50)}}function _n(Bi){it.state.selectingText=!1,Fn=1/0,Bi&&(Fo(Bi),dt.input.focus()),kr(dt.wrapper.ownerDocument,"mousemove",oi),kr(dt.wrapper.ownerDocument,"mouseup",bi),Pt.history.lastSelOrigin=null}var oi=Bs(it,function(Bi){Bi.buttons===0||!bo(Bi)?_n(Bi):In(Bi)}),bi=Bs(it,_n);it.state.selectingText=bi,fi(dt.wrapper.ownerDocument,"mousemove",oi),fi(dt.wrapper.ownerDocument,"mouseup",bi)}function Pd(it,st){var ht=st.anchor,ut=st.head,dt=Se(it.doc,ht.line);if(ni(ht,ut)==0&&ht.sticky==ut.sticky)return st;var Pt=gi(dt);if(!Pt)return st;var bt=Ln(Pt,ht.ch,ht.sticky),jt=Pt[bt];if(jt.from!=ht.ch&&jt.to!=ht.ch)return st;var Ot=bt+(jt.from==ht.ch==(jt.level!=1)?0:1);if(Ot==0||Ot==Pt.length)return st;var Zt;if(ut.line!=ht.line)Zt=(ut.line-ht.line)*(it.doc.direction=="ltr"?1:-1)>0;else{var Pe=Ln(Pt,ut.ch,ut.sticky),te=Pe-bt||(ut.ch-ht.ch)*(jt.level==1?-1:1);Pe==Ot-1||Pe==Ot?Zt=te<0:Zt=te>0}var Ve=Pt[Ot+(Zt?-1:0)],Ge=Zt==(Ve.level==1),Fn=Ge?Ve.from:Ve.to,In=Ge?"after":"before";return ht.ch==Fn&&ht.sticky==In?st:new so(new on(ht.line,Fn,In),ut)}function Tf(it,st,ht,ut){var dt,Pt;if(st.touches)dt=st.touches[0].clientX,Pt=st.touches[0].clientY;else try{dt=st.clientX,Pt=st.clientY}catch(Ve){return!1}if(dt>=Math.floor(it.display.gutters.getBoundingClientRect().right))return!1;ut&&Fo(st);var bt=it.display,jt=bt.lineDiv.getBoundingClientRect();if(Pt>jt.bottom||!Wr(it,ht))return ur(st);Pt-=jt.top-bt.viewOffset;for(var Ot=0;Ot<it.display.gutterSpecs.length;++Ot){var Zt=bt.gutters.childNodes[Ot];if(Zt&&Zt.getBoundingClientRect().right>=dt){var Pe=Un(it.doc,Pt),te=it.display.gutterSpecs[Ot];return yr(it,ht,it,Pe,te.className,st),ur(st)}}}function Nf(it,st){return Tf(it,st,"gutterClick",!0)}function Dg(it,st){da(it.display,st)||th(it,st)||or(it,st,"contextmenu")||Nt||it.display.input.onContextMenu(st)}function th(it,st){return Wr(it,"gutterContextMenu")?Tf(it,st,"gutterContextMenu",!1):!1}function Uh(it){it.display.wrapper.className=it.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+it.options.theme.replace(/(^|\s)\s*/g," cm-s-"),pl(it)}var Zl={toString:function(){return"CodeMirror.Init"}},Fd={},Hg={};function pc(it){var st=it.optionHandlers;function ht(ut,dt,Pt,bt){it.defaults[ut]=dt,Pt&&(st[ut]=bt?function(jt,Ot,Zt){Zt!=Zl&&Pt(jt,Ot,Zt)}:Pt)}it.defineOption=ht,it.Init=Zl,ht("value","",function(ut,dt){return ut.setValue(dt)},!0),ht("mode",null,function(ut,dt){ut.doc.modeOption=dt,Br(ut)},!0),ht("indentUnit",2,Br,!0),ht("indentWithTabs",!1),ht("smartIndent",!0),ht("tabSize",4,function(ut){Sg(ut),pl(ut),Eo(ut)},!0),ht("lineSeparator",null,function(ut,dt){if(ut.doc.lineSep=dt,!!dt){var Pt=[],bt=ut.doc.first;ut.doc.iter(function(Ot){for(var Zt=0;;){var Pe=Ot.text.indexOf(dt,Zt);if(Pe==-1)break;Zt=Pe+dt.length,Pt.push(on(bt,Pe))}bt++});for(var jt=Pt.length-1;jt>=0;jt--)Zu(ut.doc,dt,Pt[jt],on(Pt[jt].line,Pt[jt].ch+dt.length))}}),ht("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(ut,dt,Pt){ut.state.specialChars=new RegExp(dt.source+(dt.test(" ")?"":"| "),"g"),Pt!=Zl&&ut.refresh()}),ht("specialCharPlaceholder",fa,function(ut){return ut.refresh()},!0),ht("electricChars",!0),ht("inputStyle",nt?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),ht("spellcheck",!1,function(ut,dt){return ut.getInputField().spellcheck=dt},!0),ht("autocorrect",!1,function(ut,dt){return ut.getInputField().autocorrect=dt},!0),ht("autocapitalize",!1,function(ut,dt){return ut.getInputField().autocapitalize=dt},!0),ht("rtlMoveVisually",!ct),ht("wholeLineUpdateBefore",!0),ht("theme","default",function(ut){Uh(ut),nl(ut)},!0),ht("keyMap","default",function(ut,dt,Pt){var bt=ys(dt),jt=Pt!=Zl&&ys(Pt);jt&&jt.detach&&jt.detach(ut,bt),bt.attach&&bt.attach(ut,jt||null)}),ht("extraKeys",null),ht("configureMouse",null),ht("lineWrapping",!1,Ld,!0),ht("gutters",[],function(ut,dt){ut.display.gutterSpecs=Ds(dt,ut.options.lineNumbers),nl(ut)},!0),ht("fixedGutter",!0,function(ut,dt){ut.display.gutters.style.left=dt?$A(ut.display)+"px":"0",ut.refresh()},!0),ht("coverGutterNextToScrollbar",!1,function(ut){return Rl(ut)},!0),ht("scrollbarStyle","native",function(ut){sd(ut),Rl(ut),ut.display.scrollbars.setScrollTop(ut.doc.scrollTop),ut.display.scrollbars.setScrollLeft(ut.doc.scrollLeft)},!0),ht("lineNumbers",!1,function(ut,dt){ut.display.gutterSpecs=Ds(ut.options.gutters,dt),nl(ut)},!0),ht("firstLineNumber",1,nl,!0),ht("lineNumberFormatter",function(ut){return ut},nl,!0),ht("showCursorWhenSelecting",!1,us,!0),ht("resetSelectionOnContextMenu",!0),ht("lineWiseCopyCut",!0),ht("pasteLinesPerSelection",!0),ht("selectionsMayTouch",!1),ht("readOnly",!1,function(ut,dt){dt=="nocursor"&&(Ru(ut),ut.display.input.blur()),ut.display.input.readOnlyChanged(dt)}),ht("screenReaderLabel",null,function(ut,dt){dt=dt===""?null:dt,ut.display.input.screenReaderLabelChanged(dt)}),ht("disableInput",!1,function(ut,dt){dt||ut.display.input.reset()},!0),ht("dragDrop",!0,Qf),ht("allowDropFileTypes",null),ht("cursorBlinkRate",530),ht("cursorScrollMargin",0),ht("cursorHeight",1,us,!0),ht("singleCursorHeightPerLine",!0,us,!0),ht("workTime",100),ht("workDelay",100),ht("flattenSpans",!0,Sg,!0),ht("addModeClass",!1,Sg,!0),ht("pollInterval",100),ht("undoDepth",200,function(ut,dt){return ut.doc.history.undoDepth=dt}),ht("historyEventDelay",1250),ht("viewportMargin",10,function(ut){return ut.refresh()},!0),ht("maxHighlightLength",1e4,Sg,!0),ht("moveInputWithCursor",!0,function(ut,dt){dt||ut.display.input.resetPosition()}),ht("tabindex",null,function(ut,dt){return ut.display.input.getField().tabIndex=dt||""}),ht("autofocus",null),ht("direction","ltr",function(ut,dt){return ut.doc.setDirection(dt)},!0),ht("phrases",null)}function Qf(it,st,ht){var ut=ht&&ht!=Zl;if(!st!=!ut){var dt=it.display.dragFunctions,Pt=st?fi:kr;Pt(it.display.scroller,"dragstart",dt.start),Pt(it.display.scroller,"dragenter",dt.enter),Pt(it.display.scroller,"dragover",dt.over),Pt(it.display.scroller,"dragleave",dt.leave),Pt(it.display.scroller,"drop",dt.drop)}}function Ld(it){it.options.lineWrapping?(sn(it.display.wrapper,"CodeMirror-wrap"),it.display.sizer.style.minWidth="",it.display.sizerWidth=null):(Jt(it.display.wrapper,"CodeMirror-wrap"),Ao(it)),Ki(it),Eo(it),pl(it),setTimeout(function(){return Rl(it)},100)}function jr(it,st){var ht=this;if(!(this instanceof jr))return new jr(it,st);this.options=st=st?fr(st):{},fr(Fd,st,!1);var ut=st.value;typeof ut=="string"?ut=new Os(ut,st.mode,null,st.lineSeparator,st.direction):st.mode&&(ut.modeOption=st.mode),this.doc=ut;var dt=new jr.inputStyles[st.inputStyle](this),Pt=this.display=new lu(it,ut,dt,st);Pt.wrapper.CodeMirror=this,Uh(this),st.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),sd(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Ht,keySeq:null,specialChars:null},st.autofocus&&!nt&&Pt.input.focus(),be&&we<11&&setTimeout(function(){return ht.display.input.reset(!0)},20),eh(this),ka(),nu(this),this.curOp.forceUpdate=!0,Cs(this,ut),st.autofocus&&!nt||this.hasFocus()?setTimeout(function(){ht.hasFocus()&&!ht.state.focused&&Or(ht)},20):Ru(this);for(var bt in Hg)Hg.hasOwnProperty(bt)&&Hg[bt](this,st[bt],Zl);vs(this),st.finishInit&&st.finishInit(this);for(var jt=0;jt<vu.length;++jt)vu[jt](this);iu(this),ne&&st.lineWrapping&&getComputedStyle(Pt.lineDiv).textRendering=="optimizelegibility"&&(Pt.lineDiv.style.textRendering="auto")}jr.defaults=Fd,jr.optionHandlers=Hg;function eh(it){var st=it.display;fi(st.scroller,"mousedown",Bs(it,wl)),be&&we<11?fi(st.scroller,"dblclick",Bs(it,function(Ot){if(!or(it,Ot)){var Zt=ta(it,Ot);if(!(!Zt||Nf(it,Ot)||da(it.display,Ot))){Fo(Ot);var Pe=it.findWordAt(Zt);Sh(it.doc,Pe.anchor,Pe.head)}}})):fi(st.scroller,"dblclick",function(Ot){return or(it,Ot)||Fo(Ot)}),fi(st.scroller,"contextmenu",function(Ot){return Dg(it,Ot)}),fi(st.input.getField(),"contextmenu",function(Ot){st.scroller.contains(Ot.target)||Dg(it,Ot)});var ht,ut={end:0};function dt(){st.activeTouch&&(ht=setTimeout(function(){return st.activeTouch=null},1e3),ut=st.activeTouch,ut.end=+new Date)}function Pt(Ot){if(Ot.touches.length!=1)return!1;var Zt=Ot.touches[0];return Zt.radiusX<=1&&Zt.radiusY<=1}function bt(Ot,Zt){if(Zt.left==null)return!0;var Pe=Zt.left-Ot.left,te=Zt.top-Ot.top;return Pe*Pe+te*te>20*20}fi(st.scroller,"touchstart",function(Ot){if(!or(it,Ot)&&!Pt(Ot)&&!Nf(it,Ot)){st.input.ensurePolled(),clearTimeout(ht);var Zt=+new Date;st.activeTouch={start:Zt,moved:!1,prev:Zt-ut.end<=300?ut:null},Ot.touches.length==1&&(st.activeTouch.left=Ot.touches[0].pageX,st.activeTouch.top=Ot.touches[0].pageY)}}),fi(st.scroller,"touchmove",function(){st.activeTouch&&(st.activeTouch.moved=!0)}),fi(st.scroller,"touchend",function(Ot){var Zt=st.activeTouch;if(Zt&&!da(st,Ot)&&Zt.left!=null&&!Zt.moved&&new Date-Zt.start<300){var Pe=it.coordsChar(st.activeTouch,"page"),te;!Zt.prev||bt(Zt,Zt.prev)?te=new so(Pe,Pe):!Zt.prev.prev||bt(Zt,Zt.prev.prev)?te=it.findWordAt(Pe):te=new so(on(Pe.line,0),Ze(it.doc,on(Pe.line+1,0))),it.setSelection(te.anchor,te.head),it.focus(),Fo(Ot)}dt()}),fi(st.scroller,"touchcancel",dt),fi(st.scroller,"scroll",function(){st.scroller.clientHeight&&(ju(it,st.scroller.scrollTop),TA(it,st.scroller.scrollLeft,!0),yr(it,"scroll",it))}),fi(st.scroller,"mousewheel",function(Ot){return Hs(it,Ot)}),fi(st.scroller,"DOMMouseScroll",function(Ot){return Hs(it,Ot)}),fi(st.wrapper,"scroll",function(){return st.wrapper.scrollTop=st.wrapper.scrollLeft=0}),st.dragFunctions={enter:function(Ot){or(it,Ot)||So(Ot)},over:function(Ot){or(it,Ot)||(hc(it,Ot),So(Ot))},start:function(Ot){return Ef(it,Ot)},drop:Bs(it,Lf),leave:function(Ot){or(it,Ot)||gc(it)}};var jt=st.input.getField();fi(jt,"keyup",function(Ot){return xd.call(it,Ot)}),fi(jt,"keydown",Bs(it,Ug)),fi(jt,"keypress",Bs(it,Xl)),fi(jt,"focus",function(Ot){return Or(it,Ot)}),fi(jt,"blur",function(Ot){return Ru(it,Ot)})}var vu=[];jr.defineInitHook=function(it){return vu.push(it)};function ws(it,st,ht,ut){var dt=it.doc,Pt;ht==null&&(ht="add"),ht=="smart"&&(dt.mode.indent?Pt=zi(it,st).state:ht="prev");var bt=it.options.tabSize,jt=Se(dt,st),Ot=qt(jt.text,null,bt);jt.stateAfter&&(jt.stateAfter=null);var Zt=jt.text.match(/^\s*/)[0],Pe;if(!ut&&!/\S/.test(jt.text))Pe=0,ht="not";else if(ht=="smart"&&(Pe=dt.mode.indent(Pt,jt.text.slice(Zt.length),jt.text),Pe==Kn||Pe>150)){if(!ut)return;ht="prev"}ht=="prev"?st>dt.first?Pe=qt(Se(dt,st-1).text,null,bt):Pe=0:ht=="add"?Pe=Ot+it.options.indentUnit:ht=="subtract"?Pe=Ot-it.options.indentUnit:typeof ht=="number"&&(Pe=Ot+ht),Pe=Math.max(0,Pe);var te="",Ve=0;if(it.options.indentWithTabs)for(var Ge=Math.floor(Pe/bt);Ge;--Ge)Ve+=bt,te+=" ";if(Ve<Pe&&(te+=ve(Pe-Ve)),te!=Zt)return Zu(dt,te,on(st,0),on(st,Zt.length),"+input"),jt.stateAfter=null,!0;for(var Fn=0;Fn<dt.sel.ranges.length;Fn++){var In=dt.sel.ranges[Fn];if(In.head.line==st&&In.head.ch<Zt.length){var _n=on(st,Zt.length);gu(dt,Fn,new so(_n,_n));break}}}var ma=null;function yu(it){ma=it}function Og(it,st,ht,ut,dt){var Pt=it.doc;it.display.shift=!1,ut||(ut=Pt.sel);var bt=+new Date-200,jt=dt=="paste"||it.state.pasteIncoming>bt,Ot=en(st),Zt=null;if(jt&&ut.ranges.length>1)if(ma&&ma.text.join(`
`)==st){if(ut.ranges.length%ma.text.length==0){Zt=[];for(var Pe=0;Pe<ma.text.length;Pe++)Zt.push(Pt.splitLines(ma.text[Pe]))}}else Ot.length==ut.ranges.length&&it.options.pasteLinesPerSelection&&(Zt=Sn(Ot,function(oi){return[oi]}));for(var te=it.curOp.updateInput,Ve=ut.ranges.length-1;Ve>=0;Ve--){var Ge=ut.ranges[Ve],Fn=Ge.from(),In=Ge.to();Ge.empty()&&(ht&&ht>0?Fn=on(Fn.line,Fn.ch-ht):it.state.overwrite&&!jt?In=on(In.line,Math.min(Se(Pt,In.line).text.length,In.ch+Le(Ot).length)):jt&&ma&&ma.lineWise&&ma.text.join(`
`)==Ot.join(`
`)&&(Fn=In=on(Fn.line,0)));var _n={from:Fn,to:In,text:Zt?Zt[Ve%Zt.length]:Ot,origin:dt||(jt?"paste":it.state.cutIncoming>bt?"cut":"+input")};du(it.doc,_n),Pi(it,"inputRead",it,_n)}st&&!jt&&Dh(it,st),bA(it),it.curOp.updateInput<2&&(it.curOp.updateInput=te),it.curOp.typing=!0,it.state.pasteIncoming=it.state.cutIncoming=-1}function Ih(it,st){var ht=it.clipboardData&&it.clipboardData.getData("Text");if(ht)return it.preventDefault(),!st.isReadOnly()&&!st.options.disableInput&&Jr(st,function(){return Og(st,ht,0,null,"paste")}),!0}function Dh(it,st){if(!(!it.options.electricChars||!it.options.smartIndent))for(var ht=it.doc.sel,ut=ht.ranges.length-1;ut>=0;ut--){var dt=ht.ranges[ut];if(!(dt.head.ch>100||ut&&ht.ranges[ut-1].head.line==dt.head.line)){var Pt=it.getModeAt(dt.head),bt=!1;if(Pt.electricChars){for(var jt=0;jt<Pt.electricChars.length;jt++)if(st.indexOf(Pt.electricChars.charAt(jt))>-1){bt=ws(it,dt.head.line,"smart");break}}else Pt.electricInput&&Pt.electricInput.test(Se(it.doc,dt.head.line).text.slice(0,dt.head.ch))&&(bt=ws(it,dt.head.line,"smart"));bt&&Pi(it,"electricInput",it,dt.head.line)}}}function Uf(it){for(var st=[],ht=[],ut=0;ut<it.doc.sel.ranges.length;ut++){var dt=it.doc.sel.ranges[ut].head.line,Pt={anchor:on(dt,0),head:on(dt+1,0)};ht.push(Pt),st.push(it.getRange(Pt.anchor,Pt.head))}return{text:st,ranges:ht}}function If(it,st,ht,ut){it.setAttribute("autocorrect",ht?"":"off"),it.setAttribute("autocapitalize",ut?"":"off"),it.setAttribute("spellcheck",!!st)}function Ed(){var it=le("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),st=le("div",[it],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return ne?it.style.width="1000px":it.setAttribute("wrap","off"),Ut&&(it.style.border="1px solid black"),If(it),st}function DA(it){var st=it.optionHandlers,ht=it.helpers={};it.prototype={constructor:it,focus:function(){window.focus(),this.display.input.focus()},setOption:function(ut,dt){var Pt=this.options,bt=Pt[ut];Pt[ut]==dt&&ut!="mode"||(Pt[ut]=dt,st.hasOwnProperty(ut)&&Bs(this,st[ut])(this,dt,bt),yr(this,"optionChange",this,ut))},getOption:function(ut){return this.options[ut]},getDoc:function(){return this.doc},addKeyMap:function(ut,dt){this.state.keyMaps[dt?"push":"unshift"](ys(ut))},removeKeyMap:function(ut){for(var dt=this.state.keyMaps,Pt=0;Pt<dt.length;++Pt)if(dt[Pt]==ut||dt[Pt].name==ut)return dt.splice(Pt,1),!0},addOverlay:Us(function(ut,dt){var Pt=ut.token?ut:it.getMode(this.options,ut);if(Pt.startState)throw new Error("Overlays may not be stateful.");xn(this.state.overlays,{mode:Pt,modeSpec:ut,opaque:dt&&dt.opaque,priority:dt&&dt.priority||0},function(bt){return bt.priority}),this.state.modeGen++,Eo(this)}),removeOverlay:Us(function(ut){for(var dt=this.state.overlays,Pt=0;Pt<dt.length;++Pt){var bt=dt[Pt].modeSpec;if(bt==ut||typeof ut=="string"&&bt.name==ut){dt.splice(Pt,1),this.state.modeGen++,Eo(this);return}}}),indentLine:Us(function(ut,dt,Pt){typeof dt!="string"&&typeof dt!="number"&&(dt==null?dt=this.options.smartIndent?"smart":"prev":dt=dt?"add":"subtract"),pi(this.doc,ut)&&ws(this,ut,dt,Pt)}),indentSelection:Us(function(ut){for(var dt=this.doc.sel.ranges,Pt=-1,bt=0;bt<dt.length;bt++){var jt=dt[bt];if(jt.empty())jt.head.line>Pt&&(ws(this,jt.head.line,ut,!0),Pt=jt.head.line,bt==this.doc.sel.primIndex&&bA(this));else{var Ot=jt.from(),Zt=jt.to(),Pe=Math.max(Pt,Ot.line);Pt=Math.min(this.lastLine(),Zt.line-(Zt.ch?0:1))+1;for(var te=Pe;te<Pt;++te)ws(this,te,ut);var Ve=this.doc.sel.ranges;Ot.ch==0&&dt.length==Ve.length&&Ve[bt].from().ch>0&&gu(this.doc,bt,new so(Ot,Ve[bt].to()),He)}}}),getTokenAt:function(ut,dt){return hr(this,ut,dt)},getLineTokens:function(ut,dt){return hr(this,on(ut),dt,!0)},getTokenTypeAt:function(ut){ut=Ze(this.doc,ut);var dt=Ji(this,Se(this.doc,ut.line)),Pt=0,bt=(dt.length-1)/2,jt=ut.ch,Ot;if(jt==0)Ot=dt[2];else for(;;){var Zt=Pt+bt>>1;if((Zt?dt[Zt*2-1]:0)>=jt)bt=Zt;else if(dt[Zt*2+1]<jt)Pt=Zt+1;else{Ot=dt[Zt*2+2];break}}var Pe=Ot?Ot.indexOf("overlay "):-1;return Pe<0?Ot:Pe==0?null:Ot.slice(0,Pe-1)},getModeAt:function(ut){var dt=this.doc.mode;return dt.innerMode?it.innerMode(dt,this.getTokenAt(ut).state).mode:dt},getHelper:function(ut,dt){return this.getHelpers(ut,dt)[0]},getHelpers:function(ut,dt){var Pt=[];if(!ht.hasOwnProperty(dt))return Pt;var bt=ht[dt],jt=this.getModeAt(ut);if(typeof jt[dt]=="string")bt[jt[dt]]&&Pt.push(bt[jt[dt]]);else if(jt[dt])for(var Ot=0;Ot<jt[dt].length;Ot++){var Zt=bt[jt[dt][Ot]];Zt&&Pt.push(Zt)}else jt.helperType&&bt[jt.helperType]?Pt.push(bt[jt.helperType]):bt[jt.name]&&Pt.push(bt[jt.name]);for(var Pe=0;Pe<bt._global.length;Pe++){var te=bt._global[Pe];te.pred(jt,this)&&je(Pt,te.val)==-1&&Pt.push(te.val)}return Pt},getStateAfter:function(ut,dt){var Pt=this.doc;return ut=Oe(Pt,ut==null?Pt.first+Pt.size-1:ut),zi(this,ut+1,dt).state},cursorCoords:function(ut,dt){var Pt,bt=this.doc.sel.primary();return ut==null?Pt=bt.head:typeof ut=="object"?Pt=Ze(this.doc,ut):Pt=ut?bt.from():bt.to(),Ko(this,Pt,dt||"page")},charCoords:function(ut,dt){return Hu(this,Ze(this.doc,ut),dt||"page")},coordsChar:function(ut,dt){return ut=mg(this,ut,dt||"page"),kl(this,ut.left,ut.top)},lineAtHeight:function(ut,dt){return ut=mg(this,{top:ut,left:0},dt||"page").top,Un(this.doc,ut+this.display.viewOffset)},heightAtLine:function(ut,dt,Pt){var bt=!1,jt;if(typeof ut=="number"){var Ot=this.doc.first+this.doc.size-1;ut<this.doc.first?ut=this.doc.first:ut>Ot&&(ut=Ot,bt=!0),jt=Se(this.doc,ut)}else jt=ut;return Qs(this,jt,{top:0,left:0},dt||"page",Pt||bt).top+(bt?this.doc.height-Xr(jt):0)},defaultTextHeight:function(){return AA(this.display)},defaultCharWidth:function(){return Ou(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(ut,dt,Pt,bt,jt){var Ot=this.display;ut=Ko(this,Ze(this.doc,ut));var Zt=ut.bottom,Pe=ut.left;if(dt.style.position="absolute",dt.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(dt),Ot.sizer.appendChild(dt),bt=="over")Zt=ut.top;else if(bt=="above"||bt=="near"){var te=Math.max(Ot.wrapper.clientHeight,this.doc.height),Ve=Math.max(Ot.sizer.clientWidth,Ot.lineSpace.clientWidth);(bt=="above"||ut.bottom+dt.offsetHeight>te)&&ut.top>dt.offsetHeight?Zt=ut.top-dt.offsetHeight:ut.bottom+dt.offsetHeight<=te&&(Zt=ut.bottom),Pe+dt.offsetWidth>Ve&&(Pe=Ve-dt.offsetWidth)}dt.style.top=Zt+"px",dt.style.left=dt.style.right="",jt=="right"?(Pe=Ot.sizer.clientWidth-dt.offsetWidth,dt.style.right="0px"):(jt=="left"?Pe=0:jt=="middle"&&(Pe=(Ot.sizer.clientWidth-dt.offsetWidth)/2),dt.style.left=Pe+"px"),Pt&&vg(this,{left:Pe,top:Zt,right:Pe+dt.offsetWidth,bottom:Zt+dt.offsetHeight})},triggerOnKeyDown:Us(Ug),triggerOnKeyPress:Us(Xl),triggerOnKeyUp:xd,triggerOnMouseDown:Us(wl),execCommand:function(ut){if(pu.hasOwnProperty(ut))return pu[ut].call(null,this)},triggerElectric:Us(function(ut){Dh(this,ut)}),findPosH:function(ut,dt,Pt,bt){var jt=1;dt<0&&(jt=-1,dt=-dt);for(var Ot=Ze(this.doc,ut),Zt=0;Zt<dt&&(Ot=Hh(this.doc,Ot,jt,Pt,bt),!Ot.hitSide);++Zt);return Ot},moveH:Us(function(ut,dt){var Pt=this;this.extendSelectionsBy(function(bt){return Pt.display.shift||Pt.doc.extend||bt.empty()?Hh(Pt.doc,bt.head,ut,dt,Pt.options.rtlMoveVisually):ut<0?bt.from():bt.to()},Cn)}),deleteH:Us(function(ut,dt){var Pt=this.doc.sel,bt=this.doc;Pt.somethingSelected()?bt.replaceSelection("",null,"+delete"):Ws(this,function(jt){var Ot=Hh(bt,jt.head,ut,dt,!1);return ut<0?{from:Ot,to:jt.head}:{from:jt.head,to:Ot}})}),findPosV:function(ut,dt,Pt,bt){var jt=1,Ot=bt;dt<0&&(jt=-1,dt=-dt);for(var Zt=Ze(this.doc,ut),Pe=0;Pe<dt;++Pe){var te=Ko(this,Zt,"div");if(Ot==null?Ot=te.left:te.left=Ot,Zt=wu(this,te,jt,Pt),Zt.hitSide)break}return Zt},moveV:Us(function(ut,dt){var Pt=this,bt=this.doc,jt=[],Ot=!this.display.shift&&!bt.extend&&bt.sel.somethingSelected();if(bt.extendSelectionsBy(function(Pe){if(Ot)return ut<0?Pe.from():Pe.to();var te=Ko(Pt,Pe.head,"div");Pe.goalColumn!=null&&(te.left=Pe.goalColumn),jt.push(te.left);var Ve=wu(Pt,te,ut,dt);return dt=="page"&&Pe==bt.sel.primary()&&df(Pt,Hu(Pt,Ve,"div").top-te.top),Ve},Cn),jt.length)for(var Zt=0;Zt<bt.sel.ranges.length;Zt++)bt.sel.ranges[Zt].goalColumn=jt[Zt]}),findWordAt:function(ut){var dt=this.doc,Pt=Se(dt,ut.line).text,bt=ut.ch,jt=ut.ch;if(Pt){var Ot=this.getHelper(ut,"wordChars");(ut.sticky=="before"||jt==Pt.length)&&bt?--bt:++jt;for(var Zt=Pt.charAt(bt),Pe=Wt(Zt,Ot)?function(te){return Wt(te,Ot)}:/\s/.test(Zt)?function(te){return/\s/.test(te)}:function(te){return!/\s/.test(te)&&!Wt(te)};bt>0&&Pe(Pt.charAt(bt-1));)--bt;for(;jt<Pt.length&&Pe(Pt.charAt(jt));)++jt}return new so(on(ut.line,bt),on(ut.line,jt))},toggleOverwrite:function(ut){ut!=null&&ut==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?sn(this.display.cursorDiv,"CodeMirror-overwrite"):Jt(this.display.cursorDiv,"CodeMirror-overwrite"),yr(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==fn()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Us(function(ut,dt){uA(this,ut,dt)}),getScrollInfo:function(){var ut=this.display.scroller;return{left:ut.scrollLeft,top:ut.scrollTop,height:ut.scrollHeight-Ga(this)-this.display.barHeight,width:ut.scrollWidth-Ga(this)-this.display.barWidth,clientHeight:ls(this),clientWidth:Ks(this)}},scrollIntoView:Us(function(ut,dt){ut==null?(ut={from:this.doc.sel.primary().head,to:null},dt==null&&(dt=this.options.cursorScrollMargin)):typeof ut=="number"?ut={from:on(ut,0),to:null}:ut.from==null&&(ut={from:ut,to:null}),ut.to||(ut.to=ut.from),ut.margin=dt||0,ut.from.line!=null?Rr(this,ut):cf(this,ut.from,ut.to,ut.margin)}),setSize:Us(function(ut,dt){var Pt=this,bt=function(Ot){return typeof Ot=="number"||/^\d+$/.test(String(Ot))?Ot+"px":Ot};ut!=null&&(this.display.wrapper.style.width=bt(ut)),dt!=null&&(this.display.wrapper.style.height=bt(dt)),this.options.lineWrapping&&La(this);var jt=this.display.viewFrom;this.doc.iter(jt,this.display.viewTo,function(Ot){if(Ot.widgets){for(var Zt=0;Zt<Ot.widgets.length;Zt++)if(Ot.widgets[Zt].noHScroll){mr(Pt,jt,"widget");break}}++jt}),this.curOp.forceUpdate=!0,yr(this,"refresh",this)}),operation:function(ut){return Jr(this,ut)},startOperation:function(){return nu(this)},endOperation:function(){return iu(this)},refresh:Us(function(){var ut=this.display.cachedTextHeight;Eo(this),this.curOp.forceUpdate=!0,pl(this),uA(this,this.doc.scrollLeft,this.doc.scrollTop),su(this.display),(ut==null||Math.abs(ut-AA(this.display))>.5||this.options.lineWrapping)&&Ki(this),yr(this,"refresh",this)}),swapDoc:Us(function(ut){var dt=this.doc;return dt.cm=null,this.state.selectingText&&this.state.selectingText(),Cs(this,ut),pl(this),this.display.input.reset(),uA(this,ut.scrollLeft,ut.scrollTop),this.curOp.forceScroll=!0,Pi(this,"swapDoc",this,dt),dt}),phrase:function(ut){var dt=this.options.phrases;return dt&&Object.prototype.hasOwnProperty.call(dt,ut)?dt[ut]:ut},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Wo(it),it.registerHelper=function(ut,dt,Pt){ht.hasOwnProperty(ut)||(ht[ut]=it[ut]={_global:[]}),ht[ut][dt]=Pt},it.registerGlobalHelper=function(ut,dt,Pt,bt){it.registerHelper(ut,dt,bt),ht[ut]._global.push({pred:Pt,val:bt})}}function Hh(it,st,ht,ut,dt){var Pt=st,bt=ht,jt=Se(it,st.line),Ot=dt&&it.direction=="rtl"?-ht:ht;function Zt(){var bi=st.line+Ot;return bi<it.first||bi>=it.first+it.size?!1:(st=new on(bi,st.ch,st.sticky),jt=Se(it,bi))}function Pe(bi){var Bi;if(ut=="codepoint"){var Di=jt.text.charCodeAt(st.ch+(ut>0?0:-1));isNaN(Di)?Bi=null:Bi=new on(st.line,Math.max(0,Math.min(jt.text.length,st.ch+ht*(Di>=55296&&Di<56320?2:1))),-ht)}else dt?Bi=Mh(it.cm,jt,st,ht):Bi=fs(jt,st,ht);if(Bi==null)if(!bi&&Zt())st=Eh(dt,it.cm,jt,st.line,Ot);else return!1;else st=Bi;return!0}if(ut=="char"||ut=="codepoint")Pe();else if(ut=="column")Pe(!0);else if(ut=="word"||ut=="group")for(var te=null,Ve=ut=="group",Ge=it.cm&&it.cm.getHelper(st,"wordChars"),Fn=!0;!(ht<0&&!Pe(!Fn));Fn=!1){var In=jt.text.charAt(st.ch)||`
`,_n=Wt(In,Ge)?"w":Ve&&In==`
`?"n":!Ve||/\s/.test(In)?null:"p";if(Ve&&!Fn&&!_n&&(_n="s"),te&&te!=_n){ht<0&&(ht=1,Pe(),st.sticky="after");break}if(_n&&(te=_n),ht>0&&!Pe(!Fn))break}var oi=Pg(it,st,Pt,bt,!0);return ie(Pt,oi)&&(oi.hitSide=!0),oi}function wu(it,st,ht,ut){var dt=it.doc,Pt=st.left,bt;if(ut=="page"){var jt=Math.min(it.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Ot=Math.max(jt-.5*AA(it.display),3);bt=(ht>0?st.bottom:st.top)+ht*Ot}else ut=="line"&&(bt=ht>0?st.bottom+3:st.top-3);for(var Zt;Zt=kl(it,Pt,bt),!!Zt.outside;){if(ht<0?bt<=0:bt>=dt.height){Zt.hitSide=!0;break}bt+=ht*5}return Zt}var po=function(it){this.cm=it,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ht,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};po.prototype.init=function(it){var st=this,ht=this,ut=ht.cm,dt=ht.div=it.lineDiv;If(dt,ut.options.spellcheck,ut.options.autocorrect,ut.options.autocapitalize);function Pt(jt){for(var Ot=jt.target;Ot;Ot=Ot.parentNode){if(Ot==dt)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Ot.className))break}return!1}fi(dt,"paste",function(jt){!Pt(jt)||or(ut,jt)||Ih(jt,ut)||we<=11&&setTimeout(Bs(ut,function(){return st.updateFromDOM()}),20)}),fi(dt,"compositionstart",function(jt){st.composing={data:jt.data,done:!1}}),fi(dt,"compositionupdate",function(jt){st.composing||(st.composing={data:jt.data,done:!1})}),fi(dt,"compositionend",function(jt){st.composing&&(jt.data!=st.composing.data&&st.readFromDOMSoon(),st.composing.done=!0)}),fi(dt,"touchstart",function(){return ht.forceCompositionEnd()}),fi(dt,"input",function(){st.composing||st.readFromDOMSoon()});function bt(jt){if(!(!Pt(jt)||or(ut,jt))){if(ut.somethingSelected())yu({lineWise:!1,text:ut.getSelections()}),jt.type=="cut"&&ut.replaceSelection("",null,"cut");else if(ut.options.lineWiseCopyCut){var Ot=Uf(ut);yu({lineWise:!0,text:Ot.text}),jt.type=="cut"&&ut.operation(function(){ut.setSelections(Ot.ranges,0,He),ut.replaceSelection("",null,"cut")})}else return;if(jt.clipboardData){jt.clipboardData.clearData();var Zt=ma.text.join(`
`);if(jt.clipboardData.setData("Text",Zt),jt.clipboardData.getData("Text")==Zt){jt.preventDefault();return}}var Pe=Ed(),te=Pe.firstChild;ut.display.lineSpace.insertBefore(Pe,ut.display.lineSpace.firstChild),te.value=ma.text.join(`
`);var Ve=document.activeElement;hi(te),setTimeout(function(){ut.display.lineSpace.removeChild(Pe),Ve.focus(),Ve==dt&&ht.showPrimarySelection()},50)}}fi(dt,"copy",bt),fi(dt,"cut",bt)},po.prototype.screenReaderLabelChanged=function(it){it?this.div.setAttribute("aria-label",it):this.div.removeAttribute("aria-label")},po.prototype.prepareSelection=function(){var it=tu(this.cm,!1);return it.focus=document.activeElement==this.div,it},po.prototype.showSelection=function(it,st){!it||!this.cm.display.view.length||((it.focus||st)&&this.showPrimarySelection(),this.showMultipleSelections(it))},po.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},po.prototype.showPrimarySelection=function(){var it=this.getSelection(),st=this.cm,ht=st.doc.sel.primary(),ut=ht.from(),dt=ht.to();if(st.display.viewTo==st.display.viewFrom||ut.line>=st.display.viewTo||dt.line<st.display.viewFrom){it.removeAllRanges();return}var Pt=dA(st,it.anchorNode,it.anchorOffset),bt=dA(st,it.focusNode,it.focusOffset);if(!(Pt&&!Pt.bad&&bt&&!bt.bad&&ni(Ce(Pt,bt),ut)==0&&ni(ye(Pt,bt),dt)==0)){var jt=st.display.view,Ot=ut.line>=st.display.viewFrom&&HA(st,ut)||{node:jt[0].measure.map[2],offset:0},Zt=dt.line<st.display.viewTo&&HA(st,dt);if(!Zt){var Pe=jt[jt.length-1].measure,te=Pe.maps?Pe.maps[Pe.maps.length-1]:Pe.map;Zt={node:te[te.length-1],offset:te[te.length-2]-te[te.length-3]}}if(!Ot||!Zt){it.removeAllRanges();return}var Ve=it.rangeCount&&it.getRangeAt(0),Ge;try{Ge=me(Ot.node,Ot.offset,Zt.offset,Zt.node)}catch(Fn){}Ge&&(!Tt&&st.state.focused?(it.collapse(Ot.node,Ot.offset),Ge.collapsed||(it.removeAllRanges(),it.addRange(Ge))):(it.removeAllRanges(),it.addRange(Ge)),Ve&&it.anchorNode==null?it.addRange(Ve):Tt&&this.startGracePeriod()),this.rememberSelection()}},po.prototype.startGracePeriod=function(){var it=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){it.gracePeriod=!1,it.selectionChanged()&&it.cm.operation(function(){return it.cm.curOp.selectionChanged=!0})},20)},po.prototype.showMultipleSelections=function(it){he(this.cm.display.cursorDiv,it.cursors),he(this.cm.display.selectionDiv,it.selection)},po.prototype.rememberSelection=function(){var it=this.getSelection();this.lastAnchorNode=it.anchorNode,this.lastAnchorOffset=it.anchorOffset,this.lastFocusNode=it.focusNode,this.lastFocusOffset=it.focusOffset},po.prototype.selectionInEditor=function(){var it=this.getSelection();if(!it.rangeCount)return!1;var st=it.getRangeAt(0).commonAncestorContainer;return Je(this.div,st)},po.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},po.prototype.blur=function(){this.div.blur()},po.prototype.getField=function(){return this.div},po.prototype.supportsTouch=function(){return!0},po.prototype.receivedFocus=function(){var it=this;this.selectionInEditor()?this.pollSelection():Jr(this.cm,function(){return it.cm.curOp.selectionChanged=!0});function st(){it.cm.state.focused&&(it.pollSelection(),it.polling.set(it.cm.options.pollInterval,st))}this.polling.set(this.cm.options.pollInterval,st)},po.prototype.selectionChanged=function(){var it=this.getSelection();return it.anchorNode!=this.lastAnchorNode||it.anchorOffset!=this.lastAnchorOffset||it.focusNode!=this.lastFocusNode||it.focusOffset!=this.lastFocusOffset},po.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var it=this.getSelection(),st=this.cm;if(et&&fe&&this.cm.display.gutterSpecs.length&&Df(it.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var ht=dA(st,it.anchorNode,it.anchorOffset),ut=dA(st,it.focusNode,it.focusOffset);ht&&ut&&Jr(st,function(){ea(st.doc,NA(ht,ut),He),(ht.bad||ut.bad)&&(st.curOp.selectionChanged=!0)})}}},po.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var it=this.cm,st=it.display,ht=it.doc.sel.primary(),ut=ht.from(),dt=ht.to();if(ut.ch==0&&ut.line>it.firstLine()&&(ut=on(ut.line-1,Se(it.doc,ut.line-1).length)),dt.ch==Se(it.doc,dt.line).text.length&&dt.line<it.lastLine()&&(dt=on(dt.line+1,0)),ut.line<st.viewFrom||dt.line>st.viewTo-1)return!1;var Pt,bt,jt;ut.line==st.viewFrom||(Pt=ja(it,ut.line))==0?(bt=pe(st.view[0].line),jt=st.view[0].node):(bt=pe(st.view[Pt].line),jt=st.view[Pt-1].node.nextSibling);var Ot=ja(it,dt.line),Zt,Pe;if(Ot==st.view.length-1?(Zt=st.viewTo-1,Pe=st.lineDiv.lastChild):(Zt=pe(st.view[Ot+1].line)-1,Pe=st.view[Ot+1].node.previousSibling),!jt)return!1;for(var te=it.doc.splitLines(bl(it,jt,Pe,bt,Zt)),Ve=Pn(it.doc,on(bt,0),on(Zt,Se(it.doc,Zt).text.length));te.length>1&&Ve.length>1;)if(Le(te)==Le(Ve))te.pop(),Ve.pop(),Zt--;else if(te[0]==Ve[0])te.shift(),Ve.shift(),bt++;else break;for(var Ge=0,Fn=0,In=te[0],_n=Ve[0],oi=Math.min(In.length,_n.length);Ge<oi&&In.charCodeAt(Ge)==_n.charCodeAt(Ge);)++Ge;for(var bi=Le(te),Bi=Le(Ve),Di=Math.min(bi.length-(te.length==1?Ge:0),Bi.length-(Ve.length==1?Ge:0));Fn<Di&&bi.charCodeAt(bi.length-Fn-1)==Bi.charCodeAt(Bi.length-Fn-1);)++Fn;if(te.length==1&&Ve.length==1&&bt==ut.line)for(;Ge&&Ge>ut.ch&&bi.charCodeAt(bi.length-Fn-1)==Bi.charCodeAt(Bi.length-Fn-1);)Ge--,Fn++;te[te.length-1]=bi.slice(0,bi.length-Fn).replace(/^\u200b+/,""),te[0]=te[0].slice(Ge).replace(/\u200b+$/,"");var ar=on(bt,Ge),wi=on(Zt,Ve.length?Le(Ve).length-Fn:0);if(te.length>1||te[0]||ni(ar,wi))return Zu(it.doc,te,ar,wi,"+input"),!0},po.prototype.ensurePolled=function(){this.forceCompositionEnd()},po.prototype.reset=function(){this.forceCompositionEnd()},po.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},po.prototype.readFromDOMSoon=function(){var it=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(it.readDOMTimeout=null,it.composing)if(it.composing.done)it.composing=null;else return;it.updateFromDOM()},80))},po.prototype.updateFromDOM=function(){var it=this;(this.cm.isReadOnly()||!this.pollContent())&&Jr(this.cm,function(){return Eo(it.cm)})},po.prototype.setUneditable=function(it){it.contentEditable="false"},po.prototype.onKeyPress=function(it){it.charCode==0||this.composing||(it.preventDefault(),this.cm.isReadOnly()||Bs(this.cm,Og)(this.cm,String.fromCharCode(it.charCode==null?it.keyCode:it.charCode),0))},po.prototype.readOnlyChanged=function(it){this.div.contentEditable=String(it!="nocursor")},po.prototype.onContextMenu=function(){},po.prototype.resetPosition=function(){},po.prototype.needsContentAttribute=!0;function HA(it,st){var ht=MA(it,st.line);if(!ht||ht.hidden)return null;var ut=Se(it.doc,st.line),dt=Ns(ht,ut,st.line),Pt=gi(ut,it.doc.direction),bt="left";if(Pt){var jt=Ln(Pt,st.ch);bt=jt%2?"right":"left"}var Ot=pg(dt.map,st.ch,bt);return Ot.offset=Ot.collapse=="right"?Ot.end:Ot.start,Ot}function Df(it){for(var st=it;st;st=st.parentNode)if(/CodeMirror-gutter-wrapper/.test(st.className))return!0;return!1}function ns(it,st){return st&&(it.bad=!0),it}function bl(it,st,ht,ut,dt){var Pt="",bt=!1,jt=it.doc.lineSeparator(),Ot=!1;function Zt(Ge){return function(Fn){return Fn.id==Ge}}function Pe(){bt&&(Pt+=jt,Ot&&(Pt+=jt),bt=Ot=!1)}function te(Ge){Ge&&(Pe(),Pt+=Ge)}function Ve(Ge){if(Ge.nodeType==1){var Fn=Ge.getAttribute("cm-text");if(Fn){te(Fn);return}var In=Ge.getAttribute("cm-marker"),_n;if(In){var oi=it.findMarks(on(ut,0),on(dt+1,0),Zt(+In));oi.length&&(_n=oi[0].find(0))&&te(Pn(it.doc,_n.from,_n.to).join(jt));return}if(Ge.getAttribute("contenteditable")=="false")return;var bi=/^(pre|div|p|li|table|br)$/i.test(Ge.nodeName);if(!/^br$/i.test(Ge.nodeName)&&Ge.textContent.length==0)return;bi&&Pe();for(var Bi=0;Bi<Ge.childNodes.length;Bi++)Ve(Ge.childNodes[Bi]);/^(pre|p)$/i.test(Ge.nodeName)&&(Ot=!0),bi&&(bt=!0)}else Ge.nodeType==3&&te(Ge.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Ve(st),st!=ht;)st=st.nextSibling,Ot=!1;return Pt}function dA(it,st,ht){var ut;if(st==it.display.lineDiv){if(ut=it.display.lineDiv.childNodes[ht],!ut)return ns(it.clipPos(on(it.display.viewTo-1)),!0);st=null,ht=0}else for(ut=st;;ut=ut.parentNode){if(!ut||ut==it.display.lineDiv)return null;if(ut.parentNode&&ut.parentNode==it.display.lineDiv)break}for(var dt=0;dt<it.display.view.length;dt++){var Pt=it.display.view[dt];if(Pt.node==ut)return OA(Pt,st,ht)}}function OA(it,st,ht){var ut=it.text.firstChild,dt=!1;if(!st||!Je(ut,st))return ns(on(pe(it.line),0),!0);if(st==ut&&(dt=!0,st=ut.childNodes[ht],ht=0,!st)){var Pt=it.rest?Le(it.rest):it.line;return ns(on(pe(Pt),Pt.text.length),dt)}var bt=st.nodeType==3?st:null,jt=st;for(!bt&&st.childNodes.length==1&&st.firstChild.nodeType==3&&(bt=st.firstChild,ht&&(ht=bt.nodeValue.length));jt.parentNode!=ut;)jt=jt.parentNode;var Ot=it.measure,Zt=Ot.maps;function Pe(_n,oi,bi){for(var Bi=-1;Bi<(Zt?Zt.length:0);Bi++)for(var Di=Bi<0?Ot.map:Zt[Bi],ar=0;ar<Di.length;ar+=3){var wi=Di[ar+2];if(wi==_n||wi==oi){var Cr=pe(Bi<0?it.line:it.rest[Bi]),Io=Di[ar]+bi;return(bi<0||wi!=_n)&&(Io=Di[ar+(bi?1:0)]),on(Cr,Io)}}}var te=Pe(bt,jt,ht);if(te)return ns(te,dt);for(var Ve=jt.nextSibling,Ge=bt?bt.nodeValue.length-ht:0;Ve;Ve=Ve.nextSibling){if(te=Pe(Ve,Ve.firstChild,0),te)return ns(on(te.line,te.ch-Ge),dt);Ge+=Ve.textContent.length}for(var Fn=jt.previousSibling,In=ht;Fn;Fn=Fn.previousSibling){if(te=Pe(Fn,Fn.firstChild,-1),te)return ns(on(te.line,te.ch+In),dt);In+=Fn.textContent.length}}var Uo=function(it){this.cm=it,this.prevInput="",this.pollingFast=!1,this.polling=new Ht,this.hasSelection=!1,this.composing=null};Uo.prototype.init=function(it){var st=this,ht=this,ut=this.cm;this.createField(it);var dt=this.textarea;it.wrapper.insertBefore(this.wrapper,it.wrapper.firstChild),Ut&&(dt.style.width="0px"),fi(dt,"input",function(){be&&we>=9&&st.hasSelection&&(st.hasSelection=null),ht.poll()}),fi(dt,"paste",function(bt){or(ut,bt)||Ih(bt,ut)||(ut.state.pasteIncoming=+new Date,ht.fastPoll())});function Pt(bt){if(!or(ut,bt)){if(ut.somethingSelected())yu({lineWise:!1,text:ut.getSelections()});else if(ut.options.lineWiseCopyCut){var jt=Uf(ut);yu({lineWise:!0,text:jt.text}),bt.type=="cut"?ut.setSelections(jt.ranges,null,He):(ht.prevInput="",dt.value=jt.text.join(`
`),hi(dt))}else return;bt.type=="cut"&&(ut.state.cutIncoming=+new Date)}}fi(dt,"cut",Pt),fi(dt,"copy",Pt),fi(it.scroller,"paste",function(bt){if(!(da(it,bt)||or(ut,bt))){if(!dt.dispatchEvent){ut.state.pasteIncoming=+new Date,ht.focus();return}var jt=new Event("paste");jt.clipboardData=bt.clipboardData,dt.dispatchEvent(jt)}}),fi(it.lineSpace,"selectstart",function(bt){da(it,bt)||Fo(bt)}),fi(dt,"compositionstart",function(){var bt=ut.getCursor("from");ht.composing&&ht.composing.range.clear(),ht.composing={start:bt,range:ut.markText(bt,ut.getCursor("to"),{className:"CodeMirror-composing"})}}),fi(dt,"compositionend",function(){ht.composing&&(ht.poll(),ht.composing.range.clear(),ht.composing=null)})},Uo.prototype.createField=function(it){this.wrapper=Ed(),this.textarea=this.wrapper.firstChild},Uo.prototype.screenReaderLabelChanged=function(it){it?this.textarea.setAttribute("aria-label",it):this.textarea.removeAttribute("aria-label")},Uo.prototype.prepareSelection=function(){var it=this.cm,st=it.display,ht=it.doc,ut=tu(it);if(it.options.moveInputWithCursor){var dt=Ko(it,ht.sel.primary().head,"div"),Pt=st.wrapper.getBoundingClientRect(),bt=st.lineDiv.getBoundingClientRect();ut.teTop=Math.max(0,Math.min(st.wrapper.clientHeight-10,dt.top+bt.top-Pt.top)),ut.teLeft=Math.max(0,Math.min(st.wrapper.clientWidth-10,dt.left+bt.left-Pt.left))}return ut},Uo.prototype.showSelection=function(it){var st=this.cm,ht=st.display;he(ht.cursorDiv,it.cursors),he(ht.selectionDiv,it.selection),it.teTop!=null&&(this.wrapper.style.top=it.teTop+"px",this.wrapper.style.left=it.teLeft+"px")},Uo.prototype.reset=function(it){if(!(this.contextMenuPending||this.composing)){var st=this.cm;if(st.somethingSelected()){this.prevInput="";var ht=st.getSelection();this.textarea.value=ht,st.state.focused&&hi(this.textarea),be&&we>=9&&(this.hasSelection=ht)}else it||(this.prevInput=this.textarea.value="",be&&we>=9&&(this.hasSelection=null))}},Uo.prototype.getField=function(){return this.textarea},Uo.prototype.supportsTouch=function(){return!1},Uo.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!nt||fn()!=this.textarea))try{this.textarea.focus()}catch(it){}},Uo.prototype.blur=function(){this.textarea.blur()},Uo.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Uo.prototype.receivedFocus=function(){this.slowPoll()},Uo.prototype.slowPoll=function(){var it=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){it.poll(),it.cm.state.focused&&it.slowPoll()})},Uo.prototype.fastPoll=function(){var it=!1,st=this;st.pollingFast=!0;function ht(){var ut=st.poll();!ut&&!it?(it=!0,st.polling.set(60,ht)):(st.pollingFast=!1,st.slowPoll())}st.polling.set(20,ht)},Uo.prototype.poll=function(){var it=this,st=this.cm,ht=this.textarea,ut=this.prevInput;if(this.contextMenuPending||!st.state.focused||Bt(ht)&&!ut&&!this.composing||st.isReadOnly()||st.options.disableInput||st.state.keySeq)return!1;var dt=ht.value;if(dt==ut&&!st.somethingSelected())return!1;if(be&&we>=9&&this.hasSelection===dt||gt&&/[\uf700-\uf7ff]/.test(dt))return st.display.input.reset(),!1;if(st.doc.sel==st.display.selForContextMenu){var Pt=dt.charCodeAt(0);if(Pt==8203&&!ut&&(ut="\u200B"),Pt==8666)return this.reset(),this.cm.execCommand("undo")}for(var bt=0,jt=Math.min(ut.length,dt.length);bt<jt&&ut.charCodeAt(bt)==dt.charCodeAt(bt);)++bt;return Jr(st,function(){Og(st,dt.slice(bt),ut.length-bt,null,it.composing?"*compose":null),dt.length>1e3||dt.indexOf(`
`)>-1?ht.value=it.prevInput="":it.prevInput=dt,it.composing&&(it.composing.range.clear(),it.composing.range=st.markText(it.composing.start,st.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Uo.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Uo.prototype.onKeyPress=function(){be&&we>=9&&(this.hasSelection=null),this.fastPoll()},Uo.prototype.onContextMenu=function(it){var st=this,ht=st.cm,ut=ht.display,dt=st.textarea;st.contextMenuPending&&st.contextMenuPending();var Pt=ta(ht,it),bt=ut.scroller.scrollTop;if(!Pt||Qe)return;var jt=ht.options.resetSelectionOnContextMenu;jt&&ht.doc.sel.contains(Pt)==-1&&Bs(ht,ea)(ht.doc,NA(Pt),He);var Ot=dt.style.cssText,Zt=st.wrapper.style.cssText,Pe=st.wrapper.offsetParent.getBoundingClientRect();st.wrapper.style.cssText="position: static",dt.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(it.clientY-Pe.top-5)+"px; left: "+(it.clientX-Pe.left-5)+`px;
z-index: 1000; background: `+(be?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var te;ne&&(te=window.scrollY),ut.input.focus(),ne&&window.scrollTo(null,te),ut.input.reset(),ht.somethingSelected()||(dt.value=st.prevInput=" "),st.contextMenuPending=Ge,ut.selForContextMenu=ht.doc.sel,clearTimeout(ut.detectingSelectAll);function Ve(){if(dt.selectionStart!=null){var In=ht.somethingSelected(),_n="\u200B"+(In?dt.value:"");dt.value="\u21DA",dt.value=_n,st.prevInput=In?"":"\u200B",dt.selectionStart=1,dt.selectionEnd=_n.length,ut.selForContextMenu=ht.doc.sel}}function Ge(){if(st.contextMenuPending==Ge&&(st.contextMenuPending=!1,st.wrapper.style.cssText=Zt,dt.style.cssText=Ot,be&&we<9&&ut.scrollbars.setScrollTop(ut.scroller.scrollTop=bt),dt.selectionStart!=null)){(!be||be&&we<9)&&Ve();var In=0,_n=function(){ut.selForContextMenu==ht.doc.sel&&dt.selectionStart==0&&dt.selectionEnd>0&&st.prevInput=="\u200B"?Bs(ht,gs)(ht):In++<10?ut.detectingSelectAll=setTimeout(_n,500):(ut.selForContextMenu=null,ut.input.reset())};ut.detectingSelectAll=setTimeout(_n,200)}}if(be&&we>=9&&Ve(),Nt){So(it);var Fn=function(){kr(window,"mouseup",Fn),setTimeout(Ge,20)};fi(window,"mouseup",Fn)}else setTimeout(Ge,50)},Uo.prototype.readOnlyChanged=function(it){it||this.reset(),this.textarea.disabled=it=="nocursor",this.textarea.readOnly=!!it},Uo.prototype.setUneditable=function(){},Uo.prototype.needsContentAttribute=!1;function Oh(it,st){if(st=st?fr(st):{},st.value=it.value,!st.tabindex&&it.tabIndex&&(st.tabindex=it.tabIndex),!st.placeholder&&it.placeholder&&(st.placeholder=it.placeholder),st.autofocus==null){var ht=fn();st.autofocus=ht==it||it.getAttribute("autofocus")!=null&&ht==document.body}function ut(){it.value=jt.getValue()}var dt;if(it.form&&(fi(it.form,"submit",ut),!st.leaveSubmitMethodAlone)){var Pt=it.form;dt=Pt.submit;try{var bt=Pt.submit=function(){ut(),Pt.submit=dt,Pt.submit(),Pt.submit=bt}}catch(Ot){}}st.finishInit=function(Ot){Ot.save=ut,Ot.getTextArea=function(){return it},Ot.toTextArea=function(){Ot.toTextArea=isNaN,ut(),it.parentNode.removeChild(Ot.getWrapperElement()),it.style.display="",it.form&&(kr(it.form,"submit",ut),!st.leaveSubmitMethodAlone&&typeof it.form.submit=="function"&&(it.form.submit=dt))}},it.style.display="none";var jt=jr(function(Ot){return it.parentNode.insertBefore(Ot,it.nextSibling)},st);return jt}function ol(it){it.off=kr,it.on=fi,it.wheelEventPixels=Va,it.Doc=Os,it.splitLines=en,it.countColumn=qt,it.findColumn=Jn,it.isWordChar=Dt,it.Pass=Kn,it.signal=yr,it.Line=fo,it.changeEnd=Au,it.scrollbarModel=od,it.Pos=on,it.cmpPos=ni,it.modes=un,it.mimeModes=wn,it.resolveMode=ke,it.getMode=Ee,it.modeExtensions=ue,it.extendMode=Ie,it.copyState=On,it.startState=Zn,it.innerMode=zn,it.commands=pu,it.keyMap=Wa,it.keyName=md,it.isModifierKey=Lh,it.lookupKey=rl,it.normalizeKeyMap=pd,it.StringStream=Fe,it.SharedTextMarker=Yl,it.TextMarker=ge,it.LineWidget=UA,it.e_preventDefault=Fo,it.e_stopPropagation=$r,it.e_stop=So,it.addClass=sn,it.contains=Je,it.rmClass=Jt,it.keyNames=gA}pc(jr),DA(jr);var cA="iter insert remove copy getEditor constructor".split(" ");for(var Rh in Os.prototype)Os.prototype.hasOwnProperty(Rh)&&je(cA,Rh)<0&&(jr.prototype[Rh]=function(it){return function(){return it.apply(this.doc,arguments)}}(Os.prototype[Rh]));return Wo(Os),jr.inputStyles={textarea:Uo,contenteditable:po},jr.defineMode=function(it){!jr.defaults.mode&&it!="null"&&(jr.defaults.mode=it),Hn.apply(this,arguments)},jr.defineMIME=di,jr.defineMode("null",function(){return{token:function(it){return it.skipToEnd()}}}),jr.defineMIME("text/plain","null"),jr.defineExtension=function(it,st){jr.prototype[it]=st},jr.defineDocExtension=function(it,st){Os.prototype[it]=st},jr.fromTextArea=Oh,ol(jr),jr.version="5.58.2",jr})},49047:function(yn,qn,ee){(function(Tt){Tt(ee(4631),ee(29589),ee(52539))})(function(Tt){"use strict";Tt.defineMode("markdown",function(Be,Ne){var ln=Tt.getMode(Be,"text/html"),be=ln.name=="null";function we(qt){if(Tt.findModeByName){var Ht=Tt.findModeByName(qt);Ht&&(qt=Ht.mime||Ht.mimes[0])}var je=Tt.getMode(Be,qt);return je.name=="null"?null:je}Ne.highlightFormatting===void 0&&(Ne.highlightFormatting=!1),Ne.maxBlockquoteDepth===void 0&&(Ne.maxBlockquoteDepth=0),Ne.taskLists===void 0&&(Ne.taskLists=!1),Ne.strikethrough===void 0&&(Ne.strikethrough=!1),Ne.emoji===void 0&&(Ne.emoji=!1),Ne.fencedCodeBlockHighlighting===void 0&&(Ne.fencedCodeBlockHighlighting=!0),Ne.fencedCodeBlockDefaultMode===void 0&&(Ne.fencedCodeBlockDefaultMode="text/plain"),Ne.xml===void 0&&(Ne.xml=!0),Ne.tokenTypeOverrides===void 0&&(Ne.tokenTypeOverrides={});var ne={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var De in ne)ne.hasOwnProperty(De)&&Ne.tokenTypeOverrides[De]&&(ne[De]=Ne.tokenTypeOverrides[De]);var fe=/^([*\-_])(?:\s*\1){2,}\s*$/,Qe=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,gn=/^\[(x| )\](?=\s)/i,Xe=Ne.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,kn=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Ut=/^[^#!\[\]*_\\<>` "'(~:]+/,et=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,nt=/^\s*\[[^\]]+?\]:.*$/,gt=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,lt=" ";function ct(qt,Ht,je){return Ht.f=Ht.inline=je,je(qt,Ht)}function yt(qt,Ht,je){return Ht.f=Ht.block=je,je(qt,Ht)}function Lt(qt){return!qt||!/\S/.test(qt.string)}function Nt(qt){if(qt.linkTitle=!1,qt.linkHref=!1,qt.linkText=!1,qt.em=!1,qt.strong=!1,qt.strikethrough=!1,qt.quote=0,qt.indentedCode=!1,qt.f==Jt){var Ht=be;if(!Ht){var je=Tt.innerMode(ln,qt.htmlState);Ht=je.mode.name=="xml"&&je.state.tagStart===null&&!je.state.context&&je.state.tokenize.isInText}Ht&&(qt.f=We,qt.block=Vt,qt.htmlState=null)}return qt.trailingSpace=0,qt.trailingSpaceNewLine=!1,qt.prevLine=qt.thisLine,qt.thisLine={stream:null},null}function Vt(qt,Ht){var je=qt.column()===Ht.indentation,Nn=Lt(Ht.prevLine.stream),Kn=Ht.indentedCode,He=Ht.prevLine.hr,mn=Ht.list!==!1,Cn=(Ht.listStack[Ht.listStack.length-1]||0)+3;Ht.indentedCode=!1;var Jn=Ht.indentation;if(Ht.indentationDiff===null&&(Ht.indentationDiff=Ht.indentation,mn)){for(Ht.list=null;Jn<Ht.listStack[Ht.listStack.length-1];)Ht.listStack.pop(),Ht.listStack.length?Ht.indentation=Ht.listStack[Ht.listStack.length-1]:Ht.list=!1;Ht.list!==!1&&(Ht.indentationDiff=Jn-Ht.listStack[Ht.listStack.length-1])}var bn=!Nn&&!He&&!Ht.prevLine.header&&(!mn||!Kn)&&!Ht.prevLine.fencedCodeEnd,ve=(Ht.list===!1||He||Nn)&&Ht.indentation<=Cn&&qt.match(fe),Le=null;if(Ht.indentationDiff>=4&&(Kn||Ht.prevLine.fencedCodeEnd||Ht.prevLine.header||Nn))return qt.skipToEnd(),Ht.indentedCode=!0,ne.code;if(qt.eatSpace())return null;if(je&&Ht.indentation<=Cn&&(Le=qt.match(Xe))&&Le[1].length<=6)return Ht.quote=0,Ht.header=Le[1].length,Ht.thisLine.header=!0,Ne.highlightFormatting&&(Ht.formatting="header"),Ht.f=Ht.inline,he(Ht);if(Ht.indentation<=Cn&&qt.eat(">"))return Ht.quote=je?1:Ht.quote+1,Ne.highlightFormatting&&(Ht.formatting="quote"),qt.eatSpace(),he(Ht);if(!ve&&!Ht.setext&&je&&Ht.indentation<=Cn&&(Le=qt.match(Qe))){var Sn=Le[1]?"ol":"ul";return Ht.indentation=Jn+qt.current().length,Ht.list=!0,Ht.quote=0,Ht.listStack.push(Ht.indentation),Ht.em=!1,Ht.strong=!1,Ht.code=!1,Ht.strikethrough=!1,Ne.taskLists&&qt.match(gn,!1)&&(Ht.taskList=!0),Ht.f=Ht.inline,Ne.highlightFormatting&&(Ht.formatting=["list","list-"+Sn]),he(Ht)}else{if(je&&Ht.indentation<=Cn&&(Le=qt.match(et,!0)))return Ht.quote=0,Ht.fencedEndRE=new RegExp(Le[1]+"+ *$"),Ht.localMode=Ne.fencedCodeBlockHighlighting&&we(Le[2]||Ne.fencedCodeBlockDefaultMode),Ht.localMode&&(Ht.localState=Tt.startState(Ht.localMode)),Ht.f=Ht.block=Ae,Ne.highlightFormatting&&(Ht.formatting="code-block"),Ht.code=-1,he(Ht);if(Ht.setext||(!bn||!mn)&&!Ht.quote&&Ht.list===!1&&!Ht.code&&!ve&&!nt.test(qt.string)&&(Le=qt.lookAhead(1))&&(Le=Le.match(kn)))return Ht.setext?(Ht.header=Ht.setext,Ht.setext=0,qt.skipToEnd(),Ne.highlightFormatting&&(Ht.formatting="header")):(Ht.header=Le[0].charAt(0)=="="?1:2,Ht.setext=Ht.header),Ht.thisLine.header=!0,Ht.f=Ht.inline,he(Ht);if(ve)return qt.skipToEnd(),Ht.hr=!0,Ht.thisLine.hr=!0,ne.hr;if(qt.peek()==="[")return ct(qt,Ht,ui)}return ct(qt,Ht,Ht.inline)}function Jt(qt,Ht){var je=ln.token(qt,Ht.htmlState);if(!be){var Nn=Tt.innerMode(ln,Ht.htmlState);(Nn.mode.name=="xml"&&Nn.state.tagStart===null&&!Nn.state.context&&Nn.state.tokenize.isInText||Ht.md_inside&&qt.current().indexOf(">")>-1)&&(Ht.f=We,Ht.block=Vt,Ht.htmlState=null)}return je}function Ae(qt,Ht){var je=Ht.listStack[Ht.listStack.length-1]||0,Nn=Ht.indentation<je,Kn=je+3;if(Ht.fencedEndRE&&Ht.indentation<=Kn&&(Nn||qt.match(Ht.fencedEndRE))){Ne.highlightFormatting&&(Ht.formatting="code-block");var He;return Nn||(He=he(Ht)),Ht.localMode=Ht.localState=null,Ht.block=Vt,Ht.f=We,Ht.fencedEndRE=null,Ht.code=0,Ht.thisLine.fencedCodeEnd=!0,Nn?yt(qt,Ht,Ht.block):He}else return Ht.localMode?Ht.localMode.token(qt,Ht.localState):(qt.skipToEnd(),ne.code)}function he(qt){var Ht=[];if(qt.formatting){Ht.push(ne.formatting),typeof qt.formatting=="string"&&(qt.formatting=[qt.formatting]);for(var je=0;je<qt.formatting.length;je++)Ht.push(ne.formatting+"-"+qt.formatting[je]),qt.formatting[je]==="header"&&Ht.push(ne.formatting+"-"+qt.formatting[je]+"-"+qt.header),qt.formatting[je]==="quote"&&(!Ne.maxBlockquoteDepth||Ne.maxBlockquoteDepth>=qt.quote?Ht.push(ne.formatting+"-"+qt.formatting[je]+"-"+qt.quote):Ht.push("error"))}if(qt.taskOpen)return Ht.push("meta"),Ht.length?Ht.join(" "):null;if(qt.taskClosed)return Ht.push("property"),Ht.length?Ht.join(" "):null;if(qt.linkHref?Ht.push(ne.linkHref,"url"):(qt.strong&&Ht.push(ne.strong),qt.em&&Ht.push(ne.em),qt.strikethrough&&Ht.push(ne.strikethrough),qt.emoji&&Ht.push(ne.emoji),qt.linkText&&Ht.push(ne.linkText),qt.code&&Ht.push(ne.code),qt.image&&Ht.push(ne.image),qt.imageAltText&&Ht.push(ne.imageAltText,"link"),qt.imageMarker&&Ht.push(ne.imageMarker)),qt.header&&Ht.push(ne.header,ne.header+"-"+qt.header),qt.quote&&(Ht.push(ne.quote),!Ne.maxBlockquoteDepth||Ne.maxBlockquoteDepth>=qt.quote?Ht.push(ne.quote+"-"+qt.quote):Ht.push(ne.quote+"-"+Ne.maxBlockquoteDepth)),qt.list!==!1){var Nn=(qt.listStack.length-1)%3;Nn?Nn===1?Ht.push(ne.list2):Ht.push(ne.list3):Ht.push(ne.list1)}return qt.trailingSpaceNewLine?Ht.push("trailing-space-new-line"):qt.trailingSpace&&Ht.push("trailing-space-"+(qt.trailingSpace%2?"a":"b")),Ht.length?Ht.join(" "):null}function le(qt,Ht){if(qt.match(Ut,!0))return he(Ht)}function We(qt,Ht){var je=Ht.text(qt,Ht);if(typeof je!="undefined")return je;if(Ht.list)return Ht.list=null,he(Ht);if(Ht.taskList){var Nn=qt.match(gn,!0)[1]===" ";return Nn?Ht.taskOpen=!0:Ht.taskClosed=!0,Ne.highlightFormatting&&(Ht.formatting="task"),Ht.taskList=!1,he(Ht)}if(Ht.taskOpen=!1,Ht.taskClosed=!1,Ht.header&&qt.match(/^#+$/,!0))return Ne.highlightFormatting&&(Ht.formatting="header"),he(Ht);var Kn=qt.next();if(Ht.linkTitle){Ht.linkTitle=!1;var He=Kn;Kn==="("&&(He=")"),He=(He+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var mn="^\\s*(?:[^"+He+"\\\\]+|\\\\\\\\|\\\\.)"+He;if(qt.match(new RegExp(mn),!0))return ne.linkHref}if(Kn==="`"){var Cn=Ht.formatting;Ne.highlightFormatting&&(Ht.formatting="code"),qt.eatWhile("`");var Jn=qt.current().length;if(Ht.code==0&&(!Ht.quote||Jn==1))return Ht.code=Jn,he(Ht);if(Jn==Ht.code){var bn=he(Ht);return Ht.code=0,bn}else return Ht.formatting=Cn,he(Ht)}else if(Ht.code)return he(Ht);if(Kn==="\\"&&(qt.next(),Ne.highlightFormatting)){var ve=he(Ht),Le=ne.formatting+"-escape";return ve?ve+" "+Le:Le}if(Kn==="!"&&qt.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Ht.imageMarker=!0,Ht.image=!0,Ne.highlightFormatting&&(Ht.formatting="image"),he(Ht);if(Kn==="["&&Ht.imageMarker&&qt.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Ht.imageMarker=!1,Ht.imageAltText=!0,Ne.highlightFormatting&&(Ht.formatting="image"),he(Ht);if(Kn==="]"&&Ht.imageAltText){Ne.highlightFormatting&&(Ht.formatting="image");var ve=he(Ht);return Ht.imageAltText=!1,Ht.image=!1,Ht.inline=Ht.f=Je,ve}if(Kn==="["&&!Ht.image)return Ht.linkText&&qt.match(/^.*?\]/)||(Ht.linkText=!0,Ne.highlightFormatting&&(Ht.formatting="link")),he(Ht);if(Kn==="]"&&Ht.linkText){Ne.highlightFormatting&&(Ht.formatting="link");var ve=he(Ht);return Ht.linkText=!1,Ht.inline=Ht.f=qt.match(/\(.*?\)| ?\[.*?\]/,!1)?Je:We,ve}if(Kn==="<"&&qt.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Ht.f=Ht.inline=me,Ne.highlightFormatting&&(Ht.formatting="link");var ve=he(Ht);return ve?ve+=" ":ve="",ve+ne.linkInline}if(Kn==="<"&&qt.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Ht.f=Ht.inline=me,Ne.highlightFormatting&&(Ht.formatting="link");var ve=he(Ht);return ve?ve+=" ":ve="",ve+ne.linkEmail}if(Ne.xml&&Kn==="<"&&qt.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Sn=qt.string.indexOf(">",qt.pos);if(Sn!=-1){var xn=qt.string.substring(qt.start,Sn);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(xn)&&(Ht.md_inside=!0)}return qt.backUp(1),Ht.htmlState=Tt.startState(ln),yt(qt,Ht,Jt)}if(Ne.xml&&Kn==="<"&&qt.match(/^\/\w*?>/))return Ht.md_inside=!1,"tag";if(Kn==="*"||Kn==="_"){for(var Kt=1,Et=qt.pos==1?" ":qt.string.charAt(qt.pos-2);Kt<3&&qt.eat(Kn);)Kt++;var Ft=qt.peek()||" ",Dt=!/\s/.test(Ft)&&(!gt.test(Ft)||/\s/.test(Et)||gt.test(Et)),Wt=!/\s/.test(Et)&&(!gt.test(Et)||/\s/.test(Ft)||gt.test(Ft)),kt=null,Ue=null;if(Kt%2&&(!Ht.em&&Dt&&(Kn==="*"||!Wt||gt.test(Et))?kt=!0:Ht.em==Kn&&Wt&&(Kn==="*"||!Dt||gt.test(Ft))&&(kt=!1)),Kt>1&&(!Ht.strong&&Dt&&(Kn==="*"||!Wt||gt.test(Et))?Ue=!0:Ht.strong==Kn&&Wt&&(Kn==="*"||!Dt||gt.test(Ft))&&(Ue=!1)),Ue!=null||kt!=null){Ne.highlightFormatting&&(Ht.formatting=kt==null?"strong":Ue==null?"em":"strong em"),kt===!0&&(Ht.em=Kn),Ue===!0&&(Ht.strong=Kn);var bn=he(Ht);return kt===!1&&(Ht.em=!1),Ue===!1&&(Ht.strong=!1),bn}}else if(Kn===" "&&(qt.eat("*")||qt.eat("_"))){if(qt.peek()===" ")return he(Ht);qt.backUp(1)}if(Ne.strikethrough){if(Kn==="~"&&qt.eatWhile(Kn)){if(Ht.strikethrough){Ne.highlightFormatting&&(Ht.formatting="strikethrough");var bn=he(Ht);return Ht.strikethrough=!1,bn}else if(qt.match(/^[^\s]/,!1))return Ht.strikethrough=!0,Ne.highlightFormatting&&(Ht.formatting="strikethrough"),he(Ht)}else if(Kn===" "&&qt.match(/^~~/,!0)){if(qt.peek()===" ")return he(Ht);qt.backUp(2)}}if(Ne.emoji&&Kn===":"&&qt.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Ht.emoji=!0,Ne.highlightFormatting&&(Ht.formatting="emoji");var Tn=he(Ht);return Ht.emoji=!1,Tn}return Kn===" "&&(qt.match(/^ +$/,!1)?Ht.trailingSpace++:Ht.trailingSpace&&(Ht.trailingSpaceNewLine=!0)),he(Ht)}function me(qt,Ht){var je=qt.next();if(je===">"){Ht.f=Ht.inline=We,Ne.highlightFormatting&&(Ht.formatting="link");var Nn=he(Ht);return Nn?Nn+=" ":Nn="",Nn+ne.linkInline}return qt.match(/^[^>]+/,!0),ne.linkInline}function Je(qt,Ht){if(qt.eatSpace())return null;var je=qt.next();return je==="("||je==="["?(Ht.f=Ht.inline=sn(je==="("?")":"]"),Ne.highlightFormatting&&(Ht.formatting="link-string"),Ht.linkHref=!0,he(Ht)):"error"}var fn={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function sn(qt){return function(Ht,je){var Nn=Ht.next();if(Nn===qt){je.f=je.inline=We,Ne.highlightFormatting&&(je.formatting="link-string");var Kn=he(je);return je.linkHref=!1,Kn}return Ht.match(fn[qt]),je.linkHref=!0,he(je)}}function ui(qt,Ht){return qt.match(/^([^\]\\]|\\.)*\]:/,!1)?(Ht.f=hi,qt.next(),Ne.highlightFormatting&&(Ht.formatting="link"),Ht.linkText=!0,he(Ht)):ct(qt,Ht,We)}function hi(qt,Ht){if(qt.match(/^\]:/,!0)){Ht.f=Ht.inline=Si,Ne.highlightFormatting&&(Ht.formatting="link");var je=he(Ht);return Ht.linkText=!1,je}return qt.match(/^([^\]\\]|\\.)+/,!0),ne.linkText}function Si(qt,Ht){return qt.eatSpace()?null:(qt.match(/^[^\s]+/,!0),qt.peek()===void 0?Ht.linkTitle=!0:qt.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Ht.f=Ht.inline=We,ne.linkHref+" url")}var fr={startState:function(){return{f:Vt,prevLine:{stream:null},thisLine:{stream:null},block:Vt,htmlState:null,indentation:0,inline:We,text:le,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(qt){return{f:qt.f,prevLine:qt.prevLine,thisLine:qt.thisLine,block:qt.block,htmlState:qt.htmlState&&Tt.copyState(ln,qt.htmlState),indentation:qt.indentation,localMode:qt.localMode,localState:qt.localMode?Tt.copyState(qt.localMode,qt.localState):null,inline:qt.inline,text:qt.text,formatting:!1,linkText:qt.linkText,linkTitle:qt.linkTitle,linkHref:qt.linkHref,code:qt.code,em:qt.em,strong:qt.strong,strikethrough:qt.strikethrough,emoji:qt.emoji,header:qt.header,setext:qt.setext,hr:qt.hr,taskList:qt.taskList,list:qt.list,listStack:qt.listStack.slice(0),quote:qt.quote,indentedCode:qt.indentedCode,trailingSpace:qt.trailingSpace,trailingSpaceNewLine:qt.trailingSpaceNewLine,md_inside:qt.md_inside,fencedEndRE:qt.fencedEndRE}},token:function(qt,Ht){if(Ht.formatting=!1,qt!=Ht.thisLine.stream){if(Ht.header=0,Ht.hr=!1,qt.match(/^\s*$/,!0))return Nt(Ht),null;if(Ht.prevLine=Ht.thisLine,Ht.thisLine={stream:qt},Ht.taskList=!1,Ht.trailingSpace=0,Ht.trailingSpaceNewLine=!1,!Ht.localState&&(Ht.f=Ht.block,Ht.f!=Jt)){var je=qt.match(/^\s*/,!0)[0].replace(/\t/g,lt).length;if(Ht.indentation=je,Ht.indentationDiff=null,je>0)return null}}return Ht.f(qt,Ht)},innerMode:function(qt){return qt.block==Jt?{state:qt.htmlState,mode:ln}:qt.localState?{state:qt.localState,mode:qt.localMode}:{state:qt,mode:fr}},indent:function(qt,Ht,je){return qt.block==Jt&&ln.indent?ln.indent(qt.htmlState,Ht,je):qt.localState&&qt.localMode.indent?qt.localMode.indent(qt.localState,Ht,je):Tt.Pass},blankLine:Nt,getType:he,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return fr},"xml"),Tt.defineMIME("text/markdown","markdown"),Tt.defineMIME("text/x-markdown","markdown")})},52539:function(yn,qn,ee){(function(Tt){Tt(ee(4631))})(function(Tt){"use strict";Tt.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var Be=0;Be<Tt.modeInfo.length;Be++){var Ne=Tt.modeInfo[Be];Ne.mimes&&(Ne.mime=Ne.mimes[0])}Tt.findModeByMIME=function(ln){ln=ln.toLowerCase();for(var be=0;be<Tt.modeInfo.length;be++){var we=Tt.modeInfo[be];if(we.mime==ln)return we;if(we.mimes){for(var ne=0;ne<we.mimes.length;ne++)if(we.mimes[ne]==ln)return we}}if(/\+xml$/.test(ln))return Tt.findModeByMIME("application/xml");if(/\+json$/.test(ln))return Tt.findModeByMIME("application/json")},Tt.findModeByExtension=function(ln){ln=ln.toLowerCase();for(var be=0;be<Tt.modeInfo.length;be++){var we=Tt.modeInfo[be];if(we.ext){for(var ne=0;ne<we.ext.length;ne++)if(we.ext[ne]==ln)return we}}},Tt.findModeByFileName=function(ln){for(var be=0;be<Tt.modeInfo.length;be++){var we=Tt.modeInfo[be];if(we.file&&we.file.test(ln))return we}var ne=ln.lastIndexOf("."),De=ne>-1&&ln.substring(ne+1,ln.length);if(De)return Tt.findModeByExtension(De)},Tt.findModeByName=function(ln){ln=ln.toLowerCase();for(var be=0;be<Tt.modeInfo.length;be++){var we=Tt.modeInfo[be];if(we.name.toLowerCase()==ln)return we;if(we.alias){for(var ne=0;ne<we.alias.length;ne++)if(we.alias[ne].toLowerCase()==ln)return we}}}})},80785:function(yn,qn,ee){(function(Tt){Tt(ee(4631))})(function(Tt){"use strict";Tt.defineMode("stex",function(Be,Ne){"use strict";function ln(Ut,et){Ut.cmdState.push(et)}function be(Ut){return Ut.cmdState.length>0?Ut.cmdState[Ut.cmdState.length-1]:null}function we(Ut){var et=Ut.cmdState.pop();et&&et.closeBracket()}function ne(Ut){for(var et=Ut.cmdState,nt=et.length-1;nt>=0;nt--){var gt=et[nt];if(gt.name!="DEFAULT")return gt}return{styleIdentifier:function(){return null}}}function De(Ut,et,nt){return function(){this.name=Ut,this.bracketNo=0,this.style=et,this.styles=nt,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var fe={};fe.importmodule=De("importmodule","tag",["string","builtin"]),fe.documentclass=De("documentclass","tag",["","atom"]),fe.usepackage=De("usepackage","tag",["atom"]),fe.begin=De("begin","tag",["atom"]),fe.end=De("end","tag",["atom"]),fe.label=De("label","tag",["atom"]),fe.ref=De("ref","tag",["atom"]),fe.eqref=De("eqref","tag",["atom"]),fe.cite=De("cite","tag",["atom"]),fe.bibitem=De("bibitem","tag",["atom"]),fe.Bibitem=De("Bibitem","tag",["atom"]),fe.RBibitem=De("RBibitem","tag",["atom"]),fe.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Qe(Ut,et){Ut.f=et}function gn(Ut,et){var nt;if(Ut.match(/^\\[a-zA-Z@]+/)){var gt=Ut.current().slice(1);return nt=fe.hasOwnProperty(gt)?fe[gt]:fe.DEFAULT,nt=new nt,ln(et,nt),Qe(et,kn),nt.style}if(Ut.match(/^\\[$&%#{}_]/)||Ut.match(/^\\[,;!\/\\]/))return"tag";if(Ut.match("\\["))return Qe(et,function(ct,yt){return Xe(ct,yt,"\\]")}),"keyword";if(Ut.match("\\("))return Qe(et,function(ct,yt){return Xe(ct,yt,"\\)")}),"keyword";if(Ut.match("$$"))return Qe(et,function(ct,yt){return Xe(ct,yt,"$$")}),"keyword";if(Ut.match("$"))return Qe(et,function(ct,yt){return Xe(ct,yt,"$")}),"keyword";var lt=Ut.next();if(lt=="%")return Ut.skipToEnd(),"comment";if(lt=="}"||lt=="]"){if(nt=be(et),nt)nt.closeBracket(lt),Qe(et,kn);else return"error";return"bracket"}else return lt=="{"||lt=="["?(nt=fe.DEFAULT,nt=new nt,ln(et,nt),"bracket"):/\d/.test(lt)?(Ut.eatWhile(/[\w.%]/),"atom"):(Ut.eatWhile(/[\w\-_]/),nt=ne(et),nt.name=="begin"&&(nt.argument=Ut.current()),nt.styleIdentifier())}function Xe(Ut,et,nt){if(Ut.eatSpace())return null;if(nt&&Ut.match(nt))return Qe(et,gn),"keyword";if(Ut.match(/^\\[a-zA-Z@]+/))return"tag";if(Ut.match(/^[a-zA-Z]+/))return"variable-2";if(Ut.match(/^\\[$&%#{}_]/)||Ut.match(/^\\[,;!\/]/)||Ut.match(/^[\^_&]/))return"tag";if(Ut.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Ut.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var gt=Ut.next();return gt=="{"||gt=="}"||gt=="["||gt=="]"||gt=="("||gt==")"?"bracket":gt=="%"?(Ut.skipToEnd(),"comment"):"error"}function kn(Ut,et){var nt=Ut.peek(),gt;return nt=="{"||nt=="["?(gt=be(et),gt.openBracket(nt),Ut.eat(nt),Qe(et,gn),"bracket"):/[ \t\r]/.test(nt)?(Ut.eat(nt),null):(Qe(et,gn),we(et),gn(Ut,et))}return{startState:function(){var Ut=Ne.inMathMode?function(et,nt){return Xe(et,nt)}:gn;return{cmdState:[],f:Ut}},copyState:function(Ut){return{cmdState:Ut.cmdState.slice(),f:Ut.f}},token:function(Ut,et){return et.f(Ut,et)},blankLine:function(Ut){Ut.f=gn,Ut.cmdState.length=0},lineComment:"%"}}),Tt.defineMIME("text/x-stex","stex"),Tt.defineMIME("text/x-latex","stex")})},29589:function(yn,qn,ee){(function(Tt){Tt(ee(4631))})(function(Tt){"use strict";var Be={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},Ne={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};Tt.defineMode("xml",function(ln,be){var we=ln.indentUnit,ne={},De=be.htmlMode?Be:Ne;for(var fe in De)ne[fe]=De[fe];for(var fe in be)ne[fe]=be[fe];var Qe,gn;function Xe(me,Je){function fn(hi){return Je.tokenize=hi,hi(me,Je)}var sn=me.next();if(sn=="<")return me.eat("!")?me.eat("[")?me.match("CDATA[")?fn(et("atom","]]>")):null:me.match("--")?fn(et("comment","-->")):me.match("DOCTYPE",!0,!0)?(me.eatWhile(/[\w\._\-]/),fn(nt(1))):null:me.eat("?")?(me.eatWhile(/[\w\._\-]/),Je.tokenize=et("meta","?>"),"meta"):(Qe=me.eat("/")?"closeTag":"openTag",Je.tokenize=kn,"tag bracket");if(sn=="&"){var ui;return me.eat("#")?me.eat("x")?ui=me.eatWhile(/[a-fA-F\d]/)&&me.eat(";"):ui=me.eatWhile(/[\d]/)&&me.eat(";"):ui=me.eatWhile(/[\w\.\-:]/)&&me.eat(";"),ui?"atom":"error"}else return me.eatWhile(/[^&<]/),null}Xe.isInText=!0;function kn(me,Je){var fn=me.next();if(fn==">"||fn=="/"&&me.eat(">"))return Je.tokenize=Xe,Qe=fn==">"?"endTag":"selfcloseTag","tag bracket";if(fn=="=")return Qe="equals",null;if(fn=="<"){Je.tokenize=Xe,Je.state=yt,Je.tagName=Je.tagStart=null;var sn=Je.tokenize(me,Je);return sn?sn+" tag error":"tag error"}else return/[\'\"]/.test(fn)?(Je.tokenize=Ut(fn),Je.stringStartCol=me.column(),Je.tokenize(me,Je)):(me.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Ut(me){var Je=function(fn,sn){for(;!fn.eol();)if(fn.next()==me){sn.tokenize=kn;break}return"string"};return Je.isInAttribute=!0,Je}function et(me,Je){return function(fn,sn){for(;!fn.eol();){if(fn.match(Je)){sn.tokenize=Xe;break}fn.next()}return me}}function nt(me){return function(Je,fn){for(var sn;(sn=Je.next())!=null;){if(sn=="<")return fn.tokenize=nt(me+1),fn.tokenize(Je,fn);if(sn==">")if(me==1){fn.tokenize=Xe;break}else return fn.tokenize=nt(me-1),fn.tokenize(Je,fn)}return"meta"}}function gt(me,Je,fn){this.prev=me.context,this.tagName=Je,this.indent=me.indented,this.startOfLine=fn,(ne.doNotIndent.hasOwnProperty(Je)||me.context&&me.context.noIndent)&&(this.noIndent=!0)}function lt(me){me.context&&(me.context=me.context.prev)}function ct(me,Je){for(var fn;;){if(!me.context||(fn=me.context.tagName,!ne.contextGrabbers.hasOwnProperty(fn)||!ne.contextGrabbers[fn].hasOwnProperty(Je)))return;lt(me)}}function yt(me,Je,fn){return me=="openTag"?(fn.tagStart=Je.column(),Lt):me=="closeTag"?Nt:yt}function Lt(me,Je,fn){return me=="word"?(fn.tagName=Je.current(),gn="tag",Ae):ne.allowMissingTagName&&me=="endTag"?(gn="tag bracket",Ae(me,Je,fn)):(gn="error",Lt)}function Nt(me,Je,fn){if(me=="word"){var sn=Je.current();return fn.context&&fn.context.tagName!=sn&&ne.implicitlyClosed.hasOwnProperty(fn.context.tagName)&&lt(fn),fn.context&&fn.context.tagName==sn||ne.matchClosing===!1?(gn="tag",Vt):(gn="tag error",Jt)}else return ne.allowMissingTagName&&me=="endTag"?(gn="tag bracket",Vt(me,Je,fn)):(gn="error",Jt)}function Vt(me,Je,fn){return me!="endTag"?(gn="error",Vt):(lt(fn),yt)}function Jt(me,Je,fn){return gn="error",Vt(me,Je,fn)}function Ae(me,Je,fn){if(me=="word")return gn="attribute",he;if(me=="endTag"||me=="selfcloseTag"){var sn=fn.tagName,ui=fn.tagStart;return fn.tagName=fn.tagStart=null,me=="selfcloseTag"||ne.autoSelfClosers.hasOwnProperty(sn)?ct(fn,sn):(ct(fn,sn),fn.context=new gt(fn,sn,ui==fn.indented)),yt}return gn="error",Ae}function he(me,Je,fn){return me=="equals"?le:(ne.allowMissing||(gn="error"),Ae(me,Je,fn))}function le(me,Je,fn){return me=="string"?We:me=="word"&&ne.allowUnquoted?(gn="string",Ae):(gn="error",Ae(me,Je,fn))}function We(me,Je,fn){return me=="string"?We:Ae(me,Je,fn)}return{startState:function(me){var Je={tokenize:Xe,state:yt,indented:me||0,tagName:null,tagStart:null,context:null};return me!=null&&(Je.baseIndent=me),Je},token:function(me,Je){if(!Je.tagName&&me.sol()&&(Je.indented=me.indentation()),me.eatSpace())return null;Qe=null;var fn=Je.tokenize(me,Je);return(fn||Qe)&&fn!="comment"&&(gn=null,Je.state=Je.state(Qe||fn,me,Je),gn&&(fn=gn=="error"?fn+" error":gn)),fn},indent:function(me,Je,fn){var sn=me.context;if(me.tokenize.isInAttribute)return me.tagStart==me.indented?me.stringStartCol+1:me.indented+we;if(sn&&sn.noIndent)return Tt.Pass;if(me.tokenize!=kn&&me.tokenize!=Xe)return fn?fn.match(/^(\s*)/)[0].length:0;if(me.tagName)return ne.multilineTagIndentPastTag!==!1?me.tagStart+me.tagName.length+2:me.tagStart+we*(ne.multilineTagIndentFactor||1);if(ne.alignCDATA&&/<!\[CDATA\[/.test(Je))return 0;var ui=Je&&/^<(\/)?([\w_:\.-]*)/.exec(Je);if(ui&&ui[1])for(;sn;)if(sn.tagName==ui[2]){sn=sn.prev;break}else if(ne.implicitlyClosed.hasOwnProperty(sn.tagName))sn=sn.prev;else break;else if(ui)for(;sn;){var hi=ne.contextGrabbers[sn.tagName];if(hi&&hi.hasOwnProperty(ui[2]))sn=sn.prev;else break}for(;sn&&sn.prev&&!sn.startOfLine;)sn=sn.prev;return sn?sn.indent+we:me.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:ne.htmlMode?"html":"xml",helperType:ne.htmlMode?"html":"xml",skipAttribute:function(me){me.state==le&&(me.state=Ae)},xmlCurrentTag:function(me){return me.tagName?{name:me.tagName,close:me.type=="closeTag"}:null},xmlCurrentContext:function(me){for(var Je=[],fn=me.context;fn;fn=fn.prev)fn.tagName&&Je.push(fn.tagName);return Je.reverse()}}}),Tt.defineMIME("text/xml","xml"),Tt.defineMIME("application/xml","xml"),Tt.mimeModes.hasOwnProperty("text/html")||Tt.defineMIME("text/html",{name:"xml",htmlMode:!0})})},93778:function(yn,qn,ee){"use strict";ee.d(qn,{HT:function(){return Ee},iZ:function(){return wn}});var Tt={},Be=function(ie,se,ye,Ce,Oe){var Ze=Tt[se]||(Tt[se]=URL.createObjectURL(new Blob([ie],{type:"text/javascript"}))),En=new Worker(Ze);return En.onerror=function(Wn){return Oe(Wn.error,null)},En.onmessage=function(Wn){return Oe(null,Wn.data)},En.postMessage(ye,Ce),En},Ne=Uint8Array,ln=Uint16Array,be=Uint32Array,we=new Ne([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ne=new Ne([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),De=new Ne([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),fe=function(ie,se){for(var ye=new ln(31),Ce=0;Ce<31;++Ce)ye[Ce]=se+=1<<ie[Ce-1];for(var Oe=new be(ye[30]),Ce=1;Ce<30;++Ce)for(var Ze=ye[Ce];Ze<ye[Ce+1];++Ze)Oe[Ze]=Ze-ye[Ce]<<5|Ce;return[ye,Oe]},Qe=fe(we,2),gn=Qe[0],Xe=Qe[1];gn[28]=258,Xe[258]=28;for(var kn=fe(ne,0),Ut=kn[0],et=kn[1],nt=new ln(32768),gt=0;gt<32768;++gt){var lt=(gt&43690)>>>1|(gt&21845)<<1;lt=(lt&52428)>>>2|(lt&13107)<<2,lt=(lt&61680)>>>4|(lt&3855)<<4,nt[gt]=((lt&65280)>>>8|(lt&255)<<8)>>>1}for(var ct=function(ie,se,ye){for(var Ce=ie.length,Oe=0,Ze=new ln(se);Oe<Ce;++Oe)++Ze[ie[Oe]-1];var En=new ln(se);for(Oe=0;Oe<se;++Oe)En[Oe]=En[Oe-1]+Ze[Oe-1]<<1;var Wn;if(ye){Wn=new ln(1<<se);var Te=15-se;for(Oe=0;Oe<Ce;++Oe)if(ie[Oe])for(var pn=Oe<<4|ie[Oe],ri=se-ie[Oe],Ji=En[ie[Oe]-1]++<<ri,zi=Ji|(1<<ri)-1;Ji<=zi;++Ji)Wn[nt[Ji]>>>Te]=pn}else for(Wn=new ln(Ce),Oe=0;Oe<Ce;++Oe)Wn[Oe]=nt[En[ie[Oe]-1]++]>>>15-ie[Oe];return Wn},yt=new Ne(288),gt=0;gt<144;++gt)yt[gt]=8;for(var gt=144;gt<256;++gt)yt[gt]=9;for(var gt=256;gt<280;++gt)yt[gt]=7;for(var gt=280;gt<288;++gt)yt[gt]=8;for(var Lt=new Ne(32),gt=0;gt<32;++gt)Lt[gt]=5;var Nt=ct(yt,9,0),Vt=ct(yt,9,1),Jt=ct(Lt,5,0),Ae=ct(Lt,5,1),he=function(ie){for(var se=ie[0],ye=1;ye<ie.length;++ye)ie[ye]>se&&(se=ie[ye]);return se},le=function(ie,se,ye){var Ce=se/8>>0;return(ie[Ce]|ie[Ce+1]<<8)>>>(se&7)&ye},We=function(ie,se){var ye=se/8>>0;return(ie[ye]|ie[ye+1]<<8|ie[ye+2]<<16)>>>(se&7)},me=function(ie){return(ie/8>>0)+(ie&7&&1)},Je=function(ie,se,ye){(se==null||se<0)&&(se=0),(ye==null||ye>ie.length)&&(ye=ie.length);var Ce=new(ie instanceof ln?ln:ie instanceof be?be:Ne)(ye-se);return Ce.set(ie.subarray(se,ye)),Ce},fn=function(ie,se,ye){var Ce=ie.length,Oe=!se||ye,Ze=!ye||ye.i;ye||(ye={}),se||(se=new Ne(Ce*3));var En=function(el){var gl=se.length;if(el>gl){var Ra=new Ne(Math.max(gl*2,el));Ra.set(se),se=Ra}},Wn=ye.f||0,Te=ye.p||0,pn=ye.b||0,ri=ye.l,Ji=ye.d,zi=ye.m,ce=ye.n,$n=Ce*8;do{if(!ri){ye.f=Wn=le(ie,Te,1);var mi=le(ie,Te+1,3);if(Te+=3,mi)if(mi==1)ri=Vt,Ji=Ae,zi=9,ce=5;else if(mi==2){var xi=le(ie,Te,31)+257,ci=le(ie,Te+10,15)+4,Ni=xi+le(ie,Te+5,31)+1;Te+=14;for(var Vi=new Ne(Ni),Ke=new Ne(19),ki=0;ki<ci;++ki)Ke[De[ki]]=le(ie,Te+ki*3,7);Te+=ci*3;var Ye=he(Ke),rr=(1<<Ye)-1;if(!Ze&&Te+Ni*(Ye+7)>$n)break;for(var Ro=ct(Ke,Ye,1),ki=0;ki<Ni;){var gr=Ro[le(ie,Te,rr)];Te+=gr&15;var Yn=gr>>>4;if(Yn<16)Vi[ki++]=Yn;else{var lo=0,pr=0;for(Yn==16?(pr=3+le(ie,Te,3),Te+=2,lo=Vi[ki-1]):Yn==17?(pr=3+le(ie,Te,7),Te+=3):Yn==18&&(pr=11+le(ie,Te,127),Te+=7);pr--;)Vi[ki++]=lo}}var _i=Vi.subarray(0,xi),cr=Vi.subarray(xi);zi=he(_i),ce=he(cr),ri=ct(_i,zi,1),Ji=ct(cr,ce,1)}else throw"invalid block type";else{var Yn=me(Te)+4,hr=ie[Yn-4]|ie[Yn-3]<<8,Mi=Yn+hr;if(Mi>Ce){if(Ze)throw"unexpected EOF";break}Oe&&En(pn+hr),se.set(ie.subarray(Yn,Mi),pn),ye.b=pn+=hr,ye.p=Te=Mi*8;continue}if(Te>$n)throw"unexpected EOF"}Oe&&En(pn+131072);for(var qr=(1<<zi)-1,Fr=(1<<ce)-1,Rn=zi+ce+18;Ze||Te+Rn<$n;){var lo=ri[We(ie,Te)&qr],Rt=lo>>>4;if(Te+=lo&15,Te>$n)throw"unexpected EOF";if(!lo)throw"invalid length/literal";if(Rt<256)se[pn++]=Rt;else if(Rt==256){ri=null;break}else{var Gr=Rt-254;if(Rt>264){var ki=Rt-257,ps=we[ki];Gr=le(ie,Te,(1<<ps)-1)+gn[ki],Te+=ps}var xs=Ji[We(ie,Te)&Fr],Lo=xs>>>4;if(!xs)throw"invalid distance";Te+=xs&15;var cr=Ut[Lo];if(Lo>3){var ps=ne[Lo];cr+=We(ie,Te)&(1<<ps)-1,Te+=ps}if(Te>$n)throw"unexpected EOF";Oe&&En(pn+131072);for(var os=pn+Gr;pn<os;pn+=4)se[pn]=se[pn-cr],se[pn+1]=se[pn+1-cr],se[pn+2]=se[pn+2-cr],se[pn+3]=se[pn+3-cr];pn=os}}ye.l=ri,ye.p=Te,ye.b=pn,ri&&(Wn=1,ye.m=zi,ye.d=Ji,ye.n=ce)}while(!Wn);return pn==se.length?se:Je(se,0,pn)},sn=function(ie,se,ye){ye<<=se&7;var Ce=se/8>>0;ie[Ce]|=ye,ie[Ce+1]|=ye>>>8},ui=function(ie,se,ye){ye<<=se&7;var Ce=se/8>>0;ie[Ce]|=ye,ie[Ce+1]|=ye>>>8,ie[Ce+2]|=ye>>>16},hi=function(ie,se){for(var ye=[],Ce=0;Ce<ie.length;++Ce)ie[Ce]&&ye.push({s:Ce,f:ie[Ce]});var Oe=ye.length,Ze=ye.slice();if(!Oe)return[new Ne(0),0];if(Oe==1){var En=new Ne(ye[0].s+1);return En[ye[0].s]=1,[En,1]}ye.sort(function(Ni,Vi){return Ni.f-Vi.f}),ye.push({s:-1,f:25001});var Wn=ye[0],Te=ye[1],pn=0,ri=1,Ji=2;for(ye[0]={s:-1,f:Wn.f+Te.f,l:Wn,r:Te};ri!=Oe-1;)Wn=ye[ye[pn].f<ye[Ji].f?pn++:Ji++],Te=ye[pn!=ri&&ye[pn].f<ye[Ji].f?pn++:Ji++],ye[ri++]={s:-1,f:Wn.f+Te.f,l:Wn,r:Te};for(var zi=Ze[0].s,Ce=1;Ce<Oe;++Ce)Ze[Ce].s>zi&&(zi=Ze[Ce].s);var ce=new ln(zi+1),$n=Si(ye[ri-1],ce,0);if($n>se){var Ce=0,mi=0,Yn=$n-se,hr=1<<Yn;for(Ze.sort(function(Vi,Ke){return ce[Ke.s]-ce[Vi.s]||Vi.f-Ke.f});Ce<Oe;++Ce){var Mi=Ze[Ce].s;if(ce[Mi]>se)mi+=hr-(1<<$n-ce[Mi]),ce[Mi]=se;else break}for(mi>>>=Yn;mi>0;){var xi=Ze[Ce].s;ce[xi]<se?mi-=1<<se-ce[xi]++-1:++Ce}for(;Ce>=0&&mi;--Ce){var ci=Ze[Ce].s;ce[ci]==se&&(--ce[ci],++mi)}$n=se}return[new Ne(ce),$n]},Si=function(ie,se,ye){return ie.s==-1?Math.max(Si(ie.l,se,ye+1),Si(ie.r,se,ye+1)):se[ie.s]=ye},fr=function(ie){for(var se=ie.length;se&&!ie[--se];);for(var ye=new ln(++se),Ce=0,Oe=ie[0],Ze=1,En=function(Te){ye[Ce++]=Te},Wn=1;Wn<=se;++Wn)if(ie[Wn]==Oe&&Wn!=se)++Ze;else{if(!Oe&&Ze>2){for(;Ze>138;Ze-=138)En(32754);Ze>2&&(En(Ze>10?Ze-11<<5|28690:Ze-3<<5|12305),Ze=0)}else if(Ze>3){for(En(Oe),--Ze;Ze>6;Ze-=6)En(8304);Ze>2&&(En(Ze-3<<5|8208),Ze=0)}for(;Ze--;)En(Oe);Ze=1,Oe=ie[Wn]}return[ye.subarray(0,Ce),se]},qt=function(ie,se){for(var ye=0,Ce=0;Ce<se.length;++Ce)ye+=ie[Ce]*se[Ce];return ye},Ht=function(ie,se,ye){var Ce=ye.length,Oe=me(se+2);ie[Oe]=Ce&255,ie[Oe+1]=Ce>>>8,ie[Oe+2]=ie[Oe]^255,ie[Oe+3]=ie[Oe+1]^255;for(var Ze=0;Ze<Ce;++Ze)ie[Oe+Ze+4]=ye[Ze];return(Oe+4+Ce)*8},je=function(ie,se,ye,Ce,Oe,Ze,En,Wn,Te,pn,ri){sn(se,ri++,ye),++Oe[256];for(var Ji=hi(Oe,15),zi=Ji[0],ce=Ji[1],$n=hi(Ze,15),mi=$n[0],Yn=$n[1],hr=fr(zi),Mi=hr[0],xi=hr[1],ci=fr(mi),Ni=ci[0],Vi=ci[1],Ke=new ln(19),ki=0;ki<Mi.length;++ki)Ke[Mi[ki]&31]++;for(var ki=0;ki<Ni.length;++ki)Ke[Ni[ki]&31]++;for(var Ye=hi(Ke,7),rr=Ye[0],Ro=Ye[1],gr=19;gr>4&&!rr[De[gr-1]];--gr);var lo=pn+5<<3,pr=qt(Oe,yt)+qt(Ze,Lt)+En,_i=qt(Oe,zi)+qt(Ze,mi)+En+14+3*gr+qt(Ke,rr)+(2*Ke[16]+3*Ke[17]+7*Ke[18]);if(lo<=pr&&lo<=_i)return Ht(se,ri,ie.subarray(Te,Te+pn));var cr,qr,Fr,Rn;if(sn(se,ri,1+(_i<pr)),ri+=2,_i<pr){cr=ct(zi,ce,0),qr=zi,Fr=ct(mi,Yn,0),Rn=mi;var Rt=ct(rr,Ro,0);sn(se,ri,xi-257),sn(se,ri+5,Vi-1),sn(se,ri+10,gr-4),ri+=14;for(var ki=0;ki<gr;++ki)sn(se,ri+3*ki,rr[De[ki]]);ri+=3*gr;for(var Gr=[Mi,Ni],ps=0;ps<2;++ps)for(var xs=Gr[ps],ki=0;ki<xs.length;++ki){var Lo=xs[ki]&31;sn(se,ri,Rt[Lo]),ri+=rr[Lo],Lo>15&&(sn(se,ri,xs[ki]>>>5&127),ri+=xs[ki]>>>12)}}else cr=Nt,qr=yt,Fr=Jt,Rn=Lt;for(var ki=0;ki<Wn;++ki)if(Ce[ki]>255){var Lo=Ce[ki]>>>18&31;ui(se,ri,cr[Lo+257]),ri+=qr[Lo+257],Lo>7&&(sn(se,ri,Ce[ki]>>>23&31),ri+=we[Lo]);var os=Ce[ki]&31;ui(se,ri,Fr[os]),ri+=Rn[os],os>3&&(ui(se,ri,Ce[ki]>>>5&8191),ri+=ne[os])}else ui(se,ri,cr[Ce[ki]]),ri+=qr[Ce[ki]];return ui(se,ri,cr[256]),ri+qr[256]},Nn=new be([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Kn=new Ne(0),He=function(ie,se,ye,Ce,Oe,Ze){var En=ie.length,Wn=new Ne(Ce+En+5*(1+Math.floor(En/7e3))+Oe),Te=Wn.subarray(Ce,Wn.length-Oe),pn=0;if(!se||En<8)for(var ri=0;ri<=En;ri+=65535){var Ji=ri+65535;Ji<En?pn=Ht(Te,pn,ie.subarray(ri,Ji)):(Te[ri]=Ze,pn=Ht(Te,pn,ie.subarray(ri,En)))}else{for(var zi=Nn[se-1],ce=zi>>>13,$n=zi&8191,mi=(1<<ye)-1,Yn=new ln(32768),hr=new ln(mi+1),Mi=Math.ceil(ye/3),xi=2*Mi,ci=function(an){return(ie[an]^ie[an+1]<<Mi^ie[an+2]<<xi)&mi},Ni=new be(25e3),Vi=new ln(288),Ke=new ln(32),ki=0,Ye=0,ri=0,rr=0,Ro=0,gr=0;ri<En;++ri){var lo=ci(ri),pr=ri&32767,_i=hr[lo];if(Yn[pr]=_i,hr[lo]=pr,Ro<=ri){var cr=En-ri;if((ki>7e3||rr>24576)&&cr>423){pn=je(ie,Te,0,Ni,Vi,Ke,Ye,rr,gr,ri-gr,pn),rr=ki=Ye=0,gr=ri;for(var qr=0;qr<286;++qr)Vi[qr]=0;for(var qr=0;qr<30;++qr)Ke[qr]=0}var Fr=2,Rn=0,Rt=$n,Gr=pr-_i&32767;if(cr>2&&lo==ci(ri-Gr))for(var ps=Math.min(ce,cr)-1,xs=Math.min(32767,ri),Lo=Math.min(258,cr);Gr<=xs&&--Rt&&pr!=_i;){if(ie[ri+Fr]==ie[ri+Fr-Gr]){for(var os=0;os<Lo&&ie[ri+os]==ie[ri+os-Gr];++os);if(os>Fr){if(Fr=os,Rn=Gr,os>ps)break;for(var el=Math.min(Gr,os-2),gl=0,qr=0;qr<el;++qr){var Ra=ri-Gr+qr+32768&32767,_r=Yn[Ra],To=Ra-_r+32768&32767;To>gl&&(gl=To,_i=Ra)}}}pr=_i,_i=Yn[pr],Gr+=pr-_i+32768&32767}if(Rn){Ni[rr++]=268435456|Xe[Fr]<<18|et[Rn];var Ui=Xe[Fr]&31,ii=et[Rn]&31;Ye+=we[Ui]+ne[ii],++Vi[257+Ui],++Ke[ii],Ro=ri+Fr,++ki}else Ni[rr++]=ie[ri],++Vi[ie[ri]]}}pn=je(ie,Te,Ze,Ni,Vi,Ke,Ye,rr,gr,ri-gr,pn),Ze||(pn=Ht(Te,pn,Kn))}return Je(Wn,0,Ce+me(pn)+Oe)},mn=null,Cn=function(){var ie=4294967295;return{p:function(se){for(var ye=ie,Ce=0;Ce<se.length;++Ce)ye=mn[ye&255^se[Ce]]^ye>>>8;ie=ye},d:function(){return ie^4294967295}}},Jn=function(){var ie=1,se=0;return{p:function(ye){for(var Ce=ie,Oe=se,Ze=ye.length,En=0;En!=Ze;){for(var Wn=Math.min(En+5552,Ze);En<Wn;++En)Ce+=ye[En],Oe+=Ce;Ce%=65521,Oe%=65521}ie=Ce,se=Oe},d:function(){return(ie>>>8<<16|(se&255)<<8|se>>>8)+((ie&255)<<23)*2}}},bn=function(ie,se,ye,Ce,Oe){return He(ie,se.level==null?6:se.level,se.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(ie.length)))*1.5):12+se.mem,ye,Ce,!Oe)},ve=function(ie,se){var ye={};for(var Ce in ie)ye[Ce]=ie[Ce];for(var Ce in se)ye[Ce]=se[Ce];return ye},Le=function(ie,se,ye){for(var Ce=ie(),Oe=ie.toString(),Ze=Oe.slice(Oe.indexOf("[")+1,Oe.lastIndexOf("]")).replace(/ /g,"").split(","),En=0;En<Ce.length;++En){var Wn=Ce[En],Te=Ze[En];if(typeof Wn=="function"){se+=";"+Te+"=";var pn=Wn.toString();if(Wn.prototype)if(pn.indexOf("[native code]")!=-1){var ri=pn.indexOf(" ",8)+1;se+=pn.slice(ri,pn.indexOf("(",ri))}else{se+=pn;for(var Ji in Wn.prototype)se+=";"+Te+".prototype."+Ji+"="+Wn.prototype[Ji].toString()}else se+=pn}else ye[Te]=Wn}return[se,ye]},Sn=null,xn=function(ie){var se=[];for(var ye in ie)(ie[ye]instanceof Ne||ie[ye]instanceof ln||ie[ye]instanceof be)&&se.push((ie[ye]=new ie[ye].constructor(ie[ye])).buffer);return se},Kt=function(ie,se,ye,Ce){var Oe;if(!Sn[ye]){for(var Ze="",En={},Wn=ie.length-1,Te=0;Te<Wn;++Te)Oe=Le(ie[Te],Ze,En),Ze=Oe[0],En=Oe[1];Sn[ye]=Le(ie[Wn],Ze,En)}var pn=ve({},Sn[ye][1]);return Be(Sn[ye][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+se.toString()+"}",ye,pn,xn(pn),Ce)},Et=function(){return[Ne,ln,be,we,ne,De,gn,Ut,Vt,Ae,nt,ct,he,le,We,me,Je,fn,bo,Tn,Ei]},Ft=function(){return[Ne,ln,be,we,ne,De,Xe,et,Nt,yt,Jt,Lt,nt,Nn,Kn,ct,sn,ui,hi,Si,fr,qt,Ht,je,me,Je,He,bn,$r,Tn]},Dt=function(){return[qi,kr,gi,Cn,mn]},Wt=function(){return[fi,Pr]},kt=function(){return[yr,gi,Jn]},Ue=function(){return[or]},Tn=function(ie){return postMessage(ie,[ie.buffer])},Ei=function(ie){return ie&&ie.size&&new Ne(ie.size)},Xn=function(ie,se,ye,Ce,Oe,Ze){var En=Kt(ye,Ce,Oe,function(Wn,Te){En.terminate(),Ze(Wn,Te)});return se.consume||(ie=new Ne(ie)),En.postMessage([ie,se],[ie.buffer]),function(){En.terminate()}},si=function(ie){return ie.ondata=function(se,ye){return postMessage([se,ye],[se.buffer])},function(se){return ie.push(se.data[0],se.data[1])}},Qi=function(ie,se,ye,Ce,Oe){var Ze,En=Kt(ie,Ce,Oe,function(Wn,Te){Wn?(En.terminate(),se.ondata.call(se,Wn)):(Te[1]&&En.terminate(),se.ondata.call(se,Wn,Te[0],Te[1]))});En.postMessage(ye),se.push=function(Wn,Te){if(Ze)throw"stream finished";if(!se.ondata)throw"no stream handler";En.postMessage([Wn,Ze=Te],[Wn.buffer])},se.terminate=function(){En.terminate()}},Ln=function(ie,se){return ie[se]|ie[se+1]<<8},Ci=function(ie,se){return(ie[se]|ie[se+1]<<8|ie[se+2]<<16)+(ie[se+3]<<23)*2},gi=function(ie,se,ye){for(;ye;++se)ie[se]=ye,ye>>>=8},qi=function(ie,se){var ye=se.filename;if(ie[0]=31,ie[1]=139,ie[2]=8,ie[8]=se.level<2?4:se.level==9?2:0,ie[9]=3,se.mtime!=0&&gi(ie,4,Math.floor(new Date(se.mtime||Date.now())/1e3)),ye){ie[3]=8;for(var Ce=0;Ce<=ye.length;++Ce)ie[Ce+10]=ye.charCodeAt(Ce)}},fi=function(ie){if(ie[0]!=31||ie[1]!=139||ie[2]!=8)throw"invalid gzip data";var se=ie[3],ye=10;se&4&&(ye+=ie[10]|(ie[11]<<8)+2);for(var Ce=(se>>3&1)+(se>>4&1);Ce>0;Ce-=!ie[ye++]);return ye+(se&2)},Pr=function(ie){var se=ie.length;return(ie[se-4]|ie[se-3]<<8|ie[se-2]<<16)+2*(ie[se-1]<<23)},kr=function(ie){return 10+(ie.filename&&ie.filename.length+1||0)},yr=function(ie,se){var ye=se.level,Ce=ye==0?0:ye<6?1:ye==9?3:2;ie[0]=120,ie[1]=Ce<<6|(Ce?32-2*Ce:1)},or=function(ie){if((ie[0]&15)!=8||ie[0]>>>4>7||(ie[0]<<8|ie[1])%31)throw"invalid zlib data";if(ie[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function Es(ie,se){return!se&&typeof ie=="function"&&(se=ie,ie={}),this.ondata=se,ie}var Wr=null,Wo=null;function Fo(ie,se,ye){if(ye||(ye=se,se={}),typeof ye!="function")throw"no callback";return Xn(ie,se,[Ft],function(Ce){return Tn($r(Ce.data[0],Ce.data[1]))},0,ye)}function $r(ie,se){return se===void 0&&(se={}),bn(ie,se,0,0)}var ur=null,So=null;function Er(ie,se,ye){if(ye||(ye=se,se={}),typeof ye!="function")throw"no callback";return Xn(ie,se,[Et],function(Ce){return Tn(bo(Ce.data[0],Ei(Ce.data[1])))},1,ye)}function bo(ie,se){return fn(ie,se)}var Ss=null,Ms=null;function $s(ie,se,ye){if(ye||(ye=se,se={}),typeof ye!="function")throw"no callback";return Xn(ie,se,[Ft,Dt,function(){return[xo]}],function(Ce){return Tn(xo(Ce.data[0],Ce.data[1]))},2,ye)}function xo(ie,se){se===void 0&&(se={});var ye=Cn(),Ce=ie.length;ye.p(ie);var Oe=bn(ie,se,kr(se),8),Ze=Oe.length;return qi(Oe,se),gi(Oe,Ze-8,ye.d()),gi(Oe,Ze-4,Ce),Oe}var er=null,en=null;function Bt(ie,se,ye){if(ye||(ye=se,se={}),typeof ye!="function")throw"no callback";return Xn(ie,se,[Et,Wt,function(){return[Qn]}],function(Ce){return Tn(Qn(Ce.data[0]))},3,ye)}function Qn(ie,se){return fn(ie.subarray(fi(ie),-8),se||new Ne(Pr(ie)))}var Dn=null,cn=null;function un(ie,se,ye){if(ye||(ye=se,se={}),typeof ye!="function")throw"no callback";return Xn(ie,se,[Ft,kt,function(){return[wn]}],function(Ce){return Tn(wn(Ce.data[0],Ce.data[1]))},4,ye)}function wn(ie,se){se===void 0&&(se={});var ye=Jn();ye.p(ie);var Ce=bn(ie,se,2,4);return yr(Ce,se),gi(Ce,Ce.length-4,ye.d()),Ce}var Hn=null,di=null;function ke(ie,se,ye){if(ye||(ye=se,se={}),typeof ye!="function")throw"no callback";return Xn(ie,se,[Et,Ue,function(){return[Ee]}],function(Ce){return Tn(Ee(Ce.data[0],Ei(Ce.data[1])))},5,ye)}function Ee(ie,se){return fn((or(ie),ie.subarray(2,-4)),se)}var ue=null,Ie=null;function On(ie,se,ye){if(ye||(ye=se,se={}),typeof ye!="function")throw"no callback";return ie[0]==31&&ie[1]==139&&ie[2]==8?Bt(ie,se,ye):(ie[0]&15)!=8||ie[0]>>4>7||(ie[0]<<8|ie[1])%31?Er(ie,se,ye):ke(ie,se,ye)}function zn(ie,se){return ie[0]==31&&ie[1]==139&&ie[2]==8?Qn(ie,se):(ie[0]&15)!=8||ie[0]>>4>7||(ie[0]<<8|ie[1])%31?bo(ie,se):Ee(ie,se)}var Zn=function(ie,se,ye,Ce){for(var Oe in ie){var Ze=ie[Oe],En=se+Oe;Ze instanceof Ne?ye[En]=[Ze,Ce]:Array.isArray(Ze)?ye[En]=[Ze[0],ve(Ce,Ze[1])]:Zn(Ze,En+"/",ye,Ce)}};function Fe(ie,se){var ye=ie.length;if(!se&&typeof TextEncoder!="undefined")return new TextEncoder().encode(ie);for(var Ce=new Ne(ie.length+(ie.length>>>1)),Oe=0,Ze=function(pn){Ce[Oe++]=pn},En=0;En<ye;++En){if(Oe+5>Ce.length){var Wn=new Ne(Oe+8+(ye-En<<1));Wn.set(Ce),Ce=Wn}var Te=ie.charCodeAt(En);Te<128||se?Ze(Te):Te<2048?(Ze(192|Te>>>6),Ze(128|Te&63)):Te>55295&&Te<57344?(Te=65536+(Te&1047552)|ie.charCodeAt(++En)&1023,Ze(240|Te>>>18),Ze(128|Te>>>12&63),Ze(128|Te>>>6&63),Ze(128|Te&63)):(Ze(224|Te>>>12),Ze(128|Te>>>6&63),Ze(128|Te&63))}return Je(Ce,0,Oe)}function Se(ie,se){var ye="";if(!se&&typeof TextDecoder!="undefined")return new TextDecoder().decode(ie);for(var Ce=0;Ce<ie.length;){var Oe=ie[Ce++];Oe<128||se?ye+=String.fromCharCode(Oe):Oe<224?ye+=String.fromCharCode((Oe&31)<<6|ie[Ce++]&63):Oe<240?ye+=String.fromCharCode((Oe&15)<<12|(ie[Ce++]&63)<<6|ie[Ce++]&63):(Oe=((Oe&15)<<18|(ie[Ce++]&63)<<12|(ie[Ce++]&63)<<6|ie[Ce++]&63)-65536,ye+=String.fromCharCode(55296|Oe>>10,56320|Oe&1023))}return ye}var Pn=function(ie,se){return se+30+Ln(ie,se+26)+Ln(ie,se+28)},ti=function(ie,se,ye){var Ce=Ln(ie,se+28),Oe=Se(ie.subarray(se+46,se+46+Ce),!(Ln(ie,se+8)&2048)),Ze=se+46+Ce,En=ye?nn(ie,Ze):[Ci(ie,se+20),Ci(ie,se+24),Ci(ie,se+42)],Wn=En[0],Te=En[1],pn=En[2];return[Ln(ie,se+10),Wn,Te,Oe,Ze+Ln(ie,se+30)+Ln(ie,se+32),pn]},nn=function(ie,se){for(;Ln(ie,se)!=1;se+=4+Ln(ie,se+2));return[Ci(ie,se+12),Ci(ie,se+4),Ci(ie,se+20)]},pe=function(ie,se,ye,Ce,Oe,Ze,En,Wn,Te,pn){var ri=Ze.length,Ji=Ce.length;gi(ie,se,Te!=null?33639248:67324752),se+=4,Te!=null&&(ie[se]=20,se+=2),ie[se]=20,se+=2,ie[se++]=pn==8&&(Wn.level==1?6:Wn.level<6?4:Wn.level==9?2:0),ie[se++]=En&&8,ie[se]=pn,se+=2;var zi=new Date(Wn.mtime||Date.now()),ce=zi.getFullYear()-1980;if(ce<0||ce>119)throw"date not in range 1980-2099";gi(ie,se,(ce<<24)*2|zi.getMonth()+1<<21|zi.getDate()<<16|zi.getHours()<<11|zi.getMinutes()<<5|zi.getSeconds()>>>1),se+=4,gi(ie,se,ye),gi(ie,se+4,Ji),gi(ie,se+8,Oe),gi(ie,se+12,ri),se+=16,Te!=null&&(gi(ie,se+=10,Te),se+=4),ie.set(Ze,se),se+=ri,Te==null&&ie.set(Ce,se)},Un=function(ie,se,ye,Ce,Oe){gi(ie,se,101010256),gi(ie,se+8,ye),gi(ie,se+10,ye),gi(ie,se+12,Ce),gi(ie,se+16,Oe)};function pi(ie,se,ye){if(ye||(ye=se,se={}),typeof ye!="function")throw"no callback";var Ce={};Zn(ie,"",Ce,se);var Oe=Object.keys(Ce),Ze=Oe.length,En=0,Wn=0,Te=Ze,pn=new Array(Ze),ri=[],Ji=function(){for(var mi=0;mi<ri.length;++mi)ri[mi]()},zi=function(){var mi=new Ne(Wn+22),Yn=En,hr=Wn-En;Wn=0;for(var Mi=0;Mi<Te;++Mi){var xi=pn[Mi];try{pe(mi,Wn,xi.c,xi.d,xi.m,xi.n,xi.u,xi.p,null,xi.t),pe(mi,En,xi.c,xi.d,xi.m,xi.n,xi.u,xi.p,Wn,xi.t),En+=46+xi.n.length,Wn+=30+xi.n.length+xi.d.length}catch(ci){return ye(ci,null)}}Un(mi,En,pn.length,hr,Yn),ye(null,mi)};Ze||zi();for(var ce=function(mi){var Yn=Oe[mi],hr=Ce[Yn],Mi=hr[0],xi=hr[1],ci=Cn(),Ni=Mi.length;ci.p(Mi);var Vi=Fe(Yn),Ke=Vi.length,ki=xi.level==0?0:8,Ye=function(rr,Ro){if(rr)Ji(),ye(rr,null);else{var gr=Ro.length;pn[mi]={t:ki,d:Ro,m:Ni,c:ci.d(),u:Yn.length!=gr,n:Vi,p:xi},En+=30+Ke+gr,Wn+=76+2*Ke+gr,--Ze||zi()}};if(Vi.length>65535&&Ye("filename too long",null),!ki)Ye(null,Mi);else if(Ni<16e4)try{Ye(null,$r(Mi,xi))}catch(rr){Ye(rr,null)}else ri.push(Fo(Mi,xi,Ye))},$n=0;$n<Te;++$n)ce($n);return Ji}function Oi(ie,se){se===void 0&&(se={});var ye={},Ce=[];Zn(ie,"",ye,se);var Oe=0,Ze=0;for(var En in ye){var Wn=ye[En],Te=Wn[0],pn=Wn[1],ri=pn.level==0?0:8,Ji=Fe(En),zi=Ji.length;if(Ji.length>65535)throw"filename too long";var ce=ri?$r(Te,pn):Te,$n=ce.length,mi=Cn();mi.p(Te),Ce.push({t:ri,d:ce,m:Te.length,c:mi.d(),u:En.length!=zi,n:Ji,o:Oe,p:pn}),Oe+=30+zi+$n,Ze+=76+2*zi+$n}for(var Yn=new Ne(Ze+22),hr=Oe,Mi=Ze-Oe,xi=0;xi<Ce.length;++xi){var ci=Ce[xi];pe(Yn,ci.o,ci.c,ci.d,ci.m,ci.n,ci.u,ci.p,null,ci.t),pe(Yn,Oe,ci.c,ci.d,ci.m,ci.n,ci.u,ci.p,ci.o,ci.t),Oe+=46+ci.n.length}return Un(Yn,Oe,Ce.length,Mi,hr),Yn}function on(ie,se){if(typeof se!="function")throw"no callback";for(var ye=[],Ce=function(){for(var zi=0;zi<ye.length;++zi)ye[zi]()},Oe={},Ze=ie.length-22;Ci(ie,Ze)!=101010256;--Ze)if(!Ze||ie.length-Ze>65558){se("invalid zip file",null);return}var En=Ln(ie,Ze+8);En||se(null,{});var Wn=En,Te=Ci(ie,Ze+16),pn=Te==4294967295;if(pn){if(Ze=Ci(ie,Ze-12),Ci(ie,Ze)!=101075792)throw"invalid zip file";Wn=En=Ci(ie,Ze+32),Te=Ci(ie,Ze+48)}for(var ri=function(zi){var ce=ti(ie,Te,pn),$n=ce[0],mi=ce[1],Yn=ce[2],hr=ce[3],Mi=ce[4],xi=ce[5],ci=Pn(ie,xi);Te=Mi;var Ni=function(Ke,ki){Ke?(Ce(),se(Ke,null)):(Oe[hr]=ki,--En||se(null,Oe))};if(!$n)Ni(null,Je(ie,ci,ci+mi));else if($n==8){var Vi=ie.subarray(ci,ci+mi);if(mi<32e4)try{Ni(null,bo(Vi,new Ne(Yn)))}catch(Ke){Ni(Ke,null)}else ye.push(Er(Vi,{size:Yn},Ni))}else Ni("unknown compression type "+$n,null)},Ji=0;Ji<Wn;++Ji)ri(Ji);return Ce}function ni(ie){for(var se={},ye=ie.length-22;Ci(ie,ye)!=101010256;--ye)if(!ye||ie.length-ye>65558)throw"invalid zip file";var Ce=Ln(ie,ye+8);if(!Ce)return{};var Oe=Ci(ie,ye+16),Ze=Oe==4294967295;if(Ze){if(ye=Ci(ie,ye-12),Ci(ie,ye)!=101075792)throw"invalid zip file";Ce=Ci(ie,ye+32),Oe=Ci(ie,ye+48)}for(var En=0;En<Ce;++En){var Wn=ti(ie,Oe,Ze),Te=Wn[0],pn=Wn[1],ri=Wn[2],Ji=Wn[3],zi=Wn[4],ce=Wn[5],$n=Pn(ie,ce);if(Oe=zi,!Te)se[Ji]=Je(ie,$n,$n+pn);else if(Te==8)se[Ji]=bo(ie.subarray($n,$n+pn),new Ne(ri));else throw"unknown compression type "+Te}return se}},23495:function(yn,qn,ee){"use strict";ee.d(qn,{$u:function(){return fe},BD:function(){return Kt},E9:function(){return De},FF:function(){return Ms},FJ:function(){return yt},Hn:function(){return ct},KX:function(){return Nt},NB:function(){return si},S0:function(){return Le},UL:function(){return Qe},Vk:function(){return lt},Vm:function(){return Ln},YI:function(){return Sn},ZA:function(){return Ne},Zt:function(){return gn},al:function(){return kt},bn:function(){return Wt},bx:function(){return Et},g2:function(){return xn},h1:function(){return le},hD:function(){return Wo},l4:function(){return we},rU:function(){return Qi},s_:function(){return Ft},uz:function(){return Xn},z6:function(){return Xe}}),yn=ee.hmd(yn),function(){var Bt;function Qn(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Dn(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:Qn(a)}}function cn(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var un=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},wn;if(typeof Object.setPrototypeOf=="function")wn=Object.setPrototypeOf;else{var Hn;t:{var di={a:!0},ke={};try{ke.__proto__=di,Hn=ke.a;break t}catch(a){}Hn=!1}wn=Hn?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var Ee=wn;function ue(a,y){if(a.prototype=un(y.prototype),a.prototype.constructor=a,Ee)Ee(a,y);else for(var x in y)if(x!="prototype")if(Object.defineProperties){var E=Object.getOwnPropertyDescriptor(y,x);E&&Object.defineProperty(a,x,E)}else a[x]=y[x];a.QA=y.prototype}var Ie=typeof ee.g!="undefined"&&ee.g!=null?ee.g:self,On=typeof Object.assign=="function"?Object.assign:function(a,y){for(var x=1;x<arguments.length;x++){var E=arguments[x];if(E)for(var b in E)Object.prototype.hasOwnProperty.call(E,b)&&(a[b]=E[b])}return a},zn=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function Zn(a,y){if(y){var x=Ie;a=a.split(".");for(var E=0;E<a.length-1;E++){var b=a[E];b in x||(x[b]={}),x=x[b]}a=a[a.length-1],E=x[a],y=y(E),y!=E&&y!=null&&zn(x,a,{writable:!0,value:y})}}Zn("Object.assign",function(a){return a||On}),Zn("Array.prototype.fill",function(a){return a||function(y,x,E){var b=this.length||0;for(0>x&&(x=Math.max(0,b+x)),(E==null||E>b)&&(E=b),E=Number(E),0>E&&(E=Math.max(0,b+E)),x=Number(x||0);x<E;x++)this[x]=y;return this}});var Fe=typeof globalThis=="object"&&globalThis||typeof ee.g=="object"&&ee.g.global===ee.g&&ee.g||typeof self=="object"&&self.self===self&&self||{};Fe.requestAnimationFrame===void 0&&(Fe.setImmediate===void 0?Fe.requestAnimationFrame=function(a){Fe.setTimeout(a,0)}:Fe.requestAnimationFrame=Fe.setImmediate);function Se(){}function Pn(a,y){var x=-1;return function(){var E=this,b=arguments;x!==-1&&Fe.clearTimeout(x),x=ti(function(){x=-1,a.apply(E,b)},y)}}function ti(a,y){return Fe.setTimeout(a,y)}function nn(a){return Fe.document.createElement(a)}function pe(a){throw Error(a)}function Un(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),pe(a)}function pi(a,y,x,E){x=x===null?"*":typeof x=="string"?x:typeof x=="function"&&typeof x.className=="string"?x.className:"",E!==void 0&&(x+="."+E),pe(x+" is not in the range "+y+": "+a)}function Oi(a){Fe.console&&Fe.console.log(a)}function on(a){return typeof a=="object"&&a!==null}function ni(a){return Array.isArray(a)||Fe.NodeList&&a instanceof Fe.NodeList||Fe.HTMLCollection&&a instanceof Fe.HTMLCollection}function ie(a){return Array.prototype.slice.call(a)}function se(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):pe("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function ye(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):pe("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Ce(){var a=zi.pop();return a===void 0?[]:a}function Oe(a){a.length=0,zi.push(a)}function Ze(a){if(typeof a=="function"){if(a.className)return a.className;if(a.name)return a.name;var y=a.toString();if(y=y.substring(9,y.indexOf("(")).trim(),y!=="")return a._className=y}else if(on(a)&&a.constructor)return Ze(a.constructor);return typeof a}function En(a){var y=a;return on(a)&&(a.text?y=a.text:a.name?y=a.name:a.key!==void 0?y=a.key:a.id!==void 0?y=a.id:a.constructor===Object&&(a.Text?y=a.Text:a.Name?y=a.Name:a.Key!==void 0?y=a.Key:a.Id!==void 0?y=a.Id:a.ID!==void 0&&(y=a.ID))),y===void 0?"undefined":y===null?"null":y.toString()}function Wn(a,y){if(a.hasOwnProperty(y))return!0;for(a=Object.getPrototypeOf(a);a&&a!==Function;){if(a.hasOwnProperty(y))return!0;var x=a.CA;if(x&&x[y])return!0;a=Object.getPrototypeOf(a)}return!1}function Te(a,y,x){Object.defineProperty(br.prototype,a,{get:y,set:x})}function pn(a){for(var y=[],x=0;256>x;x++)y["0123456789abcdef".charAt(x>>4)+"0123456789abcdef".charAt(x&15)]=String.fromCharCode(x);a.length%2&&(a="0"+a),x=[];for(var E=0,b=0;b<a.length;b+=2)x[E++]=y[a.substr(b,2)];for(a=x.join(""),a=a===""?"0":a,y=[],x=0;256>x;x++)y[x]=x;for(x=E=0;256>x;x++)E=(E+y[x]+119)%256,b=y[x],y[x]=y[E],y[E]=b;E=x=0;for(var z="",tt=0;tt<a.length;tt++)x=(x+1)%256,E=(E+y[x])%256,b=y[x],y[x]=y[E],y[E]=b,z+=String.fromCharCode(a.charCodeAt(tt)^y[(y[x]+y[E])%256]);return z.indexOf("GoJS 2.1 evaluation")>-1||z.indexOf("\xA9 1998-2021 Northwoods Software")>-1||z.indexOf("Not for distribution or production use")>-1||z.indexOf("gojs.net")>-1?"":z}var ri=Fe.navigator!==void 0&&0<Fe.navigator.userAgent.indexOf("Trident/7"),Ji=Fe.navigator!==void 0&&Fe.navigator.platform!==void 0&&Fe.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,zi=[];Object.freeze([]),Se.className="Util",Se.Dx="32ab5ff3b26f42dc0ed90f21472913b5",Se.adym="gojs.net",Se.vfo="28e645fdb266",Se.className="Util";function ce(a,y,x){rr(this),this.j=a,this.xa=y,this.o=x}ce.prototype.toString=function(){return"EnumValue."+this.xa};function $n(a,y){return y==null||y===""?null:a[y]}Ie.Object.defineProperties(ce.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),ce.className="EnumValue";function mi(){this.ew=[]}mi.prototype.toString=function(){return this.ew.join("")},mi.prototype.add=function(a){a!==""&&this.ew.push(a)},mi.className="StringBuilder";function Yn(){}Yn.className="PropertyCollection";var hr={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){Fe.console&&Fe.console.log(a)},HA:function(a,y,x,E){a.strokeStyle="red",a.fillStyle="red",a.font="8px sans-serif",a.beginPath(),a.moveTo(-10,0),a.lineTo(10,0),a.moveTo(0,-10),a.lineTo(0,10),a.stroke(),a.setTransform(1,0,0,1,0,0),a.scale(x,x),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.lineWidth=2,a.beginPath(),a.moveTo(E.left,E.top+20),a.lineTo(E.left,E.top),a.lineTo(E.left+20,E.top),a.moveTo(E.right,E.bottom-20),a.lineTo(E.right,E.bottom),a.lineTo(E.right-20,E.bottom),a.stroke(),a.fillText("DB: "+Math.round(E.x)+", "+Math.round(E.y)+", "+Math.round(E.width)+", "+Math.round(E.height),E.left,E.top-5)},DA:function(a){var y={},x;for(x in a){if(y.x=x,y.x!=="licenseKey"){var E=a[y.x];if(E.prototype!==void 0){y.Zl=Object.getOwnPropertyNames(E.prototype);for(var b={Tj:0};b.Tj<y.Zl.length;b={Tj:b.Tj},b.Tj++){var z=Object.getOwnPropertyDescriptor(E.prototype,y.Zl[b.Tj]);z.get!==void 0&&z.set===void 0&&Object.defineProperty(E.prototype,y.Zl[b.Tj],{set:function(tt,rt){return function(){throw Error("Property "+tt.Zl[rt.Tj]+" of "+tt.x+" is read-only.")}}(y,b)})}}}y={Zl:y.Zl,x:y.x}}}};function Mi(){}Mi.prototype.reset=function(){},Mi.prototype.next=function(){return!1},Mi.prototype.Ad=function(){return!1},Mi.prototype.first=function(){return null},Mi.prototype.any=function(){return!1},Mi.prototype.all=function(){return!0},Mi.prototype.each=function(){return this},Mi.prototype.map=function(){return this},Mi.prototype.filter=function(){return this},Mi.prototype.de=function(){},Mi.prototype.toString=function(){return"EmptyIterator"},Ie.Object.defineProperties(Mi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Mi.prototype.first=Mi.prototype.first,Mi.prototype.hasNext=Mi.prototype.Ad,Mi.prototype.next=Mi.prototype.next,Mi.prototype.reset=Mi.prototype.reset;var xi=null;Mi.className="EmptyIterator",xi=new Mi;function ci(a){this.key=-1,this.value=a}ci.prototype.reset=function(){this.key=-1},ci.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},ci.prototype.Ad=function(){return this.next()},ci.prototype.first=function(){return this.key=0,this.value},ci.prototype.any=function(a){return this.key=-1,a(this.value)},ci.prototype.all=function(a){return this.key=-1,a(this.value)},ci.prototype.each=function(a){return this.key=-1,a(this.value),this},ci.prototype.map=function(a){return new ci(a(this.value))},ci.prototype.filter=function(a){return a(this.value)?new ci(this.value):xi},ci.prototype.de=function(){this.value=null},ci.prototype.toString=function(){return"SingletonIterator("+this.value+")"},Ie.Object.defineProperties(ci.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),ci.prototype.first=ci.prototype.first,ci.prototype.hasNext=ci.prototype.Ad,ci.prototype.next=ci.prototype.next,ci.prototype.reset=ci.prototype.reset,ci.className="SingletonIterator";function Ni(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}Ni.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},Ni.prototype.next=function(){var a=this.Bb;if(a.Ja!==this.qa&&0>this.key)return!1;a=a.s;var y=a.length,x=++this.Za,E=this.qf;if(E!==null)for(;x<y;){var b=a[x];if(E(b))return this.key=this.Za=x,this.value=b,!0;x++}else{if(x<y)return this.key=x,this.value=a[x],!0;this.de()}return!1},Ni.prototype.Ad=function(){return this.next()},Ni.prototype.first=function(){var a=this.Bb;this.qa=a.Ja,this.Za=0,a=a.s;var y=a.length,x=this.qf;if(x!==null){for(var E=0;E<y;){var b=a[E];if(x(b))return this.key=this.Za=E,this.value=b;E++}return null}return 0<y?(a=a[0],this.key=0,this.value=a):null},Ni.prototype.any=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];if((E===null||E(z))&&a(z))return!0}return!1},Ni.prototype.all=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];if((E===null||E(z))&&!a(z))return!1}return!0},Ni.prototype.each=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];(E===null||E(z))&&a(z)}return this},Ni.prototype.map=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var E=y.length,b=this.qf,z=0;z<E;z++){var tt=y[z];(b===null||b(tt))&&x.push(a(tt))}return a=new Ke,a.s=x,a.xb(),a.iterator},Ni.prototype.filter=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var E=y.length,b=this.qf,z=0;z<E;z++){var tt=y[z];(b===null||b(tt))&&a(tt)&&x.push(tt)}return a=new Ke,a.s=x,a.xb(),a.iterator},Ni.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},Ni.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},Ie.Object.defineProperties(Ni.prototype,{iterator:{get:function(){return this}},predicate:{get:function(){return this.qf},set:function(a){this.qf=a}},count:{get:function(){var a=this.qf;if(a!==null){for(var y=0,x=this.Bb.s,E=x.length,b=0;b<E;b++)a(x[b])&&y++;return y}return this.Bb.s.length}}}),Ni.prototype.first=Ni.prototype.first,Ni.prototype.hasNext=Ni.prototype.Ad,Ni.prototype.next=Ni.prototype.next,Ni.prototype.reset=Ni.prototype.reset,Ni.className="ListIterator";function Vi(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}Vi.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},Vi.prototype.next=function(){var a=this.Bb;if(a.Ja!==this.qa&&0>this.key)return!1;var y=--this.Za;return 0<=y?(this.key=y,this.value=a.s[y],!0):(this.de(),!1)},Vi.prototype.Ad=function(){return this.next()},Vi.prototype.first=function(){var a=this.Bb;this.qa=a.Ja;var y=a.s;return this.Za=a=y.length-1,0<=a?(y=y[a],this.key=a,this.value=y):null},Vi.prototype.any=function(a){var y=this.Bb;y.Hg=null,y=y.s;var x=y.length;for(this.Za=x,--x;0<=x;x--)if(a(y[x]))return!0;return!1},Vi.prototype.all=function(a){var y=this.Bb;y.Hg=null,y=y.s;var x=y.length;for(this.Za=x,--x;0<=x;x--)if(!a(y[x]))return!1;return!0},Vi.prototype.each=function(a){var y=this.Bb;y.Hg=null,y=y.s;var x=y.length;for(this.Za=x,--x;0<=x;x--)a(y[x]);return this},Vi.prototype.map=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var E=y.length;for(this.Za=E,--E;0<=E;E--)x.push(a(y[E]));return a=new Ke,a.s=x,a.xb(),a.iterator},Vi.prototype.filter=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var E=y.length;for(this.Za=E,--E;0<=E;E--){var b=y[E];a(b)&&x.push(b)}return a=new Ke,a.s=x,a.xb(),a.iterator},Vi.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},Vi.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Ie.Object.defineProperties(Vi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),Vi.prototype.first=Vi.prototype.first,Vi.prototype.hasNext=Vi.prototype.Ad,Vi.prototype.next=Vi.prototype.next,Vi.prototype.reset=Vi.prototype.reset,Vi.className="ListIteratorBackwards";function Ke(a){rr(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&pe("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Bt=Ke.prototype,Bt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Bt.freeze=function(){return this._isFrozen=!0,this},Bt.ka=function(){return this._isFrozen=!1,this},Bt.toString=function(){return"List()#"+gr(this)},Bt.add=function(a){return a===null?this:(this._isFrozen&&Un(this,a),this.s.push(a),this.xb(),this)},Bt.push=function(a){this.add(a)},Bt.addAll=function(a){if(a===null)return this;this._isFrozen&&Un(this);var y=this.s;if(ni(a))for(var x=a.length,E=0;E<x;E++)y.push(a[E]);else for(a=a.iterator;a.next();)y.push(a.value);return this.xb(),this},Bt.clear=function(){this._isFrozen&&Un(this),this.s.length=0,this.xb()},Bt.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},Bt.has=function(a){return this.contains(a)},Bt.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},Bt.M=function(a){var y=this.s;return(0>a||a>=y.length)&&pi(a,"0 <= i < length",Ke,"elt:i"),y[a]},Bt.get=function(a){return this.M(a)},Bt.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&pi(a,"0 <= i < length",Ke,"setElt:i"),this._isFrozen&&Un(this,a),x[a]=y},Bt.set=function(a,y){this.cd(a,y)},Bt.first=function(){var a=this.s;return a.length===0?null:a[0]},Bt.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},Bt.pop=function(){this._isFrozen&&Un(this);var a=this.s;return 0<a.length?a.pop():null},Ke.prototype.any=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)if(a(y[E]))return!0;return!1},Ke.prototype.all=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)if(!a(y[E]))return!1;return!0},Ke.prototype.each=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)a(y[E]);return this},Ke.prototype.map=function(a){for(var y=new Ke,x=[],E=this.s,b=E.length,z=0;z<b;z++)x.push(a(E[z]));return y.s=x,y.xb(),y},Ke.prototype.filter=function(a){for(var y=new Ke,x=[],E=this.s,b=E.length,z=0;z<b;z++){var tt=E[z];a(tt)&&x.push(tt)}return y.s=x,y.xb(),y},Bt=Ke.prototype,Bt.Gb=function(a,y){0>a&&pi(a,">= 0",Ke,"insertAt:i"),this._isFrozen&&Un(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},Bt.remove=function(a){if(a===null)return!1;this._isFrozen&&Un(this,a);var y=this.s;return a=y.indexOf(a),a===-1?!1:(a===y.length-1?y.pop():y.splice(a,1),this.xb(),!0)},Bt.delete=function(a){return this.remove(a)},Bt.mb=function(a){var y=this.s;(0>a||a>=y.length)&&pi(a,"0 <= i < length",Ke,"removeAt:i"),this._isFrozen&&Un(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},Bt.removeRange=function(a,y){var x=this.s,E=x.length;if(0>a)a=0;else if(a>=E)return this;if(0>y)return this;if(y>=E&&(y=E-1),a>y)return this;this._isFrozen&&Un(this);for(var b=a,z=y+1;z<E;)x[b++]=x[z++];return x.length=E-(y-a+1),this.xb(),this},Ke.prototype.copy=function(){var a=new Ke,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},Bt=Ke.prototype,Bt.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),E=0;E<y;E++)x[E]=a[E];return x},Bt.Iv=function(){for(var a=new Ye,y=this.s,x=this.count,E=0;E<x;E++)a.add(y[E]);return a},Bt.sort=function(a){return this._isFrozen&&Un(this),this.s.sort(a),this.xb(),this},Bt.zi=function(a,y,x){var E=this.s,b=E.length;y===void 0&&(y=0),x===void 0&&(x=b),this._isFrozen&&Un(this);var z=x-y;if(1>=z)return this;if((0>y||y>=b-1)&&pi(y,"0 <= from < length",Ke,"sortRange:from"),z===2)return x=E[y],b=E[y+1],0<a(x,b)&&(E[y]=b,E[y+1]=x,this.xb()),this;if(y===0)if(x>=b)E.sort(a);else for(y=E.slice(0,x),y.sort(a),a=0;a<x;a++)E[a]=y[a];else if(x>=b)for(x=E.slice(y),x.sort(a),a=y;a<b;a++)E[a]=x[a-y];else for(b=E.slice(y,x),b.sort(a),a=y;a<x;a++)E[a]=b[a-y];return this.xb(),this},Bt.reverse=function(){return this._isFrozen&&Un(this),this.s.reverse(),this.xb(),this},Ie.Object.defineProperties(Ke.prototype,{_dataArray:{get:function(){return this.s}},count:{get:function(){return this.s.length}},size:{get:function(){return this.s.length}},length:{get:function(){return this.s.length}},iterator:{get:function(){if(0>=this.s.length)return xi;var a=this.Sa;return a!==null?(a.reset(),a):new Ni(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return xi;var a=this.Hg;return a!==null?(a.reset(),a):new Vi(this)}}}),Ke.prototype.reverse=Ke.prototype.reverse,Ke.prototype.sortRange=Ke.prototype.zi,Ke.prototype.sort=Ke.prototype.sort,Ke.prototype.toSet=Ke.prototype.Iv,Ke.prototype.toArray=Ke.prototype.Fa,Ke.prototype.removeRange=Ke.prototype.removeRange,Ke.prototype.removeAt=Ke.prototype.mb,Ke.prototype.delete=Ke.prototype.delete,Ke.prototype.remove=Ke.prototype.remove,Ke.prototype.insertAt=Ke.prototype.Gb,Ke.prototype.pop=Ke.prototype.pop,Ke.prototype.last=Ke.prototype.jc,Ke.prototype.first=Ke.prototype.first,Ke.prototype.set=Ke.prototype.set,Ke.prototype.setElt=Ke.prototype.cd,Ke.prototype.get=Ke.prototype.get,Ke.prototype.elt=Ke.prototype.M,Ke.prototype.indexOf=Ke.prototype.indexOf,Ke.prototype.has=Ke.prototype.has,Ke.prototype.contains=Ke.prototype.contains,Ke.prototype.clear=Ke.prototype.clear,Ke.prototype.addAll=Ke.prototype.addAll,Ke.prototype.push=Ke.prototype.push,Ke.prototype.add=Ke.prototype.add,Ke.prototype.thaw=Ke.prototype.ka,Ke.prototype.freeze=Ke.prototype.freeze,Ke.className="List";function ki(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}ki.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},ki.prototype.next=function(){var a=this.eg;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=y.value,this.key=y.key,!0):(this.de(),!1)},ki.prototype.Ad=function(){return this.next()},ki.prototype.first=function(){var a=this.eg;if(this.qa=a.Ja,a=a.ea,a!==null){this.sa=a;var y=a.value;return this.key=a.key,this.value=y}return null},ki.prototype.any=function(a){var y=this.eg;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},ki.prototype.all=function(a){var y=this.eg;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},ki.prototype.each=function(a){var y=this.eg;for(this.sa=y.Sa=null,y=y.ea;y!==null;)a(y.value),y=y.va;return this},ki.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new Ke;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},ki.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new Ke;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},ki.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},ki.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Ie.Object.defineProperties(ki.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),ki.prototype.first=ki.prototype.first,ki.prototype.hasNext=ki.prototype.Ad,ki.prototype.next=ki.prototype.next,ki.prototype.reset=ki.prototype.reset,ki.className="SetIterator";function Ye(a){rr(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&pe("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Bt=Ye.prototype,Bt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Bt.freeze=function(){return this._isFrozen=!0,this},Bt.ka=function(){return this._isFrozen=!1,this},Bt.toString=function(){return"Set()#"+gr(this)},Bt.add=function(a){if(a===null)return this;this._isFrozen&&Un(this,a);var y=a;return on(a)&&(y=Ro(a)),this.Tb[y]===void 0&&(this.Sb++,a=new qr(a,a),this.Tb[y]=a,y=this.kf,y===null?this.ea=a:(a.ll=y,y.va=a),this.kf=a,this.xb()),this},Bt.addAll=function(a){if(a===null)return this;if(this._isFrozen&&Un(this),ni(a))for(var y=a.length,x=0;x<y;x++)this.add(a[x]);else for(a=a.iterator;a.next();)this.add(a.value);return this},Bt.contains=function(a){if(a===null)return!1;var y=a;return on(a)&&(y=gr(a),y===void 0)?!1:this.Tb[y]!==void 0},Bt.has=function(a){return this.contains(a)},Bt.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},Bt.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},Bt.first=function(){var a=this.ea;return a===null?null:a.value},Ye.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Ye.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Ye.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},Ye.prototype.map=function(a){for(var y=new Ye,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},Ye.prototype.filter=function(a){for(var y=new Ye,x=this.ea;x!==null;){var E=x.value;a(E)&&y.add(E),x=x.va}return y},Bt=Ye.prototype,Bt.remove=function(a){if(a===null)return!1;this._isFrozen&&Un(this,a);var y=a;if(on(a)&&(y=gr(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,E=a.ll;return x!==null&&(x.ll=E),E!==null&&(E.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=E),delete this.Tb[y],this.Sb--,this.xb(),!0},Bt.delete=function(a){return this.remove(a)},Bt.hp=function(a){if(a===null)return this;if(this._isFrozen&&Un(this),ni(a))for(var y=a.length,x=0;x<y;x++)this.remove(a[x]);else for(a=a.iterator;a.next();)this.remove(a.value);return this},Bt.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&Un(this);var y=new Ye;y.addAll(a),a=[];for(var x=this.iterator;x.next();){var E=x.value;y.contains(E)||a.push(E)}return this.hp(a),this},Bt.clear=function(){this._isFrozen&&Un(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},Ye.prototype.copy=function(){var a=new Ye,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},Ye.prototype.Fa=function(){var a=Array(this.Sb),y=this.Tb,x=0,E;for(E in y)a[x]=y[E].value,x++;return a},Ye.prototype.Hv=function(){var a=new Ke,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function rr(a){a.__gohashid=lo++}function Ro(a){var y=a.__gohashid;return y===void 0&&(y=lo++,a.__gohashid=y),y}function gr(a){return a.__gohashid}Ie.Object.defineProperties(Ye.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return xi;var a=this.Sa;return a!==null?(a.reset(),a):new ki(this)}}}),Ye.prototype.toList=Ye.prototype.Hv,Ye.prototype.toArray=Ye.prototype.Fa,Ye.prototype.clear=Ye.prototype.clear,Ye.prototype.retainAll=Ye.prototype.pA,Ye.prototype.removeAll=Ye.prototype.hp,Ye.prototype.delete=Ye.prototype.delete,Ye.prototype.remove=Ye.prototype.remove,Ye.prototype.first=Ye.prototype.first,Ye.prototype.containsAny=Ye.prototype.Ty,Ye.prototype.containsAll=Ye.prototype.Sy,Ye.prototype.has=Ye.prototype.has,Ye.prototype.contains=Ye.prototype.contains,Ye.prototype.addAll=Ye.prototype.addAll,Ye.prototype.add=Ye.prototype.add,Ye.prototype.thaw=Ye.prototype.ka,Ye.prototype.freeze=Ye.prototype.freeze;var lo=1;Ye.className="Set",Ye.uniqueHash=rr,Ye.hashIdUnique=Ro,Ye.hashId=gr;function pr(a){this.ma=a,this.qa=a.Ja,this.sa=null}pr.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},pr.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=this.key=a=y.key,!0):(this.de(),!1)},pr.prototype.Ad=function(){return this.next()},pr.prototype.first=function(){var a=this.ma;return this.qa=a.Ja,a=a.ea,a!==null?(this.sa=a,this.value=this.key=a=a.key):null},pr.prototype.any=function(a){var y=this.ma;for(this.sa=null,y=y.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},pr.prototype.all=function(a){var y=this.ma;for(this.sa=null,y=y.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},pr.prototype.each=function(a){var y=this.ma;for(this.sa=null,y=y.ea;y!==null;)a(y.key),y=y.va;return this},pr.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new Ke;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},pr.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new Ke;for(y=y.ea;y!==null;){var E=y.key;a(E)&&x.add(E),y=y.va}return x.iterator},pr.prototype.de=function(){this.value=this.key=null,this.qa=-1},pr.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Ie.Object.defineProperties(pr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),pr.prototype.first=pr.prototype.first,pr.prototype.hasNext=pr.prototype.Ad,pr.prototype.next=pr.prototype.next,pr.prototype.reset=pr.prototype.reset,pr.className="MapKeySetIterator";function _i(a){Ye.call(this),rr(this),this._isFrozen=!0,this.ma=a}ue(_i,Ye),Bt=_i.prototype,Bt.freeze=function(){return this},Bt.ka=function(){return this},Bt.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Bt.add=function(){pe("This Set is read-only: "+this.toString())},Bt.contains=function(a){return this.ma.contains(a)},Bt.has=function(a){return this.contains(a)},Bt.remove=function(){pe("This Set is read-only: "+this.toString())},Bt.delete=function(a){return this.remove(a)},Bt.clear=function(){pe("This Set is read-only: "+this.toString())},Bt.first=function(){var a=this.ma.ea;return a!==null?a.key:null},_i.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},_i.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},_i.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},_i.prototype.map=function(a){for(var y=new Ye,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},_i.prototype.filter=function(a){for(var y=new Ye,x=this.ma.ea;x!==null;){var E=x.key;a(E)&&y.add(E),x=x.va}return y},_i.prototype.copy=function(){return new _i(this.ma)},_i.prototype.Iv=function(){var a=new Ye,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},_i.prototype.Fa=function(){var a=this.ma.Tb,y=Array(this.ma.Sb),x=0,E;for(E in a)y[x]=a[E].key,x++;return y},_i.prototype.Hv=function(){var a=new Ke,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Ie.Object.defineProperties(_i.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?xi:new pr(this.ma)}}}),_i.prototype.toList=_i.prototype.Hv,_i.prototype.toArray=_i.prototype.Fa,_i.prototype.toSet=_i.prototype.Iv,_i.prototype.first=_i.prototype.first,_i.prototype.clear=_i.prototype.clear,_i.prototype.delete=_i.prototype.delete,_i.prototype.remove=_i.prototype.remove,_i.prototype.has=_i.prototype.has,_i.prototype.contains=_i.prototype.contains,_i.prototype.add=_i.prototype.add,_i.prototype.thaw=_i.prototype.ka,_i.prototype.freeze=_i.prototype.freeze,_i.className="MapKeySet";function cr(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}cr.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},cr.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=y.value,this.key=y.key,!0):(this.de(),!1)},cr.prototype.Ad=function(){return this.next()},cr.prototype.first=function(){var a=this.ma;if(this.qa=a.Ja,a=a.ea,a!==null){this.sa=a;var y=a.value;return this.key=a.key,this.value=y}return null},cr.prototype.any=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},cr.prototype.all=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},cr.prototype.each=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;)a(y.value),y=y.va;return this},cr.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Ke;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},cr.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Ke;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},cr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},cr.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Ie.Object.defineProperties(cr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),cr.prototype.first=cr.prototype.first,cr.prototype.hasNext=cr.prototype.Ad,cr.prototype.next=cr.prototype.next,cr.prototype.reset=cr.prototype.reset,cr.className="MapValueSetIterator";function qr(a,y){this.key=a,this.value=y,this.ll=this.va=null}qr.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},qr.className="KeyValuePair";function Fr(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Fr.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},Fr.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.key=y.key,this.value=y.value,!0):(this.de(),!1)},Fr.prototype.Ad=function(){return this.next()},Fr.prototype.first=function(){var a=this.ma;return this.qa=a.Ja,a=a.ea,a!==null?(this.sa=a,this.key=a.key,this.value=a.value,a):null},Fr.prototype.any=function(a){var y=this.ma;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},Fr.prototype.all=function(a){var y=this.ma;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},Fr.prototype.each=function(a){var y=this.ma;for(this.sa=y.Sa=null,y=y.ea;y!==null;)a(y),y=y.va;return this},Fr.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Ke;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},Fr.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Ke;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},Fr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},Fr.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Ie.Object.defineProperties(Fr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Fr.prototype.first=Fr.prototype.first,Fr.prototype.hasNext=Fr.prototype.Ad,Fr.prototype.next=Fr.prototype.next,Fr.prototype.reset=Fr.prototype.reset,Fr.className="MapIterator";function Rn(a){rr(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.jf=this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&pe("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Bt=Rn.prototype,Bt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Bt.freeze=function(){return this._isFrozen=!0,this},Bt.ka=function(){return this._isFrozen=!1,this},Bt.toString=function(){return"Map()#"+gr(this)},Bt.add=function(a,y){this._isFrozen&&Un(this,a);var x=a;on(a)&&(x=Ro(a));var E=this.Tb[x];return E===void 0?(this.Sb++,a=new qr(a,y),this.Tb[x]=a,x=this.kf,x===null?this.ea=a:(a.ll=x,x.va=a),this.kf=a,this.xb()):E.value=y,this},Bt.set=function(a,y){return this.add(a,y)},Bt.addAll=function(a){if(a===null)return this;if(ni(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];this.add(E.key,E.value)}else if(a instanceof Rn)for(a=a.iterator;a.next();)this.add(a.key,a.value);else for(a=a.iterator;a.next();)y=a.value,this.add(y.key,y.value);return this},Bt.first=function(){return this.ea},Rn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},Rn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},Rn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},Rn.prototype.map=function(a){for(var y=new Rn,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},Rn.prototype.filter=function(a){for(var y=new Rn,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},Bt=Rn.prototype,Bt.contains=function(a){var y=a;return on(a)&&(y=gr(a),y===void 0)?!1:this.Tb[y]!==void 0},Bt.has=function(a){return this.contains(a)},Bt.I=function(a){var y=a;return on(a)&&(y=gr(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},Bt.get=function(a){return this.I(a)},Bt.remove=function(a){if(a===null)return!1;this._isFrozen&&Un(this,a);var y=a;if(on(a)&&(y=gr(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,E=a.ll;return x!==null&&(x.ll=E),E!==null&&(E.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=E),delete this.Tb[y],this.Sb--,this.xb(),!0},Bt.delete=function(a){return this.remove(a)},Bt.clear=function(){this._isFrozen&&Un(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.jf!==null&&this.jf.reset(),this.kf=this.ea=null,this.xb()},Rn.prototype.copy=function(){var a=new Rn,y=this.Tb,x;for(x in y){var E=y[x];a.add(E.key,E.value)}return a},Rn.prototype.Fa=function(){var a=this.Tb,y=Array(this.Sb),x=0,E;for(E in a){var b=a[E];y[x]=new qr(b.key,b.value),x++}return y},Rn.prototype.Lf=function(){return new _i(this)},Ie.Object.defineProperties(Rn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return xi;var a=this.Sa;return a!==null?(a.reset(),a):new Fr(this)}},iteratorKeys:{get:function(){return 0>=this.count?xi:new pr(this)}},iteratorValues:{get:function(){if(0>=this.count)return xi;var a=this.jf;return a!==null?(a.reset(),a):new cr(this)}}}),Rn.prototype.toKeySet=Rn.prototype.Lf,Rn.prototype.toArray=Rn.prototype.Fa,Rn.prototype.clear=Rn.prototype.clear,Rn.prototype.delete=Rn.prototype.delete,Rn.prototype.remove=Rn.prototype.remove,Rn.prototype.get=Rn.prototype.get,Rn.prototype.getValue=Rn.prototype.I,Rn.prototype.has=Rn.prototype.has,Rn.prototype.contains=Rn.prototype.contains,Rn.prototype.first=Rn.prototype.first,Rn.prototype.addAll=Rn.prototype.addAll,Rn.prototype.set=Rn.prototype.set,Rn.prototype.add=Rn.prototype.add,Rn.prototype.thaw=Rn.prototype.ka,Rn.prototype.freeze=Rn.prototype.freeze,Rn.className="Map";function Rt(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):pe("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Gr,ps,xs,Lo,os;Rt.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},Rt.prototype.h=function(a,y){return this.x=a,this.y=y,this},Rt.prototype.sg=function(a,y){return this.x=a,this.y=y,this},Rt.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},Rt.prototype.copy=function(){var a=new Rt;return a.x=this.x,a.y=this.y,a},Bt=Rt.prototype,Bt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Bt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Bt.freeze=function(){return this._isFrozen=!0,this},Bt.ka=function(){return Object.isFrozen(this)&&pe("cannot thaw constant: "+this),this._isFrozen=!1,this};function el(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;return(E=a[y++])&&(b=parseFloat(E)),new Rt(x,b)}return new Rt}function gl(a){return a.x.toString()+" "+a.y.toString()}Bt.toString=function(){return"Point("+this.x+","+this.y+")"},Bt.D=function(a){return a instanceof Rt?this.x===a.x&&this.y===a.y:!1},Bt.hi=function(a,y){return this.x===a&&this.y===y},Bt.Xa=function(a){return re.B(this.x,a.x)&&re.B(this.y,a.y)},Bt.add=function(a){return this.x+=a.x,this.y+=a.y,this},Bt.re=function(a){return this.x-=a.x,this.y-=a.y,this},Bt.offset=function(a,y){return this.x+=a,this.y+=y,this},Rt.prototype.rotate=function(a){if(a===0)return this;var y=this.x,x=this.y;if(y===0&&x===0)return this;if(360<=a?a-=360:0>a&&(a+=360),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));return this.x=a*y-E*x,this.y=E*y+a*x,this},Bt=Rt.prototype,Bt.scale=function(a,y){return this.x*=a,this.y*=y,this},Bt.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},Bt.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},Bt.normalize=function(){var a=this.x,y=this.y,x=Math.sqrt(a*a+y*y);return 0<x&&(this.x=a/x,this.y=y/x),this},Bt.ab=function(a){return Ra(a.x-this.x,a.y-this.y)},Bt.direction=function(a,y){return Ra(a-this.x,y-this.y)};function Ra(a,y){if(a===0)return 0<y?90:0>y?270:0;if(y===0)return 0<a?0:180;if(isNaN(a)||isNaN(y))return 0;var x=180*Math.atan(Math.abs(y/a))/Math.PI;return 0>a?x=0>y?x+180:180-x:0>y&&(x=360-x),x}Bt.Ry=function(a,y){return re.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Bt.fA=function(a,y,x,E){return re.qh(a,y,x,E,this.x,this.y,this),this},Bt.gA=function(a,y){return re.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Bt.uA=function(a,y,x,E){return re.No(this.x,this.y,a,y,x,E,this),this},Bt.vA=function(a,y){return re.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},Bt.xi=function(a,y){return this.x=a.x+y.x*a.width+y.offsetX,this.y=a.y+y.y*a.height+y.offsetY,this},Bt.yi=function(a,y,x,E,b){return this.x=a+b.x*x+b.offsetX,this.y=y+b.y*E+b.offsetY,this},Bt.transform=function(a){return a.Ga(this),this};function _r(a,y){return y.Cd(a),a}function To(a,y,x,E,b,z){var tt=b-x,rt=z-E,ot=tt*tt+rt*rt;x-=a,E-=y;var at=-x*tt-E*rt;return 0>=at||at>=ot?(tt=b-a,rt=z-y,Math.min(x*x+E*E,tt*tt+rt*rt)):(a=tt*E-rt*x,a*a/ot)}function Ui(a,y,x,E){return a=x-a,y=E-y,a*a+y*y}function ii(a,y,x,E){return a=x-a,y=E-y,a===0?0<y?90:0>y?270:0:y===0?0<a?0:180:isNaN(a)||isNaN(y)?0:(E=180*Math.atan(Math.abs(y/a))/Math.PI,0>a?E=0>y?E+180:180-E:0>y&&(E=360-E),E)}Bt.w=function(){return isFinite(this.x)&&isFinite(this.y)},Rt.alloc=function(){var a=Yi.pop();return a===void 0?new Rt:a},Rt.allocAt=function(a,y){var x=Yi.pop();return x===void 0?new Rt(a,y):(x.x=a,x.y=y,x)},Rt.free=function(a){Yi.push(a)},Rt.prototype.isReal=Rt.prototype.w,Rt.prototype.setSpot=Rt.prototype.yi,Rt.prototype.setRectSpot=Rt.prototype.xi,Rt.prototype.snapToGridPoint=Rt.prototype.vA,Rt.prototype.snapToGrid=Rt.prototype.uA,Rt.prototype.projectOntoLineSegmentPoint=Rt.prototype.gA,Rt.prototype.projectOntoLineSegment=Rt.prototype.fA,Rt.intersectingLineSegments=function(a,y,x,E,b,z,tt,rt){return re.Rl(a,y,x,E,b,z,tt,rt)},Rt.prototype.compareWithLineSegmentPoint=Rt.prototype.Ry,Rt.compareWithLineSegment=function(a,y,x,E,b,z){return re.Fl(a,y,x,E,b,z)},Rt.prototype.direction=Rt.prototype.direction,Rt.prototype.directionPoint=Rt.prototype.ab,Rt.prototype.normalize=Rt.prototype.normalize,Rt.prototype.distanceSquared=Rt.prototype.zd,Rt.prototype.distanceSquaredPoint=Rt.prototype.Bf,Rt.prototype.scale=Rt.prototype.scale,Rt.prototype.rotate=Rt.prototype.rotate,Rt.prototype.offset=Rt.prototype.offset,Rt.prototype.subtract=Rt.prototype.re,Rt.prototype.add=Rt.prototype.add,Rt.prototype.equalsApprox=Rt.prototype.Xa,Rt.prototype.equalTo=Rt.prototype.hi,Rt.prototype.equals=Rt.prototype.D,Rt.prototype.set=Rt.prototype.set,Rt.prototype.setTo=Rt.prototype.sg;var Yi=[];Rt.className="Point",Rt.parse=el,Rt.stringify=gl,Rt.distanceLineSegmentSquared=To,Rt.distanceSquared=Ui,Rt.direction=ii,Rt.Origin=Gr=new Rt(0,0).ja(),Rt.InfiniteTopLeft=ps=new Rt(-1/0,-1/0).ja(),Rt.InfiniteBottomRight=xs=new Rt(1/0,1/0).ja(),Rt.SixPoint=Lo=new Rt(6,6).ja(),Rt.NoPoint=os=new Rt(NaN,NaN).ja(),Rt.parse=el,Rt.stringify=gl,Rt.distanceLineSegmentSquared=To,Rt.distanceSquared=Ui,Rt.direction=ii;function an(a,y){a===void 0?this.height=this.width=0:typeof a=="number"&&(0<=a||isNaN(a))&&typeof y=="number"&&(0<=y||isNaN(y))?(this.width=a,this.height=y):pe("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var Nr,Xr,_o,Ao,fo,Yo,ga;an.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},an.prototype.h=function(a,y){return this.width=a,this.height=y,this},an.prototype.sg=function(a,y){return this.width=a,this.height=y,this},an.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},an.prototype.copy=function(){var a=new an;return a.width=this.width,a.height=this.height,a},Bt=an.prototype,Bt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Bt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Bt.freeze=function(){return this._isFrozen=!0,this},Bt.ka=function(){return Object.isFrozen(this)&&pe("cannot thaw constant: "+this),this._isFrozen=!1,this};function js(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;return(E=a[y++])&&(b=parseFloat(E)),new an(x,b)}return new an}function Ca(a){return a.width.toString()+" "+a.height.toString()}Bt.toString=function(){return"Size("+this.width+","+this.height+")"},Bt.D=function(a){return a instanceof an?this.width===a.width&&this.height===a.height:!1},Bt.hi=function(a,y){return this.width===a&&this.height===y},Bt.Xa=function(a){return re.B(this.width,a.width)&&re.B(this.height,a.height)},Bt.Bc=function(a,y){return a=this.width+a,this.width=0<=a?a:0,y=this.height+y,this.height=0<=y?y:0,this},Bt.w=function(){return isFinite(this.width)&&isFinite(this.height)},an.alloc=function(){var a=fl.pop();return a===void 0?new an:a},an.free=function(a){fl.push(a)},an.prototype.isReal=an.prototype.w,an.prototype.inflate=an.prototype.Bc,an.prototype.equalsApprox=an.prototype.Xa,an.prototype.equalTo=an.prototype.hi,an.prototype.equals=an.prototype.D,an.prototype.set=an.prototype.set,an.prototype.setTo=an.prototype.sg;var fl=[];an.className="Size",an.parse=js,an.stringify=Ca,an.ZeroSize=Nr=new an(0,0).ja(),an.OneSize=Xr=new an(1,1).ja(),an.SixSize=_o=new an(6,6).ja(),an.EightSize=Ao=new an(8,8).ja(),an.TenSize=fo=new an(10,10).ja(),an.InfiniteSize=Yo=new an(1/0,1/0).ja(),an.NoSize=ga=new an(NaN,NaN).ja(),an.parse=js,an.stringify=Ca;function Me(a,y,x,E){a===void 0?this.height=this.width=this.y=this.x=0:typeof a=="number"&&typeof y=="number"&&typeof x=="number"&&(0<=x||isNaN(x))&&typeof E=="number"&&(0<=E||isNaN(E))?(this.x=a,this.y=y,this.width=x,this.height=E):a instanceof Rt?(x=a.x,a=a.y,y instanceof Rt?(E=y.x,y=y.y,this.x=Math.min(x,E),this.y=Math.min(a,y),this.width=Math.abs(x-E),this.height=Math.abs(a-y)):y instanceof an?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):pe("Incorrect second argument supplied to Rect constructor "+y)):pe("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Bt=Me.prototype,Bt.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Bt.h=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this};function fa(a,y,x){a.width=y,a.height=x}Bt.sg=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this},Bt.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Bt.dd=function(a){return this.x=a.x,this.y=a.y,this},Bt.tA=function(a){return this.width=a.width,this.height=a.height,this},Me.prototype.copy=function(){var a=new Me;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Bt=Me.prototype,Bt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Bt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Bt.freeze=function(){return this._isFrozen=!0,this},Bt.ka=function(){return Object.isFrozen(this)&&pe("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ll(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;(E=a[y++])&&(b=parseFloat(E));for(var z=0;a[y]==="";)y++;(E=a[y++])&&(z=parseFloat(E));for(var tt=0;a[y]==="";)y++;return(E=a[y++])&&(tt=parseFloat(E)),new Me(x,b,z,tt)}return new Me}function ZA(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}Bt.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},Bt.D=function(a){return a instanceof Me?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},Bt.hi=function(a,y,x,E){return this.x===a&&this.y===y&&this.width===x&&this.height===E},Bt.Xa=function(a){return re.B(this.x,a.x)&&re.B(this.y,a.y)&&re.B(this.width,a.width)&&re.B(this.height,a.height)};function Go(a,y){return re.$(a.x,y.x)&&re.$(a.y,y.y)&&re.$(a.width,y.width)&&re.$(a.height,y.height)}Bt.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},Bt.Re=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height},Bt.contains=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),this.x<=a&&a+x<=this.x+this.width&&this.y<=y&&y+E<=this.y+this.height},Bt.offset=function(a,y){return this.x+=a,this.y+=y,this},Bt.Bc=function(a,y){return LA(this,y,a,y,a)},Bt.Co=function(a){return LA(this,a.top,a.right,a.bottom,a.left)},Bt.Fv=function(a){return LA(this,-a.top,-a.right,-a.bottom,-a.left)},Bt.Hz=function(a,y,x,E){return LA(this,a,y,x,E)};function LA(a,y,x,E,b){var z=a.width;return x+b<=-z?(a.x+=z/2,a.width=0):(a.x-=b,a.width+=x+b),x=a.height,y+E<=-x?(a.y+=x/2,a.height=0):(a.y-=y,a.height+=y+E),a}Bt.Ex=function(a){return fh(this,a.x,a.y,a.width,a.height)},Bt.Uu=function(a,y,x,E){return fh(this,a,y,x,E)};function fh(a,y,x,E,b){var z=Math.max(a.x,y),tt=Math.max(a.y,x);return y=Math.min(a.x+a.width,y+E),x=Math.min(a.y+a.height,x+b),a.x=z,a.y=tt,a.width=Math.max(0,y-z),a.height=Math.max(0,x-tt),a}Bt.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},Bt.Vu=function(a,y,x,E){var b=this.width,z=this.x;return b!==1/0&&x!==1/0&&(b+=z,x+=a,isNaN(x)||isNaN(b)||z>x||a>b)?!1:(a=this.height,x=this.y,!(a!==1/0&&E!==1/0&&(a+=x,E+=y,isNaN(E)||isNaN(a)||x>E||y>a)))};function JA(a,y){var x=a.width,E=a.x,b=y.x-10;return E>y.width+10+10+b||b>x+E?!1:(x=a.height,a=a.y,E=y.y-10,!(a>y.height+10+10+E||E>x+a))}Bt.Ye=function(a){return Yr(this,a.x,a.y,0,0)},Bt.ed=function(a){return Yr(this,a.x,a.y,a.width,a.height)},Bt.Kv=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),Yr(this,a,y,x,E)};function Yr(a,y,x,E,b){var z=Math.min(a.x,y),tt=Math.min(a.y,x);return y=Math.max(a.x+a.width,y+E),x=Math.max(a.y+a.height,x+b),a.x=z,a.y=tt,a.width=y-z,a.height=x-tt,a}Bt.yi=function(a,y,x){return this.x=a-x.offsetX-x.x*this.width,this.y=y-x.offsetY-x.y*this.height,this};function $o(a,y,x,E,b,z,tt,rt){return tt===void 0&&(tt=0),rt===void 0&&(rt=0),a<=b&&b+tt<=a+x&&y<=z&&z+rt<=y+E}function sr(a,y,x,E,b,z,tt,rt){return a>tt+b||b>x+a?!1:!(y>rt+z||z>E+y)}Bt.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Bt.Mz=function(){return this.width===0&&this.height===0},Me.alloc=function(){var a=Bo.pop();return a===void 0?new Me:a},Me.allocAt=function(a,y,x,E){var b=Bo.pop();return b===void 0?new Me(a,y,x,E):b.h(a,y,x,E)},Me.free=function(a){Bo.push(a)},Ie.Object.defineProperties(Me.prototype,{left:{get:function(){return this.x},set:function(a){this.x=a}},top:{get:function(){return this.y},set:function(a){this.y=a}},right:{get:function(){return this.x+this.width},set:function(a){this.x+=a-(this.x+this.width)}},bottom:{get:function(){return this.y+this.height},set:function(a){this.y+=a-(this.y+this.height)}},position:{get:function(){return new Rt(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new an(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new Rt(this.x+this.width/2,this.y+this.height/2)},set:function(a){this.x=a.x-this.width/2,this.y=a.y-this.height/2}},centerX:{get:function(){return this.x+this.width/2},set:function(a){this.x=a-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(a){this.y=a-this.height/2}}}),Me.prototype.isEmpty=Me.prototype.Mz,Me.prototype.isReal=Me.prototype.w,Me.intersectsLineSegment=function(a,y,x,E,b,z,tt,rt){return re.Fx(a,y,x,E,b,z,tt,rt)},Me.prototype.setSpot=Me.prototype.yi,Me.prototype.union=Me.prototype.Kv,Me.prototype.unionRect=Me.prototype.ed,Me.prototype.unionPoint=Me.prototype.Ye,Me.prototype.intersects=Me.prototype.Vu,Me.prototype.intersectsRect=Me.prototype.Yc,Me.prototype.intersect=Me.prototype.Uu,Me.prototype.intersectRect=Me.prototype.Ex,Me.prototype.grow=Me.prototype.Hz,Me.prototype.subtractMargin=Me.prototype.Fv,Me.prototype.addMargin=Me.prototype.Co,Me.prototype.inflate=Me.prototype.Bc,Me.prototype.offset=Me.prototype.offset,Me.prototype.contains=Me.prototype.contains,Me.prototype.containsRect=Me.prototype.Re,Me.prototype.containsPoint=Me.prototype.ca,Me.prototype.equalsApprox=Me.prototype.Xa,Me.prototype.equalTo=Me.prototype.hi,Me.prototype.equals=Me.prototype.D,Me.prototype.setSize=Me.prototype.tA,Me.prototype.setPoint=Me.prototype.dd,Me.prototype.set=Me.prototype.set,Me.prototype.setTo=Me.prototype.sg;var dr=null,Zr=null,Bo=[];Me.className="Rect",Me.parse=Ll,Me.stringify=ZA,Me.contains=$o,Me.intersects=sr,Me.ZeroRect=dr=new Me(0,0,0,0).ja(),Me.NoRect=Zr=new Me(NaN,NaN,NaN,NaN).ja(),Me.parse=Ll,Me.stringify=ZA,Me.contains=$o,Me.intersects=sr;function Pi(a,y,x,E){a===void 0?this.left=this.bottom=this.right=this.top=0:y===void 0?this.left=this.bottom=this.right=this.top=a:x===void 0?(this.top=a,this.right=y,this.bottom=a,this.left=y):E!==void 0?(this.top=a,this.right=y,this.bottom=x,this.left=E):pe("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Pi.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Pi.prototype.sg=function(a,y,x,E){return this.top=a,this.right=y,this.bottom=x,this.left=E,this},Pi.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Pi.prototype.copy=function(){var a=new Pi;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Bt=Pi.prototype,Bt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Bt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Bt.freeze=function(){return this._isFrozen=!0,this},Bt.ka=function(){return Object.isFrozen(this)&&pe("cannot thaw constant: "+this),this._isFrozen=!1,this};function lf(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=NaN;a[y]==="";)y++;var E=a[y++];if(E&&(x=parseFloat(E)),isNaN(x))return new Pi;for(var b=NaN;a[y]==="";)y++;if((E=a[y++])&&(b=parseFloat(E)),isNaN(b))return new Pi(x);for(var z=NaN;a[y]==="";)y++;if((E=a[y++])&&(z=parseFloat(E)),isNaN(z))return new Pi(x,b);for(var tt=NaN;a[y]==="";)y++;return(E=a[y++])&&(tt=parseFloat(E)),isNaN(tt)?new Pi(x,b):new Pi(x,b,z,tt)}return new Pi}function EA(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}Bt.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},Bt.D=function(a){return a instanceof Pi?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},Bt.hi=function(a,y,x,E){return this.top===a&&this.right===y&&this.bottom===x&&this.left===E},Bt.Xa=function(a){return re.B(this.top,a.top)&&re.B(this.right,a.right)&&re.B(this.bottom,a.bottom)&&re.B(this.left,a.left)},Bt.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Pi.alloc=function(){var a=dh.pop();return a===void 0?new Pi:a},Pi.free=function(a){dh.push(a)},Pi.prototype.isReal=Pi.prototype.w,Pi.prototype.equalsApprox=Pi.prototype.Xa,Pi.prototype.equalTo=Pi.prototype.hi,Pi.prototype.equals=Pi.prototype.D,Pi.prototype.set=Pi.prototype.set,Pi.prototype.setTo=Pi.prototype.sg;var El=null,fg=null,dh=[];Pi.className="Margin",Pi.parse=lf,Pi.stringify=EA,Pi.ZeroMargin=El=new Pi(0,0,0,0).ja(),Pi.TwoMargin=fg=new Pi(2,2,2,2).ja(),Pi.parse=lf,Pi.stringify=EA;function Vn(a,y,x,E){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),E===void 0&&(E=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=E),this._isFrozen=!1}var ts,es,Ml,Du,aA,Xi,co,lA,da,Pa,dl,Fa,Ga,Ks,ls,Af,Ns,dg,Hl,MA,uo,cl,cg,pg,uf,Xo,nd,hf,La,pl,As,io,jo,Qs,mg,Hu;Vn.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Vn.prototype.sg=function(a,y,x,E){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=E,this},Vn.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Vn.prototype.copy=function(){var a=new Vn;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Bt=Vn.prototype,Bt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Bt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Bt.freeze=function(){return this._isFrozen=!0,this},Bt.ka=function(){return Object.isFrozen(this)&&pe("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ko(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function gf(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return ts;if(a==="TopLeft")return es;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return Ml;if(a==="TopRight")return Du;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return aA;if(a==="Center")return Xi;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return co;if(a==="BottomLeft")return lA;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return da;if(a==="BottomRight")return Pa;if(a==="TopSide")return dl;if(a==="LeftSide")return Fa;if(a==="RightSide")return Ga;if(a==="BottomSide")return Ks;if(a==="TopBottomSides")return ls;if(a==="LeftRightSides")return Af;if(a==="TopLeftSides")return Ns;if(a==="TopRightSides")return dg;if(a==="BottomLeftSides")return Hl;if(a==="BottomRightSides")return MA;if(a==="NotTopSide")return uo;if(a==="NotLeftSide")return cl;if(a==="NotRightSide")return cg;if(a==="NotBottomSide")return pg;if(a==="AllSides")return uf;if(a==="Default")return Xo;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E!==void 0&&0<E.length&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;E=a[y++],E!==void 0&&0<E.length&&(b=parseFloat(E));for(var z=0;a[y]==="";)y++;E=a[y++],E!==void 0&&0<E.length&&(z=parseFloat(E));for(var tt=0;a[y]==="";)y++;return E=a[y++],E!==void 0&&0<E.length&&(tt=parseFloat(E)),new Vn(x,b,z,tt)}return new Vn}function qA(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}Bt.toString=function(){return this.sb()?this.offsetX===0&&this.offsetY===0?"Spot("+this.x+","+this.y+")":"Spot("+this.x+","+this.y+","+this.offsetX+","+this.offsetY+")":this.D(ts)?"None":this.D(es)?"TopLeft":this.D(Ml)?"Top":this.D(Du)?"TopRight":this.D(aA)?"Left":this.D(Xi)?"Center":this.D(co)?"Right":this.D(lA)?"BottomLeft":this.D(da)?"Bottom":this.D(Pa)?"BottomRight":this.D(dl)?"TopSide":this.D(Fa)?"LeftSide":this.D(Ga)?"RightSide":this.D(Ks)?"BottomSide":this.D(ls)?"TopBottomSides":this.D(Af)?"LeftRightSides":this.D(Ns)?"TopLeftSides":this.D(dg)?"TopRightSides":this.D(Hl)?"BottomLeftSides":this.D(MA)?"BottomRightSides":this.D(uo)?"NotTopSide":this.D(cl)?"NotLeftSide":this.D(cg)?"NotRightSide":this.D(pg)?"NotBottomSide":this.D(uf)?"AllSides":this.D(Xo)?"Default":"None"},Bt.D=function(a){return a instanceof Vn?(this.x===a.x||isNaN(this.x)&&isNaN(a.x))&&(this.y===a.y||isNaN(this.y)&&isNaN(a.y))&&this.offsetX===a.offsetX&&this.offsetY===a.offsetY:!1},Bt.gv=function(){return new Vn(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},Bt.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(nd))a=Fa;else if(a.D(hf))a=Ga;else if(a.D(La))a=dl;else if(a.D(pl))a=Ks;else return!1;return a=a.offsetY,(this.offsetY&a)===a},Bt.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},Bt.Mc=function(){return isNaN(this.x)||isNaN(this.y)},Bt.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},Bt.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},Bt.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},Vn.alloc=function(){var a=kl.pop();return a===void 0?new Vn:a},Vn.free=function(a){kl.push(a)},Vn.prototype.isDefault=Vn.prototype.Xb,Vn.prototype.isNone=Vn.prototype.ys,Vn.prototype.isSide=Vn.prototype.$c,Vn.prototype.isNoSpot=Vn.prototype.Mc,Vn.prototype.isSpot=Vn.prototype.sb,Vn.prototype.includesSide=Vn.prototype.Hf,Vn.prototype.opposite=Vn.prototype.gv,Vn.prototype.equals=Vn.prototype.D,Vn.prototype.set=Vn.prototype.set,Vn.prototype.setTo=Vn.prototype.sg;var kl=[];Vn.className="Spot",Vn.parse=gf,Vn.stringify=qA,Vn.None=ts=Ko(new Vn(0,0,0,0),0).ja(),Vn.Default=Xo=Ko(new Vn(0,0,-1,0),-1).ja(),Vn.TopLeft=es=new Vn(0,0,0,0).ja(),Vn.TopCenter=Ml=new Vn(.5,0,0,0).ja(),Vn.TopRight=Du=new Vn(1,0,0,0).ja(),Vn.LeftCenter=aA=new Vn(0,.5,0,0).ja(),Vn.Center=Xi=new Vn(.5,.5,0,0).ja(),Vn.RightCenter=co=new Vn(1,.5,0,0).ja(),Vn.BottomLeft=lA=new Vn(0,1,0,0).ja(),Vn.BottomCenter=da=new Vn(.5,1,0,0).ja(),Vn.BottomRight=Pa=new Vn(1,1,0,0).ja(),Vn.MiddleTop=As=Ml,Vn.MiddleLeft=io=aA,Vn.MiddleRight=jo=co,Vn.MiddleBottom=Qs=da,Vn.Top=La=Ml,Vn.Left=nd=aA,Vn.Right=hf=co,Vn.Bottom=pl=da,Vn.TopSide=dl=Ko(new Vn(0,0,1,1),1).ja(),Vn.LeftSide=Fa=Ko(new Vn(0,0,1,2),1).ja(),Vn.RightSide=Ga=Ko(new Vn(0,0,1,4),1).ja(),Vn.BottomSide=Ks=Ko(new Vn(0,0,1,8),1).ja(),Vn.TopBottomSides=ls=Ko(new Vn(0,0,1,9),1).ja(),Vn.LeftRightSides=Af=Ko(new Vn(0,0,1,6),1).ja(),Vn.TopLeftSides=Ns=Ko(new Vn(0,0,1,3),1).ja(),Vn.TopRightSides=dg=Ko(new Vn(0,0,1,5),1).ja(),Vn.BottomLeftSides=Hl=Ko(new Vn(0,0,1,10),1).ja(),Vn.BottomRightSides=MA=Ko(new Vn(0,0,1,12),1).ja(),Vn.NotTopSide=uo=Ko(new Vn(0,0,1,14),1).ja(),Vn.NotLeftSide=cl=Ko(new Vn(0,0,1,13),1).ja(),Vn.NotRightSide=cg=Ko(new Vn(0,0,1,11),1).ja(),Vn.NotBottomSide=pg=Ko(new Vn(0,0,1,7),1).ja(),Vn.AllSides=uf=Ko(new Vn(0,0,1,15),1).ja(),mg=new Vn(.156,.156).ja(),Hu=new Vn(.844,.844).ja(),Vn.parse=gf,Vn.stringify=qA;function Li(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}Li.prototype.set=function(a){return this.m11=a.m11,this.m12=a.m12,this.m21=a.m21,this.m22=a.m22,this.dx=a.dx,this.dy=a.dy,this},Li.prototype.setTransform=function(a,y,x,E,b,z){return this.m11=a,this.m12=y,this.m21=x,this.m22=E,this.dx=b,this.dy=z,this},Li.prototype.copy=function(){var a=new Li;return a.m11=this.m11,a.m12=this.m12,a.m21=this.m21,a.m22=this.m22,a.dx=this.dx,a.dy=this.dy,a},Li.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},Li.prototype.D=function(a){return this.m11===a.m11&&this.m12===a.m12&&this.m21===a.m21&&this.m22===a.m22&&this.dx===a.dx&&this.dy===a.dy},Li.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},Li.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},Li.prototype.multiply=function(a){var y=this.m11*a.m11+this.m21*a.m12,x=this.m12*a.m11+this.m22*a.m12,E=this.m11*a.m21+this.m21*a.m22,b=this.m12*a.m21+this.m22*a.m22;return this.dx=this.m11*a.dx+this.m21*a.dy+this.dx,this.dy=this.m12*a.dx+this.m22*a.dy+this.dy,this.m11=y,this.m12=x,this.m21=E,this.m22=b,this},Li.prototype.bv=function(a){var y=1/(a.m11*a.m22-a.m12*a.m21),x=a.m22*y,E=-a.m12*y,b=-a.m21*y,z=a.m11*y,tt=y*(a.m21*a.dy-a.m22*a.dx);return a=y*(a.m12*a.dx-a.m11*a.dy),y=this.m11*x+this.m21*E,x=this.m12*x+this.m22*E,E=this.m11*b+this.m21*z,b=this.m12*b+this.m22*z,this.dx=this.m11*tt+this.m21*a+this.dx,this.dy=this.m12*tt+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=E,this.m22=b,this},Li.prototype.Vj=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),y=-this.m12*a,x=-this.m21*a,E=this.m11*a,b=a*(this.m21*this.dy-this.m22*this.dx),z=a*(this.m12*this.dx-this.m11*this.dy);return this.m11=this.m22*a,this.m12=y,this.m21=x,this.m22=E,this.dx=b,this.dy=z,this},Li.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a===0)return this;if(this.translate(y,x),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));var b=this.m12*a+this.m22*E,z=this.m11*-E+this.m21*a,tt=this.m12*-E+this.m22*a;return this.m11=this.m11*a+this.m21*E,this.m12=b,this.m21=z,this.m22=tt,this.translate(-y,-x),this},Bt=Li.prototype,Bt.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},Bt.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},Bt.Ga=function(a){var y=a.x,x=a.y;return a.h(y*this.m11+x*this.m21+this.dx,y*this.m12+x*this.m22+this.dy)},Bt.Cd=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=a.x,E=a.y;return a.h(x*this.m22*y+E*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+E*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Bt.Eu=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=1.25*a.x,E=1.2*a.y;return a.h(x*this.m22*y+E*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+E*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Bt.pp=function(a){var y=a.x,x=a.y,E=y+a.width,b=x+a.height,z=this.m11,tt=this.m12,rt=this.m21,ot=this.m22,at=this.dx,At=this.dy,ft=y*z+x*rt+at,pt=y*tt+x*ot+At,xt=E*z+x*rt+at,Ct=E*tt+x*ot+At;return x=y*z+b*rt+at,y=y*tt+b*ot+At,z=E*z+b*rt+at,E=E*tt+b*ot+At,b=Math.min(ft,xt),ft=Math.max(ft,xt),xt=Math.min(pt,Ct),pt=Math.max(pt,Ct),b=Math.min(b,x),ft=Math.max(ft,x),xt=Math.min(xt,y),pt=Math.max(pt,y),b=Math.min(b,z),ft=Math.max(ft,z),xt=Math.min(xt,E),pt=Math.max(pt,E),a.h(b,xt,ft-b,pt-xt),a},Li.alloc=function(){var a=id.pop();return a===void 0?new Li:a},Li.free=function(a){id.push(a)},Li.prototype.transformRect=Li.prototype.pp,Li.prototype.transformPoint=Li.prototype.Ga,Li.prototype.scale=Li.prototype.scale,Li.prototype.translate=Li.prototype.translate,Li.prototype.rotate=Li.prototype.rotate,Li.prototype.invert=Li.prototype.Vj,Li.prototype.multiplyInverted=Li.prototype.bv,Li.prototype.multiply=Li.prototype.multiply,Li.prototype.reset=Li.prototype.reset,Li.prototype.isIdentity=Li.prototype.ws,Li.prototype.equals=Li.prototype.D,Li.prototype.setTransform=Li.prototype.setTransform,Li.prototype.set=Li.prototype.set;var id=[];Li.className="Transform",Li.xF="54a702f3e53909c447824c6706603faf4c";var re={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=re.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);re.Uv=y}return 1>a?(x=1/a,2e3>=x?1/y[x|0]:Math.sqrt(a)):2e3>=a?y[a|0]:Math.sqrt(a)},B:function(a,y){return a-=y,.5>a&&-.5<a},$:function(a,y){return a-=y,5e-8>a&&-5e-8<a},Yb:function(a,y,x,E,b,z,tt){if(0>=b&&(b=1e-6),a<x)var rt=a,ot=x;else rt=x,ot=a;if(y<E)var at=y,At=E;else at=E,At=y;if(a===x)return at<=tt&&tt<=At&&a-b<=z&&z<=a+b;if(y===E)return rt<=z&&z<=ot&&y-b<=tt&&tt<=y+b;if(ot+=b,rt-=b,rt<=z&&z<=ot&&(At+=b,at-=b,at<=tt&&tt<=At))if(ot-rt>At-at)if(a-x>b||x-a>b){if(z=(E-y)/(x-a)*(z-a)+y,z-b<=tt&&tt<=z+b)return!0}else return!0;else if(y-E>b||E-y>b){if(tt=(x-a)/(E-y)*(tt-y)+a,tt-b<=z&&z<=tt+b)return!0}else return!0;return!1},cs:function(a,y,x,E,b,z,tt,rt,ot,at,At,ft){if(re.Yb(a,y,tt,rt,ft,x,E)&&re.Yb(a,y,tt,rt,ft,b,z))return re.Yb(a,y,tt,rt,ft,at,At);var pt=(a+x)/2,xt=(y+E)/2,Ct=(x+b)/2,Mt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(pt+Ct)/2,x=(xt+Mt)/2,Ct=(Ct+b)/2,Mt=(Mt+z)/2;var Gt=(E+Ct)/2,It=(x+Mt)/2;return re.cs(a,y,pt,xt,E,x,Gt,It,ot,at,At,ft)||re.cs(Gt,It,Ct,Mt,b,z,tt,rt,ot,at,At,ft)},ax:function(a,y,x,E,b,z,tt,rt,ot){var at=(x+b)/2,At=(E+z)/2;return ot.h((((a+x)/2+at)/2+(at+(b+tt)/2)/2)/2,(((y+E)/2+At)/2+(At+(z+rt)/2)/2)/2),ot},My:function(a,y,x,E,b,z,tt,rt){var ot=(x+b)/2,at=(E+z)/2;return ii(((a+x)/2+ot)/2,((y+E)/2+at)/2,(ot+(b+tt)/2)/2,(at+(z+rt)/2)/2)},Dl:function(a,y,x,E,b,z,tt,rt,ot,at){if(re.Yb(a,y,tt,rt,ot,x,E)&&re.Yb(a,y,tt,rt,ot,b,z))Yr(at,a,y,0,0),Yr(at,tt,rt,0,0);else{var At=(a+x)/2,ft=(y+E)/2,pt=(x+b)/2,xt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(At+pt)/2,x=(ft+xt)/2,pt=(pt+b)/2,xt=(xt+z)/2;var Ct=(E+pt)/2,Mt=(x+xt)/2;re.Dl(a,y,At,ft,E,x,Ct,Mt,ot,at),re.Dl(Ct,Mt,pt,xt,b,z,tt,rt,ot,at)}return at},Qe:function(a,y,x,E,b,z,tt,rt,ot,at){if(re.Yb(a,y,tt,rt,ot,x,E)&&re.Yb(a,y,tt,rt,ot,b,z))at.length===0&&(at.push(a),at.push(y)),at.push(tt),at.push(rt);else{var At=(a+x)/2,ft=(y+E)/2,pt=(x+b)/2,xt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(At+pt)/2,x=(ft+xt)/2,pt=(pt+b)/2,xt=(xt+z)/2;var Ct=(E+pt)/2,Mt=(x+xt)/2;re.Qe(a,y,At,ft,E,x,Ct,Mt,ot,at),re.Qe(Ct,Mt,pt,xt,b,z,tt,rt,ot,at)}return at},jv:function(a,y,x,E,b,z,tt,rt,ot,at){if(re.Yb(a,y,b,z,at,x,E))return re.Yb(a,y,b,z,at,rt,ot);var At=(a+x)/2,ft=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var pt=(At+x)/2,xt=(ft+E)/2;return re.jv(a,y,At,ft,pt,xt,tt,rt,ot,at)||re.jv(pt,xt,x,E,b,z,tt,rt,ot,at)},OA:function(a,y,x,E,b,z,tt){return tt.h(((a+x)/2+(x+b)/2)/2,((y+E)/2+(E+z)/2)/2),tt},iv:function(a,y,x,E,b,z,tt,rt){if(re.Yb(a,y,b,z,tt,x,E))Yr(rt,a,y,0,0),Yr(rt,b,z,0,0);else{var ot=(a+x)/2,at=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var At=(ot+x)/2,ft=(at+E)/2;re.iv(a,y,ot,at,At,ft,tt,rt),re.iv(At,ft,x,E,b,z,tt,rt)}return rt},ep:function(a,y,x,E,b,z,tt,rt){if(re.Yb(a,y,b,z,tt,x,E))rt.length===0&&(rt.push(a),rt.push(y)),rt.push(b),rt.push(z);else{var ot=(a+x)/2,at=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var At=(ot+x)/2,ft=(at+E)/2;re.ep(a,y,ot,at,At,ft,tt,rt),re.ep(At,ft,x,E,b,z,tt,rt)}return rt},Eo:function(a,y,x,E,b,z,tt,rt,ot,at,At,ft,pt,xt){if(re.Yb(a,y,tt,rt,pt,x,E)&&re.Yb(a,y,tt,rt,pt,b,z))return!re.Rl(a,y,tt,rt,ot,at,At,ft)||(pt=(a-tt)*(at-ft)-(y-rt)*(ot-At),pt===0)?!1:(xt.h(((a*rt-y*tt)*(ot-At)-(a-tt)*(ot*ft-at*At))/pt,((a*rt-y*tt)*(at-ft)-(y-rt)*(ot*ft-at*At))/pt),!0);var Ct=(a+x)/2,Mt=(y+E)/2,Gt=(x+b)/2,It=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(Ct+Gt)/2,x=(Mt+It)/2,Gt=(Gt+b)/2,It=(It+z)/2;var zt=(E+Gt)/2,Yt=(x+It)/2,Xt=1/0,$t=!1,de=0,An=0;return re.Eo(a,y,Ct,Mt,E,x,zt,Yt,ot,at,At,ft,pt,xt)&&(a=(xt.x-ot)*(xt.x-ot)+(xt.y-at)*(xt.y-at),a<Xt&&(Xt=a,$t=!0,de=xt.x,An=xt.y)),re.Eo(zt,Yt,Gt,It,b,z,tt,rt,ot,at,At,ft,pt,xt)&&(xt.x-ot)*(xt.x-ot)+(xt.y-at)*(xt.y-at)<Xt&&($t=!0,de=xt.x,An=xt.y),$t&&(xt.x=de,xt.y=An),$t},Fo:function(a,y,x,E,b,z,tt,rt,ot,at,At,ft,pt){var xt=0;if(re.Yb(a,y,tt,rt,pt,x,E)&&re.Yb(a,y,tt,rt,pt,b,z)){if(pt=(a-tt)*(at-ft)-(y-rt)*(ot-At),pt===0)return xt;var Ct=((a*rt-y*tt)*(ot-At)-(a-tt)*(ot*ft-at*At))/pt,Mt=((a*rt-y*tt)*(at-ft)-(y-rt)*(ot*ft-at*At))/pt;if(Ct>=At)return xt;if((ot>At?ot-At:At-ot)<(at>ft?at-ft:ft-at)){if(y<rt?(ot=y,a=rt):(ot=rt,a=y),Mt<ot||Mt>a)return xt}else if(a<tt?(ot=a,a=tt):ot=tt,Ct<ot||Ct>a)return xt;0<pt?xt++:0>pt&&xt--}else{Ct=(a+x)/2,Mt=(y+E)/2;var Gt=(x+b)/2,It=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(Ct+Gt)/2,x=(Mt+It)/2,Gt=(Gt+b)/2,It=(It+z)/2;var zt=(E+Gt)/2,Yt=(x+It)/2;xt+=re.Fo(a,y,Ct,Mt,E,x,zt,Yt,ot,at,At,ft,pt),xt+=re.Fo(zt,Yt,Gt,It,b,z,tt,rt,ot,at,At,ft,pt)}return xt},qh:function(a,y,x,E,b,z,tt){return re.$(a,x)?(y<E?(x=y,y=E):x=E,z<x?(tt.h(a,x),!1):z>y?(tt.h(a,y),!1):(tt.h(a,z),!0)):re.$(y,E)?(a<x?(E=a,a=x):E=x,b<E?(tt.h(E,y),!1):b>a?(tt.h(a,y),!1):(tt.h(b,y),!0)):(b=((a-b)*(a-x)+(y-z)*(y-E))/((x-a)*(x-a)+(E-y)*(E-y)),-5e-6>b?(tt.h(a,y),!1):1.000005<b?(tt.h(x,E),!1):(tt.h(a+b*(x-a),y+b*(E-y)),!0))},Ve:function(a,y,x,E,b,z,tt,rt,ot){return re.B(a,x)&&re.B(y,E)?(ot.h(a,y),!1):re.$(b,tt)?re.$(a,x)?(re.qh(a,y,x,E,b,z,ot),!1):re.qh(a,y,x,E,b,(E-y)/(x-a)*(b-a)+y,ot):(rt=(rt-z)/(tt-b),re.$(a,x)?(x=rt*(a-b)+z,y<E?(b=y,y=E):b=E,x<b?(ot.h(a,b),!1):x>y?(ot.h(a,y),!1):(ot.h(a,x),!0)):(tt=(E-y)/(x-a),re.$(rt,tt)?(re.qh(a,y,x,E,b,z,ot),!1):(b=(tt*a-rt*b+z-y)/(tt-rt),re.$(tt,0)?(a<x?(E=a,a=x):E=x,b<E?(ot.h(E,y),!1):b>a?(ot.h(a,y),!1):(ot.h(b,y),!0)):re.qh(a,y,x,E,b,tt*(b-a)+y,ot))))},MA:function(a,y,x,E,b){return re.Ve(x.x,x.y,E.x,E.y,a.x,a.y,y.x,y.y,b)},KA:function(a,y,x,E,b,z,tt,rt,ot,at){function At(Gt,It){var zt=(Gt-a)*(Gt-a)+(It-y)*(It-y);zt<ft&&(ft=zt,ot.h(Gt,It))}var ft=1/0;At(ot.x,ot.y);var pt=0,xt=0,Ct=0,Mt=0;if(b<tt?(pt=b,xt=tt):(pt=tt,xt=b),z<rt?(Ct=b,Mt=tt):(Ct=tt,Mt=b),pt=(xt-pt)/2+at,at=(Mt-Ct)/2+at,b=(b+tt)/2,z=(z+rt)/2,pt===0||at===0)return ot;if(.5>(x>a?x-a:a-x)){if(pt=1-(x-b)*(x-b)/(pt*pt),0>pt)return ot;pt=Math.sqrt(pt),E=-at*pt+z,At(x,at*pt+z),At(x,E)}else{if(x=(E-y)/(x-a),E=1/(pt*pt)+x*x/(at*at),rt=2*x*(y-x*a)/(at*at)-2*x*z/(at*at)-2*b/(pt*pt),pt=rt*rt-4*E*(2*x*a*z/(at*at)-2*y*z/(at*at)+z*z/(at*at)+b*b/(pt*pt)-1+(y-x*a)*(y-x*a)/(at*at)),0>pt)return ot;pt=Math.sqrt(pt),at=(-rt+pt)/(2*E),At(at,x*at-x*a+y),pt=(-rt-pt)/(2*E),At(pt,x*pt-x*a+y)}return ot},Ff:function(a,y,x,E,b,z,tt,rt,ot){var at=1e21,At=a,ft=y;if(re.Ve(a,y,a,E,b,z,tt,rt,ot)){var pt=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z);pt<at&&(at=pt,At=ot.x,ft=ot.y)}return re.Ve(x,y,x,E,b,z,tt,rt,ot)&&(pt=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z),pt<at&&(at=pt,At=ot.x,ft=ot.y)),re.Ve(a,y,x,y,b,z,tt,rt,ot)&&(y=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z),y<at&&(at=y,At=ot.x,ft=ot.y)),re.Ve(a,E,x,E,b,z,tt,rt,ot)&&(a=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z),a<at&&(at=a,At=ot.x,ft=ot.y)),ot.h(At,ft),1e21>at},us:function(a,y,x){return re.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,E,b,z,tt,rt){var ot=a+x,at=y+E;return b===tt?(z<rt?(tt=z,z=rt):tt=rt,a<=b&&b<=ot&&tt<=at&&z>=y):z===rt?(b<tt?(rt=b,b=tt):rt=tt,y<=z&&z<=at&&rt<=ot&&b>=a):!!($o(a,y,x,E,b,z)||$o(a,y,x,E,tt,rt)||re.Rl(a,y,ot,y,b,z,tt,rt)||re.Rl(ot,y,ot,at,b,z,tt,rt)||re.Rl(ot,at,a,at,b,z,tt,rt)||re.Rl(a,at,a,y,b,z,tt,rt))},Rl:function(a,y,x,E,b,z,tt,rt){return a===x&&y===E&&b===tt&&z===rt?a===b&&y===z:0>=re.Fl(a,y,x,E,b,z)*re.Fl(a,y,x,E,tt,rt)&&0>=re.Fl(b,z,tt,rt,a,y)*re.Fl(b,z,tt,rt,x,E)},Fl:function(a,y,x,E,b,z){return x-=a,E-=y,a=b-a,y=z-y,z=a*E-y*x,z===0&&(z=a*x+y*E,0<z&&(z=(a-x)*x+(y-E)*E,0>z&&(z=0))),z},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,E,b,z){var tt=Math.PI;z||(E*=tt/180,b*=tt/180);var rt=E>b?-1:1;z=[];var ot=tt/2,at=E;if(E=Math.min(2*tt,Math.abs(b-E)),1e-5>E)return ot=at+rt*Math.min(E,ot),rt=a+x*Math.cos(at),at=y+x*Math.sin(at),a+=x*Math.cos(ot),y+=x*Math.sin(ot),x=(rt+a)/2,ot=(at+y)/2,z.push([rt,at,x,ot,x,ot,a,y]),z;for(;1e-5<E;)b=at+rt*Math.min(E,ot),z.push(re.Vy(x,at,b,a,y)),E-=Math.abs(b-at),at=b;return z},Vy:function(a,y,x,E,b){var z=(x-y)/2,tt=a*Math.cos(z),rt=a*Math.sin(z),ot=-rt,at=tt*tt+ot*ot,At=at+tt*tt+ot*rt;return at=4/3*(Math.sqrt(2*at*At)-At)/(tt*rt-ot*tt),rt=tt-at*ot,tt=ot+at*tt,ot=-tt,at=z+y,z=Math.cos(at),at=Math.sin(at),[E+a*Math.cos(y),b+a*Math.sin(y),E+rt*z-tt*at,b+rt*at+tt*z,E+rt*z-ot*at,b+rt*at+ot*z,E+a*Math.cos(x),b+a*Math.sin(x)]},No:function(a,y,x,E,b,z,tt){x=Math.floor((a-x)/b)*b+x,E=Math.floor((y-E)/z)*z+E;var rt=x;return x+b-a<b/2&&(rt=x+b),a=E,E+z-y<z/2&&(a=E+z),tt.h(rt,a),tt},vx:function(a,y){var x=Math.max(a,y);a=Math.min(a,y);var E;do y=x%a,x=E=a,a=y;while(0<y);return E},$y:function(a,y,x,E){var b=0>x,z=0>E;if(a<y)var tt=1,rt=0;else tt=0,rt=1;var ot=tt===0?a:y,at=tt===0?x:E;return(tt===0?b:z)&&(at=-at),tt=rt,x=tt===0?x:E,(tt===0?b:z)&&(x=-x),re.az(ot,tt===0?a:y,at,x,0,0)},az:function(a,y,x,E,b,z){if(0<E)if(0<x){b=a*a,z=y*y,a*=x;var tt=y*E,rt=-z+tt,ot=-z+Math.sqrt(a*a+tt*tt);y=rt;for(var at=0;9999999999>at&&(y=.5*(rt+ot),!(y===rt||y===ot));++at){var At=a/(y+b),ft=tt/(y+z);if(At=At*At+ft*ft-1,0<At)rt=y;else if(0>At)ot=y;else break}x=b*x/(y+b)-x,E=z*E/(y+z)-E,x=Math.sqrt(x*x+E*E)}else x=Math.abs(E-y);else E=a*a-y*y,z=a*x,z<E?(E=z/E,z=y*Math.sqrt(Math.abs(1-E*E)),x=a*E-x,x=Math.sqrt(x*x+z*z)):x=Math.abs(x-a);return x},Ze:new Yn,um:new Yn,Mf:new Yn,Nf:0,vm:100};re.za=re.AA;function rn(a){rr(this),this.l=2,a===void 0&&(a=rn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===rn.o?this.ee=new Ke:(rn.V===null&&(rn.V=new Ke().freeze()),this.ee=rn.V),this.aq=this.ee.Ja,this.Ip=new Me().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=es,this.gg=Pa,this.Rk=this.Sk=NaN,this.Uf=Ve}rn.prototype.copy=function(){var a=new rn;if(a.l=this.l&-2,a.na=this.na,a.od=this.od,a.pd=this.pd,a.Dc=this.Dc,a.Ec=this.Ec,this.na===rn.o){for(var y=this.ee.s,x=a.ee,E=0;E<y.length;E++)x.add(y[E].copy());a.ee=x}else a.ee=this.ee;return a.aq=this.aq,a.Ip.assign(this.Ip),a.tk=this.tk,a.ym=this.ym,a.zm=this.zm,a.fg=this.fg.J(),a.gg=this.gg.J(),a.Sk=this.Sk,a.Rk=this.Rk,a.Uf=this.Uf,a},rn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},rn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==rn.o)return this;var a=this.figures;a.freeze(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].freeze();return this},rn.prototype.ka=function(){if(Object.isFrozen(this)&&pe("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==rn.o)return this;var a=this.figures;a.ka(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].ka();return this},rn.prototype.Xa=function(a){if(!(a instanceof rn))return!1;if(this.type!==a.type)return this.type===rn.j&&a.type===rn.o?ec(this,a):a.type===rn.j&&this.type===rn.o?ec(a,this):!1;if(this.type===rn.o){var y=this.figures.s;a=a.figures.s;var x=y.length;if(x!==a.length)return!1;for(var E=0;E<x;E++)if(!y[E].Xa(a[E]))return!1;return!0}return re.B(this.startX,a.startX)&&re.B(this.startY,a.startY)&&re.B(this.endX,a.endX)&&re.B(this.endY,a.endY)};function ec(a,y){return a.type!==rn.j||y.type!==rn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&re.B(a.startX,y.startX)&&re.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===mr&&re.B(a.endX,y.endX)&&re.B(a.endY,y.endY))))}rn.ia=function(a){return a.toString()},rn.prototype.qb=function(a){a.classType===rn&&(this.type=a)},rn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case rn.j:return 0>a?"M"+this.startX.toString()+" "+this.startY.toString()+"L"+this.endX.toString()+" "+this.endY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a)+"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);case rn.u:var y=new Me(this.startX,this.startY,0,0);return y.Kv(this.endX,this.endY,0,0),0>a?"M"+y.x.toString()+" "+y.y.toString()+"H"+y.right.toString()+"V"+y.bottom.toString()+"H"+y.left.toString()+"z":"M"+y.x.toFixed(a)+" "+y.y.toFixed(a)+"H"+y.right.toFixed(a)+"V"+y.bottom.toFixed(a)+"H"+y.left.toFixed(a)+"z";case rn.F:if(y=new Me(this.startX,this.startY,0,0),y.Kv(this.endX,this.endY,0,0),0>a)return a=y.left.toString()+" "+(y.y+y.height/2).toString(),"M"+a+"A"+(y.width/2).toString()+" "+(y.height/2).toString()+" 0 0 1 "+(y.right.toString()+" "+(y.y+y.height/2).toString())+"A"+(y.width/2).toString()+" "+(y.height/2).toString()+" 0 0 1 "+a;var x=y.left.toFixed(a)+" "+(y.y+y.height/2).toFixed(a);return"M"+x+"A"+(y.width/2).toFixed(a)+" "+(y.height/2).toFixed(a)+" 0 0 1 "+(y.right.toFixed(a)+" "+(y.y+y.height/2).toFixed(a))+"A"+(y.width/2).toFixed(a)+" "+(y.height/2).toFixed(a)+" 0 0 1 "+x;case rn.o:y="",x=this.figures.s;for(var E=x.length,b=0;b<E;b++){var z=x[b];0<b&&(y+=" x "),z.isFilled&&(y+="F "),y+=z.toString(a)}return y;default:return this.type.toString()}},rn.nb=function(a){a=a.split(/[Xx]/);for(var y=a.length,x="",E=0;E<y;E++){var b=a[E];x=b.match(/[Ff]/)!==null?E===0?x+b:x+("X"+(b[0]===" "?"":" ")+b):x+((E===0?"":"X ")+"F"+(b[0]===" "?"":" ")+b)}return x},rn.parse=function(a,y){function x(){return Mt>=Xt-1?!0:at[Mt+1].match($t)!==null}function E(){return Mt++,at[Mt]}function b(ai){var ei=parseFloat(E()),Zi=parseFloat(E());Gt===Gt.toLowerCase()&&(ei=Yt.x+ei,Zi=Yt.y+Zi),ai.h(ei,Zi)}function z(){return b(Yt),Yt}function tt(){return b(zt),zt}function rt(){var ai=It.toLowerCase();return ai!=="c"&&ai!=="s"&&ai!=="q"&&ai!=="t"?Yt:new Rt(2*Yt.x-zt.x,2*Yt.y-zt.y)}y===void 0&&(y=!1);var ot=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(ot,"$1 $2"),a=a.replace(ot,"$1 $2"),a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^s])/gm,"$1 $2"),a=a.replace(/([^s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2"),a=a.replace(/([0-9])([+\-])/gm,"$1 $2"),a=a.replace(/[\s\r\t\n]+/gm," "),a=a.replace(/^\s+|\s+$/g,"");var at=a.split(" ");for(a=0;a<at.length;a++){var At=at[a];if(At.match(/(\.[0-9]*)(\.)/gm)!==null){ot=Ce();for(var ft="",pt=!1,xt=0;xt<At.length;xt++){var Ct=At[xt];Ct!=="."||pt?Ct==="."?(ot.push(ft),ft="."):ft+=Ct:(pt=!0,ft+=Ct)}for(ot.push(ft),at.splice(a,1),At=0;At<ot.length;At++)at.splice(a+At,0,ot[At]);a+=ot.length-1,Oe(ot)}}var Mt=-1,Gt="",It="";ot=new Rt(0,0);var zt=new Rt(0,0),Yt=new Rt(0,0),Xt=at.length;a=by(null),pt=ft=At=!1,xt=!0,Ct=null;for(var $t=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(Mt>=Xt-1);)if(It=Gt,Gt=E(),Gt!=="")switch(Gt.toUpperCase()){case"X":xt=!0,ft=At=!1;break;case"M":for(Ct=z(),a.mc===null||xt===!0?(Cc(a,Ct.x,Ct.y,At,!ft,pt),xt=!1):a.moveTo(Ct.x,Ct.y),ot.assign(Yt);!x();)Ct=z(),a.lineTo(Ct.x,Ct.y);break;case"L":for(;!x();)Ct=z(),a.lineTo(Ct.x,Ct.y);break;case"H":for(;!x();)Yt=new Rt((Gt===Gt.toLowerCase()?Yt.x:0)+parseFloat(E()),Yt.y),a.lineTo(Yt.x,Yt.y);break;case"V":for(;!x();)Yt=new Rt(Yt.x,(Gt===Gt.toLowerCase()?Yt.y:0)+parseFloat(E())),a.lineTo(Yt.x,Yt.y);break;case"C":for(;!x();){Ct=new Rt,b(Ct);var de=tt(),An=z();Xh(a,Ct.x,Ct.y,de.x,de.y,An.x,An.y)}break;case"S":for(;!x();)Ct=rt(),de=tt(),An=z(),Xh(a,Ct.x,Ct.y,de.x,de.y,An.x,An.y);break;case"Q":for(;!x();)Ct=tt(),de=z(),p0(a,Ct.x,Ct.y,de.x,de.y);break;case"T":for(;!x();)zt=Ct=rt(),de=z(),p0(a,Ct.x,Ct.y,de.x,de.y);break;case"B":for(;!x();){Ct=parseFloat(E()),de=parseFloat(E()),An=parseFloat(E());var Bn=parseFloat(E()),vn=parseFloat(E()),$e=vn,Re=!1;x()||($e=parseFloat(E()),x()||(Re=parseFloat(E())!==0)),Gt===Gt.toLowerCase()&&(An+=Yt.x,Bn+=Yt.y),a.arcTo(Ct,de,An,Bn,vn,$e,Re)}break;case"A":for(;!x();)Ct=Math.abs(parseFloat(E())),de=Math.abs(parseFloat(E())),An=parseFloat(E()),vn=Bn=!1,Re=$e=0,$e=E(),$e.length===1?(Bn=!!parseFloat($e),vn=!!parseFloat(E()),$e=parseFloat(E())):$e.length===2?(Bn=!!parseFloat($e[0]),vn=!!parseFloat($e[1]),$e=parseFloat(E())):(Bn=!!parseFloat($e[0]),vn=!!parseFloat($e[1]),$e=parseFloat($e.slice(2))),Re=parseFloat(E()),Gt===Gt.toLowerCase()&&($e=Yt.x+$e,Re=Yt.y+Re),Yt.h($e,Re),x1(a,Ct,de,An,Bn,vn,$e,Re);break;case"Z":S1(a),Yt.assign(ot);break;case"F":for(Ct="",de=1;at[Mt+de];)if(at[Mt+de]==="0")pt=!0,de++;else if(at[Mt+de].match(/[Uu]/)!==null)de++;else if(at[Mt+de].match($t)===null)de++;else{Ct=at[Mt+de];break}Ct.match(/[Mm]/)?At=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Ct="",de=1;at[Mt+de];)if(at[Mt+de].match(/[Ff]/)!==null)de++;else if(at[Mt+de].match($t)===null)de++;else{Ct=at[Mt+de];break}Ct.match(/[Mm]/)?ft=!0:a.mc.isShadowed=!1}if(ot=a.os,m0=a,y)for(y=ot.figures.iterator;y.next();)y.value.isFilled=!0;return ot},rn.Ha=function(a,y){for(var x=a.length,E=Rt.alloc(),b=0;b<x;b++){var z=a[b];E.x=z[0],E.y=z[1],y.Ga(E),z[0]=E.x,z[1]=E.y,E.x=z[2],E.y=z[3],y.Ga(E),z[2]=E.x,z[3]=E.y,E.x=z[4],E.y=z[5],y.Ga(E),z[4]=E.x,z[5]=E.y,E.x=z[6],E.y=z[7],y.Ga(E),z[6]=E.x,z[7]=E.y}Rt.free(E)},rn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===rn.o){if(this.aq!==this.figures.Ja)return!0;for(var a=this.figures.s,y=a.length,x=0;x<y;x++)if(a[x].Zu())return!0}return!1},rn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===rn.o){this.aq=this.figures.Ja;for(var a=this.figures.s,y=a.length,x=0;x<y;x++){var E=a[x];E._isInvalidBounds=!1;var b=E.segments;E.sr=b.Ja,E=b.s,b=E.length;for(var z=0;z<b;z++){var tt=E[z];tt._isInvalidBounds=!1,tt.ae=null}}}a=this.Ip,a.ka(),isNaN(this.Sk)||isNaN(this.Rk)?a.h(0,0,0,0):a.h(0,0,this.Sk,this.Rk),nc(this,a,!1),Yr(a,0,0,0,0),a.freeze()},rn.prototype.ix=function(){var a=new Me;return nc(this,a,!0),a};function nc(a,y,x){switch(a.type){case rn.j:case rn.u:case rn.F:x?y.h(a.od,a.pd,0,0):Yr(y,a.od,a.pd,0,0),Yr(y,a.Dc,a.Ec,0,0);break;case rn.o:var E=a.figures;a=E.s,E=E.length;for(var b=0;b<E;b++){var z=a[b];x&&b===0?y.h(z.startX,z.startY,0,0):Yr(y,z.startX,z.startY,0,0);for(var tt=z.segments.s,rt=tt.length,ot=z.startX,at=z.startY,At=0;At<rt;At++){var ft=tt[At];switch(ft.type){case mr:case Eo:ot=ft.endX,at=ft.endY,Yr(y,ot,at,0,0);break;case ss:re.Dl(ot,at,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.5,y),ot=ft.endX,at=ft.endY;break;case ca:re.iv(ot,at,ft.point1X,ft.point1Y,ft.endX,ft.endY,.5,y),ot=ft.endX,at=ft.endY;break;case ro:case Ka:var pt=ft.type===ro?ta(ft,z):ja(ft,z,ot,at),xt=pt.length;if(xt===0){ot=ft.type===ro?ft.centerX:ft.endX,at=ft.type===ro?ft.centerY:ft.endY,Yr(y,ot,at,0,0);break}ft=null;for(var Ct=0;Ct<xt;Ct++)ft=pt[Ct],re.Dl(ft[0],ft[1],ft[2],ft[3],ft[4],ft[5],ft[6],ft[7],.5,y);ft!==null&&(ot=ft[6],at=ft[7]);break;default:pe("Unknown Segment type: "+ft.type)}}}break;default:pe("Unknown Geometry type: "+a.type)}}rn.prototype.normalize=function(){this._isFrozen&&Un(this);var a=this.ix();return this.offset(-a.x,-a.y),new Rt(-a.x,-a.y)},rn.prototype.offset=function(a,y){return this._isFrozen&&Un(this),this.transform(1,0,0,1,a,y),this},rn.prototype.scale=function(a,y){return this._isFrozen&&Un(this),this.transform(a,0,0,y,0,0),this},rn.prototype.rotate=function(a,y,x){this._isFrozen&&Un(this),y===void 0&&(y=0),x===void 0&&(x=0);var E=Li.alloc();return E.reset(),E.rotate(a,y,x),this.transform(E.m11,E.m12,E.m21,E.m22,E.dx,E.dy),Li.free(E),this},Bt=rn.prototype,Bt.transform=function(a,y,x,E,b,z){switch(this.type){case rn.j:case rn.u:case rn.F:var tt=this.od,rt=this.pd;this.od=tt*a+rt*x+b,this.pd=tt*y+rt*E+z,tt=this.Dc,rt=this.Ec,this.Dc=tt*a+rt*x+b,this.Ec=tt*y+rt*E+z;break;case rn.o:for(var ot=this.figures.s,at=ot.length,At=0;At<at;At++){var ft=ot[At];tt=ft.startX,rt=ft.startY,ft.startX=tt*a+rt*x+b,ft.startY=tt*y+rt*E+z,ft=ft.segments.s;for(var pt=ft.length,xt=0;xt<pt;xt++){var Ct=ft[xt];switch(Ct.type){case mr:case Eo:tt=Ct.endX,rt=Ct.endY,Ct.endX=tt*a+rt*x+b,Ct.endY=tt*y+rt*E+z;break;case ss:tt=Ct.point1X,rt=Ct.point1Y,Ct.point1X=tt*a+rt*x+b,Ct.point1Y=tt*y+rt*E+z,tt=Ct.point2X,rt=Ct.point2Y,Ct.point2X=tt*a+rt*x+b,Ct.point2Y=tt*y+rt*E+z,tt=Ct.endX,rt=Ct.endY,Ct.endX=tt*a+rt*x+b,Ct.endY=tt*y+rt*E+z;break;case ca:tt=Ct.point1X,rt=Ct.point1Y,Ct.point1X=tt*a+rt*x+b,Ct.point1Y=tt*y+rt*E+z,tt=Ct.endX,rt=Ct.endY,Ct.endX=tt*a+rt*x+b,Ct.endY=tt*y+rt*E+z;break;case ro:tt=Ct.centerX,rt=Ct.centerY,Ct.centerX=tt*a+rt*x+b,Ct.centerY=tt*y+rt*E+z,y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),Ct.startAngle+=tt),0>a&&(Ct.startAngle=180-Ct.startAngle,Ct.sweepAngle=-Ct.sweepAngle),0>E&&(Ct.startAngle=-Ct.startAngle,Ct.sweepAngle=-Ct.sweepAngle),Ct.radiusX*=Math.sqrt(a*a+x*x),Ct.radiusY!==void 0&&(Ct.radiusY*=Math.sqrt(y*y+E*E));break;case Ka:if(tt=Ct.endX,rt=Ct.endY,Ct.endX=tt*a+rt*x+b,Ct.endY=tt*y+rt*E+z,Ct.radiusX===0||Ct.radiusY===0)break;y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),Ct.xAxisRotation+=tt),0>a&&(Ct.xAxisRotation=180-Ct.xAxisRotation,Ct.isClockwiseArc=!Ct.isClockwiseArc),0>E&&(Ct.xAxisRotation=-Ct.xAxisRotation,Ct.isClockwiseArc=!Ct.isClockwiseArc),Ct.radiusX*=Math.sqrt(a*a+x*x),Ct.radiusY*=Math.sqrt(y*y+E*E);break;default:pe("Unknown Segment type: "+Ct.type)}}}}return this._isInvalidBounds=!0,this},Bt.ca=function(a,y){y===void 0&&(y=0);var x=this.od,E=this.pd,b=this.Dc,z=this.Ec;switch(this.type){case rn.j:return re.Yb(x,E,b,z,y,a.x,a.y);case rn.u:var tt=Me.allocAt(Math.min(x,b)-y,Math.min(E,z)-y,Math.abs(b-x)+2*y,Math.abs(z-E)+2*y);return a=tt.ca(a),Me.free(tt),a;case rn.F:tt=Math.min(x,b)-y;var rt=Math.min(E,z)-y;return x=(Math.abs(b-x)+2*y)/2,y=(Math.abs(z-E)+2*y)/2,0>=x||0>=y?!1:(tt=a.x-(tt+x),rt=a.y-(rt+y),1>=tt*tt/(x*x)+rt*rt/(y*y));case rn.o:return zs(this,a,y,!0,!1);default:return!1}};function zs(a,y,x,E,b){var z=y.x;y=y.y;for(var tt=a.bounds.x-20,rt=0,ot,at,At,ft,pt=a.figures.s,xt=pt.length,Ct=0;Ct<xt;Ct++){var Mt=pt[Ct],Gt=!Mt.isEvenOdd;if(Mt.isFilled){if(E&&Mt.ca(z,y,x))return!0;var It=Mt.segments;ot=Mt.startX,at=Mt.startY;for(var zt=ot,Yt=at,Xt=It.s,$t=0;$t<=It.length;$t++){var de=void 0;if($t!==It.length){de=Xt[$t];var An=de.type;a=de.endX,ft=de.endY}else An=mr,a=zt,ft=Yt;switch(An){case Eo:if(zt=AA(z,y,tt,y,ot,at,zt,Yt),isNaN(zt))return!0;rt+=zt,zt=a,Yt=ft;break;case mr:if(ot=AA(z,y,tt,y,ot,at,a,ft),isNaN(ot))return!0;rt+=ot;break;case ss:At=re.Fo(ot,at,de.point1X,de.point1Y,de.point2X,de.point2Y,a,ft,tt,y,z,y,.5),rt+=At;break;case ca:At=re.Fo(ot,at,(ot+2*de.point1X)/3,(at+2*de.point1Y)/3,(2*de.point1X+a)/3,(2*de.point1Y+ft)/3,a,ft,tt,y,z,y,.5),rt+=At;break;case ro:case Ka:An=de.type===ro?ta(de,Mt):ja(de,Mt,ot,at);var Bn=An.length;if(Bn===0){if(ot=AA(z,y,tt,y,ot,at,de.type===ro?de.centerX:de.endX,de.type===ro?de.centerY:de.endY),isNaN(ot))return!0;rt+=ot;break}de=null;for(var vn=0;vn<Bn;vn++){if(de=An[vn],vn===0){if(At=AA(z,y,tt,y,ot,at,de[0],de[1]),isNaN(At))return!0;rt+=At}At=re.Fo(de[0],de[1],de[2],de[3],de[4],de[5],de[6],de[7],tt,y,z,y,.5),rt+=At}de!==null&&(a=de[6],ft=de[7]);break;default:pe("Unknown Segment type: "+de.type)}ot=a,at=ft}if(Gt){if(rt!==0)return!0}else if(rt%2!==0)return!0;rt=0}else if(Mt.ca(z,y,b?x:x+2))return!0}return!1}function AA(a,y,x,E,b,z,tt,rt){if(re.Yb(b,z,tt,rt,.05,a,y))return NaN;var ot=(a-x)*(z-rt);if(ot===0)return 0;var at=((a*E-y*x)*(b-tt)-(a-x)*(b*rt-z*tt))/ot;if(y=(a*E-y*x)*(z-rt)/ot,at>=a)return 0;if((b>tt?b-tt:tt-b)<(z>rt?z-rt:rt-z)){if(z<rt){if(y<z||y>rt)return 0}else if(y<rt||y>z)return 0}else if(b<tt){if(at<b||at>tt)return 0}else if(at<tt||at>b)return 0;return 0<ot?1:-1}function Ou(a,y,x,E){a=a.figures.s;for(var b=a.length,z=0;z<b;z++)if(a[z].ca(y,x,E))return!0;return!1}Bt.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new Rt),this.type===rn.j)return y.h(this.startX+a*(this.endX-this.startX),this.startY+a*(this.endY-this.startY)),y;for(var x=this.flattenedSegments,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,tt=0,rt=0;rt<b;rt++){var ot=E[rt],at=ot.length;for(a=0;a<at;a++){var At=ot[a];if(tt+At>=z)return E=z-tt,E=At===0?0:E/At,x=x[rt],rt=x[2*a],b=x[2*a+1],y.h(rt+(x[2*a+2]-rt)*E,b+(x[2*a+3]-b)*E),y;tt+=At}}return y},Bt.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===rn.j)return 180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI;for(var y=this.flattenedSegments,x=this.flattenedLengths,E=y.length,b=this.flattenedTotalLength*a,z=0,tt=0;tt<E;tt++){var rt=x[tt],ot=rt.length;for(a=0;a<ot;a++){var at=rt[a];if(z+at>=b)return b=y[tt],y=b[2*a],x=b[2*a+1],E=b[2*a+2],a=b[2*a+3],1>Math.abs(E-y)&&1>Math.abs(a-x)?0:1>Math.abs(E-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=E-y?0:180:180*Math.atan2(a-x,E-y)/Math.PI;z+=at}}return NaN},Bt.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===rn.j)return y[0]=this.startX+a*(this.endX-this.startX),y[1]=this.startY+a*(this.endY-this.startY),y[2]=180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI,y;for(var x=this.flattenedSegments,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,tt=0,rt=0;rt<b;rt++){var ot=E[rt],at=ot.length;for(a=0;a<at;a++){var At=ot[a];if(tt+At>=z)return E=z-tt,E=At===0?0:E/At,At=x[rt],x=At[2*a],rt=At[2*a+1],b=At[2*a+2],a=At[2*a+3],y[0]=x+(b-x)*E,y[1]=rt+(a-rt)*E,y[2]=1>Math.abs(b-x)&&1>Math.abs(a-rt)?0:1>Math.abs(b-x)?0<=a-rt?90:270:1>Math.abs(a-rt)?0<=b-x?0:180:180*Math.atan2(a-rt,b-x)/Math.PI,y;tt+=At}}return y},Bt.xx=function(a){if(this.type===rn.j){var y=this.startX,x=this.startY,E=this.endX,b=this.endY;if(y!==E||x!==b){var z=a.x;if(a=a.y,y===E){if(x<b){var tt=x;E=b}else tt=b,E=x;return a<=tt?tt===x?0:1:a>=E?E===x?0:1:Math.abs(a-x)/(E-tt)}if(x===b)return y<E?tt=y:(tt=E,E=y),z<=tt?tt===y?0:1:z>=E?E===y?0:1:Math.abs(z-y)/(E-tt);tt=(E-y)*(E-y)+(b-x)*(b-x);var rt=Rt.alloc();return re.qh(y,x,E,b,z,a,rt),a=rt.x,z=rt.y,Rt.free(rt),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/tt)}}else if(this.type===rn.u){tt=this.startX,rt=this.startY;var ot=this.endX;if(b=this.endY,tt!==ot||rt!==b){y=ot-tt,x=b-rt,z=2*y+2*x,E=a.x,a=a.y,E=Math.min(Math.max(E,tt),ot),a=Math.min(Math.max(a,rt),b),tt=Math.abs(E-tt),ot=Math.abs(E-ot),rt=Math.abs(a-rt),b=Math.abs(a-b);var at=Math.min(tt,ot,rt,b);if(at===rt)return E/z;if(at===ot)return(y+a)/z;if(at===b)return(2*y+x-E)/z;if(at===tt)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,E=Rt.alloc(),b=1/0,rt=tt=0,ot=y.length;for(var At=at=0,ft=0;ft<ot;ft++)for(var pt=y[ft],xt=x[ft],Ct=pt.length,Mt=0;Mt<Ct;Mt+=2){var Gt=pt[Mt],It=pt[Mt+1];if(Mt!==0){re.qh(at,At,Gt,It,a.x,a.y,E);var zt=(E.x-a.x)*(E.x-a.x)+(E.y-a.y)*(E.y-a.y);zt<b&&(b=zt,tt=rt,tt+=Math.sqrt((E.x-at)*(E.x-at)+(E.y-At)*(E.y-At))),rt+=xt[(Mt-2)/2]}at=Gt,At=It}return Rt.free(E),a=tt/z,0>a?0:1<a?1:a}return 0};function ff(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],E=[],b=[];if(a.type===rn.j)E.push(a.startX),E.push(a.startY),E.push(a.endX),E.push(a.endY),y.push(E),b.push(Math.sqrt((a.startX-a.endX)*(a.startX-a.endX)+(a.startY-a.endY)*(a.startY-a.endY))),x.push(b);else if(a.type===rn.u)E.push(a.startX),E.push(a.startY),E.push(a.endX),E.push(a.startY),E.push(a.endX),E.push(a.endY),E.push(a.startX),E.push(a.endY),E.push(a.startX),E.push(a.startY),y.push(E),b.push(Math.abs(a.startX-a.endX)),b.push(Math.abs(a.startY-a.endY)),b.push(Math.abs(a.startX-a.endX)),b.push(Math.abs(a.startY-a.endY)),x.push(b);else if(a.type===rn.F){var z=new No;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var tt=new Ki(ro);if(tt.startAngle=0,tt.sweepAngle=360,tt.centerX=(a.startX+a.endX)/2,tt.centerY=(a.startY+a.endY)/2,tt.radiusX=Math.abs(a.startX-a.endX)/2,tt.radiusY=Math.abs(a.startY-a.endY)/2,z.add(tt),a=ta(tt,z),b=a.length,b===0)E.push(tt.centerX),E.push(tt.centerY);else{tt=z.startX,z=z.startY;for(var rt=0;rt<b;rt++){var ot=a[rt];re.Qe(tt,z,ot[2],ot[3],ot[4],ot[5],ot[6],ot[7],.5,E),tt=ot[6],z=ot[7]}}y.push(E),x.push($A(E))}else for(a=a.figures.iterator;a.next();){b=a.value,E=[],E.push(b.startX),E.push(b.startY),tt=b.startX,z=b.startY,rt=tt,ot=z;for(var at=b.segments.s,At=at.length,ft=0;ft<At;ft++){var pt=at[ft];switch(pt.type){case Eo:4<=E.length&&(y.push(E),x.push($A(E))),E=[],E.push(pt.endX),E.push(pt.endY),tt=pt.endX,z=pt.endY,rt=tt,ot=z;break;case mr:E.push(pt.endX),E.push(pt.endY),tt=pt.endX,z=pt.endY;break;case ss:re.Qe(tt,z,pt.point1X,pt.point1Y,pt.point2X,pt.point2Y,pt.endX,pt.endY,.5,E),tt=pt.endX,z=pt.endY;break;case ca:re.ep(tt,z,pt.point1X,pt.point1Y,pt.endX,pt.endY,.5,E),tt=pt.endX,z=pt.endY;break;case ro:var xt=ta(pt,b),Ct=xt.length;if(Ct===0){E.push(pt.centerX),E.push(pt.centerY),tt=pt.centerX,z=pt.centerY;break}for(var Mt=0;Mt<Ct;Mt++){var Gt=xt[Mt];re.Qe(tt,z,Gt[2],Gt[3],Gt[4],Gt[5],Gt[6],Gt[7],.5,E),tt=Gt[6],z=Gt[7]}break;case Ka:if(xt=ja(pt,b,tt,z),Ct=xt.length,Mt=pt.endX,Gt=pt.endY,Ct===0){E.push(Mt),E.push(Gt),tt=Mt,z=Gt;break}for(Mt=0;Mt<Ct;Mt++)Gt=xt[Mt],re.Qe(tt,z,Gt[2],Gt[3],Gt[4],Gt[5],Gt[6],Gt[7],.5,E),tt=Gt[6],z=Gt[7];break;default:pe("Segment not of valid type: "+pt.type)}pt.isClosed&&(E.push(rt),E.push(ot))}4<=E.length&&(y.push(E),x.push($A(E)))}}}function $A(a){for(var y=[],x=0,E=0,b=a.length,z=0;z<b;z+=2){var tt=a[z],rt=a[z+1];z!==0&&y.push(Math.sqrt(Ui(x,E,tt,rt))),x=tt,E=rt}return y}Bt.add=function(a){return this.ee.add(a),this},Bt.pm=function(a,y,x,E,b,z,tt,rt){return this._isFrozen&&Un(this),this.fg=new Vn(a,y,b,z).freeze(),this.gg=new Vn(x,E,tt,rt).freeze(),this},Ie.Object.defineProperties(rn.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},flattenedSegments:{get:function(){return ff(this),this.tk}},flattenedLengths:{get:function(){return ff(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===rn.j){a=Math.abs(this.endX-this.startX);var y=Math.abs(this.endY-this.startY);a=Math.sqrt(a*a+y*y)}else if(this.type===rn.u)a=2*Math.abs(this.endX-this.startX)+2*Math.abs(this.endY-this.startY);else{y=this.flattenedLengths;for(var x=y.length,E=a=0;E<x;E++)for(var b=y[E],z=b.length,tt=0;tt<z;tt++)a+=b[tt]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&Un(this,a),this.na=a,a===rn.o?this.ee=new Ke:(rn.V===null&&(rn.V=new Ke().freeze()),this.ee=rn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&Un(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&Un(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&Un(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&Un(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&Un(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&Un(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&Un(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&Un(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),rn.prototype.setSpots=rn.prototype.pm,rn.prototype.add=rn.prototype.add,rn.prototype.getFractionForPoint=rn.prototype.xx,rn.prototype.getPointAndAngleAlongPath=rn.prototype.Qu,rn.prototype.getAngleAlongPath=rn.prototype.wx,rn.prototype.getPointAlongPath=rn.prototype.Pu,rn.prototype.containsPoint=rn.prototype.ca,rn.prototype.transform=rn.prototype.transform,rn.prototype.rotate=rn.prototype.rotate,rn.prototype.scale=rn.prototype.scale,rn.prototype.offset=rn.prototype.offset,rn.prototype.normalize=rn.prototype.normalize,rn.prototype.computeBoundsWithoutOrigin=rn.prototype.ix,rn.prototype.equalsApprox=rn.prototype.Xa,rn.className="Geometry",rn.j=new ce(rn,"Line",0),rn.u=new ce(rn,"Rectangle",1),rn.F=new ce(rn,"Ellipse",2),rn.o=new ce(rn,"Path",3),rn.V=null,rn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",rn.className="Geometry",rn.stringify=rn.ia,rn.fillPath=rn.nb,rn.parse=rn.parse,rn.Line=rn.j,rn.Rectangle=rn.u,rn.Ellipse=rn.F,rn.Path=rn.o;function No(a,y,x,E,b){rr(this),x===void 0&&(x=!0),E===void 0&&(E=!0),b===void 0&&(b=!1),this.l=2|(x?4:0)|(E?8:0)|(b?16:0),a!==void 0?this.od=a:this.od=0,y!==void 0?this.pd=y:this.pd=0,this.pl=new Ke,this.sr=this.pl.Ja,this.fw=null}No.prototype.copy=function(){var a=new No;a.l=this.l&-2,a.od=this.od,a.pd=this.pd;for(var y=this.pl.s,x=y.length,E=a.pl,b=0;b<x;b++){var z=y[b].copy();E.add(z)}return a.sr=this.sr,a.fw=this.fw,a},Bt=No.prototype,Bt.Xa=function(a){if(!(a instanceof No&&re.B(this.startX,a.startX)&&re.B(this.startY,a.startY)))return!1;var y=this.segments.s;a=a.segments.s;var x=y.length;if(x!==a.length)return!1;for(var E=0;E<x;E++)if(!y[E].Xa(a[E]))return!1;return!0},Bt.toString=function(a){a===void 0&&(a=-1);for(var y=0>a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a),x=this.segments.s,E=x.length,b=0;b<E;b++)y+=" "+x[b].toString(a);return y},Bt.freeze=function(){this._isFrozen=!0;var a=this.segments;a.freeze();var y=a.s;a=a.length;for(var x=0;x<a;x++)y[x].freeze();return this},Bt.ka=function(){this._isFrozen=!1;var a=this.segments;a.ka(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].ka();return this},Bt.Zu=function(){if(this._isInvalidBounds)return!0;var a=this.segments;if(this.sr!==a.Ja)return!0;a=a.s;for(var y=a.length,x=0;x<y;x++)if(a[x]._isInvalidBounds)return!0;return!1},Bt.add=function(a){return this.pl.add(a),this},Bt.ca=function(a,y,x){for(var E=this.startX,b=this.startY,z=E,tt=b,rt=this.segments.s,ot=rt.length,at=0;at<ot;at++){var At=rt[at];switch(At.type){case Eo:z=At.endX,tt=At.endY,E=At.endX,b=At.endY;break;case mr:if(re.Yb(E,b,At.endX,At.endY,x,a,y))return!0;E=At.endX,b=At.endY;break;case ss:if(re.cs(E,b,At.point1X,At.point1Y,At.point2X,At.point2Y,At.endX,At.endY,.5,a,y,x))return!0;E=At.endX,b=At.endY;break;case ca:if(re.jv(E,b,At.point1X,At.point1Y,At.endX,At.endY,.5,a,y,x))return!0;E=At.endX,b=At.endY;break;case ro:case Ka:var ft=At.type===ro?ta(At,this):ja(At,this,E,b),pt=ft.length,xt=At.type===ro?At.centerX:At.endX,Ct=At.type===ro?At.centerY:At.endY;if(pt===0){if(re.Yb(E,b,xt,Ct,x,a,y))return!0;E=xt,b=Ct;break}for(xt=null,Ct=0;Ct<pt;Ct++)if(xt=ft[Ct],Ct===0&&re.Yb(E,b,xt[0],xt[1],x,a,y)||re.cs(xt[0],xt[1],xt[2],xt[3],xt[4],xt[5],xt[6],xt[7],.5,a,y,x))return!0;xt!==null&&(E=xt[6],b=xt[7]);break;default:pe("Unknown Segment type: "+At.type)}if(At.isClosed&&(E!==z||b!==tt)&&re.Yb(E,b,z,tt,x,a,y))return!0}return!1},Ie.Object.defineProperties(No.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},isFilled:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&Un(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&Un(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&Un(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&Un(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&Un(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&Un(this,a),this.pl=a,this._isInvalidBounds=!0}}}),No.prototype.add=No.prototype.add,No.prototype.equalsApprox=No.prototype.Xa,No.className="PathFigure";function Ki(a,y,x,E,b,z,tt,rt){rr(this),a===void 0&&(a=mr),this.na=a,this.l=2,y!==void 0?this.Dc=y:this.Dc=0,x!==void 0?this.Ec=x:this.Ec=0,E===void 0&&(E=0),b===void 0&&(b=0),z===void 0&&(z=0),tt===void 0&&(tt=0),a===Ka?(a=z%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(E,0),this.Pg=Math.max(b,0),typeof tt=="boolean"?tt&&(this.isLargeArc=!0):typeof tt=="number"&&tt&&(this.isLargeArc=!0),rt&&(this.isClockwiseArc=!0)):(this.Ne=E,this.Vh=b,a===ro&&(z=Math.max(z,0)),this.Wh=z,typeof tt=="number"?(a===ro&&(tt=Math.max(tt,0)),this.Pg=tt):this.Pg=0),this.ae=null}Ki.prototype.copy=function(){var a=new Ki;return a.na=this.na,a.l=this.l&-2,a.Dc=this.Dc,a.Ec=this.Ec,a.Ne=this.Ne,a.Vh=this.Vh,a.Wh=this.Wh,a.Pg=this.Pg,a},Bt=Ki.prototype,Bt.Xa=function(a){if(!(a instanceof Ki)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Eo:case mr:return re.B(this.endX,a.endX)&&re.B(this.endY,a.endY);case ss:return re.B(this.endX,a.endX)&&re.B(this.endY,a.endY)&&re.B(this.point1X,a.point1X)&&re.B(this.point1Y,a.point1Y)&&re.B(this.point2X,a.point2X)&&re.B(this.point2Y,a.point2Y);case ca:return re.B(this.endX,a.endX)&&re.B(this.endY,a.endY)&&re.B(this.point1X,a.point1X)&&re.B(this.point1Y,a.point1Y);case ro:return re.B(this.startAngle,a.startAngle)&&re.B(this.sweepAngle,a.sweepAngle)&&re.B(this.centerX,a.centerX)&&re.B(this.centerY,a.centerY)&&re.B(this.radiusX,a.radiusX)&&re.B(this.radiusY,a.radiusY);case Ka:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&re.B(this.xAxisRotation,a.xAxisRotation)&&re.B(this.endX,a.endX)&&re.B(this.endY,a.endY)&&re.B(this.radiusX,a.radiusX)&&re.B(this.radiusY,a.radiusY);default:return!1}},Bt.qb=function(a){a.classType===Ki&&(this.type=a)},Bt.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Eo:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case mr:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case ss:a=0>a?"C"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.point2X.toString()+" "+this.point2Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"C"+this.point1X.toFixed(a)+" "+this.point1Y.toFixed(a)+" "+this.point2X.toFixed(a)+" "+this.point2Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case ca:a=0>a?"Q"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"Q"+this.point1X.toFixed(a)+" "+this.point1Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case ro:a=0>a?"B"+this.startAngle.toString()+" "+this.sweepAngle.toString()+" "+this.centerX.toString()+" "+this.centerY.toString()+" "+this.radiusX.toString()+" "+this.radiusY.toString():"B"+this.startAngle.toFixed(a)+" "+this.sweepAngle.toFixed(a)+" "+this.centerX.toFixed(a)+" "+this.centerY.toFixed(a)+" "+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a);break;case Ka:a=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.xAxisRotation.toString()+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toString()+" "+this.endY.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.xAxisRotation.toFixed(a)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;default:a=this.type.toString()}return a+(this.isClosed?"z":"")},Bt.freeze=function(){return this._isFrozen=!0,this},Bt.ka=function(){return this._isFrozen=!1,this},Bt.close=function(){return this.isClosed=!0,this};function ta(a,y){if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;var x=a.radiusX,E=a.radiusY;if(E===void 0&&(E=x),x===0||E===0)return a.ae=[],a.ae;y=a.Ne;var b=a.Vh,z=re.jx(0,0,x<E?x:E,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==E){var tt=Li.alloc();tt.reset(),x<E?tt.scale(1,E/x):tt.scale(x/E,1),rn.Ha(z,tt),Li.free(tt)}for(x=z.length,E=0;E<x;E++)tt=z[E],tt[0]+=y,tt[1]+=b,tt[2]+=y,tt[3]+=b,tt[4]+=y,tt[5]+=b,tt[6]+=y,tt[7]+=b;return a.ae=z,a.ae}function ja(a,y,x,E){function b(Mt,Gt,It,zt){return(Mt*zt<Gt*It?-1:1)*Math.acos((Mt*It+Gt*zt)/(Math.sqrt(Mt*Mt+Gt*Gt)*Math.sqrt(It*It+zt*zt)))}if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;if(a.radiusX===0||a.radiusY===0)return a.ae=[],a.ae;y=a.Wh;var z=a.Pg;y===0&&(y=1e-4),z===0&&(z=1e-4);var tt=Math.PI/180*a.Ne,rt=a.isLargeArc,ot=a.isClockwiseArc,at=a.Dc,At=a.Ec,ft=Math.cos(tt),pt=Math.sin(tt),xt=ft*(x-at)/2+pt*(E-At)/2;tt=-pt*(x-at)/2+ft*(E-At)/2;var Ct=xt*xt/(y*y)+tt*tt/(z*z);return 1<Ct&&(y*=Math.sqrt(Ct),z*=Math.sqrt(Ct)),Ct=(rt===ot?-1:1)*Math.sqrt((y*y*z*z-y*y*tt*tt-z*z*xt*xt)/(y*y*tt*tt+z*z*xt*xt)),isNaN(Ct)&&(Ct=0),rt=Ct*y*tt/z,Ct=Ct*-z*xt/y,isNaN(rt)&&(rt=0),isNaN(Ct)&&(Ct=0),x=(x+at)/2+ft*rt-pt*Ct,E=(E+At)/2+pt*rt+ft*Ct,At=b(1,0,(xt-rt)/y,(tt-Ct)/z),ft=(xt-rt)/y,at=(tt-Ct)/z,xt=(-xt-rt)/y,rt=(-tt-Ct)/z,tt=b(ft,at,xt,rt),xt=(ft*xt+at*rt)/(Math.sqrt(ft*ft+at*at)*Math.sqrt(xt*xt+rt*rt)),-1>=xt?tt=Math.PI:1<=xt&&(tt=0),!ot&&0<tt&&(tt-=2*Math.PI),ot&&0>tt&&(tt+=2*Math.PI),ot=y>z?1:y/z,xt=y>z?z/y:1,y=re.jx(0,0,y>z?y:z,At,At+tt,!0),z=Li.alloc(),z.reset(),z.translate(x,E),z.rotate(a.Ne,0,0),z.scale(ot,xt),rn.Ha(y,z),Li.free(z),a.ae=y,a.ae}Ie.Object.defineProperties(Ki.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},isClosed:{get:function(){return(this.l&8)!==0},set:function(a){this.isClosed!==a&&(this.l=a?this.l|8:this.l&-9,this._isInvalidBounds=!0)}},type:{get:function(){return this.na},set:function(a){this._isFrozen&&Un(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Un(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&Un(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Un(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Un(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&Un(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&Un(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Un(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Un(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&pi(a,">= zero",Ki,"radiusX"),this._isFrozen&&Un(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&pi(a,">= zero",Ki,"radiusY"),this._isFrozen&&Un(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Un(this,a),a%=360,0>a&&(a+=360),this.Dc=a,this._isInvalidBounds=!0}},sweepAngle:{get:function(){return this.Ec},set:function(a){this._isFrozen&&Un(this,a),360<a&&(a=360),-360>a&&(a=-360),this.Ec=a,this._isInvalidBounds=!0}},isClockwiseArc:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&Un(this,a),this.l=a?this.l|4:this.l&-5,this._isInvalidBounds=!0}},isLargeArc:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&Un(this,a),this.l=a?this.l|16:this.l&-17,this._isInvalidBounds=!0}},xAxisRotation:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Un(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Ki.prototype.equalsApprox=Ki.prototype.Xa;var Eo=new ce(Ki,"Move",0),mr=new ce(Ki,"Line",1),ss=new ce(Ki,"Bezier",2),ca=new ce(Ki,"QuadraticBezier",3),ro=new ce(Ki,"Arc",4),Ka=new ce(Ki,"SvgArc",4);Ki.className="PathSegment",Ki.Move=Eo,Ki.Line=mr,Ki.Bezier=ss,Ki.QuadraticBezier=ca,Ki.Arc=ro,Ki.SvgArc=Ka;function us(){this.H=null,this.xu=new Rt(0,0).freeze(),this.mt=new Rt(0,0).freeze(),this.Bp=this.Rq=0,this.Cp=1,this.xq="",this.Wr=this.Tp=!1,this.Rp=this.Ep=0,this.xg=this.nq=this.tq=!1,this.Zp=null,this.Rr=0,this.xd=this.Nr=null}us.prototype.copy=function(){var a=new us;return this.clone(a)},us.prototype.clone=function(a){return a.H=this.H,a.xu.assign(this.viewPoint),a.mt.assign(this.documentPoint),a.Rq=this.Rq,a.Bp=this.Bp,a.Cp=this.Cp,a.xq=this.xq,a.Tp=this.Tp,a.Wr=this.Wr,a.Ep=this.Ep,a.Rp=this.Rp,a.tq=this.tq,a.nq=this.nq,a.xg=this.xg,a.Zp=this.Zp,a.Rr=this.Rr,a.Nr=this.Nr,a.xd=this.xd,a},us.prototype.toString=function(){var a="^";return this.modifiers!==0&&(a+="M:"+this.modifiers),this.button!==0&&(a+="B:"+this.button),this.key!==""&&(a+="K:"+this.key),this.clickCount!==0&&(a+="C:"+this.clickCount),this.delta!==0&&(a+="D:"+this.delta),this.handled&&(a+="h"),this.bubbles&&(a+="b"),this.documentPoint!==null&&(a+="@"+this.documentPoint.toString()),a},us.prototype.So=function(a,y){var x=this.diagram;return x===null||bg(x,a,y),y},us.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(bg(x,a,y),y.assign(x.Ps(y))),y},Ie.Object.defineProperties(us.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},viewPoint:{get:function(){return this.xu},set:function(a){this.xu.assign(a)}},documentPoint:{get:function(){return this.mt},set:function(a){this.mt.assign(a)}},modifiers:{get:function(){return this.Rq},set:function(a){this.Rq=a}},button:{get:function(){return this.Bp},set:function(a){if(this.Bp=a,this.event===null)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}}},buttons:{get:function(){return this.Cp},set:function(a){this.Cp=a}},key:{get:function(){return this.xq},set:function(a){this.xq=a}},down:{get:function(){return this.Tp},set:function(a){this.Tp=a}},up:{get:function(){return this.Wr},set:function(a){this.Wr=a}},clickCount:{get:function(){return this.Ep},set:function(a){this.Ep=a}},delta:{get:function(){return this.Rp},set:function(a){this.Rp=a}},isMultiTouch:{get:function(){return this.tq},set:function(a){this.tq=a}},handled:{get:function(){return this.nq},set:function(a){this.nq=a}},bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},event:{get:function(){return this.Zp},set:function(a){this.Zp=a}},isTouchEvent:{get:function(){var a=this.event;return a===null?!1:a.pointerType==="touch"||a.pointerType==="pen"}},timestamp:{get:function(){return this.Rr},set:function(a){this.Rr=a}},targetDiagram:{get:function(){return this.Nr},set:function(a){this.Nr=a}},targetObject:{get:function(){return this.xd},set:function(a){this.xd=a}},control:{get:function(){return(this.modifiers&1)!==0},set:function(a){this.modifiers=a?this.modifiers|1:this.modifiers&-2}},shift:{get:function(){return(this.modifiers&4)!==0},set:function(a){this.modifiers=a?this.modifiers|4:this.modifiers&-5}},alt:{get:function(){return(this.modifiers&2)!==0},set:function(a){this.modifiers=a?this.modifiers|2:this.modifiers&-3}},meta:{get:function(){return(this.modifiers&8)!==0},set:function(a){this.modifiers=a?this.modifiers|8:this.modifiers&-9}},left:{get:function(){var a=this.event;return a===null||a.type!=="mousedown"&&a.type!=="mouseup"&&a.type!=="pointerdown"&&a.type!=="pointerup"?(this.buttons&1)!==0:this.button===0},set:function(a){this.buttons=a?this.buttons|1:this.buttons&-2}},right:{get:function(){var a=this.event;return a===null||a.type!=="mousedown"&&a.type!=="mouseup"&&a.type!=="pointerdown"&&a.type!=="pointerup"?(this.buttons&2)!==0:this.button===2},set:function(a){this.buttons=a?this.buttons|2:this.buttons&-3}},middle:{get:function(){var a=this.event;return a===null||a.type!=="mousedown"&&a.type!=="mouseup"&&a.type!=="pointerdown"&&a.type!=="pointerup"?(this.buttons&4)!==0:this.button===1},set:function(a){this.buttons=a?this.buttons|4:this.buttons&-5}}}),us.prototype.getMultiTouchDocumentPoint=us.prototype.Bz,us.prototype.getMultiTouchViewPoint=us.prototype.So,us.className="InputEvent";function tu(){this.H=null,this.xa="",this.ar=this.Lr=null}tu.prototype.copy=function(){var a=new tu;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},tu.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},Ie.Object.defineProperties(tu.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},subject:{get:function(){return this.Lr},set:function(a){this.Lr=a}},parameter:{get:function(){return this.ar},set:function(a){this.ar=a}}}),tu.className="DiagramEvent";function Dr(){this.Fm=Qr,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Dr.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Dr.prototype.copy=function(){var a=new Dr;a.Fm=this.Fm,a.Qq=this.Qq,a.rf=this.rf,a.cc=this.cc,a.H=this.H,a.Qn=this.Qn;var y=this.Sn;return a.Sn=on(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=on(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=on(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=on(y)&&typeof y.J=="function"?y.J():y,a},Dr.prototype.qb=function(a){a.classType===Dr&&(this.change=a)},Dr.prototype.toString=function(){var a="";return a=this.change===Vs?a+"* ":this.change===Qr?a+(this.model!==null?"!m":"!d"):a+((this.model!==null?"!m":"!d")+this.change),this.propertyName&&typeof this.propertyName=="string"&&(a+=" "+this.propertyName),this.modelChange&&this.modelChange!==this.propertyName&&(a+=" "+this.modelChange),a+=": ",this.change===Vs?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=En(this.object)),this.oldValue!==null&&(a+=" old: "+En(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+En(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},Dr.prototype.I=function(a){return a?this.oldValue:this.newValue},Dr.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Dr.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Dr.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Dr.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Dr.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},Ie.Object.defineProperties(Dr.prototype,{model:{get:function(){return this.cc},set:function(a){this.cc=a}},diagram:{get:function(){return this.H},set:function(a){this.H=a}},change:{get:function(){return this.Fm},set:function(a){this.Fm=a}},modelChange:{get:function(){return this.Qq},set:function(a){this.Qq=a}},propertyName:{get:function(){return this.rf},set:function(a){this.rf=a}},isTransactionFinished:{get:function(){return this.Fm===Vs&&(this.rf==="CommittedTransaction"||this.rf==="FinishedUndo"||this.rf==="FinishedRedo")}},object:{get:function(){return this.Qn},set:function(a){this.Qn=a}},oldValue:{get:function(){return this.Sn},set:function(a){this.Sn=a}},oldParam:{get:function(){return this.Rn},set:function(a){this.Rn=a}},newValue:{get:function(){return this.Mn},set:function(a){this.Mn=a}},newParam:{get:function(){return this.Ln},set:function(a){this.Ln=a}}}),Dr.prototype.redo=Dr.prototype.redo,Dr.prototype.canRedo=Dr.prototype.canRedo,Dr.prototype.undo=Dr.prototype.undo,Dr.prototype.canUndo=Dr.prototype.canUndo,Dr.prototype.getParam=Dr.prototype.Dz,Dr.prototype.getValue=Dr.prototype.I,Dr.prototype.clear=Dr.prototype.clear;var Vs=new ce(Dr,"Transaction",-1),Qr=new ce(Dr,"Property",0),to=new ce(Dr,"Insert",1),Co=new ce(Dr,"Remove",2);Dr.className="ChangedEvent",Dr.Transaction=Vs,Dr.Property=Qr,Dr.Insert=to,Dr.Remove=Co;function zo(){this.o=new Ke().freeze(),this.xa="",this.j=!1}zo.prototype.toString=function(a){var y="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(a!==void 0&&0<a){a=this.changes.count;for(var x=0;x<a;x++){var E=this.changes.M(x);E!==null&&(y+=`
`+E.toString())}}return y},zo.prototype.clear=function(){var a=this.changes;a.ka();for(var y=a.count-1;0<=y;y--){var x=a.M(y);x!==null&&x.clear()}a.clear(),a.freeze()},zo.prototype.canUndo=function(){return this.isComplete},zo.prototype.undo=function(){if(this.canUndo())for(var a=this.changes.count-1;0<=a;a--){var y=this.changes.M(a);y!==null&&y.undo()}},zo.prototype.canRedo=function(){return this.isComplete},zo.prototype.redo=function(){if(this.canRedo())for(var a=this.changes.count,y=0;y<a;y++){var x=this.changes.M(y);x!==null&&x.redo()}},zo.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new Rn,x=0;x<a.count;x++){var E=a.M(x);if(E!==null&&E.change===Qr&&E.object){var b=y.get(E.object);b||(b=new Rn,y.set(E.object,b));var z=b.get(E.propertyName);z===null?b.set(E.propertyName,-1):(0<z&&a.cd(z,null),b.set(E.propertyName,x))}}for(x=y=0;x<a.count;x++)E=a.M(x),E!==null&&(x>y&&a.cd(y,E),y++);for(;a.length>y;)a.pop();a.freeze()}},Ie.Object.defineProperties(zo.prototype,{changes:{get:function(){return this.o}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isComplete:{get:function(){return this.j},set:function(a){this.j=a}}}),zo.prototype.optimize=zo.prototype.ak,zo.prototype.redo=zo.prototype.redo,zo.prototype.canRedo=zo.prototype.canRedo,zo.prototype.undo=zo.prototype.undo,zo.prototype.canUndo=zo.prototype.canUndo,zo.prototype.clear=zo.prototype.clear,zo.className="Transaction";function Or(){this.Pt=new Ye,this.Jd=!1,this.u=new Ke().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new Ke().freeze(),this.hl=new Ke,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}Or.prototype.toString=function(a){var y="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;y+="[";for(var x=this.nestedTransactionNames.count,E=0;E<x;E++)0<E&&(y+=" "),y+=this.nestedTransactionNames.M(E);if(y+="]",a!==void 0&&0<a)for(x=this.history.count,E=0;E<x;E++)y+=`
`+this.history.M(E).toString(a-1);return y},Or.prototype.clear=function(){var a=this.history;a.ka();for(var y=a.count-1;0<=y;y--){var x=a.M(y);x!==null&&x.clear()}a.clear(),this.Ce=-1,a.freeze(),this.Fe=!1,this.Np=null,this.bi=0,this.Ie.ka(),this.Ie.clear(),this.Ie.freeze(),this.hl.clear(),this.Dt=this.rq=this.Gt=this.Ft=!1},Or.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},Bt=Or.prototype,Bt.Xw=function(a){this.Pt.add(a)},Bt.Rx=function(a){this.Pt.remove(a)},Bt.Ea=function(a){if(a===void 0&&(a=""),a===null&&(a=""),this.isUndoingRedoing)return!1;this.tt===!0&&(this.tt=!1,this.bi++,this.isInternalTransaction||this.Ob("StartingFirstTransaction",a,this.currentTransaction),0<this.bi&&this.bi--),this.isEnabled&&(this.Ie.ka(),this.Ie.add(a),this.Ie.freeze(),this.currentTransaction===null?this.hl.add(0):this.hl.add(this.currentTransaction.changes.count)),this.bi++;var y=this.transactionLevel===1;return y&&(this.isInternalTransaction||this.Ob("StartedTransaction",a,this.currentTransaction)),y},Bt.eb=function(a){return a===void 0&&(a=""),Ru(this,!0,a)},Bt.Kf=function(){return Ru(this,!1,"")};function Ru(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&Oi("Ending transaction without having started a transaction: "+x);var E=a.transactionLevel===1,b=a.currentTransaction;E&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,b));var z=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var tt=a.Ie.count;0<tt&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(tt-1),a.Ie.freeze()),tt=a.hl.count,0<tt&&(z=a.hl.M(tt-1),a.hl.mb(tt-1))}if(E){if(y)a.rq=!1,b===null&&x!==""&&(b=a.currentTransaction),a.isEnabled&&b!==null&&(b.isComplete||(b.isComplete=!0,b.name=x),a.lx(),y=a.history,y.ka(),E=a.maxHistoryLength,0<=E&&(E===0?y.clear():y.count>=E&&(z=y.M(0),z!==null&&z.clear(),y.mb(0),a.Ce--)),E===0||y.count!==0&&y.get(y.count-1)===b||(y.add(b),a.Ce++),y.freeze()),a.isInternalTransaction||a.Ob("CommittedTransaction",x,b);else{a.Fe=!0;try{a.isEnabled&&b!==null&&(b.isComplete=!0,b.undo())}finally{a.isInternalTransaction||a.Ob("RolledBackTransaction",x,b),a.Fe=!1}b!==null&&b.clear()}return a.Np=null,a.isPendingClear&&a.clear(),a.isPendingClear=!1,a.isPendingUnmodified=!1,!0}if(a.isEnabled&&!y&&b!==null){for(a=z,x=b.changes,b=x.count-1;b>=a;b--)y=x.M(b),y!==null&&y.undo(),x.ka(),x.mb(b);x.freeze()}return!1}Bt.lx=function(){if(!this.isUndoingRedoing&&this.canRedo()){var a=this.history;a.ka();for(var y=a.count-1;y>this.historyIndex;y--){var x=a.M(y);x!==null&&x.clear(),a.mb(y),this.rq=!0}a.freeze()}},Or.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},Or.prototype.undo=function(){if(this.canUndo()){var a=this.transactionToUndo;try{this.Fe=!0,this.Ob("StartingUndo","Undo",a),this.Ce--,a.undo()}catch(y){Oi("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},Or.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},Or.prototype.redo=function(){if(this.canRedo()){var a=this.transactionToRedo;try{this.Fe=!0,this.Ob("StartingRedo","Redo",a),this.Ce++,a.redo()}catch(y){Oi("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},Or.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var E=new Dr;for(E.change=Vs,E.propertyName=a,E.object=x,E.oldValue=y,a=this.models;a.next();)y=a.value,E.model=y,y.ds(E)},Or.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new zo);var x=a.copy();y=y.changes,y.ka(),y.add(x),y.freeze(),this.checksTransactionLevel&&0>=this.transactionLevel&&!this.tt&&(a=a.diagram,a!==null&&a.pi===!1||Oi("Change not within a transaction: "+x.toString()))}},Or.prototype.skipsEvent=function(a){if(a===null||0>a.change.value)return!0;if(a=a.object,a===null)return!1;if(a.layer!==void 0){if(a=a.layer,a!==null&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1},Ie.Object.defineProperties(Or.prototype,{models:{get:function(){return this.Pt.iterator}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},transactionToUndo:{get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.M(this.historyIndex):null}},transactionToRedo:{get:function(){return this.historyIndex<this.history.count-1?this.history.M(this.historyIndex+1):null}},isUndoingRedoing:{get:function(){return this.Fe}},history:{get:function(){return this.u}},maxHistoryLength:{get:function(){return this.o},set:function(a){this.o=a}},historyIndex:{get:function(){return this.Ce}},currentTransaction:{get:function(){return this.Np}},transactionLevel:{get:function(){return this.bi}},isInTransaction:{get:function(){return 0<this.bi}},checksTransactionLevel:{get:function(){return this.j},set:function(a){this.j=a}},nestedTransactionNames:{get:function(){return this.Ie}},isPendingClear:{get:function(){return this.Ft},set:function(a){this.Ft=a}},isPendingUnmodified:{get:function(){return this.Gt},set:function(a){this.Gt=a}},isInternalTransaction:{get:function(){return this.Dt},set:function(a){this.Dt=a}},isJustDiscarded:{get:function(){return this.rq}}}),Or.prototype.handleChanged=Or.prototype.Tu,Or.prototype.redo=Or.prototype.redo,Or.prototype.undo=Or.prototype.undo,Or.prototype.canUndo=Or.prototype.canUndo,Or.prototype.discardHistoryAfterIndex=Or.prototype.lx,Or.prototype.rollbackTransaction=Or.prototype.Kf,Or.prototype.commitTransaction=Or.prototype.eb,Or.prototype.startTransaction=Or.prototype.Ea,Or.prototype.removeModel=Or.prototype.Rx,Or.prototype.addModel=Or.prototype.Xw,Or.prototype.clear=Or.prototype.clear,Or.className="UndoManager";function Ri(){rr(this),this.H=Yl,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new us,this.Zr=-1}Ri.prototype.toString=function(){return this.name!==""?this.name+" Tool":Ze(this.constructor)},Ri.prototype.updateAdornments=function(){},Ri.prototype.canStart=function(){return this.isEnabled},Ri.prototype.doStart=function(){},Ri.prototype.doActivate=function(){this.isActive=!0},Ri.prototype.doDeactivate=function(){this.isActive=!1},Ri.prototype.doStop=function(){},Ri.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},Ri.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},Ri.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},Ri.prototype.doMouseMove=function(){},Ri.prototype.doMouseUp=function(){this.stopTool()},Ri.prototype.doMouseWheel=function(){},Ri.prototype.canStartMultiTouch=function(){return!0},Ri.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Rt.allocAt(NaN,NaN)),E=y.So(1,Rt.allocAt(NaN,NaN));if(x.w()&&E.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){a.Bw=a.scale;var b=E.x-x.x,z=E.y-x.y;a.Jw=Math.sqrt(b*b+z*z),y.bubbles=!1}Rt.free(x),Rt.free(E)},Ri.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Rt.allocAt(NaN,NaN)),E=y.So(1,Rt.allocAt(NaN,NaN));if(x.w()&&E.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){var b=E.x-x.x,z=E.y-x.y;z=Math.sqrt(b*b+z*z)/a.Jw,b=new Rt((Math.min(E.x,x.x)+Math.max(E.x,x.x))/2,(Math.min(E.y,x.y)+Math.max(E.y,x.y))/2),z*=a.Bw;var tt=a.commandHandler;if(z!==a.scale&&tt.canResetZoom(z)){var rt=a.zoomPoint;a.zoomPoint=b,tt.resetZoom(z),a.zoomPoint=rt}y.bubbles=!1}Rt.free(x),Rt.free(E)},Ri.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},Ri.prototype.doKeyUp=function(){},Ri.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},Ri.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},Ri.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(Ji?y.meta:y.control){for(a.R("ChangingSelection",a.selection),y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&(y.isSelected=!y.isSelected),a.R("ChangedSelection",a.selection)}else if(y.shift){if(!x.isSelected){for(a.R("ChangingSelection",a.selection),y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&(y.isSelected=!0),a.R("ChangedSelection",a.selection)}}else if(!x.isSelected){for(y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&a.select(y)}}else!y.left||(Ji?y.meta:y.control)||y.shift||a.clearSelection()}},Ri.prototype.standardMouseClick=function(a,y){a===void 0&&(a=null),y===void 0&&(y=function(b){return!b.layer.isTemporary});var x=this.diagram,E=x.lastInput;return a=x.ic(E.documentPoint,a,y),E.targetObject=a,Gu(a,E,x),E.handled};function Gu(a,y,x){if(y.handled=!1,a===null||a.If()){var E=0;y.left?E=y.clickCount===1?1:y.clickCount===2?2:1:y.right&&y.clickCount===1&&(E=3);var b="ObjectSingleClicked";if(a!==null){switch(E){case 1:b="ObjectSingleClicked";break;case 2:b="ObjectDoubleClicked";break;case 3:b="ObjectContextClicked"}E!==0&&x.R(b,a)}else{switch(E){case 1:b="BackgroundSingleClicked";break;case 2:b="BackgroundDoubleClicked";break;case 3:b="BackgroundContextClicked"}E!==0&&x.R(b)}if(a!==null)for(;a!==null;){switch(x=null,E){case 1:x=a.click;break;case 2:x=a.doubleClick?a.doubleClick:a.click;break;case 3:x=a.contextClick}if(x!==null&&(x(y,a),y.handled))break;a=a.panel}else{switch(a=null,E){case 1:a=x.click;break;case 2:a=x.doubleClick?x.doubleClick:x.click;break;case 3:a=x.contextClick}a!==null&&a(y)}}}Ri.prototype.standardMouseOver=function(){var a=this.diagram,y=a.lastInput;if(a.animationManager.zb!==!0){var x=a.skipsUndoManager;a.skipsUndoManager=!0;var E=a.viewportBounds.ca(y.documentPoint)?a.ic(y.documentPoint,null,null):null;!y.event||y.event.type!=="pointercancel"&&y.event.type!=="pointerout"||(E=null),y.targetObject=E;var b=!1;if(E!==a.Ck){var z=a.Ck,tt=z;for(a.Ck=E,this.doCurrentObjectChanged(z,E),y.handled=!1;z!==null;){var rt=z.mouseLeave;if(rt!==null&&(E===z||E!==null&&E.rg(z)||(rt(y,z,E),b=!0,y.handled)))break;z=z.panel}for(z=tt,y.handled=!1;E!==null&&(tt=E.mouseEnter,!(tt!==null&&(z===E||z!==null&&z.rg(E)||(tt(y,E,z),b=!0,y.handled))));)E=E.panel;E=a.Ck}if(E!==null){for(z=E,tt="";z!==null&&(tt=z.cursor,tt==="");)z=z.panel;for(a.currentCursor=tt,y.handled=!1,z=E;z!==null&&(E=z.mouseOver,!(E!==null&&(E(y,z),b=!0,y.handled)));)z=z.panel}else this.doUpdateCursor(null),E=a.mouseOver,E!==null&&(E(y),b=!0);b&&a.$b(),a.skipsUndoManager=x}},Ri.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},Ri.prototype.doCurrentObjectChanged=function(){},Ri.prototype.standardMouseWheel=function(){var a=this.diagram,y=a.lastInput,x=y.delta;if(x!==0&&a.documentBounds.w()){var E=a.commandHandler,b=a.toolManager.mouseWheelBehavior;if(E!==null&&(b===vg&&!y.shift||b===kA&&y.control))(0<x?E.canIncreaseZoom():E.canDecreaseZoom())&&(b=a.zoomPoint,a.zoomPoint=y.viewPoint,0<x?E.increaseZoom():E.decreaseZoom(),a.zoomPoint=b),y.bubbles=!1;else if(b===vg&&y.shift||b===kA&&!y.control){E=a.position.copy();var z=y.event;b=z.deltaMode;var tt=z.deltaX;z=z.deltaY;var rt="pixel";if(tt===0&&z===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(rt,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(rt,0<x?"left":"right",Math.abs(x)));else{switch(b){case 0:rt="pixel";break;case 1:rt="line";break;case 2:rt="page"}tt!==0&&a.allowHorizontalScroll&&(tt*=a.scrollHorizontalLineChange/16,a.scroll(rt,0<tt?"right":"left",Math.abs(tt))),z!==0&&a.allowVerticalScroll&&(z*=a.scrollVerticalLineChange/16,a.scroll(rt,0<z?"down":"up",Math.abs(z)))}this.doWheelChange(a,E,y)}}},Ri.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},Ri.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,E=y.clone(this.yy);this.Zr=ti(function(){x.doWaitAfter(E)},a)},Ri.prototype.cancelWaitAfter=function(){this.Zr!==-1&&Fe.clearTimeout(this.Zr),this.Zr=-1},Ri.prototype.doWaitAfter=function(){},Ri.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof Wi);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},Ri.prototype.isBeyondDragSize=function(a,y){var x=this.diagram;a===void 0&&(a=x.firstInput.viewPoint),y===void 0&&(y=x.lastInput.viewPoint);var E=x.toolManager.dragSize,b=E.width;return E=E.height,x.firstInput.isTouchEvent&&(b+=6,E+=6),Math.abs(y.x-a.x)>b||Math.abs(y.y-a.y)>E},Ie.Object.defineProperties(Ri.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof ge&&(this.H=a)}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},isActive:{get:function(){return this.nb},set:function(a){this.nb=a}},transactionResult:{get:function(){return this.wm},set:function(a){this.wm=a}}}),Ri.prototype.startTransaction=Ri.prototype.Ea,Ri.className="Tool";function br(){Ri.call(this),this.name="ToolManager",this.hb=new Ke,this.ob=new Ke,this.Hb=new Ke,this.F=this.V=850,this.o=new an(2,2).ja(),this.Ha=5e3,this.ia=kA,this.u=df,this.Mp=this.j=null,this.zj=-1}ue(br,Ri),br.prototype.initializeStandardTools=function(){},br.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof Wi&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},br.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===bA&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===uA){y.bubbles=!0;return}if(this.gestureBehavior===bA)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var x=this.mouseDownTools.length,E=0;E<x;E++){var b=this.mouseDownTools.M(E);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseDown());return}}a.lastInput.button===1&&(this.mouseWheelBehavior===kA?this.mouseWheelBehavior=vg:this.mouseWheelBehavior===vg&&(this.mouseWheelBehavior=kA)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},br.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===uA){y.bubbles=!0;return}if(this.gestureBehavior===bA)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomMove();return}}if(this.isActive)for(var x=this.mouseMoveTools.length,E=0;E<x;E++){var b=this.mouseMoveTools.M(E);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseMove());return}}ic(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function ic(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}br.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof Wi&&(y===a||y.rg(a))||this.hideToolTip()},br.prototype.doWaitAfter=function(a){var y=this.diagram;y.ta!==null&&(this.doMouseHover(),this.isActive||this.doToolTip(),a.isTouchEvent&&!y.lastInput.handled&&(a=a.copy(),a.button=2,a.buttons=2,y.lastInput=a,y.qu=!0,y.doMouseUp()))},br.prototype.doMouseHover=function(){var a=this.diagram,y=a.lastInput;y.targetObject===null&&(y.targetObject=a.ic(y.documentPoint,null,null));var x=y.targetObject;if(x!==null)for(y.handled=!1;x!==null&&(a=this.isActive?x.mouseHold:x.mouseHover,!(a!==null&&(a(y,x),y.handled)));)x=x.panel;else x=this.isActive?a.mouseHold:a.mouseHover,x!==null&&x(y)},br.prototype.doToolTip=function(){var a=this.diagram,y=a.lastInput;if(y.targetObject===null&&(y.targetObject=a.ic(y.documentPoint,null,null)),y=y.targetObject,y!==null){if(a=this.currentToolTip,!(a instanceof Wi)||y!==a&&!y.rg(a)){for(;y!==null;){if(a=y.toolTip,a!==null){this.showToolTip(a,y);return}y=y.panel}this.hideToolTip()}}else y=a.toolTip,y!==null?this.showToolTip(y,null):this.hideToolTip()},br.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof Wi){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category="ToolTip",a.placeholder!==null&&(a.placeholder.scale=x.scale);var E=a.diagram;E!==null&&E!==x&&E.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionToolTip(a,y)}else a instanceof jl&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(Fe.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var b=this;this.zj=ti(function(){b.hideToolTip()},a)}},br.prototype.positionToolTip=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),E=a.measuredBounds,b=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=E.width),x.x+E.width>b.right&&(x.x-=E.width+5/y.scale),x.x<b.x&&(x.x=b.x),x.y=x.y+20/y.scale+E.height>b.bottom?x.y-(E.height+5/y.scale):x.y+20/y.scale,x.y<b.y&&(x.y=b.y),a.position=x}},br.prototype.hideToolTip=function(){this.zj!==-1&&(Fe.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof Wi?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof jl&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},br.prototype.doMouseUp=function(){this.cancelWaitAfter();var a=this.diagram;if(this.isActive)for(var y=this.mouseUpTools.length,x=0;x<y;x++){var E=this.mouseUpTools.M(x);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseUp());return}}a.doFocus(),this.doDeactivate()},br.prototype.doMouseWheel=function(){this.standardMouseWheel()},br.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},br.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},br.prototype.findTool=function(a){for(var y=this.mouseDownTools.length,x=0;x<y;x++){var E=this.mouseDownTools.M(x);if(E.name===a)return E}for(y=this.mouseMoveTools.length,x=0;x<y;x++)if(E=this.mouseMoveTools.M(x),E.name===a)return E;for(y=this.mouseUpTools.length,x=0;x<y;x++)if(E=this.mouseUpTools.M(x),E.name===a)return E;return null},br.prototype.replaceTool=function(a,y){y!==null&&(y.diagram=this.diagram);for(var x=this.mouseDownTools.length,E=0;E<x;E++){var b=this.mouseDownTools.M(E);if(b.name===a)return y!==null?this.mouseDownTools.cd(E,y):this.mouseDownTools.mb(E),b}for(x=this.mouseMoveTools.length,E=0;E<x;E++)if(b=this.mouseMoveTools.M(E),b.name===a)return y!==null?this.mouseMoveTools.cd(E,y):this.mouseMoveTools.mb(E),b;for(x=this.mouseUpTools.length,E=0;E<x;E++)if(b=this.mouseUpTools.M(E),b.name===a)return y!==null?this.mouseUpTools.cd(E,y):this.mouseUpTools.mb(E),b;return null},br.prototype.gb=function(a,y,x){y!==null&&(y.name=a,y.diagram=this.diagram),this.findTool(a)?this.replaceTool(a,y):y!==null&&x.add(y)},Ie.Object.defineProperties(br.prototype,{mouseWheelBehavior:{get:function(){return this.ia},set:function(a){this.ia=a}},gestureBehavior:{get:function(){return this.u},set:function(a){this.u=a}},currentToolTip:{get:function(){return this.j},set:function(a){this.j=a,this.Mp=a!==null&&a instanceof Wi?a.adornedPart:null}},mouseDownTools:{get:function(){return this.hb}},mouseMoveTools:{get:function(){return this.ob}},mouseUpTools:{get:function(){return this.Hb}},hoverDelay:{get:function(){return this.V},set:function(a){this.V=a}},holdDelay:{get:function(){return this.F},set:function(a){this.F=a}},dragSize:{get:function(){return this.o},set:function(a){this.o=a.J()}},toolTipDuration:{get:function(){return this.Ha},set:function(a){this.Ha=a}}}),br.prototype.replaceStandardTool=br.prototype.gb;var kA=new ce(br,"WheelScroll",0),vg=new ce(br,"WheelZoom",1),rd=new ce(br,"WheelNone",2),df=new ce(br,"GestureZoom",3),bA=new ce(br,"GestureCancel",4),uA=new ce(br,"GestureNone",5);br.className="ToolManager",br.WheelScroll=kA,br.WheelZoom=vg,br.WheelNone=rd,br.GestureZoom=df,br.GestureCancel=bA,br.GestureNone=uA;function Rr(){Ri.call(this),this.name="Dragging",this.u=this.Sw=this.ob=!0,this.o=this.Ha=this.V=this.Oe=null,this.Ym=this.Hb=!1,this.tl=new Rt(NaN,NaN),this.Fr=new Rt,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new Ye().freeze(),this.ia=new st,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var hA;ue(Rr,Ri),Rr.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly&&!a.allowDragOut||!a.allowMove&&!a.allowCopy&&!a.allowDragOut||!a.allowSelect)return!1;var y=a.lastInput;return!y.left||a.currentTool!==this&&(!this.isBeyondDragSize()||y.isTouchEvent&&y.timestamp-a.firstInput.timestamp<this.Ik)?!1:this.findDraggablePart()!==null},Rr.prototype.findDraggablePart=function(){var a=this.diagram;if(a=a.Ol(a.firstInput.documentPoint,!1),a===null)return null;for(;a!==null&&!a.canSelect();)a=a.containingGroup;return a!==null&&(a.canMove()||a.canCopy())?a:null},Rr.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.Ol(a.firstInput.documentPoint,!1);if(y!==null){for(;y!==null&&!y.canSelect();)y=y.containingGroup;this.currentPart=y,this.currentPart===null||this.currentPart.isSelected||(a.R("ChangingSelection",a.selection),y=a.lastInput,(Ji?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},Rr.prototype.doActivate=function(){var a=this.diagram;this.Bn=null,this.currentPart===null&&this.standardMouseSelect();var y=this.currentPart;y!==null&&(y.canMove()||y.canCopy())&&(a.Fu(!0),Qo=null,this.isActive=!0,this.tl.set(a.position),cf(this,a.selection),this.Cg.length=0,a.animationManager.Cc(),this.draggedParts=this.computeEffectiveCollection(a.selection,this.dragOptions),this.Sw=this.diagram.layout.isRealtime,this.diagram.layout.isRealtime=!1,a.Ns=!0,a.Gf("temporaryPixelRatio")===!0&&30<a.$w&&Os(a),Qg(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,Qo=this,ru=this.diagram,this.doSimulatedDragOut()))};function cf(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof tn?(a.draggedLink=y.first(),a.draggedLink.canRelinkFrom()&&a.draggedLink.canRelinkTo()&&a.draggedLink.Ej(),a.Oe=x.toolManager.findTool("Relinking"),a.Oe===null&&(a.Oe=new Ea,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}Rr.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},Rr.prototype.Pd=function(a){return a===void 0?new cA(Gr):this.isGridSnapEnabled?new cA(new Rt(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new cA(a.copy())},Rr.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),ju(this),mu(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<hA.count){for(var y=hA,x=y.length,E=0;E<x;E++){var b=y.M(E);eu(b),ml(b),ju(b),b.diagram.ug()}y.clear()}eu(this),this.tl.h(NaN,NaN),ru!==null&&(ru.currentCursor=""),Qo=ru=null,ml(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),Ph(a,!0)},Rr.prototype.stopTransaction=function(){var a=this.diagram,y=Ri.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function ju(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,od(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function ch(){var a=Qo;ml(a),Rl(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}Rr.prototype.doCancel=function(){ml(this),Rl(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},Rr.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},Rr.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function TA(a,y){if(a.copiedParts===null){var x=a.diagram;if((!y||!x.isReadOnly&&!x.isModelReadOnly)&&a.draggedParts!==null){var E=x.undoManager;for(E.isEnabled&&E.isInTransaction?E.currentTransaction!==null&&0<E.currentTransaction.changes.count&&(x.undoManager.Kf(),x.Ea("Drag")):Rl(a),x.skipsUndoManager=!y,x.partManager.addsToTemporaryLayer=!y,a.startPoint=x.firstInput.documentPoint,y=a.copiesEffectiveCollection?a.draggedParts.Lf():x.selection,y=x.Kj(y,x,!0),x=new Rn,E=a.draggedParts.iterator;E.next();){var b=E.key;if(b.Zc()&&b.canCopy()){var z=y.I(b);z!==null&&(z.location=b.location,z.Va(),x.add(z,a.Pd(z.location)))}}for(y=y.iterator;y.next();)E=y.value,E instanceof tn&&E.canCopy()&&x.add(E,a.Pd());a.copiedParts=x,cf(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,qh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function ml(a){var y=a.diagram;if(a.copiedParts!==null){if(y.Is(a.copiedParts.Lf(),!1),a.copiedParts=null,a.draggedParts!==null)for(var x=a.draggedParts.iterator;x.next();)x.key instanceof tn&&(x.value.point=new Rt(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function eu(a){if(a.draggedLink!==null){if(a.dragsLink&&a.Oe!==null){var y=a.Oe;y.diagram.remove(y.temporaryFromNode),y.diagram.remove(y.temporaryToNode),a.Oe.originalLink=null}a.draggedLink=null,a.Oe=null}}function Ol(a,y,x){var E=a.diagram,b=a.startPoint,z=Rt.alloc();z.assign(E.lastInput.documentPoint),a.moveParts(y,z.re(b),x),Rt.free(z),E.Gf("temporaryPixelRatio")===!0&&E.Yh===null&&30<E.$w&&(Os(E),E.hk())}Rr.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var E=this.diagram;E!==null&&qu(E,a,y,this.dragOptions,x)};function Rl(a){if(a.draggedParts!==null){for(var y=a.diagram,x=a.draggedParts.iterator;x.next();){var E=x.key;E.Zc()&&(E.location=x.value.point)}for(x=a.draggedParts.iterator;x.next();)if(E=x.key,E instanceof tn&&E.suspendsRouting){var b=x.value.point;a.draggedParts.add(E,a.Pd()),qh(E,-b.x,-b.y)}y.bd()}}function pf(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),nu(a,!1));var E=a.findDragOverObject(y),b=x.lastInput;b.targetObject=E,a.doUpdateCursor(E);var z=x.skipsUndoManager,tt=!1;try{if(x.skipsUndoManager=!0,tt=od(a,b,E),!a.isActive&&Qo===null)return;var rt=E!==null?E.part:null;if(rt===null||x.handlesDragDropForTopLevelParts&&rt.isTopLevel&&!(rt instanceof li)){var ot=x.mouseDragOver;ot!==null&&(ot(b),tt=!0)}if(!a.isActive&&Qo===null||(a.doDragOver(y,E),!a.isActive&&Qo===null))return}finally{x.skipsUndoManager=z,tt&&x.bd()}a.Bn=E,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(b.viewPoint)}Rr.prototype.findDragOverObject=function(a){var y=this;return gA(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof Wi||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},Rr.prototype.doUpdateCursor=function(a){var y=this.diagram;(a===null||this.Bn!==a)&&(!this.diagram.currentTool.isActive||this.mayCopy()?y.currentCursor=this.copyCursor:this.mayMove()?y.currentCursor=this.moveCursor:this.mayDragOut()&&(y.currentCursor=this.nodropCursor))};function od(a,y,x){var E=!1,b=a.Cg.length,z=0<b?a.Cg[0]:null;if(x===z)return!1;y.handled=!1;for(var tt=0;tt<b;tt++){var rt=a.Cg[tt],ot=rt.mouseDragLeave;if(ot!==null&&(ot(y,rt,x),E=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&Qo===null||x===null)return E;for(y.handled=!1,b=x;b!==null;)a.Cg.push(b),b=sd(b);for(b=a.Cg.length,x=0;x<b&&(tt=a.Cg[x],rt=tt.mouseDragEnter,rt===null||(rt(y,tt,z),E=!0,!y.handled));x++);return E}function sd(a){var y=a.panel;return y!==null?y:a instanceof jn&&!(a instanceof li)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function rc(a,y,x){var E=a.Oe;if(E===null)return null;var b=a.diagram.og(y,E.portGravity,function(at){return E.findValidLinkablePort(at,x)});a=Rt.alloc();var z=1/0,tt=null;for(b=b.iterator;b.next();){var rt=b.value;if(rt.part!==null){var ot=rt.ga(Xi,a);ot=y.Bf(ot),ot<z&&(tt=rt,z=ot)}}return Rt.free(a),tt}function nu(a,y){var x=a.draggedLink;if(x!==null&&!(2>x.pointsCount)){var E=a.diagram;if(!E.isReadOnly){var b=a.Oe;if(b!==null){var z=null,tt=null;x.fromNode===null&&(z=rc(a,x.i(0),!1),z!==null&&(tt=z.part));var rt=null,ot=null;x.toNode===null&&(rt=rc(a,x.i(x.pointsCount-1),!0),rt!==null&&(ot=rt.part)),b.isValidLink(tt,z,ot,rt)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=tt,z!==null&&(x.fromPortId=z.portId),x.toNode=ot,rt!==null&&(x.toPortId=rt.portId),x.fromPort!==E.Mx&&E.R("LinkRelinked",x,E.Mx),x.toPort!==E.Nx&&E.R("LinkRelinked",x,E.Nx)):mf(b,tt,z,ot,rt):mf(b,null,null,null,null)}}}}Rr.prototype.doDragOver=function(){};function iu(a,y){var x=a.diagram;a.dragsLink&&nu(a,!0),ju(a);var E=a.findDragOverObject(y),b=x.lastInput;if(b.targetObject=E,E!==null){b.handled=!1;for(var z=E;z!==null;){var tt=z.mouseDrop;if(tt!==null&&(tt(b,z),b.handled))break;Jc(a,b,z),z=sd(z)}}else z=x.mouseDrop,z!==null&&z(b);if(a.isActive||Qo!==null){for(b=(a.copiedParts||a.draggedParts).iterator;b.next();)z=b.key,z instanceof hn&&z.linksConnected.each(function(rt){rt.suspendsRouting=!1});if(a.doDropOnto(y,E),a.isActive||Qo!==null){for(a=Me.alloc(),y=x.selection.iterator;y.next();)E=y.value,E instanceof hn&&qc(x,E,a);Me.free(a)}}}function Jc(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof li||(x=a.mouseDrop,x!==null&&x(y))}function qc(a,y,x){var E=!1;if(x=y.getAvoidableRect(x),a.viewportBounds.Re(x)&&(E=!0),a=a.Nu(x,function(b){return b.part},function(b){return b instanceof tn},!0,function(b){return b instanceof tn},E),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}Rr.prototype.doDropOnto=function(){},Rr.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,y=a.lastInput;this.simulatedMouseMove(y.event,y.documentPoint,y.targetDiagram)||this.currentPart===null||this.draggedParts===null||(this.mayCopy()?(TA(this,!1),Qg(a,this.copiedParts),Ol(this,this.copiedParts,!1),mu(a,this.copiedParts)):this.mayMove()?(ml(this),Ol(this,this.draggedParts,!0)):this.mayDragOut()?(TA(this,!1),Ol(this,this.copiedParts,!1)):ml(this),pf(this,a.lastInput.documentPoint))}},Rr.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=a.lastInput;if(!this.simulatedMouseUp(y.event,y.documentPoint,y.targetDiagram)){y=!1;var x=this.mayCopy();if(x&&this.copiedParts!==null?(ml(this),TA(this,!0),Qg(a,this.copiedParts),Ol(this,this.copiedParts,!1),mu(a,this.copiedParts),this.copiedParts!==null&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0}))):(y=!0,ml(this),this.mayMove()&&(Ol(this,this.draggedParts,!0),pf(this,a.lastInput.documentPoint))),this.Ym=!0,iu(this,a.lastInput.documentPoint),this.isActive){var E=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&$c(this),a.Ya(),mu(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",E)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},Rr.prototype.simulatedMouseMove=function(a,y,x){if(Qo===null)return!1;var E=Qo.diagram;x instanceof ge||(x=null);var b=ru;return x!==b&&(b!==null&&b!==E&&(b.ug(),Qo.isDragOutStarted=!1,b=b.toolManager.findTool("Dragging"),b!==null&&b.doSimulatedDragLeave()),ru=x,x!==null&&x!==E&&(ch(),b=x.toolManager.findTool("Dragging"),b!==null&&(hA.contains(b)||hA.add(b),b.doSimulatedDragEnter())),this.doUpdateCursor(null)),x===null||x===E||!x.allowDrop||x.isReadOnly||!x.allowInsert?!1:(E=x.toolManager.findTool("Dragging"),E!==null&&(a!==null&&(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)),x.lastInput.documentPoint=y,x.lastInput.viewPoint=x.op(y),x.lastInput.down=!1,x.lastInput.up=!1,E.doSimulatedDragOver()),!0)},Rr.prototype.simulatedMouseUp=function(a,y,x){if(Qo===null)return!1;var E=ru,b=Qo.diagram;if(x===null)return Qo.doCancel(),!0;if(x!==E){var z=E.toolManager.findTool("Dragging");if(E!==null&&E!==b&&z!==null)return E.ug(),Qo.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;ru=x,E=x.toolManager.findTool("Dragging"),E!==null&&(ch(),hA.contains(E)||hA.add(E),E.doSimulatedDragEnter())}return x!==this.diagram?(a!==null?(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)):y===null&&(y=new Rt),x.lastInput.documentPoint=y,x.lastInput.viewPoint=x.op(y),x.lastInput.down=!1,x.lastInput.up=!0,a=x.toolManager.findTool("Dragging"),a!==null&&a.doSimulatedDrop(),a=Qo,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function $c(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof hn&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}Rr.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(Ji?!a.lastInput.alt:!a.lastInput.control))return!1;for(a=a.selection.iterator;a.next();)if(a.value.canCopy())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canCopy())},Rr.prototype.mayDragOut=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(!a.allowDragOut||!a.allowCopy||a.allowMove)return!1;for(a=a.selection.iterator;a.next();)if(a.value.canCopy())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canCopy())},Rr.prototype.mayMove=function(){var a=this.diagram;if(a.isReadOnly||!a.allowMove)return!1;for(a=a.selection.iterator;a.next();)if(a.value.canMove())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canMove())},Rr.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},Rr.prototype.Az=function(){return Qo},Rr.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=Qo;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},Rr.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),Ws(a),a.animationManager.Cc(),a=Qo,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},Rr.prototype.doSimulatedDragLeave=function(){var a=Qo;a!==null&&a.doSimulatedDragOut(),this.doCancel()},Rr.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=Qo;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;oc(this,y.draggedParts.Lf(),!1,a.firstInput),Ol(this,this.copiedParts,!1),pf(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},Rr.prototype.doSimulatedDrop=function(){var a=this.diagram,y=Qo;if(y!==null){var x=y.diagram;if(y.Ym=!0,ml(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),oc(this,y.draggedParts.Lf(),!0,a.lastInput),Ol(this,this.copiedParts,!1);var E=new Ye;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0,E.add(b)})),iu(this,a.lastInput.documentPoint),a.Ya(),this.copiedParts!==null&&(this.transactionResult="ExternalCopy"),this.copiedParts=null,a.doFocus(),a.R("ExternalObjectsDropped",E,x),this.stopTransaction(),a.R("ChangedSelection",a.selection)}a.animationManager.Dm=!1};function oc(a,y,x,E){if(a.copiedParts===null){var b=a.diagram;if(!b.isReadOnly&&!b.isModelReadOnly){b.skipsUndoManager=!x,b.partManager.addsToTemporaryLayer=!x,a.startPoint=E.documentPoint,x=b.Kj(y,b,!0);var z=Me.alloc();b=E=1/0;for(var tt=-1/0,rt=-1/0,ot=y.iterator;ot.next();){var at=ot.value;if(at.isVisible()){var At=at.location;at=At.x,At=At.y,isNaN(at)||isNaN(At)||(at<E&&(E=at),At<b&&(b=At),at>tt&&(tt=at),At>rt&&(rt=At))}}for(E===1/0?z.h(0,0,0,0):z.h(E,b,tt-E,rt-b),E=z.x+z.width/2,b=z.y+z.height/2,Me.free(z),z=a.Fr,tt=new Rn,rt=Rt.alloc(),ot=y.iterator;ot.next();)at=ot.value,at instanceof tn&&at.canCopy()&&(At=x.I(at),At!==null&&(At.points=at.points,qh(At,z.x-E,z.y-b),At.suspendsRouting=!0,tt.add(At,a.Pd())));for(y=y.iterator;y.next();)at=y.value,at.Zc()&&at.canCopy()&&(ot=x.I(at),ot!==null&&(at=at.location,rt.h(z.x-(E-at.x),z.y-(b-at.y)),ot.location=rt,ot.Va(),tt.add(ot,a.Pd(rt))));Rt.free(rt),a.copiedParts=tt,cf(a,tt.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,qh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}Rr.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},Rr.prototype.computeMove=function(a,y,x,E){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,E):new Rt},Ie.Object.defineProperties(Rr.prototype,{isCopyEnabled:{get:function(){return this.ob},set:function(a){this.ob=a}},copiesEffectiveCollection:{get:function(){return this.u},set:function(a){this.u=a}},dragOptions:{get:function(){return this.ia},set:function(a){this.ia=a}},isGridSnapEnabled:{get:function(){return this.dragOptions.isGridSnapEnabled},set:function(a){this.dragOptions.isGridSnapEnabled=a}},isComplexRoutingRealtime:{get:function(){return this.hb},set:function(a){this.hb=a}},isGridSnapRealtime:{get:function(){return this.dragOptions.isGridSnapRealtime},set:function(a){this.dragOptions.isGridSnapRealtime=a}},gridSnapCellSize:{get:function(){return this.dragOptions.gridSnapCellSize},set:function(a){this.dragOptions.gridSnapCellSize.D(a)||(a=a.J(),this.dragOptions.gridSnapCellSize=a)}},gridSnapCellSpot:{get:function(){return this.dragOptions.gridSnapCellSpot},set:function(a){this.dragOptions.gridSnapCellSpot.D(a)||(a=a.J(),this.dragOptions.gridSnapCellSpot=a)}},gridSnapOrigin:{get:function(){return this.dragOptions.gridSnapOrigin},set:function(a){this.dragOptions.gridSnapOrigin.D(a)||(a=a.J(),this.dragOptions.gridSnapOrigin=a)}},dragsLink:{get:function(){return this.dragOptions.dragsLink},set:function(a){this.dragOptions.dragsLink=a}},dragsTree:{get:function(){return this.dragOptions.dragsTree},set:function(a){this.dragOptions.dragsTree=a}},copyCursor:{get:function(){return this.F},set:function(a){this.F=a}},moveCursor:{get:function(){return this.Oc},set:function(a){this.Oc=a}},nodropCursor:{get:function(){return this.Pc},set:function(a){this.Pc=a}},currentPart:{get:function(){return this.V},set:function(a){this.V=a}},copiedParts:{get:function(){return this.o},set:function(a){this.o=a}},draggedParts:{get:function(){return this.Ha},set:function(a){this.Ha=a}},draggingParts:{get:function(){return this.copiedParts!==null?this.copiedParts.Lf():this.draggedParts!==null?this.draggedParts.Lf():this.te}},draggedLink:{get:function(){return this.diagram.draggedLink},set:function(a){this.diagram.draggedLink=a}},isDragOutStarted:{get:function(){return this.Hb},set:function(a){this.Hb=a}},startPoint:{get:function(){return this.Fr},set:function(a){this.Fr.D(a)||this.Fr.assign(a)}},delay:{get:function(){return this.Ik},set:function(a){this.Ik=a}}}),Rr.prototype.getDraggingSource=Rr.prototype.Az;var Qo=null,ru=null;Rr.className="DraggingTool",hA=new Ke,Te("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),br.prototype.doCancel=function(){Qo!==null&&Qo.doCancel(),Ri.prototype.doCancel.call(this)};function Jr(){Ri.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new tn,y=new yi;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new yi,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new hn,y=new yi,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Xr,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new hn,y=new yi,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Xr,a.add(y),a.selectable=!1,a.layerName="Tool",this.Di=a,this.o=y,this.Pc=this.Oc=this.ob=this.hb=this.Hb=null,this.ia=!0,this.hy=new Rn,this.Of=this.gj=this.Pf=null}ue(Jr,Ri),Jr.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},Jr.prototype.copyPortProperties=function(a,y,x,E,b){if(a!==null&&y!==null&&x!==null&&E!==null){var z=y.Df(),tt=an.alloc();tt.width=y.naturalBounds.width*z,tt.height=y.naturalBounds.height*z,E.desiredSize=tt,an.free(tt),b?(E.toSpot=y.toSpot,E.toEndSegmentLength=y.toEndSegmentLength):(E.fromSpot=y.fromSpot,E.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Xi,z=Rt.alloc(),x.location=y.ga(Xi,z),Rt.free(z),E.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,E,b)}},Jr.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=Xr,y.fromSpot=ts,y.toSpot=ts),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},Jr.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},Jr.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof hn){var y=this.targetPort.part;this.isForwards?this.copyPortProperties(y,this.targetPort,this.temporaryToNode,this.temporaryToPort,!0):this.copyPortProperties(y,this.targetPort,this.temporaryFromNode,this.temporaryFromPort,!1)}else this.isForwards?this.setNoTargetPortProperties(this.temporaryToNode,this.temporaryToPort,!0):this.setNoTargetPortProperties(this.temporaryFromNode,this.temporaryFromPort,!1);(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},Jr.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof hn))return null;for(;a!==null;){var E=y?a.toLinkable:a.fromLinkable;if(E===!0&&(a.portId!==null||a instanceof hn)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(E===!1)break;a=a.panel}return null},Jr.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,E=this.portGravity;0>=E&&(E=.1);var b=this,z=y.og(x,E,function(ft){return b.findValidLinkablePort(ft,a)},null,!0);for(E=1/0,y=null,z=z.iterator;z.next();){var tt=z.value,rt=tt.part;if(rt instanceof hn){var ot=tt.ga(Xi,Rt.alloc()),at=x.x-ot.x,At=x.y-ot.y;Rt.free(ot),ot=at*at+At*At,ot<E&&(at=this.validPortsCache.I(tt),at!==null?at&&(y=tt,E=ot):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,rt,tt)||!a&&this.isValidLink(rt,tt,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(tt,!0),y=tt,E=ot):this.validPortsCache.add(tt,!1))}}return y!==null&&(x=y.part,x instanceof hn&&(x.layer===null||x.layer.allowLink))?y:null},Jr.prototype.isValidFrom=function(a,y){if(a===null||y===null)return this.isUnconnectedLinkValid;if(this.diagram.currentTool===this&&(a.layer!==null&&!a.layer.allowLink||y.fromLinkable!==!0))return!1;var x=y.fromMaxLinks;if(1/0>x){if(this.originalLink!==null&&a===this.originalFromNode&&y===this.originalFromPort)return!0;if(y=y.portId,y===null&&(y=""),a.Mo(y).count>=x)return!1}return!0},Jr.prototype.isValidTo=function(a,y){if(a===null||y===null)return this.isUnconnectedLinkValid;if(this.diagram.currentTool===this&&(a.layer!==null&&!a.layer.allowLink||y.toLinkable!==!0))return!1;var x=y.toMaxLinks;if(1/0>x){if(this.originalLink!==null&&a===this.originalToNode&&y===this.originalToPort)return!0;if(y=y.portId,y===null&&(y=""),a.Sd(y).count>=x)return!1}return!0},Jr.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},Jr.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof hn))return!1;a=a.portId,a===null&&(a="");var E=y.part;if(!(E instanceof hn))return!1;for(y=y.portId,y===null&&(y=""),y=E.Sd(y);y.next();)if(E=y.value,E.fromNode===x&&E.fromPortId===a)return!0;return!1},Jr.prototype.isValidLink=function(a,y,x,E){if(!this.isValidFrom(a,y)||!this.isValidTo(x,E)||!(y===null||E===null||(y.fromLinkableSelfNode&&E.toLinkableSelfNode||!this.isInSameNode(y,E))&&(y.fromLinkableDuplicates&&E.toLinkableDuplicates||!this.isLinked(y,E)))||this.originalLink!==null&&(a!==null&&this.isLabelDependentOnLink(a,this.originalLink)||x!==null&&this.isLabelDependentOnLink(x,this.originalLink))||a!==null&&x!==null&&(a.data===null&&x.data!==null||a.data!==null&&x.data===null)||!this.isValidCycle(a,x,this.originalLink))return!1;if(a!==null){var b=a.linkValidation;if(b!==null&&!b(a,y,x,E,this.originalLink))return!1}return x!==null&&(b=x.linkValidation,b!==null&&!b(a,y,x,E,this.originalLink))?!1:(b=this.linkValidation,b!==null?b(a,y,x,E,this.originalLink):!0)},Jr.prototype.isLabelDependentOnLink=function(a,y){if(a===null)return!1;var x=a.labeledLink;if(x===null)return!1;if(x===y)return!0;var E=new Ye;return E.add(a),Bs(this,x,y,E)};function Bs(a,y,x,E){if(y===x)return!0;var b=y.fromNode;return b!==null&&b.isLinkLabel&&(E.add(b),Bs(a,b.labeledLink,x,E))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(E.add(y),Bs(a,y.labeledLink,x,E))))}Jr.prototype.isValidCycle=function(a,y,x){if(x===void 0&&(x=null),a===null||y===null)return this.isUnconnectedLinkValid;var E=this.diagram.validCycle;if(E!==Og){if(E===If){if(E=x||this.temporaryLink,E!==null&&!E.isTreeLink)return!0;for(E=y.linksConnected;E.next();){var b=E.value;if(b!==x&&b.isTreeLink&&b.toNode===y)return!1}return!Us(this,a,y,x,!0)}if(E===Ed){if(E=x||this.temporaryLink,E!==null&&!E.isTreeLink)return!0;for(E=a.linksConnected;E.next();)if(b=E.value,b!==x&&b.isTreeLink&&b.fromNode===a)return!1;return!Us(this,a,y,x,!0)}if(E===Ih)return a===y?a=!0:(E=new Ye,E.add(y),a=Is(this,E,a,y,x)),!a;if(E===Dh)return!Us(this,a,y,x,!1);if(E===Uf)return a===y?a=!0:(E=new Ye,E.add(y),a=ou(this,E,a,y,x)),!a}return!0};function Us(a,y,x,E,b){if(y===x)return!0;if(y===null||x===null)return!1;for(var z=y.linksConnected;z.next();){var tt=z.value;if(tt!==E&&(!b||tt.isTreeLink)&&tt.toNode===y&&(tt=tt.fromNode,tt!==y&&Us(a,tt,x,E,b)))return!0}return!1}function Is(a,y,x,E,b){if(x===E)return!0;if(x===null||E===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var tt=z.value;if(tt!==b&&tt.toNode===x&&(tt=tt.fromNode,tt!==x&&Is(a,y,tt,E,b)))return!0}return!1}function ou(a,y,x,E,b){if(x===E)return!0;if(x===null||E===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var tt=z.value;if(tt!==b){var rt=tt.fromNode;if(tt=tt.toNode,rt=rt===x?tt:rt,rt!==x&&ou(a,y,rt,E,b))return!0}}return!1}Ie.Object.defineProperties(Jr.prototype,{portGravity:{get:function(){return this.te},set:function(a){0<=a&&(this.te=a)}},isUnconnectedLinkValid:{get:function(){return this.Ha},set:function(a){this.Ha=a}},linkingCursor:{get:function(){return this.u},set:function(a){this.u=a}},temporaryLink:{get:function(){return this.Ci},set:function(a){this.Ci=a}},temporaryFromNode:{get:function(){return this.Bi},set:function(a){(this.Bi=a)&&(this.j=a.port)}},temporaryFromPort:{get:function(){return this.j},set:function(a){if(this.j!==null){var y=this.j.panel;if(y!==null){var x=y.O.indexOf(this.j);y.mb(x),y.Gb(x,a)}}this.j=a}},temporaryToNode:{get:function(){return this.Di},set:function(a){(this.Di=a)&&(this.o=a.port)}},temporaryToPort:{get:function(){return this.o},set:function(a){if(this.o!==null){var y=this.o.panel;if(y!==null){var x=y.O.indexOf(this.o);y.mb(x),y.Gb(x,a)}}this.o=a}},originalLink:{get:function(){return this.Hb},set:function(a){this.Hb=a}},originalFromNode:{get:function(){return this.hb},set:function(a){this.hb=a}},originalFromPort:{get:function(){return this.ob},set:function(a){this.ob=a}},originalToNode:{get:function(){return this.Oc},set:function(a){this.Oc=a}},originalToPort:{get:function(){return this.Pc},set:function(a){this.Pc=a}},isForwards:{get:function(){return this.ia},set:function(a){this.ia=a}},validPortsCache:{get:function(){return this.hy}},targetPort:{get:function(){return this.Pf},set:function(a){this.Pf=a}},linkValidation:{get:function(){return this.gj},set:function(a){this.gj=a}},portTargeted:{get:function(){return this.Of},set:function(a){this.Of=a}}}),Jr.className="LinkingBaseTool";function ms(){Jr.call(this),this.name="Linking",this.V={},this.F=null,this.K=Ku,this.Xd=null}ue(ms,Jr),ms.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return a.isReadOnly||a.isModelReadOnly||!a.allowLink||!a.model.xs()||!a.lastInput.left||a.currentTool!==this&&!this.isBeyondDragSize()?!1:this.findLinkablePort()!==null},ms.prototype.findLinkablePort=function(){var a=this.diagram,y=this.startObject;if(y===null&&(y=a.ic(a.firstInput.documentPoint,null,null)),y===null||(a=y.part,!(a instanceof hn)))return null;var x=this.direction;if(x===Ku||x===sc){var E=this.findValidLinkablePort(y,!1);if(E!==null||this.startObject===a&&(E=a.port,this.findValidLinkablePort(E,!1)))return this.isForwards=!0,E}return(x===Ku||x===ac)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},ms.prototype.doActivate=function(){var a=this.diagram,y=this.findLinkablePort();y===null?this.stopTool():(this.Ea(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.isForwards?(this.temporaryToNode!==null&&(this.temporaryToNode.location=a.lastInput.documentPoint),this.originalFromPort=y,y=this.originalFromPort.part,y instanceof hn&&(this.originalFromNode=y),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode,this.temporaryFromPort,!1)):(this.temporaryFromNode!==null&&(this.temporaryFromNode.location=a.lastInput.documentPoint),this.originalToPort=y,y=this.originalToPort.part,y instanceof hn&&(this.originalToNode=y),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0)),a.add(this.temporaryFromNode),this.temporaryFromNode&&this.temporaryFromNode.Va(),a.add(this.temporaryToNode),this.temporaryToNode&&this.temporaryToNode.Va(),this.temporaryLink!==null&&(this.temporaryFromNode!==null&&(this.temporaryLink.fromNode=this.temporaryFromNode),this.temporaryToNode!==null&&(this.temporaryLink.toNode=this.temporaryToNode),this.temporaryLink.isTreeLink=this.isNewTreeLink(),this.temporaryLink.bb(),a.add(this.temporaryLink)),this.isActive=!0)},ms.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;a.remove(this.temporaryLink),a.remove(this.temporaryFromNode),a.remove(this.temporaryToNode),a.isMouseCaptured=!1,a.currentCursor="",this.stopTransaction()},ms.prototype.doStop=function(){Jr.prototype.doStop.call(this),this.startObject=null},ms.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,E=null,b=null,z=null;try{var tt=this.targetPort=this.findTargetPort(this.isForwards);if(tt!==null){var rt=tt.part;rt instanceof hn&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),E=rt,b=tt):(y=rt,x=tt,this.originalToNode!==null&&(E=this.originalToNode,b=this.originalToPort)))}else this.isForwards?this.originalFromNode!==null&&this.isUnconnectedLinkValid&&(y=this.originalFromNode,x=this.originalFromPort):this.originalToNode!==null&&this.isUnconnectedLinkValid&&(E=this.originalToNode,b=this.originalToPort);y!==null||E!==null?(z=this.insertLink(y,x,E,b),z!==null?(tt===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),z.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",z)):this.doNoLink(y,x,E,b)):this.isForwards?this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),z&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},ms.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof tn)return a.isTreeLink;var y=this.diagram;return y===null?!0:(a=y.partManager.getLinkCategoryForData(a),y=y.partManager.findLinkTemplateForCategory(a),y!==null?y.isTreeLink:!0)},ms.prototype.insertLink=function(a,y,x,E){return this.diagram.partManager.insertLink(a,y,x,E)},ms.prototype.doNoLink=function(){},Ie.Object.defineProperties(ms.prototype,{archetypeLinkData:{get:function(){return this.V},set:function(a){this.V=a}},archetypeLabelNodeData:{get:function(){return this.F},set:function(a){this.F=a}},direction:{get:function(){return this.K},set:function(a){this.K=a}},startObject:{get:function(){return this.Xd},set:function(a){this.Xd=a}}});var Ku=new ce(ms,"Either",0),sc=new ce(ms,"ForwardsOnly",0),ac=new ce(ms,"BackwardsOnly",0);ms.className="LinkingTool",ms.Either=Ku,ms.ForwardsOnly=sc,ms.BackwardsOnly=ac;function Ea(){Jr.call(this),this.name="Relinking";var a=new yi;a.figure="Diamond",a.desiredSize=Ao,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new yi,a.figure="Diamond",a.desiredSize=Ao,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new Me}ue(Ea,Jr),Ea.prototype.updateAdornments=function(a){if(a!==null&&a instanceof tn){var y="RelinkFrom",x=null;if(a.isSelected&&!this.diagram.isReadOnly){var E=a.selectionObject;E!==null&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null&&(x=this.makeAdornment(E,!1),a.bh(y,x)))}x===null&&a.Jf(y),y="RelinkTo",x=null,a.isSelected&&!this.diagram.isReadOnly&&(E=a.selectionObject,E!==null&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null?(x=this.makeAdornment(E,!0),a.bh(y,x)):x.v())),x===null&&a.Jf(y)}},Ea.prototype.makeAdornment=function(a,y){var x=new Wi;return x.type=ze.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Ea.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowRelink||!a.model.xs()||!a.lastInput.left)return!1;var y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom");return y===null&&(y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo")),y!==null},Ea.prototype.doActivate=function(){var a=this.diagram;if(this.originalLink===null){var y=this.handle;if(y===null&&(y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom"),y===null&&(y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo"))),y===null)return;var x=y.part;if(!(x instanceof Wi&&x.adornedPart instanceof tn))return;this.handle=y,this.isForwards=x===null||x.category==="RelinkTo",this.originalLink=x.adornedPart}this.Ea(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.originalFromPort=this.originalLink.fromPort,this.originalFromNode=this.originalLink.fromNode,this.originalToPort=this.originalLink.toPort,this.originalToNode=this.originalLink.toNode,this.Ew.set(this.originalLink.actualBounds),this.originalLink!==null&&0<this.originalLink.pointsCount&&(this.originalLink.fromNode===null&&(this.temporaryFromPort!==null&&(this.temporaryFromPort.desiredSize=Nr),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=Nr),this.temporaryToNode!==null&&(this.temporaryToNode.location=this.originalLink.i(this.originalLink.pointsCount-1)))),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode,this.temporaryFromPort,!1),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0),a.add(this.temporaryFromNode),a.add(this.temporaryToNode),this.temporaryLink!==null&&(this.temporaryFromNode!==null&&(this.temporaryLink.fromNode=this.temporaryFromNode),this.temporaryToNode!==null&&(this.temporaryLink.toNode=this.temporaryToNode),this.copyLinkProperties(this.originalLink,this.temporaryLink),this.temporaryLink.bb(),a.add(this.temporaryLink)),this.isActive=!0},Ea.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===Lc||x===$h)&&(x=oa),y.curve=x,y.curviness=a.curviness,y.isTreeLink=a.isTreeLink,y.points=a.points,y.routing=a.routing,y.smoothness=a.smoothness,y.fromSpot=a.fromSpot,y.fromEndSegmentLength=a.fromEndSegmentLength,y.fromShortLength=a.fromShortLength,y.toSpot=a.toSpot,y.toEndSegmentLength=a.toEndSegmentLength,y.toShortLength=a.toShortLength}},Ea.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;a.remove(this.temporaryLink),a.remove(this.temporaryFromNode),a.remove(this.temporaryToNode),a.isMouseCaptured=!1,a.currentCursor="",this.stopTransaction()},Ea.prototype.doStop=function(){Jr.prototype.doStop.call(this),this.handle=null},Ea.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;this.transactionResult=null;var y=this.originalFromNode,x=this.originalFromPort,E=this.originalToNode,b=this.originalToPort,z=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var tt=this.targetPort.part;tt instanceof hn&&(this.isForwards?(E=tt,b=this.targetPort):(y=tt,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?b=E=null:x=y=null:z=null;z!==null?(this.reconnectLink(z,this.isForwards?E:y,this.isForwards?b:x,this.isForwards),this.targetPort===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint,z.bb()),this.transactionResult=this.name,a.R("LinkRelinked",z,this.isForwards?this.originalToPort:this.originalFromPort)):this.doNoRelink(this.originalLink,this.isForwards),this.originalLink.Xo(this.Ew)}finally{this.stopTool()}}},Ea.prototype.reconnectLink=function(a,y,x,E){return x=x!==null&&x.portId!==null?x.portId:"",E?(a.toNode=y,a.toPortId=x):(a.fromNode=y,a.fromPortId=x),!0},Ea.prototype.doNoRelink=function(){};function mf(a,y,x,E,b){y!==null?(a.copyPortProperties(y,x,a.temporaryFromNode,a.temporaryFromPort,!1),a.diagram.add(a.temporaryFromNode)):a.diagram.remove(a.temporaryFromNode),E!==null?(a.copyPortProperties(E,b,a.temporaryToNode,a.temporaryToPort,!0),a.diagram.add(a.temporaryToNode)):a.diagram.remove(a.temporaryToNode)}Ie.Object.defineProperties(Ea.prototype,{fromHandleArchetype:{get:function(){return this.V},set:function(a){this.V=a}},toHandleArchetype:{get:function(){return this.Xd},set:function(a){this.Xd=a}},handle:{get:function(){return this.F},set:function(a){if(a!==null&&!(a.part instanceof Wi))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),Ea.className="RelinkingTool",Te("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),Te("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function oo(){Ri.call(this),this.name="LinkReshaping";var a=new yi;a.figure="Rectangle",a.desiredSize=_o,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new yi,a.figure="Diamond",a.desiredSize=Ao,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new Rt,this.Yq=new Ke}ue(oo,Ri),oo.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:ad},oo.prototype.om=function(a,y){a.reshapingBehavior=y},oo.prototype.updateAdornments=function(a){if(a!==null&&a instanceof tn){var y=null;if(a.isSelected&&!this.diagram.isReadOnly){var x=a.path;x!==null&&a.canReshape()&&a.actualBounds.w()&&a.isVisible()&&x.actualBounds.w()&&x.Ed()&&(y=a.Pj(this.name),y===null||y.Aw!==a.pointsCount||y.Uw!==a.resegmentable)&&(y=this.makeAdornment(x),y!==null&&(y.Aw=a.pointsCount,y.Uw=a.resegmentable,a.bh(this.name,y)))}y===null&&a.Jf(this.name)}},oo.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,E=y.isOrthogonal,b=null;if(y.points!==null&&1<x){b=new Wi,b.type=ze.Link,x=y.firstPickIndex;var z=y.lastPickIndex,tt=E?1:0;if(y.resegmentable&&y.computeCurve()!==Al)for(var rt=x+tt;rt<z-tt;rt++){var ot=this.makeResegmentHandle(a,rt);ot!==null&&(ot.segmentIndex=rt,ot.segmentFraction=.5,ot.fromMaxLinks=999,b.add(ot))}for(tt=x+1;tt<z;tt++)if(rt=this.makeHandle(a,tt),rt!==null){if(rt.segmentIndex=tt,tt!==x)if(tt===x+1&&E){ot=y.i(x);var at=y.i(x+1);re.B(ot.x,at.x)&&re.B(ot.y,at.y)&&(at=y.i(x-1)),re.B(ot.x,at.x)?(this.om(rt,au),rt.cursor="n-resize"):re.B(ot.y,at.y)&&(this.om(rt,su),rt.cursor="w-resize")}else tt===z-1&&E?(ot=y.i(z-1),at=y.i(z),re.B(ot.x,at.x)&&re.B(ot.y,at.y)&&(ot=y.i(z+1)),re.B(ot.x,at.x)?(this.om(rt,au),rt.cursor="n-resize"):re.B(ot.y,at.y)&&(this.om(rt,su),rt.cursor="w-resize")):tt!==z&&(this.om(rt,vf),rt.cursor="move");b.add(rt)}b.adornedObject=a}return b},oo.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},oo.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},oo.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowReshape&&a.lastInput.left?this.findToolHandleAt(a.firstInput.documentPoint,this.name)!==null:!1},oo.prototype.doActivate=function(){var a=this.diagram;if(this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle!==null){var y=this.handle.part.adornedPart;if(y instanceof tn){if(this.Ts=y,a.isMouseCaptured=!0,this.Ea(this.name),y.resegmentable&&this.handle.fromMaxLinks===999){var x=y.points.copy(),E=this.getResegmentingPoint();if(x.Gb(this.handle.segmentIndex+1,E),y.isOrthogonal&&x.Gb(this.handle.segmentIndex+1,E),y.points=x,y.Wb(),y.updateAdornments(),this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name),this.handle===null){this.doDeactivate();return}}this.Fw=y.i(this.handle.segmentIndex),this.Yq=y.points.copy(),this.isActive=!0}}},oo.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},oo.prototype.stopTransaction=function(){var a=this.diagram,y=Ri.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},oo.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},oo.prototype.getResegmentingPoint=function(){return this.handle.ga(Xi)},oo.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},oo.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.computeReshape(a.lastInput.documentPoint);if(this.reshape(y),y=this.adornedLink,y!==null&&y.resegmentable){var x=this.handle.segmentIndex,E=y.i(x-1),b=y.i(x),z=y.i(x+1);if(y.isOrthogonal){if(x>y.firstPickIndex+1&&x<y.lastPickIndex-1){var tt=y.i(x-2);if(Math.abs(E.x-b.x)<this.resegmentingDistance&&Math.abs(E.y-b.y)<this.resegmentingDistance&&(Gl(this,tt,E,b,z,!0)||Gl(this,tt,E,b,z,!1))){var rt=y.points.copy();Gl(this,tt,E,b,z,!0)?(rt.cd(x-2,new Rt(tt.x,(z.y+tt.y)/2)),rt.cd(x+1,new Rt(z.x,(z.y+tt.y)/2))):(rt.cd(x-2,new Rt((z.x+tt.x)/2,tt.y)),rt.cd(x+1,new Rt((z.x+tt.x)/2,z.y))),rt.mb(x),rt.mb(x-1),y.points=rt,y.Wb()}else tt=y.i(x+2),Math.abs(b.x-z.x)<this.resegmentingDistance&&Math.abs(b.y-z.y)<this.resegmentingDistance&&(Gl(this,E,b,z,tt,!0)||Gl(this,E,b,z,tt,!1))&&(rt=y.points.copy(),Gl(this,E,b,z,tt,!0)?(rt.cd(x-1,new Rt(E.x,(E.y+tt.y)/2)),rt.cd(x+2,new Rt(tt.x,(E.y+tt.y)/2))):(rt.cd(x-1,new Rt((E.x+tt.x)/2,E.y)),rt.cd(x+2,new Rt((E.x+tt.x)/2,tt.y))),rt.mb(x+1),rt.mb(x),y.points=rt,y.Wb())}}else tt=Rt.alloc(),re.qh(E.x,E.y,z.x,z.y,b.x,b.y,tt)&&tt.Bf(b)<this.resegmentingDistance*this.resegmentingDistance&&(E=y.points.copy(),E.mb(x),y.points=E,y.Wb()),Rt.free(tt)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function Gl(a,y,x,E,b,z){return z?Math.abs(y.y-x.y)<a.resegmentingDistance&&Math.abs(x.y-E.y)<a.resegmentingDistance&&Math.abs(E.y-b.y)<a.resegmentingDistance:Math.abs(y.x-x.x)<a.resegmentingDistance&&Math.abs(x.x-E.x)<a.resegmentingDistance&&Math.abs(E.x-b.x)<a.resegmentingDistance}oo.prototype.reshape=function(a){var y=this.adornedLink;y.uh();var x=this.handle.segmentIndex,E=this.Ru(this.handle);if(y.isOrthogonal)if(x===y.firstPickIndex+1)x=y.firstPickIndex+1,E===au?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):E===su&&(y.L(x,a.x,y.i(x-1).y),y.L(x+1,a.x,y.i(x+2).y));else if(x===y.lastPickIndex-1)x=y.lastPickIndex-1,E===au?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):E===su&&(y.L(x-1,a.x,y.i(x-2).y),y.L(x,a.x,y.i(x+1).y));else{E=x;var b=y.i(E),z=y.i(E-1),tt=y.i(E+1);re.B(z.x,b.x)&&re.B(b.y,tt.y)?(re.B(z.x,y.i(E-2).x)&&!re.B(z.y,y.i(E-2).y)?(y.m(E,a.x,z.y),x++,E++):y.L(E-1,a.x,z.y),re.B(tt.y,y.i(E+2).y)&&!re.B(tt.x,y.i(E+2).x)?y.m(E+1,tt.x,a.y):y.L(E+1,tt.x,a.y)):re.B(z.y,b.y)&&re.B(b.x,tt.x)?(re.B(z.y,y.i(E-2).y)&&!re.B(z.x,y.i(E-2).x)?(y.m(E,z.x,a.y),x++,E++):y.L(E-1,z.x,a.y),re.B(tt.x,y.i(E+2).x)&&!re.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):re.B(z.x,b.x)&&re.B(b.x,tt.x)?(re.B(z.x,y.i(E-2).x)&&!re.B(z.y,y.i(E-2).y)?(y.m(E,a.x,z.y),x++,E++):y.L(E-1,a.x,z.y),re.B(tt.x,y.i(E+2).x)&&!re.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):re.B(z.y,b.y)&&re.B(b.y,tt.y)&&(re.B(z.y,y.i(E-2).y)&&!re.B(z.x,y.i(E-2).x)?(y.m(E,z.x,a.y),x++,E++):y.L(E-1,z.x,a.y),re.B(tt.y,y.i(E+2).y)&&!re.B(tt.x,y.i(E+2).x)?y.m(E+1,tt.x,a.y):y.L(E+1,tt.x,a.y)),y.L(x,a.x,a.y)}else y.L(x,a.x,a.y),E=y.fromNode,b=y.fromPort,E!==null&&(z=E.findVisibleNode(),z!==null&&z!==E&&(E=z,b=E.port)),x===1&&y.computeSpot(!0,b).Mc()&&(z=b.ga(Xi,Rt.alloc()),E=y.getLinkPointFromPoint(E,b,z,a,!0,Rt.alloc()),y.L(0,E.x,E.y),Rt.free(z),Rt.free(E)),E=y.toNode,b=y.toPort,E!==null&&(z=E.findVisibleNode(),z!==null&&z!==E&&(E=z,b=E.port)),x===y.pointsCount-2&&y.computeSpot(!1,b).Mc()&&(x=b.ga(Xi,Rt.alloc()),a=y.getLinkPointFromPoint(E,b,x,a,!1,Rt.alloc()),y.L(y.pointsCount-1,a.x,a.y),Rt.free(x),Rt.free(a));y.zf()},oo.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case vf:return a;case au:return new Rt(y.i(x).x,a.y);case su:return new Rt(a.x,y.i(x).y);default:case ad:return y.i(x)}},Ie.Object.defineProperties(oo.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},midHandleArchetype:{get:function(){return this.u},set:function(a){this.u=a}},handle:{get:function(){return this.j},set:function(a){if(a!==null&&!(a.part instanceof Wi))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedLink:{get:function(){return this.Ts}},resegmentingDistance:{get:function(){return this.F},set:function(a){this.F=a}},originalPoint:{get:function(){return this.Fw}},originalPoints:{get:function(){return this.Yq}}}),oo.prototype.setReshapingBehavior=oo.prototype.om,oo.prototype.getReshapingBehavior=oo.prototype.Ru;var ad=new ce(oo,"None",0),su=new ce(oo,"Horizontal",1),au=new ce(oo,"Vertical",2),vf=new ce(oo,"All",3);oo.className="LinkReshapingTool",oo.None=ad,oo.Horizontal=su,oo.Vertical=au,oo.All=vf,Te("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function vs(){Ri.call(this),this.name="Resizing",this.o=new an(1,1).freeze(),this.j=new an(9999,9999).freeze(),this.yg=new an(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new yi;a.alignmentFocus=Xi,a.figure="Rectangle",a.desiredSize=_o,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new Rt,this.Dw=new an,this.Tn=new Rt,this.rt=new an(0,0),this.qt=new an(1/0,1/0),this.pt=new an(1,1)}ue(vs,Ri),vs.prototype.updateAdornments=function(a){if(!(a===null||a instanceof tn)){if(a.isSelected&&!this.diagram.isReadOnly){var y=a.resizeObject,x=a.Pj(this.name);if(y!==null&&a.canResize()&&a.actualBounds.w()&&a.isVisible()&&y.actualBounds.w()&&y.Ed()&&((x===null||x.adornedObject!==y)&&(x=this.makeAdornment(y)),x!==null)){y=y.li(),Gg(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},vs.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new Wi,y.type=ze.Spot,y.locationSpot=Xi;var x=new ra;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,es)),y.add(this.makeHandle(a,Du)),y.add(this.makeHandle(a,Pa)),y.add(this.makeHandle(a,lA)),y.add(this.makeHandle(a,As)),y.add(this.makeHandle(a,jo)),y.add(this.makeHandle(a,Qs)),y.add(this.makeHandle(a,io))}else if(Tl(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},vs.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},vs.prototype.updateResizeHandles=function(a,y){if(a!==null){if(!a.alignment.Xb()&&(a.cursor==="pointer"||0<a.cursor.indexOf("resize")))t:{var x=a.alignment;if(x.Mc()&&(x=Xi),0>=x.x)y=0>=x.y?y+225:1<=x.y?y+135:y+180;else if(1<=x.x)0>=x.y?y+=315:1<=x.y&&(y+=45);else if(0>=x.y)y+=270;else if(1<=x.y)y+=90;else break t;0>y?y+=360:360<=y&&(y-=360),a.cursor=22.5>y?"e-resize":67.5>y?"se-resize":112.5>y?"s-resize":157.5>y?"sw-resize":202.5>y?"w-resize":247.5>y?"nw-resize":292.5>y?"n-resize":337.5>y?"ne-resize":"e-resize"}else if(a instanceof ze)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},vs.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowResize&&a.lastInput.left?this.findToolHandleAt(a.firstInput.documentPoint,this.name)!==null:!1},vs.prototype.doActivate=function(){var a=this.diagram;this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle!==null&&(this.adornedObject=this.handle.part.adornedObject,this.adornedObject!==null&&(a.isMouseCaptured=!0,a.animationManager.Cc(),this.Ea(this.name),this.Xq.set(this.adornedObject.ga(this.handle.alignment.gv())),this.Tn.set(this.adornedObject.part.location),this.Dw.set(this.adornedObject.desiredSize),this.pt=this.computeCellSize(),this.rt=this.computeMinSize(),this.qt=this.computeMaxSize(),this.isActive=!0))},vs.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},vs.prototype.stopTransaction=function(){var a=this.diagram,y=Ri.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},vs.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},vs.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,E=this.pt,b=this.adornedObject.qs(a.lastInput.documentPoint,Rt.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),a.bd(),Rt.free(b)}},vs.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,E=this.pt,b=this.adornedObject.qs(a.lastInput.documentPoint,Rt.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),Rt.free(b),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},vs.prototype.resize=function(a){var y=this.diagram,x=this.adornedObject;if(x!==null){if(x.desiredSize=a.size,a=x.part,a.Va(),x=x.ga(this.handle.alignment.gv()),a instanceof li){var E=new Ke;if(E.add(a),!this.dragsMembers&&a.placeholder===null){var b=new st;b.dragsMembers=!1}y.moveParts(E,this.oppositePoint.copy().re(x),!0,b)}else a.location=a.location.copy().re(x).add(this.oppositePoint);y.bd()}},vs.prototype.computeResize=function(a,y,x,E,b,z){y.Mc()&&(y=Xi);var tt=this.adornedObject.naturalBounds,rt=tt.x,ot=tt.y,at=tt.x+tt.width,At=tt.y+tt.height,ft=1;if(!z){ft=tt.width;var pt=tt.height;0>=ft&&(ft=1),0>=pt&&(pt=1),ft=pt/ft}return pt=Rt.alloc(),re.No(a.x,a.y,rt,ot,b.width,b.height,pt),a=tt.copy(),0>=y.x?0>=y.y?(a.x=Math.max(pt.x,at-E.width),a.x=Math.min(a.x,at-x.width),a.width=Math.max(at-a.x,x.width),a.y=Math.max(pt.y,At-E.height),a.y=Math.min(a.y,At-x.height),a.height=Math.max(At-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width),a.x=at-a.width,a.y=At-a.height)):1<=y.y?(a.x=Math.max(pt.x,at-E.width),a.x=Math.min(a.x,at-x.width),a.width=Math.max(at-a.x,x.width),a.height=Math.max(Math.min(pt.y-ot,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width),a.x=at-a.width)):(a.x=Math.max(pt.x,at-E.width),a.x=Math.min(a.x,at-x.width),a.width=at-a.x,z||(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft,a.y=ot+.5*(At-ot-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(pt.x-rt,E.width),x.width),a.y=Math.max(pt.y,At-E.height),a.y=Math.min(a.y,At-x.height),a.height=Math.max(At-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width),a.y=At-a.height)):1<=y.y?(a.width=Math.max(Math.min(pt.x-rt,E.width),x.width),a.height=Math.max(Math.min(pt.y-ot,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width))):(a.width=Math.max(Math.min(pt.x-rt,E.width),x.width),z||(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft,a.y=ot+.5*(At-ot-a.height))):0>=y.y?(a.y=Math.max(pt.y,At-E.height),a.y=Math.min(a.y,At-x.height),a.height=At-a.y,z||(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width,a.x=rt+.5*(at-rt-a.width))):1<=y.y&&(a.height=Math.max(Math.min(pt.y-ot,E.height),x.height),z||(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width,a.x=rt+.5*(at-rt-a.width))),Rt.free(pt),a},vs.prototype.computeReshape=function(){var a=Ge;return this.adornedObject instanceof yi&&(a=Om(this.adornedObject)),!(a===Fn||this.diagram.lastInput.shift)},vs.prototype.computeMinSize=function(){var a=this.adornedObject.minSize.copy(),y=this.minSize;return!isNaN(y.width)&&y.width>a.width&&(a.width=y.width),!isNaN(y.height)&&y.height>a.height&&(a.height=y.height),a},vs.prototype.computeMaxSize=function(){var a=this.adornedObject.maxSize.copy(),y=this.maxSize;return!isNaN(y.width)&&y.width<a.width&&(a.width=y.width),!isNaN(y.height)&&y.height<a.height&&(a.height=y.height),a},vs.prototype.computeCellSize=function(){var a=new an(NaN,NaN),y=this.adornedObject.part;return y!==null&&(y=y.resizeCellSize,!isNaN(y.width)&&0<y.width&&(a.width=y.width),!isNaN(y.height)&&0<y.height&&(a.height=y.height)),y=this.cellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height),y=this.diagram,(isNaN(a.width)||isNaN(a.height))&&y&&(y=y.grid,y!==null&&y.visible&&this.isGridSnapEnabled&&(y=y.gridCellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height))),(isNaN(a.width)||a.width===0||a.width===1/0)&&(a.width=1),(isNaN(a.height)||a.height===0||a.height===1/0)&&(a.height=1),a},Ie.Object.defineProperties(vs.prototype,{handleArchetype:{get:function(){return this.F},set:function(a){this.F=a}},handle:{get:function(){return this.u},set:function(a){if(a!==null&&!(a.part instanceof Wi))throw Error("new handle is not in an Adornment: "+a);this.u=a}},adornedObject:{get:function(){return this.ue},set:function(a){if(a!==null&&a.part instanceof Wi)throw Error("new handle must not be in an Adornment: "+a);this.ue=a}},minSize:{get:function(){return this.o},set:function(a){if(!this.o.D(a)){var y=a.width;isNaN(y)&&(y=0),a=a.height,isNaN(a)&&(a=0),this.o.h(y,a)}}},maxSize:{get:function(){return this.j},set:function(a){if(!this.j.D(a)){var y=a.width;isNaN(y)&&(y=1/0),a=a.height,isNaN(a)&&(a=1/0),this.j.h(y,a)}}},cellSize:{get:function(){return this.yg},set:function(a){this.yg.D(a)||this.yg.assign(a)}},isGridSnapEnabled:{get:function(){return this.V},set:function(a){this.V=a}},dragsMembers:{get:function(){return this.ia},set:function(a){this.ia=a}},oppositePoint:{get:function(){return this.Xq},set:function(a){this.Xq.D(a)||this.Xq.assign(a)}},originalDesiredSize:{get:function(){return this.Dw}},originalLocation:{get:function(){return this.Tn}}}),vs.className="ResizingTool",Te("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Ds(){Ri.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new Rt,this.ue=null;var a=new yi;a.figure="Ellipse",a.desiredSize=Ao,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new Rt(NaN,NaN),this.u=0,this.F=50}ue(Ds,Ri),Ds.prototype.updateAdornments=function(a){if(a!==null){if(a.ph()){var y=a.rotateObject;if(y===a||y===a.path||y.isPanelMain)return}if(a.isSelected&&!this.diagram.isReadOnly&&(y=a.rotateObject,y!==null&&a.canRotate()&&a.actualBounds.w()&&a.isVisible()&&y.actualBounds.w()&&y.Ed())){var x=a.Pj(this.name);if((x===null||x.adornedObject!==y)&&(x=this.makeAdornment(y)),x!==null){x.angle=y.li(),x.placeholder===null&&(x.location=this.computeAdornmentLocation(y)),a.bh(this.name,x);return}}a.Jf(this.name)}},Ds.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new Wi,y.type=ze.Position,y.locationSpot=Xi;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(Tl(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Ds.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowRotate&&a.lastInput.left?this.findToolHandleAt(a.firstInput.documentPoint,this.name)!==null:!1},Ds.prototype.doActivate=function(){var a=this.diagram;if(this.adornedObject===null){if(this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle===null)return;this.adornedObject=this.handle.part.adornedObject}this.adornedObject!==null&&(a.isMouseCaptured=!0,a.delaysLayout=!0,this.Ea(this.name),this.Cw=this.adornedObject.angle,this.kr=this.computeRotationPoint(this.adornedObject),this.Tn=this.adornedObject.part.location.copy(),this.isActive=!0)},Ds.prototype.computeRotationPoint=function(a){var y=a.part,x=y.locationObject;return y.rotationSpot.sb()?a.ga(y.rotationSpot):a===y||a===x?x.ga(y.locationSpot):a.ga(Xi)},Ds.prototype.computeAdornmentLocation=function(a){var y=this.rotationPoint;y.w()||(y=this.computeRotationPoint(a)),y=a.qs(y);var x=this.handleAngle;0>x?x+=360:360<=x&&(x-=360),x=Math.round(45*Math.round(x/45));var E=this.handleDistance;return x===0?y.x=a.naturalBounds.width+E:x===45?(y.x=a.naturalBounds.width+E,y.y=a.naturalBounds.height+E):x===90?y.y=a.naturalBounds.height+E:x===135?(y.x=-E,y.y=a.naturalBounds.height+E):x===180?y.x=-E:x===225?(y.x=-E,y.y=-E):x===270?y.y=-E:x===315&&(y.x=a.naturalBounds.width+E,y.y=-E),a.ga(y)},Ds.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new Rt(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Ds.prototype.stopTransaction=function(){var a=this.diagram,y=Ri.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ds.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Ds.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Ds.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){a.delaysLayout=!1;var y=this.computeRotate(a.lastInput.documentPoint);this.rotate(y),a.Ya(),this.transactionResult=this.name,a.R("PartRotated",this.adornedObject,this.originalAngle)}this.stopTool()},Ds.prototype.rotate=function(a){var y=this.adornedObject;if(y!==null){y.angle=a,y=y.part,y.Va();var x=y.locationObject,E=y.rotateObject;(x===E||x.rg(E))&&(x=this.Tn.copy(),y.location=x.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint)),this.diagram.bd()}},Ds.prototype.computeRotate=function(a){a=this.rotationPoint.ab(a)-this.handleAngle;var y=this.adornedObject.panel;y!==null&&(a-=y.li()),360<=a?a-=360:0>a&&(a+=360),y=Math.min(Math.abs(this.snapAngleMultiple),180);var x=Math.min(Math.abs(this.snapAngleEpsilon),y/2);return!this.diagram.lastInput.shift&&0<y&&0<x&&(a%y<x?a=Math.floor(a/y)*y:a%y>y-x&&(a=(Math.floor(a/y)+1)*y)),360<=a?a-=360:0>a&&(a+=360),a},Ie.Object.defineProperties(Ds.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},handle:{get:function(){return this.j},set:function(a){if(a!==null&&!(a.part instanceof Wi))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{get:function(){return this.ue},set:function(a){if(a!==null&&a.part instanceof Wi)throw Error("new handle must not be in an Adornment: "+a);this.ue=a}},snapAngleMultiple:{get:function(){return this.ia},set:function(a){this.ia=a}},snapAngleEpsilon:{get:function(){return this.V},set:function(a){this.V=a}},originalAngle:{get:function(){return this.Cw}},rotationPoint:{get:function(){return this.kr},set:function(a){this.kr=a.copy()}},handleAngle:{get:function(){return this.u},set:function(a){this.u=a}},handleDistance:{get:function(){return this.F},set:function(a){this.F=a}}}),Ds.className="RotatingTool",Te("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function zu(){Ri.call(this),this.name="ClickSelecting"}ue(zu,Ri),zu.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},zu.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},zu.className="ClickSelectingTool";function nl(){Ri.call(this),this.name="Action",this.pk=null}ue(nl,Ri),nl.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,y=a.lastInput,x=a.ic(y.documentPoint,function(E){for(;E.panel!==null&&!E.isActionable;)E=E.panel;return E});return x!==null&&x.isActionable?(this.pk=x,a.Ck=a.ic(y.documentPoint,null,null),!0):!1},nl.prototype.doMouseDown=function(){if(this.isActive){var a=this.diagram.lastInput,y=this.pk;y!==null&&(a.targetObject=y,y.actionDown!==null&&y.actionDown(a,y))}else this.canStart()&&this.doActivate()},nl.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram.lastInput,y=this.pk;y!==null&&(a.targetObject=y,y.actionMove!==null&&y.actionMove(a,y))}},nl.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram.lastInput,y=this.pk;if(y===null)return;a.targetObject=y,y.actionUp!==null&&y.actionUp(a,y),this.standardMouseClick(function(x){for(;x.panel!==null&&(!x.isActionable||x!==y);)x=x.panel;return x},function(x){return x===y})}this.stopTool()},nl.prototype.doCancel=function(){var a=this.diagram.lastInput,y=this.pk;y!==null&&(a.targetObject=y,y.actionCancel!==null&&y.actionCancel(a,y),this.stopTool())},nl.prototype.doStop=function(){this.pk=null},nl.className="ActionTool";function lu(){Ri.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Rt(0,0)}ue(lu,Ri),lu.prototype.canStart=function(){if(!this.isEnabled||this.archetypeNodeData===null)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.lastInput.left||this.isBeyondDragSize())return!1;if(this.isDoubleClick){if(a.lastInput.clickCount===1&&(this.mw=a.lastInput.viewPoint.copy()),a.lastInput.clickCount!==2||this.isBeyondDragSize(this.mw))return!1}else if(a.lastInput.clickCount!==1)return!1;return!(a.currentTool!==this&&a.Ol(a.lastInput.documentPoint,!0)!==null)},lu.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},lu.prototype.insertPart=function(a){var y=this.diagram,x=this.archetypeNodeData;if(x===null)return null;var E=null;try{if(y.R("ChangingSelection",y.selection),this.Ea(this.name),x instanceof jn)x.Zc()&&(Tl(x),E=x.copy(),E!==null&&y.add(E));else if(x!==null){var b=y.model.copyNodeData(x);on(b)&&(y.model.xf(b),E=y.Lc(b))}if(E!==null){var z=Rt.allocAt(a.x,a.y);this.isGridSnapEnabled&&Ng(this.diagram,E,a,z),E.location=z,y.allowSelect&&(y.clearSelection(!0),E.isSelected=!0),Rt.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",E)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return E},Ie.Object.defineProperties(lu.prototype,{archetypeNodeData:{get:function(){return this.Ri},set:function(a){this.Ri=a}},isDoubleClick:{get:function(){return this.o},set:function(a){this.o=a}},isGridSnapEnabled:{get:function(){return this.j},set:function(a){this.j=a}}}),lu.className="ClickCreatingTool";function za(){Ri.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new jn;a.layerName="Tool",a.selectable=!1;var y=new yi;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}ue(za,Ri),za.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(!a.allowSelect)return!1;var y=a.lastInput;return!(!y.left||a.currentTool!==this&&(!this.isBeyondDragSize()||y.timestamp-a.firstInput.timestamp<this.delay||a.Ol(y.documentPoint,!0)!==null))},za.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},za.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},za.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive&&this.box!==null){var y=this.computeBoxBounds(),x=this.box.fb("SHAPE");x===null&&(x=this.box.Pb());var E=an.alloc().h(y.width,y.height);x.desiredSize=E,this.box.mm(y.x,y.y,!1),an.free(E),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},za.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;a.remove(this.box);try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),this.selectInRect(this.computeBoxBounds()),a.R("ChangedSelection",a.selection)}finally{a.currentCursor=""}}this.stopTool()},za.prototype.computeBoxBounds=function(){var a=this.diagram;return new Me(a.firstInput.documentPoint,a.lastInput.documentPoint)},za.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),Ji?x.meta:x.control)if(x.shift)for(a=a.iterator;a.next();)y=a.value,y.isSelected&&(y.isSelected=!1);else for(a=a.iterator;a.next();)y=a.value,y.isSelected=!y.isSelected;else if(x.shift)for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0);else{for(x=new Ke,y=y.selection.iterator;y.next();){var E=y.value;a.contains(E)||x.add(E)}for(y=x.iterator;y.next();)y.value.isSelected=!1;for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0)}},Ie.Object.defineProperties(za.prototype,{delay:{get:function(){return this.Ik},set:function(a){this.Ik=a}},isPartialInclusion:{get:function(){return this.o},set:function(a){this.o=a}},box:{get:function(){return this.j},set:function(a){this.j=a}}}),za.className="DragSelectingTool";function hs(){Ri.call(this),this.name="Panning",this.Xt=new Rt,this.xy=new Rt,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(Fe.document,"scroll",a.Kw,!1),a.stopTool()}}ue(hs,Ri),hs.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!(!a.allowHorizontalScroll&&!a.allowVerticalScroll||!a.lastInput.left||a.currentTool!==this&&!this.isBeyondDragSize())},hs.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(Fe.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},hs.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},hs.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},hs.prototype.doMouseMove=function(){this.move()},hs.prototype.doMouseUp=function(){this.move(),this.stopTool()},hs.prototype.move=function(){var a=this.diagram;if(this.isActive&&a)if(this.xg)a.lastInput.bubbles=!0;else{var y=a.position,x=a.firstInput.documentPoint,E=a.lastInput.documentPoint,b=y.x+x.x-E.x;x=y.y+x.y-E.y,a.allowHorizontalScroll||(b=y.x),a.allowVerticalScroll||(x=y.y),a.position=this.xy.h(b,x)}},Ie.Object.defineProperties(hs.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),hs.className="PanningTool",Te("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),Te("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),Te("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),Te("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),Te("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function jl(){this.F=this.u=this.j=this.o=null}Ie.Object.defineProperties(jl.prototype,{mainElement:{get:function(){return this.u},set:function(a){this.u=a}},show:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},hide:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}},valueFunction:{get:function(){return this.F},set:function(a){this.F=a}}}),jl.className="HTMLInfo";function Va(a,y,x){this.text=a,this.hx=y,this.visible=x}Va.className="ContextMenuButtonInfo";function Hs(){Ri.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new Rt,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}ue(Hs,Ri);function vl(a){var y=new jl;y.show=function(b,z,tt){tt.showDefaultContextMenu()},y.hide=function(b,z){z.hideDefaultContextMenu()},uu=y,a.tu=function(){a.stopTool()},y=nn("div");var x=nn("div");y.style.cssText="top: 0px;z-index:10002;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",x.style.cssText="z-index:10001;position: fixed;display: none;top: 0;left: 0;width: 100%;height: 100%;background-color: black;opacity: 0.8;";var E=nn("style");Fe.document.getElementsByTagName("head")[0].appendChild(E),E.sheet.insertRule(".goCXul { list-style: none; }",0),E.sheet.insertRule(".goCXli {font:700 1.5em Helvetica, Arial, sans-serif;position: relative;min-width: 60px; }",0),E.sheet.insertRule(".goCXa {color: #444;display: inline-block;padding: 4px;text-decoration: none;margin: 2px;border: 1px solid gray;border-radius: 10px; }",0),E=a.diagram,E!==null&&(E.addEventListener(y,"contextmenu",so,!1),E.addEventListener(y,"selectstart",so,!1),E.addEventListener(x,"contextmenu",so,!1)),y.className="goCXforeground",x.className="goCXbackground",Fe.document.body&&(Fe.document.body.appendChild(y),Fe.document.body.appendChild(x)),wg=y,ph=x,yg=!0}function so(a){return a.preventDefault(),!1}Hs.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return this.isBeyondDragSize()||!a.lastInput.right||1<a.lastInput.clickCount?!1:!!(a.lastInput.isTouchEvent&&this.defaultTouchContextMenu!==null||this.findObjectWithContextMenu()!==null)},Hs.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},Hs.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},Hs.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,E=null;if(a instanceof ge||(a instanceof te?E=a:E=y.ic(x.documentPoint,null,function(b){return!b.layer.isTemporary})),E!==null){for(a=E;a!==null;){if(a.contextMenu!==null)return a;a=a.panel}if(y.lastInput.isTouchEvent&&this.defaultTouchContextMenu)return E.part}else if(y.contextMenu!==null)return y;return null},Hs.prototype.doActivate=function(){},Hs.prototype.doMouseDown=function(){if(Ri.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof Wi){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&Ma(this)},Hs.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof Wi){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}Ma(this)};function Ma(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var E=null;x instanceof jl||(E=y.ic(y.lastInput.documentPoint,null,null),E!==null&&E.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(E)}}else a.canStart()&&(NA(a,!0),a.isActive||a.stopTool())}Hs.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function NA(a,y,x){if(x===void 0&&(x=null),!a.Et&&(a.Et=!0,y&&a.standardMouseSelect(),y=a.standardMouseClick(),a.Et=!1,!y)){if(a.isActive=!0,y=uu,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var E=x.contextMenu;E!==null?(a.currentObject=x instanceof te?x:null,a.showContextMenu(E,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof Wi&&!a.currentContextMenu.visible&&a.stopTool()}}Hs.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},Hs.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof Wi){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category=this.name,a.placeholder!==null&&(a.placeholder.scale=x.scale);var E=a.diagram;E!==null&&E!==x&&E.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionContextMenu(a,y)}else a instanceof jl&&a.show(y,x,this);this.currentContextMenu=a},Hs.prototype.positionContextMenu=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),E=a.measuredBounds,b=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=E.width),x.x+E.width>b.right&&(x.x-=E.width+5/y.scale),x.x<b.x&&(x.x=b.x),x.y+E.height>b.bottom&&(x.y-=E.height+5/y.scale),x.y<b.y&&(x.y=b.y),a.position=x}},Hs.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof Wi?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof jl&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function Au(a){var y=new Ke;return y.add(new Va("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new Va("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new Va("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new Va("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new Va("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new Va("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new Va("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new Va("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new Va("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new Va("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new Va("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new Va("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new Va("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}Hs.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=Au(this)),wg.innerHTML="",ph.addEventListener("pointerdown",this.tu,!1);var y=this,x=nn("ul");x.className="goCXul",wg.appendChild(x),x.innerHTML="";for(var E=this.jt.iterator;E.next();){var b=E.value,z=b.visible;if(typeof b.hx=="function"&&(typeof z!="function"||z(a))){z=nn("li"),z.className="goCXli";var tt=nn("a");tt.className="goCXa",tt.href="#",tt.ky=b.hx,tt.addEventListener("pointerdown",function(rt){return this.ky(a),y.stopTool(),rt.preventDefault(),!1},!1),tt.textContent=b.text,z.appendChild(tt),x.appendChild(z)}}wg.style.display="block",ph.style.display="block"},Hs.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===uu){wg.style.display="none",ph.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(ph,"pointerdown",this.tu,!1),this.currentContextMenu=null}},Ie.Object.defineProperties(Hs.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof Wi?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return yg===!1&&uu===null&&jr&&vl(this),uu},set:function(a){a===null&&(yg=!0),uu=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var uu=null,yg=!1,ph=null,wg=null;Hs.className="ContextMenuTool",Te("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function Br(){Ri.call(this),this.name="TextEditing",this.Zh=new Sr,this.ia=null,this.V=mh,this.vj=null,this.qa=vh,this.u=1,this.F=!0,this.o=null,this.j=new jl,this.kt=null,Sg(this,this.j)}ue(Br,Ri);function Sg(a,y){if(jr){var x=nn("textarea");a.kt=x,x.addEventListener("input",function(){if(a.textBlock!==null){var E=a.Lx(this.value);this.style.width=20+E.measuredBounds.width*this.wA+"px",this.rows=E.lineCount}},!1),x.addEventListener("keydown",function(E){if(!E.isComposing&&a.textBlock!==null){var b=E.key;b==="Enter"?(a.textBlock.isMultiline===!1&&E.preventDefault(),a.acceptText(xg)):b==="Tab"?(a.acceptText(Cs),E.preventDefault()):b==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==vh){var E=a.kt;a.qa===yh&&(a.qa=Bg),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==vh){var E=a.kt;typeof E.focus=="function"&&E.focus(),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),y.valueFunction=function(){return x.value},y.mainElement=x,y.show=function(E,b,z){if(E instanceof Sr&&z instanceof Br)if(z.state===Cg)x.style.border="3px solid red",x.focus();else{var tt=E.ga(Xi),rt=b.position,ot=b.scale,at=E.Df()*ot;at<z.minimumEditorScale&&(at=z.minimumEditorScale);var At=E.naturalBounds.width*at+6,ft=E.naturalBounds.height*at+2,pt=(tt.x-rt.x)*ot;tt=(tt.y-rt.y)*ot,rt=E.verticalAlignment,ot=(E.lineHeight+E.spacingAbove+E.spacingBelow)*E.lineCount*at,ft=rt.y*ft-rt.y*ot+rt.offsetY-(.5*ft-.5*ot)-ot/2,x.value=E.text,b.div.style.font=E.font,x.style.position="absolute",x.style.zIndex="100",x.style.font="inherit",x.style.fontSize=100*at+"%",x.style.lineHeight="normal",x.style.width=At+"px",x.style.left=(pt-At/2|0)-1+"px",x.style.top=(tt+ft|0)-1+"px",x.style.textAlign=E.textAlign,x.style.margin="0",x.style.padding="1px",x.style.border="0",x.style.outline="none",x.style.whiteSpace="pre-wrap",x.style.overflow="hidden",x.rows=E.lineCount,x.wA=at,x.className="goTXarea",b.div.appendChild(x),x.focus(),z.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(E){E.div.removeChild(x)}}}Br.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||hu&&hu!==this&&(hu.acceptText(Kl),hu&&hu!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Sr&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===mh&&!y.isSelected||this.starting===wf&&2>a.lastInput.clickCount)):!1},Br.prototype.doStart=function(){hu=this,this.textBlock!==null&&this.doActivate()},Br.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(a!==null){var y=this.textBlock;if(y===null&&(y=a.ic(a.lastInput.documentPoint)),y!==null&&y instanceof Sr&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=yh;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var E=new Me(this.textBlock.ga(es),this.textBlock.ga(Pa));a.tv(E),x.show(y,a,this),this.currentTextEditor=x}}}},Br.prototype.doCancel=function(){this.stopTool()},Br.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},Br.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Kl)},Br.prototype.acceptText=function(a){switch(a){case Kl:this.qa===wh?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===yh||this.qa===Cg||this.qa===Bg)&&(this.qa=Ad,ld(this));break;case yf:case xg:case Cs:(xg!==a||this.textBlock.isMultiline!==!0)&&(this.qa===yh||this.qa===Cg||this.qa===Bg)&&(this.qa=Ad,ld(this))}};function ld(a){var y=a.textBlock,x=a.diagram,E=a.currentTextEditor;if(y!==null&&E!==null){var b=y.text,z="";E.valueFunction!==null&&(z=E.valueFunction()),a.isValidText(y,b,z)?(a.Ea(a.name),a.qa=wh,a.transactionResult=a.name,y.text=z,a.doSuccess(b,z),x!==null&&x.R("TextEdited",y,b),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=Cg,a.doError(b,z))}}Br.prototype.doError=function(a,y){var x=this.textBlock;x.errorFunction!==null&&x.errorFunction(this,a,y),(a=this.currentTextEditor)&&a.show(x,this.diagram,this)},Br.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},Br.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=vh,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},Br.prototype.doStop=function(){hu=null},Br.prototype.isValidText=function(a,y,x){var E=this.textValidation;return E!==null&&!E(a,y,x)?!1:(E=a.textValidation,!!(E===null||E(a,y,x)))},Br.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Ie.Object.defineProperties(Br.prototype,{textBlock:{get:function(){return this.ia},set:function(a){this.ia=a}},currentTextEditor:{get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{get:function(){return this.j},set:function(a){this.j=a}},starting:{get:function(){return this.V},set:function(a){this.V=a}},textValidation:{get:function(){return this.vj},set:function(a){this.vj=a}},minimumEditorScale:{get:function(){return this.u},set:function(a){this.u=a}},selectsTextOnActivate:{get:function(){return this.F},set:function(a){this.F=a}},state:{get:function(){return this.qa},set:function(a){this.qa!==a&&(this.qa=a)}}}),Br.prototype.measureTemporaryTextBlock=Br.prototype.Lx;var yf=new ce(Br,"LostFocus",0),Kl=new ce(Br,"MouseDown",1),Cs=new ce(Br,"Tab",2),xg=new ce(Br,"Enter",3),tp=new ce(Br,"SingleClick",0),mh=new ce(Br,"SingleClickSelected",1),wf=new ce(Br,"DoubleClick",2),vh=new ce(Br,"StateNone",0),yh=new ce(Br,"StateActive",1),Bg=new ce(Br,"StateEditing",2),Ad=new ce(Br,"StateValidating",3),Cg=new ce(Br,"StateInvalid",4),wh=new ce(Br,"StateValidated",5),hu=null;Br.className="TextEditingTool",Br.LostFocus=yf,Br.MouseDown=Kl,Br.Tab=Cs,Br.Enter=xg,Br.SingleClick=tp,Br.SingleClickSelected=mh,Br.DoubleClick=wf,Br.StateNone=vh,Br.StateActive=yh,Br.StateEditing=Bg,Br.StateValidating=Ad,Br.StateInvalid=Cg,Br.StateValidated=wh,Te("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function pa(a){_u||(ud(),_u=!0),this.H=Yl,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=_l,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new Ye,this.ce=new gs,this.ce.Yd=this,this.Ei=new Ye,this.pu=new Ye,this.Sr=new Ye,this.pr=new Ye,a&&Object.assign(this,a)}pa.prototype.Xe=function(a){this.H=a},pa.prototype.canStart=function(){return!0};function zl(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),fs(a.H),a.zb=!0)}function Gi(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,E=a.Zd.contains("Model");E&&(a.Ok=!0,a.Pk===_l?(y.isViewportUnconstrained=!0,y.vc.clear(),y.add(x,"position",x.position.copy().offset(0,-200),x.position),y.add(x,"opacity",0,1)):a.Pk===xf&&y.vc.clear(),a.Qw=!!(a.Pk===Pg&&x.du.D(x.pa)),x.R("InitialAnimationStarting",a)),E&&!a.Gh||y.vc.count===0?(a.Zd.clear(),a.zb=!1,y.vc.clear(),Yu(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,E=y.vc.get(x),x.autoScale!==ws&&E!==null&&(delete E.start.scale,delete E.end.scale),Fe.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Os(x),Lf(x),a.zb=!1,y.start(),y.bc&&(gu(a),x.Ya(),hd(y,0),Ws(x,!0),fu(a),x.R("AnimationStarting",a)))}))}}function QA(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function Sf(a,y,x,E){a.isTicking||QA(a)||y instanceof tn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,E,!1)}Bt=pa.prototype,Bt.fv=function(a){return this.ce.fv(a)},Bt.Xu=function(a){return this.ce.Xu(a)};function Sh(a,y){function x(){if(0<b.Sr.count&&(E.addAll(b.Sr),b.Sr.clear(),b.bc=!0),b.bc!==!1&&E.count!==0){b.pu.addAll(E);for(var z=b.pu.iterator;z.next();){var tt=z.value;if(tt.bc!==!1){t:if(0<tt.yl.count)var rt=!0;else{for(rt=tt.vc.iterator;rt.next();){var ot=rt.key;if(ot instanceof te&&ot.diagram!==null||ot instanceof ge){rt=!0;break t}}rt=!1}rt?Fg(tt,!1):tt.Xk=!0}}b.pu.clear(),b.bc!==!1&&(gu(b),Ws(b.H),fu(b)),Fe.requestAnimationFrame(x)}}var E=a.Ei,b=a;a.bc?a.Sr.add(y):(a.bc=!0,E.add(y),Fe.requestAnimationFrame(function(){x()}))}function Vl(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function gu(a){if(!a.vq){var y=a.H;a.Ow=y.skipsUndoManager,a.cw=y.skipsModelSourceBindings,y.skipsUndoManager=!0,y.skipsModelSourceBindings=!0,a.vq=!0}}function fu(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}Bt.Cc=function(a){var y=this.ce;if(this.zb===!0&&(this.Ok=this.zb=!1,this.Zd.clear(),0<y.vc.count&&this.H.$b()),this.bc){if(y.Ml(!0),y.vc.clear(),Yu(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),Yu(y,this.H)},Bt.Ml=function(a){a===this.defaultAnimation&&this.defaultAnimation.vc.clear(),this.Ei.remove(a),this.Ei.count===0&&(this.bc=!1,this.H.$b()),a===this.defaultAnimation&&(this.defaultAnimation.vc.clear(),this.H.R("AnimationFinished",this))},Bt.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),ea(this,a))},Bt.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),du(this.ce,y,"position",y.position,y.position),ea(this,a))};function xh(a,y,x){!a.zb||y.D(x)||QA(a)||(a.H.pi||(y=x.copy()),du(a.ce,a.H,"position",y,x))}function Vu(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function ea(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function Wu(a,y,x,E,b){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var z=a[0],tt=a[1],rt=a[2];a=a[3];var ot=y[0],at=y[1],At=y[2];return y=y[3],rt===0||rt===100?(z=ot,tt=at):(At===0||At===100)&&(ot=z,at=tt),180<Math.abs(ot-z)&&(ot>z?z+=360:ot+=360),z=b(x,z,ot-z,E)%360,tt=b(x,tt,at-tt,E),rt=b(x,rt,At-rt,E),x=b(x,a,y-a,E),"hsla("+z+", "+tt+"%, "+rt+"%, "+x+")"}function ud(){function a(x,E,b,z,tt,rt){x.position=new Rt(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}var y=new Rn;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,E,b,z,tt,rt){tt<rt?x.mm(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt),!1):x.position=new Rt(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}),y.add("location",function(x,E,b,z,tt,rt){tt<rt?x.mm(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt),!0):x.location=new Rt(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}),y.add("position:placeholder",function(x,E,b,z,tt,rt){tt<rt?x.mm(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt),!1):x.position=new Rt(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}),y.add("position:nodeCollapse",function(x,E,b,z,tt,rt){var ot=x.actualBounds,at=b.actualBounds;b=at.x+at.width/2-ot.width/2,ot=at.y+at.height/2-ot.height/2,tt<rt?x.mm(z(tt,E.x,b-E.x,rt),z(tt,E.y,ot-E.y,rt),!1):x.position=new Rt(z(tt,E.x,b-E.x,rt),z(tt,E.y,ot-E.y,rt))}),y.add("desiredSize",function(x,E,b,z,tt,rt){x.desiredSize=new Me(z(tt,E.width,b.width-E.width,rt),z(tt,E.height,b.height-E.height,rt))}),y.add("width",function(x,E,b,z,tt,rt){x.width=z(tt,E,b-E,rt)}),y.add("height",function(x,E,b,z,tt,rt){x.height=z(tt,E,b-E,rt)}),y.add("fill",function(x,E,b,z,tt,rt){x.fill=Wu(E,b,tt,rt,z)}),y.add("stroke",function(x,E,b,z,tt,rt){x.stroke=Wu(E,b,tt,rt,z)}),y.add("strokeWidth",function(x,E,b,z,tt,rt){x.strokeWidth=z(tt,E,b-E,rt)}),y.add("strokeDashOffset",function(x,E,b,z,tt,rt){x.strokeDashOffset=z(tt,E,b-E,rt)}),y.add("background",function(x,E,b,z,tt,rt){x.background=Wu(E,b,tt,rt,z)}),y.add("areaBackground",function(x,E,b,z,tt,rt){x.areaBackground=Wu(E,b,tt,rt,z)}),y.add("opacity",function(x,E,b,z,tt,rt){x.opacity=z(tt,E,b-E,rt)}),y.add("scale",function(x,E,b,z,tt,rt){x.scale=z(tt,E,b-E,rt)}),y.add("angle",function(x,E,b,z,tt,rt){x.angle=z(tt,E,b-E,rt)}),Wl=y}Ie.Object.defineProperties(pa.prototype,{animationReasons:{get:function(){return this.Zd}},isEnabled:{get:function(){return this.Jd},set:function(a){(this.Jd=a)&&this.Ei.each(function(y){y.isAnimating||y.runCount!==1/0||y.start()})}},duration:{get:function(){return this.Dg},set:function(a){1>a&&pi(a,">= 1",pa,"duration"),this.Dg=a}},isAnimating:{get:function(){return this.bc}},isTicking:{get:function(){return this.vq}},isInitial:{get:function(){return this.Gh},set:function(a){this.Gh=a}},defaultAnimation:{get:function(){return this.ce}},activeAnimations:{get:function(){return this.Ei}},initialAnimationStyle:{get:function(){return this.Pk},set:function(a){this.Pk=a}}}),pa.prototype.stopAnimation=pa.prototype.Cc;var Wl=null,_u=!1,_l=new ce(pa,"Default",1),Pg=new ce(pa,"AnimateLocations",2),xf=new ce(pa,"None",3);pa.className="AnimationManager",pa.defineAnimationEffect=function(a,y){_u||(ud(),_u=!0),Wl.add(a,y)},pa.Default=_l,pa.AnimateLocations=Pg,pa.None=xf;function gs(a){this.vu=this.Nw=this.Yd=this.H=null,this.Xk=this.bc=this.j=!1,this.cn=this.Qd=0,this.Lp=this.ot=Bh,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=Gr,this.vc=new Rn,this.Tt=new Rn,this.yl=new Ye,this.Ut=new Ye,this.dw=DA,a&&Object.assign(this,a)}gs.prototype.suspend=function(){this.Xk=!0},gs.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,Fg(this,!0),gu(this.Yd),Ws(this.H),fu(this.Yd),this.H.redraw()};function Yu(a,y){if(a.Tt.clear(),a.Wk=!1,a.au=0,a.Gd=NaN,0<a.yl.count&&a.yl.clear(),0<a.Ut.count&&a.Ut.clear(),y!==null)for(a=y.links;a.next();)a.value.Tg=null}Bt=gs.prototype,Bt.start=function(){if(this.vc.count===0||this.bc)return this;for(var a=this.H,y=this.vc.iterator;y.next();){var x=y.key;a===null&&(x instanceof ge?a=x:x instanceof te&&(a=x.diagram))}if(a!==null)this.H=a,this.Yd=a.animationManager;else return this;return y=this.Yd,y.isEnabled===!1?this:(this.Gd=isNaN(this.Dg)?y.duration:this.Dg,this.Lp=this.ot,y.Ok&&y.Pk===_l&&this===y.defaultAnimation&&(this.Lp=lc,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=Hh),gu(y),this.yl.each(function(E){E.data=null,a.add(E)}),fu(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,Sh(y,this),this)},Bt.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},Bt.add=function(a,y,x,E,b){if(y==="position"&&x.Xa(E))return this;if(this.H===null&&(a instanceof ge?this.H=a:a instanceof te&&a.diagram!==null&&(this.H=a.diagram)),a instanceof jn){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return du(this,a,y,x,E,b),this};function du(a,y,x,E,b,z){var tt=a.vc;if(y instanceof ge&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(GA(E),np(),E=[_e.j,_e.u,_e.o,_e.F],GA(b),np(),b=[_e.j,_e.u,_e.o,_e.F]),tt.contains(y)){var rt=tt.I(y),ot=rt.start,at=rt.end;ot[x]===void 0&&(ot[x]=Xu(E)),at[x]=Xu(b)}else ot={},at={},ot[x]=Xu(E),at[x]=Xu(b),rt=ot.position,y instanceof te&&rt instanceof Rt&&!rt.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&rt.assign(at.position),rt=new Zu(ot,at,z),tt.add(y,rt);tt=ot[x],tt instanceof Rt&&!tt.w()&&tt.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof jn?rt.Ku.location=Xu(y.location):z&&(rt.Ku[x]=Xu(E))}function Xu(a){return a instanceof Rt||a instanceof an?a.copy():a}Bt.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},Bt.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function Fg(a,y){if(!a.Xk||y){var x=a.Yd;if(a.bc!==!1){var E=+new Date,b=E>a.cn?a.Gd:E-a.Qd;y&&(b=a.gw,b<a.Gd?(a.Qd=+new Date-b,a.cn=a.Qd+a.Gd):b=a.Gd),gu(x),hd(a,b),Ws(a.H,!0),fu(x),E>a.cn&&(a.ho&&!a.Wk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Wk=!0):a.Ml(!1))}}}function hd(a,y){for(var x=a.Gd,E=a.vc.iterator,b=a.Wk;E.next();){var z=E.key;if(!(z instanceof te&&z.diagram===null)){var tt=E.value,rt=b?tt.end:tt.start;tt=b?tt.start:tt.end;var ot=Wl,at;for(at in tt)at==="position"&&(tt["position:placeholder"]||tt["position:nodeCollapse"])||ot.get(at)===null||ot.get(at)(z,rt[at],tt[at],a.Lp,y,x,a)}}}Bt.stop=function(){return this.bc?(this.Ml(!0),this):this},Bt.Ml=function(a){if(this.vu!==null&&this.vu.jo.remove(this.Nw),this.bc){var y=this.H,x=this.Yd;this.Xk=this.bc=x.Ok=!1,gu(x);for(var E=this.vc,b=this.yl.iterator;b.next();)y.remove(b.value);for(b=this.Ut.iterator;b.next();)b.value.v();b=this.ho,E=E.iterator;for(var z=Wl;E.next();){var tt=E.key,rt=E.value,ot=b?rt.end:rt.start,at=b?rt.start:rt.end,At=rt.Ku,ft;for(ft in at)if(z.get(ft)!==null){var pt=ft;!rt.Hu||pt!=="position:nodeCollapse"&&pt!=="position:placeholder"||(pt="position"),z.get(pt)(tt,ot[ft],At[ft]!==void 0?At[ft]:rt.Hu?ot[ft]:at[ft],this.Lp,this.Gd,this.Gd,this)}rt.Hu&&At.location!==void 0&&tt instanceof jn&&(tt.location=At.location),rt.nv&&tt instanceof jn&&tt.Zb(!1)}if(y.As.clear(),Ph(y,!1),y.Ya(),y.N(),Ws(y,!0),x.defaultAnimation===this){for(ft=x.pr.iterator;ft.next();)b=ft.value,b.Tg!==null&&(b.points=b.Tg,b.Tg=null);x.pr.clear()}Ws(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),fu(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),Yu(this,null),x.Ml(this),y.$b())}},Bt.Cj=function(a,y){var x=y.actualBounds,E=null;if(y instanceof li&&(E=y.placeholder),E!==null?(x=E.ga(es),E=E.padding,x.x+=E.left,x.y+=E.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new Rt(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof li)for(a=a.memberParts;a.next();)E=a.value,E instanceof hn&&this.Cj(E,y)},Bt.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof li&&(x=y.placeholder),x!==null){var E=x.ga(es);x=x.padding,E.x+=x.left,E.y+=x.top,this.add(a,"position:placeholder",a.position,E,!0)}else this.add(a,"position:nodeCollapse",a.position,y,!0);if(this.add(a,"scale",a.scale,.01,!0),E=this.vc,E.contains(a)&&(E.I(a).nv=!0),a instanceof li)for(a=a.memberParts;a.next();)E=a.value,E instanceof hn&&this.Aj(E,y)}},Bt.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},Ie.Object.defineProperties(gs.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&pi(a,">= 1",gs,"duration"),this.Dg=a}},reversible:{get:function(){return this.ho},set:function(a){this.ho=a}},runCount:{get:function(){return this.cu},set:function(a){0<a?this.cu=a:pe("Animation.runCount value must be a positive integer.")}},finished:{get:function(){return this.dn},set:function(a){this.dn!==a&&(this.dn=a)}},easing:{get:function(){return this.ot},set:function(a){this.ot=a}},isViewportUnconstrained:{get:function(){return this.j},set:function(a){this.j=a}},isAnimating:{get:function(){return this.bc}}}),gs.prototype.getTemporaryState=gs.prototype.Ez,gs.prototype.stop=gs.prototype.stop,gs.prototype.add=gs.prototype.add,gs.prototype.addTemporaryPart=gs.prototype.Iy;function Bh(a,y,x,E){return a/=E/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function lc(a,y,x,E){return a===E?y+x:x*(-Math.pow(2,-10*a/E)+1)+y}gs.className="Animation",gs.EaseLinear=function(a,y,x,E){return x*a/E+y},gs.EaseInOutQuad=Bh,gs.EaseInQuad=function(a,y,x,E){return x*(a/=E)*a+y},gs.EaseOutQuad=function(a,y,x,E){return-x*(a/=E)*(a-2)+y},gs.EaseInExpo=function(a,y,x,E){return a===0?y:x*Math.pow(2,10*(a/E-1))+y},gs.EaseOutExpo=lc;function Zu(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}Zu.className="AnimationState";function yl(a,y,x){this.xd=null,this.rf=a,this.so=x||fd,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=Ju))}yl.prototype.copy=function(){var a=new yl(this.rf);a.so=this.so;var y=this.uk;if(y!==null){var x={};y.duration!==void 0&&(x.duration=y.duration),y.finished!==void 0&&(x.finished=y.finished),y.easing!==void 0&&(x.easing=y.easing),a.uk=x}return a};function gd(a,y){a=a.uk,a!==null&&(a.duration&&(y.duration=a.duration),a.finished&&(y.finished=a.finished),a.easing&&(y.easing=a.easing))}Ie.Object.defineProperties(yl.prototype,{propertyName:{get:function(){return this.rf},set:function(a){this.rf=a}},animationSettings:{get:function(){return this.uk},set:function(a){this.uk=a}},startCondition:{get:function(){return this.so},set:function(a){this.so=a}}});var fd=new ce(yl,"Default",1),Ju=new ce(yl,"Immediate",2),Ch=new ce(yl,"Bundled",3);yl.className="AnimationTrigger",yl.Default=fd,yl.Immediate=Ju,yl.Bundled=Ch;function Vo(a){rr(this),this.H=null,this.Pa=new Ke,this.xa="",this.pb=1,this.o=!1,this.j=this.Uh=this.u=this.Oi=this.Ni=this.Mi=this.Li=this.Ji=this.Ki=this.Ii=this.Qi=this.Hi=this.Pi=this.Gi=this.Fi=!0,this.Zq=[],a&&Object.assign(this,a)}Bt=Vo.prototype,Bt.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,vi(x)}a.clear(),this.Zq.length=0},Bt.Xe=function(a){this.H=a},Bt.toString=function(a){a===void 0&&(a=0);var y='Layer "'+this.name+'"';if(0>=a)return y;for(var x=0,E=0,b=0,z=0,tt=0,rt=this.Pa.iterator;rt.next();){var ot=rt.value;ot instanceof li?b++:ot instanceof hn?E++:ot instanceof tn?z++:ot instanceof Wi?tt++:x++}if(rt="",0<x&&(rt+=x+" Parts "),0<E&&(rt+=E+" Nodes "),0<b&&(rt+=b+" Groups "),0<z&&(rt+=z+" Links "),0<tt&&(rt+=tt+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,rt+=`
`+x.toString(),E=x.data,E!==null&&gr(E)&&(rt+=" #"+gr(E)),x instanceof hn?rt+=" "+En(E):x instanceof tn&&(rt+=" "+En(x.fromNode)+" "+En(x.toNode));return y+" "+this.Pa.count+": "+rt},Bt.ic=function(a,y,x){if(y===void 0&&(y=null),x===void 0&&(x=null),this.Uh===!1)return null;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var b=Rt.alloc(),z=this.Pa.s,tt=z.length;tt--;){var rt=z[tt];if((E!==!0||Gg(rt)!==!1)&&rt.isVisible()&&(b.assign(a),_r(b,rt.oe),rt=rt.ic(b,y,x),rt!==null&&(y!==null&&(rt=y(rt)),rt!==null&&(x===null||x(rt)))))return Rt.free(b),rt}return Rt.free(b),null},Bt.ji=function(a,y,x,E){if(y===void 0&&(y=null),x===void 0&&(x=null),E instanceof Ke||E instanceof Ye||(E=new Ye),this.Uh===!1)return E;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var z=Rt.alloc(),tt=this.Pa.s,rt=tt.length;rt--;){var ot=tt[rt];if((b!==!0||Gg(ot)!==!1)&&ot.isVisible()){z.assign(a),_r(z,ot.oe);var at=ot;ot.ji(z,y,x,E)&&(y!==null&&(at=y(at)),at===null||x!==null&&!x(at)||E.add(at))}}return Rt.free(z),E},Bt.Cf=function(a,y,x,E,b){if(y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof Ke||b instanceof Ye||(b=new Ye),this.Uh===!1)return b;var z=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(z=!0);for(var tt=this.Pa.s,rt=tt.length;rt--;){var ot=tt[rt];if((z!==!0||Gg(ot)!==!1)&&ot.isVisible()){var at=ot;ot.Cf(a,y,x,E,b)&&(y!==null&&(at=y(at)),at===null||x!==null&&!x(at)||b.add(at))}}return b},Bt.Nu=function(a,y,x,E,b,z,tt){if(this.Uh===!1)return b;for(var rt=this.Pa.s,ot=rt.length;ot--;){var at=rt[ot];if((tt!==!0||Gg(at)!==!1)&&z(at)&&at.isVisible()){var At=at;at.Cf(a,y,x,E,b)&&(y!==null&&(At=y(At)),At===null||x!==null&&!x(At)||b.add(At))}}return b},Bt.og=function(a,y,x,E,b,z){if(x===void 0&&(x=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof Ke||b instanceof Ye)&&(z=b),b=!0),z instanceof Ke||z instanceof Ye||(z=new Ye),this.Uh===!1)return z;var tt=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(tt=!0);for(var rt=Rt.alloc(),ot=Rt.alloc(),at=this.Pa.s,At=at.length;At--;){var ft=at[At];if((tt!==!0||Gg(ft)!==!1)&&ft.isVisible()){rt.assign(a),_r(rt,ft.oe),ot.h(a.x+y,a.y),_r(ot,ft.oe);var pt=ft;ft.og(rt,ot,x,E,b,z)&&(x!==null&&(pt=x(pt)),pt===null||E!==null&&!E(pt)||z.add(pt))}}return Rt.free(rt),Rt.free(ot),z},Bt.Fd=function(a,y){if(this.visible){var x=this.Pa.s,E=x.length;if(E!==0){a=Ce();for(var b=Ce(),z=0;z<E;z++){var tt=x[z];if(tt.vw=z,tt instanceof tn){if(tt.fd===!1)continue}else if(tt instanceof Wi&&tt.adornedPart!==null)continue;var rt=tt.actualBounds;tt.isVisible()&&JA(rt,y)?(tt.Fd(!0),a.push(tt)):(tt.Fd(!1),tt.adornments!==null&&0<tt.adornments.count&&b.push(tt))}for(y=0;y<a.length;y++)for(x=a[y],Zm(x),x=x.adornments;x.next();)E=x.value,E.measure(1/0,1/0),E.arrange(),E.Fd(!0);for(y=0;y<b.length;y++)Zm(b[y]);Oe(a),Oe(b)}}};function UA(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}Bt.gc=function(a,y,x){if(this.visible&&this.pb!==0&&(x===void 0&&(x=!0),x||!this.isTemporary)){x=this.Pa.s;var E=x.length;if(E!==0){if(a.isTemporary)for(var b=0;b<E;b++)x[b].Gj();b=UA(this,a);var z=this.Zq;z.length=0;for(var tt=y.scale,rt=Me.alloc(),ot=0;ot<E;ot++)this.Oj(a,x[ot],y,z,tt,rt,!0);if(Me.free(rt),a.isTemporary)for(y=0;y<E;y++)x[y].Gj();a.globalAlpha=b}}};function Lg(a,y,x,E,b){if(a.visible&&a.pb!==0&&(b||!a.isTemporary)){b=a.Pa.s;var z=b.length;if(z!==0){var tt=UA(a,y),rt=a.Zq;rt.length=0;for(var ot=x.scale,at=Me.alloc(),At=0;At<z;At++){var ft=b[At];E.contains(ft)&&a.Oj(y,ft,x,rt,ot,at,!1)}Me.free(at),y.globalAlpha=tt}}}Bt.Oj=function(a,y,x,E,b,z,tt){if(tt&&!Gg(y))a.Hs(y);else{if(E!==null&&y instanceof tn&&(y.isOrthogonal&&E.push(y),y.fd===!1)){a.Hs(y);return}for(tt=!1,E=y.containingGroup;E!==null;)tt?E.tb!==null&&z.Ex(E.tb):E.tb!==null&&(tt=!0,z.assign(E.tb)),E=E.containingGroup;var rt=y.actualBounds;if(E=!1,tt&&y.isVisible()){if(!z.Yc(rt)){a.Hs(y);return}E=!z.Re(rt)}E&&(a.save(),a instanceof ia?a.bk=z.copy():(a.beginPath(),a.rect(z.x,z.y,z.width,z.height),a.clip())),rt.width*b>x.Oq||rt.height*b>x.Oq?y.gc(a,x):(b=y.actualBounds,z=y.naturalBounds,b.width===0||b.height===0||isNaN(b.x)||isNaN(b.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(Hr(y,a,y.areaBackground,!0,!0,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.areaBackground===null&&y.background===null&&(Hr(y,a,"rgba(0,0,0,0.3)",!0,!1,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.background!==null&&(a.transform(x.m11,x.m12,x.m21,x.m22,x.dx,x.dy),Hr(y,a,y.background,!0,!1,z,b),a.fillRect(0,0,z.width/2,z.height/2),x.ws()||(y=1/(x.m11*x.m22-x.m12*x.m21),a.transform(x.m22*y,-x.m12*y,-x.m21*y,x.m11*y,y*(x.m21*x.dy-x.m22*x.dx),y*(x.m12*x.dx-x.m11*x.dy)))))),E&&(a.restore(),a.Vc(!0))}},Bt.g=function(a,y,x,E,b){var z=this.diagram;z!==null&&z.cb(Qr,a,this,y,x,E,b)},Bt.oi=function(a,y,x){var E=this.Pa;if(y.Ig=this,this===null&&vi(y),a>=E.count)a=E.count;else if(E.M(a)===y)return-1;return E.Gb(a,y),y.Vo(x),E=this.diagram,E!==null&&(x?E.N():E.oi(y)),Bf(this,a,y),a},Bt.pc=function(a,y,x){if(!x&&y.layer!==this&&y.layer!==null)return y.layer.pc(a,y,x);var E=this.Pa;if(0>a||a>=E.length){if(a=E.indexOf(y),0>a)return-1}else if(E.M(a)!==y&&(a=E.indexOf(y),0>a))return-1;return y.Wo(x),E.mb(a),E=this.diagram,E!==null&&(x?E.N():E.pc(y)),y.Ig=null,vi(y),a};function Bf(a,y,x){if(y=Cf(a,y,x),x instanceof li&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var E=-1,b=a.Pa.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];if(rt===x&&(y=tt,0<=E)||0>E&&rt.containingGroup===x&&(E=tt,0<=y))break}!(0>E)&&E<y&&(b=a.Pa,b.mb(y),b.Gb(E,x))}y=x.containingGroup,y!==null&&Bf(a,-1,y)}x.svg!==null&&x.svg.remove()}function Cf(a,y,x){var E=x.zOrder;if(isNaN(E))return y;a=a.Pa;var b=a.count;if(1>=b)return y;if(0>y&&(y=a.indexOf(x)),0>y)return-1;for(var z=y-1,tt=NaN;0<=z&&(tt=a.M(z).zOrder,!!isNaN(tt));)z--;for(var rt=y+1,ot=NaN;rt<b&&(ot=a.M(rt).zOrder,!!isNaN(ot));)rt++;if(!isNaN(tt)&&tt>E)for(;;){if(z===-1||tt<=E){if(z++,z===y)break;return a.mb(y),a.Gb(z,x),z}for(tt=NaN;0<=--z&&(tt=a.M(z).zOrder,isNaN(tt)););}else if(!isNaN(ot)&&ot<E)for(;;){if(rt===b||ot>=E){if(rt--,rt===y)break;return a.mb(y),a.Gb(rt,x),rt}for(ot=NaN;++rt<b&&(ot=a.M(rt).zOrder,isNaN(ot)););}return y}Ie.Object.defineProperties(Vo.prototype,{parts:{get:function(){return this.Pa.iterator}},partsBackwards:{get:function(){return this.Pa.iteratorBackwards}},diagram:{get:function(){return this.H}},name:{get:function(){return this.xa},set:function(a){var y=this.xa;if(y!==a){var x=this.diagram;if(x!==null)for(y===""&&pe("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&pe("Layer.name is already present in this diagram: "+a);for(this.xa=a,this.g("name",y,a),a=this.Pa.iterator;a.next();)a.value.layerName=this.xa}}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&pi(a,"0 <= value <= 1",Vo,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,a!==null&&a.N())}},isTemporary:{get:function(){return this.o},set:function(a){var y=this.o;y!==a&&((this.o=a)&&(this.isInDocumentBounds=!1),this.g("isTemporary",y,a))}},visible:{get:function(){return this.u},set:function(a){var y=this.u;if(y!==a){for(this.u=a,this.g("visible",y,a),y=this.Pa.iterator;y.next();)y.value.Zb(a);a=this.diagram,a!==null&&a.N()}}},pickable:{get:function(){return this.Uh},set:function(a){var y=this.Uh;y!==a&&(this.Uh=a,this.g("pickable",y,a))}},isInDocumentBounds:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a,this.diagram!==null&&this.diagram.Ya())}},allowCopy:{get:function(){return this.Fi},set:function(a){var y=this.Fi;y!==a&&(this.Fi=a,this.g("allowCopy",y,a))}},allowDelete:{get:function(){return this.Gi},set:function(a){var y=this.Gi;y!==a&&(this.Gi=a,this.g("allowDelete",y,a))}},allowTextEdit:{get:function(){return this.Pi},set:function(a){var y=this.Pi;y!==a&&(this.Pi=a,this.g("allowTextEdit",y,a))}},allowGroup:{get:function(){return this.Hi},set:function(a){var y=this.Hi;y!==a&&(this.Hi=a,this.g("allowGroup",y,a))}},allowUngroup:{get:function(){return this.Qi},set:function(a){var y=this.Qi;y!==a&&(this.Qi=a,this.g("allowUngroup",y,a))}},allowLink:{get:function(){return this.Ii},set:function(a){var y=this.Ii;y!==a&&(this.Ii=a,this.g("allowLink",y,a))}},allowRelink:{get:function(){return this.Ki},set:function(a){var y=this.Ki;y!==a&&(this.Ki=a,this.g("allowRelink",y,a))}},allowMove:{get:function(){return this.Ji},set:function(a){var y=this.Ji;y!==a&&(this.Ji=a,this.g("allowMove",y,a))}},allowReshape:{get:function(){return this.Li},set:function(a){var y=this.Li;y!==a&&(this.Li=a,this.g("allowReshape",y,a))}},allowResize:{get:function(){return this.Mi},set:function(a){var y=this.Mi;y!==a&&(this.Mi=a,this.g("allowResize",y,a))}},allowRotate:{get:function(){return this.Ni},set:function(a){var y=this.Ni;y!==a&&(this.Ni=a,this.g("allowRotate",y,a))}},allowSelect:{get:function(){return this.Oi},set:function(a){var y=this.Oi;y!==a&&(this.Oi=a,this.g("allowSelect",y,a))}}}),Vo.prototype.findObjectsNear=Vo.prototype.og,Vo.prototype.findObjectsIn=Vo.prototype.Cf,Vo.prototype.findObjectsAt=Vo.prototype.ji,Vo.prototype.findObjectAt=Vo.prototype.ic,Vo.className="Layer";function ge(a,y){if(OA||(Uo(),OA=!0),rr(this),Yl=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,jr){var x=this,E=function(){x.removeEventListener(Fe.document,"DOMContentLoaded",E,!1),x.setRTL()};Fe.document.body!==null?this.setRTL():x.addEventListener(Fe.document,"DOMContentLoaded",E,!1)}this.ol=null,Qf.add("Model",lr);var b=this;return this.Hb=function(z){var tt=b.partManager;if(z.model===tt.diagram.model&&tt.diagram.aa){tt.diagram.aa=!1;try{var rt=z.change;z.modelChange===""&&rt===Qr&&tt.updateDataBindings(z.object,z.propertyName)}finally{tt.diagram.aa=!0}}},this.Oc=function(z){b.partManager.doModelChanged(z)},this.hu=this.ku=null,Ac(this),this.model=Pv(),this.Wg=!0,Ef(this),this.layout=new Ir,this.Wg=!1,this.ck=this.ek=this.fk=this.dk=this.ui=this.aA=this.$j=this.Ov=null,this.hk=function(){},this.preventDefault=null,this.rn=!1,this.Yf=new Oh,a!==void 0&&(typeof a=="string"||Fe.Element&&a instanceof Element?Eg(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var cu,Yl;function Ac(a){a.Yd=new pa,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new Ke,a.pj=new Rn,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new Rt(NaN,NaN).freeze(),a.du=new Rt(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new Rt(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new Li,a.zu=new Rt(NaN,NaN).freeze(),a.ut=new Me(NaN,NaN,NaN,NaN).freeze(),a.rj=new Pi(0,0,0,0).freeze(),a.sj=DA,a.nu=!1,a.Zt=null,a.fu=null,a.yh=ws,a.zk=Xo,a.Fg=ws,a.pq=Xo,a.yt=es,a.Bt=es,a.Fc=!0,a.pn=!1,a.De=new Ye,a.Eh=new Rn,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Pi(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new us,a.bq.diagram=a,a.Qg=new us,a.Qg.diagram=a,a.cj=new us,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,cc(a),a.ai=new Ye,a.Ht=!0,a.uu=wu,a.pw=!1,a.wu=Og,a.it="auto",a.Op="auto",a.zh=null,a.Fh=null,a.Bh=null,a.Qh=null,a.Oh=null,a.Nh=null,a.Qt=null,a.Lh=null,a.xt=!1,a.Mh=null,a.Ph=null,a.$h=null,a.Ch=null,a.Rt=!1,a.Yt={},a.oj=[null,null],a.Wg=!1,a.Iw=!1,a.ou=!1,a.lt=!1,a.rw=!0,a.ld=!1,a.$i=!1,a.Tw=!0,a.Ce=-2,a.Og=new Rn,a.Xn=new Ke,a.Gg=!1,a.Jd=!0,a.Us=!0,a.Fi=!0,a.Gi=!0,a.Vs=!1,a.Ws=!0,a.Pi=!0,a.Hi=!0,a.Qi=!0,a.Ys=!0,a.Ii=!0,a.Ki=!0,a.Ji=!0,a.Li=!0,a.Mi=!0,a.Ni=!0,a.Oi=!0,a.Zs=!0,a.at=!0,a.qw=!1,a.Vk=!1,a.mn=!0,a.nn=!0,a.Xs=!0,a.$s=!0,a.iu=16,a.mu=16,a.qr=!1,a.gu=!1,a.lu=0,a.ju=0,a.yb=new Pi(5).freeze(),a.Hw=new Ye().freeze(),a.Nt=999999999,a.nw=new Ye().freeze(),a.Zi=!0,a.Ee=!0,a.vd=!0,a.Be=!1,a.gf=!1,a.xh=!0,a.hf=!1,a.sy=new Ye,a.ow=new Ye,a.Xh=null,a.aw=new an(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new Rt,bounds:new Me,Py:new an,bA:new an,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new Me(NaN,NaN,NaN,NaN).freeze(),a.wo=new an(NaN,NaN).freeze(),a.Sp=new Me(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new Rn;var y=new hn,x=new Sr;x.bind(new vo("text","",En)),y.add(x),a.ny=y,a.Lg.add("",y),y=new hn,x=new Sr,x.stroke="brown",x.bind(new vo("text","",En)),y.add(x),a.Lg.add("Comment",y),y=new hn,y.selectable=!1,y.avoidable=!1,x=new yi,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new an(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new Rn,y=new li,y.selectionObjectName="GROUPPANEL",y.type=ze.Vertical,x=new Sr,x.font="bold 12pt sans-serif",x.bind(new vo("text","",En)),y.add(x),x=new ze(ze.Auto),x.name="GROUPPANEL";var E=new yi;E.figure="Rectangle",E.fill="rgba(128,128,128,0.2)",E.stroke="black",x.add(E),E=new ra,E.padding=new Pi(5,5,5,5).ja(),x.add(E),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new Rn,y=new tn,x=new yi,x.isPanelMain=!0,y.add(x),x=new yi,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new tn,x=new yi,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new Wi,y.type=ze.Auto,x=new yi,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new ra,x.margin=new Pi(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new Wi,y.type=ze.Link,x=new yi,x.isPanelMain=!0,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),a.Kt=y,a.fe=null,a.mq=!1,a.Ck=null,a.partManager=new lr,a.toolManager=new br,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new st,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=Ff(),a.eq=null,a.fq=os,a.Pw=!1,a.Mb=1,a.Yh=null,a.Oq=1,a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0,a.yq=1,a.tw=0,a.uw=new Rt,a.zy=500,a.wp=new Rt,a.wq=!1}ge.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),eh=null,vu="",Pf(this,!1),this.Xn.clear(),xc(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function Pf(a,y){a.animationManager.Cc(!0),a.Hw=new Ye().freeze(),a.nw=new Ye().freeze();var x=a.skipsUndoManager,E=a.cc!==null&&a.cc!==void 0;E&&(a.skipsUndoManager=!0);var b=null;a.fe!==null&&(b=a.fe.part,b!==null&&a.remove(b));var z=[],tt=a.Wa.length;if(y){for(y=0;y<tt;y++)for(var rt=a.Wa.s[y].parts;rt.next();){var ot=rt.value;ot!==b&&ot.data===null&&z.push(ot)}for(y=0;y<z.length;y++)a.remove(z[y])}for(y=0;y<tt;y++)a.Wa.s[y].clear();return a.partManager.clear(),a.De.clear(),a.Eh.clear(),a.ai.clear(),a.Ck=null,a.Xn.clear(),xc(),a.Og.clear(),zi=[],b!==null&&(a.add(b),a.partManager.parts.remove(b)),E&&(a.skipsUndoManager=x),z}function Ff(){return null}ge.prototype.reset=function(){this.clear(),this.vb=!0,Ac(this),wl(this),this.Wg=!0,Ef(this),this.layout=new Ir,this.Wg=!1,this.model=Pv(),this.model.undoManager=new Or,this.vb=this.rn=!1,this.N()},ge.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=Fe.document.body);var y=nn("div");y.dir="rtl",y.style.cssText="font-size: 14px; width: 1px; height: 1px; position: absolute; top: -1000px; overflow: scroll;",y.textContent="A",a.appendChild(y);var x="reverse";0<y.scrollLeft?x="default":(y.scrollLeft=1,y.scrollLeft===0&&(x="negative")),a.removeChild(y),this.bu=x},ge.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=Fe.document.body);var y=0;if(jr){var x=Ld;y=cu,x===null&&(x=Ld=nn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=cu=nn("div"),y.style.position="absolute",y.style.visibility="hidden",y.style.width="200px",y.style.height="150px",y.style.boxSizing="content-box",y.appendChild(x)),y.style.overflow="hidden",a.appendChild(y);var E=x.offsetWidth;y.style.overflow="scroll",x=x.offsetWidth,E===x&&(x=y.clientWidth),a.removeChild(y),y=E-x,y!==0||Ji||(y=11)}this.Db=y,this.Gw=!0},ge.prototype.qb=function(a){a.classType===ge&&(this.autoScale=a)},ge.prototype.toString=function(a){a===void 0&&(a=0);var y="";if(this.div&&this.div.id&&(y=this.div.id),y='Diagram "'+y+'"',0>=a)return y;for(var x=this.Wa.iterator;x.next();)y+=`
`+x.value.toString(a-1);return y};function Eg(a,y){if(jr){if(y!=null||pe("Diagram setup requires an argument DIV."),a.Ka!==null&&pe("Diagram has already completed setup."),typeof y=="string"?a.Ka=Fe.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:pe("No DIV or DIV id supplied: "+y),a.Ka===null&&pe("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&pe("Invalid div id; div already has a Diagram associated with it."),!a.ol&&Fe.ResizeObserver){var x=Pn(function(){a.$b()},250);a.ol=new Fe.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}Fe.getComputedStyle(a.Ka,null).position==="static"&&(a.Ka.style.position="relative"),y=5;var E="rgba(2"+y+"5, 255, 255, 0)";y--,a.Ka.style["-webkit-tap-highlight-color"]=E,a.Ka.innerHTML="",a.Ka.H=a,a.Ka.goDiagram=a,a.Ka.go=Fe.go;var b=new al(a);if(b.style!==void 0&&(b.style.position="absolute",b.style.top="0px",b.style.left="0px",Fe.getComputedStyle(a.Ka,null).getPropertyValue("direction")==="rtl"&&(a.tn=!0),b.style.zIndex="2",b.style.userSelect="none",b.style.MozUserSelect="none",b.style.touchAction="none",b.style.letterSpacing="normal !important",b.style.wordSpacing="normal !important"),a.ta=b,a.ib=b.context,E=a.ib,a.Mb=a.computePixelRatio(),a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1),yd(a,a.Aa,a.ya),a.Ka.insertBefore(b.Oa,a.Ka.firstChild),b=new al(null),b.width=1,b.height=1,a.jw=b,a.oy=b.context,jr){b=nn("div");var z=nn("div");b.style.position="absolute",b.style.overflow="auto",b.style.width=a.Aa+"px",b.style.height=a.ya+"px",b.style.zIndex="1",z.style.position="absolute",z.style.width="1px",z.style.height="1px",a.Ka.appendChild(b),b.appendChild(z),b.onscroll=gc,b.addEventListener("pointerdown",fc),b.H=a,b.uy=!0,b.vy=!0,a.ku=b,a.hu=z}a.hk=Pn(function(){a.Yh=null,a.N()},300),a.Ov=Pn(function(){Lf(a)},250),a.preventDefault=function(tt){return tt.preventDefault(),!1},a.$j=function(tt){if(a.isEnabled){var rt=Wa(a,tt,!0);rt.bubbles=!0;var ot=0,at=0;rt.delta=0,tt.deltaX!==void 0?(tt.deltaX!==0&&(ot=0<tt.deltaX?1:-1),tt.deltaY!==0&&(at=0<tt.deltaY?1:-1),rt.delta=Math.abs(tt.deltaX)>Math.abs(tt.deltaY)?-ot:-at):tt.wheelDeltaX!==void 0?(tt.wheelDeltaX!==0&&(ot=0<tt.wheelDeltaX?-1:1),tt.wheelDeltaY!==0&&(at=0<tt.wheelDeltaY?-1:1),rt.delta=Math.abs(tt.wheelDeltaX)>Math.abs(tt.wheelDeltaY)?-ot:-at):tt.wheelDelta!==void 0&&tt.wheelDelta!==0&&(rt.delta=0<tt.wheelDelta?1:-1),a.doMouseWheel(),rl(rt,tt)}},a.aA=function(tt){a.isEnabled&&(a.Vk=!1,Wa(a,tt,!0),tt=a.currentTool,tt.cancelWaitAfter(),tt.standardMouseOver())},a.ui=function(tt){if(a.isEnabled){a.Vk=!0;var rt=a.Yt;rt[tt.pointerId]===void 0&&(rt[tt.pointerId]=tt),rt=a.oj;var ot=!1;if(rt[0]===null||rt[0].pointerId!==tt.pointerId&&rt[0].pointerType===tt.pointerType)if(rt[1]!==null&&rt[1].pointerId===tt.pointerId)rt[1]=tt,ot=!0;else if(rt[0]===null)rt[0]=tt;else if(rt[1]===null)rt[1]=tt,ot=!0;else{tt.preventDefault();return}else rt[0]=tt;(rt=tt.pointerType==="touch"||tt.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var at=ot;ot=pd(a,tt,!0,!1,!0,at),Lh(a,tt,ot),ot.targetDiagram=cd(tt,tt.target),ot.targetObject=null,at||ot.clone(a.bq),at=a.uw,rt=rt?25:10,tt.timeStamp-a.tw<a.zy&&!(Math.abs(at.x-tt.screenX)>rt||Math.abs(at.y-tt.screenY)>rt)?a.yq++:a.yq=1,ot.clickCount=a.yq,a.tw=tt.timeStamp,a.uw.sg(tt.screenX,tt.screenY),a.doMouseDown(),tt.button===1?tt.preventDefault():rl(ot,tt)}},a.dk=function(tt){if(a.isEnabled){a.Vk=!0;var rt=a.oj;if(rt[0]===null||rt[0].pointerId!==tt.pointerId&&rt[0].pointerType===tt.pointerType){if(rt[1]!==null&&rt[1].pointerId===tt.pointerId){rt[1]=tt;return}if(rt[0]===null)rt[0]=tt;else return}else rt[0]=tt;if(rt[0].pointerId===tt.pointerId){rt=pd(a,tt,!1,!1,!1,rt[1]!==null);var ot=Fe.document.elementFromPoint(tt.clientX,tt.clientY)||null;ot!==null&&ot.shadowRoot!==void 0&&ot.shadowRoot!==null&&(ot=ot.shadowRoot.elementFromPoint(tt.clientX,tt.clientY));var at=a,At=tt;ot&&ot.H&&(At=tt,at=ot.H),rt.targetDiagram=at,Lh(a,At,rt),rt.targetObject=null,a.doMouseMove(),rl(rt,tt)}}},a.fk=function(tt){if(a.isEnabled){a.Vk=!0;var rt=tt.pointerType==="touch"||tt.pointerType==="pen",ot=a.Yt;if(rt&&a.qu)delete ot[tt.pointerId],tt.preventDefault();else if(ot=a.oj,ot[0]===null||ot[0].pointerId!==tt.pointerId&&ot[0].pointerType===tt.pointerType)ot[1]!==null&&ot[1].pointerId===tt.pointerId&&(ot[1]=null);else{ot[0]=null,ot=pd(a,tt,!1,!0,!0,!1);var at=Fe.document.elementFromPoint(tt.clientX,tt.clientY)||null;at!==null&&at.shadowRoot!==void 0&&at.shadowRoot!==null&&(at=at.shadowRoot.elementFromPoint(tt.clientX,tt.clientY)),at!==null&&at.H instanceof ge&&at.H!==a&&Lh(at.H,tt,ot),at===null&&(at=tt.target),Lh(a,tt,ot),ot.clickCount=a.yq,ot.targetDiagram=cd(tt,at),ot.targetObject=null,a.doMouseUp(),rl(ot,tt),rt&&(a.wq=!1)}}},a.ek=function(tt){if(a.isEnabled){a.Vk=!1;var rt=a.Yt;rt[tt.pointerId]&&delete rt[tt.pointerId],rt=a.oj,rt[0]!==null&&rt[0].pointerId===tt.pointerId&&(rt[0]=null),rt[1]!==null&&rt[1].pointerId===tt.pointerId&&(rt[1]=null),tt.pointerType!=="touch"&&tt.pointerType!=="pen"&&(tt=a.currentTool,tt.cancelWaitAfter(),tt.standardMouseOver())}},a.ck=function(tt){var rt=a.oj;rt[0]!==null&&rt[0].pointerId===tt.pointerId?(rt[0]=null,a.wq=!1):rt[1]!==null&&rt[1].pointerId===tt.pointerId&&(rt[1]=null)},a.Vp=E.Z["d"+Rh[1]+Rh[2]+"wI"+bl.slice(1,5)]["b"+T1.slice(1,y)](E.Z,dA,y,y),E.Vc(!0),uc(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}ge.prototype.addEventListener=function(a,y,x,E){a.addEventListener(y,x,{capture:E,passive:!1})},ge.prototype.removeEventListener=function(a,y,x,E){a.removeEventListener(y,x,{capture:E})};function uc(a){var y=a.ta.Oa;y instanceof HTMLCanvasElement||(y=a.div),a.addEventListener(y,"pointerdown",a.ui,!1),a.addEventListener(y,"pointermove",a.dk,!1),a.addEventListener(y,"pointerup",a.fk,!1),a.addEventListener(y,"pointerout",a.ek,!1),a.addEventListener(y,"pointercancel",a.ck,!1),a.addEventListener(y,"pointerenter",a.bz,!1),a.addEventListener(y,"pointerleave",a.cz,!1),a.addEventListener(y,"wheel",a.$j,!1),a.addEventListener(y,"keydown",a.Qz,!1),a.addEventListener(y,"keyup",a.Rz,!1),a.addEventListener(y,"blur",a.Ny,!1),a.addEventListener(y,"focus",a.Oy,!1),a.addEventListener(y,"selectstart",function(x){return x.preventDefault(),!1},!1),a.addEventListener(y,"contextmenu",function(x){return x.preventDefault(),!1},!1),a.addEventListener(Fe,"resize",a.Ov,!1)}function Os(a){30<a.Sq&&(a.Yh=1)}function Ph(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),hr&&hr.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}ge.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:Fe.devicePixelRatio||1},ge.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},ge.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},ge.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},ge.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},ge.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},ge.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},ge.prototype.doFocus=function(){this.focus()},ge.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=Fe.scrollX||Fe.pageXOffset,y=Fe.scrollY||Fe.pageYOffset;this.ta.focus(),Fe.scrollTo(a,y)}},ge.prototype.Oy=function(){this.H.R("GainedFocus")},ge.prototype.Ny=function(){this.H.R("LostFocus")};function Lf(a){if(a.ta!==null){var y=a.Ka;if(y!==null&&y.clientWidth!==0&&y.clientHeight!==0){a.Gw||a.setScrollWidth();var x=a.gf?a.Db:0,E=a.Be?a.Db:0,b=a.Mb;a.Mb=a.computePixelRatio(),a.Mb!==b&&(a.pn=!0,a.$b()),(y.clientWidth!==a.Aa+x||y.clientHeight!==a.ya+E)&&(a.Ee=!0,a.Fc=!0,y=a.layout,y!==null&&y.isViewportSized&&a.autoScale===ws&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Ef(a){var y=new Vo;y.name="Background",a.Al(y),y=new Vo,y.name="",a.Al(y),y=new Vo,y.name="Foreground",a.Al(y),y=new Vo,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new Vo,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new Vo,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function hc(a){var y=new ze(ze.Grid);y.name="GRID";var x=new yi;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new yi,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new yi,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new yi,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new yi,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new yi,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new jn,x.add(y),x.layerName="Grid",x.zOrder=0,x.isInDocumentBounds=!1,x.isAnimated=!1,x.pickable=!1,x.locationObjectName="GRID",a.add(x),a.partManager.parts.remove(x),y.visible=!1,y}function gc(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):Th(this.H)}function fc(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):Th(this.H)}ge.prototype.kx=function(a){if(this.ta!==null){var y=this.ku,x=this.hu;this.qr=!0;var E=this.documentBounds,b=this.viewportBounds,z=this.rj,tt=E.x-z.left,rt=E.y-z.top,ot=E.width+z.left+z.right,at=E.height+z.top+z.bottom,At=E.right+z.right;z=E.bottom+z.bottom;var ft=b.x;E=b.y;var pt=b.width,xt=b.height,Ct=b.right,Mt=b.bottom;b=this.scale;var Gt=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Gt=Gt+a.scrollWidth-a.clientWidth;break;case"reverse":Gt=a.scrollWidth-Gt-a.clientWidth}var It=Gt;pt<ot||xt<at?(Gt=Rt.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==It&&(Gt.x=It/b+tt,this.ju=It),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Gt.y=a.scrollTop/b+rt,this.lu=a.scrollTop),this.position=Gt,Rt.free(Gt),this.Ee=this.qr=!1):(Gt=Rt.alloc(),a.uy&&this.allowHorizontalScroll&&(tt<ft&&(this.position=Gt.h(It+tt,this.position.y)),At>Ct&&(this.position=Gt.h(-(y.scrollWidth-this.Aa)+It-this.Aa/b+At,this.position.y))),a.vy&&this.allowVerticalScroll&&(rt<E&&(this.position=Gt.h(this.position.x,a.scrollTop+rt)),z>Mt&&(this.position=Gt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/b+z))),Rt.free(Gt),this.vd=!0,this.Ee=this.qr=!1,E=this.documentBounds,b=this.viewportBounds,At=E.right,Ct=b.right,z=E.bottom,Mt=b.bottom,tt=E.x,ft=b.x,rt=E.y,E=b.y,pt>=ot&&tt>=ft&&At<=Ct&&(x.style.width="1px"),xt>=at&&rt>=E&&z<=Mt&&(x.style.height="1px"))}},ge.prototype.computeBounds=function(a){return a===void 0&&(a=new Me),fs(this),il(this,a)};function il(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,E=a.Wa.s,b=E.length,z=0;z<b;z++){var tt=E[z];if(tt.visible&&tt.isInDocumentBounds){tt=tt.Pa.s;for(var rt=tt.length,ot=0;ot<rt;ot++){var at=tt[ot];at.isInDocumentBounds&&at.isVisible()&&(at=at.actualBounds,at.w()&&(x?(x=!1,y.assign(at)):y.ed(at)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}ge.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(ni(a))for(var E=0;E<a.length;E++){var b=a[E];!y&&b instanceof tn||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds))}else for(a=a.iterator;a.next();)E=a.value,!y&&E instanceof tn||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds));return x===null?new Me(NaN,NaN,0,0):x};function ka(a,y){if((y||a.hf)&&!a.vb&&a.ta!==null&&a.documentBounds.w()){if(a.vb=!0,y){var x=a.initialPosition;if(x.w()){a.vb=!1,a.position=x;return}x=Rt.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var E=a.viewportBounds;E=Me.allocAt(0,0,E.width,E.height);var b=Rt.alloc();b.xi(E,a.initialViewportSpot),b.h(x.x-b.x,x.y-b.y),a.position=b,Me.free(E),Rt.free(b),Rt.free(x)}x=a.yh,y&&a.Fg!==ws&&(x=a.Fg);var z=x!==ws?Fh(a,x):a.scale;x=a.pa.x,E=a.pa.y,b=a.Aa/z;var tt=a.ya/z,rt=a.zk,ot=a.pq;y&&!rt.sb()&&(ot.sb()||ot.Xb())&&(rt=ot.Xb()?Xi:ot),dd(a,a.documentBounds,b,tt,rt,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,re.B(z.x,x)&&re.B(z.y,E)&&re.B(z.width,b)&&re.B(z.height,tt)||a.onViewportBoundsChanged(new Me(x,E,b,tt),z,y,!1)}}function Fh(a,y){var x=a.Pp;if(a.ta===null)return x;a.Va();var E=a.documentBounds;if(!E.w())return x;var b=E.width;E=E.height;var z=a.Aa+(a.gf?a.Db:0),tt=a.ya+(a.Be?a.Db:0),rt=z/b,ot=tt/E;return y===ma?(y=Math.min(ot,rt),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===yu?(y=ot>rt?(tt-a.Db)/E:(z-a.Db)/b,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}ge.prototype.zoomToFit=function(){var a=this.sj;this.sj=DA,this.scale=Fh(this,ma),a!==DA&&(ka(this,!1),dd(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},Bt=ge.prototype,Bt.BA=function(a,y){y===void 0&&(y=ma);var x=a.width,E=a.height;if(!(x===0||E===0||isNaN(x)&&isNaN(E))){var b=1;if(y===ma||y===yu)if(isNaN(x))b=this.viewportBounds.height*this.scale/E;else if(isNaN(E))b=this.viewportBounds.width*this.scale/x;else{b=this.Aa;var z=this.ya;b=y===yu?z/E>b/x?(z-(this.Be?this.Db:0))/E:(b-(this.gf?this.Db:0))/x:Math.min(z/E,b/x)}this.scale=b,this.position=new Rt(a.x,a.y)}},Bt.Jy=function(a,y){this.Va();var x=this.documentBounds,E=this.viewportBounds;this.position=new Rt(x.x+(a.x*x.width+a.offsetX)-(y.x*E.width-y.offsetX),x.y+(a.y*x.height+a.offsetY)-(y.y*E.height-y.offsetY))},Bt.zz=function(a){if(a instanceof te){this.eq=a;var y=Rt.alloc();this.fq=this.op(a.ga(es,y)),Rt.free(y)}else this.eq=null,this.fq=os};function dd(a,y,x,E,b,z){var tt=Rt.allocAt(a.pa.x,a.pa.y),rt=tt.x,ot=tt.y;if(a.eq!==null){var at=Rt.alloc();at=a.eq.ga(es,at),rt=at.x-a.fq.x/a.scale,ot=at.y-a.fq.y/a.scale,b=ts,Rt.free(at)}(z||a.scrollMode===DA)&&(b.sb()&&(x>y.width&&(rt=y.x+(b.x*y.width+b.offsetX)-(b.x*x-b.offsetX)),E>y.height&&(ot=y.y+(b.y*y.height+b.offsetY)-(b.y*E-b.offsetY))),b=a.rj,z=x-y.width,x<y.width+b.left+b.right?(rt=Math.min(rt+x/2,y.right+Math.max(z,b.right)-x/2),rt=Math.max(rt,y.left-Math.max(z,b.left)+x/2),rt-=x/2):rt>y.left?rt=y.left:rt<y.right-x&&(rt=y.right-x),x=E-y.height,E<y.height+b.top+b.bottom?(ot=Math.min(ot+E/2,y.bottom+Math.max(x,b.bottom)-E/2),ot=Math.max(ot,y.top-Math.max(x,b.top)+E/2),ot-=E/2):ot>y.top?ot=y.top:ot<y.bottom-E&&(ot=y.bottom-E)),tt.x=isFinite(rt)?rt:-a.yb.left,tt.y=isFinite(ot)?ot:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,tt),tt.x=y.x,tt.y=y.y),xh(a.Yd,a.pa,tt),a.pa.h(tt.x,tt.y),wl(a),Rt.free(tt)}Bt.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=gA(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof jn)return a}else if(a=gA(this,a,function(x){return x.part}),a instanceof jn)return a;return null},Bt.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),fs(this);for(var E=this.Wa.iteratorBackwards;E.next();){var b=E.value;if(b.visible&&(b=b.ic(a,y,x),b!==null))return b}return null};function gA(a,y,x,E){for(x===void 0&&(x=null),E===void 0&&(E=null),fs(a),a=a.Wa.iteratorBackwards;a.next();){var b=a.value;if(b.visible&&!b.isTemporary&&(b=b.ic(y,x,E),b!==null))return b}return null}Bt.lz=function(a,y,x){return y===void 0&&(y=!0),Mg(this,a,function(E){return E.part},y?function(E){return E instanceof jn&&E.canSelect()}:null,x)};function Mg(a,y,x,E,b){for(x===void 0&&(x=null),E===void 0&&(E=null),b instanceof Ke||b instanceof Ye||(b=new Ye),fs(a),a=a.Wa.iteratorBackwards;a.next();){var z=a.value;z.visible&&!z.isTemporary&&z.ji(y,x,E,b)}return b}Bt.ji=function(a,y,x,E){y===void 0&&(y=null),x===void 0&&(x=null),E instanceof Ke||E instanceof Ye||(E=new Ye),fs(this);for(var b=this.Wa.iteratorBackwards;b.next();){var z=b.value;z.visible&&z.ji(a,y,x,E)}return E},Bt.ux=function(a,y,x,E){return y===void 0&&(y=!1),x===void 0&&(x=!0),Mf(this,a,function(b){return b instanceof jn&&(!x||b.canSelect())},y,E)},Bt.Cf=function(a,y,x,E,b){y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof Ke||b instanceof Ye||(b=new Ye),fs(this);for(var z=this.Wa.iteratorBackwards;z.next();){var tt=z.value;tt.visible&&tt.Cf(a,y,x,E,b)}return b},Bt.Nu=function(a,y,x,E,b,z){var tt=new Ye;fs(this);for(var rt=this.Wa.iteratorBackwards;rt.next();){var ot=rt.value;ot.visible&&ot.Nu(a,y,x,E,tt,b,z)}return tt};function Mf(a,y,x,E,b){var z=null;for(z===void 0&&(z=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof Ke||b instanceof Ye||(b=new Ye),fs(a),a=a.Wa.iteratorBackwards;a.next();){var tt=a.value;tt.visible&&!tt.isTemporary&&tt.Cf(y,z,x,E,b)}return b}Bt.mz=function(a,y,x,E,b){return x===void 0&&(x=!0),E===void 0&&(E=!0),kg(this,a,y,function(z){return z instanceof jn&&(!E||z.canSelect())},x,b)},Bt.og=function(a,y,x,E,b,z){x===void 0&&(x=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof Ke||b instanceof Ye)&&(z=b),b=!0),z instanceof Ke||z instanceof Ye||(z=new Ye),fs(this);for(var tt=this.Wa.iteratorBackwards;tt.next();){var rt=tt.value;rt.visible&&rt.og(a,y,x,E,b,z)}return z};function kg(a,y,x,E,b,z){var tt=null;for(tt===void 0&&(tt=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof Ke||b instanceof Ye)&&(z=b),b=!0),z instanceof Ke||z instanceof Ye||(z=new Ye),fs(a),a=a.Wa.iteratorBackwards;a.next();){var rt=a.value;rt.visible&&!rt.isTemporary&&rt.og(y,x,tt,E,b,z)}return z}ge.prototype.acceptEvent=function(a){return Wa(this,a,a instanceof MouseEvent)};function Wa(a,y,x){var E=a.Qg;return a.Qg=a.cj,a.cj=E,E.diagram=a,E.event=y,x?Lh(a,y,E):(E.viewPoint=a.Qg.viewPoint,E.documentPoint=a.Qg.documentPoint),a=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),E.modifiers=a,E.button=y.button,y.buttons!==void 0&&(E.buttons=y.buttons),Ji&&y.button===0&&y.ctrlKey&&(E.button=2),E.down=!1,E.up=!1,E.clickCount=1,E.delta=0,E.handled=!1,E.bubbles=!1,E.timestamp=y.timeStamp,E.isMultiTouch=!1,E.targetDiagram=cd(y,y.target),E.targetObject=null,E}function cd(a,y){return y===null?null:(y=y.H)?y:((y=a.path)||typeof a.composedPath!="function"||(y=a.composedPath()),y&&y[0]&&y[0].H?y[0].H:null)}function pd(a,y,x,E,b,z){var tt=a.Qg;return a.Qg=a.cj,a.cj=tt,tt.diagram=a,tt.clickCount=1,a=tt.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),tt.modifiers=a,tt.event=y,tt.timestamp=y.timeStamp,tt.button=y.button,tt.buttons=y.buttons,Ji&&y.button===0&&y.ctrlKey&&(tt.button=2),tt.down=x,tt.up=E,tt.handled=!1,tt.bubbles=b,tt.isMultiTouch=z,tt}function rl(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}ge.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Wa(y,a,!1);switch(x.key=String.fromCharCode(a.which),x.down=!0,a.which){case 8:x.key="Backspace";break;case 33:x.key="PageUp";break;case 34:x.key="PageDown";break;case 35:x.key="End";break;case 36:x.key="Home";break;case 37:x.key="Left";break;case 38:x.key="Up";break;case 39:x.key="Right";break;case 40:x.key="Down";break;case 45:x.key="Insert";break;case 46:x.key="Del";break;case 48:x.key="0";break;case 187:case 61:case 107:x.key="Add";break;case 189:case 173:case 109:x.key="Subtract";break;case 27:x.key="Esc"}return y.doKeyDown(),rl(x,a)},ge.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Wa(y,a,!1);switch(x.key=String.fromCharCode(a.which),x.up=!0,a.which){case 8:x.key="Backspace";break;case 33:x.key="PageUp";break;case 34:x.key="PageDown";break;case 35:x.key="End";break;case 36:x.key="Home";break;case 37:x.key="Left";break;case 38:x.key="Up";break;case 39:x.key="Right";break;case 40:x.key="Down";break;case 45:x.key="Insert";break;case 46:x.key="Del"}return y.doKeyUp(),rl(x,a)},ge.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Wa(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),rl(x,a)},ge.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Wa(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),rl(x,a)},ge.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new Rt(0,0);var x=y.getBoundingClientRect();return y=a.clientX-this.Aa/x.width*x.left,a=a.clientY-this.ya/x.height*x.top,this.Ab!==null?_r(new Rt(y,a),this.Ab):new Rt(y,a)};function Lh(a,y,x){var E=a.ta,b=a.Aa,z=a.ya,tt=0,rt=0;E!==null&&(E=E.getBoundingClientRect(),tt=y.clientX-b/E.width*E.left,rt=y.clientY-z/E.height*E.top),x.viewPoint.h(tt,rt),a.Ab!==null?(y=Rt.allocAt(tt,rt),a.Ab.Cd(y),x.documentPoint.assign(y),Rt.free(y)):x.documentPoint.h(tt,rt)}function bg(a,y,x){if(a.oj[0]!==null){y=a.oj[y];var E=a.ta;E!==null&&(E=E.getBoundingClientRect(),x.h(y.clientX-a.Aa/E.width*E.left,y.clientY-a.ya/E.height*E.top))}}ge.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function md(a){a.ld||fs(a),a.Va()}ge.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},Bt=ge.prototype,Bt.Pz=function(){return this.kg},Bt.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,Ws(this),this.hf=!1,this.du=new Rt(NaN,NaN),y.isEnabled=x,this.ld=!0;var E=this;a!==null&&ti(function(){E.ld=!1,zl(y,"Model"),a(E)},1)},Bt.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;Fe.requestAnimationFrame(function(){y.kg&&y.bd()})}},Bt.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),Ws(this))};function ys(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||Th(a)||(y&&fs(a),x&&ka(a,!1))}function Ws(a,y){if(!a.ld&&(a.kg=!1,a.Ka!==null||a.wo.w())){a.ld=!0;var x=a.animationManager,E=a.Xn;if(!x.isAnimating&&E.length!==0){for(var b=E.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];mo(rt,!1),rt.v()}E.clear()}E=a.ow,0<E.count&&(E.each(function(ot){ot.Nv()}),E.clear()),b=E=!1,x.defaultAnimation.isAnimating&&(b=!0,E=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||Lf(a),ys(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(Xl(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),fs(a),z=!1,(!a.hf||a.xh)&&(a.hf?Cd(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),Cd(a,!1)),z=!0),a.Jk=!1,fs(a),a.ou||md(a),ys(a,!0,!1),tt=!1,z?(x=Me.alloc(),x.assign(a.viewportBounds),a.hf||(tt=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,vd(a)),a.R("LayoutCompleted"),ys(a,!0,!1),Me.free(x)):x.Ok&&x.Qw&&(a.Fg!==ws?a.scale=Fh(a,a.Fg):a.yh!==ws?a.scale=Fh(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),ka(a,!0)),z&&tt&&a.eb("Initial Layout"),fs(a),y||a.gc(a.ib),b&&(a.skipsUndoManager=E),a.ld=!1}}function vd(a){if(a.Fg!==ws)a.scale=Fh(a,a.Fg);else if(a.yh!==ws)a.scale=Fh(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}ka(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),Xl(a)}function fs(a){if(a.De.count!==0&&(a.ld||!a.animationManager.isTicking)){for(var y=0;23>y;y++){var x=a.De.iterator;if(x===null||a.De.count===0)break;a.De=new Ye,a.Nv(x,a.De)}a.nodes.each(function(E){E instanceof li&&E.U&65536&&(E.U=E.U^65536)})}}Bt.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof li||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof li&&x.isVisible()&&Eh(this,x);for(a.reset();a.next();)x=a.value,x instanceof tn&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x));for(a.reset();a.next();)x=a.value,x instanceof Wi&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function Eh(a,y){for(var x=Ce(),E=Ce(),b=y.memberParts;b.next();){var z=b.value;z.isVisible()&&(z instanceof li?(Na(z)||bs(z)||Rg(z))&&Eh(a,z):z instanceof tn?z.fromNode===y||z.toNode===y?E.push(z):x.push(z):(z.measure(1/0,1/0),z.arrange()))}for(a=x.length,b=0;b<a;b++)z=x[b],z.measure(1/0,1/0),z.arrange();for(Oe(x),y.measure(1/0,1/0),y.arrange(),a=E.length,y=0;y<a;y++)x=E[y],x.measure(1/0,1/0),x.arrange();Oe(E)}Bt.Fd=function(a,y,x,E){if(this.vd||this.animationManager.isAnimating)for(var b=0;b<y;b++)a[b].Fd(x,E)},Bt.gc=function(a){if(this.Ka!==null){if(this.ta===null&&pe("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){bh(this);var x=this.Aa,E=this.ya;if(a.Gv.resize(x,E,x,E),x=this.Wa.s,E=x.length,this.Fd(x,E,this,this.viewportBounds),this.Fc||y.isAnimating){y=this.pa;var b=this.Ca,z=Math.round(y.x*b)/b,tt=Math.round(y.y*b)/b,rt=this.Ab;for(rt.reset(),b!==1&&rt.scale(b),y.x===0&&y.y===0||rt.translate(-z,-tt),a.ti=null,bd(a,rt.m11,rt.m12,rt.m21,rt.m22,rt.dx,rt.dy),this.pb!==1&&(a.globalAlpha=this.pb),pu(this,a),y=this.Mb,this.ta.context.setTransform(y,0,0,y,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya),y=0;y<E;y++)x[y].gc(a,this);a=!1,this.Yf?ol(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(Li.prototype.Cd=Li.prototype.Eu),this.Fc=this.vd=!1}}}}else t:if(z=this.animationManager,!z.zb&&(!z.isAnimating||z.isTicking)&&(x=new Date,bh(this),this.Ka.style.opacity!=="0")){if(E=a!==this.ib,y=this.Wa.s,b=y.length,this.Fd(y,b,this,this.viewportBounds),E)a.Vc(!0),this.vd=!0;else if(!this.Fc&&!z.isAnimating)break t;z=this.Ab,z.reset(),tt=this.Mb,rt=this.pa;var ot=this.Ca,at=Math.round(rt.x*ot)/ot,At=Math.round(rt.y*ot)/ot;for(ot!==1&&z.scale(ot),rt.x===0&&rt.y===0||z.translate(-at,-At),a.setTransform(tt,0,0,tt,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),pu(this,a),rt=0;rt<b;rt++)a.setTransform(tt,0,0,tt,0,0),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),a.yc(),y[rt].gc(a,this);if(y=!1,this.Yf?ol(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(Li.prototype.Cd=Li.prototype.Eu),E?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,E=hr&&hr.nx,x=this.zw,E||this.Yh===null){for(x[this.Tq]=y,this.Tq=(this.Tq+1)%x.length,b=y=0;b<x.length;b++)y+=x[b];this.Sq=y/x.length}if(this.pb!==1&&(a.globalAlpha=1),E)for(a.setTransform(1,0,0,1,0,0),E=0;E<x.length;E++)a.fillText(x[E].toString(),20,150+ +(20*E))}}};function Mh(a,y,x,E,b,z,tt,rt,ot,at){if(a.Ka!==null){a.ta===null&&pe("No canvas specified"),tt===void 0&&(tt=null),rt===void 0&&(rt=null),ot===void 0&&(ot=!1),at===void 0&&(at=!1),bh(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var At=a.Ca;a.Ca=b;var ft=a.Wa.s,pt=ft.length;try{var xt=new Me(z.x,z.y,E.width/b,E.height/b),Ct=xt.copy();Ct.Co(x),Xl(a,Ct),fs(a),a.Fd(ft,pt,a,xt),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,E.width,E.height),rt!==null&&rt!==""&&(y.fillStyle=rt,y.ox(0,0,E.width,E.height));var Mt=a.Mb;y.scale(Mt,Mt);var Gt=Li.alloc();Gt.reset(),Gt.translate(x.left,x.top),Gt.scale(b),z.x===0&&z.y===0||Gt.translate(-z.x,-z.y),y.setTransform(Gt.m11,Gt.m12,Gt.m21,Gt.m22,Gt.dx,Gt.dy),y.yc(),y instanceof ia&&bd(y,Gt.m11,Gt.m12,Gt.m21,Gt.m22,Gt.dx,Gt.dy),Li.free(Gt),pu(a,y),y.globalAlpha=a.pb;var It=a.Qj("Grid");if(tt){var zt=new Ye,Yt=tt.iterator;for(Yt.reset();Yt.next();){var Xt=Yt.value;Xt instanceof jn&&(at||Xt.layer!==It)&&(Xt.Gj(),zt.add(Xt))}for(at=0;at<pt;at++)Lg(ft[at],y,a,zt,ot);zt.each(function(de){return de.Gj()})}else for(zt=0;zt<pt;zt++){var $t=ft[zt];$t===It?at&&$t.gc(y,a,!0):$t.gc(y,a,ot)}a.$i=!1,a.Yf&&ol(a.Yf,a)&&a.Vp()}finally{a.Ca=At,a.ib.Vc(!0),a.vd=!0,a.Fd(ft,pt,a,a.viewportBounds),Xl(a),a.ib instanceof ia&&(a.ib.Nj.PA(),a.redraw())}}}Bt.Gf=function(a){return this.Rg[a]},Bt.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},Bt.Tx=function(){this.Rg=new Yn,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(Ji||ri),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function pu(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}Bt.Ql=function(a){return this.on[a]},Bt.sA=function(a,y){this.on[a]=y},Bt.Sx=function(){this.on=new Yn,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},Bt.set=function(a){return Object.assign(this,a),this},Bt.Du=function(a){return this.nm(a)},Bt.nm=function(a){return kh(this,a),this};function kh(a,y){var x=a instanceof ze,E=a instanceof ge,b;for(b in y){b===""&&pe("Setting properties requires non-empty property names");var z=a,tt=b;if(x||E){var rt=b.indexOf(".");if(0<rt){var ot=b.substring(0,rt);x?z=a.fb(ot):(z=a[ot],z==null&&(z=a.toolManager[ot])),on(z)?tt=b.substr(rt+1):pe("Unable to find object named: "+ot+" in "+a.toString()+" when trying to set property: "+b)}}if(tt[0]!=="_"&&!Wn(z,tt))if(E&&tt==="ModelChanged"){a.Yw(y[tt]);continue}else if(E&&tt==="Changed"){a.Pe(y[tt]);continue}else if(E&&Wn(a.toolManager,tt))z=a.toolManager;else if(E&&Pd(a,tt)){a.Bj(tt,y[tt]);continue}else if(a instanceof Mn&&tt==="Changed"){a.Pe(y[tt]);continue}else pe('Trying to set undefined property "'+tt+'" on object: '+z.toString());z[tt]=y[b],tt[0]==="_"&&z instanceof te&&z.Vw(tt)}}Bt.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new Rn,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},Bt.N=function(a){if(a===void 0)this.Fc=!0,this.$b();else{var y=this.viewportBounds;a.w()&&y.Yc(a)&&(this.Fc=!0,this.$b())}this.R("InvalidateDraw")},ge.prototype.invalidateViewport=function(a,y){if(this.Fc!==!0)if(this.Fc=!0,this.nl==="svg")this.bd();else{var x=this.Gf("temporaryPixelRatio")===!0;if(this.Gf("viewportOptimizations")===!0&&this.scrollMode!==Hh&&this.rj.hi(0,0,0,0)&&y.width===a.width&&y.height===a.height){var E=this.scale,b=Math.max(a.y,y.y),z=Math.min(a.y+a.height,y.y+y.height);if(0<Math.max(0,Math.min(a.x+a.width,y.x+y.width)-Math.max(a.x,y.x))*E&&0<Math.max(0,z-b)*E){if(!(this.ld||(this.kg=!1,this.Ka===null||(this.ld=!0,this.documentBounds.w()||(E=Me.alloc(),bf(this,this.computeBounds(E)),Me.free(E)),E=this.ta,E===null||E instanceof Fs)))){var tt=this.Mb;b=this.Aa*tt;var rt=this.ya*tt,ot=this.scale*tt;z=Math.round(Math.round(y.x*ot)-Math.round(a.x*ot)),y=Math.round(Math.round(y.y*ot)-Math.round(a.y*ot)),ot=this.jw,a=this.oy,ot.width!==b&&(ot.width=b),ot.height!==rt&&(ot.height=rt),a.clearRect(0,0,b,rt),ot=190*tt;var at=70*tt,At=Math.max(z,0),ft=Math.max(y,0),pt=Math.floor(b-At),xt=Math.floor(rt-ft);a.drawImage(E.Oa,At,ft,pt,xt,0,0,pt,xt),ol(this.Yf,this)&&a.clearRect(0,0,ot,at),E=Ce(),a=Ce(),xt=Math.abs(z),pt=Math.abs(y);var Ct=At===0?0:b-xt;At=Rt.allocAt(Ct,0),xt=Rt.allocAt(xt+Ct,rt),a.push(new Me(Math.min(At.x,xt.x),Math.min(At.y,xt.y),Math.abs(At.x-xt.x),Math.abs(At.y-xt.y)));var Mt=this.Ab;if(Mt.reset(),Mt.scale(tt,tt),this.Ca!==1&&Mt.scale(this.Ca),tt=this.pa,(tt.x!==0||tt.y!==0)&&isFinite(tt.x)&&isFinite(tt.y)&&Mt.translate(-tt.x,-tt.y),_r(At,Mt),_r(xt,Mt),E.push(new Me(Math.min(At.x,xt.x),Math.min(At.y,xt.y),Math.abs(At.x-xt.x),Math.abs(At.y-xt.y))),Ct=ft===0?0:rt-pt,At.h(0,Ct),xt.h(b,pt+Ct),a.push(new Me(Math.min(At.x,xt.x),Math.min(At.y,xt.y),Math.abs(At.x-xt.x),Math.abs(At.y-xt.y))),_r(At,Mt),_r(xt,Mt),E.push(new Me(Math.min(At.x,xt.x),Math.min(At.y,xt.y),Math.abs(At.x-xt.x),Math.abs(At.y-xt.y))),ol(this.Yf,this)&&(b=0<z?0:-z,rt=0<y?0:-y,At.h(b,rt),xt.h(ot+b,at+rt),a.push(new Me(Math.min(At.x,xt.x),Math.min(At.y,xt.y),Math.abs(At.x-xt.x),Math.abs(At.y-xt.y))),_r(At,Mt),_r(xt,Mt),E.push(new Me(Math.min(At.x,xt.x),Math.min(At.y,xt.y),Math.abs(At.x-xt.x),Math.abs(At.y-xt.y)))),Rt.free(At),Rt.free(xt),ys(this,!1,!0),this.Ka===null&&pe("No div specified"),this.ta===null&&pe("No canvas specified"),!this.animationManager.zb&&(b=this.ib,this.Fc)){for(bh(this),rt=this.Mb,b.setTransform(1,0,0,1,0,0),b.clearRect(0,0,this.Aa*rt,this.ya*rt),b.drawImage(this.jw.Oa,0<z?0:Math.round(-z),0<y?0:Math.round(-y)),z=this.pa,tt=this.Ca,ot=Math.round(z.x*tt)/tt,at=Math.round(z.y*tt)/tt,y=this.Ab,y.reset(),tt!==1&&y.scale(tt),z.x===0&&z.y===0||y.translate(-ot,-at),b.save(),b.beginPath(),z=a.length,tt=0;tt<z;tt++)ot=a[tt],ot.width!==0&&ot.height!==0&&b.rect(Math.floor(ot.x),Math.floor(ot.y),Math.ceil(ot.width),Math.ceil(ot.height));for(b.clip(),b.setTransform(rt,0,0,rt,0,0),b.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),b.yc(),y=this.Wa.s,z=y.length,this.Fd(y,z,this,this.viewportBounds),pu(this,b),b.globalAlpha=this.pb,rt=0;rt<z;rt++)if(tt=y[rt],ot=E,tt.visible&&tt.pb!==0){at=UA(tt,b),ft=tt.Zq,ft.length=0,At=this.scale,pt=Me.alloc(),xt=tt.Pa.s,Mt=xt.length,Ct=ot.length;for(var Gt=0;Gt<Mt;Gt++){var It=xt[Gt],zt=zf(It,It.actualBounds);t:{for(var Yt=2/At,Xt=4/At,$t=0;$t<Ct;$t++){var de=ot[$t];if(de.width!==0&&de.height!==0&&zt.Vu(de.x-Yt,de.y-Yt,de.width+Xt,de.height+Xt)){zt=!0;break t}}zt=!1}zt&&tt.Oj(b,It,this,ft,At,pt,!0)}Me.free(pt),b.globalAlpha=at}b.restore(),b.Vc(!0),this.Yf&&ol(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}Oe(E),Oe(a),this.ld=!1}}else this.bd();x&&(Os(this),this.bd(),Ph(this,!0))}else x?(Os(this),this.bd(),Ph(this,!0)):this.bd()}};function bh(a){a.pn!==!1&&(a.pn=!1,yd(a,a.Aa,a.ya))}function yd(a,y,x){wl(a);var E=a.Mb;a.ta.resize(y*E,x*E,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function Th(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,E=a.ya,b=a.Ka,z=!1,tt=a.gf?a.Db:0,rt=a.Be?a.Db:0,ot=b.clientWidth||x+tt,at=b.clientHeight||E+rt,At=a.viewportBounds;b=At.x;var ft=At.y,pt=At.width,xt=At.height;if((ot!==x+tt||at!==E+rt)&&(a.gf=!1,a.Be=!1,rt=tt=0,a.Aa=ot,a.ya=at,z=a.pn=!0,wl(a)),!a.hf||!a.viewportBounds.w())return!0;var Ct=a.ku,Mt=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var Gt=a.documentBounds,It=0,zt=0,Yt=0,Xt=0,$t=At.width,de=At.height,An=a.rj;a.contentAlignment.sb()?(Gt.width>$t&&(It=An.left,zt=An.right),Gt.height>de&&(Yt=An.top,Xt=An.bottom)):(It=An.left,zt=An.right,Yt=An.top,Xt=An.bottom);var Bn=Gt.width+It+zt,vn=Gt.height+Yt+Xt;An=a.scale;var $e=Bn>ot/An,Re=vn>at/An;if(!(z||a.gf||a.Be||$e||Re))return!0;It=Gt.x-It,ot=At.x,zt=Gt.right+zt,at=At.right+tt,Yt=Gt.y-Yt;var ai=At.y;Gt=Gt.bottom+Xt,At=At.bottom+rt;var ei="1px";if(Xt="1px",a.scrollMode===DA&&($e||Re)&&($e&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&($e=1,It+1<ot&&($e=Math.max((ot-It)*An+a.Aa,$e)),zt>at+1&&($e=Math.max((zt-at)*An+a.Aa,$e)),$t+tt+1<Bn&&($e=Math.max((Bn-$t)*An+a.Aa,$e)),ei=$e.toString()+"px"),Re&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&($e=1,Yt+1<ai&&($e=Math.max((ai-Yt)*An+a.ya,$e)),Gt>At+1&&($e=Math.max((Gt-At)*An+a.ya,$e)),de+rt+1<vn&&($e=Math.max((vn-de)*An+a.ya,$e)),Xt=$e.toString()+"px")),$e=ei!=="1px",Re=Xt!=="1px",$e&&Re||!$e&&!Re||(Re&&(at-=a.Db),$e&&(At-=a.Db),Bn<$t+tt||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(tt=1,It+1<ot&&(tt=Math.max((ot-It)*An+a.Aa,tt)),zt>at+1&&(tt=Math.max((zt-at)*An+a.Aa,tt)),$t+1<Bn&&(tt=Math.max((Bn-$t)*An+a.Aa,tt)),ei=tt.toString()+"px"),$e=ei!=="1px",tt=a.ya,$e!==a.Be&&(tt=$e?a.ya-a.Db:a.ya+a.Db),vn<de+rt||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(rt=1,Yt+1<ai&&(rt=Math.max((ai-Yt)*An+tt,rt)),Gt>At+1&&(rt=Math.max((Gt-At)*An+tt,rt)),de+1<vn&&(rt=Math.max((vn-de)*An+tt,rt)),Xt=rt.toString()+"px"),Re=Xt!=="1px"),a.qr&&$e===a.Be&&Re===a.gf)return x===a.Aa&&E===a.ya||a.bd(),!1;if($e!==a.Be&&(ei==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=$e,Mt.style.width=ei,Re!==a.gf&&(Xt==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(rt=Rt.alloc(),Re?(y.style.left=a.Db+"px",a.position=rt.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=rt.h(a.pa.x-a.Db/a.scale,a.pa.y)),Rt.free(rt))),z&&wl(a),a.gf=Re,Mt.style.height=Xt,a.gu=!0,z&&(a.pn=!0),y=Ct.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&($t+1<Bn?y=(a.position.x-It)*An:It+1<ot?y=Ct.scrollWidth-Ct.clientWidth:zt>at+1&&(y=a.position.x*An)),a.tn)switch(a.bu){case"negative":y=-(Ct.scrollWidth-y-Ct.clientWidth);break;case"reverse":y=Ct.scrollWidth-y-Ct.clientWidth}return Ct.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(de+1<vn?Ct.scrollTop=(a.position.y-Yt)*An:Yt+1<ai?Ct.scrollTop=Ct.scrollHeight-Ct.clientHeight:Gt>At+1&&(Ct.scrollTop=a.position.y*An)),ot=a.Aa,at=a.ya,Ct.style.width=ot+(a.gf?a.Db:0)+"px",Ct.style.height=at+(a.Be?a.Db:0)+"px",x!==ot||E!==at||a.animationManager.zb?(x=Me.allocAt(b,ft,pt,xt),a.onViewportBoundsChanged(x,a.viewportBounds,An,z),Me.free(x),!1):!0}Bt=ge.prototype,Bt.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&pe("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+y.toString()),y=this.Qj(a.layerName),y===null&&(y=this.Qj("")),y===null&&pe('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==y)){var x=y.oi(99999999,a,a.diagram===this);0<=x&&this.cb(to,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},Bt.oi=function(a){this.partManager.oi(a);var y=this;ql(a,function(x){IA(y,x)}),(a instanceof Wi||a instanceof li&&a.placeholder!==null)&&a.v(),a.data!==null&&ql(a,function(x){xv(y.partManager,x)}),bs(a)!==!0&&Rg(a)!==!0||this.De.add(a),Hy(a,!0,this),Ry(a)?(a.actualBounds.w()&&this.N(zf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(zf(a,a.actualBounds)),this.$b()},Bt.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&ql(a,function(x){Bv(y.partManager,x,y)}),this.De.remove(a),Ry(a)?(a.actualBounds.w()&&this.N(zf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(zf(a,a.actualBounds)),this.$b()},Bt.remove=function(a){wd(this,a,!0)};function wd(a,y,x){var E=y.layer;E!==null&&E.diagram===a&&(y.isSelected=!1,y.isHighlighted=!1,y.C(2),x&&y.Lj(),x=E.pc(-1,y,!1),0<=x&&a.cb(Co,"parts",E,y,null,x,null),a=y.layerChanged,a!==null&&a(y,E,null))}Bt.Is=function(a,y){if(y===void 0&&(y=!1),ni(a))for(var x=a.length,E=0;E<x;E++){var b=a[E];y&&!b.canDelete()||this.remove(b)}else for(x=new Ye,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},Bt.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},ge.prototype.moveParts=function(a,y,x,E){if(x===void 0&&(x=!1),E===void 0&&(E=Tg(this)),this.toolManager!==null){var b=new Rn;if(a!==null)if(ni(a))for(var z=0;z<a.length;z++)fA(this,b,a[z],x,E);else for(a=a.iterator;a.next();)fA(this,b,a.value,x,E);else{for(a=this.parts;a.next();)fA(this,b,a.value,x,E);for(a=this.nodes;a.next();)fA(this,b,a.value,x,E);for(a=this.links;a.next();)fA(this,b,a.value,x,E)}qu(this,b,y,E,x)}};function fA(a,y,x,E,b,z){if(!y.contains(x)&&(z===void 0&&(z=!1),!E||z||x.canMove()||x.canCopy()))if(b===void 0&&(b=Tg(a)),x instanceof hn){if(y.add(x,a.Pd(b,x,x.location)),x instanceof li&&(x.placeholder!==null||b.dragsMembers))for(z=x.memberParts;z.next();)fA(a,y,z.value,E,b,b.groupsAlwaysMove);for(z=x.linksConnected;z.next();){var tt=z.value;if(!y.contains(tt)){var rt=tt.fromNode,ot=tt.toNode;rt!==null&&y.contains(rt)&&ot!==null&&y.contains(ot)&&fA(a,y,tt,E,b)}}if(b.dragsTree)for(x=x.Ou();x.next();)fA(a,y,x.value,E,b)}else if(x instanceof tn)for(y.add(x,a.Pd(b,x)),x=x.labelNodes;x.next();)fA(a,y,x.value,E,b);else x instanceof Wi||y.add(x,a.Pd(b,x,x.location))}function qu(a,y,x,E,b){if(y!==null&&y.count!==0){var z=Rt.alloc(),tt=Rt.alloc();tt.assign(x),isNaN(tt.x)&&(tt.x=0),isNaN(tt.y)&&(tt.y=0),(x=a.Mr)||Qg(a,y);for(var rt=Ce(),ot=Ce(),at=y.iterator,At=Rt.alloc();at.next();){var ft=at.key,pt=at.value;if(ft.Zc()){var xt=Ug(a,ft,y);xt!==null?rt.push(new it(ft,pt,xt)):(!b||ft.canMove())&&(xt=pt.point,z.assign(xt),a.computeMove(ft,z.add(tt),E,At),ft.location=At,pt.shifted===void 0&&(pt.shifted=new Rt),pt.shifted.assign(At.re(xt)))}else at.key instanceof tn&&ot.push(at.sa)}for(Rt.free(At),b=rt.length,at=0;at<b;at++)ft=rt[at],z.assign(ft.info.point),ft.Su.shifted===void 0&&(ft.Su.shifted=new Rt),ft.node.location=z.add(ft.Su.shifted);for(b=Rt.alloc(),at=Rt.alloc(),ft=ot.length,pt=0;pt<ft;pt++){var Ct=ot[pt];if(xt=Ct.key,xt instanceof tn)if(xt.suspendsRouting){xt.Tg=null,At=xt.fromNode;var Mt=xt.toNode;if(a.draggedLink!==null&&E.dragsLink)if(Mt=Ct.value.point,xt.dragComputation===null)y.add(xt,a.Pd(E,xt,tt)),qh(xt,tt.x-Mt.x,tt.y-Mt.y);else{Ct=Rt.allocAt(0,0),(At=xt.i(0))&&At.w()&&Ct.assign(At);var Gt=At=Rt.alloc().assign(Ct).add(tt);E.isGridSnapEnabled&&(E.isGridSnapRealtime||a.lastInput.up)&&(Gt=Rt.alloc(),Ng(a,xt,At,Gt,E)),At.assign(xt.dragComputation(xt,At,Gt)).re(Ct),y.add(xt,a.Pd(E,xt,At)),qh(xt,At.x-Mt.x,At.y-Mt.y),Rt.free(Ct),Rt.free(At),Gt!==At&&Rt.free(Gt)}else At!==null&&(b.assign(At.location),Gt=y.I(At),Gt!==null&&b.re(Gt.point)),Mt!==null&&(at.assign(Mt.location),Gt=y.I(Mt),Gt!==null&&at.re(Gt.point)),At!==null&&Mt!==null?b.Xa(at)?(At=Ct.value.point,Mt=z,Mt.assign(b),Mt.re(At),y.add(xt,a.Pd(E,xt,b)),qh(xt,Mt.x,Mt.y)):(xt.suspendsRouting=!1,xt.bb()):(Ct=Ct.value.point,At=At!==null?b:Mt!==null?at:tt,y.add(xt,a.Pd(E,xt,At)),qh(xt,At.x-Ct.x,At.y-Ct.y))}else(xt.fromNode===null||xt.toNode===null)&&(At=Ct.value.point,y.add(xt,a.Pd(E,xt,tt)),qh(xt,tt.x-At.x,tt.y-At.y))}Rt.free(z),Rt.free(tt),Rt.free(b),Rt.free(at),Oe(rt),Oe(ot),x||(fs(a),mu(a,y))}}ge.prototype.computeMove=function(a,y,x,E){if(E===void 0&&(E=new Rt),E.assign(y),a===null)return E;var b=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(b=Rt.alloc(),Ng(this,a,y,b,x)),x=a.dragComputation!==null?a.dragComputation(a,y,b):b;var tt=a.minLocation,rt=tt.x;isNaN(rt)&&(rt=z?Math.round(1e3*a.location.x)/1e3:a.location.x),tt=tt.y,isNaN(tt)&&(tt=z?Math.round(1e3*a.location.y)/1e3:a.location.y);var ot=a.maxLocation,at=ot.x;return isNaN(at)&&(at=z?Math.round(1e3*a.location.x)/1e3:a.location.x),ot=ot.y,isNaN(ot)&&(ot=z?Math.round(1e3*a.location.y)/1e3:a.location.y),E.h(Math.max(rt,Math.min(x.x,at)),Math.max(tt,Math.min(x.y,ot))),b!==y&&Rt.free(b),E};function Tg(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function Ng(a,y,x,E,b){if(b===void 0&&(b=Tg(a)),E.assign(x),y!==null){var z=a.grid;y=b.gridSnapCellSize,a=y.width,y=y.height;var tt=b.gridSnapOrigin,rt=tt.x;if(tt=tt.y,b=b.gridSnapCellSpot,z!==null){var ot=z.gridCellSize;isNaN(a)&&(a=ot.width),isNaN(y)&&(y=ot.height),z=z.gridOrigin,isNaN(rt)&&(rt=z.x),isNaN(tt)&&(tt=z.y)}z=Rt.allocAt(0,0),z.yi(0,0,a,y,b),re.No(x.x,x.y,rt+z.x,tt+z.y,a,y,E),Rt.free(z)}}function Qg(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof tn&&(y.suspendsRouting=!0)}function mu(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof tn&&(x.suspendsRouting=!1,lv(x)&&x.bb())}a.Mr=!1}}function Ug(a,y,x){return y=y.containingGroup,y!==null&&(a=Ug(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}Bt=ge.prototype,Bt.Pd=function(a,y,x){if(x===void 0)return new cA(Gr);var E=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(E=!1),E?new cA(new Rt(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new cA(x.copy())};function Sd(a,y,x){if(y.diagram!==null&&y.diagram!==a&&pe("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&pe("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&pe("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&pe("Cannot move a Layer before or after itself: "+y)),y.diagram!==a){y=y.name,a=a.Wa,x=a.count;for(var E=0;E<x;E++)a.M(E).name===y&&pe("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}Bt.Al=function(a){Sd(this,a,null),a.Xe(this);var y=this.Wa,x=y.count-1;if(!a.isTemporary)for(;0<=x&&y.M(x).isTemporary;)x--;return y.Gb(x+1,a),this.cc!==null&&this.cb(to,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},Bt.Ww=function(a,y){Sd(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(Co,"layers",this,a,null,E,null));var b=x.count,z;for(z=0;z<b;z++)if(x.M(z)===y){x.Gb(z,a);break}return this.cc!==null&&this.cb(to,"layers",this,null,a,null,z),this.N(),0>E&&this.Ya(),this},Bt.Cy=function(a,y){Sd(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(Co,"layers",this,a,null,E,null));var b=x.count,z;for(z=0;z<b;z++)if(x.M(z)===y){x.Gb(z+1,a);break}return this.cc!==null&&this.cb(to,"layers",this,null,a,null,z+1),this.N(),0>E&&this.Ya(),this},Bt.kA=function(a){if(a.diagram!==this&&pe("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram),a.name!==""){var y=this.Wa,x=y.indexOf(a);if(y.remove(a)){for(y=a.Pa.copy().iterator;y.next();){var E=y.value,b=E.layerName;b!==a.name?E.layerName=b:E.layerName=""}this.cc!==null&&this.cb(Co,"layers",this,a,null,x,null),this.N(),this.Ya()}}},Bt.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},Bt.Yw=function(a){return this.pf===null&&(this.pf=new Ke),this.pf.add(a),this.model.Pe(a),this},Bt.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},Bt.Pe=function(a){return this.zg===null&&(this.zg=new Ke),this.zg.add(a),this},Bt.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},Bt.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==Vs&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,E=0;E<x;E++)y.M(E)(a)},Bt.cb=function(a,y,x,E,b,z,tt){z===void 0&&(z=null),tt===void 0&&(tt=null);var rt=new Dr;rt.diagram=this,rt.change=a,rt.propertyName=y,rt.object=x,rt.oldValue=E,rt.oldParam=z,rt.newValue=b,rt.newParam=tt,this.ds(rt)},Bt.g=function(a,y,x,E,b){this.cb(Qr,a,this,y,x,E,b)},ge.prototype.changeState=function(a,y){if(a!==null&&a.diagram===this){var x=this.skipsModelSourceBindings;try{this.skipsModelSourceBindings=!0;var E=a.change;if(E===Qr){var b=a.object;if(Tr(b,a.propertyName,a.I(y)),b instanceof te){var z=b.part;z!==null&&z.Wb()}this.isModified=!0}else if(E===to){var tt=a.object,rt=a.newParam,ot=a.newValue;if(tt instanceof ze)if(typeof rt=="number"&&ot instanceof te){y?tt.pc(rt):tt.Gb(rt,ot);var at=tt.part;at!==null&&at.Wb()}else typeof rt=="number"&&ot instanceof Mo&&(ot.isRow?hy(tt,rt,y?void 0:ot):gy(tt,rt,y?void 0:ot));else if(tt instanceof Vo){var At=a.oldParam===!0;typeof rt=="number"&&ot instanceof jn&&(y?(ot.isSelected=!1,ot.isHighlighted=!1,ot.Wb(),tt.pc(At?rt:-1,ot,At)):tt.oi(rt,ot,At))}else tt instanceof ge?typeof rt=="number"&&ot instanceof Vo&&(y?this.Wa.mb(rt):(ot.Xe(this),this.Wa.Gb(rt,ot))):pe("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(E===Co){var ft=a.object,pt=a.oldParam,xt=a.oldValue;if(ft instanceof ze)typeof pt=="number"&&xt instanceof te?y?ft.Gb(pt,xt):ft.pc(pt):typeof pt=="number"&&xt instanceof Mo&&(xt.isRow?hy(ft,pt,y?xt:void 0):gy(ft,pt,y?xt:void 0));else if(ft instanceof Vo){var Ct=a.newParam===!0;typeof pt=="number"&&xt instanceof jn&&(y?0>ft.Pa.indexOf(xt)&&ft.oi(pt,xt,Ct):(xt.isSelected=!1,xt.isHighlighted=!1,xt.Wb(),ft.pc(Ct?pt:-1,xt,Ct)))}else ft instanceof ge?typeof pt=="number"&&xt instanceof Vo&&(y?(xt.Xe(this),this.Wa.Gb(pt,xt)):this.Wa.mb(pt)):pe("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else E!==Vs&&pe("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},ge.prototype.Ea=function(a){return this.undoManager.Ea(a)},ge.prototype.eb=function(a){return this.undoManager.eb(a)},ge.prototype.Kf=function(){return this.undoManager.Kf()},ge.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var E=!1;try{a(this),E=!0}finally{E?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},ge.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},ge.prototype.rp=function(){this.partManager.rp()};function xd(a,y,x){var E=a.animationManager;if(a.vb||a.ld)a.Ca=x,wl(a),a.N(),a.Ee=!0,E.zb&&(QA(E)||E.ce.add(E.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,wl(a);else{a.vb=!0;var b=a.viewportBounds.copy(),z=a.Aa,tt=a.ya,rt=a.zoomPoint.x,ot=a.zoomPoint.y,at=a.contentAlignment;isNaN(rt)&&(at.$c()?at.Hf(Fa)?rt=0:at.Hf(Ga)&&(rt=z-1):rt=at.sb()?at.x*(z-1):z/2),isNaN(ot)&&(at.$c()?at.Hf(dl)?ot=0:at.Hf(Ks)&&(ot=tt-1):ot=at.sb()?at.y*(tt-1):tt/2),a.scaleComputation===null||a.animationManager.defaultAnimation.isAnimating||(x=a.scaleComputation(a,x)),x<a.minScale&&(x=a.minScale),x>a.maxScale&&(x=a.maxScale),z=Rt.allocAt(a.pa.x+rt/y-rt/x,a.pa.y+ot/y-ot/x),a.position=z,Rt.free(z),a.Ca=x,wl(a),a.vb=!1,a.onViewportBoundsChanged(b,a.viewportBounds,y,!1),ka(a,!1),E.zb&&(QA(E)||E.ce.add(E.H,"scale",y,a.Ca))}}ge.prototype.onViewportBoundsChanged=function(a,y,x,E){if(!a.D(y)){E===void 0&&(E=!1),E||(this.Ee=!0),this.vd=!0;var b=this.layout;b===null||!b.isViewportSized||this.autoScale!==ws||a.width===y.width&&a.height===y.height||b.C(),b=this.currentTool,this.Vk===!0&&b instanceof br&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),ic(b,this)),this.vb||this.invalidateViewport(a,y),Xl(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.canvasSize.width=Math.round(a.width*x),this.fc.canvasSize.height=Math.round(a.height*x),this.fc.newCanvasSize.width=this.Aa,this.fc.newCanvasSize.height=this.ya,this.fc.isScroll=E,this.R("ViewportBoundsChanged",this.fc,a),this.isVirtualized&&this.links.each(function(z){z.isAvoiding&&z.actualBounds.Yc(y)&&z.bb()})}};function Xl(a,y){var x=a.fe;if(x!==null&&x.visible){for(var E=an.alloc(),b=1,z=1,tt=x.O.s,rt=tt.length,ot=0;ot<rt;ot++){var at=tt[ot],At=Math.abs(at.interval);2>At||(rh(at.figure)?z=z*At/re.vx(z,At):b=b*At/re.vx(b,At))}if(tt=x.gridCellSize,E.h(z*tt.width,b*tt.height),y!==void 0)b=y.width,z=y.height,a=y.x,tt=y.y;else{if(y=Me.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){Me.free(y);return}b=y.width,z=y.height,a=y.x,tt=y.y,Me.free(y)}x.width=b+2*E.width,x.height=z+2*E.height,y=Rt.alloc(),re.No(a,tt,0,0,E.width,E.height,y),y.offset(-E.width,-E.height),an.free(E),x.part.location=y,Rt.free(y)}}ge.prototype.clearSelection=function(a){a===void 0&&(a=!1);var y=this.selection;if(y.count!==0){a||this.R("ChangingSelection",y);for(var x=y.Fa(),E=x.length,b=0;b<E;b++)x[b].isSelected=!1;y.ka(),y.clear(),y.freeze(),a||this.R("ChangedSelection",y)}},ge.prototype.select=function(a){a!==null&&a.diagram===this&&(!a.isSelected||1<this.selection.count)&&(this.R("ChangingSelection",this.selection),this.clearSelection(!0),a.isSelected=!0,this.R("ChangedSelection",this.selection))},ge.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),ni(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];E instanceof jn||pe("Diagram.selectCollection given something that is not a Part: "+E),E.isSelected=!0}else for(a=a.iterator;a.next();)y=a.value,y instanceof jn||pe("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},ge.prototype.clearHighlighteds=function(){var a=this.highlighteds;if(0<a.count){for(var y=a.Fa(),x=y.length,E=0;E<x;E++)y[E].isHighlighted=!1;a.ka(),a.clear(),a.freeze()}},Bt=ge.prototype,Bt.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},Bt.Jz=function(a){a=new Ye().addAll(a);for(var y=this.highlighteds.copy().hp(a).iterator;y.next();)y.value.isHighlighted=!1;for(a=a.iterator;a.next();)y=a.value,y instanceof jn||pe("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},Bt.scroll=function(a,y,x){x===void 0&&(x=1);var E=y==="up"||y==="down",b=0,z=Rt.alloc();if(a==="pixel")b=x;else if(a==="line")b=x*(E?this.scrollVerticalLineChange:this.scrollHorizontalLineChange);else if(a==="page")a=E?this.viewportBounds.height:this.viewportBounds.width,a*=this.scale,a!==0&&(b=x*Math.max(a-(E?this.scrollVerticalLineChange:this.scrollHorizontalLineChange),0));else{if(a==="document"){b=this.documentBounds,x=this.viewportBounds,y==="up"?this.position=z.h(x.x,b.y):y==="left"?this.position=z.h(b.x,x.y):y==="down"?this.position=z.h(x.x,b.bottom-x.height):y==="right"&&(this.position=z.h(b.right-x.width,x.y)),Rt.free(z);return}pe("scrolling unit must be 'pixel', 'line', 'page', or 'document', not: "+a)}b/=this.scale,x=this.position,y==="up"?this.position=z.h(x.x,x.y-b):y==="down"?this.position=z.h(x.x,x.y+b):y==="left"?this.position=z.h(x.x-b,x.y):y==="right"?this.position=z.h(x.x+b,x.y):pe("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),Rt.free(z)},Bt.tv=function(a){var y=this.viewportBounds;y.Re(a)||(a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a)},Bt.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},Bt.op=function(a){var y=this.Ab;y.reset(),this.Ca!==1&&y.scale(this.Ca);var x=this.pa;return(x.x!==0||x.y!==0)&&isFinite(x.x)&&isFinite(x.y)&&y.translate(-x.x,-x.y),a.copy().transform(this.Ab)},Bt.zA=function(a){var y=this.Ab,x=a.x,E=a.y,b=x+a.width,z=E+a.height,tt=y.m11,rt=y.m12,ot=y.m21,at=y.m22,At=y.dx,ft=y.dy,pt=x*tt+E*ot+At;y=x*rt+E*at+ft;var xt=b*tt+E*ot+At;return a=b*rt+E*at+ft,E=x*tt+z*ot+At,x=x*rt+z*at+ft,tt=b*tt+z*ot+At,b=b*rt+z*at+ft,z=Math.min(pt,xt),pt=Math.max(pt,xt),xt=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,E),pt=Math.max(pt,E),xt=Math.min(xt,x),y=Math.max(y,x),z=Math.min(z,tt),pt=Math.max(pt,tt),xt=Math.min(xt,b),y=Math.max(y,b),new Me(z,xt,pt-z,y-xt)},Bt.Ps=function(a){var y=this.Ab;y.reset(),this.Ca!==1&&y.scale(this.Ca);var x=this.pa;return(x.x!==0||x.y!==0)&&isFinite(x.x)&&isFinite(x.y)&&y.translate(-x.x,-x.y),_r(a.copy(),this.Ab)};function dc(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function Nh(a){return a=Qf.get(a),a!==null?new a:new lr}ge.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,E=a.propertyName;if(x===Vs&&E[0]==="S")if(E==="StartingFirstTransaction"){var b=this;a=this.toolManager,a.mouseDownTools.each(function(ot){return ot.diagram=b}),a.mouseMoveTools.each(function(ot){return ot.diagram=b}),a.mouseUpTools.each(function(ot){return ot.diagram=b}),this.ld||this.hf||(this.Jk=!0,this.fn&&(this.kg=!0))}else E==="StartingUndo"||E==="StartingRedo"?(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc(),this.R("ChangingSelection",this.selection)):E==="StartedTransaction"&&(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc());else if(this.aa){this.aa=!1;try{if(a.modelChange===""&&x===Vs){(E==="FinishedUndo"||E==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),fs(this));var z=this.animationManager;E==="RolledBackTransaction"&&z.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||Gi(z),E==="CommittedTransaction"&&this.undoManager.isJustDiscarded&&(this.Ce=Math.min(this.Ce,this.undoManager.historyIndex-1)),E!=="CommittedTransaction"&&E!=="RolledBackTransaction"||!this.undoManager.isPendingUnmodified||setTimeout(function(){y.isModified=!1},1);var tt=a.isTransactionFinished;if(tt&&(dc(this),this.As.clear(),Vl(this.animationManager)),!this.Rt&&tt&&this.lastInput.targetDiagram){this.Rt=!0;var rt=this;ti(function(){rt.currentTool.standardMouseOver(),rt.Rt=!1},10)}}}finally{this.aa=!0}}}};function IA(a,y){y=y.O.s;for(var x=y.length,E=0;E<x;E++)$u(a,y[E])}function $u(a,y){if(y instanceof Sa){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof Ye&&x.Bg.add(a);var E=y.Eg;if(E!==null&&E.sq===!0&&y.diagram!==null&&y.diagram.Xn.add(y),x.hn)if(x=x.getAttribute("src")||"",E=a.Og.I(x),E===null)E=[],E.push(y),a.Og.add(x,E);else{for(a=0;a<E.length;a++)if(E[a]===y)return;E.push(y)}}}}function kf(a,y){if(y instanceof Sa){var x=y.element;if(x!==null&&x instanceof HTMLImageElement&&x.hn){var E=x.getAttribute("src")||"",b=a.Og.I(E);if(b!==null){for(var z=0;z<b.length;z++)if(b[z]===y){b.splice(z,1),b.length===0&&(a.Og.remove(E),x.Fq&&x.removeEventListener("load",x.Fq),x.Yp&&x.removeEventListener("error",x.Yp),delete x.Fq,delete x.Yp,x.Bg instanceof Ye&&x.Bg.remove(a),xc(E));break}}}}}ge.prototype.Wd=function(){this.partManager.Wd()},ge.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},ge.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},ge.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},ge.prototype.Vb=function(a){return this.partManager.Vb(a)},ge.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},Bt=ge.prototype,Bt.Lc=function(a){return this.partManager.Lc(a)},Bt.ii=function(a){return this.partManager.ii(a)},Bt.Kc=function(a){return this.partManager.Kc(a)},Bt.ms=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];return this.partManager.ms.apply(this.partManager,y instanceof Array?y:cn(Dn(y)))},Bt.ls=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];return this.partManager.ls.apply(this.partManager,y instanceof Array?y:cn(Dn(y)))};function wl(a){var y=a.pa,x=a.Ca;a.Rw.h(y.x,y.y,Math.max(a.Aa,0)/x,Math.max(a.ya,0)/x),a.vd=!0}function bf(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),ka(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}Bt.Va=function(){if(this.Zi){var a=Me.alloc();bf(this,this.computeBounds(a)),Me.free(a)}},Bt.rz=function(){for(var a=new Ye,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&a.add(x)}for(y=this.links;y.next();)x=y.value,x.isTopLevel&&a.add(x);return a.iterator},Bt.qz=function(){return this.ai.iterator},Bt.Uz=function(a){fs(this),a&&Ig(this,!0),this.ld?Cd(this,!1):(this.Jk=!0,Ws(this))};function Ig(a,y){for(var x=a.ai.iterator;x.next();)Bd(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function Bd(a,y,x){if(y!==null){for(var E=y.gl.iterator;E.next();)Bd(a,E.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function Cd(a,y){if(a.xh&&!a.lt){var x=a.aa;a.aa=!0;var E=a.undoManager.transactionLevel,b=a.layout,z=a.animationManager;try{E===0&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout")),1>=E&&!z.defaultAnimation.isAnimating&&!z.zb&&(y||zl(z,"Layout")),a.xh=!1;for(var tt=a.ai.iterator;tt.next();)Qh(a,tt.value,y,E);b.isValidLayout||(!y||b.isRealtime||b.isRealtime===null||E===0?(b.doLayout(a),fs(a),b.isValidLayout=!0):a.xh=!0)}finally{y=a.undoManager.isInternalTransaction,E===0&&(a.eb("Layout"),a.undoManager.isInternalTransaction=!1),!y||E!==0&&E!==1||Gi(z),a.aa=x}}}function Qh(a,y,x,E){if(y!==null){for(var b=y.gl.iterator;b.next();)Qh(a,b.value,x,E);b=y.layout,b===null||b.isValidLayout||(!x||b.isRealtime||E===0?(y.rh=!y.location.w(),b.doLayout(y),y.C(32),Eh(a,y),b.isValidLayout=!0):a.xh=!0)}}Bt.yz=function(){for(var a=new Ke,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function cc(a){function y(b){var z=b.toLowerCase(),tt=new Ke;x.add(b,tt),x.add(z,tt),E.add(b,b),E.add(z,b)}var x=new Rn,E=new Rn;y("InitialAnimationStarting"),y("AnimationStarting"),y("AnimationFinished"),y("BackgroundSingleClicked"),y("BackgroundDoubleClicked"),y("BackgroundContextClicked"),y("ClipboardChanged"),y("ClipboardPasted"),y("DocumentBoundsChanged"),y("ExternalObjectsDropped"),y("GainedFocus"),y("InitialLayoutCompleted"),y("LayoutCompleted"),y("LinkDrawn"),y("LinkRelinked"),y("LinkReshaped"),y("LostFocus"),y("Modified"),y("ObjectSingleClicked"),y("ObjectDoubleClicked"),y("ObjectContextClicked"),y("PartCreated"),y("PartResized"),y("PartRotated"),y("SelectionMoved"),y("SelectionCopied"),y("SelectionDeleting"),y("SelectionDeleted"),y("SelectionGrouped"),y("SelectionUngrouped"),y("ChangingSelection"),y("ChangedSelection"),y("SubGraphCollapsed"),y("SubGraphExpanded"),y("TextEdited"),y("TreeCollapsed"),y("TreeExpanded"),y("ViewportBoundsChanged"),y("InvalidateDraw"),a.iw=x,a.hw=E}function Pd(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function Tf(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;pe("Unknown DiagramEvent name: "+y)}Bt.Bj=function(a,y){return a=Tf(this,a),a!==null&&a.add(y),this},Bt.am=function(a,y){a=Tf(this,a),a!==null&&a.remove(y)},Bt.R=function(a,y,x){var E=Tf(this,a),b=new tu;if(b.diagram=this,a=Pd(this,a),a!==null&&(b.name=a),y!==void 0&&(b.subject=y),x!==void 0&&(b.parameter=x),y=E.length,y===1)E.M(0)(b);else if(y!==0)for(E=E.Fa(),x=0;x<y;x++)(0,E[x])(b)};function Nf(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}Bt.Yj=function(a,y){return Dg(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},ge.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?il(this,a):a.assign(this.documentBounds)};function Dg(a,y,x,E){var b=a.Xh;if(b===null&&(a.Xh=b=new Sp(a.avoidanceCellSize)),b.vs||b.group!==x||b.Yx!==E){if(b.Hx=Math.max(b.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.width)),b.Ix=Math.max(b.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.height)),x!==null&&(x=th(a,x)),x===null){y=Me.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),b.initialize(y);for(var z=a.nodes;z.next();){var tt=z.value,rt=tt.layer;rt!==null&&rt.visible&&!rt.isTemporary&&Uh(a,tt,E,y)}Me.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),b.initialize(y)),y=Me.alloc(),z=x.memberParts;z.next();)tt=z.value,tt instanceof hn&&Uh(a,tt,E,y);Me.free(y)}b.group=x,b.Yx=E,b.vs=!1}else y&&ow(b);return b}function th(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?th(a,y.containingGroup):null}function Uh(a,y,x,E){if(y!==x&&y.isVisible()){if(y.avoidable&&!y.isLinkLabel){y=y.getAvoidableRect(E),a=a.Xh;var b=y.x,z=y.y;if(Ec(a,b,z))for(x=(z-a.Od)/a.sc|0,E=Math.min((b+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((z+y.height-a.Od)/a.sc|0,a.ei),b=(b-a.Nd)/a.rc|0;b<=E;b++)if(z=a.ac[b],z.fill)z.fill(tg,x,y+1);else for(var tt=x;tt<=y;tt++)z[tt]=tg}else if(y instanceof li)for(y=y.memberParts;y.next();)b=y.value,b instanceof hn&&Uh(a,b,x,E)}}function Zl(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}ge.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():Fd(this)};function Fd(a){a.vk===-1&&(a.vk=ti(function(){if(a.vk!==-1&&(a.ug(),a.lastInput.event!==null)){var y=a.computeAutoScrollPosition(a.wp);y.Xa(a.position)||(a.position=y,a.lastInput.documentPoint=a.Ps(a.wp),a.doMouseMove(),a.Zi=!0,y=Me.alloc(),a.computeBounds(y),y.ed(a.documentBounds),bf(a,y),Me.free(y),a.Fc=!0,a.bd(),Fd(a))}},a.vp))}ge.prototype.ug=function(){this.vk!==-1&&(Fe.clearTimeout(this.vk),this.vk=-1)},ge.prototype.computeAutoScrollPosition=function(a){var y=this.position,x=this.xp;if(0>=x.top&&0>=x.left&&0>=x.right&&0>=x.bottom)return y;var E=this.viewportBounds,b=this.scale;E=Me.allocAt(0,0,E.width*b,E.height*b);var z=Rt.allocAt(0,0);if(a.x>=E.x&&a.x<E.x+x.left&&this.allowHorizontalScroll){var tt=Math.max(this.scrollHorizontalLineChange,1);tt|=0,z.x-=tt,a.x<E.x+x.left/2&&(z.x-=tt),a.x<E.x+x.left/4&&(z.x-=4*tt)}else a.x<=E.x+E.width&&a.x>E.x+E.width-x.right&&this.allowHorizontalScroll&&(tt=Math.max(this.scrollHorizontalLineChange,1),tt|=0,z.x+=tt,a.x>E.x+E.width-x.right/2&&(z.x+=tt),a.x>E.x+E.width-x.right/4&&(z.x+=4*tt));return a.y>=E.y&&a.y<E.y+x.top&&this.allowVerticalScroll?(tt=Math.max(this.scrollVerticalLineChange,1),tt|=0,z.y-=tt,a.y<E.y+x.top/2&&(z.y-=tt),a.y<E.y+x.top/4&&(z.y-=4*tt)):a.y<=E.y+E.height&&a.y>E.y+E.height-x.bottom&&this.allowVerticalScroll&&(tt=Math.max(this.scrollVerticalLineChange,1),tt|=0,z.y+=tt,a.y>E.y+E.height-x.bottom/2&&(z.y+=tt),a.y>E.y+E.height-x.bottom/4&&(z.y+=4*tt)),z.Xa(Gr)||(y=new Rt(y.x+z.x/b,y.y+z.y/b)),Me.free(E),Rt.free(z),y},Bt=ge.prototype,Bt.Cs=function(){return null},Bt.av=function(){return null},Bt.bs=function(a,y){this.pj.add(a,y)},Bt.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof li&&(y.$p=null)})};function Hg(a,y,x){function E(){var At=+new Date;for(z=!0,tt.reset();tt.next();)if(!tt.value[0].al){z=!1;break}z||At-at>ot?y(x,b,rt):Fe.requestAnimationFrame(E)}for(var b=x.callback,z=!0,tt=a.Og.iterator;tt.next();)if(!tt.value[0].al){z=!1;break}if(typeof b!="function"||z)return y(x,b,a);var rt=a,ot=x.callbackTimeout||300,at=+new Date;return Fe.requestAnimationFrame(function(){E()}),null}Bt.Wz=function(a){return jr?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Bt.Jx=function(a){return a===void 0&&(a={}),Hg(this,this.Xz,a)},Bt.Xz=function(a,y,x){var E=pc(x,a,"canvas",null);if(E===null)return null;x=E.Z.canvas;var b=null;if(x!==null)switch(b=a.returnType,b===void 0?b="string":b=b.toLowerCase(),b){case bl+"data":b=E.getImageData(0,0,x.width,x.height);break;case bl:E=(a.document||document).createElement("img"),E.src=x.toDataURL(a.type,a.details),b=E;break;case"blob":return typeof y!="function"&&pe('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.'),typeof x.toBlob=="function"?(x.toBlob(y,a.type,a.details),"toBlob"):(y(null),null);default:b=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(b),null):b};function pc(a,y,x,E){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&pe("properties argument must be an Object.");var b=y.size||null,z=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(z="NaN");var tt=y.maxSize;y.maxSize===void 0&&(tt=x==="SVG"?new an(1/0,1/0):new an(2e3,2e3));var rt=y.position||null,ot=y.parts||null,at=y.padding===void 0?1:y.padding,At=y.background||null,ft=y.omitTemporary;ft===void 0&&(ft=!0);var pt=y.document||document,xt=y.elementFinished||null,Ct=y.showTemporary;Ct===void 0&&(Ct=!ft),y=y.showGrid,y===void 0&&(y=Ct),b!==null&&isNaN(b.width)&&isNaN(b.height)&&(b=null),typeof at=="number"?at=new Pi(at):at instanceof Pi||pe("MakeImage padding must be a Margin or a number."),at.left=Math.max(at.left,0),at.right=Math.max(at.right,0),at.top=Math.max(at.top,0),at.bottom=Math.max(at.bottom,0),a.ib.Vc(!0),ft=new al(null,pt,void 0,!0);var Mt=ft.context;if(!(b||z||ot||rt))return ft.width=a.Aa+Math.ceil(at.left+at.right),ft.height=a.ya+Math.ceil(at.top+at.bottom),x==="SVG"?E===null?null:(E.resize(ft.width,ft.height,ft.width,ft.height),E.ownerDocument=pt,E.hs=xt,Mh(a,E.context,at,new an(ft.width,ft.height),a.Ca,a.pa,ot,At,Ct,y),E.context):(a.Xm=!1,Mh(a,Mt,at,new an(ft.width,ft.height),a.Ca,a.pa,ot,At,Ct,y),a.Xm=!0,ft.context);var Gt=a.Pp,It=a.documentBounds.copy();if(It.Fv(a.yb),Ct)for(var zt=a.Wa.s,Yt=zt.length,Xt=0;Xt<Yt;Xt++){var $t=zt[Xt];if($t.visible&&$t.isTemporary){$t=$t.Pa.s;for(var de=$t.length,An=0;An<de;An++){var Bn=$t[An];Bn.isInDocumentBounds&&Bn.isVisible()&&(Bn=Bn.actualBounds,Bn.w()&&It.ed(Bn))}}}if(zt=new Rt(It.x,It.y),ot!==null){for(Yt=new Me(0,0,0,0),Xt=!0,$t=ot.iterator,$t.reset();$t.next();)de=$t.value,de instanceof jn&&(An=de.layer,An!==null&&!An.visible||An!==null&&!Ct&&An.isTemporary||!de.isVisible()||(de=de.actualBounds,de.w()&&(Xt?(Xt=!1,Yt.assign(de)):Yt.ed(de))));It.width=Yt.width,It.height=Yt.height,zt.x=Yt.x,zt.y=Yt.y}return rt!==null&&rt.w()&&(zt=rt,z||(z=Gt)),Yt=rt=0,at!==null&&(rt=at.left+at.right,Yt=at.top+at.bottom),Xt=$t=0,b!==null&&($t=b.width,Xt=b.height,isFinite($t)&&($t=Math.max(0,$t-rt)),isFinite(Xt)&&(Xt=Math.max(0,Xt-Yt))),b!==null&&z!==null?(z==="NaN"&&(z=Gt),b.w()?(b=$t,It=Xt):isNaN(Xt)?(b=$t,It=It.height*z):(b=It.width*z,It=Xt)):b!==null?b.w()?(z=Math.min($t/It.width,Xt/It.height),b=$t,It=Xt):isNaN(Xt)?(z=$t/It.width,b=$t,It=It.height*z):(z=Xt/It.height,b=It.width*z,It=Xt):z!==null?z==="NaN"&&tt.w()?(z=Math.min((tt.width-rt)/It.width,(tt.height-Yt)/It.height),z>Gt?(z=Gt,b=It.width,It=It.height):(b=tt.width,It=tt.height)):(b=It.width*z,It=It.height*z):(z=Gt,b=It.width,It=It.height),at!==null?(b+=rt,It+=Yt):at=new Pi(0),tt!==null&&(Gt=tt.width,tt=tt.height,isNaN(Gt)&&(Gt=2e3),isNaN(tt)&&(tt=2e3),isFinite(Gt)&&(b=Math.min(b,Gt)),isFinite(tt)&&(It=Math.min(It,tt))),ft.width=Math.ceil(b),ft.height=Math.ceil(It),x==="SVG"?E===null?null:(E.resize(ft.width,ft.height,ft.width,ft.height),E.ownerDocument=pt,E.hs=xt,Mh(a,E.context,at,new an(Math.ceil(b),Math.ceil(It)),z,zt,ot,At,Ct,y),E.context):(a.Xm=!1,Mh(a,Mt,at,new an(Math.ceil(b),Math.ceil(It)),z,zt,ot,At,Ct,y),a.Xm=!0,ft.context)}Ie.Object.defineProperties(ge.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof dt||(a===""&&(a="default"),a=a.toLowerCase(),a!==this.nl&&(this.nl=a,a==="default"||a==="canvas"?(a=this.pj.get("svg"),a!==null&&a.Oa.remove(),this.ta&&(this.ib=this.ta.context)):a==="svg"?(this.pj.contains("svg")?a=this.pj.get("svg"):(a=new Fs(this,Fe.document),this.bs("svg",a)),this.div!==null&&this.div.appendChild(a.Oa),this.ib=a.context,this.ta&&(this.ta.context.setTransform(this.Mb,0,0,this.Mb,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya))):a!=="debug"||this.pj.contains("SVG")||(a=new Fs(this,Fe.document),this.bs("SVG",a),a.Oa.style.backgroundColor="whitesmoke",this.div!==null&&this.div.after(a.Oa)),this.hk()))}},div:{get:function(){return this.Ka},set:function(a){if(this.Ka!==a){var y=this.Ka;y!==null?(y.H=void 0,y.goDiagram=void 0,y.go=void 0,y.innerHTML="",this.ta!==null&&(y=this.ta.Oa,this.removeEventListener(y,"pointermove",this.dk,!1),this.removeEventListener(y,"pointerdown",this.ui,!1),this.removeEventListener(y,"pointerup",this.fk,!1),this.removeEventListener(y,"pointerout",this.ek,!1),this.removeEventListener(y,"pointercancel",this.ck,!1),this.ta.mx()),this.ol&&(this.ol.disconnect(),this.ol=null),y=this.toolManager,y!==null&&(y.mouseDownTools.each(function(x){x.cancelWaitAfter()}),y.mouseMoveTools.each(function(x){x.cancelWaitAfter()}),y.mouseUpTools.each(function(x){x.cancelWaitAfter()})),y.cancelWaitAfter(),this.currentTool.doCancel(),this.ta=null,this.removeEventListener(Fe,"resize",this.Ov,!1),this.removeEventListener(Fe,"wheel",this.$j,!0),Yl===this&&(Yl=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Eg(this,a),this.hk())}}},$w:{get:function(){return this.Sq}},pi:{get:function(){return this.hf}},draggedLink:{get:function(){return this.nt},set:function(a){this.nt!==a&&(this.nt=a,a!==null&&(this.Vt=a.fromPort,this.Wt=a.toPort))}},Mx:{get:function(){return this.Vt},set:function(a){this.Vt=a}},Nx:{get:function(){return this.Wt},set:function(a){this.Wt=a}},animationManager:{get:function(){return this.Yd}},undoManager:{get:function(){return this.cc.undoManager}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a,this.cc.skipsUndoManager=a}},delaysLayout:{get:function(){return this.lt},set:function(a){this.lt=a}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&pi(a,"0 <= value <= 1",ge,"opacity"),this.pb=a,this.g("opacity",y,a),this.N())}},validCycle:{get:function(){return this.wu},set:function(a){var y=this.wu;y!==a&&(this.wu=a,this.g("validCycle",y,a))}},layers:{get:function(){return this.Wa.iterator}},isModelReadOnly:{get:function(){var a=this.cc;return a===null?!1:a.isReadOnly},set:function(a){var y=this.cc;y!==null&&(y.isReadOnly=a)}},isReadOnly:{get:function(){return this.Gg},set:function(a){var y=this.Gg;y!==a&&(this.Gg=a,this.g("isReadOnly",y,a))}},isEnabled:{get:function(){return this.Jd},set:function(a){var y=this.Jd;y!==a&&(this.Jd=a,this.g("isEnabled",y,a))}},allowClipboard:{get:function(){return this.Us},set:function(a){var y=this.Us;y!==a&&(this.Us=a,this.g("allowClipboard",y,a))}},allowCopy:{get:function(){return this.Fi},set:function(a){var y=this.Fi;y!==a&&(this.Fi=a,this.g("allowCopy",y,a))}},allowDelete:{get:function(){return this.Gi},set:function(a){var y=this.Gi;y!==a&&(this.Gi=a,this.g("allowDelete",y,a))}},allowDragOut:{get:function(){return this.Vs},set:function(a){var y=this.Vs;y!==a&&(this.Vs=a,this.g("allowDragOut",y,a))}},allowDrop:{get:function(){return this.Ws},set:function(a){var y=this.Ws;y!==a&&(this.Ws=a,this.g("allowDrop",y,a))}},allowTextEdit:{get:function(){return this.Pi},set:function(a){var y=this.Pi;y!==a&&(this.Pi=a,this.g("allowTextEdit",y,a))}},allowGroup:{get:function(){return this.Hi},set:function(a){var y=this.Hi;y!==a&&(this.Hi=a,this.g("allowGroup",y,a))}},allowUngroup:{get:function(){return this.Qi},set:function(a){var y=this.Qi;y!==a&&(this.Qi=a,this.g("allowUngroup",y,a))}},allowInsert:{get:function(){return this.Ys},set:function(a){var y=this.Ys;y!==a&&(this.Ys=a,this.g("allowInsert",y,a))}},allowLink:{get:function(){return this.Ii},set:function(a){var y=this.Ii;y!==a&&(this.Ii=a,this.g("allowLink",y,a))}},allowRelink:{get:function(){return this.Ki},set:function(a){var y=this.Ki;y!==a&&(this.Ki=a,this.g("allowRelink",y,a))}},allowMove:{get:function(){return this.Ji},set:function(a){var y=this.Ji;y!==a&&(this.Ji=a,this.g("allowMove",y,a))}},allowReshape:{get:function(){return this.Li},set:function(a){var y=this.Li;y!==a&&(this.Li=a,this.g("allowReshape",y,a))}},allowResize:{get:function(){return this.Mi},set:function(a){var y=this.Mi;y!==a&&(this.Mi=a,this.g("allowResize",y,a))}},allowRotate:{get:function(){return this.Ni},set:function(a){var y=this.Ni;y!==a&&(this.Ni=a,this.g("allowRotate",y,a))}},allowSelect:{get:function(){return this.Oi},set:function(a){var y=this.Oi;y!==a&&(this.Oi=a,this.g("allowSelect",y,a))}},allowUndo:{get:function(){return this.Zs},set:function(a){var y=this.Zs;y!==a&&(this.Zs=a,this.g("allowUndo",y,a))}},allowZoom:{get:function(){return this.at},set:function(a){var y=this.at;y!==a&&(this.at=a,this.g("allowZoom",y,a))}},hasVerticalScrollbar:{get:function(){return this.nn},set:function(a){var y=this.nn;y!==a&&(this.nn=a,this.Ee=!0,this.N(),this.g("hasVerticalScrollbar",y,a),ka(this,!1))}},hasHorizontalScrollbar:{get:function(){return this.mn},set:function(a){var y=this.mn;y!==a&&(this.mn=a,this.Ee=!0,this.N(),this.g("hasHorizontalScrollbar",y,a),ka(this,!1))}},allowHorizontalScroll:{get:function(){return this.Xs},set:function(a){var y=this.Xs;y!==a&&(this.Xs=a,this.g("allowHorizontalScroll",y,a),ka(this,!1))}},allowVerticalScroll:{get:function(){return this.$s},set:function(a){var y=this.$s;y!==a&&(this.$s=a,this.g("allowVerticalScroll",y,a),ka(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&pi(a,">= 0",ge,"scrollHorizontalLineChange"),this.iu=a,this.g("scrollHorizontalLineChange",y,a))}},scrollVerticalLineChange:{get:function(){return this.mu},set:function(a){var y=this.mu;y!==a&&(0>a&&pi(a,">= 0",ge,"scrollVerticalLineChange"),this.mu=a,this.g("scrollVerticalLineChange",y,a))}},lastInput:{get:function(){return this.cj},set:function(a){this.cj=a}},previousInput:{get:function(){return this.Qg},set:function(a){this.Qg=a}},firstInput:{get:function(){return this.bq},set:function(a){this.bq=a}},currentCursor:{get:function(){return this.it},set:function(a){if(a===""&&(a=this.Op),this.it!==a){var y=this.ta,x=this.Ka;if(y!==null&&x!==null){this.it=a;var E=y.style.cursor;y.style.cursor=a,x.style.cursor=a,y.style.cursor===E&&(y.style.cursor="-webkit-"+a,x.style.cursor="-webkit-"+a,y.style.cursor===E&&(y.style.cursor="-moz-"+a,x.style.cursor="-moz-"+a,y.style.cursor===E&&(y.style.cursor=a,x.style.cursor=a)))}}}},defaultCursor:{get:function(){return this.Op},set:function(a){a===""&&(a="auto");var y=this.Op;y!==a&&(this.Op=a,this.g("defaultCursor",y,a))}},click:{get:function(){return this.zh},set:function(a){var y=this.zh;y!==a&&(this.zh=a,this.g("click",y,a))}},doubleClick:{get:function(){return this.Fh},set:function(a){var y=this.Fh;y!==a&&(this.Fh=a,this.g("doubleClick",y,a))}},contextClick:{get:function(){return this.Bh},set:function(a){var y=this.Bh;y!==a&&(this.Bh=a,this.g("contextClick",y,a))}},mouseOver:{get:function(){return this.Qh},set:function(a){var y=this.Qh;y!==a&&(this.Qh=a,this.g("mouseOver",y,a))}},mouseHover:{get:function(){return this.Oh},set:function(a){var y=this.Oh;y!==a&&(this.Oh=a,this.g("mouseHover",y,a))}},mouseHold:{get:function(){return this.Nh},set:function(a){var y=this.Nh;y!==a&&(this.Nh=a,this.g("mouseHold",y,a))}},mouseDragOver:{get:function(){return this.Qt},set:function(a){var y=this.Qt;y!==a&&(this.Qt=a,this.g("mouseDragOver",y,a))}},mouseDrop:{get:function(){return this.Lh},set:function(a){var y=this.Lh;y!==a&&(this.Lh=a,this.g("mouseDrop",y,a))}},handlesDragDropForTopLevelParts:{get:function(){return this.xt},set:function(a){var y=this.xt;y!==a&&(this.xt=a,this.g("handlesDragDropForTopLevelParts",y,a))}},mouseEnter:{get:function(){return this.Mh},set:function(a){var y=this.Mh;y!==a&&(this.Mh=a,this.g("mouseEnter",y,a))}},mouseLeave:{get:function(){return this.Ph},set:function(a){var y=this.Ph;y!==a&&(this.Ph=a,this.g("mouseLeave",y,a))}},toolTip:{get:function(){return this.$h},set:function(a){var y=this.$h;y!==a&&(this.$h=a,this.g("toolTip",y,a))}},contextMenu:{get:function(){return this.Ch},set:function(a){var y=this.Ch;y!==a&&(this.Ch=a,this.g("contextMenu",y,a))}},commandHandler:{get:function(){return this.nb},set:function(a){this.nb!==a&&(this.nb=a,a.Xe(this))}},toolManager:{get:function(){return this.te},set:function(a){this.te!==a&&(this.te=a,a.diagram=this)}},defaultTool:{get:function(){return this.ob},set:function(a){var y=this.ob;y!==a&&(this.ob=a,a.diagram=this,this.currentTool===y&&(this.currentTool=a))}},currentTool:{get:function(){return this.hb},set:function(a){var y=this.hb;y&&(y.isActive&&y.doDeactivate(),y.cancelWaitAfter(),y.doStop()),a===null&&(a=this.defaultTool),a!==null&&(this.hb=a,a.diagram=this,a.doStart())}},selection:{get:function(){return this.Hw}},maxSelectionCount:{get:function(){return this.Nt},set:function(a){var y=this.Nt;if(y!==a)if(0<=a&&!isNaN(a)){if(this.Nt=a,this.g("maxSelectionCount",y,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0<a)){this.R("ChangingSelection",this.selection),y=this.selection.Fa();for(var x=0;x<a;x++)y[x].isSelected=!1;this.R("ChangedSelection",this.selection)}}else pi(a,">= 0",ge,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{get:function(){return this.St},set:function(a){var y=this.St;y!==a&&(this.St=a,this.g("nodeSelectionAdornmentTemplate",y,a))}},groupSelectionAdornmentTemplate:{get:function(){return this.wt},set:function(a){var y=this.wt;y!==a&&(this.wt=a,this.g("groupSelectionAdornmentTemplate",y,a))}},linkSelectionAdornmentTemplate:{get:function(){return this.Kt},set:function(a){var y=this.Kt;y!==a&&(this.Kt=a,this.g("linkSelectionAdornmentTemplate",y,a))}},highlighteds:{get:function(){return this.nw}},isModified:{get:function(){var a=this.undoManager;return a.isEnabled?a.currentTransaction!==null?!0:this.rn&&this.Ce!==a.historyIndex:this.rn},set:function(a){if(this.rn!==a){this.rn=a;var y=this.undoManager;!a&&y.isEnabled&&(this.Ce=y.historyIndex),a||dc(this)}}},model:{get:function(){return this.cc},set:function(a){var y=this.cc;if(y!==a){this.currentTool.doCancel(),y&&y.undoManager!==a.undoManager&&y.undoManager.isInTransaction&&pe("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=Pf(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var E=this.vb;this.vb=!0,zl(this.animationManager,"Model"),y&&(this.pf!==null&&this.pf.each(function(z){return y.ik(z)}),y.ik(this.Oc)),this.cc=a,this.partManager=Nh(this.cc.type);for(var b=0;b<x.length;b++)this.add(x[b]);a.Pe(this.Hb),this.partManager.addAllModeledParts(),a.ik(this.Hb),a.Pe(this.Oc),this.pf!==null&&this.pf.each(function(z){return a.Pe(z)}),this.vb=E,this.Ya(),this.vb||this.N(),y&&a.undoManager.copyProperties(y.undoManager)}}},aa:{get:function(){return this.rw},set:function(a){this.rw=a}},As:{get:function(){return this.sy}},skipsModelSourceBindings:{get:function(){return this.Iw},set:function(a){this.Iw=a}},Ns:{get:function(){return this.ou},set:function(a){this.ou=a}},nodeTemplate:{get:function(){return this.Lg.I("")},set:function(a){var y=this.Lg.I("");y!==a&&(this.Lg.add("",a),this.g("nodeTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},nodeTemplateMap:{get:function(){return this.Lg},set:function(a){var y=this.Lg;y!==a&&(this.Lg=a,this.g("nodeTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplate:{get:function(){return this.Yi.I("")},set:function(a){var y=this.Yi.I("");y!==a&&(this.Yi.add("",a),this.g("groupTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplateMap:{get:function(){return this.Yi},set:function(a){var y=this.Yi;y!==a&&(this.Yi=a,this.g("groupTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplate:{get:function(){return this.Kh.I("")},set:function(a){var y=this.Kh.I("");y!==a&&(this.Kh.add("",a),this.g("linkTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplateMap:{get:function(){return this.Kh},set:function(a){var y=this.Kh;y!==a&&(this.Kh=a,this.g("linkTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},isMouseCaptured:{get:function(){return this.qw},set:function(a){var y=this.ta;y!==null&&(y=y.Oa,y instanceof SVGElement||(a?(this.lastInput.bubbles=!1,this.removeEventListener(y,"pointermove",this.dk,!1),this.removeEventListener(y,"pointerdown",this.ui,!1),this.removeEventListener(y,"pointerup",this.fk,!1),this.removeEventListener(y,"pointerout",this.ek,!1),this.removeEventListener(y,"pointercancel",this.ck,!1),this.addEventListener(Fe,"pointermove",this.dk,!0),this.addEventListener(Fe,"pointerdown",this.ui,!0),this.addEventListener(Fe,"pointerup",this.fk,!0),this.addEventListener(Fe,"pointerout",this.ek,!0),this.addEventListener(Fe,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(Fe,"wheel",this.$j,!0),this.addEventListener(Fe,"selectstart",this.preventDefault,!1)):(this.removeEventListener(Fe,"pointermove",this.dk,!0),this.removeEventListener(Fe,"pointerdown",this.ui,!0),this.removeEventListener(Fe,"pointerup",this.fk,!0),this.removeEventListener(Fe,"pointerout",this.ek,!0),this.removeEventListener(Fe,"pointercancel",this.ck,!0),this.addEventListener(y,"pointermove",this.dk,!1),this.addEventListener(y,"pointerdown",this.ui,!1),this.addEventListener(y,"pointerup",this.fk,!1),this.addEventListener(y,"pointerout",this.ek,!1),this.addEventListener(y,"pointercancel",this.ck,!1),this.removeEventListener(Fe,"wheel",this.$j,!0),this.removeEventListener(Fe,"selectstart",this.preventDefault,!1),this.addEventListener(y,"wheel",this.$j,!1)),this.qw=a))}},position:{get:function(){return this.pa},set:function(a){var y=Rt.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),xh(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?wl(this):(this.vb=!0,a=this.scale,dd(this,this.Sp,this.Aa/a,this.ya/a,this.zk,!1),this.vb=!1),this.vb||this.onViewportBoundsChanged(x,this.viewportBounds,this.Ca,!1)}Rt.free(y)}},initialPosition:{get:function(){return this.zt},set:function(a){this.zt.D(a)||(this.zt=a.J())}},initialScale:{get:function(){return this.At},set:function(a){this.At!==a&&(this.At=a)}},grid:{get:function(){return this.fe===null&&(this.fe=hc(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=hc(this)),a.type!==ze.Grid&&pe("Diagram.grid must be a Panel of type Panel.Grid");var x=y.panel;x!==null&&x.remove(y),this.fe=a,a.name="GRID",x!==null&&x.add(a),Xl(this),this.N(),this.g("grid",y,a)}}},viewportBounds:{get:function(){return this.Rw}},viewSize:{get:function(){return this.wo},set:function(a){var y=this.viewSize;y.D(a)||(this.wo=a=a.J(),this.ya=this.Aa=0,a.w()?(this.Aa=a.width,this.ya=a.height):this.Ka!==null&&(this.Aa=this.Ka.clientWidth||1,this.ya=this.Ka.clientHeight||1),wl(this),this.Ya(),this.g("viewSize",y,a),this.redraw())}},fixedBounds:{get:function(){return this.ut},set:function(a){var y=this.ut;y.D(a)||(a.width!==-1/0&&a.height!==1/0&&a.height!==-1/0||pe("fixedBounds width/height must not be Infinity"),this.ut=a=a.J(),this.Ya(),this.g("fixedBounds",y,a))}},scrollMargin:{get:function(){return this.rj},set:function(a){typeof a=="number"&&(a=new Pi(a));var y=this.rj;y.D(a)||(this.rj=a=a.J(),this.g("scrollMargin",y,a),this.hk())}},scrollMode:{get:function(){return this.sj},set:function(a){var y=this.sj;y!==a&&(this.sj=a,a===DA&&ka(this,!1),this.g("scrollMode",y,a),this.Ee=!0,this.N())}},scrollsPageOnFocus:{get:function(){return this.nu},set:function(a){var y=this.nu;y!==a&&(this.nu=a,this.g("scrollsPageOnFocus",y,a))}},positionComputation:{get:function(){return this.Zt},set:function(a){var y=this.Zt;y!==a&&(this.Zt=a,ka(this,!1),this.g("positionComputation",y,a))}},scaleComputation:{get:function(){return this.fu},set:function(a){var y=this.fu;y!==a&&(this.fu=a,xd(this,this.scale,this.scale),this.g("scaleComputation",y,a))}},documentBounds:{get:function(){return this.Sp}},isVirtualized:{get:function(){return this.It},set:function(a){var y=this.It;y!==a&&(this.It=a,this.g("isVirtualized",y,a))}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&xd(this,y,a)}},defaultScale:{get:function(){return this.Pp},set:function(a){this.Pp=a}},autoScale:{get:function(){return this.yh},set:function(a){var y=this.yh;y!==a&&(this.yh=a,this.g("autoScale",y,a),a!==ws&&ka(this,!1))}},initialAutoScale:{get:function(){return this.Fg},set:function(a){var y=this.Fg;y!==a&&(this.Fg=a,this.g("initialAutoScale",y,a))}},initialViewportSpot:{get:function(){return this.Bt},set:function(a){var y=this.Bt;y!==a&&(a.sb()||pe("initialViewportSpot must be a specific Spot: "+a),this.Bt=a,this.g("initialViewportSpot",y,a))}},initialDocumentSpot:{get:function(){return this.yt},set:function(a){var y=this.yt;y!==a&&(a.sb()||pe("initialViewportSpot must be a specific Spot: "+a),this.yt=a,this.g("initialDocumentSpot",y,a))}},minScale:{get:function(){return this.Ot},set:function(a){var y=this.Ot;y!==a&&(0<a?(this.Ot=a,this.g("minScale",y,a),a>this.scale&&(this.scale=a)):pi(a,"> 0",ge,"minScale"))}},maxScale:{get:function(){return this.Mt},set:function(a){var y=this.Mt;y!==a&&(0<a?(this.Mt=a,this.g("maxScale",y,a),a<this.scale&&(this.scale=a)):pi(a,"> 0",ge,"maxScale"))}},zoomPoint:{get:function(){return this.zu},set:function(a){this.zu.D(a)||(this.zu=a=a.J())}},contentAlignment:{get:function(){return this.zk},set:function(a){var y=this.zk;y.D(a)||(this.zk=a=a.J(),this.g("contentAlignment",y,a),ka(this,!1))}},initialContentAlignment:{get:function(){return this.pq},set:function(a){var y=this.pq;y.D(a)||(this.pq=a=a.J(),this.g("initialContentAlignment",y,a))}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Pi(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.Ya(),this.g("padding",y,a))}},partManager:{get:function(){return this.Pc},set:function(a){var y=this.Pc;y!==a&&(a.diagram!==null&&pe("Cannot share PartManagers between Diagrams: "+a.toString()),y&&y.Xe(null),this.Pc=a,a.Xe(this))}},nodes:{get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}},parts:{get:function(){return this.partManager.parts.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;y!==a&&(this.Sc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",y,a),this.$b())}},isTreePathToChildren:{get:function(){return this.Ht},set:function(a){var y=this.Ht;if(y!==a&&(this.Ht=a,this.g("isTreePathToChildren",y,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)hp(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==wu&&a!==po&&a!==HA&&pe("Unknown Diagram.treeCollapsePolicy: "+a),this.uu=a,this.g("treeCollapsePolicy",y,a))}},Ue:{get:function(){return this.pw},set:function(a){this.pw=a}},avoidanceCellSize:{get:function(){return this.aw},set:function(a){this.Xh=null,this.aw=new an(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{get:function(){return this.bw},set:function(a){this.bw=Math.max(1,a)}},autoScrollInterval:{get:function(){return this.vp},set:function(a){var y=this.vp;y!==a&&(this.vp=a,this.g("autoScrollInterval",y,a))}},autoScrollRegion:{get:function(){return this.xp},set:function(a){typeof a=="number"&&(a=new Pi(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Ie.Object.defineProperties(ge,{licenseKey:{get:function(){return Df.jc()},set:function(a){Df.add(a.replace(/\s/g,""))}},version:{get:function(){return ns}}}),ge.prototype.makeImageData=ge.prototype.Jx,ge.prototype.makeImage=ge.prototype.Wz,ge.prototype.cacheGroupExternalLinks=ge.prototype.Fu,ge.prototype.addRenderer=ge.prototype.bs,ge.prototype.makeSVG=ge.prototype.av,ge.prototype.makeSvg=ge.prototype.Cs,ge.prototype.stopAutoScroll=ge.prototype.ug,ge.prototype.doAutoScroll=ge.prototype.gs,ge.prototype.isUnoccupied=ge.prototype.Yj,ge.prototype.raiseDiagramEvent=ge.prototype.R,ge.prototype.removeDiagramListener=ge.prototype.am,ge.prototype.addDiagramListener=ge.prototype.Bj,ge.prototype.findTreeRoots=ge.prototype.yz,ge.prototype.layoutDiagram=ge.prototype.Uz,ge.prototype.findTopLevelGroups=ge.prototype.qz,ge.prototype.findTopLevelNodesAndLinks=ge.prototype.rz,ge.prototype.ensureBounds=ge.prototype.Va,ge.prototype.findLinksByExample=ge.prototype.ls,ge.prototype.findNodesByExample=ge.prototype.ms,ge.prototype.findLinkForData=ge.prototype.Kc,ge.prototype.findNodeForData=ge.prototype.ii,ge.prototype.findPartForData=ge.prototype.Lc,ge.prototype.findLinkForKey=ge.prototype.findLinkForKey,ge.prototype.findNodeForKey=ge.prototype.Vb,ge.prototype.findPartForKey=ge.prototype.findPartForKey,ge.prototype.rebuildParts=ge.prototype.Wd,ge.prototype.transformViewToDoc=ge.prototype.Ps,ge.prototype.transformRectDocToView=ge.prototype.zA,ge.prototype.transformDocToView=ge.prototype.op,ge.prototype.centerRect=ge.prototype.es,ge.prototype.scrollToRect=ge.prototype.tv,ge.prototype.scroll=ge.prototype.scroll,ge.prototype.highlightCollection=ge.prototype.Jz,ge.prototype.highlight=ge.prototype.Iz,ge.prototype.selectCollection=ge.prototype.rA,ge.prototype.select=ge.prototype.select,ge.prototype.updateAllRelationshipsFromData=ge.prototype.rp,ge.prototype.updateAllTargetBindings=ge.prototype.updateAllTargetBindings,ge.prototype.commit=ge.prototype.commit,ge.prototype.rollbackTransaction=ge.prototype.Kf,ge.prototype.commitTransaction=ge.prototype.eb,ge.prototype.startTransaction=ge.prototype.Ea,ge.prototype.raiseChanged=ge.prototype.g,ge.prototype.raiseChangedEvent=ge.prototype.cb,ge.prototype.removeChangedListener=ge.prototype.ik,ge.prototype.addChangedListener=ge.prototype.Pe,ge.prototype.removeModelChangedListener=ge.prototype.mA,ge.prototype.addModelChangedListener=ge.prototype.Yw,ge.prototype.findLayer=ge.prototype.Qj,ge.prototype.removeLayer=ge.prototype.kA,ge.prototype.addLayerAfter=ge.prototype.Cy,ge.prototype.addLayerBefore=ge.prototype.Ww,ge.prototype.addLayer=ge.prototype.Al,ge.prototype.moveParts=ge.prototype.moveParts,ge.prototype.copyParts=ge.prototype.Kj,ge.prototype.removeParts=ge.prototype.Is,ge.prototype.remove=ge.prototype.remove,ge.prototype.add=ge.prototype.add,ge.prototype.clearDelayedGeometries=ge.prototype.bx,ge.prototype.setProperties=ge.prototype.nm,ge.prototype.attach=ge.prototype.Du,ge.prototype.set=ge.prototype.set,ge.prototype.resetInputOptions=ge.prototype.Sx,ge.prototype.setInputOption=ge.prototype.sA,ge.prototype.getInputOption=ge.prototype.Ql,ge.prototype.resetRenderingHints=ge.prototype.Tx,ge.prototype.setRenderingHint=ge.prototype.Xx,ge.prototype.getRenderingHint=ge.prototype.Gf,ge.prototype.maybeUpdate=ge.prototype.bd,ge.prototype.requestUpdate=ge.prototype.$b,ge.prototype.delayInitialization=ge.prototype.Xy,ge.prototype.isUpdateRequested=ge.prototype.Pz,ge.prototype.invalidateDocumentBounds=ge.prototype.Ya,ge.prototype.findObjectsNear=ge.prototype.og,ge.prototype.findPartsNear=ge.prototype.mz,ge.prototype.findObjectsIn=ge.prototype.Cf,ge.prototype.findPartsIn=ge.prototype.ux,ge.prototype.findObjectsAt=ge.prototype.ji,ge.prototype.findPartsAt=ge.prototype.lz,ge.prototype.findObjectAt=ge.prototype.ic,ge.prototype.findPartAt=ge.prototype.Ol,ge.prototype.focusObject=ge.prototype.zz,ge.prototype.alignDocument=ge.prototype.Jy,ge.prototype.zoomToRect=ge.prototype.BA,ge.prototype.zoomToFit=ge.prototype.zoomToFit,ge.prototype.diagramScroll=ge.prototype.kx,ge.prototype.focus=ge.prototype.focus;var Qf=new Rn,Ld=null,jr=Fe.document!==void 0,eh=null,vu="",ws=new ce(ge,"None",0),ma=new ce(ge,"Uniform",1),yu=new ce(ge,"UniformToFill",2),Og=new ce(ge,"CycleAll",10),Ih=new ce(ge,"CycleNotDirected",11),Dh=new ce(ge,"CycleNotDirectedFast",12),Uf=new ce(ge,"CycleNotUndirected",13),If=new ce(ge,"CycleDestinationTree",14),Ed=new ce(ge,"CycleSourceTree",15),DA=new ce(ge,"DocumentScroll",1),Hh=new ce(ge,"InfiniteScroll",2),wu=new ce(ge,"TreeParentCollapsed",21),po=new ce(ge,"AllParentsCollapsed",22),HA=new ce(ge,"AnyParentsCollapsed",23),Df=new Ke,ns="2.3.10",bl="image",dA=null,OA=!1;function Uo(){if(jr){var a=Fe.document.createElement("canvas"),y=a.getContext("2d"),x=pn("7ca11abfd022028846");y[x]=pn("398c3597c01238");for(var E=["5da73c80a36455d7038e4972187c3cae51fd22",Se.Dx+"4ae6247590da4bb21c324ba3a84e385776",Li.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",re.za],b=1;5>b;b++)y[pn("7ca11abfd7330390")](pn(E[b-1]),10,15*b);for(y[x]=pn("39f046ebb36e4b"),x=1;5>x;x++)y[pn("7ca11abfd7330390")](pn(E[x-1]),10,15*x);(E.length!==4||E[0][0]!=="5"||E[3][0]!=="7")&&(Li.prototype.Cd=Li.prototype.Eu),dA=a}}ge.className="Diagram",ge.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=Fe.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof ge?y.H:null},ge.inherit=function(a,y){function x(){}if(Object.getPrototypeOf(a).prototype)throw Error(`Used go.Diagram.inherit defining already defined class
`+a);x.prototype=y.prototype,a.prototype=new x,a.prototype.constructor=a},ge.useDOM=function(a){jr=a?Fe.document!==void 0:!1},ge.isUsingDOM=function(){return jr},ge.None=ws,ge.Uniform=ma,ge.UniformToFill=yu,ge.CycleAll=Og,ge.CycleNotDirected=Ih,ge.CycleNotDirectedFast=Dh,ge.CycleNotUndirected=Uf,ge.CycleDestinationTree=If,ge.CycleSourceTree=Ed,ge.DocumentScroll=DA,ge.InfiniteScroll=Hh,ge.TreeParentCollapsed=wu,ge.AllParentsCollapsed=po,ge.AnyParentsCollapsed=HA;function Oh(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function ol(a,y){if(y.ib.setTransform(y.Mb,0,0,y.Mb,0,0),y.ib.yc(),a.Rc===null)t:{y="f";var x=Fe[pn("76a715b2f73f148a")][pn("72ba13b5")]||"";if(a.Rc=!0,jr){var E=ge[pn("76a115b6ed251eaf4692")];if(E)for(var b=Df.iterator;b.next()&&(E=b.value,E=pn(E).split(pn("39e9")),!(6>E.length));){var z=pn(E[1]).split(".");if(E[4]!=="7da71ca0")break;var tt=pn(Se[pn("6cae19")]).split(".");if(z[0]>tt[0]||z[0]===tt[0]&&z[1]>=tt[1]){var rt=Fe[pn("74a900bae4370f8b51")][pn("6fbb13a1c2311e8a57")].toLowerCase();if(tt=rt[pn("73a612b6fb191d")](pn("3aad1ab6e022098b4dc4")),z=pn(E[2]),-1<tt&&(rt=rt[pn("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<rt&&rt<tt),!a.Rc))break;for(tt=x[pn("76ad18b4f73e")],rt=x[pn("73a612b6fb191d")](pn("35e7"))+2;rt<tt;rt++)y+=x[rt];if(tt=y[pn("73a612b6fb191d")](z),0>tt&&z!==pn("7da71ca0ad381e90")&&(tt=y[pn("73a612b6fb191d")](pn("76a715b2ef3e149757"))),0>tt&&(tt=y[pn("73a612b6fb191d")](pn("76a715b2ef3e149757"))),0>tt&&(tt=y[pn("73a612b6fb191d")](pn("2bfa41fdb3784bca12"))),0>tt&&(tt=x[pn("73a612b6fb191d")](pn("7baa19a6f76c1988428554"))),a.Rc=!(0<=tt&&tt<y[pn("73a612b6fb191d")](pn("35"))||y[pn("73a612b6fb191d")](pn("35"))===-1),!a.Rc||x[pn("73a612b6fb191d")](pn("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[pn("73a612b6fb191d")](z)),!a.Rc)||(tt=Fe[pn("76a715b2f73f148a")][pn("69ad17a1e03e")],rt=tt[pn("73a612b6fb191d")](pn("7fb002b6ed25128b4da25b2e")),-1<rt&&(a.Rc=!(tt[pn("73a612b6fb191d")](z)>rt),!a.Rc)))break;if(z[0]==="#"){tt=Fe.document.createElement("div");for(var ot=E[0].replace(/[A-Za-z]/g,"");4>ot.length;)ot+="9";if(rt=ot,ot=ot.substr(ot.length-4),E="",E+=["gsh","gsf"][parseInt(ot.substr(0,1),10)%2],E+=["Header","Background","Display","Feedback"][parseInt(ot.substr(0,1),10)%4],tt[pn("79a417a0f0181a8946")]=E,Fe.document[pn("78a712aa")]){Fe.document[pn("78a712aa")][pn("7bb806b6ed32388c4a875b")](tt),ot=Fe.getComputedStyle(tt).getPropertyValue(pn("78a704b7e62456904c9b12701b6532a8"));var at=Fe.getComputedStyle(tt).getPropertyValue(pn("75b817b0ea2202"));if(Fe.document[pn("78a712aa")][pn("68ad1bbcf533388c4a875b")](tt),ot){if(tt=Fe[pn("77a902b0eb1b1e804a8a")],at==="0."+parseInt(rt,10)%100||ot.indexOf(parseInt(z[1]+z[2],16))!==-1&&ot.indexOf(parseInt(z[3]+z[4],16))!==-1){a.Rc=!1;break}else if(tt&&tt(pn("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(E="."+E,z=0;z<document.styleSheets.length;z++){tt=document.styleSheets[z].rules||document.styleSheets[z].cssRules;for(var At in tt)if(E===tt[At].selectorText){a.Rc=!1;break t}}}}else a.Rc=null,a.Rc=!1}}}else{for(At=x[pn("76ad18b4f73e")],b=x[pn("73a612b6fb191d")](pn("35e7"))+2;b<At;b++)y+=x[b];x=y[pn("73a612b6fb191d")](pn("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[pn("73a612b6fb191d")](pn("35")))}}}return 0<a.Rc&&a!==a.wy}Oh.className="DiagramHelper";function cA(a){this.j=a===void 0?new Rt:a,this.o=new Rt}Ie.Object.defineProperties(cA.prototype,{point:{get:function(){return this.j},set:function(a){this.j=a}},shifted:{get:function(){return this.o},set:function(a){this.o=a}}});var Rh="DraggingInfo";cA.className="DraggingInfo";function it(a,y,x){this.node=a,this.info=y,this.Su=x}it.className="DraggingNodeInfoPair";function st(){this.reset()}st.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new an(NaN,NaN).freeze(),this.gridSnapCellSpot=es,this.gridSnapOrigin=new Rt(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},st.className="DraggingOptions";function ht(a,y){if(typeof a=="string"||Fe.Element&&a instanceof Element)var x=ge.call(this,a)||this;else x=ge.call(this)||this,y=a;return ut(x),y&&x.nm(y),x}ue(ht,ge);function ut(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=Ml,a.layout=new ds}ht.prototype.reset=function(){ge.prototype.reset.call(this),ut(this)},ht.className="Palette";function dt(a,y){if(typeof a=="string"||Fe.Element&&a instanceof Element)var x=ge.call(this,a)||this;else x=ge.call(this)||this,y=a;var E=x;x.animationManager.isEnabled=!1,x.vb=!0,x.V=null,x.mn=!1,x.nn=!1,x.F=!0,x.u=!0,x.ia=0,x.o=!1,x.ql=null,x.Xx("drawShadows",!1),a=new jn;var b=new yi;return b.stroke="magenta",b.strokeWidth=2,b.fill="transparent",b.name="BOXSHAPE",a.selectable=!0,a.selectionAdorned=!1,a.selectionObjectName="BOXSHAPE",a.locationObjectName="BOXSHAPE",a.resizeObjectName="BOXSHAPE",a.cursor="move",a.add(b),x.j=a,x.allowCopy=!1,x.allowDelete=!1,x.allowSelect=!0,x.autoScrollRegion=new Pi(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new jt,x.toolManager.mouseMoveTools),x.click=function(){var z=E.observed;if(z!==null){var tt=z.viewportBounds,rt=E.lastInput.documentPoint;z.position=new Rt(rt.x-tt.width/2,rt.y-tt.height/2)}},x.Pf=function(){E.Ya(),bt(E)},x.Xd=function(){E.observed!==null&&(E.Ya(),E.N())},x.Ha=function(){1>E.updateDelay?E.N():E.o||(E.o=!0,setTimeout(function(){return E.redraw()},E.updateDelay))},x.Of=function(){E.observed!==null&&bt(E)},x.autoScale=ma,x.vb=!1,y&&Object.assign(x,y),x}ue(dt,ge),dt.prototype.computePixelRatio=function(){return 1},dt.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.ta,y=this.ib;if(a!==null&&y!==null){if(bh(this),this.ql===null){var x=new al(null);x.width=a.width,x.height=a.height,this.ql=x}try{this.ta=this.ql,this.ib=this.ta.context,this.ib.Vc(!0),this.ib.setTransform(1,0,0,1,0,0),this.ib.clearRect(0,0,this.ta.width,this.ta.height),Pt(this)}finally{this.ta=a,this.ib=y}}}ge.prototype.redraw.call(this)},dt.prototype.gc=function(){if(this.Ka===null&&pe("No div specified"),this.ta===null&&pe("No canvas specified"),!(this.ta instanceof Fs)&&(Zm(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){bh(this);var y=this.ta;a=this.ib,a.Vc(!0),a.setTransform(1,0,0,1,0,0),a.clearRect(0,0,y.width,y.height),1>this.updateDelay?Pt(this):this.ql!==null&&(a.drawImage(this.ql.Oa,0,0),y=this.Ab,y.reset(),this.scale!==1&&y.scale(this.scale),this.position.x===0&&this.position.y===0||y.translate(-this.position.x,-this.position.y),a.scale(this.Mb,this.Mb),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.yc()),y=this.Wa.s;for(var x=y.length,E=0;E<x;E++)y[E].gc(a,this);this.Fc=this.vd=!1}}};function Pt(a){var y=a.observed;if(y!==null){var x=a.drawsTemporaryLayers,E=a.drawsGrid&&x,b=y.grid;E&&b!==null&&b.visible&&!isNaN(b.width)&&!isNaN(b.height)&&(b=Me.alloc().assign(a.viewportBounds).ed(y.viewportBounds),Xl(y,b),Me.free(b),fs(y));var z=a.Ab;z.reset(),a.scale!==1&&z.scale(a.scale),a.position.x===0&&a.position.y===0||z.translate(-a.position.x,-a.position.y),b=a.ib,b.scale(a.Mb,a.Mb),b.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),b.yc(),y=y.Wa.s,z=y.length;for(var tt=0;tt<z;tt++){var rt=y[tt],ot=a;if(rt.visible&&rt.opacity!==0){var at=rt.diagram.grid.part;if(!x&&rt.isTemporary)E&&at.layer===rt&&(rt=UA(rt,b),at.gc(b,ot),b.globalAlpha=rt);else{for(var At=UA(rt,b),ft=ot.scale,pt=Me.alloc(),xt=rt.Pa.s,Ct=xt.length,Mt=0;Mt<Ct;Mt++){var Gt=xt[Mt];(E||Gt!==at)&&rt.Oj(b,Gt,ot,null,ft,pt,!1)}Me.free(pt),b.globalAlpha=At}}}}}function bt(a){var y=a.box;if(y!==null){var x=a.observed;if(x!==null){a.Fc=!0,x=x.viewportBounds;var E=y.selectionObject,b=an.alloc();b.h(x.width,x.height),E.desiredSize=b,an.free(b),a=2/a.scale,E instanceof yi&&(E.strokeWidth=a),y.location=new Rt(x.x-a/2,x.y-a/2),y.isSelected=!0}}}dt.prototype.computeBounds=function(){var a=this.observed;if(a===null)return dr;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},dt.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},dt.prototype.onViewportBoundsChanged=function(a,y,x,E){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),bt(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.Oz=E,this.R("ViewportBoundsChanged",this.fc,a))},Ie.Object.defineProperties(dt.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof dt&&pe("Overview.observed Diagram may not be an Overview itself: "+a),y!==a){if(y!==null&&(this.remove(this.box),y.am("ViewportBoundsChanged",this.Pf),y.am("DocumentBoundsChanged",this.Xd),y.am("InvalidateDraw",this.Ha),y.am("AnimationFinished",this.Of)),this.V=a,a!==null&&(a.Bj("ViewportBoundsChanged",this.Pf),a.Bj("DocumentBoundsChanged",this.Xd),a.Bj("InvalidateDraw",this.Ha),a.Bj("AnimationFinished",this.Of),this.add(this.box)),this.Ya(),a===null){this.ql=null;var x=this.ta,E=this.ib;x&&E&&(E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,x.width,x.height))}else this.Ha(null),bt(this),this.N();this.g("observed",y,a)}}},box:{get:function(){return this.j},set:function(a){var y=this.j;y!==a&&(this.j=a,this.remove(y),this.add(this.j),bt(this),this.g("box",y,a))}},drawsTemporaryLayers:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a,this.redraw())}},drawsGrid:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a,this.redraw())}},updateDelay:{get:function(){return this.ia},set:function(a){0>a&&(a=0),this.ia!==a&&(this.ia=a)}}}),dt.className="Overview";function jt(){Rr.call(this),this.j=null}ue(jt,Rr),jt.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||!a.allowMove||!a.allowSelect)return!1;var y=a.observed;if(y===null)return!1;var x=a.lastInput;return!x.left||a.currentTool!==this&&(!this.isBeyondDragSize()||x.isTouchEvent&&x.timestamp-a.firstInput.timestamp<this.delay)?!1:(this.findDraggablePart()===null&&(x=y.viewportBounds,this.j=new Rt(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new Rt(a.x-this.j.x,a.y-this.j.y)),!0)},jt.prototype.doActivate=function(){this.j=null,Rr.prototype.doActivate.call(this)},jt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},jt.prototype.moveParts=function(){var a=this.diagram,y=a.observed;if(y!==null){var x=a.box;if(x!==null){if(this.j===null){var E=a.firstInput.documentPoint;x=x.location,this.j=new Rt(E.x-x.x,E.y-x.y)}a=a.lastInput.documentPoint,y.position=new Rt(a.x-this.j.x,a.y-this.j.y)}}},jt.className="OverviewDraggingTool";function Ot(){rr(this),this.H=Yl,this.Ha=this.u=this.o=!0,this.F=this.V=this.nb=this.ia=!1,this.ij=this.j=null,this.Hb=1.05,this.Jt=NaN,this.sw=null,this.Au=NaN,this.yu=dr,this.hb=!0,this.cg=null,this.ob=200}Ot.prototype.toString=function(){return"CommandHandler"},Ot.prototype.Xe=function(a){this.H=a},Ot.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=Ji?y.meta:y.control,E=y.shift,b=y.alt,z=y.key;!x||z!=="C"&&z!=="Insert"?x&&z==="X"||E&&z==="Del"?this.canCutSelection()&&this.cutSelection():x&&z==="V"||E&&z==="Insert"?this.canPasteSelection()&&this.pasteSelection():x&&z==="Y"||b&&E&&z==="Backspace"?this.canRedo()&&this.redo():x&&z==="Z"||b&&z==="Backspace"?this.canUndo()&&this.undo():z==="Del"||z==="Backspace"?this.canDeleteSelection()&&this.deleteSelection():x&&z==="A"?this.canSelectAll()&&this.selectAll():z==="Esc"?this.canStopCommand()&&this.stopCommand():z==="Up"?a.allowVerticalScroll&&(x?a.scroll("pixel","up"):a.scroll("line","up")):z==="Down"?a.allowVerticalScroll&&(x?a.scroll("pixel","down"):a.scroll("line","down")):z==="Left"?a.allowHorizontalScroll&&(x?a.scroll("pixel","left"):a.scroll("line","left")):z==="Right"?a.allowHorizontalScroll&&(x?a.scroll("pixel","right"):a.scroll("line","right")):z==="PageUp"?E&&a.allowHorizontalScroll?a.scroll("page","left"):a.allowVerticalScroll&&a.scroll("page","up"):z==="PageDown"?E&&a.allowHorizontalScroll?a.scroll("page","right"):a.allowVerticalScroll&&a.scroll("page","down"):z==="Home"?x&&a.allowVerticalScroll?a.scroll("document","up"):!x&&a.allowHorizontalScroll&&a.scroll("document","left"):z==="End"?x&&a.allowVerticalScroll?a.scroll("document","down"):!x&&a.allowHorizontalScroll&&a.scroll("document","right"):z===" "?this.canScrollToPart()&&this.scrollToPart():z==="Subtract"?this.canDecreaseZoom()&&this.decreaseZoom():z==="Add"?this.canIncreaseZoom()&&this.increaseZoom():x&&z==="0"?this.canResetZoom()&&this.resetZoom():E&&z==="Z"?this.canZoomToFit()&&this.zoomToFit():x&&!E&&z==="G"?this.canGroupSelection()&&this.groupSelection():x&&E&&z==="G"?this.canUngroupSelection()&&this.ungroupSelection():z==="F2"||y.event&&y.event.key==="F2"?this.canEditTextBlock()&&this.editTextBlock():z==="ContextMenu"||y.event&&y.event.key==="ContextMenu"?this.canShowContextMenu()&&this.showContextMenu():y.bubbles=!0:this.canCopySelection()&&this.copySelection()},Ot.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},Ot.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof br&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},Ot.prototype.canStopCommand=function(){return!0},Ot.prototype.selectAll=function(){var a=this.diagram;a.N();try{a.currentCursor="wait",a.R("ChangingSelection",a.selection);for(var y=a.parts;y.next();)y.value.isSelected=!0;for(var x=a.nodes;x.next();)x.value.isSelected=!0;for(var E=a.links;E.next();)E.value.isSelected=!0}finally{a.R("ChangedSelection",a.selection),a.currentCursor=""}},Ot.prototype.canSelectAll=function(){return this.diagram.allowSelect},Ot.prototype.deleteSelection=function(){var a=this.diagram;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Delete"),a.R("SelectionDeleting",a.selection);for(var y=new Ye,x=a.selection.iterator;x.next();)jg(y,x.value,!0,this.deletesTree?1/0:0,this.deletesConnectedLinks?null:!1,function(E){return E.canDelete()});a.Is(y,!0),a.R("SelectionDeleted",y)}finally{a.eb("Delete"),a.R("ChangedSelection",a.selection),a.currentCursor=""}},Ot.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},Ot.prototype.copySelection=function(){var a=this.diagram,y=new Ye;for(a=a.selection.iterator;a.next();)jg(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},Ot.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},Ot.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},Ot.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},Ot.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)eh=null,vu="";else{x=y.model;var E=!1,b=!1,z=null;try{x.Tl()&&(E=x.Jj,x.Jj=this.copiesParentKey),x.Wj()&&(b=x.Ij,x.Ij=this.copiesGroupKey),z=y.Kj(a,null,!0)}finally{x.Tl()&&(x.Jj=E),x.Wj()&&(x.Ij=b),x=new Ke,x.addAll(z),eh=x,vu=y.model.dataFormat}}y.R("ClipboardChanged",x)},Ot.prototype.pasteFromClipboard=function(){var a=new Ye,y=eh;if(y===null)return a;var x=this.diagram;if(vu!==x.model.dataFormat)return a;var E=x.model,b=!1,z=!1,tt=null;try{E.Tl()&&(b=E.Jj,E.Jj=this.copiesParentKey),E.Wj()&&(z=E.Ij,E.Ij=this.copiesGroupKey),tt=x.Kj(y,x,!1)}finally{for(E.Tl()&&(E.Jj=b),E.Wj()&&(E.Ij=z),y=tt.iterator;y.next();)x=y.value,E=y.key,x.location.w()||(E.location.w()?x.location=E.location:!x.position.w()&&E.position.w()&&(x.position=E.position)),a.add(x)}return a},Ot.prototype.pasteSelection=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Paste");var x=this.pasteFromClipboard();0<x.count&&y.clearSelection(!0);for(var E=x.iterator;E.next();)E.value.isSelected=!0;if(a!==null){var b=y.computePartsBounds(y.selection);if(b.w()){var z=this.computeEffectiveCollection(y.selection,y.Wm);qu(y,z,new Rt(a.x-b.centerX,a.y-b.centerY),y.Wm,!1)}}y.R("ClipboardPasted",x)}finally{y.eb("Paste"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Ot.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||eh===null||eh.count===0||vu!==a.model.dataFormat)},Ot.prototype.undo=function(){this.diagram.undoManager.undo()},Ot.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},Ot.prototype.redo=function(){this.diagram.undoManager.redo()},Ot.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},Ot.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===ws&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Ot.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==ws?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Ot.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===ws&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Ot.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==ws?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Ot.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},Ot.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},Ot.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,E=a.scale;zl(y,"Zoom To Fit"),this.isZoomToFitRestoreEnabled&&E===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.sw,this.Au=NaN,this.yu=dr):(this.Jt=E,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),Gi(y)},Ot.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Ot.prototype.scrollToPart=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.Va(),a===null){try{this.cg!==null&&(this.cg.next()?a=this.cg.value:this.cg=null)}catch(ot){this.cg=null}a===null&&(0<y.highlighteds.count?this.cg=y.highlighteds.iterator:0<y.selection.count&&(this.cg=y.selection.iterator),this.cg!==null&&this.cg.next()&&(a=this.cg.value))}if(a!==null){var x=y.animationManager;zl(x,"Scroll To Part");var E=this.scrollToPartPause;if(0<E){var b=Zt(this,a,[a]);if(b.length===1)y.Ea(),y.es(a.actualBounds),y.eb("Scroll To Part");else{var z=function(){y.Ea();for(var ot=b.pop();0<b.length&&ot instanceof hn&&ot.isTreeExpanded&&(!(ot instanceof li)||ot.isSubGraphExpanded);)ot=b.pop();0<b.length?(ot instanceof jn&&y.tv(ot.actualBounds),ot instanceof hn&&!ot.isTreeExpanded&&(ot.isTreeExpanded=!0),ot instanceof li&&!ot.isSubGraphExpanded&&(ot.isSubGraphExpanded=!0)):(ot instanceof jn&&y.es(ot.actualBounds),y.am("LayoutCompleted",tt)),y.eb("Scroll To Part")},tt=function(){ti(z,(x.isEnabled?x.duration:0)+E)};y.Bj("LayoutCompleted",tt),z()}}else{var rt=y.position.copy();y.es(a.actualBounds),rt.Xa(y.position)&&x.Cc()}}};function Zt(a,y,x){if(y.isVisible())return x;if(y instanceof Wi)Zt(a,y.adornedPart,x);else if(y instanceof tn){var E=y.fromNode;E!==null&&Zt(a,E,x),y=y.toNode,y!==null&&Zt(a,y,x)}else y instanceof hn&&(E=y.labeledLink,E!==null&&Zt(a,E,x),E=y.pg(),E!==null&&(E.isTreeExpanded||E.wasTreeExpanded||x.push(E),Zt(a,E,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),Zt(a,y,x));return x}Ot.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof jn)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},Ot.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),zl(y.animationManager,"Collapse Tree");var x=new Ke;if(a!==null&&a.isTreeExpanded)a.collapseTree(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof hn&&b.isTreeExpanded&&(b.collapseTree(),x.add(b))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},Ot.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof hn&&a.isTreeExpanded))return!1;if(0<a.Qo().count)return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof hn&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Ot.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),zl(y.animationManager,"Expand Tree");var x=new Ke;if(a!==null&&!a.isTreeExpanded)a.expandTree(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof hn&&!b.isTreeExpanded&&(b.expandTree(),x.add(b))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},Ot.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof hn)||a.isTreeExpanded)return!1;if(0<a.Qo().count)return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof hn&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Ot.prototype.groupSelection=function(){var a=this.diagram,y=a.model;if(y.Xj()){var x=this.archetypeGroupData;if(x!==null){var E=null;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Group");for(var b=new Ke,z=a.selection.iterator;z.next();){var tt=z.value;tt.Zc()&&tt.canGroup()&&b.add(tt)}for(var rt=new Ke,ot=b.iterator;ot.next();){var at=ot.value;z=!1;for(var At=b.iterator;At.next();)if(at.Td(At.value)){z=!0;break}z||rt.add(at)}if(0<rt.count){var ft=rt.first().containingGroup;if(ft!==null)for(;ft!==null;){b=!1;for(var pt=rt.iterator;pt.next();)if(!pt.value.Td(ft)){b=!0;break}if(b)ft=ft.containingGroup;else break}if(x instanceof li)Tl(x),E=x.copy(),E!==null&&a.add(E);else if(y.Yu(x)){var xt=y.copyNodeData(x);on(xt)&&(y.xf(xt),E=a.ii(xt))}if(E!==null){ft!==null&&this.isValidMember(ft,E)&&(E.containingGroup=ft);for(var Ct=rt.iterator;Ct.next();){var Mt=Ct.value;this.isValidMember(E,Mt)&&(Mt.containingGroup=E)}a.clearSelection(!0),E.isSelected=!0}}a.R("SelectionGrouped",E)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},Ot.prototype.canGroupSelection=function(){var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowGroup||!a.model.Xj()||this.archetypeGroupData===null)return!1;for(a=a.selection.iterator;a.next();){var y=a.value;if(y.Zc()&&y.canGroup())return!0}return!1};function Pe(a){var y=Ce();for(a=a.iterator;a.next();){var x=a.value;x instanceof tn||y.push(x)}a=new Ye,x=y.length;for(var E=0;E<x;E++){for(var b=y[E],z=!0,tt=0;tt<x;tt++)if(b.Td(y[tt])){z=!1;break}z&&a.add(b)}return Oe(y),a}Ot.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof tn)return!1;if(a!==null){if(a===y||a.Td(y))return!1;var x=a.memberValidation;if(x!==null&&!x(a,y)||a.data===null&&y.data!==null||a.data!==null&&y.data===null)return!1}return x=this.memberValidation,x!==null?x(a,y):!0},Ot.prototype.ungroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.model;if(x.Xj())try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Ungroup");var E=new Ke;if(a!==null)E.add(a);else for(var b=y.selection.iterator;b.next();){var z=b.value;z instanceof li&&z.canUngroup()&&E.add(z)}var tt=new Ke;if(0<E.count){y.clearSelection(!0);for(var rt=E.iterator;rt.next();){var ot=rt.value;ot.expandSubGraph();var at=ot.containingGroup,At=at!==null&&at.data!==null?x.wa(at.data):void 0;tt.addAll(ot.memberParts);for(var ft=tt.iterator;ft.next();){var pt=ft.value;if(pt.isSelected=!0,!(pt instanceof tn)){var xt=pt.data;xt!==null?x.mp(xt,At):pt.containingGroup=at}}y.remove(ot)}}y.R("SelectionUngrouped",E,tt)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Ot.prototype.canUngroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly||y.isModelReadOnly||!y.allowDelete||!y.allowUngroup||!y.model.Xj())return!1;if(a!==null){if(!(a instanceof li))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof li&&y.canUngroup())return!0;return!1},Ot.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=Pe(a).iterator;a.next();){var E=a.value;E.containingGroup!==null&&(!y||this.isValidMember(null,E)?E.containingGroup=null:x=!1)}return x},Ot.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),zl(y.animationManager,"Collapse SubGraph");var x=new Ke;if(a!==null&&a.isSubGraphExpanded)a.collapseSubGraph(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof li&&b.isSubGraphExpanded&&(b.collapseSubGraph(),x.add(b))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},Ot.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof li&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof li&&y.isSubGraphExpanded)return!0;return!1},Ot.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),zl(y.animationManager,"Expand SubGraph");var x=new Ke;if(a!==null&&!a.isSubGraphExpanded)a.expandSubGraph(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof li&&!b.isSubGraphExpanded&&(b.expandSubGraph(),x.add(b))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},Ot.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof li&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof li&&!y.isSubGraphExpanded)return!0;return!1},Ot.prototype.editTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.toolManager.findTool("TextEditing");if(x!==null){if(a===null){a=null;for(var E=y.selection.iterator;E.next();){var b=E.value;if(b.canEdit()){a=b;break}}if(a===null)return;a=a.Nl(function(z){return z instanceof Sr&&z.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},Ot.prototype.canEditTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly||y.isModelReadOnly||!y.allowTextEdit||y.toolManager.findTool("TextEditing")===null)return!1;if(a!==null){if(!(a instanceof Sr))return!1;if(a=a.part,a!==null&&a.canEdit())return!0}else for(y=y.selection.iterator;y.next();)if(a=y.value,a.canEdit()&&(a=a.Nl(function(x){return x instanceof Sr&&x.editable}),a!==null))return!0;return!1},Ot.prototype.showContextMenu=function(a){var y=this.diagram,x=y.toolManager.findTool("ContextMenu");if(x!==null&&(a===void 0&&(a=0<y.selection.count?y.selection.first():y),a=x.findObjectWithContextMenu(a),a!==null)){var E=y.lastInput,b=null;a instanceof te?b=a.ga(Xi):y.viewportBounds.ca(E.documentPoint)||(b=y.viewportBounds,b=new Rt(b.x+b.width/2,b.y+b.height/2)),b!==null&&(E.viewPoint=y.op(b),E.documentPoint=b,E.left=!1,E.right=!0,E.up=!0),y.currentTool=x,NA(x,!1,a)}},Ot.prototype.canShowContextMenu=function(a){var y=this.diagram,x=y.toolManager.findTool("ContextMenu");return x===null?!1:(a===void 0&&(a=0<y.selection.count?y.selection.first():y),x.findObjectWithContextMenu(a)!==null)},Ot.prototype.computeEffectiveCollection=function(a,y){var x=this.diagram,E=x.toolManager.findTool("Dragging"),b=x.currentTool===E;if(y===void 0&&(y=b?E.dragOptions:x.Wm),E=new Rn,a===null)return E;for(var z=a.iterator;z.next();)fA(x,E,z.value,b,y);if(x.draggedLink!==null&&y.dragsLink)return E;for(z=a.iterator;z.next();)a=z.value,a instanceof tn&&(y=a.fromNode,y===null||E.contains(y)?(y=a.toNode,y===null||E.contains(y)||E.remove(a)):E.remove(a));return E},Ie.Object.defineProperties(Ot.prototype,{diagram:{get:function(){return this.H}},copiesClipboardData:{get:function(){return this.o},set:function(a){this.o=a}},copiesConnectedLinks:{get:function(){return this.u},set:function(a){this.u=a}},deletesConnectedLinks:{get:function(){return this.Ha},set:function(a){this.Ha=a}},copiesTree:{get:function(){return this.ia},set:function(a){this.ia=a}},deletesTree:{get:function(){return this.nb},set:function(a){this.nb=a}},copiesParentKey:{get:function(){return this.V},set:function(a){this.V=a}},copiesGroupKey:{get:function(){return this.F},set:function(a){this.F=a}},archetypeGroupData:{get:function(){return this.j},set:function(a){this.j=a}},memberValidation:{get:function(){return this.ij},set:function(a){this.ij=a}},defaultScale:{get:function(){return this.diagram.defaultScale},set:function(a){this.diagram.defaultScale=a}},zoomFactor:{get:function(){return this.Hb},set:function(a){1<a||pe("zoomFactor must be larger than 1.0, not: "+a),this.Hb=a}},isZoomToFitRestoreEnabled:{get:function(){return this.hb},set:function(a){this.hb=a}},scrollToPartPause:{get:function(){return this.ob},set:function(a){this.ob=a}}}),Ot.className="CommandHandler",Ff=function(){return new Ot};function te(){rr(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new Rt(NaN,NaN).freeze(),this.jd=ga,this.Ab=new Li,this.wh=new Li,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=El,this.uc=new Me(NaN,NaN,NaN,NaN).freeze(),this.Ib=new Me(NaN,NaN,NaN,NaN).freeze(),this.dc=new Me(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=Xo,this.Ag=this.io=0,this.V=this.tb=this.Dh=this.A=this.Ua=null,this.Uc=!1,this.jo=this.Ng=null}var Ve,Ge,Fn,In,_n,oi,bi,Bi,Di,ar;te.prototype.cloneProtected=function(a){a.l=this.l|6144,a.pb=this.pb,a.bn=this.bn,a.Ma=this.Ma,a.pa.assign(this.pa),a.jd=this.jd.J(),this.Lb!==null?a.Lb=this.Lb.copy():a.Lb=null,a.Ca=this.Ca,a.Kb=this.Kb,a.Kg=this.Kg.J(),a.uc.assign(this.uc),a.Ib.assign(this.Ib),a.dc.assign(this.dc),a.Yn=this.Yn,this.ba!==null&&(a.ba=this.ba.copy()),a.Jb=this.Jb.J(),a.sk=this.sk.J(),a.io=this.io,a.Ag=this.Ag,this.Ua!==null&&(a.Ua=this.Ua.copy()),this.A!==null&&(a.A=this.A.nc?this.A:this.A.copy()),this.Dh!==null&&(a.Dh=ie(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},te.prototype.Vw=function(a){var y=this.Dh;if(ni(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},te.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},te.prototype.clone=function(){var a=new this.constructor;if(this.cloneProtected(a),this.Dh!==null)for(var y=0;y<this.Dh.length;y++){var x=this.Dh[y];a[x]=this[x]}return a},te.prototype.copy=function(){return this.clone()},Bt=te.prototype,Bt.qb=function(a){a.classType===tn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:pe("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===te&&(this.stretch=a)},Bt.toString=function(){return Ze(this.constructor)+"#"+gr(this)},Bt.th=function(){this.A!==null&&(this.A.nc=!0)};function wi(a){a.A===null?a.A=new Gh:a.A.nc&&(a.A=a.A.copy())}Bt.Xc=function(){if(this.ba===null){var a=new kd;a.Xi=ts,a.yj=ts,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},Bt.cb=function(a,y,x,E,b,z,tt){var rt=this.part;if(rt!==null&&(rt.gk(a,y,x,E,b,z,tt),x===this&&a===Qr&&as(this)&&Cr(this,rt,y),z=this.diagram,this.animationTriggers===null||z===null||!z.pi||z.undoManager.isUndoingRedoing||z.animationManager.Dm||(a=this.animationTriggers.get(y),a!==null&&z.animationManager.isEnabled&&!z.animationManager.isTicking&&(this.jo===null&&(this.jo=new Rn),tt=z.undoManager.transactionLevel===0,a.startCondition===Ju?tt=!0:a.startCondition===Ch&&(tt=!1),tt?(z=new gs,gd(a,z),tt=this.jo.get(a),tt!==null&&tt.stop(),this.jo.add(a,z),z.vu=this,z.Nw=a,z.add(this,y,E,b),z.start()):(zl(z.animationManager,"Trigger"),z.animationManager.defaultAnimation.add(this,y,E,b)))),this instanceof ze&&x===rt&&(rt.l&16777216)!==0&&rt.data!==null))for(x=this.O.s,E=x.length,b=0;b<E;b++)rt=x[b],rt instanceof ze&&ql(rt,function(ot){ot.data!==null&&ot.l&16777216&&ot.La(y)})};function Cr(a,y,x){var E=a.ih();if(E!==null)for(var b=a.localBindings.iterator;b.next();){var z=b.value,tt=null;if(z.sourceName!==null){if(tt=Lw(z,E,a),tt===null)continue;z.sp(a,tt,x,null)}else if(z.isToModel){var rt=y.diagram;rt===null||rt.skipsModelSourceBindings||z.sp(a,rt.model.modelData,x,E)}else{if(rt=E.data,rt===null)continue;var ot=y.diagram;ot===null||ot.skipsModelSourceBindings||z.sp(a,rt,x,E)}tt===a&&(rt=E.ks(z.Ai),rt!==null&&z.Mv(rt,tt,x))}}Bt.ks=function(a){return this.bindingId===a?this:null},Bt.g=function(a,y,x){this.cb(Qr,a,this,y,x)},Bt.Ge=function(a,y,x,E){var b=this.uc;if(b.h(a,y,x,E),this.Ca!==1||this.Kb!==0){this.Lb===null&&(this.Lb=new Li);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),z.pp(b)}};function Io(a,y,x,E){return a.pickable===!1?!1:(E.multiply(a.transform),x?a.Yc(y,E):a.fh(y,E))}Bt.tx=function(a,y,x){if(this.pickable===!1)return!1;var E=this.naturalBounds;return y=a.Bf(y),x?To(a.x,a.y,0,0,0,E.height)<=y||To(a.x,a.y,0,E.height,E.width,E.height)<=y||To(a.x,a.y,E.width,E.height,E.width,0)<=y||To(a.x,a.y,E.width,0,0,0)<=y:a.zd(0,0)<=y&&a.zd(0,E.height)<=y&&a.zd(E.width,0)<=y&&a.zd(E.width,E.height)<=y},Bt.se=function(){return!0},Bt.ca=function(a){var y=Rt.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return Rt.free(y),!1;var E=this.diagram;if(E!==null&&E.wq){var b=E.Ql("extraTouchThreshold"),z=E.Ql("extraTouchArea"),tt=z/2,rt=this.naturalBounds;E=this.Df()*E.scale;var ot=1/E;if(rt.width*E<b&&rt.height*E<b)return a=$o(x.x-tt*ot,x.y-tt*ot,x.width+z*ot,x.height+z*ot,y.x,y.y),Rt.free(y),a}return b=!1,(this instanceof Wi||this instanceof yi?$o(x.x-5,x.y-5,x.width+10,x.height+10,y.x,y.y):x.ca(y))&&(this.tb&&!this.tb.ca(y)?b=!1:this.areaBackground!==null&&x.ca(y)||this.Ma!==null&&this.dc.ca(a)?b=!0:b=this.gh(a)),Rt.free(y),b},Bt.gh=function(a){var y=this.naturalBounds;return $o(0,0,y.width,y.height,a.x,a.y)},Bt.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=Me.allocAt(0,0,y.width,y.height);var x=this.transform,E=!1,b=Rt.allocAt(a.x,a.y);return y.ca(x.Cd(b))&&(b.h(a.x,a.bottom),y.ca(x.Cd(b))&&(b.h(a.right,a.bottom),y.ca(x.Cd(b))&&(b.h(a.right,a.y),y.ca(x.Cd(b))&&(E=!0)))),Rt.free(b),Me.free(y),E},Bt.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,E=!1,b=Rt.allocAt(0,0);return a.ca(y.Ga(b))&&(b.h(0,x.height),a.ca(y.Ga(b))&&(b.h(x.width,x.height),a.ca(y.Ga(b))&&(b.h(x.width,0),a.ca(y.Ga(b))&&(E=!0)))),Rt.free(b),E},Bt.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,E=Rt.allocAt(0,0),b=Rt.allocAt(0,x.height),z=Rt.allocAt(x.width,x.height),tt=Rt.allocAt(x.width,0),rt=!1;if(a.ca(y.Ga(E))||a.ca(y.Ga(b))||a.ca(y.Ga(z))||a.ca(y.Ga(tt)))rt=!0;else{x=Me.allocAt(0,0,x.width,x.height);var ot=Rt.allocAt(a.x,a.y);x.ca(y.Cd(ot))?rt=!0:(ot.h(a.x,a.bottom),x.ca(y.Cd(ot))?rt=!0:(ot.h(a.right,a.bottom),x.ca(y.Cd(ot))?rt=!0:(ot.h(a.right,a.y),x.ca(y.Cd(ot))&&(rt=!0)))),Rt.free(ot),Me.free(x),!rt&&(re.us(a,E,b)||re.us(a,b,z)||re.us(a,z,tt)||re.us(a,tt,E))&&(rt=!0)}return Rt.free(E),Rt.free(b),Rt.free(z),Rt.free(tt),rt},Bt.ga=function(a,y){if(y===void 0&&(y=new Rt),a instanceof Vn){var x=this.naturalBounds;y.h(a.x*x.width+a.offsetX,a.y*x.height+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},Bt.mi=function(a){a===void 0&&(a=new Me);var y=this.naturalBounds,x=this.oe,E=Rt.allocAt(0,0).transform(x);return a.h(E.x,E.y,0,0),E.h(y.width,0).transform(x),Yr(a,E.x,E.y,0,0),E.h(y.width,y.height).transform(x),Yr(a,E.x,E.y,0,0),E.h(0,y.height).transform(x),Yr(a,E.x,E.y,0,0),Rt.free(E),a},Bt.li=function(){var a=this.oe;return a.m11===1&&a.m12===0?a=0:(a=180*Math.atan2(a.m12,a.m11)/Math.PI,0>a&&(a+=360)),a},Bt.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},Bt.qs=function(a,y){return y===void 0&&(y=new Rt),y.assign(a),this.oe.Cd(y),y},Bt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Bt.Sj=function(a,y,x,E,b){var z=this.transform,tt=1/(z.m11*z.m22-z.m12*z.m21),rt=z.m22*tt,ot=-z.m12*tt,at=-z.m21*tt,At=z.m11*tt,ft=tt*(z.m21*z.dy-z.m22*z.dx),pt=tt*(z.m12*z.dx-z.m11*z.dy);return this.areaBackground!==null?(z=this.actualBounds,re.Ff(z.left,z.top,z.right,z.bottom,a,y,x,E,b)):(tt=a*rt+y*at+ft,a=a*ot+y*At+pt,y=x*rt+E*at+ft,x=x*ot+E*At+pt,b.h(0,0),E=this.naturalBounds,x=re.Ff(0,0,E.width,E.height,tt,a,y,x,b),b.transform(z),x)},te.prototype.measure=function(a,y,x,E){if(Na(this)!==!1){var b=this.Kg,z=b.right+b.left;b=b.top+b.bottom,a=Math.max(a-z,0),y=Math.max(y-b,0),x=Math.max((x||0)-z,0),E=Math.max((E||0)-b,0),z=this.angle,b=this.desiredSize;var tt=this.kq();z===90||z===270?(a=isFinite(b.height)?b.height+tt:a,y=isFinite(b.width)?b.width+tt:y):(a=isFinite(b.width)?b.width+tt:a,y=isFinite(b.height)?b.height+tt:y),b=x||0,tt=E||0;var rt=this instanceof ze;switch(Ys(this,!0)){case Ge:tt=b=0,rt&&(y=a=1/0);break;case Ve:isFinite(a)&&a>x&&(b=a),isFinite(y)&&y>E&&(tt=y);break;case In:isFinite(a)&&a>x&&(b=a),tt=0,rt&&(y=1/0);break;case _n:isFinite(y)&&y>E&&(tt=y),b=0,rt&&(a=1/0)}rt=this.maxSize;var ot=this.minSize;b>rt.width&&ot.width<rt.width&&(b=rt.width),tt>rt.height&&ot.height<rt.height&&(tt=rt.height),x=Math.max(b,ot.width),E=Math.max(tt,ot.height),rt.width<x&&(x=Math.min(ot.width,x)),rt.height<E&&(E=Math.min(ot.height,E)),a=Math.min(rt.width,a),y=Math.min(rt.height,y),a=Math.max(x,a),y=Math.max(E,y),(z===90||z===270)&&(z=a,a=y,y=z,z=x,x=E,E=z),this.uc.ka(),this.Wl(a,y,x,E),this.uc.freeze(),this.uc.w()||pe("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),mo(this,!1)}},te.prototype.Wl=function(){},te.prototype.Dd=function(){return!1},te.prototype.arrange=function(a,y,x,E,b){this.Uk();var z=Me.alloc();z.assign(this.Ib),this.Ib.ka(),bs(this)===!1?this.Ib.h(a,y,x,E):this.eh(a,y,x,E),this.Ib.freeze(),b===void 0?this.tb=null:this.tb=b,x=!1,b!==void 0?x=!0:(b=this.panel,b!==null&&Yh(b)&&(b=b.panel),b!==null&&(b=b.dc,E=this.measuredBounds,this.areaBackground!==null&&(E=this.Ib),x=y+E.height,E=a+E.width,x=!(0<=a+.05&&E<=b.width+.05&&0<=y+.05&&x<=b.height+.05),this instanceof Sr&&(a=this.naturalBounds,this.Lq>a.height||this.Cb>a.width))&&(x=!0)),this.l=x?this.l|256:this.l&-257,this.Ib.w()||pe("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),pA(this,!1),Me.free(z)},Bt=te.prototype,Bt.eh=function(){};function ks(a,y,x,E,b){if(a.Ib.h(y,x,E,b),!a.desiredSize.w()){var z=a.uc;x=a.Kg,y=x.right+x.left;var tt=x.top+x.bottom;switch(x=z.width+y,z=z.height+tt,E+=y,b+=tt,y=Ys(a,!0),x===E&&z===b&&(y=Ge),y){case Ge:(x>E||z>b)&&(mo(a,!0),a.measure(x>E?E:x,z>b?b:z,0,0));break;case Ve:mo(a,!0),a.measure(E,b,0,0);break;case In:mo(a,!0),a.measure(E,z,0,0);break;case _n:mo(a,!0),a.measure(x,b,0,0)}}}Bt.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||$m(x,!0),this.N(),Go(a,y)||(x.oh(),this.Pn(x)))},Bt.Pn=function(a){this.portId!==null&&($m(a,!0),a instanceof hn&&zy(a,this))},Bt.gc=function(a,y){if(!va(this,a,y)&&this.visible){var x=this.opacity;if(x!==0){var E=1;x!==1&&(E=a.globalAlpha,a.globalAlpha=E*x);var b="";this.filter!==""&&(b=a.filter,a.filter=this.filter);var z=this instanceof ze&&Yh(this),tt=this.Ib;if(z){var rt=this.Ib,ot=this.dc,at=this.areaBackground,At=this.Ma;at===null&&At===null||a.yc(),at!==null&&(Hr(this,a,at,!0,!0,ot,rt),at instanceof nr&&at.type===Fi?(a.beginPath(),a.rect(rt.x,rt.y,rt.width,rt.height),a.ng(at)):a.fillRect(rt.x,rt.y,rt.width,rt.height)),At!==null&&(Hr(this,a,At,!0,!1,ot,rt),At instanceof nr&&At.type===Fi?(a.beginPath(),a.rect(rt.x,rt.y,rt.width,rt.height),a.ng(At)):a.fillRect(rt.x,rt.y,rt.width,rt.height)),this.hh(a,y)}if(!z&&(z||tt.width!==0&&tt.height!==0&&!isNaN(tt.x)&&!isNaN(tt.y))){z=this.transform,rt=this.panel,this.l&4096&&Do(this),at=this.part,ot=!1;var ft=0;at&&y.Gf("drawShadows")&&(ot=at.isShadowed)&&(At=at.shadowOffset,ft=Math.max(At.y,At.x)*y.scale*y.Mb),At=this.Dd();var pt;if(!(pt=y.$i||!At)){var xt=this.naturalBounds;pt=this.wh;var Ct=pt.m11,Mt=pt.m21,Gt=pt.dx,It=pt.m12,zt=pt.m22,Yt=pt.dy,Xt,$t=Xt=0;pt=Xt*Ct+$t*Mt+Gt;var de=Xt*It+$t*zt+Yt;Xt=xt.width+ft,$t=0;var An=Xt*Ct+$t*Mt+Gt;Xt=Xt*It+$t*zt+Yt,$t=Math.min(pt,An);var Bn=Math.min(de,Xt),vn=Math.max(pt+0,An)-$t,$e=Math.max(de+0,Xt)-Bn;pt=$t,de=Bn,Xt=xt.width+ft,$t=xt.height+ft,An=Xt*Ct+$t*Mt+Gt,Xt=Xt*It+$t*zt+Yt,$t=Math.min(pt,An),Bn=Math.min(de,Xt),vn=Math.max(pt+vn,An)-$t,$e=Math.max(de+$e,Xt)-Bn,pt=$t,de=Bn,Xt=0,$t=xt.height+ft,An=Xt*Ct+$t*Mt+Gt,Xt=Xt*It+$t*zt+Yt,$t=Math.min(pt,An),Bn=Math.min(de,Xt),vn=Math.max(pt+vn,An)-$t,$e=Math.max(de+$e,Xt)-Bn,pt=$t,de=Bn,ft=y.viewportBounds,xt=ft.x,Ct=ft.y,pt=!(pt>ft.width+xt||xt>vn+pt||de>ft.height+Ct||Ct>$e+de)}if(pt){if(pt=(this.l&256)!==0,a.clipInsteadOfFill&&(pt=!1),this instanceof Sr&&(a.font=this.font),pt){if(de=rt.se()?rt.naturalBounds:rt.actualBounds,vn=Math.max(tt.x,de.x),$e=Math.max(tt.y,de.y),ft=Math.min(tt.right,de.right)-vn,xt=Math.min(tt.bottom,de.bottom)-$e,Ct=this.tb,Ct!==null&&(vn=Ct.x,$e=Ct.y,ft=Ct.width,xt=Ct.height),vn>tt.width+tt.x||tt.x>de.width+de.x){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}a.save(),a.beginPath(),a.rect(vn,$e,ft,xt),a.clip()}if(At){if(!at.isVisible()){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}ot&&(de=at.shadowOffset,a.Ev(de.x*y.scale*this.scale*y.Mb,de.y*y.scale*this.scale*y.Mb,at.shadowBlur),RA(a),a.shadowColor=at.shadowColor)}ot&&this.shadowVisible===!0?RA(a):ot&&this.shadowVisible===!1&&Jl(a),at=this.naturalBounds,this.areaBackground!==null&&(a.yc(),ba(this,a,at,tt)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),ot&&Zo(this,rt)&&this.shadowVisible===null&&Jl(a),this.Ma!==null&&(a.yc(),Rs(this,a,at,tt)),ot&&(this.Ma!==null||this.areaBackground!==null||Zo(this,rt))?(Ta(this,!0),this.shadowVisible===null&&Jl(a)):Ta(this,!1),this.hh(a,y),ot&&this.l&512&&RA(a),At&&ot&&Jl(a),pt&&(a.restore(),a.Vc(this instanceof ze)),z.ws()||(y=1/(z.m11*z.m22-z.m12*z.m21),a.transform(z.m22*y,-z.m12*y,-z.m21*y,z.m11*y,y*(z.m21*z.dy-z.m22*z.dx),y*(z.m12*z.dx-z.m11*z.dy)))}}x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b)}}};function Zo(a,y){return y===null?!1:(Yh(y)&&(y=y.panel),(y.l&512)!==0||(y.type===ze.Auto||y.type===ze.Spot)&&y.Pb()!==a)}Bt.Dv=function(){};function ba(a,y,x,E){Hr(a,y,a.areaBackground,!0,!0,x,E),a.areaBackground instanceof nr&&a.areaBackground.type===Fi?(y.beginPath(),y.rect(E.x,E.y,E.width,E.height),y.ng(a.areaBackground)):y.fillRect(E.x,E.y,E.width,E.height)}function Rs(a,y,x,E){var b=a.kq(),z=x.x,tt=x.y,rt=x.width+b,ot=x.height+b;Hr(a,y,a.Ma,!0,!1,x,E),a.Ma instanceof nr&&a.Ma.type===Fi?(y.beginPath(),y.rect(z-b/2,tt-b/2,rt,ot),y.ng(a.Ma)):y.fillRect(z-b/2,tt-b/2,rt,ot)}function Ps(a,y,x){for(var E=y.O.s,b=E.length,z=-1,tt=0;tt<b;tt++)if(E[tt]===a){z=tt;break}if(a=z,a!==-1)if(a===0)y.svg.gd?y.svg.gd.after(x):y.svg.Ma?y.svg.Ma.after(x):y.type===ze.Table?(y=y.svg.getElementsByClassName("gojs-ts"),y=y.length!==0?y[0]:null,y!==null&&y.after(x)):y.svg.prepend(x);else{for(;a!==0&&!y.M(a-1).Ed();)a--;a===0?y.svg.prepend(x):(a=y.M(a-1).svg,a!==null?a.after(x):y.svg.appendChild(x))}}function va(a,y,x){if(!(y instanceof ia))return!1;if(!a.visible||a.opacity===0||a.Dd()&&!a.isVisible())return a.svg!==null&&a.svg.parentNode!==null&&a.svg.remove(),!0;var E=a.panel,b=a.nk(y);if(a.kk(y,x,b))return a.svg.parentElement!==null?(a.Dd()&&(y.ti=a.svg),!0):(a.Dd()?(y.ti!==null?y.ti.after(a.svg):y.Nj.prepend(a.svg),y.ti=a.svg):E&&Ps(a,E,a.svg),!0);if(a.Dd()&&a.isShadowed){var z=a.shadowOffset;y.Ev(z.x*x.scale*a.scale*x.Mb,z.y*x.scale*a.scale*x.Mb,a.shadowBlur),RA(y),y.shadowColor=a.shadowColor}a instanceof Sr&&(y.font=a.font),y.yd=null;var tt=a.transform;z=a instanceof ze;var rt=a instanceof ze?Yh(a):!1;a.l&4096&&Do(a);var ot=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,b&&(y.o=!0,z&&rt?(Nd(y,1,0,0,1,0,0),a.svg=y.ad):z?(Nd(y,tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy),a.svg=y.ad):Nd(y,1,0,0,1,0,0)),b=a.naturalBounds,a.areaBackground!==null){var at=tt.copy().Vj();y.rb.ha=[at.m11,at.m12,at.m21,at.m22,at.dx,at.dy],ba(a,y,b,ot),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return z||(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy]),a.background!==null&&(z?(rt&&(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy]),Rs(a,y,b,ot),rt&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy],Rs(a,y,b,ot)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),tt=y.yd,b=a.part,rt=!1,b&&x.Gf("drawShadows")&&(rt=b.isShadowed),y.clipInsteadOfFill&&(rt=!1),a.Dd()&&rt&&RA(y),rt&&a.shadowVisible===!0?RA(y):rt&&a.shadowVisible===!1&&Jl(y),b=a.panel,rt&&Zo(a,b)&&a.shadowVisible===null&&Jl(y),y.Il&&(at=x.computePixelRatio(),at="drop-shadow("+y.shadowOffsetX/at+"px "+y.shadowOffsetY/at+"px "+y.shadowBlur/at/2+"px "+y.shadowColor+")",a.background!==null&&tt.Ma.setAttributeNS(null,"filter",at),a.areaBackground!==null&&tt.gd.setAttributeNS(null,"filter",at)),rt&&(a.Ma!==null||a.areaBackground!==null||Zo(a,b))?(Ta(a,!0),a.shadowVisible===null&&Jl(y)):Ta(a,!1),b=rt,a.hh(y,x),z&&y.nh.pop(),y.o&&y.nh.pop(),tt=y.Gv.hs,rt=z?a.svg:y.yd,at=a.svg,!z&&at!==null&&rt!==at&&at.parentNode===a.panel.svg?(a.svg.replaceWith(rt),a.svg=rt,rt!==null&&a.$o(y,E,ot,rt),_s(y,at),!0):(a.svg=rt,tt!==null&&rt===null&&(vc(y),y.nh.pop()),rt===null||(a.$o(y,E,ot,rt),y.Il&&(x=x.computePixelRatio(),a.Dv(rt,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),b&&a.l&512&&RA(y),a.Dd()&&Jl(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&rt.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&rt.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(rt):y.Nj.prepend(rt),y.ti=rt):E!==null&&Ps(a,E,rt),tt!==null&&tt(a,rt)),!0)}Bt.$o=function(a,y,x,E){var b=(this.l&256)!==0;if(a.clipInsteadOfFill&&(b=!1),b){var z=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,z.x),b=Math.max(x.y,z.y);var tt=Math.min(x.right,z.right)-y;x=Math.min(x.bottom,z.bottom)-b,z=this.tb,z!==null&&(y=z.x,b=z.y,tt=z.width,x=z.height),z=E.getAttribute("clip-path");var rt=null;z!==null&&(rt=a.svg.getElementById(z.split("#")[1].slice(0,-1))),rt===null?(z="CLIP"+lo++,rt=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:b,width:tt,height:x}),this instanceof ze&&(b=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")")),rt.appendChild(y),a.svg.appendChild(rt),E.setAttributeNS(null,"clip-path","url(#"+z+")")):(a=rt.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",b.toString()),a.setAttribute("width",tt.toString()),a.setAttribute("height",x.toString()))}else E.removeAttributeNS(null,"clip-path"),_s(a,E)};function _s(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function vi(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Dn(y);for(var E=y.next();!E.done;E=y.next())E=x.getElementById(E.value.split("#")[1].slice(0,-1)),E!==null&&E.remove()}a.svg.remove()}}Bt.hh=function(){},Bt.lv=function(){this.Uc=!0},Bt.kk=function(a,y,x){if(this.Uc)return this.lv(),this.Uc=!1;if(y=this.svg,y===null)return!1;if(!this.visible)return y.remove(),!1;if(y.nodeName!=="g"&&x||y.nodeName==="g"&&!x)return!1;var E=this.transform,b=this instanceof ze?Yh(this):!1;if(!(this instanceof ze&&b))if(this instanceof Sa){var z=this.bt;a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy],z!==null&&qp(a,z[0],z[1],z[2],z[3],z[4],z[5],z[6],z[7]),x?y.lastElementChild.setAttributeNS(null,"transform",$p(a)):y.setAttributeNS(null,"transform",$p(a))}else if(!x||this instanceof ze)y.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");else if(this instanceof yi){z=y.getElementsByTagName("path");for(var tt=0;tt<z.length;tt++)z[tt].setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")}else y.lastElementChild.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");return z=this.Dd()?this.opacity*a.globalAlpha:this.opacity,z===1?y.removeAttribute("opacity"):y.setAttributeNS(null,"opacity",z.toString()),a.rb.ha=[1,0,0,1,0,0],(this.areaBackground!==null||y.gd!==void 0)&&(z=y.gd,this.areaBackground===null?(y.gd.remove(),y.gd=void 0):(tt=E.copy().Vj(),a.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy],ba(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(tt=y.gd.getAttribute("filter"),tt!==null&&a.ad.setAttribute("filter",tt),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),z&&Qd(a,z)),(this.background!==null||y.Ma!==void 0)&&(z=y.Ma,this.background===null?(Qd(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((b||x&&!(this instanceof ze))&&(a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy]),Rs(this,a,this.naturalBounds,this.actualBounds),y.Ma?(Qd(a,y.Ma),x=y.Ma.getAttribute("filter"),x!==null&&a.ad.setAttribute("filter",x),y.Ma.replaceWith(a.ad)):y.prepend(a.ad),y.Ma=a.ad),z&&Qd(a,z)),this.$o(a,this.panel,this.actualBounds,y),!0},Bt.nk=function(a){if(this.background!==null||this.areaBackground!==null)return!0;var y=(this.l&256)!==0;return a.clipInsteadOfFill&&(y=!1),!!y};function Hr(a,y,x,E,b,z,tt){if(x!==null){var rt=1,ot=1;if(typeof x=="string")E?y.fillStyle=x:y.strokeStyle=x;else if(x.type===Ii)E?y.fillStyle=x.color:y.strokeStyle=x.color;else{var at=a.kq();if(rt=z.width,ot=z.height,b?(rt=tt.width,ot=tt.height):E||(rt+=at,ot+=at),(z=y instanceof Wh)&&x.xe&&(x.type===Ur||x.yk===rt&&x.ft===ot))var At=x.xe;else{var ft=0,pt=0,xt=0,Ct=0,Mt=0,Gt=0;if(Gt=Mt=0,b?(Mt=tt.x,Gt=tt.y):E||(Mt-=at/2,Gt-=at/2),ft=x.start.x*rt+x.start.offsetX,pt=x.start.y*ot+x.start.offsetY,xt=x.end.x*rt+x.end.offsetX,Ct=x.end.y*ot+x.end.offsetY,ft+=Mt,xt+=Mt,pt+=Gt,Ct+=Gt,x.type===Ai)At=y.createLinearGradient(ft,pt,xt,Ct);else if(x.type===Fi)Gt=isNaN(x.endRadius)?Math.max(rt,ot)/2:x.endRadius,isNaN(x.startRadius)?(Mt=0,Gt=Math.max(rt,ot)/2):Mt=x.startRadius,At=y.createRadialGradient(ft,pt,Mt,xt,Ct,Gt);else if(x.type===Ur)try{At=y.createPattern(x.pattern,"repeat")}catch(zt){At=null}if(x.type!==Ur&&(b=x.colorStops,b!==null))for(b=b.iterator;b.next();)At.addColorStop(b.key,b.value);if(z&&(x.xe=At,At!==null&&(x.yk=rt,x.ft=ot),At===null&&x.type===Ur&&x.yk!==-1)){x.yk=-1;var It=a.diagram;It!==null&&x.yk===-1&&ti(function(){It.redraw()},600)}}E?y.fillStyle=At:y.strokeStyle=At}}}Bt.rg=function(a){if(a instanceof ze)t:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break t}y=y.panel}a=!1}else a=!1;return a},Bt.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},Bt.If=function(){for(var a=this instanceof ze?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function Do(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){sl(a,!1);return}if(y.translate(a.Ib.x-a.uc.x,a.Ib.y-a.uc.y),a.scale!==1||a.angle!==0){var x=a.naturalBounds;a.no(y,x.x,x.y,x.width,x.height)}sl(a,!1),na(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,na(a,!1)):y.oe!==null&&(x=a.wh,x.reset(),y.se()?x.multiply(y.wh):y.panel!==null&&x.multiply(y.panel.wh),x.multiply(a.Ab),a.Kk=a.scale*y.Kk,na(a,!1)))}Bt.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Rt.alloc();z.yi(y,x,E,b,Xi),a.rotate(this.Kb,z.x,z.y),Rt.free(z)}},Bt.v=function(a){if(!Na(this)){a===void 0&&(a=!1),mo(this,!0),pA(this,!0);var y=this.panel;y===null||a||y.v()}},Bt.Uj=function(){Na(this)||(mo(this,!0),pA(this,!0))};function Po(a){if(!bs(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof hn&&a.Bd(),y.$b())),pA(a,!0)}}Bt.Uk=function(){!(this.l&2048)&&(sl(this,!0),na(this,!0))},Bt.Wu=function(){na(this,!0)},Bt.N=function(){var a=this.part;a!==null&&a.N()};function Ys(a,y){var x=a.stretch,E=a.panel;return E!==null&&E.type===ze.Table?Kr(a,E.Fb(a.row),E.Eb(a.column),y):E!==null&&E.type===ze.Auto&&E.Pb()===a?wr(a,Ve,y):x===oi?E!==null?E.type===ze.Spot&&E.Pb()===a?wr(a,Ve,y):(x=E.defaultStretch,x===oi?wr(a,Ge,y):wr(a,x,y)):wr(a,Ge,y):wr(a,x,y)}function Kr(a,y,x,E){var b=a.stretch;if(b!==oi)return wr(a,b,E);var z=b=null;switch(y.stretch){case _n:z=!0;break;case Ve:z=!0}switch(x.stretch){case In:b=!0;break;case Ve:b=!0}return y=a.panel.defaultStretch,b===null&&(b=y===In||y===Ve),z===null&&(z=y===_n||y===Ve),b===!0&&z===!0?wr(a,Ve,E):b===!0?wr(a,In,E):z===!0?wr(a,_n,E):wr(a,Ge,E)}function wr(a,y,x){if(x)return y;if(y===Ge||(x=a.desiredSize,x.w()))return Ge;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===In)return Ge;if(y===Ve)return _n}else{if(y===_n)return Ge;if(y===Ve)return In}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===_n)return Ge;if(y===Ve)return In}else{if(y===In)return Ge;if(y===Ve)return _n}return y}function Ta(a,y){a.l=y?a.l|512:a.l&-513}function as(a){return(a.l&1024)!==0}function Su(a,y){a.l=y?a.l|1024:a.l&-1025}function sl(a,y){a.l=y?a.l|2048:a.l&-2049}function na(a,y){a.l=y?a.l|4096:a.l&-4097}function Na(a){return(a.l&8192)!==0}function mo(a,y){a.l=y?a.l|8192:a.l&-8193}function bs(a){return(a.l&16384)!==0}function pA(a,y){a.l=y?a.l|16384:a.l&-16385}Bt.Gj=function(){this.svg=null},Bt.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},Bt.Av=function(){},Bt.zv=function(a){return this.pa=a,Po(this),!0},Bt.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},Bt.kq=function(){return 0};function nh(a){var y=a.part;if(y instanceof hn&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||zy(y,a)}}function Jp(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof ze?a instanceof hn?a.Bd():a.qm(a,function(x){nh(x)}):nh(a))}Bt.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new vo(a,y,x,E):b=a,b.xd=this,a=this.ih(),a!==null&&fy(a)&&pe("Cannot add a Binding to a template that has already been copied: "+b),this.localBindings===null&&(this.localBindings=new Ke),this.localBindings.add(b),this},Bt.set=function(a){return Object.assign(this,a),this},Bt.Du=function(a){return mc(this,a),this},Bt.apply=function(a){return a(this),this},Bt.nm=function(a){return kh(this,a),this},Bt.pz=function(){return this.ih()},Bt.ih=function(){for(var a=this instanceof ze?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},Bt.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new Rn),this.animationTriggers.add(a.propertyName,a),this};function Qa(a,y){for(var x=1;x<arguments.length;++x);x=arguments;var E=null,b=null;if(typeof a=="function")b=a;else if(typeof a=="string"){var z=Hf.I(a);typeof z=="function"?(x=ie(arguments),E=z(x),on(E)||pe('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):b=Fe.go[a]}if(E===null&&(b!=null&&b.constructor||pe("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),E=new b),b=1,E instanceof ge&&1<x.length){z=E;var tt=x[1];(typeof tt=="string"||tt instanceof HTMLDivElement)&&(Eg(z,tt),b++)}for(;b<x.length;b++)z=x[b],z===void 0?pe("Undefined value at argument "+b+" for object being constructed by GraphObject.make: "+E):mc(E,z);return E}function mc(a,y){if(typeof y=="string")if(a instanceof Sr)a.text=y;else if(a instanceof yi)a.figure=y;else if(a instanceof Sa)a.source=y;else if(a instanceof ze)y=$l.I(y),y!==null&&(a.type=y);else if(a instanceof nr){var x=$n(nr,y);x!==null?a.type=x:pe("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof rn?(y=$n(rn,y),y!==null&&(a.type=y)):a instanceof Ki&&(y=$n(Ki,y),y!==null&&(a.type=y));else if(y instanceof te)a instanceof ze||pe("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Mo){var E;y.isRow&&typeof a.getRowDefinition=="function"?E=a.getRowDefinition(y.index):y.isRow||typeof a.getColumnDefinition!="function"||(E=a.getColumnDefinition(y.index)),E instanceof Mo?o0(E,y):pe("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof ce)typeof a.qb=="function"&&a.qb(y);else if(y instanceof ir)a.type=y;else if(y instanceof vo)a instanceof te||a instanceof Mo?a.bind(y):pe("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof yl)a instanceof te?a.Jv(y):pe("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof No)a instanceof rn&&a.type===rn.o?a.figures.add(y):pe("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof Ki)a instanceof No?a.segments.add(y):pe("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof Ir)a instanceof ge||a instanceof li?a.layout=y:pe("A Layout can only be assigned to a Diagram or a Group, not to: "+a);else if(Array.isArray(y))for(x=0;x<y.length;x++)mc(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof nr){x=new Yn;for(var b in y)E=parseFloat(b),isNaN(E)?x[b]=y[b]:a.addColorStop(E,y[b]);kh(a,x)}else if(a instanceof Mo){y.row!==void 0?(b=y.row,(b==null||b===1/0||isNaN(b)||0>b)&&pe("Must specify non-negative integer row for RowColumnDefinition "+y+", not: "+b),a.isRow=!0,a.index=b):y.column!==void 0&&(b=y.column,(b==null||b===1/0||isNaN(b)||0>b)&&pe("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+b),a.isRow=!1,a.index=b),b=new Yn;for(x in y)x!=="row"&&x!=="column"&&(b[x]=y[x]);kh(a,b)}else kh(a,y);else pe('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function mA(a,y){Hf.add(a,y)}function Md(a,y,x){x===void 0&&(x=null);var E=a[1];if(typeof x=="function"?x(E):typeof E=="string")return a.splice(1,1),E;if(y===void 0)throw Error("no "+(typeof x=="function"?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return y}Ie.Object.defineProperties(te.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new Gh),this.A.zp=a)}},localBindings:{get:function(){return this.A!==null?this.A.te:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new Gh),this.A.te=a)}},srcBindings:{get:function(){return this.A!==null?this.A.wm:null},set:function(a){this.srcBindings!==a&&(this.A===null&&(this.A=new Gh),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(wi(this),this.A.Ci=a,this.Uc=!0,this.N(),this.g("shadowVisible",y,a))}},enabledChanged:{get:function(){return this.A!==null?this.A.Hb:null},set:function(a){var y=this.enabledChanged;y!==a&&(wi(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:oa},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new ih),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===oa&&(this.angle=0))}},segmentIndex:{get:function(){return this.Ua!==null?this.Ua.u:-1/0},set:function(a){a=Math.round(a);var y=this.segmentIndex;y!==a&&(this.Ua===null&&(this.Ua=new ih),this.Ua.u=a,this.v(),this.g("segmentIndex",y,a))}},segmentFraction:{get:function(){return this.Ua!==null?this.Ua.o:0},set:function(a){isNaN(a)||0>a?a=0:1<a&&(a=1);var y=this.segmentFraction;y!==a&&(this.Ua===null&&(this.Ua=new ih),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:Gr},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new ih),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:oi},set:function(a){var y=this.stretch;y!==a&&(wi(this),this.A.hg=a,this.v(),this.g("stretch",y,a))}},name:{get:function(){return this.A!==null?this.A.xa:""},set:function(a){var y=this.name;y!==a&&(wi(this),this.A.xa=a,this.part!==null&&(this.part.Rh=null),this.g("name",y,a))}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&pi(a,"0 <= value <= 1",te,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(zf(y,y.actualBounds)))}},filter:{get:function(){return this.bn},set:function(a){var y=this.bn;y!==a&&(this.bn=a,this.Uc=!0,this.g("filter",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(zf(y,y.actualBounds)))}},visible:{get:function(){return(this.l&1)!==0},set:function(a){var y=(this.l&1)!==0;y!==a&&(this.l^=1,this.g("visible",y,a),y=this.panel,y!==null?y.v():this.Dd()&&this.Zb(a),this.N(),Jp(this))}},pickable:{get:function(){return(this.l&2)!==0},set:function(a){var y=(this.l&2)!==0;y!==a&&(this.l^=2,this.g("pickable",y,a))}},fromLinkableDuplicates:{get:function(){return(this.l&4)!==0},set:function(a){var y=(this.l&4)!==0;y!==a&&(this.l^=4,this.g("fromLinkableDuplicates",y,a))}},fromLinkableSelfNode:{get:function(){return(this.l&8)!==0},set:function(a){var y=(this.l&8)!==0;y!==a&&(this.l^=8,this.g("fromLinkableSelfNode",y,a))}},toLinkableDuplicates:{get:function(){return(this.l&16)!==0},set:function(a){var y=(this.l&16)!==0;y!==a&&(this.l^=16,this.g("toLinkableDuplicates",y,a))}},toLinkableSelfNode:{get:function(){return(this.l&32)!==0},set:function(a){var y=(this.l&32)!==0;y!==a&&(this.l^=32,this.g("toLinkableSelfNode",y,a))}},isPanelMain:{get:function(){return(this.l&64)!==0},set:function(a){var y=(this.l&64)!==0;y!==a&&(this.l^=64,this.v(),this.g("isPanelMain",y,a))}},isActionable:{get:function(){return(this.l&128)!==0},set:function(a){var y=(this.l&128)!==0;y!==a&&(this.l^=128,this.g("isActionable",y,a))}},areaBackground:{get:function(){return this.A!==null?this.A.gd:null},set:function(a){var y=this.areaBackground;y!==a&&(a!==null&&St(a,"GraphObject.areaBackground"),a instanceof nr&&a.freeze(),wi(this),this.A.gd=a,this.N(),this.g("areaBackground",y,a))}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&St(a,"GraphObject.background"),a instanceof nr&&a.freeze(),this.Ma=a,this.N(),this.g("background",y,a))}},part:{get:function(){if(this.Dd())return this;if(this.Ng!==null)return this.Ng;var a;for(a=this.panel;a;){if(a instanceof jn)return this.Ng=a;a=a.panel}return null}},svg:{get:function(){return this.V},set:function(a){this.V=a}},panel:{get:function(){return this.Me}},layer:{get:function(){var a=this.part;return a!==null?a.layer:null}},diagram:{get:function(){var a=this.part;return a!==null?a.diagram:null}},position:{get:function(){return this.pa},set:function(a){var y=a.x,x=a.y,E=this.pa,b=E.x;E=E.y,(b===y||isNaN(b)&&isNaN(y))&&(E===x||isNaN(E)&&isNaN(x))?this.Av():(a=a.copy(),this.zv(a,b,E)&&this.g("position",new Rt(b,E),a))}},actualBounds:{get:function(){return this.Ib}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&(0>=a&&pe("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Ca=a,this.v(),this.g("scale",y,a))}},angle:{get:function(){return this.Kb},set:function(a){var y=this.Kb;y!==a&&(a%=360,0>a&&(a+=360),y!==a&&(this.Kb=a,Jp(this),this.v(),this.g("angle",y,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var y=a.width,x=a.height,E=this.jd,b=E.width,z=E.height;(b===y||isNaN(b)&&isNaN(y))&&(z===x||isNaN(z)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof yi&&this.qc(),this.g("desiredSize",E,a),as(this)&&(a=this.part,a!==null&&(Cr(this,a,"width"),Cr(this,a,"height"))))}},width:{get:function(){return this.jd.width},set:function(a){var y=this.jd.width;y===a||isNaN(y)&&isNaN(a)||(y=this.jd,this.jd=a=new an(a,this.jd.height).freeze(),this.v(),this instanceof yi&&this.qc(),this.g("desiredSize",y,a),as(this)&&(a=this.part,a!==null&&Cr(this,a,"width")))}},height:{get:function(){return this.jd.height},set:function(a){var y=this.jd.height;y===a||isNaN(y)&&isNaN(a)||(y=this.jd,this.jd=a=new an(this.jd.width,a).freeze(),this.v(),this instanceof yi&&this.qc(),this.g("desiredSize",y,a),as(this)&&(a=this.part,a!==null&&Cr(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:Nr},set:function(a){var y=this.minSize;y.D(a)||(a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),wi(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:Yo},set:function(a){var y=this.maxSize;y.D(a)||(a=a.copy(),isNaN(a.width)&&(a.width=1/0),isNaN(a.height)&&(a.height=1/0),a.freeze(),wi(this),this.A.o=a,this.v(),this.g("maxSize",y,a))}},measuredBounds:{get:function(){return this.uc}},naturalBounds:{get:function(){return this.dc}},margin:{get:function(){return this.Kg},set:function(a){typeof a=="number"&&(a=new Pi(a));var y=this.Kg;y.D(a)||(this.Kg=a=a.J(),this.v(),this.g("margin",y,a))}},transform:{get:function(){return this.l&2048&&Do(this),this.Ab}},oe:{get:function(){return this.l&4096&&Do(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(wi(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:Ge},set:function(a){this.reshapingBehavior!==a&&(wi(this),this.A.Pf=a)}},alignment:{get:function(){return this.Jb},set:function(a){var y=this.Jb;y.D(a)||(a.Mc()&&!a.Xb()&&pe("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),Po(this),this.g("alignment",y,a))}},column:{get:function(){return this.Ag},set:function(a){a=Math.round(a);var y=this.Ag;y!==a&&(0>a&&pi(a,">= 0",te,"column"),this.Ag=a,this.v(),this.g("column",y,a),this.svg!==null&&this.svg.remove())}},columnSpan:{get:function(){return this.A!==null?this.A.ob:1},set:function(a){a=Math.round(a);var y=this.columnSpan;y!==a&&(1>a&&pi(a,">= 1",te,"columnSpan"),wi(this),this.A.ob=a,this.v(),this.g("columnSpan",y,a))}},row:{get:function(){return this.io},set:function(a){a=Math.round(a);var y=this.io;y!==a&&(0>a&&pi(a,">= 0",te,"row"),this.io=a,this.v(),this.g("row",y,a),this.svg!==null&&this.svg.remove())}},rowSpan:{get:function(){return this.A!==null?this.A.Bi:1},set:function(a){a=Math.round(a);var y=this.rowSpan;y!==a&&(1>a&&pi(a,">= 1",te,"rowSpan"),wi(this),this.A.Bi=a,this.v(),this.g("rowSpan",y,a))}},spanAllocation:{get:function(){return this.A!==null?this.A.Di:null},set:function(a){var y=this.spanAllocation;y!==a&&(wi(this),this.A.Di=a,this.v(),this.g("spanAllocation",y,a))}},alignmentFocus:{get:function(){return this.sk},set:function(a){var y=this.sk;y.D(a)||(this.sk=a=a.J(),this.v(),this.g("alignmentFocus",y,a))}},portId:{get:function(){return this.Yn},set:function(a){var y=this.Yn;if(y!==a){var x=this.part;x===null||x instanceof hn||pe("Cannot set portID on a Link: "+a),y!==null&&x!==null&&iv(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,_y(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:ts},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),nh(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&pi(a,">= 0",te,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),nh(this))}},toShortLength:{get:function(){return this.ba!==null?this.ba.xj:0},set:function(a){var y=this.toShortLength;y!==a&&(this.Xc(),this.ba.xj=a,this.g("toShortLength",y,a),nh(this))}},toLinkable:{get:function(){return this.ba!==null?this.ba.Tr:null},set:function(a){var y=this.toLinkable;y!==a&&(this.Xc(),this.ba.Tr=a,this.g("toLinkable",y,a))}},toMaxLinks:{get:function(){return this.ba!==null?this.ba.Ur:1/0},set:function(a){var y=this.toMaxLinks;y!==a&&(0>a&&pi(a,">= 0",te,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:ts},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),nh(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&pi(a,">= 0",te,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),nh(this))}},fromShortLength:{get:function(){return this.ba!==null?this.ba.Wi:0},set:function(a){var y=this.fromShortLength;y!==a&&(this.Xc(),this.ba.Wi=a,this.g("fromShortLength",y,a),nh(this))}},fromLinkable:{get:function(){return this.ba!==null?this.ba.hq:null},set:function(a){var y=this.fromLinkable;y!==a&&(this.Xc(),this.ba.hq=a,this.g("fromLinkable",y,a))}},fromMaxLinks:{get:function(){return this.ba!==null?this.ba.iq:1/0},set:function(a){var y=this.fromMaxLinks;y!==a&&(0>a&&pi(a,">= 0",te,"fromMaxLinks"),this.Xc(),this.ba.iq=a,this.g("fromMaxLinks",y,a))}},cursor:{get:function(){return this.A!==null?this.A.j:""},set:function(a){var y=this.cursor;y!==a&&(wi(this),this.A.j=a,this.g("cursor",y,a))}},click:{get:function(){return this.A!==null?this.A.zh:null},set:function(a){var y=this.click;y!==a&&(wi(this),this.A.zh=a,this.g("click",y,a))}},doubleClick:{get:function(){return this.A!==null?this.A.Fh:null},set:function(a){var y=this.doubleClick;y!==a&&(wi(this),this.A.Fh=a,this.g("doubleClick",y,a))}},contextClick:{get:function(){return this.A!==null?this.A.Bh:null},set:function(a){var y=this.contextClick;y!==a&&(wi(this),this.A.Bh=a,this.g("contextClick",y,a))}},mouseEnter:{get:function(){return this.A!==null?this.A.Mh:null},set:function(a){var y=this.mouseEnter;y!==a&&(wi(this),this.A.Mh=a,this.g("mouseEnter",y,a))}},mouseLeave:{get:function(){return this.A!==null?this.A.Ph:null},set:function(a){var y=this.mouseLeave;y!==a&&(wi(this),this.A.Ph=a,this.g("mouseLeave",y,a))}},mouseOver:{get:function(){return this.A!==null?this.A.Qh:null},set:function(a){var y=this.mouseOver;y!==a&&(wi(this),this.A.Qh=a,this.g("mouseOver",y,a))}},mouseHover:{get:function(){return this.A!==null?this.A.Oh:null},set:function(a){var y=this.mouseHover;y!==a&&(wi(this),this.A.Oh=a,this.g("mouseHover",y,a))}},mouseHold:{get:function(){return this.A!==null?this.A.Nh:null},set:function(a){var y=this.mouseHold;y!==a&&(wi(this),this.A.Nh=a,this.g("mouseHold",y,a))}},mouseDragEnter:{get:function(){return this.A!==null?this.A.Of:null},set:function(a){var y=this.mouseDragEnter;y!==a&&(wi(this),this.A.Of=a,this.g("mouseDragEnter",y,a))}},mouseDragLeave:{get:function(){return this.A!==null?this.A.Xd:null},set:function(a){var y=this.mouseDragLeave;y!==a&&(wi(this),this.A.Xd=a,this.g("mouseDragLeave",y,a))}},mouseDrop:{get:function(){return this.A!==null?this.A.Lh:null},set:function(a){var y=this.mouseDrop;y!==a&&(wi(this),this.A.Lh=a,this.g("mouseDrop",y,a))}},actionDown:{get:function(){return this.A!==null?this.A.V:null},set:function(a){var y=this.actionDown;y!==a&&(wi(this),this.A.V=a,this.g("actionDown",y,a))}},actionMove:{get:function(){return this.A!==null?this.A.ia:null},set:function(a){var y=this.actionMove;y!==a&&(wi(this),this.A.ia=a,this.g("actionMove",y,a))}},actionUp:{get:function(){return this.A!==null?this.A.Ha:null},set:function(a){var y=this.actionUp;y!==a&&(wi(this),this.A.Ha=a,this.g("actionUp",y,a))}},actionCancel:{get:function(){return this.A!==null?this.A.F:null},set:function(a){var y=this.actionCancel;y!==a&&(wi(this),this.A.F=a,this.g("actionCancel",y,a))}},toolTip:{get:function(){return this.A!==null?this.A.$h:null},set:function(a){var y=this.toolTip;y!==a&&(wi(this),this.A.$h=a,this.g("toolTip",y,a))}},contextMenu:{get:function(){return this.A!==null?this.A.Ch:null},set:function(a){var y=this.contextMenu;y!==a&&(wi(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),te.prototype.trigger=te.prototype.Jv,te.prototype.findBindingPanel=te.prototype.ih,te.prototype.findTemplateBinder=te.prototype.pz,te.prototype.setProperties=te.prototype.nm,te.prototype.apply=te.prototype.apply,te.prototype.attach=te.prototype.Du,te.prototype.set=te.prototype.set,te.prototype.isEnabledObject=te.prototype.If,te.prototype.isVisibleObject=te.prototype.Ed,te.prototype.isContainedBy=te.prototype.rg,te.prototype.getNearestIntersectionPoint=te.prototype.rs,te.prototype.getLocalPoint=te.prototype.qs,te.prototype.getDocumentScale=te.prototype.Df,te.prototype.getDocumentAngle=te.prototype.li,te.prototype.getDocumentBounds=te.prototype.mi,te.prototype.getDocumentPoint=te.prototype.ga,te.prototype.intersectsRect=te.prototype.Yc,te.prototype.containedInRect=te.prototype.fh,te.prototype.containsRect=te.prototype.Re,te.prototype.containsPoint=te.prototype.ca,te.prototype.raiseChanged=te.prototype.g,te.prototype.raiseChangedEvent=te.prototype.cb,te.prototype.addCopyProperty=te.prototype.Vw;var Hf=null;te.className="GraphObject",Hf=new Rn,mA("Button",function(){function a(x,E){return x.diagram.ic(x.documentPoint,function(b){for(;b.panel!==null&&!b.isActionable;)b=b.panel;return b},function(b){return b===E})!==null}var y=Qa(ze,ze.Auto,{isActionable:!0,enabledChanged:function(x,E){if(x instanceof ze){var b=x.fb("ButtonBorder");b!==null&&(b.fill=E?x._buttonFillNormal:x._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD",_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Qa(yi,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Vn(0,0,2.76142374915397,2.761423749153969),spot2:new Vn(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));return y.mouseEnter=function(x,E){if(E.If()&&E instanceof ze&&(x=E.fb("ButtonBorder"),x instanceof yi)){var b=E._buttonFillOver;E._buttonFillNormal=x.fill,x.fill=b,b=E._buttonStrokeOver,E._buttonStrokeNormal=x.stroke,x.stroke=b}},y.mouseLeave=function(x,E){E.If()&&E instanceof ze&&(x=E.fb("ButtonBorder"),x instanceof yi&&(x.fill=E._buttonFillNormal,x.stroke=E._buttonStrokeNormal))},y.actionDown=function(x,E){if(E.If()&&E instanceof ze&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof yi){x=x.diagram;var z=x.skipsUndoManager;x.skipsUndoManager=!0;var tt=E._buttonFillPressed;E._buttonFillOver=b.fill,b.fill=tt,tt=E._buttonStrokePressed,E._buttonStrokeOver=b.stroke,b.stroke=tt,x.skipsUndoManager=z}}},y.actionUp=function(x,E){if(E.If()&&E instanceof ze&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof yi){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,E)?(b.fill=E._buttonFillOver,b.stroke=E._buttonStrokeOver):(b.fill=E._buttonFillNormal,b.stroke=E._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionCancel=function(x,E){if(E.If()&&E instanceof ze&&E._buttonFillPressed!==null){var b=E.fb("ButtonBorder");if(b instanceof yi){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,E)?(b.fill=E._buttonFillOver,b.stroke=E._buttonStrokeOver):(b.fill=E._buttonFillNormal,b.stroke=E._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionMove=function(x,E){if(E.If()&&E instanceof ze&&E._buttonFillPressed!==null){var b=x.diagram;if(b.firstInput.button===0&&(b.currentTool.standardMouseOver(),a(x,E)&&(x=E.fb("ButtonBorder"),x instanceof yi))){var z=b.skipsUndoManager;b.skipsUndoManager=!0;var tt=E._buttonFillPressed;x.fill!==tt&&(x.fill=tt),tt=E._buttonStrokePressed,x.stroke!==tt&&(x.stroke=tt),b.skipsUndoManager=z}}},y}),mA("TreeExpanderButton",function(){var a=Qa("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Qa(yi,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ao},new vo("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new vo("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof Wi&&(x=x.adornedPart),x instanceof hn){var E=x.diagram;if(E!==null){if(E=E.commandHandler,x.isTreeExpanded){if(!E.canCollapseTree(x))return}else if(!E.canExpandTree(x))return;y.handled=!0,x.isTreeExpanded?E.collapseTree(x):E.expandTree(x)}}},a}),mA("SubGraphExpanderButton",function(){var a=Qa("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Qa(yi,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ao},new vo("figure","isSubGraphExpanded",function(y,x){return x=x.panel,y?x._subGraphExpandedFigure:x._subGraphCollapsedFigure}).cp()));return a.click=function(y,x){if(x=x.part,x instanceof Wi&&(x=x.adornedPart),x instanceof li){var E=x.diagram;if(E!==null){if(E=E.commandHandler,x.isSubGraphExpanded){if(!E.canCollapseSubGraph(x))return}else if(!E.canExpandSubGraph(x))return;y.handled=!0,x.isSubGraphExpanded?E.collapseSubGraph(x):E.expandSubGraph(x)}}},a}),mA("ToolTip",function(){return Qa(Wi,ze.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Rt(0,3),shadowBlur:5},Qa(yi,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Vn(0,0,4,6),spot2:new Vn(1,1,-4,-4)}))}),mA("ContextMenu",function(){return Qa(Wi,ze.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Rt(0,3),shadowBlur:5},new vo("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),mA("ContextMenuButton",function(){var a=Qa("Button");a.stretch=In;var y=a.fb("ButtonBorder");return y instanceof yi&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new Vn(0,0,2,3),y.spot2=new Vn(1,1,-2,-2)),a}),mA("PanelExpanderButton",function(a){var y=Md(a,"COLLAPSIBLE"),x=Qa("Button",{_buttonExpandedFigure:"M0 0 M0 6 L4 2 8 6 M8 8",_buttonCollapsedFigure:"M0 0 M0 2 L4 6 8 2 M8 8",_buttonFillNormal:"rgba(0, 0, 0, 0)",_buttonStrokeNormal:null,_buttonFillOver:"rgba(0, 0, 0, .2)",_buttonStrokeOver:null,_buttonFillPressed:"rgba(0, 0, 0, .4)",_buttonStrokePressed:null},Qa(yi,{name:"ButtonIcon",strokeWidth:2},new vo("geometryString","visible",function(E){return E?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof yi&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(E,b){var z=b.diagram;if(z!==null&&!z.isReadOnly){var tt=b.ih();tt===null&&(tt=b.part),tt!==null&&(b=tt.fb(y),b!==null&&(E.handled=!0,z.Ea("Collapse/Expand Panel"),b.visible=!b.visible,z.eb("Collapse/Expand Panel")))}},x}),mA("CheckBoxButton",function(a){var y=Md(a);return a=Qa("Button",{desiredSize:new an(14,14)},Qa(yi,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Ve,geometryStretch:Fn,visible:!1},y!==""?new vo("visible",y).Kx():[])),a.click=function(x,E){if(E instanceof ze){var b=x.diagram;if(!(b===null||b.isReadOnly||y!==""&&b.model.isReadOnly)){x.handled=!0;var z=E.fb("ButtonIcon");b.Ea("checkbox"),z.visible=!z.visible,typeof E._doClick=="function"&&E._doClick(x,E),b.eb("checkbox")}}},a}),mA("CheckBox",function(a){a=Md(a),a=Qa("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Pi(0,1,0,0)});var y=Qa(ze,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Pi(1),_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillPressed:a._buttonFillPressed,_buttonStrokePressed:a._buttonStrokePressed,_buttonFillDisabled:a._buttonFillDisabled,mouseEnter:a.mouseEnter,mouseLeave:a.mouseLeave,actionDown:a.actionDown,actionUp:a.actionUp,actionCancel:a.actionCancel,actionMove:a.actionMove,click:a.click,_buttonClick:a.click});return a.mouseEnter=null,a.mouseLeave=null,a.actionDown=null,a.actionUp=null,a.actionCancel=null,a.actionMove=null,a.click=null,y}),te.None=Ge=new ce(te,"None",0),te.Default=oi=new ce(te,"Default",0),te.Vertical=_n=new ce(te,"Vertical",4),te.Horizontal=In=new ce(te,"Horizontal",5),te.Fill=Ve=new ce(te,"Fill",3),te.Uniform=Fn=new ce(te,"Uniform",1),te.UniformToFill=bi=new ce(te,"UniformToFill",2),te.FlipVertical=Bi=new ce(te,"FlipVertical",1),te.FlipHorizontal=Di=new ce(te,"FlipHorizontal",2),te.FlipBoth=ar=new ce(te,"FlipBoth",3),te.make=Qa,te.getBuilders=function(){var a=new Rn,y;for(y in Hf)if(y!==y.toLowerCase()){var x=Hf.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},te.defineBuilder=mA,te.build=function(a,y,x){for(var E=[],b=2;b<arguments.length;++b)E[b-2]=arguments[b];if(b=Hf.I(a),typeof b=="function"&&(E=b([a].concat(E)),E instanceof te))return y&&E.set(y),E;pe('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},te.takeBuilderArgument=Md;function Gh(){this.nc=!1,this.xa="",this.zp=-1,this.nb=this.wm=this.te=null,this.j="",this.hb=this.Di=this.Hb=this.Ch=this.$h=this.F=this.Ha=this.ia=this.V=this.Lh=this.Xd=this.Of=this.Nh=this.Oh=this.Qh=this.Ph=this.Mh=this.Bh=this.Fh=this.zh=null,this.u=Nr,this.o=Yo,this.hg=oi,this.ob=this.Bi=1,this.Pf=Ge,this.Pc=this.Ci=this.gd=null,this.Oc="category"}Gh.prototype.copy=function(){var a=new Gh;return a.xa=this.xa,a.zp=this.zp,a.te=this.te,a.nb=this.nb,a.j=this.j,a.zh=this.zh,a.Fh=this.Fh,a.Bh=this.Bh,a.Mh=this.Mh,a.Ph=this.Ph,a.Qh=this.Qh,a.Oh=this.Oh,a.Nh=this.Nh,a.Of=this.Of,a.Xd=this.Xd,a.Lh=this.Lh,a.V=this.V,a.ia=this.ia,a.Ha=this.Ha,a.F=this.F,a.$h=this.$h,a.Ch=this.Ch,a.Hb=this.Hb,a.Di=this.Di,a.hb=this.hb,a.u=this.u.J(),a.o=this.o.J(),a.hg=this.hg,a.Bi=this.Bi,a.ob=this.ob,a.Pf=this.Pf,a.gd=this.gd,a.Ci=this.Ci,a.Pc=this.Pc,a.Oc=this.Oc,a};function ih(){this.u=-1/0,this.o=0,this.F=Gr,this.rr=oa,this.j=this.V="None"}ih.prototype.copy=function(){var a=new ih;return a.u=this.u,a.o=this.o,a.F=this.F.J(),a.rr=this.rr,a.V=this.V,a.j=this.j,a},ih.className="LinkElementSettings";function kd(){this.yj=this.Xi=Xo,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}kd.prototype.copy=function(){var a=new kd;return a.Xi=this.Xi.J(),a.yj=this.yj.J(),a.Vi=this.Vi,a.wj=this.wj,a.Wi=this.Wi,a.xj=this.xj,a.hq=this.hq,a.Tr=this.Tr,a.iq=this.iq,a.Ur=this.Ur,a},kd.className="LinkSettings";function jh(){this.ha=[1,0,0,1,0,0]}jh.prototype.copy=function(){var a=new jh;return a.ha[0]=this.ha[0],a.ha[1]=this.ha[1],a.ha[2]=this.ha[2],a.ha[3]=this.ha[3],a.ha[4]=this.ha[4],a.ha[5]=this.ha[5],a},jh.prototype.translate=function(a,y){this.ha[4]+=this.ha[0]*a+this.ha[2]*y,this.ha[5]+=this.ha[1]*a+this.ha[3]*y},jh.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},jh.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a!==0){if(this.translate(y,x),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));var b=this.ha[1]*a+this.ha[3]*E,z=this.ha[0]*-E+this.ha[2]*a,tt=this.ha[1]*-E+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*E,this.ha[1]=b,this.ha[2]=z,this.ha[3]=tt,this.translate(-y,-x)}},jh.className="STransform";function xu(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}xu.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},xu.className="SGradient";function Fs(a,y,x){this.ownerDocument=a=y===void 0?Fe.document:y,this.cA="http://www.w3.org/2000/svg",a!==void 0&&(this.Oa=this.Ud("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.style.display="block",this.style.letterSpacing="normal",this.style.wordSpacing="normal",this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink")),this.hs=null,this.context=new ia(this,x)}Fs.prototype.resize=function(a,y,x,E){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=E+"px",this.Oa.setAttributeNS(null,"width",x+"px"),this.Oa.setAttributeNS(null,"height",E+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+x+" "+E),this.context.ww.firstElementChild.setAttributeNS(null,"width",x+"px"),this.context.ww.firstElementChild.setAttributeNS(null,"height",E+"px"),!0):!1},Fs.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),on(y))for(var E in y)a.setAttributeNS(E==="href"?"http://www.w3.org/1999/xlink":"",E,y[E]);return x!==void 0&&(a.textContent=x),a},Fs.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Fs.prototype.focus=function(){this.Oa.focus()},Fs.prototype.mx=function(){this.ownerDocument=null},Ie.Object.defineProperties(Fs.prototype,{width:{get:function(){return this.Oa.width.baseVal.value},set:function(a){this.Oa.setAttribute("width",a+"px")}},height:{get:function(){return this.Oa.height.baseVal.value},set:function(a){this.Oa.setAttribute("height",a+"px")}},style:{get:function(){return this.Oa.style}}}),Fs.className="SVGSurface";function ia(a,y){this.Gv=a,this.svg=a.Oa,this.stack=[],this.nh=[],this.fillStyle="#000000",this.font="10px sans-serif",this.globalAlpha=1,this.lineCap="butt",this.lineDashOffset=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.Il=!1,this.strokeStyle="#000000",this.textAlign="start",this.clipInsteadOfFill=!1,this.Vg=this.Br=this.Ar=0,this.yd=this.ad=null,this.path=[],this.Yl={},this.Ct=!1,this.Yg=null,this.uj=0,this.rb=new jh,this.j=vc(this),this.Nj=vc(this,"gojs-diagram"),this.Hl=this.ti=null;var x=lo++,E=this.Ud("clipPath",{id:"mainClip"+x});E.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height})),this.ww=E,this.svg.appendChild(this.j),this.j.appendChild(this.Nj),this.svg.appendChild(E),this.j.setAttributeNS(null,"clip-path","url(#mainClip"+x+")"),this.eA={},this.isTemporary=!!y,this.filter="",this.bk=null}function bd(a,y,x,E,b,z,tt){a.Nj===void 0?Nd(a,y,x,E,b,z,tt):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+E+", "+b+", "+z+", "+tt+")")}Bt=ia.prototype,Bt.arc=function(a,y,x,E,b,z,tt,rt){var ot=2*Math.PI,at=ot-1e-6,At=x*Math.cos(E),ft=x*Math.sin(E),pt=a+At,xt=y+ft,Ct=z?0:1;E=z?E-b:b-E,(1e-6<Math.abs(tt-pt)||1e-6<Math.abs(rt-xt))&&this.path.push(["L",pt,+xt]),0>E&&(E=E%ot+ot),E>at?(this.path.push(["A",x,x,0,1,Ct,a-At,y-ft]),this.path.push(["A",x,x,0,1,Ct,pt,xt])):1e-6<E&&this.path.push(["A",x,x,0,+(E>=Math.PI),Ct,a+x*Math.cos(b),y+x*Math.sin(b)])},Bt.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},Bt.Se=function(a){this.addPath(this.path,this.rb,a||0)},Bt.bezierCurveTo=function(a,y,x,E,b,z){this.path.push(["C",a,y,x,E,b,z])},Bt.clearRect=function(){},Bt.clip=function(){this.Yl.clipPath=!0},Bt.closePath=function(){this.path.push(["z"])},Bt.createLinearGradient=function(a,y,x,E){var b=new xu("linear");return b.x1=a,b.y1=y,b.x2=x,b.y2=E,b},Bt.createPattern=function(a){var y="";a instanceof HTMLCanvasElement&&(y=a.toDataURL()),a instanceof HTMLImageElement&&(y=a.getAttribute("src"));var x=this.eA;if(x[y])return"url(#"+x[y]+")";var E="PATTERN"+lo++,b={x:0,y:0,width:a.width,height:a.height,href:y};return a=this.Ud("pattern",{width:a.width,height:a.height,id:E,patternUnits:"userSpaceOnUse"}),a.appendChild(this.Ud(bl,b)),this.svg.appendChild(a),x[y]=E,"url(#"+E+")"},Bt.createRadialGradient=function(a,y,x,E,b,z){var tt=new xu("radial");return tt.x1=a,tt.y1=y,tt.r1=x,tt.x2=E,tt.y2=b,tt.r2=z,tt};function qp(a,y,x,E,b,z,tt,rt,ot){E=rt/E,b=ot/b,z===0&&tt===0||a.rb.translate(z,tt),E===1&&b===1||a.rb.scale(E,b),y===0&&x===0||a.rb.translate(-y,-x)}Bt.drawImage=function(a,y,x,E,b,z,tt,rt,ot){var at="";a instanceof HTMLCanvasElement&&(at=a.toDataURL()),a instanceof HTMLImageElement&&(at=a.getAttribute("src"));var At=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,E===void 0&&(z=y,tt=x,rt=E=At,ot=b=a),E=E||0,b=b||0,rt=rt||0,ot=ot||0,qp(this,y,x,E,b,z||0,tt||0,rt,ot),z={x:0,y:0,width:At||E,height:a||b,href:at},re.$(E,rt)&&re.$(b,ot)?at.toLowerCase().indexOf(".svg")===-1&&at.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||E!==At||b!==a)&&(E+=y,b+=x,z["clip-path"]="path('M "+y+","+x+" L "+E+" "+x+" L "+E+" "+b+" L "+y+" "+b+" z')"),Kh(this,bl,z,this.rb),this.addElement(bl,z)},Bt.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),zh(this,this.Yl)},Bt.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},Bt.fillRect=function(a,y,x,E){a=[a,y,x,E],a={x:a[0],y:a[1],width:a[2],height:a[3]},Kh(this,"fill",a,this.rb),this.addElement("rect",a)},Bt.ox=function(a,y,x,E){a={x:a,y,width:x,height:E},Kh(this,"fill",a,this.rb),zh(this,a),this.svg.prepend(this.Ud("rect",a))},Bt.fillText=function(a,y,x){a=[a,y,x],y=this.textAlign,y==="left"?y="start":y==="right"?y="end":y==="center"&&(y="middle"),y={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":y},Kh(this,"fill",y,this.rb),this.addElement("text",y,a[0])},Bt.lineTo=function(a,y){this.path.push(["L",a,y])},Bt.moveTo=function(a,y){this.path.push(["M",a,y])},Bt.quadraticCurveTo=function(a,y,x,E){this.path.push(["Q",a,y,x,E])},Bt.rect=function(a,y,x,E){this.path.push(["M",a,y],["L",a+x,y],["L",a+x,y+E],["L",a,y+E],["z"])},Bt.restore=function(){this.rb=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.lineDashOffset=a.lineDashOffset,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,this.bk=a.bk},Bt.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,lineDashOffset:this.lineDashOffset,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,bk:this.bk});for(var a=[],y=0;y<this.path.length;y++)a.push(this.path[y]);this.stack.push(a),this.stack.push(this.rb.copy())},Bt.setTransform=function(a,y,x,E,b,z){a===1&&y===0&&x===0&&E===1&&b===0&&z===0||Nd(this,a,y,x,E,b,z)};function $p(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}Bt.scale=function(a,y){this.rb.scale(a,y)},Bt.translate=function(a,y){this.rb.translate(a,y)},Bt.transform=function(){},Bt.yc=function(){},Bt.stroke=function(){t0(this,this.Yl)},Bt.jk=function(){this.clipInsteadOfFill||this.stroke()},Bt.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},Bt.addElement=function(a,y,x){return a=this.Ud(a,y,x),this.yd!==null?this.yd.appendChild(a):this.yd=a,this.ad=a};function Kh(a,y,x,E){y==="fill"?zh(a,x):y==="stroke"&&t0(a,x),E!==null&&(a=E.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function zh(a,y){a.fillStyle instanceof xu?y.fill=Vh(a,a.fillStyle,!0):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.fill="rgb("+a[1]+","+a[2]+","+a[3]+")",y["fill-opacity"]=a[4]):y.fill=a.fillStyle}function Td(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof xu?y.setAttributeNS(null,"fill",Vh(a,a.fillStyle,!0)):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.setAttributeNS(null,x,"rgb("+a[1]+","+a[2]+","+a[3]+")"),y.setAttributeNS(null,x+"-opacity",a[4])):y.setAttributeNS(null,x,a.fillStyle)}function t0(a,y){if(a.strokeStyle instanceof xu)y.stroke=Vh(a,a.strokeStyle,!1);else if(/^rgba\(/.test(a.strokeStyle)){var x=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.strokeStyle);y.stroke="rgb("+x[1]+","+x[2]+","+x[3]+")",y["stroke-opacity"]=x[4]}else y.stroke=a.strokeStyle;y["stroke-width"]=a.lineWidth,y["stroke-linecap"]=a.lineCap,y["stroke-linejoin"]=a.lineJoin,y["stroke-miterlimit"]=a.miterLimit,a.Ct&&(y["stroke-dasharray"]=a.Yg.toString(),y["stroke-dashoffset"]=a.uj)}function Vh(a,y,x){var E="";if(E=a.Hl!==null?a.Hl.getAttribute(x?"fill":"stroke"):null,E!==null&&E.indexOf("GRAD")!==-1?(E=E.split("#")[1].slice(0,-1),x=a.svg.getElementById(E),x!==null&&x.remove()):E="GRAD"+lo++,y.type==="linear")x=a.Ud("linearGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,id:E,gradientUnits:"userSpaceOnUse"});else if(y.type==="radial")x=a.Ud("radialGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,r1:y.r1,r2:y.r2,id:E});else throw Error("invalid gradient");var b=y.gx;y=b.length;for(var z=[],tt=0;tt<y;tt++){var rt=b[tt],ot=rt.color;rt={offset:rt.offset,"stop-color":ot},/^rgba\(/.test(ot)&&(ot=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(ot),rt["stop-color"]="rgb("+ot[1]+","+ot[2]+","+ot[3]+")",rt["stop-opacity"]=ot[4]),z.push(rt)}for(z.sort(function(at,At){return at.offset>At.offset?1:-1}),b=0;b<y;b++)x.appendChild(a.Ud("stop",z[b]));return a.svg.appendChild(x),"url(#"+E+")"}Bt.addPath=function(a,y,x){for(var E=[],b=0;b<a.length;b++){var z=ie(a[b]),tt=[z.shift()];if(tt[0]==="A")tt.push(z.shift()+","+z.shift(),z.shift(),z.shift()+","+z.shift(),z.shift()+","+z.shift());else for(;z.length;)tt.push(z.shift()+","+z.shift());E.push(tt.join(" "))}if(E=E.join(" "),a=this.Yl,a.clipPath)0<this.nh.length&&this.nh[this.nh.length-1].setAttributeNS(null,"clip-path",'path("'+E+'")');else if(a.d=E,Kh(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var rt in a)rt!=="transform"&&y.setAttributeNS(null,rt,a[rt]);else{rt=y.getElementsByTagName("path");for(var ot in a)ot!=="transform"&&rt[x].setAttributeNS(null,ot,a[ot])}else this.addElement("path",a)};function Nd(a,y,x,E,b,z,tt){var rt=new jh;rt.ha=[y,x,E,b,z,tt],y={},Kh(a,"g",y,rt),rt=a.addElement("g",y),a.nh.push(rt)}function vc(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}Bt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function Jl(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function RA(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}Bt.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},Bt.fs=function(){this.Ct=!1},Bt.Vc=function(){},Bt.Wx=function(){},ia.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},ia.prototype.getImageData=function(){return null},ia.prototype.measureText=function(){return null};function Qd(a,y){y=y.getAttribute("fill"),y!==null&&(y=y.split("#"),y.length!==1&&(y=a.svg.getElementById(y[1].slice(0,-1)),y!==null&&a.svg.innerHTML.match(new RegExp(y.id,"g")).length===1&&y.remove()))}ia.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},ia.className="SVGContext",ge.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Fs(this,Fe.document));var y=new Fs(this,Fe.document,!0);a===void 0&&(a=new Yn);var x=this;return Hg(this,function(E,b){return E=pc(x,E,"SVG",y),E=E!==null?E.svg:null,typeof b=="function"?(b(E),null):E},a)},ge.prototype.makeSvg=ge.prototype.Cs,ge.prototype.av=function(a){return this.Cs(a)},ge.prototype.makeSVG=ge.prototype.av;function al(a,y,x,E){this.ownerDocument=y=y===void 0?Fe.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new Wh(y,x,E),y.H=a}al.prototype.resize=function(a,y,x,E){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=E+"px",!0):!1},al.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},al.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},al.prototype.focus=function(){this.Oa.focus()},al.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},Ie.Object.defineProperties(al.prototype,{width:{get:function(){return this.Oa.width},set:function(a){this.Oa.width=a}},height:{get:function(){return this.Oa.height},set:function(a){this.Oa.height=a}},style:{get:function(){return this.Oa.style}}}),al.className="CanvasSurface";function Wh(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&pe("Browser does not support HTML Canvas Element"),this.ct=this.et=this.dt="",this.Hm=!1,this.Vg=this.Br=this.Ar=0,this.Il=!1,this.El=new Li,this.isTemporary=!!x}Bt=Wh.prototype,Bt.Wx=function(a){this.Z.imageSmoothingEnabled=a},Bt.arc=function(a,y,x,E,b,z){this.Z.arc(a,y,x,E,b,z)},Bt.beginPath=function(){this.Z.beginPath()},Bt.Se=function(){},Bt.bezierCurveTo=function(a,y,x,E,b,z){this.Z.bezierCurveTo(a,y,x,E,b,z)},Bt.clearRect=function(a,y,x,E){this.yc(),this.Z.clearRect(a,y,x,E)},Bt.clip=function(){this.Z.clip()},Bt.closePath=function(){this.Z.closePath()},Bt.createLinearGradient=function(a,y,x,E){return this.Z.createLinearGradient(a,y,x,E)},Bt.createPattern=function(a,y){return this.Z.createPattern(a,y)},Bt.createRadialGradient=function(a,y,x,E,b,z){return this.Z.createRadialGradient(a,y,x,E,b,z)},Bt.drawImage=function(a,y,x,E,b,z,tt,rt,ot){E===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,E,b,z,tt,rt,ot)},Bt.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},Bt.fillRect=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Bt.ox=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Bt.fillText=function(a,y,x){this.Z.fillText(a,y,x)},Bt.getImageData=function(a,y,x,E){return this.Z.getImageData(a,y,x,E)},Bt.lineTo=function(a,y){this.Z.lineTo(a,y)},Bt.measureText=function(a){return this.Z.measureText(a)},Bt.moveTo=function(a,y){this.Z.moveTo(a,y)},Bt.quadraticCurveTo=function(a,y,x,E){this.Z.quadraticCurveTo(a,y,x,E)},Bt.rect=function(a,y,x,E){this.Z.rect(a,y,x,E)},Bt.restore=function(){this.Z.restore()},Bt.save=function(){this.yc(),this.Z.save()},Wh.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},Bt=Wh.prototype,Bt.setTransform=function(a,y,x,E,b,z){this.El.setTransform(a,y,x,E,b,z)},Bt.scale=function(a,y){this.El.scale(a,y)},Bt.translate=function(a,y){this.El.translate(a,y)},Bt.stroke=function(){this.Z.stroke()},Bt.transform=function(a,y,x,E,b,z){if(a!==1||y!==0||x!==0||E!==1||b!==0||z!==0){var tt=this.El,rt=tt.m11*a+tt.m21*y;a=tt.m12*a+tt.m22*y,y=tt.m11*x+tt.m21*E,x=tt.m12*x+tt.m22*E,tt.dx=tt.m11*b+tt.m21*z+tt.dx,tt.dy=tt.m12*b+tt.m22*z+tt.dy,tt.m11=rt,tt.m12=a,tt.m21=y,tt.m22=x}},Bt.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},Bt.ng=function(a,y){if(a instanceof nr&&a.type===Fi){var x=a.yk;a=a.ft,a>x?(this.scale(x/a,1),this.translate((a-x)/2,0)):x>a&&(this.scale(1,a/x),this.translate(0,(x-a)/2)),this.Hm?this.clip():this.fill(y),a>x?(this.translate(-(a-x)/2,0),this.scale(1/(x/a),1)):x>a&&(this.translate(0,-(x-a)/2),this.scale(1,1/(a/x)))}else this.Hm?this.clip():this.fill(y)},Bt.jk=function(){this.Hm||this.stroke()},Bt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},Bt.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},Bt.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(km),a.lineDashOffset=0)},Bt.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},Bt.Hs=function(){},Ie.Object.defineProperties(Wh.prototype,{fillStyle:{get:function(){return this.Z.fillStyle},set:function(a){this.ct!==a&&(this.ct=this.Z.fillStyle=a)}},font:{get:function(){return this.Z.font},set:function(a){this.dt!==a&&(this.dt=this.Z.font=a)}},globalAlpha:{get:function(){return this.Z.globalAlpha},set:function(a){this.Z.globalAlpha=a}},lineCap:{get:function(){return this.Z.lineCap},set:function(a){this.Z.lineCap=a}},lineDashOffset:{get:function(){return this.Z.lineDashOffset},set:function(a){this.Z.lineDashOffset=a}},lineJoin:{get:function(){return this.Z.lineJoin},set:function(a){this.Z.lineJoin=a}},lineWidth:{get:function(){return this.Z.lineWidth},set:function(a){this.Z.lineWidth=a}},miterLimit:{get:function(){return this.Z.miterLimit},set:function(a){this.Z.miterLimit=a}},shadowBlur:{get:function(){return this.Z.shadowBlur},set:function(a){this.Z.shadowBlur=a}},shadowColor:{get:function(){return this.Z.shadowColor},set:function(a){this.Z.shadowColor=a}},shadowOffsetX:{get:function(){return this.Z.shadowOffsetX},set:function(a){this.Z.shadowOffsetX=a}},shadowOffsetY:{get:function(){return this.Z.shadowOffsetY},set:function(a){this.Z.shadowOffsetY=a}},strokeStyle:{get:function(){return this.Z.strokeStyle},set:function(a){this.et!==a&&(this.et=this.Z.strokeStyle=a)}},textAlign:{get:function(){return this.Z.textAlign},set:function(a){this.Z.textAlign=a}},imageSmoothingEnabled:{get:function(){return this.Z.imageSmoothingEnabled},set:function(a){this.Z.imageSmoothingEnabled=a}},filter:{get:function(){return this.Z.filter},set:function(a){this.Z.filter=a===""?"none":a}},clipInsteadOfFill:{get:function(){return this.Hm},set:function(a){this.Hm=a}}});var km=Object.freeze([]);Wh.className="CanvasSurfaceContext";function Ud(){this.F=this.o=this.u=this.j=0}Ud.className="ColorNumbers";function nr(a,y){Gn||(wt(),Gn=!0),rr(this),this._isFrozen=!1,a===void 0?(this.na=Ii,this.xk="black"):typeof a=="string"?(this.na=Ii,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===Ai?(this.Qd=Ml,this.Lk=da):this.Lk=a===Fi?this.Qd=Xi:this.Qd=ts,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}nr.prototype.copy=function(){var a=new nr;return a.na=this.na,a.xk=this.xk,a.Qd=this.Qd.J(),a.Lk=this.Lk.J(),a.Gr=this.Gr,a.Xp=this.Xp,this.we!==null&&(a.we=this.we.copy()),a.cr=this.cr,a},Bt=nr.prototype,Bt.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Bt.ka=function(){return Object.isFrozen(this)&&pe("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Bt.qb=function(a){a.classType===nr&&(this.type=a)},Bt.toString=function(){var a="Brush(";if(this.type===Ii)a+=this.color;else if(a=this.type===Ai?a+"Linear ":this.type===Fi?a+"Radial ":this.type===Ur?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,this.colorStops!==null)for(var y=this.colorStops.iterator;y.next();)a+=" "+y.key+":"+y.value;return a+")"},Bt.addColorStop=function(a,y){return this._isFrozen&&Un(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&pi(a,"0 <= loc <= 1",nr,"addColorStop:loc"),this.we===null&&(this.we=new Rn),this.we.add(a,y),this.na===Ii&&(this.type=Ai),this.xe=null,this},Bt.Vz=function(a,y){if(this._isFrozen&&Un(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?$i:y,this.type===Ii)GA(this.color),this.color=Rf(a,y);else if((this.type===Ai||this.type===Fi)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)GA(x.value),this.addColorStop(x.key,Rf(a,y));return this};function e0(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?$i:x,GA(a),Rf(y,x)}Bt.Wy=function(a,y){if(this._isFrozen&&Un(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?$i:y,this.type===Ii)GA(this.color),this.color=Rf(-a,y);else if((this.type===Ai||this.type===Fi)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)GA(x.value),this.addColorStop(x.key,Rf(-a,y));return this};function n0(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?$i:x,GA(a),Rf(-y,x)}function ep(a,y,x){GA(a),a=ae.j;var E=ae.u,b=ae.o,z=ae.F;return GA(y),x===void 0&&(x=.5),"rgba("+Math.round((ae.j-a)*x+a)+", "+Math.round((ae.u-E)*x+E)+", "+Math.round((ae.o-b)*x+b)+", "+Math.round((ae.F-z)*x+z)+")"}Bt.Gx=function(){if(this.type===Ii)return Of(this.color);if((this.type===Ai||this.type===Fi)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Fi)return Of(a.first().value);if(a.get(.5)!==null)return Of(a.get(.5));if(a.count===2)return a=a.Fa(),Of(ep(a[0].value,a[1].value));for(var y=a.iterator,x=-1,E=-1,b=1,z=1;y.next();){var tt=y.key,rt=Math.abs(.5-y.key);b>z&&rt<b?(x=tt,b=rt):z>=b&&rt<z&&(E=tt,z=rt)}return x>E&&(z=x,x=E,E=z,z=b),b=E-x,Of(ep(a.get(x),a.get(E),1-z/b))}return!1};function Of(a){return a?a instanceof nr?a.Gx():(GA(a),128>(299*ae.j+587*ae.u+114*ae.o)/1e3):!1}function Rf(a,y){switch(y){case $i:y=100*ip(ae.j);var x=100*ip(ae.u),E=100*ip(ae.o);return qe.j=.4124564*y+.3575761*x+.1804375*E,qe.u=.2126729*y+.7151522*x+.072175*E,qe.o=.0193339*y+.119192*x+.9503041*E,qe.F=ae.F,y=vt(qe.j/oe[0]),x=vt(qe.u/oe[1]),E=vt(qe.o/oe[2]),dn.j=116*x-16,dn.u=500*(y-x),dn.o=200*(x-E),dn.F=qe.F,dn.j=Math.min(100,Math.max(0,dn.j+100*a)),a=(dn.j+16)/116,y=a-dn.o/200,qe.j=oe[0]*mt(dn.u/500+a),qe.u=oe[1]*(dn.j>_t*Qt?Math.pow(a,3):dn.j/_t),qe.o=oe[2]*mt(y),qe.F=dn.F,a=-.969266*qe.j+1.8760108*qe.u+.041556*qe.o,y=.0556434*qe.j+-.2040259*qe.u+1.0572252*qe.o,ae.j=255*rp((3.2404542*qe.j+-1.5371385*qe.u+-.4985314*qe.o)/100),ae.u=255*rp(a/100),ae.o=255*rp(y/100),ae.F=qe.F,ae.j=Math.round(ae.j),255<ae.j?ae.j=255:0>ae.j&&(ae.j=0),ae.u=Math.round(ae.u),255<ae.u?ae.u=255:0>ae.u&&(ae.u=0),ae.o=Math.round(ae.o),255<ae.o?ae.o=255:0>ae.o&&(ae.o=0),"rgba("+ae.j+", "+ae.u+", "+ae.o+", "+ae.F+")";case tr:return np(),_e.o=Math.min(100,Math.max(0,_e.o+100*a)),"hsla("+_e.j+", "+_e.u+"%, "+_e.o+"%, "+_e.F+")";default:pe("Unknown color space: "+y)}}function GA(a){Gn||(wt(),Gn=!0);var y=xe;if(y!==null){y.clearRect(0,0,1,1),y.fillStyle="#000000";var x=y.fillStyle;y.fillStyle=a,y.fillStyle!==x?(y.fillRect(0,0,1,1),a=y.getImageData(0,0,1,1).data,ae.j=a[0],ae.u=a[1],ae.o=a[2],ae.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,ae.j=0,ae.u=0,ae.o=0,ae.F=1)}}function np(){var a=ae.j/255,y=ae.u/255,x=ae.o/255,E=Math.max(a,y,x),b=Math.min(a,y,x),z=E-b;if(b=(E+b)/2,z===0)var tt=a=0;else{switch(E){case a:tt=(y-x)/z%6;break;case y:tt=(x-a)/z+2;break;case x:tt=(a-y)/z+4}tt*=60,0>tt&&(tt+=360),a=z/(1-Math.abs(2*b-1))}_e.j=Math.round(tt),_e.u=Math.round(100*a),_e.o=Math.round(100*b),_e.F=ae.F}function ip(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function rp(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function vt(a){return a>Qt?Math.pow(a,1/3):(_t*a+16)/116}function mt(a){var y=a*a*a;return y>Qt?y:(116*a-16)/_t}function St(a,y){typeof a!="string"&&(a instanceof nr||pe("Value for "+y+" must be a color string or a Brush, not "+a))}function wt(){xe=jr?new al(null,void 0,{willReadFrequently:!0}).context:null}Ie.Object.defineProperties(nr.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&Un(this,a),this.na=a,this.start.Mc()&&(a===Ai?this.start=Ml:a===Fi&&(this.start=Xi)),this.end.Mc()&&(a===Ai?this.end=da:a===Fi&&(this.end=Xi)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&Un(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&Un(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&Un(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&Un(this,a),0>a&&pi(a,">= zero",nr,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&Un(this,a),0>a&&pi(a,">= zero",nr,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&Un(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&Un(this,a),this.cr=a,this.xe=null}}}),nr.prototype.isDark=nr.prototype.Gx,nr.prototype.darkenBy=nr.prototype.Wy,nr.prototype.lightenBy=nr.prototype.Vz,nr.prototype.addColorStop=nr.prototype.addColorStop;var Qt=216/24389,_t=24389/27,oe=[95.047,100,108.883],xe=null,ae=new Ud,_e=new Ud,qe=new Ud,dn=new Ud,Gn=!1;nr.className="Brush";var Ii;nr.Solid=Ii=new ce(nr,"Solid",0);var Ai;nr.Linear=Ai=new ce(nr,"Linear",1);var Fi;nr.Radial=Fi=new ce(nr,"Radial",2);var Ur;nr.Pattern=Ur=new ce(nr,"Pattern",4);var $i;nr.Lab=$i=new ce(nr,"Lab",5);var tr;nr.HSL=tr=new ce(nr,"HSL",6),nr.randomColor=function(a,y){a===void 0&&(a=128),y===void 0&&(y=Math.max(a,255));var x=Math.abs(y-a);y=Math.floor(a+Math.random()*x).toString(16);var E=Math.floor(a+Math.random()*x).toString(16);return a=Math.floor(a+Math.random()*x).toString(16),2>y.length&&(y="0"+y),2>E.length&&(E="0"+E),2>a.length&&(a="0"+a),"#"+y+E+a},nr.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;Gn||(wt(),Gn=!0);var y=xe;if(y===null)return!0;y.fillStyle="#000000";var x=y.fillStyle;return y.fillStyle=a,y.fillStyle!==x?!0:(y.fillStyle="#FFFFFF",x=y.fillStyle,y.fillStyle=a,y.fillStyle!==x)},nr.lighten=function(a){return e0(a)},nr.lightenBy=e0,nr.darken=function(a){return n0(a)},nr.darkenBy=n0,nr.mix=ep,nr.isDark=Of;function ir(){this.xa="Base"}ir.prototype.measure=function(){},ir.prototype.Yz=function(a,y,x,E,b){a.measure(y,x,E,b)},ir.prototype.arrange=function(){},ir.prototype.Ly=function(a,y,x,E,b,z){a.arrange(y,x,E,b,z)},ir.prototype.iA=function(a){a.Uj()},ir.prototype.gc=function(){},Ie.Object.defineProperties(ir.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return ze}}}),ir.prototype.remeasureObject=ir.prototype.iA,ir.prototype.arrangeElement=ir.prototype.Ly,ir.prototype.measureElement=ir.prototype.Yz,ir.className="PanelLayout";function zr(){this.xa="Base"}ue(zr,ir),zr.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length;a=ya(a);for(var ot=0;ot<rt;ot++){var at=E[ot];if(at.visible||at===a){var At=at.margin,ft=At.right+At.left;At=At.top+At.bottom,at.measure(y,x,z,tt);var pt=at.measuredBounds;ft=Math.max(pt.width+ft,0),At=Math.max(pt.height+At,0),pt=at.position.x;var xt=at.position.y;isFinite(pt)||(pt=0),isFinite(xt)||(xt=0),at instanceof yi&&at.isGeometryPositioned&&(at=at.strokeWidth/2,pt-=at,xt-=at),Yr(b,pt,xt,ft,At)}}},zr.prototype.arrange=function(a,y,x){var E=y.length,b=a.padding;for(a=x.x-b.left,x=x.y-b.top,b=0;b<E;b++){var z=y[b],tt=z.measuredBounds,rt=z.margin,ot=z.position.x,at=z.position.y;if(ot=isNaN(ot)?-a:ot-a,at=isNaN(at)?-x:at-x,z instanceof yi&&z.isGeometryPositioned){var At=z.strokeWidth/2;ot-=At,at-=At}z.visible&&z.arrange(ot+rt.left,at+rt.top,tt.width,tt.height)}};function Lr(){this.xa="Base"}ue(Lr,ir),Lr.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length;y=Ce(),z=ya(a);for(var ot=0;ot<rt;ot++){var at=E[ot];if(at.visible||at===z){var At=Ys(at,!1);if(At!==Ge&&At!==In)y.push(at);else{at.measure(1/0,x,0,tt),At=at.margin,at=at.measuredBounds;var ft=Math.max(at.height+At.top+At.bottom,0);b.width+=Math.max(at.width+At.right+At.left,0),b.height=Math.max(b.height,ft)}}}for(E=y.length,a.desiredSize.height?x=Math.min(a.desiredSize.height,a.maxSize.height):b.height!==0&&(x=Math.min(b.height,a.maxSize.height)),a=0;a<E;a++)ot=y[a],(ot.visible||ot===z)&&(At=ot.margin,rt=At.right+At.left,At=At.top+At.bottom,ot.measure(1/0,x,0,tt),ot=ot.measuredBounds,At=Math.max(ot.height+At,0),b.width+=Math.max(ot.width+rt,0),b.height=Math.max(b.height,At));Oe(y)},Lr.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.top,tt=a.isOpposite,rt=tt?x.width:b.left,ot=0;ot<E;ot++){var at=z,At=y[ot];if(At.visible){var ft=At.measuredBounds,pt=At.margin,xt=pt.top+pt.bottom,Ct=z+b.bottom,Mt=ft.height,Gt=Ys(At,!1);(isNaN(At.desiredSize.height)&&Gt===Ve||Gt===_n)&&(Mt=Math.max(x.height-xt-Ct,0)),xt=Mt+xt+Ct,Ct=At.alignment,Ct.Xb()&&(Ct=a.defaultAlignment),Ct.sb()||(Ct=Xi),tt&&(rt-=ft.width+pt.left+pt.right),At.arrange(rt+Ct.offsetX+pt.left,at+Ct.offsetY+pt.top+(x.height*Ct.y-xt*Ct.y),ft.width,Mt),tt||(rt+=ft.width+pt.left+pt.right)}}};function ji(){this.xa="Base"}ue(ji,ir),ji.prototype.measure=function(a,y,x,E,b,z){var tt=E.length;x=Ce();for(var rt=ya(a),ot=0;ot<tt;ot++){var at=E[ot];if(at.visible||at===rt){var At=Ys(at,!1);if(At!==Ge&&At!==_n)x.push(at);else{var ft=at.margin;At=ft.right+ft.left,ft=ft.top+ft.bottom,at.measure(y,1/0,z,0),at=at.measuredBounds,fa(b,Math.max(b.width,Math.max(at.width+At,0)),b.height+Math.max(at.height+ft,0))}}}if(E=x.length,E!==0){for(a.desiredSize.width?y=Math.min(a.desiredSize.width,a.maxSize.width):b.width!==0&&(y=Math.min(b.width,a.maxSize.width)),a=0;a<E;a++)ot=x[a],(ot.visible||ot===rt)&&(at=ot.margin,tt=at.right+at.left,at=at.top+at.bottom,ot.measure(y,1/0,z,0),ot=ot.measuredBounds,at=Math.max(ot.height+at,0),b.width=Math.max(b.width,Math.max(ot.width+tt,0)),b.height+=at);Oe(x)}},ji.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.left,tt=a.isOpposite,rt=tt?x.height:b.top,ot=0;ot<E;ot++){var at=z,At=y[ot];if(At.visible){var ft=At.measuredBounds,pt=At.margin,xt=pt.left+pt.right,Ct=z+b.right,Mt=ft.width,Gt=Ys(At,!1);(isNaN(At.desiredSize.width)&&Gt===Ve||Gt===In)&&(Mt=Math.max(x.width-xt-Ct,0)),xt=Mt+xt+Ct,Ct=At.alignment,Ct.Xb()&&(Ct=a.defaultAlignment),Ct.sb()||(Ct=Xi),tt&&(rt-=ft.height+pt.bottom+pt.top),At.arrange(at+Ct.offsetX+pt.left+(x.width*Ct.x-xt*Ct.x),rt+Ct.offsetY+pt.top,Mt,ft.height),tt||(rt+=ft.height+pt.bottom+pt.top)}}};function eo(){this.xa="Base"}ue(eo,ir),eo.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length,ot=a.Pb(),at=ot.margin,At=at.right+at.left,ft=at.top+at.bottom;ot.measure(y,x,z,tt);var pt=ot.measuredBounds;z=pt.width,tt=pt.height;var xt=Math.max(z+At,0),Ct=Math.max(tt+ft,0),Mt=a.isClipping,Gt=Me.allocAt(-at.left,-at.top,xt,Ct),It=Me.allocAt(0,0,z,tt);ao(ot,It,!0),z=It.width,tt=It.height;for(var zt=!0,Yt=ya(a),Xt=0;Xt<rt;Xt++){var $t=E[Xt];pt=y;var de=x;if($t!==ot&&($t.visible||$t===Yt)){at=$t.margin;var An=at.left,Bn=at.top;switch(xt=at.right+at.left,Ct=at.top+at.bottom,at=Ys($t,!1),at){case Ve:pt=z,de=tt,Bn=An=Ct=xt=0;break;case In:pt=z,An=xt=0;break;case _n:de=tt,Bn=Ct=0}$t.measure(pt,de,0,0),pt=$t.measuredBounds,xt=Math.max(pt.width+xt,0),Ct=Math.max(pt.height+Ct,0),at=$t.alignment,at.Xb()&&(at=a.defaultAlignment),at.sb()||(at=Xi);var vn=$t.alignmentFocus;if(vn.Xb()&&(vn=Xi),de=null,$t instanceof ze&&$t.$e!==""&&(de=$t.fb($t.$e),de===$t&&(de=null)),An=It.x-An,Bn=It.y-Bn,de!==null){for($t.arrange(0,0,pt.width,pt.height),pt=de.actualBounds,pt=Rt.allocAt(pt.x+(vn.x*pt.width-vn.offsetX),pt.y+(vn.y*pt.height-vn.offsetY)),de=de.panel;de!==$t;)de.transform.Ga(pt),de=de.panel;An+=at.x*z+at.offsetX-pt.x,Bn+=at.y*tt+at.offsetY-pt.y,Rt.free(pt)}else An+=at.x*z+at.offsetX-(vn.x*pt.width+vn.offsetX),Bn+=at.y*tt+at.offsetY-(vn.y*pt.height+vn.offsetY);zt?(zt=!1,b.h(An,Bn,xt,Ct)):Yr(b,An,Bn,xt,Ct)}}switch(zt?b.assign(Gt):Mt?b.Uu(It.x,It.y,It.width,It.height):Yr(b,Gt.x,Gt.y,Gt.width,Gt.height),Me.free(Gt),Me.free(It),at=ot.stretch,at===oi&&(at=Ys(ot,!1)),at){case Ge:return;case Ve:if(!isFinite(y)&&!isFinite(x))return;break;case In:if(!isFinite(y))return;break;case _n:if(!isFinite(x))return}for(pt=ot.measuredBounds,z=pt.width,tt=pt.height,xt=Math.max(z+At,0),Ct=Math.max(tt+ft,0),at=ot.margin,It=Me.allocAt(-at.left,-at.top,xt,Ct),ao(ot,It,!0),z=It.width,tt=It.height,y=0;y<rt;y++)x=E[y],x===ot||!x.visible&&x!==Yt||(at=x.margin,xt=at.right+at.left,Ct=at.top+at.bottom,pt=x.measuredBounds,xt=Math.max(pt.width+xt,0),Ct=Math.max(pt.height+Ct,0),At=x.alignment,At.Xb()&&(At=a.defaultAlignment),At.sb()||(At=Xi),x=x.alignmentFocus,x.Xb()&&(x=Xi),zt?(zt=!1,b.h(At.x*z+At.offsetX-(x.x*pt.width+x.offsetX)-at.left,At.y*tt+At.offsetY-(x.y*pt.height+x.offsetY)-at.top,xt,Ct)):Yr(b,At.x*z+At.offsetX-(x.x*pt.width+x.offsetX)-at.left,At.y*tt+At.offsetY-(x.y*pt.height+x.offsetY)-at.top,xt,Ct));zt?b.assign(Gt):Mt?b.Uu(It.x,It.y,It.width,It.height):Yr(b,Gt.x,Gt.y,Gt.width,Gt.height),Me.free(It)},eo.prototype.arrange=function(a,y,x){var E=y.length,b=a.Pb(),z=b.measuredBounds,tt=z.width,rt=z.height,ot=a.padding;z=ot.left,ot=ot.top;var at=z-x.x,At=ot-x.y;for(b.arrange(at,At,tt,rt),tt=Me.allocAt(0,0,tt,rt),ao(b,tt,!1),rt=0;rt<E;rt++){var ft=y[rt];if(ft!==b){at=ft.measuredBounds;var pt=at.width,xt=at.height;At=ft.alignment,At.Xb()&&(At=a.defaultAlignment),At.sb()||(At=Xi);var Ct=ft.alignmentFocus;if(Ct.Xb()&&(Ct=Xi),at=null,ft instanceof ze&&ft.$e!==""&&(at=ft.fb(ft.$e),at===ft&&(at=null)),at!==null){var Mt=at.actualBounds;for(Ct=Rt.allocAt(Mt.x+(Ct.x*Mt.width-Ct.offsetX),Mt.y+(Ct.y*Mt.height-Ct.offsetY)),at=at.panel;at!==ft;)at.transform.Ga(Ct),at=at.panel;at=At.x*tt.width+At.offsetX-Ct.x,At=At.y*tt.height+At.offsetY-Ct.y,Rt.free(Ct)}else at=At.x*tt.width+At.offsetX-(Ct.x*pt+Ct.offsetX),At=At.y*tt.height+At.offsetY-(Ct.y*xt+Ct.offsetY);at+=tt.x-x.x,At+=tt.y-x.y,ft.visible&&ft.arrange(z+at,ot+At,pt,xt)}}Me.free(tt)};function ao(a,y,x){var E=null;if(a instanceof ze&&a.$e!==""&&(E=a.fb(a.$e),E===a&&(E=null)),E!==null)for(x&&a.arrange(0,0,y.width,y.height),y.assign(E.actualBounds),E=E.panel;E!==a;)E.transform.pp(y),E=E.panel}function Mr(){this.xa="Base"}ue(Mr,ir),Mr.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length,ot=a.Pb(),at=ot.margin,At=y,ft=x,pt=at.right+at.left,xt=at.top+at.bottom;ot.measure(y,x,z,tt),at=ot.measuredBounds;var Ct=0,Mt=null;ot instanceof yi&&(Mt=ot,Ct=Mt.strokeWidth*Mt.scale);var Gt=Math.max(at.width+pt,0);at=Math.max(at.height+xt,0);var It=Tm(ot),zt=It.x*Gt+It.offsetX;It=It.y*at+It.offsetY;var Yt=Nm(ot),Xt=Yt.x*Gt+Yt.offsetX;for(Yt=Yt.y*at+Yt.offsetY,isFinite(y)&&(At=Math.max(Math.abs(zt-Xt)-Ct,0)),isFinite(x)&&(ft=Math.max(Math.abs(It-Yt)-Ct,0)),Ct=an.alloc(),Ct.h(0,0),a=ya(a),Yt=0;Yt<rt;Yt++)It=E[Yt],It===ot||!It.visible&&It!==a||(at=It.margin,Gt=at.right+at.left,zt=at.top+at.bottom,It.measure(At,ft,0,0),at=It.measuredBounds,Gt=Math.max(at.width+Gt,0),at=Math.max(at.height+zt,0),Ct.h(Math.max(Gt,Ct.width),Math.max(at,Ct.height)));if(rt===1)b.width=Gt,b.height=at,an.free(Ct);else{switch(It=Tm(ot),Yt=Nm(ot),rt=E=0,Yt.x!==It.x&&Yt.y!==It.y&&(E=Ct.width/Math.abs(Yt.x-It.x),rt=Ct.height/Math.abs(Yt.y-It.y)),an.free(Ct),Ct=0,Mt!==null&&(Ct=Mt.strokeWidth*Mt.scale,Om(Mt)===Fn&&(E=rt=Math.max(E,rt))),E+=Math.abs(It.offsetX)+Math.abs(Yt.offsetX)+Ct,rt+=Math.abs(It.offsetY)+Math.abs(Yt.offsetY)+Ct,Mt=ot.stretch,Mt===oi&&(Mt=Ys(ot,!1)),Mt){case Ge:tt=z=0;break;case Ve:isFinite(y)&&(E=y),isFinite(x)&&(rt=x);break;case In:isFinite(y)&&(E=y),tt=0;break;case _n:z=0,isFinite(x)&&(rt=x)}ot.Uj(),ot.measure(E,rt,z,tt),b.width=ot.measuredBounds.width+pt,b.height=ot.measuredBounds.height+xt}},Mr.prototype.arrange=function(a,y){var x=y.length,E=a.Pb(),b=E.measuredBounds,z=Me.alloc();z.h(0,0,1,1);var tt=E.margin,rt=tt.left;tt=tt.top;var ot=a.padding,at=ot.left;ot=ot.top,E.arrange(at+rt,ot+tt,b.width,b.height);var At=Tm(E),ft=Nm(E),pt=At.y*b.height+At.offsetY,xt=ft.x*b.width+ft.offsetX;for(ft=ft.y*b.height+ft.offsetY,z.x=At.x*b.width+At.offsetX,z.y=pt,Yr(z,xt,ft,0,0),z.x+=rt+at,z.y+=tt+ot,b=0;b<x;b++)rt=y[b],rt!==E&&(at=rt.measuredBounds,tt=rt.margin,ot=Math.max(at.width+tt.right+tt.left,0),At=Math.max(at.height+tt.top+tt.bottom,0),pt=rt.alignment,pt.Xb()&&(pt=a.defaultAlignment),pt.sb()||(pt=Xi),ot=z.width*pt.x+pt.offsetX-ot*pt.x+tt.left+z.x,tt=z.height*pt.y+pt.offsetY-At*pt.y+tt.top+z.y,rt.visible&&($o(z.x,z.y,z.width,z.height,ot,tt,at.width,at.height)?rt.arrange(ot,tt,at.width,at.height):rt.arrange(ot,tt,at.width,at.height,new Me(z.x,z.y,z.width,z.height))));Me.free(z)};function Ts(){this.xa="Base",this.name="Table"}ue(Ts,ir),Ts.prototype.measure=function(a,y,x,E,b){for(var z=E.length,tt=Ce(),rt=Ce(),ot=0;ot<z;ot++){var at=E[ot],At=at instanceof ze?at:null;if(At!==null&&Yh(At)&&at.visible){rt.push(At);for(var ft=At.O.s,pt=ft.length,xt=0;xt<pt;xt++){var Ct=ft[xt];At.type===ze.TableRow?Ct.row=at.row:At.type===ze.TableColumn&&(Ct.column=at.column),tt.push(Ct)}}else tt.push(at)}z=tt.length,z===0&&(a.Fb(0),a.Eb(0));for(var Mt=[],Gt=0;Gt<z;Gt++){var It=tt[Gt];It.visible&&(mo(It,!0),pA(It,!0),Mt[It.row]||(Mt[It.row]=[]),Mt[It.row][It.column]||(Mt[It.row][It.column]=[]),Mt[It.row][It.column].push(It))}Oe(tt);var zt=Ce(),Yt=Ce(),Xt=Ce(),$t={count:0},de={count:0},An=y,Bn=x,vn=a.rowDefs,$e=a.colDefs,Re=null;z=vn.length;for(var ai=0;ai<z;ai++)Re=vn[ai],Re!==void 0&&(Re.actual=0);z=$e.length;for(var ei=0;ei<z;ei++)Re=$e[ei],Re!==void 0&&(Re.actual=0);for(var Zi=Mt.length,vr=0,Jo=0;Jo<Zi;Jo++)Mt[Jo]&&(vr=Math.max(vr,Mt[Jo].length));var rs=Math.min(a.topIndex,Zi-1),Zs=Math.min(a.leftIndex,vr-1),qo=0;Zi=Mt.length;for(var rg=ya(a),yo=0;yo<Zi;yo++)if(Mt[yo]){vr=Mt[yo].length;var xA=a.Fb(yo);xA.actual=0;for(var Js=xA.oc=0;Js<vr;Js++)if(Mt[yo][Js]){var og=a.Eb(Js);zt[Js]===void 0&&(og.actual=0,og.oc=0,zt[Js]=!0);for(var hl=Mt[yo][Js],Ul=hl.length,Ja=0;Ja<Ul;Ja++){var Ia=hl[Ja];if(Ia.visible||Ia===rg){var $g=1<Ia.rowSpan||1<Ia.columnSpan;$g&&(yo<rs||Js<Zs||Yt.push(Ia));var BA=Ia.margin,Gc=BA.right+BA.left,qa=BA.top+BA.bottom,qs=Kr(Ia,xA,og,!1),Kp=Ia.desiredSize,_d=!isNaN(Kp.height),WA=!isNaN(Kp.width)&&_d;if($g||qs===Ge||WA||yo<rs||Js<Zs||($t[Js]!==void 0||qs!==Ve&&qs!==In||($t[Js]=-1,$t.count++),de[yo]!==void 0||qs!==Ve&&qs!==_n||(de[yo]=-1,de.count++),Xt.push(Ia)),Ia.measure(1/0,1/0,0,0),!(yo<rs||Js<Zs)){var Da=Ia.measuredBounds,Xf=Math.max(Da.width+Gc,0),$a=Math.max(Da.height+qa,0);if(Ia.rowSpan===1&&(qs===Ge||qs===In)){Re=a.Fb(yo);var tf=Re.Wc();qo=Math.max($a-Re.actual,0),qo+tf>Bn&&(qo=Math.max(Bn-tf,0));var ym=Re.oa===0;Re.oc=Re.oc+qo,Re.actual=Re.oa+qo,Bn=Math.max(Bn-(qo+(ym?tf:0)),0)}if(Ia.columnSpan===1&&(qs===Ge||qs===_n)){Re=a.Eb(Js);var zp=Re.Wc();qo=Math.max(Xf-Re.actual,0),qo+zp>An&&(qo=Math.max(An-zp,0));var ey=Re.oa===0;Re.oc=Re.oc+qo,Re.actual=Re.oa+qo,An=Math.max(An-(qo+(ey?zp:0)),0)}$g&&Ia.Uj()}}}}}Oe(zt);var Qu=0,ah=0;z=a.columnCount;for(var Yd=0;Yd<z;Yd++){var ef=$e[Yd];ef!==void 0&&(Qu+=isNaN(ef.Hc)?ef.oc:ef.Hc,ef.oc!==0&&(Qu+=ef.Wc()))}z=a.rowCount;for(var jc=0;jc<z;jc++){var nf=vn[jc];nf!==void 0&&(ah+=isNaN(nf.Hc)?nf.oc:nf.Hc,nf.oc!==0&&(ah+=nf.Wc()))}An=Math.max(y-Qu,0);var Uu=Bn=Math.max(x-ah,0),sg=An;z=Xt.length;for(var Ha=0;Ha<z;Ha++){var _A=Xt[Ha],wm=a.Fb(_A.row),lh=a.Eb(_A.column),Kc=_A.measuredBounds,CA=_A.margin,Zf=CA.right+CA.left,YA=CA.top+CA.bottom;$t[_A.column]=lh.oc===0&&$t[_A.column]!==void 0?Math.max(Kc.width+Zf,$t[_A.column]):null,de[_A.row]=wm.oc===0&&de[_A.row]!==void 0?Math.max(Kc.height+YA,de[_A.row]):null}var Xd=0,zc=0,oA;for(oA in de)oA!=="count"&&(Xd+=de[oA]);for(oA in $t)oA!=="count"&&(zc+=$t[oA]);for(var cs=an.alloc(),Vp=0;Vp<z;Vp++){var ua=Xt[Vp];if(ua.visible||ua===rg){var wo=a.Fb(ua.row),ha=a.Eb(ua.column),Ah=0;isFinite(ha.width)?Ah=ha.width:(isFinite(An)&&$t[ua.column]!==null?zc===0?Ah=ha.actual+An:Ah=$t[ua.column]/zc*sg:$t[ua.column]!==null?Ah=An:Ah=ha.actual||An,Ah=Math.max(0,Ah-ha.Wc()));var ag=0;switch(isFinite(wo.height)?ag=wo.height:(isFinite(Bn)&&de[ua.row]!==null?Xd===0?ag=wo.actual+Bn:ag=de[ua.row]/Xd*Uu:de[ua.row]!==null?ag=Bn:ag=wo.actual||Bn,ag=Math.max(0,ag-wo.Wc())),cs.h(Math.max(ha.minimum,Math.min(Ah,ha.maximum)),Math.max(wo.minimum,Math.min(ag,wo.maximum))),qs=Kr(ua,wo,ha,!1),qs){case In:cs.height=Math.max(cs.height,wo.actual+Bn);break;case _n:cs.width=Math.max(cs.width,ha.actual+An)}var Jf=ua.margin,ny=Jf.right+Jf.left,Sm=Jf.top+Jf.bottom;ua.Uj(),ua.measure(cs.width,cs.height,ha.minimum,wo.minimum);var Vc=ua.measuredBounds,qf=Math.max(Vc.width+ny,0),Zd=Math.max(Vc.height+Sm,0);isFinite(An)&&(qf=Math.min(qf,cs.width)),isFinite(Bn)&&(Zd=Math.min(Zd,cs.height));var Oa=0;Oa=wo.actual,wo.actual=Math.max(wo.actual,Zd),wo.oc=Math.max(wo.oc,Zd),qo=wo.actual-Oa,Bn=Math.max(Bn-qo,0),de[ua.row]===null&&(Uu=Math.max(Uu-qo,0)),Oa=ha.actual,ha.actual=Math.max(ha.actual,qf),ha.oc=Math.max(ha.oc,qf),qo=ha.actual-Oa,An=Math.max(An-qo,0),$t[ua.column]===null&&(sg=Math.max(sg-qo,0))}}Oe(Xt);var uh=an.alloc(),PA=Ce(),Fl=Ce();if(z=Yt.length,z!==0){for(var rf=0;rf<Zi;rf++)if(Mt[rf]){vr=Mt[rf].length;var Wc=a.Fb(rf);PA[rf]=Wc.actual;for(var of=0;of<vr;of++)if(Mt[rf][of]){var xm=a.Eb(of);Fl[of]=xm.actual}}}for(var _c=0;_c<z;_c++){var no=Yt[_c];if(no.visible||no===rg){var sA=a.Fb(no.row),Il=a.Eb(no.column);switch(cs.h(Math.max(Il.minimum,Math.min(y,Il.maximum)),Math.max(sA.minimum,Math.min(x,sA.maximum))),qs=Kr(no,sA,Il,!1),qs){case Ve:Fl[Il.index]!==0&&(cs.width=Math.min(cs.width,Fl[Il.index])),PA[sA.index]!==0&&(cs.height=Math.min(cs.height,PA[sA.index]));break;case In:Fl[Il.index]!==0&&(cs.width=Math.min(cs.width,Fl[Il.index]));break;case _n:PA[sA.index]!==0&&(cs.height=Math.min(cs.height,PA[sA.index]))}isFinite(Il.width)&&(cs.width=Il.width),isFinite(sA.height)&&(cs.height=sA.height),uh.h(0,0);for(var Bm=Il.minimum,tl=sA.minimum,lg=1;lg<no.rowSpan&&!(no.row+lg>=a.rowCount);lg++)Re=a.Fb(no.row+lg),qo=0,qo=qs===Ve||qs===_n?Math.max(Re.minimum,PA[no.row+lg]===0?Re.maximum:Math.min(PA[no.row+lg],Re.maximum)):Math.max(Re.minimum,isNaN(Re.Hc)?Re.maximum:Math.min(Re.Hc,Re.maximum)),uh.height+=qo,tl+=Re.minimum;for(var Dl=1;Dl<no.columnSpan&&!(no.column+Dl>=a.columnCount);Dl++)Re=a.Eb(no.column+Dl),qo=0,qo=qs===Ve||qs===In?Math.max(Re.minimum,Fl[no.column+Dl]===0?Re.maximum:Math.min(Fl[no.column+Dl],Re.maximum)):Math.max(Re.minimum,isNaN(Re.Hc)?Re.maximum:Math.min(Re.Hc,Re.maximum)),uh.width+=qo,Bm+=Re.minimum;cs.width+=uh.width,cs.height+=uh.height;var Yc=no.margin,sf=Yc.right+Yc.left,Wp=Yc.top+Yc.bottom;no.measure(cs.width,cs.height,Bm,tl);for(var Xc=no.measuredBounds,XA=Math.max(Xc.width+sf,0),$f=Math.max(Xc.height+Wp,0),af=0,Zc=0;Zc<no.rowSpan&&!(no.row+Zc>=a.rowCount);Zc++)Re=a.Fb(no.row+Zc),af+=Re.total||0;if(af<$f){var Ag=$f-af,Iu=$f-af;if(no.spanAllocation!==null)for(var ug=no.spanAllocation,hh=0;hh<no.rowSpan&&!(0>=Ag)&&!(no.row+hh>=a.rowCount);hh++){Re=a.Fb(no.row+hh);var hg=Re.oa||0,td=ug(no,Re,Iu);Re.actual=Math.min(Re.maximum,hg+td),Re.oa!==hg&&(Ag-=Re.oa-hg)}for(;0<Ag;){var FA=Re.oa||0;if(isNaN(Re.height)&&Re.maximum>FA&&(Re.actual=Math.min(Re.maximum,FA+Ag),Re.oa!==FA&&(Ag-=Re.oa-FA)),Re.index===0)break;Re=a.Fb(Re.index-1)}}for(var Jd=0,gg=0;gg<no.columnSpan&&!(no.column+gg>=a.columnCount);gg++)Re=a.Eb(no.column+gg),Jd+=Re.total||0;if(Jd<XA){var qd=XA-Jd,iy=XA-Jd;if(no.spanAllocation!==null)for(var gh=no.spanAllocation,ed=0;ed<no.columnSpan&&!(0>=qd)&&!(no.column+ed>=a.columnCount);ed++){Re=a.Eb(no.column+ed);var _p=Re.oa||0,ry=gh(no,Re,iy);Re.actual=Math.min(Re.maximum,_p+ry),Re.oa!==_p&&(qd-=Re.oa-_p)}for(;0<qd;){var Cm=Re.oa||0;if(isNaN(Re.width)&&Re.maximum>Cm&&(Re.actual=Math.min(Re.maximum,Cm+qd),Re.oa!==Cm&&(qd-=Re.oa-Cm)),Re.index===0)break;Re=a.Eb(Re.index-1)}}}}Oe(Yt),an.free(uh),an.free(cs),PA!==void 0&&Oe(PA),Fl!==void 0&&Oe(Fl);var $d=0,tc=0,Pm=a.desiredSize,c1=a.maxSize;qs=Ys(a,!0);var Yp=ah=Qu=0,Xp=0;z=a.columnCount;for(var Fm=0;Fm<z;Fm++)$e[Fm]!==void 0&&(Re=a.Eb(Fm),isFinite(Re.width)?(Yp+=Re.width,Yp+=Re.Wc()):s0(Re)===sp?(Yp+=Re.oa,Yp+=Re.Wc()):Re.oa!==0&&(Qu+=Re.oa,Qu+=Re.Wc()));isFinite(Pm.width)?$d=Math.min(Pm.width,c1.width):$d=qs!==Ge&&isFinite(y)?y:Qu,$d=Math.max($d,a.minSize.width),$d=Math.max($d-Yp,0);for(var J1=Qu===0?1:Math.max($d/Qu,1),Lm=0;Lm<z;Lm++)$e[Lm]!==void 0&&(Re=a.Eb(Lm),isFinite(Re.width)||s0(Re)===sp||(Re.actual=Re.oa*J1),Re.position=b.width,Re.oa!==0&&(b.width+=Re.oa,b.width+=Re.Wc()));z=a.rowCount;for(var Em=0;Em<z;Em++)vn[Em]!==void 0&&(Re=a.Fb(Em),isFinite(Re.height)?(Xp+=Re.height,Xp+=Re.Wc()):s0(Re)===sp?(Xp+=Re.oa,Xp+=Re.Wc()):Re.oa!==0&&(ah+=Re.oa,ah+=Re.Wc()));isFinite(Pm.height)?tc=Math.min(Pm.height,c1.height):tc=qs!==Ge&&isFinite(x)?x:ah,tc=Math.max(tc,a.minSize.height),tc=Math.max(tc-Xp,0);for(var q1=ah===0?1:Math.max(tc/ah,1),Mm=0;Mm<z;Mm++)vn[Mm]!==void 0&&(Re=a.Fb(Mm),isFinite(Re.height)||s0(Re)===sp||(Re.actual=Re.oa*q1),Re.position=b.height,Re.oa!==0&&(b.height+=Re.oa,b.height+=Re.Wc()));z=rt.length;for(var oy=0;oy<z;oy++){var Zp=rt[oy],sy=0,ay=0;Zp.type===ze.TableRow?(sy=b.width,Re=a.Fb(Zp.row),ay=Re.actual):(Re=a.Eb(Zp.column),sy=Re.actual,ay=b.height),Zp.measuredBounds.h(0,0,sy,ay),mo(Zp,!1)}Oe(rt),a.inRowsCols=Mt},Ts.prototype.arrange=function(a,y,x){var E=y.length,b=a.padding,z=b.left;b=b.top;var tt=a.inRowsCols;if(tt!==null){for(var rt,ot,at=tt.length,At=0,ft=0;ft<at;ft++)tt[ft]&&(At=Math.max(At,tt[ft].length));ot=a.rowDefs,rt=a.colDefs;var pt=ft=0,xt=Math.min(a.topIndex,at-1);if(0<ot.length){for(;xt!==at&&(ot[xt]===void 0||ot[xt].oa===0);)xt++;xt=Math.max(Math.min(xt,at-1),0),ft=-ot[xt].position}var Ct=Math.min(a.leftIndex,At-1);if(0<rt.length){for(;Ct!==At&&(rt[Ct]===void 0||rt[Ct].oa===0);)Ct++;Ct=Math.max(Math.min(Ct,At-1),0),pt=-rt[Ct].position}for(var Mt=0,Gt=0;Mt!==at&&ot[Mt]===void 0;)Mt++;for(;Gt!==at&&rt[Gt]===void 0;)Gt++;At=a.part,a.Fb(Mt),a.Eb(Gt);for(var It=0;It<y.length;It++){var zt=y[It];if(zt instanceof ze&&zt.visible&&Yh(zt)){if(zt.type===ze.TableRow){rt=a.Fb(zt.row);var Yt=a.Eb(Gt)}else rt=a.Fb(Mt),Yt=a.Eb(zt.column);ot=rt.position+ft+b,rt.oa!==0&&(ot+=rt.Io(Math.max(Mt,xt))),rt=Yt.position+pt+z,Yt.oa!==0&&(rt+=Yt.Io(Math.max(Gt,Ct))),Yt=zt.measuredBounds,zt.Uk(),zt.actualBounds.ka();var Xt=zt.actualBounds,$t=Me.allocAt(Xt.x,Xt.y,Xt.width,Xt.height);Xt.x=zt.type===ze.TableRow?z:rt,Xt.y=zt.type===ze.TableColumn?b:ot,Xt.width=Yt.width,Xt.height=Yt.height,zt.actualBounds.freeze(),pA(zt,!1),Go($t,Xt)||At===null||(At.oh(),zt.Pn(At)),Me.free($t)}}for(It=an.alloc(),zt=0;zt<at;zt++)if(tt[zt]){for(At=tt[zt].length,Yt=a.Fb(zt),ot=Yt.position+ft+b,Yt.oa!==0&&(ot+=Yt.Io(Math.max(Mt,xt))),Xt=0;Xt<At;Xt++)if(tt[zt][Xt]){$t=a.Eb(Xt),rt=$t.position+pt+z,$t.oa!==0&&(rt+=$t.Io(Math.max(Gt,Ct)));for(var de=tt[zt][Xt],An=de.length,Bn=0;Bn<An;Bn++){var vn=de[Bn],$e=vn.measuredBounds;It.h(0,0);for(var Re=1;Re<vn.rowSpan&&!(zt+Re>=a.rowCount);Re++){var ai=a.Fb(zt+Re);ai.oa!==0&&(It.height+=ai.total)}for(Re=1;Re<vn.columnSpan&&!(Xt+Re>=a.columnCount);Re++)ai=a.Eb(Xt+Re),ai.oa!==0&&(It.width+=ai.total);var ei=$t.oa+It.width,Zi=Yt.oa+It.height;Re=rt,ai=ot;var vr=ei,Jo=Zi,rs=rt,Zs=ot,qo=ei,rg=Zi;rt+ei>x.width&&(qo=Math.max(x.width-rt,0)),ot+Zi>x.height&&(rg=Math.max(x.height-ot,0));var yo=vn.alignment;if(yo.Xb()){yo=a.defaultAlignment,yo.sb()||(yo=Xi);var xA=yo.x,Js=yo.y,og=yo.offsetX;yo=yo.offsetY;var hl=$t.alignment,Ul=Yt.alignment;hl.sb()&&(xA=hl.x,og=hl.offsetX),Ul.sb()&&(Js=Ul.y,yo=Ul.offsetY)}else xA=yo.x,Js=yo.y,og=yo.offsetX,yo=yo.offsetY;(isNaN(xA)||isNaN(Js))&&(Js=xA=.5,yo=og=0),hl=$e.width,Ul=$e.height;var Ja=vn.margin,Ia=Ja.left+Ja.right,$g=Ja.top+Ja.bottom,BA=Kr(vn,Yt,$t,!1);!isNaN(vn.desiredSize.width)||BA!==Ve&&BA!==In||(hl=Math.max(ei-Ia,0)),!isNaN(vn.desiredSize.height)||BA!==Ve&&BA!==_n||(Ul=Math.max(Zi-$g,0)),ei=vn.maxSize,Zi=vn.minSize,hl=Math.min(ei.width,hl),Ul=Math.min(ei.height,Ul),hl=Math.max(Zi.width,hl),Ul=Math.max(Zi.height,Ul),ei=Ul+$g,Re+=vr*xA-(hl+Ia)*xA+og+Ja.left,ai+=Jo*Js-ei*Js+yo+Ja.top,vn.visible&&($o(rs,Zs,qo,rg,Re,ai,$e.width,$e.height)?vn.arrange(Re,ai,hl,Ul):vn.arrange(Re,ai,hl,Ul,new Me(rs,Zs,qo,rg)))}}}for(an.free(It),a=0;a<E;a++)x=y[a],z=x instanceof ze?x:null,z!==null&&Yh(z)&&(z=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,z.width,z.height),x.naturalBounds.freeze())}};function _a(){this.xa="Base"}ue(_a,ir),_a.prototype.measure=function(){},_a.prototype.arrange=function(){};function ll(){this.xa="Base"}ue(ll,ir),ll.prototype.measure=function(){},ll.prototype.arrange=function(){};function Ho(){this.xa="Base"}ue(Ho,ir),Ho.prototype.measure=function(a,y,x,E,b,z,tt){1<E.length&&pe("Viewbox Panel cannot contain more than one GraphObject."),E=E[0],E.Ca=1,E.Uj(),E.measure(1/0,1/0,z,tt);var rt=E.measuredBounds,ot=E.margin,at=ot.right+ot.left;if(ot=ot.top+ot.bottom,isFinite(y)||isFinite(x)){var At=E.scale,ft=rt.width;rt=rt.height;var pt=Math.max(y-at,0),xt=Math.max(x-ot,0),Ct=1;a.viewboxStretch===Fn?ft!==0&&rt!==0&&(Ct=Math.min(pt/ft,xt/rt)):ft!==0&&rt!==0&&(Ct=Math.max(pt/ft,xt/rt)),Ct===0&&(Ct=1e-4),E.Ca*=Ct,At!==E.scale&&(mo(E,!0),E.measure(1/0,1/0,z,tt))}rt=E.measuredBounds,b.width=isFinite(y)?y:Math.max(rt.width+at,0),b.height=isFinite(x)?x:Math.max(rt.height+ot,0)},Ho.prototype.arrange=function(a,y,x){y=y[0];var E=y.measuredBounds,b=y.margin,z=Math.max(E.width+(b.right+b.left),0);b=Math.max(E.height+(b.top+b.bottom),0);var tt=y.alignment;tt.Xb()&&(tt=a.defaultAlignment),tt.sb()||(tt=Xi),y.arrange(x.width*tt.x-z*tt.x+tt.offsetX,x.height*tt.y-b*tt.y+tt.offsetY,E.width,E.height)};function Xs(){this.xa="Base"}ue(Xs,ir),Xs.prototype.measure=function(){},Xs.prototype.arrange=function(){},Xs.prototype.gc=function(a,y,x){x=a.Df()*x.scale,0>=x&&(x=1);var E=a.gridCellSize,b=E.width;E=E.height;var z=a.naturalBounds,tt=a.actualBounds,rt=z.width,ot=z.height,at=Math.ceil(rt/b),At=Math.ceil(ot/E),ft=a.gridOrigin,pt=ft.x;ft=ft.y,y.save(),y.beginPath(),y.rect(0,0,rt,ot),y.clip(),y.Se();for(var xt=[],Ct=a.O.s,Mt=Ct.length,Gt=0;Gt<Mt;Gt++){var It=Ct[Gt],zt=[];if(xt.push(zt),It.visible){var Yt=It.interval;if(!(0>Yt)){It=rh(It.figure);for(var Xt=0;Xt<Mt;Xt++)if(Xt!==Gt){var $t=Ct[Xt];$t.visible&&rh($t.figure)===It&&($t=$t.interval,$t>Yt&&zt.push($t))}}}}for(Ct=a.O.s,Mt=Ct.length,Gt=0;Gt<Mt;Gt++){var de=Ct[Gt];if(de.visible&&(zt=de.interval||1,It=Math.abs(zt),!(2>b*It*x))){if(Yt=de.segmentIndex,(!isFinite(Yt)||isNaN(Yt))&&(Yt=0),0>Yt&&(Yt=It-Math.min(-Yt,It)),Yt=Math.round(Yt%It),It=de.opacity,Xt=1,It!==1){if(It===0)continue;Xt=y.globalAlpha,y.globalAlpha=Xt*It}$t=xt[Gt];var An=!1,Bn=de.strokeDashArray;if(Bn!==null&&(An=!0,y.js(Bn,de.strokeDashOffset)),de.figure==="LineV"&&de.stroke!==null&&0<de.strokeWidth){for(y.lineWidth=de.strokeWidth,Hr(a,y,de.stroke,!1,!1,z,tt),y.beginPath(),Bn=de=Math.floor((pt-b)/b);Bn<=de+at;Bn++){var vn=Bn*b+pt;0<=vn&&vn<=rt&&jA(Bn,zt,Yt,$t)&&(y.moveTo(vn,0),y.lineTo(vn,ot))}y.stroke(),y.Se()}else if(de.figure==="LineH"&&de.stroke!==null&&0<de.strokeWidth){for(y.lineWidth=de.strokeWidth,Hr(a,y,de.stroke,!1,!1,z,tt),y.beginPath(),Bn=de=Math.floor((ft-E)/E);Bn<=de+At;Bn++)vn=Bn*E+ft,0<=vn&&vn<=ot&&jA(Bn,zt,Yt,$t)&&(y.moveTo(0,vn),y.lineTo(rt,vn));y.stroke(),y.Se()}else if(de.figure==="BarV"&&de.fill!==null)for(Hr(a,y,de.fill,!0,!1,z,tt),de=de.width,isNaN(de)&&(de=b),vn=Bn=Math.floor((pt-b)/b);vn<=Bn+at;vn++){var $e=vn*b+pt;0<=$e+de&&$e<=rt&&jA(vn,zt,Yt,$t)&&y.fillRect($e,0,de,ot)}else if(de.figure==="BarH"&&de.fill!==null)for(Hr(a,y,de.fill,!0,!1,z,tt),de=de.height,isNaN(de)&&(de=E),vn=Bn=Math.floor((ft-E)/E);vn<=Bn+At;vn++)$e=vn*E+ft,0<=$e+de&&$e<=ot&&jA(vn,zt,Yt,$t)&&y.fillRect(0,$e,rt,de);An&&y.fs(),It!==1&&(y.globalAlpha=Xt)}}y.restore(),y.Vc(!1)};function jA(a,y,x,E){if(0>y)return a%y===x;if(a%y!==x)return!1;y=E.length;for(var b=0;b<y;b++)if(a%E[b]===x)return!1;return!0}function Ya(){this.xa="Base"}ue(Ya,ir),Ya.prototype.measure=function(a,y,x,E,b){var z=E.length;if(a instanceof Wi||a instanceof tn){var tt=null,rt=null;if(a instanceof tn&&(tt=a),a instanceof Wi&&(rt=a,tt=rt.adornedPart,a.j===null&&(a.j=[])),tt instanceof tn){var ot=tt;if(z===0)fa(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var at=a instanceof Wi?null:tt.path;y=tt.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var At=ot.points,ft=tt.pointsCount;rt!==null?rt.Ul(!1):tt!==null&&tt.Ul(!1),rt=y.width;var pt=y.height,xt=a.j;if(xt.length=0,at!==null){Sl(a,rt,pt,at);var Ct=at.measuredBounds;x.ed(Ct),xt.push(Ct)}Ct=Li.alloc();for(var Mt=Rt.alloc(),Gt=Rt.alloc(),It=0;It<z;It++){var zt=E[It];if(zt!==at)if(zt.isPanelMain&&zt instanceof yi){Sl(a,rt,pt,zt);var Yt=zt.measuredBounds;x.ed(Yt),xt.push(Yt)}else if(2>ft)zt.measure(1/0,1/0,0,0),Yt=zt.measuredBounds,x.ed(Yt),xt.push(Yt);else{var Xt=zt.segmentIndex,$t=zt.segmentFraction,de=zt.alignmentFocus;de.Mc()&&(de=Xi);var An=zt.segmentOrientation,Bn=zt.segmentOffset;if(isNaN(Xt)){var vn=ot.ua;Yt=Ce(),vn.Qu($t,Yt);var $e=Rt.allocAt(Yt[0],Yt[1]);if($e.add(ot.i(0)),vn.type===rn.j?$e.offset(-vn.startX,-vn.startY):(vn=vn.figures.first(),vn!==null&&$e.offset(-vn.startX,-vn.startY)),vn=Yt[2],An!==oa){var Re=ot.computeAngle(zt,An,vn);zt.Kb=Re}Re=$e.x-y.x;var ai=$e.y-y.y;Rt.free($e),Oe(Yt)}else if(Xt<-ft||Xt>=ft)Yt=Rt.alloc(),ot.vg(),ot.computeMidPoint(Yt),vn=ot.midAngle,An!==oa&&(Re=ot.computeAngle(zt,An,vn),zt.Kb=Re),Re=Yt.x-y.x,ai=Yt.y-y.y,Rt.free(Yt);else{if(Re=0,0<=Xt?(ai=At.M(Xt),Yt=Xt<ft-1?At.M(Xt+1):ai):(Re=ft+Xt,ai=At.M(Re),Yt=0<Re?At.M(Re-1):ai),ai.Xa(Yt)){0<=Xt?(vn=0<Xt?At.M(Xt-1):ai,Re=Xt<ft-2?At.M(Xt+2):Yt):(vn=Re<ft-1?At.M(Re+1):ai,Re=1<Re?At.M(Re-2):Yt),$e=vn.Bf(ai);var ei=Yt.Bf(Re);vn=$e>ei+10?0<=Xt?vn.ab(ai):ai.ab(vn):ei>$e+10?0<=Xt?Yt.ab(Re):Re.ab(Yt):0<=Xt?vn.ab(Re):Re.ab(vn)}else vn=0<=Xt?ai.ab(Yt):Yt.ab(ai);An!==oa&&(Re=ot.computeAngle(zt,An,vn),zt.Kb=Re),Re=ai.x+(Yt.x-ai.x)*$t-y.x,ai=ai.y+(Yt.y-ai.y)*$t-y.y}zt.measure(1/0,1/0,0,0),Yt=zt.measuredBounds,$e=zt.naturalBounds;var Zi=0;zt instanceof yi&&(Zi=zt.strokeWidth),ei=$e.width+Zi;var vr=$e.height+Zi;Ct.reset(),Ct.translate(-Yt.x,-Yt.y),Ct.scale(zt.scale,zt.scale),Ct.rotate(An===oa?zt.angle:vn,ei/2,vr/2),An!==pp&&An!==vp||Ct.rotate(90,ei/2,vr/2),An!==mp&&An!==yp||Ct.rotate(-90,ei/2,vr/2),An===b0&&(45<vn&&135>vn||225<vn&&315>vn)&&Ct.rotate(-vn,ei/2,vr/2),$e=new Me(0,0,ei,vr),Mt.xi($e,de),Ct.Ga(Mt),de=-Mt.x+Zi/2*zt.scale,zt=-Mt.y+Zi/2*zt.scale,Gt.assign(Bn),Zi=isNaN(Bn.x);var Jo=isNaN(Bn.y);if(Zi||Jo){ei=ei/2+3,vr=vr/2+3;var rs=45<=vn&&135>=vn,Zs=225<=vn&&315>=vn;An===oa&&(rs||Zs)?(Gt.x=Jo?ei:Bn.y,Gt.y=Zi?vr:Bn.x,rs?0<=Xt||isNaN(Xt)&&.5>$t||!Zi||(Gt.y=-vr):Zs&&((0<=Xt||isNaN(Xt)&&.5>$t)&&Zi&&(Gt.y=-vr),Jo&&(Gt.x=-ei))):(Zi&&(Gt.x=0<=Xt||isNaN(Xt)&&.5>$t?ei:-ei),Jo&&(Gt.y=-vr),Gt.rotate(vn))}else Gt.rotate(vn);Re+=Gt.x,ai+=Gt.y,$e.set(Yt),$e.h(Re+de,ai+zt,Yt.width,Yt.height),xt.push($e),x.ed($e)}}if(tt!==null)for(E=tt.labelNodes;E.next();)E.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),fa(b,x.width||0,x.height||0),Li.free(Ct),Rt.free(Mt),Rt.free(Gt)}}}},Ya.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Wi||a instanceof tn){var E=a,b=null;a instanceof Wi&&(b=a,E=b.adornedPart);var z=a instanceof Wi?null:E.path,tt=a.j;if(tt.length!==0){var rt=0;if(z!==null&&rt<tt.length){var ot=tt[rt];rt++,z.arrange(ot.x-a.jg.x,ot.y-a.jg.y,ot.width,ot.height)}for(ot=0;ot<x;ot++){var at=y[ot];if(at!==z&&rt<tt.length){var At=tt[rt];rt++,at.arrange(At.x-a.jg.x,At.y-a.jg.y,At.width,At.height)}}}if(y=E.points,x=y.count,2<=x&&a instanceof tn)for(z=a.labelNodes;z.next();){var ft=a;tt=z.value,rt=tt.segmentIndex,ot=tt.segmentFraction;var pt=tt.alignmentFocus;if(at=tt.segmentOrientation,At=tt.segmentOffset,isNaN(rt)){var xt=ft.ua,Ct=Ce();xt.Qu(ot,Ct);var Mt=Rt.allocAt(Ct[0],Ct[1]);Mt.add(ft.i(0)),xt.type===rn.j||(xt=xt.figures.first()),Mt.offset(-xt.startX,-xt.startY),xt=Ct[2],at!==oa&&(ft=ft.computeAngle(tt,at,xt),tt.angle=ft),ft=Mt.x;var Gt=Mt.y;Rt.free(Mt),Oe(Ct)}else if(rt<-x||rt>=x)Ct=Rt.alloc(),xt=ft,Gt=Ct,xt.vg(),xt.computeMidPoint(Gt),xt=ft.midAngle,at!==oa&&(ft=ft.computeAngle(tt,at,xt),tt.angle=ft),ft=Ct.x,Gt=Ct.y,Rt.free(Ct);else{if(Mt=0,0<=rt?(Ct=y.s[rt],Gt=rt<x-1?y.s[rt+1]:Ct):(Mt=x+rt,Ct=y.s[Mt],Gt=0<Mt?y.s[Mt-1]:Ct),Ct.Xa(Gt)){0<=rt?(xt=0<rt?y.s[rt-1]:Ct,Mt=rt<x-2?y.s[rt+2]:Gt):(xt=Mt<x-1?y.s[Mt+1]:Ct,Mt=1<Mt?y.s[Mt-2]:Gt);var It=xt.Bf(Ct),zt=Gt.Bf(Mt);xt=It>zt+10?0<=rt?xt.ab(Ct):Ct.ab(xt):zt>It+10?0<=rt?Gt.ab(Mt):Mt.ab(Gt):0<=rt?xt.ab(Mt):Mt.ab(xt)}else xt=0<=rt?Ct.ab(Gt):Gt.ab(Ct);at!==oa&&(ft=ft.computeAngle(tt,at,xt),tt.angle=ft),ft=Ct.x+(Gt.x-Ct.x)*ot,Gt=Ct.y+(Gt.y-Ct.y)*ot}if(pt.ys())tt.location=new Rt(ft,Gt);else{pt.Mc()&&(pt=Xi),Ct=Li.alloc(),Ct.reset(),Ct.scale(tt.scale,tt.scale),Ct.rotate(tt.angle,0,0);var Yt=tt.naturalBounds;Mt=Me.allocAt(0,0,Yt.width,Yt.height),It=Rt.alloc(),It.xi(Mt,pt),Ct.Ga(It),pt=-It.x,zt=-It.y;var Xt=Yt.width,$t=Yt.height;Yt=Rt.alloc(),Yt.assign(At);var de=isNaN(At.x),An=isNaN(At.y);if(de||An){Xt=Xt/2+3,$t=$t/2+3;var Bn=45<=xt&&135>=xt,vn=225<=xt&&315>=xt;at===oa&&(Bn||vn)?(Yt.x=An?Xt:At.y,Yt.y=de?$t:At.x,Bn?0<=rt||isNaN(rt)&&.5>ot||!de||(Yt.y=-$t):vn&&((0<=rt||isNaN(rt)&&.5>ot)&&de&&(Yt.y=-$t),An&&(Yt.x=-Xt))):(de&&(Yt.x=0<=rt||isNaN(rt)&&.5>ot?Xt:-Xt),An&&(Yt.y=-$t),Yt.rotate(xt))}else Yt.rotate(xt);ft+=Yt.x,Gt+=Yt.y,Ct.pp(Mt),pt+=Mt.x,zt+=Mt.y,rt=Rt.allocAt(ft+pt,Gt+zt),tt.move(rt),Rt.free(rt),Rt.free(Yt),Rt.free(It),Me.free(Mt),Li.free(Ct)}}b!==null?b.Ul(!1):E.Ul(!1),E=Ny(a),a.location.h(a.position.x+E.x,a.position.y+E.y),Rt.free(E)}};function Sl(a,y,x,E){if(Na(E)!==!1){var b=E.strokeWidth;b===0&&a instanceof Wi&&a.type===ze.Link&&a.adornedObject instanceof yi&&(b=a.adornedObject.strokeWidth),b*=E.Ca,a instanceof tn&&a.ua!==null?(a=a.geometry.bounds,E.Ge(a.x-b/2,a.y-b/2,a.width+b,a.height+b)):a instanceof Wi&&a.adornedPart.ua!==null?(a=a.adornedPart.ua.bounds,E.Ge(a.x-b/2,a.y-b/2,a.width+b,a.height+b)):E.Ge(-(b/2),-(b/2),y+b,x+b),b=E.desiredSize,b.w()||E.ua===null?E.dc.h(0,0,b.width,b.height):E.dc.assign(E.ua.bounds),mo(E,!1)}}function KA(){this.xa="Base"}ue(KA,ir),KA.prototype.measure=function(a,y,x,E,b,z,tt){var rt=a.Pb();a.graduatedBounds=[];var ot=rt.margin,at=ot.right+ot.left,At=ot.top+ot.bottom;rt.measure(y,x,z,tt);var ft=rt.measuredBounds,pt=new Me(-ot.left,-ot.top,Math.max(ft.width+at,0),Math.max(ft.height+At,0));a.graduatedBounds.push(pt),b.assign(pt);for(var xt=rt.geometry,Ct=rt.strokeWidth,Mt=xt.flattenedSegments,Gt=xt.flattenedLengths,It=xt.flattenedTotalLength,zt=Mt.length,Yt=0,Xt=0,$t=Ce(),de=0;de<zt;de++){var An=Mt[de],Bn=[];Xt=Yt=0;for(var vn=An.length,$e=0;$e<vn;$e+=2){var Re=An[$e],ai=An[$e+1];if($e!==0){var ei=180*Math.atan2(ai-Xt,Re-Yt)/Math.PI;0>ei&&(ei+=360),Bn.push(ei)}Yt=Re,Xt=ai}$t.push(Bn)}if(a.graduatedIntervals===null){for(var Zi=[],vr=a.O.s,Jo=vr.length,rs=0;rs<Jo;rs++){var Zs=vr[rs],qo=[];if(Zi.push(qo),Zs.visible){var rg=Zs.interval;if(!(0>rg)){for(var yo=0;yo<Jo;yo++)if(yo!==rs){var xA=vr[yo];if(xA.visible&&Zs.constructor===xA.constructor){var Js=xA.interval;Js>rg&&qo.push(Js)}}}}}a.graduatedIntervals=Zi}var og=a.graduatedIntervals,hl=a.O.s,Ul=hl.length,Ja=0,Ia=0,$g=It;a.graduatedMarks=[];for(var BA,Gc=0;Gc<Ul;Gc++){var qa=hl[Gc];if(BA=[],qa.visible&&qa!==rt){var qs=Math.abs(qa.interval),Kp=a.graduatedTickUnit;if(!(2>Kp*qs*It/a.graduatedRange&&qa.graduatedSkip===null)){var _d=Gt[0][0],WA=0,Da=0;Ia=It*qa.graduatedStart-1e-4,$g=It*qa.graduatedEnd+1e-4;var Xf=Kp*qs,$a=a.graduatedTickBase;if($a<a.graduatedMin){var tf=(a.graduatedMin-$a)/Xf;tf=tf%1===0?tf:Math.floor(tf+1),$a+=tf*Xf}else $a>a.graduatedMin+Xf&&($a-=Math.floor(($a-a.graduatedMin)/Xf)*Xf);for(var ym=og[Gc],zp=$a,ey=1e-6*a.graduatedMax,Qu=1;$a<=a.graduatedMax+ey;Qu++){t:{for(var ah=ym.length,Yd=0;Yd<ah;Yd++){var ef=($a-a.graduatedTickBase)%(ym[Yd]*a.graduatedTickUnit),jc=1e-6*a.graduatedTickUnit;if(ef<jc&&ef>-jc){var nf=!1;break t}}nf=!0}if(nf&&($a>a.graduatedMax&&($a=a.graduatedMax),qa.graduatedSkip===null||qa instanceof Sr&&!qa.graduatedSkip($a,qa)||qa instanceof yi&&!qa.graduatedSkip($a,qa))&&(Ja=($a-a.graduatedMin)*It/a.graduatedRange,Ja>It&&(Ja=It),Ia<=Ja&&Ja<=$g)){for(var Uu=$t[WA][Da],sg=Gt[WA][Da];WA<Gt.length;){for(;Ja>_d&&Da<Gt[WA].length-1;)Da++,Uu=$t[WA][Da],sg=Gt[WA][Da],_d+=sg;if(Ja<=_d)break;WA++,Da=0,Uu=$t[WA][Da],sg=Gt[WA][Da],_d+=sg}var Ha=Mt[WA],_A=Ha[2*Da],wm=Ha[2*Da+1],lh=(Ja-(_d-sg))/sg,Kc=new Rt(_A+(Ha[2*Da+2]-_A)*lh+Ct/2-xt.bounds.x,wm+(Ha[2*Da+3]-wm)*lh+Ct/2-xt.bounds.y);Kc.scale(rt.scale,rt.scale);t:{var CA=Uu,Zf=$t[WA];if(!(.5005>lh&&.4995<lh)){var YA=CA;if(.5>lh?0<Da?YA=Zf[Da-1]:re.$(Ha[0],Ha[Ha.length-2])&&re.$(Ha[1],Ha[Ha.length-1])&&(YA=Zf[Zf.length-1]):.5<lh&&(Da+1<Zf.length?YA=Zf[Da+1]:re.$(Ha[0],Ha[Ha.length-2])&&re.$(Ha[1],Ha[Ha.length-1])&&(YA=Zf[0])),CA!==YA){var Xd=Math.abs(CA-YA);if(180<Xd&&(CA<YA?CA+=360:YA+=360,Xd=Math.abs(CA-YA)),5e-4>lh||.9995<lh){Uu=(CA+YA)/2%360;break t}if(10>Xd){var zc=1-Math.abs(.5-lh);Uu=(CA*zc+YA*(1-zc))%360;break t}}}Uu=CA}if(qa instanceof Sr){var oA="";qa.graduatedFunction!==null?(oA=qa.graduatedFunction($a,qa),oA=oA!=null?oA.toString():""):oA=(+$a.toFixed(2)).toString(),oA!==""&&BA.push({$l:Kc,angle:Uu,text:oA})}else BA.push({$l:Kc,angle:Uu})}$a=zp+Qu*Xf}}}a.graduatedMarks.push(BA)}Oe($t);var cs=a.graduatedMarks;if(cs!==null)for(var Vp=E.length,ua=0;ua<Vp;ua++){var wo=E[ua],ha=cs[ua];if(wo.visible&&wo!==rt&&ha.length!==0){if(wo instanceof yi){var Ah=a,ag=b,Jf=wo.alignmentFocus;Jf.Mc()&&(Jf=Ml);var ny=wo.angle;wo.Kb=0,wo.measure(1/0,1/0,0,0),wo.Kb=ny;var Sm=wo.measuredBounds,Vc=Sm.width,qf=Sm.height,Zd=Me.allocAt(0,0,Vc,qf),Oa=Rt.alloc();Oa.xi(Zd,Jf),Me.free(Zd);for(var uh=-Oa.x,PA=-Oa.y,Fl=new Me,rf=ha.length,Wc=0;Wc<rf;Wc++)for(var of=ha[Wc],xm=of.$l.x,_c=of.$l.y,no=of.angle,sA=0;4>sA;sA++){switch(sA){case 0:Oa.h(uh,PA);break;case 1:Oa.h(uh+Vc,PA);break;case 2:Oa.h(uh,PA+qf);break;case 3:Oa.h(uh+Vc,PA+qf)}Oa.rotate(no+wo.angle),Oa.offset(xm,_c),Wc===0&&sA===0?Fl.h(Oa.x,Oa.y,0,0):Fl.Ye(Oa),Oa.offset(-xm,-_c),Oa.rotate(-no-wo.angle)}Rt.free(Oa),Ah.graduatedBounds!==null&&Ah.graduatedBounds.push(Fl),Yr(ag,Fl.x,Fl.y,Fl.width,Fl.height)}else if(wo instanceof Sr){var Il=a,Bm=b;Il.temporaryTextBlock===null&&(Il.temporaryTextBlock=new Sr);var tl=Il.temporaryTextBlock;yy(tl,wo);var lg=wo.alignmentFocus;lg.Mc()&&(lg=Ml);for(var Dl=wo.segmentOrientation,Yc=wo.segmentOffset,sf=new Me,Wp=0,Xc=0,XA=0,$f=0,af=0,Zc=ha.length,Ag=0;Ag<Zc;Ag++){var Iu=ha[Ag];Wp=Iu.$l.x,Xc=Iu.$l.y,XA=Iu.angle,af=$f=wo.angle,Dl!==oa&&(af=Dl===cp||Dl===k0?XA+wo.angle:XA,$f=tn.computeAngle(Dl,af)),tl.Kb=$f,tl.text=Iu.text||"",tl.measure(1/0,1/0,0,0);var ug=tl.measuredBounds,hh=tl.naturalBounds,hg=hh.width,td=hh.height,FA=Li.alloc();FA.reset(),FA.translate(-ug.x,-ug.y),FA.scale(tl.scale,tl.scale),FA.rotate(af,hg/2,td/2),Dl!==pp&&Dl!==vp||FA.rotate(90,hg/2,td/2),Dl!==mp&&Dl!==yp||FA.rotate(-90,hg/2,td/2),Dl===b0&&(45<XA&&135>XA||225<XA&&315>XA)&&FA.rotate(-XA,hg/2,td/2);var Jd=Me.allocAt(0,0,hg,td),gg=Rt.alloc();gg.xi(Jd,lg),FA.Ga(gg);var qd=-gg.x,iy=-gg.y,gh=Rt.alloc();gh.assign(Yc),isNaN(gh.x)&&(gh.x=hg/2+3),isNaN(gh.y)&&(gh.y=-(td/2+3)),gh.rotate(XA),Wp+=gh.x+qd,Xc+=gh.y+iy;var ed=new Me(Wp,Xc,ug.width,ug.height),_p=new Me(ug.x,ug.y,ug.width,ug.height),ry=new Me(hh.x,hh.y,hh.width,hh.height);Iu.Sz=$f,Iu.lineCount=tl.lineCount,Iu.lines=[tl.Cb,tl.Ih,tl.df,tl.Le,tl.Qc,tl.Qb,tl.ze],Iu.actualBounds=ed,Iu.measuredBounds=_p,Iu.naturalBounds=ry,Ag===0?sf.assign(ed):sf.ed(ed),Rt.free(gh),Rt.free(gg),Me.free(Jd),Li.free(FA)}Il.graduatedBounds!==null&&Il.graduatedBounds.push(sf),Yr(Bm,sf.x,sf.y,sf.width,sf.height)}mo(wo,!1)}}},KA.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var E=a.Pb(),b=a.graduatedMarks;if(b!==null){var z=a.graduatedBounds,tt=0,rt=z[tt];tt++,E!==null&&E.arrange(rt.x-x.x,rt.y-x.y,rt.width,rt.height);for(var ot=y.length,at=0;at<ot;at++){var At=y[at];rt=b[at],At.visible&&At!==E&&rt.length!==0&&(rt=z[tt],tt++,At.arrange(rt.x-x.x,rt.y-x.y,rt.width,rt.height))}a.graduatedBounds=null}}},KA.prototype.gc=function(a,y,x){var E=x.$i;x.$i=!0;var b=a.naturalBounds,z=b.width,tt=b.height;b=y instanceof ia,y.save(),y.beginPath(),y.rect(-1,-1,z+1,tt+1),y.clip(),y.Se(),z=a.Pb(),z.gc(y,x),tt=a.Df()*x.scale,0>=tt&&(tt=1);for(var rt=z.actualBounds,ot=a.O.s,at=a.graduatedMarks,At=ot.length,ft=0;ft<At;ft++){var pt=ot[ft],xt=at[ft],Ct=xt.length;if(pt.visible&&pt!==z&&xt.length!==0){if(pt instanceof yi){if(!(2>a.graduatedTickUnit*pt.interval*z.geometry.flattenedTotalLength/a.graduatedRange*tt&&pt.graduatedSkip===null)){var Mt=pt.measuredBounds,Gt=pt.strokeWidth*pt.scale,It=pt.alignmentFocus;It.Mc()&&(It=Ml);for(var zt=0;zt<Ct;zt++){var Yt=xt[zt].$l,Xt=xt[zt].angle,$t=It,de=pt.Ab;de.reset(),de.translate(Yt.x+rt.x,Yt.y+rt.y),de.rotate(Xt+pt.angle,0,0),de.translate(-Mt.width*$t.x+$t.offsetX+Gt/2,-Mt.height*$t.y+$t.offsetY+Gt/2),de.scale(pt.scale,pt.scale),sl(pt,!1),pt.wh.set(pt.Ab),pt.Kk=pt.scale,na(pt,!1),pt.gc(y,x),b&&(a.svg.appendChild(pt.svg),pt.svg=null),pt.Ab.reset()}}}else if(pt instanceof Sr)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Sr),Mt=a.temporaryTextBlock,yy(Mt,pt),Gt=0;Gt<Ct;Gt++)It=xt[Gt],It.actualBounds&&It.measuredBounds&&It.naturalBounds&&(Mt.ec=It.text||"",Mt.Kb=It.Sz||0,Mt.Gc=It.lineCount||0,zt=It.lines,zt!==void 0&&(Mt.Cb=zt[0],Mt.Ih=zt[1],Mt.df=zt[2],Mt.Le=zt[3],Mt.Qc=zt[4],Mt.Qb=zt[5],Mt.ze=zt[6]),It.naturalBounds&&(Mt.dc=It.naturalBounds),It.actualBounds&&(zt=It.actualBounds,Mt.arrange(zt.x,zt.y,zt.width,zt.height)),zt=It.actualBounds,Mt.arrange(zt.x,zt.y,zt.width,zt.height),Yt=It.measuredBounds,It=It.naturalBounds,Xt=Mt.Ab,Xt.reset(),Xt.translate(zt.x+rt.x,zt.y+rt.y),Xt.translate(-Yt.x,-Yt.y),Mt.no(Xt,It.x,It.y,It.width,It.height),sl(Mt,!1),Mt.wh.set(Mt.Ab),Mt.Kk=Mt.scale,na(Mt,!1),Mt.Ng=pt.part,Mt.Me=pt.panel,Mt.gc(y,x),Mt.Me=null,Mt.Ng=null,b&&(a.svg.appendChild(Mt.svg),Mt.svg=null))}}x.$i=E,y.restore(),y.Vc(!0)};function ze(a,y){if(te.call(this),this.na=null,a===void 0)this.na=ze.Position;else if(typeof a=="string"){var x=$l.I(a);x!==null&&(this.na=x)}else a instanceof ir?this.na=a:a&&(this.na=ze.Position,y=a);this.na===null&&pe("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===ze.Grid?1048576:0),this.O=new Ke,this.yb=El,this.Tm=Xo,this.Uf=oi,this.$g=null,this.$e="",this.jg=new Me(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=Fn,this.jn=fo,this.kn=Gr,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}ue(ze,te),ze.prototype.cloneProtected=function(a){te.prototype.cloneProtected.call(this,a),a.na=this.na,a.yb=this.yb.J(),a.Tm=this.Tm.J(),a.Uf=this.Uf,a.$e=this.$e,a.jg.assign(this.jg),this.T!==null&&(a.T=this.T.copy(a)),a.xo=this.xo,a.jn=this.jn.J(),a.kn=this.kn.J(),this.ra!==null&&(a.ra=this.ra.copy()),a.ub=this.ub,a.zn=this.zn,a.Hh=this.Hh},ze.prototype.Af=function(a){te.prototype.Af.call(this,a),a.O=this.O;for(var y=a.O.s,x=y.length,E=0;E<x;E++)y[E].Me=a;a.$g=null},ze.prototype.copy=function(){var a=te.prototype.copy.call(this);if(a!==null){for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E].copy();b.wi(a),b.Ng=null;var z=a.O,tt=z.count;if(z.Gb(tt,b),z=a.part,z!==null){z.Rh=null,b.portId!==null&&z instanceof hn&&(z.Te=!0);var rt=a.diagram;rt!==null&&rt.undoManager.isUndoingRedoing||z.cb(to,"elements",a,null,b,null,tt)}}return a}return null},Bt=ze.prototype,Bt.toString=function(){return"Panel("+this.type.name+")#"+gr(this)},Bt.Pn=function(a){te.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,E=0;E<x;E++)y[E].Pn(a)},Bt.hh=function(a,y){if(this.na===ze.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===ze.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===ze.Table)if(a.yc(),a instanceof ia){var x=a.yd;a.yd=vc(a,"gojs-ts"),Bu(this,a),a.nh.pop(),a.yd=x}else Bu(this,a);(x=this.isClipping&&this.na===ze.Spot)&&a.save();for(var E=this.Pb(),b=this.O.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];x&&rt===E&&(a.clipInsteadOfFill=!0),rt.gc(a,y),x&&rt===E&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function Bu(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,E=0<a.columnCount?a.colDefs:null;x!==null&&Cu(a,y,!0,x,!0),E!==null&&Cu(a,y,!1,E,!0),x!==null&&_h(a,y,!0,x),E!==null&&_h(a,y,!1,E),x!==null&&Cu(a,y,!0,x,!1),E!==null&&Cu(a,y,!1,E,!1)}function _h(a,y,x,E){for(var b=E.length,z=a.actualBounds,tt=a.naturalBounds,rt=!0,ot=0;ot<b;ot++){var at=E[ot];if(at!==void 0&&at.actual!==0)if(rt)rt=!1;else{if(x){if(at.position>tt.height)continue}else if(at.position>tt.width)continue;var At=at.separatorStrokeWidth;isNaN(At)&&(At=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var ft=at.separatorStroke;if(ft===null&&(ft=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),At!==0&&ft!==null){Hr(a,y,ft,!1,!1,tt,z),ft=!1;var pt=at.separatorDashArray;pt===null&&(pt=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),pt!==null&&(ft=!0,y.js(pt,0)),y.beginPath(),pt=at.position+At,x?pt>tt.height&&(At-=pt-tt.height):pt>tt.width&&(At-=pt-tt.width),at=at.position+At/2,y.lineWidth=At,At=a.yb,x?(at+=At.top,pt=tt.width-At.right,y.moveTo(At.left,at),y.lineTo(pt,at)):(at+=At.left,pt=tt.height-At.bottom,y.moveTo(at,At.top),y.lineTo(at,pt)),y.stroke(),y.Se(),ft&&y.fs()}}}}function Cu(a,y,x,E,b){for(var z=E.length,tt=a.actualBounds,rt=a.naturalBounds,ot=Pu(a,!0),at=Pu(a,!1),At=0;At<z;At++){var ft=E[At];if(ft!==void 0&&ft.background!==null&&ft.coversSeparators!==b&&ft.actual!==0){var pt=x?tt.height:tt.width;if(!(ft.position>pt)){var xt=ft.Wc(),Ct=ft.separatorStrokeWidth;isNaN(Ct)&&(Ct=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Mt=ft.separatorStroke;Mt===null&&(Mt=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(Mt===null||ft.index===(x?ot:at))&&(Ct=0),xt-=Ct,Ct=ft.position+Ct,xt+=ft.actual,Ct+xt>pt&&(xt=pt-Ct),0>=xt||(pt=a.yb,Hr(a,y,ft.background,!0,!1,rt,tt),x?y.fillRect(pt.left,Ct+pt.top,tt.width-(pt.left+pt.right),xt):y.fillRect(Ct+pt.left,pt.top,xt,tt.height-(pt.top+pt.bottom)))}}}}function Pu(a,y){for(var x=y?a.rowCount:a.columnCount,E=0;E<x;E++){var b=y?a.rowDefs[E]:a.colDefs[E];if(b!==void 0)return b.index}return 0}function rh(a){return a==="LineV"||a==="BarV"}Bt.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},Bt.kk=function(a,y,x){if(!te.prototype.kk.call(this,a,y,x))return!1;if(this.type===ze.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,Bu(this,a),a.yd=null;else if(this.na===ze.Grid||this.na===ze.Graduated)return this.svg.innerHTML="",this.svg.remove(),!1;x=this.O.s;for(var E=x.length,b=0;b<E;b++)x[b].gc(a,y);return!0},Bt.nk=function(){return!0},Bt.$o=function(a,y,x,E){if(!this.isClipping)if(this.Dd()&&a.bk!==null){a=a.bk,y=this.O.s;for(var b=0,z=0,tt=0;tt<y.length;tt++)if(y[tt].Ed()){var rt=y[tt].actualBounds;b=tt===0?rt.x:Math.min(rt.x,b),z=tt===0?rt.y:Math.min(rt.y,z)}E.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-b)+","+(a.y-x.y-z)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else te.prototype.$o.call(this,a,y,x,E)},Bt.Sj=function(a,y,x,E,b){var z=this.se(),tt=this.transform,rt=1/(tt.m11*tt.m22-tt.m12*tt.m21),ot=tt.m22*rt,at=-tt.m12*rt,At=-tt.m21*rt,ft=tt.m11*rt,pt=rt*(tt.m21*tt.dy-tt.m22*tt.dx),xt=rt*(tt.m12*tt.dx-tt.m11*tt.dy);if(this.areaBackground!==null)return tt=this.actualBounds,re.Ff(tt.left,tt.top,tt.right,tt.bottom,a,y,x,E,b);if(this.background!==null)return z=a*ot+y*At+pt,rt=a*at+y*ft+xt,a=x*ot+E*At+pt,ot=x*at+E*ft+xt,b.h(0,0),x=this.naturalBounds,z=re.Ff(0,0,x.width,x.height,z,rt,a,ot,b),b.transform(tt),z;z||(ot=1,At=at=0,ft=1,xt=pt=0),rt=a*ot+y*At+pt,a=a*at+y*ft+xt,ot=x*ot+E*At+pt,x=x*at+E*ft+xt,b.h(ot,x),E=(ot-rt)*(ot-rt)+(x-a)*(x-a),at=!1,ft=this.O.s,xt=ft.length,At=Rt.alloc(),pt=null,y=1/0;var Ct=null,Mt=this.isClipping&&this.na===ze.Spot;Mt&&(Ct=Rt.alloc(),pt=this.Pb(),(at=pt.Sj(rt,a,ot,x,Ct))&&(y=(rt-Ct.x)*(rt-Ct.x)+(a-Ct.y)*(a-Ct.y)));for(var Gt=0;Gt<xt;Gt++){var It=ft[Gt];It.visible&&It!==pt&&It.Sj(rt,a,ot,x,At)&&(at=!0,It=(rt-At.x)*(rt-At.x)+(a-At.y)*(a-At.y),It<E&&(E=It,b.set(At)))}return Mt&&(y>E&&b.set(Ct),Rt.free(Ct)),Rt.free(At),z&&b.transform(tt),at},Bt.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();te.prototype.Gj.call(this)},Bt.v=function(a){if(!Na(this)){te.prototype.v.call(this,a),a=null,(this.na===ze.Auto||this.na===ze.Link)&&(a=this.Pb());for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];if((b===a||b.isPanelMain)&&b.v(!0),!b.desiredSize.w()){var z=Ys(b,!1);(b instanceof ra||b instanceof ze||b instanceof Sr||z!==Ge)&&b.v(!0)}}}},Bt.Uj=function(){if(!Na(this)){mo(this,!0),pA(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},Bt.Uk=function(){if(!(this.l&2048)){sl(this,!0),na(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},Bt.Wu=function(){na(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},Bt.Wl=function(a,y,x,E){var b=this.jg;b.h(0,0,0,0);var z=this.desiredSize,tt=this.minSize;x===void 0&&(x=tt.width,E=tt.height),x=Math.max(x,tt.width),E=Math.max(E,tt.height);var rt=this.maxSize;isNaN(z.width)||(a=Math.min(z.width,rt.width)),isNaN(z.height)||(y=Math.min(z.height,rt.height)),a=Math.max(x,a),y=Math.max(E,y);var ot=this.yb;a=Math.max(a-ot.left-ot.right,0),y=Math.max(y-ot.top-ot.bottom,0);var at=this.O.s;at.length!==0&&this.na.measure(this,a,y,at,b,x,E),a=b.width+ot.left+ot.right,ot=b.height+ot.top+ot.bottom,isFinite(z.width)&&(a=z.width),isFinite(z.height)&&(ot=z.height),a=Math.min(rt.width,a),ot=Math.min(rt.height,ot),a=Math.max(tt.width,a),ot=Math.max(tt.height,ot),a=Math.max(x,a),ot=Math.max(E,ot),fa(b,a,ot),fa(this.naturalBounds,a,ot),this.Ge(0,0,a,ot)},Bt.Pb=function(){if(this.$g===null){var a=this.O.s,y=a.length;if(y===0)return null;for(var x=0;x<y;x++){var E=a[x];if(E.isPanelMain===!0)return this.$g=E}this.$g=a[0]}return this.$g};function ya(a){return a.part!==null?a.part.locationObject:null}Bt.eh=function(a,y,x,E){var b=this.O.s;if(this.actualBounds.h(a,y,x,E),b.length!==0){if(!this.desiredSize.w()){a=Ys(this,!0);var z=this.measuredBounds;y=z.width,z=z.height;var tt=this.Kg,rt=tt.left+tt.right;switch(tt=tt.top+tt.bottom,y===x&&z===E&&(a=Ge),a){case Ge:(y>x||z>E)&&(this.v(),this.measure(y>x?x:y,z>E?E:z,0,0));break;case Ve:this.v(!0),this.measure(x+rt,E+tt,0,0);break;case In:this.v(!0),this.measure(x+rt,z+tt,0,0);break;case _n:this.v(!0),this.measure(y+rt,E+tt,0,0)}}this.na.arrange(this,b,this.jg)}},Bt.gh=function(a){var y=this.naturalBounds,x=ya(this);if($o(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var E=y.length,b=Rt.allocAt(0,0);E--;){var z=y[E];if((z.visible||z===x)&&(_r(b.set(a),z.transform),z.ca(b)))return Rt.free(b),!0}return Rt.free(b),!(this.Ma===null&&this.areaBackground===null)}return!1},Bt.ks=function(a){if(this.bindingId===a)return this;for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E].ks(a);if(b!==null)return b}return null},Bt.qm=function(a,y){if(y(this,a),a instanceof ze){a=a.O.s;for(var x=a.length,E=0;E<x;E++)this.qm(a[E],y)}};function ql(a,y){Gf(a,a,y)}function Gf(a,y,x){x(y),y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=y[b];z instanceof ze&&Gf(a,z,x)}}function m1(a,y){ly(a,a,y)}function ly(a,y,x){if(x(y),y instanceof ze){y=y.O.s;for(var E=y.length,b=0;b<E;b++)ly(a,y[b],x)}}Bt.Nl=function(a){return Ay(this,this,a)};function Ay(a,y,x){if(x(y))return y;if(y instanceof ze){y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=Ay(a,y[b],x);if(z!==null)return z}}return null}Bt.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=op(this));for(var E=0;E<x;E++){var b=y[E];if(b instanceof ze){var z=b.fb(a);if(z!==null)return z}if(b.name===a)return b}return null};function uy(a){a=a.O.s;for(var y=a.length,x=0,E=0;E<y;E++){var b=a[E];b instanceof ze?x=Math.max(x,uy(b)):b instanceof yi&&(x=Math.max(x,b.ig/2*b.strokeMiterLimit*b.Df()))}return x}Bt.se=function(){return!(this.type===ze.TableRow||this.type===ze.TableColumn)};function Yh(a){return a.type===ze.TableRow||a.type===ze.TableColumn}Bt.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),bs(this)))return null;var E=this.naturalBounds,b=1/this.Df(),z=this.se(),tt=z?a:_r(Rt.allocAt(a.x,a.y),this.transform),rt=this.diagram,ot=10,at=5;if(rt!==null&&(ot=rt.Ql("extraTouchArea"),at=ot/2),$o(-(at*b),-(at*b),E.width+ot*b,E.height+ot*b,tt.x,tt.y)){if(!this.isAtomic){b=this.O.s;var At=b.length;if(rt=Rt.alloc(),at=(ot=this.isClipping&&this.na===ze.Spot)?this.Pb():null,ot&&(at.se()?_r(rt.set(a),at.transform):rt.set(a),!at.ca(rt)))return Rt.free(rt),z||Rt.free(tt),null;for(var ft=ya(this);At--;){var pt=b[At];if((pt.visible||pt===ft)&&(pt.se()?_r(rt.set(a),pt.transform):rt.set(a),!ot||pt!==at)){var xt=null;if(pt instanceof ze?xt=pt.ic(rt,y,x):pt.pickable===!0&&pt.ca(rt)&&(xt=pt),xt!==null&&(y!==null&&(xt=y(xt)),xt!==null&&(x===null||x(xt))))return Rt.free(rt),z||Rt.free(tt),xt}}Rt.free(rt)}return this.background===null&&this.areaBackground===null?(z||Rt.free(tt),null):(a=$o(0,0,E.width,E.height,tt.x,tt.y)?this:null,z||Rt.free(tt),a)}return z||Rt.free(tt),null},Bt.ji=function(a,y,x,E){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var b=this.naturalBounds,z=this.se(),tt=z?a:_r(Rt.allocAt(a.x,a.y),this.transform);if(b=$o(0,0,b.width,b.height,tt.x,tt.y),Yh(this)||b){if(!this.isAtomic){for(var rt=this.O.s,ot=rt.length,at=Rt.alloc(),At=ya(this);ot--;){var ft=rt[ot];if(ft.visible||ft===At){ft.se()?_r(at.set(a),ft.transform):at.set(a);var pt=ft;ft=ft instanceof ze?ft:null,(ft!==null?ft.ji(at,y,x,E):pt.ca(at))&&pt.pickable!==!1&&(y!==null&&(pt=y(pt)),pt===null||x!==null&&!x(pt)||E.add(pt))}}Rt.free(at)}return z||Rt.free(tt),b&&(this.background!==null||this.areaBackground!==null)}return z||Rt.free(tt),!1},Bt.Cf=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var tt=z;if(z===void 0&&(tt=Li.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return bm(this,y,x,b),z===void 0&&Li.free(tt),!0;if(this.Yc(a,tt)){if(!this.isAtomic)for(var rt=ya(this),ot=this.O.s,at=ot.length;at--;){var At=ot[at];if(At.visible||At===rt){var ft=At.actualBounds,pt=this.naturalBounds;ft.x>pt.width||ft.y>pt.height||0>ft.x+ft.width||0>ft.y+ft.height||(ft=At,At=At instanceof ze?At:null,pt=Li.alloc(),pt.set(tt),(At!==null?At.Cf(a,y,x,E,b,pt):Io(ft,a,E,pt))&&(y!==null&&(ft=y(ft)),ft===null||x!==null&&!x(ft)||b.add(ft)),Li.free(pt))}}return z===void 0&&Li.free(tt),E}return z===void 0&&Li.free(tt),!1};function bm(a,y,x,E){for(var b=a.O.s,z=b.length;z--;){var tt=b[z];if(tt.visible){var rt=tt.actualBounds,ot=a.naturalBounds;rt.x>ot.width||rt.y>ot.height||0>rt.x+rt.width||0>rt.y+rt.height||(tt instanceof ze&&bm(tt,y,x,E),y!==null&&(tt=y(tt)),tt===null||x!==null&&!x(tt)||E.add(tt))}}}Bt.og=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;x===void 0&&(x=null),E===void 0&&(E=null);var tt=this.naturalBounds,rt=this.se(),ot=rt?a:_r(Rt.allocAt(a.x,a.y),this.transform),at=rt?y:_r(Rt.allocAt(y.x,y.y),this.transform),At=ot.Bf(at),ft=0<ot.x&&ot.x<tt.width&&0<ot.y&&ot.y<tt.height||To(ot.x,ot.y,0,0,0,tt.height)<=At||To(ot.x,ot.y,0,tt.height,tt.width,tt.height)<=At||To(ot.x,ot.y,tt.width,tt.height,tt.width,0)<=At||To(ot.x,ot.y,tt.width,0,0,0)<=At;if(tt=ot.zd(0,0)<=At&&ot.zd(0,tt.height)<=At&&ot.zd(tt.width,0)<=At&&ot.zd(tt.width,tt.height)<=At,rt||(Rt.free(ot),Rt.free(at)),ft){if(!this.isAtomic){ot=Rt.alloc(),at=Rt.alloc(),At=ya(this);for(var pt=this.O.s,xt=pt.length;xt--;){var Ct=pt[xt];if(Ct.visible||Ct===At){var Mt=Ct.actualBounds,Gt=this.naturalBounds;(!rt||!(Mt.x>Gt.width||Mt.y>Gt.height||0>Mt.x+Mt.width||0>Mt.y+Mt.height))&&(Ct.se()?(Mt=Ct.transform,_r(ot.set(a),Mt),_r(at.set(y),Mt)):(ot.set(a),at.set(y)),Mt=Ct,Ct=Ct instanceof ze?Ct:null,(Ct!==null?Ct.og(ot,at,x,E,b,z):Mt.tx(ot,at,b))&&(x!==null&&(Mt=x(Mt)),Mt===null||E!==null&&!E(Mt)||z.add(Mt)))}}Rt.free(ot),Rt.free(at)}return b?ft:tt}return!1};function Tm(a){var y=null;return a instanceof yi&&(y=a.spot1,y===Xo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=es),y}function Nm(a){var y=null;return a instanceof yi&&(y=a.spot2,y===Xo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=Pa),y}Bt.add=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];for(x=0;x<y.length;x++)this.Gb(this.O.count,y[x]);return this},Bt.M=function(a){return this.O.M(a)},Bt.Gb=function(a,y){y instanceof jn&&pe("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&pe("Cannot make a Panel contain itself: "+this.toString()),pe("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&pe("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+y.toString()+", already contained by "+x.toString()+", cannot be shared by this Panel: "+this.toString()),this.na!==ze.Grid||y instanceof yi||pe("Can only add Shapes to a Grid Panel, not: "+y),this.na!==ze.Graduated||y instanceof yi||y instanceof Sr||pe("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+y),y.wi(this),y.Ng=null,this.itemArray!==null){var E=y.data;E!==null&&typeof E=="object"&&(this.ge===null&&(this.ge=new Rn),this.ge.add(E,y))}var b=this.O;if(E=-1,x===this){for(var z=-1,tt=this.O.s,rt=tt.length,ot=0;ot<rt;ot++)if(tt[ot]===y){z=ot;break}if(z!==-1){if(z===a||z+1>=b.count&&a>=b.count)return;b.mb(z),E=z}else pe("element "+y.toString()+" has panel "+x.toString()+" but is not contained by it.")}(0>a||a>b.count)&&(a=b.count),b.Gb(a,y),(a===0||y.isPanelMain)&&(this.$g=null),Na(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof ze&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||r0(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof hn&&(x.Te=!0),x.Te&&x instanceof hn&&(x.wc=null),b=this.diagram,b!==null&&b.undoManager.isUndoingRedoing||(E!==-1&&x.cb(Co,"elements",this,y,null,E,null),x.cb(to,"elements",this,null,y,null,a)))};function Qm(a,y){a.l=y?a.l|16777216:a.l&-16777217}Bt.remove=function(a){for(var y=this.O.s,x=y.length,E=-1,b=0;b<x;b++)if(y[b]===a){E=b;break}E!==-1&&this.pc(E,!0)},Bt.mb=function(a){0<=a&&this.pc(a,!0)},Bt.pc=function(a,y){var x=this.O,E=x.M(a);if(E.Ng=null,E.wi(null),this.ge!==null){var b=E.data;typeof b=="object"&&this.ge.remove(b)}x.mb(a),mo(this,!1),this.v(),this.$g===E&&(this.$g=null),this.graduatedIntervals=null;var z=this.part;z!==null&&(z.Rh=null,z.ag=NaN,z.Wb(),z instanceof hn&&(E instanceof ze?E.qm(E,function(tt,rt){iv(z,rt,y)}):iv(z,E,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||z.cb(Co,"elements",this,E,null,a,null))},Bt.Fb=function(a){0>a&&pi(a,">= 0",ze,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Mo;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(to,"rowdefs",this,null,x,null,a)}return y[a]},Bt.oA=function(a){if(0>a&&pi(a,">= 0",ze,"removeRowDefinition:idx"),this.rowCount!==0){a=Math.round(a);var y=this.rowDefs,x=y[a];if(x){y[a]=void 0;for(var E=y.length-1;0<=E&&y[E--]===void 0;)y.length--;this.cb(Co,"rowdefs",this,x,null,a,null),this.v()}}};function hy(a,y,x){var E=a.rowDefs;if(!(0>y)){if(E[y]=x instanceof Mo?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}Bt.Eb=function(a){0>a&&pi(a,">= 0",ze,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Mo;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(to,"coldefs",this,null,x,null,a)}return y[a]},Bt.jA=function(a){if(0>a&&pi(a,">= 0",ze,"removeColumnDefinition:idx"),this.columnCount!==0){a=Math.round(a);var y=this.colDefs,x=y[a];if(x){y[a]=void 0;for(var E=y.length-1;0<=E&&y[E--]===void 0;)y.length--;this.cb(Co,"coldefs",this,x,null,a,null),this.v()}}};function gy(a,y,x){var E=a.colDefs;if(!(0>y)){if(E[y]=x instanceof Mo?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}Bt.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&o0(y,a),this},Bt.Hy=function(a,y){return(a=this.Fb(a))&&o0(a,new Mo(y)),this},Bt.By=function(a,y){return(a=this.Eb(a))&&o0(a,new Mo(y)),this},Bt.nz=function(a){if(0>a||this.type!==ze.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,E=x.length,b=this.topIndex;b<E;b++){var z=x[b];if(z!==void 0&&(y+=z.total,a<y))break}return b},Bt.fz=function(a){if(0>a||this.type!==ze.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,E=x.length,b=this.leftIndex;b<E;b++){var z=x[b];if(z!==void 0&&(y+=z.total,a<y))break}return b},Bt.Fz=function(a,y){if(y===void 0&&(y=new Rt(NaN,NaN)),this.type!==ze.Graduated)return y.h(NaN,NaN),y;a=Math.min(Math.max(a,this.graduatedMin),this.graduatedMax);var x=this.Pb();return x.geometry.Pu((a-this.graduatedMin)/this.graduatedRange,y),x.transform.Ga(y)},Bt.Gz=function(a){if(this.type!==ze.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function fy(a){return a=a.allBindings,a!==null&&a._isFrozen}function Tl(a){var y=a.allBindings;if(y===null)a.data!==null&&pe("Template cannot have .data be non-null: "+a),a.allBindings=y=new Ke;else if(y._isFrozen)return;var x=new Ke;Qm(a,!1),a.qm(a,function(at,At){At.th();var ft=At.localBindings;if(ft!==null)for(Su(At,!1),ft=ft.iterator;ft.next();){var pt=ft.value;pt.mode===Lp&&Su(At,!0);var xt=pt.sourceName;xt!==null&&(xt==="/"&&Qm(at,!0),xt=Lw(pt,at,At),xt!==null&&(x.add(xt),xt.srcBindings===null&&(xt.srcBindings=new Ke),xt.srcBindings.add(pt))),y.add(pt)}if(At instanceof ze&&At.type===ze.Table){if(0<At.rowCount){for(at=At.rowDefs,ft=at.length,pt=0;pt<ft;pt++)if(xt=at[pt],xt!==void 0&&xt.be!==null)for(var Ct=xt.be.iterator;Ct.next();){var Mt=Ct.value;Mt.xd=xt,Mt.to=2,Mt.wl=xt.index,y.add(Mt)}}if(0<At.columnCount){for(At=At.colDefs,at=At.length,ft=0;ft<at;ft++)if(pt=At[ft],pt!==void 0&&pt.be!==null)for(xt=pt.be.iterator;xt.next();)Ct=xt.value,Ct.xd=pt,Ct.to=1,Ct.wl=pt.index,y.add(Ct)}}});for(var E=x.iterator;E.next();){var b=E.value;if(b.srcBindings!==null){Su(b,!0);for(var z=b.srcBindings.iterator;z.next();){var tt=z.value;b.localBindings===null&&(b.localBindings=new Ke),b.localBindings.add(tt)}}b.srcBindings=null}for(E=y.iterator;E.next();)if(b=E.value,z=b.xd,z!==null){b.xd=null;var rt=b.targetProperty,ot=rt.indexOf(".");0<ot&&z instanceof ze&&(tt=rt.substring(0,ot),rt=rt.substr(ot+1),ot=z.fb(tt),ot!==null?(z=ot,b.targetProperty=rt):Oi('Warning: unable to find GraphObject named "'+tt+'" for Binding: '+b.toString())),z instanceof Mo?(tt=gr(z.panel),b.Ai=tt===void 0?-1:tt,z.panel.bindingId=b.Ai):z instanceof te?(tt=gr(z),b.Ai=tt===void 0?-1:tt,z.bindingId=b.Ai):pe("Unknown type of binding target: "+z)}y.freeze(),a instanceof jn&&a.Zc()&&a.Va()}Bt.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return m1(y,function(x){x instanceof ze&&(x.allBindings=null,x.ub=null);var E=x.localBindings;E!==null&&(x.localBindings=null,E.each(function(b){x.bind(b.copy())})),E=x.animationTriggers,E!==null&&(x.animationTriggers=null,E.each(function(b){x.Jv(b.value.copy())}))}),a&&Tl(y),y},Bt.La=function(a){var y=this.allBindings;if(y!==null)for(a===void 0&&(a=""),y=y.iterator;y.next();){var x=y.value,E=x.sourceProperty;if((a===""||E===""||E===a)&&(E=x.targetProperty,x.converter!==null||E!=="")){E=this.data;var b=x.sourceName;if(b!==null){if(b==="")E=this;else if(b==="/")E=this;else if(b===".")E=this;else if(b==="..")E=this;else if(E=this.fb(b),E===null)continue}else if(x.isToModel)if(E=this.diagram,E!==null)E=E.model.modelData;else continue;var z=this,tt=x.Ai;if(tt!==-1){if(z=this.ks(tt),z===null)continue}else x.xd!==null&&(z=x.xd);if(b==="/"?E=z.part:b==="."?E=z:b===".."&&(E=z.panel),b=x.to,b!==0){if(!(z instanceof ze))continue;b===1?z=z.Eb(x.wl):b===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,E)}}},Bt.sx=function(a){return a==null||this.ge===null?null:this.ge.I(a)};function v1(a,y){a=a.O.s;for(var x=a.length,E=y.length,b=0,z=null;b<x&&(z=a[b],!(z instanceof ze&&z.data!==null));)b++,z=a[b];if(x-b!==E)return!0;if(z===null)return 0<E;for(var tt=0;b<x&&tt<E;){if(z=a[b],!(z instanceof ze)||z.data!==y[tt])return!0;b++,tt++}return!1}function op(a){if(a.type===ze.Spot||a.type===ze.Auto)return Math.min(a.O.length,1);if(a.type===ze.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var E=a.M(x);if(!(E instanceof yi&&E.isPanelMain))break}return x}return a.type===ze.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof ze&&Yh(a))?1:0}Bt.mv=function(){for(var a=op(this);this.O.length>a;)this.pc(this.O.length-1,!1);dy(this,this.itemArray)};function dy(a,y){var x=op(a);if(y===null||y.length===0)for(;a.O.length>x;)a.pc(a.O.length-1,!1);else if(a.O.length<=x){x=y.length;for(var E=0;E<x;E++)i0(a,y[E],E,!0)}else{E=x;for(var b=0;b<y.length;b++,E++){var z=y[b],tt=E<a.O.length?a.O.M(E):null;if(tt instanceof ze){if(tt.data!==z){var rt=Im(a,tt.data),ot=Im(a,z),at=ot!==rt;at||(rt=Dm(a,rt),at=Dm(a,ot)!==rt),at?(a.pc(E,!1),i0(a,z,b,!1)):tt.data=z}}else i0(a,z,b,!1)}for(;E<a.O.length;)a.pc(E,!1);a.$g=null,Um(a,x,0),Na(a)||a.v(),a.graduatedIntervals=null,a.If()||r0(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof hn&&(y.Te=!0),y.Te&&y instanceof hn&&(y.wc=null))}}function i0(a,y,x,E){if(!(y==null||0>x)){var b=Im(a,y);if(b=Dm(a,b),b!==null){if(Tl(b),b=b.copy(),b.l&16777216){var z=a.ih();z!==null&&Qm(z,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new Rn),a.ge.add(y,b)),z=x+op(a),a.Gb(z,b),E&&(b.ub=y,Um(a,z,x),b.ub=null),b.data=y}}}function Um(a,y,x){for(a=a.O;y<a.length;){var E=a.M(y);if(E instanceof ze){var b=y,z=x;E.type===ze.TableRow?E.row=b:E.type===ze.TableColumn&&(E.column=b),E.itemIndex=z}y++,x++}}function Im(a,y){if(y===null)return"";if(a=a.itemCategoryProperty,typeof a=="function")a=a(y);else if(typeof a=="string"&&typeof y=="object"){if(a==="")return"";a=ho(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;pe("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function Dm(a,y){var x=a.itemTemplateMap,E=null;return x!==null&&(E=x.I(y)),E===null&&(x!==null&&(E=x.I("")),E===null&&(cy||(cy=!0,Oi('No item template Panel found for category "'+y+'" on '+a),Oi(" Using default item template."),a=new ze,y=new Sr,y.bind(new vo("text","",En)),a.add(y),py=a),E=py)),E}function r0(a,y,x){var E=y.enabledChanged;if(E!==null&&E(y,x),y instanceof ze){y=y.O.s,E=y.length;for(var b=0;b<E;b++){var z=y[b];x&&z instanceof ze&&!z.isEnabled||r0(a,z,x)}}}function zA(a,y){y.name=a,$l.add(a,y)}Ie.Object.defineProperties(ze.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===ze.Grid,this.v(),this.g("type",y,a))}},elements:{get:function(){return this.O.iterator}},naturalBounds:{get:function(){return this.dc}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"?(0>a&&pi(a,">= 0",ze,"padding"),a=new Pi(a)):(0>a.left&&pi(a.left,">= 0",ze,"padding:value.left"),0>a.right&&pi(a.right,">= 0",ze,"padding:value.right"),0>a.top&&pi(a.top,">= 0",ze,"padding:value.top"),0>a.bottom&&pi(a.bottom,">= 0",ze,"padding:value.bottom"));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.v(),this.g("padding",y,a))}},defaultAlignment:{get:function(){return this.Tm},set:function(a){var y=this.Tm;y.D(a)||(this.Tm=a=a.J(),this.v(),this.g("defaultAlignment",y,a))}},defaultStretch:{get:function(){return this.Uf},set:function(a){var y=this.Uf;y!==a&&(this.Uf=a,this.v(),this.g("defaultStretch",y,a))}},defaultSeparatorPadding:{get:function(){return this.T!==null?this.T.Qp:El},set:function(a){typeof a=="number"&&(a=new Pi(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new xl),this.T.Qp=a,this.v(),this.g("defaultSeparatorPadding",y,a))}},defaultRowSeparatorStroke:{get:function(){return this.T!==null?this.T.ia:null},set:function(a){var y=this.defaultRowSeparatorStroke;y!==a&&(a===null||typeof a=="string"||a instanceof nr)&&(a instanceof nr&&a.freeze(),this.T===null&&(this.T=new xl),this.T.ia=a,this.N(),this.g("defaultRowSeparatorStroke",y,a))}},defaultRowSeparatorStrokeWidth:{get:function(){return this.T!==null?this.T.Ha:1},set:function(a){var y=this.defaultRowSeparatorStrokeWidth;y!==a&&isFinite(a)&&0<=a&&(this.T===null&&(this.T=new xl),this.T.Ha=a,this.v(),this.g("defaultRowSeparatorStrokeWidth",y,a))}},defaultRowSeparatorDashArray:{get:function(){return this.T!==null?this.T.V:null},set:function(a){var y=this.defaultRowSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||pe("defaultRowSeparatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.T===null&&(this.T=new xl),this.T.V=a,this.N(),this.g("defaultRowSeparatorDashArray",y,a)}}},defaultColumnSeparatorStroke:{get:function(){return this.T!==null?this.T.u:null},set:function(a){var y=this.defaultColumnSeparatorStroke;y!==a&&(a===null||typeof a=="string"||a instanceof nr)&&(a instanceof nr&&a.freeze(),this.T===null&&(this.T=new xl),this.T.u=a,this.N(),this.g("defaultColumnSeparatorStroke",y,a))}},defaultColumnSeparatorStrokeWidth:{get:function(){return this.T!==null?this.T.F:1},set:function(a){var y=this.defaultColumnSeparatorStrokeWidth;y!==a&&isFinite(a)&&0<=a&&(this.T===null&&(this.T=new xl),this.T.F=a,this.v(),this.g("defaultColumnSeparatorStrokeWidth",y,a))}},defaultColumnSeparatorDashArray:{get:function(){return this.T!==null?this.T.o:null},set:function(a){var y=this.defaultColumnSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||pe("defaultColumnSeparatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.T===null&&(this.T=new xl),this.T.o=a,this.N(),this.g("defaultColumnSeparatorDashArray",y,a)}}},inRowsCols:{get:function(){return this.T!==null?this.T.nb:null},set:function(a){this.T===null&&(this.T=new xl),this.T.nb=a}},viewboxStretch:{get:function(){return this.xo},set:function(a){var y=this.xo;y!==a&&(this.xo=a,this.v(),this.g("viewboxStretch",y,a))}},gridCellSize:{get:function(){return this.jn},set:function(a){var y=this.jn;if(!y.D(a)){a.w()&&a.width!==0&&a.height!==0||pe("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Xl(x),this.N(),this.g("gridCellSize",y,a)}}},gridOrigin:{get:function(){return this.kn},set:function(a){var y=this.kn;if(!y.D(a)){a.w()||pe("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Xl(x),this.N(),this.g("gridOrigin",y,a)}}},graduatedMin:{get:function(){return this.ra!==null?this.ra.lq:0},set:function(a){var y=this.graduatedMin;y!==a&&(this.ra===null&&(this.ra=new oh),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),as(this)&&(a=this.part,a!==null&&Cr(this,a,"graduatedRange")))}},graduatedMax:{get:function(){return this.ra!==null?this.ra.F:100},set:function(a){var y=this.graduatedMax;y!==a&&(this.ra===null&&(this.ra=new oh),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),as(this)&&(a=this.part,a!==null&&Cr(this,a,"graduatedRange")))}},graduatedRange:{get:function(){return this.graduatedMax-this.graduatedMin}},graduatedTickUnit:{get:function(){return this.ra!==null?this.ra.ia:10},set:function(a){var y=this.graduatedTickUnit;y!==a&&0<a&&(this.ra===null&&(this.ra=new oh),this.ra.ia=a,this.v(),this.g("graduatedTickUnit",y,a))}},graduatedTickBase:{get:function(){return this.ra!==null?this.ra.V:0},set:function(a){var y=this.graduatedTickBase;y!==a&&(this.ra===null&&(this.ra=new oh),this.ra.V=a,this.v(),this.g("graduatedTickBase",y,a))}},graduatedMarks:{get:function(){return this.ra!==null?this.ra.u:null},set:function(a){this.ra!==null?this.ra.u=a:a!==null&&(this.ra=new oh,this.ra.u=a)}},graduatedBounds:{get:function(){return this.ra!==null?this.ra.j:null},set:function(a){this.ra!==null?this.ra.j=a:a!==null&&(this.ra=new oh,this.ra.j=a)}},graduatedIntervals:{get:function(){return this.ra!==null?this.ra.o:null},set:function(a){this.ra!==null?this.ra.o=a:a!==null&&(this.ra=new oh,this.ra.o=a)}},temporaryTextBlock:{get:function(){return this.ra!==null?this.ra.Zh:null},set:function(a){this.ra!==null?this.ra.Zh=a:a!==null&&(this.ra=new oh,this.ra.Zh=a)}},panelLayoutState:{get:function(){return this.F},set:function(a){this.F=a}},Te:{get:function(){return(this.l&8388608)!==0},set:function(a){(this.l&8388608)!==0!==a&&(this.l^=8388608)}},rowDefs:{get:function(){return this.T===null&&(this.T=new xl),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new xl),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:a0},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new xl),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:a0},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new xl),this.T.j=a,this.v(),this.g("columnSizing",y,a))}},topIndex:{get:function(){return this.T!==null?this.T.Hb:0},set:function(a){var y=this.topIndex;y!==a&&((!isFinite(a)||0>a)&&pe("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new xl),this.T.Hb=a,this.v(),this.g("topIndex",y,a))}},leftIndex:{get:function(){return this.T!==null?this.T.hb:0},set:function(a){var y=this.leftIndex;y!==a&&((!isFinite(a)||0>a)&&pe("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new xl),this.T.hb=a,this.v(),this.g("leftIndex",y,a))}},data:{get:function(){return this.ub},set:function(a){var y=this.ub;if(y!==a){var x=this instanceof jn&&!(this instanceof Wi);Tl(this),this.ub=a;var E=this.diagram;E!==null&&(x?(x=E.partManager,this instanceof tn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof jn&&(y!==null&&x.cf.remove(y),a!==null&&x.cf.add(a,this))):(x=this.panel,x!==null&&x.ge!==null&&(y!==null&&x.ge.remove(y),a!==null&&x.ge.add(a,this)))),this.g("data",y,a),E!==null&&E.undoManager.isUndoingRedoing||a!==null&&this.La()}}},itemIndex:{get:function(){return this.zn},set:function(a){var y=this.zn;y!==a&&(this.zn=a,this.g("itemIndex",y,a))}},allBindings:{get:function(){return this.A!==null?this.A.nb:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new Gh),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&v1(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&Bv(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&xv(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||dy(this,a)}}},itemTemplate:{get:function(){return this.itemTemplateMap===null?null:this.itemTemplateMap.I("")},set:function(a){if(this.itemTemplateMap===null){if(a===null)return;this.itemTemplateMap=new Rn}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof jn||a.isPanelMain)&&pe("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.mv())}},itemTemplateMap:{get:function(){return this.A!==null?this.A.Pc:null},set:function(a){var y=this.itemTemplateMap;if(y!==a){for(var x=a.iterator;x.next(););wi(this),this.A.Pc=a,this.g("itemTemplateMap",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.mv()}}},itemCategoryProperty:{get:function(){return this.A!==null?this.A.Oc:"category"},set:function(a){var y=this.itemCategoryProperty;y!==a&&(wi(this),this.A.Oc=a,this.g("itemCategoryProperty",y,a))}},isAtomic:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.g("isAtomic",y,a))}},isClipping:{get:function(){return(this.l&2097152)!==0},set:function(a){var y=(this.l&2097152)!==0;y!==a&&(this.l^=2097152,this instanceof li&&(this.tb=null),this.v(),this.g("isClipping",y,a))}},isOpposite:{get:function(){return(this.l&33554432)!==0},set:function(a){var y=(this.l&33554432)!==0;y!==a&&(this.l^=33554432,this.v(),this.g("isOpposite",y,a))}},isEnabled:{get:function(){return(this.l&4194304)!==0},set:function(a){var y=(this.l&4194304)!==0;if(y!==a){var x=this.panel===null||this.panel.If();this.l^=4194304,this.g("isEnabled",y,a),y=this.diagram,y!==null&&y.undoManager.isUndoingRedoing||x&&r0(this,this,a)}}},alignmentFocusName:{get:function(){return this.$e},set:function(a){var y=this.$e;y!==a&&(this.$e=a,this.v(),this.g("alignmentFocusName",y,a))}}}),Ie.Object.defineProperties(ze,{Position:{get:function(){return $l.I("Position")}},Horizontal:{get:function(){return $l.I("Horizontal")}},Vertical:{get:function(){return $l.I("Vertical")}},Spot:{get:function(){return $l.I("Spot")}},Auto:{get:function(){return $l.I("Auto")}},Table:{get:function(){return $l.I("Table")}},Viewbox:{get:function(){return $l.I("Viewbox")}},TableRow:{get:function(){return $l.I("TableRow")}},TableColumn:{get:function(){return $l.I("TableColumn")}},Link:{get:function(){return $l.I("Link")}},Grid:{get:function(){return $l.I("Grid")}},Graduated:{get:function(){return $l.I("Graduated")}}}),ze.prototype.rebuildItemElements=ze.prototype.mv,ze.prototype.findItemPanelForData=ze.prototype.sx,ze.prototype.updateTargetBindings=ze.prototype.La,ze.prototype.copyTemplate=ze.prototype.Uy,ze.prototype.graduatedValueForPoint=ze.prototype.Gz,ze.prototype.graduatedPointForValue=ze.prototype.Fz,ze.prototype.findColumnForLocalX=ze.prototype.fz,ze.prototype.findRowForLocalY=ze.prototype.nz,ze.prototype.addColumnDefinition=ze.prototype.By,ze.prototype.addRowDefinition=ze.prototype.Hy,ze.prototype.addRowColumnDefinition=ze.prototype.Gy,ze.prototype.removeColumnDefinition=ze.prototype.jA,ze.prototype.getColumnDefinition=ze.prototype.Eb,ze.prototype.removeRowDefinition=ze.prototype.oA,ze.prototype.getRowDefinition=ze.prototype.Fb,ze.prototype.removeAt=ze.prototype.mb,ze.prototype.remove=ze.prototype.remove,ze.prototype.insertAt=ze.prototype.Gb,ze.prototype.elt=ze.prototype.M,ze.prototype.add=ze.prototype.add,ze.prototype.findObject=ze.prototype.fb,ze.prototype.findInVisualTree=ze.prototype.Nl,ze.prototype.walkVisualTreeFrom=ze.prototype.qm,ze.prototype.findMainElement=ze.prototype.Pb;var cy=!1,py=null,$l=new Rn;ze.className="Panel",ze.definePanelLayout=zA,zA("Position",new zr),zA("Vertical",new ji),zA("Auto",new Mr),zA("Link",new Ya);function oh(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}oh.prototype.copy=function(){var a=new oh;return a.lq=this.lq,a.F=this.F,a.ia=this.ia,a.V=this.V,a.u=this.u,a.j=this.j,a.o=this.o,a.Zh=this.Zh,a},oh.className="GradPanelSettings";function xl(){this.Pc=[],this.Oc=[],this.j=this.ob=a0,this.hb=this.Hb=0,this.Qp=El,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}xl.prototype.copy=function(a){for(var y=new xl,x=this.Pc,E=x.length,b=y.Pc,z=0;z<E;z++)if(x[z]!==void 0){var tt=x[z].copy();tt.wi(a),b[z]=tt}for(x=this.Oc,E=x.length,b=y.Oc,z=0;z<E;z++)x[z]!==void 0&&(tt=x[z].copy(),tt.wi(a),b[z]=tt);return y.ob=this.ob,y.j=this.j,y.Hb=this.Hb,y.hb=this.hb,y.Qp=this.Qp.J(),y.Ha=this.Ha,y.ia=this.ia,y.V=this.V,y.F=this.F,y.u=this.u,y.o=this.o,y.nb=this.nb,y},xl.className="TablePanelSettings";function Mo(a){rr(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=Xo,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Hm,this.hg=oi,this.lo=this.dg=null,this.mo=NaN,this.Ma=this.tj=null,this.Pm=!1,a&&(Object.assign(this,a),a.column!==void 0?(this.isRow=!1,this.index=a.column):a.row!==void 0&&(this.isRow=!0,this.index=a.row))}Mo.prototype.copy=function(){var a=new Mo;return a.uq=this.uq,a.Za=this.Za,a.Hc=this.Hc,a.jj=this.jj,a.hj=this.hj,a.Jb=this.Jb,a.oa=this.oa,a.oc=this.oc,a.pa=this.pa,a.hg=this.hg,a.oo=this.oo,this.dg===null?a.dg=null:a.dg=this.dg.J(),a.lo=this.lo,a.mo=this.mo,a.tj=null,this.tj!==null&&(a.separatorDashArray=ie(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function o0(a,y){y.isRow?a.height=y.height:a.width=y.width,a.minimum=y.minimum,a.maximum=y.maximum,a.alignment=y.alignment,a.stretch=y.stretch,a.sizing=y.sizing,a.dg=y.separatorPadding===null?null:y.separatorPadding.J(),a.separatorStroke=y.separatorStroke,a.separatorStrokeWidth=y.separatorStrokeWidth,a.tj=null,y.separatorDashArray&&(a.tj=ie(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}Bt=Mo.prototype,Bt.qb=function(a){a.classType===Mo&&(this.sizing=a)},Bt.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+gr(this)},Bt.wi=function(a){this.Me=a},Bt.Io=function(a){var y=0,x=this.Me;if(this.index!==a&&(a=this.separatorStroke,a===null&&x!==null&&(a=this.isRow?x.defaultRowSeparatorStroke:x.defaultColumnSeparatorStroke),a!==null&&(y=this.separatorStrokeWidth,isNaN(y)&&(x!==null?y=this.isRow?x.defaultRowSeparatorStrokeWidth:x.defaultColumnSeparatorStrokeWidth:y=0))),a=this.dg,a===null)if(x!==null)a=x.defaultSeparatorPadding;else return y;return y+(this.isRow?a.top:a.left)},Bt.Wc=function(){var a=0,y=this.Me,x=0,E=this.isRow;if(y!==null&&y.type===ze.Table)for(var b=E?y.rowDefs.length:y.colDefs.length,z=0;z<b;z++){var tt=E?y.rowDefs[z]:y.colDefs[z];if(tt!==void 0&&tt.oa!==0){x=tt.index;break}}if(this.index!==x&&(x=this.separatorStroke,x===null&&y!==null&&(x=E?y.defaultRowSeparatorStroke:y.defaultColumnSeparatorStroke),x!==null&&(a=this.separatorStrokeWidth,isNaN(a)&&(y!==null?a=E?y.defaultRowSeparatorStrokeWidth:y.defaultColumnSeparatorStrokeWidth:a=0))),E=this.dg,E===null)if(y!==null)E=y.defaultSeparatorPadding;else return a;return a+(this.isRow?E.top+E.bottom:E.left+E.right)},Bt.Ob=function(a,y,x){var E=this.Me;if(E!==null&&(E.cb(Qr,a,this,y,x,void 0,void 0),this.be!==null&&(y=E.diagram,y!==null&&!y.skipsModelSourceBindings&&(E=E.ih(),E!==null&&(y=E.data,y!==null)))))for(x=this.be.iterator;x.next();)x.value.sp(this,y,a,E)};function s0(a){if(a.sizing===Hm){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}Bt.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new vo(a,y,x,E):b=a,b.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&fy(y)&&pe("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+b+" on "+a)),this.be===null&&(this.be=new Ke),this.be.add(b),this},Ie.Object.defineProperties(Mo.prototype,{panel:{get:function(){return this.Me}},isRow:{get:function(){return this.uq},set:function(a){this.uq=a}},index:{get:function(){return this.Za},set:function(a){this.Za=a}},height:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&pi(a,">= 0",Mo,"height"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("height",y,a))}},width:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&pi(a,">= 0",Mo,"width"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("width",y,a))}},minimum:{get:function(){return this.jj},set:function(a){var y=this.jj;y!==a&&((0>a||!isFinite(a))&&pi(a,">= 0",Mo,"minimum"),this.jj=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("minimum",y,a))}},maximum:{get:function(){return this.hj},set:function(a){var y=this.hj;y!==a&&(0>a&&pi(a,">= 0",Mo,"maximum"),this.hj=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("maximum",y,a))}},alignment:{get:function(){return this.Jb},set:function(a){var y=this.Jb;y.D(a)||(this.Jb=a.J(),this.panel!==null&&this.panel.v(),this.Ob("alignment",y,a))}},stretch:{get:function(){return this.hg},set:function(a){var y=this.hg;y!==a&&(this.hg=a,this.panel!==null&&this.panel.v(),this.Ob("stretch",y,a))}},separatorPadding:{get:function(){return this.dg},set:function(a){typeof a=="number"&&(a=new Pi(a));var y=this.dg;a!==null&&y!==null&&y.D(a)||(a!==null&&(a=a.J()),this.dg=a,this.panel!==null&&this.panel.v(),this.Ob("separatorPadding",y,a))}},separatorStroke:{get:function(){return this.lo},set:function(a){var y=this.lo;y!==a&&(a!==null&&St(a,"RowColumnDefinition.separatorStroke"),a instanceof nr&&a.freeze(),this.lo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStroke",y,a))}},separatorStrokeWidth:{get:function(){return this.mo},set:function(a){var y=this.mo;y!==a&&(this.mo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStrokeWidth",y,a))}},separatorDashArray:{get:function(){return this.tj},set:function(a){var y=this.tj;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||pe("separatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.tj=a,this.panel!==null&&this.panel.N(),this.Ob("separatorDashArray",y,a)}}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&St(a,"RowColumnDefinition.background"),a instanceof nr&&a.freeze(),this.Ma=a,this.panel!==null&&this.panel.N(),this.Ob("background",y,a))}},coversSeparators:{get:function(){return this.Pm},set:function(a){var y=this.Pm;y!==a&&(this.Pm=a,this.panel!==null&&this.panel.N(),this.Ob("coversSeparators",y,a))}},sizing:{get:function(){return this.oo},set:function(a){var y=this.oo;y!==a&&(this.oo=a,this.panel!==null&&this.panel.v(),this.Ob("sizing",y,a))}},actual:{get:function(){return this.oa},set:function(a){this.oa=isNaN(this.Hc)?Math.max(Math.min(this.hj,a),this.jj):Math.max(Math.min(this.hj,this.Hc),this.jj)}},measured:{get:function(){return this.oc},set:function(a){this.oc=a}},total:{get:function(){return this.oa+this.Wc()}},position:{get:function(){return this.pa},set:function(a){this.pa=a}}}),Mo.prototype.computeEffectiveSpacing=Mo.prototype.Wc,Mo.prototype.computeEffectiveSpacingTop=Mo.prototype.Io;var Hm=new ce(Mo,"Default",0),sp=new ce(Mo,"None",1),a0=new ce(Mo,"ProportionalExtra",2);Mo.className="RowColumnDefinition",Mo.Default=Hm,Mo.None=sp,Mo.ProportionalExtra=a0;function yi(a,y){te.call(this),this.Rd=this.ua=null,this.an="None",this.xc=this.Ui="black",this.ig=1,this.Na=this.Yg=null,this.Vn=this.Un=NaN,this.fa=null,typeof a=="string"?this.figure=a:a&&Object.assign(this,a),y&&Object.assign(this,y)}ue(yi,te),yi.prototype.cloneProtected=function(a){te.prototype.cloneProtected.call(this,a),a.ua=this.ua,a.Rd=this.Rd,a.an=this.an,a.Ui=this.Ui,a.xc=this.xc,a.ig=this.ig,this.Yg!==null&&(a.Yg=ie(this.Yg)),this.Na!==null&&(a.Na=this.Na.nc?this.Na:this.Na.copy()),a.Un=this.Un,a.Vn=this.Vn,this.fa!==null&&(a.fa=this.fa.copy())};function jf(a){a.Na===null?a.Na=new Gm:a.Na.nc&&(a.Na=a.Na.copy())}Bt=yi.prototype,Bt.th=function(){te.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},Bt.qb=function(a){a===Ge||a===Fn||a===bi||a===oi?this.geometryStretch=a:te.prototype.qb.call(this,a)},Bt.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+gr(this)};function yc(a,y,x,E){var b=x.length;if(!(4>b)){var z=E.measuredBounds,tt=Math.max(1,z.width);z=z.height;for(var rt=x[0],ot=x[1],at,At,ft,pt,xt,Ct,Mt=0,Gt=Ce(),It=2;It<b;It+=2)at=x[It],At=x[It+1],ft=at-rt,rt=At-ot,ft===0&&(ft=.001),pt=rt/ft,xt=Math.atan2(rt,ft),Ct=Math.sqrt(ft*ft+rt*rt),Gt.push([ft,xt,pt,Ct]),Mt+=Ct,rt=at,ot=At;rt=x[0],ot=x[1],ft=E.measuredBounds.width,E instanceof yi&&(ft-=E.strokeWidth),1>ft&&(ft=1),b=x=ft,at=tt/2,At=at!==0,It=0,Ct=Gt[It],ft=Ct[0],xt=Ct[1],pt=Ct[2],Ct=Ct[3];for(var zt=0;.1<=Mt;){if(zt===0&&(At?(b=x,b-=at,Mt-=at,At=!1):b=x,b===0&&(b=1)),b>Mt){Oe(Gt);return}b>Ct?(zt=b-Ct,b=Ct):zt=0;var Yt=Math.sqrt(b*b/(1+pt*pt));if(0>ft&&(Yt=-Yt),rt+=Yt,ot+=pt*Yt,a.translate(rt,ot),a.rotate(xt),a.translate(-(tt/2),-(z/2)),zt===0&&E.hh(a,y),a.translate(tt/2,z/2),a.rotate(-xt),a.translate(-rt,-ot),Mt-=b,Ct-=b,zt!==0){if(It++,It===Gt.length){Oe(Gt);return}Ct=Gt[It],ft=Ct[0],xt=Ct[1],pt=Ct[2],Ct=Ct[3],b=zt}}Oe(Gt)}}Bt.hh=function(a,y){var x=this.xc,E=this.Ui;if(x!==null||E!==null){var b=this.ua;if(b!==null){a.yc();var z=this.actualBounds,tt=this.naturalBounds;E!==null&&Hr(this,a,E,!0,!1,tt,z);var rt=this.part,ot=this.ig;if(x===null||ot!==0||rt===null||!this.isPanelMain&&rt.Pb()!==this||(ot=rt.type===ze.Link&&rt instanceof Wi&&rt.category==="Selection"&&rt.adornedObject instanceof yi&&rt.adornedPart.Pb()===rt.adornedObject?rt.adornedObject.strokeWidth:0),ot===0&&(x=null),x!==null&&ot!==0&&(Hr(this,a,x,!1,!1,tt,z),a.lineWidth=ot,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),z=!1,rt&&y.Gf("drawShadows")&&(z=rt.isShadowed),a.Il===!1&&(z=!1),rt=!0,x===null||E!==null&&E!=="transparent"||(rt=!1),tt=!1,ot=this.strokeDashArray,ot!==null&&(tt=!0,a.js(ot,this.strokeDashOffset)),b.type===rn.j)a.beginPath(),a.moveTo(b.startX,b.startY),a.lineTo(b.endX,b.endY),x!==null&&a.jk(),a.Se();else if(b.type===rn.u){var at=b.startX;ot=b.startY;var At=b.endX,ft=b.endY;b=Math.min(at,At);var pt=Math.min(ot,ft);at=Math.abs(At-at),ot=Math.abs(ft-ot),a.beginPath(),a.rect(b,pt,at,ot),E!==null&&a.ng(E),x!==null&&(rt&&z&&Jl(a),a.jk(),rt&&z&&RA(a)),a.Se()}else if(b.type===rn.F)at=b.startX,ot=b.startY,At=b.endX,ft=b.endY,b=Math.abs(At-at)/2,pt=Math.abs(ft-ot)/2,at=Math.min(at,At)+b,ot=Math.min(ot,ft)+pt,a.beginPath(),a.moveTo(at,ot-pt),a.bezierCurveTo(at+re.wg*b,ot-pt,at+b,ot-re.wg*pt,at+b,ot),a.bezierCurveTo(at+b,ot+re.wg*pt,at+re.wg*b,ot+pt,at,ot+pt),a.bezierCurveTo(at-re.wg*b,ot+pt,at-b,ot+re.wg*pt,at-b,ot),a.bezierCurveTo(at-b,ot-re.wg*pt,at-re.wg*b,ot-pt,at,ot-pt),a.closePath(),E!==null&&a.ng(E),x!==null&&(rt&&z&&Jl(a),a.jk(),rt&&z&&RA(a)),a.Se();else if(b.type===rn.o)for(b=b.figures,ot=b.length,pt=0;pt<ot;pt++){at=b.s[pt],a.beginPath(),a.moveTo(at.startX,at.startY),At=at.segments.s,ft=At.length;for(var xt=null,Ct=0;Ct<ft;Ct++){var Mt=At[Ct];switch(Mt.type){case Eo:a.moveTo(Mt.endX,Mt.endY);break;case mr:a.lineTo(Mt.endX,Mt.endY);break;case ss:a.bezierCurveTo(Mt.point1X,Mt.point1Y,Mt.point2X,Mt.point2Y,Mt.endX,Mt.endY);break;case ca:a.quadraticCurveTo(Mt.point1X,Mt.point1Y,Mt.endX,Mt.endY);break;case ro:if(Mt.radiusX===Mt.radiusY){var Gt=Math.PI/180;a.arc(Mt.point1X,Mt.point1Y,Mt.radiusX,Mt.startAngle*Gt,(Mt.startAngle+Mt.sweepAngle)*Gt,0>Mt.sweepAngle,xt!==null?xt.endX:at.startX,xt!==null?xt.endY:at.startY)}else if(xt=ta(Mt,at),Gt=xt.length,Gt===0)a.lineTo(Mt.centerX,Mt.centerY);else for(var It=0;It<Gt;It++){var zt=xt[It];It===0&&a.lineTo(zt[0],zt[1]),a.bezierCurveTo(zt[2],zt[3],zt[4],zt[5],zt[6],zt[7])}break;case Ka:if(It=Gt=0,xt!==null&&xt.type===ro){if(xt=ta(xt,at),zt=xt.length,zt===0){a.lineTo(Mt.endX,Mt.endY);break}xt=xt[zt-1]||null,xt!==null&&(Gt=xt[6],It=xt[7])}else Gt=xt!==null?xt.endX:at.startX,It=xt!==null?xt.endY:at.startY;if(xt=ja(Mt,at,Gt,It),Gt=xt.length,Gt===0){a.lineTo(Mt.endX,Mt.endY);break}for(It=0;It<Gt;It++)zt=xt[It],a.bezierCurveTo(zt[2],zt[3],zt[4],zt[5],zt[6],zt[7]);break;default:pe("Segment not of valid type: "+Mt.type)}Mt.isClosed&&a.closePath(),xt=Mt}At=at.isFilled,z?at.isShadowed?(At===!0&&E!=="transparent"&&E!==null&&a.ng(E,at.isEvenOdd),x!==null&&(At&&rt&&Jl(a),a.jk(),At&&rt&&RA(a))):(Jl(a),At&&E!=="transparent"&&E!==null&&a.ng(E,at.isEvenOdd),x!==null&&a.jk(),RA(a)):(At&&E!==null&&a.ng(E,at.isEvenOdd),x!==null&&a.jk()),a.Se(pt)}if(tt&&a.fs(),this.pathPattern!==null){if(x=this.pathPattern,x.measure(1/0,1/0),E=x.measuredBounds,x.arrange(0,0,E.width,E.height),z=this.geometry,a.save(),a.beginPath(),E=Ce(),z.type===rn.j)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.endY),yc(a,y,E,x);else if(z.type===rn.o)for(z=z.figures.iterator;z.next();){for(rt=z.value,E.length=0,E.push(rt.startX),E.push(rt.startY),tt=rt.startX,b=rt.startY,ot=tt,pt=b,at=rt.segments.s,At=at.length,ft=0;ft<At;ft++){switch(Ct=at[ft],Ct.type){case Eo:yc(a,y,E,x),E.length=0,E.push(Ct.endX),E.push(Ct.endY),tt=Ct.endX,b=Ct.endY,ot=tt,pt=b;break;case mr:E.push(Ct.endX),E.push(Ct.endY),tt=Ct.endX,b=Ct.endY;break;case ss:re.Qe(tt,b,Ct.point1X,Ct.point1Y,Ct.point2X,Ct.point2Y,Ct.endX,Ct.endY,.5,E),tt=Ct.endX,b=Ct.endY;break;case ca:re.ep(tt,b,Ct.point1X,Ct.point1Y,Ct.endX,Ct.endY,.5,E),tt=Ct.endX,b=Ct.endY;break;case ro:if(Mt=ta(Ct,rt),xt=Mt.length,xt===0){E.push(Ct.centerX),E.push(Ct.centerY),tt=Ct.centerX,b=Ct.centerY;break}for(Gt=0;Gt<xt;Gt++)It=Mt[Gt],re.Qe(tt,b,It[2],It[3],It[4],It[5],It[6],It[7],.5,E),tt=It[6],b=It[7];break;case Ka:if(Mt=ja(Ct,rt,tt,b),xt=Mt.length,xt===0){E.push(Ct.endX),E.push(Ct.endY),tt=Ct.endX,b=Ct.endY;break}for(Gt=0;Gt<xt;Gt++)It=Mt[Gt],re.Qe(tt,b,It[2],It[3],It[4],It[5],It[6],It[7],.5,E),tt=It[6],b=It[7];break;default:pe("Segment not of valid type: "+Ct.type)}Ct.isClosed&&(E.push(ot),E.push(pt),yc(a,y,E,x))}yc(a,y,E,x)}else if(z.type===rn.u)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.startY),E.push(z.endX),E.push(z.endY),E.push(z.startX),E.push(z.endY),E.push(z.startX),E.push(z.startY),yc(a,y,E,x);else if(z.type===rn.F){if(b=new No,b.startX=z.endX,b.startY=(z.startY+z.endY)/2,tt=new Ki(ro),tt.startAngle=0,tt.sweepAngle=360,tt.centerX=(z.startX+z.endX)/2,tt.centerY=(z.startY+z.endY)/2,tt.radiusX=Math.abs(z.startX-z.endX)/2,tt.radiusY=Math.abs(z.startY-z.endY)/2,b.add(tt),z=ta(tt,b),rt=z.length,rt===0)E.push(tt.centerX),E.push(tt.centerY);else for(tt=b.startX,b=b.startY,ot=0;ot<rt;ot++)pt=z[ot],re.Qe(tt,b,pt[2],pt[3],pt[4],pt[5],pt[6],pt[7],.5,E),tt=pt[6],b=pt[7];yc(a,y,E,x)}Oe(E),a.restore(),a.Vc(!1)}}}},Bt.kk=function(a,y,x){return!te.prototype.kk.call(this,a,y,x)||this.xc===null&&this.Ui===null||this.ua===null||this.pathPattern!==null||this.geometry.figures.length!==this.svg.getElementsByTagName("path").length?!1:(a.Hl=this.svg,this.hh(a,y),a.Hl=null,!0)},Bt.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:te.prototype.nk.call(this,a)},Bt.Dv=function(a,y){if(a.nodeName!=="g")a.setAttributeNS(null,"filter",y);else{a=a.getElementsByTagName("path");for(var x=0;x<a.length;x++)a[x].setAttributeNS(null,"filter",y)}},Bt.ga=function(a,y){if(y===void 0&&(y=new Rt),a instanceof Vn){a.Mc()&&pe("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var x=this.naturalBounds,E=this.strokeWidth;y.h(a.x*(x.width+E)-E/2+x.x+a.offsetX,a.y*(x.height+E)-E/2+x.y+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},Bt.mi=function(a){a===void 0&&(a=new Me);var y=this.naturalBounds,x=this.oe;y=Me.allocAt(y.x,y.y,y.width,y.height);var E=this.strokeWidth;return y.Bc(E/2,E/2),E=Rt.allocAt(y.x,y.y).transform(x),a.h(E.x,E.y,0,0),E.h(y.right,y.y).transform(x),Yr(a,E.x,E.y,0,0),E.h(y.right,y.bottom).transform(x),Yr(a,E.x,E.y,0,0),E.h(y.x,y.bottom).transform(x),Yr(a,E.x,E.y,0,0),Me.free(y),Rt.free(E),a},Bt.gh=function(a,y){var x=this.geometry;if(x===null||this.fill===null&&this.stroke===null)return!1;var E=x.bounds,b=this.strokeWidth/2;x.type!==rn.j||y||(b+=2);var z=Me.alloc();if(z.assign(E),z.Bc(b+2,b+2),!z.ca(a))return Me.free(z),!1;if(E=b+1e-4,x.type===rn.j)return this.stroke===null||(E=(x.endX-x.startX)*(a.x-x.startX)+(x.endY-x.startY)*(a.y-x.startY),0>(x.startX-x.endX)*(a.x-x.endX)+(x.startY-x.endY)*(a.y-x.endY)||0>E)?!1:(Me.free(z),re.Yb(x.startX,x.startY,x.endX,x.endY,b,a.x,a.y));if(x.type===rn.u){y=x.startX;var tt=x.startY,rt=x.endX;if(x=x.endY,z.x=Math.min(y,rt),z.y=Math.min(tt,x),z.width=Math.abs(rt-y),z.height=Math.abs(x-tt),this.fill===null){if(z.Bc(-E,-E),z.ca(a))return Me.free(z),!1;z.Bc(E,E)}return this.stroke!==null&&z.Bc(b,b),a=z.ca(a),Me.free(z),a}if(x.type===rn.F){tt=x.startX,b=x.startY,rt=x.endX;var ot=x.endY;if(x=Math.min(tt,rt),y=Math.min(b,ot),tt=Math.abs(rt-tt)/2,b=Math.abs(ot-b)/2,x=a.x-(x+tt),y=a.y-(y+b),this.fill===null){if(tt-=E,b-=E,0>=tt||0>=b||1>=x*x/(tt*tt)+y*y/(b*b))return Me.free(z),!1;tt+=E,b+=E}return this.stroke!==null&&(tt+=E,b+=E),Me.free(z),0>=tt||0>=b?!1:1>=x*x/(tt*tt)+y*y/(b*b)}if(x.type===rn.o)return Me.free(z),this.fill===null?Ou(x,a.x,a.y,b):zs(x,a,b,1<this.strokeWidth,y);pe("Unknown Geometry type: "+x.type)},Bt.Wl=function(a,y,x,E){var b=this.desiredSize,z=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var tt=this.geometry.bounds;else{var rt=this.figure,ot=Rm[rt];if(ot===void 0){var at=re.Ze[rt];typeof at=="string"&&(at=re.Ze[at]),typeof at=="function"?(ot=at(null,100,100),Rm[rt]=ot):pe("Unsupported Figure: "+rt)}tt=ot.bounds}rt=tt.width,ot=tt.height,at=tt.width;var At=tt.height;switch(Ys(this,!0)){case Ge:E=x=0;break;case Ve:at=Math.max(a-z,0),At=Math.max(y-z,0);break;case In:at=Math.max(a-z,0),E=0;break;case _n:x=0,At=Math.max(y-z,0)}isFinite(b.width)&&(at=b.width),isFinite(b.height)&&(At=b.height);var ft=this.maxSize,pt=this.minSize;switch(x=Math.max(x-z,pt.width),E=Math.max(E-z,pt.height),at=Math.min(ft.width,at),At=Math.min(ft.height,At),at=isFinite(at)?Math.max(x,at):Math.max(rt,x),At=isFinite(At)?Math.max(E,At):Math.max(ot,E),x=Om(this),x){case Ge:break;case Ve:rt=at,ot=At;break;case Fn:x=Math.min(at/rt,At/ot),isFinite(x)||(x=1),rt*=x,ot*=x;break;default:pe(x+" is not a valid geometryStretch.")}this.Rd!==null?(rt===0&&(rt=.001),ot===0&&(ot=.001),x=this.Rd!==null?this.Rd:this.ua,tt=x.bounds,E=rt/tt.width,tt=ot/tt.height,isFinite(E)||(E=1),isFinite(tt)||(tt=1),this.ua=E===1&&tt===1?x:x.copy().scale(E,tt)):this.ua!==null&&re.$(this.ua.Sk,a-z)&&re.$(this.ua.Rk,y-z)||(this.ua=yi.makeGeometry(this,rt,ot)),tt=this.ua.bounds,a===1/0||y===1/0?this.Ge(tt.x-z/2,tt.y-z/2,a===0&&rt===0?0:tt.width+z,y===0&&ot===0?0:tt.height+z):this.Ge(-(z/2),-(z/2),at+z,At+z),b.w()?(at=b.width,At=b.height,at=Math.min(ft.width,at),At=Math.min(ft.height,At),at=Math.max(pt.width,at),At=Math.max(pt.height,At),this.dc.h(0,0,at,At)):this.dc.assign(tt)};function Om(a){var y=a.geometryStretch;return a.Rd!==null?y===oi?Ve:y:y===oi?Rm[a.figure].defaultStretch:y}Bt.eh=function(a,y,x,E){ks(this,a,y,x,E)},Bt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Bt.Sj=function(a,y,x,E,b){var z=this.transform,tt=1/(z.m11*z.m22-z.m12*z.m21),rt=z.m22*tt,ot=-z.m12*tt,at=-z.m21*tt,At=z.m11*tt,ft=tt*(z.m21*z.dy-z.m22*z.dx),pt=tt*(z.m12*z.dx-z.m11*z.dy);z=a*rt+y*at+ft,tt=a*ot+y*At+pt,rt=x*rt+E*at+ft,ot=x*ot+E*At+pt,ft=this.ig/2,at=this.ua,at===null&&(this.measure(1/0,1/0),at=this.ua);var xt=at.bounds;if(At=!1,at.type===rn.j)if(1.5>=this.strokeWidth)At=re.Ve(at.startX,at.startY,at.endX,at.endY,z,tt,rt,ot,b);else{if(at.startX===at.endX?(E=ft,At=0):(y=(at.endY-at.startY)/(at.endX-at.startX),At=ft/Math.sqrt(1+y*y),E=At*y),y=Ce(),a=new Rt,re.Ve(at.startX+E,at.startY+At,at.endX+E,at.endY+At,z,tt,rt,ot,a)&&y.push(a),a=new Rt,re.Ve(at.startX-E,at.startY-At,at.endX-E,at.endY-At,z,tt,rt,ot,a)&&y.push(a),a=new Rt,re.Ve(at.startX+E,at.startY+At,at.startX-E,at.startY-At,z,tt,rt,ot,a)&&y.push(a),a=new Rt,re.Ve(at.endX+E,at.endY+At,at.endX-E,at.endY-At,z,tt,rt,ot,a)&&y.push(a),rt=y.length,rt===0)return Oe(y),!1;for(At=!0,ot=1/0,E=0;E<rt;E++)a=y[E],x=(a.x-z)*(a.x-z)+(a.y-tt)*(a.y-tt),x<ot&&(ot=x,b.x=a.x,b.y=a.y);Oe(y)}else if(at.type===rn.u)At=re.Ff(xt.x-ft,xt.y-ft,xt.x+xt.width+ft,xt.y+xt.height+ft,z,tt,rt,ot,b);else if(at.type===rn.F){y=Me.allocAt(xt.x,xt.y,xt.width,xt.height).Bc(ft,ft);t:if(y.width===0)At=re.Ve(y.x,y.y,y.x,y.y+y.height,z,tt,rt,ot,b);else if(y.height===0)At=re.Ve(y.x,y.y,y.x+y.width,y.y,z,tt,rt,ot,b);else{if(a=y.width/2,at=y.height/2,E=y.x+a,At=y.y+at,x=9999,z!==rt&&(x=(tt-ot)/(z-rt)),9999>Math.abs(x)){if(ot=tt-At-x*(z-E),0>a*a*x*x+at*at-ot*ot){b.x=NaN,b.y=NaN,At=!1;break t}ft=Math.sqrt(a*a*x*x+at*at-ot*ot),rt=(-(a*a*x*ot)+a*at*ft)/(at*at+a*a*x*x)+E,a=(-(a*a*x*ot)-a*at*ft)/(at*at+a*a*x*x)+E,at=x*(rt-E)+ot+At,ot=x*(a-E)+ot+At,Math.abs((z-rt)*(z-rt))+Math.abs((tt-at)*(tt-at))<Math.abs((z-a)*(z-a))+Math.abs((tt-ot)*(tt-ot))?(b.x=rt,b.y=at):(b.x=a,b.y=ot)}else{if(rt=at*at,ot=z-E,rt-=rt/(a*a)*ot*ot,0>rt){b.x=NaN,b.y=NaN,At=!1;break t}ot=Math.sqrt(rt),rt=At+ot,ot=At-ot,Math.abs(rt-tt)<Math.abs(ot-tt)?(b.x=z,b.y=rt):(b.x=z,b.y=ot)}At=!0}Me.free(y)}else if(at.type===rn.o){pt=Rt.alloc();var Ct=rt-z,Mt=ot-tt,Gt=Ct*Ct+Mt*Mt,It=z,zt=tt;if(0<Gt&&xt.contains(It,zt)&&(pt.x=It,pt.y=zt,this.ca(pt)))for(Ct!==0&&.5>Math.abs(Ct)?(Mt*=.5/Ct,Ct=.5):Mt!==0&&.5>Math.abs(Mt)&&(Ct*=.5/Mt,Mt=.5),It-=Ct,zt-=Mt;xt.contains(It,zt);)It-=Ct,zt-=Mt;for(b.x=rt,b.y=ot,Mt=0;Mt<at.figures.count;Mt++){var Yt=at.figures.s[Mt],Xt=Yt.isFilled?It:z,$t=Yt.isFilled?zt:tt,de=Yt.segments;xt=Yt.startX,Ct=Yt.startY;for(var An=xt,Bn=Ct,vn=0;vn<de.count;vn++){var $e=de.s[vn],Re=$e.type,ai=$e.endX,ei=$e.endY,Zi=!1;switch(Re){case Eo:An=ai,Bn=ei;break;case mr:Zi=A0(xt,Ct,ai,ei,Xt,$t,rt,ot,pt);break;case ss:Zi=re.Eo(xt,Ct,$e.point1X,$e.point1Y,$e.point2X,$e.point2Y,ai,ei,Xt,$t,rt,ot,.6,pt);break;case ca:Zi=re.Eo(xt,Ct,xt+2/3*($e.point1X-xt),Ct+2/3*($e.point1Y-Ct),ai+2/3*($e.point1X-ai),ei+2/3*($e.point1Y-ei),ai,ei,Xt,$t,rt,ot,.6,pt);break;case ro:case Ka:Re=$e.type===ro?ta($e,Yt):ja($e,Yt,xt,Ct);var vr=Re.length;if(vr===0){Zi=A0(xt,Ct,$e.type===ro?$e.centerX:$e.endX,$e.type===ro?$e.centerY:$e.endY,Xt,$t,rt,ot,pt);break}for(ei=null,ai=0;ai<vr;ai++){if(ei=Re[ai],ai===0&&A0(xt,Ct,ei[0],ei[1],Xt,$t,rt,ot,pt)){var Jo=l0(Xt,$t,pt,Gt,b);Jo<Gt&&(Gt=Jo,At=!0)}re.Eo(ei[0],ei[1],ei[2],ei[3],ei[4],ei[5],ei[6],ei[7],Xt,$t,rt,ot,.6,pt)&&(Jo=l0(Xt,$t,pt,Gt,b),Jo<Gt&&(Gt=Jo,At=!0))}ai=ei[6],ei=ei[7];break;default:pe("Unknown Segment type: "+Re)}xt=ai,Ct=ei,Zi&&(Zi=l0(Xt,$t,pt,Gt,b),Zi<Gt&&(Gt=Zi,At=!0)),$e.isClosed&&(ai=An,ei=Bn,A0(xt,Ct,ai,ei,Xt,$t,rt,ot,pt)&&($e=l0(Xt,$t,pt,Gt,b),$e<Gt&&(Gt=$e,At=!0)))}}z=x-a,tt=E-y,rt=Math.sqrt(z*z+tt*tt),rt!==0&&(z/=rt,tt/=rt),b.x-=z*ft,b.y-=tt*ft,Rt.free(pt)}else pe("Unknown Geometry type: "+at.type);return At?(this.transform.Ga(b),!0):!1};function l0(a,y,x,E,b){return a=x.x-a,y=x.y-y,y=a*a+y*y,y<E?(b.x=x.x,b.y=x.y,y):E}function A0(a,y,x,E,b,z,tt,rt,ot){if(re.$(a,x)&&re.$(y,E)||re.$(b,tt)&&re.$(z,rt))return!1;var at=!1,At=(b-tt)*(y-E)-(z-rt)*(a-x);return At===0?!1:(ot.x=((b*rt-z*tt)*(a-x)-(b-tt)*(a*E-y*x))/At,ot.y=((b*rt-z*tt)*(y-E)-(z-rt)*(a*E-y*x))/At,(a>x?a-x:x-a)<(y>E?y-E:E-y)?(a=y<E?y:E,y=y<E?E:y,(ot.y>a||re.$(ot.y,a))&&(ot.y<y||re.$(ot.y,y))&&(at=!0)):(y=a<x?a:x,a=a<x?x:a,(ot.x>y||re.$(ot.x,y))&&(ot.x<a||re.$(ot.x,a))&&(at=!0)),at)}Bt.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.ua;x===null&&(this.measure(1/0,1/0),x=this.ua),x=x.bounds;var E=this.strokeWidth/2,b=!1,z=Rt.alloc();return z.h(x.x-E,x.y-E),a.ca(y.Ga(z))&&(z.h(x.x-E,x.bottom+E),a.ca(y.Ga(z))&&(z.h(x.right+E,x.bottom+E),a.ca(y.Ga(z))&&(z.h(x.right+E,x.y-E),a.ca(y.Ga(z))&&(b=!0)))),Rt.free(z),b},Bt.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=Li.alloc();x.set(y),x.Vj();var E=a.left,b=a.right,z=a.top;a=a.bottom;var tt=Rt.alloc();if(tt.h(E,z),x.Ga(tt),this.gh(tt,!0)||(tt.h(b,z),x.Ga(tt),this.gh(tt,!0))||(tt.h(E,a),x.Ga(tt),this.gh(tt,!0))||(tt.h(b,a),x.Ga(tt),this.gh(tt,!0)))return Rt.free(tt),!0;var rt=Rt.alloc(),ot=Rt.alloc();return x.set(y),x.bv(this.transform),x.Vj(),rt.x=b,rt.y=z,rt.transform(x),tt.x=E,tt.y=z,tt.transform(x),y=!1,Kf(this,tt,rt,ot)?y=!0:(tt.x=b,tt.y=a,tt.transform(x),Kf(this,tt,rt,ot)?y=!0:(rt.x=E,rt.y=a,rt.transform(x),Kf(this,tt,rt,ot)?y=!0:(tt.x=E,tt.y=z,tt.transform(x),Kf(this,tt,rt,ot)&&(y=!0)))),Rt.free(tt),Li.free(x),Rt.free(rt),Rt.free(ot),y};function Kf(a,y,x,E){if(!a.rs(y,x,E))return!1;a=y.x,y=y.y;var b=x.x,z=x.y;return x=E.x,E=E.y,a===b?(y<z?(a=y,y=z):a=z,E>=a&&E<=y):(a<b?(E=a,a=b):E=b,x>=E&&x<=a)}Bt.tx=function(a,y,x){function E(Gt,It){for(var zt=Gt.length,Yt=0;Yt<zt;Yt+=2)if(It.zd(Gt[Yt],Gt[Yt+1])>b)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var b=a.Bf(y),z=b;if(1.5<this.strokeWidth&&(b=this.strokeWidth/2+Math.sqrt(b),b*=b),y=this.ua,y===null&&(this.measure(1/0,1/0),y=this.ua,y===null))return!1;if(!x){var tt=y.bounds,rt=tt.x,ot=tt.y,at=tt.x+tt.width;if(tt=tt.y+tt.height,Ui(a.x,a.y,rt,ot)<=b&&Ui(a.x,a.y,at,ot)<=b&&Ui(a.x,a.y,rt,tt)<=b&&Ui(a.x,a.y,at,tt)<=b)return!0}if(rt=y.startX,ot=y.startY,at=y.endX,tt=y.endY,y.type===rn.j){if(x=(rt-at)*(a.x-at)+(ot-tt)*(a.y-tt),To(a.x,a.y,rt,ot,at,tt)<=(0<=(at-rt)*(a.x-rt)+(tt-ot)*(a.y-ot)&&0<=x?b:z))return!0}else{if(y.type===rn.u)return y=!1,x&&(y=To(a.x,a.y,rt,ot,rt,tt)<=b||To(a.x,a.y,rt,ot,at,ot)<=b||To(a.x,a.y,at,ot,at,tt)<=b||To(a.x,a.y,rt,tt,at,tt)<=b),y;if(y.type===rn.F){y=a.x-(rt+at)/2,z=a.y-(ot+tt)/2;var At=Math.abs(at-rt)/2,ft=Math.abs(tt-ot)/2;if(At===0||ft===0)return To(a.x,a.y,rt,ot,at,tt)<=b;if(x){if(a=re.$y(At,ft,y,z),a*a<=b)return!0}else return!(Ui(y,z,-At,0)>=b||Ui(y,z,0,-ft)>=b||Ui(y,z,0,ft)>=b||Ui(y,z,At,0)>=b)}else if(y.type===rn.o){if(at=y.bounds,z=at.x,rt=at.y,ot=at.x+at.width,at=at.y+at.height,a.x>ot&&a.x<z&&a.y>at&&a.y<rt&&To(a.x,a.y,z,rt,z,at)>b&&To(a.x,a.y,z,rt,ot,rt)>b&&To(a.x,a.y,ot,at,z,at)>b&&To(a.x,a.y,ot,at,ot,rt)>b)return!1;if(z=Math.sqrt(b),x){if(this.fill===null?Ou(y,a.x,a.y,z):zs(y,a,z,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(z=x.s[y],tt=z.startX,At=z.startY,a.zd(tt,At)>b)return!1;for(rt=z.segments.s,ot=rt.length,at=0;at<ot;at++)switch(ft=rt[at],ft.type){case Eo:case mr:if(tt=ft.endX,At=ft.endY,a.zd(tt,At)>b)return!1;break;case ss:var pt=Ce();if(re.Qe(tt,At,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.8,pt),tt=E(pt,a),Oe(pt),tt||(tt=ft.endX,At=ft.endY,a.zd(tt,At)>b))return!1;break;case ca:if(pt=Ce(),re.ep(tt,At,ft.point1X,ft.point1Y,ft.endX,ft.endY,.8,pt),tt=E(pt,a),Oe(pt),tt||(tt=ft.endX,At=ft.endY,a.zd(tt,At)>b))return!1;break;case ro:case Ka:pt=ft.type===ro?ta(ft,z):ja(ft,z,tt,At);var xt=pt.length;if(xt===0){if(tt=ft.type===ro?ft.centerX:ft.endX,At=ft.type===ro?ft.centerY:ft.endY,a.zd(tt,At)>b)return!1;break}ft=null;for(var Ct=Ce(),Mt=0;Mt<xt;Mt++)if(ft=pt[Mt],Ct.length=0,re.Qe(ft[0],ft[1],ft[2],ft[3],ft[4],ft[5],ft[6],ft[7],.8,Ct),E(Ct,a))return Oe(Ct),!1;Oe(Ct),ft!==null&&(tt=ft[6],At=ft[7]);break;default:pe("Unknown Segment type: "+ft.type)}}return!0}}}return!1},Bt.qc=function(){this.ua=null},Bt.kq=function(){return this.ig};function my(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=cp,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=jo):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new Vn(1-jo.x,jo.y)))}yi.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var E=Fu[a.toArrow];else a.fromArrow!=="None"?E=Fu[a.fromArrow]:(E=re.Ze[a.figure],typeof E=="string"&&(E=re.Ze[E]),E===void 0&&pe("Unknown Shape.figure: "+a.figure),E=E(a,y,x),E.Sk=y,E.Rk=x);if(E===null){var b=re.Ze.Rectangle;typeof b=="function"&&(E=b(a,y,x))}return E};function vy(a){var y=Fu[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=Fu[x],y===void 0){var E=null,b;for(b in re.um)if(b.toLowerCase()===x){E=b;break}if(E!==null)return a=rn.parse(re.um[E],!1),Fu[E]=a,x!==E&&(Fu[x]=E),E}}return typeof y=="string"?y:y instanceof rn?a:null}Ie.Object.defineProperties(yi.prototype,{geometry:{get:function(){return this.ua!==null?this.ua:this.Rd},set:function(a){var y=this.ua,x=this.Rd;if(y!==a){a!==null?this.Rd=this.ua=a.freeze():this.Rd=this.ua=null;var E=this.part;E!==null&&(E.ag=NaN),this.v(),this.g("geometry",y||x,a),as(this)&&(a=this.part,a!==null&&Cr(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=rn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=Rt.allocAt(-y.x,-y.y),Rt.free(a)}},isGeometryPositioned:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.v(),this.g("isGeometryPositioned",y,a))}},fill:{get:function(){return this.Ui},set:function(a){var y=this.Ui;y!==a&&(a!==null&&St(a,"Shape.fill"),a instanceof nr&&a.freeze(),this.Ui=a,this.N(),this.g("fill",y,a))}},stroke:{get:function(){return this.xc},set:function(a){var y=this.xc;y!==a&&(a!==null&&St(a,"Shape.stroke"),a instanceof nr&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},strokeWidth:{get:function(){return this.ig},set:function(a){var y=this.ig;if(y!==a)if(0<=a){this.ig=a,this.v();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeWidth",y,a)}else pi(a,"value >= 0",yi,"strokeWidth:value")}},strokeCap:{get:function(){return this.Na!==null?this.Na.Hr:"butt"},set:function(a){var y=this.strokeCap;y!==a&&(typeof a!="string"||a!=="butt"&&a!=="round"&&a!=="square"?pi(a,'"butt", "round", or "square"',yi,"strokeCap"):(jf(this),this.Na.Hr=a,this.N(),this.g("strokeCap",y,a)))}},strokeJoin:{get:function(){return this.Na!==null?this.Na.Ir:"miter"},set:function(a){var y=this.strokeJoin;y!==a&&(typeof a!="string"||a!=="miter"&&a!=="bevel"&&a!=="round"?pi(a,'"miter", "bevel", or "round"',yi,"strokeJoin"):(jf(this),this.Na.Ir=a,this.N(),this.g("strokeJoin",y,a)))}},strokeMiterLimit:{get:function(){return this.Na!==null?this.Na.Jr:10},set:function(a){var y=this.strokeMiterLimit;if(y!==a&&1<=a){jf(this),this.Na.Jr=a,this.N();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeMiterLimit",y,a)}}},strokeDashArray:{get:function(){return this.Yg},set:function(a){var y=this.Yg;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];0<=z&&isFinite(z)||pe("strokeDashArray:value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.Yg=a,this.N(),this.g("strokeDashArray",y,a)}}},strokeDashOffset:{get:function(){return this.Na!==null?this.Na.uj:0},set:function(a){var y=this.strokeDashOffset;y!==a&&0<=a&&(jf(this),this.Na.uj=a,this.N(),this.g("strokeDashOffset",y,a))}},figure:{get:function(){return this.an},set:function(a){var y=this.an;if(y!==a){var x=re.Ze[a];typeof x=="function"?x=a:(x=re.Ze[a.toLowerCase()])||pe("Unknown Shape.figure: "+a),y!==x&&(a=this.part,a!==null&&(a.ag=NaN),this.an=x,this.Rd=null,this.qc(),this.v(),this.g("figure",y,x))}}},toArrow:{get:function(){return this.Ua!==null?this.Ua.V:"None"},set:function(a){var y=this.toArrow;if(a===!0?a="Standard":a===!1&&(a=""),y!==a){var x=vy(a);x===null?pe("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new ih),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),my(this),this.g("toArrow",y,x))}}},fromArrow:{get:function(){return this.Ua!==null?this.Ua.j:"None"},set:function(a){var y=this.fromArrow;if(a===!0?a="Standard":a===!1&&(a=""),y!==a){var x=vy(a);x===null?pe("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new ih),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),my(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:Xo},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),jf(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:Xo},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),jf(this),this.Na.gg=a,this.v(),this.g("spot2",y,a))}},parameter1:{get:function(){return this.Un},set:function(a){var y=this.Un;y!==a&&(this.Un=a,this.qc(),this.v(),this.g("parameter1",y,a))}},parameter2:{get:function(){return this.Vn},set:function(a){var y=this.Vn;y!==a&&(this.Vn=a,this.qc(),this.v(),this.g("parameter2",y,a))}},naturalBounds:{get:function(){return this.dc}},pathPattern:{get:function(){return this.Na!==null?this.Na.br:null},set:function(a){var y=this.pathPattern;y!==a&&(jf(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:oi},set:function(a){var y=this.geometryStretch;y!==a&&(jf(this),this.Na.jq=a,this.v(),this.g("geometryStretch",y,a))}},interval:{get:function(){return this.fa!==null?this.fa.Tk:1},set:function(a){var y=this.interval;if(a=Math.round(a),y!==a&&a!==0&&isFinite(a)){this.fa===null&&(this.fa=new Lu),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&Xl(x),this.v(),x=this.panel,x!==null&&(x.graduatedIntervals=null),this.g("interval",y,a)}}},graduatedStart:{get:function(){return this.fa!==null?this.fa.u:0},set:function(a){var y=this.graduatedStart;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new Lu),this.fa.u=a,this.v(),this.g("graduatedStart",y,a))}},graduatedEnd:{get:function(){return this.fa!==null?this.fa.j:1},set:function(a){var y=this.graduatedEnd;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new Lu),this.fa.j=a,this.v(),this.g("graduatedEnd",y,a))}},graduatedSkip:{get:function(){return this.fa!==null?this.fa.o:null},set:function(a){var y=this.graduatedSkip;y!==a&&(this.fa===null&&(this.fa=new Lu),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),yi.prototype.intersectsRect=yi.prototype.Yc,yi.prototype.containedInRect=yi.prototype.fh,yi.prototype.getNearestIntersectionPoint=yi.prototype.rs,yi.prototype.getDocumentBounds=yi.prototype.mi,yi.prototype.getDocumentPoint=yi.prototype.ga;var Fu=new Yn,Rm=new Yn;yi.className="Shape",yi.getFigureGenerators=function(){var a=new Rn,y;for(y in re.Ze)y!==y.toLowerCase()&&a.add(y,re.Ze[y]);return a.freeze(),a},yi.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),E=re.Ze;E[a]=y,E[x]=a},yi.getArrowheadGeometries=function(){var a=new Rn;for(E in re.um)if(Fu[E]===void 0){var y=rn.parse(re.um[E],!1);Fu[E]=y,y=E.toLowerCase(),y!==E&&(Fu[y]=E)}for(var x in Fu)if(x!==x.toLowerCase()){var E=Fu[x];E instanceof rn&&a.add(x,E)}return a.freeze(),a},yi.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=rn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||pe("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var E=Fu;E[a]=x,E[y]=a};function Gm(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=oi,this.gg=this.fg=Xo}Gm.prototype.copy=function(){var a=new Gm;return a.Hr=this.Hr,a.Ir=this.Ir,a.Jr=this.Jr,a.uj=this.uj,a.br=this.br,a.jq=this.jq,a.fg=this.fg.J(),a.gg=this.gg.J(),a};function Sr(a,y){return te.call(this),d0||(wa=jr?new al(null).context:null,d0=!0),this.l|=2097152,this.ec="",this.xc="black",this.Ae="13px sans-serif",this.Lq=this.Cb=this.Gc=0,this.da=this.fa=this.Gm=null,this.Ih=0,this.df=null,this.Le=0,this.ze=this.Qb=this.Qc=null,typeof a=="string"?this.text=a:a&&Object.assign(this,a),y&&Object.assign(this,y),this}ue(Sr,te),Sr.prototype.cloneProtected=function(a){te.prototype.cloneProtected.call(this,a),a.ec=this.ec,a.xc=this.xc,a.Ae=this.Ae,a.Gc=this.Gc,a.Cb=this.Cb,a.Lq=this.Lq,a.Gm=this.Gm,this.fa!==null&&(a.fa=this.fa.copy()),this.da!==null&&(a.da=this.da.nc?this.da:this.da.copy()),a.Ih=this.Ih,a.df=this.df,a.Le=this.Le,a.Qc=this.Qc,a.Qb=this.Qb,a.ze=this.ze};function VA(a){a.da===null?a.da=new Ym:a.da.nc&&(a.da=a.da.copy())}Bt=Sr.prototype,Bt.th=function(){te.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function yy(a,y){a.l=y.l|6144,a.pb=y.opacity,a.Ma=y.background,a.areaBackground=y.areaBackground,a.jd=y.desiredSize.J(),a.minSize=y.minSize.J(),a.maxSize=y.maxSize.J(),y.Lb!==null?a.Lb=y.Lb.copy():a.Lb=null,a.Ca=y.scale,a.Kb=y.angle,a.stretch=y.stretch,a.Kg=y.margin.J(),a.Jb=y.alignment.J(),a.sk=y.alignmentFocus.J(),a.segmentFraction=y.segmentFraction,a.segmentOffset=y.segmentOffset.J(),a.segmentOrientation=y.segmentOrientation,y.tb!==null&&(a.tb=y.tb.copy()),a.shadowVisible=y.shadowVisible,a.ec=y.ec,a.xc=y.xc,a.Ae=y.Ae,a.fa!==null&&(a.fa=y.fa.copy()),y.da!==null&&(a.da=y.da.nc?y.da:y.da.copy()),a.Ih=y.Ih}Bt.qb=function(a){a.classType===Sr?this.wrap=a:te.prototype.qb.call(this,a)},Bt.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},Bt.v=function(){te.prototype.v.call(this)},Bt.hh=function(a,y){if(this.xc!==null&&this.ec.length!==0&&this.Ae!==null){var x=this.naturalBounds,E=this.actualBounds,b=x.width,z=x.height,tt=lp(this),rt=a.textAlign=this.textAlign,ot=y.tn;rt==="start"?rt=ot?"right":"left":rt==="end"&&(rt=ot?"left":"right"),ot=this.isUnderline;var at=this.isStrikethrough;Hr(this,a,this.xc,!0,!1,x,E),(ot||at)&&Hr(this,a,this.xc,!1,!1,x,E),E=0,x=!1;var At=this.oe,ft=At.dx-(tt*At.m21+At.dx);At=At.dy-(tt*At.m22+At.dy);var pt=y.scale;switch(8>(ft*ft+At*At)*pt*pt&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof ia&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,ft=this.spacingBelow,this.flip){case Di:a.translate(b,0),a.scale(-1,1);break;case Bi:a.translate(0,z),a.scale(1,-1);break;case ar:a.translate(b,z),a.scale(-1,-1)}if(a.yc(),At=this.Gc,pt=(y+tt+ft)*At,z>pt&&(E=this.verticalAlignment,E=E.y*z-E.y*pt+E.offsetY),At===1&&this.ze!==null)ft=this.Cb,ft>b&&(ft=b),this.Oj(this.ze,a,0,E+y,b,tt,ft,x,rt,ot,at);else if(this.Qc!==null&&this.Qb!==null)for(pt=0;pt<At;pt++){var xt=this.Qc[pt];xt>b&&(xt=b),E+=y,this.Oj(this.Qb[pt],a,0,E,b,tt,xt,x,rt,ot,at),E+=tt+ft}switch(this.flip){case Di:a.scale(-1,1),a.translate(-b,0);break;case Bi:a.scale(1,-1),a.translate(0,-z);break;case ar:a.scale(-1,-1),a.translate(-b,-z)}}},Bt.Oj=function(a,y,x,E,b,z,tt,rt,ot,at,At){var ft=0;if(rt)ot==="left"?ft=0:ot==="right"?ft=b-tt:ot==="center"&&(ft=(b-tt)/2),y.fillRect(x+ft,E+.25*z,tt,1);else{if(ot==="left"?ft=0:ot==="right"?ft=b:ot==="center"&&(ft=b/2),b=u0!==null?u0(this,z):.75*z,y.fillText(a,x+ft,E+b),a=z/20|0,a===0&&(a=1),ot==="right"?ft-=tt:ot==="center"&&(ft-=tt/2),at){rt=h0!==null?h0(this,z):.8*z,ot=x+ft,at=E+rt,b=x+ft+tt,rt=E+rt;var pt=a;y.beginPath(),y.lineWidth=pt,y.moveTo(ot,at),y.lineTo(b,rt),y.stroke(),y.Se(),y instanceof ia&&y.ad.classList.add("gojs-td")}At&&(At=E+z-z/2.2|0,a%2!==0&&(At+=.5),E=x+ft,z=At,x=x+ft+tt,tt=At,ft=a,y.beginPath(),y.lineWidth=ft,y.moveTo(E,z),y.lineTo(x,tt),y.stroke(),y.Se(),y instanceof ia&&y.ad.classList.add("gojs-td"))}},Bt.kk=function(a,y,x){if(!te.prototype.kk.call(this,a,y,x))return!1;if(Hr(this,a,this.xc,!0,!1,this.naturalBounds,this.actualBounds),x){if(this.svg.getElementsByTagName("text").length===0)return!0;for(y=this.svg.getElementsByClassName("gojs-td"),x=0;x<y.length;x++)Td(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,Td(a,y,!0);return!0},Bt.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:te.prototype.nk.call(this,a)},Bt.Dv=function(a,y){if(a.nodeName!=="g")a.setAttributeNS(null,"filter",y);else{a=a.getElementsByTagName("text");for(var x=0;x<a.length;x++)a[x].setAttributeNS(null,"filter",y)}},Bt.Wl=function(a,y,x,E){var b=this.Gc;this.Ih=a,this.l&=-16777217;var z=this.Ae;wa!==null&&Fy!==z&&(Fy=wa.font=z),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var tt;if(isNaN(this.desiredSize.width)){if(z=this.ec.replace(/\r\n/g,`
`).replace(/\r/g,`
`),z.length===0)z=8;else if(this.isMultiline){for(var rt=tt=0,ot=!1;!ot;){var at=z.indexOf(`
`,rt);at===-1&&(at=z.length,ot=!0),rt=z.substr(rt,at-rt),this.formatting===Ap&&(rt=rt.trim()),tt=Math.max(tt,tA(rt)),rt=at+1}z=tt}else tt=z.indexOf(`
`,0),0<=tt&&(z=z.substr(0,tt)),z=tA(z);z=Math.min(z,a/this.scale)}else z=this.desiredSize.width;if(this.panel!==null&&(z=Math.min(z,this.panel.maxSize.width)),tt=Sy(this,z),isNaN(this.desiredSize.height)?tt=Math.min(tt,y/this.scale):tt=this.desiredSize.height,ot=tt,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===g0&&(y=this.Ae,y=this.overflow===g0?wy(y):0,at=this.spacingAbove+this.spacingBelow,at=Math.max(0,lp(this)+at),ot=Math.min(this.maxLines-1,Math.max(Math.floor(ot/at+.01)-1,0)),!(ot+1>=this.Qb.length))){for(this.l|=16777216,at=this.Qb[ot],y=Math.max(1,a-y);tA(at)>y&&1<at.length;)at=at.substr(0,at.length-1);at+=up,y=tA(at),this.Qb[ot]=at,this.Qb=this.Qb.slice(0,ot+1),this.Qc[ot]=y,this.Qc=this.Qc.slice(0,ot+1),this.Le=this.Qb.length,this.Cb=Math.max(this.Cb,y),this.Gc=this.Le,this.Gc===1&&(this.ze=this.Qb[0])}(this.wrap===xy||isNaN(this.desiredSize.width))&&(z=isNaN(a)?this.Cb:Math.min(a,this.Cb)),z=Math.max(x,z),tt=Math.max(E,tt),fa(this.dc,z,tt),this.Ge(0,0,z,tt),this.svg!==null&&b!==this.Gc&&(this.Uc=!0)},Bt.eh=function(a,y,x,E){ks(this,a,y,x,E)};function ap(a,y,x){a.ze===null?(a.ze=y,a.Cb=x):((a.Qb===null||a.Qc===null)&&(a.Qb=[],a.Qc=[],a.Qb.push(a.ze),a.Qc.push(a.Cb)),a.Qb.push(y),a.Qc.push(x),a.Qb.length>a.maxLines&&(a.l|=16777216))}function jm(a,y,x,E){var b=a.formatting===Ap;b&&(y=y.trim());var z=0,tt=a.Ae,rt=a.spacingAbove+a.spacingBelow;rt=Math.max(0,lp(a)+rt);var ot=a.overflow===g0?wy(tt):0;if(a.Gc>=a.maxLines)E!==null&&E.h(0,rt);else if(tt=y,a.wrap===Km){a.Le=1;var at=tA(y);if(ot===0||at<=x)a.Cb=Math.max(a.Cb,at),ap(a,y,a.Cb),E!==null&&E.h(at,rt);else{for(z=wc(a,tt),tt=tt.substr(z.length),y=wc(a,tt),at=tA(z+y);0<y.length&&at<=x;)z+=y,tt=tt.substr(y.length),y=wc(a,tt),at=z+y,b&&(at=at.trim()),at=tA(at);for(b&&(y=y.trim()),z+=y,x=Math.max(1,x-ot);tA(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=up;var At=tA(z);a.Cb=At,ap(a,z,At),E!==null&&E.h(At,rt)}}else{for(ot=0,tt.length===0&&(ot=1,ap(a,tt,0));0<tt.length;){for(y=wc(a,tt),tt=tt.substr(y.length);tA(y)>x;){var ft=1;for(at=tA(y.substr(0,ft)),At=0;at<=x;)ft++,At=at,at=tA(y.substr(0,ft));if(ft===1){var pt=at;z=Math.max(z,at)}else pt=At,z=Math.max(z,At);if(ft--,1>ft&&(ft=1),ap(a,y.substr(0,ft),pt),ot++,y=y.substr(ft),a.Gc+ot>a.maxLines)break}for(At=wc(a,tt),at=tA(y+At);0<At.length&&at<=x;)y+=At,tt=tt.substr(At.length),At=wc(a,tt),at=y+At,b&&(at=at.trim()),at=tA(at);if(b&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),At.length===0?(ft=at,z=Math.max(z,at)):(ft=At=tA(y),z=Math.max(z,At)),ap(a,y,ft),ot++,a.Gc+ot>a.maxLines))break}a.Le=Math.min(a.maxLines,ot),a.Cb=Math.max(a.Cb,z),E!==null&&E.h(a.Cb,rt*a.Le)}}function wc(a,y){if(a.wrap===By)return y.substr(0,1);for(var x=y.length,E=0,b=y1;E<x&&!b.test(y.charAt(E));)E++;for(a.formatting===Cy&&(x=Math.min(x,E+1));E<x&&b.test(y.charAt(E));)E++;return E>=y.length?y:y.substr(0,E)}function tA(a){return wa===null?8*a.length:wa.measureText(a).width}function lp(a){if(a.df!==null)return a.df;var y=a.Ae;if(wa===null){var x=16;return a.df=x}return Wm[y]!==void 0&&5e3>Py?x=Wm[y]:(x=1.3*wa.measureText("M").width,Wm[y]=x,Py++),a.df=x}function wy(a){if(wa===null)return 6;if(f0[a]!==void 0&&5e3>_m)var y=f0[a];else y=wa.measureText(up).width,f0[a]=y,_m++;return y}function Sy(a,y){var x=a.ec.replace(/\r\n/g,`
`).replace(/\r/g,`
`),E=a.spacingAbove+a.spacingBelow;if(E=Math.max(0,lp(a)+E),x.length===0)return a.Cb=0,a.Gc=1,E;if(!a.isMultiline){var b=x.indexOf(`
`,0);0<=b&&(x=x.substr(0,b))}b=0;for(var z=a.Gc=0,tt,rt=!1;!rt;){if(tt=x.indexOf(`
`,z),tt===-1&&(tt=x.length,rt=!0),z<=tt){if(z=x.substr(z,tt-z),a.wrap!==Km){a.Le=0;var ot=an.alloc();jm(a,z,y,ot),b+=ot.height,an.free(ot),a.Gc+=a.Le}else jm(a,z,y,null),b+=E,a.Gc++;a.Gc===a.maxLines&&(rt=!0)}z=tt+1}return a.Lq=b}Ie.Object.defineProperties(Sr.prototype,{font:{get:function(){return this.Ae},set:function(a){var y=this.Ae;y!==a&&(this.Ae=a,this.df=null,this.v(),this.g("font",y,a))}},text:{get:function(){return this.ec},set:function(a){var y=this.ec;a!=null?a=a.toString():a="",y!==a&&(this.ec=a,this.v(),this.g("text",y,a),this.Uc=!0)}},textAlign:{get:function(){return this.da!==null?this.da.Or:"start"},set:function(a){var y=this.textAlign;y===a||a!=="start"&&a!=="end"&&a!=="left"&&a!=="right"&&a!=="center"||(VA(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:Ge},set:function(a){var y=this.flip;y!==a&&(VA(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:La},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),VA(this),this.da.Yr=a,Po(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=an.alloc();jm(this,this.ec,999999,a);var y=a.width;an.free(a),a=Sy(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),fa(this.dc,y,a)}return this.dc}},isMultiline:{get:function(){return(this.l&2097152)!==0},set:function(a){var y=(this.l&2097152)!==0;y!==a&&(this.l^=2097152,this.v(),this.g("isMultiline",y,a))}},isUnderline:{get:function(){return(this.l&4194304)!==0},set:function(a){var y=(this.l&4194304)!==0;y!==a&&(this.l^=4194304,this.Uc=!0,this.N(),this.g("isUnderline",y,a))}},isStrikethrough:{get:function(){return(this.l&8388608)!==0},set:function(a){var y=(this.l&8388608)!==0;y!==a&&(this.l^=8388608,this.Uc=!0,this.N(),this.g("isStrikethrough",y,a))}},wrap:{get:function(){return this.da!==null?this.da.$r:zm},set:function(a){var y=this.wrap;y!==a&&(VA(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:Vm},set:function(a){var y=this.overflow;y!==a&&(VA(this),this.da.$q=a,this.v(),this.g("overflow",y,a))}},isOverflowed:{get:function(){return(this.l&16777216)!==0}},stroke:{get:function(){return this.xc},set:function(a){var y=this.xc;y!==a&&(a!==null&&St(a,"TextBlock.stroke"),a instanceof nr&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return lp(this)}},editable:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.g("editable",y,a))}},textEditor:{get:function(){return this.da!==null?this.da.Qr:null},set:function(a){var y=this.textEditor;y!==a&&(VA(this),this.da.Qr=a,this.g("textEditor",y,a))}},errorFunction:{get:function(){return this.da!==null?this.da.Hd:null},set:function(a){var y=this.errorFunction;y!==a&&(VA(this),this.da.Hd=a,this.g("errorFunction",y,a))}},interval:{get:function(){return this.fa!==null?this.fa.Tk:1},set:function(a){var y=this.interval;if(a=Math.round(a),y!==a&&a!==0&&isFinite(a)){this.fa===null&&(this.fa=new Lu),this.fa.Tk=a,this.v();var x=this.panel;x!==null&&(x.graduatedIntervals=null),this.g("interval",y,a)}}},graduatedStart:{get:function(){return this.fa!==null?this.fa.u:0},set:function(a){var y=this.graduatedStart;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new Lu),this.fa.u=a,this.v(),this.g("graduatedStart",y,a))}},graduatedEnd:{get:function(){return this.fa!==null?this.fa.j:1},set:function(a){var y=this.graduatedEnd;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new Lu),this.fa.j=a,this.v(),this.g("graduatedEnd",y,a))}},graduatedFunction:{get:function(){return this.fa!==null?this.fa.F:null},set:function(a){var y=this.graduatedFunction;y!==a&&(this.fa===null&&(this.fa=new Lu),this.fa.F=a,this.v(),this.g("graduatedFunction",y,a))}},graduatedSkip:{get:function(){return this.fa!==null?this.fa.o:null},set:function(a){var y=this.graduatedSkip;y!==a&&(this.fa===null&&(this.fa=new Lu),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}},textValidation:{get:function(){return this.da!==null?this.da.vj:null},set:function(a){var y=this.textValidation;y!==a&&(VA(this),this.da.vj=a,this.g("textValidation",y,a))}},textEdited:{get:function(){return this.da!==null?this.da.Pr:null},set:function(a){var y=this.textEdited;y!==a&&(VA(this),this.da.Pr=a,this.g("textEdited",y,a))}},spacingAbove:{get:function(){return this.da!==null?this.da.Dr:0},set:function(a){var y=this.spacingAbove;y!==a&&(VA(this),this.da.Dr=a,this.v(),this.g("spacingAbove",y,a))}},spacingBelow:{get:function(){return this.da!==null?this.da.Er:0},set:function(a){var y=this.spacingBelow;y!==a&&(VA(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:Ap},set:function(a){var y=this.formatting;y!==a&&(VA(this),this.da.gq=a,this.v(),this.g("formatting",y,a))}},maxLines:{get:function(){return this.da!==null?this.da.Jq:1/0},set:function(a){var y=this.maxLines;y!==a&&(a=Math.floor(a),0>=a&&pi(a,"> 0",Sr,"maxLines"),VA(this),this.da.Jq=a,this.v(),this.g("maxLines",y,a))}},metrics:{get:function(){return{arrSize:this.Qc!==null?this.Qc:[this.Cb],arrText:this.Qb!==null?this.Qb:[this.ze],maxLineWidth:this.Cb,fontHeight:this.df}}},choices:{get:function(){return this.Gm},set:function(a){var y=this.Gm;y!==a&&(this.Gm=a,this.g("choices",y,a))}}});var u0=null,h0=null,Km=new ce(Sr,"None",0),xy=new ce(Sr,"WrapFit",1),zm=new ce(Sr,"WrapDesiredSize",2),By=new ce(Sr,"WrapBreakAll",3),Vm=new ce(Sr,"OverflowClip",0),g0=new ce(Sr,"OverflowEllipsis",1),Ap=new ce(Sr,"FormatTrim",0),Cy=new ce(Sr,"FormatNone",0),y1=/[ \u200b\u00ad]/,Wm=new Yn,Py=0,f0=new Yn,_m=0,up="...",Fy="",wa=null,d0=!1;Sr.className="TextBlock";function Ym(){this.nc=!1,this.Hd=null,this.Xf=Ge,this.gq=Ap,this.Jq=1/0,this.$q=Vm,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=La,this.$r=zm}Ym.prototype.copy=function(){var a=new Ym;return a.Hd=this.Hd,a.Xf=this.Xf,a.gq=this.gq,a.Jq=this.Jq,a.$q=this.$q,a.Dr=this.Dr,a.Er=this.Er,a.Or=this.Or,a.Pr=this.Pr,a.Qr=this.Qr,a.vj=this.vj,a.Yr=this.Yr,a.$r=this.$r,a},Sr.getEllipsis=function(){return up},Sr.setEllipsis=function(a){up=a,f0=new Yn,_m=0},Sr.getBaseline=function(){return u0},Sr.setBaseline=function(a){u0=a},Sr.getUnderline=function(){return h0},Sr.setUnderline=function(a){h0=a},Sr.isValidFont=function(a){if(d0||(wa=jr?new al(null).context:null,d0=!0),wa===null)return!0;var y=wa.font;if(a===y||a==="10px sans-serif")return!0;wa.font="10px sans-serif",wa.font=a;var x=wa.font;if(x!=="10px sans-serif")return wa.font=y,!0;wa.font="19px serif";var E=wa.font;return wa.font=a,x=wa.font,wa.font=y,x!==E},Sr.FormatNone=Cy,Sr.FormatTrim=Ap,Sr.None=Km,Sr.OverflowClip=Vm,Sr.OverflowEllipsis=g0,Sr.WrapBreakAll=By,Sr.WrapDesiredSize=zm,Sr.WrapFit=xy;function Lu(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}Lu.prototype.copy=function(){var a=new Lu;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},Lu.className="GradElementSettings";function Sa(a,y){te.call(this),this.Eg=null,this.qo="",this.Xg=Zr,this.Nk=Ve,this.Zg=this.Hd=null,this.Mk=Xi,this.Xf=Ge,this.vl=null,this.qn=!1,this.en=!0,this.al=!1,this.bt=this.rl=null,typeof a=="string"?this.source=a:a&&Object.assign(this,a),y&&Object.assign(this,y)}var Sc;ue(Sa,te),Sa.prototype.cloneProtected=function(a){te.prototype.cloneProtected.call(this,a),a.qo=this.qo,a.element=this.Eg,a.Xg=this.Xg.J(),a.Nk=this.Nk,a.Xf=this.Xf,a.Hd=this.Hd,a.Zg=this.Zg,a.Mk=this.Mk.J(),a.en=this.en,a.rl=this.rl},Sa.prototype.qb=function(a){a===Ge||a===Fn||a===bi?this.imageStretch=a:te.prototype.qb.call(this,a)},Sa.prototype.toString=function(){return"Picture("+this.source+")#"+gr(this)};function xc(a){a===void 0&&(a=""),a!==""?Sc[a]&&(delete Sc[a],c0--):(Sc=new Yn,c0=0)}function Ly(a,y){y.qy||(y.Fq=function(x){y.sq=!0,y.ln=!1;var E=y.Bg.copy();if(E!=null){for(E=E.iterator;E.next();){var b=E.value;b.N();var z=y.getAttribute("src")||"",tt=b.Og.I(z);if(tt!==null)for(var rt=tt.length,ot=0;ot<rt;ot++)z=tt[ot],b.Xn.add(z),z.Uc=!0,b.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),z.Zg!==null&&z.Zg(z,x))}y.Bg.clear()}a.desiredSize.w()||(mo(a,!1),a.v())},y.Yp=function(x){y.ln=x;var E=y.Bg.copy();if(E!=null){for(E=E.iterator;E.next();){var b=E.value,z=y.getAttribute("src")||"",tt=b.Og.I(z);if(tt!==null){b=tt.length,z=Ce();for(var rt=0;rt<b;rt++)z.push(tt[rt]);if(y.hn)for(rt=0;rt<b;rt++)tt=z[rt],tt.Hd!==null&&tt.Hd(tt,x);Oe(z)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}Sa.prototype.hA=function(){if(this.source!==""){xc(this.source);var a=this.source;this.source="",this.source=a}},Sa.prototype.redraw=function(){this.N(),this.Uc=!0},Sa.prototype.hh=function(a,y){var x=this.Eg;if(x!==null){var E=x.getAttribute("src");if(!(x instanceof HTMLImageElement&&(E===null||E==="")||x.ln instanceof Event&&a instanceof Wh)){var b=a instanceof ia;E=this.naturalBounds;var z=0,tt=0,rt=this.qn,ot=rt?+x.width:x.naturalWidth;if(rt=rt?+x.height:x.naturalHeight,ot===void 0&&x.videoWidth&&(ot=x.videoWidth),rt===void 0&&x.videoHeight&&(rt=x.videoHeight),ot=ot||E.width,rt=rt||E.height,ot!==0&&rt!==0){var at=ot,At=rt;this.sourceRect.w()&&(z=this.Xg.x,tt=this.Xg.y,ot=this.Xg.width,rt=this.Xg.height);var ft=ot,pt=rt,xt=this.Nk,Ct=this.Mk;switch(xt){case Ge:if(this.sourceRect.w())break;ft>=E.width&&(z=z+Ct.offsetX+(ft*Ct.x-E.width*Ct.x)),pt>=E.height&&(tt=tt+Ct.offsetY+(pt*Ct.y-E.height*Ct.y)),ot=Math.min(E.width,ft),rt=Math.min(E.height,pt);break;case Ve:ft=E.width,pt=E.height;break;case Fn:case bi:xt===Fn?(xt=Math.min(E.height/pt,E.width/ft),ft*=xt,pt*=xt):xt===bi&&(xt=Math.max(E.height/pt,E.width/ft),ft*=xt,pt*=xt,ft>=E.width&&(z=(z+Ct.offsetX+(ft*Ct.x-E.width*Ct.x)/ft)*ot),pt>=E.height&&(tt=(tt+Ct.offsetY+(pt*Ct.y-E.height*Ct.y)/pt)*rt),ot*=1/(ft/E.width),rt*=1/(pt/E.height),ft=E.width,pt=E.height)}xt=this.Df()*y.scale;var Mt=ft*xt*pt*xt,Gt=ot*rt/Mt,It=x.__goCache;xt=null;var zt=w1;if(!b){if(x.sq&&It!==void 0&&4<Mt&&Gt>zt*zt)for(It.gi===null&&(My(It,4,at,At,x),My(It,16,at,At,x)),b=It.gi,at=b.length,At=0;At<at&&b[At].ratio*b[At].ratio<Gt;At++)xt=b[At];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{b=new al(null).context;try{b.drawImage(this.Eg,0,0)}catch(Yt){this.en=!1}try{b.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(Yt){this.vl=!0}}if(this.vl)return}}switch(b=ft<E.width?Ct.offsetX+(E.width*Ct.x-ft*Ct.x):0,Ct=pt<E.height?Ct.offsetY+(E.height*Ct.y-pt*Ct.y):0,this.flip){case Di:a.translate(Math.min(E.width,ft),0),a.scale(-1,1);break;case Bi:a.translate(0,Math.min(E.height,pt)),a.scale(1,-1);break;case ar:a.translate(Math.min(E.width,ft),Math.min(E.height,pt)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&It!==void 0&&xt!==null&&xt.ratio!==1){a.save(),y=xt.ratio;try{a.drawImage(xt.source,z/y,tt/y,Math.min(xt.source.width,ot/y),Math.min(xt.source.height,rt/y),b,Ct,Math.min(E.width,ft),Math.min(E.height,pt)),a instanceof ia&&(this.bt=[z/y,tt/y,Math.min(xt.source.width,ot/y),Math.min(xt.source.height,rt/y),b,Ct,Math.min(E.width,ft),Math.min(E.height,pt)])}catch(Yt){this.en=!1}a.restore()}else try{a.drawImage(x,z,tt,ot,rt,b,Ct,Math.min(E.width,ft),Math.min(E.height,pt)),a instanceof ia&&(this.bt=[z,tt,ot,rt,b,Ct,Math.min(E.width,ft),Math.min(E.height,pt)])}catch(Yt){this.en=!1}switch(this.flip){case Di:a.scale(-1,1),a.translate(-Math.min(E.width,ft),0);break;case Bi:a.scale(1,-1),a.translate(0,-Math.min(E.height,pt));break;case ar:a.scale(-1,-1),a.translate(-Math.min(E.width,ft),-Math.min(E.height,pt))}}}}},Sa.prototype.Wl=function(a,y,x,E){var b=this.desiredSize,z=Ys(this,!0),tt=this.Eg,rt=this.qn,ot=0,at=0;(rt||!this.al&&tt&&tt.complete)&&(this.al=!0),tt===null?(isFinite(b.width)||(a=0),isFinite(b.height)||(y=0)):(ot=rt?+tt.width:tt.naturalWidth,at=rt?+tt.height:tt.naturalHeight),isFinite(b.width)||z===Ve||z===In?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:tt!==null&&(a=ot)),x=0):tt!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:ot),isFinite(b.height)||z===Ve||z===_n?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:tt!==null&&(y=at)),E=0):tt!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:at),isFinite(b.width)&&(a=b.width),isFinite(b.height)&&(y=b.height),b=this.maxSize,z=this.minSize,x=Math.max(x||0,z.width),E=Math.max(E||0,z.height),a=Math.min(b.width,a),y=Math.min(b.height,y),a=Math.max(x,a),y=Math.max(E,y),tt===null||tt.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),fa(this.dc,a,y),this.Ge(0,0,a,y)},Sa.prototype.eh=function(a,y,x,E){ks(this,a,y,x,E)},Ie.Object.defineProperties(Sa.prototype,{element:{get:function(){return this.Eg},set:function(a){var y=this.Eg;if(this.Uc=!0,y!==a){this.qn=a instanceof HTMLCanvasElement;var x=a instanceof HTMLImageElement;a===null||x||a instanceof HTMLVideoElement||this.qn||pe("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var E=this.diagram;E!==null&&kf(E,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new Ye),E!==null&&x&&$u(E,this),a!==null&&(this.qn||a.complete===!0?(a.hn&&(a.ln instanceof Event&&this.Hd!==null?this.Hd(this,a.ln):a.sq===!0&&!a.ln&&this.Zg!==null&&a.eu&&this.Zg(this,a.eu)),a.sq=!0,this.desiredSize.w()||(mo(this,!1),this.v())):x&&Ly(this,a)),this.g("element",y,a),this.N()}}},source:{get:function(){return this.qo},set:function(a){var y=this.qo;if(y!==a){this.Uc=!0,this.qo=a;var x=Sc;if(jr){var E=null;if(x[a]!==void 0)E=x[a];else if(a!==""){30<c0&&(xc(),x=Sc),E=nn("img"),E.hn=!0,Ly(this,E);var b=this.rl;b!==null&&(E.crossOrigin=b(this)),E.src=a,x[a]=E,c0++}this.element=E,E!==null&&E.__goCache===void 0&&(E.__goCache=new Ey),this.v(),this.N()}this.g("source",y,a)}}},sourceCrossOrigin:{get:function(){return this.rl},set:function(a){if(this.rl!==a&&(this.rl=a,this.element!==null)){var y=this.element.getAttribute("src");a===null&&typeof y=="string"?this.element.crossOrigin=null:a!==null&&(this.element.crossOrigin=a(this)),this.element.src=y}}},sourceRect:{get:function(){return this.Xg},set:function(a){var y=this.Xg;y.D(a)||(this.Xg=a=a.J(),this.N(),this.g("sourceRect",y,a))}},imageStretch:{get:function(){return this.Nk},set:function(a){var y=this.Nk;y!==a&&(this.Nk=a,this.N(),this.g("imageStretch",y,a))}},flip:{get:function(){return this.Xf},set:function(a){var y=this.Xf;y!==a&&(this.Xf=a,this.N(),this.g("flip",y,a))}},imageAlignment:{get:function(){return this.Mk},set:function(a){var y=this.Mk;y.D(a)||(this.Mk=a=a.J(),this.N(),this.g("imageAlignment",y,a))}},errorFunction:{get:function(){return this.Hd},set:function(a){var y=this.Hd;y!==a&&(this.Hd=a,this.g("errorFunction",y,a))}},successFunction:{get:function(){return this.Zg},set:function(a){var y=this.Zg;y!==a&&(this.Zg=a,this.g("successFunction",y,a))}},naturalBounds:{get:function(){return this.dc}}}),Sa.prototype.redraw=Sa.prototype.redraw,Sa.prototype.reloadSource=Sa.prototype.hA;var c0=0,w1=4;Sa.className="Picture",Sc=new Yn,Sa.clearCache=xc;function Ey(){this.gi=null}function My(a,y,x,E,b){a.gi===null&&(a.gi=[]);var z=new al(null),tt=z.context,rt=1/y;z.width=x/y,z.height=E/y,z.width!==0&&z.height!==0&&(y=new ky(z.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],b=x.source,x=x.ratio),tt.setTransform(rt*x,0,0,rt*x,0,0),tt.yc(),tt.drawImage(b,0,0),a.gi.push(y))}Ey.className="PictureCacheArray";function ky(a,y){this.source=a,this.ratio=y}ky.className="PictureCacheInstance";function Bc(){this.os=new rn,this.mc=null}Bc.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new rn,this.mc=null};function Cc(a,y,x,E,b,z){a.mc=new No,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=E,a.mc.isEvenOdd=z||!1,a.os.figures.add(a.mc),b!==void 0&&(a.mc.isShadowed=b)}function S1(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}Bc.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var E=new Ki(Eo);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)},Bc.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var E=new Ki(mr);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)};function Xh(a,y,x,E,b,z,tt){var rt;rt===void 0&&(rt=!1);var ot=new Ki(ss);ot.point1X=y,ot.point1Y=x,ot.point2X=E,ot.point2Y=b,ot.endX=z,ot.endY=tt,rt&&ot.close(),a.mc.segments.add(ot)}function p0(a,y,x,E,b){var z;z===void 0&&(z=!1);var tt=new Ki(ca);tt.point1X=y,tt.point1Y=x,tt.endX=E,tt.endY=b,z&&tt.close(),a.mc.segments.add(tt)}Bc.prototype.arcTo=function(a,y,x,E,b,z,tt){z===void 0&&(z=0),tt===void 0&&(tt=!1);var rt=new Ki(ro);rt.startAngle=a,rt.sweepAngle=y,rt.centerX=x,rt.centerY=E,rt.radiusX=b,rt.radiusY=z!==0?z:b,tt&&rt.close(),this.mc.segments.add(rt)};function x1(a,y,x,E,b,z,tt,rt){var ot;ot===void 0&&(ot=!1),y=new Ki(Ka,tt,rt,y,x,E,b,z),ot&&y.close(),a.mc.segments.add(y)}function by(a){var y=m0;return y!==null?(m0=null,y.reset(a),y):(y=new Bc,y.reset(a),y)}var m0=null;Bc.className="StreamGeometryContext";function Gs(a,y){var x=a.toLowerCase(),E=re.Ze;E[a]=y,E[x]=a}Gs("Rectangle",function(a,y,x){a="r"+y+","+x;var E=re.Mf[a];return E!==void 0||(E=new rn(rn.u),E.endX=y,E.endY=x,re.Nf<re.vm&&(re.Mf[a]=E,re.Nf++)),E}),Gs("Square",function(a,y,x){a="s"+y+","+x;var E=re.Mf[a];return E!==void 0||(E=new rn(rn.u),E.endX=y,E.endY=x,E.defaultStretch=Fn,re.Nf<re.vm&&(re.Mf[a]=E,re.Nf++)),E}),Gs("RoundedRectangle",function(a,y,x){a=a?a.parameter1:NaN,(isNaN(a)||0>a)&&(a=5),a=Math.min(a,y/3),a=Math.min(a,x/3);var E="rr"+y+","+x+","+a,b=re.Mf[E];if(b!==void 0)return b;var z=a*re.wg;return b=new rn().add(new No(a,0,!0).add(new Ki(mr,y-a,0)).add(new Ki(ss,y,a,y-z,0,y,z)).add(new Ki(mr,y,x-a)).add(new Ki(ss,y-a,x,y,x-z,y-z,x)).add(new Ki(mr,a,x)).add(new Ki(ss,0,x-a,z,x,0,x-z)).add(new Ki(mr,0,a)).add(new Ki(ss,a,0,0,z,z,0).close())),1<z&&(b.spot1=new Vn(0,0,z,z),b.spot2=new Vn(1,1,-z,-z)),re.Nf<re.vm&&(re.Mf[E]=b,re.Nf++),b}),Gs("Border","RoundedRectangle"),Gs("Ellipse",function(a,y,x){a="e"+y+","+x;var E=re.Mf[a];return E!==void 0||(E=new rn(rn.F),E.endX=y,E.endY=x,E.spot1=mg,E.spot2=Hu,re.Nf<re.vm&&(re.Mf[a]=E,re.Nf++)),E}),Gs("Circle",function(a,y,x){a="c"+y+","+x;var E=re.Mf[a];return E!==void 0||(E=new rn(rn.F),E.endX=y,E.endY=x,E.spot1=mg,E.spot2=Hu,E.defaultStretch=Fn,re.Nf<re.vm&&(re.Mf[a]=E,re.Nf++)),E}),Gs("TriangleRight",function(a,y,x){return new rn().add(new No(0,0).add(new Ki(mr,y,.5*x)).add(new Ki(mr,0,x).close())).pm(0,.25,.5,.75)}),Gs("TriangleDown",function(a,y,x){return new rn().add(new No(0,0).add(new Ki(mr,y,0)).add(new Ki(mr,.5*y,x).close())).pm(.25,0,.75,.5)}),Gs("TriangleLeft",function(a,y,x){return new rn().add(new No(y,x).add(new Ki(mr,0,.5*x)).add(new Ki(mr,y,0).close())).pm(.5,.25,1,.75)}),Gs("TriangleUp",function(a,y,x){return new rn().add(new No(y,x).add(new Ki(mr,0,x)).add(new Ki(mr,.5*y,0).close())).pm(.25,.5,.75,1)}),Gs("Triangle","TriangleUp"),Gs("Diamond",function(a,y,x){return new rn().add(new No(.5*y,0).add(new Ki(mr,0,.5*x)).add(new Ki(mr,.5*y,x)).add(new Ki(mr,y,.5*x).close())).pm(.25,.25,.75,.75)}),Gs("LineH",function(a,y,x){return a=new rn(rn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),Gs("LineV",function(a,y,x){return a=new rn(rn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),Gs("None","Rectangle"),Gs("BarH","Rectangle"),Gs("BarV","Rectangle"),Gs("MinusLine","LineH"),Gs("PlusLine",function(a,y,x){return new rn().add(new No(0,x/2,!1).add(new Ki(mr,y,x/2)).add(new Ki(Eo,y/2,0)).add(new Ki(mr,y/2,x)))}),Gs("XLine",function(a,y,x){return new rn().add(new No(0,x,!1).add(new Ki(mr,y,0)).add(new Ki(Eo,0,0)).add(new Ki(mr,y,x)))}),Gs("LineRight",function(a,y,x){return new rn().add(new No(.25*y,0,!1).add(new Ki(mr,.75*y,.5*x)).add(new Ki(mr,.25*y,x)))}),Gs("LineDown",function(a,y,x){return new rn().add(new No(0,.25*x,!1).add(new Ki(mr,.5*y,.75*x)).add(new Ki(mr,y,.25*x)))}),Gs("LineLeft",function(a,y,x){return new rn().add(new No(.75*y,0,!1).add(new Ki(mr,.25*y,.5*x)).add(new Ki(mr,.75*y,x)))}),Gs("LineUp",function(a,y,x){return new rn().add(new No(0,.75*x,!1).add(new Ki(mr,.5*y,.25*x)).add(new Ki(mr,y,.75*x)))}),re.um={"":"",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"};function Xm(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=ga,this.ir=null,this.jr="",this.lr=Xo,this.Gq="",this.Hq=es,this.Pq=ps,this.Kq=xs,this.Up=null,this.Cq=127,this.zr=Lo,this.yr="gray",this.Vg=4}Xm.prototype.copy=function(){var a=new Xm;return a.zq=this.zq,a.Kp=this.Kp,a.tr=this.tr,a.vr=this.vr,a.ur=this.ur,a.oq=this.oq,a.fr=this.fr,a.hr=this.hr,a.gr=this.gr.J(),a.ir=this.ir,a.jr=this.jr,a.lr=this.lr.J(),a.Gq=this.Gq,a.Hq=this.Hq.J(),a.Pq=this.Pq.J(),a.Kq=this.Kq.J(),a.Up=this.Up,a.Cq=this.Cq,a.zr=this.zr.J(),a.yr=this.yr,a.Vg=this.Vg,a};function jn(a,y){a===void 0||a instanceof ir||typeof a=="string"?ze.call(this,a):(ze.call(this),a&&(y=a)),this.G=2408959,this.Tf="",this.P=null,this.Jg="",this.Qf=this.Ug=null,this.ec="",this.Ah=this.Ig=null,this.ke=new Rt(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new Me,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}ue(jn,ze),jn.prototype.cloneProtected=function(a){ze.prototype.cloneProtected.call(this,a),a.G=this.G&-4097|49152,a.Tf=this.Tf,this.P!==null&&(a.P=this.P.nc?this.P:this.P.copy()),a.Jg=this.Jg,a.Qf=null,a.ec=this.ec,a.ke.assign(this.ke),a.Ao=this.Ao},Bt=jn.prototype,Bt.Af=function(a){ze.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},Bt.toString=function(){var a=Ze(this.constructor)+"#"+gr(this);return this.data!==null&&(a+="("+En(this.data)+")"),a};function xa(a){a.P===null?a.P=new Xm:a.P.nc&&(a.P=a.P.copy())}Bt.th=function(){ze.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},Bt.gk=function(a,y,x,E,b,z,tt){var rt=this.diagram;rt!==null&&(a===to&&y==="elements"?b instanceof ze?ql(b,function(ot){xv(rt.partManager,ot),IA(rt,ot)}):$u(rt,b):a===Co&&y==="elements"&&(b instanceof ze?ql(b,function(ot){Bv(rt.partManager,ot,rt)}):kf(rt,b)),rt.cb(a,y,x,E,b,z,tt))},Bt.La=function(a){if(ze.prototype.La.call(this,a),this.data!==null){for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];b instanceof ze&&ql(b,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},jn.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},jn.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},jn.prototype.bh=function(a,y){if(y!==null){var x=null,E=this.Qf;if(E!==null&&(x=E.I(a)),x!==y){if(x!==null){var b=x.diagram;b!==null&&b.remove(x)}E===null&&(this.Qf=E=new Rn),y.Tf!==a&&(y.category=a),E.add(a,y),a=this.diagram,a!==null&&(a.add(y),a=y.adornedObject,a!==null&&(a=a.ih(),a!==null&&(y.data=a.data)))}}},jn.prototype.Jf=function(a){var y=this.Qf;if(y!==null){var x=y.I(a);if(x!==null){var E=x.diagram;E!==null&&E.remove(x)}y.remove(a),y.count===0&&(this.Qf=null)}},jn.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=Ce();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Oe(y)}},jn.prototype.updateAdornments=function(){var a=this.diagram;if(a!==null){for(var y=this.adornments;y.next();){var x=y.value;x.v(),x.placeholder&&x.placeholder.v()}t:{if(this.isSelected&&this.selectionAdorned&&(y=this.selectionObject,y!==null&&this.actualBounds.w()&&this.isVisible()&&y.Ed()&&y.actualBounds.w())){if(x=this.Pj("Selection"),x===null){if(x=this.selectionAdornmentTemplate,x===null&&(x=this.ph()?a.linkSelectionAdornmentTemplate:this instanceof li?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof Wi))break t;Tl(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=ze.Link),x.adornedObject=y)}if(x!==null){x.type===ze.Link&&x.v(),this.bh("Selection",x);break t}}this.Jf("Selection")}for(B1(this,a),y=this.adornments;y.next();)y.value.La()}},jn.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function Zm(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function B1(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function v0(a){if(Rg(a)===!1){qm(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function Ty(a){if(a.G|=2097152,Rg(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||Uy(a,y,x),x=a.Ib;var E=Me.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(E,x),Me.free(E),qm(a,!1)}}jn.prototype.Ge=function(a,y,x,E){var b=this.uc;b.h(a,y,x,E),this.Lb===null&&(this.Lb=new Li);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),this.Lb=z,z.ws()||z.pp(b)},jn.prototype.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Xi;this.locationSpot.sb()&&(z=this.locationSpot);var tt=Rt.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,tt.yi(x.x,x.y,x.width,x.height,z),y.Lb!==null&&y.Lb.Ga(tt),tt.offset(-y.measuredBounds.x,-y.measuredBounds.y),z=y.panel;z!==null&&z!==this;)z.Lb!==null&&z.Lb.Ga(tt),tt.offset(-z.measuredBounds.x,-z.measuredBounds.y),z=z.panel;else tt.yi(y,x,E,b,z);a.rotate(this.Kb,tt.x,tt.y),Rt.free(tt)}},jn.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},jn.prototype.moveTo=function(a,y,x){a=Rt.allocAt(a,y),this.move(a,x),Rt.free(a)},jn.prototype.isVisible=function(){if(!this.visible)return!1;var a=this.layer;if(a!==null){if(!a.visible)return!1;if(a=a.diagram,a!==null&&a.animationManager.fv(this))return!0}return a=this.containingGroup,!!(a===null||a.isSubGraphExpanded&&a.isVisible())},jn.prototype.Zb=function(a){var y=this.diagram;a?(this.C(4),this.Wb(),y!==null&&y.De.add(this)):(this.C(8),this.Ej()),this.oh(),y!==null&&(y.Ya(),y.N())},jn.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new Rn),y.I(a)!==null)return y.I(a);var x=ze.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function Zh(a,y,x,E){E===void 0&&(E=new Rt),x=x.Mc()?Xi:x;var b=y.naturalBounds;if(E.h(b.width*x.x+x.offsetX,b.height*x.y+x.offsetY),y===null||y===a)return E;for(y.transform.Ga(E),y=y.panel;y!==null&&y!==a;)y.transform.Ga(E),y=y.panel;return a.Lb!==null&&a.Lb.Ga(E),E.offset(-a.uc.x,-a.uc.y),E}jn.prototype.mi=function(a){return a===void 0&&(a=new Me),a.assign(this.actualBounds)},jn.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function Ny(a){var y=Rt.alloc(),x=a.locationObject,E=x.naturalBounds,b=x instanceof yi?x.strokeWidth:0;if(y.yi(0,0,E.width+b,E.height+b,a.locationSpot),x!==a)for(y.offset(-b/2,-b/2),x.transform.Ga(y),x=x.panel;x!==null&&x!==a;)x.transform.Ga(y),x=x.panel;return a.Lb!==null&&a.Lb.Ga(y),y.offset(-a.uc.x,-a.uc.y),y}function zf(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=uy(a));var E=a.ag,b=2*E;if(!a.isShadowed)return x.h(y.x-1-E,y.y-1-E,y.width+2+b,y.height+2+b),x;E=y.x,b=y.y;var z=y.width;y=y.height;var tt=a.shadowBlur;return a=a.shadowOffset,z+=tt,y+=tt,E-=tt/2,b-=tt/2,0<a.x?z+=a.x:(E+=a.x,z-=a.x),0<a.y?y+=a.y:(b+=a.y,y-=a.y),x.h(E-1,b-1,z+2,y+2),x}jn.prototype.arrange=function(){if(bs(this)===!1)Ty(this);else{pA(this,!1);var a=this.Ib,y=Me.alloc();y.assign(a);var x=Gg(this);this.eh(0,0,this.uc.width,this.uc.height);var E=this.position;Uy(this,E,this.location),a.ka(),a.x=E.x,a.y=E.y,a.freeze(),this.Xl(y,a),y.D(a)?this.Fd(x):!this.Zc()||re.B(y.width,a.width)&&re.B(y.height,a.height)||0<=this.vw&&this.C(16),Me.free(y),qm(this,!1)}},Bt=jn.prototype,Bt.Xl=function(a,y){var x=this.diagram;if(x!==null){var E=!1;if(x.Zi===!1&&a.w()){var b=Me.alloc();b.assign(x.documentBounds),b.Fv(x.padding),a.x>b.x&&a.y>b.y&&a.right<b.right&&a.bottom<b.bottom&&y.x>b.x&&y.y>b.y&&y.right<b.right&&y.bottom<b.bottom&&(E=!0),Me.free(b)}!(this.G&65536)&&a.D(y)||Hy(this,E,x),x.N(),!a.w()&&!y.w()||Go(a,y)||(this instanceof hn&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},Bt.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var E=this.diagram;return E!==null&&Qy(this,E,a,y,x),this.pa=a,this.G&=-2097153,!this.ke.w()||E!==null&&!E.animationManager.isTicking&&E.undoManager.isUndoingRedoing||(E=this.ke,this.ke=new Rt(E.x+(a.x-y),E.y+(a.y-x)),this.g("location",E,this.ke.copy())),Rg(this)===!1&&bs(this)===!1&&(v0(this),Ty(this)),!0};function Qy(a,y,x,E,b){y===null||a instanceof Wi||(y=y.animationManager,y.zb&&Sf(y,a,new Rt(E,b),x))}Bt.mm=function(a,y,x){var E=this.ke,b=this.pa;if(x){if(E.x===a&&E.y===y)return;Rg(this)||bs(this)?b.h(NaN,NaN):b.h(b.x+a-E.x,b.y+y-E.y),E.h(a,y)}else{if(b.x===a&&b.y===y)return;E.h(E.x+a-b.x,E.y+y-b.y),b.h(a,y)}v0(this)},Bt.Av=function(){this.G&=-2097153,v0(this)};function Uy(a,y,x){var E=Ny(a),b=a.diagram,z=x.w(),tt=y.w();z&&tt?a.G&2097152?Iy(a,y,x,b,E):Dy(a,y,x,b,E):z?Iy(a,y,x,b,E):tt&&Dy(a,y,x,b,E),a.G|=2097152,Rt.free(E),a.Uk()}function Iy(a,y,x,E,b){var z=y.x,tt=y.y;y.h(x.x-b.x,x.y-b.y),E!==null&&(x=E.animationManager,(E=x.defaultAnimation.isAnimating)||!x.zb||a instanceof Wi||Sf(x,a,new Rt(z,tt),y),E||y.x===z&&y.y===tt||a.g("position",new Rt(z,tt),y.copy()))}function Dy(a,y,x,E,b){var z=x.copy();x.h(y.x+b.x,y.y+b.y),x.D(z)||E===null||a.g("location",z,x.copy())}function Hy(a,y,x){$m(a,!1),a instanceof hn&&Zl(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var E=x.viewportBounds;E.w()?Gg(a)?(JA(y,E)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(E)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}Bt.si=function(){return!0},Bt.Zc=function(){return!0},Bt.ph=function(){return!1},Bt.Dd=function(){return!0};function Jm(a,y,x,E){y.constructor===a.constructor||Gy||(Gy=!0,Oi('Should not change the class of the Part when changing category from "'+x+'" to "'+E+'"'),Oi(" Old class: "+Ze(a.constructor)+", new class: "+Ze(y.constructor)+", part: "+a.toString())),a.Ej();var b=a.data;x=a.layerName;var z=a.isSelected,tt=a.isHighlighted,rt=!0,ot=!0,at=!1;a instanceof hn&&(rt=a.isTreeLeaf,ot=a.isTreeExpanded,at=a.wasTreeExpanded),y.Af(a),y.cloneProtected(a),a.Tf=E,a.svg!==null&&(a.svg.remove(),a.svg=null,a.Uc=!0),a.v(),a.N(),y=a.diagram,E=!0,y!==null&&(E=y.skipsUndoManager,y.skipsUndoManager=!0),a.ub=b,a.G=z?a.G|4096:a.G&-4097,a.G=tt?a.G|524288:a.G&-524289,a instanceof hn&&(a.U=rt?a.U|4:a.U&-5,a.U=ot?a.U|1:a.U&-2,a.U=at?a.U|2:a.U&-3),b!==null&&a.La(),b=a.layerName,b!==x&&(a.Jg=x,a.layerName=b),y!==null&&(y.skipsUndoManager=E),a.Zc()&&a.C(64)}jn.prototype.canCopy=function(){if(!this.copyable)return!1;var a=this.layer;return a===null?!0:a.allowCopy?(a=a.diagram,a===null?!0:!!a.allowCopy):!1},jn.prototype.canDelete=function(){if(!this.deletable)return!1;var a=this.layer;return a===null?!0:a.allowDelete?(a=a.diagram,a===null?!0:!!a.allowDelete):!1},jn.prototype.canEdit=function(){if(!this.textEditable)return!1;var a=this.layer;return a===null?!0:a.allowTextEdit?(a=a.diagram,a===null?!0:!!a.allowTextEdit):!1},jn.prototype.canGroup=function(){if(!this.groupable)return!1;var a=this.layer;return a===null?!0:a.allowGroup?(a=a.diagram,a===null?!0:!!a.allowGroup):!1},jn.prototype.canMove=function(){if(!this.movable)return!1;var a=this.layer;return a===null?!0:a.allowMove?(a=a.diagram,a===null?!0:!!a.allowMove):!1},jn.prototype.canReshape=function(){if(!this.reshapable)return!1;var a=this.layer;return a===null?!0:a.allowReshape?(a=a.diagram,a===null?!0:!!a.allowReshape):!1},jn.prototype.canResize=function(){if(!this.resizable)return!1;var a=this.layer;return a===null?!0:a.allowResize?(a=a.diagram,a===null?!0:!!a.allowResize):!1},jn.prototype.canRotate=function(){if(!this.rotatable)return!1;var a=this.layer;return a===null?!0:a.allowRotate?(a=a.diagram,a===null?!0:!!a.allowRotate):!1},jn.prototype.canSelect=function(){if(!this.selectable)return!1;var a=this.layer;return a===null?!0:a.allowSelect?(a=a.diagram,a===null?!0:!!a.allowSelect):!1};function Rg(a){return(a.G&32768)!==0}function qm(a,y){a.G=y?a.G|32768:a.G&-32769}function $m(a,y){a.G=y?a.G|65536:a.G&-65537}function Gg(a){return(a.G&131072)!==0}Bt=jn.prototype,Bt.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function y0(a,y){a.G=y?a.G|1048576:a.G&-1048577}Bt.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},Bt.N=function(){var a=this.diagram;a!==null&&!bs(this)&&!Rg(this)&&this.isVisible()&&this.Ib.w()&&a.N(zf(this,this.Ib))},Bt.v=function(){ze.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof hn&&this.labeledLink!==null&&Po(this.labeledLink),a.$b(!0))},Bt.Vo=function(a){a||(a=this.Ah,a!==null&&ov(a,this))},Bt.Wo=function(a){a||(a=this.Ah,a!==null&&sv(a,this))},Bt.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},Bt.oz=function(){return tv(this,this)};function tv(a,y){var x=y.containingGroup;return x!==null?1+tv(a,x):y instanceof hn&&(y=y.labeledLink,y!==null)?tv(a,y):0}Bt.sz=function(){return Oy(this,this)};function Oy(a,y){var x=y.containingGroup;return x!==null||y instanceof hn&&(x=y.labeledLink,x!==null)?Oy(a,x):y}Bt.Td=function(a){return a instanceof li?ev(this,this,a):!1};function ev(a,y,x){if(y===x||x===null)return!1;var E=y.containingGroup;return E===null||E!==x&&!ev(a,E,x)?y instanceof hn&&(y=y.labeledLink,y!==null)?ev(a,y,x):!1:!0}Bt.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof li&&y0(y,!0),y instanceof hn){var x=y.labeledLink;x!==null&&(y=x)}y=y.containingGroup}for(x=null,y=a;y!==null;){if(y.G&1048576){x=y;break}y instanceof hn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof li&&y0(y,!1),y instanceof hn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},jn.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof hn&&this.isLinkLabel)},jn.prototype.C=function(a){if(a===void 0&&(a=16777215),this.isLayoutPositioned&&a&this.layoutConditions){var y=this.layer;y!==null&&y.isTemporary||this instanceof hn&&this.isLinkLabel?y=!1:(y=this.diagram,y=!(y!==null&&y.undoManager.isUndoingRedoing))}else y=!1;if(y)if(y=this.Ah,y!==null){var x=y.layout;x!==null?x.C():y.C(a)}else a=this.diagram,a!==null&&(a=a.layout,a!==null&&a.C())};function Ry(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function jg(a,y,x,E,b,z){if(z===void 0&&(z=null),!(a.contains(y)||z!==null&&!z(y)||y instanceof Wi)){if(a.add(y),y instanceof hn){if(x&&y instanceof li)for(var tt=y.memberParts;tt.next();)jg(a,tt.value,x,E,b,z);if(b!==!1)for(tt=y.linksConnected;tt.next();){var rt=tt.value;if(!a.contains(rt)){var ot=rt.fromNode,at=rt.toNode;ot=ot===null||a.contains(ot),at=at===null||a.contains(at),(b?ot&&at:ot||at)&&jg(a,rt,x,E,b,z)}}if(1<E)for(y=y.Ou();y.next();)jg(a,y.value,x,E-1,b,z)}else if(y instanceof tn)for(y=y.labelNodes;y.next();)jg(a,y.value,x,E,b,z)}}Ie.Object.defineProperties(jn.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?xi:this.Qf.iteratorValues}},layer:{get:function(){return this.Ig}},diagram:{get:function(){var a=this.Ig;return a==null?null:a.diagram}},layerName:{get:function(){return this.Jg},set:function(a){var y=this.Jg;if(y!==a){var x=this.diagram;if((x===null||x.Qj(a)!==null&&!x.partManager.addsToTemporaryLayer)&&(this.Jg=a,x!==null&&x.Ya(),this.g("layerName",y,a),y=this.layer,y!==null&&y.name!==a&&(x=y.diagram,x!==null&&(a=x.Qj(a),a!==null&&a!==y)))){var E=y.pc(-1,this,!0);if(0<=E&&x.cb(Co,"parts",y,this,null,E,!0),E=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=E&&x.cb(to,"parts",a,null,this,!0,E),E=this.layerChanged,E!==null){var b=x.aa;x.aa=!0,E(this,y,a),x.aa=b}}}}},layerChanged:{get:function(){return this.P!==null?this.P.zq:null},set:function(a){var y=this.layerChanged;y!==a&&(xa(this),this.P.zq=a,this.g("layerChanged",y,a))}},zOrder:{get:function(){return this.Ao},set:function(a){var y=this.Ao;if(y!==a){this.Ao=a;var x=this.layer;x!==null&&Bf(x,-1,this),this.g("zOrder",y,a),a=this.diagram,a!==null&&a.N()}}},locationObject:{get:function(){if(this.nf===null){var a=this.locationObjectName;a!==""?(a=this.fb(a),a!==null?this.nf=a:this.nf=this):this instanceof Wi?this.type!==ze.Link&&this.placeholder!==null?this.nf=this.placeholder:this.nf=this:this.nf=this}return this.nf.visible?this.nf:this}},minLocation:{get:function(){return this.P!==null?this.P.Pq:ps},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),xa(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:xs},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),xa(this),this.P.Kq=a,this.g("maxLocation",y,a))}},locationObjectName:{get:function(){return this.P!==null?this.P.Gq:""},set:function(a){var y=this.locationObjectName;y!==a&&(xa(this),this.P.Gq=a,this.nf=null,this.v(),this.g("locationObjectName",y,a))}},locationSpot:{get:function(){return this.P!==null?this.P.Hq:es},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),xa(this),this.P.Hq=a,this.v(),this.g("locationSpot",y,a))}},location:{get:function(){return this.ke},set:function(a){var y=a.x,x=a.y,E=this.ke;if(!(E.x===y||isNaN(E.x)&&isNaN(y))||!(E.y===x||isNaN(E.y)&&isNaN(x))){if(a=a.copy(),y=a,this.ph())y=!1;else{if(this.ke=y,this.G|=2097152,bs(this)===!1&&(v0(this),x=this.pa,x.w())){var b=this.diagram;if(b===null||b.animationManager.isTicking||!b.undoManager.isUndoingRedoing){var z=x.copy();x.h(x.x+(y.x-E.x),x.y+(y.y-E.y)),Qy(this,b,x,z.x,z.y),this.g("position",z,x.copy())}}y=!0}y&&this.g("location",E,a.copy())}}},category:{get:function(){return this.Tf},set:function(a){var y=this.Tf;if(y!==a){this.svg!==null&&(this.svg.remove(),this.Uc=!0);var x=this.diagram,E=this.data,b=null;if(x!==null&&E!==null&&!(this instanceof Wi)){var z=x.model.undoManager;z.isEnabled&&!z.isUndoingRedoing&&(b=this.clone(),b.O.addAll(this.O))}this.Tf=a,this.g("category",y,a),x===null||E===null||this instanceof Wi?this instanceof Wi&&(b=this.adornedPart,b!==null&&(a=b.Qf,a!==null&&a.remove(y),b.bh(this.category,this))):(z=x.model,z.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(E,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&(Tl(x),x=x.copy(),x!==null&&Jm(this,x,y,a))):(z!==null&&z.jm(E,a),x=gw(x.partManager,E,a),x!==null&&(Tl(x),x=x.copy(),x===null||x instanceof tn||(E=this.location.copy(),Jm(this,x,y,a),this.location.w()||(this.location=E)))),b!==null&&(y=this.clone(),y.O.addAll(this.O),this.g("self",b,y))))}}},self:{get:function(){return this},set:function(a){Jm(this,a,this.category,a.category)}},copyable:{get:function(){return(this.G&1)!==0},set:function(a){var y=(this.G&1)!==0;y!==a&&(this.G^=1,this.g("copyable",y,a))}},deletable:{get:function(){return(this.G&2)!==0},set:function(a){var y=(this.G&2)!==0;y!==a&&(this.G^=2,this.g("deletable",y,a))}},textEditable:{get:function(){return(this.G&4)!==0},set:function(a){var y=(this.G&4)!==0;y!==a&&(this.G^=4,this.g("textEditable",y,a),this.Wb())}},groupable:{get:function(){return(this.G&8)!==0},set:function(a){var y=(this.G&8)!==0;y!==a&&(this.G^=8,this.g("groupable",y,a))}},movable:{get:function(){return(this.G&16)!==0},set:function(a){var y=(this.G&16)!==0;y!==a&&(this.G^=16,this.g("movable",y,a))}},selectionAdorned:{get:function(){return(this.G&32)!==0},set:function(a){var y=(this.G&32)!==0;y!==a&&(this.G^=32,this.g("selectionAdorned",y,a),this.Wb())}},isInDocumentBounds:{get:function(){return(this.G&64)!==0},set:function(a){var y=(this.G&64)!==0;if(y!==a){this.G^=64;var x=this.diagram;x!==null&&x.Ya(),this.g("isInDocumentBounds",y,a)}}},isLayoutPositioned:{get:function(){return(this.G&128)!==0},set:function(a){var y=(this.G&128)!==0;y!==a&&(this.G^=128,this.g("isLayoutPositioned",y,a),this.C(a?4:8))}},selectable:{get:function(){return(this.G&256)!==0},set:function(a){var y=(this.G&256)!==0;y!==a&&(this.G^=256,this.g("selectable",y,a),this.Wb())}},reshapable:{get:function(){return(this.G&512)!==0},set:function(a){var y=(this.G&512)!==0;y!==a&&(this.G^=512,this.g("reshapable",y,a),this.Wb())}},resizable:{get:function(){return(this.G&1024)!==0},set:function(a){var y=(this.G&1024)!==0;y!==a&&(this.G^=1024,this.g("resizable",y,a),this.Wb())}},rotatable:{get:function(){return(this.G&2048)!==0},set:function(a){var y=(this.G&2048)!==0;y!==a&&(this.G^=2048,this.g("rotatable",y,a),this.Wb())}},isSelected:{get:function(){return(this.G&4096)!==0},set:function(a){var y=(this.G&4096)!==0;if(y!==a){var x=this.diagram;if(!a||this.canSelect()&&!(x!==null&&x.selection.count>=x.maxSelectionCount)){this.G^=4096;var E=!1;if(x!==null){E=x.skipsUndoManager,x.skipsUndoManager=!0;var b=x.selection;b.ka(),a?b.add(this):b.remove(this),b.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=E)}}}},isHighlighted:{get:function(){return(this.G&524288)!==0},set:function(a){var y=(this.G&524288)!==0;if(y!==a){this.G^=524288;var x=this.diagram;x!==null&&(x=x.highlighteds,x.ka(),a?x.add(this):x.remove(this),x.freeze()),this.g("isHighlighted",y,a),this.N(),a=this.highlightedChanged,a!==null&&a(this)}}},isShadowed:{get:function(){return(this.G&8192)!==0},set:function(a){var y=(this.G&8192)!==0;y!==a&&(this.G^=8192,this.Uc=!0,this.g("isShadowed",y,a),this.N())}},isAnimated:{get:function(){return(this.G&262144)!==0},set:function(a){var y=(this.G&262144)!==0;y!==a&&(this.G^=262144,this.g("isAnimated",y,a))}},highlightedChanged:{get:function(){return this.P!==null?this.P.oq:null},set:function(a){var y=this.highlightedChanged;y!==a&&(xa(this),this.P.oq=a,this.g("highlightedChanged",y,a))}},selectionObjectName:{get:function(){return this.P!==null?this.P.vr:""},set:function(a){var y=this.selectionObjectName;y!==a&&(xa(this),this.P.vr=a,this.Ug=null,this.g("selectionObjectName",y,a))}},selectionAdornmentTemplate:{get:function(){return this.P!==null?this.P.tr:null},set:function(a){var y=this.selectionAdornmentTemplate;y!==a&&(xa(this),this.P.tr=a,this.g("selectionAdornmentTemplate",y,a))}},selectionObject:{get:function(){if(this.Ug===null){var a=this.selectionObjectName;a!==null&&a!==""?(a=this.fb(a),a!==null?this.Ug=a:this.Ug=this):this instanceof tn?(a=this.path,a!==null?this.Ug=a:this.Ug=this):this.Ug=this}return this.Ug}},selectionChanged:{get:function(){return this.P!==null?this.P.ur:null},set:function(a){var y=this.selectionChanged;y!==a&&(xa(this),this.P.ur=a,this.g("selectionChanged",y,a))}},resizeAdornmentTemplate:{get:function(){return this.P!==null?this.P.fr:null},set:function(a){var y=this.resizeAdornmentTemplate;y!==a&&(xa(this),this.P.fr=a,this.g("resizeAdornmentTemplate",y,a))}},resizeObjectName:{get:function(){return this.P!==null?this.P.hr:""},set:function(a){var y=this.resizeObjectName;y!==a&&(xa(this),this.P.hr=a,this.g("resizeObjectName",y,a))}},resizeObject:{get:function(){var a=this.resizeObjectName;return a!==""&&(a=this.fb(a),a!==null)?a:this}},resizeCellSize:{get:function(){return this.P!==null?this.P.gr:ga},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),xa(this),this.P.gr=a,this.g("resizeCellSize",y,a))}},rotateAdornmentTemplate:{get:function(){return this.P!==null?this.P.ir:null},set:function(a){var y=this.rotateAdornmentTemplate;y!==a&&(xa(this),this.P.ir=a,this.g("rotateAdornmentTemplate",y,a))}},rotateObjectName:{get:function(){return this.P!==null?this.P.jr:""},set:function(a){var y=this.rotateObjectName;y!==a&&(xa(this),this.P.jr=a,this.g("rotateObjectName",y,a))}},rotateObject:{get:function(){var a=this.rotateObjectName;return a!==""&&(a=this.fb(a),a!==null)?a:this}},rotationSpot:{get:function(){return this.P!==null?this.P.lr:Xo},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),xa(this),this.P.lr=a,this.g("rotationSpot",y,a))}},text:{get:function(){return this.ec},set:function(a){var y=this.ec;y!==a&&(this.ec=a,this.g("text",y,a))}},containingGroup:{get:function(){return this.Ah},set:function(a){if(this.Zc()){var y=this.Ah;if(y!==a){a===null||this!==a&&!a.Td(this)||(this===a&&pe("Cannot make a Group a member of itself: "+this.toString()),pe("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?sv(y,this):this instanceof li&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?ov(a,this):this instanceof li&&x!==null&&x.ai.add(this),this.C(1),x!==null&&x.aa){var E=this.data,b=x.model;if(E!==null&&b.Xj()){var z=b.wa(a!==null?a.data:null);b.mp(E,z)}}if(E=this.containingGroupChanged,E!==null&&(b=!0,x!==null&&(b=x.aa,x.aa=!0),E(this,y,a),x!==null&&(x.aa=b)),this instanceof li){for(x=new Ye,jg(x,this,!0,0,!0),x=x.iterator;x.next();)if(E=x.value,E instanceof hn)for(E=E.linksConnected;E.next();)Pc(E.value)}if(this instanceof hn){for(x=this.linksConnected;x.next();)Pc(x.value);x=this.labeledLink,x!==null&&Pc(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&Bf(y,-1,a))}}else pe("cannot set the Part.containingGroup of a Link or Adornment")}},containingGroupChanged:{get:function(){return this.P!==null?this.P.Kp:null},set:function(a){var y=this.containingGroupChanged;y!==a&&(xa(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof hn&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(xa(this),this.P.Cq=a,this.g("layoutConditions",y,a))}},dragComputation:{get:function(){return this.P!==null?this.P.Up:null},set:function(a){var y=this.dragComputation;y!==a&&(xa(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:Lo},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),xa(this),this.P.zr=a,this.N(),this.g("shadowOffset",y,a))}},shadowColor:{get:function(){return this.P!==null?this.P.yr:"gray"},set:function(a){var y=this.shadowColor;y!==a&&(xa(this),this.P.yr=a,this.N(),this.g("shadowColor",y,a))}},shadowBlur:{get:function(){return this.P!==null?this.P.Vg:4},set:function(a){var y=this.shadowBlur;y!==a&&(xa(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),jn.prototype.invalidateLayout=jn.prototype.C,jn.prototype.findCommonContainingGroup=jn.prototype.px,jn.prototype.isMemberOf=jn.prototype.Td,jn.prototype.findTopLevelPart=jn.prototype.sz,jn.prototype.findSubGraphLevel=jn.prototype.oz,jn.prototype.ensureBounds=jn.prototype.Va,jn.prototype.getDocumentBounds=jn.prototype.mi,jn.prototype.findObject=jn.prototype.fb,jn.prototype.moveTo=jn.prototype.moveTo,jn.prototype.invalidateAdornments=jn.prototype.Wb,jn.prototype.clearAdornments=jn.prototype.Ej,jn.prototype.removeAdornment=jn.prototype.Jf,jn.prototype.addAdornment=jn.prototype.bh,jn.prototype.findAdornment=jn.prototype.Pj,jn.prototype.updateTargetBindings=jn.prototype.La;var Gy=!1;jn.className="Part",jn.LayoutNone=0,jn.LayoutAdded=1,jn.LayoutRemoved=2,jn.LayoutShown=4,jn.LayoutHidden=8,jn.LayoutNodeSized=16,jn.LayoutGroupLayout=32,jn.LayoutNodeReplaced=64,jn.LayoutStandard=127,jn.LayoutAll=16777215;function Wi(a,y){a===void 0||a instanceof ir||typeof a=="string"?jn.call(this,a):(jn.call(this),a&&(y=a)),this.G&=-257,this.Jg="Adornment",this.ue=null,this.Aw=0,this.Uw=!1,this.j=this.$a=null,y&&Object.assign(this,y)}ue(Wi,jn),Wi.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},Wi.prototype.updateRelationshipsFromData=function(){},Wi.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof tn&&y instanceof yi){y=x.path,x.Ul(a),a=y.geometry,x=this.O.s,y=x.length;for(var E=0;E<y;E++){var b=x[E];b.isPanelMain&&b instanceof yi&&(b.ua=a)}}},Wi.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!bs(a))},Wi.prototype.Zc=function(){return!1},Wi.prototype.gk=function(a,y,x,E,b,z,tt){if(a===to&&y==="elements"){if(b instanceof ra)this.$a===null&&(this.$a=b);else if(b instanceof ze){var rt=b.Nl(function(ot){return ot instanceof ra});rt instanceof ra&&this.$a===null&&(this.$a=rt)}}else a===Co&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof ze&&this.$a.rg(E)&&(this.$a=null));jn.prototype.gk.call(this,a,y,x,E,b,z,tt)},Wi.prototype.updateAdornments=function(){},Wi.prototype.Lj=function(){},Ie.Object.defineProperties(Wi.prototype,{placeholder:{get:function(){return this.$a}},adornedObject:{get:function(){return this.ue},set:function(a){var y=this.adornedPart,x=null;a!==null&&(x=a.part),y===null||a!==null&&y===x||y.Jf(this.category),this.ue=a,x!==null&&x.bh(this.category,this)}},adornedPart:{get:function(){var a=this.ue;return a!==null?a.part:null}},containingGroup:{get:function(){return null}}}),Wi.className="Adornment";function nv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=fg,this.er=x0,this.Kr=this.ij=this.Nq=this.Mq=null}nv.prototype.copy=function(){var a=new nv;return a.Dq=this.Dq,a.Eq=this.Eq,a.gj=this.gj,a.Vr=this.Vr,a.yp=this.yp.J(),a.er=this.er,a.Mq=this.Mq,a.Nq=this.Nq,a.ij=this.ij,a.Kr=this.Kr,a};function hn(a,y){a===void 0||a instanceof ir||typeof a=="string"?jn.call(this,a):(jn.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new Ke,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}ue(hn,jn),hn.prototype.cloneProtected=function(a){jn.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},Bt=hn.prototype,Bt.Af=function(a){jn.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function Jh(a){a.Ba===null?a.Ba=new nv:a.Ba.nc&&(a.Ba=a.Ba.copy())}Bt.th=function(){jn.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function jy(a,y){y!==null&&(a.af===null&&(a.af=new Ye),a.af.add(y))}function Ky(a,y,x,E){if(y===null||a.af===null)return null;for(var b=a.af.iterator;b.next();){var z=b.value;if(z.Ds===a&&z.cv===y&&z.Ox===x&&z.Px===E||z.Ds===y&&z.cv===a&&z.Ox===E&&z.Px===x)return z}return null}Bt.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=Ky(this,a,y,x),a!==null&&a.Sl()},Bt.gk=function(a,y,x,E,b,z,tt){a===to&&y==="elements"?this.wc=null:a===Co&&y==="elements"&&(this.wc=null),jn.prototype.gk.call(this,a,y,x,E,b,z,tt)},Bt.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Xa(x.fromPort),Xa(x.toPort),x.bb())}};function zy(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Xa(x.fromPort),Xa(x.toPort),x.bb())}}function Xa(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Xa(y.port)}}Bt.si=function(){return!0},hn.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},hn.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},hn.prototype.isVisible=function(){if(!jn.prototype.isVisible.call(this))return!1;var a=!0,y=wu,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===wu){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===po){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(E){return!E.isTreeExpanded}))return!1}else if(y===HA&&(a=a?this.Oo():this.Po(),0<a.count&&a.any(function(E){return!E.isTreeExpanded})))return!1;return a=this.labeledLink,a!==null?a.isVisible():!0},hn.prototype.Zb=function(a){jn.prototype.Zb.call(this,a);for(var y=this.linksConnected;y.next();){var x=y.value;if(a&&this.containingGroup!==null){var E=x.To(this);E===null||E.Td(this.containingGroup)||x.bb()}x.Zb(a)}},hn.prototype.qx=function(){var a=new Ye,y=new Ye;return Vy(this,this,a,y),y.iterator};function Vy(a,y,x,E){if(y!==null&&!x.has(y)){x.add(y);var b=!0,z=a.diagram;z!==null&&(b=z.isTreePathToChildren),y.linksConnected.each(function(tt){tt.isTreeLink?(b?tt.fromNode===y:tt.toNode===y)&&Vy(a,b?tt.toNode:tt.fromNode,x,E):E.add(tt)})}}hn.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new Ni(this.jb),x=this;return y.predicate=function(E){return E.fromNode===x&&E.fromPortId===a||E.toNode===x&&E.toPortId===a},y},Bt=hn.prototype,Bt.Mo=function(a){a===void 0&&(a=null);var y=new Ni(this.jb),x=this;return y.predicate=function(E){return E.fromNode!==x?!1:a===null?!0:E.fromPortId===a},y},Bt.Sd=function(a){a===void 0&&(a=null);var y=new Ni(this.jb),x=this;return y.predicate=function(E){return E.toNode!==x?!1:a===null?!0:E.toPortId===a},y},Bt.Mu=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.fromNode===this?(a===null||b.fromPortId===a)&&(b=b.toNode,y!==null?y.add(b):x!==null&&x!==b?(y=new Ye,y.add(x),y.add(b)):x=b):b.toNode!==this||a!==null&&b.toPortId!==a||(b=b.fromNode,y!==null?y.add(b):x!==null&&x!==b?(y=new Ye,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new ci(x):xi},Bt.Po=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.fromNode!==this||a!==null&&b.fromPortId!==a||(b=b.toNode,y!==null?y.add(b):x!==null&&x!==b?(y=new Ye,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new ci(x):xi},Bt.Oo=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.toNode!==this||a!==null&&b.toPortId!==a||(b=b.fromNode,y!==null?y.add(b):x!==null&&x!==b?(y=new Ye,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new ci(x):xi},Bt.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new Ni(this.jb),b=this;return E.predicate=function(z){return!((z.fromNode!==b||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)&&(z.fromNode!==a||z.toNode!==b||x!==null&&z.fromPortId!==x||y!==null&&z.toPortId!==y))},E},Bt.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new Ni(this.jb),b=this;return E.predicate=function(z){return!(z.fromNode!==b||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)},E};function w0(a,y,x){Xa(x);var E=a.jb.contains(y);if(E||a.jb.add(y),!E||y.fromNode===y.toNode){var b=a.linkConnected;if(b!==null){var z=!0,tt=a.diagram;tt!==null&&(z=tt.aa,tt.aa=!0),b(a,y,x),tt!==null&&(tt.aa=z)}}!E&&y.isTreeLink&&(x=y.fromNode,y=y.toNode,x!==null&&y!==null&&x!==y&&(E=!0,a=a.diagram,a!==null&&(E=a.isTreePathToChildren),b=E?y:x,z=E?x:y,b.ci||(b.ci=z),!z.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(E?x===z&&(z.isTreeLeaf=!1):y===z&&(z.isTreeLeaf=!1))))}function S0(a,y,x){Xa(x);var E=a.jb.remove(y),b=null;if(E||y.toNode===y.fromNode){var z=a.linkDisconnected;if(b=a.diagram,z!==null){var tt=!0;b!==null&&(tt=b.aa,b.aa=!0),z(a,y,x),b!==null&&(b.aa=tt)}}E&&y.isTreeLink&&(x=!0,b!==null&&(x=b.isTreePathToChildren),a=x?y.toNode:y.fromNode,y=x?y.fromNode:y.toNode,a!==null&&(a.ci=!1),y===null||y.isTreeLeaf||(y.jb.count===0?(y.ci=null,b!==null&&b.undoManager.isUndoingRedoing||(y.isTreeLeaf=!0)):hp(y)))}function hp(a){if(a.ci=!1,a.jb.count!==0){var y=!0,x=a.diagram;if(x===null||!x.undoManager.isUndoingRedoing){for(x!==null&&(y=x.isTreePathToChildren),x=a.jb.iterator;x.next();){var E=x.value;if(E.isTreeLink){if(y){if(E.fromNode===a){a.isTreeLeaf=!1;return}}else if(E.toNode===a){a.isTreeLeaf=!1;return}}}a.isTreeLeaf=!0}}}hn.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},Bt=hn.prototype,Bt.Vo=function(a){jn.prototype.Vo.call(this,a),a||(hp(this),a=this.Yk,a!==null&&tw(a,this))},Bt.Wo=function(a){jn.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},Bt.Lj=function(){if(0<this.jb.count){var a=this.diagram;if(a!==null)for(var y=a.commandHandler!==null?a.commandHandler.deletesConnectedLinks:!0,x=this.jb.copy().iterator;x.next();){var E=x.value;y?a.remove(E):(E.fromNode===this&&(E.fromNode=null),E.toNode===this&&(E.toNode=null))}}this.labeledLink=null,jn.prototype.Lj.call(this)},Bt.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;Wy(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function Wy(a){a.wc===null?a.wc=new Rn:a.wc.clear(),a.qm(a,function(y,x){_y(y,x)}),a.wc.count===0&&a.wc.add("",a)}function _y(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function iv(a,y,x){var E=y.portId;if(E!==null&&(a.wc!==null&&a.wc.remove(E),y=a.diagram,y!==null&&x)){for(x=null,a=a.findLinksConnected(E);a.next();)E=a.value,x===null&&(x=Ce()),x.push(E);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Oe(x)}}}Bt.Nz=function(a){if(a===null||a===this)return!1;var y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this,y)for(;x!==a;){y=null;for(var E=x.jb.iterator;E.next();){var b=E.value;if(b.isTreeLink&&(y=b.fromNode,y!==x&&y!==this))break}if(y===this||y===null||y===x)return!1;x=y}else for(;x!==a;){for(y=null,E=x.jb.iterator;E.next()&&(b=E.value,!b.isTreeLink||(y=b.toNode,y===x||y===this)););if(y===this||y===null||y===x)return!1;x=y}return!0},Bt.xz=function(){var a=!0,y=this.diagram;if(y!==null&&(a=y.isTreePathToChildren),y=this,a)for(;;){a=null;for(var x=y.jb.iterator;x.next();){var E=x.value;if(E.isTreeLink&&(a=E.fromNode,a!==y&&a!==this))break}if(a===this)return this;if(a===null||a===y)return y;y=a}else for(;;){for(a=null,x=y.jb.iterator;x.next()&&(E=x.value,!E.isTreeLink||(a=E.toNode,a===y||a===this)););if(a===this)return this;if(a===null||a===y)return y;y=a}},Bt.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)y0(y,!0),y=y.pg();var x=null;for(y=a;y!==null;){if(y.G&1048576){x=y;break}y=y.pg()}for(y=this;y!==null;)y0(y,!1),y=y.pg();return x},Bt.kh=function(){var a=!0,y=this.diagram;if(y!==null&&(a=y.isTreePathToChildren),y=this.jb.iterator,a){for(;y.next();)if(a=y.value,a.isTreeLink&&a.fromNode!==this)return a}else for(;y.next();)if(a=y.value,a.isTreeLink&&a.toNode!==this)return a;return null},Bt.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof hn)return a;a=this.diagram,a=a!==null?a.isTreePathToChildren:!0;for(var y=this.jb.iterator;y.next();){var x=y.value;if(x.isTreeLink&&(x=a?x.fromNode:x.toNode,x!==this))return this.ci=x}return this.ci=null},Bt.vz=function(){function a(x,E){E.add(x);var b=x.kh();b!==null&&(E.add(b),x=x.pg(),x!==null&&a(x,E))}var y=new Ye;return a(this,y),y},Bt.uz=function(){return Yy(this,this)};function Yy(a,y){return y=y.pg(),y===null?0:1+Yy(a,y)}Bt.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new Ni(this.jb);var x=this;return y.predicate=a?function(E){return!!(E.isTreeLink&&E.fromNode===x)}:function(E){return!!(E.isTreeLink&&E.toNode===x)},y},Bt.Ou=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren);var x=y=null,E=this.jb.iterator;if(a)for(;E.next();)a=E.value,a.isTreeLink&&a.fromNode===this&&(a=a.toNode,y!==null?y.add(a):x!==null&&x!==a?(y=new Ke,y.add(x),y.add(a)):x=a);else for(;E.next();)a=E.value,a.isTreeLink&&a.toNode===this&&(a=a.fromNode,y!==null?y.add(a):x!==null&&x!==a?(y=new Ke,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new ci(x):xi},Bt.wz=function(a){a===void 0&&(a=1/0);var y=new Ye;return jg(y,this,!1,a,!0),y},hn.prototype.collapseTree=function(a){a===void 0&&(a=1),1>a&&(a=1);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new Ye;x.add(this),Xy(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===wu),y.Ue=!1}};function Xy(a,y,x,E,b,z,tt){if(1<E)for(var rt=x?a.Mo():a.Sd();rt.next();){var ot=rt.value;ot.isTreeLink&&(ot=ot.To(a),ot===null||ot===a||y.contains(ot)||(y.add(ot),Xy(ot,y,x,E-1,b,z,tt)))}else Zy(a,y,x,b,z,tt)}function Zy(a,y,x,E,b,z){for(var tt=b===a?!0:a.isTreeExpanded,rt=x?a.Mo():a.Sd(),ot={};rt.next();){var at=rt.value;if(at.isTreeLink&&(at=at.To(a),at!==null&&at!==a)){var At=y.contains(at);if(At||y.add(at),tt){var ft=x?at.Oo():at.Po();ot.uv=a,ft.all(function(pt){return function(xt){return xt===pt.uv||!xt.isTreeExpanded}}(ot))&&E.Aj(at,b),at.oh(),at.Zb(!1)}at.isTreeExpanded&&(at.wasTreeExpanded=at.isTreeExpanded,At||Zy(at,y,x,E,b,z))}ot={uv:ot.uv}}a.isTreeExpanded=!1}hn.prototype.expandTree=function(a){a===void 0&&(a=2),2>a&&(a=2);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new Ye;x.add(this),Jy(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===wu),y.Ue=!1}};function Jy(a,y,x,E,b,z,tt){for(var rt=z===a?!1:a.isTreeExpanded,ot=x?a.Mo():a.Sd(),at={};ot.next();){var At=ot.value;if(At.isTreeLink&&(rt||At.fd||At.bb(),At=At.To(a),At!==null&&At!==a&&!y.contains(At))){if(y.add(At),!rt){At.Zb(!0),At.oh();var ft=x?At.Oo():At.Po();at.vv=a,ft.all(function(pt){return function(xt){return xt===pt.vv||!xt.isTreeExpanded}}(at))&&b.Cj(At,z)}(2<E||At.wasTreeExpanded)&&(At.wasTreeExpanded=!1,Jy(At,y,x,E-1,b,z,tt))}at={vv:at.vv}}a.isTreeExpanded=!0}Ie.Object.defineProperties(hn.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:x0},set:function(a){var y=this.portSpreading;y!==a&&(Jh(this),this.Ba.er=a,this.g("portSpreading",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.Bd())}},avoidable:{get:function(){return(this.U&8)!==0},set:function(a){var y=(this.U&8)!==0;if(y!==a){this.U^=8;var x=this.diagram;x!==null&&Zl(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:fg},set:function(a){typeof a=="number"&&(a=new Pi(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),Jh(this),this.Ba.yp=a;var x=this.diagram;x!==null&&Zl(x,this),this.g("avoidableMargin",y,a)}}},linksConnected:{get:function(){return this.jb.iterator}},linkConnected:{get:function(){return this.Ba!==null?this.Ba.Dq:null},set:function(a){var y=this.linkConnected;y!==a&&(Jh(this),this.Ba.Dq=a,this.g("linkConnected",y,a))}},linkDisconnected:{get:function(){return this.Ba!==null?this.Ba.Eq:null},set:function(a){var y=this.linkDisconnected;y!==a&&(Jh(this),this.Ba.Eq=a,this.g("linkDisconnected",y,a))}},linkValidation:{get:function(){return this.Ba!==null?this.Ba.gj:null},set:function(a){var y=this.linkValidation;y!==a&&(Jh(this),this.Ba.gj=a,this.g("linkValidation",y,a))}},isLinkLabel:{get:function(){return this.Yk!==null}},labeledLink:{get:function(){return this.Yk},set:function(a){var y=this.Yk;if(y!==a){var x=this.diagram,E=this.data;if(y!==null){if(y.wd!==null&&(y.wd.remove(this),y.v()),x!==null&&E!==null&&!x.undoManager.isUndoingRedoing){var b=y.data,z=x.model;if(b!==null&&z.ri()){var tt=z.wa(E);tt!==void 0&&z.Qx(b,tt)}}this.containingGroup=null}this.Yk=a,a!==null&&(tw(a,this),x===null||E===null||x.undoManager.isUndoingRedoing||(b=a.data,x=x.model,b!==null&&x.ri()&&(E=x.wa(E),E!==void 0&&x.Bu(b,E))),this.containingGroup=a.containingGroup),Po(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&Wy(this),this.wc.iteratorValues}},isTreeExpanded:{get:function(){return(this.U&1)!==0},set:function(a){var y=(this.U&1)!==0;if(y!==a){this.U^=1;var x=this.diagram;if(this.g("isTreeExpanded",y,a),y=this.treeExpandedChanged,y!==null){var E=!0;x!==null&&(E=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=E)}x!==null&&x.undoManager.isUndoingRedoing?this.Zb(a):a?this.expandTree():this.collapseTree()}}},wasTreeExpanded:{get:function(){return(this.U&2)!==0},set:function(a){var y=(this.U&2)!==0;y!==a&&(this.U^=2,this.g("wasTreeExpanded",y,a))}},treeExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Vr:null},set:function(a){var y=this.treeExpandedChanged;y!==a&&(Jh(this),this.Ba.Vr=a,this.g("treeExpandedChanged",y,a))}},isTreeLeaf:{get:function(){return(this.U&4)!==0},set:function(a){var y=(this.U&4)!==0;y!==a&&(this.U^=4,this.g("isTreeLeaf",y,a))}}}),hn.prototype.expandTree=hn.prototype.expandTree,hn.prototype.collapseTree=hn.prototype.collapseTree,hn.prototype.findTreeParts=hn.prototype.wz,hn.prototype.findTreeChildrenNodes=hn.prototype.Ou,hn.prototype.findTreeChildrenLinks=hn.prototype.Qo,hn.prototype.findTreeLevel=hn.prototype.uz,hn.prototype.findTreeParentChain=hn.prototype.vz,hn.prototype.findTreeParentNode=hn.prototype.pg,hn.prototype.findTreeParentLink=hn.prototype.kh,hn.prototype.findCommonTreeParent=hn.prototype.gz,hn.prototype.findTreeRoot=hn.prototype.xz,hn.prototype.isInTreeOf=hn.prototype.Nz,hn.prototype.findPort=hn.prototype.ns,hn.prototype.findLinksTo=hn.prototype.kz,hn.prototype.findLinksBetween=hn.prototype.jz,hn.prototype.findNodesInto=hn.prototype.Oo,hn.prototype.findNodesOutOf=hn.prototype.Po,hn.prototype.findNodesConnected=hn.prototype.Mu,hn.prototype.findLinksInto=hn.prototype.Sd,hn.prototype.findLinksOutOf=hn.prototype.Mo,hn.prototype.findExternalTreeLinksConnected=hn.prototype.qx,hn.prototype.invalidateConnectedLinks=hn.prototype.Bd,hn.prototype.invalidateLinkBundle=hn.prototype.Lz;var C1=new ce(hn,"SpreadingNone",10),x0=new ce(hn,"SpreadingEvenly",11),rv=new ce(hn,"SpreadingPacked",12);hn.className="Node",hn.SpreadingNone=C1,hn.SpreadingEvenly=x0,hn.SpreadingPacked=rv;function li(a,y){a===void 0||a instanceof ir||typeof a=="string"?hn.call(this,a):(hn.call(this),a&&(y=a)),this.U|=4608,this.Gn=new Ye,this.$a=null,this.Sc=new Ir,this.Sc.group=this,this.gl=new Ye,this.tb=this.$p=null,y&&Object.assign(this,y)}ue(li,hn),li.prototype.cloneProtected=function(a){hn.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof ra});y instanceof ra?a.$a=y:a.$a=null,this.Sc!==null?(a.Sc=this.Sc.copy(),a.Sc.group=a):(a.Sc!==null&&(a.Sc.group=null),a.Sc=null),this.tb!==null&&(a.tb=this.tb.copy())},Bt=li.prototype,Bt.Af=function(a){hn.prototype.Af.call(this,a);var y=a.Rj();for(a=a.memberParts;a.next();){var x=a.value;if(x.v(),x.C(8),x.Ej(),x instanceof hn)x.Bd(y);else if(x instanceof tn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},Bt.gk=function(a,y,x,E,b,z,tt){if(a===to&&y==="elements"){if(b instanceof ra)this.$a===null?this.$a=b:this.$a!==b&&pe("Cannot insert a second Placeholder into the visual tree of a Group.");else if(b instanceof ze){var rt=b.Nl(function(ot){return ot instanceof ra});rt instanceof ra&&(this.$a===null?this.$a=rt:this.$a!==rt&&pe("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===Co&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof ze&&this.$a.rg(E)&&(this.$a=null));hn.prototype.gk.call(this,a,y,x,E,b,z,tt)},Bt.Xl=function(a,y){hn.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==ze.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof ze&&(a=a.Pb()),this.tb===null&&(this.tb=new Me),a.mi(this.tb),a instanceof yi&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},Bt.eh=function(a,y,x,E){this.nf=this.$a,hn.prototype.eh.call(this,a,y,x,E)},Bt.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof tn||y.Va()}),hn.prototype.Va.call(this)},Bt.si=function(){if(!hn.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof hn){if(y.isVisible()&&bs(y))return!1}else if(y instanceof tn&&y.isVisible()&&bs(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function ov(a,y){if(a.Gn.add(y)){y instanceof li&&a.gl.add(y);var x=a.memberAdded;if(x!==null){var E=!0,b=a.diagram;b!==null&&(E=b.aa,b.aa=!0),x(a,y),b!==null&&(b.aa=E)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!1)}y instanceof tn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function sv(a,y){if(a.Gn.remove(y)){y instanceof li&&a.gl.remove(y);var x=a.memberRemoved;if(x!==null){var E=!0,b=a.diagram;b!==null&&(E=b.aa,b.aa=!0),x(a,y),b!==null&&(b.aa=E)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!0)}y instanceof tn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}Bt.Lj=function(){if(0<this.Gn.count){var a=this.diagram;if(a!==null)for(var y=this.Gn.copy().iterator;y.next();)a.remove(y.value)}hn.prototype.Lj.call(this)},li.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=Pe(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},li.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var E=!0;for(a=Pe(a).iterator;a.next();){var b=a.value;!y||x.isValidMember(this,b)?b.containingGroup=this:E=!1}return E},li.prototype.canUngroup=function(){if(!this.ungroupable)return!1;var a=this.layer;return a===null||!a.allowUngroup?!1:(a=a.diagram,!!(a===null||a.allowUngroup))},Bt=li.prototype,Bt.Bd=function(a){var y=(this.U&65536)!==0;if(hn.prototype.Bd.call(this,a),!y)for(!(this.U&65536)&&(this.U=this.U^65536),y=this.Lu();y.next();){var x=y.value;if(a===void 0||!a.contains(x)){var E=x.fromNode;E!==null&&E!==this&&E.Td(this)&&!E.isVisible()?(Xa(x.fromPort),Xa(x.toPort),x.bb()):(E=x.toNode,E!==null&&E!==this&&E.Td(this)&&!E.isVisible()&&(Xa(x.fromPort),Xa(x.toPort),x.bb()))}}},Bt.Lu=function(){var a=this.diagram!==null&&this.diagram.Pw;if(a&&this.$p!==null)return this.$p.iterator;var y=this.Rj();y.add(this);for(var x=new Ye,E=y.iterator;E.next();){var b=E.value;if(b instanceof hn)for(b=b.linksConnected;b.next();){var z=b.value;y.contains(z)||x.add(z)}}return a&&(this.$p=x),x.iterator},Bt.iz=function(){var a=this.Rj();a.add(this);for(var y=new Ye,x=a.iterator;x.next();){var E=x.value;if(E instanceof hn)for(E=E.linksConnected;E.next();){var b=E.value,z=b.fromNode;z===null||a.contains(z)&&z!==this||y.add(z),b=b.toNode,b===null||a.contains(b)&&b!==this||y.add(b)}}return y.iterator},Bt.hz=function(){function a(x,E){x!==null&&(E.add(x),a(x.containingGroup,E))}var y=new Ye;return a(this,y),y},Bt.Rj=function(){var a=new Ye;return jg(a,this,!0,0,!0),a.remove(this),a},Bt.Zb=function(a){hn.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},li.prototype.collapseSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();qy(this,y,a,this),a.Ue=!1}};function qy(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!1),z instanceof li&&z.isSubGraphExpanded&&(z.wasSubGraphExpanded=z.isSubGraphExpanded,qy(z,y,x,E)),z instanceof hn)z.Bd(y),x.Aj(z,E);else if(z instanceof tn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}li.prototype.expandSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();$y(this,y,a,this),a.Ue=!1}};function $y(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!0),z instanceof li&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,$y(z,y,x,E)),z instanceof hn)z.Bd(y),x.Cj(z,E);else if(z instanceof tn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}li.prototype.move=function(a,y){y===void 0&&(y=!1);var x=y?this.location:this.position,E=x.x;x=x.y;var b=a.x,z=a.y;if(!(E===b||isNaN(E)&&isNaN(b))||!(x===z||isNaN(x)&&isNaN(z))){for(E=b-(isNaN(E)?0:E),x=z-(isNaN(x)?0:x),z=Rt.alloc(),hn.prototype.move.call(this,a,y),a=new Ye,y=this.Rj().iterator;y.next();)b=y.value,b instanceof tn&&(b.suspendsRouting&&a.add(b),b.fd||b.fromNode!==this&&b.toNode!==this)&&(b.suspendsRouting=!0);for(y.reset();y.next();)if(b=y.value,!(b.ph()||b instanceof hn&&b.isLinkLabel)){var tt=b.position,rt=b.location;tt.w()?(z.x=tt.x+E,z.y=tt.y+x,b.position=z):rt.w()&&(z.x=rt.x+E,z.y=rt.y+x,b.location=z)}for(y.reset();y.next();)b=y.value,b instanceof tn&&(b.suspendsRouting=a.contains(b),b.fd||b.fromNode!==this&&b.toNode!==this)&&(tt=b.position,z.x=tt.x+E,z.y=tt.y+x,z.w()?b.move(z):b.bb(),lv(b)&&b.bb());Rt.free(z)}},Ie.Object.defineProperties(li.prototype,{placeholder:{get:function(){return this.$a}},computesBoundsAfterDrag:{get:function(){return(this.U&2048)!==0},set:function(a){var y=(this.U&2048)!==0;y!==a&&(this.U^=2048,this.g("computesBoundsAfterDrag",y,a))}},computesBoundsIncludingLinks:{get:function(){return(this.U&4096)!==0},set:function(a){var y=(this.U&4096)!==0;y!==a&&(this.U^=4096,this.g("computesBoundsIncludingLinks",y,a))}},computesBoundsIncludingLocation:{get:function(){return(this.U&8192)!==0},set:function(a){var y=(this.U&8192)!==0;y!==a&&(this.U^=8192,this.g("computesBoundsIncludingLocation",y,a))}},handlesDragDropForMembers:{get:function(){return(this.U&16384)!==0},set:function(a){var y=(this.U&16384)!==0;y!==a&&(this.U^=16384,this.g("handlesDragDropForMembers",y,a))}},memberParts:{get:function(){return this.Gn.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;if(y!==a){a!==null&&a.diagram!==null&&a.diagram.layout===a&&pe("A layout cannot be both the Diagram.layout and a Group.layout: "+a),y!==null&&(y.diagram=null,y.group=null),this.Sc=a;var x=this.diagram;a!==null&&(a.diagram=x,a.group=this),x!==null&&(x.xh=!0),this.g("layout",y,a),x!==null&&x.$b()}}},memberAdded:{get:function(){return this.Ba!==null?this.Ba.Mq:null},set:function(a){var y=this.memberAdded;y!==a&&(Jh(this),this.Ba.Mq=a,this.g("memberAdded",y,a))}},memberRemoved:{get:function(){return this.Ba!==null?this.Ba.Nq:null},set:function(a){var y=this.memberRemoved;y!==a&&(Jh(this),this.Ba.Nq=a,this.g("memberRemoved",y,a))}},memberValidation:{get:function(){return this.Ba!==null?this.Ba.ij:null},set:function(a){var y=this.memberValidation;y!==a&&(Jh(this),this.Ba.ij=a,this.g("memberValidation",y,a))}},ungroupable:{get:function(){return(this.U&256)!==0},set:function(a){var y=(this.U&256)!==0;y!==a&&(this.U^=256,this.g("ungroupable",y,a))}},isSubGraphExpanded:{get:function(){return(this.U&512)!==0},set:function(a){var y=(this.U&512)!==0;if(y!==a){this.U^=512;var x=this.diagram;if(this.g("isSubGraphExpanded",y,a),y=this.subGraphExpandedChanged,y!==null){var E=!0;x!==null&&(E=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=E)}x!==null&&x.undoManager.isUndoingRedoing?(this.$a!==null&&this.$a.v(),this.memberParts.each(function(b){b.updateAdornments()})):a?this.expandSubGraph():this.collapseSubGraph()}}},wasSubGraphExpanded:{get:function(){return(this.U&1024)!==0},set:function(a){var y=(this.U&1024)!==0;y!==a&&(this.U^=1024,this.g("wasSubGraphExpanded",y,a))}},subGraphExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Kr:null},set:function(a){var y=this.subGraphExpandedChanged;y!==a&&(Jh(this),this.Ba.Kr=a,this.g("subGraphExpandedChanged",y,a))}},rh:{get:function(){return(this.U&32768)!==0},set:function(a){(this.U&32768)!==0!==a&&(this.U^=32768)}}}),li.prototype.expandSubGraph=li.prototype.expandSubGraph,li.prototype.collapseSubGraph=li.prototype.collapseSubGraph,li.prototype.findSubGraphParts=li.prototype.Rj,li.prototype.findContainingGroupChain=li.prototype.hz,li.prototype.findExternalNodesConnected=li.prototype.iz,li.prototype.findExternalLinksConnected=li.prototype.Lu,li.prototype.ensureBounds=li.prototype.Va,li.className="Group";function ra(a){te.call(this),this.yb=El,this.ko=new Me(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}ue(ra,te),ra.prototype.cloneProtected=function(a){te.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},ra.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return $o(0,0,y.width,y.height,a.x,a.y)},ra.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof li||a instanceof Wi)||pe("Placeholder is not inside a Group or Adornment."),a instanceof li){var y=this.computeBorder(this.ko),x=this.minSize,E=this.dc;for(fa(E,(isFinite(x.width)?Math.max(x.width,y.width):y.width)||0,(isFinite(x.height)?Math.max(x.height,y.height):y.height)||0),this.Ge(0,0,E.width,E.height),E=a.memberParts,x=!1;E.next();)if(E.value.isVisible()){x=!0;break}E=a.diagram,!x||E===null||E.animationManager.Xu(a)||isNaN(y.x)||isNaN(y.y)||(x=Rt.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),Rt.free(x))}else{y=this.dc,x=this.yb,E=x.left+x.right;var b=x.top+x.bottom,z=a.adornedObject;a.angle=z.li();var tt=0;z instanceof yi&&(tt=z.strokeWidth);var rt=z.Df(),ot=z.naturalBounds,at=(ot.width+tt)*rt;tt=(ot.height+tt)*rt,a.type!==ze.Link&&(rt=z.ga(a.category==="Selection"?es:a.locationSpot,Rt.alloc()),a.location=rt,Rt.free(rt)),isNaN(at)||isNaN(tt)?(a=z.ga(es,Rt.alloc()),at=Me.allocAt(a.x,a.y,0,0),at.Ye(z.ga(Pa,a)),at.Ye(z.ga(Du,a)),at.Ye(z.ga(lA,a)),fa(y,at.width+E||0,at.height+b||0),this.Ge(-x.left,-x.top,y.width,y.height),Rt.free(a),Me.free(at)):(fa(y,at+E||0,tt+b||0),this.Ge(-x.left,-x.top,y.width,y.height))}},ra.prototype.eh=function(a,y,x,E){this.actualBounds.h(a,y,x,E)},ra.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,E=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof li&&!y.layer.isTemporary&&y.computesBoundsAfterDrag&&this.ko.w()){var b=x.toolManager.findTool("Dragging");if(b===x.currentTool&&(x=b.computeBorder(y,this.ko,a),x!==null))return x}x=Me.alloc(),b=this.computeMemberBounds(x);var z=this.yb;return y instanceof li&&!y.isSubGraphExpanded?a.h(b.x-z.left,b.y-z.top,0,0):a.h(b.x-z.left,b.y-z.top,Math.max(b.width+z.left+z.right,0),Math.max(b.height+z.top+z.bottom,0)),Me.free(x),E&&y instanceof li&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},ra.prototype.computeMemberBounds=function(a){if(!(this.part instanceof li))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,E=1/0,b=-1/0,z=-1/0,tt=y.memberParts;tt.next();){var rt=tt.value;if(rt.isVisible()){if(rt instanceof tn&&(!y.computesBoundsIncludingLinks||Na(rt)||rt.fromNode===y||rt.toNode===y))continue;rt=rt.actualBounds,rt.left<x&&(x=rt.left),rt.top<E&&(E=rt.top),rt.right>b&&(b=rt.right),rt.bottom>z&&(z=rt.bottom)}}return isFinite(x)&&isFinite(E)?a.h(x,E,b-x,z-E):(y=y.location,a.h(y.x,y.y,0,0)),a},Ie.Object.defineProperties(ra.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Pi(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),ra.className="Placeholder";function tn(a){jn.call(this,ze.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=oa,this.Om=0,this.Qm=oa,this.Rm=NaN,this.qj=hv,this.po=.5,this.wd=null,this.Nb=new Ke().freeze(),this.Tg=this.Mg=null,this.ml=new Me,this.ua=new rn,this.u=this.o=this.Sf=this.Wf=null,this.su=new Rt,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}ue(tn,jn),tn.prototype.cloneProtected=function(a){jn.prototype.cloneProtected.call(this,a),a.Qa=this.Qa&-113,a.ff=this.ff,a.gn=this.gn,a.vf=this.vf,a.uo=this.uo,a.qk=this.qk,a.Om=this.Om,a.Qm=this.Qm,a.Rm=this.Rm,a.qj=this.qj,a.po=this.po,this.ba!==null&&(a.ba=this.ba.copy())},Bt=tn.prototype,Bt.Af=function(a){jn.prototype.Af.call(this,a),this.ff=a.ff,this.vf=a.vf,a.Mg=null,a.bb(),a.Sf=this.Sf;var y=a.fromPort;y!==null&&Xa(y),a=a.toPort,a!==null&&Xa(a)},Bt.qb=function(a){a.classType===tn?(a.value&2)===2?this.routing=a:a===Al||a===$h||a===Lc?this.curve=a:a===dp||a===E0||a===M0?this.adjusting=a:a!==hv&&a!==oa&&pe("Unknown Link enum value for a Link property: "+a):jn.prototype.qb.call(this,a)},Bt.Xc=function(){this.ba===null&&(this.ba=new kd)},Bt.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),bs(a)||Rg(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),bs(a)||Rg(a)))},Bt.zv=function(){return!1},Bt.Av=function(){},Bt.Zc=function(){return!1},tn.prototype.computeAngle=function(a,y,x){return tn.computeAngle(y,x)},tn.computeAngle=function(a,y){switch(a){default:case oa:a=0;break;case cp:a=y;break;case pp:a=y+90;break;case mp:a=y-90;break;case gv:a=y+180;break;case k0:a=re.bp(y),90<a&&270>a&&(a-=180);break;case vp:a=re.bp(y+90),90<a&&270>a&&(a-=180);break;case yp:a=re.bp(y-90),90<a&&270>a&&(a-=180);break;case b0:if(a=re.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return re.bp(a)};function Pc(a){var y=a.fromNode,x=a.toNode,E=null;if(y!==null?E=x!==null?y.px(x):y.containingGroup:x!==null?E=x.containingGroup:E=null,y=E,x=a.Ah,x!==y){x!==null&&sv(x,a),a.Ah=y,y!==null&&ov(y,a);var b=a.containingGroupChanged;if(b!==null){var z=!0,tt=a.diagram;tt!==null&&(z=tt.aa,tt.aa=!0),b(a,x,y),tt!==null&&(tt.aa=z)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=E}Bt=tn.prototype,Bt.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&jn.prototype.oh.call(this)},Bt.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},Bt.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function tw(a,y){a.wd===null&&(a.wd=new Ye),a.wd.add(y),a.v()}Bt.Vo=function(a){if(jn.prototype.Vo.call(this,a),Vf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,w0(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||w0(x,this,E)}gp(this)}},Bt.Wo=function(a){if(jn.prototype.Wo.call(this,a),Vf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,S0(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||S0(x,this,E)}fp(this)}},Bt.Lj=function(){if(this.fd=!0,this.wd!==null){var a=this.diagram;if(a!==null)for(var y=this.wd.copy().iterator;y.next();)a.remove(y.value)}this.data!==null&&(a=this.diagram,a!==null&&a.partManager.removeDataForLink(this))},tn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},tn.prototype.move=function(a,y){var x=y?this.location:this.position,E=x.x;isNaN(E)&&(E=0);var b=x.y;for(isNaN(b)&&(b=0),E=a.x-E,b=a.y-b,y===!0?jn.prototype.move.call(this,a,!1):(a=Rt.allocAt(x.x+E,x.y+b),jn.prototype.move.call(this,a,!1),Rt.free(a)),qh(this,E,b),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+E,x.y+b)},tn.prototype.canRelinkFrom=function(){if(!this.relinkableFrom)return!1;var a=this.layer;return a===null?!0:a.allowRelink?(a=a.diagram,!!(a===null||a.allowRelink)):!1},tn.prototype.canRelinkTo=function(){if(!this.relinkableTo)return!1;var a=this.layer;return a===null?!0:a.allowRelink?(a=a.diagram,!!(a===null||a.allowRelink)):!1},tn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(os),a;if(y===1)return a.assign(this.i(0)),a;if(y===2){var x=this.i(0),E=this.i(1);return a.h((x.x+E.x)/2,(x.y+E.y)/2),a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===Al))return this.ua.Pu(.5,a),a.add(this.i(0)),x=this.ua.figures.first(),a.offset(-x.startX,-x.startY),a;if(this.computeCurve()===Al){if(y===3){x=this.i(0),E=this.i(1);var b=this.i(2);return re.ax(x.x,x.y,E.x,E.y,E.x,E.y,b.x,b.y,a),a}if(E=(y-1)/3|0,x=3*(E/2|0),E%2===1){E=this.i(x),b=this.i(x+1);var z=this.i(x+2);x=this.i(x+3),re.ax(E.x,E.y,b.x,b.y,z.x,z.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var tt=this.flattenedLengths;for(x=this.flattenedTotalLength,b=z=E=0;E<x/2&&z<y&&(b=tt[z],!(E+b>x/2));)E+=b,z++;return y=this.i(z),z=this.i(z+1),1>Math.abs(y.x-z.x)?y.y>z.y?a.h(y.x,y.y-(x/2-E)):a.h(y.x,y.y+(x/2-E)):1>Math.abs(y.y-z.y)?y.x>z.x?a.h(y.x-(x/2-E),y.y):a.h(y.x+(x/2-E),y.y):(x=(x/2-E)/b,a.h(y.x+x*(z.x-y.x),y.y+x*(z.y-y.y))),a},tn.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(a===2)return this.i(0).ab(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===Al))return this.ua.wx(.5);if(this.computeCurve()===Al&&4<=a){var y=(a-1)/3|0,x=3*(y/2|0);if(y%2===1){x=Math.floor(x),a=this.i(x),y=this.i(x+1);var E=this.i(x+2);return x=this.i(x+3),re.My(a.x,a.y,y.x,y.y,E.x,E.y,x.x,x.y)}if(0<x&&x+1<a)return this.i(x-1).ab(this.i(x+1))}y=this.flattenedLengths,E=this.flattenedTotalLength;var b=0;x=0;for(var z;b<E/2&&x<a&&(z=y[x],!(b+z>E/2));)b+=z,x++;if(y=this.i(x),E=this.i(x+1),1>Math.abs(y.x-E.x)&&1>Math.abs(y.y-E.y)){if(0<x&&x+2<a)return this.i(x-1).ab(this.i(x+2))}else{if(1>Math.abs(y.x-E.x))return y.y>E.y?270:90;if(1>Math.abs(y.y-E.y))return y.x>E.x?180:0}return y.ab(E)},Bt=tn.prototype,Bt.i=function(a){return this.Nb.s[a]},Bt.dd=function(a,y){this.Nb.cd(a,y)},Bt.L=function(a,y,x){this.Nb.cd(a,new Rt(y,x))},Bt.Kz=function(a,y){this.Nb.Gb(a,y)},Bt.m=function(a,y,x){this.Nb.Gb(a,new Rt(y,x))},Bt.ne=function(a){this.Nb.add(a)},Bt.yf=function(a,y){this.Nb.add(new Rt(a,y))},Bt.pv=function(a){this.Nb.mb(a)},Bt.Fj=function(){this.Nb.clear()};function qh(a,y,x){if(y!==0||x!==0)if(a.pointsCount===0)a.defaultFromPoint&&a.defaultFromPoint.offset(y,x),a.defaultToPoint&&a.defaultToPoint.offset(y,x);else{for(var E=a.fd,b=new Ke,z=a.Nb.iterator;z.next();){var tt=z.value;b.add(new Rt(tt.x+y,tt.y+x).freeze())}b.freeze(),z=a.Nb,a.Nb=b,tt=a.diagram,isNaN(y)||isNaN(x)||tt!==null&&tt.animationManager.zb?a.v():(a.ke.h(a.ke.x+y,a.ke.y+x),a.pa.h(a.pa.x+y,a.pa.y+x),Po(a)),E?B0(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),tt!==null&&tt.animationManager.zb&&Vu(tt.animationManager,a,b),a.g("points",z,b)}}Bt.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},Bt.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,E=1/0,b=a.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];x=Math.min(rt.x,x),E=Math.min(rt.y,E)}rt=tt=1/0;for(var ot=y.s,at=ot.length,At=0;At<at;At++){var ft=ot[At];tt=Math.min(ft.x,tt),rt=Math.min(ft.y,rt),ft.freeze()}if(y.freeze(),at===z){for(z=0;z<at;z++)if(At=b[z],ft=ot[z],At.x-x!==ft.x-tt||At.y-E!==ft.y-rt){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&Vu(x.animationManager,this,y),B0(this),this.g("points",a,y)}},Bt.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function B0(a){a.Nb.count===0?a.fd=!1:(a.fd=!0,a.cq=null,a.vt=NaN,a.defaultFromPoint=a.i(0),a.defaultToPoint=a.i(a.pointsCount-1),L0(a,!1))}Bt.bb=function(){if(!this.suspendsRouting){var a=this.diagram;if(a){if(a.As.contains(this)||a.undoManager.isUndoingRedoing||(a=a.animationManager,a.isTicking&&!a.isAnimating))return;this.Tg===null||a.isTicking||(this.Tg=null)}a=this.path,a!==null&&(this.fd=!1,this.v(),a.v())}},Bt.vg=function(){if(!this.fd&&!this.computingPoints){var a=!0;try{this.computingPoints=!0,this.uh(),a=this.computePoints()}catch(y){this.computingPoints=!1,this.rv()}finally{this.computingPoints=!1,a?this.zf():this.rv()}}},tn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Hd||(Hd=new hn,Hd.desiredSize=Nr,Hd.Va()),this.defaultFromPoint&&(Hd.location=this.defaultFromPoint,Hd.Va(),y=a=Hd)):y=this.fromPort,y!==null&&!a.isVisible()){var x=a.findVisibleNode();x!==null&&x!==a?(a=x,y=x.port):a=x}if(this.Lw=a,a===null||!a.location.w())return!1;for(;!(y===null||y.actualBounds.w()&&y.Ed());)y=y.panel;if(y===null)return!1;var E=this.toNode,b=null;if(E===null?(Od||(Od=new hn,Od.desiredSize=Nr,Od.Va()),this.defaultToPoint&&(Od.location=this.defaultToPoint,Od.Va(),b=E=Od)):b=this.toPort,b===null||E.isVisible()||(x=E.findVisibleNode(),x!==null&&x!==E?(E=x,b=x.port):E=x),this.Mw=E,E===null||!E.location.w())return!1;for(;!(b===null||b.actualBounds.w()&&b.Ed());)b=b.panel;if(b===null)return!1;var z=this.pointsCount,tt=this.computeSpot(!0,y);x=this.computeSpot(!1,b);var rt=Fc(tt),ot=Fc(x),at=y===b&&y!==null,At=this.isOrthogonal,ft=this.curve===Al;this.Wf=at&&!At?ft=!0:!1;var pt=this.computeAdjusting()===oa||at;if(!At&&!at&&rt&&ot){if(rt=!1,!pt&&3<=z&&(pt=this.getLinkPoint(a,y,tt,!0,!1,E,b),ot=this.getLinkPoint(E,b,x,!1,!1,a,y),rt=this.adjustPoints(0,pt,z-1,ot))&&(pt=this.getLinkPoint(a,y,tt,!0,!1,E,b),ot=this.getLinkPoint(E,b,x,!1,!1,a,y),this.adjustPoints(0,pt,z-1,ot)),!rt)if(this.Fj(),ft){z=this.getLinkPoint(a,y,tt,!0,!1,E,b),pt=this.getLinkPoint(E,b,x,!1,!1,a,y),rt=pt.x-z.x,ot=pt.y-z.y,at=this.computeCurviness(),ft=At=0;var xt=z.x+rt/3,Ct=z.y+ot/3,Mt=xt,Gt=Ct;re.B(ot,0)?Gt=0<rt?Gt-at:Gt+at:(At=-rt/ot,ft=Math.sqrt(at*at/(At*At+1)),0>at&&(ft=-ft),Mt=(0>ot?-1:1)*ft+xt,Gt=At*(Mt-xt)+Ct),xt=z.x+2*rt/3,Ct=z.y+2*ot/3;var It=xt,zt=Ct;re.B(ot,0)?zt=0<rt?zt-at:zt+at:(It=(0>ot?-1:1)*ft+xt,zt=At*(It-xt)+Ct),this.Fj(),this.ne(z),this.yf(Mt,Gt),this.yf(It,zt),this.ne(pt),this.dd(0,this.getLinkPoint(a,y,tt,!0,!1,E,b)),this.dd(3,this.getLinkPoint(E,b,x,!1,!1,a,y))}else z=E,pt=b,E=this.getLinkPoint(a,y,tt,!0,!1,z,pt),b=this.getLinkPoint(z,pt,x,!1,!1,a,y),this.hasCurviness()?(pt=b.x-E.x,x=b.y-E.y,tt=this.computeCurviness(),a=E.x+pt/2,y=E.y+x/2,z=a,rt=y,re.B(x,0)?rt=0<pt?rt-tt:rt+tt:(pt=-pt/x,z=Math.sqrt(tt*tt/(pt*pt+1)),0>tt&&(z=-z),z=(0>x?-1:1)*z+a,rt=pt*(z-a)+y),this.ne(E),this.yf(z,rt),this.ne(b)):(this.ne(E),this.ne(b),rt=Me.alloc(),y.mi(rt),ot=rt.ca(b),pt.mi(rt),at=rt.ca(E),(ot||at)&&(tt=y.ga(P0(tt),new Rt),this.dd(0,this.getLinkPointFromPoint(a,y,tt,b,!0,tt)),x=pt.ga(P0(x),new Rt),this.dd(1,this.getLinkPointFromPoint(z,pt,x,E,!1,x))),Me.free(rt))}else{ft=this.isAvoiding,pt&&(At&&ft||at)&&this.Fj();var Yt=at?this.computeCurviness():0;ft=this.getLinkPoint(a,y,tt,!0,At,E,b),xt=Mt=Ct=0,(At||!rt||at)&&(Gt=this.computeEndSegmentLength(a,y,tt,!0),xt=this.getLinkDirection(a,y,ft,tt,!0,At,E,b),at&&(rt||tt.D(x)||!At&&tt.x+x.x===1&&tt.y+x.y===1)&&(xt-=At?90:30,0>Yt&&(xt-=180)),0>xt?xt+=360:360<=xt&&(xt-=360),at&&(Gt+=Math.abs(Yt)*(At?1:2)),xt===0?Ct=Gt:xt===90?Mt=Gt:xt===180?Ct=-Gt:xt===270?Mt=-Gt:(Ct=Gt*Math.cos(xt*Math.PI/180),Mt=Gt*Math.sin(xt*Math.PI/180)),tt.Mc()&&at&&(Gt=y.ga(Xi,Rt.alloc()),It=Rt.allocAt(Gt.x+1e3*Ct,Gt.y+1e3*Mt),this.getLinkPointFromPoint(a,y,Gt,It,!0,ft),Rt.free(Gt),Rt.free(It))),Gt=this.getLinkPoint(E,b,x,!1,At,a,y);var Xt=zt=It=0;if(At||!ot||at){var $t=this.computeEndSegmentLength(E,b,x,!1);Xt=this.getLinkDirection(E,b,Gt,x,!1,At,a,y),at&&(ot||tt.D(x)||!At&&tt.x+x.x===1&&tt.y+x.y===1)&&(Xt+=At?0:30,0>Yt&&(Xt+=180)),0>Xt?Xt+=360:360<=Xt&&(Xt-=360),at&&($t+=Math.abs(Yt)*(At?1:2)),Xt===0?It=$t:Xt===90?zt=$t:Xt===180?It=-$t:Xt===270?zt=-$t:(It=$t*Math.cos(Xt*Math.PI/180),zt=$t*Math.sin(Xt*Math.PI/180)),x.Mc()&&at&&(x=b.ga(Xi,Rt.alloc()),tt=Rt.allocAt(x.x+1e3*It,x.y+1e3*zt),this.getLinkPointFromPoint(E,b,x,tt,!1,Gt),Rt.free(x),Rt.free(tt))}x=ft,(At||!rt||at)&&(x=new Rt(ft.x+Ct,ft.y+Mt)),tt=Gt,(At||!ot||at)&&(tt=new Rt(Gt.x+It,Gt.y+zt)),!pt&&!At&&rt&&3<z&&this.adjustPoints(0,ft,z-2,tt)?this.dd(z-1,Gt):!pt&&!At&&ot&&3<z&&this.adjustPoints(1,x,z-1,Gt)?this.dd(0,ft):!pt&&(At?6<=z:4<z)&&this.adjustPoints(1,x,z-2,tt)?(this.dd(0,ft),this.dd(z-1,Gt)):(this.Fj(),this.ne(ft),(At||!rt||at)&&this.ne(x),At&&this.addOrthoPoints(x,xt,tt,Xt,a,E),(At||!ot||at)&&this.ne(tt),this.ne(Gt))}return!0};function av(a,y){return Math.abs(y.x-a.x)>Math.abs(y.y-a.y)?(y.x>=a.x?y.x=a.x+9e9:y.x=a.x-9e9,y.y=a.y):(y.y>=a.y?y.y=a.y+9e9:y.y=a.y-9e9,y.x=a.x),y}tn.prototype.getLinkPointFromPoint=function(a,y,x,E,b,z){if(z===void 0&&(z=new Rt),a===null||y===null)return z.assign(x),z;if(a.isVisible()||(b=a.findVisibleNode(),b!==null&&b!==a&&(y=b.port)),a=null,b=y.panel,b===null||b.se()||(b=b.panel),b===null){b=E.x,E=E.y;var tt=x.x;x=x.y}else{a=b.oe,b=1/(a.m11*a.m22-a.m12*a.m21),tt=a.m22*b;var rt=-a.m12*b,ot=-a.m21*b,at=a.m11*b,At=b*(a.m21*a.dy-a.m22*a.dx),ft=b*(a.m12*a.dx-a.m11*a.dy);b=E.x*tt+E.y*ot+At,E=E.x*rt+E.y*at+ft,tt=x.x*tt+x.y*ot+At,x=x.x*rt+x.y*at+ft}return y.Sj(b,E,tt,x,z),a!==null&&z.transform(a),z};function C0(a,y){var x=y.Zn;return x===null&&(x=new Rd,x.port=y,x.node=y.part,y.Zn=x),lw(x,a)}tn.prototype.getLinkPoint=function(a,y,x,E,b,z,tt,rt){if(rt===void 0&&(rt=new Rt),x.sb()&&!Fc(x))return y.ga(x,rt),rt;if(x.$c()){var ot=C0(this,y);if(ot!==null){if(rt.assign(ot.Zo),b&&this.routing===nw){var at=C0(this,tt);if(at!==null&&ot.Gl<at.Gl){ot=Rt.alloc(),at=Rt.alloc();var At=new Me(y.ga(es,ot),y.ga(Pa,at)),ft=this.computeSpot(!E,tt);a=this.getLinkPoint(z,tt,ft,!E,b,a,y,at),(x.Hf(Fa)||x.Hf(Ga))&&a.y>=At.y&&a.y<=At.y+At.height?rt.y=a.y:(x.Hf(dl)||x.Hf(Ks))&&a.x>=At.x&&a.x<=At.x+At.width&&(rt.x=a.x),Rt.free(ot),Rt.free(at)}}return rt}}return x=y.ga(P0(x),Rt.alloc()),this.pointsCount>(b?6:2)?(tt=E?this.i(1):this.i(this.pointsCount-2),b&&(tt=av(x,tt.copy()))):(ot=this.computeSpot(!E,tt),z=Rt.alloc(),tt=tt.ga(P0(ot),z),b&&(tt=av(x,tt)),Rt.free(z)),this.getLinkPointFromPoint(a,y,x,tt,E,rt),Rt.free(x),rt},tn.prototype.getLinkDirection=function(a,y,x,E,b,z,tt,rt){t:if(E.sb())var ot=E.x>E.y?E.x>1-E.y?0:E.x<1-E.y?270:315:E.x<E.y?E.x>1-E.y?90:E.x<1-E.y?180:135:.5>E.x?225:.5<E.x?45:0;else{if(E.$c()&&(ot=C0(this,y),ot!==null))switch(ot.Nc){case 1:ot=270;break t;case 2:ot=180;break t;default:case 4:ot=0;break t;case 8:ot=90;break t}ot=y.ga(Xi,Rt.alloc()),this.pointsCount>(z?6:2)?(rt=b?this.i(1):this.i(this.pointsCount-2),rt=z?av(ot,rt.copy()):x):(x=Rt.alloc(),rt=rt.ga(Xi,x),Rt.free(x)),x=Math.abs(rt.x-ot.x)>Math.abs(rt.y-ot.y)?rt.x>=ot.x?0:180:rt.y>=ot.y?90:270,Rt.free(ot),ot=x}return E.Mc()&&tt.Td(a)&&(ot+=180,360<=ot&&(ot-=360)),Fc(E)||(a=y.li(),a===0)||(45<=a&&135>a?ot+=90:135<=a&&225>a?ot+=180:225<=a&&315>a&&(ot+=270),360<=ot&&(ot-=360)),ot},tn.prototype.computeEndSegmentLength=function(a,y,x,E){return y!==null&&x.$c()&&(a=C0(this,y),a!==null)?a.Ju:(a=E?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=E?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},tn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=Xi:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Xo?ts:y)):(a=y||this.toPort,a===null?a=Xi:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Xo?ts:y)),a};function Fc(a){return a===ts||a.x===.5&&a.y===.5}function P0(a){return a.x===.5&&a.y===.5?a:Xi}tn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==oa&&4<this.pointsCount?this.computeMidPoint(new Rt):(a=y.Zn,a=a!==null?lw(a,this):null,a!==null?a.Zo:y.ga(Xi))},tn.prototype.computeShortLength=function(a){if(a){if(a=this.fromShortLength,isNaN(a)){var y=this.fromPort;y!==null&&(a=y.fromShortLength)}return isNaN(a)?0:a}return a=this.toShortLength,isNaN(a)&&(y=this.toPort,y!==null&&(a=y.toShortLength)),isNaN(a)?0:a},tn.prototype.Cf=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var tt=z;if(z===void 0&&(tt=Li.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return bm(this,y,x,b),z===void 0&&Li.free(tt),!0;if(this.Yc(a,tt)){var rt=!1;if(!this.isAtomic)for(var ot=this.O.s,at=ot.length;at--;){var At=ot[at];if(At.visible||At===this.locationObject){var ft=At.actualBounds,pt=this.naturalBounds;if(!(ft.x>pt.width||ft.y>pt.height||0>ft.x+ft.width||0>ft.y+ft.height)){if(ft=Li.alloc(),ft.set(tt),At instanceof ze)rt=At.Cf(a,y,x,E,b,ft);else if(this.path===At){if(At instanceof yi)if(rt=a,pt=E,At.pickable===!1)rt=!1;else if(ft.multiply(At.transform),pt)t:{var xt=rt,Ct=ft;if(At.fh(xt,Ct))rt=!0;else{if(Ct===void 0&&(Ct=At.transform,xt.Re(At.actualBounds))){rt=!0;break t}rt=xt.left,pt=xt.right;var Mt=xt.top;xt=xt.bottom;var Gt=Rt.alloc(),It=Rt.alloc(),zt=Rt.alloc(),Yt=Li.alloc();Yt.set(Ct),Yt.bv(At.transform),Yt.Vj(),It.x=pt,It.y=Mt,It.transform(Yt),Gt.x=rt,Gt.y=Mt,Gt.transform(Yt),Ct=!1,Kf(At,Gt,It,zt)?Ct=!0:(Gt.x=pt,Gt.y=xt,Gt.transform(Yt),Kf(At,Gt,It,zt)?Ct=!0:(It.x=rt,It.y=xt,It.transform(Yt),Kf(At,Gt,It,zt)?Ct=!0:(Gt.x=rt,Gt.y=Mt,Gt.transform(Yt),Kf(At,Gt,It,zt)&&(Ct=!0)))),Li.free(Yt),Rt.free(Gt),Rt.free(It),Rt.free(zt),rt=Ct}}else rt=At.fh(rt,ft)}else rt=Io(At,a,E,ft);rt&&(pt=At,y!==null&&(pt=y(At)),pt&&(x===null||x(pt))&&b.add(pt)),Li.free(ft)}}}return z===void 0&&Li.free(tt),rt||this.background!==null||this.areaBackground!==null}return z===void 0&&Li.free(tt),!1},tn.prototype.computeCurve=function(){if(this.Wf===null){var a=this.fromPort,y=this.isOrthogonal;this.Wf=a!==null&&a===this.toPort&&!y}return this.Wf?Al:this.curve},tn.prototype.computeCorner=function(){if(this.curve===Al)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},tn.prototype.findMidLabel=function(){for(var a=this.path,y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];if(b!==a&&!b.isPanelMain&&(b.segmentIndex===-1/0||isNaN(b.segmentIndex)))return b}for(a=this.labelNodes;a.next();)if(y=a.value,y.segmentIndex===-1/0||isNaN(y.segmentIndex))return y;return null},tn.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=rw;a=Math.max(a,this.computeThickness());var y=this.fromPort,x=this.toPort;if(y!==null&&x!==null){var E=this.findMidLabel();if(E!==null){var b=E.naturalBounds,z=E.margin,tt=isNaN(b.width)?30:b.width*E.scale+z.left+z.right;b=isNaN(b.height)?14:b.height*E.scale+z.top+z.bottom,E=E.segmentOrientation,E===cp||E===k0||E===gv?a=Math.max(a,b):E===mp||E===yp||E===pp||E===vp?a=Math.max(a,tt):(y=y.ga(Xi).ab(x.ga(Xi))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*tt)+Math.abs(Math.cos(y)*b)+1)),this.curve===Al&&(a*=1.333)}}return a},tn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===oa&&x.bb()}},tn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=iw;var y=this.Sf;if(y!==null){for(var x=Ce(),E=0,b=y.links,z=0;z<b.length;z++){var tt=b[z].computeSpacing();x.push(tt),E+=tt}for(E=-E/2,z=0;z<b.length;z++){if(b[z]===this){a=E+x[z]/2;break}E+=x[z]}y.Ds===this.fromNode&&(a=-a),Oe(x)}}return a},tn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},tn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},tn.prototype.adjustPoints=function(a,y,x,E){var b=this.computeAdjusting();if(this.isOrthogonal){if(b===E0)return!1;b===M0&&(b=dp)}switch(b){case E0:var z=this.i(a),tt=this.i(x);if(!z.Xa(y)||!tt.Xa(E)){b=z.x,z=z.y;var rt=tt.x-b,ot=tt.y-z,at=Math.sqrt(rt*rt+ot*ot);if(!re.$(at,0)){if(re.$(rt,0))var At=0>ot?-Math.PI/2:Math.PI/2;else At=Math.atan(ot/Math.abs(rt)),0>rt&&(At=Math.PI-At);tt=y.x;var ft=y.y;rt=E.x-tt;var pt=E.y-ft;for(ot=Math.sqrt(rt*rt+pt*pt),re.$(rt,0)?pt=0>pt?-Math.PI/2:Math.PI/2:(pt=Math.atan(pt/Math.abs(rt)),0>rt&&(pt=Math.PI-pt)),at=ot/at,At=pt-At,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),rt=y.x-b,ot=y.y-z,y=Math.sqrt(rt*rt+ot*ot),re.$(y,0)||(re.$(rt,0)?ot=0>ot?-Math.PI/2:Math.PI/2:(ot=Math.atan(ot/Math.abs(rt)),0>rt&&(ot=Math.PI-ot)),rt=ot+At,y*=at,this.L(a,tt+y*Math.cos(rt),ft+y*Math.sin(rt)));this.dd(x,E)}}return!0;case M0:if(z=this.i(a),ft=this.i(x),!z.Xa(y)||!ft.Xa(E)){b=z.x,z=z.y,tt=ft.x,ft=ft.y,at=(tt-b)*(tt-b)+(ft-z)*(ft-z),rt=y.x,At=y.y,ot=E.x,pt=E.y;var xt=1;if(ot-rt!==0){var Ct=(pt-At)/(ot-rt);xt=Math.sqrt(1+1/(Ct*Ct))}else Ct=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var Mt=y.x,Gt=y.y,It=.5;at!==0&&(It=((b-Mt)*(b-tt)+(z-Gt)*(z-ft))/at);var zt=b+It*(tt-b),Yt=z+It*(ft-z);y=Math.sqrt((Mt-zt)*(Mt-zt)+(Gt-Yt)*(Gt-Yt)),Gt<Ct*(Mt-zt)+Yt&&(y=-y),0<Ct&&(y=-y),Mt=rt+It*(ot-rt),It=At+It*(pt-At),Ct!==0?(y=Mt+y/xt,this.L(a,y,It-(y-Mt)/Ct)):this.L(a,Mt,It+y)}this.dd(x,E)}return!0;case dp:t:{if(this.isOrthogonal&&(b=this.i(a),z=this.i(a+1),tt=this.i(a+2),rt=z.x,At=z.y,ft=rt,at=At,re.B(b.y,z.y)?re.B(z.x,tt.x)?At=y.y:re.B(z.y,tt.y)&&(rt=y.x):re.B(b.x,z.x)&&(re.B(z.y,tt.y)?rt=y.x:re.B(z.x,tt.x)&&(At=y.y)),this.L(a+1,rt,At),b=this.i(x),z=this.i(x-1),tt=this.i(x-2),rt=z.x,At=z.y,ot=rt,pt=At,re.B(b.y,z.y)?re.B(z.x,tt.x)?At=E.y:re.B(z.y,tt.y)&&(rt=E.x):re.B(b.x,z.x)&&(re.B(z.y,tt.y)?rt=E.x:re.B(z.x,tt.x)&&(At=E.y)),this.L(x-1,rt,At),lv(this))){this.L(a+1,ft,at),this.L(x-1,ot,pt),x=!1;break t}this.dd(a,y),this.dd(x,E),x=!0}return x;default:return!1}},tn.prototype.addOrthoPoints=function(a,y,x,E,b,z){0>y?y+=360:360<=y&&(y-=360),0>E?E+=360:360<=E&&(E-=360);var tt=E;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,E=315<=E||45>E?0:45<=E&&135>E?90:135<=E&&225>E?180:270;var rt=b.actualBounds.copy(),ot=z.actualBounds.copy();if(rt.w()&&ot.w()){rt.Bc(wp,wp),ot.Bc(wp,wp),rt.Ye(a),ot.Ye(x);var at=Rt.alloc(),At=Rt.alloc();y===0?x.x>a.x||E===270&&x.y<a.y&&ot.right>a.x||E===90&&x.y>a.y&&ot.right>a.x?(at.h(x.x,a.y),At.h(x.x,(a.y+x.y)/2),E===180?(at.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),At.x=at.x,At.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(at.x=a.x<ot.left?this.computeMidOrthoPosition(a.x,a.y,ot.left,x.y,!1):a.x<ot.right&&(E===270&&a.y<ot.top||E===90&&a.y>ot.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ot.right,At.x=at.x,At.y=x.y):E===0&&a.x<ot.left&&a.y>ot.top&&a.y<ot.bottom&&(at.x=a.x,at.y=a.y<x.y?Math.min(x.y,ot.top):Math.max(x.y,ot.bottom),At.y=at.y)):(at.h(a.x,x.y),At.h((a.x+x.x)/2,x.y),(E===180||E===90&&x.y<rt.top||E===270&&x.y>rt.bottom)&&(E===180&&(ot.ca(a)||rt.ca(x))?at.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===180||E===90)?at.y=this.computeMidOrthoPosition(a.x,rt.top,x.x,Math.max(x.y,ot.bottom),!0):x.y>a.y&&(E===180||E===270)&&(at.y=this.computeMidOrthoPosition(a.x,rt.bottom,x.x,Math.min(x.y,ot.top),!0)),At.x=x.x,At.y=at.y),at.y>rt.top&&at.y<rt.bottom&&(x.x>=rt.left&&x.x<=a.x||a.x<=ot.right&&a.x>=x.x?(E===90||E===270)&&(at.h(Math.max((a.x+x.x)/2,a.x),a.y),At.h(at.x,x.y)):(at.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===0?rt.top:Math.min(rt.top,ot.top)):Math.max(x.y,E===0?rt.bottom:Math.max(rt.bottom,ot.bottom)),At.x=x.x,At.y=at.y))):y===180?x.x<a.x||E===270&&x.y<a.y&&ot.left<a.x||E===90&&x.y>a.y&&ot.left<a.x?(at.h(x.x,a.y),At.h(x.x,(a.y+x.y)/2),E===0?(at.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),At.x=at.x,At.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(at.x=a.x>ot.right?this.computeMidOrthoPosition(a.x,a.y,ot.right,x.y,!1):a.x>ot.left&&(E===270&&a.y<ot.top||E===90&&a.y>ot.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ot.left,At.x=at.x,At.y=x.y):E===180&&a.x>ot.right&&a.y>ot.top&&a.y<ot.bottom&&(at.x=a.x,at.y=a.y<x.y?Math.min(x.y,ot.top):Math.max(x.y,ot.bottom),At.y=at.y)):(at.h(a.x,x.y),At.h((a.x+x.x)/2,x.y),(E===0||E===90&&x.y<rt.top||E===270&&x.y>rt.bottom)&&(E===0&&(ot.ca(a)||rt.ca(x))?at.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===0||E===90)?at.y=this.computeMidOrthoPosition(a.x,rt.top,x.x,Math.max(x.y,ot.bottom),!0):x.y>a.y&&(E===0||E===270)&&(at.y=this.computeMidOrthoPosition(a.x,rt.bottom,x.x,Math.min(x.y,ot.top),!0)),At.x=x.x,At.y=at.y),at.y>rt.top&&at.y<rt.bottom&&(x.x<=rt.right&&x.x>=a.x||a.x>=ot.left&&a.x<=x.x?(E===90||E===270)&&(at.h(Math.min((a.x+x.x)/2,a.x),a.y),At.h(at.x,x.y)):(at.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===180?rt.top:Math.min(rt.top,ot.top)):Math.max(x.y,E===180?rt.bottom:Math.max(rt.bottom,ot.bottom)),At.x=x.x,At.y=at.y))):y===90?x.y>a.y||E===180&&x.x<a.x&&ot.bottom>a.y||E===0&&x.x>a.x&&ot.bottom>a.y?(at.h(a.x,x.y),At.h((a.x+x.x)/2,x.y),E===270?(at.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),At.x=x.x,At.y=at.y):E===180&&x.x<a.x||E===0&&x.x>a.x?(at.y=a.y<ot.top?this.computeMidOrthoPosition(a.x,a.y,x.x,ot.top,!0):a.y<ot.bottom&&(E===180&&a.x<ot.left||E===0&&a.x>ot.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ot.bottom,At.x=x.x,At.y=at.y):E===90&&a.y<ot.top&&a.x>ot.left&&a.x<ot.right&&(at.x=a.x<x.x?Math.min(x.x,ot.left):Math.max(x.x,ot.right),at.y=a.y,At.x=at.x)):(at.h(x.x,a.y),At.h(x.x,(a.y+x.y)/2),(E===270||E===0&&x.x<rt.left||E===180&&x.x>rt.right)&&(E===270&&(ot.ca(a)||rt.ca(x))?at.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===270||E===0)?at.x=this.computeMidOrthoPosition(rt.left,a.y,Math.max(x.x,ot.right),x.y,!1):x.x>a.x&&(E===270||E===180)&&(at.x=this.computeMidOrthoPosition(rt.right,a.y,Math.min(x.x,ot.left),x.y,!1)),At.x=at.x,At.y=x.y),at.x>rt.left&&at.x<rt.right&&(x.y>=rt.top&&x.y<=a.y||a.y<=ot.bottom&&a.y>=x.y?(E===0||E===180)&&(at.h(a.x,Math.max((a.y+x.y)/2,a.y)),At.h(x.x,at.y)):(at.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===90?rt.left:Math.min(rt.left,ot.left)):Math.max(x.x,E===90?rt.right:Math.max(rt.right,ot.right)),At.x=at.x,At.y=x.y))):x.y<a.y||E===180&&x.x<a.x&&ot.top<a.y||E===0&&x.x>a.x&&ot.top<a.y?(at.h(a.x,x.y),At.h((a.x+x.x)/2,x.y),E===90?(at.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),At.x=x.x,At.y=at.y):E===180&&x.x<a.x||E===0&&x.x>=a.x?(at.y=a.y>ot.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,ot.bottom,!0):a.y>ot.top&&(E===180&&a.x<ot.left||E===0&&a.x>ot.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ot.top,At.x=x.x,At.y=at.y):E===270&&a.y>ot.bottom&&a.x>ot.left&&a.x<ot.right&&(at.x=a.x<x.x?Math.min(x.x,ot.left):Math.max(x.x,ot.right),at.y=a.y,At.x=at.x)):(at.h(x.x,a.y),At.h(x.x,(a.y+x.y)/2),(E===90||E===0&&x.x<rt.left||E===180&&x.x>rt.right)&&(E===90&&(ot.ca(a)||rt.ca(x))?at.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===90||E===0)?at.x=this.computeMidOrthoPosition(rt.left,a.y,Math.max(x.x,ot.right),x.y,!1):x.x>a.x&&(E===90||E===180)&&(at.x=this.computeMidOrthoPosition(rt.right,a.y,Math.min(x.x,ot.left),x.y,!1)),At.x=at.x,At.y=x.y),at.x>rt.left&&at.x<rt.right&&(x.y<=rt.bottom&&x.y>=a.y||a.y>=ot.top&&a.y<=x.y?(E===0||E===180)&&(at.h(a.x,Math.min((a.y+x.y)/2,a.y)),At.h(x.x,at.y)):(at.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===270?rt.left:Math.min(rt.left,ot.left)):Math.max(x.x,E===270?rt.right:Math.max(rt.right,ot.right)),At.x=at.x,At.y=x.y)));var ft=x;if(this.isAvoiding){var pt=this.diagram;if(pt===null||b===z||this.layer.isTemporary||!Nf(pt)||rt.ca(ft)&&!z.Td(b)||ot.ca(a)&&!b.Td(z))y=!1;else{var xt=Dg(pt,!0,this.containingGroup,null);if(this.segmentIndex!==17&&xt.Yj(Math.min(a.x,at.x),Math.min(a.y,at.y),Math.abs(a.x-at.x),Math.abs(a.y-at.y))&&xt.Yj(Math.min(at.x,At.x),Math.min(at.y,At.y),Math.abs(at.x-At.x),Math.abs(at.y-At.y))&&xt.Yj(Math.min(At.x,ft.x),Math.min(At.y,ft.y),Math.abs(At.x-ft.x),Math.abs(At.y-ft.y)))y=!1;else{b=a,z=ft;var Ct=x=null;if(pt.isVirtualized){pt=xt.bounds.copy(),pt.Bc(-xt.Ho,-xt.Go);var Mt=Rt.alloc();Ec(xt,a.x,a.y)||(re.Ff(pt.x,pt.y,pt.x+pt.width,pt.y+pt.height,a.x,a.y,at.x,at.y,Mt)?(x=a=Mt.copy(),y=Mt.ab(at)):re.Ff(pt.x,pt.y,pt.x+pt.width,pt.y+pt.height,at.x,at.y,At.x,At.y,Mt)?(x=a=Mt.copy(),y=Mt.ab(At)):re.Ff(pt.x,pt.y,pt.x+pt.width,pt.y+pt.height,At.x,At.y,ft.x,ft.y,Mt)&&(x=a=Mt.copy(),y=Mt.ab(ft))),Ec(xt,ft.x,ft.y)||(re.Ff(pt.x,pt.y,pt.x+pt.width,pt.y+pt.height,ft.x,ft.y,At.x,At.y,Mt)?(Ct=ft=Mt.copy(),E=At.ab(Mt)):re.Ff(pt.x,pt.y,pt.x+pt.width,pt.y+pt.height,At.x,At.y,at.x,at.y,Mt)?(Ct=ft=Mt.copy(),E=at.ab(Mt)):re.Ff(pt.x,pt.y,pt.x+pt.width,pt.y+pt.height,at.x,at.y,a.x,a.y,Mt)&&(Ct=ft=Mt.copy(),E=a.ab(Mt))),Rt.free(Mt)}rt=rt.copy().ed(ot),rt.Bc(xt.Ho*xt.Os,xt.Go*xt.Os),sw(xt,a,y,ft,E,rt,!0),ot=Eu(xt,ft.x,ft.y),!xt.abort&&ot>=Mc&&(ow(xt),rt.Bc(xt.Ho*xt.Hx,xt.Go*xt.Ix),sw(xt,a,y,ft,E,rt,!1),ot=Eu(xt,ft.x,ft.y)),!xt.abort&&ot<Mc&&Eu(xt,ft.x,ft.y)!==tg?(Av(this,xt,ft.x,ft.y,E,!0,tt),rt=this.i(2),4>this.pointsCount?(y===0||y===180?(rt.x=a.x,rt.y=ft.y):(rt.x=ft.x,rt.y=a.y),this.L(2,rt.x,rt.y),this.m(3,rt.x,rt.y)):(tt=this.i(3),y===0||y===180?re.B(rt.x,tt.x)?(rt=y===0?Math.max(rt.x,a.x):Math.min(rt.x,a.x),this.L(2,rt,a.y),this.L(3,rt,tt.y)):re.B(rt.y,tt.y)?(Math.abs(a.y-rt.y)<=xt.Go/2&&(this.L(2,rt.x,a.y),this.L(3,tt.x,a.y)),this.m(2,rt.x,a.y)):this.L(2,a.x,rt.y):(y===90||y===270)&&(re.B(rt.y,tt.y)?(rt=y===90?Math.max(rt.y,a.y):Math.min(rt.y,a.y),this.L(2,a.x,rt),this.L(3,tt.x,rt)):re.B(rt.x,tt.x)?(Math.abs(a.x-rt.x)<=xt.Ho/2&&(this.L(2,a.x,rt.y),this.L(3,a.x,tt.y)),this.m(2,a.x,rt.y)):this.L(2,rt.x,a.y))),x!==null&&(a=this.i(1),tt=this.i(2),a.x!==tt.x&&a.y!==tt.y?y===0||y===180?this.m(2,a.x,tt.y):this.m(2,tt.x,a.y):y===0||y===180?this.m(2,b.x,x.y):this.m(2,x.x,b.y)),Ct!==null&&(E===0||E===180?this.yf(z.x,Ct.y):this.yf(Ct.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(at.copy()),this.ne(At.copy())),Rt.free(at),Rt.free(At)}},tn.prototype.computeMidOrthoPosition=function(a,y,x,E,b){var z=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(z=this.computeCurviness()),b?(y+E)/2+z:(a+x)/2+z};function lv(a){if(a.diagram===null||!a.isAvoiding||!Nf(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=Dg(a.diagram,!0,a.containingGroup,null);for(var E=1;E<x-2;E++){var b=y[E],z=y[E+1];if(!a.Yj(Math.min(b.x,z.x),Math.min(b.y,z.y),Math.abs(b.x-z.x),Math.abs(b.y-z.y)))return!0}return!1}function Av(a,y,x,E,b,z,tt){var rt=y.Ho,ot=y.Go,at=Eu(y,x,E),At=x,ft=E;for(b===0?At+=rt:b===90?ft+=ot:b===180?At-=rt:ft-=ot,b!==tt&&at>Wf&&Eu(y,At,ft)!==at-1&&(Eu(y,x-rt,E)===at-1?(b=180,At=x-rt,ft=E):Eu(y,x+rt,E)===at-1?(b=0,At=x+rt,ft=E):Eu(y,x,E-ot)===at-1?(b=270,At=x,ft=E-ot):Eu(y,x,E+ot)===at-1&&(b=90,At=x,ft=E+ot));at>Wf&&Eu(y,At,ft)===at-1;)x=At,E=ft,b===0?At+=rt:b===90?ft+=ot:b===180?At-=rt:ft-=ot,--at;z?at>Wf&&(b===180||b===0?x=Math.floor(x/rt)*rt+rt/2:(b===90||b===270)&&(E=Math.floor(E/ot)*ot+ot/2)):(x=Math.floor(x/rt)*rt+rt/2,E=Math.floor(E/ot)*ot+ot/2),at>Wf&&(z=b,tt=x,At=E,b===0?(z=90,At+=ot):b===90?(z=180,tt-=rt):b===180?(z=270,At-=ot):b===270&&(z=0,tt+=rt),Eu(y,tt,At)===at-1?Av(a,y,tt,At,z,!1,z):(tt=x,At=E,b===0?(z=270,At-=ot):b===90?(z=0,tt+=rt):b===180?(z=90,At+=ot):b===270&&(z=180,tt-=rt),Eu(y,tt,At)===at-1&&Av(a,y,tt,At,z,!1,z))),a.yf(x,E)}tn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),E=this.i(1),b=To(y,a,x.x,x.y,E.x,E.y),z=0,tt=1;tt<this.pointsCount-1;tt++){x=this.i(tt+1);var rt=To(y,a,E.x,E.y,x.x,x.y);E=x,rt<b&&(z=tt,b=rt)}return z},tn.prototype.qc=function(){this.lk=!1,this.v()},tn.prototype.Ul=function(a){if(!(!a&&(this.fd===!1||(a=this.Pb(),this.lk&&(a===null||a.geometry!==null))))&&(2>this.pointsCount?this.lk=!0:this.ua=this.makeGeometry(),a=this.path,a!==null)){a.ua=this.ua;for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];b!==a&&b.isPanelMain&&b instanceof yi&&(b.ua=this.ua)}}},tn.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,E=this.diagram;E!==null&&Vf(this)&&E.Eh.contains(this)&&(this.ml.width!==0||this.ml.height!==0)&&(E.animationManager.isAnimating||E.currentTool!==E.toolManager)&&(x=!0);var b=this.i(0).copy(),z=b.copy();E=this.Nb.s;var tt=this.computeCurve();if(tt===Al&&3<=y&&!re.$(this.smoothness,0))if(y===3){var rt=this.i(1);E=Math.min(b.x,rt.x);var ot=Math.min(b.y,rt.y);rt=this.i(2),E=Math.min(E,rt.x),ot=Math.min(ot,rt.y)}else{if(this.isOrthogonal)for(ot=0;ot<y;ot++)rt=E[ot],z.x=Math.min(rt.x,z.x),z.y=Math.min(rt.y,z.y);else for(E=3;E<y;E+=3)E+3>=y&&(E=y-1),ot=this.i(E),z.x=Math.min(ot.x,z.x),z.y=Math.min(ot.y,z.y);E=z.x,ot=z.y}else{for(ot=0;ot<y;ot++)rt=E[ot],z.x=Math.min(rt.x,z.x),z.y=Math.min(rt.y,z.y);E=z.x,ot=z.y}if(E-=this.su.x,ot-=this.su.y,b.x-=E,b.y-=ot,y!==2||Vf(this)){if(a.type=rn.o,rt=by(a),this.computeShortLength(!0)!==0&&(b=Id(this,b,!0,z)),Cc(rt,b.x,b.y,!1),tt===Al&&3<=y&&!re.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-E,x=x.y-ot,b=this.i(2).copy(),b.x-=E,b.y-=ot,this.computeShortLength(!1)!==0&&(b=Id(this,b,!1,z)),Xh(rt,y,x,y,x,b.x,b.y);else if(this.isOrthogonal){y=Rt.allocAt(E,ot),x=Rt.alloc(),x.assign(this.i(1)),z=Rt.allocAt(E,ot),b=Rt.allocAt(E,ot),tt=this.i(0);for(var at,At=this.smoothness/3,ft=1;ft<this.pointsCount-1;ft++){at=this.i(ft);var pt=tt,xt=at,Ct=this.i(uv(this,at,ft,!1));if((!re.$(pt.x,xt.x)||!re.$(xt.x,Ct.x))&&(!re.$(pt.y,xt.y)||!re.$(xt.y,Ct.y))){var Mt=At;isNaN(Mt)&&(Mt=this.smoothness/3);var Gt=pt.x;pt=pt.y;var It=xt.x;xt=xt.y;var zt=Ct.x;Ct=Ct.y;var Yt=Mt*F0(Gt,pt,It,xt);Mt*=F0(It,xt,zt,Ct),re.$(pt,xt)&&re.$(It,zt)&&(It>Gt?Ct>xt?(z.x=It-Yt,z.y=xt-Yt,b.x=It+Mt,b.y=xt+Mt):(z.x=It-Yt,z.y=xt+Yt,b.x=It+Mt,b.y=xt-Mt):Ct>xt?(z.x=It+Yt,z.y=xt-Yt,b.x=It-Mt,b.y=xt+Mt):(z.x=It+Yt,z.y=xt+Yt,b.x=It-Mt,b.y=xt-Mt)),re.$(Gt,It)&&re.$(xt,Ct)&&(xt>pt?(zt>It?(z.x=It-Yt,z.y=xt-Yt,b.x=It+Mt):(z.x=It+Yt,z.y=xt-Yt,b.x=It-Mt),b.y=xt+Mt):(zt>It?(z.x=It-Yt,z.y=xt+Yt,b.x=It+Mt):(z.x=It+Yt,z.y=xt+Yt,b.x=It-Mt),b.y=xt-Mt)),(re.$(Gt,It)&&re.$(It,zt)||re.$(pt,xt)&&re.$(xt,Ct))&&(Gt=.5*(Gt+zt),pt=.5*(pt+Ct),z.x=Gt,z.y=pt,b.x=Gt,b.y=pt),(ft===1||ft===2&&re.$(tt.x,this.i(0).x)&&re.$(tt.y,this.i(0).y))&&(x.x=.5*(tt.x+at.x),x.y=.5*(tt.y+at.y)),Xh(rt,x.x-E,x.y-ot,z.x-E,z.y-ot,at.x-E,at.y-ot),y.set(z),x.set(b),tt=at}}at=tt.x,tt=tt.y,At=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(At=Id(this,At.copy(),!1,Gr)),at=.5*(at+At.x),tt=.5*(tt+At.y),Xh(rt,b.x-E,b.y-ot,at-E,tt-ot,At.x-E,At.y-ot),Rt.free(y),Rt.free(x),Rt.free(z),Rt.free(b)}else for(x=3;x<y;x+=3)z=this.i(x-2),x+3>=y&&(x=y-1),b=this.i(x-1),tt=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(tt=Id(this,tt.copy(),!1,Gr)),Xh(rt,z.x-E,z.y-ot,b.x-E,b.y-ot,tt.x-E,tt.y-ot);else{for(z=Rt.alloc(),z.assign(this.i(0)),b=Rt.alloc(),b.assign(z),tt=this.computeCorner(),ft=1,at=0;ft<y;){if(ft=uv(this,z,ft,1<ft),At=this.i(ft),ft>=y-1){if(!z.D(At))this.computeShortLength(!1)!==0&&(At=Id(this,At.copy(),!1,Gr)),Dd(this,rt,-E,-ot,z,At,x);else if(at===0)for(ft=1;ft<y;)b.assign(z),At=this.i(ft++),Dd(this,rt,-E,-ot,z,At,x),z.assign(At);break}if(at=uv(this,At,ft+1,ft<y-3),ft=-E,Gt=-ot,pt=At,It=this.i(at),Mt=x,re.B(z.y,pt.y)&&re.B(pt.x,It.x))if(Ct=Math.min(tt,Math.abs(pt.x-b.x)/2),Ct=Yt=Math.min(Ct,Math.abs(It.y-pt.y)/2),re.B(Ct,0))Dd(this,rt,ft,Gt,z,pt,Mt),z.assign(pt);else{var Xt=pt.x,$t=pt.y;xt=Xt,zt=$t,pt.x>z.x?Xt=pt.x-Ct:Xt=pt.x+Ct,It.y>pt.y?zt=pt.y+Yt:zt=pt.y-Yt,It=Rt.allocAt(Xt,$t),Dd(this,rt,ft,Gt,z,It,Mt),Rt.free(It),p0(rt,pt.x+ft,pt.y+Gt,xt+ft,zt+Gt),z.h(xt,zt)}else re.B(z.x,pt.x)&&re.B(pt.y,It.y)?(Ct=Math.min(tt,Math.abs(pt.y-b.y)/2),Ct=Yt=Math.min(Ct,Math.abs(It.x-pt.x)/2),re.B(Yt,0)?(Dd(this,rt,ft,Gt,z,pt,Mt),z.assign(pt)):(Xt=pt.x,$t=pt.y,xt=Xt,zt=$t,pt.y>z.y?$t=pt.y-Ct:$t=pt.y+Ct,It.x>pt.x?xt=pt.x+Yt:xt=pt.x-Yt,It=Rt.allocAt(Xt,$t),Dd(this,rt,ft,Gt,z,It,Mt),Rt.free(It),p0(rt,pt.x+ft,pt.y+Gt,xt+ft,zt+Gt),z.h(xt,zt))):(Dd(this,rt,ft,Gt,z,pt,Mt),z.assign(pt));b.assign(At),ft=at}Rt.free(z)}m0=rt}else rt=this.i(1).copy(),rt.x-=E,rt.y-=ot,this.computeShortLength(!0)!==0&&(b=Id(this,b,!0,z)),this.computeShortLength(!1)!==0&&(rt=Id(this,rt,!1,z)),a.type=rn.j,a.startX=b.x,a.startY=b.y,a.endX=rt.x,a.endY=rt.y;return this.lk=!0,a};function F0(a,y,x,E){return a=x-a,isNaN(a)||a===1/0||a===-1/0?NaN:(0>a&&(a=-a),y=E-y,isNaN(y)||y===1/0||y===-1/0?NaN:(0>y&&(y=-y),re.$(a,0)?y:re.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Id(a,y,x,E){var b=a.pointsCount;if(2>b)return y;if(x){var z=a.i(1);if(x=z.x-E.x,z=z.y-E.y,E=F0(y.x,y.y,x,z),E===0)return y;b=b===2?.5*E:E,a=a.computeShortLength(!0),a>b&&(a=b),b=a*(z-y.y)/E,y.x+=a*(x-y.x)/E,y.y+=b}else{if(z=a.i(b-2),x=z.x-E.x,z=z.y-E.y,E=F0(y.x,y.y,x,z),E===0)return y;b=b===2?.5*E:E,a=a.computeShortLength(!1),a>b&&(a=b),b=a*(y.y-z)/E,y.x-=a*(y.x-x)/E,y.y-=b}return y}function uv(a,y,x,E){for(var b=a.pointsCount,z=y;re.$(y.x,z.x)&&re.$(y.y,z.y);){if(x>=b)return b-1;z=a.i(x++)}if(!re.$(y.x,z.x)&&!re.$(y.y,z.y))return x-1;for(var tt=z;re.$(y.x,z.x)&&re.$(z.x,tt.x)&&(!E||(y.y>=z.y?z.y>=tt.y:z.y<=tt.y))||re.$(y.y,z.y)&&re.$(z.y,tt.y)&&(!E||(y.x>=z.x?z.x>=tt.x:z.x<=tt.x));){if(x>=b)return b-1;tt=a.i(x++)}return x-2}tn.prototype.computeJumpLength=function(){return 10};function Dd(a,y,x,E,b,z,tt){if(!tt&&Vf(a)){tt=a.computeJumpLength();var rt=tt/2,ot=[],at=0;if(a.isVisible()&&(at=P1(a,b,z,ot)),0<at){if(re.B(b.y,z.y))if(b.x<z.x)for(var At=0;At<at;){var ft=Math.max(b.x,Math.min(ot[At++]-rt,z.x-tt));y.lineTo(ft+x,z.y+E);for(var pt=ft+x,xt=Math.min(ft+tt,z.x);At<at&&(ft=ot[At],ft<xt+tt);)At++,xt=Math.min(ft+rt,z.x);ft=z.y-tt+E,xt+=x;var Ct=z.y+E;a.curve===$h?Cc(y,xt,Ct,!1):Xh(y,pt,ft,xt,ft,xt,Ct)}else for(--at;0<=at;){for(At=Math.min(b.x,Math.max(ot[at--]+rt,z.x+tt)),y.lineTo(At+x,z.y+E),pt=At+x,ft=Math.max(At-tt,z.x);0<=at&&(At=ot[at],At>ft-tt);)at--,ft=Math.max(At-rt,z.x);At=z.y-tt+E,ft+=x,xt=z.y+E,a.curve===$h?Cc(y,ft,xt,!1):Xh(y,pt,At,ft,At,ft,xt)}else if(re.B(b.x,z.x))if(b.y<z.y)for(At=0;At<at;){for(ft=Math.max(b.y,Math.min(ot[At++]-rt,z.y-tt)),y.lineTo(z.x+x,ft+E),pt=ft+E,ft=Math.min(ft+tt,z.y);At<at&&(xt=ot[At],xt<ft+tt);)At++,ft=Math.min(xt+rt,z.y);xt=z.x-tt+x,Ct=z.x+x,ft+=E,a.curve===$h?Cc(y,Ct,ft,!1):Xh(y,xt,pt,xt,ft,Ct,ft)}else for(--at;0<=at;){for(At=Math.min(b.y,Math.max(ot[at--]+rt,z.y+tt)),y.lineTo(z.x+x,At+E),pt=At+E,At=Math.max(At-tt,z.y);0<=at&&(ft=ot[at],ft>At-tt);)at--,At=Math.max(ft-rt,z.y);ft=z.x-tt+x,xt=z.x+x,At+=E,a.curve===$h?Cc(y,xt,At,!1):Xh(y,ft,pt,ft,At,xt,At)}}}y.lineTo(z.x+x,z.y+E)}function P1(a,y,x,E){var b=a.diagram;if(b===null||y.D(x))return 0;for(b=b.layers;b.next();){var z=b.value;if(z!==null&&z.visible){z=z.Pa.s;for(var tt=z.length,rt=0;rt<tt;rt++){var ot=z[rt];if(ot instanceof tn){if(ot===a)return 0<E.length&&E.sort(function(At,ft){return At-ft}),E.length;if(ot.isVisible()&&Vf(ot)){var at=ot.routeBounds;at.w()&&a.routeBounds.Yc(at)&&!a.usesSamePort(ot)&&(at=ot.path,at!==null&&at.Ed()&&F1(y,x,E,ot))}}}}}return 0<E.length&&E.sort(function(At,ft){return At-ft}),E.length}function F1(a,y,x,E){for(var b=re.B(a.y,y.y),z=E.pointsCount,tt=E.i(0),rt=Rt.alloc(),ot=1;ot<z;ot++){var at=E.i(ot);if(ot<z-1){var At=E.i(ot+1);if(tt.y===at.y&&at.y===At.y){if(at.x>tt.x&&At.x>=at.x||at.x<tt.x&&At.x<=at.x)continue}else if(tt.x===at.x&&at.x===At.x&&(at.y>tt.y&&At.y>=at.y||at.y<tt.y&&At.y<=at.y))continue}t:{At=a.x;var ft=a.y,pt=y.x,xt=y.y,Ct=tt.x;tt=tt.y;var Mt=at.x,Gt=at.y;if(re.B(At,pt)){if(!re.B(ft,xt)&&re.B(tt,Gt)&&Math.min(ft,xt)<tt&&Math.max(ft,xt)>tt&&Math.min(Ct,Mt)<At&&Math.max(Ct,Mt)>At&&!re.B(Ct,Mt)){rt.x=At,rt.y=tt,At=!0;break t}}else if(re.B(ft,xt)&&re.B(Ct,Mt)&&Math.min(At,pt)<Ct&&Math.max(At,pt)>Ct&&Math.min(tt,Gt)<ft&&Math.max(tt,Gt)>ft&&!re.B(tt,Gt)){rt.x=Ct,rt.y=ft,At=!0;break t}rt.x=0,rt.y=0,At=!1}At&&(b?x.push(rt.x):x.push(rt.y)),tt=at}Rt.free(rt)}function Vf(a){return a=a.curve,a===Lc||a===$h}function L0(a,y){(y||Vf(a))&&(y=a.diagram,y===null||y.animationManager.isTicking||y.Eh.contains(a)||a.ml.width===0&&a.ml.height===0||y.Eh.add(a,a.ml.copy()))}tn.prototype.Xo=function(a){var y=this.layer;if(y!==null&&y.visible&&!y.isTemporary){var x=y.diagram;if(x!==null&&!x.animationManager.isTicking){var E=!1;for(x=x.layers;x.next();){var b=x.value;if(b.visible){if(b===y){E=!0;var z=!1;b=b.Pa.s;for(var tt=b.length,rt=0;rt<tt;rt++){var ot=b[rt];ot instanceof tn&&(ot===this?z=!0:z&&ew(this,ot,a))}}else if(E)for(z=b.Pa.s,b=z.length,tt=0;tt<b;tt++)rt=z[tt],rt instanceof tn&&ew(this,rt,a)}}}}};function ew(a,y,x){if(y!==null&&y.lk&&y.fd&&Vf(y)){var E=y.routeBounds;E.w()&&(a.routeBounds.Yc(E)||x.Yc(E))&&(a.usesSamePort(y)||y.qc())}}tn.prototype.usesSamePort=function(a){var y=this.pointsCount,x=a.pointsCount;if(0<y&&0<x){var E=this.i(0),b=a.i(0);if(E.Xa(b)||(y=this.i(y-1),a=a.i(x-1),y.Xa(a)||E.Xa(a)||y.Xa(b)))return!0}else if(this.fromNode===a.fromNode||this.toNode===a.toNode||this.fromNode===a.toNode||this.toNode===a.fromNode)return!0;return!1},tn.prototype.isVisible=function(){if(!jn.prototype.isVisible.call(this))return!1;var a=this.containingGroup,y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this.fromNode,x!==null){if(this.isTreeLink&&y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(var E=x;E!==null;){if(E.labeledLink===this)return!0;E=E.containingGroup}if(x=x.findVisibleNode(),x===null||x===a)return!1}if(x=this.toNode,x!==null){if(this.isTreeLink&&!y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(y=x;y!==null;){if(y.labeledLink===this)return!0;y=y.containingGroup}if(y=x.findVisibleNode(),y===null||y===a)return!1}return!0},tn.prototype.Zb=function(a){if(jn.prototype.Zb.call(this,a),a&&L0(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},tn.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?dp:this.qk};function gp(a){var y=a.ef;if(y!==null){var x=a.uf;if(x!==null&&isNaN(a.curviness)){for(var E=a.ff,b=a.vf,z=a=null,tt=y.jb.s,rt=tt.length,ot=0;ot<rt;ot++){var at=tt[ot];(at.ef===y&&at.ff===E&&at.uf===x&&at.vf===b||at.ef===x&&at.ff===b&&at.uf===y&&at.vf===E)&&(z===null?z=at:(a===null&&(a=[],a.push(z)),a.push(at)))}if(a!==null){for(z=Ky(y,x,E,b),z===null&&(z=new T0(y,E,x,b),jy(y,z),jy(x,z)),z.links=a,y=0;y<a.length;y++)a[y].Sf=z;z.Sl()}}}}function fp(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(ye(y.links,a),y.Sl()))}tn.prototype.ph=function(){return!0},Ie.Object.defineProperties(tn.prototype,{fromNode:{get:function(){return this.ef},set:function(a){var y=this.ef;if(y!==a){var x=this.fromPort;y!==null&&(this.uf!==y&&S0(y,this,x),fp(this),this.C(2)),this.ef=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var E=this.diagram;E!==null&&E.aa&&E.partManager.setFromNodeForLink(this,a,y);var b=this.fromPort,z=this.fromPortChanged;if(z!==null){var tt=!0;E!==null&&(tt=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=tt)}a!==null&&(this.uf!==a&&w0(a,this,b),gp(this),this.C(1)),this.g("fromNode",y,a),Pc(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&Xa(x),fp(this),this.ff=a;var E=this.fromPort;E!==null&&Xa(E);var b=this.diagram;if(b!==null){var z=this.data,tt=b.model;z!==null&&tt.ri()&&tt.xv(z,a)}x!==E&&(this.Wf=null,this.bb(),z=this.fromPortChanged,z!==null&&(tt=!0,b!==null&&(tt=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=tt))),gp(this),this.g("fromPortId",y,a)}}},fromPort:{get:function(){var a=this.ef;return a===null?null:a.ns(this.ff)}},fromPortChanged:{get:function(){return this.gn},set:function(a){var y=this.gn;y!==a&&(this.gn=a,this.g("fromPortChanged",y,a))}},toNode:{get:function(){return this.uf},set:function(a){var y=this.uf;if(y!==a){var x=this.toPort;y!==null&&(this.ef!==y&&S0(y,this,x),fp(this),this.C(2)),this.uf=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var E=this.diagram;E!==null&&E.aa&&E.partManager.setToNodeForLink(this,a,y);var b=this.toPort,z=this.toPortChanged;if(z!==null){var tt=!0;E!==null&&(tt=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=tt)}a!==null&&(this.ef!==a&&w0(a,this,b),gp(this),this.C(1)),this.g("toNode",y,a),Pc(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&Xa(x),fp(this),this.vf=a;var E=this.toPort;E!==null&&Xa(E);var b=this.diagram;if(b!==null){var z=this.data,tt=b.model;z!==null&&tt.ri()&&tt.Cv(z,a)}x!==E&&(this.Wf=null,this.bb(),z=this.toPortChanged,z!==null&&(tt=!0,b!==null&&(tt=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=tt))),gp(this),this.g("toPortId",y,a)}}},toPort:{get:function(){var a=this.uf;return a===null?null:a.ns(this.vf)}},toPortChanged:{get:function(){return this.uo},set:function(a){var y=this.uo;y!==a&&(this.uo=a,this.g("toPortChanged",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:Xo},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),(y.$c()||a.$c())&&this.fromNode!==null&&Xa(this.fromPort),this.bb())}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:NaN},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&pi(a,">= 0",tn,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),this.bb())}},fromShortLength:{get:function(){return this.ba!==null?this.ba.Wi:NaN},set:function(a){var y=this.fromShortLength;y!==a&&(this.Xc(),this.ba.Wi=a,this.qc(),this.g("fromShortLength",y,a))}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:Xo},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),(y.$c()||a.$c())&&this.toNode!==null&&Xa(this.toPort),this.bb())}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:NaN},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&pi(a,">= 0",tn,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),this.bb())}},toShortLength:{get:function(){return this.ba!==null?this.ba.xj:NaN},set:function(a){var y=this.toShortLength;y!==a&&(this.Xc(),this.ba.xj=a,this.qc(),this.g("toShortLength",y,a))}},isLabeledLink:{get:function(){return this.wd===null?!1:0<this.wd.count}},labelNodes:{get:function(){return this.wd===null?xi:this.wd.iterator}},relinkableFrom:{get:function(){return(this.Qa&1)!==0},set:function(a){var y=(this.Qa&1)!==0;y!==a&&(this.Qa^=1,this.g("relinkableFrom",y,a),this.Wb())}},relinkableTo:{get:function(){return(this.Qa&2)!==0},set:function(a){var y=(this.Qa&2)!==0;y!==a&&(this.Qa^=2,this.g("relinkableTo",y,a),this.Wb())}},resegmentable:{get:function(){return(this.Qa&4)!==0},set:function(a){var y=(this.Qa&4)!==0;y!==a&&(this.Qa^=4,this.g("resegmentable",y,a),this.Wb())}},isTreeLink:{get:function(){return(this.Qa&8)!==0},set:function(a){var y=(this.Qa&8)!==0;y!==a&&(this.Qa^=8,this.g("isTreeLink",y,a),this.fromNode!==null&&hp(this.fromNode),this.toNode!==null&&hp(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof yi?a:null}},routeBounds:{get:function(){this.vg();var a=this.ml,y=1/0,x=1/0,E=this.pointsCount;if(E===0)a.h(NaN,NaN,0,0);else{if(E===1)E=this.i(0),y=Math.min(E.x,y),x=Math.min(E.y,x),a.h(E.x,E.y,0,0);else if(E===2){E=this.i(0);var b=this.i(1);y=Math.min(E.x,b.x),x=Math.min(E.y,b.y),a.h(E.x,E.y,0,0),a.Ye(b)}else if(this.computeCurve()===Al&&3<=E&&!this.isOrthogonal)if(b=this.i(0),y=b.x,x=b.y,a.h(y,x,0,0),E===3){E=this.i(1),y=Math.min(E.x,y),x=Math.min(E.y,x);var z=this.i(2);y=Math.min(z.x,y),x=Math.min(z.y,x),re.Dl(b.x,b.y,E.x,E.y,E.x,E.y,z.x,z.y,.5,a)}else for(z=3;z<E;z+=3){var tt=this.i(z-2);z+3>=E&&(z=E-1);var rt=this.i(z-1),ot=this.i(z);re.Dl(b.x,b.y,tt.x,tt.y,rt.x,rt.y,ot.x,ot.y,.5,a),y=Math.min(ot.x,y),x=Math.min(ot.y,x),b=ot}else for(b=this.i(0),z=this.i(1),y=Math.min(b.x,z.x),x=Math.min(b.y,z.y),a.h(b.x,b.y,0,0),a.Ye(z),b=2;b<E;b++)z=this.i(b),y=Math.min(z.x,y),x=Math.min(z.y,x),a.Ye(z);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new Rt)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||B0(this);for(var a=this.cq=[],y=this.pointsCount,x=0;x<y-1;x++){var E=this.i(x),b=this.i(x+1);re.$(E.x,b.x)?(E=b.y-E.y,0>E&&(E=-E)):re.$(E.y,b.y)?(E=b.x-E.x,0>E&&(E=-E)):E=Math.sqrt(E.Bf(b)),a.push(E)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,E=a=0;E<x;E++)a+=y[E];this.vt=a}return a}},points:{get:function(){return this.Nb},set:function(a){var y=this.Nb;if(y!==a){var x=null;if(Array.isArray(a)){var E=a.length%2===0;if(E){for(var b=0;b<a.length;b++)if(typeof a[b]!="number"||isNaN(a[b])){E=!1;break}}if(E)for(x=new Ke,E=0;E<a.length/2;E++)b=new Rt(a[2*E],a[2*E+1]).freeze(),x.add(b);else{for(E=!0,b=0;b<a.length;b++){var z=a[b];if(!on(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){E=!1;break}}if(E)for(x=new Ke,E=0;E<a.length;E++)b=a[E],x.add(new Rt(b.x,b.y).freeze())}}else if(a instanceof Ke)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else pe("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),B0(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&Vu(a.animationManager,this,x)),this.g("points",y,x)}}},pointsCount:{get:function(){return this.Nb.count}},fd:{get:function(){return(this.Qa&16)!==0},set:function(a){(this.Qa&16)!==0!==a&&(this.Qa^=16)}},suspendsRouting:{get:function(){return(this.Qa&32)!==0},set:function(a){(this.Qa&32)!==0!==a&&(this.Qa^=32)}},computingPoints:{get:function(){return(this.Qa&64)!==0},set:function(a){(this.Qa&64)!==0!==a&&(this.Qa^=64)}},defaultFromPoint:{get:function(){return this.o},set:function(a){this.o=a.copy()}},defaultToPoint:{get:function(){return this.u},set:function(a){this.u=a.copy()}},isOrthogonal:{get:function(){return(this.qj.value&2)===2}},isAvoiding:{get:function(){return(this.qj.value&4)===4}},lk:{get:function(){return(this.Qa&128)!==0},set:function(a){(this.Qa&128)!==0!==a&&(this.Qa^=128)}},geometry:{get:function(){if(!this.lk){if(this.vg(),2>this.pointsCount)return this.lk=!0,this.ua;this.ua=this.makeGeometry()}return this.ua}},firstPickIndex:{get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!Fc(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!Fc(this.computeSpot(!1))?a-2:a-1}},adjusting:{get:function(){return this.qk},set:function(a){var y=this.qk;y!==a&&(this.qk=a,this.g("adjusting",y,a))}},corner:{get:function(){return this.Om},set:function(a){var y=this.Om;y!==a&&(this.Om=a,this.qc(),this.g("corner",y,a))}},curve:{get:function(){return this.Qm},set:function(a){var y=this.Qm;y!==a&&(this.Qm=a,this.bb(),this.qc(),L0(this,y===$h||y===Lc||a===$h||a===Lc),this.g("curve",y,a))}},curviness:{get:function(){return this.Rm},set:function(a){var y=this.Rm;y!==a&&(this.Rm=a,this.bb(),this.qc(),this.g("curviness",y,a))}},routing:{get:function(){return this.qj},set:function(a){var y=this.qj;y!==a&&(this.qj=a,this.Wf=null,this.bb(),L0(this,(y.value&2)===2||(a.value&2)===2),this.g("routing",y,a))}},smoothness:{get:function(){return this.po},set:function(a){var y=this.po;y!==a&&(this.po=a,this.qc(),this.g("smoothness",y,a))}},key:{get:function(){var a=this.diagram;if(a!==null&&a.model.ri())return a.model.Ac(this.data)}}}),tn.prototype.invalidateOtherJumpOvers=tn.prototype.Xo,tn.prototype.findClosestSegment=tn.prototype.ez,tn.prototype.updateRoute=tn.prototype.vg,tn.prototype.invalidateRoute=tn.prototype.bb,tn.prototype.rollbackRoute=tn.prototype.rv,tn.prototype.commitRoute=tn.prototype.zf,tn.prototype.startRoute=tn.prototype.uh,tn.prototype.clearPoints=tn.prototype.Fj,tn.prototype.removePoint=tn.prototype.pv,tn.prototype.addPointAt=tn.prototype.yf,tn.prototype.addPoint=tn.prototype.ne,tn.prototype.insertPointAt=tn.prototype.m,tn.prototype.insertPoint=tn.prototype.Kz,tn.prototype.setPointAt=tn.prototype.L,tn.prototype.setPoint=tn.prototype.dd,tn.prototype.getPoint=tn.prototype.i,tn.prototype.getOtherPort=tn.prototype.Cz,tn.prototype.getOtherNode=tn.prototype.To;var Hd=null,Od=null,hv=new ce(tn,"Normal",1),L1=new ce(tn,"Orthogonal",2),E1=new ce(tn,"AvoidsNodes",6),nw=new ce(tn,"AvoidsNodesStraight",7),oa=new ce(tn,"None",0),Al=new ce(tn,"Bezier",9),$h=new ce(tn,"JumpGap",10),Lc=new ce(tn,"JumpOver",11),dp=new ce(tn,"End",17),E0=new ce(tn,"Scale",18),M0=new ce(tn,"Stretch",19),cp=new ce(tn,"OrientAlong",21),pp=new ce(tn,"OrientPlus90",22),mp=new ce(tn,"OrientMinus90",23),gv=new ce(tn,"OrientOpposite",24),k0=new ce(tn,"OrientUpright",25),vp=new ce(tn,"OrientPlus90Upright",26),yp=new ce(tn,"OrientMinus90Upright",27),b0=new ce(tn,"OrientUpright45",28),iw=16,rw=14,wp=8;tn.className="Link",tn.Normal=hv,tn.Orthogonal=L1,tn.AvoidsNodes=E1,tn.AvoidsNodesStraight=nw,tn.None=oa,tn.Bezier=Al,tn.JumpGap=$h,tn.JumpOver=Lc,tn.End=dp,tn.Scale=E0,tn.Stretch=M0,tn.OrientAlong=cp,tn.OrientPlus90=pp,tn.OrientMinus90=mp,tn.OrientOpposite=gv,tn.OrientUpright=k0,tn.OrientPlus90Upright=vp,tn.OrientMinus90Upright=yp,tn.OrientUpright45=b0,tn.EndSegmentStep=8,tn.CurvinessStart=iw,tn.SpacingMin=rw,tn.OrthoShortCut=wp;function T0(a,y,x,E){rr(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=E,this.links=[]}T0.prototype.Sl=function(){if(!this.qq){var a=this.links;0<a.length&&(a=a[0].diagram,a!==null&&(a.ow.add(this),this.Fe=a.undoManager.isUndoingRedoing))}this.qq=!0},T0.prototype.Nv=function(){if(this.qq){this.qq=!1;var a=this.links;if(0<a.length){var y=a[0],x=y.diagram;x=x===null||x.pi&&!this.Fe,this.Fe=!1,y.arrangeBundledLinks(a,x),a.length===1&&(y.Sf=null,a.length=0)}a.length===0&&(a=this.Ds,this!==null&&a.af!==null&&a.af.remove(this),a=this.cv,this!==null&&a.af!==null&&a.af.remove(this))}},T0.className="LinkBundle";function Sp(a){rr(this),this.Yx=this.group=null,this.vs=!0,this.abort=!1,this.Od=this.Nd=1,this.Fn=this.En=-1,this.rc=a.width,this.sc=a.height,this.ac=null,this.ei=this.di=0,this.Os=11,this.Ix=this.Hx=22}Sp.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,E=a.y+a.height;if(this.Nd=Math.floor((a.x-this.rc)/this.rc)*this.rc,this.Od=Math.floor((y-this.sc)/this.sc)*this.sc,this.En=Math.ceil((x+2*this.rc)/this.rc)*this.rc,this.Fn=Math.ceil((E+2*this.sc)/this.sc)*this.sc,a=1+(Math.ceil((this.En-this.Nd)/this.rc)|0),y=1+(Math.ceil((this.Fn-this.Od)/this.sc)|0),this.ac===null||this.di<a-1||this.ei<y-1){for(x=[],E=0;E<=a;E++)x[E]=new Uint32Array(y);this.ac=x,this.di=a-1,this.ei=y-1}if(a=fv,this.ac!==null)for(y=0;y<=this.di;y++)if(x=this.ac[y],x.fill)x.fill(a);else for(E=0;E<=this.ei;E++)x[E]=a}};function Ec(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function Eu(a,y,x){return Ec(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):fv}function ow(a){if(a.ac!==null)for(var y=0;y<=a.di;y++)for(var x=a.ac[y],E=0;E<=a.ei;E++)x[E]>=Wf&&(x[E]=fv)}Sp.prototype.Yj=function(a,y,x,E){if(a>this.En||a+x<this.Nd||y>this.Fn||y+E<this.Od)return!0;a=(a-this.Nd)/this.rc|0,y=(y-this.Od)/this.sc|0,x=Math.max(0,x)/this.rc+1|0;var b=Math.max(0,E)/this.sc+1|0;if(0>a&&(x+=a,a=0),0>y&&(b+=y,y=0),0>x||0>b)return!0;for(E=Math.min(a+x-1,this.di)|0,x=Math.min(y+b-1,this.ei)|0;a<=E;a++){b=this.ac[a];for(var z=y;z<=x;z++)if(b[z]===tg)return!1}return!0};function Mu(a,y,x,E,b,z,tt,rt,ot){if(!(y<z||y>tt||x<rt||x>ot)){var at=y|0,At=x|0,ft=a.ac[at][At];if(ft>=Wf&&ft<Mc)for(b?At+=E:at+=E,ft+=1;z<=at&&at<=tt&&rt<=At&&At<=ot&&!(ft>=a.ac[at][At]);)a.ac[at][At]=ft,ft+=1,b?At+=E:at+=E;if(at=b?At:at,b)if(0<E)for(x+=E;x<at;x+=E)Mu(a,y,x,1,!b,z,tt,rt,ot),Mu(a,y,x,-1,!b,z,tt,rt,ot);else for(x+=E;x>at;x+=E)Mu(a,y,x,1,!b,z,tt,rt,ot),Mu(a,y,x,-1,!b,z,tt,rt,ot);else if(0<E)for(y+=E;y<at;y+=E)Mu(a,y,x,1,!b,z,tt,rt,ot),Mu(a,y,x,-1,!b,z,tt,rt,ot);else for(y+=E;y>at;y+=E)Mu(a,y,x,1,!b,z,tt,rt,ot),Mu(a,y,x,-1,!b,z,tt,rt,ot)}}function N0(a,y,x,E,b,z,tt,rt,ot){y|=0,x|=0;var at=tg,At=Wf;for(a.ac[y][x]=At;at===tg&&y>z&&y<tt&&x>rt&&x<ot;)At+=1,a.ac[y][x]=At,b?x+=E:y+=E,at=a.ac[y][x]}function Q0(a,y,x,E,b,z,tt,rt,ot){y|=0,x|=0;var at=tg,At=Mc;for(a.ac[y][x]=At;at===tg&&y>z&&y<tt&&x>rt&&x<ot;)a.ac[y][x]=At,b?x+=E:y+=E,at=a.ac[y][x]}function sw(a,y,x,E,b,z,tt){if(a.ac!==null){a.abort=!1;var rt=y.x,ot=y.y;if(Ec(a,rt,ot)){rt-=a.Nd,rt/=a.rc,ot-=a.Od,ot/=a.sc;var at=E.x,At=E.y;if(Ec(a,at,At))if(at-=a.Nd,at/=a.rc,At-=a.Od,At/=a.sc,1>=Math.abs(rt-at)&&1>=Math.abs(ot-At))a.abort=!0;else{var ft=z.x;E=z.y,y=z.x+z.width;var pt=z.y+z.height;ft-=a.Nd,ft/=a.rc,E-=a.Od,E/=a.sc,y-=a.Nd,y/=a.rc,pt-=a.Od,pt/=a.sc,z=Math.max(0,Math.min(a.di,ft|0)),y=Math.min(a.di,Math.max(0,y|0)),ft=Math.max(0,Math.min(a.ei,E|0)),pt=Math.min(a.ei,Math.max(0,pt|0)),E=a.ac,rt|=0,ot|=0,at|=0,At|=0;var xt=x===0||x===90?1:-1;if(x=x===90||x===270,E[rt][ot]===tg?(N0(a,rt,ot,xt,x,z,y,ft,pt),N0(a,rt,ot,1,!x,z,y,ft,pt),N0(a,rt,ot,-1,!x,z,y,ft,pt)):N0(a,rt,ot,xt,x,rt,ot,rt,ot),E[at][At]===tg?(Q0(a,at,At,b===0||b===90?1:-1,b===90||b===270,z,y,ft,pt),Q0(a,at,At,1,!(b===90||b===270),z,y,ft,pt),Q0(a,at,At,-1,!(b===90||b===270),z,y,ft,pt)):Q0(a,at,At,xt,x,at,At,at,At),x=Ce(),tt&&aw(a,at,At,b,rt,ot,x))for((x[0]!==at||x[1]!==At)&&(x.unshift(At),x.unshift(at)),(x[x.length-2]!==rt||x[x.length-1]!==ot)&&(x.push(rt),x.push(ot)),a=Wf,b=x[x.length-2],tt=x[x.length-1],E[b][tt]=a++,z=x.length-4;0<=z;z-=2)for(b=x[z+2],tt=x[z+3],y=x[z],at=x[z+1];y>b?b++:y<b?b--:at>tt?tt++:at<tt&&tt--,E[b][tt]=a++,b!==y||tt!==at;);else Mu(a,rt,ot,1,!1,z,y,ft,pt),Mu(a,rt,ot,-1,!1,z,y,ft,pt),Mu(a,rt,ot,1,!0,z,y,ft,pt),Mu(a,rt,ot,-1,!0,z,y,ft,pt);Oe(x)}}}}function aw(a,y,x,E,b,z,tt){for(var rt=a.ac,ot=y,at=x;;){if(ot===b&&at===z)return!0;var At=ot,ft=at;if(E===0)if(At<b)At++;else break;else if(E===90)if(ft<z)ft++;else break;else if(E===180)if(At>b)At--;else break;else if(ft>z)ft--;else break;var pt=rt[At][ft];if(pt===0||pt===dv)break;ot=At,at=ft}for(;;){if(At=E,ft=ot,pt=at,E===0?pt<z?(At=90,pt++):pt>z&&(At=270,pt--):E===90?ft<b?(At=0,ft++):ft>b&&(At=180,ft--):E===180?pt<z?(At=90,pt++):pt>z&&(At=270,pt--):ft<b?(At=0,ft++):ft>b&&(At=180,ft--),ft=rt[ft][pt],At!==E&&ft!==0&&ft!==dv){if(tt.push(ot),tt.push(at),aw(a,ot,at,At,b,z,tt))return!0;tt.pop(),tt.pop()}if(rt[ot][at]=dv,E===0){if(ot===y)return!1;ot--}else if(E===90){if(at===x)return!1;at--}else if(E===180){if(ot===y)return!1;ot++}else{if(at===x)return!1;at++}}}Ie.Object.defineProperties(Sp.prototype,{bounds:{get:function(){return new Me(this.Nd,this.Od,this.En-this.Nd,this.Fn-this.Od)}},Ho:{get:function(){return this.rc},set:function(a){0<a&&a!==this.rc&&(this.rc=a,this.initialize(this.bounds))}},Go:{get:function(){return this.sc},set:function(a){0<a&&a!==this.sc&&(this.sc=a,this.initialize(this.bounds))}}});var tg=0,Wf=1,Mc=999999,fv=Mc+1,dv=Mc+2;Sp.className="PositionArray";function Rd(){rr(this),this.port=this.node=null,this.pe=[],this.ap=!1}Rd.prototype.toString=function(){for(var a=this.pe,y=this.node.toString()+" "+a.length.toString()+":",x=0;x<a.length;x++){var E=a[x];E!==null&&(y+=`
`+E.toString())}return y};function M1(a,y,x,E){switch(y=y.offsetY,y){case 8:return 90;case 2:return 180;case 1:return 270;case 4:return 0}switch(y){case 9:return 180<x?270:90;case 6:return 90<x&&270>=x?180:0}switch(a=180*Math.atan2(a.height,a.width)/Math.PI,y){case 3:return x>a&&x<=180+a?180:270;case 5:return x>180-a&&x<=360-a?270:0;case 12:return x>a&&x<=180+a?90:0;case 10:return x>180-a&&x<=360-a?180:90;case 7:return 90<x&&x<=180+a?180:x>180+a&&x<=360-a?270:0;case 13:return 180<x&&x<=360-a?270:x>a&&180>=x?90:0;case 14:return x>a&&x<=180-a?90:x>180-a&&270>=x?180:0;case 11:return x>180-a&&x<=180+a?180:x>180+a?270:90}return E&&y!==15&&(x-=15,0>x&&(x+=360)),x>a&&x<180-a?90:x>=180-a&&x<=180+a?180:x>180+a&&x<360-a?270:0}Rd.prototype.Sl=function(){this.pe.length=0};function lw(a,y){var x=a.pe;if(x.length===0){t:if(!a.ap){x=a.ap,a.ap=!0;var E=null,b=a.node,z=b instanceof li?b:null;if(z===null||z.isSubGraphExpanded)var tt=b.isTreeExpanded?b.findLinksConnected(a.port.portId):b.qx();else{if(!z.actualBounds.w()){a.ap=x;break t}E=z,tt=E.Lu()}z=a.pe.length=0;var rt=a.port.ga(es,Rt.alloc()),ot=a.port.ga(Pa,Rt.alloc());for(b=Me.allocAt(rt.x,rt.y,0,0),b.Ye(ot),Rt.free(rt),Rt.free(ot),rt=Rt.allocAt(b.x+b.width/2,b.y+b.height/2),ot=a.port.li(),tt=tt.iterator;tt.next();){var at=tt.value;if(at.isVisible()&&at.fromPort!==at.toPort){var At=at.fromPort===a.port||at.fromNode!==null&&at.fromNode.Td(E),ft=at.computeSpot(At,a.port);if(ft.$c()&&(At=At?at.toPort:at.fromPort,At!==null)){var pt=At.part;if(pt!==null){var xt=pt.findVisibleNode();xt!==null&&xt!==pt&&(pt=xt,At=pt.port),At=at.computeOtherPoint(pt,At),pt=rt.ab(At),pt-=ot,0>pt?pt+=360:360<=pt&&(pt-=360),ft=M1(b,ft,pt,at.isOrthogonal),ft===0?(ft=4,180<pt&&(pt-=360)):ft===90?(ft=8,270<pt&&(pt-=360)):ft===180?ft=2:(ft=1,90>pt&&(pt+=360)),xt=a.pe[z],xt===void 0?(xt=new cv(at,pt,ft),a.pe[z]=xt):(xt.link=at,xt.angle=pt,xt.Nc=ft),xt.hv.set(At),z++}}}}for(Rt.free(rt),a.pe.sort(Rd.prototype.j),ot=a.pe.length,E=-1,z=rt=0;z<ot;z++)tt=a.pe[z],tt!==void 0&&(tt.Nc!==E&&(E=tt.Nc,rt=0),tt.Uo=rt,rt++);for(E=-1,rt=0,z=ot-1;0<=z;z--)ot=a.pe[z],ot!==void 0&&(ot.Nc!==E&&(E=ot.Nc,rt=ot.Uo+1),ot.Gl=rt);if(z=a.pe,ft=a.port,E=a.node.portSpreading,rt=Rt.alloc(),ot=Rt.alloc(),tt=Rt.alloc(),at=Rt.alloc(),ft.ga(es,rt),ft.ga(Du,ot),ft.ga(Pa,tt),ft.ga(lA,at),xt=pt=At=ft=0,E===rv)for(var Ct=0;Ct<z.length;Ct++){var Mt=z[Ct];if(Mt!==null){var Gt=Mt.link.computeThickness();switch(Mt.Nc){case 8:pt+=Gt;break;case 2:xt+=Gt;break;case 1:ft+=Gt;break;default:case 4:At+=Gt}}}var It=Ct=0,zt=1,Yt=Mt=0;for(Gt=0;Gt<z.length;Gt++){var Xt=z[Gt];if(Xt!==null){if(Ct!==Xt.Nc){switch(Ct=Xt.Nc,Ct){case 8:var $t=tt;It=at;break;case 2:$t=at,It=rt;break;case 1:$t=rt,It=ot;break;default:case 4:$t=ot,It=tt}switch(Mt=It.x-$t.x,Yt=It.y-$t.y,Ct){case 8:pt>Math.abs(Mt)?(zt=Math.abs(Mt)/pt,pt=Math.abs(Mt)):zt=1;break;case 2:xt>Math.abs(Yt)?(zt=Math.abs(Yt)/xt,xt=Math.abs(Yt)):zt=1;break;case 1:ft>Math.abs(Mt)?(zt=Math.abs(Mt)/ft,ft=Math.abs(Mt)):zt=1;break;default:case 4:At>Math.abs(Yt)?(zt=Math.abs(Yt)/At,At=Math.abs(Yt)):zt=1}It=0}var de=Xt.Zo;if(E===rv){switch(Xt=Xt.link.computeThickness(),Xt*=zt,de.set($t),Ct){case 8:de.x=$t.x+Mt/2+pt/2-It-Xt/2;break;case 2:de.y=$t.y+Yt/2+xt/2-It-Xt/2;break;case 1:de.x=$t.x+Mt/2-ft/2+It+Xt/2;break;default:case 4:de.y=$t.y+Yt/2-At/2+It+Xt/2}It+=Xt}else{var An=.5;E===x0&&(An=(Xt.Uo+1)/(Xt.Gl+1)),de.x=$t.x+Mt*An,de.y=$t.y+Yt*An}}}for(Rt.free(rt),Rt.free(ot),Rt.free(tt),Rt.free(at),$t=a.pe,z=0;z<$t.length;z++)E=$t[z],E!==null&&(E.Ju=a.computeEndSegmentLength(E));a.ap=x,Me.free(b)}x=a.pe}for(a=0;a<x.length;a++)if(b=x[a],b!==null&&b.link===y)return b;return null}Rd.prototype.j=function(a,y){return a===y?0:a===null?-1:y===null?1:a.Nc<y.Nc?-1:a.Nc>y.Nc?1:a.angle<y.angle?-1:a.angle>y.angle?1:0},Rd.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,ts,y.fromPort===this.port),E=a.Uo;if(0>E)return x;var b=a.Gl;if(1>=b||!y.isOrthogonal)return x;y=a.hv;var z=a.Zo;return(a.Nc===2||a.Nc===8)&&(E=b-1-E),((a=a.Nc===2||a.Nc===4)?y.y<z.y:y.x<z.x)?x+8*E:(a?y.y===z.y:y.x===z.x)?x:x+8*(b-1-E)},Rd.className="Knot";function cv(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new Rt,this.Gl=this.Uo=0,this.Zo=new Rt,this.Ju=0}cv.prototype.toString=function(){return this.link.toString()+" "+this.angle.toString()+" "+this.Nc.toString()+":"+this.Uo.toString()+"/"+this.Gl.toString()+" "+this.Zo.toString()+" "+this.Ju.toString()+" "+this.hv.toString()},cv.className="LinkInfo";function Ir(a){rr(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new Rt(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}Ir.prototype.cloneProtected=function(a){a.sn=this.sn,a.Gh=this.Gh,a.yn=this.yn,a.Am.assign(this.Am),a.vn=this.vn,a.un=this.un,a.Em=this.Em,a.xn=!0},Ir.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Ir.prototype.qb=function(){},Ir.prototype.toString=function(){var a=Ze(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},Ir.prototype.C=function(){if(this.isValidLayout){var a=this.diagram;if(a!==null&&!a.undoManager.isUndoingRedoing){var y=a.animationManager;!y.isTicking&&(y.defaultAnimation.isAnimating&&y.Cc(),this.isOngoing&&a.pi||this.isInitial&&!a.pi)&&(this.isValidLayout=!1,a.$b())}}},Ir.prototype.createNetwork=function(){return new xr(this)},Ir.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof ge?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof li?y.lg(a.memberParts):y.lg(a.iterator),y},Ir.prototype.updateParts=function(){this.isValidLayout=!0;var a=this.diagram;if(a===null&&this.network!==null)for(var y=this.network.vertexes.iterator;y.next();){var x=y.value.node;if(x!==null&&(a=x.diagram,a!==null))break}try{a!==null&&a.Ea("Layout"),this.commitLayout()}finally{a!==null&&a.eb("Layout")}},Ir.prototype.commitLayout=function(){if(this.network!==null){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();if(this.isRouting)for(a=this.network.edges.iterator;a.next();)a.value.commit()}},Ir.prototype.doLayout=function(a){var y=new Ye;a instanceof ge?(Kg(this,y,a.nodes,!0,this.rh,!0,!1,!0),Kg(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof li?Kg(this,y,a.memberParts,!1,this.rh,!0,!1,!0):y.addAll(a.iterator),0<y.count&&(a=this.diagram,a!==null&&a.Ea("Layout"),this.doMinimalNoNetworkLayout(y),a!==null&&a.eb("Layout")),this.isValidLayout=!0},Ir.prototype.doMinimalNoNetworkLayout=function(a){var y=Math.ceil(Math.sqrt(a.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var x=this.arrangementOrigin.x,E=x,b=this.arrangementOrigin.y,z=0,tt=0;for(a=a.iterator;a.next();){var rt=a.value;xp(rt);var ot=rt.measuredBounds,at=ot.width;ot=ot.height,rt.moveTo(E,b),rt instanceof li&&(rt.rh=!1),E+=Math.max(at,50)+20,tt=Math.max(tt,Math.max(ot,50)),z>=y-1?(z=0,E=x,b+=tt+20,tt=0):z++}},Ir.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var y=this.arrangementOrigin.x,x=y,E=this.arrangementOrigin.y,b=0,z=0,tt=this.network.vertexes.iterator;tt.next();){var rt=tt.value.node;if(!(rt===null||rt instanceof tn)&&(xp(rt),this.rh(rt))){var ot=rt.measuredBounds,at=ot.width;ot=ot.height,rt.moveTo(x,E),rt instanceof li&&(rt.rh=!1),x+=Math.max(at,50)+20,z=Math.max(z,Math.max(ot,50)),b>=a-1?(b=0,x=y,E+=z+20,z=0):b++}}},Ir.prototype.rh=function(a){return!!(!a.location.w()||a instanceof li&&a.rh)};function Kg(a,y,x,E,b,z,tt,rt){for(x=x.iterator;x.next();){var ot=x.value;E&&!ot.isTopLevel||b!==null&&!b(ot)||!ot.canLayout()||(z&&ot instanceof hn?ot.isLinkLabel||(ot instanceof li&&ot.layout===null?Kg(a,y,ot.memberParts,!1,b,z,tt,rt):(xp(ot),y.add(ot))):tt&&ot instanceof tn?y.add(ot):!rt||!ot.Zc()||ot instanceof hn||(xp(ot),y.add(ot)))}}function xp(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}Ir.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new Me),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},Ir.prototype.ex=function(a){var y=new Ye;return a instanceof ge?(Kg(this,y,a.nodes,!0,null,!0,!0,!0),Kg(this,y,a.links,!0,null,!0,!0,!0),Kg(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof li?Kg(this,y,a.memberParts,!1,null,!0,!0,!0):Kg(this,y,a.iterator,!1,null,!0,!0,!0),y},Ir.prototype.initialOrigin=function(a){var y=this.group;if(y!==null){var x=y.position.copy();return(isNaN(x.x)||isNaN(x.y))&&x.set(a),y=y.placeholder,y!==null&&(x=y.ga(es),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},Ie.Object.defineProperties(Ir.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},group:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a,a!==null&&(this.H=a.diagram))}},isOngoing:{get:function(){return this.sn},set:function(a){this.sn!==a&&(this.sn=a)}},isInitial:{get:function(){return this.Gh},set:function(a){this.Gh=a,a||(this.xn=!0)}},isViewportSized:{get:function(){return this.yn},set:function(a){this.yn!==a&&(this.yn=a)&&this.C()}},isRouting:{get:function(){return this.vn},set:function(a){this.vn!==a&&(this.vn=a)}},isRealtime:{get:function(){return this.un},set:function(a){this.un!==a&&(this.un=a)}},isValidLayout:{get:function(){return this.xn},set:function(a){this.xn!==a&&(this.xn=a,a||(a=this.diagram,a!==null&&(a.xh=!0)))}},network:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a,a!==null&&(a.layout=this))}},boundsComputation:{get:function(){return this.Em},set:function(a){this.Em!==a&&(this.Em=a,this.C())}},arrangementOrigin:{get:function(){return this.Am},set:function(a){this.Am.D(a)||(this.Am.assign(a),this.C())}}}),Ir.prototype.collectParts=Ir.prototype.ex,Ir.prototype.getLayoutBounds=Ir.prototype.ni,Ir.prototype.invalidateLayout=Ir.prototype.C,Ir.className="Layout";function xr(a){rr(this),this.Sc=a,this.wf=new Ye,this.ye=new Ye,this.Es=new Rn,this.zs=new Rn}xr.prototype.clear=function(){if(this.wf)for(var a=this.wf.iterator;a.next();)a.value.clear();if(this.ye)for(a=this.ye.iterator;a.next();)a.value.clear();this.wf=new Ye,this.ye=new Ye,this.Es=new Rn,this.zs=new Rn},xr.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutNetwork"+(this.layout!==null?"("+this.layout.toString()+")":"");if(0>=a)return y;if(y+=" vertexes: "+this.wf.count+" edges: "+this.ye.count,1<a){for(var x=this.wf.iterator;x.next();)y+=`
`+x.value.toString(a-1);for(x=this.ye.iterator;x.next();)y+=`
`+x.value.toString(a-1)}return y},xr.prototype.createVertex=function(){return new Oo(this)},xr.prototype.createEdge=function(){return new Za(this)},xr.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(tt){if(tt instanceof hn)return!tt.isLinkLabel;if(tt instanceof tn){var rt=tt.fromNode;return rt===null||rt.isLinkLabel?!1:(tt=tt.toNode,!(tt===null||tt.isLinkLabel))}return!1}),a=a.iterator;a.next();){var E=a.value;if(E instanceof hn&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)){if(E instanceof li&&E.layout===null)this.lg(E.memberParts,!1);else if(this.ki(E)===null){var b=this.createVertex();b.node=E,this.dh(b)}}}for(a.reset();a.next();)if(E=a.value,E instanceof tn&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)&&this.Lo(E)===null){var z=E.fromNode;b=E.toNode,z!==null&&b!==null&&z!==b&&(z=this.findGroupVertex(z),b=this.findGroupVertex(b),z!==null&&b!==null&&this.Zj(z,b,E))}}},xr.prototype.findGroupVertex=function(a){if(a===null)return null;var y=a.findVisibleNode();if(y===null)return null;if(a=this.ki(y),a!==null)return a;for(y=y.containingGroup;y!==null;){if(a=this.ki(y),a!==null)return a;y=y.containingGroup}return null},Bt=xr.prototype,Bt.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},Bt.Bl=function(a){if(a===null)return null;var y=this.ki(a);return y===null&&(y=this.createVertex(),y.node=a,this.dh(y)),y},Bt.Iu=function(a){if(a!==null&&Aw(this,a)){for(var y=a.tg,x=y.count-1;0<=x;x--){var E=y.M(x);this.Mj(E)}for(y=a.mg,a=y.count-1;0<=a;a--)x=y.M(a),this.Mj(x)}};function Aw(a,y){if(y===null)return!1;var x=a.wf.remove(y);return x&&(y=y.node,y!==null&&a.Es.remove(y)),x}Bt.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},Bt.ki=function(a){return a===null?null:this.Es.I(a)},Bt.Bo=function(a){if(a!==null){pv(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function pv(a,y){if(y!==null){a.ye.add(y);var x=y.link;x!==null&&a.Lo(x)===null&&a.zs.add(x,y),y.network=a}}Bt.Dy=function(a){if(a===null)return null;var y=a.fromNode,x=a.toNode,E=this.Lo(a);return E===null?(E=this.createEdge(),E.link=a,y!==null&&(E.fromVertex=this.Bl(y)),x!==null&&(E.toVertex=this.Bl(x)),this.Bo(E)):(y!==null?E.fromVertex=this.Bl(y):E.fromVertex=null,x!==null?E.toVertex=this.Bl(x):E.toVertex=null),E},Bt.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),mv(this,a)}};function mv(a,y){y!==null&&a.ye.remove(y)&&(y=y.link,y!==null&&a.zs.remove(y))}Bt.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},Bt.Lo=function(a){return a===null?null:this.zs.I(a)},Bt.Zj=function(a,y,x){if(a===null||y===null)return null;if(a.network===this&&y.network===this){var E=this.createEdge();return E.link=x,E.fromVertex=a,E.toVertex=y,this.Bo(E),E}return null},Bt.gm=function(a){if(a!==null){var y=a.fromVertex,x=a.toVertex;y!==null&&x!==null&&(y.Jl(a),x.Kl(a),a.gm(),y.Cl(a),x.zl(a))}},Bt.Ko=function(){for(var a=Ce(),y=this.ye.iterator;y.next();){var x=y.value;x.fromVertex===x.toVertex&&a.push(x)}for(y=a.length,x=0;x<y;x++)this.Mj(a[x]);Oe(a)},xr.prototype.deleteArtificialVertexes=function(){for(var a=Ce(),y=this.wf.iterator;y.next();){var x=y.value;x.node===null&&x.data===null&&a.push(x)}for(x=a.length,y=0;y<x;y++)this.Iu(a[y]);for(y=Ce(),x=this.ye.iterator;x.next();){var E=x.value;E.link===null&&E.data===null&&y.push(E)}for(x=y.length,E=0;E<x;E++)this.Mj(y[E]);Oe(a),Oe(y)};function k1(a){for(var y=Ce(),x=a.ye.iterator;x.next();){var E=x.value;E.fromVertex!==null&&E.toVertex!==null||y.push(E)}for(x=y.length,E=0;E<x;E++)a.Mj(y[E]);Oe(y)}xr.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),k1(this),this.Ko()),a=new Ke;for(var y=!0;y;){y=!1;for(var x=this.wf.iterator;x.next();){var E=x.value;if(0<E.tg.count||0<E.mg.count){y=this.layout.createNetwork(),a.add(y),vv(this,y,E),y=!0;break}}}return a.sort(function(b,z){return b===null||z===null||b===z?0:z.vertexes.count-b.vertexes.count}),a};function vv(a,y,x){if(x!==null&&x.network!==y){Aw(a,x),y.dh(x);for(var E=x.sourceEdges;E.next();){var b=E.value;b.network!==y&&(mv(a,b),pv(y,b),vv(a,y,b.fromVertex))}for(E=x.destinationEdges;E.next();)x=E.value,x.network!==y&&(mv(a,x),pv(y,x),vv(a,y,x.toVertex))}}xr.prototype.dz=function(){for(var a=new Ye,y=this.wf.iterator;y.next();)a.add(y.value.node);for(y=this.ye.iterator;y.next();)a.add(y.value.link);return a},Ie.Object.defineProperties(xr.prototype,{layout:{get:function(){return this.Sc},set:function(a){a!==null&&(this.Sc=a)}},vertexes:{get:function(){return this.wf}},edges:{get:function(){return this.ye}}}),xr.prototype.findAllParts=xr.prototype.dz,xr.prototype.splitIntoSubNetworks=xr.prototype.Zx,xr.prototype.deleteSelfEdges=xr.prototype.Ko,xr.prototype.reverseEdge=xr.prototype.gm,xr.prototype.linkVertexes=xr.prototype.Zj,xr.prototype.findEdge=xr.prototype.Lo,xr.prototype.deleteLink=xr.prototype.Yy,xr.prototype.deleteEdge=xr.prototype.Mj,xr.prototype.addLink=xr.prototype.Dy,xr.prototype.addEdge=xr.prototype.Bo,xr.prototype.findVertex=xr.prototype.ki,xr.prototype.deleteNode=xr.prototype.Zy,xr.prototype.deleteVertex=xr.prototype.Iu,xr.prototype.addNode=xr.prototype.Bl,xr.prototype.addVertex=xr.prototype.dh,xr.prototype.addParts=xr.prototype.lg,xr.className="LayoutNetwork";function Oo(a){rr(this),this.ob=a,this.j=new Me(0,0,10,10).freeze(),this.o=new Rt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new Ke,this.mg=new Ke}Oo.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new Ke,this.mg=new Ke},Oo.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+gr(this);if(0<a&&(y+=this.node!==null?"("+this.node.toString()+")":"",1<a)){a="";for(var x=!0,E=this.tg.iterator;E.next();){var b=E.value;x?x=!1:a+=",",a+=b.toString(0)}for(b="",x=!0,E=this.mg.iterator;E.next();){var z=E.value;x?x=!1:b+=",",b+=z.toString(0)}y+=" sources: "+a+" destinations: "+b}return y},Oo.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;on(x)?(x.x=y.x,x.y=y.y,x.width=y.width,x.height=y.height):a.bounds=y.copy()}else if(a=this.node,a!==null){if(y=this.bounds,!(a instanceof li)){x=Me.alloc(),a.Va();var E=this.network.layout.ni(a,x),b=a.locationObject.ga(Xi);if(E.w()&&b.w()){a.moveTo(y.x+this.focusX-(b.x-E.x),y.y+this.focusY-(b.y-E.y)),Me.free(x);return}Me.free(x)}a.moveTo(y.x,y.y)}},Oo.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},Oo.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},Oo.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},Oo.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function yv(a,y){return a=a.Sh,y=y.Sh,a?y?(a=a.text,y=y.text,a<y?-1:a>y?1:0):1:y!==null?-1:0}Ie.Object.defineProperties(Oo.prototype,{sourceEdgesArrayAccess:{get:function(){return this.tg._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.mg._dataArray}},data:{get:function(){return this.ub},set:function(a){if(this.ub=a,a!==null&&a.bounds){var y=a.bounds;a=y.x;var x=y.y,E=y.width;y=y.height,this.o.h(E/2,y/2),this.j.h(a,x,E,y)}}},node:{get:function(){return this.Sh},set:function(a){if(this.Sh!==a){this.Sh=a,a.Va();var y=this.network.layout,x=Me.alloc(),E=y.ni(a,x);y=E.x;var b=E.y,z=E.width;if(E=E.height,isNaN(y)&&(y=0),isNaN(b)&&(b=0),this.j.h(y,b,z,E),Me.free(x),!(a instanceof li)&&(a=a.locationObject.ga(Xi),a.w())){this.o.h(a.x-y,a.y-b);return}this.o.h(z/2,E/2)}}},bounds:{get:function(){return this.j},set:function(a){this.j.D(a)||this.j.assign(a)}},focus:{get:function(){return this.o},set:function(a){this.o.D(a)||this.o.assign(a)}},centerX:{get:function(){return this.j.x+this.o.x},set:function(a){var y=this.j;y.x+this.o.x!==a&&(y.ka(),y.x=a-this.o.x,y.freeze())}},centerY:{get:function(){return this.j.y+this.o.y},set:function(a){var y=this.j;y.y+this.o.y!==a&&(y.ka(),y.y=a-this.o.y,y.freeze())}},focusX:{get:function(){return this.o.x},set:function(a){var y=this.o;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},focusY:{get:function(){return this.o.y},set:function(a){var y=this.o;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},x:{get:function(){return this.j.x},set:function(a){var y=this.j;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},y:{get:function(){return this.j.y},set:function(a){var y=this.j;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},width:{get:function(){return this.j.width},set:function(a){var y=this.j;y.width!==a&&(y.ka(),y.width=a,y.freeze())}},height:{get:function(){return this.j.height},set:function(a){var y=this.j;y.height!==a&&(y.ka(),y.height=a,y.freeze())}},network:{get:function(){return this.ob},set:function(a){this.ob=a}},sourceVertexes:{get:function(){for(var a=new Ye,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new Ye,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new Ye,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);for(y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},sourceEdges:{get:function(){return this.tg.iterator}},destinationEdges:{get:function(){return this.mg.iterator}},edges:{get:function(){for(var a=new Ke,y=this.sourceEdges;y.next();)a.add(y.value);for(y=this.destinationEdges;y.next();)a.add(y.value);return a.iterator}},edgesCount:{get:function(){return this.tg.count+this.mg.count}}}),Oo.prototype.deleteDestinationEdge=Oo.prototype.Jl,Oo.prototype.addDestinationEdge=Oo.prototype.zl,Oo.prototype.deleteSourceEdge=Oo.prototype.Kl,Oo.prototype.addSourceEdge=Oo.prototype.Cl,Oo.className="LayoutVertex",Oo.standardComparer=yv,Oo.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.Sh;var x=y.Sh;if(a!==null){if(x!==null){for(y=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),a=x.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),x=0;x<y.length;x++)if(a[x]!==""&&a[x]!==void 0){var E=parseFloat(y[x]),b=parseFloat(a[x]);if(isNaN(E))if(isNaN(b)){if(y[x].localeCompare(a[x])!==0)return y[x].localeCompare(a[x])}else return 1;else{if(isNaN(b))return-1;if(E-b!==0)return E-b}}else if(y[x]!=="")return 1;return a[x]!==""&&a[x]!==void 0?-1:0}return 1}return x!==null?-1:0}return 1}return y!==null?-1:0};function Za(a){rr(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}Za.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},Za.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+gr(this);return 0<a&&(y+=this.$k!==null?"("+this.$k.toString()+")":"",1<a&&(y+=" "+(this.kd?this.kd.toString():"null")+" --> "+(this.qd?this.qd.toString():"null"))),y},Za.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Za.prototype.commit=function(){},Za.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},Ie.Object.defineProperties(Za.prototype,{network:{get:function(){return this.nb},set:function(a){this.nb=a}},data:{get:function(){return this.ub},set:function(a){this.ub!==a&&(this.ub=a)}},link:{get:function(){return this.$k},set:function(a){this.$k!==a&&(this.$k=a)}},fromVertex:{get:function(){return this.kd},set:function(a){this.kd!==a&&(this.kd=a)}},toVertex:{get:function(){return this.qd},set:function(a){this.qd!==a&&(this.qd=a)}}}),Za.prototype.getOtherVertex=Za.prototype.Ax,Za.className="LayoutEdge";function ds(a){Ir.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new an(NaN,NaN).freeze(),this.tf=new an(10,10).freeze(),this.Jb=Bp,this.Rb=I0,this.nd=Cp,this.hd=uw,a&&Object.assign(this,a)}ue(ds,Ir),ds.prototype.cloneProtected=function(a){Ir.prototype.cloneProtected.call(this,a),a.zo=this.zo,a.yo=this.yo,a.yg.assign(this.yg),a.tf.assign(this.tf),a.Jb=this.Jb,a.Rb=this.Rb,a.nd=this.nd,a.hd=this.hd},ds.prototype.qb=function(a){a.classType===ds?a===Cp||a===H0||a===wv||a===D0?this.sorting=a:a===I0||a===vA?this.arrangement=a:a===Bp||a===U0?this.alignment=a:pe("Unknown enum value: "+a):Ir.prototype.qb.call(this,a)},ds.prototype.doLayout=function(a){this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var y=this.ex(a);a=this.diagram;for(var x=y.copy().iterator;x.next();){var E=x.value;if(!E.ph()||E.fromNode===null&&E.toNode===null){if(E.Va(),E instanceof li)for(E=E.memberParts;E.next();)y.remove(E.value)}else y.remove(E)}var b=y.Fa();if(b.length!==0){switch(this.sorting){case D0:b.reverse();break;case Cp:b.sort(this.comparer);break;case H0:b.sort(this.comparer),b.reverse()}var z=this.wrappingColumn;isNaN(z)&&(z=0);var tt=this.wrappingWidth;switch(isNaN(tt)&&a!==null?(y=a.padding,tt=Math.max(a.viewportBounds.width-y.left-y.right,0)):tt=Math.max(this.wrappingWidth,0),0>=z&&0>=tt&&(z=1),y=this.spacing.width,isFinite(y)||(y=0),x=this.spacing.height,isFinite(x)||(x=0),a!==null&&a.Ea("Layout"),E=[],this.alignment){case U0:var rt=y,ot=x,at=Me.alloc(),At=Math.max(this.cellSize.width,1);if(!isFinite(At))for(var ft=At=0;ft<b.length;ft++){var pt=this.ni(b[ft],at);At=Math.max(At,pt.width)}if(At=Math.max(At+rt,1),ft=Math.max(this.cellSize.height,1),!isFinite(ft))for(pt=ft=0;pt<b.length;pt++){var xt=this.ni(b[pt],at);ft=Math.max(ft,xt.height)}ft=Math.max(ft+ot,1),pt=this.arrangement;for(var Ct=xt=this.arrangementOrigin.x,Mt=this.arrangementOrigin.y,Gt=0,It=0,zt=0;zt<b.length;zt++){var Yt=b[zt],Xt=this.ni(Yt,at),$t=Math.ceil((Xt.width+rt)/At)*At,de=Math.ceil((Xt.height+ot)/ft)*ft;switch(pt){case vA:var An=Math.abs(Ct-Xt.width);break;default:An=Ct+Xt.width}switch((0<z&&Gt>z-1||0<tt&&0<Gt&&An-xt>tt)&&(E.push(new Me(0,Mt,tt+rt,It)),Gt=0,Ct=xt,Mt+=It,It=0),It=Math.max(It,de),pt){case vA:Xt=-Xt.width;break;default:Xt=0}switch(Yt.moveTo(Ct+Xt,Mt),pt){case vA:Ct-=$t;break;default:Ct+=$t}Gt++}E.push(new Me(0,Mt,tt+rt,It)),Me.free(at);break;case Bp:for(ot=tt,At=z,ft=y,pt=x,tt=Me.alloc(),xt=Math.max(this.cellSize.width,1),z=Mt=at=0,rt=Rt.alloc(),Ct=0;Ct<b.length;Ct++)It=b[Ct],Gt=this.ni(It,tt),It=Zh(It,It.locationObject,It.locationSpot,rt),at=Math.max(at,It.x),Mt=Math.max(Mt,Gt.width-It.x),z=Math.max(z,It.y);switch(Ct=this.arrangement,Ct){case vA:at+=ft;break;default:Mt+=ft}xt=isFinite(xt)?Math.max(xt+ft,1):Math.max(at+Mt,1);var Bn=It=this.arrangementOrigin.x;for(zt=this.arrangementOrigin.y,Mt=0,ot>=at&&(ot-=at),at=Yt=0,$t=Math.max(this.cellSize.height,1),Xt=z=0,de=!0,Gt=Rt.alloc(),An=0;An<b.length;An++){var vn=b[An],$e=this.ni(vn,tt),Re=Zh(vn,vn.locationObject,vn.locationSpot,rt);if(0<Mt)switch(Ct){case vA:Bn=(Bn-It-($e.width-Re.x))/xt,Bn=re.$(Math.round(Bn),Bn)?Math.round(Bn):Math.floor(Bn),Bn=Bn*xt+It;break;default:Bn=(Bn-It+Re.x)/xt,Bn=re.$(Math.round(Bn),Bn)?Math.round(Bn):Math.ceil(Bn),Bn=Bn*xt+It}else switch(Ct){case vA:Yt=Bn+Re.x+$e.width;break;default:Yt=Bn-Re.x}switch(Ct){case vA:var ai=-(Bn+Re.x)+Yt;break;default:ai=Bn+$e.width-Re.x-Yt}if(0<At&&Mt>At-1||0<ot&&0<Mt&&ai>ot){for(E.push(new Me(0,de?zt-z:zt,ot+ft,Xt+z+pt)),Bn=0;Bn<Mt&&An!==Mt;Bn++){ai=b[An-Mt+Bn];var ei=Zh(ai,ai.locationObject,ai.locationSpot,Gt);ai.moveTo(ai.position.x,ai.position.y+z-ei.y)}Xt+=pt,zt=de?zt+Xt:zt+(Xt+z),Mt=Xt=z=0,Bn=It,de=!1}switch(Bn===It&&(at=Ct===vA?Math.max(at,$e.width-Re.x):Math.min(at,-Re.x)),z=Math.max(z,Re.y),Xt=Math.max(Xt,$e.height-Re.y),isFinite($t)&&(Xt=Math.max(Xt,Math.max($e.height,$t)-Re.y)),de?vn.moveTo(Bn-Re.x,zt-Re.y):vn.moveTo(Bn-Re.x,zt),Ct){case vA:Bn-=Re.x+ft;break;default:Bn+=$e.width-Re.x+ft}Mt++}if(E.push(new Me(0,zt,ot+ft,(de?Xt:Xt+z)+pt)),b.length!==Mt)for(ot=0;ot<Mt;ot++)At=b[b.length-Mt+ot],ft=Zh(At,At.locationObject,At.locationSpot,rt),At.moveTo(At.position.x,At.position.y+z-ft.y);if(Rt.free(rt),Rt.free(Gt),Ct===vA)for(b=0;b<E.length;b++)z=E[b],z.width+=at,z.x-=at;else for(b=0;b<E.length;b++)z=E[b],z.x>at&&(z.width+=z.x-at,z.x=at);Me.free(tt)}for(rt=z=tt=b=0;rt<E.length;rt++)ot=E[rt],b=Math.min(b,ot.x),tt=Math.min(tt,ot.y),z=Math.max(z,ot.x+ot.width);this.arrangement===vA?this.commitLayers(E,new Rt(b+y/2-(z+b),tt-x/2)):this.commitLayers(E,new Rt(b-y/2,tt-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},ds.prototype.commitLayers=function(){};function uw(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}Ie.Object.defineProperties(ds.prototype,{wrappingWidth:{get:function(){return this.zo},set:function(a){this.zo!==a&&(0<a||isNaN(a))&&(this.zo=a,this.isViewportSized=isNaN(a),this.C())}},wrappingColumn:{get:function(){return this.yo},set:function(a){this.yo!==a&&(0<a||isNaN(a))&&(this.yo=a,this.C())}},cellSize:{get:function(){return this.yg},set:function(a){this.yg.D(a)||(this.yg.assign(a),this.C())}},spacing:{get:function(){return this.tf},set:function(a){this.tf.D(a)||(this.tf.assign(a),this.C())}},alignment:{get:function(){return this.Jb},set:function(a){this.Jb===a||a!==Bp&&a!==U0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==I0&&a!==vA||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==wv&&a!==D0&&a!==Cp&&a!==H0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var U0=new ce(ds,"Position",0),Bp=new ce(ds,"Location",1),I0=new ce(ds,"LeftToRight",2),vA=new ce(ds,"RightToLeft",3),wv=new ce(ds,"Forward",4),D0=new ce(ds,"Reverse",5),Cp=new ce(ds,"Ascending",6),H0=new ce(ds,"Descending",7);ds.className="GridLayout",ds.standardComparer=uw,ds.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),y=y.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);for(var x=0;x<a.length;x++)if(y[x]!==""&&y[x]!==void 0){var E=parseFloat(a[x]),b=parseFloat(y[x]);if(isNaN(E))if(isNaN(b)){if(a[x].localeCompare(y[x])!==0)return a[x].localeCompare(y[x])}else return 1;else{if(isNaN(b))return-1;if(E-b!==0)return E-b}}else if(a[x]!=="")return 1;return y[x]!==""&&y[x]!==void 0?-1:0}return 1}return y!==null?-1:0},ds.Position=U0,ds.Location=Bp,ds.LeftToRight=I0,ds.RightToLeft=vA,ds.Forward=wv,ds.Reverse=D0,ds.Ascending=Cp,ds.Descending=H0;function lr(){this.On=new Ye,this.Dn=new Ye,this.Pa=new Ye,this.cf=new Rn,this.bf=new Rn,this.aj=new Rn,this.H=null,this.tp=!1}Bt=lr.prototype,Bt.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},Bt.Xe=function(a){this.H=a},Bt.oi=function(a){if(a instanceof hn){if(this.On.add(a),a instanceof li){var y=a.containingGroup;y===null?this.H.ai.add(a):y.gl.add(a),y=a.layout,y!==null&&(y.diagram=this.H)}}else a instanceof tn?this.Dn.add(a):a instanceof Wi||this.Pa.add(a);y=a.data,y===null||a instanceof Wi||(a instanceof tn?this.bf.add(y,a):this.cf.add(y,a))},Bt.pc=function(a){if(a.Ej(),a instanceof hn){if(this.On.remove(a),a instanceof li){var y=a.containingGroup;y===null?this.H.ai.remove(a):y.gl.remove(a),y=a.layout,y!==null&&(y.diagram=null)}}else a instanceof tn?this.Dn.remove(a):a instanceof Wi||this.Pa.remove(a);y=a.data,y===null||a instanceof Wi||(a instanceof tn?this.bf.remove(y):this.cf.remove(y))},Bt.Wd=function(){var a=this.H;if(a!==null){for(var y=a.nodeTemplateMap.iterator;y.next();){var x=y.value,E=y.key;(!x.Zc()||x instanceof li)&&pe('Invalid node template in Diagram.nodeTemplateMap: template for "'+E+'" must be a Node or a simple Part, not a Group or Link: '+x)}for(y=a.groupTemplateMap.iterator;y.next();)x=y.value,E=y.key,x instanceof li||pe('Invalid group template in Diagram.groupTemplateMap: template for "'+E+'" must be a Group, not a normal Node or Link: '+x);for(y=a.linkTemplateMap.iterator;y.next();)x=y.value,E=y.key,x instanceof tn||pe('Invalid link template in Diagram.linkTemplateMap: template for "'+E+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Ce(),x=a.selection.iterator;x.next();)(E=x.value.data)&&y.push(E);for(x=Ce(),a=a.highlighteds.iterator;a.next();)(E=a.value.data)&&x.push(E);for(a=Ce(),E=this.nodes.iterator;E.next();){var b=E.value;b.data!==null&&(a.push(b.data),a.push(b.location))}for(E=this.links.iterator;E.next();)b=E.value,b.data!==null&&(a.push(b.data),a.push(b.location));for(E=this.parts.iterator;E.next();)b=E.value,b.data!==null&&(a.push(b.data),a.push(b.location));for(this.removeAllModeledParts(),this.addAllModeledParts(),E=0;E<y.length;E++)b=this.Lc(y[E]),b!==null&&(b.isSelected=!0);for(E=0;E<x.length;E++)b=this.Lc(x[E]),b!==null&&(b.isHighlighted=!0);for(E=0;E<a.length;E+=2)b=this.Lc(a[E]),b!==null&&(b.location=a[E+1]);Oe(y),Oe(x),Oe(a)}},lr.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},lr.prototype.addModeledParts=function(a,y){var x=this,E=this.diagram.model;a.forEach(function(b){E.lb(b)&&hw(x,b,!1)}),a.forEach(function(b){E.lb(b)&&x.resolveReferencesForData(b)}),y!==!1&&Ig(this.diagram,!1)};function hw(a,y,x){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.cf.contains(y)){x===void 0&&(x=!0);t:{if(y!=null&&!a.H.undoManager.isUndoingRedoing&&!a.cf.contains(y)){var E=a.Ro(y),b=gw(a,y,E);if(b!==null&&(Tl(b),b=b.copy(),b!==null)){var z=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,b.Tf=E,b.ub=y,a.tp&&(b.Jg="Tool"),a.diagram.add(b),b.ub=null,b.data=y,a.diagram.skipsModelSourceBindings=z,E=b;break t}}E=null}E!==null&&x&&a.resolveReferencesForData(y)}}lr.prototype.insertLink=function(){return null},lr.prototype.resolveReferencesForData=function(){},lr.prototype.Ro=function(a){return this.H.model.Ro(a)};function gw(a,y,x){a=a.H;var E=a.model;return E.Xj()&&E.Yu(y)?(y=a.groupTemplateMap.I(x),y===null&&(y=a.groupTemplateMap.I(""),y===null&&(cw||(cw=!0,Oi('No Group template found for category "'+x+'"'),Oi(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(dw||(dw=!0,Oi('No Node template found for category "'+x+'"'),Oi(" Using default node template")),y=a.ny))),y}lr.prototype.getLinkCategoryForData=function(){return""},lr.prototype.setLinkCategoryForData=function(){},lr.prototype.setFromNodeForLink=function(){},lr.prototype.setToNodeForLink=function(){},lr.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(pw||(pw=!0,Oi('No Link template found for category "'+a+'"'),Oi(" Using default link template")),x=y.my)),x},lr.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},lr.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},lr.prototype.ip=function(a){a=this.Lc(a),a!==null&&(wd(this.diagram,a,!1),this.unresolveReferencesForPart(a))},lr.prototype.unresolveReferencesForPart=function(){},lr.prototype.removeDataForLink=function(){},lr.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},lr.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof hn?a:null)},lr.prototype.findLinkForKey=function(){return null},Bt=lr.prototype,Bt.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},Bt.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof hn?a:null)},Bt.Kc=function(a){return a===null?null:this.bf.I(a)},Bt.ms=function(a){for(var y=0;y<arguments.length;++y);y=new Ye;for(var x=this.On.iterator;x.next();){var E=x.value,b=E.data;if(b!==null)for(var z=0;z<arguments.length;z++){var tt=arguments[z];if(on(tt)&&Sv(this,b,tt)){y.add(E);break}}}return y.iterator},Bt.ls=function(a){for(var y=0;y<arguments.length;++y);y=new Ye;for(var x=this.Dn.iterator;x.next();){var E=x.value,b=E.data;if(b!==null)for(var z=0;z<arguments.length;z++){var tt=arguments[z];if(on(tt)&&Sv(this,b,tt)){y.add(E);break}}}return y.iterator};function Sv(a,y,x){for(var E in x){var b=y[E],z=x[E];if(ni(z)){if(!ni(b)||b.length<z.length)return!1;for(var tt=0;tt<b.length;tt++){var rt=z[tt];if(rt!==void 0&&!fw(a,b[tt],rt))return!1}}else if(!fw(a,b,z))return!1}return!0}function fw(a,y,x){if(typeof x=="function"){if(!x(y))return!1}else if(x instanceof RegExp){if(!y||!x.test(y.toString()))return!1}else if(on(y)&&on(x)){if(!Sv(a,y,x))return!1}else if(y!==x)return!1;return!0}lr.prototype.doModelChanged=function(a){if(this.H){var y=this.H;if(a.model===y.model){var x=a.change;if(y.doModelChanged(a),y.aa){y.aa=!1;try{var E=a.modelChange;if(E!=="")if(x===Qr){if(E==="nodeCategory"){var b=this.Lc(a.object),z=a.newValue;b!==null&&typeof z=="string"&&(b.category=z)}else E==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===to){var tt=a.newValue;E==="nodeDataArray"&&on(tt)&&hw(this,tt),y.isModified=!0}else if(x===Co){var rt=a.oldValue;E==="nodeDataArray"&&on(rt)&&this.ip(rt),y.isModified=!0}else x===Vs&&(E==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):E==="ModelDisplaced"&&this.Wd());else if(x===Qr){var ot=a.propertyName,at=a.object;at===y.model?(ot==="nodeKeyProperty"||ot==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(at,ot),y.isModified=!0}else if(x===to||x===Co){var At=a.change===to,ft=At?a.newParam:a.oldParam,pt=At?a.newValue:a.oldValue,xt=this.aj.I(a.object);if(Array.isArray(xt))for(a=0;a<xt.length;a++){var Ct=xt[a];if(At)i0(Ct,pt,ft,!0);else if(!(0>ft)){var Mt=ft+op(Ct);Ct.pc(Mt,!0),Um(Ct,Mt,ft)}}y.isModified=!0}}finally{y.aa=!0}}}}},lr.prototype.updateAllTargetBindings=function(a){a===void 0&&(a="");for(var y=this.parts.iterator;y.next();)y.value.La(a);for(y=this.nodes.iterator;y.next();)y.value.La(a);for(y=this.links.iterator;y.next();)y.value.La(a)},lr.prototype.rp=function(){for(var a=this.H.model,y=new Ye,x=a.nodeDataArray,E=0;E<x.length;E++)y.add(x[E]);var b=[];for(this.nodes.each(function(tt){tt.data===null||y.contains(tt.data)||b.push(tt.data)}),this.parts.each(function(tt){tt.data===null||y.contains(tt.data)||b.push(tt.data)}),b.forEach(function(tt){Pw(a,tt,!1)}),E=0;E<x.length;E++){var z=x[E];this.Lc(z)===null&&Cw(a,z,!1)}for(this.refreshDataBoundLinks(),x=this.parts.iterator;x.next();)x.value.updateRelationshipsFromData();for(x=this.nodes.iterator;x.next();)x.value.updateRelationshipsFromData();for(x=this.links.iterator;x.next();)x.value.updateRelationshipsFromData()},lr.prototype.refreshDataBoundLinks=function(){},lr.prototype.updateRelationshipsFromData=function(){},lr.prototype.updateDataBindings=function(a,y){if(typeof y=="string"){var x=this.Lc(a);if(x!==null)x.La(y);else{x=null;for(var E=this.aj.iterator;E.next();){for(var b=E.value,z=0;z<b.length;z++){var tt=b[z].sx(a);tt!==null&&(x===null&&(x=Ce()),x.push(tt))}if(x!==null)break}if(x!==null){for(E=0;E<x.length;E++)x[E].La(y);Oe(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function xv(a,y){var x=y.Hh;if(ni(x)){var E=a.aj.I(x);if(E===null)E=[],E.push(y),a.aj.add(x,E);else{for(a=0;a<E.length;a++)if(E[a]===y)return;E.push(y)}}}function Bv(a,y,x){ql(y,function(tt){tt=tt.O.s;for(var rt=tt.length,ot=0;ot<rt;ot++)kf(x,tt[ot])});var E=y.Hh;if(ni(E)){var b=a.aj.I(E);if(b!==null){for(var z=0;z<b.length;z++)if(b[z]===y){b.splice(z,1),b.length===0&&a.aj.remove(E);break}}}}lr.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var E=new Rn;if(ni(a))for(var b=0;b<a.length;b++)O0(this,a[b],y,E,x);else for(a=a.iterator;a.next();)O0(this,a.value,y,E,x);if(y!==null){x=y.model,a=y.toolManager.findTool("Dragging"),a=a!==null?a.dragOptions.dragsLink:y.Wm.dragsLink,b=new Ye;for(var z=new Rn,tt=E.iterator;tt.next();){var rt=tt.value;if(rt instanceof tn)a||rt.fromNode!==null&&rt.toNode!==null||b.add(rt);else if(rt instanceof hn&&rt.data!==null&&x.Tl()){var ot=rt;rt=tt.key;var at=rt.pg();at!==null&&(at=E.I(at),at!==null?(x.qe(ot.data,x.wa(at.data)),ot=y.Kc(ot.data),rt=rt.kh(),rt!==null&&ot!==null&&z.add(rt,ot)):x.qe(ot.data,void 0))}}if(0<b.count&&y.Is(b,!1),0<z.count)for(x=z.iterator;x.next();)E.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var At=new Rn;E.each(function(ft){ft.key.data!==null&&At.add(ft.key.data,ft.value.data)}),x(At,y,this.H.model)}for(y=E.iterator;y.next();)y.value.La();return E};function O0(a,y,x,E,b){if(y===null||b&&!y.canCopy())return null;if(E.contains(y))return E.I(y);var z=a.copyPartData(y,x);if(!(z instanceof jn))return null;if(z.isSelected=!1,z.isHighlighted=!1,E.add(y,z),y instanceof hn){for(var tt=y.linksConnected;tt.next();){var rt=tt.value;if(rt.fromNode===y){var ot=E.I(rt);ot!==null&&(ot.fromNode=z)}rt.toNode===y&&(rt=E.I(rt),rt!==null&&(rt.toNode=z))}if(y instanceof li&&z instanceof li)for(y=y.memberParts;y.next();)tt=O0(a,y.value,x,E,b),tt instanceof tn||tt===null||(tt.containingGroup=z)}else if(y instanceof tn&&z instanceof tn)for(tt=y.fromNode,tt!==null&&(tt=E.I(tt),tt!==null&&(z.fromNode=tt)),tt=y.toNode,tt!==null&&(tt=E.I(tt),tt!==null&&(z.toNode=tt)),y=y.labelNodes;y.next();)tt=O0(a,y.value,x,E,b),tt!==null&&tt instanceof hn&&(tt.labeledLink=z);return z}lr.prototype.copyPartData=function(a,y){var x=null,E=a.data;if(E!==null&&y!==null){var b=y.model;a instanceof tn||(E=b.copyNodeData(E),on(E)&&(b.xf(E),x=y.Lc(E)))}else Tl(a),x=a.copy(),x!==null&&(b=this.H,y!==null?y.add(x):E!==null&&b!==null&&b.commandHandler!==null&&b.commandHandler.copiesClipboardData&&(y=b.model,b=null,x instanceof tn||(b=y.copyNodeData(E)),on(b)&&(x.data=b)));return x},Ie.Object.defineProperties(lr.prototype,{nodes:{get:function(){return this.On}},links:{get:function(){return this.Dn}},parts:{get:function(){return this.Pa}},diagram:{get:function(){return this.H}},addsToTemporaryLayer:{get:function(){return this.tp},set:function(a){this.tp=a}}}),lr.prototype.updateAllRelationshipsFromData=lr.prototype.rp,lr.prototype.findLinksByExample=lr.prototype.ls,lr.prototype.findNodesByExample=lr.prototype.ms,lr.prototype.findLinkForData=lr.prototype.Kc,lr.prototype.findNodeForData=lr.prototype.ii,lr.prototype.findPartForData=lr.prototype.Lc,lr.prototype.findNodeForKey=lr.prototype.Vb,lr.prototype.removeModeledPart=lr.prototype.ip,lr.prototype.removeModeledParts=lr.prototype.Gs,lr.prototype.rebuildParts=lr.prototype.Wd;var dw=!1,cw=!1,pw=!1;lr.className="PartManager";function is(a){lr.apply(this,arguments)}ue(is,lr),is.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),mw(this,a.linkDataArray)},is.prototype.addModeledParts=function(a){for(lr.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)Pc(a.value);Ig(this.diagram,!1)};function mw(a,y){y.forEach(function(x){vw(a,x)}),Ig(a.diagram,!1)}function vw(a,y){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.bf.contains(y)){var x=a.getLinkCategoryForData(y),E=a.findLinkTemplateForCategory(x);if(E!==null){Tl(E);var b=E.copy();if(b!==null){E=a.diagram.skipsModelSourceBindings,a.diagram.skipsModelSourceBindings=!0,b.Tf=x,b.ub=y,x=a.diagram.model;var z=K0(x,y,!0);z!==""&&(b.fromPortId=z),z=ul(x,y,!0),z!==void 0&&(z=a.Vb(z),z instanceof hn&&(b.fromNode=z)),z=K0(x,y,!1),z!==""&&(b.toPortId=z),z=ul(x,y,!1),z!==void 0&&(z=a.Vb(z),z instanceof hn&&(b.toNode=z)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(tt){tt=a.Vb(tt),tt!==null&&(tt.labeledLink=b)}),a.tp&&(b.Jg="Tool"),a.diagram.add(b),b.ub=null,b.data=y,a.diagram.skipsModelSourceBindings=E}}}}is.prototype.removeAllModeledParts=function(){var a=this.diagram.model;yw(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function yw(a,y){y.forEach(function(x){a.ip(x)})}is.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},is.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},is.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},is.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},is.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},is.prototype.findPartForKey=function(a){var y=lr.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},is.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},is.prototype.doModelChanged=function(a){var y=this;if(lr.prototype.doModelChanged.call(this,a),this.diagram){var x=this.diagram;if(a.model===x.model){var E=a.change;if(x.aa){x.aa=!1;try{var b=a.modelChange;if(b!==""){if(E===Qr){if(b==="linkFromKey"){var z=this.Kc(a.object);if(z!==null){var tt=this.Vb(a.newValue);z.fromNode=tt}}else if(b==="linkToKey"){var rt=this.Kc(a.object);if(rt!==null){var ot=this.Vb(a.newValue);rt.toNode=ot}}else if(b==="linkFromPortId"){var at=this.Kc(a.object);if(at!==null){var At=a.newValue;typeof At=="string"&&(at.fromPortId=At)}}else if(b==="linkToPortId"){var ft=this.Kc(a.object);if(ft!==null){var pt=a.newValue;typeof pt=="string"&&(ft.toPortId=pt)}}else if(b==="nodeGroupKey"){var xt=this.Lc(a.object);if(xt!==null){var Ct=a.newValue;if(Ct!==void 0){var Mt=this.Vb(Ct);Mt instanceof li?xt.containingGroup=Mt:xt.containingGroup=null}else xt.containingGroup=null}}else if(b==="linkLabelKeys"){var Gt=this.Kc(a.object);if(Gt!==null){var It=a.oldValue,zt=a.newValue;Array.isArray(It)&&It.forEach(function(Re){0<=zt.indexOf(Re)||(Re=y.Vb(Re),Re!==null&&(Re.labeledLink=null))}),Array.isArray(zt)&&zt.forEach(function(Re){Re=y.Vb(Re),Re!==null&&(Re.labeledLink=Gt)})}}else if(b==="linkCategory"){var Yt=this.Kc(a.object),Xt=a.newValue;Yt!==null&&typeof Xt=="string"&&(Yt.category=Xt)}else b==="linkDataArray"&&(yw(this,a.oldValue),mw(this,a.newValue));x.isModified=!0}else if(E===to){var $t=a.newValue;if(b==="linkDataArray"&&typeof $t=="object"&&$t!==null)vw(this,$t);else if(b==="linkLabelKeys"&&Vg($t)){var de=this.Kc(a.object),An=this.Vb($t);de!==null&&An!==null&&(An.labeledLink=de)}x.isModified=!0}else if(E===Co){var Bn=a.oldValue;if(b==="linkDataArray"&&typeof Bn=="object"&&Bn!==null)this.ip(Bn);else if(b==="linkLabelKeys"&&Vg(Bn)){var vn=this.Vb(Bn);vn!==null&&(vn.labeledLink=null)}x.isModified=!0}}else if(E===Qr){var $e=a.propertyName;a.object!==x.model||$e!=="linkFromKeyProperty"&&$e!=="linkToKeyProperty"&&$e!=="linkFromPortIdProperty"&&$e!=="linkToPortIdProperty"&&$e!=="linkLabelKeysProperty"&&$e!=="nodeIsGroupProperty"&&$e!=="nodeGroupKeyProperty"&&$e!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},is.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new Ye,E=y.linkDataArray;E.forEach(function(z){x.add(z)});var b=[];this.links.each(function(z){z.data===null||x.contains(z.data)||b.push(z.data)}),b.forEach(function(z){bw(y,z,!1)}),E.forEach(function(z){a.Kc(z)===null&&kw(y,z,!1)})},is.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;if(a instanceof tn){var b=ul(E,y,!0);if(b=x.Vb(b),a.fromNode=b,b=ul(E,y,!1),b=x.Vb(b),a.toNode=b,y=E.Ef(y),0<y.length||0<a.labelNodes.count){if(y.length===1&&a.labelNodes.count===1){b=y[0];var z=a.labelNodes.first();if(E.wa(z.data)===b)return}b=new Ye().addAll(y);var tt=new Ye;a.labelNodes.each(function(rt){rt.data!==null&&(rt=E.wa(rt.data),rt!==void 0&&tt.add(rt))}),y=tt.copy(),y.hp(b),b=b.copy(),b.hp(tt),(0<y.count||0<b.count)&&(y.each(function(rt){rt=x.Vb(rt),rt!==null&&rt.labeledLink===a&&(rt.labeledLink=null)}),b.each(function(rt){rt=x.Vb(rt),rt!==null&&rt.labeledLink!==a&&(rt.labeledLink=a)}))}}else!(a instanceof Wi)&&(y=E.lh(y),y=x.findPartForKey(y),y===null||y instanceof li)&&(a.containingGroup=y)}}},is.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=Pp(y,x),b=this.Lc(a);if(E!==null&&b!==null){E=E.iterator;for(var z={};E.next();){var tt=E.value;y.lb(tt)?b instanceof li&&y.lh(tt)===x&&(tt=this.Lc(tt),tt!==null&&(tt.containingGroup=b)):(z.link=this.Kc(tt),z.link!==null&&b instanceof hn&&(ul(y,tt,!0)===x&&(z.link.fromNode=b),ul(y,tt,!1)===x&&(z.link.toNode=b),tt=y.Ef(tt),Array.isArray(tt)&&tt.some(function(rt){return function(ot){return ot===x?(b.labeledLink=rt.link,!0):!1}}(z)))),z={link:z.link}}wA(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof li&&(b.containingGroup=a))}},is.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof hn){var x=y.wa(a.data);if(x!==void 0){for(var E=a.linksConnected;E.next();)yA(y,x,E.value.data);if(a.isLinkLabel&&(E=a.labeledLink,E!==null&&yA(y,x,E.data)),a instanceof li)for(a=a.memberParts;a.next();)E=a.value.data,y.lb(E)&&yA(y,x,E)}}},is.prototype.copyPartData=function(a,y){var x=lr.prototype.copyPartData.call(this,a,y);if(a instanceof tn)if(a=a.data,a!==null&&y!==null){var E=y.model;a=E.Jo(a),typeof a=="object"&&a!==null&&(E.fi(a),x=y.Kc(a))}else x!==null&&(y=this.diagram,a!==null&&y!==null&&y.commandHandler!==null&&y.commandHandler.copiesClipboardData&&(y=y.model.Jo(a),typeof y=="object"&&y!==null&&(x.data=y)));return x},is.prototype.insertLink=function(a,y,x,E){var b=this.diagram,z=b.model,tt=b.toolManager.findTool("Linking"),rt="";if(a!==null&&(y===null&&(y=a),rt=y.portId,rt===null&&(rt="")),y="",x!==null&&(E===null&&(E=x),y=E.portId,y===null&&(y="")),E=tt.archetypeLinkData,E instanceof tn){if(Tl(E),z=E.copy(),z!==null)return z.fromNode=a,z.fromPortId=rt,z.toNode=x,z.toPortId=y,b.add(z),a=tt.archetypeLabelNodeData,a instanceof hn&&(Tl(a),a=a.copy(),a!==null&&(a.labeledLink=z,b.add(a))),z}else if(E!==null&&(E=z.Jo(E),typeof E=="object"&&E!==null))return a!==null&&bc(z,E,z.wa(a.data),!0),Tc(z,E,rt,!0),x!==null&&bc(z,E,z.wa(x.data),!1),Tc(z,E,y,!1),z.fi(E),a=tt.archetypeLabelNodeData,a===null||a instanceof hn||(a=z.copyNodeData(a),typeof a=="object"&&a!==null&&(z.xf(a),a=z.wa(a),a!==void 0&&z.Bu(E,a))),b.Kc(E);return null},is.prototype.findLinkForKey=is.prototype.findLinkForKey,is.prototype.findPartForKey=is.prototype.findPartForKey,is.prototype.removeAllModeledParts=is.prototype.removeAllModeledParts,is.prototype.addModeledParts=is.prototype.addModeledParts,is.prototype.addAllModeledParts=is.prototype.addAllModeledParts,is.className="GraphLinksPartManager";function Bl(){lr.apply(this,arguments),this.Sg=null}ue(Bl,lr);function R0(a,y,x){if(y!==null&&x!==null&&x.kh()===null){var E=a.diagram.toolManager.findTool("Linking"),b=y,z=x;if(a.diagram.isTreePathToChildren||(b=x,z=y),(E===null||!Us(E,b,z,null,!0))&&(y=a.getLinkCategoryForData(x.data),E=a.findLinkTemplateForCategory(y),E!==null&&(Tl(E),E=E.copy(),E!==null))){var tt=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,E.Tf=y,E.ub=x.data,E.fromNode=b,E.toNode=z,a.diagram.add(E),E.ub=null,E.data=x.data,a.diagram.skipsModelSourceBindings=tt}}}Bl.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},Bl.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},Bl.prototype.setFromNodeForLink=function(a,y,x){var E=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren)E.qe(a.data,E.wa(y));else{var b=this.Sg;this.Sg=a,x!==null&&E.qe(x.data,void 0),E.qe(y,E.wa(a.toNode!==null?a.toNode.data:null)),this.Sg=b}},Bl.prototype.setToNodeForLink=function(a,y,x){var E=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren){var b=this.Sg;this.Sg=a,x!==null&&E.qe(x.data,void 0),E.qe(y,E.wa(a.fromNode!==null?a.fromNode.data:null)),this.Sg=b}else E.qe(a.data,E.wa(y))},Bl.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},Bl.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},Bl.prototype.doModelChanged=function(a){if(lr.prototype.doModelChanged.call(this,a),this.diagram){var y=this.diagram;if(a.model===y.model){var x=a.change;if(y.aa){y.aa=!1;try{var E=a.modelChange;if(E!==""){if(x===Qr){if(E==="nodeParentKey"){var b=a.object,z=this.Vb(a.newValue),tt=this.ii(b);if(this.Sg!==null)z!==null&&(this.Sg.data=b,this.Sg.category=this.getLinkCategoryForData(b));else if(tt!==null){var rt=tt.kh();rt!==null?z===null?y.remove(rt):y.isTreePathToChildren?rt.fromNode=z:rt.toNode=z:R0(this,z,tt)}}else if(E==="parentLinkCategory"){var ot=this.ii(a.object),at=a.newValue;if(ot!==null&&typeof at=="string"){var At=ot.kh();At!==null&&(At.category=at)}}y.isModified=!0}}else if(x===Qr){var ft=a.propertyName;a.object===y.model&&ft==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},Bl.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;a instanceof hn&&(y=E.mh(y),y=x.Vb(y),E=a.pg(),y!==E&&(E=a.kh(),y!==null?E!==null?x.isTreePathToChildren?E.fromNode=y:E.toNode=y:R0(this,y,a):E!==null&&wd(x,E,!1)))}}},Bl.prototype.updateDataBindings=function(a,y){lr.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},Bl.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=Pp(y,x),b=this.Lc(a);if(E!==null&&b!==null){for(E=E.iterator;E.next();){var z=E.value;y.lb(z)&&b instanceof hn&&y.mh(z)===x&&R0(this,b,this.ii(z))}wA(y,x)}a=y.mh(a),a!==void 0&&b instanceof hn&&(a=this.Vb(a),R0(this,a,b))}},Bl.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof hn){var x=y.wa(a.data),E=this.Kc(a.data);if(E!==null){E.isSelected=!1,E.isHighlighted=!1;var b=E.layer;if(b!==null){var z=b.pc(-1,E,!1);0<=z&&this.diagram.cb(Co,"parts",b,E,null,z,null),z=E.layerChanged,z!==null&&z(E,b,null)}}for(E=this.diagram.isTreePathToChildren,a=a.linksConnected;a.next();)b=a.value,b=(E?b.toNode:b.fromNode).data,y.lb(b)&&yA(y,x,b)}},Bl.prototype.insertLink=function(a,y,x){y=this.diagram.model;var E=a,b=x;return this.diagram.isTreePathToChildren||(E=x,b=a),E!==null&&b!==null?(y.qe(b.data,y.wa(E.data)),b.kh()):null},Bl.prototype.findLinkForKey=Bl.prototype.findLinkForKey,Bl.className="TreePartManager";function Mn(a,y){this.kl=new Ye,this.il=new Ye,this.Wv=`,
"insertedNodeKeys": `,this.jy=`,
"modifiedNodeData": `,this.Yv=`,
"removedNodeKeys": `,this.vh=null,rr(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new Rn,this.Th="key",this.Bk=this.bl=null,this.Jm=this.Km=!1,this.Mm=!0,this.xm=null,this.lj="category",this.Vf=new Rn,this.Lt=new Ke,this.Wg=!1,this.o=null,this.undoManager=new Or,a!==void 0&&(ni(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Mn.prototype.cloneProtected=function(a){a.xa=this.xa,a.Sm=this.Sm,a.Gg=this.Gg,a.Th=this.Th,a.bl=this.bl,a.Bk=this.Bk,a.Km=this.Km,a.Jm=this.Jm,a.Mm=this.Mm,a.xm=this.xm,a.lj=this.lj},Mn.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Mn.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},Mn.prototype.toString=function(a){if(a===void 0&&(a=0),1<a)return this.np();var y=(this.name!==""?this.name:"")+" Model";if(0<a){y+=`
node data:`,a=this.nodeDataArray;for(var x=a.length,E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+En(b)}}return y},Mn.prototype.xA=function(a){a.change!==Vs&&pe("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof zo?(Sw(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},Mn.prototype.Qv=function(a,y){var x=this,E=!1,b=new Ye,z=new Ye,tt=new Ye,rt=this.vh;a.changes.each(function(ft){ft.model===x&&(ft.modelChange==="nodeDataArray"?ft.change===to?b.add(ft.newValue):ft.change===Co&&tt.add(ft.oldValue):x.lb(ft.object)?z.add(ft.object):ft.change!==Qr||x.modelData!==ft.object&&ft.propertyName!=="modelData"?ft.object!==null&&(rt&&rt.contains(ft.object)?rt.get(ft.object).each(function(pt){x.lb(pt)&&z.add(pt)}):ft.object instanceof Mn||x.ri()&&x.Jc(ft.object)||xw(x,ft.object).each(function(pt){z.add(pt)})):E=!0)});var ot=this.il;ot.clear(),b.each(function(ft){ot.add(x.wa(ft)),y||z.add(ft)});var at=this.kl;at.clear(),tt.each(function(ft){at.add(x.wa(ft)),y&&z.add(ft)}),a=x.cloneDeep(z.Fa());var At=null;return E&&(At===null&&(At={}),At.modelData=this.cloneDeep(this.modelData)),0<ot.count&&(At===null&&(At={}),y?At.removedNodeKeys=ot.Fa():At.insertedNodeKeys=ot.Fa()),0<a.length&&(At===null&&(At={}),At.modifiedNodeData=a),0<at.count&&(At===null&&(At={}),y?At.insertedNodeKeys=at.Fa():At.removedNodeKeys=at.Fa()),at.clear(),ot.clear(),At},Mn.prototype.cloneDeep=function(a){return kc(this,a,!0)};function kc(a,y,x,E,b,z){function tt(ft,pt){rt?(ft.__gohashid===void 0&&z.push(ft),E.set(ft,pt)):(ft=lo++,E.set(ft,pt),b.set(ft,y))}if(!on(y))return y;z||(z=[]);var rt=Object.isExtensible(y);if(E||(E=new Rn),rt){var ot=E.get(y);if(ot)return ot}else for(b||(b=new Rn),ot=b.iterator;ot.next();){var at=ot.key;if(ot.value===y&&(at=E.get(at)))return at}if(Array.isArray(y)){ot=[],tt(y,ot);for(var At=0;At<y.length;At++)ot.push(kc(a,y[At],!1,E,b,z))}else if(y instanceof Rt||y instanceof an||y instanceof Me||y instanceof Pi||y instanceof Vn)ot=y.copy(),tt(y,ot);else{if(y instanceof nr||y instanceof rn||y instanceof ce)return y;if(y instanceof Ke)ot=new Ke().addAll(kc(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof Ye)ot=new Ye().addAll(kc(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof Rn)ot=new Rn().addAll(kc(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof Date)ot=new Date(y.getTime()),tt(y,ot);else if(y instanceof RegExp)ot=new RegExp(y),tt(y,ot),ot.lastIndex=y.lastIndex;else if(typeof y.copy=="function")ot=y.copy(),tt(y,ot);else for(At in ot={},tt(y,ot),y)At!=="__gohashid"&&(ot[At]=kc(a,y[At],!1,E,b,z))}return x&&z.forEach(function(ft){delete ft.__gohashid}),ot}Bt=Mn.prototype,Bt.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},Bt.rm=function(){var a="";return this.name!==""&&(a+=`,
"name": `+this.quote(this.name)),this.dataFormat!==""&&(a+=`,
"dataFormat": `+this.quote(this.dataFormat)),this.isReadOnly&&(a+=`,
"isReadOnly": `+this.isReadOnly),this.nodeKeyProperty!=="key"&&typeof this.nodeKeyProperty=="string"&&(a+=`,
"nodeKeyProperty": `+this.quote(this.nodeKeyProperty)),this.copiesArrays&&(a+=`,
"copiesArrays": true`),this.copiesArrayObjects&&(a+=`,
"copiesArrayObjects": true`),this.copiesKey||(a+=`,
"copiesKey": false`),this.nodeCategoryProperty!=="category"&&typeof this.nodeCategoryProperty=="string"&&(a+=`,
"nodeCategoryProperty": `+this.quote(this.nodeCategoryProperty)),a},Bt.gp=function(a){a.name&&(this.name=a.name),a.dataFormat&&(this.dataFormat=a.dataFormat),a.isReadOnly&&(this.isReadOnly=!0),a.nodeKeyProperty&&(this.nodeKeyProperty=a.nodeKeyProperty),a.copiesArrays&&(this.copiesArrays=!0),a.copiesArrayObjects&&(this.copiesArrayObjects=!0),a.copiesKey===!1&&(this.copiesKey=!1),a.nodeCategoryProperty&&(this.nodeCategoryProperty=a.nodeCategoryProperty)};function ww(a,y){y=y.modelData,on(y)&&(a.dm(y),a.modelData=y)}Bt.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!Bw(x,a[x])){y=!0;break}return a="",y&&(a=`,
"modelData": `+Cv(this,this.modelData)),a+`,
"nodeDataArray": `+zg(this,this.nodeDataArray,!0)},Bt.kv=function(a){ww(this,a),a=a.nodeDataArray,ni(a)&&(this.dm(a),this.nodeDataArray=a)};function Sw(a,y){function x(b,z){if((z=z.part)&&(z=z.data,b!==z)){var tt=E.get(b);tt===null?(tt=new Ye,tt.add(z),E.add(b,tt)):tt.add(z)}}var E=a.vh;E===null&&(E=new Rn,y.changes.each(function(b){if(b.diagram!==null){var z=b.change;z===Qr?(b=b.object.panel)&&(z=b.data)&&x(z,b):(z===to||z===Co)&&(b=b.object,(z=b.itemArray)&&x(z,b))}}),a.vh=E)}function xw(a,y){for(var x=new Ye,E=0;E<a.nodeDataArray.length;E++){var b=a.nodeDataArray[E];G0(a,y,b,b,x)}return x}function G0(a,y,x,E,b){if(Array.isArray(x))for(var z=0;z<x.length;z++){var tt=x[z];if(tt===y)return b.add(E),!0;if(G0(a,y,tt,E,b))return!0}else if(on(x)&&Object.getPrototypeOf(x)===Object.prototype)for(z in x){if(tt=x[z],tt===y)return b.add(E),!0;if(G0(a,y,tt,E,b))return!0}return!1}Bt.Pv=function(a,y){var x=this,E=!1,b=new Ye,z=new Ye,tt=new Ye,rt=this.vh;a.changes.each(function(At){At.model===x&&(At.modelChange==="nodeDataArray"?At.change===to?b.add(At.newValue):At.change===Co&&tt.add(At.oldValue):x.lb(At.object)?z.add(At.object):At.change!==Qr||x.modelData!==At.object&&At.propertyName!=="modelData"?At.object!==null&&(rt&&rt.contains(At.object)?rt.get(At.object).each(function(ft){x.lb(ft)&&z.add(ft)}):At.object instanceof Mn||x.ri()&&x.Jc(At.object)||xw(x,At.object).each(function(ft){z.add(ft)})):E=!0)});var ot=this.il;ot.clear(),b.each(function(At){ot.add(x.wa(At)),y||z.add(At)});var at=this.kl;return at.clear(),tt.each(function(At){at.add(x.wa(At)),y&&z.add(At)}),a="",E&&(a+=`,
"modelData": `+Cv(this,this.modelData)),0<ot.count&&(a+=(y?this.Yv:this.Wv)+zg(this,ot.Fa(),!0)),0<z.count&&(a+=this.jy+zg(this,z.Fa(),!0)),0<at.count&&(a+=(y?this.Wv:this.Yv)+zg(this,at.Fa(),!0)),at.clear(),ot.clear(),a},Bt.fp=function(a){(a.name!==void 0&&a.name!==this.name||a.dataFormat!==void 0&&a.dataFormat!==this.dataFormat||a.isReadOnly!==void 0&&a.isReadOnly!==this.isReadOnly||a.nodeKeyProperty!==void 0&&a.nodeKeyProperty!==this.nodeKeyProperty||a.copiesArrays!==void 0&&a.copiesArrays!==this.copiesArrays||a.copiesArrayObjects!==void 0&&a.copiesArrayObjects!==this.copiesArrayObjects||a.copiesKey!==void 0&&a.copiesKey!==this.copiesKey||a.nodeCategoryProperty!==void 0&&a.nodeCategoryProperty!==this.nodeCategoryProperty)&&pe("applyIncrementalJson cannot change Model properties"),ww(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,E=new Rn;if(Array.isArray(x))for(var b=0;b<x.length;b++){var z=x[b],tt=this.wa(z);tt!=null&&E.set(tt,z)}if(Array.isArray(y))for(b=y.length,z=0;z<b;z++){tt=y[z];var rt=this.hc(tt);rt===null&&(rt=(rt=E.get(tt))?rt:this.copyNodeData({}),this.km(rt,tt),this.xf(rt))}if(Array.isArray(x)){for(y=x.length,E=0;E<y;E++)if(b=x[E],z=this.wa(b),z=this.hc(z),z!==null){for(var ot in b)ot==="__gohashid"||ot===this.nodeKeyProperty||this.Wj()&&ot===this.nodeIsGroupProperty||this.setDataProperty(z,ot,b[ot]);this.lm(b,z)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,ot=0;ot<x;ot++)y=this.hc(a[ot]),y!==null&&this.cm(y)},Bt.$x=function(a,y){a.change!==Vs&&pe("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof zo?(y===void 0&&(y=Fp(this,this)),Sw(this,x),a=this.Pv(x,a.propertyName==="FinishedUndo"),this.vh=null,y==="2"?'{ "incremental": 2'+a+"}":'{ "class": '+this.quote(y)+', "incremental": 1'+this.rm()+a+"}"):'{ "incremental": 0 }'},Bt.yA=function(a,y){return this.$x(a,y)},Bt.np=function(a){return a===void 0&&(a=Fp(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},Bt.toJSON=function(a){return this.np(a)},Bt.Zw=function(a){var y=null;if(typeof a=="string")try{y=Fe.JSON.parse(a)}catch(E){}else typeof a=="object"?y=a:pe("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&pe("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},Bt.Ky=function(a){return this.Zw(a)},Mn.constructGraphLinksModel=function(){return new Mn},Bt=Mn.prototype,Bt.dm=function(a){if(ni(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];if(on(E)){var b=x;E=this.dm(E),Array.isArray(a)?a[b]=E:pe("Cannot replace an object in an HTMLCollection or NodeList at "+b)}}else if(on(a)){for(y in a)if(x=a[y],on(x)&&(x=this.dm(x),a[y]=x,y==="points"&&Array.isArray(x))){for(b=x.length%2===0,E=0;E<x.length;E++)if(typeof x[E]!="number"){b=!1;break}if(b){for(b=new Ke,E=0;E<x.length/2;E++)b.add(new Rt(x[2*E],x[2*E+1]));b.freeze(),a[y]=b}}return b1(a)}return a},Bt.sm=function(a){return a===void 0?"undefined":a===null?"null":a===!0?"true":a===!1?"false":typeof a=="string"?this.quote(a):typeof a=="number"?a===1/0?"9e9999":a===-1/0?"-9e9999":isNaN(a)?'{"class":"NaN"}':a.toString():a instanceof Date?'{"class":"Date", "value":"'+a.toJSON()+'"}':a instanceof Number?this.sm(a.valueOf()):ni(a)?zg(this,a):on(a)?Cv(this,a):typeof a=="function"?"null":a.toString()};function zg(a,y,x){x===void 0&&(x=!1);var E=y.length;if(0>=E)return"[]";var b=new mi;b.add("["),x&&1<E&&b.add(`
`);for(var z=0;z<E;z++){var tt=y[z];tt!==void 0&&(0<z&&(b.add(","),x&&b.add(`
`)),b.add(a.sm(tt)))}return x&&1<E&&b.add(`
`),b.add("]"),b.toString()}function Bw(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function sa(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function Cv(a,y){var x=y;if(x instanceof Rt)y={class:"go.Point",x:sa(x.x),y:sa(x.y)};else if(x instanceof an)y={class:"go.Size",width:sa(x.width),height:sa(x.height)};else if(x instanceof Me)y={class:"go.Rect",x:sa(x.x),y:sa(x.y),width:sa(x.width),height:sa(x.height)};else if(x instanceof Pi)y={class:"go.Margin",top:sa(x.top),right:sa(x.right),bottom:sa(x.bottom),left:sa(x.left)};else if(x instanceof Vn)x.sb()?y={class:"go.Spot",x:sa(x.x),y:sa(x.y),offsetX:sa(x.offsetX),offsetY:sa(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof nr){if(y={class:"go.Brush",type:x.type.name},x.type===Ii?y.color=x.color:(x.type===Ai||x.type===Fi)&&(y.start=x.start,y.end=x.end,x.type===Fi&&(x.startRadius!==0&&(y.startRadius=sa(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=sa(x.endRadius)))),x.colorStops!==null){var E={};for(x=x.colorStops.iterator;x.next();)E[x.key]=x.value;y.colorStops=E}}else x instanceof rn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=sa(x.startX)),x.startY!==0&&(y.startY=sa(x.startY)),x.endX!==0&&(y.endX=sa(x.endX)),x.endY!==0&&(y.endY=sa(x.endY)),x.spot1.D(es)||(y.spot1=x.spot1),x.spot2.D(Pa)||(y.spot2=x.spot2),x.type===rn.o&&(y.path=rn.ia(x))):x instanceof ce&&(y={class:"go.EnumValue",classType:Fp(a,x.classType),name:x.name});E="{",x=!0;for(var b in y){var z=ho(y,b);if(!Bw(b,z))if(x?x=!1:E+=",",E+=a.quote(b)+":",b==="points"&&z instanceof Ke){var tt="[";for(z=z.iterator;z.next();){var rt=z.value;1<tt.length&&(tt+=","),tt+=a.sm(rt.x),tt+=",",tt+=a.sm(rt.y)}tt+="]",E+=tt}else E+=a.sm(z)}return E+"}"}function aa(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function b1(a){if(typeof a!="object")return a;var y=a.class||"";if(y==="NaN")return NaN;if(y==="Date")return new Date(a.value);if(y.indexOf("go.")!==0)return a;y=y.substr(3);var x=a;if(y==="Point")x=new Rt(aa(a.x),aa(a.y));else if(y==="Size")x=new an(aa(a.width),aa(a.height));else if(y==="Rect")x=new Me(aa(a.x),aa(a.y),aa(a.width),aa(a.height));else if(y==="Margin")x=new Pi(aa(a.top),aa(a.right),aa(a.bottom),aa(a.left));else if(y==="Spot")typeof a.enum=="string"?x=gf(a.enum):x=new Vn(aa(a.x),aa(a.y),aa(a.offsetX),aa(a.offsetY));else if(y==="Brush"){if(x=new nr,x.type=$n(nr,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof Vn&&(x.start=a.start),a.end instanceof Vn&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=aa(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=aa(a.endRadius)),a=a.colorStops,on(a))for(var E in a)x.addColorStop(parseFloat(E),a[E])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=rn.parse(a.path):x=new rn,x.type=$n(rn,a.type),typeof a.startX=="number"&&(x.startX=aa(a.startX)),typeof a.startY=="number"&&(x.startY=aa(a.startY)),typeof a.endX=="number"&&(x.endX=aa(a.endX)),typeof a.endY=="number"&&(x.endY=aa(a.endY)),a.spot1 instanceof Vn&&(x.spot1=a.spot1),a.spot2 instanceof Vn&&(x.spot2=a.spot2)):y==="EnumValue"&&(E=a.classType,E.indexOf("go.")===0&&(E=E.substr(3)),E=Fv(E),typeof E=="function"&&(x=$n(E,a.name)));return x}Bt.Pe=function(a){return this.Lt.add(a),this},Bt.ik=function(a){this.Lt.remove(a)},Bt.ds=function(a){this.skipsUndoManager||this.undoManager.Tu(a);for(var y=this.Lt,x=y.length,E=0;E<x;E++)y.M(E)(a)},Bt.cb=function(a,y,x,E,b,z,tt){ko(this,"",a,y,x,E,b,z,tt)},Bt.g=function(a,y,x,E,b){ko(this,"",Qr,a,this,y,x,E,b)},Bt.Fs=function(a,y,x,E,b,z){ko(this,"",Qr,y,a,x,E,b,z)};function ko(a,y,x,E,b,z,tt,rt,ot){rt===void 0&&(rt=null),ot===void 0&&(ot=null);var at=new Dr;at.model=a,at.change=x,at.modelChange=y,at.propertyName=E,at.object=b,at.oldValue=z,at.oldParam=rt,at.newValue=tt,at.newParam=ot,a.ds(at)}Mn.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===Qr){var x=a.object,E=a.propertyName,b=a.I(y);E===this.nodeKeyProperty&&this.lb(x)&&(y=a.I(!y),y!==void 0&&this.kb.remove(y),b!==void 0&&this.kb.add(b,x)),Tr(x,E,b)}else a.change===to?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,on(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]===a&&ye(this.Tc,x),E!==void 0&&this.kb.remove(E)):(this.Tc[x]!==a&&se(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)))):a.modelChange===""?((E=a.object)&&!ni(E)&&a.propertyName&&(E=ho(a.object,a.propertyName)),ni(E)&&typeof x=="number"&&(a=a.newValue,y?ye(E,x):se(E,x,a))):pe("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Co?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,on(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]!==a&&se(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)):(this.Tc[x]===a&&ye(this.Tc,x),E!==void 0&&this.kb.remove(E)))):a.modelChange===""?((E=a.object)&&!ni(E)&&a.propertyName&&(E=ho(a.object,a.propertyName)),ni(E)&&typeof x=="number"&&(a=a.oldValue,y?se(E,x,a):ye(E,x))):pe("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==Vs&&pe("unknown ChangedEvent: "+a.toString())},Mn.prototype.Ea=function(a){return this.undoManager.Ea(a)},Mn.prototype.eb=function(a){return this.undoManager.eb(a)},Mn.prototype.Kf=function(){return this.undoManager.Kf()},Mn.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var E=!1;try{a(this),E=!0}finally{E?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},Bt=Mn.prototype,Bt.La=function(a,y){y===void 0&&(y=""),ko(this,"SourceChanged",Vs,y,a,null,null)},Bt.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=ho(a,y),y!==void 0)){if(Vg(y))return y;pe("Key value for node data "+a+" is not a number or a string: "+y)}}},Bt.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var E=ho(a,x);E!==y&&this.hc(y)===null&&(Tr(a,x,y),E!==void 0&&this.kb.remove(E),this.kb.add(y,a),ko(this,"nodeKey",Qr,x,a,E,y),typeof x=="string"&&this.La(a,x),this.jp(E,y))}else Tr(a,x,y)}};function Vg(a){return typeof a=="number"||typeof a=="string"}Bt.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},Bt.hc=function(a){return a===null&&pe("Model.findNodeDataForKey:key must not be null"),a!==void 0&&Vg(a)?this.kb.I(a):null},Bt.$u=function(a){if(a!==null){var y=this.Th;if(y!==""){var x=this.wa(a);if(x===void 0||this.kb.contains(x)){var E=this.bl;if(E!==null&&(x=E(this,a),x!=null&&!this.kb.contains(x))){Tr(a,y,x);return}if(typeof x=="string"){for(E=2;this.kb.contains(x+E);)E++;Tr(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;Tr(a,y,x)}}}}},Bt.xf=function(a){a!==null&&(Ro(a),this.lb(a)||Cw(this,a,!0))};function Cw(a,y,x){var E=a.wa(y);(E===void 0||a.kb.I(E)!==y)&&(a.$u(y),E=a.wa(y),E===void 0&&pe("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(E,y),E=null,x&&(E=a.Tc.length,se(a.Tc,E,y)),ko(a,"nodeDataArray",to,"nodeDataArray",a,null,y,null,E),a.fm(y),a.em(y))}Bt.Fy=function(a){if(ni(a))for(var y=a.length,x=0;x<y;x++)this.xf(a[x]);else for(a=a.iterator;a.next();)this.xf(a.value)},Bt.cm=function(a){a!==null&&Pw(this,a,!0)};function Pw(a,y,x){var E=a.wa(y);if(E!==void 0&&a.kb.remove(E),E=null,x){t:if(x=a.Tc,Array.isArray(x))E=x.indexOf(y);else{E=x.length;for(var b=0;b<E;b++)if(x[b]===y){E=b;break t}E=-1}if(0>E)return;ye(a.Tc,E)}ko(a,"nodeDataArray",Co,"nodeDataArray",a,y,null,E,null),a.qp(y)}Bt.nA=function(a){if(ni(a))for(var y=a.length,x=0;x<y;x++)this.cm(a[x]);else for(a=a.iterator;a.next();)this.cm(a.value)},Bt.$z=function(a){if(a!==this.nodeDataArray&&ni(a)){var y=this.kl;y.clear(),y.addAll(this.kb.iteratorKeys);var x=this.il;x.clear();for(var E=a.length,b=0;b<E;b++){var z=a[b],tt=this.wa(z);if(tt!==void 0){x.add(tt);var rt=this.hc(tt);rt!==z&&(rt!==null?(this.Do(rt,z),this.lm(z,rt)):(z=this.cloneDeep(z),this.km(z,tt),this.xf(z)))}else tt=this.cloneDeep(z),this.xf(tt),x.add(this.wa(tt))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.hc(E))&&this.cm(E);y.clear(),x.clear()}},Bt.jp=function(a,y){y!==void 0&&(a=Pp(this,a),a instanceof Ye&&this.Vf.add(y,a))},Bt.Lv=function(){},Bt.fm=function(){},Bt.em=function(){},Bt.qp=function(){};function yA(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E===null&&(E=new Ye,a.Vf.add(y,E)),E.add(x)}}function wA(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E instanceof Ye&&(x==null?a.Vf.remove(y):(E.remove(x),E.count===0&&a.Vf.remove(y)))}}function Pp(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof Ye?a:null)}Bt.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},Mn.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):j0(this,a,!0),on(a)&&rr(a),a};function j0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var E=[];for(x=0;x<y.length;x++){var b=j0(a,y[x],a.copiesArrayObjects);E.push(b)}return rr(E),E}if(x&&on(y)){x=(x=y.constructor)?new x:{},b=a.copiesKey||typeof a.nodeKeyProperty!="string"?null:a.nodeKeyProperty;for(E in y)if(E==="__gohashid")x.__gohashid=void 0;else if(E===b)x[b]=void 0;else{var z=ho(y,E),tt=Fp(a,z);tt==="GraphObject"||tt==="Diagram"||tt==="Layer"||tt==="RowColumnDefinition"||tt==="AnimationManager"||tt==="Tool"||tt==="CommandHandler"||tt==="Layout"||tt==="InputEvent"||tt==="DiagramEvent"||z instanceof Mn||z instanceof Or||z instanceof zo||z instanceof Dr||(z=j0(a,z,!1)),Tr(x,E,z)}return rr(x),x}return y instanceof Rt||y instanceof an||y instanceof Me||y instanceof Vn||y instanceof Pi?y.copy():y}Mn.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}}else!Fw&&a instanceof te&&(Fw=!0,Oi('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Oi(" Is that really your intent?"));var E=ho(a,y);E!==x&&(Tr(a,y,x),this.Fs(a,y,E,x))},Bt=Mn.prototype,Bt.set=function(a,y,x){this.setDataProperty(a,y,x)},Bt.Do=function(a,y){if(y){var x=this.lb(a),E;for(E in y)E==="__gohashid"||x&&E===this.nodeKeyProperty||this.setDataProperty(a,E,y[E])}},Bt.Ay=function(a,y){this.ts(a,-1,y)},Bt.ts=function(a,y,x){0>y&&(y=a.length),se(a,y,x),ko(this,"",to,"",a,null,x,null,y)},Bt.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&pe("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];ye(a,y),ko(this,"",Co,"",a,x,null,y,null)},Bt.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=ho(a,y),y===void 0))return"";if(typeof y=="string")return y;pe("getCategoryForNodeData found a non-string category for "+a+": "+y)},Bt.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var E=ho(a,x);E===void 0&&(E=""),E!==y&&(Tr(a,x,y),ko(this,"nodeCategory",Qr,x,a,E,y))}else Tr(a,x,y)}},Bt.lm=function(a,y){this.jm(y,this.Ro(a))},Bt.Tl=function(){return!1},Bt.Wj=function(){return!1},Bt.ri=function(){return!1},Bt.xs=function(){return!1},Bt.Xj=function(){return!1};function Pv(){return new Mn}function Fp(a,y){if(typeof y=="function"){if(y.className)return y.className;if(y.name)return y.name}else if(typeof y=="object"&&y!==null&&y.constructor)return Fp(a,y.constructor);return typeof y}function Fv(a){return eA[a]?eA[a]:Fe.go!==void 0&&Fe.go[a]?Fe.go[a]:null}function ho(a,y){if(!a||!y)return null;try{if(typeof y=="function")var x=y(a);else typeof a.getAttribute=="function"?(x=a.getAttribute(y),x===null&&(x=void 0)):x=a[y]}catch(E){}return x}function Tr(a,y,x){if(a&&y)try{typeof y=="function"?y(a,x):typeof a.setAttribute=="function"?a.setAttribute(y,x):a[y]=x}catch(E){}}Ie.Object.defineProperties(Mn.prototype,{name:{get:function(){return this.xa},set:function(a){var y=this.xa;y!==a&&(this.xa=a,this.g("name",y,a))}},dataFormat:{get:function(){return this.Sm},set:function(a){var y=this.Sm;y!==a&&(this.Sm=a,this.g("dataFormat",y,a))}},isReadOnly:{get:function(){return this.Gg},set:function(a){var y=this.Gg;y!==a&&(this.Gg=a,this.g("isReadOnly",y,a))}},modelData:{get:function(){return this.j},set:function(a){var y=this.j;y!==a&&(this.j=a,this.g("modelData",y,a),this.La(a))}},undoManager:{get:function(){return this.o},set:function(a){var y=this.o;y!==a&&(y!==null&&y.Rx(this),this.o=a,a!==null&&a.Xw(this))}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a}},nodeKeyProperty:{get:function(){return this.Th},set:function(a){var y=this.Th;y!==a&&(a===""&&pe("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&pe("Cannot set Model.nodeKeyProperty when there is existing node data"),this.Th=a,this.g("nodeKeyProperty",y,a))}},makeUniqueKeyFunction:{get:function(){return this.bl},set:function(a){var y=this.bl;y!==a&&(this.bl=a,this.g("makeUniqueKeyFunction",y,a))}},nodeDataArray:{get:function(){return this.Tc},set:function(a){var y=this.Tc;if(y!==a){this.kb.clear(),this.Lv();for(var x=a.length,E=0;E<x;E++){var b=a[E];on(b)||pe("Model.nodeDataArray must only contain Objects, not: "+b),Ro(b)}for(this.Tc=a,E=new Ke,b=0;b<x;b++){var z=a[b],tt=this.wa(z);tt===void 0||this.kb.I(tt)!==null?E.add(z):this.kb.add(tt,z)}for(E=E.iterator;E.next();)b=E.value,this.$u(b),z=this.wa(b),z!==void 0&&this.kb.add(z,b);for(ko(this,"nodeDataArray",Qr,"nodeDataArray",this,y,a),y=0;y<x;y++)E=a[y],this.fm(E),this.em(E);Array.isArray(a)||(this.isReadOnly=!0)}}},copyNodeDataFunction:{get:function(){return this.Bk},set:function(a){var y=this.Bk;y!==a&&(this.Bk=a,this.g("copyNodeDataFunction",y,a))}},copiesArrays:{get:function(){return this.Km},set:function(a){var y=this.Km;y!==a&&(this.Km=a,this.g("copiesArrays",y,a))}},copiesArrayObjects:{get:function(){return this.Jm},set:function(a){var y=this.Jm;y!==a&&(this.Jm=a,this.g("copiesArrayObjects",y,a))}},copiesKey:{get:function(){return this.Mm},set:function(a){var y=this.Mm;y!==a&&(this.Mm=a,this.g("copiesKey",y,a))}},afterCopyFunction:{get:function(){return this.xm},set:function(a){var y=this.xm;y!==a&&(this.xm=a,this.g("afterCopyFunction",y,a))}},nodeCategoryProperty:{get:function(){return this.lj},set:function(a){var y=this.lj;y!==a&&(this.lj=a,this.g("nodeCategoryProperty",y,a))}},type:{get:function(){return"Model"}}}),Mn.prototype.setCategoryForNodeData=Mn.prototype.jm,Mn.prototype.getCategoryForNodeData=Mn.prototype.Ro,Mn.prototype.removeArrayItem=Mn.prototype.ov,Mn.prototype.insertArrayItem=Mn.prototype.ts,Mn.prototype.addArrayItem=Mn.prototype.Ay,Mn.prototype.assignAllDataProperties=Mn.prototype.Do,Mn.prototype.set=Mn.prototype.set,Mn.prototype.clearUnresolvedReferences=Mn.prototype.Qy,Mn.prototype.mergeNodeDataArray=Mn.prototype.$z,Mn.prototype.removeNodeDataCollection=Mn.prototype.nA,Mn.prototype.removeNodeData=Mn.prototype.cm,Mn.prototype.addNodeDataCollection=Mn.prototype.Fy,Mn.prototype.addNodeData=Mn.prototype.xf,Mn.prototype.makeNodeDataKeyUnique=Mn.prototype.$u,Mn.prototype.findNodeDataForKey=Mn.prototype.hc,Mn.prototype.containsNodeData=Mn.prototype.lb,Mn.prototype.setKeyForNodeData=Mn.prototype.km,Mn.prototype.getKeyForNodeData=Mn.prototype.wa,Mn.prototype.updateTargetBindings=Mn.prototype.La,Mn.prototype.commit=Mn.prototype.commit,Mn.prototype.rollbackTransaction=Mn.prototype.Kf,Mn.prototype.commitTransaction=Mn.prototype.eb,Mn.prototype.startTransaction=Mn.prototype.Ea,Mn.prototype.raiseDataChanged=Mn.prototype.Fs,Mn.prototype.raiseChanged=Mn.prototype.g,Mn.prototype.raiseChangedEvent=Mn.prototype.cb,Mn.prototype.removeChangedListener=Mn.prototype.ik,Mn.prototype.addChangedListener=Mn.prototype.Pe,Mn.prototype.writeJsonValue=Mn.prototype.sm,Mn.prototype.replaceJsonObjects=Mn.prototype.dm,Mn.prototype.applyIncrementalJSON=Mn.prototype.Ky,Mn.prototype.applyIncrementalJson=Mn.prototype.Zw,Mn.prototype.toJSON=Mn.prototype.toJSON,Mn.prototype.toJson=Mn.prototype.np,Mn.prototype.toIncrementalJSON=Mn.prototype.yA,Mn.prototype.toIncrementalJson=Mn.prototype.$x,Mn.prototype.toIncrementalData=Mn.prototype.xA,Mn.prototype.clear=Mn.prototype.clear;var Fw=!1,eA={};Mn.className="Model",Mn.fromJSON=Mn.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=Fe.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:pe("Unable to construct a Model from: "+a);if(y===null){a=null;var E=x.class;if(typeof E=="string")try{var b=null;E.indexOf("go.")===0?(E=E.substr(3),b=Fv(E)):(b=Fv(E),b===null&&(b=Fe[E])),typeof b=="function"&&(a=new b)}catch(z){}a===null||a instanceof Mn?y=a:pe("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=Mn.constructGraphLinksModel()),y.gp(x),y.kv(x),y},Mn.safePropertyValue=ho,Mn.safePropertySet=Tr,eA.Brush=nr,eA.ChangedEvent=Dr,eA.Geometry=rn,eA.Margin=Pi,eA.Panel=ze,eA.Point=Rt,eA.Rect=Me,eA.Size=an,eA.Spot=Vn,eA.Transaction=zo,eA.UndoManager=Or;function vo(a,y,x,E){rr(this),this._isFrozen=!1,a===void 0&&(a=""),y===void 0&&(y=a),x===void 0&&(x=null),this.j=-1,this.xd=null,this.xl=a,this.wl=this.to=0,this.Cr=null,this.wn=!1,this.sl=y,this.Im=x,E===void 0?(this.el=Ew,this.wk=null):(this.el=Lp,this.wk=E),this.st=new Ye}vo.prototype.copy=function(){var a=new vo;return a.xl=this.xl,a.to=this.to,a.wl=this.wl,a.Cr=this.Cr,a.wn=this.wn,a.sl=this.sl,a.Im=this.Im,a.el=this.el,a.wk=this.wk,a},Bt=vo.prototype,Bt.qb=function(a){a.classType===vo&&(this.mode=a)},Bt.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},Bt.freeze=function(){return this._isFrozen=!0,this},Bt.ka=function(){return this._isFrozen=!1,this},Bt.Kx=function(a){return a===void 0&&(a=null),this.mode=Lp,this.backConverter=a,this},Bt.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},Bt.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function Lw(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}Bt.Mv=function(a,y,x){var E=this.sl;if(x===void 0||E===""||E===x){x=this.xl;var b=this.Im;if(b===null&&x==="")Oi("Binding error: target property is the empty string: "+this.toString());else{var z=y;if(E!==""&&(z=ho(y,E)),z!==void 0)if(b===null)x!==""&&Tr(a,x,z);else try{if(x!==""){var tt=b(z,a);Tr(a,x,tt)}else b(z,a)}catch(rt){}}}},Bt.sp=function(a,y,x,E){if(this.el===Lp){var b=this.xl;if(x===void 0||b===x){x=this.sl;var z=this.wk,tt=a;if(b!==""&&(tt=ho(a,b)),tt!==void 0&&!this.st.contains(a))try{this.st.add(a);var rt=E!==null?E.diagram:null,ot=rt!==null?rt.model:null;if(z===null){if(x!=="")ot!==null?ot.setDataProperty(y,x,tt):Tr(y,x,tt);else if(ot!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var at=E.itemIndex,At=E.panel.itemArray;ot.ov(At,at),ot.ts(At,at,tt)}}else try{if(x!==""){var ft=z(tt,y,ot);ot!==null?ot.setDataProperty(y,x,ft):Tr(y,x,ft)}else{var pt=z(tt,y,ot);if(pt!==void 0&&ot!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var xt=E.itemIndex,Ct=E.panel.itemArray;ot.ov(Ct,xt),ot.ts(Ct,xt,pt)}}}catch(Mt){}}finally{this.st.remove(a)}}}},Ie.Object.defineProperties(vo.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&Un(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&Un(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&Un(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&Un(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&Un(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&Un(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&Un(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&Un(this),this.el=a}}}),vo.prototype.updateSource=vo.prototype.sp,vo.prototype.updateTarget=vo.prototype.Mv,vo.prototype.ofModel=vo.prototype.dA,vo.prototype.ofObject=vo.prototype.cp,vo.prototype.makeTwoWay=vo.prototype.Kx;var T1="Binding",Ew=new ce(vo,"OneWay",1),Lp=new ce(vo,"TwoWay",2);vo.className="Binding",vo.parseEnum=function(a,y){return function(x){return x=$n(a,x),x===null?y:x}},vo.toString=En,vo.OneWay=Ew,vo.TwoWay=Lp;function Hi(a,y,x){Mn.call(this),this.Vv=`,
"insertedLinkKeys": `,this.iy=`,
"modifiedLinkData": `,this.Xv=`,
"removedLinkKeys": `,this.md=[],this.$f=new Ye,this.wb=new Rn,this.Jh="",this.Ri=this.Ak=this.cl=null,this.lf="from",this.mf="to",this.fj=this.ej="",this.dj="category",this.je="",this.jl="isGroup",this.Je="group",this.Lm=!1,y!==void 0&&(this.linkDataArray=y),a!==void 0&&(ni(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}ue(Hi,Mn),Hi.constructGraphLinksModel=Mn.constructGraphLinksModel,Hi.prototype.cloneProtected=function(a){Mn.prototype.cloneProtected.call(this,a),a.Jh=this.Jh,a.cl=this.cl,a.Ak=this.Ak,a.lf=this.lf,a.mf=this.mf,a.ej=this.ej,a.fj=this.fj,a.dj=this.dj,a.je=this.je,a.jl=this.jl,a.Je=this.Je,a.Lm=this.Lm},Bt=Hi.prototype,Bt.clear=function(){Mn.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},Bt.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" GraphLinksModel";if(0<a){y+=`
node data:`,a=this.nodeDataArray;var x=a.length,E;for(E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+En(b)}for(y+=`
link data:`,a=this.linkDataArray,x=a.length,E=0;E<x;E++)b=a[E],y+=" "+ul(this,b,!0)+"-->"+ul(this,b,!1)}return y},Bt.Qv=function(a,y){this.linkKeyProperty===""&&pe("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=Mn.prototype.Qv.call(this,a,y),E=this,b=new Ye,z=new Ye,tt=new Ye,rt=this.vh;a.changes.each(function(At){At.model===E&&(At.modelChange==="linkDataArray"?At.change===to?b.add(At.newValue):At.change===Co&&tt.add(At.oldValue):E.Jc(At.object)?z.add(At.object):At.object!==null&&(At.object!==null&&rt&&rt.contains(At.object)?rt.get(At.object).each(function(ft){E.Jc(ft)&&z.add(ft)}):At.object instanceof Mn||E.lb(At.object)||Mw(E,At.object).each(function(ft){z.add(ft)})))});var ot=this.il;ot.clear(),b.each(function(At){ot.add(E.Ac(At)),y||z.add(At)});var at=this.kl;return at.clear(),tt.each(function(At){at.add(E.Ac(At)),y&&z.add(At)}),a=E.cloneDeep(z.Fa()),0<ot.count&&(x===null&&(x={}),y?x.removedLinkKeys=ot.Fa():x.insertedLinkKeys=ot.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<at.count&&(x===null&&(x={}),y?x.insertedLinkKeys=at.Fa():x.removedLinkKeys=at.Fa()),at.clear(),ot.clear(),x},Bt.rm=function(){var a=Mn.prototype.rm.call(this),y="";return this.linkCategoryProperty!=="category"&&typeof this.linkCategoryProperty=="string"&&(y+=`,
"linkCategoryProperty": `+this.quote(this.linkCategoryProperty)),this.linkKeyProperty!==""&&typeof this.linkKeyProperty=="string"&&(y+=`,
"linkKeyProperty": `+this.quote(this.linkKeyProperty)),this.linkFromKeyProperty!=="from"&&typeof this.linkFromKeyProperty=="string"&&(y+=`,
"linkFromKeyProperty": `+this.quote(this.linkFromKeyProperty)),this.linkToKeyProperty!=="to"&&typeof this.linkToKeyProperty=="string"&&(y+=`,
"linkToKeyProperty": `+this.quote(this.linkToKeyProperty)),this.linkFromPortIdProperty!==""&&typeof this.linkFromPortIdProperty=="string"&&(y+=`,
"linkFromPortIdProperty": `+this.quote(this.linkFromPortIdProperty)),this.linkToPortIdProperty!==""&&typeof this.linkToPortIdProperty=="string"&&(y+=`,
"linkToPortIdProperty": `+this.quote(this.linkToPortIdProperty)),this.linkLabelKeysProperty!==""&&typeof this.linkLabelKeysProperty=="string"&&(y+=`,
"linkLabelKeysProperty": `+this.quote(this.linkLabelKeysProperty)),this.nodeIsGroupProperty!=="isGroup"&&typeof this.nodeIsGroupProperty=="string"&&(y+=`,
"nodeIsGroupProperty": `+this.quote(this.nodeIsGroupProperty)),this.nodeGroupKeyProperty!=="group"&&typeof this.nodeGroupKeyProperty=="string"&&(y+=`,
"nodeGroupKeyProperty": `+this.quote(this.nodeGroupKeyProperty)),a+y},Bt.gp=function(a){Mn.prototype.gp.call(this,a),a.linkKeyProperty&&(this.linkKeyProperty=a.linkKeyProperty),a.linkFromKeyProperty&&(this.linkFromKeyProperty=a.linkFromKeyProperty),a.linkToKeyProperty&&(this.linkToKeyProperty=a.linkToKeyProperty),a.linkFromPortIdProperty&&(this.linkFromPortIdProperty=a.linkFromPortIdProperty),a.linkToPortIdProperty&&(this.linkToPortIdProperty=a.linkToPortIdProperty),a.linkCategoryProperty&&(this.linkCategoryProperty=a.linkCategoryProperty),a.linkLabelKeysProperty&&(this.linkLabelKeysProperty=a.linkLabelKeysProperty),a.nodeIsGroupProperty&&(this.nodeIsGroupProperty=a.nodeIsGroupProperty),a.nodeGroupKeyProperty&&(this.nodeGroupKeyProperty=a.nodeGroupKeyProperty)},Bt.Rv=function(){var a=Mn.prototype.Rv.call(this),y=`,
"linkDataArray": `+zg(this,this.linkDataArray,!0);return a+y},Bt.kv=function(a){Mn.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function Mw(a,y){for(var x=new Ye,E=0;E<a.linkDataArray.length;E++){var b=a.linkDataArray[E];G0(a,y,b,b,x)}return x}Bt.Pv=function(a,y){this.linkKeyProperty===""&&pe("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=Mn.prototype.Pv.call(this,a,y),E=this,b=new Ye,z=new Ye,tt=new Ye,rt=this.vh;a.changes.each(function(At){At.model===E&&(At.modelChange==="linkDataArray"?At.change===to?b.add(At.newValue):At.change===Co&&tt.add(At.oldValue):E.Jc(At.object)?z.add(At.object):At.object!==null&&(At.object!==null&&rt&&rt.contains(At.object)?rt.get(At.object).each(function(ft){E.Jc(ft)&&z.add(ft)}):At.object instanceof Mn||E.lb(At.object)||Mw(E,At.object).each(function(ft){z.add(ft)})))});var ot=this.il;ot.clear(),b.each(function(At){ot.add(E.Ac(At)),y||z.add(At)});var at=this.kl;return at.clear(),tt.each(function(At){at.add(E.Ac(At)),y&&z.add(At)}),a=x,0<ot.count&&(a+=(y?this.Xv:this.Vv)+zg(this,ot.Fa(),!0)),0<z.count&&(a+=this.iy+zg(this,z.Fa(),!0)),0<at.count&&(a+=(y?this.Vv:this.Xv)+zg(this,at.Fa(),!0)),at.clear(),ot.clear(),a},Bt.fp=function(a){(a.linkCategoryProperty!==void 0&&a.linkCategoryProperty!==this.linkCategoryProperty||a.linkKeyProperty!==void 0&&a.linkKeyProperty!==this.linkKeyProperty||a.linkFromKeyProperty!==void 0&&a.linkFromKeyProperty!==this.linkFromKeyProperty||a.linkToKeyProperty!==void 0&&a.linkToKeyProperty!==this.linkToKeyProperty||a.linkFromPortIdProperty!==void 0&&a.linkFromPortIdProperty!==this.linkFromPortIdProperty||a.linkToPortIdProperty!==void 0&&a.linkToPortIdProperty!==this.linkToPortIdProperty||a.linkLabelKeysProperty!==void 0&&a.linkLabelKeysProperty!==this.linkLabelKeysProperty||a.nodeIsGroupProperty!==void 0&&a.nodeIsGroupProperty!==this.nodeIsGroupProperty||a.nodeGroupKeyProperty!==void 0&&a.nodeGroupKeyProperty!==this.nodeGroupKeyProperty)&&pe("applyIncrementalJson cannot change Model properties"),Mn.prototype.fp.call(this,a);var y=a.insertedLinkKeys;if(Array.isArray(y))for(var x=y.length,E=0;E<x;E++){var b=y[E],z=this.jh(b);z===null&&(z=this.Jo({}),this.Ks(z,b),this.fi(z))}if(y=a.modifiedLinkData,Array.isArray(y)){for(x=y.length,E=0;E<x;E++)if(b=y[E],z=this.Ac(b),z=this.jh(z),z!==null){for(var tt in b)tt!=="__gohashid"&&tt!==this.linkKeyProperty&&this.setDataProperty(z,tt,b[tt]);Tw(this,b,z)}}if(a=a.removedLinkKeys,Array.isArray(a))for(tt=a.length,y=0;y<tt;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},Hi.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===Qr){var x=a.object,E=a.propertyName;if(E===this.linkKeyProperty&&this.Jc(x)){var b=a.I(y);y=a.I(!y),y!==void 0&&this.wb.remove(y),b!==void 0&&this.wb.add(b,x),Tr(x,E,b);return}}else if(a.change===to){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,on(a)&&typeof x=="number"&&(E=this.Ac(a),y?(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),E!==void 0&&this.wb.remove(E)):(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),E!==void 0&&this.wb.add(E,a)));return}if(a.modelChange==="linkLabelKeys"){E=this.Ef(a.object),Array.isArray(E)&&typeof x=="number"&&(y?(x=E.indexOf(a.newValue),0<=x&&E.splice(x,1)):0>E.indexOf(a.newValue)&&E.splice(x,0,a.newValue));return}}else if(a.change===Co){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,on(a)&&typeof x=="number"&&(E=this.Ac(a),y?(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),E!==void 0&&this.wb.add(E,a)):(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),E!==void 0&&this.wb.remove(E)));return}if(a.modelChange==="linkLabelKeys"){E=this.Ef(a.object),Array.isArray(E)&&typeof x=="number"&&(y?0>E.indexOf(a.newValue)&&E.splice(x,0,a.newValue):(x=E.indexOf(a.newValue),0<=x&&E.splice(x,1)));return}}Mn.prototype.changeState.call(this,a,y)}},Bt=Hi.prototype,Bt.Vl=function(a){if(a!==void 0){var y=this.Ri;if(y!==null){var x=this.hc(a);x===null&&(x=this.copyNodeData(y),Tr(x,this.nodeKeyProperty,a),this.xf(x))}return a}},Bt.yx=function(a){return ul(this,a,!0)},Bt.wv=function(a,y){bc(this,a,y,!0)},Bt.Bx=function(a){return ul(this,a,!1)},Bt.Bv=function(a,y){bc(this,a,y,!1)};function ul(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=ho(y,a),a!==void 0))){if(Vg(a))return a;pe((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function bc(a,y,x,E){if(x===null&&(x=void 0),y!==null){var b=E?a.lf:a.mf;if(b!=="")if(x=a.Vl(x),a.Jc(y)){var z=ho(y,b);z!==x&&(wA(a,z,y),Tr(y,b,x),a.hc(x)===null&&yA(a,x,y),ko(a,E?"linkFromKey":"linkToKey",Qr,b,y,z,x),typeof b=="string"&&a.La(y,b))}else Tr(y,b,x)}}Bt.zx=function(a){return K0(this,a,!0)},Bt.xv=function(a,y){Tc(this,a,y,!0)},Bt.Cx=function(a){return K0(this,a,!1)},Bt.Cv=function(a,y){Tc(this,a,y,!1)};function K0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=ho(y,a),y===void 0?"":y)}function Tc(a,y,x,E){if(y!==null){var b=E?a.ej:a.fj;if(b!=="")if(a.Jc(y)){var z=ho(y,b);z===void 0&&(z=""),z!==x&&(Tr(y,b,x),ko(a,E?"linkFromPortId":"linkToPortId",Qr,b,y,z,x),typeof b=="string"&&a.La(y,b))}else Tr(y,b,x)}}Bt.Ef=function(a){if(a===null)return z0;var y=this.je;return y===""?z0:(a=ho(a,y),a===void 0?z0:a)},Bt.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var E=ho(a,x);if(E===void 0&&(E=z0),E!==y){if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)wA(this,E[z],a);for(Tr(a,x,y),b=y.length,z=0;z<b;z++){var tt=y[z];this.hc(tt)===null&&yA(this,tt,a)}ko(this,"linkLabelKeys",Qr,x,a,E,y),typeof x=="string"&&this.La(a,x)}}else Tr(a,x,y)}},Bt.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=ho(a,x);if(E===void 0)x=[],x.push(y),this.Ls(a,x);else if(Array.isArray(E)){var b=E.indexOf(y);0<=b||(b=E.length,E.push(y),this.Jc(a)&&(this.hc(y)===null&&yA(this,y,a),ko(this,"linkLabelKeys",to,x,a,null,y,null,b)))}else pe(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},Bt.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=ho(a,x);if(Array.isArray(E)){var b=E.indexOf(y);0>b||(E.splice(b,1),this.Jc(a)&&(wA(this,y,a),ko(this,"linkLabelKeys",Co,x,a,y,null,b,null)))}else E!==void 0&&pe(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Bt.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=ho(a,y),y!==void 0)){if(Vg(y))return y;pe("Key value for link data "+a+" is not a number or a string: "+y)}}},Bt.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var E=ho(a,x);E!==y&&this.jh(y)===null&&(Tr(a,x,y),E!==void 0&&this.wb.remove(E),this.wb.add(y,a),ko(this,"linkKey",Qr,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Tr(a,x,y)}},Bt.jh=function(a){return a===null&&pe("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&Vg(a)?this.wb.I(a):null},Bt.Bs=function(a){if(a!==null){var y=this.Jh;if(y!==""){var x=this.Ac(a);if(x===void 0||this.wb.contains(x)){var E=this.cl;if(E!==null&&(x=E(this,a),x!=null&&!this.wb.contains(x))){Tr(a,y,x);return}if(typeof x=="string"){for(E=2;this.wb.contains(x+E);)E++;Tr(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;Tr(a,y,x)}}}}},Bt.Jc=function(a){return a===null?!1:this.$f.contains(a)},Bt.fi=function(a){a!==null&&(Ro(a),this.Jc(a)||kw(this,a,!0))};function kw(a,y,x){if(a.linkKeyProperty!==""){var E=a.Ac(y);if(E!==void 0&&a.wb.I(E)===y)return;a.Bs(y),E=a.Ac(y),E===void 0&&pe("GraphLinksModel.makeLinkDataKeyUnique failed on "+y+". Data not added to model."),a.wb.add(E,y)}a.$f.add(y),E=null,x&&(E=a.md.length,a.md.splice(E,0,y)),ko(a,"linkDataArray",to,"linkDataArray",a,null,y,null,E),Lv(a,y)}Bt.Ey=function(a){if(Array.isArray(a))for(var y=a.length,x=0;x<y;x++)this.fi(a[x]);else for(a=a.iterator;a.next();)this.fi(a.value)},Bt.bm=function(a){a!==null&&bw(this,a,!0)};function bw(a,y,x){a.$f.remove(y);var E=a.Ac(y);if(E!==void 0&&a.wb.remove(E),E=null,x){if(E=a.md.indexOf(y),0>E)return;a.md.splice(E,1)}if(ko(a,"linkDataArray",Co,"linkDataArray",a,y,null,E,null),x=ul(a,y,!0),wA(a,x,y),x=ul(a,y,!1),wA(a,x,y),E=a.Ef(y),Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],wA(a,x,y)}Bt.lA=function(a){if(Array.isArray(a))for(var y=a.length,x=0;x<y;x++)this.bm(a[x]);else for(a=a.iterator;a.next();)this.bm(a.value)},Bt.Zz=function(a){if(this.linkKeyProperty===""&&pe("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&ni(a)){var y=this.kl;y.clear(),y.addAll(this.wb.iteratorKeys);var x=this.il;x.clear();for(var E=a.length,b=0;b<E;b++){var z=a[b],tt=this.Ac(z);if(tt!==void 0){x.add(tt);var rt=this.jh(tt);rt!==z&&(rt!==null?(this.Do(rt,z),Tw(this,z,rt)):(z=this.cloneDeep(z),this.Ks(z,tt),this.fi(z)))}else tt=this.cloneDeep(z),this.fi(tt),x.add(this.Ac(tt))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.jh(E))&&this.bm(E);y.clear(),x.clear()}};function Lv(a,y){var x=ul(a,y,!0);x=a.Vl(x),a.hc(x)===null&&yA(a,x,y),x=ul(a,y,!1),x=a.Vl(x),a.hc(x)===null&&yA(a,x,y);var E=a.Ef(y);if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],a.hc(x)===null&&yA(a,x,y)}Bt.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):j0(this,a,!0),on(a)&&(rr(a),this.lf!==""&&Tr(a,this.lf,void 0),this.mf!==""&&Tr(a,this.mf,void 0),this.je!==""&&Tr(a,this.je,[])),a},Bt.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!ho(a,y)},Bt.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=ho(a,y),y!==void 0)){if(Vg(y))return y;pe("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},Bt.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var E=ho(a,x);E!==y&&(wA(this,E,a),Tr(a,x,y),this.hc(y)===null&&yA(this,y,a),ko(this,"nodeGroupKey",Qr,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Tr(a,x,y)}},Hi.prototype.copyNodeData=function(a){return a===null?null:(a=Mn.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||ho(a,this.Je)===void 0||Tr(a,this.Je,void 0),a)},Hi.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}if(y===this.nodeGroupKeyProperty){this.mp(a,x);return}}else if(this.Jc(a)){if(y===this.linkFromKeyProperty){bc(this,a,x,!0);return}if(y===this.linkToKeyProperty){bc(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Tc(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Tc(this,a,x,!1);return}if(y===this.linkKeyProperty){this.Ks(a,x);return}if(y===this.linkCategoryProperty){this.lp(a,x);return}if(y===this.linkLabelKeysProperty){this.Ls(a,x);return}}var E=ho(a,y);E!==x&&(Tr(a,y,x),this.Fs(a,y,E,x))},Bt=Hi.prototype,Bt.Do=function(a,y){if(y){var x=this.lb(a),E=this.Jc(a),b;for(b in y)b==="__gohashid"||x&&b===this.nodeKeyProperty||x&&b===this.nodeIsGroupProperty&&ho(a,b)===y[b]||E&&b===this.linkKeyProperty||this.setDataProperty(a,b,y[b])}},Bt.jp=function(a,y){Mn.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y);for(x=this.$f.iterator;x.next();){var E=x.value,b=a,z=y;if(ul(this,E,!0)===b){var tt=this.lf;Tr(E,tt,z),ko(this,"linkFromKey",Qr,tt,E,b,z),typeof tt=="string"&&this.La(E,tt)}if(ul(this,E,!1)===b&&(tt=this.mf,Tr(E,tt,z),ko(this,"linkToKey",Qr,tt,E,b,z),typeof tt=="string"&&this.La(E,tt)),tt=this.Ef(E),Array.isArray(tt))for(var rt=tt.length,ot=this.je,at=0;at<rt;at++)tt[at]===b&&(tt[at]=z,ko(this,"linkLabelKeys",to,ot,E,b,z,at,at))}},Bt.qv=function(a,y,x){if(this.lh(a)===y){var E=this.Je;Tr(a,E,x),ko(this,"nodeGroupKey",Qr,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Bt.Lv=function(){Mn.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)Lv(this,a[x])},Bt.fm=function(a){Mn.prototype.fm.call(this,a),a=this.wa(a);var y=Pp(this,a);if(y!==null){var x=Ce();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)){if(this.lh(E)===a){var b=this.Je;ko(this,"nodeGroupKey",Qr,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}else if(ul(this,E,!0)===a&&(b=this.lf,ko(this,"linkFromKey",Qr,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),ul(this,E,!1)===a&&(b=this.mf,ko(this,"linkToKey",Qr,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),b=this.Ef(E),Array.isArray(b))for(var z=b.length,tt=this.je,rt=0;rt<z;rt++)b[rt]===a&&(ko(this,"linkLabelKeys",to,tt,E,a,a,rt,rt),x.push(E))}for(y=0;y<x.length;y++)wA(this,a,x[y]);Oe(x)}},Bt.em=function(a){Mn.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&yA(this,y,a)},Bt.qp=function(a){Mn.prototype.qp.call(this,a);var y=this.lh(a);wA(this,y,a)},Bt.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=ho(a,y),y===void 0))return"";if(typeof y=="string")return y;pe("getCategoryForLinkData found a non-string category for "+a+": "+y)},Hi.prototype.getLinkCategoryForData=function(a){return this.ps(a)},Hi.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var E=ho(a,x);E===void 0&&(E=""),E!==y&&(Tr(a,x,y),ko(this,"linkCategory",Qr,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Tr(a,x,y)}},Hi.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},Bt=Hi.prototype,Bt.lm=function(a,y){Mn.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function Tw(a,y,x){a.lp(x,a.ps(y)),a.wv(x,a.yx(y)),a.Bv(x,a.Bx(y)),a.Ls(x,a.Ef(y)),a.xv(x,a.zx(y)),a.Cv(x,a.Cx(y))}Bt.Wj=function(){return!0},Bt.ri=function(){return!0},Bt.xs=function(){return!0},Bt.Xj=function(){return!0},Ie.Object.defineProperties(Hi.prototype,{archetypeNodeData:{get:function(){return this.Ri},set:function(a){var y=this.Ri;y!==a&&(this.Ri=a,this.g("archetypeNodeData",y,a))}},linkFromKeyProperty:{get:function(){return this.lf},set:function(a){var y=this.lf;y!==a&&(this.lf=a,this.g("linkFromKeyProperty",y,a))}},linkToKeyProperty:{get:function(){return this.mf},set:function(a){var y=this.mf;y!==a&&(this.mf=a,this.g("linkToKeyProperty",y,a))}},linkFromPortIdProperty:{get:function(){return this.ej},set:function(a){var y=this.ej;y!==a&&(this.ej=a,this.g("linkFromPortIdProperty",y,a))}},linkToPortIdProperty:{get:function(){return this.fj},set:function(a){var y=this.fj;y!==a&&(this.fj=a,this.g("linkToPortIdProperty",y,a))}},linkLabelKeysProperty:{get:function(){return this.je},set:function(a){var y=this.je;y!==a&&(this.je=a,this.g("linkLabelKeysProperty",y,a))}},linkDataArray:{get:function(){return this.md},set:function(a){var y=this.md;if(y!==a){this.wb.clear();for(var x=a.length,E=0;E<x;E++){var b=a[E];on(b)||pe("GraphLinksModel.linkDataArray must only contain Objects, not: "+b),Ro(b)}if(this.md=a,this.linkKeyProperty!==""){for(E=new Ke,b=0;b<x;b++){var z=a[b],tt=this.Ac(z);tt===void 0||this.wb.I(tt)!==null?E.add(z):this.wb.add(tt,z)}for(E=E.iterator;E.next();)b=E.value,this.Bs(b),z=this.Ac(b),z!==void 0&&this.wb.add(z,b)}for(E=new Ye,b=0;b<x;b++)E.add(a[b]);for(this.$f=E,ko(this,"linkDataArray",Qr,"linkDataArray",this,y,a),y=0;y<x;y++)Lv(this,a[y])}}},linkKeyProperty:{get:function(){return this.Jh},set:function(a){var y=this.Jh;if(y!==a){this.Jh=a,this.wb.clear();for(var x=this.linkDataArray.length,E=0;E<x;E++){var b=this.linkDataArray[E],z=this.Ac(b);z===void 0&&(this.Bs(b),z=this.Ac(b)),z!==void 0&&this.wb.add(z,b)}this.g("linkKeyProperty",y,a)}}},makeUniqueLinkKeyFunction:{get:function(){return this.cl},set:function(a){var y=this.cl;y!==a&&(this.cl=a,this.g("makeUniqueLinkKeyFunction",y,a))}},copyLinkDataFunction:{get:function(){return this.Ak},set:function(a){var y=this.Ak;y!==a&&(this.Ak=a,this.g("copyLinkDataFunction",y,a))}},nodeIsGroupProperty:{get:function(){return this.jl},set:function(a){var y=this.jl;y!==a&&(this.jl=a,this.g("nodeIsGroupProperty",y,a))}},nodeGroupKeyProperty:{get:function(){return this.Je},set:function(a){var y=this.Je;y!==a&&(this.Je=a,this.g("nodeGroupKeyProperty",y,a))}},Ij:{get:function(){return this.Lm},set:function(a){this.Lm!==a&&(this.Lm=a)}},linkCategoryProperty:{get:function(){return this.dj},set:function(a){var y=this.dj;y!==a&&(this.dj=a,this.g("linkCategoryProperty",y,a))}},type:{get:function(){return"GraphLinksModel"}}}),Hi.prototype.setCategoryForLinkData=Hi.prototype.lp,Hi.prototype.getCategoryForLinkData=Hi.prototype.ps,Hi.prototype.assignAllDataProperties=Hi.prototype.Do,Hi.prototype.setGroupKeyForNodeData=Hi.prototype.mp,Hi.prototype.getGroupKeyForNodeData=Hi.prototype.lh,Hi.prototype.isGroupForNodeData=Hi.prototype.Yu,Hi.prototype.copyLinkData=Hi.prototype.Jo,Hi.prototype.mergeLinkDataArray=Hi.prototype.Zz,Hi.prototype.removeLinkDataCollection=Hi.prototype.lA,Hi.prototype.removeLinkData=Hi.prototype.bm,Hi.prototype.addLinkDataCollection=Hi.prototype.Ey,Hi.prototype.addLinkData=Hi.prototype.fi,Hi.prototype.containsLinkData=Hi.prototype.Jc,Hi.prototype.makeLinkDataKeyUnique=Hi.prototype.Bs,Hi.prototype.findLinkDataForKey=Hi.prototype.jh,Hi.prototype.setKeyForLinkData=Hi.prototype.Ks,Hi.prototype.getKeyForLinkData=Hi.prototype.Ac,Hi.prototype.removeLabelKeyForLinkData=Hi.prototype.Qx,Hi.prototype.addLabelKeyForLinkData=Hi.prototype.Bu,Hi.prototype.setLabelKeysForLinkData=Hi.prototype.Ls,Hi.prototype.getLabelKeysForLinkData=Hi.prototype.Ef,Hi.prototype.setToPortIdForLinkData=Hi.prototype.Cv,Hi.prototype.getToPortIdForLinkData=Hi.prototype.Cx,Hi.prototype.setFromPortIdForLinkData=Hi.prototype.xv,Hi.prototype.getFromPortIdForLinkData=Hi.prototype.zx,Hi.prototype.setToKeyForLinkData=Hi.prototype.Bv,Hi.prototype.getToKeyForLinkData=Hi.prototype.Bx,Hi.prototype.setFromKeyForLinkData=Hi.prototype.wv,Hi.prototype.getFromKeyForLinkData=Hi.prototype.yx,Hi.prototype.clear=Hi.prototype.clear;var z0=Object.freeze([]);Hi.className="GraphLinksModel",eA.GraphLinksModel=Hi,Mn.constructGraphLinksModel=Mn.constructGraphLinksModel=function(){return new Hi},Mn.initDiagramModel=Pv=function(){return new Hi};function la(a,y){Mn.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(ni(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}ue(la,Mn),la.constructGraphLinksModel=Mn.constructGraphLinksModel,la.prototype.cloneProtected=function(a){Mn.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},Bt=la.prototype,Bt.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" TreeModel";if(0<a){y+=`
node data:`,a=this.nodeDataArray;for(var x=a.length,E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+En(b)}}return y},Bt.rm=function(){var a=Mn.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},Bt.gp=function(a){Mn.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Bt.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&pe("applyIncrementalJson cannot change Model properties"),Mn.prototype.fp.call(this,a)},Bt.Vl=function(a){return a},Bt.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=ho(a,y),y!==void 0)){if(Vg(y))return y;pe("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},Bt.qe=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Ke;if(x!=="")if(y=this.Vl(y),this.lb(a)){var E=ho(a,x);E!==y&&(wA(this,E,a),Tr(a,x,y),this.hc(y)===null&&yA(this,y,a),ko(this,"nodeParentKey",Qr,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Tr(a,x,y)}},Bt.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=ho(a,y),y===void 0)?"":typeof y=="string"?y:(pe("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},la.prototype.getLinkCategoryForData=function(a){return this.ss(a)},la.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var E=ho(a,x);E===void 0&&(E=""),E!==y&&(Tr(a,x,y),ko(this,"parentLinkCategory",Qr,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Tr(a,x,y)}},la.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},la.prototype.copyNodeData=function(a){return a===null?null:(a=Mn.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||ho(a,this.Ke)===void 0||Tr(a,this.Ke,void 0),a)},la.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}if(y===this.nodeParentKeyProperty){this.qe(a,x);return}}var E=ho(a,y);E!==x&&(Tr(a,y,x),this.Fs(a,y,E,x))},Bt=la.prototype,Bt.jp=function(a,y){Mn.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},Bt.qv=function(a,y,x){if(this.mh(a)===y){var E=this.Ke;Tr(a,E,x),ko(this,"nodeParentKey",Qr,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Bt.fm=function(a){Mn.prototype.fm.call(this,a),a=this.wa(a);var y=Pp(this,a);if(y!==null){var x=Ce();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)&&this.mh(E)===a){var b=this.Ke;ko(this,"nodeParentKey",Qr,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}for(y=0;y<x.length;y++)wA(this,a,x[y]);Oe(x)}},Bt.em=function(a){Mn.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&yA(this,y,a)},Bt.qp=function(a){Mn.prototype.qp.call(this,a);var y=this.mh(a);wA(this,y,a)},Bt.lm=function(a,y){Mn.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},Bt.Tl=function(){return!0},Bt.xs=function(){return!0},Ie.Object.defineProperties(la.prototype,{nodeParentKeyProperty:{get:function(){return this.Ke},set:function(a){var y=this.Ke;y!==a&&(this.Ke=a,this.g("nodeParentKeyProperty",y,a))}},Jj:{get:function(){return this.Nm},set:function(a){this.Nm!==a&&(this.Nm=a)}},parentLinkCategoryProperty:{get:function(){return this.nj},set:function(a){var y=this.nj;y!==a&&(this.nj=a,this.g("parentLinkCategoryProperty",y,a))}},linkCategoryProperty:{get:function(){return this.parentLinkCategoryProperty},set:function(a){this.parentLinkCategoryProperty=a}},type:{get:function(){return"TreeModel"}}}),la.prototype.setParentLinkCategoryForNodeData=la.prototype.Ms,la.prototype.getParentLinkCategoryForNodeData=la.prototype.ss,la.prototype.setParentKeyForNodeData=la.prototype.qe,la.prototype.getParentKeyForNodeData=la.prototype.mh,la.className="TreeModel",eA.TreeModel=la;function Vr(a){Ir.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=nA,this.Ti=0,this.Zv=new Rt,this.Jp=this.me=0,this.Xr=new bp,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=nA,this.K=Aa,this.nd=Qc,this.hd=yv,this.tf=6,this.Nn=J0,a&&Object.assign(this,a)}ue(Vr,Ir),Vr.prototype.cloneProtected=function(a){Ir.prototype.cloneProtected.call(this,a),a.eo=this.eo,a.Cm=this.Cm,a.ro=this.ro,a.ul=this.ul,a.Rb=this.Rb,a.K=this.K,a.nd=this.nd,a.hd=this.hd,a.tf=this.tf,a.Nn=this.Nn},Vr.prototype.qb=function(a){a.classType===Vr?a===X0||a===Z0||a===_0||a===Y0||a===Qc?this.sorting=a:a===_f||a===Nc||a===Aa||a===_g?this.direction=a:a===eg||a===Wg||a===nA||a===iA?this.arrangement=a:(a===Gd||a===J0)&&(this.nodeDiameterFormula=a):Ir.prototype.qb.call(this,a)},Vr.prototype.createNetwork=function(){return new Uc(this)},Vr.prototype.doLayout=function(a){if(this.network===null&&(this.network=this.makeNetwork(a)),this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin),a=this.network.vertexes,1>=a.count)a.count===1&&(a=a.first(),a.centerX=0,a.centerY=0);else{var y=new Ke;y.addAll(a.iterator),a=new Ke;var x=new Ke,E=this.sort(y),b,z,tt=this.Jp,rt=this.arrangement,ot=this.nodeDiameterFormula,at=this.radius;(!isFinite(at)||0>=at)&&(at=NaN);var At=this.aspectRatio;(!isFinite(At)||0>=At)&&(At=1);var ft=this.startAngle;isFinite(ft)||(ft=0);var pt=this.sweepAngle;if((!isFinite(pt)||360<pt||1>pt)&&(pt=360),y=this.spacing,isFinite(y)||(y=NaN),rt===iA&&ot===Gd?rt=nA:rt===iA&&ot!==Gd&&(rt=this.arrangement),(this.direction===_f||this.direction===Nc)&&this.sorting!==Qc){for(ot=0;!(ot>=E.length)&&(a.add(E.M(ot)),!(ot+1>=E.length));ot+=2)x.add(E.M(ot+1));this.direction===_f?(this.arrangement===iA&&a.reverse(),E=new Ke,E.addAll(a),E.addAll(x)):(this.arrangement===iA&&x.reverse(),E=new Ke,E.addAll(x),E.addAll(a))}ot=E.length;for(var xt=z=b=0;xt<E.length;xt++){var Ct=ft+pt*z*(this.direction===Aa?1:-1)/ot,Mt=E.M(xt).diameter;isNaN(Mt)&&(Mt=Yg(E.M(xt),Ct)),360>pt&&(xt===0||xt===E.length-1)&&(Mt/=2),b+=Mt,z++}if(isNaN(at)||rt===iA){if(isNaN(y)&&(y=6),rt!==nA&&rt!==iA){for(z=-1/0,tt=0;tt<ot;tt++)xt=E.M(tt),b=E.M(tt===ot-1?0:tt+1),isNaN(xt.diameter)&&Yg(xt,0),isNaN(b.diameter)&&Yg(b,0),z=Math.max(z,(xt.diameter+b.diameter)/2);tt=z+y,rt===eg?at=(z+y)/(2*Math.PI/ot):at=V0(this,tt*(360<=pt?ot:ot-1),At,ft*Math.PI/180,pt*Math.PI/180)}else at=V0(this,b+(360<=pt?ot:ot-1)*(rt!==iA?y:1.6*y),At,ft*Math.PI/180,pt*Math.PI/180);z=at*At}else if(z=at*At,xt=Ev(this,at,z,ft*Math.PI/180,pt*Math.PI/180),isNaN(y))(rt===nA||rt===iA)&&(y=(xt-b)/(360<=pt?ot:ot-1));else if(rt===nA||rt===iA)xt=(xt-b)/(360<=pt?ot:ot-1),xt<y?(at=V0(this,b+y*(360<=pt?ot:ot-1),At,ft*Math.PI/180,pt*Math.PI/180),z=at*At):y=xt;else{for(tt=-1/0,b=0;b<ot;b++)Ct=E.M(b),Mt=E.M(b===ot-1?0:b+1),isNaN(Ct.diameter)&&Yg(Ct,0),isNaN(Mt.diameter)&&Yg(Mt,0),tt=Math.max(tt,(Ct.diameter+Mt.diameter)/2);tt+=y,b=V0(this,tt*(360<=pt?ot:ot-1),At,ft*Math.PI/180,pt*Math.PI/180),b>at?(at=b,z=at*At):tt=xt/(360<=pt?ot:ot-1)}if(this.kw=rt,this.lc=at,this.Zm=At,this.lw=ft,this.Wp=pt,this.Ti=y,this.me=z,this.Jp=tt,y=E,E=this.kw,rt=this.lc,at=this.lw,At=this.Wp,ft=this.Ti,pt=this.me,ot=this.Jp,this.direction!==_f&&this.direction!==Nc||E!==iA)if(this.direction===_f||this.direction===Nc){switch(tt=0,E){case Wg:tt=180*W0(this,rt,pt,at,ot)/Math.PI;break;case nA:ot=y=0,tt=a.first(),tt!==null&&(y=Yg(tt,Math.PI/2)),tt=x.first(),tt!==null&&(ot=Yg(tt,Math.PI/2)),tt=180*W0(this,rt,pt,at,ft+(y+ot)/2)/Math.PI;break;case eg:tt=At/y.length}if(this.direction===_f){switch(E){case Wg:kp(this,a,at,_g);break;case nA:Mp(this,a,at,_g);break;case eg:Ep(this,a,At/2,at,_g)}switch(E){case Wg:kp(this,x,at+tt,Aa);break;case nA:Mp(this,x,at+tt,Aa);break;case eg:Ep(this,x,At/2,at+tt,Aa)}}else{switch(E){case Wg:kp(this,x,at,_g);break;case nA:Mp(this,x,at,_g);break;case eg:Ep(this,x,At/2,at,_g)}switch(E){case Wg:kp(this,a,at+tt,Aa);break;case nA:Mp(this,a,at+tt,Aa);break;case eg:Ep(this,a,At/2,at+tt,Aa)}}}else switch(E){case Wg:kp(this,y,at,this.direction);break;case nA:Mp(this,y,at,this.direction);break;case eg:Ep(this,y,At,at,this.direction);break;case iA:Nw(this,y,At,at,this.direction)}else Nw(this,y,At,at-At/2,Aa)}this.updateParts(),this.network=null,this.isValidLayout=!0};function Ep(a,y,x,E,b){var z=a.Wp,tt=a.lc;a=a.me,E=E*Math.PI/180,x=x*Math.PI/180;for(var rt=y.length,ot=0;ot<rt;ot++){var at=E+(b===Aa?ot*x/(360<=z?rt:rt-1):-(ot*x)/rt),At=y.M(ot),ft=tt*Math.tan(at)/a;ft=Math.sqrt((tt*tt+a*a*ft*ft)/(1+ft*ft)),At.centerX=ft*Math.cos(at),At.centerY=ft*Math.sin(at),At.actualAngle=180*at/Math.PI}}function Mp(a,y,x,E){var b=a.lc,z=a.me,tt=a.Ti;x=x*Math.PI/180;for(var rt=y.length,ot=0;ot<rt;ot++){var at=y.M(ot),At=y.M(ot===rt-1?0:ot+1),ft=z*Math.sin(x);at.centerX=b*Math.cos(x),at.centerY=ft,at.actualAngle=180*x/Math.PI,isNaN(at.diameter)&&Yg(at,0),isNaN(At.diameter)&&Yg(At,0),at=W0(a,b,z,E===Aa?x:-x,(at.diameter+At.diameter)/2+tt),x+=E===Aa?at:-at}}function kp(a,y,x,E){var b=a.lc,z=a.me,tt=a.Jp;x=x*Math.PI/180;for(var rt=y.length,ot=0;ot<rt;ot++){var at=y.M(ot);at.centerX=b*Math.cos(x),at.centerY=z*Math.sin(x),at.actualAngle=180*x/Math.PI,at=W0(a,b,z,E===Aa?x:-x,tt),x+=E===Aa?at:-at}}function Nw(a,y,x,E,b){var z=a.Wp;if(a.mj=0,a.Xr=new bp,360>x){for(z=E+(b===Aa?z:-z);0>z;)z+=360;z%=360,180<z&&(z-=360),z*=Math.PI/180,a.gt=z,Uw(a,y,x,E,b)}else Qw(a,y,x,E,b);a.Xr.commit(y)}function Qw(a,y,x,E,b){var z=a.lc,tt=a.Ti,rt=a.Zm,ot=z*Math.cos(E*Math.PI/180),at=a.me*Math.sin(E*Math.PI/180),At=y.Fa();if(At.length===3)At[0].centerX=z,At[0].centerY=0,At[1].centerX=At[0].centerX-At[0].width/2-At[1].width/2-tt,At[1].y=At[0].y,At[2].centerX=(At[0].centerX+At[1].centerX)/2,At[2].y=At[0].y-At[2].height-tt;else if(At.length===4)At[0].centerX=z,At[0].centerY=0,At[2].centerX=-At[0].centerX,At[2].centerY=At[0].centerY,At[1].centerX=0,At[1].y=Math.min(At[0].y,At[2].y)-At[1].height-tt,At[3].centerX=0,At[3].y=Math.max(At[0].y+At[0].height+tt,At[2].y+At[2].height+tt);else{z=Rt.alloc();for(var ft=0;ft<At.length&&(At[ft].centerX=ot,At[ft].centerY=at,!(ft>=At.length-1));ft++)Iw(a,ot,at,At,ft,b,z)||Dw(a,ot,at,At,ft,b,z),ot=z.x,at=z.y;if(Rt.free(z),a.mj++,!(23<a.mj)){ot=At[0].centerX,at=At[0].centerY,z=At[At.length-1].centerX,ft=At[At.length-1].centerY;var pt=Math.abs(ot-z)-((At[0].width+At[At.length-1].width)/2+tt),xt=Math.abs(at-ft)-((At[0].height+At[At.length-1].height)/2+tt);tt=0,1>Math.abs(xt)?Math.abs(ot-z)<(At[0].width+At[At.length-1].width)/2&&(tt=0):tt=0<xt?xt:1>Math.abs(pt)?0:pt,ot=Math.abs(z)>Math.abs(ft)?0<z!=at>ft:0<ft!=ot<z,(ot=b===Aa?ot:!ot)&&(tt=-Math.abs(tt),tt=Math.min(tt,-At[At.length-1].width),tt=Math.min(tt,-At[At.length-1].height)),a.Xr.compare(tt,At),1<Math.abs(tt)&&(a.lc=8>a.mj?a.lc-tt/(2*Math.PI):5>At.length&&10<tt?a.lc/2:a.lc-(0<tt?1.7:-2.3),a.me=a.lc*rt,Qw(a,y,x,E,b))}}}function Uw(a,y,x,E,b){for(var z=a.lc,tt=a.me,rt=a.Zm,ot=z*Math.cos(E*Math.PI/180),at=tt*Math.sin(E*Math.PI/180),At=Rt.alloc(),ft=y.Fa(),pt=0;pt<ft.length&&(ft[pt].centerX=ot,ft[pt].centerY=at,!(pt>=ft.length-1));pt++)Iw(a,ot,at,ft,pt,b,At)||Dw(a,ot,at,ft,pt,b,At),ot=At.x,at=At.y;if(Rt.free(At),a.mj++,!(23<a.mj)){if(ot=Math.atan2(at,ot),ot=b===Aa?a.gt-ot:ot-a.gt,ot=Math.abs(ot)<Math.abs(ot-2*Math.PI)?ot:ot-2*Math.PI,z=ot*(z+tt)/2,tt=a.Xr,Math.abs(z)<Math.abs(tt.Pl))for(tt.Pl=z,tt.mk=[],tt.tm=[],ot=0;ot<ft.length;ot++)tt.mk[ot]=ft[ot].bounds.x,tt.tm[ot]=ft[ot].bounds.y;1<Math.abs(z)&&(a.lc=8>a.mj?a.lc-z/(2*Math.PI):a.lc-(0<z?1.7:-2.3),a.me=a.lc*rt,Uw(a,y,x,E,b))}}function Iw(a,y,x,E,b,z,tt){var rt=a.lc,ot=a.me,at=0;a=(E[b].width+E[b+1].width)/2+a.Ti;var At=!1;if(0<=x!=(z===Aa)){if(z=y+a,z>rt){if(z=y-a,z<-rt)return tt.x=z,tt.y=at,!1;At=!0}}else if(z=y-a,z<-rt){if(z=y+a,z>rt)return tt.x=z,tt.y=at,!1;At=!0}return at=Math.sqrt(1-Math.min(1,z*z/(rt*rt)))*ot,0>x!==At&&(at=-at),Math.abs(x-at)>(E[b].height+E[b+1].height)/2?(tt.x=z,tt.y=at,!1):(tt.x=z,tt.y=at,!0)}function Dw(a,y,x,E,b,z,tt){var rt=a.lc,ot=a.me,at=0;if(a=(E[b].height+E[b+1].height)/2+a.Ti,E=!1,0<=y!=(z===Aa)){if(z=x-a,z<-ot){if(z=x+a,z>ot){tt.x=at,tt.y=z;return}E=!0}}else if(z=x+a,z>ot){if(z=x-a,z<-ot){tt.x=at,tt.y=z;return}E=!0}at=Math.sqrt(1-Math.min(1,z*z/(ot*ot)))*rt,0>y!==E&&(at=-at),tt.x=at,tt.y=z}Vr.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},Vr.prototype.commitNodes=function(){var a=this.group!==null&&this.group.placeholder!==null&&this.group.isSubGraphExpanded,y=a?this.group.location.copy():null,x=this.actualCenter;a?x=new Rt(0,0):(x.x=this.arrangementOrigin.x+this.lc,x.y=this.arrangementOrigin.y+this.me);for(var E=this.network.vertexes.iterator;E.next();){var b=E.value;b.x+=x.x,b.y+=x.y,b.commit()}a&&(this.group.Va(),a=this.group.position.copy(),x=this.group.location.copy(),y=y.re(x.re(a)),this.group.move(y),this.Zv=y.re(a))},Vr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function Ev(a,y,x,E,b){var z=a.ty;if(.001>Math.abs(a.Zm-1))return E!==void 0&&b!==void 0?b*y:2*Math.PI*y;a=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x;for(var tt=0,rt=E!==void 0&&b!==void 0?b/(z+1):Math.PI/(2*(z+1)),ot=0,at=0;at<=z;at++){E!==void 0&&b!==void 0?ot=E+at*b/z:ot=at*Math.PI/(2*z);var At=Math.sin(ot);tt+=Math.sqrt(1-a*a*At*At)*rt}return E!==void 0&&b!==void 0?(y>x?y:x)*tt:4*(y>x?y:x)*tt}function V0(a,y,x,E,b){return y/(E!==void 0&&b!==void 0?Ev(a,1,x,E,b):Ev(a,1,x))}function W0(a,y,x,E,b){if(.001>Math.abs(a.Zm-1))return b/y;var z=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,tt=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(E+=Math.PI/2);for(var rt=0;;rt++){var ot=Math.sin(E+rt*a);if(tt+=(y>x?y:x)*Math.sqrt(1-z*z*ot*ot)*a,tt>=b)return rt*a}}Vr.prototype.sort=function(a){switch(this.sorting){case _0:break;case Y0:a.reverse();break;case X0:a.sort(this.comparer);break;case Z0:a.sort(this.comparer),a.reverse();break;case Qc:return this.ak(N1(a));default:pe("Invalid sorting type.")}return a};function N1(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new Ke;for(var E=0;E<a.length;E++){var b=-1,z=-1;if(E===0)for(var tt=0;tt<a.length;tt++){var rt=a.M(tt).edgesCount;rt>b&&(b=rt,z=tt)}else for(tt=0;tt<a.length;tt++)rt=y[tt],rt>b&&(b=rt,z=tt);for(x.add(a.M(z)),y[z]=-1,z=a.M(z),tt=z.sourceEdges;tt.next();)b=a.indexOf(tt.value.fromVertex),0>b||0<=y[b]&&y[b]++;for(z=z.destinationEdges;z.next();)b=a.indexOf(z.value.toVertex),0>b||0<=y[b]&&y[b]++}return x}Vr.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var E=a.M(x);y[x]=[];for(var b,z=E.destinationEdges;z.next();)b=a.indexOf(z.value.toVertex),b!==x&&0>y[x].indexOf(b)&&y[x].push(b);for(E=E.sourceEdges;E.next();)b=a.indexOf(E.value.fromVertex),b!==x&&0>y[x].indexOf(b)&&y[x].push(b)}for(z=[],x=0;x<y.length;x++)z[x]=0;x=[];var tt=[],rt=[];E=[],b=new Ke;for(var ot=0,at=0;at<y.length;at++){var At=y[at].length;if(At===1)E.push(at);else if(At===0)b.add(a.M(at));else{if(ot===0)x.push(at);else{for(var ft=At=1/0,pt=-1,xt=[],Ct=0;Ct<x.length;Ct++)0>y[x[Ct]].indexOf(x[Ct===x.length-1?0:Ct+1])&&xt.push(Ct===x.length-1?0:Ct+1);if(xt.length===0)for(Ct=0;Ct<x.length;Ct++)xt.push(Ct);for(Ct=0;Ct<xt.length;Ct++){for(var Mt=xt[Ct],Gt=y[at],It=0,zt=0;zt<tt.length;zt++){var Yt=z[tt[zt]],Xt=z[rt[zt]];if(Yt<Xt){var $t=Yt;Yt=Xt}else $t=Xt;if($t<Mt&&Mt<=Yt)for(Xt=0;Xt<Gt.length;Xt++){var de=Gt[Xt];0>x.indexOf(de)||$t<z[de]&&z[de]<Yt||$t===z[de]||Yt===z[de]||It++}else for(Xt=0;Xt<Gt.length;Xt++)de=Gt[Xt],0>x.indexOf(de)||$t<z[de]&&z[de]<Yt&&$t!==z[de]&&Yt!==z[de]&&It++}for(Gt=It,zt=It=0;zt<y[at].length;zt++)$t=x.indexOf(y[at][zt]),0<=$t&&($t=Math.abs(Mt-($t>=Mt?$t+1:$t)),It+=$t<x.length+1-$t?$t:x.length+1-$t);for(zt=0;zt<tt.length;zt++)$t=z[tt[zt]],Yt=z[rt[zt]],$t>=Mt&&$t++,Yt>=Mt&&Yt++,$t>Yt&&(Xt=Yt,Yt=$t,$t=Xt),Yt-$t<(x.length+2)/2==($t<Mt&&Mt<=Yt)&&It++;(Gt<At||Gt===At&&It<ft)&&(At=Gt,ft=It,pt=Mt)}for(x.splice(pt,0,at),At=0;At<x.length;At++)z[x[At]]=At;for(At=0;At<y[at].length;At++)ft=y[at][At],0<=x.indexOf(ft)&&(tt.push(at),rt.push(ft))}ot++}}for(tt=x.length;;){for(z=!0,rt=0;rt<E.length;rt++)if(ot=E[rt],at=y[ot][0],At=x.indexOf(at),0<=At){for(pt=ft=0;pt<y[at].length;pt++)xt=x.indexOf(y[at][pt]),0>xt||xt===At||(Ct=xt>At?xt-At:At-xt,ft+=xt<At!=Ct>tt-Ct?1:-1);x.splice(0>ft?At:At+1,0,ot),E.splice(rt,1),rt--}else z=!1;if(z)break;x.push(E[0]),E.splice(0,1)}for(y=0;y<x.length;y++)b.add(a.M(x[y]));return b},Ie.Object.defineProperties(Vr.prototype,{radius:{get:function(){return this.eo},set:function(a){this.eo!==a&&(0<a||isNaN(a))&&(this.eo=a,this.C())}},aspectRatio:{get:function(){return this.Cm},set:function(a){this.Cm!==a&&0<a&&(this.Cm=a,this.C())}},startAngle:{get:function(){return this.ro},set:function(a){this.ro!==a&&(this.ro=a,this.C())}},sweepAngle:{get:function(){return this.ul},set:function(a){this.ul!==a&&(0<a&&360>=a?this.ul=a:this.ul=360,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==iA&&a!==nA&&a!==Wg&&a!==eg||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Aa&&a!==_g&&a!==_f&&a!==Nc||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==_0&&a!==Y0&&a!==X0&&!Z0&&a!==Qc||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}},spacing:{get:function(){return this.tf},set:function(a){this.tf!==a&&(this.tf=a,this.C())}},nodeDiameterFormula:{get:function(){return this.Nn},set:function(a){this.Nn===a||a!==J0&&a!==Gd||(this.Nn=a,this.C())}},actualXRadius:{get:function(){return this.lc}},actualYRadius:{get:function(){return this.me}},actualSpacing:{get:function(){return this.Ti}},actualCenter:{get:function(){return this.Zv}}});var nA=new ce(Vr,"ConstantSpacing",0),Wg=new ce(Vr,"ConstantDistance",1),eg=new ce(Vr,"ConstantAngle",2),iA=new ce(Vr,"Packed",3),Aa=new ce(Vr,"Clockwise",4),_g=new ce(Vr,"Counterclockwise",5),_f=new ce(Vr,"BidirectionalLeft",6),Nc=new ce(Vr,"BidirectionalRight",7),_0=new ce(Vr,"Forwards",8),Y0=new ce(Vr,"Reverse",9),X0=new ce(Vr,"Ascending",10),Z0=new ce(Vr,"Descending",11),Qc=new ce(Vr,"Optimized",12),J0=new ce(Vr,"Pythagorean",13),Gd=new ce(Vr,"Circular",14);Vr.className="CircularLayout",Vr.ConstantSpacing=nA,Vr.ConstantDistance=Wg,Vr.ConstantAngle=eg,Vr.Packed=iA,Vr.Clockwise=Aa,Vr.Counterclockwise=_g,Vr.BidirectionalLeft=_f,Vr.BidirectionalRight=Nc,Vr.Forwards=_0,Vr.Reverse=Y0,Vr.Ascending=X0,Vr.Descending=Z0,Vr.Optimized=Qc,Vr.Pythagorean=J0,Vr.Circular=Gd;function bp(){this.Pl=-1/0,this.tm=this.mk=null}bp.prototype.compare=function(a,y){if(0<a&&0>this.Pl||Math.abs(a)<Math.abs(this.Pl)&&!(0>a&&0<this.Pl))for(this.Pl=a,this.mk=[],this.tm=[],a=0;a<y.length;a++)this.mk[a]=y[a].bounds.x,this.tm[a]=y[a].bounds.y},bp.prototype.commit=function(a){if(this.mk!==null&&this.tm!==null)for(var y=0;y<this.mk.length;y++){var x=a.M(y);x.x=this.mk[y],x.y=this.tm[y]}},bp.className="VertexArrangement";function Uc(a){xr.call(this,a)}ue(Uc,xr),Uc.prototype.createVertex=function(){return new Tp(this)},Uc.prototype.createEdge=function(){return new q0(this)},Uc.className="CircularNetwork";function Tp(a){Oo.call(this,a),this.u=this.Si=NaN}ue(Tp,Oo);function Yg(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===iA)if(x.nodeDiameterFormula===Gd)a.Si=Math.max(a.width,a.height);else{if(x=Math.abs(Math.sin(y)),y=Math.abs(Math.cos(y)),x===0)return a.width;if(y===0)return a.height;a.Si=Math.min(a.height/x,a.width/y)}else a.Si=x.nodeDiameterFormula===Gd?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}Ie.Object.defineProperties(Tp.prototype,{diameter:{get:function(){return this.Si},set:function(a){this.Si!==a&&(this.Si=a)}},actualAngle:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}}}),Tp.className="CircularVertex";function q0(a){Za.call(this,a)}ue(q0,Za),q0.className="CircularEdge";function Ls(a){Ir.call(this),this.ah=null,this.An=0,this.$d=new an(100,100).freeze(),this.Bm=!1,this.sf=!0,this.td=!1,this.dl=100,this.$m=1,this.Zf=1e3,this.In=10,this.fo=Math,this.Hk=.05,this.Gk=50,this.Ek=150,this.Fk=0,this.Vm=10,this.Um=5,a&&Object.assign(this,a)}ue(Ls,Ir),Ls.prototype.cloneProtected=function(a){Ir.prototype.cloneProtected.call(this,a),a.$d.assign(this.$d),a.Bm=this.Bm,a.sf=this.sf,a.td=this.td,a.dl=this.dl,a.$m=this.$m,a.Zf=this.Zf,a.In=this.In,a.fo=this.fo,a.Hk=this.Hk,a.Gk=this.Gk,a.Ek=this.Ek,a.Fk=this.Fk,a.Vm=this.Vm,a.Um=this.Um},Ls.prototype.createNetwork=function(){return new jd(this)},Ls.prototype.doLayout=function(a){if(this.network===null&&(this.network=this.makeNetwork(a)),a=this.maxIterations,0<this.network.vertexes.count){this.network.Ko();for(var y=this.network.vertexes.iterator;y.next();){var x=y.value;x.charge=this.electricalCharge(x),x.mass=this.gravitationalMass(x)}for(y=this.network.edges.iterator;y.next();)x=y.value,x.stiffness=this.springStiffness(x),x.length=this.springLength(x);if(this.Cu(),this.An=0,this.needsClusterLayout()){y=this.network,x=y.Zx();for(var E=x.iterator;E.next();){this.network=E.value;for(var b=this.network.vertexes.iterator;b.next();){var z=b.value;z.Vd=z.vertexes.count,z.sh=1,z.Hj=null,z.We=null}Hw(this,0,a)}this.network=y;var tt=E=x.iterator;E=this.arrangementSpacing;var rt=tt.count,ot=!0;z=b=0;for(var at=Ce(),At=0;At<rt+y.vertexes.count+2;At++)at[At]=null;rt=0,tt.reset();for(var ft=Me.alloc();tt.next();)if(At=tt.value,this.computeBounds(At,ft),ot)ot=!1,b=ft.x+ft.width/2,z=ft.y+ft.height/2,at[0]=new Rt(ft.x+ft.width+E.width,ft.y),at[1]=new Rt(ft.x,ft.y+ft.height+E.height),rt=2;else{var pt=Ow(at,rt,b,z,ft.width,ft.height,E),xt=at[pt],Ct=new Rt(xt.x+ft.width+E.width,xt.y),Mt=new Rt(xt.x,xt.y+ft.height+E.height);for(pt+1<rt&&at.splice(pt+1,0,null),at[pt]=Ct,at[pt+1]=Mt,rt++,pt=xt.x-ft.x,xt=xt.y-ft.y,At=At.vertexes.iterator;At.next();)Ct=At.value,Ct.centerX+=pt,Ct.centerY+=xt}for(Me.free(ft),At=y.vertexes.iterator;At.next();)tt=At.value,pt=tt.bounds,2>rt?(b=pt.x+pt.width/2,z=pt.y+pt.height/2,at[0]=new Rt(pt.x+pt.width+E.width,pt.y),at[1]=new Rt(pt.x,pt.y+pt.height+E.height),rt=2):(ot=Ow(at,rt,b,z,pt.width,pt.height,E),ft=at[ot],xt=new Rt(ft.x+pt.width+E.width,ft.y),pt=new Rt(ft.x,ft.y+pt.height+E.height),ot+1<rt&&at.splice(ot+1,0,null),at[ot]=xt,at[ot+1]=pt,rt++,tt.centerX=ft.x+tt.width/2,tt.centerY=ft.y+tt.height/2);for(Oe(at),E=x.iterator;E.next();){for(x=E.value,b=x.vertexes.iterator;b.next();)y.dh(b.value);for(x=x.edges.iterator;x.next();)y.Bo(x.value)}}Gw(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},Ls.prototype.needsClusterLayout=function(){if(3>this.network.vertexes.count)return!1;for(var a=0,y=0,x=this.network.vertexes.first().bounds,E=this.network.vertexes.iterator;E.next();){if(E.value.bounds.Yc(x)&&(a++,2<a))return!0;if(10<y)break;y++}return!1},Ls.prototype.computeBounds=function(a,y){var x=!0;for(a=a.vertexes.iterator;a.next();){var E=a.value;x?(x=!1,y.set(E.bounds)):y.ed(E.bounds)}return y};function Hw(a,y,x){if(Q1(a,y)){var E=a.Zf;a.Zf*=1+1/(y+1);var b=U1(a,y),z=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=z,Hw(a,y+1,x),Gw(a,z),I1(a,b),y=b.vertexes.Fa(),y.sort(function(tt,rt){return tt===null||rt===null||tt===rt?0:rt.Vd-tt.Vd}),x=0;x<y.length;x++)D1(a,y[x]);a.Zf=E}}function Q1(a,y){if(10<y||3>a.network.vertexes.count)return!1;for(a.ah=a.network.vertexes.Fa(),a=a.ah,a.sort(function(x,E){return x===null||E===null||x===E?0:E.Vd-x.Vd}),y=a.length-1;0<=y&&1>=a[y].Vd;)y--;return 1<a.length-y}function U1(a,y){for(var x=a.network,E=new jd(a),b=0;b<a.ah.length;b++){var z=a.ah[b];if(1<z.Vd){E.dh(z);var tt=new jw;tt.Rs=z.Vd,tt.Ss=z.width,tt.Qs=z.height,tt.Sv=z.focus.x,tt.Tv=z.focus.y,z.We===null&&(z.We=new Ke),z.We.add(tt),z.sv=z.We.count-1}else break}for(z=x.edges.iterator;z.next();){var rt=z.value;b=rt.fromVertex,tt=rt.toVertex,b.network===E&&tt.network===E?E.Bo(rt):b.network===E?(rt=b.Hj,rt===null&&(rt=new Ke,b.Hj=rt),rt.add(tt),b.Vd--,b.sh+=tt.sh):tt.network===E&&(rt=tt.Hj,rt===null&&(rt=new Ke,tt.Hj=rt),rt.add(b),tt.Vd--,tt.sh+=b.sh)}for(b=E.edges.iterator;b.next();)z=b.value,z.length*=Math.max(1,re.sqrt((z.fromVertex.sh+z.toVertex.sh)/(4*y+1)));for(y=E.vertexes.iterator;y.next();){b=y.value;var ot=b.Hj;if(ot!==null&&0<ot.count&&(tt=b.We.M(b.We.count-1).Rs-b.Vd,!(0>=tt))){for(var at=rt=0,At=ot.count-tt;At<ot.count;At++){var ft=ot.M(At),pt=null;for(z=ft.edges.iterator;z.next();){var xt=z.value;if(xt.Ax(ft)===b){pt=xt;break}}pt!==null&&(at+=pt.length,rt+=ft.width*ft.height)}z=b.centerX,ot=b.centerY,At=b.width,ft=b.height,pt=b.focus,xt=At*ft,1>xt&&(xt=1),rt=re.sqrt((rt+xt+at*at*4/(tt*tt))/xt),tt=(rt-1)*At/2,rt=(rt-1)*ft/2,b.bounds=new Me(z-pt.x-tt,ot-pt.y-rt,At+2*tt,ft+2*rt),b.focus=new Rt(pt.x+tt,pt.y+rt)}}return a.network=E,x}function I1(a,y){for(var x=a.network.vertexes.iterator;x.next();){var E=x.value;if(E.network=y,E.We!==null){var b=E.We.M(E.sv);E.Vd=b.Rs;var z=b.Sv,tt=b.Tv;E.bounds=new Me(E.centerX-z,E.centerY-tt,b.Ss,b.Qs),E.focus=new Rt(z,tt),E.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function D1(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var E=y.centerX,b=y.centerY,z=y.width,tt=y.height;y.We!==null&&0<y.We.count&&(tt=y.We.M(0),z=tt.Ss,tt=tt.Qs),z=re.sqrt(z*z+tt*tt)/2;for(var rt=!1,ot=tt=0,at=0,At=y.vertexes.iterator;At.next();){var ft=At.value;1>=ft.Vd?ot++:(rt=!0,at++,tt+=Math.atan2(y.centerY-ft.centerY,y.centerX-ft.centerX))}if(ot!==0){for(0<at&&(tt/=at),at=y=0,y=rt?2*Math.PI/(ot+1):2*Math.PI/ot,ot%2===0&&(at=y/2),1<x.count&&x.sort(function(xt,Ct){return xt===null||Ct===null||xt===Ct?0:Ct.width*Ct.height-xt.width*xt.height}),rt=ot%2===0?0:1,x=x.iterator;x.next();)if(ot=x.value,!(1<ot.Vd||a.isFixed(ot))){for(At=null,ft=ot.edges.iterator;ft.next();){At=ft.value;break}ft=ot.width;var pt=ot.height;ft=re.sqrt(ft*ft+pt*pt)/2,At=z+At.length+ft,ft=tt+(y*(rt/2>>1)+at)*(rt%2===0?1:-1),ot.centerX=E+At*Math.cos(ft),ot.centerY=b+At*Math.sin(ft),rt++}}}}function Ow(a,y,x,E,b,z,tt){var rt=9e19,ot=-1,at=0;t:for(;at<y;at++){var At=a[at],ft=At.x-x,pt=At.y-E;if(ft=ft*ft+pt*pt,ft<rt){for(pt=at-1;0<=pt;pt--)if(a[pt].y>At.y&&a[pt].x-At.x<b+tt.width)continue t;for(pt=at+1;pt<y;pt++)if(a[pt].x>At.x&&a[pt].y-At.y<z+tt.height)continue t;ot=at,rt=ft}}return ot}Ls.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Ls.prototype.addComments=function(a){var y=a.node;if(y!==null)for(y=y.Mu();y.next();){var x=y.value;if(x.category==="Comment"&&x.isVisible()){var E=this.network.ki(x);E===null&&(E=this.network.Bl(x)),E.charge=this.defaultCommentElectricalCharge,x=null;for(var b=E.destinationEdges;b.next();){var z=b.value;if(z.toVertex===a){x=z;break}}if(x===null){for(b=E.sourceEdges;b.next();)if(z=b.value,z.fromVertex===a){x=z;break}}x===null&&(x=this.network.Zj(a,E,null)),x.length=this.defaultCommentSpringLength}}};function Rw(a,y){var x=a.bounds,E=x.x;a=x.y;var b=x.width;x=x.height;var z=y.bounds,tt=z.x;y=z.y;var rt=z.width;return z=z.height,E+b<tt?a>y+z?(x=E+b-tt,a=a-y-z,re.sqrt(x*x+a*a)):a+x<y?(E=E+b-tt,a=a+x-y,re.sqrt(E*E+a*a)):tt-(E+b):E>tt+rt?a>y+z?(x=E-tt-rt,a=a-y-z,re.sqrt(x*x+a*a)):a+x<y?(E=E-tt-rt,a=a+x-y,re.sqrt(E*E+a*a)):E-(tt+rt):a>y+z?a-(y+z):a+x<y?y-(a+x):.1}function Gw(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,H1(a)););a.ah=null}function H1(a){a.ah===null&&(a.ah=a.network.vertexes.Fa());var y=a.ah;if(0>=y.length)return!1;var x=y[0];x.forceX=0,x.forceY=0;for(var E=x.centerX,b=E,z=x=x.centerY,tt=1;tt<y.length;tt++){var rt=y[tt];rt.forceX=0,rt.forceY=0;var ot=rt.centerX;rt=rt.centerY,E=Math.min(E,ot),b=Math.max(b,ot),x=Math.min(x,rt),z=Math.max(z,rt)}(b=b-E>z-x)?y.sort(function(Mt,Gt){return Mt===null||Gt===null||Mt===Gt?0:Mt.centerX-Gt.centerX}):y.sort(function(Mt,Gt){return Mt===null||Gt===null||Mt===Gt?0:Mt.centerY-Gt.centerY}),x=a.Zf;var at=E=rt=0;for(z=0;z<y.length;z++){tt=y[z],E=tt.bounds,rt=tt.focus,ot=E.x+rt.x;var At=E.y+rt.y;E=tt.charge*a.electricalFieldX(ot,At),at=tt.charge*a.electricalFieldY(ot,At),E+=tt.mass*a.gravitationalFieldX(ot,At),at+=tt.mass*a.gravitationalFieldY(ot,At),tt.forceX+=E,tt.forceY+=at;for(var ft=z+1;ft<y.length;ft++){var pt=y[ft];if(pt!==tt){E=pt.bounds,rt=pt.focus,at=E.x+rt.x;var xt=E.y+rt.y;if(ot-at>x||at-ot>x){if(b)break}else if(At-xt>x||xt-At>x){if(!b)break}else{var Ct=Rw(tt,pt);1>Ct?(E=a.randomNumberGenerator,E===null&&(a.randomNumberGenerator=E=new $0),Ct=E.random(),rt=E.random(),ot>at?(E=Math.abs(pt.bounds.right-tt.bounds.x),E=(1+E)*Ct):ot<at?(E=Math.abs(pt.bounds.x-tt.bounds.right),E=-(1+E)*Ct):(E=Math.max(pt.width,tt.width),E=(1+E)*Ct-E/2),At>xt?(at=Math.abs(pt.bounds.bottom-tt.bounds.y),at=(1+at)*rt):ot<at?(at=Math.abs(pt.bounds.y-tt.bounds.bottom),at=-(1+at)*rt):(at=Math.max(pt.height,tt.height),at=(1+at)*rt-at/2)):(rt=-(tt.charge*pt.charge)/(Ct*Ct),E=(at-ot)/Ct*rt,at=(xt-At)/Ct*rt),tt.forceX+=E,tt.forceY+=at,pt.forceX-=E,pt.forceY-=at}}}}for(b=a.network.edges.iterator;b.next();)rt=b.value,x=rt.fromVertex,z=rt.toVertex,tt=x.bounds,ot=x.focus,E=tt.x+ot.x,tt=tt.y+ot.y,At=z.bounds,ft=z.focus,ot=At.x+ft.x,At=At.y+ft.y,ft=Rw(x,z),1>ft?(ft=a.randomNumberGenerator,ft===null&&(a.randomNumberGenerator=ft=new $0),rt=ft.random(),ft=ft.random(),E=(E>ot?1:-1)*(1+(z.width>x.width?z.width:x.width))*rt,at=(tt>At?1:-1)*(1+(z.height>x.height?z.height:x.height))*ft):(rt=rt.stiffness*(ft-rt.length),E=(ot-E)/ft*rt,at=(At-tt)/ft*rt),x.forceX+=E,x.forceY+=at,z.forceX-=E,z.forceY-=at;for(b=E=0;b<y.length;b++)x=y[b],a.isFixed(x)?a.moveFixedVertex(x):E=Math.max(E,a.moveVertex(x)||0);return E>a.epsilonDistance*a.epsilonDistance}Ls.prototype.moveVertex=function(a){var y=a.forceX,x=a.forceY,E=this.moveLimit;return y<-E?y=-E:y>E&&(y=E),x<-E?x=-E:x>E&&(x=E),a.centerX+=y,a.centerY+=x,y*y+x*x},Ls.prototype.moveFixedVertex=function(){},Ls.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},Ls.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=Xo,y.toSpot=Xo)}},Ls.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=Me.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,Me.free(x)}x=Me.alloc();for(var E=this.network.vertexes.iterator;E.next();){var b=E.value;(a!==0||y!==0)&&(x.assign(b.bounds),x.x+=a,x.y+=y,b.bounds=x),b.commit()}Me.free(x)},Ls.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Ls.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},Ls.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},Ls.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},Ls.prototype.electricalFieldX=function(){return 0},Ls.prototype.electricalFieldY=function(){return 0},Ls.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},Ls.prototype.gravitationalFieldX=function(){return 0},Ls.prototype.gravitationalFieldY=function(){return 0},Ls.prototype.isFixed=function(a){return a.isFixed},Ie.Object.defineProperties(Ls.prototype,{currentIteration:{get:function(){return this.An}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},arrangesToOrigin:{get:function(){return this.Bm},set:function(a){this.Bm!==a&&(this.Bm=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},comments:{get:function(){return this.td},set:function(a){this.td!==a&&(this.td=a,this.C())}},maxIterations:{get:function(){return this.dl},set:function(a){this.dl!==a&&0<=a&&(this.dl=a,this.C())}},epsilonDistance:{get:function(){return this.$m},set:function(a){this.$m!==a&&0<a&&(this.$m=a,this.C())}},infinityDistance:{get:function(){return this.Zf},set:function(a){this.Zf!==a&&1<a&&(this.Zf=a,this.C())}},moveLimit:{get:function(){return this.In},set:function(a){this.In!==a&&1<a&&(this.In=a,this.C())}},randomNumberGenerator:{get:function(){return this.fo},set:function(a){this.fo!==a&&(a!==null&&typeof a.random!="function"&&pe('ForceDirectedLayout.randomNumberGenerator must have a "random()" function on it: '+a),this.fo=a)}},defaultSpringStiffness:{get:function(){return this.Hk},set:function(a){this.Hk!==a&&(this.Hk=a,this.C())}},defaultSpringLength:{get:function(){return this.Gk},set:function(a){this.Gk!==a&&(this.Gk=a,this.C())}},defaultElectricalCharge:{get:function(){return this.Ek},set:function(a){this.Ek!==a&&(this.Ek=a,this.C())}},defaultGravitationalMass:{get:function(){return this.Fk},set:function(a){this.Fk!==a&&(this.Fk=a,this.C())}},defaultCommentSpringLength:{get:function(){return this.Vm},set:function(a){this.Vm!==a&&(this.Vm=a,this.C())}},defaultCommentElectricalCharge:{get:function(){return this.Um},set:function(a){this.Um!==a&&(this.Um=a,this.C())}}}),Ls.className="ForceDirectedLayout";function jw(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}jw.className="ForceDirectedSubnet";function jd(a){xr.call(this,a)}ue(jd,xr),jd.prototype.createVertex=function(){return new Np(this)},jd.prototype.createEdge=function(){return new Qp(this)},jd.className="ForceDirectedNetwork";function Np(a){Oo.call(this,a),this.ia=!1,this.Ha=this.u=NaN,this.sh=this.Vd=this.V=this.F=0,this.We=this.Hj=null,this.sv=0}ue(Np,Oo),Ie.Object.defineProperties(Np.prototype,{isFixed:{get:function(){return this.ia},set:function(a){this.ia!==a&&(this.ia=a)}},charge:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},mass:{get:function(){return this.Ha},set:function(a){this.Ha!==a&&(this.Ha=a)}},forceX:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}},forceY:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}}}),Np.className="ForceDirectedVertex";function Qp(a){Za.call(this,a),this.j=this.o=NaN}ue(Qp,Za),Ie.Object.defineProperties(Qp.prototype,{stiffness:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},length:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}}}),Qp.className="ForceDirectedEdge";function $0(){var a=0;a===void 0&&(a=42),this.seed=a,this.ay=48271,this.ey=2147483647,this.Q=44488.07041494893,this.gy=3399,this.by=1/2147483647,this.random()}$0.prototype.random=function(){var a=this.seed%this.Q*this.ay-this.seed/this.Q*this.gy;return 0<a?this.seed=a:this.seed=a+this.ey,this.seed*this.by},$0.className="RandomNumberGenerator";function Ar(a){Ir.call(this),this.kc=this.ie=25,this.K=0,this.Dk=rm,this.Zk=om,this.Qk=sm,this.bj=4,this.rk=am,this.bg=15,this.sf=!0,this.Cn=4,this.Ra=this.Iq=this.Ia=-1,this.Md=this.Hn=0,this.Ta=this.Kd=this.Ld=this.he=this.tc=null,this.Kn=0,this.Jn=this.kj=null,this.le=0,this.fl=null,this.Rf=new Rt,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}ue(Ar,Ir),Ar.prototype.cloneProtected=function(a){Ir.prototype.cloneProtected.call(this,a),a.ie=this.ie,a.kc=this.kc,a.K=this.K,a.Dk=this.Dk,a.Zk=this.Zk,a.Qk=this.Qk,a.bj=this.bj,a.rk=this.rk,a.bg=this.bg,a.sf=this.sf,a.Cn=this.Cn,a.ve=this.ve},Ar.prototype.qb=function(a){a.classType===Ar?a.name.indexOf("Aggressive")===0?this.aggressiveOption=a:a.name.indexOf("Cycle")===0?this.cycleRemoveOption=a:a.name.indexOf("Init")===0?this.initializeOption=a:a.name.indexOf("Layer")===0?this.layeringOption=a:pe("Unknown enum value: "+a):Ir.prototype.qb.call(this,a)},Ar.prototype.createNetwork=function(){return new Dc(this)},Ar.prototype.doLayout=function(a){for(this.network===null&&(this.network=this.makeNetwork(a)),this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin),this.Iq=-1,this.Md=this.Hn=0,this.fl=this.Jn=this.kj=null,a=0;a<this.He.length;a++)this.He[a]=null;if(0<this.network.vertexes.count){for(this.network.Ko(),this.cycleRemoveOption!==Ip&&this.removeCycles(),a=this.network.vertexes.iterator;a.next();)a.value.layer=-1;for(this.Ia=-1,this.assignLayers(),a.reset();a.next();)this.Ia=Math.max(this.Ia,a.value.layer);this.cycleRemoveOption===Ip&&this.removeCycles(),a=this.network;for(var y=[],x=a.edges.iterator;x.next();){var E=x.value;E.valid=!1,y.push(E)}for(x=0;x<y.length;x++){E=y[x];var b=E.fromVertex,z=E.toVertex;if(!(E.valid||(b.node===null&&b.data===null||z.node===null&&z.data===null)&&b.layer===z.layer)){var tt=0,rt=0,ot=0,at=0;if(E.link!==null){if(rt=E.link,rt===null)continue;var At=b.node;if(tt=z.node,At===null||tt===null)continue;var ft=rt.fromNode;ot=rt.toNode;for(var pt=rt.fromPort;pt!==null&&!pt.Ed();)pt=pt.panel;for(rt=rt.toPort;rt!==null&&!rt.Ed();)rt=rt.panel;if(E.rev){at=ft;var xt=pt;ft=ot,pt=rt,ot=at,rt=xt}var Ct=b.focus;at=z.focus;var Mt=E.rev?z.bounds:b.bounds;xt=Rt.alloc(),At!==ft?Mt.w()&&ft.isVisible()?ft.actualBounds.w()?(Zh(ft,pt,Xi,xt),xt.x+=ft.actualBounds.x-Mt.x,xt.y+=ft.actualBounds.y-Mt.y):(Zh(ft,pt,Xi,xt),xt.w()||xt.assign(Ct)):xt.assign(Ct):Mt.w()?(Zh(ft,pt,Xi,xt),xt.w()||xt.assign(Ct)):xt.assign(Ct),ft=E.rev?b.bounds:z.bounds,At=Rt.alloc(),tt!==ot?ft.w()&&ot.isVisible()?ot.actualBounds.w()?(Zh(ot,rt,Xi,At),At.x+=ot.actualBounds.x-ft.x,At.y+=ot.actualBounds.y-ft.y):(Zh(ot,rt,Xi,At),At.w()||At.assign(at)):At.assign(at):ft.w()?(Zh(ot,rt,Xi,At),At.w()||At.assign(at)):At.assign(at),this.K===90||this.K===270?(tt=Math.round((xt.x-Ct.x)/this.kc),ot=xt.x,rt=Math.round((At.x-at.x)/this.kc),at=At.x):(tt=Math.round((xt.y-Ct.y)/this.kc),ot=xt.y,rt=Math.round((At.y-at.y)/this.kc),at=At.y),Rt.free(xt),Rt.free(At),E.portFromColOffset=tt,E.portFromPos=ot,E.portToColOffset=rt,E.portToPos=at}else E.portFromColOffset=0,E.portFromPos=0,E.portToColOffset=0,E.portToPos=0;if(xt=b.layer,At=z.layer,ft=0,Mt=E.link,Mt!==null){var Gt=Mt.fromPort,It=Mt.toPort;if(Gt!==null&&It!==null){var zt=Mt.fromNode;if(pt=Mt.toNode,zt!==null&&pt!==null){var Yt=im(this,!0),Xt=im(this,!1),$t=this.setsPortSpots?Yt:Mt.computeSpot(!0,Gt);Ct=this.setsPortSpots?Xt:Mt.computeSpot(!1,It);var de=Mt.isOrthogonal;$t.$c()&&$t.Hf(Xt)&&Ct.$c()&&Ct.Hf(Yt)?ft=0:(Yt=Mt.getLinkPoint(zt,Gt,$t,!0,de,pt,It,Rt.alloc()),Xt=Mt.getLinkDirection(zt,Gt,Yt,$t,!0,de,pt,It),Rt.free(Yt),$t.ys()||Xt!==Jw(this,E,!0)?this.setsPortSpots&&zt!==null&&zt.ports.count===1&&E.rev&&(ft+=1):ft+=1,$t=Mt.getLinkPoint(pt,It,Ct,!1,de,zt,Gt,Rt.alloc()),Mt=Mt.getLinkDirection(pt,It,$t,Ct,!1,de,zt,Gt),Rt.free($t),Ct.ys()||Mt!==Jw(this,E,!1)?this.setsPortSpots&&pt!==null&&pt.ports.count===1&&E.rev&&(ft+=2):ft+=2)}}}if(pt=ft,ft=pt===1||pt===3,(pt=pt===2||pt===3)&&(Ct=a.createVertex(),Ct.node=null,Ct.Dj=1,Ct.layer=xt,Ct.near=b,a.dh(Ct),b=a.Zj(b,Ct,E.link),b.valid=!1,b.rev=E.rev,b.portFromColOffset=tt,b.portToColOffset=0,b.portFromPos=ot,b.portToPos=0,b=Ct),Mt=1,ft&&Mt--,xt-At>Mt&&0<xt){for(E.valid=!1,Ct=a.createVertex(),Ct.node=null,Ct.Dj=2,Ct.layer=xt-1,a.dh(Ct),b=a.Zj(b,Ct,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=pt?0:tt,b.portToColOffset=0,b.portFromPos=pt?0:ot,b.portToPos=0,b=Ct,xt--;xt-At>Mt&&0<xt;)Ct=a.createVertex(),Ct.node=null,Ct.Dj=3,Ct.layer=xt-1,a.dh(Ct),b=a.Zj(b,Ct,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=0,b.portFromPos=0,b.portToPos=0,b=Ct,xt--;b=a.Zj(Ct,z,E.link),b.valid=!ft,ft&&(Ct.near=z),b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=rt,b.portFromPos=0,b.portToPos=at}else E.valid=!0}}for(a=this.tc=[],y=0;y<=this.Ia;y++)a[y]=0;for(y=this.network.vertexes.iterator;y.next();)y.value.index=-1;for(this.initializeIndices(),this.Iq=-1,x=this.Md=this.Hn=0;x<=this.Ia;x++)a[x]>a[this.Md]&&(this.Iq=a[x]-1,this.Md=x),a[x]<a[this.Hn]&&(this.Hn=x);for(this.fl=[],x=0;x<a.length;x++)this.fl[x]=[];for(y.reset();y.next();)a=y.value,this.fl[a.layer][a.index]=a;for(this.Ra=-1,a=0;a<=this.Ia;a++){for(y=Xg(this,a),x=0,E=this.tc[a],z=0;z<E;z++)b=y[z],x+=this.nodeMinColumnSpace(b,!0),b.column=x,x+=1,x+=this.nodeMinColumnSpace(b,!1);this.Ra=Math.max(this.Ra,x-1),Zg(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},Ar.prototype.linkMinLength=function(){return 1};function Mv(a){var y=a.fromVertex.node||a.fromVertex.data;return a=a.toVertex.node||a.toVertex.data,y===null&&a===null?8:y===null||a===null?4:1}Ar.prototype.nodeMinLayerSpace=function(a,y){return a.node===null&&a.data===null?0:this.K===90||this.K===270?y?a.focus.y+10:a.bounds.height-a.focus.y+10:y?a.focus.x+10:a.bounds.width-a.focus.x+10},Ar.prototype.nodeMinColumnSpace=function(a,y){if(a.node===null&&a.data===null)return 0;var x=y?a.ev:a.dv;return x!==null?x:(x=this.K,x===90||x===270?y?a.ev=a.focus.x/this.kc+1|0:a.dv=(a.bounds.width-a.focus.x)/this.kc+1|0:y?a.ev=a.focus.y/this.kc+1|0:a.dv=(a.bounds.height-a.focus.y)/this.kc+1|0)};function Ba(a){a.kj===null&&(a.kj=[]);for(var y=0,x=a.network.vertexes.iterator;x.next();){var E=x.value;a.kj[y]=E.layer,y++,a.kj[y]=E.column,y++,a.kj[y]=E.index,y++}return a.kj}function Cl(a,y){var x=0;for(a=a.network.vertexes.iterator;a.next();){var E=a.value;E.layer=y[x],x++,E.column=y[x],x++,E.index=y[x],x++}}function Kw(a,y,x){var E=Xg(a,y),b=a.tc[y];(a.Jn===null||a.Jn.length<b*b)&&(a.Jn=[]);for(var z=a.Jn,tt=0;tt<b;tt++){var rt=0,ot=E[tt],at=ot.near;if(at!==null&&at.layer===ot.layer)if(ot=at.index,ot>tt)for(var At=tt+1;At<ot;At++){var ft=E[At];ft.near===at&&ft.Dj===at.Dj||rt++}else for(At=tt-1;At>ot;At--)ft=E[At],ft.near===at&&ft.Dj===at.Dj||rt++;var pt;if(0<=x)for(ot=E[tt].sourceEdgesArrayAccess,at=0;at<ot.length;at++){var xt=ot[at];if(xt.valid&&xt.fromVertex.layer!==y)for(ft=xt.fromVertex.index,At=xt.portToPos,xt=xt.portFromPos,pt=at+1;pt<ot.length;pt++){var Ct=ot[pt];if(Ct.valid&&Ct.fromVertex.layer!==y){var Mt=Ct.fromVertex.index,Gt=Ct.portToPos;Ct=Ct.portFromPos,At<Gt&&(ft>Mt||ft===Mt&&xt>Ct)&&rt++,Gt<At&&(Mt>ft||Mt===ft&&Ct>xt)&&rt++}}}if(0>=x){for(ot=E[tt].destinationEdgesArrayAccess,at=0;at<ot.length;at++)if(xt=ot[at],xt.valid&&xt.toVertex.layer!==y)for(ft=xt.toVertex.index,At=xt.portToPos,xt=xt.portFromPos,pt=at+1;pt<ot.length;pt++)Ct=ot[pt],Ct.valid&&Ct.toVertex.layer!==y&&(Mt=Ct.toVertex.index,Gt=Ct.portToPos,Ct=Ct.portFromPos,xt<Ct&&(ft>Mt||ft===Mt&&At>Gt)&&rt++,Ct<xt&&(Mt>ft||Mt===ft&&Gt>At)&&rt++)}for(z[tt*b+tt]=rt,ot=tt+1;ot<b;ot++){var It=0,zt=0;if(0<=x){rt=E[tt].sourceEdgesArrayAccess;var Yt=E[ot].sourceEdgesArrayAccess;for(at=0;at<rt.length;at++)if(xt=rt[at],xt.valid&&xt.fromVertex.layer!==y)for(ft=xt.fromVertex.index,xt=xt.portFromPos,pt=0;pt<Yt.length;pt++)Ct=Yt[pt],Ct.valid&&Ct.fromVertex.layer!==y&&(Mt=Ct.fromVertex.index,Ct=Ct.portFromPos,(ft<Mt||ft===Mt&&xt<Ct)&&zt++,(Mt<ft||Mt===ft&&Ct<xt)&&It++)}if(0>=x){for(rt=E[tt].destinationEdgesArrayAccess,Yt=E[ot].destinationEdgesArrayAccess,at=0;at<rt.length;at++)if(xt=rt[at],xt.valid&&xt.toVertex.layer!==y)for(ft=xt.toVertex.index,At=xt.portToPos,pt=0;pt<Yt.length;pt++)Ct=Yt[pt],Ct.valid&&Ct.toVertex.layer!==y&&(Mt=Ct.toVertex.index,Gt=Ct.portToPos,(ft<Mt||ft===Mt&&At<Gt)&&zt++,(Mt<ft||Mt===ft&&Gt<At)&&It++)}z[tt*b+ot]=It,z[ot*b+tt]=zt}}return Zg(a,y,E),z}Ar.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=Kw(this,y,1),E=this.tc[y],b=0;b<E;b++)for(var z=b;z<E;z++)a+=x[b*E+z];return a};function tm(a){for(var y=0,x=0;x<=a.Ia;x++){for(var E=a,b=x,z=Xg(E,b),tt=E.tc[b],rt=0,ot=0;ot<tt;ot++){var at=z[ot].destinationEdgesArrayAccess;if(at!==null)for(var At=0;At<at.length;At++){var ft=at[At];if(ft.valid&&ft.toVertex.layer!==b){var pt=ft.fromVertex.column+ft.portFromColOffset,xt=ft.toVertex.column+ft.portToColOffset;rt+=(Math.abs(pt-xt)+1)*Mv(ft)}}}Zg(E,b,z),y+=rt}return y}Ar.prototype.normalize=function(){var a=1/0;this.Ra=-1;for(var y=this.network.vertexes.iterator;y.next();){var x=y.value;a=Math.min(a,x.column-this.nodeMinColumnSpace(x,!0)),this.Ra=Math.max(this.Ra,x.column+this.nodeMinColumnSpace(x,!1))}for(y.reset();y.next();)y.value.column-=a;this.Ra-=a};function kv(a,y,x){for(var E=Xg(a,y),b=a.tc[y],z=[],tt=0;tt<b;tt++){var rt=E[tt],ot=null;0>=x&&(ot=rt.sourceEdgesArrayAccess);var at=null;0<=x&&(at=rt.destinationEdgesArrayAccess);var At=0,ft=0,pt=rt.near;if(pt!==null&&pt.layer===rt.layer&&(At+=pt.column-1,ft++),ot!==null)for(pt=0;pt<ot.length;pt++){rt=ot[pt];var xt=rt.fromVertex;rt.valid&&!rt.rev&&xt.layer!==y&&(At+=xt.column,ft++)}if(at!==null)for(ot=0;ot<at.length;ot++)rt=at[ot],pt=rt.toVertex,rt.valid&&!rt.rev&&pt.layer!==y&&(At+=pt.column,ft++);z[tt]=ft===0?-1:At/ft}return Zg(a,y,E),z}function zw(a,y,x){for(var E=Xg(a,y),b=a.tc[y],z=[],tt=0;tt<b;tt++){var rt=E[tt],ot=null;0>=x&&(ot=rt.sourceEdgesArrayAccess);var at=null;0<=x&&(at=rt.destinationEdgesArrayAccess);var At=0,ft=[],pt=rt.near;if(pt!==null&&pt.layer===rt.layer&&(ft[At]=pt.column-1,At++),rt=void 0,ot!==null)for(pt=0;pt<ot.length;pt++){rt=ot[pt];var xt=rt.fromVertex;rt.valid&&!rt.rev&&xt.layer!==y&&(ft[At]=xt.column+rt.portFromColOffset,At++)}if(at!==null)for(ot=0;ot<at.length;ot++)rt=at[ot],pt=rt.toVertex,rt.valid&&!rt.rev&&pt.layer!==y&&(ft[At]=pt.column+rt.portToColOffset,At++);At===0?z[tt]=-1:(ft.sort(function(Ct,Mt){return Ct-Mt}),at=At>>1,z[tt]=At&1?ft[at]:ft[at-1]+ft[at]>>1)}return Zg(a,y,E),z}function Up(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var tt=y.destinationEdges;tt.next();){var rt=tt.value,ot=rt.toVertex,at=y.layer-ot.layer;rt=a.linkMinLength(rt),at===rt&&Up(a,ot,x,E,b,z)}if(z)for(tt=y.sourceEdges;tt.next();)rt=tt.value,ot=rt.fromVertex,at=ot.layer-y.layer,rt=a.linkMinLength(rt),at===rt&&Up(a,ot,x,E,b,z)}}function bv(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var tt=y.destinationEdges;tt.next();)bv(a,tt.value.toVertex,x,E,b,z);if(z)for(y=y.sourceEdges;y.next();)bv(a,y.value.fromVertex,x,E,b,z)}}Ar.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case Qv:a=this.network;var y=0,x=a.vertexes.count-1,E=[];E.length=x+1;for(var b=a.vertexes.iterator;b.next();)b.value.valid=!0;for(;O1(a)!==null;){for(b=Vw(a);b!==null;)E[x]=b,x--,b.valid=!1,b=Vw(a);for(b=Ww(a);b!==null;)E[y]=b,y++,b.valid=!1,b=Ww(a);b=null;for(var z=0,tt=this.network.vertexes.iterator;tt.next();){var rt=tt.value;if(rt.valid){for(var ot=0,at=rt.destinationEdges;at.next();)at.value.toVertex.valid&&ot++;at=0;for(var At=rt.sourceEdges;At.next();)At.value.fromVertex.valid&&at++;(b===null||z<ot-at)&&(b=rt,z=ot-at)}}b!==null&&(E[y]=b,y++,b.valid=!1)}for(y=0;y<a.vertexes.count;y++)E[y].index=y;for(E=a.edges.iterator;E.next();)y=E.value,y.fromVertex.index>y.toVertex.index&&(a.gm(y),y.rev=!0);break;case rm:for(E=this.network.vertexes.iterator;E.next();)a=E.value,a.Ll=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;for(this.Kn=0,E.reset();E.next();)y=E.value,y.sourceEdges.count===0&&Tv(this,y);for(E.reset();E.next();)y=E.value,y.Ll===-1&&Tv(this,y);for(a.reset();a.next();)E=a.value,E.forest||(y=E.fromVertex,x=y.finish,b=E.toVertex,z=b.finish,b.Ll<y.Ll&&x<z&&(this.network.gm(E),E.rev=!0));break;case Ip:for(a=this.network,y=a.vertexes.iterator,E=1/0;y.next();)E=Math.min(E,y.value.layer);if(1/0>E){if(0>E)for(y.reset();y.next();)y.value.layer-=E;for(E=[],y.reset();y.next();)x=y.value,b=E[x.layer],b===void 0?E[x.layer]=[x]:b.push(x);for(x=y=0;x<E.length;x++)if(b=E[x],!b||b.length===0)y++;else if(0<x)for(z=0;z<b.length;z++)b[z].layer-=y;for(E=a.edges.iterator;E.next();)y=E.value,y.fromVertex.layer<y.toVertex.layer&&(a.gm(y),y.rev=!0)}}};function O1(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function Vw(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,E=y.destinationEdges;E.next();)if(E.value.toVertex.valid){x=!1;break}if(x)return y}}return null}function Ww(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,E=y.sourceEdges;E.next();)if(E.value.fromVertex.valid){x=!1;break}if(x)return y}}return null}function Tv(a,y){y.Ll=a.Kn,a.Kn++;for(var x=y.destinationEdges;x.next();){var E=x.value,b=E.toVertex;b.Ll===-1&&(E.forest=!0,Tv(a,b))}y.finish=a.Kn,a.Kn++}Ar.prototype.assignLayers=function(){switch(this.Zk){case Uv:_w(this);break;case Iv:for(var a,y=this.network.vertexes.iterator;y.next();)a=Xw(this,y.value),this.Ia=Math.max(a,this.Ia);for(y.reset();y.next();)a=y.value,a.layer=this.Ia-a.layer;break;default:case om:for(_w(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&Zw(this,a);for(a=1/0,y.reset();y.next();)a=Math.min(a,y.value.layer);for(this.Ia=-1,y.reset();y.next();){var x=y.value;x.layer-=a,this.Ia=Math.max(this.Ia,x.layer)}}};function _w(a){for(var y=a.network.vertexes.iterator;y.next();){var x=Yw(a,y.value);a.Ia=Math.max(x,a.Ia)}}function Yw(a,y){var x=0;if(y.layer===-1){for(var E=y.destinationEdges;E.next();){var b=E.value,z=b.toVertex;b=a.linkMinLength(b),x=Math.max(x,Yw(a,z)+b)}y.layer=x}else x=y.layer;return x}function Xw(a,y){var x=0;if(y.layer===-1){for(var E=y.sourceEdges;E.next();){var b=E.value,z=b.fromVertex;b=a.linkMinLength(b),x=Math.max(x,Xw(a,z)+b)}y.layer=x}else x=y.layer;return x}function Zw(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)Zw(a,x.value.toVertex);for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(var E=y.sourceEdgesArrayAccess,b=E.length,z=0;z<b;z++){var tt=E[z],rt=tt.fromVertex,ot=tt.toVertex;tt=a.linkMinLength(tt),rt.layer-ot.layer>tt&&Up(a,rt,0,-1,!0,!1)}for(Up(a,y,1,-1,!0,!0);y.component!==0;){for(z=0,E=1/0,rt=0,ot=null,tt=a.network.vertexes.iterator;tt.next();){var at=tt.value;if(at.component===1){var At=0,ft=!1,pt=at.sourceEdgesArrayAccess;b=pt.length;for(var xt=0;xt<b;xt++){var Ct=pt[xt],Mt=Ct.fromVertex;At+=1,Mt.component!==1&&(z+=1,Mt=Mt.layer-at.layer,Ct=a.linkMinLength(Ct),E=Math.min(E,Mt-Ct))}for(pt=at.destinationEdgesArrayAccess,b=pt.length,xt=0;xt<b;xt++)Ct=pt[xt].toVertex,--At,Ct.component!==1?--z:ft=!0;(ot===null||At<rt)&&!ft&&(ot=at,rt=At)}}if(0<z){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer+=E);y.component=0}else ot.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(Up(a,y,1,-1,!0,!1);y.component!==0;){for(E=0,b=1/0,z=0,rt=null,ot=a.network.vertexes.iterator;ot.next();)if(tt=ot.value,tt.component===1){for(at=0,At=!1,pt=tt.sourceEdgesArrayAccess,ft=pt.length,xt=0;xt<ft;xt++)Ct=pt[xt].fromVertex,at+=1,Ct.component!==1?E+=1:At=!0;for(pt=tt.destinationEdgesArrayAccess,ft=pt.length,xt=0;xt<ft;xt++)Ct=pt[xt],Mt=Ct.toVertex,--at,Mt.component!==1&&(--E,Mt=tt.layer-Mt.layer,Ct=a.linkMinLength(Ct),b=Math.min(b,Mt-Ct));(rt===null||at>z)&&!At&&(rt=tt,z=at)}if(0>E){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer-=b);y.component=0}else rt.component=0}}}function Jw(a,y,x){return a.K===90?x&&!y.rev||!x&&y.rev?270:90:a.K===180?x&&!y.rev||!x&&y.rev?0:180:a.K===270?x&&!y.rev||!x&&y.rev?90:270:x&&!y.rev||!x&&y.rev?180:0}Ar.prototype.initializeIndices=function(){switch(this.Qk){default:case Hv:for(var a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;y.index=this.tc[x],this.tc[x]++}break;case sm:for(a=this.network.vertexes.iterator,y=this.Ia;0<=y;y--)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&qw(this,x);break;case Dv:for(a=this.network.vertexes.iterator,y=0;y<=this.Ia;y++)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&$w(this,x)}};function qw(a,y){var x=y.layer;for(y.index=a.tc[x],a.tc[x]++,y=y.destinationEdgesArrayAccess,x=!0;x;){x=!1;for(var E=0;E<y.length-1;E++){var b=y[E],z=y[E+1];b.portFromColOffset>z.portFromColOffset&&(x=!0,y[E]=z,y[E+1]=b)}}for(x=0;x<y.length;x++)E=y[x],E.valid&&(E=E.toVertex,E.index===-1&&qw(a,E))}function $w(a,y){var x=y.layer;y.index=a.tc[x],a.tc[x]++,y=y.sourceEdgesArrayAccess;for(var E=!0;E;)for(E=!1,x=0;x<y.length-1;x++){var b=y[x],z=y[x+1];b.portToColOffset>z.portToColOffset&&(E=!0,y[x]=z,y[x+1]=b)}for(x=0;x<y.length;x++)E=y[x],E.valid&&(E=E.fromVertex,E.index===-1&&$w(a,E))}Ar.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=Ba(this),x,E;for(x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)em(this,E,1),Nl(this,E,1);var b=this.countCrossings();for(b<a&&(a=b,y=Ba(this)),E=this.Ia;0<=E;E--)em(this,E,-1),Nl(this,E,-1);b=this.countCrossings(),b<a&&(a=b,y=Ba(this))}for(Cl(this,y),x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)em(this,E,0),Nl(this,E,0);for(b=this.countCrossings(),b<a&&(a=b,y=Ba(this)),E=this.Ia;0<=E;E--)em(this,E,0),Nl(this,E,0);b=this.countCrossings(),b<a&&(a=b,y=Ba(this))}Cl(this,y);var z,tt,rt;switch(this.rk){case Ov:break;case Rv:for(rt=a+1;(E=this.countCrossings())<rt;)for(rt=E,x=this.Ia;0<=x;x--)for(tt=0;tt<=x;tt++){for(z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Nl(this,E,-1)||z;for(b=this.countCrossings(),b>=a?Cl(this,y):(a=b,y=Ba(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Nl(this,E,1)||z;for(b=this.countCrossings(),b>=a?Cl(this,y):(a=b,y=Ba(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Nl(this,E,1)||z;for(b>=a?Cl(this,y):(a=b,y=Ba(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Nl(this,E,-1)||z;for(b>=a?Cl(this,y):(a=b,y=Ba(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Nl(this,E,0)||z;for(b>=a?Cl(this,y):(a=b,y=Ba(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Nl(this,E,0)||z;b>=a?Cl(this,y):(a=b,y=Ba(this))}break;default:case am:for(x=this.Ia,tt=0,rt=a+1;(E=this.countCrossings())<rt;){for(rt=E,z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Nl(this,E,-1)||z;for(b=this.countCrossings(),b>=a?Cl(this,y):(a=b,y=Ba(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Nl(this,E,1)||z;for(b=this.countCrossings(),b>=a?Cl(this,y):(a=b,y=Ba(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Nl(this,E,1)||z;for(b>=a?Cl(this,y):(a=b,y=Ba(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Nl(this,E,-1)||z;for(b>=a?Cl(this,y):(a=b,y=Ba(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Nl(this,E,0)||z;for(b>=a?Cl(this,y):(a=b,y=Ba(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Nl(this,E,0)||z;b>=a?Cl(this,y):(a=b,y=Ba(this))}}Cl(this,y)};function em(a,y,x){var E=Xg(a,y),b=a.tc[y],z=zw(a,y,x),tt=kv(a,y,x);for(x=0;x<b;x++)tt[x]===-1&&(tt[x]=E[x].column),z[x]===-1&&(z[x]=E[x].column);for(var rt=!0,ot;rt;)for(rt=!1,x=0;x<b-1;x++)(z[x+1]<z[x]||z[x+1]===z[x]&&tt[x+1]<tt[x])&&(rt=!0,ot=z[x],z[x]=z[x+1],z[x+1]=ot,ot=tt[x],tt[x]=tt[x+1],tt[x+1]=ot,ot=E[x],E[x]=E[x+1],E[x+1]=ot);for(x=z=0;x<b;x++)ot=E[x],ot.index=x,z+=a.nodeMinColumnSpace(ot,!0),ot.column=z,z+=1,z+=a.nodeMinColumnSpace(ot,!1);Zg(a,y,E)}function Nl(a,y,x){var E=Xg(a,y),b=a.tc[y];x=Kw(a,y,x);var z,tt=[];for(z=0;z<b;z++)tt[z]=-1;var rt=[];for(z=0;z<b;z++)rt[z]=-1;for(var ot=!1,at=!0;at;)for(at=!1,z=0;z<b-1;z++){var At=x[E[z].index*b+E[z+1].index],ft=x[E[z+1].index*b+E[z].index],pt=0,xt=0,Ct=E[z].column,Mt=E[z+1].column,Gt=a.nodeMinColumnSpace(E[z],!0),It=a.nodeMinColumnSpace(E[z],!1),zt=a.nodeMinColumnSpace(E[z+1],!0),Yt=a.nodeMinColumnSpace(E[z+1],!1);Gt=Ct-Gt+zt,It=Mt-It+Yt;var Xt=E[z].sourceEdges.iterator;for(Xt.reset();Xt.next();)if(zt=Xt.value,Yt=zt.fromVertex,zt.valid&&Yt.layer===y){for(zt=0;E[zt]!==Yt;)zt++;zt<z&&(pt+=2*(z-zt),xt+=2*(z+1-zt)),zt===z+1&&(pt+=1),zt>z+1&&(pt+=4*(zt-z),xt+=4*(zt-(z+1)))}for(Xt=E[z].destinationEdges.iterator,Xt.reset();Xt.next();)if(zt=Xt.value,Yt=zt.toVertex,zt.valid&&Yt.layer===y){for(zt=0;E[zt]!==Yt;)zt++;zt===z+1&&(xt+=1)}for(Xt=E[z+1].sourceEdges.iterator,Xt.reset();Xt.next();)if(zt=Xt.value,Yt=zt.fromVertex,zt.valid&&Yt.layer===y){for(zt=0;E[zt]!==Yt;)zt++;zt<z&&(pt+=2*(z+1-zt),xt+=2*(z-zt)),zt===z&&(xt+=1),zt>z+1&&(pt+=4*(zt-(z+1)),xt+=4*(zt-z))}for(Xt=E[z+1].destinationEdges.iterator,Xt.reset();Xt.next();)if(zt=Xt.value,Yt=zt.toVertex,zt.valid&&Yt.layer===y){for(zt=0;E[zt]!==Yt;)zt++;zt===z&&(pt+=1)}zt=Yt=0,Xt=tt[E[z].index];var $t=rt[E[z].index],de=tt[E[z+1].index],An=rt[E[z+1].index];Xt!==-1&&(Yt+=Math.abs(Xt-Ct),zt+=Math.abs(Xt-It)),$t!==-1&&(Yt+=Math.abs($t-Ct),zt+=Math.abs($t-It)),de!==-1&&(Yt+=Math.abs(de-Mt),zt+=Math.abs(de-Gt)),An!==-1&&(Yt+=Math.abs(An-Mt),zt+=Math.abs(An-Gt)),(xt<pt-.5||xt===pt&&ft<At-.5||xt===pt&&ft===At&&zt<Yt-.5)&&(at=ot=!0,E[z].column=It,E[z+1].column=Gt,At=E[z],E[z]=E[z+1],E[z+1]=At)}for(z=0;z<b;z++)E[z].index=z;return Zg(a,y,E),ot}Ar.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&_1)!==0;if(1e3<this.network.edges.count&&y&&(a=!1),a){var x=[];for(y=0;y<=this.Ia;y++)x[y]=0;for(var E,b=this.network.vertexes.iterator;b.next();){var z=b.value;y=z.layer,E=z.column,z=this.nodeMinColumnSpace(z,!1),x[y]=Math.max(x[y],E+z)}for(b.reset();b.next();)z=b.value,y=z.layer,E=z.column,z.column=(8*(this.Ra-x[y])>>1)+8*E;this.Ra*=8}if(this.bg&2)for(x=!0;x;){for(x=!1,y=this.Md+1;y<=this.Ia;y++)x=Ic(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Ic(this,y,-1)||x;x=Ic(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)Nv(this,y,1);for(y=this.Md-1;0<=y;y--)Nv(this,y,-1);Nv(this,this.Md,0)}if(a&&(t1(this,-1),t1(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=Ic(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Ic(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Ic(this,y,0)||x}}else K1(this)};function Ic(a,y,x){for(var E=!1;R1(a,y,x);)E=!0;return E}function R1(a,y,x){var E,b=Xg(a,y),z=a.tc[y],tt=kv(a,y,-1);if(0<x)for(E=0;E<z;E++)tt[E]=-1;var rt=kv(a,y,1);if(0>x)for(E=0;E<z;E++)rt[E]=-1;for(var ot=!1,at=!0;at;)for(at=!1,E=0;E<z;E++){var At=b[E].column,ft=a.nodeMinColumnSpace(b[E],!0),pt=a.nodeMinColumnSpace(b[E],!1),xt=0;0>E-1||At-b[E-1].column-1>ft+a.nodeMinColumnSpace(b[E-1],!1)?xt=At-1:xt=At,ft=E+1>=z||b[E+1].column-At-1>pt+a.nodeMinColumnSpace(b[E+1],!0)?At+1:At;var Ct=pt=0,Mt=0;if(0>=x)for(var Gt=b[E].sourceEdges.iterator;Gt.next();){var It=Gt.value,zt=It.fromVertex;if(It.valid&&zt.layer!==y){var Yt=Mv(It),Xt=It.portFromColOffset;It=It.portToColOffset,zt=zt.column,pt+=(Math.abs(At+It-(zt+Xt))+1)*Yt,Ct+=(Math.abs(xt+It-(zt+Xt))+1)*Yt,Mt+=(Math.abs(ft+It-(zt+Xt))+1)*Yt}}if(0<=x)for(Gt=b[E].destinationEdges.iterator;Gt.next();)It=Gt.value,zt=It.toVertex,It.valid&&zt.layer!==y&&(Yt=Mv(It),Xt=It.portFromColOffset,It=It.portToColOffset,zt=zt.column,pt+=(Math.abs(At+Xt-(zt+It))+1)*Yt,Ct+=(Math.abs(xt+Xt-(zt+It))+1)*Yt,Mt+=(Math.abs(ft+Xt-(zt+It))+1)*Yt);It=Xt=Yt=0,Gt=tt[b[E].index],zt=rt[b[E].index],Gt!==-1&&(Yt+=Math.abs(Gt-At),Xt+=Math.abs(Gt-xt),It+=Math.abs(Gt-ft)),zt!==-1&&(Yt+=Math.abs(zt-At),Xt+=Math.abs(zt-xt),It+=Math.abs(zt-ft)),Ct<pt||Ct===pt&&Xt<Yt?(at=ot=!0,b[E].column=xt):(Mt<pt||Mt===pt&&It<Yt)&&(at=ot=!0,b[E].column=ft)}return Zg(a,y,b),a.normalize(),ot}function Nv(a,y,x){var E=Xg(a,y),b=a.tc[y],z=zw(a,y,x),tt=[];for(x=0;x<b;x++)tt[x]=z[x];for(z=!0;z;)for(z=!1,x=0;x<b;x++){var rt=E[x].column,ot=a.nodeMinColumnSpace(E[x],!0),at=a.nodeMinColumnSpace(E[x],!1),At=0;if(tt[x]===-1)if(x===0&&x===b-1)At=rt;else if(x===0){var ft=E[x+1].column;ft-rt===at+a.nodeMinColumnSpace(E[x+1],!0)?At=rt-1:At=rt}else x===b-1?(ft=E[x-1].column,At=rt-ft===ot+a.nodeMinColumnSpace(E[x-1],!1)?rt+1:rt):(ft=E[x-1].column,ot=ft+a.nodeMinColumnSpace(E[x-1],!1)+ot+1,ft=E[x+1].column,at=ft-a.nodeMinColumnSpace(E[x+1],!0)-at-1,At=(ot+at)/2|0);else x===0&&x===b-1?At=tt[x]:x===0?(ft=E[x+1].column,at=ft-a.nodeMinColumnSpace(E[x+1],!0)-at-1,At=Math.min(tt[x],at)):x===b-1?(ft=E[x-1].column,ot=ft+a.nodeMinColumnSpace(E[x-1],!1)+ot+1,At=Math.max(tt[x],ot)):(ft=E[x-1].column,ot=ft+a.nodeMinColumnSpace(E[x-1],!1)+ot+1,ft=E[x+1].column,at=ft-a.nodeMinColumnSpace(E[x+1],!0)-at-1,ot<tt[x]&&tt[x]<at?At=tt[x]:ot>=tt[x]?At=ot:at<=tt[x]&&(At=at));At!==rt&&(z=!0,E[x].column=At)}Zg(a,y,E),a.normalize()}function G1(a,y){for(var x=!0,E=a.network.vertexes.iterator;E.next();){var b=E.value,z=a.nodeMinColumnSpace(b,!0),tt=a.nodeMinColumnSpace(b,!1);if(b.column-z<=y&&b.column+tt>=y){x=!1;break}}if(a=!1,x)for(E.reset();E.next();)x=E.value,x.column>y&&(--x.column,a=!0);return a}function j1(a,y){var x=y+1,E,b=[],z=[];for(E=0;E<=a.Ia;E++)b[E]=!1,z[E]=!1;for(var tt=a.network.vertexes.iterator;tt.next();){E=tt.value;var rt=E.column-a.nodeMinColumnSpace(E,!0),ot=E.column+a.nodeMinColumnSpace(E,!1);rt<=y&&ot>=y&&(b[E.layer]=!0),rt<=x&&ot>=x&&(z[E.layer]=!0)}for(rt=!0,x=!1,E=0;E<=a.Ia;E++)rt=rt&&!(b[E]&&z[E]);if(rt)for(tt.reset();tt.next();)a=tt.value,a.column>y&&(--a.column,x=!0);return x}function t1(a,y){for(var x=0;x<=a.Ra;x++)for(;G1(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;j1(a,x););a.normalize();var E;if(0<y)for(x=0;x<=a.Ra;x++){var b=Ba(a),z=tm(a);for(E=z+1;z<E;){E=z,e1(a,x,1);var tt=tm(a);tt>z?Cl(a,b):tt<z&&(z=tt,b=Ba(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(b=Ba(a),z=tm(a),E=z+1;z<E;)E=z,e1(a,x,-1),tt=tm(a),tt>z?Cl(a,b):tt<z&&(z=tt,b=Ba(a));a.normalize()}function e1(a,y,x){a.le=0;for(var E=a.network.vertexes.iterator;E.next();)E.value.component=-1;if(0<x)for(E.reset();E.next();){var b=E.value;b.column-a.nodeMinColumnSpace(b,!0)<=y&&(b.component=a.le)}if(0>x)for(E.reset();E.next();)b=E.value,b.column+a.nodeMinColumnSpace(b,!1)>=y&&(b.component=a.le);for(a.le++,E.reset();E.next();)y=E.value,y.component===-1&&(bv(a,y,a.le,-1,!0,!0),a.le++);var z;for(y=[],z=0;z<a.le*a.le;z++)y[z]=!1;for(b=[],z=0;z<(a.Ia+1)*(a.Ra+1);z++)b[z]=-1;for(E.reset();E.next();){z=E.value;for(var tt=z.layer,rt=Math.max(0,z.column-a.nodeMinColumnSpace(z,!0)),ot=Math.min(a.Ra,z.column+a.nodeMinColumnSpace(z,!1));rt<=ot;rt++)b[tt*(a.Ra+1)+rt]=z.component}for(z=0;z<=a.Ia;z++){if(0<x)for(tt=0;tt<a.Ra;tt++)b[z*(a.Ra+1)+tt]!==-1&&b[z*(a.Ra+1)+tt+1]!==-1&&b[z*(a.Ra+1)+tt]!==b[z*(a.Ra+1)+tt+1]&&(y[b[z*(a.Ra+1)+tt]*a.le+b[z*(a.Ra+1)+tt+1]]=!0);if(0>x)for(tt=a.Ra;0<tt;tt--)b[z*(a.Ra+1)+tt]!==-1&&b[z*(a.Ra+1)+tt-1]!==-1&&b[z*(a.Ra+1)+tt]!==b[z*(a.Ra+1)+tt-1]&&(y[b[z*(a.Ra+1)+tt]*a.le+b[z*(a.Ra+1)+tt-1]]=!0)}for(b=[],z=0;z<a.le;z++)b[z]=!0;for(tt=[],tt.push(0);tt.length!==0;)if(ot=tt[tt.length-1],tt.pop(),b[ot])for(b[ot]=!1,z=0;z<a.le;z++)y[ot*a.le+z]&&tt.splice(0,0,z);if(0<x)for(E.reset();E.next();)a=E.value,b[a.component]&&--a.column;if(0>x)for(E.reset();E.next();)x=E.value,b[x.component]&&(x.column+=1)}function K1(a){for(var y=Ce(),x=a.fl.length,E=0;E<=x;E++)y[E]=[];for(E=a.network.vertexes.iterator;E.next();){var b=E.value;y[x-b.layer][b.index]=b}x=new Ye,z1(y,x);var z=null,tt=null,rt=null,ot=null,at=(a.ve&1)!==0,At=(a.ve&2)!==0,ft=(a.ve&4)!==0,pt=(a.ve&8)!==0;for(at&&(a.verticalAlignment(y,x,!0),z=nm(a,y,!0,!1)),y.reverse(),ft&&(a.verticalAlignment(y,x,!1),rt=nm(a,y,!1,!1)),E=Dn(y),b=E.next();!b.done;b=E.next())b.value.reverse();pt&&(a.verticalAlignment(y,x,!1),ot=nm(a,y,!1,!0)),y.reverse(),At&&(a.verticalAlignment(y,x,!0),tt=nm(a,y,!0,!0)),Oe(y),a.u(z,tt,rt,ot),a.network.vertexes.each(function(xt){var Ct=Ce();at&&Ct.push(z.get(xt)),At&&Ct.push(tt.get(xt)),ft&&Ct.push(rt.get(xt)),pt&&Ct.push(ot.get(xt)),Ct.sort(function(Gt,It){return Gt-It});var Mt=Ct.length;Mt=(Ct[Math.floor((Mt-1)/2)]+Ct[Math.ceil((Mt-1)/2)])/2,Oe(Ct),xt.zc=Mt})}function z1(a,y){for(var x=a.length,E=1;E<x-1;E++)for(var b=0,z=0,tt=a[E],rt=a[E+1],ot=0;z<rt.length;ot++){var at=rt[ot];t:{if(at.node===null){var At=Gv(at);if(0<At.length){At=At[0].node===null;break t}}At=!1}var ft=At;if(ot===rt.length-1||ft){for(At=tt.length-1,ft&&(At=Gv(at)[0].index);z<=ot;){if(at=rt[z],!at.bo){ft=[];for(var pt=Dn(at.sourceEdgesArrayAccess),xt=pt.next();!xt.done;xt=pt.next())xt=xt.value,xt.valid&&ft.push(xt);at.bo=ft}for(at=Dn(at.bo),ft=at.next();!ft.done;ft=at.next())ft=ft.value,pt=ft.fromVertex.index,(pt<b||pt>At)&&y.add(ft);z++}b=At}}}Ar.prototype.verticalAlignment=function(a,y,x){V1(a),a=Dn(a);for(var E=a.next();!E.done;E=a.next()){var b=-1;E=Dn(E.value);for(var z=E.next();!z.done;z=E.next()){z=z.value;var tt=x?Gv(z):Y1(z),rt=tt.length;if(0<rt){tt.sort(function(ft,pt){return ft.vi-pt.vi});var ot=(rt-1)/2;for(rt=Math.floor(ot),ot=Math.ceil(ot);rt<=ot;rt++)if(z.align===z){var at=tt[rt],At=void 0;At=x?lm(at,z):lm(z,at),!y.contains(At)&&b<at.vi&&(at.align=z,z.root=at.root,z.align=at.root,b=at.vi)}}}}};function V1(a){for(var y=0;y<a.length;y++)for(var x=a[y],E=0;E<x.length;E++){var b=x[E];b.root=b,b.align=b,b.Tz=y,b.vi=E}}function nm(a,y,x,E){for(var b=a.K===90||a.K===270,z=Dn(y),tt=z.next();!tt.done;tt=z.next()){var rt=Dn(tt.value);for(tt=rt.next();!tt.done;tt=rt.next())tt=tt.value,tt.sd=tt,tt.shift=1/0,tt.zc=NaN,tt.qg=0}for(tt=a.K===90||a.K===270,z=Dn(y),rt=z.next();!rt.done;rt=z.next()){rt=Dn(rt.value);for(var ot=rt.next();!ot.done;ot=rt.next())if(ot=ot.value,ot.root===ot){for(var at=0,At=ot;At.align!==ot;){var ft=At.align,pt=tt?At.width:At.height,xt=tt?ft.width:ft.height;if(x){var Ct=lm(At,ft),Mt=Ct.portFromPos,Gt=Ct.portToPos;Ct.link!==null&&(At.node&&At.node!==Ct.link.fromNode&&(Mt=tt?At.focusX:At.focusY),ft.node&&ft.node!==Ct.link.toNode&&(Gt=tt?ft.focusX:ft.focusY))}else Ct=lm(ft,At),Mt=Ct.portToPos,Gt=Ct.portFromPos,Ct.link!==null&&(At.node&&At.node!==Ct.link.toNode&&(Mt=tt?At.focusX:At.focusY),ft.node&&ft.node!==Ct.link.fromNode&&(Gt=tt?ft.focusX:ft.focusY));pt=E?At.qg+(pt-Mt)-(xt-Gt):At.qg+Mt-Gt,ft.qg=pt,at=Math.min(at,pt),At=At.align}At=ot;do At.qg=At.qg-at,At=At.align;while(At!==ot)}}for(x=Dn(y),tt=x.next();!tt.done;tt=x.next())for(z=Dn(tt.value),tt=z.next();!tt.done;tt=z.next())tt=tt.value,tt.root===tt&&n1(a,tt,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(tt=y[x][0],tt.sd===tt)){tt.sd.shift===1/0&&(tt.sd.shift=0),tt=x,rt=0;do{for(z=y[tt][rt];z.align!==z.root;)z=z.align,tt++,0<z.vi&&(rt=i1(z,y),rt.sd.shift=Math.min(rt.sd.shift,z.sd.shift+z.zc+z.qg-(rt.zc+rt.qg+(b?rt.width:rt.height)+a.columnSpacing)));rt=z.vi+1}while(tt<y.length&&rt<y[tt].length&&z.sd===y[tt][rt].sd)}for(a=new Rn,y=Dn(y),tt=y.next();!tt.done;tt=y.next())for(x=Dn(tt.value),tt=x.next();!tt.done;tt=x.next())tt=tt.value,tt.zc=tt.zc+tt.sd.shift+tt.qg,z=b?tt.width:tt.height,a.add(tt,E?-tt.zc-z:tt.zc);return a}function n1(a,y,x){if(isNaN(y.zc)){y.zc=0;var E=y;do{if(0<E.vi){var b=i1(E,x),z=b.root;n1(a,z,x),y.sd===y&&(y.sd=z.sd);var tt=a.K===90||a.K===270?b.width:b.height;y.sd===z.sd&&(y.zc=Math.max(y.zc,z.zc+b.qg+tt-E.qg+a.columnSpacing))}E=E.align}while(E!==y);for(;E.align!==y;)E=E.align,E.zc=y.zc,E.sd=y.sd}}function i1(a,y){var x=a.Tz;return a=a.vi,1>a&&pe("Could not determine previous vertex in layer"),y[x][a-1]}Ar.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var E=Ce(),b=Ce(),z=1/0,tt=0;4>tt;tt++)if(y[tt]){var rt=W1(this,y[tt],E,b,tt);rt<z&&(x=tt,z=rt)}for(z={},tt=0;4>tt;z={delta:z.delta},tt++)y[tt]&&(z.delta=tt===0||tt===2?E[x]-E[tt]:b[x]-b[tt],z.delta!==0&&y[tt].each(function(ot){return function(at){at.value+=ot.delta}}(z)));Oe(E),Oe(b)};function W1(a,y,x,E,b){if(!y||y.count===0)return x[b]=0,E[b]=0,1/0;var z=1/0,tt=-1/0;return y.each(function(rt){var ot=rt.key;rt=rt.value,ot=a.K===90||a.K===270?ot.width:ot.height,rt<z&&(z=rt),rt+ot>tt&&(tt=rt+ot)}),x[b]=z,E[b]=tt,tt-z}Ar.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=im(this,!0),y=im(this,!1),x=this.network.edges.iterator;x.next();){var E=x.value.link;E!==null&&(E.fromSpot=a,E.toSpot=y)}this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()};function im(a,y){return a.K===270?y?As:Qs:a.K===90?y?Qs:As:a.K===180?y?io:jo:y?jo:io}Ar.prototype.commitNodes=function(){this.he=[],this.Ld=[],this.Kd=[],this.Ta=[];for(var a=0;a<=this.Ia;a++)this.he[a]=0,this.Ld[a]=0,this.Kd[a]=0,this.Ta[a]=0;for(a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;this.he[x]=Math.max(this.he[x],this.nodeMinLayerSpace(y,!0)),this.Ld[x]=Math.max(this.Ld[x],this.nodeMinLayerSpace(y,!1))}y=0,x=this.ie;for(var E=0;E<=this.Ia;E++){var b=x;0>=this.he[E]+this.Ld[E]&&(b=0),0<E&&(y+=b/2),this.K===90||this.K===0?(y+=this.Ld[E],this.Kd[E]=y,y+=this.he[E]):(y+=this.he[E],this.Kd[E]=y,y+=this.Ld[E]),E<this.Ia&&(y+=b/2),this.Ta[E]=y}for(x=y,y=this.arrangementOrigin,E=0;E<=this.Ia;E++)this.K===270?this.Kd[E]=y.y+this.Kd[E]:this.K===90?(this.Kd[E]=y.y+x-this.Kd[E],this.Ta[E]=x-this.Ta[E]):this.K===180?this.Kd[E]=y.x+this.Kd[E]:(this.Kd[E]=y.x+x-this.Kd[E],this.Ta[E]=x-this.Ta[E]);x=this.ve!==0,a.reset(),E=this.K===270||this.K===90;for(var z=1/0,tt=b=1/0,rt=-1/0;a.next();){var ot=a.value,at=ot.layer,At=ot.column|0;E?(tt=y.x+this.kc*At,at=this.Kd[at]):(tt=this.Kd[at],at=y.y+this.kc*At),ot.centerX=tt,ot.centerY=at,x&&isFinite(ot.zc)&&(E?ot.node?ot.x=y.x+ot.zc:ot.centerX=y.x+ot.zc:ot.node?ot.y=y.y+ot.zc:ot.centerY=y.y+ot.zc),z=Math.min(ot.x,z),b=Math.min(ot.y,b),E?(tt=z,rt=Math.max(rt,ot.bounds.right)):(tt=b,rt=Math.max(rt,ot.bounds.bottom))}for(this.xw=rt-tt,z=y.x-z,y=y.y-b,this.Rf=new Rt(x&&E?0:z,x&&!E?0:y),a.reset();a.next();)x=a.value,x.x+=z,x.y+=y,x.commit()},Ar.prototype.Gu=function(){for(var a=0,y=this.ie,x=0;x<=this.Ia;x++)a+=this.he[x],a+=this.Ld[x];a+=this.Ia*y,y=[],x=this.ve!==0?this.xw:this.kc*this.Ra;for(var E=this.maxLayer;0<=E;E--)this.K===270?E===0?y.push(new Me(0,0,x,Math.abs(this.Ta[0]))):y.push(new Me(0,this.Ta[E-1],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===90?E===0?y.push(new Me(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new Me(0,this.Ta[E],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===180?E===0?y.push(new Me(0,0,Math.abs(this.Ta[0]),x)):y.push(new Me(this.Ta[E-1],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x)):E===0?y.push(new Me(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new Me(this.Ta[E],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x));this.commitLayers(y,this.Rf)},Ar.prototype.commitLayers=function(){},Ar.prototype.commitLinks=function(){for(var a=this.network.edges.iterator,y;a.next();)y=a.value.link,y!==null&&(y.uh(),y.Fj(),y.zf());for(a.reset();a.next();)y=a.value.link,y!==null&&y.vg();for(a.reset();a.next();){var x=a.value;if(y=x.link,y!==null){y.uh();var E=y,b=E.fromNode,z=E.toNode,tt=E.fromPort,rt=E.toPort;if(b!==null){var ot=b.findVisibleNode();ot!==null&&ot!==b&&(b=ot,tt=ot.port)}z!==null&&(ot=z.findVisibleNode(),ot!==null&&ot!==z&&(z=ot,rt=ot.port));var at=y.computeSpot(!0,tt);ot=y.computeSpot(!1,rt);var At=x.fromVertex,ft=x.toVertex;if(x.valid)y.curve===Al&&y.pointsCount===4&&(At.column===ft.column&&this.alignOption===0?(x=y.getLinkPoint(b,tt,at,!0,!1,z,rt),rt=y.getLinkPoint(z,rt,ot,!1,!1,b,tt),x.w()||x.set(b.actualBounds.center),rt.w()||rt.set(z.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+rt.x)/3,(2*x.y+rt.y)/3),y.yf((x.x+2*rt.x)/3,(x.y+2*rt.y)/3),y.yf(rt.x,rt.y)):(x=E=!1,tt!==null&&at===ts&&(E=!0),rt!==null&&ot===ts&&(x=!0),(E||x)&&(ot=null,E&&(ot=y.getLinkPointFromPoint(b,tt,tt.ga(Xi),y.i(3),!0),ot.w()||ot.set(b.actualBounds.center),y.L(0,ot.x,ot.y)),b=null,x&&(b=y.getLinkPointFromPoint(z,rt,rt.ga(Xi),y.i(0),!1),b.w()||b.set(z.actualBounds.center),y.L(3,b.x,b.y)),ot&&(z=y.i(2),y.L(1,(2*ot.x+z.x)/3,(2*ot.y+z.y)/3)),b&&(z=y.i(1),y.L(2,(2*b.x+z.x)/3,(2*b.y+z.y)/3))))),y.zf();else if(At.layer===ft.layer)y.zf();else{var pt=!1,xt=!1,Ct=this.ie,Mt=y.firstPickIndex+1;if(y.isOrthogonal){xt=!0;var Gt=y.pointsCount;4<Gt&&y.points.removeRange(2,Gt-3)}else if(y.curve===Al)pt=!0,Gt=y.pointsCount,4<Gt&&y.points.removeRange(2,Gt-3),Gt===4&&(Mt=2);else{Gt=y.pointsCount;var It=at===ts,zt=ot===ts;2<Gt&&It&&zt?y.points.removeRange(1,Gt-2):3<Gt&&It&&!zt?y.points.removeRange(1,Gt-3):3<Gt&&!It&&zt?y.points.removeRange(2,Gt-2):4<Gt&&!It&&!zt&&y.points.removeRange(2,Gt-3)}if(x.rev){for(;ft!==null&&At!==ft;){var Yt=Gt=null;for(It=ft.sourceEdges.iterator;It.next()&&(zt=It.value,zt.link!==x.link||(Gt=zt.fromVertex,Yt=zt.toVertex,Gt.node!==null)););if(Gt===null)break;if(Gt!==At){It=y.i(Mt-1).x,zt=y.i(Mt-1).y;var Xt=Gt.centerX,$t=Gt.centerY;if(xt)this.K===180||this.K===0?Mt===y.firstPickIndex+1?(y.m(Mt++,It,zt),y.m(Mt++,It,$t)):(Yt!==null?Yt.centerY:zt)!==$t&&(Yt=this.Ta[Gt.layer-1]+this.Rf.x,y.m(Mt++,Yt,zt),y.m(Mt++,Yt,$t)):Mt===y.firstPickIndex+1?(y.m(Mt++,It,zt),y.m(Mt++,Xt,zt)):(Yt!==null?Yt.centerX:It)!==Xt&&(Yt=this.Ta[Gt.layer-1]+this.Rf.y,y.m(Mt++,It,Yt),y.m(Mt++,Xt,Yt));else if(Mt===y.firstPickIndex+1){Yt=Math.max(10,this.he[ft.layer]);var de=Math.max(10,this.Ld[ft.layer]);if(pt)this.K===180?Xt<=ft.bounds.x?(ft=ft.bounds.x,y.m(Mt++,ft-Yt,$t),y.m(Mt++,ft,$t),y.m(Mt++,ft+de,$t)):(y.m(Mt++,Xt-Yt,$t),y.m(Mt++,Xt,$t),y.m(Mt++,Xt+de,$t)):this.K===90?$t>=ft.bounds.bottom?(ft=ft.bounds.y+ft.bounds.height,y.m(Mt++,Xt,ft+de),y.m(Mt++,Xt,ft),y.m(Mt++,Xt,ft-Yt)):(y.m(Mt++,Xt,$t+de),y.m(Mt++,Xt,$t),y.m(Mt++,Xt,$t-Yt)):this.K===270?$t<=ft.bounds.y?(ft=ft.bounds.y,y.m(Mt++,Xt,ft-Yt),y.m(Mt++,Xt,ft),y.m(Mt++,Xt,ft+de)):(y.m(Mt++,Xt,$t-Yt),y.m(Mt++,Xt,$t),y.m(Mt++,Xt,$t+de)):this.K===0&&(Xt>=ft.bounds.right?(ft=ft.bounds.x+ft.bounds.width,y.m(Mt++,ft+de,$t),y.m(Mt++,ft,$t),y.m(Mt++,ft-Yt,$t)):(y.m(Mt++,Xt+de,$t),y.m(Mt++,Xt,$t),y.m(Mt++,Xt-Yt,$t)));else{y.m(Mt++,It,zt);var An=0;this.K===180||this.K===0?((this.K===180?Xt>=ft.bounds.right:Xt<=ft.bounds.x)&&(An=(this.K===0?-Yt:de)/2),y.m(Mt++,It+An,$t)):((this.K===270?$t>=ft.bounds.bottom:$t<=ft.bounds.y)&&(An=(this.K===90?-Yt:de)/2),y.m(Mt++,Xt,zt+An)),y.m(Mt++,Xt,$t)}}else Yt=Math.max(10,this.he[Gt.layer]),de=Math.max(10,this.Ld[Gt.layer]),pt?this.K===180?(y.m(Mt++,Xt-Yt-Ct,$t),y.m(Mt++,Math.min(Xt-Yt+Ct/2,Xt),$t),y.m(Mt++,Xt,$t),y.m(Mt++,Xt,$t),y.m(Mt++,Math.max(Xt+de-Ct/2,Xt),$t),y.m(Mt++,Xt+de+Ct,$t)):this.K===90?(y.m(Mt++,Xt,$t+de+Ct),y.m(Mt++,Xt,Math.max($t+de-Ct/2,$t)),y.m(Mt++,Xt,$t),y.m(Mt++,Xt,$t),y.m(Mt++,Xt,Math.min($t-Yt+Ct/2,$t)),y.m(Mt++,Xt,$t-Yt-Ct)):this.K===270?(y.m(Mt++,Xt,$t-Yt-Ct),y.m(Mt++,Xt,Math.min($t-Yt+Ct/2,$t)),y.m(Mt++,Xt,$t),y.m(Mt++,Xt,$t),y.m(Mt++,Xt,Math.max($t+de-Ct/2,$t)),y.m(Mt++,Xt,$t+de+Ct)):(y.m(Mt++,Xt+de+Ct,$t),y.m(Mt++,Math.max(Xt+de-Ct/2,Xt),$t),y.m(Mt++,Xt,$t),y.m(Mt++,Xt,$t),y.m(Mt++,Math.min(Xt-Yt+Ct/2,Xt),$t),y.m(Mt++,Xt-Yt-Ct,$t)):y.m(Mt++,Xt,$t)}ft=Gt}(rt===null||at!==ts||xt)&&(It=y.i(Mt-1).x,zt=y.i(Mt-1).y,Xt=y.i(Mt).x,$t=y.i(Mt).y,xt?(Ct=this.Ld[At.layer],this.K===180||this.K===0?(xt=zt,xt>=At.bounds.y&&xt<=At.bounds.bottom&&(this.K===180?Xt>=At.bounds.x:Xt<=At.bounds.right)&&(ft=At.centerX+(this.K===180?-Ct:Ct),xt<At.bounds.y+At.bounds.height/2?xt=At.bounds.y-this.kc/2:xt=At.bounds.bottom+this.kc/2,y.m(Mt++,ft,zt),y.m(Mt++,ft,xt)),y.m(Mt++,Xt,xt)):(xt=It,xt>=At.bounds.x&&xt<=At.bounds.right&&(this.K===270?$t>=At.bounds.y:$t<=At.bounds.bottom)&&(ft=At.centerY+(this.K===270?-Ct:Ct),xt<At.bounds.x+At.bounds.width/2?xt=At.bounds.x-this.kc/2:xt=At.bounds.right+this.kc/2,y.m(Mt++,It,ft),y.m(Mt++,xt,ft)),y.m(Mt++,xt,$t)),y.m(Mt++,Xt,$t)):pt?(Yt=Math.max(10,this.he[At.layer]),de=Math.max(10,this.Ld[At.layer]),this.K===180&&Xt>=At.bounds.x?(ft=At.bounds.x+At.bounds.width,y.L(Mt-2,ft,zt),y.L(Mt-1,ft+de,zt)):this.K===90&&$t<=At.bounds.bottom?(ft=At.bounds.y,y.L(Mt-2,It,ft),y.L(Mt-1,It,ft-Yt)):this.K===270&&$t>=At.bounds.y?(ft=At.bounds.y+At.bounds.height,y.L(Mt-2,It,ft),y.L(Mt-1,It,ft+de)):this.K===0&&Xt<=At.bounds.right&&(ft=At.bounds.x,y.L(Mt-2,ft,zt),y.L(Mt-1,ft-Yt,zt))):(Yt=Math.max(10,this.he[At.layer]),de=Math.max(10,this.Ld[At.layer]),xt=0,this.K===180||this.K===0?((this.K===180?Xt<=At.bounds.x:Xt>=At.bounds.right)&&(xt=(this.K===0?de:-Yt)/2),y.m(Mt++,Xt+xt,zt)):((this.K===270?$t<=At.bounds.y:$t>=At.bounds.bottom)&&(xt=(this.K===90?de:-Yt)/2),y.m(Mt++,It,$t+xt)),y.m(Mt++,Xt,$t)))}else{for(;At!==null&&At!==ft;){for(Yt=Gt=null,At=At.destinationEdges.iterator;At.next()&&(It=At.value,It.link!==x.link||(Gt=It.toVertex,Yt=It.fromVertex,Yt.node!==null&&(Yt=null),Gt.node!==null)););if(Gt===null)break;Gt!==ft&&(It=y.i(Mt-1).x,zt=y.i(Mt-1).y,Xt=Gt.centerX,$t=Gt.centerY,xt?this.K===180||this.K===0?(Yt!==null?Yt.centerY:zt)!==$t&&(Yt=this.Ta[Gt.layer]+this.Rf.x,Mt===y.firstPickIndex+1&&(Yt=this.K===0?Math.max(Yt,It):Math.min(Yt,It)),y.m(Mt++,Yt,zt),y.m(Mt++,Yt,$t)):(Yt!==null?Yt.centerX:It)!==Xt&&(Yt=this.Ta[Gt.layer]+this.Rf.y,Mt===y.firstPickIndex+1&&(Yt=this.K===90?Math.max(Yt,zt):Math.min(Yt,zt)),y.m(Mt++,It,Yt),y.m(Mt++,Xt,Yt)):(Yt=Math.max(10,this.he[Gt.layer]),de=Math.max(10,this.Ld[Gt.layer]),pt?this.K===180?(y.m(Mt++,Xt+de+Ct,$t),y.m(Mt++,Math.max(Xt+de-Ct/2,Xt),$t),y.m(Mt++,Xt,$t),y.m(Mt++,Xt,$t),y.m(Mt++,Math.min(Xt-Yt+Ct/2,Xt),$t),y.m(Mt++,Xt-Yt-Ct,$t)):this.K===90?(y.m(Mt++,Xt,$t-Yt-Ct),y.m(Mt++,Xt,Math.min($t-Yt+Ct/2,$t)),y.m(Mt++,Xt,$t),y.m(Mt++,Xt,$t),y.m(Mt++,Xt,Math.max($t+de-Ct/2,$t)),y.m(Mt++,Xt,$t+de+Ct)):this.K===270?(y.m(Mt++,Xt,$t+de+Ct),y.m(Mt++,Xt,Math.max($t+de-Ct/2,$t)),y.m(Mt++,Xt,$t),y.m(Mt++,Xt,$t),y.m(Mt++,Xt,Math.min($t-Yt+Ct/2,$t)),y.m(Mt++,Xt,$t-Yt-Ct)):(y.m(Mt++,Xt-Yt-Ct,$t),y.m(Mt++,Math.min(Xt-Yt+Ct/2,Xt),$t),y.m(Mt++,Xt,$t),y.m(Mt++,Xt,$t),y.m(Mt++,Math.max(Xt+de-Ct/2,Xt),$t),y.m(Mt++,Xt+de+Ct,$t)):this.K===180?(y.m(Mt++,Xt+de,$t),y.m(Mt++,Xt-Yt,$t)):this.K===90?(y.m(Mt++,Xt,$t-Yt),y.m(Mt++,Xt,$t+de)):this.K===270?(y.m(Mt++,Xt,$t+de),y.m(Mt++,Xt,$t-Yt)):(y.m(Mt++,Xt-Yt,$t),y.m(Mt++,Xt+de,$t)))),At=Gt}xt&&(It=y.i(Mt-1).x,zt=y.i(Mt-1).y,Xt=y.i(Mt).x,$t=y.i(Mt).y,this.K===180||this.K===0?zt!==$t&&(Yt=this.K===0?Math.min(Math.max((Xt+It)/2,this.Ta[ft.layer]+this.Rf.x),Xt):Math.max(Math.min((Xt+It)/2,this.Ta[ft.layer]+this.Rf.x),Xt),y.m(Mt++,Yt,zt),y.m(Mt++,Yt,$t)):It!==Xt&&(Yt=this.K===90?Math.min(Math.max(($t+zt)/2,this.Ta[ft.layer]+this.Rf.y),$t):Math.max(Math.min(($t+zt)/2,this.Ta[ft.layer]+this.Rf.y),$t),y.m(Mt++,It,Yt),y.m(Mt++,Xt,Yt)))}E!==null&&pt&&4<=y.pointsCount&&(tt!==null&&(tt=at===ts?y.getLinkPointFromPoint(b,tt,tt.ga(Xi),y.i(3),!0):y.i(0),at===ts&&(at=y.i(2),E=y.i(3),this.direction===90||this.direction===270?(y.L(1,(tt.x+at.x)/2,at.y),y.L(2,E.x,(at.y+E.y)/2)):(y.L(1,at.x,(tt.y+at.y)/2),y.L(2,(at.x+E.x)/2,E.y))),tt.w()||tt.set(b.actualBounds.center),y.L(0,tt.x,tt.y)),rt!==null&&(b=ot===ts?y.getLinkPointFromPoint(z,rt,rt.ga(Xi),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),ot===ts&&(rt=y.i(y.pointsCount-3),ot=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(b.x+rt.x)/2,rt.y),y.L(y.pointsCount-2,ot.x,(rt.y+ot.y)/2)):(y.L(y.pointsCount-2,rt.x,(b.y+rt.y)/2),y.L(y.pointsCount-3,(rt.x+ot.x)/2,ot.y))),b.w()||b.set(z.actualBounds.center),y.L(y.pointsCount-1,b.x,b.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},Ar.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new Ke,y=this.network.edges.iterator;y.next();){var x=y.value.link;x!==null&&x.isOrthogonal&&!a.contains(x)&&a.add(x)}if(0<a.count)if(this.K===90||this.K===270){for(y=0,x=[],a=a.iterator;a.next();){var E=a.value;if(E!==null&&E.isOrthogonal)for(var b=2;b<E.pointsCount-3;b++){var z=E.i(b),tt=E.i(b+1);if(this.B(z.y,tt.y)&&!this.B(z.x,tt.x)){var rt=new Jg;rt.layer=Math.floor(z.y/2);var ot=E.i(0),at=E.i(E.pointsCount-1);if(rt.first=ot.x*ot.x+ot.y,rt.jc=at.x*at.x+at.y,rt.rd=Math.min(z.x,tt.x),rt.Ic=Math.max(z.x,tt.x),rt.index=b,rt.link=E,b+2<E.pointsCount){ot=E.i(b-1),at=E.i(b+2);var At=0;ot.y<z.y?At=at.y<z.y?3:z.x<tt.x?2:1:ot.y>z.y&&(At=at.y>z.y?0:tt.x<z.x?2:1),rt.j=At}x.push(rt)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,E=a+1;E<x.length&&x[E].layer===z;)E++;if(1<E-a)for(z=a;z<E;){for(tt=x[z].Ic,b=a+1;b<E&&x[b].rd<tt;)tt=Math.max(tt,x[b].Ic),b++;if(tt=b-z,1<tt){for(this.zi(x,this.Js,z,z+tt),At=1,rt=x[z].jc,ot=z;ot<b;ot++)at=x[ot],at.jc!==rt&&(At++,rt=at.jc);this.zi(x,this.Ux,z,z+tt);var ft=1;for(rt=x[z].first,ot=z;ot<b;ot++)at=x[ot],at.first!==rt&&(ft++,rt=at.first);for(ot=!0,at=ft,At<ft?(ot=!1,at=At,rt=x[z].jc,this.zi(x,this.Js,z,z+tt)):rt=x[z].first,At=0,ft=z;ft<b;ft++){var pt=x[ft];(ot?pt.first:pt.jc)!==rt&&(At++,rt=ot?pt.first:pt.jc);var xt=pt.link;z=xt.i(pt.index),tt=xt.i(pt.index+1);var Ct=this.linkSpacing*(At-(at-1)/2);y++,xt.uh(),xt.L(pt.index,z.x,z.y+Ct),xt.L(pt.index+1,tt.x,tt.y+Ct),xt.zf()}}z=b}a=E}}else{for(y=0,x=[],a=a.iterator;a.next();)if(E=a.value,E!==null&&E.isOrthogonal)for(b=2;b<E.pointsCount-3;b++)z=E.i(b),tt=E.i(b+1),this.B(z.x,tt.x)&&!this.B(z.y,tt.y)&&(rt=new Jg,rt.layer=Math.floor(z.x/2),ot=E.i(0),at=E.i(E.pointsCount-1),rt.first=ot.x+ot.y*ot.y,rt.jc=at.x+at.y*at.y,rt.rd=Math.min(z.y,tt.y),rt.Ic=Math.max(z.y,tt.y),rt.index=b,rt.link=E,b+2<E.pointsCount&&(ot=E.i(b-1),at=E.i(b+2),At=0,ot.x<z.x?At=at.x<z.x?3:z.y<tt.y?2:1:ot.x>z.x&&(At=at.x>z.x?0:tt.y<z.y?2:1),rt.j=At),x.push(rt));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,E=a+1;E<x.length&&x[E].layer===z;)E++;if(1<E-a)for(z=a;z<E;){for(tt=x[z].Ic,b=a+1;b<E&&x[b].rd<tt;)tt=Math.max(tt,x[b].Ic),b++;if(tt=b-z,1<tt){for(this.zi(x,this.Js,z,z+tt),At=1,rt=x[z].jc,ot=z;ot<b;ot++)at=x[ot],at.jc!==rt&&(At++,rt=at.jc);for(this.zi(x,this.Ux,z,z+tt),ft=1,rt=x[z].first,ot=z;ot<b;ot++)at=x[ot],at.first!==rt&&(ft++,rt=at.first);for(ot=!0,at=ft,At<ft?(ot=!1,at=At,rt=x[z].jc,this.zi(x,this.Js,z,z+tt)):rt=x[z].first,At=0,ft=z;ft<b;ft++)pt=x[ft],(ot?pt.first:pt.jc)!==rt&&(At++,rt=ot?pt.first:pt.jc),xt=pt.link,z=xt.i(pt.index),tt=xt.i(pt.index+1),Ct=this.linkSpacing*(At-(at-1)/2),y++,xt.uh(),xt.L(pt.index,z.x+Ct,z.y),xt.L(pt.index+1,tt.x+Ct,tt.y),xt.zf()}z=b}a=E}}}},Bt=Ar.prototype,Bt.Vx=function(a,y){return a instanceof Jg&&y instanceof Jg&&a!==y?a.layer<y.layer?-1:a.layer>y.layer?1:a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},Bt.Ux=function(a,y){return a instanceof Jg&&y instanceof Jg&&a!==y?a.first<y.first?-1:a.first>y.first||a.j<y.j?1:a.j>y.j||a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},Bt.Js=function(a,y){return a instanceof Jg&&y instanceof Jg&&a!==y?a.jc<y.jc?-1:a.jc>y.jc||a.j<y.j?1:a.j>y.j||a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},Bt.B=function(a,y){return a-=y,-1<a&&1>a},Bt.zi=function(a,y,x,E){var b=a.length,z=E-x;if(!(1>=z))if((0>x||x>=b-1)&&pe("not in range 0 <= from < length: "+x),z===2)E=a[x],b=a[x+1],0<y(E,b)&&(a[x]=b,a[x+1]=E);else if(x===0)if(E>=b)a.sort(y);else for(x=a.slice(0,E),x.sort(y),y=0;y<E;y++)a[y]=x[y];else if(E>=b)for(E=a.slice(x),E.sort(y),y=x;y<b;y++)a[y]=E[y-x];else for(b=a.slice(x,E),b.sort(y),y=x;y<E;y++)a[y]=b[y-x]};function Xg(a,y){var x=a.tc[y];if(x>=a.He.length){for(var E=[],b=0;b<a.He.length;b++)E[b]=a.He[b];a.He=E}for(a.He[x]===void 0||a.He[x]===null?E=[]:(E=a.He[x],a.He[x]=null),a=a.fl[y],y=0;y<a.length;y++)x=a[y],E[x.index]=x;return E}function Zg(a,y,x){a.He[a.tc[y]]=x}Ie.Object.defineProperties(Ar.prototype,{layerSpacing:{get:function(){return this.ie},set:function(a){this.ie!==a&&0<=a&&(this.ie=a,this.C())}},columnSpacing:{get:function(){return this.kc},set:function(a){this.kc!==a&&0<a&&(this.kc=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K!==a&&(a===0||a===90||a===180||a===270?(this.K=a,this.C()):pe("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==Qv&&a!==rm&&a!==Ip||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==om&&a!==Uv&&a!==Iv||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==sm&&a!==Dv&&a!==Hv||(this.Qk=a,this.C())}},iterations:{get:function(){return this.bj},set:function(a){this.bj!==a&&0<=a&&(this.bj=a,this.C())}},aggressiveOption:{get:function(){return this.rk},set:function(a){this.rk===a||a!==Ov&&a!==am&&a!==Rv||(this.rk=a,this.C())}},packOption:{get:function(){return this.bg},set:function(a){this.bg!==a&&0<=a&&8>a&&(this.bg=a,this.C())}},alignOption:{get:function(){return this.ve},set:function(a){this.ve!==a&&0<=a&&16>a&&(this.ve=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},linkSpacing:{get:function(){return this.Cn},set:function(a){this.Cn!==a&&0<=a&&(this.Cn=a,this.C())}},maxLayer:{get:function(){return this.Ia}},maxIndex:{get:function(){return this.Iq}},maxColumn:{get:function(){return this.Ra}},minIndexLayer:{get:function(){return this.Hn}},maxIndexLayer:{get:function(){return this.Md}}});var rm=new ce(Ar,"CycleDepthFirst",0),Qv=new ce(Ar,"CycleGreedy",1),Ip=new ce(Ar,"CycleFromLayers",2),om=new ce(Ar,"LayerOptimalLinkLength",0),Uv=new ce(Ar,"LayerLongestPathSink",1),Iv=new ce(Ar,"LayerLongestPathSource",2),sm=new ce(Ar,"InitDepthFirstOut",0),Dv=new ce(Ar,"InitDepthFirstIn",1),Hv=new ce(Ar,"InitNaive",2),Ov=new ce(Ar,"AggressiveNone",0),am=new ce(Ar,"AggressiveLess",1),Rv=new ce(Ar,"AggressiveMore",2),_1=8;Ar.className="LayeredDigraphLayout",Ar.CycleDepthFirst=rm,Ar.CycleGreedy=Qv,Ar.CycleFromLayers=Ip,Ar.LayerOptimalLinkLength=om,Ar.LayerLongestPathSink=Uv,Ar.LayerLongestPathSource=Iv,Ar.InitDepthFirstOut=sm,Ar.InitDepthFirstIn=Dv,Ar.InitNaive=Hv,Ar.AggressiveNone=Ov,Ar.AggressiveLess=am,Ar.AggressiveMore=Rv,Ar.PackNone=0,Ar.PackExpand=1,Ar.PackStraighten=2,Ar.PackMedian=4,Ar.PackAll=15,Ar.AlignNone=0,Ar.AlignUpperLeft=1,Ar.AlignUpperRight=2,Ar.AlignLowerLeft=4,Ar.AlignLowerRight=8,Ar.AlignAll=15;function Jg(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}Jg.className="SegInfo";function Dc(a){xr.call(this,a)}ue(Dc,xr),Dc.prototype.createVertex=function(){return new Pl(this)},Dc.prototype.createEdge=function(){return new Dp(this)},Dc.className="LayeredDigraphNetwork";function Pl(a){Oo.call(this,a),this.$n=this.bo=this.ao=this.co=null,this.Za=this.Ag=this.Ig=-1,this.u=NaN,this.F=null,this.valid=!1,this.finish=this.Ll=NaN,this.Dj=0,this.dv=this.ev=null}ue(Pl,Oo);function r1(a,y){return a.index-y.index}function lm(a,y){if(!a.$n){for(var x=[],E=Dn(a.destinationEdgesArrayAccess),b=E.next();!b.done;b=E.next())b=b.value,b.valid&&x.push(b);a.$n=x}for(a=Dn(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;pe("Unable to find destination edge to given vertex")}function Gv(a){if(!a.co){for(var y=[],x=Dn(a.sourceEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.fromVertex);y.sort(r1),a.co=y}return a.co}function Y1(a){if(!a.ao){for(var y=[],x=Dn(a.destinationEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.toVertex);y.sort(r1),a.ao=y}return a.ao}Pl.prototype.Cl=function(a){Oo.prototype.Cl.call(this,a),this.bo=this.co=null},Pl.prototype.Kl=function(a){Oo.prototype.Kl.call(this,a),this.bo=this.co=null},Pl.prototype.zl=function(a){Oo.prototype.zl.call(this,a),this.$n=this.ao=null},Pl.prototype.Jl=function(a){Oo.prototype.Jl.call(this,a),this.$n=this.ao=null},Ie.Object.defineProperties(Pl.prototype,{layer:{get:function(){return this.Ig},set:function(a){this.Ig!==a&&(this.Ig=a)}},column:{get:function(){return this.Ag},set:function(a){this.Ag!==a&&(this.Ag=a)}},index:{get:function(){return this.Za},set:function(a){this.Za!==a&&(this.Za=a)}},component:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},near:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}}}),Pl.prototype.deleteDestinationEdge=Pl.prototype.Jl,Pl.prototype.addDestinationEdge=Pl.prototype.zl,Pl.prototype.deleteSourceEdge=Pl.prototype.Kl,Pl.prototype.addSourceEdge=Pl.prototype.Cl,Pl.className="LayeredDigraphVertex";function Dp(a){Za.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}ue(Dp,Za),Ie.Object.defineProperties(Dp.prototype,{fromVertex:{get:function(){return this.kd},set:function(a){this.kd!==a&&(this.kd=a)}},toVertex:{get:function(){return this.qd},set:function(a){this.qd!==a&&(this.qd=a)}},valid:{get:function(){return this.Ha},set:function(a){this.Ha!==a&&(this.Ha=a)}},rev:{get:function(){return this.ia},set:function(a){this.ia!==a&&(this.ia=a)}},forest:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}},portFromPos:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},portToPos:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}},portFromColOffset:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},portToColOffset:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}}}),Dp.className="LayeredDigraphEdge";function Ti(a){Ir.call(this),this.Ub=new Ye,this.Wn=gm,this.ud=ku,this.vo=dm,this.Bq=qv,this.$v=[],this.td=!0,this.Rb=cm,this.$d=new an(10,10).freeze();var y=new Wd(this);this.W=new Ql(y),this.Y=new Ql(y),this.ru=[],a&&Object.assign(this,a)}ue(Ti,Ir),Ti.prototype.cloneProtected=function(a){Ir.prototype.cloneProtected.call(this,a),a.Wn=this.Wn,a.vo=this.vo,a.Bq=this.Bq,a.td=this.td,a.Rb=this.Rb,a.$d.assign(this.$d),a.W.copyInheritedPropertiesFrom(this.W),a.Y.copyInheritedPropertiesFrom(this.Y)},Ti.prototype.qb=function(a){a.classType===Ti?a.name.indexOf("Alignment")===0?this.alignment=a:a.name.indexOf("Arrangement")===0?this.arrangement=a:a.name.indexOf("Compaction")===0?this.compaction=a:a.name.indexOf("Path")===0?this.path=a:a.name.indexOf("Sorting")===0?this.sorting=a:a.name.indexOf("Style")===0?this.treeStyle=a:pe("Unknown enum value: "+a):Ir.prototype.qb.call(this,a)},Ti.prototype.createNetwork=function(){return new Wd(this)},Ti.prototype.makeNetwork=function(a){function y(E){if(E instanceof hn)return!E.isLinkLabel&&E.category!=="Comment";if(E instanceof tn){var b=E.fromNode;return b===null||b.isLinkLabel||b.category==="Comment"?!1:(E=E.toNode,!(E===null||E.isLinkLabel||E.category==="Comment"))}return!1}var x=this.createNetwork();return a instanceof ge?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof li?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Ti.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==pm&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof ge&&(y=a),this.path===gm&&y!==null?this.ud=y.isTreePathToChildren?ku:zd:this.ud=this.path===gm?ku:this.path,0<this.network.vertexes.count){for(this.network.Ko(),a=this.network.vertexes.iterator;a.next();)y=a.value,y.initialized=!1,y.level=0,y.parent=null,y.children=[];if(0<this.Ub.count){for(a=new Ye,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof hn?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof Ql&&a.add(x)}this.Ub=a}for(this.Ub.count===0&&this.findRoots(),a=this.Ub.copy().iterator;a.next();)y=a.value,y.initialized||(y.initialized=!0,jv(this,y));for(y=this.network.vertexes,a=null;a=X1(y),0<a.count;)y=o1(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,jv(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Ql&&a1(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Ql&&l1(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Ql&&A1(this,y);if(this.Cu(),this.layerStyle===mm){for(a=[],y=this.network.vertexes.iterator;y.next();){x=y.value;var E=x.parent;E===null&&(E=x),E=E.angle===0||E.angle===180;var b=a[x.level];b===void 0&&(b=0),a[x.level]=Math.max(b,E?x.width:x.height)}for(y=0;y<a.length;y++)a[y]===void 0&&(a[y]=0);for(this.$v=a,y=this.network.vertexes.iterator;y.next();)x=y.value,E=x.parent,E===null&&(E=x),E.angle===0||E.angle===180?(E.angle===180&&(x.focusX+=a[x.level]-x.width),x.width=a[x.level]):(E.angle===270&&(x.focusY+=a[x.level]-x.height),x.height=a[x.level])}else if(this.layerStyle===$v)for(a=this.network.vertexes.iterator;a.next();){for(y=a.value,x=y.angle===0||y.angle===180,E=-1,b=0;b<y.children.length;b++){var z=y.children[b];E=Math.max(E,x?z.width:z.height)}if(0<=E)for(b=0;b<y.children.length;b++)z=y.children[b],x?(y.angle===180&&(z.focusX+=E-z.width),z.width=E):(y.angle===270&&(z.focusY+=E-z.height),z.height=E)}for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Ql&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new Ye,this.isValidLayout=!0};function X1(a){var y=new Ye;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}Ti.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case ku:x.sourceEdges.count===0&&this.Ub.add(x);break;case zd:x.destinationEdges.count===0&&this.Ub.add(x);break;default:pe("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=o1(this,a),a!==null&&this.Ub.add(a))};function o1(a,y){var x=999999,E=null;for(y=y.iterator;y.next();){var b=y.value;switch(a.ud){case ku:b.sourceEdges.count<x&&(x=b.sourceEdges.count,E=b);break;case zd:b.destinationEdges.count<x&&(x=b.destinationEdges.count,E=b);break;default:pe("Unhandled path value "+a.ud.toString())}}return E}function jv(a,y){if(y!==null){switch(a.ud){case ku:if(0<y.destinationEdges.count){for(var x=new Ke,E=y.destinationVertexes;E.next();){var b=E.value;s1(a,y,b)&&x.add(b)}0<x.count&&(y.children=x.Fa())}break;case zd:if(0<y.sourceEdges.count){for(x=new Ke,E=y.sourceVertexes;E.next();)b=E.value,s1(a,y,b)&&x.add(b);0<x.count&&(y.children=x.Fa())}break;default:pe("Unhandled path value"+a.ud.toString())}for(x=y.children,E=x.length,b=0;b<E;b++){var z=x[b];z.initialized=!0,z.level=y.level+1,z.parent=y,a.Ub.remove(z)}for(y=0;y<E;y++)jv(a,x[y])}}function s1(a,y,x){if(x.initialized){if(y===null)var E=!1;else{for(E=y.parent;E!==null&&E!==x;)E=E.parent;E=E===x}if(E||x.level>y.level)return!1;a.removeChild(x.parent,x)}return!0}Ti.prototype.removeChild=function(a,y){if(a!==null&&y!==null){for(var x=a.children,E=0,b=0;b<x.length;b++)x[b]===y&&E++;if(0<E){E=Array(x.length-E);for(var z=b=0;z<x.length;z++)x[z]!==y&&(E[b++]=x[z]);a.children=E}}};function a1(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===Nu&&a.sortTreeVertexChildren(y);for(var x=0,E=y.childrenCount,b=0,z=y.children,tt=z.length,rt=0;rt<tt;rt++){var ot=z[rt];a1(a,ot),x+=ot.descendantCount+1,E=Math.max(E,ot.maxChildrenCount),b=Math.max(b,ot.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=E,y.maxGenerationCount=0<E?b+1:0}}function Z1(a,y){switch(a.vo){default:case dm:return y.parent!==null?y.parent:a.W;case Zv:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case Xv:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Yv:var x=!0;if(y.childrenCount===0)x=!1;else for(var E=y.children,b=E.length,z=0;z<b;z++)if(0<E[z].childrenCount){x=!1;break}return x&&y.parent!==null?a.Y:y.parent!==null?y.parent:a.W}}Ti.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Z1(this,a)),a.parent!==null&&a.parent.alignment===Nu){for(var y=a.angle,x=a.parent.children,E=0;E<x.length&&a!==x[E];)E++;E%2===0?E!==x.length-1&&(y=y===90?180:y===180?270:y===270?180:270):y=y===90?0:y===180?90:y===270?0:90,a.angle=y}a.initialized=!0};function l1(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,E=0;E<x;E++)l1(a,y[E])}}Ti.prototype.assignTreeVertexValues=function(){};function A1(a,y){if(y!==null){y.alignment!==Nu&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,E=0;E<x;E++)A1(a,y[E])}}Ti.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Hc:break;case Op:a.children.reverse();break;case Rp:a.children.sort(a.comparer);break;case Gp:a.children.sort(a.comparer),a.children.reverse();break;default:pe("Unhandled sorting value "+a.sorting.toString())}},Ti.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Ti.prototype.addComments=function(a){var y=a.angle,x=a.parent,E=0,b=!1;x!==null&&(E=x.angle,b=x.alignment,b=qg(b)),y=y===90||y===270,E=E===90||E===270,x=a.childrenCount===0;var z=0,tt=0,rt=0,ot=a.commentSpacing;if(a.node!==null)for(var at=a.node.Mu();at.next();){var At=at.value;At.category==="Comment"&&At.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(At),At.Va(),At=At.measuredBounds,y&&!x||!b&&!E&&x||b&&E&&x?(z=Math.max(z,At.width),tt+=At.height+Math.abs(rt)):(z+=At.width+Math.abs(rt),tt=Math.max(tt,At.height)),rt=ot)}a.comments!==null&&(y&&!x||!b&&!E&&x||b&&E&&x?(z+=Math.abs(a.commentMargin),tt=Math.max(0,tt-a.height)):(tt+=Math.abs(a.commentMargin),z=Math.max(0,z-a.width)),b=Me.allocAt(0,0,a.bounds.width+z,a.bounds.height+tt),a.bounds=b,Me.free(b))};function qg(a){return a===ng||a===Nu||a===ig||a===sh}function Hp(a){return a===ng||a===Nu}function Kv(a){var y=a.parent;if(y!==null){var x=y.alignment;if(qg(x)){if(Hp(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===ig)return!0}}return!1}Ti.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,E=a.angle,b=0,z=!1;x!==null&&(b=x.angle,z=x.alignment,z=qg(z)),E=E===90||E===270,x=b===90||b===270;for(var tt=a.childrenCount===0,rt=Kv(a),ot=0,at=a.comments,At=at.length,ft=Rt.alloc(),pt=0;pt<At;pt++){var xt=at[pt],Ct=xt.measuredBounds;if(E&&!tt||!z&&!x&&tt||z&&x&&tt){if(135<b&&!z||x&&rt)if(0<=a.commentMargin)for(ft.h(a.bounds.x-a.commentMargin-Ct.width,a.bounds.y+ot),xt.move(ft),xt=xt.Sd();xt.next();){var Mt=xt.value;Mt.fromSpot=io,Mt.toSpot=jo}else for(ft.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+ot),xt.move(ft),xt=xt.Sd();xt.next();)Mt=xt.value,Mt.fromSpot=jo,Mt.toSpot=io;else if(0<=a.commentMargin)for(ft.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+ot),xt.move(ft),xt=xt.Sd();xt.next();)Mt=xt.value,Mt.fromSpot=jo,Mt.toSpot=io;else for(ft.h(a.bounds.x+a.commentMargin-Ct.width,a.bounds.y+ot),xt.move(ft),xt=xt.Sd();xt.next();)Mt=xt.value,Mt.fromSpot=io,Mt.toSpot=jo;ot=0<=a.commentSpacing?ot+(Ct.height+a.commentSpacing):ot+(a.commentSpacing-Ct.height)}else{if(135<b&&!z||!x&&rt)if(0<=a.commentMargin)for(ft.h(a.bounds.x+ot,a.bounds.y-a.commentMargin-Ct.height),xt.move(ft),xt=xt.Sd();xt.next();)Mt=xt.value,Mt.fromSpot=As,Mt.toSpot=Qs;else for(ft.h(a.bounds.x+ot,a.bounds.y+2*a.focus.y-a.commentMargin),xt.move(ft),xt=xt.Sd();xt.next();)Mt=xt.value,Mt.fromSpot=Qs,Mt.toSpot=As;else if(0<=a.commentMargin)for(ft.h(a.bounds.x+ot,a.bounds.y+2*a.focus.y+a.commentMargin),xt.move(ft),xt=xt.Sd();xt.next();)Mt=xt.value,Mt.fromSpot=Qs,Mt.toSpot=As;else for(ft.h(a.bounds.x+ot,a.bounds.y+a.commentMargin-Ct.height),xt.move(ft),xt=xt.Sd();xt.next();)Mt=xt.value,Mt.fromSpot=As,Mt.toSpot=Qs;ot=0<=a.commentSpacing?ot+(Ct.width+a.commentSpacing):ot+(a.commentSpacing-Ct.width)}}if(Rt.free(ft),y=ot-a.commentSpacing-(E?y.height:y.width),this.ud===ku)for(a=a.destinationEdges;a.next();)b=a.value.link,b===null||b.isAvoiding||(b.fromEndSegmentLength=0<y?y:NaN);else for(a=a.sourceEdges;a.next();)b=a.value.link,b===null||b.isAvoiding||(b.toEndSegmentLength=0<y?y:NaN)}},Ti.prototype.layoutTree=function(a){if(a!==null){for(var y=a.children,x=y.length,E=0;E<x;E++)this.layoutTree(y[E]);switch(a.compaction){case fm:u1(this,a);break;case jp:if(a.alignment===Nu)u1(this,a);else if(a.childrenCount===0)E=a.parent,x=!1,y=0,E!==null&&(y=E.angle,x=E.alignment,x=qg(x)),E=Kv(a),a.S.h(0,0),a.Da.h(a.width,a.height),a.parent===null||a.comments===null||(y!==180&&y!==270||x)&&!E?a.la.h(0,0):y===180&&!x||(y===90||y===270)&&E?a.la.h(a.width-2*a.focus.x,0):a.la.h(0,a.height-2*a.focus.y),a.Yo=null,a.kp=null;else{var b=rA(a);y=b===90||b===270;var z=0,tt=a.children,rt=tt.length;for(x=0;x<rt;x++)E=tt[x],z=Math.max(z,y?E.Da.width:E.Da.height);var ot=a.alignment;E=ot===bu;var at=ot===Tu,At=qg(ot),ft=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var pt=a.nodeSpacing,xt=this.computeNodeIndent(a),Ct=a.rowSpacing,Mt=0;(E||at||a.hm||a.im&&a.maxGenerationCount===1)&&(Mt=Math.max(0,a.rowIndent)),E=a.width;var Gt=a.height,It=0,zt=0,Yt=0,Xt=null,$t=null,de=0,An=0,Bn=0,vn=0,$e=0,Re=0,ai=0,ei=0;if(At&&!Hp(ot)&&135<b&&tt.reverse(),Hp(ot))if(1<rt)for(var Zi=0;Zi<rt;Zi++)Zi%2===0&&Zi!==rt-1&&(ei=Math.max(ei,y?tt[Zi].Da.width:tt[Zi].Da.height));else rt===1&&(ei=y?tt[0].Da.width:tt[0].Da.height);if(At){switch(ot){case ng:zt=135>b?h1(this,a,tt,ei,It,zt):g1(this,a,tt,ei,It,zt),ei=zt.x,It=zt.width,zt=zt.height;break;case ig:for(Xt=0;Xt<rt;Xt++)$t=tt[Xt],ft=$t.Da,Yt=Re===0?0:Ct,y?($t.S.h(z-ft.width,vn+Yt),It=Math.max(It,ft.width),zt=Math.max(zt,vn+Yt+ft.height),vn+=Yt+ft.height):($t.S.h(Bn+Yt,z-ft.height),It=Math.max(It,Bn+Yt+ft.width),zt=Math.max(zt,ft.height),Bn+=Yt+ft.width),Re++;break;case sh:for(Xt=0;Xt<rt;Xt++)$t=tt[Xt],z=$t.Da,ft=Re===0?0:Ct,y?($t.S.h(pt/2+a.focus.x,vn+ft),It=Math.max(It,z.width),zt=Math.max(zt,vn+ft+z.height),vn+=ft+z.height):($t.S.h(Bn+ft,pt/2+a.focus.y),It=Math.max(It,Bn+ft+z.width),zt=Math.max(zt,z.height),Bn+=ft+z.width),Re++}Xt=Ua(this,2),$t=Ua(this,2),y?(Xt[0].h(0,0),Xt[1].h(0,zt),$t[0].h(It,0)):(Xt[0].h(0,0),Xt[1].h(It,0),$t[0].h(0,zt)),$t[1].h(It,zt)}else for(Zi=0;Zi<rt;Zi++){var vr=tt[Zi],Jo=vr.Da;if(y){0<ft&&0<Re&&Bn+pt+Jo.width>ft&&(Bn<z&&Yf(a,ot,z-Bn,0,ai,Zi-1),$e++,Re=0,ai=Zi,Yt=zt,Bn=0,vn=135<b?-zt-Ct:zt+Ct),um(this,vr,0,vn);var rs=0;if(Re===0)Xt=vr.Yo,$t=vr.kp,de=Jo.width,An=Jo.height,(Xt===null||$t===null||b!==rA(vr))&&(Xt=Ua(this,2),$t=Ua(this,2),Xt[0].h(0,0),Xt[1].h(0,An),$t[0].h(de,0),$t[1].h(de,An));else{var Zs=Ce();An=f1(this,a,vr,Xt,$t,de,An,Zs),rs=An.x,Xt=Zs[0],$t=Zs[1],de=An.width,An=An.height,Oe(Zs),Bn<Jo.width&&0>rs&&(Kd(a,-rs,0,ai,Zi-1),hm(Xt,-rs,0),hm($t,-rs,0),rs=0)}vr.S.h(rs,vn),It=Math.max(It,de),zt=Math.max(zt,Yt+($e===0?0:Ct)+Jo.height),Bn=de}else 0<ft&&0<Re&&vn+pt+Jo.height>ft&&(vn<z&&Yf(a,ot,0,z-vn,ai,Zi-1),$e++,Re=0,ai=Zi,Yt=It,vn=0,Bn=135<b?-It-Ct:It+Ct),um(this,vr,Bn,0),rs=0,Re===0?(Xt=vr.Yo,$t=vr.kp,de=Jo.width,An=Jo.height,(Xt===null||$t===null||b!==rA(vr))&&(Xt=Ua(this,2),$t=Ua(this,2),Xt[0].h(0,0),Xt[1].h(de,0),$t[0].h(0,An),$t[1].h(de,An))):(Zs=Ce(),An=f1(this,a,vr,Xt,$t,de,An,Zs),rs=An.x,Xt=Zs[0],$t=Zs[1],de=An.width,An=An.height,Oe(Zs),vn<Jo.height&&0>rs&&(Kd(a,0,-rs,ai,Zi-1),hm(Xt,0,-rs),hm($t,0,-rs),rs=0)),vr.S.h(Bn,rs),zt=Math.max(zt,An),It=Math.max(It,Yt+($e===0?0:Ct)+Jo.width),vn=An;Re++}switch(0<$e&&(y?(zt+=Math.max(0,x),Bn<It&&Yf(a,ot,It-Bn,0,ai,rt-1),0<Mt&&(at||Kd(a,Mt,0,0,rt-1),It+=Mt)):(It+=Math.max(0,x),vn<zt&&Yf(a,ot,0,zt-vn,ai,rt-1),0<Mt&&(at||Kd(a,0,Mt,0,rt-1),zt+=Mt))),Mt=at=0,ot){case Oc:y?at+=It/2-a.focus.x-xt/2:Mt+=zt/2-a.focus.y-xt/2;break;case Vd:0<$e?y?at+=It/2-a.focus.x-xt/2:Mt+=zt/2-a.focus.y-xt/2:y?(ei=tt[0].S.x+tt[0].la.x,at+=ei+(tt[rt-1].S.x+tt[rt-1].la.x+2*tt[rt-1].focus.x-ei)/2-a.focus.x-xt/2):(ei=tt[0].S.y+tt[0].la.y,Mt+=ei+(tt[rt-1].S.y+tt[rt-1].la.y+2*tt[rt-1].focus.y-ei)/2-a.focus.y-xt/2);break;case bu:y?(at-=xt,It+=xt):(Mt-=xt,zt+=xt);break;case Tu:y?(at+=It-a.width+xt,It+=xt):(Mt+=zt-a.height+xt,zt+=xt);break;case ng:y?1<rt?at+=ei+pt/2-a.focus.x:at+=tt[0].focus.x-a.focus.x+tt[0].la.x:1<rt?Mt+=ei+pt/2-a.focus.y:Mt+=tt[0].focus.y-a.focus.y+tt[0].la.y;break;case ig:y?at+=It+pt/2-a.focus.x:Mt+=zt+pt/2-a.focus.y;break;case sh:break;default:zt=this.customAlignment(a,at,Mt,It,zt),at=zt[0],Mt=zt[1],It=zt[2],zt=zt[3]}for(xt=0;xt<rt;xt++)ei=tt[xt],y?ei.S.h(ei.S.x+ei.la.x-at,ei.S.y+(135<b?(At?-zt:-ei.Da.height)+ei.la.y-x:Gt+x+ei.la.y)):ei.S.h(ei.S.x+(135<b?(At?-It:-ei.Da.width)+ei.la.x-x:E+x+ei.la.x),ei.S.y+ei.la.y-Mt);if(rt=tt=0,At?y?(It=zv(a,It,at),0>at&&(at=0),135<b&&(Mt+=zt+x),zt+=Gt+x,ot===sh&&(tt+=pt/2+a.focus.x),rt+=Gt+x):(135<b&&(at+=It+x),It+=E+x,zt=Vv(a,zt,Mt),0>Mt&&(Mt=0),ot===sh&&(rt+=pt/2+a.focus.y),tt+=E+x):y?(a.comments===null?E>It&&(It=Wv(ot,E-It,0),tt=It.x,rt=It.y,It=E,at=0):It=zv(a,It,at),0>at&&(tt-=at,at=0),135<b&&(Mt+=zt+x),zt=Math.max(Math.max(zt,Gt),zt+Gt+x),rt+=Gt+x):(135<b&&(at+=It+x),It=Math.max(Math.max(It,E),It+E+x),a.comments===null?Gt>zt&&(zt=Wv(ot,0,Gt-zt),tt=zt.x,rt=zt.y,zt=Gt,Mt=0):zt=Vv(a,zt,Mt),0>Mt&&(rt-=Mt,Mt=0),tt+=E+x),0<$e)b=Ua(this,4),$e=Ua(this,4),y?(b[2].h(0,Gt+x),b[3].h(b[2].x,zt),$e[2].h(It,b[2].y),$e[3].h($e[2].x,b[3].y)):(b[2].h(E+x,0),b[3].h(It,b[2].y),$e[2].h(b[2].x,zt),$e[3].h(b[3].x,$e[2].y));else{for(b=Ua(this,Xt.length+2),$e=Ua(this,$t.length+2),ot=0;ot<Xt.length;ot++)At=Xt[ot],b[ot+2].h(At.x+tt,At.y+rt);for(ot=0;ot<$t.length;ot++)At=$t[ot],$e[ot+2].h(At.x+tt,At.y+rt)}y?(b[0].h(at,0),b[1].h(b[0].x,Gt),b[2].y<b[1].y&&(b[2].x>b[0].x?b[2].assign(b[1]):b[1].assign(b[2])),b[3].y<b[2].y&&(b[3].x>b[0].x?b[3].assign(b[2]):b[2].assign(b[3])),$e[0].h(at+E,0),$e[1].h($e[0].x,Gt),$e[2].y<$e[1].y&&($e[2].x<$e[0].x?$e[2].assign($e[1]):$e[1].assign($e[2])),$e[3].y<$e[2].y&&($e[3].x<$e[0].x?$e[3].assign($e[2]):$e[2].assign($e[3])),b[2].y-=x/2,$e[2].y-=x/2):(b[0].h(0,Mt),b[1].h(E,b[0].y),b[2].x<b[1].x&&(b[2].y>b[0].y?b[2].assign(b[1]):b[1].assign(b[2])),b[3].x<b[2].x&&(b[3].y>b[0].y?b[3].assign(b[2]):b[2].assign(b[3])),$e[0].h(0,Mt+Gt),$e[1].h(E,$e[0].y),$e[2].x<$e[1].x&&($e[2].y<$e[0].y?$e[2].assign($e[1]):$e[1].assign($e[2])),$e[3].x<$e[2].x&&($e[3].y<$e[0].y?$e[3].assign($e[2]):$e[2].assign($e[3])),b[2].x-=x/2,$e[2].x-=x/2),SA(this,Xt),SA(this,$t),a.Yo=b,a.kp=$e,a.la.h(at,Mt),a.Da.h(It,zt)}break;default:pe("Unhandled compaction value "+a.compaction.toString())}}};function u1(a,y){if(y.childrenCount===0){var x=!1,E=0;y.parent!==null&&(E=y.parent.angle,x=y.parent.alignment,x=qg(x));var b=Kv(y);y.S.h(0,0),y.Da.h(y.width,y.height),y.parent===null||y.comments===null||(E!==180&&E!==270||x)&&!b?y.la.h(0,0):E===180&&!x||(E===90||E===270)&&b?y.la.h(y.width-2*y.focus.x,0):y.la.h(0,y.height-2*y.focus.y)}else{E=rA(y),x=E===90||E===270;var z=0;b=y.children;for(var tt=b.length,rt=0;rt<tt;rt++){var ot=b[rt];z=Math.max(z,x?ot.Da.width:ot.Da.height)}var at=y.alignment,At=at===bu,ft=at===Tu;rt=qg(at);var pt=Math.max(0,y.breadthLimit);ot=a.computeLayerSpacing(y);var xt=y.nodeSpacing,Ct=a.computeNodeIndent(y),Mt=At||ft?0:Ct/2,Gt=y.rowSpacing,It=0;(At||ft||y.hm||y.im&&y.maxGenerationCount===1)&&(It=Math.max(0,y.rowIndent)),At=y.width;var zt=y.height,Yt=0,Xt=0,$t=0,de=0,An=0,Bn=0,vn=0,$e=0,Re=0,ai=0;if(rt&&!Hp(at)&&135<E&&b.reverse(),Hp(at))if(1<tt)for(var ei=0;ei<tt;ei++){var Zi=b[ei],vr=Zi.Da;ei%2===0&&ei!==tt-1?Re=Math.max(Re,(x?vr.width:vr.height)+a.computeBusNodeSpacing(Zi)-xt):ei%2!==0&&(ai=Math.max(ai,(x?vr.width:vr.height)+a.computeBusNodeSpacing(Zi)-xt))}else tt===1&&(Re=x?b[0].Da.width:b[0].Da.height);if(rt)switch(at){case ng:case Nu:Xt=135>E?h1(a,y,b,Re,Yt,Xt):g1(a,y,b,Re,Yt,Xt),Re=Xt.x,Yt=Xt.width,Xt=Xt.height;break;case ig:for(pt=0;pt<tt;pt++)Mt=b[pt],$t=Mt.Da,ai=vn===0?0:Gt,x?(Mt.S.h(z-$t.width,An+ai),Yt=Math.max(Yt,$t.width),Xt=Math.max(Xt,An+ai+$t.height),An+=ai+$t.height):(Mt.S.h(de+ai,z-$t.height),Yt=Math.max(Yt,de+ai+$t.width),Xt=Math.max(Xt,$t.height),de+=ai+$t.width),vn++;break;case sh:for(z=0;z<tt;z++)pt=b[z],Mt=pt.Da,$t=vn===0?0:Gt,x?(pt.S.h(xt/2+y.focus.x,An+$t),Yt=Math.max(Yt,Mt.width),Xt=Math.max(Xt,An+$t+Mt.height),An+=$t+Mt.height):(pt.S.h(de+$t,xt/2+y.focus.y),Yt=Math.max(Yt,de+$t+Mt.width),Xt=Math.max(Xt,Mt.height),de+=$t+Mt.width),vn++}else for(ai=0;ai<tt;ai++)ei=b[ai],Zi=ei.Da,x?(0<pt&&0<vn&&de+xt+Zi.width>pt&&(de<z&&Yf(y,at,z-de,0,$e,ai-1),Bn++,vn=0,$e=ai,$t=Xt,de=0,An=135<E?-Xt-Gt:Xt+Gt),vr=vn===0?Mt:xt,um(a,ei,0,An),ei.S.h(de+vr,An),Yt=Math.max(Yt,de+vr+Zi.width),Xt=Math.max(Xt,$t+(Bn===0?0:Gt)+Zi.height),de+=vr+Zi.width):(0<pt&&0<vn&&An+xt+Zi.height>pt&&(An<z&&Yf(y,at,0,z-An,$e,ai-1),Bn++,vn=0,$e=ai,$t=Yt,An=0,de=135<E?-Yt-Gt:Yt+Gt),vr=vn===0?Mt:xt,um(a,ei,de,0),ei.S.h(de,An+vr),Xt=Math.max(Xt,An+vr+Zi.height),Yt=Math.max(Yt,$t+(Bn===0?0:Gt)+Zi.width),An+=vr+Zi.height),vn++;switch(0<Bn&&(x?(Xt+=Math.max(0,ot),de<Yt&&Yf(y,at,Yt-de,0,$e,tt-1),0<It&&(ft||Kd(y,It,0,0,tt-1),Yt+=It)):(Yt+=Math.max(0,ot),An<Xt&&Yf(y,at,0,Xt-An,$e,tt-1),0<It&&(ft||Kd(y,0,It,0,tt-1),Xt+=It))),It=ft=0,at){case Oc:x?ft+=Yt/2-y.focus.x-Ct/2:It+=Xt/2-y.focus.y-Ct/2;break;case Vd:0<Bn?x?ft+=Yt/2-y.focus.x-Ct/2:It+=Xt/2-y.focus.y-Ct/2:x?(a=b[0].S.x+b[0].la.x,ft+=a+(b[tt-1].S.x+b[tt-1].la.x+2*b[tt-1].focus.x-a)/2-y.focus.x-Ct/2):(a=b[0].S.y+b[0].la.y,It+=a+(b[tt-1].S.y+b[tt-1].la.y+2*b[tt-1].focus.y-a)/2-y.focus.y-Ct/2);break;case bu:x?(ft-=Ct,Yt+=Ct):(It-=Ct,Xt+=Ct);break;case Tu:x?(ft+=Yt-y.width+Ct,Yt+=Ct):(It+=Xt-y.height+Ct,Xt+=Ct);break;case ng:case Nu:x?1<tt?ft+=Re+xt/2-y.focus.x:ft+=b[0].focus.x-y.focus.x+b[0].la.x:1<tt?It+=Re+xt/2-y.focus.y:It+=b[0].focus.y-y.focus.y+b[0].la.y;break;case ig:x?ft+=Yt+xt/2-y.focus.x:It+=Xt+xt/2-y.focus.y;break;case sh:break;default:a=a.customAlignment(y,ft,It,Yt,Xt),ft=a[0],It=a[1],Yt=a[2],Xt=a[3]}for(a=0;a<tt;a++)Ct=b[a],x?Ct.S.h(Ct.S.x+Ct.la.x-ft,Ct.S.y+(135<E?(rt?-Xt:-Ct.Da.height)+Ct.la.y-ot:zt+ot+Ct.la.y)):Ct.S.h(Ct.S.x+(135<E?(rt?-Yt:-Ct.Da.width)+Ct.la.x-ot:At+ot+Ct.la.x),Ct.S.y+Ct.la.y-It);x?(Yt=zv(y,Yt,ft),0>ft&&(ft=0),135<E&&(It+=Xt+ot),Xt=Math.max(Math.max(Xt,zt),Xt+zt+ot)):(135<E&&(ft+=Yt+ot),Yt=Math.max(Math.max(Yt,At),Yt+At+ot),Xt=Vv(y,Xt,It),0>It&&(It=0)),y.la.h(ft,It),y.Da.h(Yt,Xt)}}Ti.prototype.customAlignment=function(a,y,x,E,b){return[y,x,E,b]};function h1(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new Me(E,0,b,z);if(tt===1)return y=x[0],b=y.Da.width,z=y.Da.height,new Me(E,0,b,z);for(var rt=y.nodeSpacing,ot=y.rowSpacing,at=rA(y)===90,At=0,ft=0,pt=0,xt=0;xt<tt;xt++)if(!(xt%2!==0||1<tt&&xt===tt-1)){var Ct=x[xt],Mt=Ct.Da,Gt=At===0?0:ot;if(at){var It=a.computeBusNodeSpacing(Ct)-rt;Ct.S.h(E-(Mt.width+It),pt+Gt),b=Math.max(b,Mt.width+It),z=Math.max(z,pt+Gt+Mt.height),pt+=Gt+Mt.height}else It=a.computeBusNodeSpacing(Ct)-rt,Ct.S.h(ft+Gt,E-(Mt.height+It)),z=Math.max(z,Mt.height+It),b=Math.max(b,ft+Gt+Mt.width),ft+=Gt+Mt.width;At++}for(At=0,Ct=ft,xt=pt,at?(ft=E+rt,pt=0):(ft=0,pt=E+rt),Mt=0;Mt<tt;Mt++)if(Mt%2!==0){Gt=x[Mt],It=Gt.Da;var zt=At===0?0:ot;if(at){var Yt=a.computeBusNodeSpacing(Gt)-rt;Gt.S.h(ft+Yt,pt+zt),b=Math.max(b,ft+It.width+Yt),z=Math.max(z,pt+zt+It.height),pt+=zt+It.height}else Yt=a.computeBusNodeSpacing(Gt)-rt,Gt.S.h(ft+zt,pt+Yt),b=Math.max(b,ft+zt+It.width),z=Math.max(z,pt+It.height+Yt),ft+=zt+It.width;At++}return 1<tt&&tt%2===1&&(x=x[tt-1],tt=x.Da,a=a.computeBusLastRowSpacing(x,at?Math.max(Math.abs(xt),Math.abs(pt)):Math.max(Math.abs(Ct),Math.abs(ft))),at?(x.S.h(E+rt/2-x.focus.x-x.la.x,z+a),at=E+rt/2-x.focus.x-x.la.x,b=Math.max(b,at+tt.width),0>at&&(b-=at),z=Math.max(z,Math.max(xt,pt)+a+tt.height),0>x.S.x&&(E=Am(y,x.S.x,!1,E,rt))):(x.S.h(b+a,E+rt/2-x.focus.y-x.la.y),b=Math.max(b,Math.max(Ct,ft)+a+tt.width),pt=E+rt/2-x.focus.y-x.la.y,z=Math.max(z,pt+tt.height),0>pt&&(z-=pt),0>x.S.y&&(E=Am(y,x.S.y,!0,E,rt)))),new Me(E,0,b,z)}function g1(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new Me(E,0,b,z);if(tt===1)return x=x[0],b=x.Da.width,z=x.Da.height,new Me(E,0,b,z);for(var rt=y.nodeSpacing,ot=y.rowSpacing,at=rA(y)===270,At=0,ft=0,pt=0,xt=0;xt<tt;xt++)if(!(xt%2!==0||1<tt&&xt===tt-1)){var Ct=x[xt],Mt=Ct.Da,Gt=At===0?0:ot;if(at){var It=a.computeBusNodeSpacing(Ct)-rt;pt-=Gt+Mt.height,Ct.S.h(E-(Mt.width+It),pt),b=Math.max(b,Mt.width+It),z=Math.max(z,Math.abs(pt))}else It=a.computeBusNodeSpacing(Ct)-rt,ft-=Gt+Mt.width,Ct.S.h(ft,E-(Mt.height+It)),z=Math.max(z,Mt.height+It),b=Math.max(b,Math.abs(ft));At++}for(At=0,Ct=ft,xt=pt,at?(ft=E+rt,pt=0):(ft=0,pt=E+rt),Mt=0;Mt<tt;Mt++)if(Mt%2!==0){Gt=x[Mt],It=Gt.Da;var zt=At===0?0:ot;if(at){var Yt=a.computeBusNodeSpacing(Gt)-rt;pt-=zt+It.height,Gt.S.h(ft+Yt,pt),b=Math.max(b,ft+It.width+Yt),z=Math.max(z,Math.abs(pt))}else Yt=a.computeBusNodeSpacing(Gt)-rt,ft-=zt+It.width,Gt.S.h(ft,pt+Yt),z=Math.max(z,pt+It.height+Yt),b=Math.max(b,Math.abs(ft));At++}for(1<tt&&tt%2===1&&(ot=x[tt-1],At=ot.Da,a=a.computeBusLastRowSpacing(ot,at?Math.max(Math.abs(xt),Math.abs(pt)):Math.max(Math.abs(Ct),Math.abs(ft))),at?(ot.S.h(E+rt/2-ot.focus.x-ot.la.x,-z-At.height-a),ft=E+rt/2-ot.focus.x-ot.la.x,b=Math.max(b,ft+At.width),0>ft&&(b-=ft),z=Math.max(z,Math.abs(Math.min(xt,pt))+a+At.height),0>ot.S.x&&(E=Am(y,ot.S.x,!1,E,rt))):(ot.S.h(-b-At.width-a,E+rt/2-ot.focus.y-ot.la.y),b=Math.max(b,Math.abs(Math.min(Ct,ft))+a+At.width),pt=E+rt/2-ot.focus.y-ot.la.y,z=Math.max(z,pt+At.height),0>pt&&(z-=pt),0>ot.S.y&&(E=Am(y,ot.S.y,!0,E,rt)))),y=0;y<tt;y++)rt=x[y],at?rt.S.h(rt.S.x,rt.S.y+z):rt.S.h(rt.S.x+b,rt.S.y);return new Me(E,0,b,z)}Ti.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Ti.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function Am(a,y,x,E,b){a=a.children;for(var z=a.length,tt=0;tt<z;tt++)x?a[tt].S.h(a[tt].S.x,a[tt].S.y-y):a[tt].S.h(a[tt].S.x-y,a[tt].S.y);return y=a[z-1],Math.max(E,x?y.la.y+y.focus.y-b/2:y.la.x+y.focus.x-b/2)}function zv(a,y,x){switch(a.alignment){case Vd:case Oc:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case bu:return a.width>y?a.width:y;case Tu:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case ng:case Nu:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case ig:return a.width-a.focus.x+a.nodeSpacing/2+y;case sh:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Vv(a,y,x){switch(a.alignment){case Vd:case Oc:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case bu:return a.height>y?a.height:y;case Tu:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case ng:case Nu:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case ig:return a.height-a.focus.y+a.nodeSpacing/2+y;case sh:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Wv(a,y,x){switch(a){case Oc:y/=2,x/=2;break;case Vd:y/=2,x/=2;break;case bu:x=y=0;break;case Tu:break;default:pe("Unhandled alignment value "+a.toString())}return new Rt(y,x)}function Yf(a,y,x,E,b,z){y=Wv(y,x,E),Kd(a,y.x,y.y,b,z)}function Kd(a,y,x,E,b){if(y!==0||x!==0)for(a=a.children;E<=b;E++){var z=a[E].S;z.x+=y,z.y+=x}}function um(a,y,x,E){var b=y.parent;switch(a.ud){case ku:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===b&&y.relativePoint.h(x,E);break;case zd:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===b&&y.relativePoint.h(x,E);break;default:pe("Unhandled path value "+a.ud.toString())}}function hm(a,y,x){for(var E=0;E<a.length;E++){var b=a[E];b.x+=y,b.y+=x}}function f1(a,y,x,E,b,z,tt,rt){var ot=rA(y),at=ot===90||ot===270,At=y.nodeSpacing;y=E;var ft=b;E=z;var pt=tt,xt=x.Yo,Ct=x.kp;tt=x.Da;var Mt=at?Math.max(pt,tt.height):Math.max(E,tt.width);if((xt===null||ot!==rA(x))&&(xt=Ua(a,2),Ct=Ua(a,2),at?(xt[0].h(0,0),xt[1].h(0,tt.height),Ct[0].h(tt.width,0),Ct[1].h(Ct[0].x,xt[1].y)):(xt[0].h(0,0),xt[1].h(tt.width,0),Ct[0].h(0,tt.height),Ct[1].h(xt[1].x,Ct[0].y))),at){if(pt=9999999,!(ft===null||2>ft.length||xt===null||2>xt.length))for(b=x=0;x<ft.length&&b<xt.length;){z=ft[x];var Gt=xt[b];ot=Gt.x,at=Gt.y,ot+=E;var It=z;x+1<ft.length&&(It=ft[x+1]);var zt=Gt;Gt=zt.x,zt=zt.y,b+1<xt.length&&(zt=xt[b+1],Gt=zt.x,zt=zt.y,Gt+=E);var Yt=pt;z.y===at?Yt=ot-z.x:z.y>at&&z.y<zt?Yt=ot+(z.y-at)/(zt-at)*(Gt-ot)-z.x:at>z.y&&at<It.y&&(Yt=ot-(z.x+(at-z.y)/(It.y-z.y)*(It.x-z.x))),Yt<pt&&(pt=Yt),It.y<=z.y?x++:zt<=at?b++:(It.y<=zt&&x++,zt<=It.y&&b++)}if(pt=E-pt,pt+=At,x=xt,b=pt,y===null||2>y.length||x===null||2>x.length)E=null;else{for(At=Ua(a,y.length+x.length),E=z=ot=0;z<x.length&&x[z].y<y[0].y;)at=x[z++],At[E++].h(at.x+b,at.y);for(;ot<y.length;)at=y[ot++],At[E++].h(at.x,at.y);for(ot=y[y.length-1].y;z<x.length&&x[z].y<=ot;)z++;for(;z<x.length&&x[z].y>ot;)at=x[z++],At[E++].h(at.x+b,at.y);for(x=Ua(a,E),ot=0;ot<E;ot++)x[ot].assign(At[ot]);SA(a,At),E=x}if(z=Ct,ot=pt,ft===null||2>ft.length||z===null||2>z.length)b=null;else{for(At=Ua(a,ft.length+z.length),b=at=x=0;x<ft.length&&ft[x].y<z[0].y;)It=ft[x++],At[b++].h(It.x,It.y);for(;at<z.length;)It=z[at++],At[b++].h(It.x+ot,It.y);for(z=z[z.length-1].y;x<ft.length&&ft[x].y<=z;)x++;for(;x<ft.length&&ft[x].y>z;)ot=ft[x++],At[b++].h(ot.x,ot.y);for(z=Ua(a,b),x=0;x<b;x++)z[x].assign(At[x]);SA(a,At),b=z}return z=Math.max(0,pt)+tt.width,tt=Mt,SA(a,y),SA(a,xt),SA(a,ft),SA(a,Ct),rt[0]=E,rt[1]=b,new Me(pt,0,z,tt)}if(E=9999999,!(ft===null||2>ft.length||xt===null||2>xt.length))for(b=x=0;x<ft.length&&b<xt.length;)z=ft[x],Gt=xt[b],ot=Gt.x,at=Gt.y,at+=pt,It=z,x+1<ft.length&&(It=ft[x+1]),zt=Gt,Gt=zt.x,zt=zt.y,b+1<xt.length&&(zt=xt[b+1],Gt=zt.x,zt=zt.y,zt+=pt),Yt=E,z.x===ot?Yt=at-z.y:z.x>ot&&z.x<Gt?Yt=at+(z.x-ot)/(Gt-ot)*(zt-at)-z.y:ot>z.x&&ot<It.x&&(Yt=at-(z.y+(ot-z.x)/(It.x-z.x)*(It.y-z.y))),Yt<E&&(E=Yt),It.x<=z.x?x++:Gt<=ot?b++:(It.x<=Gt&&x++,Gt<=It.x&&b++);if(pt-=E,pt+=At,x=xt,b=pt,y===null||2>y.length||x===null||2>x.length)E=null;else{for(At=Ua(a,y.length+x.length),E=z=ot=0;z<x.length&&x[z].x<y[0].x;)at=x[z++],At[E++].h(at.x,at.y+b);for(;ot<y.length;)at=y[ot++],At[E++].h(at.x,at.y);for(ot=y[y.length-1].x;z<x.length&&x[z].x<=ot;)z++;for(;z<x.length&&x[z].x>ot;)at=x[z++],At[E++].h(at.x,at.y+b);for(x=Ua(a,E),ot=0;ot<E;ot++)x[ot].assign(At[ot]);SA(a,At),E=x}if(z=Ct,ot=pt,ft===null||2>ft.length||z===null||2>z.length)b=null;else{for(At=Ua(a,ft.length+z.length),b=at=x=0;x<ft.length&&ft[x].x<z[0].x;)It=ft[x++],At[b++].h(It.x,It.y);for(;at<z.length;)It=z[at++],At[b++].h(It.x,It.y+ot);for(z=z[z.length-1].x;x<ft.length&&ft[x].x<=z;)x++;for(;x<ft.length&&ft[x].x>z;)ot=ft[x++],At[b++].h(ot.x,ot.y);for(z=Ua(a,b),x=0;x<b;x++)z[x].assign(At[x]);SA(a,At),b=z}return z=Mt,tt=Math.max(0,pt)+tt.height,SA(a,y),SA(a,xt),SA(a,ft),SA(a,Ct),rt[0]=E,rt[1]=b,new Me(pt,0,z,tt)}function Ua(a,y){if(a=a.ru[y],a!==void 0&&(a=a.pop(),a!==void 0))return a;a=[];for(var x=0;x<y;x++)a[x]=new Rt;return a}function SA(a,y){var x=y.length,E=a.ru[x];E===void 0&&(E=[],a.ru[x]=E),E.push(y)}Ti.prototype.arrangeTrees=function(){if(this.Rb===pm)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof Ql){var x=y.node;if(x!==null){var E=x.position;x=E.x,E=E.y,isFinite(x)||(x=0),isFinite(E)||(E=0),_v(this,y,x,E)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof Ql&&a.push(x);switch(this.sorting){case Hc:break;case Op:a.reverse();break;case Rp:a.sort(this.comparer);break;case Gp:a.sort(this.comparer),a.reverse();break;default:pe("Unhandled sorting value "+this.sorting.toString())}for(x=this.arrangementOrigin,y=x.x,x=x.y,E=0;E<a.length;E++){var b=a[E];switch(_v(this,b,y+b.la.x,x+b.la.y),this.Rb){case cm:x+=b.Da.height+this.$d.height;break;case Jv:y+=b.Da.width+this.$d.width;break;default:pe("Unhandled arrangement value "+this.Rb.toString())}}}};function _v(a,y,x,E){if(y!==null){y.x=x,y.y=E,y=y.children;for(var b=y.length,z=0;z<b;z++){var tt=y[z];_v(a,tt,x+tt.S.x,E+tt.S.y)}}}Ti.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Ti.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Ti.prototype.Gu=function(){if(this.layerStyle===mm){for(var a=this.$v,y=[],x=null,E=this.network.vertexes.iterator;E.next();){var b=E.value;x===null?x=b.bounds.copy():x.ed(b.bounds);var z=y[b.level];z===void 0?z=this.computeLayerSpacing(b):z=Math.max(z,this.computeLayerSpacing(b)),y[b.level]=z}for(E=0;E<y.length;E++)y[E]===void 0&&(y[E]=0);if(this.angle===90||this.angle===270?(x.Bc(this.nodeSpacing/2,this.layerSpacing),E=new Rt(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),E=new Rt(-this.layerSpacing/2,-this.nodeSpacing/2)),b=[],x=this.angle===90||this.angle===270?x.width:x.height,z=0,this.angle===180||this.angle===270)for(var tt=0;tt<a.length;tt++)z+=a[tt]+y[tt];for(tt=0;tt<a.length;tt++){var rt=a[tt]+y[tt];this.angle===270?(z-=rt,b.push(new Me(0,z,x,rt))):this.angle===90?(b.push(new Me(0,z,x,rt)),z+=rt):this.angle===180?(z-=rt,b.push(new Me(z,0,rt,x))):(b.push(new Me(z,0,rt,x)),z+=rt)}this.commitLayers(b,E)}},Ti.prototype.commitLayers=function(){},Ti.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Ti.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof Ql&&d1(this,y)}};function d1(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,E=0;E<x;E++)d1(a,y[E])}}Ti.prototype.setPortSpots=function(a){var y=a.alignment;if(qg(y)){var x=this.ud===ku,E=rA(a);switch(E){case 0:var b=jo;break;case 90:b=Qs;break;case 180:b=io;break;default:b=As}var z=a.children,tt=z.length;switch(y){case ng:case Nu:for(y=0;y<tt;y++){var rt=z[y];if(rt=(x?rt.sourceEdges:rt.destinationEdges).first(),rt!==null&&(rt=rt.link,rt!==null)){var ot=E===90||E===270?io:As;if(tt===1||y===tt-1&&tt%2===1)switch(E){case 0:ot=io;break;case 90:ot=As;break;case 180:ot=jo;break;default:ot=Qs}else y%2===0&&(ot=E===90||E===270?jo:Qs);x?(a.setsPortSpot&&(rt.fromSpot=b),a.setsChildPortSpot&&(rt.toSpot=ot)):(a.setsPortSpot&&(rt.fromSpot=ot),a.setsChildPortSpot&&(rt.toSpot=b))}}break;case ig:for(E=E===90||E===270?jo:Qs,z=x?a.destinationEdges:a.sourceEdges;z.next();)tt=z.value.link,tt!==null&&(x?(a.setsPortSpot&&(tt.fromSpot=b),a.setsChildPortSpot&&(tt.toSpot=E)):(a.setsPortSpot&&(tt.fromSpot=E),a.setsChildPortSpot&&(tt.toSpot=b)));break;case sh:for(E=E===90||E===270?io:As,z=x?a.destinationEdges:a.sourceEdges;z.next();)tt=z.value.link,tt!==null&&(x?(a.setsPortSpot&&(tt.fromSpot=b),a.setsChildPortSpot&&(tt.toSpot=E)):(a.setsPortSpot&&(tt.fromSpot=E),a.setsChildPortSpot&&(tt.toSpot=b)))}}else if(x=rA(a),this.ud===ku){for(b=a.destinationEdges;b.next();)if(E=b.value.link,E!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:E.fromSpot=jo;break;case 90:E.fromSpot=Qs;break;case 180:E.fromSpot=io;break;default:E.fromSpot=As}else E.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.toSpot=io;break;case 90:E.toSpot=As;break;case 180:E.toSpot=jo;break;default:E.toSpot=Qs}else E.toSpot=a.childPortSpot}}else for(b=a.sourceEdges;b.next();)if(E=b.value.link,E!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:E.toSpot=jo;break;case 90:E.toSpot=Qs;break;case 180:E.toSpot=io;break;default:E.toSpot=As}else E.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.fromSpot=io;break;case 90:E.fromSpot=As;break;case 180:E.fromSpot=jo;break;default:E.fromSpot=Qs}else E.fromSpot=a.childPortSpot}};function rA(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}Ti.prototype.computeLayerSpacing=function(a){var y=rA(a);y=y===90||y===270;var x=a.layerSpacing;if(0<a.layerSpacingParentOverlap){var E=Math.min(1,a.layerSpacingParentOverlap);x-=y?a.height*E:a.width*E}return x<(y?-a.height:-a.width)&&(x=y?-a.height:-a.width),x},Ti.prototype.computeNodeIndent=function(a){var y=rA(a),x=a.nodeIndent;if(0<a.nodeIndentPastParent){var E=Math.min(1,a.nodeIndentPastParent);x+=y===90||y===270?a.width*E:a.height*E}return x=Math.max(0,x)},Ie.Object.defineProperties(Ti.prototype,{roots:{get:function(){return this.Ub},set:function(a){this.Ub!==a&&(this.Ub=a,this.C())}},path:{get:function(){return this.Wn},set:function(a){this.Wn!==a&&(this.Wn=a,this.C())}},treeStyle:{get:function(){return this.vo},set:function(a){this.Rb===a||a!==dm&&a!==Xv&&a!==Yv&&a!==Zv||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==qv&&a!==$v&&a!==mm||(this.Bq=a,this.C())}},comments:{get:function(){return this.td},set:function(a){this.td!==a&&(this.td=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==cm&&a!==Jv&&a!==pm||(this.Rb=a,this.C())}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},rootDefaults:{get:function(){return this.W},set:function(a){this.W!==a&&(this.W=a,this.C())}},alternateDefaults:{get:function(){return this.Y},set:function(a){this.Y!==a&&(this.Y=a,this.C())}},sorting:{get:function(){return this.W.sorting},set:function(a){this.W.sorting===a||a!==Hc&&a!==Op&&a!==Rp&&!Gp||(this.W.sorting=a,this.C())}},comparer:{get:function(){return this.W.comparer},set:function(a){this.W.comparer!==a&&(this.W.comparer=a,this.C())}},angle:{get:function(){return this.W.angle},set:function(a){this.W.angle!==a&&(a===0||a===90||a===180||a===270?(this.W.angle=a,this.C()):pe("TreeLayout.angle must be 0, 90, 180, or 270"))}},alignment:{get:function(){return this.W.alignment},set:function(a){this.W.alignment!==a&&(this.W.alignment=a,this.C())}},nodeIndent:{get:function(){return this.W.nodeIndent},set:function(a){this.W.nodeIndent!==a&&0<=a&&(this.W.nodeIndent=a,this.C())}},nodeIndentPastParent:{get:function(){return this.W.nodeIndentPastParent},set:function(a){this.W.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.W.nodeIndentPastParent=a,this.C())}},nodeSpacing:{get:function(){return this.W.nodeSpacing},set:function(a){this.W.nodeSpacing!==a&&(this.W.nodeSpacing=a,this.C())}},layerSpacing:{get:function(){return this.W.layerSpacing},set:function(a){this.W.layerSpacing!==a&&(this.W.layerSpacing=a,this.C())}},layerSpacingParentOverlap:{get:function(){return this.W.layerSpacingParentOverlap},set:function(a){this.W.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.W.layerSpacingParentOverlap=a,this.C())}},compaction:{get:function(){return this.W.compaction},set:function(a){this.W.compaction===a||a!==fm&&a!==jp||(this.W.compaction=a,this.C())}},breadthLimit:{get:function(){return this.W.breadthLimit},set:function(a){this.W.breadthLimit!==a&&0<=a&&(this.W.breadthLimit=a,this.C())}},rowSpacing:{get:function(){return this.W.rowSpacing},set:function(a){this.W.rowSpacing!==a&&(this.W.rowSpacing=a,this.C())}},rowIndent:{get:function(){return this.W.rowIndent},set:function(a){this.W.rowIndent!==a&&0<=a&&(this.W.rowIndent=a,this.C())}},commentSpacing:{get:function(){return this.W.commentSpacing},set:function(a){this.W.commentSpacing!==a&&(this.W.commentSpacing=a,this.C())}},commentMargin:{get:function(){return this.W.commentMargin},set:function(a){this.W.commentMargin!==a&&(this.W.commentMargin=a,this.C())}},setsPortSpot:{get:function(){return this.W.setsPortSpot},set:function(a){this.W.setsPortSpot!==a&&(this.W.setsPortSpot=a,this.C())}},portSpot:{get:function(){return this.W.portSpot},set:function(a){this.W.portSpot.D(a)||(this.W.portSpot=a,this.C())}},setsChildPortSpot:{get:function(){return this.W.setsChildPortSpot},set:function(a){this.W.setsChildPortSpot!==a&&(this.W.setsChildPortSpot=a,this.C())}},childPortSpot:{get:function(){return this.W.childPortSpot},set:function(a){this.W.childPortSpot.D(a)||(this.W.childPortSpot=a,this.C())}},alternateSorting:{get:function(){return this.Y.sorting},set:function(a){this.Y.sorting===a||a!==Hc&&a!==Op&&a!==Rp&&!Gp||(this.Y.sorting=a,this.C())}},alternateComparer:{get:function(){return this.Y.comparer},set:function(a){this.Y.comparer!==a&&(this.Y.comparer=a,this.C())}},alternateAngle:{get:function(){return this.Y.angle},set:function(a){this.Y.angle===a||a!==0&&a!==90&&a!==180&&a!==270||(this.Y.angle=a,this.C())}},alternateAlignment:{get:function(){return this.Y.alignment},set:function(a){this.Y.alignment!==a&&(this.Y.alignment=a,this.C())}},alternateNodeIndent:{get:function(){return this.Y.nodeIndent},set:function(a){this.Y.nodeIndent!==a&&0<=a&&(this.Y.nodeIndent=a,this.C())}},alternateNodeIndentPastParent:{get:function(){return this.Y.nodeIndentPastParent},set:function(a){this.Y.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.Y.nodeIndentPastParent=a,this.C())}},alternateNodeSpacing:{get:function(){return this.Y.nodeSpacing},set:function(a){this.Y.nodeSpacing!==a&&(this.Y.nodeSpacing=a,this.C())}},alternateLayerSpacing:{get:function(){return this.Y.layerSpacing},set:function(a){this.Y.layerSpacing!==a&&(this.Y.layerSpacing=a,this.C())}},alternateLayerSpacingParentOverlap:{get:function(){return this.Y.layerSpacingParentOverlap},set:function(a){this.Y.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.Y.layerSpacingParentOverlap=a,this.C())}},alternateCompaction:{get:function(){return this.Y.compaction},set:function(a){this.Y.compaction===a||a!==fm&&a!==jp||(this.Y.compaction=a,this.C())}},alternateBreadthLimit:{get:function(){return this.Y.breadthLimit},set:function(a){this.Y.breadthLimit!==a&&0<=a&&(this.Y.breadthLimit=a,this.C())}},alternateRowSpacing:{get:function(){return this.Y.rowSpacing},set:function(a){this.Y.rowSpacing!==a&&(this.Y.rowSpacing=a,this.C())}},alternateRowIndent:{get:function(){return this.Y.rowIndent},set:function(a){this.Y.rowIndent!==a&&0<=a&&(this.Y.rowIndent=a,this.C())}},alternateCommentSpacing:{get:function(){return this.Y.commentSpacing},set:function(a){this.Y.commentSpacing!==a&&(this.Y.commentSpacing=a,this.C())}},alternateCommentMargin:{get:function(){return this.Y.commentMargin},set:function(a){this.Y.commentMargin!==a&&(this.Y.commentMargin=a,this.C())}},alternateSetsPortSpot:{get:function(){return this.Y.setsPortSpot},set:function(a){this.Y.setsPortSpot!==a&&(this.Y.setsPortSpot=a,this.C())}},alternatePortSpot:{get:function(){return this.Y.portSpot},set:function(a){this.Y.portSpot.D(a)||(this.Y.portSpot=a,this.C())}},alternateSetsChildPortSpot:{get:function(){return this.Y.setsChildPortSpot},set:function(a){this.Y.setsChildPortSpot!==a&&(this.Y.setsChildPortSpot=a,this.C())}},alternateChildPortSpot:{get:function(){return this.Y.childPortSpot},set:function(a){this.Y.childPortSpot.D(a)||(this.Y.childPortSpot=a,this.C())}}});var gm=new ce(Ti,"PathDefault",-1),ku=new ce(Ti,"PathDestination",0),zd=new ce(Ti,"PathSource",1),Hc=new ce(Ti,"SortingForwards",10),Op=new ce(Ti,"SortingReverse",11),Rp=new ce(Ti,"SortingAscending",12),Gp=new ce(Ti,"SortingDescending",13),Oc=new ce(Ti,"AlignmentCenterSubtrees",20),Vd=new ce(Ti,"AlignmentCenterChildren",21),bu=new ce(Ti,"AlignmentStart",22),Tu=new ce(Ti,"AlignmentEnd",23),ng=new ce(Ti,"AlignmentBus",24),Nu=new ce(Ti,"AlignmentBusBranching",25),ig=new ce(Ti,"AlignmentTopLeftBus",26),sh=new ce(Ti,"AlignmentBottomRightBus",27),fm=new ce(Ti,"CompactionNone",30),jp=new ce(Ti,"CompactionBlock",31),dm=new ce(Ti,"StyleLayered",40),Yv=new ce(Ti,"StyleLastParents",41),Xv=new ce(Ti,"StyleAlternating",42),Zv=new ce(Ti,"StyleRootOnly",43),cm=new ce(Ti,"ArrangementVertical",50),Jv=new ce(Ti,"ArrangementHorizontal",51),pm=new ce(Ti,"ArrangementFixedRoots",52),qv=new ce(Ti,"LayerIndividual",60),$v=new ce(Ti,"LayerSiblings",61),mm=new ce(Ti,"LayerUniform",62);Ti.className="TreeLayout",Ti.PathDefault=gm,Ti.PathDestination=ku,Ti.PathSource=zd,Ti.SortingForwards=Hc,Ti.SortingReverse=Op,Ti.SortingAscending=Rp,Ti.SortingDescending=Gp,Ti.AlignmentCenterSubtrees=Oc,Ti.AlignmentCenterChildren=Vd,Ti.AlignmentStart=bu,Ti.AlignmentEnd=Tu,Ti.AlignmentBus=ng,Ti.AlignmentBusBranching=Nu,Ti.AlignmentTopLeftBus=ig,Ti.AlignmentBottomRightBus=sh,Ti.CompactionNone=fm,Ti.CompactionBlock=jp,Ti.StyleLayered=dm,Ti.StyleLastParents=Yv,Ti.StyleAlternating=Xv,Ti.StyleRootOnly=Zv,Ti.ArrangementVertical=cm,Ti.ArrangementHorizontal=Jv,Ti.ArrangementFixedRoots=pm,Ti.LayerIndividual=qv,Ti.LayerSiblings=$v,Ti.LayerUniform=mm;function Wd(a){xr.call(this,a)}ue(Wd,xr),Wd.prototype.createVertex=function(){return new Ql(this)},Wd.prototype.createEdge=function(){return new Rc(this)},Wd.className="TreeNetwork";function Ql(a){Oo.call(this,a),this.V=!1,this.hb=null,this.u=[],this.nb=this.Ha=this.F=this.ia=0,this.td=null,this.S=new Rt(0,0),this.Da=new an(0,0),this.la=new Rt(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Hc,this.hd=yv,this.Kb=0,this.Jb=Vd,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=jp,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=Xo,this.wr=!0,this.Dp=Xo}ue(Ql,Oo),Ql.prototype.copyInheritedPropertiesFrom=function(a){a!==null&&(this.nd=a.sorting,this.hd=a.comparer,this.Kb=a.angle,this.Jb=a.alignment,this.Uq=a.nodeIndent,this.Vq=a.nodeIndentPastParent,this.Wq=a.nodeSpacing,this.ie=a.layerSpacing,this.Aq=a.layerSpacingParentOverlap,this.Hp=a.compaction,this.Ap=a.breadthLimit,this.nr=a.rowSpacing,this.mr=a.rowIndent,this.Gp=a.commentSpacing,this.Fp=a.commentMargin,this.xr=a.setsPortSpot,this.dr=a.portSpot,this.wr=a.setsChildPortSpot,this.Dp=a.childPortSpot)},Ie.Object.defineProperties(Ql.prototype,{initialized:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}},parent:{get:function(){return this.hb},set:function(a){this.hb!==a&&(this.hb=a)}},children:{get:function(){return this.u},set:function(a){if(this.u!==a){if(a!==null)for(var y=a.length,x=0;x<y;x++);this.u=a}}},level:{get:function(){return this.ia},set:function(a){this.ia!==a&&(this.ia=a)}},descendantCount:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}},maxChildrenCount:{get:function(){return this.Ha},set:function(a){this.Ha!==a&&(this.Ha=a)}},maxGenerationCount:{get:function(){return this.nb},set:function(a){this.nb!==a&&(this.nb=a)}},comments:{get:function(){return this.td},set:function(a){if(this.td!==a){if(a!==null)for(var y=a.length,x=0;x<y;x++);this.td=a}}},sorting:{get:function(){return this.nd},set:function(a){this.nd!==a&&(this.nd=a)}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a)}},angle:{get:function(){return this.Kb},set:function(a){this.Kb!==a&&(this.Kb=a)}},alignment:{get:function(){return this.Jb},set:function(a){this.Jb!==a&&(this.Jb=a)}},nodeIndent:{get:function(){return this.Uq},set:function(a){this.Uq!==a&&(this.Uq=a)}},nodeIndentPastParent:{get:function(){return this.Vq},set:function(a){this.Vq!==a&&(this.Vq=a)}},nodeSpacing:{get:function(){return this.Wq},set:function(a){this.Wq!==a&&(this.Wq=a)}},layerSpacing:{get:function(){return this.ie},set:function(a){this.ie!==a&&(this.ie=a)}},layerSpacingParentOverlap:{get:function(){return this.Aq},set:function(a){this.Aq!==a&&(this.Aq=a)}},compaction:{get:function(){return this.Hp},set:function(a){this.Hp!==a&&(this.Hp=a)}},breadthLimit:{get:function(){return this.Ap},set:function(a){this.Ap!==a&&(this.Ap=a)}},rowSpacing:{get:function(){return this.nr},set:function(a){this.nr!==a&&(this.nr=a)}},rowIndent:{get:function(){return this.mr},set:function(a){this.mr!==a&&(this.mr=a)}},commentSpacing:{get:function(){return this.Gp},set:function(a){this.Gp!==a&&(this.Gp=a)}},commentMargin:{get:function(){return this.Fp},set:function(a){this.Fp!==a&&(this.Fp=a)}},setsPortSpot:{get:function(){return this.xr},set:function(a){this.xr!==a&&(this.xr=a)}},portSpot:{get:function(){return this.dr},set:function(a){this.dr.D(a)||(this.dr=a)}},setsChildPortSpot:{get:function(){return this.wr},set:function(a){this.wr!==a&&(this.wr=a)}},childPortSpot:{get:function(){return this.Dp},set:function(a){this.Dp.D(a)||(this.Dp=a)}},childrenCount:{get:function(){return this.children.length}},relativePosition:{get:function(){return this.S},set:function(a){this.S.set(a)}},subtreeSize:{get:function(){return this.Da},set:function(a){this.Da.set(a)}},subtreeOffset:{get:function(){return this.la},set:function(a){this.la.set(a)}}}),Ql.className="TreeVertex";function Rc(a){Za.call(this,a),this.$t=new Rt(0,0)}ue(Rc,Za),Rc.prototype.commit=function(){var a=this.link;if(a!==null&&!a.isAvoiding){var y=this.network.layout,x=null,E=null;switch(y.ud){case ku:x=this.fromVertex,E=this.toVertex;break;case zd:x=this.toVertex,E=this.fromVertex;break;default:pe("Unhandled path value "+y.ud.toString())}if(x!==null&&E!==null){var b=this.$t;if(b.x!==0||b.y!==0||x.qA){E=x.bounds;var z=rA(x),tt=y.computeLayerSpacing(x),rt=x.rowSpacing;a.vg();var ot=a.curve===Al,at=a.isOrthogonal,At;if(a.uh(),at||ot){for(At=2;4<a.pointsCount;)a.pv(2);var ft=a.i(1),pt=a.i(2)}else{for(At=1;3<a.pointsCount;)a.pv(1);ft=a.i(0),pt=a.i(a.pointsCount-1)}var xt=a.i(a.pointsCount-1);z===0?(x.alignment===Tu?(z=E.bottom+b.y,b.y===0&&ft.y>xt.y+x.rowIndent&&(z=Math.min(z,Math.max(ft.y,z-y.computeNodeIndent(x))))):x.alignment===bu?(z=E.top+b.y,b.y===0&&ft.y<xt.y-x.rowIndent&&(z=Math.max(z,Math.min(ft.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.top-x.la.y+b.y:E.y+E.height/2+b.y,ot?(a.m(At,ft.x,z),At++,a.m(At,E.right+tt,z),At++,a.m(At,E.right+tt+(b.x-rt)/3,z),At++,a.m(At,E.right+tt+2*(b.x-rt)/3,z),At++,a.m(At,E.right+tt+(b.x-rt),z),At++,a.m(At,pt.x,z)):(at&&(a.m(At,E.right+tt/2,ft.y),At++),a.m(At,E.right+tt/2,z),At++,a.m(At,E.right+tt+b.x-(at?rt/2:rt),z),At++,at&&a.m(At,a.i(At-1).x,pt.y))):z===90?(x.alignment===Tu?(z=E.right+b.x,b.x===0&&ft.x>xt.x+x.rowIndent&&(z=Math.min(z,Math.max(ft.x,z-y.computeNodeIndent(x))))):x.alignment===bu?(z=E.left+b.x,b.x===0&&ft.x<xt.x-x.rowIndent&&(z=Math.max(z,Math.min(ft.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.left-x.la.x+b.x:E.x+E.width/2+b.x,ot?(a.m(At,z,ft.y),At++,a.m(At,z,E.bottom+tt),At++,a.m(At,z,E.bottom+tt+(b.y-rt)/3),At++,a.m(At,z,E.bottom+tt+2*(b.y-rt)/3),At++,a.m(At,z,E.bottom+tt+(b.y-rt)),At++,a.m(At,z,pt.y)):(at&&(a.m(At,ft.x,E.bottom+tt/2),At++),a.m(At,z,E.bottom+tt/2),At++,a.m(At,z,E.bottom+tt+b.y-(at?rt/2:rt)),At++,at&&a.m(At,pt.x,a.i(At-1).y))):z===180?(x.alignment===Tu?(z=E.bottom+b.y,b.y===0&&ft.y>xt.y+x.rowIndent&&(z=Math.min(z,Math.max(ft.y,z-y.computeNodeIndent(x))))):x.alignment===bu?(z=E.top+b.y,b.y===0&&ft.y<xt.y-x.rowIndent&&(z=Math.max(z,Math.min(ft.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.top-x.la.y+b.y:E.y+E.height/2+b.y,ot?(a.m(At,ft.x,z),At++,a.m(At,E.left-tt,z),At++,a.m(At,E.left-tt+(b.x+rt)/3,z),At++,a.m(At,E.left-tt+2*(b.x+rt)/3,z),At++,a.m(At,E.left-tt+(b.x+rt),z),At++,a.m(At,pt.x,z)):(at&&(a.m(At,E.left-tt/2,ft.y),At++),a.m(At,E.left-tt/2,z),At++,a.m(At,E.left-tt+b.x+(at?rt/2:rt),z),At++,at&&a.m(At,a.i(At-1).x,pt.y))):z===270?(x.alignment===Tu?(z=E.right+b.x,b.x===0&&ft.x>xt.x+x.rowIndent&&(z=Math.min(z,Math.max(ft.x,z-y.computeNodeIndent(x))))):x.alignment===bu?(z=E.left+b.x,b.x===0&&ft.x<xt.x-x.rowIndent&&(z=Math.max(z,Math.min(ft.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.left-x.la.x+b.x:E.x+E.width/2+b.x,ot?(a.m(At,z,ft.y),At++,a.m(At,z,E.top-tt),At++,a.m(At,z,E.top-tt+(b.y+rt)/3),At++,a.m(At,z,E.top-tt+2*(b.y+rt)/3),At++,a.m(At,z,E.top-tt+(b.y+rt)),At++,a.m(At,z,pt.y)):(at&&(a.m(At,ft.x,E.top-tt/2),At++),a.m(At,z,E.top-tt/2),At++,a.m(At,z,E.top-tt+b.y+(at?rt/2:rt)),At++,at&&a.m(At,pt.x,a.i(At-1).y))):pe("Invalid angle "+z),a.zf()}else b=E,a=this.link,E=this.network.layout,y=rA(x),y!==rA(b)&&(tt=E.computeLayerSpacing(x),rt=x.bounds,x=b.bounds,y===0&&x.left-rt.right<tt+1||y===90&&x.top-rt.bottom<tt+1||y===180&&rt.left-x.right<tt+1||y===270&&rt.top-x.bottom<tt+1||(a.vg(),x=a.curve===Al,b=a.isOrthogonal,E=qg(this.fromVertex.alignment),a.uh(),y===0?(y=rt.right+tt/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y-20,a.i(1).y),a.m(2,y-20,x),a.m(3,y,x),a.m(4,y+20,x),a.L(5,a.i(5).x,x)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===90?(y=rt.bottom+tt/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y-20),a.m(2,x,y-20),a.m(3,x,y),a.m(4,x,y+20),a.L(5,x,a.i(5).y)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)):y===180?(y=rt.left-tt/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y+20,a.i(1).y),a.m(2,y+20,x),a.m(3,y,x),a.m(4,y-20,x),a.L(5,a.i(5).x,x)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===270&&(y=rt.top-tt/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y+20),a.m(2,x,y+20),a.m(3,x,y),a.m(4,x,y-20),a.L(5,x,a.i(5).y)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)),a.zf()))}}},Ie.Object.defineProperties(Rc.prototype,{fromVertex:{get:function(){return this.kd},set:function(a){this.kd!==a&&(this.kd=a)}},toVertex:{get:function(){return this.qd},set:function(a){this.qd!==a&&(this.qd=a)}},relativePoint:{get:function(){return this.$t},set:function(a){this.$t.set(a)}}}),Rc.className="TreeEdge",br.prototype.initializeStandardTools=function(){this.gb("Action",new nl,this.mouseDownTools),this.gb("Relinking",new Ea,this.mouseDownTools),this.gb("LinkReshaping",new oo,this.mouseDownTools),this.gb("Rotating",new Ds,this.mouseDownTools),this.gb("Resizing",new vs,this.mouseDownTools),this.gb("Linking",new ms,this.mouseMoveTools),this.gb("Dragging",new Rr,this.mouseMoveTools),this.gb("DragSelecting",new za,this.mouseMoveTools),this.gb("Panning",new hs,this.mouseMoveTools),this.gb("ContextMenu",new Hs,this.mouseUpTools),this.gb("TextEditing",new Br,this.mouseUpTools),this.gb("ClickCreating",new lu,this.mouseUpTools),this.gb("ClickSelecting",new zu,this.mouseUpTools)},zA("Horizontal",new Lr),zA("Spot",new eo),zA("Table",new Ts),zA("Viewbox",new Ho),zA("TableRow",new _a),zA("TableColumn",new ll),zA("Graduated",new KA),zA("Grid",new Xs),Qf.add("GraphLinksModel",is),Qf.add("TreeModel",Bl);var vm=Fe.go,ty={get licenseKey(){return ge.licenseKey},set licenseKey(a){ge.licenseKey=a},get version(){return ge.version},Group:li,EnumValue:ce,List:Ke,Set:Ye,Map:Rn,Point:Rt,Size:an,Rect:Me,Margin:Pi,Spot:Vn,Geometry:rn,PathFigure:No,PathSegment:Ki,InputEvent:us,DiagramEvent:tu,ChangedEvent:Dr,Model:Mn,GraphLinksModel:Hi,TreeModel:la,Binding:vo,Transaction:zo,UndoManager:Or,CommandHandler:Ot,Tool:Ri,DraggingTool:Rr,DraggingInfo:cA,DraggingOptions:st,LinkingBaseTool:Jr,LinkingTool:ms,RelinkingTool:Ea,LinkReshapingTool:oo,ResizingTool:vs,RotatingTool:Ds,ClickSelectingTool:zu,ActionTool:nl,ClickCreatingTool:lu,HTMLInfo:jl,ContextMenuTool:Hs,DragSelectingTool:za,PanningTool:hs,TextEditingTool:Br,ToolManager:br,Animation:gs,AnimationManager:pa,AnimationTrigger:yl,Layer:Vo,Diagram:ge,Palette:ht,Overview:dt,Brush:nr,GraphObject:te,Panel:ze,RowColumnDefinition:Mo,Shape:yi,TextBlock:Sr,Picture:Sa,Part:jn,Adornment:Wi,Node:hn,Link:tn,Placeholder:ra,Layout:Ir,LayoutNetwork:xr,LayoutVertex:Oo,LayoutEdge:Za,GridLayout:ds,PanelLayout:ir,CircularLayout:Vr,CircularNetwork:Uc,CircularVertex:Tp,CircularEdge:q0,ForceDirectedLayout:Ls,ForceDirectedNetwork:jd,ForceDirectedVertex:Np,ForceDirectedEdge:Qp,LayeredDigraphLayout:Ar,LayeredDigraphNetwork:Dc,LayeredDigraphVertex:Pl,LayeredDigraphEdge:Dp,TreeLayout:Ti,TreeNetwork:Wd,TreeVertex:Ql,TreeEdge:Rc};typeof vm=="object"&&vm.version&&Oi("WARNING: a `go` object on the root object is already defined. "+("Debug"in vm?"debug ":"")+"version: "+vm.version+", replaced with version: "+ty.version),ge.prototype.go=ty,Fe.go=ty,typeof yn.exports=="object"&&(yn.exports=typeof ee.g!="undefined"?ee.g.go:self.go)}();var Tt=typeof ee.g!="undefined"?ee.g.go:self.go;const Be=typeof ee.g!="undefined"?ee.g.go:self.go,Ne=Be.Group,ln=Be.EnumValue,be=Be.List,we=Be.Set,ne=Be.Map,De=Be.Point,fe=Be.Size,Qe=Be.Rect,gn=Be.Margin,Xe=Be.Spot,kn=Be.Geometry,Ut=Be.PathFigure,et=Be.PathSegment,nt=Be.InputEvent,gt=Be.DiagramEvent,lt=Be.ChangedEvent,ct=Be.Model,yt=Be.GraphLinksModel,Lt=Be.TreeModel,Nt=Be.Binding,Vt=Be.Transaction,Jt=Be.UndoManager,Ae=Be.CommandHandler,he=Be.Tool,le=Be.DraggingTool,We=Be.DraggingInfo,me=Be.LinkingBaseTool,Je=Be.LinkingTool,fn=Be.RelinkingTool,sn=Be.LinkReshapingTool,ui=Be.ResizingTool,hi=Be.RotatingTool,Si=Be.ClickSelectingTool,fr=Be.ActionTool,qt=Be.ClickCreatingTool,Ht=Be.HTMLInfo,je=Be.ContextMenuTool,Nn=Be.DragSelectingTool,Kn=Be.PanningTool,He=Be.TextEditingTool,mn=Be.ToolManager,Cn=Be.Animation,Jn=Be.AnimationManager,bn=Be.AnimationTrigger,ve=Be.Layer,Le=Be.Diagram,Sn=Be.Palette,xn=Be.Overview,Kt=Be.Brush,Et=Be.GraphObject,Ft=Be.Panel,Dt=Be.RowColumnDefinition,Wt=Be.Shape,kt=Be.TextBlock,Ue=Be.TextBlockMetrics,Tn=Be.Picture,Ei=Be.Part,Xn=Be.Adornment,si=Be.Node,Qi=Be.Link,Ln=Be.Placeholder,Ci=Be.Layout,gi=Be.LayoutNetwork,qi=Be.LayoutVertex,fi=Be.LayoutEdge,Pr=Be.GridLayout,kr=Be.PanelLayout,yr=Be.CircularLayout,or=Be.CircularNetwork,Es=Be.CircularVertex,Wr=Be.CircularEdge,Wo=Be.ForceDirectedLayout,Fo=Be.ForceDirectedNetwork,$r=Be.ForceDirectedVertex,ur=Be.ForceDirectedEdge,So=Be.LayeredDigraphLayout,Er=Be.LayeredDigraphNetwork,bo=Be.LayeredDigraphVertex,Ss=Be.LayeredDigraphEdge,Ms=Be.TreeLayout,$s=Be.TreeNetwork,xo=Be.TreeVertex,er=Be.TreeEdge,en=Be.version},46020:function(yn){(function(qn,ee){yn.exports=ee()})(this,function(){"use strict";var qn=function(vt,mt){return qn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(St,wt){St.__proto__=wt}||function(St,wt){for(var Qt in wt)Object.prototype.hasOwnProperty.call(wt,Qt)&&(St[Qt]=wt[Qt])},qn(vt,mt)};function ee(vt,mt){if(typeof mt!="function"&&mt!==null)throw new TypeError("Class extends value "+String(mt)+" is not a constructor or null");qn(vt,mt);function St(){this.constructor=vt}vt.prototype=mt===null?Object.create(mt):(St.prototype=mt.prototype,new St)}var Tt=function(){return Tt=Object.assign||function(mt){for(var St,wt=1,Qt=arguments.length;wt<Qt;wt++){St=arguments[wt];for(var _t in St)Object.prototype.hasOwnProperty.call(St,_t)&&(mt[_t]=St[_t])}return mt},Tt.apply(this,arguments)};function Be(vt,mt,St,wt){function Qt(_t){return _t instanceof St?_t:new St(function(oe){oe(_t)})}return new(St||(St=Promise))(function(_t,oe){function xe(qe){try{_e(wt.next(qe))}catch(dn){oe(dn)}}function ae(qe){try{_e(wt.throw(qe))}catch(dn){oe(dn)}}function _e(qe){qe.done?_t(qe.value):Qt(qe.value).then(xe,ae)}_e((wt=wt.apply(vt,mt||[])).next())})}function Ne(vt,mt){var St={label:0,sent:function(){if(_t[0]&1)throw _t[1];return _t[1]},trys:[],ops:[]},wt,Qt,_t,oe;return oe={next:xe(0),throw:xe(1),return:xe(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function xe(_e){return function(qe){return ae([_e,qe])}}function ae(_e){if(wt)throw new TypeError("Generator is already executing.");for(;St;)try{if(wt=1,Qt&&(_t=_e[0]&2?Qt.return:_e[0]?Qt.throw||((_t=Qt.return)&&_t.call(Qt),0):Qt.next)&&!(_t=_t.call(Qt,_e[1])).done)return _t;switch(Qt=0,_t&&(_e=[_e[0]&2,_t.value]),_e[0]){case 0:case 1:_t=_e;break;case 4:return St.label++,{value:_e[1],done:!1};case 5:St.label++,Qt=_e[1],_e=[0];continue;case 7:_e=St.ops.pop(),St.trys.pop();continue;default:if(_t=St.trys,!(_t=_t.length>0&&_t[_t.length-1])&&(_e[0]===6||_e[0]===2)){St=0;continue}if(_e[0]===3&&(!_t||_e[1]>_t[0]&&_e[1]<_t[3])){St.label=_e[1];break}if(_e[0]===6&&St.label<_t[1]){St.label=_t[1],_t=_e;break}if(_t&&St.label<_t[2]){St.label=_t[2],St.ops.push(_e);break}_t[2]&&St.ops.pop(),St.trys.pop();continue}_e=mt.call(vt,St)}catch(qe){_e=[6,qe],Qt=0}finally{wt=_t=0}if(_e[0]&5)throw _e[1];return{value:_e[0]?_e[1]:void 0,done:!0}}}function ln(vt,mt,St){if(St||arguments.length===2)for(var wt=0,Qt=mt.length,_t;wt<Qt;wt++)(_t||!(wt in mt))&&(_t||(_t=Array.prototype.slice.call(mt,0,wt)),_t[wt]=mt[wt]);return vt.concat(_t||mt)}for(var be=function(){function vt(mt,St,wt,Qt){this.left=mt,this.top=St,this.width=wt,this.height=Qt}return vt.prototype.add=function(mt,St,wt,Qt){return new vt(this.left+mt,this.top+St,this.width+wt,this.height+Qt)},vt.fromClientRect=function(mt,St){return new vt(St.left+mt.windowBounds.left,St.top+mt.windowBounds.top,St.width,St.height)},vt.fromDOMRectList=function(mt,St){var wt=Array.from(St).find(function(Qt){return Qt.width!==0});return wt?new vt(wt.left+mt.windowBounds.left,wt.top+mt.windowBounds.top,wt.width,wt.height):vt.EMPTY},vt.EMPTY=new vt(0,0,0,0),vt}(),we=function(vt,mt){return be.fromClientRect(vt,mt.getBoundingClientRect())},ne=function(vt){var mt=vt.body,St=vt.documentElement;if(!mt||!St)throw new Error("Unable to get document size");var wt=Math.max(Math.max(mt.scrollWidth,St.scrollWidth),Math.max(mt.offsetWidth,St.offsetWidth),Math.max(mt.clientWidth,St.clientWidth)),Qt=Math.max(Math.max(mt.scrollHeight,St.scrollHeight),Math.max(mt.offsetHeight,St.offsetHeight),Math.max(mt.clientHeight,St.clientHeight));return new be(0,0,wt,Qt)},De=function(vt){for(var mt=[],St=0,wt=vt.length;St<wt;){var Qt=vt.charCodeAt(St++);if(Qt>=55296&&Qt<=56319&&St<wt){var _t=vt.charCodeAt(St++);(_t&64512)===56320?mt.push(((Qt&1023)<<10)+(_t&1023)+65536):(mt.push(Qt),St--)}else mt.push(Qt)}return mt},fe=function(){for(var vt=[],mt=0;mt<arguments.length;mt++)vt[mt]=arguments[mt];if(String.fromCodePoint)return String.fromCodePoint.apply(String,vt);var St=vt.length;if(!St)return"";for(var wt=[],Qt=-1,_t="";++Qt<St;){var oe=vt[Qt];oe<=65535?wt.push(oe):(oe-=65536,wt.push((oe>>10)+55296,oe%1024+56320)),(Qt+1===St||wt.length>16384)&&(_t+=String.fromCharCode.apply(String,wt),wt.length=0)}return _t},Qe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gn=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Xe=0;Xe<Qe.length;Xe++)gn[Qe.charCodeAt(Xe)]=Xe;for(var kn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ut=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),et=0;et<kn.length;et++)Ut[kn.charCodeAt(et)]=et;for(var nt=function(vt){var mt=vt.length*.75,St=vt.length,wt,Qt=0,_t,oe,xe,ae;vt[vt.length-1]==="="&&(mt--,vt[vt.length-2]==="="&&mt--);var _e=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(mt):new Array(mt),qe=Array.isArray(_e)?_e:new Uint8Array(_e);for(wt=0;wt<St;wt+=4)_t=Ut[vt.charCodeAt(wt)],oe=Ut[vt.charCodeAt(wt+1)],xe=Ut[vt.charCodeAt(wt+2)],ae=Ut[vt.charCodeAt(wt+3)],qe[Qt++]=_t<<2|oe>>4,qe[Qt++]=(oe&15)<<4|xe>>2,qe[Qt++]=(xe&3)<<6|ae&63;return _e},gt=function(vt){for(var mt=vt.length,St=[],wt=0;wt<mt;wt+=2)St.push(vt[wt+1]<<8|vt[wt]);return St},lt=function(vt){for(var mt=vt.length,St=[],wt=0;wt<mt;wt+=4)St.push(vt[wt+3]<<24|vt[wt+2]<<16|vt[wt+1]<<8|vt[wt]);return St},ct=5,yt=11,Lt=2,Nt=yt-ct,Vt=65536>>ct,Jt=1<<ct,Ae=Jt-1,he=1024>>ct,le=Vt+he,We=le,me=32,Je=We+me,fn=65536>>yt,sn=1<<Nt,ui=sn-1,hi=function(vt,mt,St){return vt.slice?vt.slice(mt,St):new Uint16Array(Array.prototype.slice.call(vt,mt,St))},Si=function(vt,mt,St){return vt.slice?vt.slice(mt,St):new Uint32Array(Array.prototype.slice.call(vt,mt,St))},fr=function(vt,mt){var St=nt(vt),wt=Array.isArray(St)?lt(St):new Uint32Array(St),Qt=Array.isArray(St)?gt(St):new Uint16Array(St),_t=24,oe=hi(Qt,_t/2,wt[4]/2),xe=wt[5]===2?hi(Qt,(_t+wt[4])/2):Si(wt,Math.ceil((_t+wt[4])/4));return new qt(wt[0],wt[1],wt[2],wt[3],oe,xe)},qt=function(){function vt(mt,St,wt,Qt,_t,oe){this.initialValue=mt,this.errorValue=St,this.highStart=wt,this.highValueIndex=Qt,this.index=_t,this.data=oe}return vt.prototype.get=function(mt){var St;if(mt>=0){if(mt<55296||mt>56319&&mt<=65535)return St=this.index[mt>>ct],St=(St<<Lt)+(mt&Ae),this.data[St];if(mt<=65535)return St=this.index[Vt+(mt-55296>>ct)],St=(St<<Lt)+(mt&Ae),this.data[St];if(mt<this.highStart)return St=Je-fn+(mt>>yt),St=this.index[St],St+=mt>>ct&ui,St=this.index[St],St=(St<<Lt)+(mt&Ae),this.data[St];if(mt<=1114111)return this.data[this.highValueIndex]}return this.errorValue},vt}(),Ht="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",je=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Nn=0;Nn<Ht.length;Nn++)je[Ht.charCodeAt(Nn)]=Nn;var Kn="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",He=50,mn=1,Cn=2,Jn=3,bn=4,ve=5,Le=7,Sn=8,xn=9,Kt=10,Et=11,Ft=12,Dt=13,Wt=14,kt=15,Ue=16,Tn=17,Ei=18,Xn=19,si=20,Qi=21,Ln=22,Ci=23,gi=24,qi=25,fi=26,Pr=27,kr=28,yr=29,or=30,Es=31,Wr=32,Wo=33,Fo=34,$r=35,ur=36,So=37,Er=38,bo=39,Ss=40,Ms=41,$s=42,xo=43,er=[9001,65288],en="!",Bt="\xD7",Qn="\xF7",Dn=fr(Kn),cn=[or,ur],un=[mn,Cn,Jn,ve],wn=[Kt,Sn],Hn=[Pr,fi],di=un.concat(wn),ke=[Er,bo,Ss,Fo,$r],Ee=[kt,Dt],ue=function(vt,mt){mt===void 0&&(mt="strict");var St=[],wt=[],Qt=[];return vt.forEach(function(_t,oe){var xe=Dn.get(_t);if(xe>He?(Qt.push(!0),xe-=He):Qt.push(!1),["normal","auto","loose"].indexOf(mt)!==-1&&[8208,8211,12316,12448].indexOf(_t)!==-1)return wt.push(oe),St.push(Ue);if(xe===bn||xe===Et){if(oe===0)return wt.push(oe),St.push(or);var ae=St[oe-1];return di.indexOf(ae)===-1?(wt.push(wt[oe-1]),St.push(ae)):(wt.push(oe),St.push(or))}if(wt.push(oe),xe===Es)return St.push(mt==="strict"?Qi:So);if(xe===$s||xe===yr)return St.push(or);if(xe===xo)return _t>=131072&&_t<=196605||_t>=196608&&_t<=262141?St.push(So):St.push(or);St.push(xe)}),[wt,St,Qt]},Ie=function(vt,mt,St,wt){var Qt=wt[St];if(Array.isArray(vt)?vt.indexOf(Qt)!==-1:vt===Qt)for(var _t=St;_t<=wt.length;){_t++;var oe=wt[_t];if(oe===mt)return!0;if(oe!==Kt)break}if(Qt===Kt)for(var _t=St;_t>0;){_t--;var xe=wt[_t];if(Array.isArray(vt)?vt.indexOf(xe)!==-1:vt===xe)for(var ae=St;ae<=wt.length;){ae++;var oe=wt[ae];if(oe===mt)return!0;if(oe!==Kt)break}if(xe!==Kt)break}return!1},On=function(vt,mt){for(var St=vt;St>=0;){var wt=mt[St];if(wt===Kt)St--;else return wt}return 0},zn=function(vt,mt,St,wt,Qt){if(St[wt]===0)return Bt;var _t=wt-1;if(Array.isArray(Qt)&&Qt[_t]===!0)return Bt;var oe=_t-1,xe=_t+1,ae=mt[_t],_e=oe>=0?mt[oe]:0,qe=mt[xe];if(ae===Cn&&qe===Jn)return Bt;if(un.indexOf(ae)!==-1)return en;if(un.indexOf(qe)!==-1||wn.indexOf(qe)!==-1)return Bt;if(On(_t,mt)===Sn)return Qn;if(Dn.get(vt[_t])===Et||(ae===Wr||ae===Wo)&&Dn.get(vt[xe])===Et||ae===Le||qe===Le||ae===xn||[Kt,Dt,kt].indexOf(ae)===-1&&qe===xn||[Tn,Ei,Xn,gi,kr].indexOf(qe)!==-1||On(_t,mt)===Ln||Ie(Ci,Ln,_t,mt)||Ie([Tn,Ei],Qi,_t,mt)||Ie(Ft,Ft,_t,mt))return Bt;if(ae===Kt)return Qn;if(ae===Ci||qe===Ci)return Bt;if(qe===Ue||ae===Ue)return Qn;if([Dt,kt,Qi].indexOf(qe)!==-1||ae===Wt||_e===ur&&Ee.indexOf(ae)!==-1||ae===kr&&qe===ur||qe===si||cn.indexOf(qe)!==-1&&ae===qi||cn.indexOf(ae)!==-1&&qe===qi||ae===Pr&&[So,Wr,Wo].indexOf(qe)!==-1||[So,Wr,Wo].indexOf(ae)!==-1&&qe===fi||cn.indexOf(ae)!==-1&&Hn.indexOf(qe)!==-1||Hn.indexOf(ae)!==-1&&cn.indexOf(qe)!==-1||[Pr,fi].indexOf(ae)!==-1&&(qe===qi||[Ln,kt].indexOf(qe)!==-1&&mt[xe+1]===qi)||[Ln,kt].indexOf(ae)!==-1&&qe===qi||ae===qi&&[qi,kr,gi].indexOf(qe)!==-1)return Bt;if([qi,kr,gi,Tn,Ei].indexOf(qe)!==-1)for(var dn=_t;dn>=0;){var Gn=mt[dn];if(Gn===qi)return Bt;if([kr,gi].indexOf(Gn)!==-1)dn--;else break}if([Pr,fi].indexOf(qe)!==-1)for(var dn=[Tn,Ei].indexOf(ae)!==-1?oe:_t;dn>=0;){var Gn=mt[dn];if(Gn===qi)return Bt;if([kr,gi].indexOf(Gn)!==-1)dn--;else break}if(Er===ae&&[Er,bo,Fo,$r].indexOf(qe)!==-1||[bo,Fo].indexOf(ae)!==-1&&[bo,Ss].indexOf(qe)!==-1||[Ss,$r].indexOf(ae)!==-1&&qe===Ss||ke.indexOf(ae)!==-1&&[si,fi].indexOf(qe)!==-1||ke.indexOf(qe)!==-1&&ae===Pr||cn.indexOf(ae)!==-1&&cn.indexOf(qe)!==-1||ae===gi&&cn.indexOf(qe)!==-1||cn.concat(qi).indexOf(ae)!==-1&&qe===Ln&&er.indexOf(vt[xe])===-1||cn.concat(qi).indexOf(qe)!==-1&&ae===Ei)return Bt;if(ae===Ms&&qe===Ms){for(var Ii=St[_t],Ai=1;Ii>0&&(Ii--,mt[Ii]===Ms);)Ai++;if(Ai%2!==0)return Bt}return ae===Wr&&qe===Wo?Bt:Qn},Zn=function(vt,mt){mt||(mt={lineBreak:"normal",wordBreak:"normal"});var St=ue(vt,mt.lineBreak),wt=St[0],Qt=St[1],_t=St[2];(mt.wordBreak==="break-all"||mt.wordBreak==="break-word")&&(Qt=Qt.map(function(xe){return[qi,or,$s].indexOf(xe)!==-1?So:xe}));var oe=mt.wordBreak==="keep-all"?_t.map(function(xe,ae){return xe&&vt[ae]>=19968&&vt[ae]<=40959}):void 0;return[wt,Qt,oe]},Fe=function(){function vt(mt,St,wt,Qt){this.codePoints=mt,this.required=St===en,this.start=wt,this.end=Qt}return vt.prototype.slice=function(){return fe.apply(void 0,this.codePoints.slice(this.start,this.end))},vt}(),Se=function(vt,mt){var St=De(vt),wt=Zn(St,mt),Qt=wt[0],_t=wt[1],oe=wt[2],xe=St.length,ae=0,_e=0;return{next:function(){if(_e>=xe)return{done:!0,value:null};for(var qe=Bt;_e<xe&&(qe=zn(St,_t,Qt,++_e,oe))===Bt;);if(qe!==Bt||_e===xe){var dn=new Fe(St,qe,ae,_e);return ae=_e,{value:dn,done:!1}}return{done:!0,value:null}}}},Pn=1,ti=2,nn=4,pe=8,Un=10,pi=47,Oi=92,on=9,ni=32,ie=34,se=61,ye=35,Ce=36,Oe=37,Ze=39,En=40,Wn=41,Te=95,pn=45,ri=33,Ji=60,zi=62,ce=64,$n=91,mi=93,Yn=61,hr=123,Mi=63,xi=125,ci=124,Ni=126,Vi=128,Ke=65533,ki=42,Ye=43,rr=44,Ro=58,gr=59,lo=46,pr=0,_i=8,cr=11,qr=14,Fr=31,Rn=127,Rt=-1,Gr=48,ps=97,xs=101,Lo=102,os=117,el=122,gl=65,Ra=69,_r=70,To=85,Ui=90,ii=function(vt){return vt>=Gr&&vt<=57},Yi=function(vt){return vt>=55296&&vt<=57343},an=function(vt){return ii(vt)||vt>=gl&&vt<=_r||vt>=ps&&vt<=Lo},Nr=function(vt){return vt>=ps&&vt<=el},Xr=function(vt){return vt>=gl&&vt<=Ui},_o=function(vt){return Nr(vt)||Xr(vt)},Ao=function(vt){return vt>=Vi},fo=function(vt){return vt===Un||vt===on||vt===ni},Yo=function(vt){return _o(vt)||Ao(vt)||vt===Te},ga=function(vt){return Yo(vt)||ii(vt)||vt===pn},js=function(vt){return vt>=pr&&vt<=_i||vt===cr||vt>=qr&&vt<=Fr||vt===Rn},Ca=function(vt,mt){return vt!==Oi?!1:mt!==Un},fl=function(vt,mt,St){return vt===pn?Yo(mt)||Ca(mt,St):Yo(vt)?!0:!!(vt===Oi&&Ca(vt,mt))},Me=function(vt,mt,St){return vt===Ye||vt===pn?ii(mt)?!0:mt===lo&&ii(St):ii(vt===lo?mt:vt)},fa=function(vt){var mt=0,St=1;(vt[mt]===Ye||vt[mt]===pn)&&(vt[mt]===pn&&(St=-1),mt++);for(var wt=[];ii(vt[mt]);)wt.push(vt[mt++]);var Qt=wt.length?parseInt(fe.apply(void 0,wt),10):0;vt[mt]===lo&&mt++;for(var _t=[];ii(vt[mt]);)_t.push(vt[mt++]);var oe=_t.length,xe=oe?parseInt(fe.apply(void 0,_t),10):0;(vt[mt]===Ra||vt[mt]===xs)&&mt++;var ae=1;(vt[mt]===Ye||vt[mt]===pn)&&(vt[mt]===pn&&(ae=-1),mt++);for(var _e=[];ii(vt[mt]);)_e.push(vt[mt++]);var qe=_e.length?parseInt(fe.apply(void 0,_e),10):0;return St*(Qt+xe*Math.pow(10,-oe))*Math.pow(10,ae*qe)},Ll={type:2},ZA={type:3},Go={type:4},LA={type:13},fh={type:8},JA={type:21},Yr={type:9},$o={type:10},sr={type:11},dr={type:12},Zr={type:14},Bo={type:23},Pi={type:1},lf={type:25},EA={type:24},El={type:26},fg={type:27},dh={type:28},Vn={type:29},ts={type:31},es={type:32},Ml=function(){function vt(){this._value=[]}return vt.prototype.write=function(mt){this._value=this._value.concat(De(mt))},vt.prototype.read=function(){for(var mt=[],St=this.consumeToken();St!==es;)mt.push(St),St=this.consumeToken();return mt},vt.prototype.consumeToken=function(){var mt=this.consumeCodePoint();switch(mt){case ie:return this.consumeStringToken(ie);case ye:var St=this.peekCodePoint(0),wt=this.peekCodePoint(1),Qt=this.peekCodePoint(2);if(ga(St)||Ca(wt,Qt)){var _t=fl(St,wt,Qt)?ti:Pn,oe=this.consumeName();return{type:5,value:oe,flags:_t}}break;case Ce:if(this.peekCodePoint(0)===se)return this.consumeCodePoint(),LA;break;case Ze:return this.consumeStringToken(Ze);case En:return Ll;case Wn:return ZA;case ki:if(this.peekCodePoint(0)===se)return this.consumeCodePoint(),Zr;break;case Ye:if(Me(mt,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(mt),this.consumeNumericToken();break;case rr:return Go;case pn:var xe=mt,ae=this.peekCodePoint(0),_e=this.peekCodePoint(1);if(Me(xe,ae,_e))return this.reconsumeCodePoint(mt),this.consumeNumericToken();if(fl(xe,ae,_e))return this.reconsumeCodePoint(mt),this.consumeIdentLikeToken();if(ae===pn&&_e===zi)return this.consumeCodePoint(),this.consumeCodePoint(),EA;break;case lo:if(Me(mt,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(mt),this.consumeNumericToken();break;case pi:if(this.peekCodePoint(0)===ki)for(this.consumeCodePoint();;){var qe=this.consumeCodePoint();if(qe===ki&&(qe=this.consumeCodePoint(),qe===pi))return this.consumeToken();if(qe===Rt)return this.consumeToken()}break;case Ro:return El;case gr:return fg;case Ji:if(this.peekCodePoint(0)===ri&&this.peekCodePoint(1)===pn&&this.peekCodePoint(2)===pn)return this.consumeCodePoint(),this.consumeCodePoint(),lf;break;case ce:var dn=this.peekCodePoint(0),Gn=this.peekCodePoint(1),Ii=this.peekCodePoint(2);if(fl(dn,Gn,Ii)){var oe=this.consumeName();return{type:7,value:oe}}break;case $n:return dh;case Oi:if(Ca(mt,this.peekCodePoint(0)))return this.reconsumeCodePoint(mt),this.consumeIdentLikeToken();break;case mi:return Vn;case Yn:if(this.peekCodePoint(0)===se)return this.consumeCodePoint(),fh;break;case hr:return sr;case xi:return dr;case os:case To:var Ai=this.peekCodePoint(0),Fi=this.peekCodePoint(1);return Ai===Ye&&(an(Fi)||Fi===Mi)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(mt),this.consumeIdentLikeToken();case ci:if(this.peekCodePoint(0)===se)return this.consumeCodePoint(),Yr;if(this.peekCodePoint(0)===ci)return this.consumeCodePoint(),JA;break;case Ni:if(this.peekCodePoint(0)===se)return this.consumeCodePoint(),$o;break;case Rt:return es}return fo(mt)?(this.consumeWhiteSpace(),ts):ii(mt)?(this.reconsumeCodePoint(mt),this.consumeNumericToken()):Yo(mt)?(this.reconsumeCodePoint(mt),this.consumeIdentLikeToken()):{type:6,value:fe(mt)}},vt.prototype.consumeCodePoint=function(){var mt=this._value.shift();return typeof mt=="undefined"?-1:mt},vt.prototype.reconsumeCodePoint=function(mt){this._value.unshift(mt)},vt.prototype.peekCodePoint=function(mt){return mt>=this._value.length?-1:this._value[mt]},vt.prototype.consumeUnicodeRangeToken=function(){for(var mt=[],St=this.consumeCodePoint();an(St)&&mt.length<6;)mt.push(St),St=this.consumeCodePoint();for(var wt=!1;St===Mi&&mt.length<6;)mt.push(St),St=this.consumeCodePoint(),wt=!0;if(wt){var Qt=parseInt(fe.apply(void 0,mt.map(function(ae){return ae===Mi?Gr:ae})),16),_t=parseInt(fe.apply(void 0,mt.map(function(ae){return ae===Mi?_r:ae})),16);return{type:30,start:Qt,end:_t}}var oe=parseInt(fe.apply(void 0,mt),16);if(this.peekCodePoint(0)===pn&&an(this.peekCodePoint(1))){this.consumeCodePoint(),St=this.consumeCodePoint();for(var xe=[];an(St)&&xe.length<6;)xe.push(St),St=this.consumeCodePoint();var _t=parseInt(fe.apply(void 0,xe),16);return{type:30,start:oe,end:_t}}else return{type:30,start:oe,end:oe}},vt.prototype.consumeIdentLikeToken=function(){var mt=this.consumeName();return mt.toLowerCase()==="url"&&this.peekCodePoint(0)===En?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===En?(this.consumeCodePoint(),{type:19,value:mt}):{type:20,value:mt}},vt.prototype.consumeUrlToken=function(){var mt=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Rt)return{type:22,value:""};var St=this.peekCodePoint(0);if(St===Ze||St===ie){var wt=this.consumeStringToken(this.consumeCodePoint());return wt.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Rt||this.peekCodePoint(0)===Wn)?(this.consumeCodePoint(),{type:22,value:wt.value}):(this.consumeBadUrlRemnants(),Bo)}for(;;){var Qt=this.consumeCodePoint();if(Qt===Rt||Qt===Wn)return{type:22,value:fe.apply(void 0,mt)};if(fo(Qt))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Rt||this.peekCodePoint(0)===Wn?(this.consumeCodePoint(),{type:22,value:fe.apply(void 0,mt)}):(this.consumeBadUrlRemnants(),Bo);if(Qt===ie||Qt===Ze||Qt===En||js(Qt))return this.consumeBadUrlRemnants(),Bo;if(Qt===Oi)if(Ca(Qt,this.peekCodePoint(0)))mt.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),Bo;else mt.push(Qt)}},vt.prototype.consumeWhiteSpace=function(){for(;fo(this.peekCodePoint(0));)this.consumeCodePoint()},vt.prototype.consumeBadUrlRemnants=function(){for(;;){var mt=this.consumeCodePoint();if(mt===Wn||mt===Rt)return;Ca(mt,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},vt.prototype.consumeStringSlice=function(mt){for(var St=5e4,wt="";mt>0;){var Qt=Math.min(St,mt);wt+=fe.apply(void 0,this._value.splice(0,Qt)),mt-=Qt}return this._value.shift(),wt},vt.prototype.consumeStringToken=function(mt){var St="",wt=0;do{var Qt=this._value[wt];if(Qt===Rt||Qt===void 0||Qt===mt)return St+=this.consumeStringSlice(wt),{type:0,value:St};if(Qt===Un)return this._value.splice(0,wt),Pi;if(Qt===Oi){var _t=this._value[wt+1];_t!==Rt&&_t!==void 0&&(_t===Un?(St+=this.consumeStringSlice(wt),wt=-1,this._value.shift()):Ca(Qt,_t)&&(St+=this.consumeStringSlice(wt),St+=fe(this.consumeEscapedCodePoint()),wt=-1))}wt++}while(!0)},vt.prototype.consumeNumber=function(){var mt=[],St=nn,wt=this.peekCodePoint(0);for((wt===Ye||wt===pn)&&mt.push(this.consumeCodePoint());ii(this.peekCodePoint(0));)mt.push(this.consumeCodePoint());wt=this.peekCodePoint(0);var Qt=this.peekCodePoint(1);if(wt===lo&&ii(Qt))for(mt.push(this.consumeCodePoint(),this.consumeCodePoint()),St=pe;ii(this.peekCodePoint(0));)mt.push(this.consumeCodePoint());wt=this.peekCodePoint(0),Qt=this.peekCodePoint(1);var _t=this.peekCodePoint(2);if((wt===Ra||wt===xs)&&((Qt===Ye||Qt===pn)&&ii(_t)||ii(Qt)))for(mt.push(this.consumeCodePoint(),this.consumeCodePoint()),St=pe;ii(this.peekCodePoint(0));)mt.push(this.consumeCodePoint());return[fa(mt),St]},vt.prototype.consumeNumericToken=function(){var mt=this.consumeNumber(),St=mt[0],wt=mt[1],Qt=this.peekCodePoint(0),_t=this.peekCodePoint(1),oe=this.peekCodePoint(2);if(fl(Qt,_t,oe)){var xe=this.consumeName();return{type:15,number:St,flags:wt,unit:xe}}return Qt===Oe?(this.consumeCodePoint(),{type:16,number:St,flags:wt}):{type:17,number:St,flags:wt}},vt.prototype.consumeEscapedCodePoint=function(){var mt=this.consumeCodePoint();if(an(mt)){for(var St=fe(mt);an(this.peekCodePoint(0))&&St.length<6;)St+=fe(this.consumeCodePoint());fo(this.peekCodePoint(0))&&this.consumeCodePoint();var wt=parseInt(St,16);return wt===0||Yi(wt)||wt>1114111?Ke:wt}return mt===Rt?Ke:mt},vt.prototype.consumeName=function(){for(var mt="";;){var St=this.consumeCodePoint();if(ga(St))mt+=fe(St);else if(Ca(St,this.peekCodePoint(0)))mt+=fe(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(St),mt}},vt}(),Du=function(){function vt(mt){this._tokens=mt}return vt.create=function(mt){var St=new Ml;return St.write(mt),new vt(St.read())},vt.parseValue=function(mt){return vt.create(mt).parseComponentValue()},vt.parseValues=function(mt){return vt.create(mt).parseComponentValues()},vt.prototype.parseComponentValue=function(){for(var mt=this.consumeToken();mt.type===31;)mt=this.consumeToken();if(mt.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(mt);var St=this.consumeComponentValue();do mt=this.consumeToken();while(mt.type===31);if(mt.type===32)return St;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},vt.prototype.parseComponentValues=function(){for(var mt=[];;){var St=this.consumeComponentValue();if(St.type===32)return mt;mt.push(St),mt.push()}},vt.prototype.consumeComponentValue=function(){var mt=this.consumeToken();switch(mt.type){case 11:case 28:case 2:return this.consumeSimpleBlock(mt.type);case 19:return this.consumeFunction(mt)}return mt},vt.prototype.consumeSimpleBlock=function(mt){for(var St={type:mt,values:[]},wt=this.consumeToken();;){if(wt.type===32||Ga(wt,mt))return St;this.reconsumeToken(wt),St.values.push(this.consumeComponentValue()),wt=this.consumeToken()}},vt.prototype.consumeFunction=function(mt){for(var St={name:mt.value,values:[],type:18};;){var wt=this.consumeToken();if(wt.type===32||wt.type===3)return St;this.reconsumeToken(wt),St.values.push(this.consumeComponentValue())}},vt.prototype.consumeToken=function(){var mt=this._tokens.shift();return typeof mt=="undefined"?es:mt},vt.prototype.reconsumeToken=function(mt){this._tokens.unshift(mt)},vt}(),aA=function(vt){return vt.type===15},Xi=function(vt){return vt.type===17},co=function(vt){return vt.type===20},lA=function(vt){return vt.type===0},da=function(vt,mt){return co(vt)&&vt.value===mt},Pa=function(vt){return vt.type!==31},dl=function(vt){return vt.type!==31&&vt.type!==4},Fa=function(vt){var mt=[],St=[];return vt.forEach(function(wt){if(wt.type===4){if(St.length===0)throw new Error("Error parsing function args, zero tokens for arg");mt.push(St),St=[];return}wt.type!==31&&St.push(wt)}),St.length&&mt.push(St),mt},Ga=function(vt,mt){return mt===11&&vt.type===12||mt===28&&vt.type===29?!0:mt===2&&vt.type===3},Ks=function(vt){return vt.type===17||vt.type===15},ls=function(vt){return vt.type===16||Ks(vt)},Af=function(vt){return vt.length>1?[vt[0],vt[1]]:[vt[0]]},Ns={type:17,number:0,flags:nn},dg={type:16,number:50,flags:nn},Hl={type:16,number:100,flags:nn},MA=function(vt,mt,St){var wt=vt[0],Qt=vt[1];return[uo(wt,mt),uo(typeof Qt!="undefined"?Qt:wt,St)]},uo=function(vt,mt){if(vt.type===16)return vt.number/100*mt;if(aA(vt))switch(vt.unit){case"rem":case"em":return 16*vt.number;case"px":default:return vt.number}return vt.number},cl="deg",cg="grad",pg="rad",uf="turn",Xo={name:"angle",parse:function(vt,mt){if(mt.type===15)switch(mt.unit){case cl:return Math.PI*mt.number/180;case cg:return Math.PI/200*mt.number;case pg:return mt.number;case uf:return Math.PI*2*mt.number}throw new Error("Unsupported angle type")}},nd=function(vt){return vt.type===15&&(vt.unit===cl||vt.unit===cg||vt.unit===pg||vt.unit===uf)},hf=function(vt){var mt=vt.filter(co).map(function(St){return St.value}).join(" ");switch(mt){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Ns,Ns];case"to top":case"bottom":return La(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Ns,Hl];case"to right":case"left":return La(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Hl,Hl];case"to bottom":case"top":return La(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Hl,Ns];case"to left":case"right":return La(270)}return 0},La=function(vt){return Math.PI*vt/180},pl={name:"color",parse:function(vt,mt){if(mt.type===18){var St=gf[mt.name];if(typeof St=="undefined")throw new Error('Attempting to parse an unsupported color function "'+mt.name+'"');return St(vt,mt.values)}if(mt.type===5){if(mt.value.length===3){var wt=mt.value.substring(0,1),Qt=mt.value.substring(1,2),_t=mt.value.substring(2,3);return jo(parseInt(wt+wt,16),parseInt(Qt+Qt,16),parseInt(_t+_t,16),1)}if(mt.value.length===4){var wt=mt.value.substring(0,1),Qt=mt.value.substring(1,2),_t=mt.value.substring(2,3),oe=mt.value.substring(3,4);return jo(parseInt(wt+wt,16),parseInt(Qt+Qt,16),parseInt(_t+_t,16),parseInt(oe+oe,16)/255)}if(mt.value.length===6){var wt=mt.value.substring(0,2),Qt=mt.value.substring(2,4),_t=mt.value.substring(4,6);return jo(parseInt(wt,16),parseInt(Qt,16),parseInt(_t,16),1)}if(mt.value.length===8){var wt=mt.value.substring(0,2),Qt=mt.value.substring(2,4),_t=mt.value.substring(4,6),oe=mt.value.substring(6,8);return jo(parseInt(wt,16),parseInt(Qt,16),parseInt(_t,16),parseInt(oe,16)/255)}}if(mt.type===20){var xe=kl[mt.value.toUpperCase()];if(typeof xe!="undefined")return xe}return kl.TRANSPARENT}},As=function(vt){return(255&vt)===0},io=function(vt){var mt=255&vt,St=255&vt>>8,wt=255&vt>>16,Qt=255&vt>>24;return mt<255?"rgba("+Qt+","+wt+","+St+","+mt/255+")":"rgb("+Qt+","+wt+","+St+")"},jo=function(vt,mt,St,wt){return(vt<<24|mt<<16|St<<8|Math.round(wt*255)<<0)>>>0},Qs=function(vt,mt){if(vt.type===17)return vt.number;if(vt.type===16){var St=mt===3?1:255;return mt===3?vt.number/100*St:Math.round(vt.number/100*St)}return 0},mg=function(vt,mt){var St=mt.filter(dl);if(St.length===3){var wt=St.map(Qs),Qt=wt[0],_t=wt[1],oe=wt[2];return jo(Qt,_t,oe,1)}if(St.length===4){var xe=St.map(Qs),Qt=xe[0],_t=xe[1],oe=xe[2],ae=xe[3];return jo(Qt,_t,oe,ae)}return 0};function Hu(vt,mt,St){return St<0&&(St+=1),St>=1&&(St-=1),St<1/6?(mt-vt)*St*6+vt:St<1/2?mt:St<2/3?(mt-vt)*6*(2/3-St)+vt:vt}var Ko=function(vt,mt){var St=mt.filter(dl),wt=St[0],Qt=St[1],_t=St[2],oe=St[3],xe=(wt.type===17?La(wt.number):Xo.parse(vt,wt))/(Math.PI*2),ae=ls(Qt)?Qt.number/100:0,_e=ls(_t)?_t.number/100:0,qe=typeof oe!="undefined"&&ls(oe)?uo(oe,1):1;if(ae===0)return jo(_e*255,_e*255,_e*255,1);var dn=_e<=.5?_e*(ae+1):_e+ae-_e*ae,Gn=_e*2-dn,Ii=Hu(Gn,dn,xe+1/3),Ai=Hu(Gn,dn,xe),Fi=Hu(Gn,dn,xe-1/3);return jo(Ii*255,Ai*255,Fi*255,qe)},gf={hsl:Ko,hsla:Ko,rgb:mg,rgba:mg},qA=function(vt,mt){return pl.parse(vt,Du.create(mt).parseComponentValue())},kl={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Li={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(vt,mt){return mt.map(function(St){if(co(St))switch(St.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},id={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},re=function(vt,mt){var St=pl.parse(vt,mt[0]),wt=mt[1];return wt&&ls(wt)?{color:St,stop:wt}:{color:St,stop:null}},rn=function(vt,mt){var St=vt[0],wt=vt[vt.length-1];St.stop===null&&(St.stop=Ns),wt.stop===null&&(wt.stop=Hl);for(var Qt=[],_t=0,oe=0;oe<vt.length;oe++){var xe=vt[oe].stop;if(xe!==null){var ae=uo(xe,mt);ae>_t?Qt.push(ae):Qt.push(_t),_t=ae}else Qt.push(null)}for(var _e=null,oe=0;oe<Qt.length;oe++){var qe=Qt[oe];if(qe===null)_e===null&&(_e=oe);else if(_e!==null){for(var dn=oe-_e,Gn=Qt[_e-1],Ii=(qe-Gn)/(dn+1),Ai=1;Ai<=dn;Ai++)Qt[_e+Ai-1]=Ii*Ai;_e=null}}return vt.map(function(Fi,Ur){var $i=Fi.color;return{color:$i,stop:Math.max(Math.min(1,Qt[Ur]/mt),0)}})},ec=function(vt,mt,St){var wt=mt/2,Qt=St/2,_t=uo(vt[0],mt)-wt,oe=Qt-uo(vt[1],St);return(Math.atan2(oe,_t)+Math.PI*2)%(Math.PI*2)},nc=function(vt,mt,St){var wt=typeof vt=="number"?vt:ec(vt,mt,St),Qt=Math.abs(mt*Math.sin(wt))+Math.abs(St*Math.cos(wt)),_t=mt/2,oe=St/2,xe=Qt/2,ae=Math.sin(wt-Math.PI/2)*xe,_e=Math.cos(wt-Math.PI/2)*xe;return[Qt,_t-_e,_t+_e,oe-ae,oe+ae]},zs=function(vt,mt){return Math.sqrt(vt*vt+mt*mt)},AA=function(vt,mt,St,wt,Qt){var _t=[[0,0],[0,mt],[vt,0],[vt,mt]];return _t.reduce(function(oe,xe){var ae=xe[0],_e=xe[1],qe=zs(St-ae,wt-_e);return(Qt?qe<oe.optimumDistance:qe>oe.optimumDistance)?{optimumCorner:xe,optimumDistance:qe}:oe},{optimumDistance:Qt?1/0:-1/0,optimumCorner:null}).optimumCorner},Ou=function(vt,mt,St,wt,Qt){var _t=0,oe=0;switch(vt.size){case 0:vt.shape===0?_t=oe=Math.min(Math.abs(mt),Math.abs(mt-wt),Math.abs(St),Math.abs(St-Qt)):vt.shape===1&&(_t=Math.min(Math.abs(mt),Math.abs(mt-wt)),oe=Math.min(Math.abs(St),Math.abs(St-Qt)));break;case 2:if(vt.shape===0)_t=oe=Math.min(zs(mt,St),zs(mt,St-Qt),zs(mt-wt,St),zs(mt-wt,St-Qt));else if(vt.shape===1){var xe=Math.min(Math.abs(St),Math.abs(St-Qt))/Math.min(Math.abs(mt),Math.abs(mt-wt)),ae=AA(wt,Qt,mt,St,!0),_e=ae[0],qe=ae[1];_t=zs(_e-mt,(qe-St)/xe),oe=xe*_t}break;case 1:vt.shape===0?_t=oe=Math.max(Math.abs(mt),Math.abs(mt-wt),Math.abs(St),Math.abs(St-Qt)):vt.shape===1&&(_t=Math.max(Math.abs(mt),Math.abs(mt-wt)),oe=Math.max(Math.abs(St),Math.abs(St-Qt)));break;case 3:if(vt.shape===0)_t=oe=Math.max(zs(mt,St),zs(mt,St-Qt),zs(mt-wt,St),zs(mt-wt,St-Qt));else if(vt.shape===1){var xe=Math.max(Math.abs(St),Math.abs(St-Qt))/Math.max(Math.abs(mt),Math.abs(mt-wt)),dn=AA(wt,Qt,mt,St,!1),_e=dn[0],qe=dn[1];_t=zs(_e-mt,(qe-St)/xe),oe=xe*_t}break}return Array.isArray(vt.size)&&(_t=uo(vt.size[0],wt),oe=vt.size.length===2?uo(vt.size[1],Qt):_t),[_t,oe]},ff=function(vt,mt){var St=La(180),wt=[];return Fa(mt).forEach(function(Qt,_t){if(_t===0){var oe=Qt[0];if(oe.type===20&&oe.value==="to"){St=hf(Qt);return}else if(nd(oe)){St=Xo.parse(vt,oe);return}}var xe=re(vt,Qt);wt.push(xe)}),{angle:St,stops:wt,type:1}},$A=function(vt,mt){var St=La(180),wt=[];return Fa(mt).forEach(function(Qt,_t){if(_t===0){var oe=Qt[0];if(oe.type===20&&["top","left","right","bottom"].indexOf(oe.value)!==-1){St=hf(Qt);return}else if(nd(oe)){St=(Xo.parse(vt,oe)+La(270))%La(360);return}}var xe=re(vt,Qt);wt.push(xe)}),{angle:St,stops:wt,type:1}},No=function(vt,mt){var St=La(180),wt=[],Qt=1,_t=0,oe=3,xe=[];return Fa(mt).forEach(function(ae,_e){var qe=ae[0];if(_e===0){if(co(qe)&&qe.value==="linear"){Qt=1;return}else if(co(qe)&&qe.value==="radial"){Qt=2;return}}if(qe.type===18){if(qe.name==="from"){var dn=pl.parse(vt,qe.values[0]);wt.push({stop:Ns,color:dn})}else if(qe.name==="to"){var dn=pl.parse(vt,qe.values[0]);wt.push({stop:Hl,color:dn})}else if(qe.name==="color-stop"){var Gn=qe.values.filter(dl);if(Gn.length===2){var dn=pl.parse(vt,Gn[1]),Ii=Gn[0];Xi(Ii)&&wt.push({stop:{type:16,number:Ii.number*100,flags:Ii.flags},color:dn})}}}}),Qt===1?{angle:(St+La(180))%La(360),stops:wt,type:Qt}:{size:oe,shape:_t,stops:wt,position:xe,type:Qt}},Ki="closest-side",ta="farthest-side",ja="closest-corner",Eo="farthest-corner",mr="circle",ss="ellipse",ca="cover",ro="contain",Ka=function(vt,mt){var St=0,wt=3,Qt=[],_t=[];return Fa(mt).forEach(function(oe,xe){var ae=!0;if(xe===0){var _e=!1;ae=oe.reduce(function(dn,Gn){if(_e)if(co(Gn))switch(Gn.value){case"center":return _t.push(dg),dn;case"top":case"left":return _t.push(Ns),dn;case"right":case"bottom":return _t.push(Hl),dn}else(ls(Gn)||Ks(Gn))&&_t.push(Gn);else if(co(Gn))switch(Gn.value){case mr:return St=0,!1;case ss:return St=1,!1;case"at":return _e=!0,!1;case Ki:return wt=0,!1;case ca:case ta:return wt=1,!1;case ro:case ja:return wt=2,!1;case Eo:return wt=3,!1}else if(Ks(Gn)||ls(Gn))return Array.isArray(wt)||(wt=[]),wt.push(Gn),!1;return dn},ae)}if(ae){var qe=re(vt,oe);Qt.push(qe)}}),{size:wt,shape:St,stops:Qt,position:_t,type:2}},us=function(vt,mt){var St=0,wt=3,Qt=[],_t=[];return Fa(mt).forEach(function(oe,xe){var ae=!0;if(xe===0?ae=oe.reduce(function(qe,dn){if(co(dn))switch(dn.value){case"center":return _t.push(dg),!1;case"top":case"left":return _t.push(Ns),!1;case"right":case"bottom":return _t.push(Hl),!1}else if(ls(dn)||Ks(dn))return _t.push(dn),!1;return qe},ae):xe===1&&(ae=oe.reduce(function(qe,dn){if(co(dn))switch(dn.value){case mr:return St=0,!1;case ss:return St=1,!1;case ro:case Ki:return wt=0,!1;case ta:return wt=1,!1;case ja:return wt=2,!1;case ca:case Eo:return wt=3,!1}else if(Ks(dn)||ls(dn))return Array.isArray(wt)||(wt=[]),wt.push(dn),!1;return qe},ae)),ae){var _e=re(vt,oe);Qt.push(_e)}}),{size:wt,shape:St,stops:Qt,position:_t,type:2}},tu=function(vt){return vt.type===1},Dr=function(vt){return vt.type===2},Vs={name:"image",parse:function(vt,mt){if(mt.type===22){var St={url:mt.value,type:0};return vt.cache.addImage(mt.value),St}if(mt.type===18){var wt=to[mt.name];if(typeof wt=="undefined")throw new Error('Attempting to parse an unsupported image function "'+mt.name+'"');return wt(vt,mt.values)}throw new Error("Unsupported image type "+mt.type)}};function Qr(vt){return!(vt.type===20&&vt.value==="none")&&(vt.type!==18||!!to[vt.name])}var to={"linear-gradient":ff,"-moz-linear-gradient":$A,"-ms-linear-gradient":$A,"-o-linear-gradient":$A,"-webkit-linear-gradient":$A,"radial-gradient":Ka,"-moz-radial-gradient":us,"-ms-radial-gradient":us,"-o-radial-gradient":us,"-webkit-radial-gradient":us,"-webkit-gradient":No},Co={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(vt,mt){if(mt.length===0)return[];var St=mt[0];return St.type===20&&St.value==="none"?[]:mt.filter(function(wt){return dl(wt)&&Qr(wt)}).map(function(wt){return Vs.parse(vt,wt)})}},zo={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(vt,mt){return mt.map(function(St){if(co(St))switch(St.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Or={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(vt,mt){return Fa(mt).map(function(St){return St.filter(ls)}).map(Af)}},Ru={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(vt,mt){return Fa(mt).map(function(St){return St.filter(co).map(function(wt){return wt.value}).join(" ")}).map(Ri)}},Ri=function(vt){switch(vt){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},Gu;(function(vt){vt.AUTO="auto",vt.CONTAIN="contain",vt.COVER="cover"})(Gu||(Gu={}));var br={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(vt,mt){return Fa(mt).map(function(St){return St.filter(ic)})}},ic=function(vt){return co(vt)||ls(vt)},kA=function(vt){return{name:"border-"+vt+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},vg=kA("top"),rd=kA("right"),df=kA("bottom"),bA=kA("left"),uA=function(vt){return{name:"border-radius-"+vt,initialValue:"0 0",prefix:!1,type:1,parse:function(mt,St){return Af(St.filter(ls))}}},Rr=uA("top-left"),hA=uA("top-right"),cf=uA("bottom-right"),ju=uA("bottom-left"),ch=function(vt){return{name:"border-"+vt+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(mt,St){switch(St){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},TA=ch("top"),ml=ch("right"),eu=ch("bottom"),Ol=ch("left"),Rl=function(vt){return{name:"border-"+vt+"-width",initialValue:"0",type:0,prefix:!1,parse:function(mt,St){return aA(St)?St.number:0}}},pf=Rl("top"),od=Rl("right"),sd=Rl("bottom"),rc=Rl("left"),nu={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},iu={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"rtl":return 1;case"ltr":default:return 0}}},Jc={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(vt,mt){return mt.filter(co).reduce(function(St,wt){return St|qc(wt.value)},0)}},qc=function(vt){switch(vt){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},$c={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},oc={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(vt,mt){return mt.type===20&&mt.value==="normal"?0:mt.type===17||mt.type===15?mt.number:0}},Qo;(function(vt){vt.NORMAL="normal",vt.STRICT="strict"})(Qo||(Qo={}));var ru={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"strict":return Qo.STRICT;case"normal":default:return Qo.NORMAL}}},Jr={name:"line-height",initialValue:"normal",prefix:!1,type:4},Bs=function(vt,mt){return co(vt)&&vt.value==="normal"?1.2*mt:vt.type===17?mt*vt.number:ls(vt)?uo(vt,mt):mt},Us={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(vt,mt){return mt.type===20&&mt.value==="none"?null:Vs.parse(vt,mt)}},Is={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"inside":return 0;case"outside":default:return 1}}},ou={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},ms=function(vt){return{name:"margin-"+vt,initialValue:"0",prefix:!1,type:4}},Ku=ms("top"),sc=ms("right"),ac=ms("bottom"),Ea=ms("left"),mf={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(vt,mt){return mt.filter(co).map(function(St){switch(St.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},oo={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"break-word":return"break-word";case"normal":default:return"normal"}}},Gl=function(vt){return{name:"padding-"+vt,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},ad=Gl("top"),su=Gl("right"),au=Gl("bottom"),vf=Gl("left"),vs={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},Ds={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},zu={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(vt,mt){return mt.length===1&&da(mt[0],"none")?[]:Fa(mt).map(function(St){for(var wt={color:kl.TRANSPARENT,offsetX:Ns,offsetY:Ns,blur:Ns},Qt=0,_t=0;_t<St.length;_t++){var oe=St[_t];Ks(oe)?(Qt===0?wt.offsetX=oe:Qt===1?wt.offsetY=oe:wt.blur=oe,Qt++):wt.color=pl.parse(vt,oe)}return wt})}},nl={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},lu={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(vt,mt){if(mt.type===20&&mt.value==="none")return null;if(mt.type===18){var St=jl[mt.name];if(typeof St=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+mt.name+'"');return St(mt.values)}return null}},za=function(vt){var mt=vt.filter(function(St){return St.type===17}).map(function(St){return St.number});return mt.length===6?mt:null},hs=function(vt){var mt=vt.filter(function(ae){return ae.type===17}).map(function(ae){return ae.number}),St=mt[0],wt=mt[1];mt[2],mt[3];var Qt=mt[4],_t=mt[5];mt[6],mt[7],mt[8],mt[9],mt[10],mt[11];var oe=mt[12],xe=mt[13];return mt[14],mt[15],mt.length===16?[St,wt,Qt,_t,oe,xe]:null},jl={matrix:za,matrix3d:hs},Va={type:16,number:50,flags:nn},Hs=[Va,Va],vl={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(vt,mt){var St=mt.filter(ls);return St.length!==2?Hs:[St[0],St[1]]}},so={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},Ma;(function(vt){vt.NORMAL="normal",vt.BREAK_ALL="break-all",vt.KEEP_ALL="keep-all"})(Ma||(Ma={}));for(var NA={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"break-all":return Ma.BREAK_ALL;case"keep-all":return Ma.KEEP_ALL;case"normal":default:return Ma.NORMAL}}},Au={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(vt,mt){if(mt.type===20)return{auto:!0,order:0};if(Xi(mt))return{auto:!1,order:mt.number};throw new Error("Invalid z-index number parsed")}},uu={name:"time",parse:function(vt,mt){if(mt.type===15)switch(mt.unit.toLowerCase()){case"s":return 1e3*mt.number;case"ms":return mt.number}throw new Error("Unsupported time type")}},yg={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(vt,mt){return Xi(mt)?mt.number:1}},ph={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},wg={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(vt,mt){return mt.filter(co).map(function(St){switch(St.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(St){return St!==0})}},Br={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(vt,mt){var St=[],wt=[];return mt.forEach(function(Qt){switch(Qt.type){case 20:case 0:St.push(Qt.value);break;case 17:St.push(Qt.number.toString());break;case 4:wt.push(St.join(" ")),St.length=0;break}}),St.length&&wt.push(St.join(" ")),wt.map(function(Qt){return Qt.indexOf(" ")===-1?Qt:"'"+Qt+"'"})}},Sg={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},ld={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(vt,mt){if(Xi(mt))return mt.number;if(co(mt))switch(mt.value){case"bold":return 700;case"normal":default:return 400}return 400}},yf={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(vt,mt){return mt.filter(co).map(function(St){return St.value})}},Kl={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},Cs=function(vt,mt){return(vt&mt)!==0},xg={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(vt,mt){if(mt.length===0)return[];var St=mt[0];return St.type===20&&St.value==="none"?[]:mt}},tp={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(vt,mt){if(mt.length===0)return null;var St=mt[0];if(St.type===20&&St.value==="none")return null;for(var wt=[],Qt=mt.filter(Pa),_t=0;_t<Qt.length;_t++){var oe=Qt[_t],xe=Qt[_t+1];if(oe.type===20){var ae=xe&&Xi(xe)?xe.number:1;wt.push({counter:oe.value,increment:ae})}}return wt}},mh={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(vt,mt){if(mt.length===0)return[];for(var St=[],wt=mt.filter(Pa),Qt=0;Qt<wt.length;Qt++){var _t=wt[Qt],oe=wt[Qt+1];if(co(_t)&&_t.value!=="none"){var xe=oe&&Xi(oe)?oe.number:0;St.push({counter:_t.value,reset:xe})}}return St}},wf={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(vt,mt){return mt.filter(aA).map(function(St){return uu.parse(vt,St)})}},vh={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(vt,mt){if(mt.length===0)return null;var St=mt[0];if(St.type===20&&St.value==="none")return null;var wt=[],Qt=mt.filter(lA);if(Qt.length%2!==0)return null;for(var _t=0;_t<Qt.length;_t+=2){var oe=Qt[_t].value,xe=Qt[_t+1].value;wt.push({open:oe,close:xe})}return wt}},yh=function(vt,mt,St){if(!vt)return"";var wt=vt[Math.min(mt,vt.length-1)];return wt?St?wt.open:wt.close:""},Bg={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(vt,mt){return mt.length===1&&da(mt[0],"none")?[]:Fa(mt).map(function(St){for(var wt={color:255,offsetX:Ns,offsetY:Ns,blur:Ns,spread:Ns,inset:!1},Qt=0,_t=0;_t<St.length;_t++){var oe=St[_t];da(oe,"inset")?wt.inset=!0:Ks(oe)?(Qt===0?wt.offsetX=oe:Qt===1?wt.offsetY=oe:Qt===2?wt.blur=oe:wt.spread=oe,Qt++):wt.color=pl.parse(vt,oe)}return wt})}},Ad={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(vt,mt){var St=[0,1,2],wt=[];return mt.filter(co).forEach(function(Qt){switch(Qt.value){case"stroke":wt.push(1);break;case"fill":wt.push(0);break;case"markers":wt.push(2);break}}),St.forEach(function(Qt){wt.indexOf(Qt)===-1&&wt.push(Qt)}),wt}},Cg={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},wh={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(vt,mt){return aA(mt)?mt.number:0}},hu=function(){function vt(mt,St){var wt,Qt;this.animationDuration=Gi(mt,wf,St.animationDuration),this.backgroundClip=Gi(mt,Li,St.backgroundClip),this.backgroundColor=Gi(mt,id,St.backgroundColor),this.backgroundImage=Gi(mt,Co,St.backgroundImage),this.backgroundOrigin=Gi(mt,zo,St.backgroundOrigin),this.backgroundPosition=Gi(mt,Or,St.backgroundPosition),this.backgroundRepeat=Gi(mt,Ru,St.backgroundRepeat),this.backgroundSize=Gi(mt,br,St.backgroundSize),this.borderTopColor=Gi(mt,vg,St.borderTopColor),this.borderRightColor=Gi(mt,rd,St.borderRightColor),this.borderBottomColor=Gi(mt,df,St.borderBottomColor),this.borderLeftColor=Gi(mt,bA,St.borderLeftColor),this.borderTopLeftRadius=Gi(mt,Rr,St.borderTopLeftRadius),this.borderTopRightRadius=Gi(mt,hA,St.borderTopRightRadius),this.borderBottomRightRadius=Gi(mt,cf,St.borderBottomRightRadius),this.borderBottomLeftRadius=Gi(mt,ju,St.borderBottomLeftRadius),this.borderTopStyle=Gi(mt,TA,St.borderTopStyle),this.borderRightStyle=Gi(mt,ml,St.borderRightStyle),this.borderBottomStyle=Gi(mt,eu,St.borderBottomStyle),this.borderLeftStyle=Gi(mt,Ol,St.borderLeftStyle),this.borderTopWidth=Gi(mt,pf,St.borderTopWidth),this.borderRightWidth=Gi(mt,od,St.borderRightWidth),this.borderBottomWidth=Gi(mt,sd,St.borderBottomWidth),this.borderLeftWidth=Gi(mt,rc,St.borderLeftWidth),this.boxShadow=Gi(mt,Bg,St.boxShadow),this.color=Gi(mt,nu,St.color),this.direction=Gi(mt,iu,St.direction),this.display=Gi(mt,Jc,St.display),this.float=Gi(mt,$c,St.cssFloat),this.fontFamily=Gi(mt,Br,St.fontFamily),this.fontSize=Gi(mt,Sg,St.fontSize),this.fontStyle=Gi(mt,Kl,St.fontStyle),this.fontVariant=Gi(mt,yf,St.fontVariant),this.fontWeight=Gi(mt,ld,St.fontWeight),this.letterSpacing=Gi(mt,oc,St.letterSpacing),this.lineBreak=Gi(mt,ru,St.lineBreak),this.lineHeight=Gi(mt,Jr,St.lineHeight),this.listStyleImage=Gi(mt,Us,St.listStyleImage),this.listStylePosition=Gi(mt,Is,St.listStylePosition),this.listStyleType=Gi(mt,ou,St.listStyleType),this.marginTop=Gi(mt,Ku,St.marginTop),this.marginRight=Gi(mt,sc,St.marginRight),this.marginBottom=Gi(mt,ac,St.marginBottom),this.marginLeft=Gi(mt,Ea,St.marginLeft),this.opacity=Gi(mt,yg,St.opacity);var _t=Gi(mt,mf,St.overflow);this.overflowX=_t[0],this.overflowY=_t[_t.length>1?1:0],this.overflowWrap=Gi(mt,oo,St.overflowWrap),this.paddingTop=Gi(mt,ad,St.paddingTop),this.paddingRight=Gi(mt,su,St.paddingRight),this.paddingBottom=Gi(mt,au,St.paddingBottom),this.paddingLeft=Gi(mt,vf,St.paddingLeft),this.paintOrder=Gi(mt,Ad,St.paintOrder),this.position=Gi(mt,Ds,St.position),this.textAlign=Gi(mt,vs,St.textAlign),this.textDecorationColor=Gi(mt,ph,(wt=St.textDecorationColor)!==null&&wt!==void 0?wt:St.color),this.textDecorationLine=Gi(mt,wg,(Qt=St.textDecorationLine)!==null&&Qt!==void 0?Qt:St.textDecoration),this.textShadow=Gi(mt,zu,St.textShadow),this.textTransform=Gi(mt,nl,St.textTransform),this.transform=Gi(mt,lu,St.transform),this.transformOrigin=Gi(mt,vl,St.transformOrigin),this.visibility=Gi(mt,so,St.visibility),this.webkitTextStrokeColor=Gi(mt,Cg,St.webkitTextStrokeColor),this.webkitTextStrokeWidth=Gi(mt,wh,St.webkitTextStrokeWidth),this.wordBreak=Gi(mt,NA,St.wordBreak),this.zIndex=Gi(mt,Au,St.zIndex)}return vt.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},vt.prototype.isTransparent=function(){return As(this.backgroundColor)},vt.prototype.isTransformed=function(){return this.transform!==null},vt.prototype.isPositioned=function(){return this.position!==0},vt.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},vt.prototype.isFloating=function(){return this.float!==0},vt.prototype.isInlineLevel=function(){return Cs(this.display,4)||Cs(this.display,33554432)||Cs(this.display,268435456)||Cs(this.display,536870912)||Cs(this.display,67108864)||Cs(this.display,134217728)},vt}(),pa=function(){function vt(mt,St){this.content=Gi(mt,xg,St.content),this.quotes=Gi(mt,vh,St.quotes)}return vt}(),zl=function(){function vt(mt,St){this.counterIncrement=Gi(mt,tp,St.counterIncrement),this.counterReset=Gi(mt,mh,St.counterReset)}return vt}(),Gi=function(vt,mt,St){var wt=new Ml,Qt=St!==null&&typeof St!="undefined"?St.toString():mt.initialValue;wt.write(Qt);var _t=new Du(wt.read());switch(mt.type){case 2:var oe=_t.parseComponentValue();return mt.parse(vt,co(oe)?oe.value:mt.initialValue);case 0:return mt.parse(vt,_t.parseComponentValue());case 1:return mt.parse(vt,_t.parseComponentValues());case 4:return _t.parseComponentValue();case 3:switch(mt.format){case"angle":return Xo.parse(vt,_t.parseComponentValue());case"color":return pl.parse(vt,_t.parseComponentValue());case"image":return Vs.parse(vt,_t.parseComponentValue());case"length":var xe=_t.parseComponentValue();return Ks(xe)?xe:Ns;case"length-percentage":var ae=_t.parseComponentValue();return ls(ae)?ae:Ns;case"time":return uu.parse(vt,_t.parseComponentValue())}break}},QA="data-html2canvas-debug",Sf=function(vt){var mt=vt.getAttribute(QA);switch(mt){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},Sh=function(vt,mt){var St=Sf(vt);return St===1||mt===St},Vl=function(){function vt(mt,St){if(this.context=mt,this.textNodes=[],this.elements=[],this.flags=0,Sh(St,3))debugger;this.styles=new hu(mt,window.getComputedStyle(St,null)),Uh(St)&&(this.styles.animationDuration.some(function(wt){return wt>0})&&(St.style.animationDuration="0s"),this.styles.transform!==null&&(St.style.transform="none")),this.bounds=we(this.context,St),Sh(St,4)&&(this.flags|=16)}return vt}(),gu="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",fu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xh=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Vu=0;Vu<fu.length;Vu++)xh[fu.charCodeAt(Vu)]=Vu;for(var ea=function(vt){var mt=vt.length*.75,St=vt.length,wt,Qt=0,_t,oe,xe,ae;vt[vt.length-1]==="="&&(mt--,vt[vt.length-2]==="="&&mt--);var _e=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(mt):new Array(mt),qe=Array.isArray(_e)?_e:new Uint8Array(_e);for(wt=0;wt<St;wt+=4)_t=xh[vt.charCodeAt(wt)],oe=xh[vt.charCodeAt(wt+1)],xe=xh[vt.charCodeAt(wt+2)],ae=xh[vt.charCodeAt(wt+3)],qe[Qt++]=_t<<2|oe>>4,qe[Qt++]=(oe&15)<<4|xe>>2,qe[Qt++]=(xe&3)<<6|ae&63;return _e},Wu=function(vt){for(var mt=vt.length,St=[],wt=0;wt<mt;wt+=2)St.push(vt[wt+1]<<8|vt[wt]);return St},ud=function(vt){for(var mt=vt.length,St=[],wt=0;wt<mt;wt+=4)St.push(vt[wt+3]<<24|vt[wt+2]<<16|vt[wt+1]<<8|vt[wt]);return St},Wl=5,_u=11,_l=2,Pg=_u-Wl,xf=65536>>Wl,gs=1<<Wl,Yu=gs-1,du=1024>>Wl,Xu=xf+du,Fg=Xu,hd=32,Bh=Fg+hd,lc=65536>>_u,Zu=1<<Pg,yl=Zu-1,gd=function(vt,mt,St){return vt.slice?vt.slice(mt,St):new Uint16Array(Array.prototype.slice.call(vt,mt,St))},fd=function(vt,mt,St){return vt.slice?vt.slice(mt,St):new Uint32Array(Array.prototype.slice.call(vt,mt,St))},Ju=function(vt,mt){var St=ea(vt),wt=Array.isArray(St)?ud(St):new Uint32Array(St),Qt=Array.isArray(St)?Wu(St):new Uint16Array(St),_t=24,oe=gd(Qt,_t/2,wt[4]/2),xe=wt[5]===2?gd(Qt,(_t+wt[4])/2):fd(wt,Math.ceil((_t+wt[4])/4));return new Ch(wt[0],wt[1],wt[2],wt[3],oe,xe)},Ch=function(){function vt(mt,St,wt,Qt,_t,oe){this.initialValue=mt,this.errorValue=St,this.highStart=wt,this.highValueIndex=Qt,this.index=_t,this.data=oe}return vt.prototype.get=function(mt){var St;if(mt>=0){if(mt<55296||mt>56319&&mt<=65535)return St=this.index[mt>>Wl],St=(St<<_l)+(mt&Yu),this.data[St];if(mt<=65535)return St=this.index[xf+(mt-55296>>Wl)],St=(St<<_l)+(mt&Yu),this.data[St];if(mt<this.highStart)return St=Bh-lc+(mt>>_u),St=this.index[St],St+=mt>>Wl&yl,St=this.index[St],St=(St<<_l)+(mt&Yu),this.data[St];if(mt<=1114111)return this.data[this.highValueIndex]}return this.errorValue},vt}(),Vo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",UA=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Lg=0;Lg<Vo.length;Lg++)UA[Vo.charCodeAt(Lg)]=Lg;var Bf=1,Cf=2,ge=3,cu=4,Yl=5,Ac=7,Pf=8,Ff=9,Eg=10,uc=11,Os=12,Ph=13,Lf=14,Ef=15,hc=function(vt){for(var mt=[],St=0,wt=vt.length;St<wt;){var Qt=vt.charCodeAt(St++);if(Qt>=55296&&Qt<=56319&&St<wt){var _t=vt.charCodeAt(St++);(_t&64512)===56320?mt.push(((Qt&1023)<<10)+(_t&1023)+65536):(mt.push(Qt),St--)}else mt.push(Qt)}return mt},gc=function(){for(var vt=[],mt=0;mt<arguments.length;mt++)vt[mt]=arguments[mt];if(String.fromCodePoint)return String.fromCodePoint.apply(String,vt);var St=vt.length;if(!St)return"";for(var wt=[],Qt=-1,_t="";++Qt<St;){var oe=vt[Qt];oe<=65535?wt.push(oe):(oe-=65536,wt.push((oe>>10)+55296,oe%1024+56320)),(Qt+1===St||wt.length>16384)&&(_t+=String.fromCharCode.apply(String,wt),wt.length=0)}return _t},fc=Ju(gu),il="\xD7",ka="\xF7",Fh=function(vt){return fc.get(vt)},dd=function(vt,mt,St){var wt=St-2,Qt=mt[wt],_t=mt[St-1],oe=mt[St];if(_t===Cf&&oe===ge)return il;if(_t===Cf||_t===ge||_t===cu||oe===Cf||oe===ge||oe===cu)return ka;if(_t===Pf&&[Pf,Ff,uc,Os].indexOf(oe)!==-1||(_t===uc||_t===Ff)&&(oe===Ff||oe===Eg)||(_t===Os||_t===Eg)&&oe===Eg||oe===Ph||oe===Yl||oe===Ac||_t===Bf)return il;if(_t===Ph&&oe===Lf){for(;Qt===Yl;)Qt=mt[--wt];if(Qt===Lf)return il}if(_t===Ef&&oe===Ef){for(var xe=0;Qt===Ef;)xe++,Qt=mt[--wt];if(xe%2===0)return il}return ka},gA=function(vt){var mt=hc(vt),St=mt.length,wt=0,Qt=0,_t=mt.map(Fh);return{next:function(){if(wt>=St)return{done:!0,value:null};for(var oe=il;wt<St&&(oe=dd(mt,_t,++wt))===il;);if(oe!==il||wt===St){var xe=gc.apply(null,mt.slice(Qt,wt));return Qt=wt,{value:xe,done:!1}}return{done:!0,value:null}}}},Mg=function(vt){for(var mt=gA(vt),St=[],wt;!(wt=mt.next()).done;)wt.value&&St.push(wt.value.slice());return St},Mf=function(vt){var mt=123;if(vt.createRange){var St=vt.createRange();if(St.getBoundingClientRect){var wt=vt.createElement("boundtest");wt.style.height=mt+"px",wt.style.display="block",vt.body.appendChild(wt),St.selectNode(wt);var Qt=St.getBoundingClientRect(),_t=Math.round(Qt.height);if(vt.body.removeChild(wt),_t===mt)return!0}}return!1},kg=function(vt){var mt=vt.createElement("boundtest");mt.style.width="50px",mt.style.display="block",mt.style.fontSize="12px",mt.style.letterSpacing="0px",mt.style.wordSpacing="0px",vt.body.appendChild(mt);var St=vt.createRange();mt.innerHTML=typeof"".repeat=="function"?"&#128104;".repeat(10):"";var wt=mt.firstChild,Qt=De(wt.data).map(function(ae){return fe(ae)}),_t=0,oe={},xe=Qt.every(function(ae,_e){St.setStart(wt,_t),St.setEnd(wt,_t+ae.length);var qe=St.getBoundingClientRect();_t+=ae.length;var dn=qe.x>oe.x||qe.y>oe.y;return oe=qe,_e===0?!0:dn});return vt.body.removeChild(mt),xe},Wa=function(){return typeof new Image().crossOrigin!="undefined"},cd=function(){return typeof new XMLHttpRequest().responseType=="string"},pd=function(vt){var mt=new Image,St=vt.createElement("canvas"),wt=St.getContext("2d");if(!wt)return!1;mt.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{wt.drawImage(mt,0,0),St.toDataURL()}catch(Qt){return!1}return!0},rl=function(vt){return vt[0]===0&&vt[1]===255&&vt[2]===0&&vt[3]===255},Lh=function(vt){var mt=vt.createElement("canvas"),St=100;mt.width=St,mt.height=St;var wt=mt.getContext("2d");if(!wt)return Promise.reject(!1);wt.fillStyle="rgb(0, 255, 0)",wt.fillRect(0,0,St,St);var Qt=new Image,_t=mt.toDataURL();Qt.src=_t;var oe=bg(St,St,0,0,Qt);return wt.fillStyle="red",wt.fillRect(0,0,St,St),md(oe).then(function(xe){wt.drawImage(xe,0,0);var ae=wt.getImageData(0,0,St,St).data;wt.fillStyle="red",wt.fillRect(0,0,St,St);var _e=vt.createElement("div");return _e.style.backgroundImage="url("+_t+")",_e.style.height=St+"px",rl(ae)?md(bg(St,St,0,0,_e)):Promise.reject(!1)}).then(function(xe){return wt.drawImage(xe,0,0),rl(wt.getImageData(0,0,St,St).data)}).catch(function(){return!1})},bg=function(vt,mt,St,wt,Qt){var _t="http://www.w3.org/2000/svg",oe=document.createElementNS(_t,"svg"),xe=document.createElementNS(_t,"foreignObject");return oe.setAttributeNS(null,"width",vt.toString()),oe.setAttributeNS(null,"height",mt.toString()),xe.setAttributeNS(null,"width","100%"),xe.setAttributeNS(null,"height","100%"),xe.setAttributeNS(null,"x",St.toString()),xe.setAttributeNS(null,"y",wt.toString()),xe.setAttributeNS(null,"externalResourcesRequired","true"),oe.appendChild(xe),xe.appendChild(Qt),oe},md=function(vt){return new Promise(function(mt,St){var wt=new Image;wt.onload=function(){return mt(wt)},wt.onerror=St,wt.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(vt))})},ys={get SUPPORT_RANGE_BOUNDS(){var vt=Mf(document);return Object.defineProperty(ys,"SUPPORT_RANGE_BOUNDS",{value:vt}),vt},get SUPPORT_WORD_BREAKING(){var vt=ys.SUPPORT_RANGE_BOUNDS&&kg(document);return Object.defineProperty(ys,"SUPPORT_WORD_BREAKING",{value:vt}),vt},get SUPPORT_SVG_DRAWING(){var vt=pd(document);return Object.defineProperty(ys,"SUPPORT_SVG_DRAWING",{value:vt}),vt},get SUPPORT_FOREIGNOBJECT_DRAWING(){var vt=typeof Array.from=="function"&&typeof window.fetch=="function"?Lh(document):Promise.resolve(!1);return Object.defineProperty(ys,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:vt}),vt},get SUPPORT_CORS_IMAGES(){var vt=Wa();return Object.defineProperty(ys,"SUPPORT_CORS_IMAGES",{value:vt}),vt},get SUPPORT_RESPONSE_TYPE(){var vt=cd();return Object.defineProperty(ys,"SUPPORT_RESPONSE_TYPE",{value:vt}),vt},get SUPPORT_CORS_XHR(){var vt="withCredentials"in new XMLHttpRequest;return Object.defineProperty(ys,"SUPPORT_CORS_XHR",{value:vt}),vt},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var vt=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(ys,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:vt}),vt}},Ws=function(){function vt(mt,St){this.text=mt,this.bounds=St}return vt}(),vd=function(vt,mt,St,wt){var Qt=kh(mt,St),_t=[],oe=0;return Qt.forEach(function(xe){if(St.textDecorationLine.length||xe.trim().length>0)if(ys.SUPPORT_RANGE_BOUNDS){var ae=Eh(wt,oe,xe.length).getClientRects();if(ae.length>1){var _e=Mh(xe),qe=0;_e.forEach(function(Gn){_t.push(new Ws(Gn,be.fromDOMRectList(vt,Eh(wt,qe+oe,Gn.length).getClientRects()))),qe+=Gn.length})}else _t.push(new Ws(xe,be.fromDOMRectList(vt,ae)))}else{var dn=wt.splitText(xe.length);_t.push(new Ws(xe,fs(vt,wt))),wt=dn}else ys.SUPPORT_RANGE_BOUNDS||(wt=wt.splitText(xe.length));oe+=xe.length}),_t},fs=function(vt,mt){var St=mt.ownerDocument;if(St){var wt=St.createElement("html2canvaswrapper");wt.appendChild(mt.cloneNode(!0));var Qt=mt.parentNode;if(Qt){Qt.replaceChild(wt,mt);var _t=we(vt,wt);return wt.firstChild&&Qt.replaceChild(wt.firstChild,wt),_t}}return be.EMPTY},Eh=function(vt,mt,St){var wt=vt.ownerDocument;if(!wt)throw new Error("Node has no owner document");var Qt=wt.createRange();return Qt.setStart(vt,mt),Qt.setEnd(vt,mt+St),Qt},Mh=function(vt){if(ys.SUPPORT_NATIVE_TEXT_SEGMENTATION){var mt=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(mt.segment(vt)).map(function(St){return St.segment})}return Mg(vt)},pu=function(vt,mt){if(ys.SUPPORT_NATIVE_TEXT_SEGMENTATION){var St=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(St.segment(vt)).map(function(wt){return wt.segment})}return yd(vt,mt)},kh=function(vt,mt){return mt.letterSpacing!==0?Mh(vt):pu(vt,mt)},bh=[32,160,4961,65792,65793,4153,4241],yd=function(vt,mt){for(var St=Se(vt,{lineBreak:mt.lineBreak,wordBreak:mt.overflowWrap==="break-word"?"break-word":mt.wordBreak}),wt=[],Qt,_t=function(){if(Qt.value){var oe=Qt.value.slice(),xe=De(oe),ae="";xe.forEach(function(_e){bh.indexOf(_e)===-1?ae+=fe(_e):(ae.length&&wt.push(ae),wt.push(fe(_e)),ae="")}),ae.length&&wt.push(ae)}};!(Qt=St.next()).done;)_t();return wt},Th=function(){function vt(mt,St,wt){this.text=wd(St.data,wt.textTransform),this.textBounds=vd(mt,this.text,wt,St)}return vt}(),wd=function(vt,mt){switch(mt){case 1:return vt.toLowerCase();case 3:return vt.replace(fA,qu);case 2:return vt.toUpperCase();default:return vt}},fA=/(^|\s|:|-|\(|\))([a-z])/g,qu=function(vt,mt,St){return vt.length>0?mt+St.toUpperCase():vt},Tg=function(vt){ee(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this;return Qt.src=wt.currentSrc||wt.src,Qt.intrinsicWidth=wt.naturalWidth,Qt.intrinsicHeight=wt.naturalHeight,Qt.context.cache.addImage(Qt.src),Qt}return mt}(Vl),Ng=function(vt){ee(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this;return Qt.canvas=wt,Qt.intrinsicWidth=wt.width,Qt.intrinsicHeight=wt.height,Qt}return mt}(Vl),Qg=function(vt){ee(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this,_t=new XMLSerializer,oe=we(St,wt);return wt.setAttribute("width",oe.width+"px"),wt.setAttribute("height",oe.height+"px"),Qt.svg="data:image/svg+xml,"+encodeURIComponent(_t.serializeToString(wt)),Qt.intrinsicWidth=wt.width.baseVal.value,Qt.intrinsicHeight=wt.height.baseVal.value,Qt.context.cache.addImage(Qt.svg),Qt}return mt}(Vl),mu=function(vt){ee(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this;return Qt.value=wt.value,Qt}return mt}(Vl),Ug=function(vt){ee(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this;return Qt.start=wt.start,Qt.reversed=typeof wt.reversed=="boolean"&&wt.reversed===!0,Qt}return mt}(Vl),Sd=[{type:15,flags:0,unit:"px",number:3}],xd=[{type:16,flags:0,number:50}],Xl=function(vt){return vt.width>vt.height?new be(vt.left+(vt.width-vt.height)/2,vt.top,vt.height,vt.height):vt.width<vt.height?new be(vt.left,vt.top+(vt.height-vt.width)/2,vt.width,vt.width):vt},dc=function(vt){var mt=vt.type===$u?new Array(vt.value.length+1).join("\u2022"):vt.value;return mt.length===0?vt.placeholder||"":mt},Nh="checkbox",IA="radio",$u="password",kf=707406591,wl=function(vt){ee(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this;switch(Qt.type=wt.type.toLowerCase(),Qt.checked=wt.checked,Qt.value=dc(wt),(Qt.type===Nh||Qt.type===IA)&&(Qt.styles.backgroundColor=3739148031,Qt.styles.borderTopColor=Qt.styles.borderRightColor=Qt.styles.borderBottomColor=Qt.styles.borderLeftColor=2779096575,Qt.styles.borderTopWidth=Qt.styles.borderRightWidth=Qt.styles.borderBottomWidth=Qt.styles.borderLeftWidth=1,Qt.styles.borderTopStyle=Qt.styles.borderRightStyle=Qt.styles.borderBottomStyle=Qt.styles.borderLeftStyle=1,Qt.styles.backgroundClip=[0],Qt.styles.backgroundOrigin=[0],Qt.bounds=Xl(Qt.bounds)),Qt.type){case Nh:Qt.styles.borderTopRightRadius=Qt.styles.borderTopLeftRadius=Qt.styles.borderBottomRightRadius=Qt.styles.borderBottomLeftRadius=Sd;break;case IA:Qt.styles.borderTopRightRadius=Qt.styles.borderTopLeftRadius=Qt.styles.borderBottomRightRadius=Qt.styles.borderBottomLeftRadius=xd;break}return Qt}return mt}(Vl),bf=function(vt){ee(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this,_t=wt.options[wt.selectedIndex||0];return Qt.value=_t&&_t.text||"",Qt}return mt}(Vl),Ig=function(vt){ee(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this;return Qt.value=wt.value,Qt}return mt}(Vl),Bd=function(vt){ee(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this;Qt.src=wt.src,Qt.width=parseInt(wt.width,10)||0,Qt.height=parseInt(wt.height,10)||0,Qt.backgroundColor=Qt.styles.backgroundColor;try{if(wt.contentWindow&&wt.contentWindow.document&&wt.contentWindow.document.documentElement){Qt.tree=Pd(St,wt.contentWindow.document.documentElement);var _t=wt.contentWindow.document.documentElement?qA(St,getComputedStyle(wt.contentWindow.document.documentElement).backgroundColor):kl.TRANSPARENT,oe=wt.contentWindow.document.body?qA(St,getComputedStyle(wt.contentWindow.document.body).backgroundColor):kl.TRANSPARENT;Qt.backgroundColor=As(_t)?As(oe)?Qt.styles.backgroundColor:oe:_t}}catch(xe){}return Qt}return mt}(Vl),Cd=["OL","UL","MENU"],Qh=function(vt,mt,St,wt){for(var Qt=mt.firstChild,_t=void 0;Qt;Qt=_t)if(_t=Qt.nextSibling,Dg(Qt)&&Qt.data.trim().length>0)St.textNodes.push(new Th(vt,Qt,St.styles));else if(th(Qt))if(Uf(Qt)&&Qt.assignedNodes)Qt.assignedNodes().forEach(function(xe){return Qh(vt,xe,St,wt)});else{var oe=cc(vt,Qt);oe.styles.isVisible()&&(Tf(Qt,oe,wt)?oe.flags|=4:Nf(oe.styles)&&(oe.flags|=2),Cd.indexOf(Qt.tagName)!==-1&&(oe.flags|=8),St.elements.push(oe),Qt.slot,Qt.shadowRoot?Qh(vt,Qt.shadowRoot,oe,wt):!Ih(Qt)&&!Ld(Qt)&&!Dh(Qt)&&Qh(vt,Qt,oe,wt))}},cc=function(vt,mt){return ws(mt)?new Tg(vt,mt):eh(mt)?new Ng(vt,mt):Ld(mt)?new Qg(vt,mt):Fd(mt)?new mu(vt,mt):Hg(mt)?new Ug(vt,mt):pc(mt)?new wl(vt,mt):Dh(mt)?new bf(vt,mt):Ih(mt)?new Ig(vt,mt):ma(mt)?new Bd(vt,mt):new Vl(vt,mt)},Pd=function(vt,mt){var St=cc(vt,mt);return St.flags|=4,Qh(vt,mt,St,St),St},Tf=function(vt,mt,St){return mt.styles.isPositionedWithZIndex()||mt.styles.opacity<1||mt.styles.isTransformed()||jr(vt)&&St.styles.isTransparent()},Nf=function(vt){return vt.isPositioned()||vt.isFloating()},Dg=function(vt){return vt.nodeType===Node.TEXT_NODE},th=function(vt){return vt.nodeType===Node.ELEMENT_NODE},Uh=function(vt){return th(vt)&&typeof vt.style!="undefined"&&!Zl(vt)},Zl=function(vt){return typeof vt.className=="object"},Fd=function(vt){return vt.tagName==="LI"},Hg=function(vt){return vt.tagName==="OL"},pc=function(vt){return vt.tagName==="INPUT"},Qf=function(vt){return vt.tagName==="HTML"},Ld=function(vt){return vt.tagName==="svg"},jr=function(vt){return vt.tagName==="BODY"},eh=function(vt){return vt.tagName==="CANVAS"},vu=function(vt){return vt.tagName==="VIDEO"},ws=function(vt){return vt.tagName==="IMG"},ma=function(vt){return vt.tagName==="IFRAME"},yu=function(vt){return vt.tagName==="STYLE"},Og=function(vt){return vt.tagName==="SCRIPT"},Ih=function(vt){return vt.tagName==="TEXTAREA"},Dh=function(vt){return vt.tagName==="SELECT"},Uf=function(vt){return vt.tagName==="SLOT"},If=function(vt){return vt.tagName.indexOf("-")>0},Ed=function(){function vt(){this.counters={}}return vt.prototype.getCounterValue=function(mt){var St=this.counters[mt];return St&&St.length?St[St.length-1]:1},vt.prototype.getCounterValues=function(mt){var St=this.counters[mt];return St||[]},vt.prototype.pop=function(mt){var St=this;mt.forEach(function(wt){return St.counters[wt].pop()})},vt.prototype.parse=function(mt){var St=this,wt=mt.counterIncrement,Qt=mt.counterReset,_t=!0;wt!==null&&wt.forEach(function(xe){var ae=St.counters[xe.counter];ae&&xe.increment!==0&&(_t=!1,ae.length||ae.push(1),ae[Math.max(0,ae.length-1)]+=xe.increment)});var oe=[];return _t&&Qt.forEach(function(xe){var ae=St.counters[xe.counter];oe.push(xe.counter),ae||(ae=St.counters[xe.counter]=[]),ae.push(xe.reset)}),oe},vt}(),DA={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},Hh={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054F","\u054E","\u054D","\u054C","\u054B","\u054A","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053F","\u053E","\u053D","\u053C","\u053B","\u053A","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},wu={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05D9\u05F3","\u05D8\u05F3","\u05D7\u05F3","\u05D6\u05F3","\u05D5\u05F3","\u05D4\u05F3","\u05D3\u05F3","\u05D2\u05F3","\u05D1\u05F3","\u05D0\u05F3","\u05EA","\u05E9","\u05E8","\u05E7","\u05E6","\u05E4","\u05E2","\u05E1","\u05E0","\u05DE","\u05DC","\u05DB","\u05D9\u05D8","\u05D9\u05D7","\u05D9\u05D6","\u05D8\u05D6","\u05D8\u05D5","\u05D9","\u05D8","\u05D7","\u05D6","\u05D5","\u05D4","\u05D3","\u05D2","\u05D1","\u05D0"]},po={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10F5","\u10F0","\u10EF","\u10F4","\u10EE","\u10ED","\u10EC","\u10EB","\u10EA","\u10E9","\u10E8","\u10E7","\u10E6","\u10E5","\u10E4","\u10F3","\u10E2","\u10E1","\u10E0","\u10DF","\u10DE","\u10DD","\u10F2","\u10DC","\u10DB","\u10DA","\u10D9","\u10D8","\u10D7","\u10F1","\u10D6","\u10D5","\u10D4","\u10D3","\u10D2","\u10D1","\u10D0"]},HA=function(vt,mt,St,wt,Qt,_t){return vt<mt||vt>St?ht(vt,Qt,_t.length>0):wt.integers.reduce(function(oe,xe,ae){for(;vt>=xe;)vt-=xe,oe+=wt.values[ae];return oe},"")+_t},Df=function(vt,mt,St,wt){var Qt="";do St||vt--,Qt=wt(vt)+Qt,vt/=mt;while(vt*mt>=mt);return Qt},ns=function(vt,mt,St,wt,Qt){var _t=St-mt+1;return(vt<0?"-":"")+(Df(Math.abs(vt),_t,wt,function(oe){return fe(Math.floor(oe%_t)+mt)})+Qt)},bl=function(vt,mt,St){St===void 0&&(St=". ");var wt=mt.length;return Df(Math.abs(vt),wt,!1,function(Qt){return mt[Math.floor(Qt%wt)]})+St},dA=1,OA=2,Uo=4,Oh=8,ol=function(vt,mt,St,wt,Qt,_t){if(vt<-9999||vt>9999)return ht(vt,4,Qt.length>0);var oe=Math.abs(vt),xe=Qt;if(oe===0)return mt[0]+xe;for(var ae=0;oe>0&&ae<=4;ae++){var _e=oe%10;_e===0&&Cs(_t,dA)&&xe!==""?xe=mt[_e]+xe:_e>1||_e===1&&ae===0||_e===1&&ae===1&&Cs(_t,OA)||_e===1&&ae===1&&Cs(_t,Uo)&&vt>100||_e===1&&ae>1&&Cs(_t,Oh)?xe=mt[_e]+(ae>0?St[ae-1]:"")+xe:_e===1&&ae>0&&(xe=St[ae-1]+xe),oe=Math.floor(oe/10)}return(vt<0?wt:"")+xe},cA="\u5341\u767E\u5343\u842C",Rh="\u62FE\u4F70\u4EDF\u842C",it="\u30DE\u30A4\u30CA\u30B9",st="\uB9C8\uC774\uB108\uC2A4",ht=function(vt,mt,St){var wt=St?". ":"",Qt=St?"\u3001":"",_t=St?", ":"",oe=St?" ":"";switch(mt){case 0:return"\u2022"+oe;case 1:return"\u25E6"+oe;case 2:return"\u25FE"+oe;case 5:var xe=ns(vt,48,57,!0,wt);return xe.length<4?"0"+xe:xe;case 4:return bl(vt,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Qt);case 6:return HA(vt,1,3999,DA,3,wt).toLowerCase();case 7:return HA(vt,1,3999,DA,3,wt);case 8:return ns(vt,945,969,!1,wt);case 9:return ns(vt,97,122,!1,wt);case 10:return ns(vt,65,90,!1,wt);case 11:return ns(vt,1632,1641,!0,wt);case 12:case 49:return HA(vt,1,9999,Hh,3,wt);case 35:return HA(vt,1,9999,Hh,3,wt).toLowerCase();case 13:return ns(vt,2534,2543,!0,wt);case 14:case 30:return ns(vt,6112,6121,!0,wt);case 15:return bl(vt,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",Qt);case 16:return bl(vt,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",Qt);case 17:case 48:return ol(vt,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",cA,"\u8CA0",Qt,OA|Uo|Oh);case 47:return ol(vt,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",Rh,"\u8CA0",Qt,dA|OA|Uo|Oh);case 42:return ol(vt,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",cA,"\u8D1F",Qt,OA|Uo|Oh);case 41:return ol(vt,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",Rh,"\u8D1F",Qt,dA|OA|Uo|Oh);case 26:return ol(vt,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",it,Qt,0);case 25:return ol(vt,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",it,Qt,dA|OA|Uo);case 31:return ol(vt,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",st,_t,dA|OA|Uo);case 33:return ol(vt,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",st,_t,0);case 32:return ol(vt,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",st,_t,dA|OA|Uo);case 18:return ns(vt,2406,2415,!0,wt);case 20:return HA(vt,1,19999,po,3,wt);case 21:return ns(vt,2790,2799,!0,wt);case 22:return ns(vt,2662,2671,!0,wt);case 22:return HA(vt,1,10999,wu,3,wt);case 23:return bl(vt,"\u3042\u3044\u3046\u3048\u304A\u304B\u304D\u304F\u3051\u3053\u3055\u3057\u3059\u305B\u305D\u305F\u3061\u3064\u3066\u3068\u306A\u306B\u306C\u306D\u306E\u306F\u3072\u3075\u3078\u307B\u307E\u307F\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308A\u308B\u308C\u308D\u308F\u3090\u3091\u3092\u3093");case 24:return bl(vt,"\u3044\u308D\u306F\u306B\u307B\u3078\u3068\u3061\u308A\u306C\u308B\u3092\u308F\u304B\u3088\u305F\u308C\u305D\u3064\u306D\u306A\u3089\u3080\u3046\u3090\u306E\u304A\u304F\u3084\u307E\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304D\u3086\u3081\u307F\u3057\u3091\u3072\u3082\u305B\u3059");case 27:return ns(vt,3302,3311,!0,wt);case 28:return bl(vt,"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F0\u30F1\u30F2\u30F3",Qt);case 29:return bl(vt,"\u30A4\u30ED\u30CF\u30CB\u30DB\u30D8\u30C8\u30C1\u30EA\u30CC\u30EB\u30F2\u30EF\u30AB\u30E8\u30BF\u30EC\u30BD\u30C4\u30CD\u30CA\u30E9\u30E0\u30A6\u30F0\u30CE\u30AA\u30AF\u30E4\u30DE\u30B1\u30D5\u30B3\u30A8\u30C6\u30A2\u30B5\u30AD\u30E6\u30E1\u30DF\u30B7\u30F1\u30D2\u30E2\u30BB\u30B9",Qt);case 34:return ns(vt,3792,3801,!0,wt);case 37:return ns(vt,6160,6169,!0,wt);case 38:return ns(vt,4160,4169,!0,wt);case 39:return ns(vt,2918,2927,!0,wt);case 40:return ns(vt,1776,1785,!0,wt);case 43:return ns(vt,3046,3055,!0,wt);case 44:return ns(vt,3174,3183,!0,wt);case 45:return ns(vt,3664,3673,!0,wt);case 46:return ns(vt,3872,3881,!0,wt);case 3:default:return ns(vt,48,57,!0,wt)}},ut="data-html2canvas-ignore",dt=function(){function vt(mt,St,wt){if(this.context=mt,this.options=wt,this.scrolledElements=[],this.referenceElement=St,this.counters=new Ed,this.quoteDepth=0,!St.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(St.ownerDocument.documentElement,!1)}return vt.prototype.toIFrame=function(mt,St){var wt=this,Qt=bt(mt,St);if(!Qt.contentWindow)return Promise.reject("Unable to find iframe window");var _t=mt.defaultView.pageXOffset,oe=mt.defaultView.pageYOffset,xe=Qt.contentWindow,ae=xe.document,_e=Zt(Qt).then(function(){return Be(wt,void 0,void 0,function(){var qe,dn;return Ne(this,function(Gn){switch(Gn.label){case 0:return this.scrolledElements.forEach(Fn),xe&&(xe.scrollTo(St.left,St.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(xe.scrollY!==St.top||xe.scrollX!==St.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(xe.scrollX-St.left,xe.scrollY-St.top,0,0))),qe=this.options.onclone,dn=this.clonedReferenceElement,typeof dn=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:ae.fonts&&ae.fonts.ready?[4,ae.fonts.ready]:[3,2];case 1:Gn.sent(),Gn.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Ot(ae)]:[3,4];case 3:Gn.sent(),Gn.label=4;case 4:return typeof qe=="function"?[2,Promise.resolve().then(function(){return qe(ae,dn)}).then(function(){return Qt})]:[2,Qt]}})})});return ae.open(),ae.write(Ve(document.doctype)+"<html></html>"),Ge(this.referenceElement.ownerDocument,_t,oe),ae.replaceChild(ae.adoptNode(this.documentElement),ae.documentElement),ae.close(),_e},vt.prototype.createElementClone=function(mt){if(Sh(mt,2))debugger;if(eh(mt))return this.createCanvasClone(mt);if(vu(mt))return this.createVideoClone(mt);if(yu(mt))return this.createStyleClone(mt);var St=mt.cloneNode(!1);return ws(St)&&(ws(mt)&&mt.currentSrc&&mt.currentSrc!==mt.src&&(St.src=mt.currentSrc,St.srcset=""),St.loading==="lazy"&&(St.loading="eager")),If(St)?this.createCustomElementClone(St):St},vt.prototype.createCustomElementClone=function(mt){var St=document.createElement("html2canvascustomelement");return te(mt.style,St),St},vt.prototype.createStyleClone=function(mt){try{var St=mt.sheet;if(St&&St.cssRules){var wt=[].slice.call(St.cssRules,0).reduce(function(_t,oe){return oe&&typeof oe.cssText=="string"?_t+oe.cssText:_t},""),Qt=mt.cloneNode(!1);return Qt.textContent=wt,Qt}}catch(_t){if(this.context.logger.error("Unable to access cssRules property",_t),_t.name!=="SecurityError")throw _t}return mt.cloneNode(!1)},vt.prototype.createCanvasClone=function(mt){var St;if(this.options.inlineImages&&mt.ownerDocument){var wt=mt.ownerDocument.createElement("img");try{return wt.src=mt.toDataURL(),wt}catch(_e){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",mt)}}var Qt=mt.cloneNode(!1);try{Qt.width=mt.width,Qt.height=mt.height;var _t=mt.getContext("2d"),oe=Qt.getContext("2d");if(oe)if(!this.options.allowTaint&&_t)oe.putImageData(_t.getImageData(0,0,mt.width,mt.height),0,0);else{var xe=(St=mt.getContext("webgl2"))!==null&&St!==void 0?St:mt.getContext("webgl");if(xe){var ae=xe.getContextAttributes();(ae==null?void 0:ae.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",mt)}oe.drawImage(mt,0,0)}return Qt}catch(_e){this.context.logger.info("Unable to clone canvas as it is tainted",mt)}return Qt},vt.prototype.createVideoClone=function(mt){var St=mt.ownerDocument.createElement("canvas");St.width=mt.offsetWidth,St.height=mt.offsetHeight;var wt=St.getContext("2d");try{return wt&&(wt.drawImage(mt,0,0,St.width,St.height),this.options.allowTaint||wt.getImageData(0,0,St.width,St.height)),St}catch(_t){this.context.logger.info("Unable to clone video as it is tainted",mt)}var Qt=mt.ownerDocument.createElement("canvas");return Qt.width=mt.offsetWidth,Qt.height=mt.offsetHeight,Qt},vt.prototype.appendChildNode=function(mt,St,wt){(!th(St)||!Og(St)&&!St.hasAttribute(ut)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(St)))&&(!this.options.copyStyles||!th(St)||!yu(St))&&mt.appendChild(this.cloneNode(St,wt))},vt.prototype.cloneChildNodes=function(mt,St,wt){for(var Qt=this,_t=mt.shadowRoot?mt.shadowRoot.firstChild:mt.firstChild;_t;_t=_t.nextSibling)if(th(_t)&&Uf(_t)&&typeof _t.assignedNodes=="function"){var oe=_t.assignedNodes();oe.length&&oe.forEach(function(xe){return Qt.appendChildNode(St,xe,wt)})}else this.appendChildNode(St,_t,wt)},vt.prototype.cloneNode=function(mt,St){if(Dg(mt))return document.createTextNode(mt.data);if(!mt.ownerDocument)return mt.cloneNode(!1);var wt=mt.ownerDocument.defaultView;if(wt&&th(mt)&&(Uh(mt)||Zl(mt))){var Qt=this.createElementClone(mt);Qt.style.transitionProperty="none";var _t=wt.getComputedStyle(mt),oe=wt.getComputedStyle(mt,":before"),xe=wt.getComputedStyle(mt,":after");this.referenceElement===mt&&Uh(Qt)&&(this.clonedReferenceElement=Qt),jr(Qt)&&Di(Qt);var ae=this.counters.parse(new zl(this.context,_t)),_e=this.resolvePseudoContent(mt,Qt,oe,Pt.BEFORE);If(mt)&&(St=!0),vu(mt)||this.cloneChildNodes(mt,Qt,St),_e&&Qt.insertBefore(_e,Qt.firstChild);var qe=this.resolvePseudoContent(mt,Qt,xe,Pt.AFTER);return qe&&Qt.appendChild(qe),this.counters.pop(ae),(_t&&(this.options.copyStyles||Zl(mt))&&!ma(mt)||St)&&te(_t,Qt),(mt.scrollTop!==0||mt.scrollLeft!==0)&&this.scrolledElements.push([Qt,mt.scrollLeft,mt.scrollTop]),(Ih(mt)||Dh(mt))&&(Ih(Qt)||Dh(Qt))&&(Qt.value=mt.value),Qt}return mt.cloneNode(!1)},vt.prototype.resolvePseudoContent=function(mt,St,wt,Qt){var _t=this;if(wt){var oe=wt.content,xe=St.ownerDocument;if(!(!xe||!oe||oe==="none"||oe==="-moz-alt-content"||wt.display==="none")){this.counters.parse(new zl(this.context,wt));var ae=new pa(this.context,wt),_e=xe.createElement("html2canvaspseudoelement");te(wt,_e),ae.content.forEach(function(dn){if(dn.type===0)_e.appendChild(xe.createTextNode(dn.value));else if(dn.type===22){var Gn=xe.createElement("img");Gn.src=dn.value,Gn.style.opacity="1",_e.appendChild(Gn)}else if(dn.type===18){if(dn.name==="attr"){var Ii=dn.values.filter(co);Ii.length&&_e.appendChild(xe.createTextNode(mt.getAttribute(Ii[0].value)||""))}else if(dn.name==="counter"){var Ai=dn.values.filter(dl),Fi=Ai[0],Ur=Ai[1];if(Fi&&co(Fi)){var $i=_t.counters.getCounterValue(Fi.value),tr=Ur&&co(Ur)?ou.parse(_t.context,Ur.value):3;_e.appendChild(xe.createTextNode(ht($i,tr,!1)))}}else if(dn.name==="counters"){var ir=dn.values.filter(dl),Fi=ir[0],zr=ir[1],Ur=ir[2];if(Fi&&co(Fi)){var Lr=_t.counters.getCounterValues(Fi.value),ji=Ur&&co(Ur)?ou.parse(_t.context,Ur.value):3,eo=zr&&zr.type===0?zr.value:"",ao=Lr.map(function(_a){return ht(_a,ji,!1)}).join(eo);_e.appendChild(xe.createTextNode(ao))}}}else if(dn.type===20)switch(dn.value){case"open-quote":_e.appendChild(xe.createTextNode(yh(ae.quotes,_t.quoteDepth++,!0)));break;case"close-quote":_e.appendChild(xe.createTextNode(yh(ae.quotes,--_t.quoteDepth,!1)));break;default:_e.appendChild(xe.createTextNode(dn.value))}}),_e.className=oi+" "+bi;var qe=Qt===Pt.BEFORE?" "+oi:" "+bi;return Zl(St)?St.className.baseValue+=qe:St.className+=qe,_e}}},vt.destroy=function(mt){return mt.parentNode?(mt.parentNode.removeChild(mt),!0):!1},vt}(),Pt;(function(vt){vt[vt.BEFORE=0]="BEFORE",vt[vt.AFTER=1]="AFTER"})(Pt||(Pt={}));var bt=function(vt,mt){var St=vt.createElement("iframe");return St.className="html2canvas-container",St.style.visibility="hidden",St.style.position="fixed",St.style.left="-10000px",St.style.top="0px",St.style.border="0",St.width=mt.width.toString(),St.height=mt.height.toString(),St.scrolling="no",St.setAttribute(ut,"true"),vt.body.appendChild(St),St},jt=function(vt){return new Promise(function(mt){if(vt.complete){mt();return}if(!vt.src){mt();return}vt.onload=mt,vt.onerror=mt})},Ot=function(vt){return Promise.all([].slice.call(vt.images,0).map(jt))},Zt=function(vt){return new Promise(function(mt,St){var wt=vt.contentWindow;if(!wt)return St("No window assigned for iframe");var Qt=wt.document;wt.onload=vt.onload=function(){wt.onload=vt.onload=null;var _t=setInterval(function(){Qt.body.childNodes.length>0&&Qt.readyState==="complete"&&(clearInterval(_t),mt(vt))},50)}})},Pe=["all","d","content"],te=function(vt,mt){for(var St=vt.length-1;St>=0;St--){var wt=vt.item(St);Pe.indexOf(wt)===-1&&mt.style.setProperty(wt,vt.getPropertyValue(wt))}return mt},Ve=function(vt){var mt="";return vt&&(mt+="<!DOCTYPE ",vt.name&&(mt+=vt.name),vt.internalSubset&&(mt+=vt.internalSubset),vt.publicId&&(mt+='"'+vt.publicId+'"'),vt.systemId&&(mt+='"'+vt.systemId+'"'),mt+=">"),mt},Ge=function(vt,mt,St){vt&&vt.defaultView&&(mt!==vt.defaultView.pageXOffset||St!==vt.defaultView.pageYOffset)&&vt.defaultView.scrollTo(mt,St)},Fn=function(vt){var mt=vt[0],St=vt[1],wt=vt[2];mt.scrollLeft=St,mt.scrollTop=wt},In=":before",_n=":after",oi="___html2canvas___pseudoelement_before",bi="___html2canvas___pseudoelement_after",Bi=`{
content: "" !important;
display: none !important;
}`,Di=function(vt){ar(vt,"."+oi+In+Bi+`
.`+bi+_n+Bi)},ar=function(vt,mt){var St=vt.ownerDocument;if(St){var wt=St.createElement("style");wt.textContent=mt,vt.appendChild(wt)}},wi=function(){function vt(){}return vt.getOrigin=function(mt){var St=vt._link;return St?(St.href=mt,St.href=St.href,St.protocol+St.hostname+St.port):"about:blank"},vt.isSameOrigin=function(mt){return vt.getOrigin(mt)===vt._origin},vt.setContext=function(mt){vt._link=mt.document.createElement("a"),vt._origin=vt.getOrigin(mt.location.href)},vt._origin="about:blank",vt}(),Cr=function(){function vt(mt,St){this.context=mt,this._options=St,this._cache={}}return vt.prototype.addImage=function(mt){var St=Promise.resolve();return this.has(mt)||(va(mt)||ba(mt))&&(this._cache[mt]=this.loadImage(mt)).catch(function(){}),St},vt.prototype.match=function(mt){return this._cache[mt]},vt.prototype.loadImage=function(mt){return Be(this,void 0,void 0,function(){var St,wt,Qt,_t,oe=this;return Ne(this,function(xe){switch(xe.label){case 0:return St=wi.isSameOrigin(mt),wt=!Rs(mt)&&this._options.useCORS===!0&&ys.SUPPORT_CORS_IMAGES&&!St,Qt=!Rs(mt)&&!St&&!va(mt)&&typeof this._options.proxy=="string"&&ys.SUPPORT_CORS_XHR&&!wt,!St&&this._options.allowTaint===!1&&!Rs(mt)&&!va(mt)&&!Qt&&!wt?[2]:(_t=mt,Qt?[4,this.proxy(_t)]:[3,2]);case 1:_t=xe.sent(),xe.label=2;case 2:return this.context.logger.debug("Added image "+mt.substring(0,256)),[4,new Promise(function(ae,_e){var qe=new Image;qe.onload=function(){return ae(qe)},qe.onerror=_e,(Ps(_t)||wt)&&(qe.crossOrigin="anonymous"),qe.src=_t,qe.complete===!0&&setTimeout(function(){return ae(qe)},500),oe._options.imageTimeout>0&&setTimeout(function(){return _e("Timed out ("+oe._options.imageTimeout+"ms) loading image")},oe._options.imageTimeout)})];case 3:return[2,xe.sent()]}})})},vt.prototype.has=function(mt){return typeof this._cache[mt]!="undefined"},vt.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},vt.prototype.proxy=function(mt){var St=this,wt=this._options.proxy;if(!wt)throw new Error("No proxy defined");var Qt=mt.substring(0,256);return new Promise(function(_t,oe){var xe=ys.SUPPORT_RESPONSE_TYPE?"blob":"text",ae=new XMLHttpRequest;ae.onload=function(){if(ae.status===200)if(xe==="text")_t(ae.response);else{var dn=new FileReader;dn.addEventListener("load",function(){return _t(dn.result)},!1),dn.addEventListener("error",function(Gn){return oe(Gn)},!1),dn.readAsDataURL(ae.response)}else oe("Failed to proxy resource "+Qt+" with status code "+ae.status)},ae.onerror=oe;var _e=wt.indexOf("?")>-1?"&":"?";if(ae.open("GET",""+wt+_e+"url="+encodeURIComponent(mt)+"&responseType="+xe),xe!=="text"&&ae instanceof XMLHttpRequest&&(ae.responseType=xe),St._options.imageTimeout){var qe=St._options.imageTimeout;ae.timeout=qe,ae.ontimeout=function(){return oe("Timed out ("+qe+"ms) proxying "+Qt)}}ae.send()})},vt}(),Io=/^data:image\/svg\+xml/i,ks=/^data:image\/.*;base64,/i,Zo=/^data:image\/.*/i,ba=function(vt){return ys.SUPPORT_SVG_DRAWING||!_s(vt)},Rs=function(vt){return Zo.test(vt)},Ps=function(vt){return ks.test(vt)},va=function(vt){return vt.substr(0,4)==="blob"},_s=function(vt){return vt.substr(-3).toLowerCase()==="svg"||Io.test(vt)},vi=function(){function vt(mt,St){this.type=0,this.x=mt,this.y=St}return vt.prototype.add=function(mt,St){return new vt(this.x+mt,this.y+St)},vt}(),Hr=function(vt,mt,St){return new vi(vt.x+(mt.x-vt.x)*St,vt.y+(mt.y-vt.y)*St)},Do=function(){function vt(mt,St,wt,Qt){this.type=1,this.start=mt,this.startControl=St,this.endControl=wt,this.end=Qt}return vt.prototype.subdivide=function(mt,St){var wt=Hr(this.start,this.startControl,mt),Qt=Hr(this.startControl,this.endControl,mt),_t=Hr(this.endControl,this.end,mt),oe=Hr(wt,Qt,mt),xe=Hr(Qt,_t,mt),ae=Hr(oe,xe,mt);return St?new vt(this.start,wt,oe,ae):new vt(ae,xe,_t,this.end)},vt.prototype.add=function(mt,St){return new vt(this.start.add(mt,St),this.startControl.add(mt,St),this.endControl.add(mt,St),this.end.add(mt,St))},vt.prototype.reverse=function(){return new vt(this.end,this.endControl,this.startControl,this.start)},vt}(),Po=function(vt){return vt.type===1},Ys=function(){function vt(mt){var St=mt.styles,wt=mt.bounds,Qt=MA(St.borderTopLeftRadius,wt.width,wt.height),_t=Qt[0],oe=Qt[1],xe=MA(St.borderTopRightRadius,wt.width,wt.height),ae=xe[0],_e=xe[1],qe=MA(St.borderBottomRightRadius,wt.width,wt.height),dn=qe[0],Gn=qe[1],Ii=MA(St.borderBottomLeftRadius,wt.width,wt.height),Ai=Ii[0],Fi=Ii[1],Ur=[];Ur.push((_t+ae)/wt.width),Ur.push((Ai+dn)/wt.width),Ur.push((oe+Fi)/wt.height),Ur.push((_e+Gn)/wt.height);var $i=Math.max.apply(Math,Ur);$i>1&&(_t/=$i,oe/=$i,ae/=$i,_e/=$i,dn/=$i,Gn/=$i,Ai/=$i,Fi/=$i);var tr=wt.width-ae,ir=wt.height-Gn,zr=wt.width-dn,Lr=wt.height-Fi,ji=St.borderTopWidth,eo=St.borderRightWidth,ao=St.borderBottomWidth,Mr=St.borderLeftWidth,Ts=uo(St.paddingTop,mt.bounds.width),_a=uo(St.paddingRight,mt.bounds.width),ll=uo(St.paddingBottom,mt.bounds.width),Ho=uo(St.paddingLeft,mt.bounds.width);this.topLeftBorderDoubleOuterBox=_t>0||oe>0?wr(wt.left+Mr/3,wt.top+ji/3,_t-Mr/3,oe-ji/3,Kr.TOP_LEFT):new vi(wt.left+Mr/3,wt.top+ji/3),this.topRightBorderDoubleOuterBox=_t>0||oe>0?wr(wt.left+tr,wt.top+ji/3,ae-eo/3,_e-ji/3,Kr.TOP_RIGHT):new vi(wt.left+wt.width-eo/3,wt.top+ji/3),this.bottomRightBorderDoubleOuterBox=dn>0||Gn>0?wr(wt.left+zr,wt.top+ir,dn-eo/3,Gn-ao/3,Kr.BOTTOM_RIGHT):new vi(wt.left+wt.width-eo/3,wt.top+wt.height-ao/3),this.bottomLeftBorderDoubleOuterBox=Ai>0||Fi>0?wr(wt.left+Mr/3,wt.top+Lr,Ai-Mr/3,Fi-ao/3,Kr.BOTTOM_LEFT):new vi(wt.left+Mr/3,wt.top+wt.height-ao/3),this.topLeftBorderDoubleInnerBox=_t>0||oe>0?wr(wt.left+Mr*2/3,wt.top+ji*2/3,_t-Mr*2/3,oe-ji*2/3,Kr.TOP_LEFT):new vi(wt.left+Mr*2/3,wt.top+ji*2/3),this.topRightBorderDoubleInnerBox=_t>0||oe>0?wr(wt.left+tr,wt.top+ji*2/3,ae-eo*2/3,_e-ji*2/3,Kr.TOP_RIGHT):new vi(wt.left+wt.width-eo*2/3,wt.top+ji*2/3),this.bottomRightBorderDoubleInnerBox=dn>0||Gn>0?wr(wt.left+zr,wt.top+ir,dn-eo*2/3,Gn-ao*2/3,Kr.BOTTOM_RIGHT):new vi(wt.left+wt.width-eo*2/3,wt.top+wt.height-ao*2/3),this.bottomLeftBorderDoubleInnerBox=Ai>0||Fi>0?wr(wt.left+Mr*2/3,wt.top+Lr,Ai-Mr*2/3,Fi-ao*2/3,Kr.BOTTOM_LEFT):new vi(wt.left+Mr*2/3,wt.top+wt.height-ao*2/3),this.topLeftBorderStroke=_t>0||oe>0?wr(wt.left+Mr/2,wt.top+ji/2,_t-Mr/2,oe-ji/2,Kr.TOP_LEFT):new vi(wt.left+Mr/2,wt.top+ji/2),this.topRightBorderStroke=_t>0||oe>0?wr(wt.left+tr,wt.top+ji/2,ae-eo/2,_e-ji/2,Kr.TOP_RIGHT):new vi(wt.left+wt.width-eo/2,wt.top+ji/2),this.bottomRightBorderStroke=dn>0||Gn>0?wr(wt.left+zr,wt.top+ir,dn-eo/2,Gn-ao/2,Kr.BOTTOM_RIGHT):new vi(wt.left+wt.width-eo/2,wt.top+wt.height-ao/2),this.bottomLeftBorderStroke=Ai>0||Fi>0?wr(wt.left+Mr/2,wt.top+Lr,Ai-Mr/2,Fi-ao/2,Kr.BOTTOM_LEFT):new vi(wt.left+Mr/2,wt.top+wt.height-ao/2),this.topLeftBorderBox=_t>0||oe>0?wr(wt.left,wt.top,_t,oe,Kr.TOP_LEFT):new vi(wt.left,wt.top),this.topRightBorderBox=ae>0||_e>0?wr(wt.left+tr,wt.top,ae,_e,Kr.TOP_RIGHT):new vi(wt.left+wt.width,wt.top),this.bottomRightBorderBox=dn>0||Gn>0?wr(wt.left+zr,wt.top+ir,dn,Gn,Kr.BOTTOM_RIGHT):new vi(wt.left+wt.width,wt.top+wt.height),this.bottomLeftBorderBox=Ai>0||Fi>0?wr(wt.left,wt.top+Lr,Ai,Fi,Kr.BOTTOM_LEFT):new vi(wt.left,wt.top+wt.height),this.topLeftPaddingBox=_t>0||oe>0?wr(wt.left+Mr,wt.top+ji,Math.max(0,_t-Mr),Math.max(0,oe-ji),Kr.TOP_LEFT):new vi(wt.left+Mr,wt.top+ji),this.topRightPaddingBox=ae>0||_e>0?wr(wt.left+Math.min(tr,wt.width-eo),wt.top+ji,tr>wt.width+eo?0:Math.max(0,ae-eo),Math.max(0,_e-ji),Kr.TOP_RIGHT):new vi(wt.left+wt.width-eo,wt.top+ji),this.bottomRightPaddingBox=dn>0||Gn>0?wr(wt.left+Math.min(zr,wt.width-Mr),wt.top+Math.min(ir,wt.height-ao),Math.max(0,dn-eo),Math.max(0,Gn-ao),Kr.BOTTOM_RIGHT):new vi(wt.left+wt.width-eo,wt.top+wt.height-ao),this.bottomLeftPaddingBox=Ai>0||Fi>0?wr(wt.left+Mr,wt.top+Math.min(Lr,wt.height-ao),Math.max(0,Ai-Mr),Math.max(0,Fi-ao),Kr.BOTTOM_LEFT):new vi(wt.left+Mr,wt.top+wt.height-ao),this.topLeftContentBox=_t>0||oe>0?wr(wt.left+Mr+Ho,wt.top+ji+Ts,Math.max(0,_t-(Mr+Ho)),Math.max(0,oe-(ji+Ts)),Kr.TOP_LEFT):new vi(wt.left+Mr+Ho,wt.top+ji+Ts),this.topRightContentBox=ae>0||_e>0?wr(wt.left+Math.min(tr,wt.width+Mr+Ho),wt.top+ji+Ts,tr>wt.width+Mr+Ho?0:ae-Mr+Ho,_e-(ji+Ts),Kr.TOP_RIGHT):new vi(wt.left+wt.width-(eo+_a),wt.top+ji+Ts),this.bottomRightContentBox=dn>0||Gn>0?wr(wt.left+Math.min(zr,wt.width-(Mr+Ho)),wt.top+Math.min(ir,wt.height+ji+Ts),Math.max(0,dn-(eo+_a)),Gn-(ao+ll),Kr.BOTTOM_RIGHT):new vi(wt.left+wt.width-(eo+_a),wt.top+wt.height-(ao+ll)),this.bottomLeftContentBox=Ai>0||Fi>0?wr(wt.left+Mr+Ho,wt.top+Lr,Math.max(0,Ai-(Mr+Ho)),Fi-(ao+ll),Kr.BOTTOM_LEFT):new vi(wt.left+Mr+Ho,wt.top+wt.height-(ao+ll))}return vt}(),Kr;(function(vt){vt[vt.TOP_LEFT=0]="TOP_LEFT",vt[vt.TOP_RIGHT=1]="TOP_RIGHT",vt[vt.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",vt[vt.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Kr||(Kr={}));var wr=function(vt,mt,St,wt,Qt){var _t=4*((Math.sqrt(2)-1)/3),oe=St*_t,xe=wt*_t,ae=vt+St,_e=mt+wt;switch(Qt){case Kr.TOP_LEFT:return new Do(new vi(vt,_e),new vi(vt,_e-xe),new vi(ae-oe,mt),new vi(ae,mt));case Kr.TOP_RIGHT:return new Do(new vi(vt,mt),new vi(vt+oe,mt),new vi(ae,_e-xe),new vi(ae,_e));case Kr.BOTTOM_RIGHT:return new Do(new vi(ae,mt),new vi(ae,mt+xe),new vi(vt+oe,_e),new vi(vt,_e));case Kr.BOTTOM_LEFT:default:return new Do(new vi(ae,_e),new vi(ae-oe,_e),new vi(vt,mt+xe),new vi(vt,mt))}},Ta=function(vt){return[vt.topLeftBorderBox,vt.topRightBorderBox,vt.bottomRightBorderBox,vt.bottomLeftBorderBox]},as=function(vt){return[vt.topLeftContentBox,vt.topRightContentBox,vt.bottomRightContentBox,vt.bottomLeftContentBox]},Su=function(vt){return[vt.topLeftPaddingBox,vt.topRightPaddingBox,vt.bottomRightPaddingBox,vt.bottomLeftPaddingBox]},sl=function(){function vt(mt,St,wt){this.offsetX=mt,this.offsetY=St,this.matrix=wt,this.type=0,this.target=6}return vt}(),na=function(){function vt(mt,St){this.path=mt,this.target=St,this.type=1}return vt}(),Na=function(){function vt(mt){this.opacity=mt,this.type=2,this.target=6}return vt}(),mo=function(vt){return vt.type===0},bs=function(vt){return vt.type===1},pA=function(vt){return vt.type===2},nh=function(vt,mt){return vt.length===mt.length?vt.some(function(St,wt){return St===mt[wt]}):!1},Jp=function(vt,mt,St,wt,Qt){return vt.map(function(_t,oe){switch(oe){case 0:return _t.add(mt,St);case 1:return _t.add(mt+wt,St);case 2:return _t.add(mt+wt,St+Qt);case 3:return _t.add(mt,St+Qt)}return _t})},Qa=function(){function vt(mt){this.element=mt,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return vt}(),mc=function(){function vt(mt,St){if(this.container=mt,this.parent=St,this.effects=[],this.curves=new Ys(this.container),this.container.styles.opacity<1&&this.effects.push(new Na(this.container.styles.opacity)),this.container.styles.transform!==null){var wt=this.container.bounds.left+this.container.styles.transformOrigin[0].number,Qt=this.container.bounds.top+this.container.styles.transformOrigin[1].number,_t=this.container.styles.transform;this.effects.push(new sl(wt,Qt,_t))}if(this.container.styles.overflowX!==0){var oe=Ta(this.curves),xe=Su(this.curves);nh(oe,xe)?this.effects.push(new na(oe,6)):(this.effects.push(new na(oe,2)),this.effects.push(new na(xe,4)))}}return vt.prototype.getEffects=function(mt){for(var St=[2,3].indexOf(this.container.styles.position)===-1,wt=this.parent,Qt=this.effects.slice(0);wt;){var _t=wt.effects.filter(function(ae){return!bs(ae)});if(St||wt.container.styles.position!==0||!wt.parent){if(Qt.unshift.apply(Qt,_t),St=[2,3].indexOf(wt.container.styles.position)===-1,wt.container.styles.overflowX!==0){var oe=Ta(wt.curves),xe=Su(wt.curves);nh(oe,xe)||Qt.unshift(new na(xe,6))}}else Qt.unshift.apply(Qt,_t);wt=wt.parent}return Qt.filter(function(ae){return Cs(ae.target,mt)})},vt}(),mA=function(vt,mt,St,wt){vt.container.elements.forEach(function(Qt){var _t=Cs(Qt.flags,4),oe=Cs(Qt.flags,2),xe=new mc(Qt,vt);Cs(Qt.styles.display,2048)&&wt.push(xe);var ae=Cs(Qt.flags,8)?[]:wt;if(_t||oe){var _e=_t||Qt.styles.isPositioned()?St:mt,qe=new Qa(xe);if(Qt.styles.isPositioned()||Qt.styles.opacity<1||Qt.styles.isTransformed()){var dn=Qt.styles.zIndex.order;if(dn<0){var Gn=0;_e.negativeZIndex.some(function(Ai,Fi){return dn>Ai.element.container.styles.zIndex.order?(Gn=Fi,!1):Gn>0}),_e.negativeZIndex.splice(Gn,0,qe)}else if(dn>0){var Ii=0;_e.positiveZIndex.some(function(Ai,Fi){return dn>=Ai.element.container.styles.zIndex.order?(Ii=Fi+1,!1):Ii>0}),_e.positiveZIndex.splice(Ii,0,qe)}else _e.zeroOrAutoZIndexOrTransformedOrOpacity.push(qe)}else Qt.styles.isFloating()?_e.nonPositionedFloats.push(qe):_e.nonPositionedInlineLevel.push(qe);mA(xe,qe,_t?qe:St,ae)}else Qt.styles.isInlineLevel()?mt.inlineLevel.push(xe):mt.nonInlineLevel.push(xe),mA(xe,mt,St,ae);Cs(Qt.flags,8)&&Md(Qt,ae)})},Md=function(vt,mt){for(var St=vt instanceof Ug?vt.start:1,wt=vt instanceof Ug?vt.reversed:!1,Qt=0;Qt<mt.length;Qt++){var _t=mt[Qt];_t.container instanceof mu&&typeof _t.container.value=="number"&&_t.container.value!==0&&(St=_t.container.value),_t.listValue=ht(St,_t.container.styles.listStyleType,!0),St+=wt?-1:1}},Hf=function(vt){var mt=new mc(vt,null),St=new Qa(mt),wt=[];return mA(mt,St,St,wt),Md(mt.container,wt),St},Gh=function(vt,mt){switch(mt){case 0:return Fs(vt.topLeftBorderBox,vt.topLeftPaddingBox,vt.topRightBorderBox,vt.topRightPaddingBox);case 1:return Fs(vt.topRightBorderBox,vt.topRightPaddingBox,vt.bottomRightBorderBox,vt.bottomRightPaddingBox);case 2:return Fs(vt.bottomRightBorderBox,vt.bottomRightPaddingBox,vt.bottomLeftBorderBox,vt.bottomLeftPaddingBox);case 3:default:return Fs(vt.bottomLeftBorderBox,vt.bottomLeftPaddingBox,vt.topLeftBorderBox,vt.topLeftPaddingBox)}},ih=function(vt,mt){switch(mt){case 0:return Fs(vt.topLeftBorderBox,vt.topLeftBorderDoubleOuterBox,vt.topRightBorderBox,vt.topRightBorderDoubleOuterBox);case 1:return Fs(vt.topRightBorderBox,vt.topRightBorderDoubleOuterBox,vt.bottomRightBorderBox,vt.bottomRightBorderDoubleOuterBox);case 2:return Fs(vt.bottomRightBorderBox,vt.bottomRightBorderDoubleOuterBox,vt.bottomLeftBorderBox,vt.bottomLeftBorderDoubleOuterBox);case 3:default:return Fs(vt.bottomLeftBorderBox,vt.bottomLeftBorderDoubleOuterBox,vt.topLeftBorderBox,vt.topLeftBorderDoubleOuterBox)}},kd=function(vt,mt){switch(mt){case 0:return Fs(vt.topLeftBorderDoubleInnerBox,vt.topLeftPaddingBox,vt.topRightBorderDoubleInnerBox,vt.topRightPaddingBox);case 1:return Fs(vt.topRightBorderDoubleInnerBox,vt.topRightPaddingBox,vt.bottomRightBorderDoubleInnerBox,vt.bottomRightPaddingBox);case 2:return Fs(vt.bottomRightBorderDoubleInnerBox,vt.bottomRightPaddingBox,vt.bottomLeftBorderDoubleInnerBox,vt.bottomLeftPaddingBox);case 3:default:return Fs(vt.bottomLeftBorderDoubleInnerBox,vt.bottomLeftPaddingBox,vt.topLeftBorderDoubleInnerBox,vt.topLeftPaddingBox)}},jh=function(vt,mt){switch(mt){case 0:return xu(vt.topLeftBorderStroke,vt.topRightBorderStroke);case 1:return xu(vt.topRightBorderStroke,vt.bottomRightBorderStroke);case 2:return xu(vt.bottomRightBorderStroke,vt.bottomLeftBorderStroke);case 3:default:return xu(vt.bottomLeftBorderStroke,vt.topLeftBorderStroke)}},xu=function(vt,mt){var St=[];return Po(vt)?St.push(vt.subdivide(.5,!1)):St.push(vt),Po(mt)?St.push(mt.subdivide(.5,!0)):St.push(mt),St},Fs=function(vt,mt,St,wt){var Qt=[];return Po(vt)?Qt.push(vt.subdivide(.5,!1)):Qt.push(vt),Po(St)?Qt.push(St.subdivide(.5,!0)):Qt.push(St),Po(wt)?Qt.push(wt.subdivide(.5,!0).reverse()):Qt.push(wt),Po(mt)?Qt.push(mt.subdivide(.5,!1).reverse()):Qt.push(mt),Qt},ia=function(vt){var mt=vt.bounds,St=vt.styles;return mt.add(St.borderLeftWidth,St.borderTopWidth,-(St.borderRightWidth+St.borderLeftWidth),-(St.borderTopWidth+St.borderBottomWidth))},bd=function(vt){var mt=vt.styles,St=vt.bounds,wt=uo(mt.paddingLeft,St.width),Qt=uo(mt.paddingRight,St.width),_t=uo(mt.paddingTop,St.width),oe=uo(mt.paddingBottom,St.width);return St.add(wt+mt.borderLeftWidth,_t+mt.borderTopWidth,-(mt.borderRightWidth+mt.borderLeftWidth+wt+Qt),-(mt.borderTopWidth+mt.borderBottomWidth+_t+oe))},qp=function(vt,mt){return vt===0?mt.bounds:vt===2?bd(mt):ia(mt)},$p=function(vt,mt){return vt===0?mt.bounds:vt===2?bd(mt):ia(mt)},Kh=function(vt,mt,St){var wt=qp(Vh(vt.styles.backgroundOrigin,mt),vt),Qt=$p(Vh(vt.styles.backgroundClip,mt),vt),_t=t0(Vh(vt.styles.backgroundSize,mt),St,wt),oe=_t[0],xe=_t[1],ae=MA(Vh(vt.styles.backgroundPosition,mt),wt.width-oe,wt.height-xe),_e=Nd(Vh(vt.styles.backgroundRepeat,mt),ae,_t,wt,Qt),qe=Math.round(wt.left+ae[0]),dn=Math.round(wt.top+ae[1]);return[_e,qe,dn,oe,xe]},zh=function(vt){return co(vt)&&vt.value===Gu.AUTO},Td=function(vt){return typeof vt=="number"},t0=function(vt,mt,St){var wt=mt[0],Qt=mt[1],_t=mt[2],oe=vt[0],xe=vt[1];if(!oe)return[0,0];if(ls(oe)&&xe&&ls(xe))return[uo(oe,St.width),uo(xe,St.height)];var ae=Td(_t);if(co(oe)&&(oe.value===Gu.CONTAIN||oe.value===Gu.COVER)){if(Td(_t)){var _e=St.width/St.height;return _e<_t!=(oe.value===Gu.COVER)?[St.width,St.width/_t]:[St.height*_t,St.height]}return[St.width,St.height]}var qe=Td(wt),dn=Td(Qt),Gn=qe||dn;if(zh(oe)&&(!xe||zh(xe))){if(qe&&dn)return[wt,Qt];if(!ae&&!Gn)return[St.width,St.height];if(Gn&&ae){var Ii=qe?wt:Qt*_t,Ai=dn?Qt:wt/_t;return[Ii,Ai]}var Fi=qe?wt:St.width,Ur=dn?Qt:St.height;return[Fi,Ur]}if(ae){var $i=0,tr=0;return ls(oe)?$i=uo(oe,St.width):ls(xe)&&(tr=uo(xe,St.height)),zh(oe)?$i=tr*_t:(!xe||zh(xe))&&(tr=$i/_t),[$i,tr]}var ir=null,zr=null;if(ls(oe)?ir=uo(oe,St.width):xe&&ls(xe)&&(zr=uo(xe,St.height)),ir!==null&&(!xe||zh(xe))&&(zr=qe&&dn?ir/wt*Qt:St.height),zr!==null&&zh(oe)&&(ir=qe&&dn?zr/Qt*wt:St.width),ir!==null&&zr!==null)return[ir,zr];throw new Error("Unable to calculate background-size for element")},Vh=function(vt,mt){var St=vt[mt];return typeof St=="undefined"?vt[0]:St},Nd=function(vt,mt,St,wt,Qt){var _t=mt[0],oe=mt[1],xe=St[0],ae=St[1];switch(vt){case 2:return[new vi(Math.round(wt.left),Math.round(wt.top+oe)),new vi(Math.round(wt.left+wt.width),Math.round(wt.top+oe)),new vi(Math.round(wt.left+wt.width),Math.round(ae+wt.top+oe)),new vi(Math.round(wt.left),Math.round(ae+wt.top+oe))];case 3:return[new vi(Math.round(wt.left+_t),Math.round(wt.top)),new vi(Math.round(wt.left+_t+xe),Math.round(wt.top)),new vi(Math.round(wt.left+_t+xe),Math.round(wt.height+wt.top)),new vi(Math.round(wt.left+_t),Math.round(wt.height+wt.top))];case 1:return[new vi(Math.round(wt.left+_t),Math.round(wt.top+oe)),new vi(Math.round(wt.left+_t+xe),Math.round(wt.top+oe)),new vi(Math.round(wt.left+_t+xe),Math.round(wt.top+oe+ae)),new vi(Math.round(wt.left+_t),Math.round(wt.top+oe+ae))];default:return[new vi(Math.round(Qt.left),Math.round(Qt.top)),new vi(Math.round(Qt.left+Qt.width),Math.round(Qt.top)),new vi(Math.round(Qt.left+Qt.width),Math.round(Qt.height+Qt.top)),new vi(Math.round(Qt.left),Math.round(Qt.height+Qt.top))]}},vc="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Jl="Hidden Text",RA=function(){function vt(mt){this._data={},this._document=mt}return vt.prototype.parseMetrics=function(mt,St){var wt=this._document.createElement("div"),Qt=this._document.createElement("img"),_t=this._document.createElement("span"),oe=this._document.body;wt.style.visibility="hidden",wt.style.fontFamily=mt,wt.style.fontSize=St,wt.style.margin="0",wt.style.padding="0",wt.style.whiteSpace="nowrap",oe.appendChild(wt),Qt.src=vc,Qt.width=1,Qt.height=1,Qt.style.margin="0",Qt.style.padding="0",Qt.style.verticalAlign="baseline",_t.style.fontFamily=mt,_t.style.fontSize=St,_t.style.margin="0",_t.style.padding="0",_t.appendChild(this._document.createTextNode(Jl)),wt.appendChild(_t),wt.appendChild(Qt);var xe=Qt.offsetTop-_t.offsetTop+2;wt.removeChild(_t),wt.appendChild(this._document.createTextNode(Jl)),wt.style.lineHeight="normal",Qt.style.verticalAlign="super";var ae=Qt.offsetTop-wt.offsetTop+2;return oe.removeChild(wt),{baseline:xe,middle:ae}},vt.prototype.getMetrics=function(mt,St){var wt=mt+" "+St;return typeof this._data[wt]=="undefined"&&(this._data[wt]=this.parseMetrics(mt,St)),this._data[wt]},vt}(),Qd=function(){function vt(mt,St){this.context=mt,this.options=St}return vt}(),al=1e4,Wh=function(vt){ee(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this;return Qt._activeEffects=[],Qt.canvas=wt.canvas?wt.canvas:document.createElement("canvas"),Qt.ctx=Qt.canvas.getContext("2d"),wt.canvas||(Qt.canvas.width=Math.floor(wt.width*wt.scale),Qt.canvas.height=Math.floor(wt.height*wt.scale),Qt.canvas.style.width=wt.width+"px",Qt.canvas.style.height=wt.height+"px"),Qt.fontMetrics=new RA(document),Qt.ctx.scale(Qt.options.scale,Qt.options.scale),Qt.ctx.translate(-wt.x,-wt.y),Qt.ctx.textBaseline="bottom",Qt._activeEffects=[],Qt.context.logger.debug("Canvas renderer initialized ("+wt.width+"x"+wt.height+") with scale "+wt.scale),Qt}return mt.prototype.applyEffects=function(St){for(var wt=this;this._activeEffects.length;)this.popEffect();St.forEach(function(Qt){return wt.applyEffect(Qt)})},mt.prototype.applyEffect=function(St){this.ctx.save(),pA(St)&&(this.ctx.globalAlpha=St.opacity),mo(St)&&(this.ctx.translate(St.offsetX,St.offsetY),this.ctx.transform(St.matrix[0],St.matrix[1],St.matrix[2],St.matrix[3],St.matrix[4],St.matrix[5]),this.ctx.translate(-St.offsetX,-St.offsetY)),bs(St)&&(this.path(St.path),this.ctx.clip()),this._activeEffects.push(St)},mt.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},mt.prototype.renderStack=function(St){return Be(this,void 0,void 0,function(){var wt;return Ne(this,function(Qt){switch(Qt.label){case 0:return wt=St.element.container.styles,wt.isVisible()?[4,this.renderStackContent(St)]:[3,2];case 1:Qt.sent(),Qt.label=2;case 2:return[2]}})})},mt.prototype.renderNode=function(St){return Be(this,void 0,void 0,function(){return Ne(this,function(wt){switch(wt.label){case 0:if(Cs(St.container.flags,16))debugger;return St.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(St)]:[3,3];case 1:return wt.sent(),[4,this.renderNodeContent(St)];case 2:wt.sent(),wt.label=3;case 3:return[2]}})})},mt.prototype.renderTextWithLetterSpacing=function(St,wt,Qt){var _t=this;if(wt===0)this.ctx.fillText(St.text,St.bounds.left,St.bounds.top+Qt);else{var oe=Mh(St.text);oe.reduce(function(xe,ae){return _t.ctx.fillText(ae,xe,St.bounds.top+Qt),xe+_t.ctx.measureText(ae).width},St.bounds.left)}},mt.prototype.createFontStyle=function(St){var wt=St.fontVariant.filter(function(oe){return oe==="normal"||oe==="small-caps"}).join(""),Qt=n0(St.fontFamily).join(", "),_t=aA(St.fontSize)?""+St.fontSize.number+St.fontSize.unit:St.fontSize.number+"px";return[[St.fontStyle,wt,St.fontWeight,_t,Qt].join(" "),Qt,_t]},mt.prototype.renderTextNode=function(St,wt){return Be(this,void 0,void 0,function(){var Qt,_t,oe,xe,ae,_e,qe,dn,Gn=this;return Ne(this,function(Ii){return Qt=this.createFontStyle(wt),_t=Qt[0],oe=Qt[1],xe=Qt[2],this.ctx.font=_t,this.ctx.direction=wt.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",ae=this.fontMetrics.getMetrics(oe,xe),_e=ae.baseline,qe=ae.middle,dn=wt.paintOrder,St.textBounds.forEach(function(Ai){dn.forEach(function(Fi){switch(Fi){case 0:Gn.ctx.fillStyle=io(wt.color),Gn.renderTextWithLetterSpacing(Ai,wt.letterSpacing,_e);var Ur=wt.textShadow;Ur.length&&Ai.text.trim().length&&(Ur.slice(0).reverse().forEach(function($i){Gn.ctx.shadowColor=io($i.color),Gn.ctx.shadowOffsetX=$i.offsetX.number*Gn.options.scale,Gn.ctx.shadowOffsetY=$i.offsetY.number*Gn.options.scale,Gn.ctx.shadowBlur=$i.blur.number,Gn.renderTextWithLetterSpacing(Ai,wt.letterSpacing,_e)}),Gn.ctx.shadowColor="",Gn.ctx.shadowOffsetX=0,Gn.ctx.shadowOffsetY=0,Gn.ctx.shadowBlur=0),wt.textDecorationLine.length&&(Gn.ctx.fillStyle=io(wt.textDecorationColor||wt.color),wt.textDecorationLine.forEach(function($i){switch($i){case 1:Gn.ctx.fillRect(Ai.bounds.left,Math.round(Ai.bounds.top+_e),Ai.bounds.width,1);break;case 2:Gn.ctx.fillRect(Ai.bounds.left,Math.round(Ai.bounds.top),Ai.bounds.width,1);break;case 3:Gn.ctx.fillRect(Ai.bounds.left,Math.ceil(Ai.bounds.top+qe),Ai.bounds.width,1);break}}));break;case 1:wt.webkitTextStrokeWidth&&Ai.text.trim().length&&(Gn.ctx.strokeStyle=io(wt.webkitTextStrokeColor),Gn.ctx.lineWidth=wt.webkitTextStrokeWidth,Gn.ctx.lineJoin=window.chrome?"miter":"round",Gn.ctx.strokeText(Ai.text,Ai.bounds.left,Ai.bounds.top+_e)),Gn.ctx.strokeStyle="",Gn.ctx.lineWidth=0,Gn.ctx.lineJoin="miter";break}})}),[2]})})},mt.prototype.renderReplacedElement=function(St,wt,Qt){if(Qt&&St.intrinsicWidth>0&&St.intrinsicHeight>0){var _t=bd(St),oe=Su(wt);this.path(oe),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(Qt,0,0,St.intrinsicWidth,St.intrinsicHeight,_t.left,_t.top,_t.width,_t.height),this.ctx.restore()}},mt.prototype.renderNodeContent=function(St){return Be(this,void 0,void 0,function(){var wt,Qt,_t,oe,xe,ae,tr,tr,_e,qe,dn,Gn,zr,Ii,Ai,Lr,Fi,Ur,$i,tr,ir,zr,Lr;return Ne(this,function(ji){switch(ji.label){case 0:this.applyEffects(St.getEffects(4)),wt=St.container,Qt=St.curves,_t=wt.styles,oe=0,xe=wt.textNodes,ji.label=1;case 1:return oe<xe.length?(ae=xe[oe],[4,this.renderTextNode(ae,_t)]):[3,4];case 2:ji.sent(),ji.label=3;case 3:return oe++,[3,1];case 4:if(!(wt instanceof Tg))return[3,8];ji.label=5;case 5:return ji.trys.push([5,7,,8]),[4,this.context.cache.match(wt.src)];case 6:return tr=ji.sent(),this.renderReplacedElement(wt,Qt,tr),[3,8];case 7:return ji.sent(),this.context.logger.error("Error loading image "+wt.src),[3,8];case 8:if(wt instanceof Ng&&this.renderReplacedElement(wt,Qt,wt.canvas),!(wt instanceof Qg))return[3,12];ji.label=9;case 9:return ji.trys.push([9,11,,12]),[4,this.context.cache.match(wt.svg)];case 10:return tr=ji.sent(),this.renderReplacedElement(wt,Qt,tr),[3,12];case 11:return ji.sent(),this.context.logger.error("Error loading svg "+wt.svg.substring(0,255)),[3,12];case 12:return wt instanceof Bd&&wt.tree?(_e=new mt(this.context,{scale:this.options.scale,backgroundColor:wt.backgroundColor,x:0,y:0,width:wt.width,height:wt.height}),[4,_e.render(wt.tree)]):[3,14];case 13:qe=ji.sent(),wt.width&&wt.height&&this.ctx.drawImage(qe,0,0,wt.width,wt.height,wt.bounds.left,wt.bounds.top,wt.bounds.width,wt.bounds.height),ji.label=14;case 14:if(wt instanceof wl&&(dn=Math.min(wt.bounds.width,wt.bounds.height),wt.type===Nh?wt.checked&&(this.ctx.save(),this.path([new vi(wt.bounds.left+dn*.39363,wt.bounds.top+dn*.79),new vi(wt.bounds.left+dn*.16,wt.bounds.top+dn*.5549),new vi(wt.bounds.left+dn*.27347,wt.bounds.top+dn*.44071),new vi(wt.bounds.left+dn*.39694,wt.bounds.top+dn*.5649),new vi(wt.bounds.left+dn*.72983,wt.bounds.top+dn*.23),new vi(wt.bounds.left+dn*.84,wt.bounds.top+dn*.34085),new vi(wt.bounds.left+dn*.39363,wt.bounds.top+dn*.79)]),this.ctx.fillStyle=io(kf),this.ctx.fill(),this.ctx.restore()):wt.type===IA&&wt.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(wt.bounds.left+dn/2,wt.bounds.top+dn/2,dn/4,0,Math.PI*2,!0),this.ctx.fillStyle=io(kf),this.ctx.fill(),this.ctx.restore())),km(wt)&&wt.value.length){switch(Gn=this.createFontStyle(_t),zr=Gn[0],Ii=Gn[1],Ai=this.fontMetrics.getMetrics(zr,Ii).baseline,this.ctx.font=zr,this.ctx.fillStyle=io(_t.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=nr(wt.styles.textAlign),Lr=bd(wt),Fi=0,wt.styles.textAlign){case 1:Fi+=Lr.width/2;break;case 2:Fi+=Lr.width;break}Ur=Lr.add(Fi,0,0,-Lr.height/2+1),this.ctx.save(),this.path([new vi(Lr.left,Lr.top),new vi(Lr.left+Lr.width,Lr.top),new vi(Lr.left+Lr.width,Lr.top+Lr.height),new vi(Lr.left,Lr.top+Lr.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Ws(wt.value,Ur),_t.letterSpacing,Ai),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Cs(wt.styles.display,2048))return[3,20];if(wt.styles.listStyleImage===null)return[3,19];if($i=wt.styles.listStyleImage,$i.type!==0)return[3,18];tr=void 0,ir=$i.url,ji.label=15;case 15:return ji.trys.push([15,17,,18]),[4,this.context.cache.match(ir)];case 16:return tr=ji.sent(),this.ctx.drawImage(tr,wt.bounds.left-(tr.width+10),wt.bounds.top),[3,18];case 17:return ji.sent(),this.context.logger.error("Error loading list-style-image "+ir),[3,18];case 18:return[3,20];case 19:St.listValue&&wt.styles.listStyleType!==-1&&(zr=this.createFontStyle(_t)[0],this.ctx.font=zr,this.ctx.fillStyle=io(_t.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",Lr=new be(wt.bounds.left,wt.bounds.top+uo(wt.styles.paddingTop,wt.bounds.width),wt.bounds.width,Bs(_t.lineHeight,_t.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Ws(St.listValue,Lr),_t.letterSpacing,Bs(_t.lineHeight,_t.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),ji.label=20;case 20:return[2]}})})},mt.prototype.renderStackContent=function(St){return Be(this,void 0,void 0,function(){var wt,Qt,$i,_t,oe,$i,xe,ae,$i,_e,qe,$i,dn,Gn,$i,Ii,Ai,$i,Fi,Ur,$i;return Ne(this,function(tr){switch(tr.label){case 0:if(Cs(St.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(St.element)];case 1:tr.sent(),wt=0,Qt=St.negativeZIndex,tr.label=2;case 2:return wt<Qt.length?($i=Qt[wt],[4,this.renderStack($i)]):[3,5];case 3:tr.sent(),tr.label=4;case 4:return wt++,[3,2];case 5:return[4,this.renderNodeContent(St.element)];case 6:tr.sent(),_t=0,oe=St.nonInlineLevel,tr.label=7;case 7:return _t<oe.length?($i=oe[_t],[4,this.renderNode($i)]):[3,10];case 8:tr.sent(),tr.label=9;case 9:return _t++,[3,7];case 10:xe=0,ae=St.nonPositionedFloats,tr.label=11;case 11:return xe<ae.length?($i=ae[xe],[4,this.renderStack($i)]):[3,14];case 12:tr.sent(),tr.label=13;case 13:return xe++,[3,11];case 14:_e=0,qe=St.nonPositionedInlineLevel,tr.label=15;case 15:return _e<qe.length?($i=qe[_e],[4,this.renderStack($i)]):[3,18];case 16:tr.sent(),tr.label=17;case 17:return _e++,[3,15];case 18:dn=0,Gn=St.inlineLevel,tr.label=19;case 19:return dn<Gn.length?($i=Gn[dn],[4,this.renderNode($i)]):[3,22];case 20:tr.sent(),tr.label=21;case 21:return dn++,[3,19];case 22:Ii=0,Ai=St.zeroOrAutoZIndexOrTransformedOrOpacity,tr.label=23;case 23:return Ii<Ai.length?($i=Ai[Ii],[4,this.renderStack($i)]):[3,26];case 24:tr.sent(),tr.label=25;case 25:return Ii++,[3,23];case 26:Fi=0,Ur=St.positiveZIndex,tr.label=27;case 27:return Fi<Ur.length?($i=Ur[Fi],[4,this.renderStack($i)]):[3,30];case 28:tr.sent(),tr.label=29;case 29:return Fi++,[3,27];case 30:return[2]}})})},mt.prototype.mask=function(St){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(St.slice(0).reverse()),this.ctx.closePath()},mt.prototype.path=function(St){this.ctx.beginPath(),this.formatPath(St),this.ctx.closePath()},mt.prototype.formatPath=function(St){var wt=this;St.forEach(function(Qt,_t){var oe=Po(Qt)?Qt.start:Qt;_t===0?wt.ctx.moveTo(oe.x,oe.y):wt.ctx.lineTo(oe.x,oe.y),Po(Qt)&&wt.ctx.bezierCurveTo(Qt.startControl.x,Qt.startControl.y,Qt.endControl.x,Qt.endControl.y,Qt.end.x,Qt.end.y)})},mt.prototype.renderRepeat=function(St,wt,Qt,_t){this.path(St),this.ctx.fillStyle=wt,this.ctx.translate(Qt,_t),this.ctx.fill(),this.ctx.translate(-Qt,-_t)},mt.prototype.resizeImage=function(St,wt,Qt){var _t;if(St.width===wt&&St.height===Qt)return St;var oe=(_t=this.canvas.ownerDocument)!==null&&_t!==void 0?_t:document,xe=oe.createElement("canvas");xe.width=Math.max(1,wt),xe.height=Math.max(1,Qt);var ae=xe.getContext("2d");return ae.drawImage(St,0,0,St.width,St.height,0,0,wt,Qt),xe},mt.prototype.renderBackgroundImage=function(St){return Be(this,void 0,void 0,function(){var wt,Qt,_t,oe,xe,ae;return Ne(this,function(_e){switch(_e.label){case 0:wt=St.styles.backgroundImage.length-1,Qt=function(qe){var dn,Gn,Ii,Ts,Ya,Sl,Ho,Xs,ao,Ai,Ts,Ya,Sl,Ho,Xs,Fi,Ur,$i,tr,ir,zr,Lr,ji,eo,ao,Mr,Ts,_a,ll,Ho,Xs,jA,Ya,Sl,KA,ze,Bu,_h,Cu,Pu,rh,ya;return Ne(this,function(ql){switch(ql.label){case 0:if(qe.type!==0)return[3,5];dn=void 0,Gn=qe.url,ql.label=1;case 1:return ql.trys.push([1,3,,4]),[4,_t.context.cache.match(Gn)];case 2:return dn=ql.sent(),[3,4];case 3:return ql.sent(),_t.context.logger.error("Error loading background-image "+Gn),[3,4];case 4:return dn&&(Ii=Kh(St,wt,[dn.width,dn.height,dn.width/dn.height]),Ts=Ii[0],Ya=Ii[1],Sl=Ii[2],Ho=Ii[3],Xs=Ii[4],ao=_t.ctx.createPattern(_t.resizeImage(dn,Ho,Xs),"repeat"),_t.renderRepeat(Ts,ao,Ya,Sl)),[3,6];case 5:tu(qe)?(Ai=Kh(St,wt,[null,null,null]),Ts=Ai[0],Ya=Ai[1],Sl=Ai[2],Ho=Ai[3],Xs=Ai[4],Fi=nc(qe.angle,Ho,Xs),Ur=Fi[0],$i=Fi[1],tr=Fi[2],ir=Fi[3],zr=Fi[4],Lr=document.createElement("canvas"),Lr.width=Ho,Lr.height=Xs,ji=Lr.getContext("2d"),eo=ji.createLinearGradient($i,ir,tr,zr),rn(qe.stops,Ur).forEach(function(Gf){return eo.addColorStop(Gf.stop,io(Gf.color))}),ji.fillStyle=eo,ji.fillRect(0,0,Ho,Xs),Ho>0&&Xs>0&&(ao=_t.ctx.createPattern(Lr,"repeat"),_t.renderRepeat(Ts,ao,Ya,Sl))):Dr(qe)&&(Mr=Kh(St,wt,[null,null,null]),Ts=Mr[0],_a=Mr[1],ll=Mr[2],Ho=Mr[3],Xs=Mr[4],jA=qe.position.length===0?[dg]:qe.position,Ya=uo(jA[0],Ho),Sl=uo(jA[jA.length-1],Xs),KA=Ou(qe,Ya,Sl,Ho,Xs),ze=KA[0],Bu=KA[1],ze>0&&Bu>0&&(_h=_t.ctx.createRadialGradient(_a+Ya,ll+Sl,0,_a+Ya,ll+Sl,ze),rn(qe.stops,ze*2).forEach(function(Gf){return _h.addColorStop(Gf.stop,io(Gf.color))}),_t.path(Ts),_t.ctx.fillStyle=_h,ze!==Bu?(Cu=St.bounds.left+.5*St.bounds.width,Pu=St.bounds.top+.5*St.bounds.height,rh=Bu/ze,ya=1/rh,_t.ctx.save(),_t.ctx.translate(Cu,Pu),_t.ctx.transform(1,0,0,rh,0,0),_t.ctx.translate(-Cu,-Pu),_t.ctx.fillRect(_a,ya*(ll-Pu)+Pu,Ho,Xs*ya),_t.ctx.restore()):_t.ctx.fill())),ql.label=6;case 6:return wt--,[2]}})},_t=this,oe=0,xe=St.styles.backgroundImage.slice(0).reverse(),_e.label=1;case 1:return oe<xe.length?(ae=xe[oe],[5,Qt(ae)]):[3,4];case 2:_e.sent(),_e.label=3;case 3:return oe++,[3,1];case 4:return[2]}})})},mt.prototype.renderSolidBorder=function(St,wt,Qt){return Be(this,void 0,void 0,function(){return Ne(this,function(_t){return this.path(Gh(Qt,wt)),this.ctx.fillStyle=io(St),this.ctx.fill(),[2]})})},mt.prototype.renderDoubleBorder=function(St,wt,Qt,_t){return Be(this,void 0,void 0,function(){var oe,xe;return Ne(this,function(ae){switch(ae.label){case 0:return wt<3?[4,this.renderSolidBorder(St,Qt,_t)]:[3,2];case 1:return ae.sent(),[2];case 2:return oe=ih(_t,Qt),this.path(oe),this.ctx.fillStyle=io(St),this.ctx.fill(),xe=kd(_t,Qt),this.path(xe),this.ctx.fill(),[2]}})})},mt.prototype.renderNodeBackgroundAndBorders=function(St){return Be(this,void 0,void 0,function(){var wt,Qt,_t,oe,xe,ae,_e,qe,dn=this;return Ne(this,function(Gn){switch(Gn.label){case 0:return this.applyEffects(St.getEffects(2)),wt=St.container.styles,Qt=!As(wt.backgroundColor)||wt.backgroundImage.length,_t=[{style:wt.borderTopStyle,color:wt.borderTopColor,width:wt.borderTopWidth},{style:wt.borderRightStyle,color:wt.borderRightColor,width:wt.borderRightWidth},{style:wt.borderBottomStyle,color:wt.borderBottomColor,width:wt.borderBottomWidth},{style:wt.borderLeftStyle,color:wt.borderLeftColor,width:wt.borderLeftWidth}],oe=Ud(Vh(wt.backgroundClip,0),St.curves),Qt||wt.boxShadow.length?(this.ctx.save(),this.path(oe),this.ctx.clip(),As(wt.backgroundColor)||(this.ctx.fillStyle=io(wt.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(St.container)]):[3,2];case 1:Gn.sent(),this.ctx.restore(),wt.boxShadow.slice(0).reverse().forEach(function(Ii){dn.ctx.save();var Ai=Ta(St.curves),Fi=Ii.inset?0:al,Ur=Jp(Ai,-Fi+(Ii.inset?1:-1)*Ii.spread.number,(Ii.inset?1:-1)*Ii.spread.number,Ii.spread.number*(Ii.inset?-2:2),Ii.spread.number*(Ii.inset?-2:2));Ii.inset?(dn.path(Ai),dn.ctx.clip(),dn.mask(Ur)):(dn.mask(Ai),dn.ctx.clip(),dn.path(Ur)),dn.ctx.shadowOffsetX=Ii.offsetX.number+Fi,dn.ctx.shadowOffsetY=Ii.offsetY.number,dn.ctx.shadowColor=io(Ii.color),dn.ctx.shadowBlur=Ii.blur.number,dn.ctx.fillStyle=Ii.inset?io(Ii.color):"rgba(0,0,0,1)",dn.ctx.fill(),dn.ctx.restore()}),Gn.label=2;case 2:xe=0,ae=0,_e=_t,Gn.label=3;case 3:return ae<_e.length?(qe=_e[ae],qe.style!==0&&!As(qe.color)&&qe.width>0?qe.style!==2?[3,5]:[4,this.renderDashedDottedBorder(qe.color,qe.width,xe,St.curves,2)]:[3,11]):[3,13];case 4:return Gn.sent(),[3,11];case 5:return qe.style!==3?[3,7]:[4,this.renderDashedDottedBorder(qe.color,qe.width,xe,St.curves,3)];case 6:return Gn.sent(),[3,11];case 7:return qe.style!==4?[3,9]:[4,this.renderDoubleBorder(qe.color,qe.width,xe,St.curves)];case 8:return Gn.sent(),[3,11];case 9:return[4,this.renderSolidBorder(qe.color,xe,St.curves)];case 10:Gn.sent(),Gn.label=11;case 11:xe++,Gn.label=12;case 12:return ae++,[3,3];case 13:return[2]}})})},mt.prototype.renderDashedDottedBorder=function(St,wt,Qt,_t,oe){return Be(this,void 0,void 0,function(){var xe,ae,_e,qe,dn,Gn,Ii,Ai,Fi,Ur,$i,tr,ir,zr,Lr,ji,Lr,ji;return Ne(this,function(eo){return this.ctx.save(),xe=jh(_t,Qt),ae=Gh(_t,Qt),oe===2&&(this.path(ae),this.ctx.clip()),Po(ae[0])?(_e=ae[0].start.x,qe=ae[0].start.y):(_e=ae[0].x,qe=ae[0].y),Po(ae[1])?(dn=ae[1].end.x,Gn=ae[1].end.y):(dn=ae[1].x,Gn=ae[1].y),Qt===0||Qt===2?Ii=Math.abs(_e-dn):Ii=Math.abs(qe-Gn),this.ctx.beginPath(),oe===3?this.formatPath(xe):this.formatPath(ae.slice(0,2)),Ai=wt<3?wt*3:wt*2,Fi=wt<3?wt*2:wt,oe===3&&(Ai=wt,Fi=wt),Ur=!0,Ii<=Ai*2?Ur=!1:Ii<=Ai*2+Fi?($i=Ii/(2*Ai+Fi),Ai*=$i,Fi*=$i):(tr=Math.floor((Ii+Fi)/(Ai+Fi)),ir=(Ii-tr*Ai)/(tr-1),zr=(Ii-(tr+1)*Ai)/tr,Fi=zr<=0||Math.abs(Fi-ir)<Math.abs(Fi-zr)?ir:zr),Ur&&(oe===3?this.ctx.setLineDash([0,Ai+Fi]):this.ctx.setLineDash([Ai,Fi])),oe===3?(this.ctx.lineCap="round",this.ctx.lineWidth=wt):this.ctx.lineWidth=wt*2+1.1,this.ctx.strokeStyle=io(St),this.ctx.stroke(),this.ctx.setLineDash([]),oe===2&&(Po(ae[0])&&(Lr=ae[3],ji=ae[0],this.ctx.beginPath(),this.formatPath([new vi(Lr.end.x,Lr.end.y),new vi(ji.start.x,ji.start.y)]),this.ctx.stroke()),Po(ae[1])&&(Lr=ae[1],ji=ae[2],this.ctx.beginPath(),this.formatPath([new vi(Lr.end.x,Lr.end.y),new vi(ji.start.x,ji.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},mt.prototype.render=function(St){return Be(this,void 0,void 0,function(){var wt;return Ne(this,function(Qt){switch(Qt.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=io(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),wt=Hf(St),[4,this.renderStack(wt)];case 1:return Qt.sent(),this.applyEffects([]),[2,this.canvas]}})})},mt}(Qd),km=function(vt){return vt instanceof Ig||vt instanceof bf?!0:vt instanceof wl&&vt.type!==IA&&vt.type!==Nh},Ud=function(vt,mt){switch(vt){case 0:return Ta(mt);case 2:return as(mt);case 1:default:return Su(mt)}},nr=function(vt){switch(vt){case 1:return"center";case 2:return"right";case 0:default:return"left"}},e0=["-apple-system","system-ui"],n0=function(vt){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?vt.filter(function(mt){return e0.indexOf(mt)===-1}):vt},ep=function(vt){ee(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this;return Qt.canvas=wt.canvas?wt.canvas:document.createElement("canvas"),Qt.ctx=Qt.canvas.getContext("2d"),Qt.options=wt,Qt.canvas.width=Math.floor(wt.width*wt.scale),Qt.canvas.height=Math.floor(wt.height*wt.scale),Qt.canvas.style.width=wt.width+"px",Qt.canvas.style.height=wt.height+"px",Qt.ctx.scale(Qt.options.scale,Qt.options.scale),Qt.ctx.translate(-wt.x,-wt.y),Qt.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+wt.width+"x"+wt.height+" at "+wt.x+","+wt.y+") with scale "+wt.scale),Qt}return mt.prototype.render=function(St){return Be(this,void 0,void 0,function(){var wt,Qt;return Ne(this,function(_t){switch(_t.label){case 0:return wt=bg(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,St),[4,Of(wt)];case 1:return Qt=_t.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=io(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(Qt,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},mt}(Qd),Of=function(vt){return new Promise(function(mt,St){var wt=new Image;wt.onload=function(){mt(wt)},wt.onerror=St,wt.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(vt))})},Rf=function(){function vt(mt){var St=mt.id,wt=mt.enabled;this.id=St,this.enabled=wt,this.start=Date.now()}return vt.prototype.debug=function(){for(var mt=[],St=0;St<arguments.length;St++)mt[St]=arguments[St];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,ln([this.id,this.getTime()+"ms"],mt)):this.info.apply(this,mt))},vt.prototype.getTime=function(){return Date.now()-this.start},vt.prototype.info=function(){for(var mt=[],St=0;St<arguments.length;St++)mt[St]=arguments[St];this.enabled&&typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,ln([this.id,this.getTime()+"ms"],mt))},vt.prototype.warn=function(){for(var mt=[],St=0;St<arguments.length;St++)mt[St]=arguments[St];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,ln([this.id,this.getTime()+"ms"],mt)):this.info.apply(this,mt))},vt.prototype.error=function(){for(var mt=[],St=0;St<arguments.length;St++)mt[St]=arguments[St];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,ln([this.id,this.getTime()+"ms"],mt)):this.info.apply(this,mt))},vt.instances={},vt}(),GA=function(){function vt(mt,St){var wt;this.windowBounds=St,this.instanceName="#"+vt.instanceCount++,this.logger=new Rf({id:this.instanceName,enabled:mt.logging}),this.cache=(wt=mt.cache)!==null&&wt!==void 0?wt:new Cr(this,mt)}return vt.instanceCount=1,vt}(),np=function(vt,mt){return mt===void 0&&(mt={}),ip(vt,mt)};typeof window!="undefined"&&wi.setContext(window);var ip=function(vt,mt){return Be(void 0,void 0,void 0,function(){var St,wt,Qt,_t,oe,xe,ae,_e,qe,dn,Gn,Ii,Ai,Fi,Ur,$i,tr,ir,zr,Lr,eo,ji,eo,ao,Mr,Ts,_a,ll,Ho,Xs,jA,Ya,Sl,KA,ze,Bu,_h,Cu,Pu,rh;return Ne(this,function(ya){switch(ya.label){case 0:if(!vt||typeof vt!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(St=vt.ownerDocument,!St)throw new Error("Element is not attached to a Document");if(wt=St.defaultView,!wt)throw new Error("Document is not attached to a Window");return Qt={allowTaint:(ao=mt.allowTaint)!==null&&ao!==void 0?ao:!1,imageTimeout:(Mr=mt.imageTimeout)!==null&&Mr!==void 0?Mr:15e3,proxy:mt.proxy,useCORS:(Ts=mt.useCORS)!==null&&Ts!==void 0?Ts:!1},_t=Tt({logging:(_a=mt.logging)!==null&&_a!==void 0?_a:!0,cache:mt.cache},Qt),oe={windowWidth:(ll=mt.windowWidth)!==null&&ll!==void 0?ll:wt.innerWidth,windowHeight:(Ho=mt.windowHeight)!==null&&Ho!==void 0?Ho:wt.innerHeight,scrollX:(Xs=mt.scrollX)!==null&&Xs!==void 0?Xs:wt.pageXOffset,scrollY:(jA=mt.scrollY)!==null&&jA!==void 0?jA:wt.pageYOffset},xe=new be(oe.scrollX,oe.scrollY,oe.windowWidth,oe.windowHeight),ae=new GA(_t,xe),_e=(Ya=mt.foreignObjectRendering)!==null&&Ya!==void 0?Ya:!1,qe={allowTaint:(Sl=mt.allowTaint)!==null&&Sl!==void 0?Sl:!1,onclone:mt.onclone,ignoreElements:mt.ignoreElements,inlineImages:_e,copyStyles:_e},ae.logger.debug("Starting document clone with size "+xe.width+"x"+xe.height+" scrolled to "+-xe.left+","+-xe.top),dn=new dt(ae,vt,qe),Gn=dn.clonedReferenceElement,Gn?[4,dn.toIFrame(St,xe)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return Ii=ya.sent(),Ai=jr(Gn)||Qf(Gn)?ne(Gn.ownerDocument):we(ae,Gn),Fi=Ai.width,Ur=Ai.height,$i=Ai.left,tr=Ai.top,ir=rp(ae,Gn,mt.backgroundColor),zr={canvas:mt.canvas,backgroundColor:ir,scale:(ze=(KA=mt.scale)!==null&&KA!==void 0?KA:wt.devicePixelRatio)!==null&&ze!==void 0?ze:1,x:((Bu=mt.x)!==null&&Bu!==void 0?Bu:0)+$i,y:((_h=mt.y)!==null&&_h!==void 0?_h:0)+tr,width:(Cu=mt.width)!==null&&Cu!==void 0?Cu:Math.ceil(Fi),height:(Pu=mt.height)!==null&&Pu!==void 0?Pu:Math.ceil(Ur)},_e?(ae.logger.debug("Document cloned, using foreign object rendering"),eo=new ep(ae,zr),[4,eo.render(Gn)]):[3,3];case 2:return Lr=ya.sent(),[3,5];case 3:return ae.logger.debug("Document cloned, element located at "+$i+","+tr+" with size "+Fi+"x"+Ur+" using computed rendering"),ae.logger.debug("Starting DOM parsing"),ji=Pd(ae,Gn),ir===ji.styles.backgroundColor&&(ji.styles.backgroundColor=kl.TRANSPARENT),ae.logger.debug("Starting renderer for element at "+zr.x+","+zr.y+" with size "+zr.width+"x"+zr.height),eo=new Wh(ae,zr),[4,eo.render(ji)];case 4:Lr=ya.sent(),ya.label=5;case 5:return(!((rh=mt.removeContainer)!==null&&rh!==void 0)||rh)&&(dt.destroy(Ii)||ae.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),ae.logger.debug("Finished rendering"),[2,Lr]}})})},rp=function(vt,mt,St){var wt=mt.ownerDocument,Qt=wt.documentElement?qA(vt,getComputedStyle(wt.documentElement).backgroundColor):kl.TRANSPARENT,_t=wt.body?qA(vt,getComputedStyle(wt.body).backgroundColor):kl.TRANSPARENT,oe=typeof St=="string"?qA(vt,St):St===null?kl.TRANSPARENT:4294967295;return mt===wt.documentElement?As(Qt)?As(_t)?oe:_t:Qt:oe};return np})},15979:function(yn,qn,ee){"use strict";ee.d(qn,{hP:function(){return xn}});var Tt=function(Kt,Et){return(Tt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ft,Dt){Ft.__proto__=Dt}||function(Ft,Dt){for(var Wt in Dt)Object.prototype.hasOwnProperty.call(Dt,Wt)&&(Ft[Wt]=Dt[Wt])})(Kt,Et)};function Be(Kt,Et){function Ft(){this.constructor=Kt}Tt(Kt,Et),Kt.prototype=Et===null?Object.create(Et):(Ft.prototype=Et.prototype,new Ft)}function Ne(Kt,Et,Ft,Dt){return new(Ft||(Ft=Promise))(function(Wt,kt){function Ue(Xn){try{Ei(Dt.next(Xn))}catch(si){kt(si)}}function Tn(Xn){try{Ei(Dt.throw(Xn))}catch(si){kt(si)}}function Ei(Xn){var si;Xn.done?Wt(Xn.value):(si=Xn.value,si instanceof Ft?si:new Ft(function(Qi){Qi(si)})).then(Ue,Tn)}Ei((Dt=Dt.apply(Kt,Et||[])).next())})}function ln(Kt,Et){var Ft,Dt,Wt,kt,Ue={label:0,sent:function(){if(1&Wt[0])throw Wt[1];return Wt[1]},trys:[],ops:[]};return kt={next:Tn(0),throw:Tn(1),return:Tn(2)},typeof Symbol=="function"&&(kt[Symbol.iterator]=function(){return this}),kt;function Tn(Ei){return function(Xn){return function(si){if(Ft)throw new TypeError("Generator is already executing.");for(;Ue;)try{if(Ft=1,Dt&&(Wt=2&si[0]?Dt.return:si[0]?Dt.throw||((Wt=Dt.return)&&Wt.call(Dt),0):Dt.next)&&!(Wt=Wt.call(Dt,si[1])).done)return Wt;switch(Dt=0,Wt&&(si=[2&si[0],Wt.value]),si[0]){case 0:case 1:Wt=si;break;case 4:return Ue.label++,{value:si[1],done:!1};case 5:Ue.label++,Dt=si[1],si=[0];continue;case 7:si=Ue.ops.pop(),Ue.trys.pop();continue;default:if(Wt=Ue.trys,!((Wt=Wt.length>0&&Wt[Wt.length-1])||si[0]!==6&&si[0]!==2)){Ue=0;continue}if(si[0]===3&&(!Wt||si[1]>Wt[0]&&si[1]<Wt[3])){Ue.label=si[1];break}if(si[0]===6&&Ue.label<Wt[1]){Ue.label=Wt[1],Wt=si;break}if(Wt&&Ue.label<Wt[2]){Ue.label=Wt[2],Ue.ops.push(si);break}Wt[2]&&Ue.ops.pop(),Ue.trys.pop();continue}si=Et.call(Kt,Ue)}catch(Qi){si=[6,Qi],Dt=0}finally{Ft=Wt=0}if(5&si[0])throw si[1];return{value:si[0]?si[1]:void 0,done:!0}}([Ei,Xn])}}}function be(){for(var Kt=0,Et=0,Ft=arguments.length;Et<Ft;Et++)Kt+=arguments[Et].length;var Dt=Array(Kt),Wt=0;for(Et=0;Et<Ft;Et++)for(var kt=arguments[Et],Ue=0,Tn=kt.length;Ue<Tn;Ue++,Wt++)Dt[Wt]=kt[Ue];return Dt}var we=function(){function Kt(){}return Kt.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Kt.setAttributes=function(Et,Ft){for(var Dt=0,Wt=Ft;Dt<Wt.length;Dt++){var kt=Wt[Dt],Ue=kt[0],Tn=kt[1];Et.setAttribute(Ue,Tn)}},Kt.createRect=function(Et,Ft,Dt){var Wt=document.createElementNS("http://www.w3.org/2000/svg","rect");return Wt.setAttribute("width",Et.toString()),Wt.setAttribute("height",Ft.toString()),Dt&&Kt.setAttributes(Wt,Dt),Wt},Kt.createLine=function(Et,Ft,Dt,Wt,kt){var Ue=document.createElementNS("http://www.w3.org/2000/svg","line");return Ue.setAttribute("x1",Et.toString()),Ue.setAttribute("y1",Ft.toString()),Ue.setAttribute("x2",Dt.toString()),Ue.setAttribute("y2",Wt.toString()),kt&&Kt.setAttributes(Ue,kt),Ue},Kt.createPolygon=function(Et,Ft){var Dt=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Dt.setAttribute("points",Et),Ft&&Kt.setAttributes(Dt,Ft),Dt},Kt.createCircle=function(Et,Ft){var Dt=document.createElementNS("http://www.w3.org/2000/svg","circle");return Dt.setAttribute("cx",(Et/2).toString()),Dt.setAttribute("cy",(Et/2).toString()),Dt.setAttribute("r",Et.toString()),Ft&&Kt.setAttributes(Dt,Ft),Dt},Kt.createEllipse=function(Et,Ft,Dt){var Wt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Wt.setAttribute("cx",(Et/2).toString()),Wt.setAttribute("cy",(Ft/2).toString()),Wt.setAttribute("rx",(Et/2).toString()),Wt.setAttribute("ry",(Ft/2).toString()),Dt&&Kt.setAttributes(Wt,Dt),Wt},Kt.createGroup=function(Et){var Ft=document.createElementNS("http://www.w3.org/2000/svg","g");return Et&&Kt.setAttributes(Ft,Et),Ft},Kt.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Kt.createMarker=function(Et,Ft,Dt,Wt,kt,Ue,Tn){var Ei=document.createElementNS("http://www.w3.org/2000/svg","marker");return Kt.setAttributes(Ei,[["id",Et],["orient",Ft],["markerWidth",Dt.toString()],["markerHeight",Wt.toString()],["refX",kt.toString()],["refY",Ue.toString()]]),Ei.appendChild(Tn),Ei},Kt.createText=function(Et){var Ft=document.createElementNS("http://www.w3.org/2000/svg","text");return Ft.setAttribute("x","0"),Ft.setAttribute("y","0"),Et&&Kt.setAttributes(Ft,Et),Ft},Kt.createTSpan=function(Et,Ft){var Dt=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Dt.textContent=Et,Ft&&Kt.setAttributes(Dt,Ft),Dt},Kt.createImage=function(Et){var Ft=document.createElementNS("http://www.w3.org/2000/svg","image");return Et&&Kt.setAttributes(Ft,Et),Ft},Kt.createPoint=function(Et,Ft){var Dt=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Dt.x=Et,Dt.y=Ft,Dt},Kt.createPath=function(Et,Ft){var Dt=document.createElementNS("http://www.w3.org/2000/svg","path");return Dt.setAttribute("d",Et),Ft&&Kt.setAttributes(Dt,Ft),Dt},Kt}(),ne=function(){function Kt(){}return Kt.addKey=function(Et){Kt.key=Et},Object.defineProperty(Kt,"isLicensed",{get:function(){return!!Kt.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Kt.key)},enumerable:!1,configurable:!0}),Kt}(),De=function(){function Kt(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Kt.prototype.rasterize=function(Et,Ft,Dt){var Wt=this;return new Promise(function(kt){var Ue=Dt!==void 0?Dt:document.createElement("canvas");Et===null&&(Wt.markersOnly=!0,Wt.naturalSize=!1);var Tn=document.createElementNS("http://www.w3.org/2000/svg","svg");Tn.setAttribute("xmlns","http://www.w3.org/2000/svg"),Tn.setAttribute("width",Ft.width.baseVal.valueAsString),Tn.setAttribute("height",Ft.height.baseVal.valueAsString),Tn.setAttribute("viewBox","0 0 "+Ft.viewBox.baseVal.width.toString()+" "+Ft.viewBox.baseVal.height.toString()),Tn.innerHTML=Ft.innerHTML,Wt.naturalSize===!0?(Tn.width.baseVal.value=Et.naturalWidth,Tn.height.baseVal.value=Et.naturalHeight):Wt.width!==void 0&&Wt.height!==void 0&&(Tn.width.baseVal.value=Wt.width,Tn.height.baseVal.value=Wt.height),Ue.width=Tn.width.baseVal.value,Ue.height=Tn.height.baseVal.value;var Ei=Tn.outerHTML,Xn=Ue.getContext("2d");Wt.markersOnly!==!0&&Xn.drawImage(Et,0,0,Ue.width,Ue.height);var si=window.URL,Qi=new Image(Ue.width,Ue.height);Qi.setAttribute("crossOrigin","anonymous");var Ln=new Blob([Ei],{type:"image/svg+xml"}),Ci=si.createObjectURL(Ln);Qi.onload=function(){Xn.drawImage(Qi,0,0),si.revokeObjectURL(Ci);var gi=Ue.toDataURL(Wt.imageType,Wt.imageQuality);kt(gi)},Qi.src=Ci})},Kt}(),fe=function(){},Qe=function(){function Kt(Et){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Et+"_"}return Object.defineProperty(Kt.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Kt.prototype.addClass=function(Et){return this.styleSheet===void 0&&this.addStyleSheet(),Et.name=""+this.classNamePrefix+Et.localName,this.classes.push(Et),this.styleSheet.sheet.insertRule("."+Et.name+" {"+Et.style+"}",this.styleSheet.sheet.cssRules.length),Et},Kt.prototype.addRule=function(Et){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(Et),this.styleSheet.sheet.insertRule(Et.selector+" {"+Et.style+"}",this.styleSheet.sheet.cssRules.length)},Kt.prototype.addStyleSheet=function(){var Et;this.styleSheet=document.createElement("style"),((Et=this.styleSheetRoot)!==null&&Et!==void 0?Et:document.head).appendChild(this.styleSheet),this.addRule(new gn("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new gn("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new gn("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new Xe("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Xe("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},Kt.prototype.removeStyleSheet=function(){var Et;this.styleSheet&&(((Et=this.styleSheetRoot)!==null&&Et!==void 0?Et:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Kt}(),gn=function(Kt,Et){this.selector=Kt,this.style=Et},Xe=function(Kt,Et){this.localName=Kt,this.style=Et},kn=function(){function Kt(Et,Ft,Dt,Wt,kt){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=Et,this.displayMode=Ft,this.markerItems=Dt,this.uiStyleSettings=Wt,this.styles=kt,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Kt.prototype.show=function(Et){var Ft=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Et,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Dt=document.createElement("div");Dt.className=this.toolbarBlockStyleClass.name,Dt.style.whiteSpace="nowrap",this.uiContainer.appendChild(Dt),this.addActionButton(Dt,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(Dt,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(Dt,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(Dt,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(Dt,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(Dt,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(Dt,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(Dt,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(kt){var Ue=document.createElement("div");Ue.className=""+Ft.toolbarButtonStyleClass.name,Ue.setAttribute("data-type-name",kt.typeName),Ue.innerHTML=kt.icon,Ue.addEventListener("click",function(){Ft.markerToolbarButtonClicked(Ue,kt)}),Ft.buttons.push(Ue),Ft.markerButtons.push(Ue)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var Wt=document.createElement("div");Wt.className=this.toolbarBlockStyleClass.name,Wt.style.whiteSpace="nowrap",Wt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Wt),this.addActionButton(Wt,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(Wt,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},Kt.prototype.addButtonClickListener=function(Et){this.buttonClickListeners.push(Et)},Kt.prototype.removeButtonClickListener=function(Et){this.buttonClickListeners.indexOf(Et)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Et),1)},Kt.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Kt.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Et=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Ft=0;Ft<this.markerButtons.length;Ft++)Ft<Et||Ft===Et&&this.markerButtons.length-1===Et?this.markerButtonBlock.appendChild(this.markerButtons[Ft]):(Ft===Et&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Ft]))}},Kt.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},Kt.prototype.resetButtonStyles=function(){var Et=this;this.buttons.forEach(function(Ft){Ft.className=Ft.className.replace(Et.uiStyleSettings.toolbarButtonStyleColorsClassName?Et.uiStyleSettings.toolbarButtonStyleColorsClassName:Et.toolbarButtonStyleColorsClass.name,"").trim(),Ft.className=Ft.className.replace(Et.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?Et.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:Et.toolbarActiveButtonStyleColorsClass.name,"").trim(),Ft.className+=" "+(Et.uiStyleSettings.toolbarButtonStyleColorsClassName?Et.uiStyleSettings.toolbarButtonStyleColorsClassName:Et.toolbarButtonStyleColorsClass.name)})},Kt.prototype.addActionButton=function(Et,Ft,Dt){var Wt=this,kt=document.createElement("div");switch(kt.className=""+this.toolbarButtonStyleClass.name,kt.innerHTML=Ft,kt.setAttribute("data-action",Dt),kt.addEventListener("click",function(){Wt.actionToolbarButtonClicked(kt,Dt)}),Dt){case"select":kt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":kt.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":kt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":kt.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":kt.style.fill=this.uiStyleSettings.closeButtonColor}Et.appendChild(kt),this.buttons.push(kt)},Kt.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Xe("toolbar",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.uiStyleSettings.toolbarHeight+`px;
box-sizing: content-box;
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new Xe("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Xe("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Xe("toolbar-overflow-block",`
position: absolute;
top: `+this.uiStyleSettings.toolbarHeight+`px;
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
z-index: 10;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new Xe("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var Et=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Xe("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*Et)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*Et)+`px;
padding: `+Et+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Xe("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Xe("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new gn("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new gn("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},Kt.prototype.markerToolbarButtonClicked=function(Et,Ft){this.setActiveButton(Et),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Dt){return Dt("marker",Ft)}),this.markerButtonOverflowBlock.style.display="none"},Kt.prototype.actionToolbarButtonClicked=function(Et,Ft){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Dt){return Dt("action",Ft)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Kt.prototype.setActiveButton=function(Et){this.resetButtonStyles(),Et.className=Et.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Et.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Kt.prototype.setActiveMarkerButton=function(Et){var Ft=this.markerButtons.find(function(Dt){return Dt.getAttribute("data-type-name")===Et});Ft&&this.setActiveButton(Ft)},Kt.prototype.setCurrentMarker=function(Et){var Ft=this;this.currentMarker=Et,this.buttons.filter(function(Dt){return/delete|notes/.test(Dt.getAttribute("data-action"))}).forEach(function(Dt){Ft.currentMarker===void 0?(Dt.style.fillOpacity="0.4",Dt.style.pointerEvents="none"):(Dt.style.fillOpacity="1",Dt.style.pointerEvents="all")})},Kt}(),Ut=function(){function Kt(Et,Ft,Dt,Wt){this.panels=[],this.panelButtons=[],this.markerjsContainer=Et,this.displayMode=Ft,this.uiStyleSettings=Dt,this.styles=Wt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Kt.prototype.addStyles=function(){var Et;this.toolboxStyleClass=this.styles.addClass(new Xe("toolbox",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: column;
font-family: sans-serif;
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
box-sizing: content-box;
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolboxStyleColorsClass=this.styles.addClass(new Xe("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var Ft=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Xe("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Xe("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Xe("toolbox-panel-row",`
display: flex;
`+(this.displayMode==="inline"?"position: absolute;":"")+`
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
cursor: default;
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
`+(this.displayMode==="inline"?"width: 100%;":"")+`
box-sizing: content-box;
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new Xe("toolbox-panel-row_colors",`
background-color: `+((Et=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Et!==void 0?Et:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Xe("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*Ft)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*Ft)+`px;
padding: `+Ft+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Xe("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Xe("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new gn("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new gn("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},Kt.prototype.show=function(Et){var Ft;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Et,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Ft=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Ft!==void 0?Ft:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Kt.prototype.setPanelButtons=function(Et){var Ft,Dt,Wt=this;this.panels=Et,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Ft=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Ft!==void 0?Ft:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Dt=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Dt!==void 0?Dt:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(kt){var Ue;kt.uiStyleSettings=Wt.uiStyleSettings;var Tn=document.createElement("div");Tn.className=Wt.toolboxButtonStyleClass.name+" "+((Ue=Wt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ue!==void 0?Ue:Wt.toolboxButtonStyleColorsClass.name),Tn.innerHTML=kt.icon,Tn.title=kt.title,Tn.addEventListener("click",function(){Wt.panelButtonClick(kt)}),Wt.panelButtons.push(Tn),Wt.buttonRow.appendChild(Tn)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Kt.prototype.panelButtonClick=function(Et){var Ft=this,Dt=-1;if(Et!==this.activePanel){Dt=this.panels.indexOf(Et),this.panelRow.innerHTML="";var Wt=Et.getUi();Wt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Wt),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=Et}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Ft.displayMode==="inline"?Ft.panelRow.style.display="none":Ft.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(kt,Ue){var Tn,Ei;kt.className=Ft.toolboxButtonStyleClass.name+" "+(Ue===Dt?""+((Tn=Ft.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Tn!==void 0?Tn:Ft.toolboxActiveButtonStyleColorsClass.name):""+((Ei=Ft.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ei!==void 0?Ei:Ft.toolboxButtonStyleColorsClass.name))})},Kt}(),et=function(Kt,Et){this.title=Kt,this.icon=Et},nt=function(Kt){function Et(Ft,Dt,Wt,kt){var Ue=Kt.call(this,Ft,kt||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return Ue.colors=[],Ue.addTransparent=!1,Ue.colorBoxes=[],Ue.colors=Dt,Ue.currentColor=Wt,Ue.setCurrentColor=Ue.setCurrentColor.bind(Ue),Ue.getColorBox=Ue.getColorBox.bind(Ue),Ue}return Be(Et,Kt),Et.prototype.getUi=function(){var Ft=this,Dt=document.createElement("div");return Dt.style.overflow="hidden",Dt.style.whiteSpace="nowrap",this.colors.forEach(function(Wt){var kt=Ft.getColorBox(Wt);Dt.appendChild(kt),Ft.colorBoxes.push(kt)}),Dt},Et.prototype.getColorBox=function(Ft){var Dt=this,Wt=this.uiStyleSettings.toolbarHeight/4,kt=this.uiStyleSettings.toolbarHeight-Wt,Ue=document.createElement("div");Ue.style.display="inline-block",Ue.style.boxSizing="content-box",Ue.style.width=kt-2+"px",Ue.style.height=kt-2+"px",Ue.style.padding="1px",Ue.style.marginRight="2px",Ue.style.marginBottom="2px",Ue.style.borderWidth="2px",Ue.style.borderStyle="solid",Ue.style.borderRadius=(kt+2)/2+"px",Ue.style.borderColor=Ft===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ue.addEventListener("click",function(){Dt.setCurrentColor(Ft,Ue)});var Tn=document.createElement("div");return Tn.style.display="inline-block",Tn.style.width=kt-2+"px",Tn.style.height=kt-2+"px",Tn.style.backgroundColor=Ft,Tn.style.borderRadius=kt/2+"px",Ft==="transparent"&&(Tn.style.fill=this.uiStyleSettings.toolboxAccentColor,Tn.innerHTML=`<svg viewBox="0 0 24 24">
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
</svg>`),Ue.appendChild(Tn),Ue},Et.prototype.setCurrentColor=function(Ft,Dt){var Wt=this;this.currentColor=Ft,this.colorBoxes.forEach(function(kt){kt.style.borderColor=kt===Dt?Wt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Ft)},Et}(et),gt=function(){function Kt(Et,Ft,Dt){this._state="new",this._isSelected=!1,this._container=Et,this._overlayContainer=Ft,this.globalSettings=Dt,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Kt.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Kt.prototype.ownsTarget=function(Et){return!1},Object.defineProperty(Kt.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Kt.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Kt.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Kt.prototype.pointerDown=function(Et,Ft){},Kt.prototype.dblClick=function(Et,Ft){},Kt.prototype.manipulate=function(Et){},Kt.prototype.pointerUp=function(Et){this.stateChanged()},Kt.prototype.dispose=function(){},Kt.prototype.addMarkerVisualToContainer=function(Et){this.container.childNodes.length>0?this.container.insertBefore(Et,this.container.childNodes[0]):this.container.appendChild(Et)},Kt.prototype.getState=function(){return{typeName:Kt.typeName,state:this.state,notes:this.notes}},Kt.prototype.restoreState=function(Et){this._state=Et.state,this.notes=Et.notes},Kt.prototype.scale=function(Et,Ft){},Kt.prototype.colorChanged=function(Et){this.onColorChanged&&this.onColorChanged(Et),this.stateChanged()},Kt.prototype.fillColorChanged=function(Et){this.onFillColorChanged&&this.onFillColorChanged(Et),this.stateChanged()},Kt.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Et=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Et.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Et)&&this.onStateChanged(this)}},Kt.typeName="MarkerBase",Kt}(),lt=function(){function Kt(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Kt.prototype.findGripByVisual=function(Et){return this.topLeft.ownsTarget(Et)?this.topLeft:this.topCenter.ownsTarget(Et)?this.topCenter:this.topRight.ownsTarget(Et)?this.topRight:this.centerLeft.ownsTarget(Et)?this.centerLeft:this.centerRight.ownsTarget(Et)?this.centerRight:this.bottomLeft.ownsTarget(Et)?this.bottomLeft:this.bottomCenter.ownsTarget(Et)?this.bottomCenter:this.bottomRight.ownsTarget(Et)?this.bottomRight:void 0},Kt}(),ct=function(){function Kt(){this.GRIP_SIZE=10,this.visual=we.createGroup(),this.visual.appendChild(we.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(we.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Kt.prototype.ownsTarget=function(Et){return Et===this.visual||Et===this.visual.childNodes[0]||Et===this.visual.childNodes[1]},Kt}(),yt=function(){function Kt(){}return Kt.toITransformMatrix=function(Et){return{a:Et.a,b:Et.b,c:Et.c,d:Et.d,e:Et.e,f:Et.f}},Kt.toSVGMatrix=function(Et,Ft){return Et.a=Ft.a,Et.b=Ft.b,Et.c=Ft.c,Et.d=Ft.d,Et.e=Ft.e,Et.f=Ft.f,Et},Kt}(),Lt=function(Kt){function Et(Ft,Dt,Wt){var kt=Kt.call(this,Ft,Dt,Wt)||this;return kt.left=0,kt.top=0,kt.width=0,kt.height=0,kt.defaultSize={x:50,y:20},kt.offsetX=0,kt.offsetY=0,kt.rotationAngle=0,kt.CB_DISTANCE=10,kt._suppressMarkerCreateEvent=!1,kt.container.transform.baseVal.appendItem(we.createTransform()),kt.setupControlBox(),kt}return Be(Et,Kt),Object.defineProperty(Et.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Et.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Et.prototype,"visual",{get:function(){return this._visual},set:function(Ft){this._visual=Ft;var Dt=we.createTransform();this._visual.transform.baseVal.appendItem(Dt)},enumerable:!1,configurable:!0}),Et.prototype.ownsTarget=function(Ft){return!!Kt.prototype.ownsTarget.call(this,Ft)||!!(this.controlGrips.findGripByVisual(Ft)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Ft))},Et.prototype.pointerDown=function(Ft,Dt){Kt.prototype.pointerDown.call(this,Ft,Dt),this.state==="new"&&(this.left=Ft.x,this.top=Ft.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Wt=this.unrotatePoint(Ft);if(this.manipulationStartX=Wt.x,this.manipulationStartY=Wt.y,this.offsetX=Wt.x-this.left,this.offsetY=Wt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Dt),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Dt)){this.activeGrip=this.rotatorGrip;var kt=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=kt.x-this.width/2,this.top=kt.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Ue=this.container.transform.baseVal.getItem(0);Ue.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ue,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Et.prototype.pointerUp=function(Ft){var Dt=this.state;Kt.prototype.pointerUp.call(this,Ft),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Ft),this._state="select",Dt==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Et.prototype.moveVisual=function(Ft){this.visual.style.transform="translate("+Ft.x+"px, "+Ft.y+"px)"},Et.prototype.manipulate=function(Ft){var Dt=this.unrotatePoint(Ft);this.state==="creating"?this.resize(Ft):this.state==="move"?(this.left=this.manipulationStartLeft+(Dt.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Dt.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Dt):this.state==="rotate"&&this.rotate(Ft)},Et.prototype.resize=function(Ft){var Dt=this.manipulationStartLeft,Wt=this.manipulationStartWidth,kt=this.manipulationStartTop,Ue=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Dt=this.manipulationStartLeft+Ft.x-this.manipulationStartX,Wt=this.manipulationStartWidth+this.manipulationStartLeft-Dt;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Wt=this.manipulationStartWidth+Ft.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:kt=this.manipulationStartTop+Ft.y-this.manipulationStartY,Ue=this.manipulationStartHeight+this.manipulationStartTop-kt;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ue=this.manipulationStartHeight+Ft.y-this.manipulationStartY}Wt>=0?(this.left=Dt,this.width=Wt):(this.left=Dt+Wt,this.width=-Wt),Ue>=0?(this.top=kt,this.height=Ue):(this.top=kt+Ue,this.height=-Ue),this.setSize()},Et.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Et.prototype.rotate=function(Ft){if(Math.abs(Ft.x-this.centerX)>.1){var Dt=Math.sign(Ft.x-this.centerX);this.rotationAngle=180*Math.atan((Ft.y-this.centerY)/(Ft.x-this.centerX))/Math.PI+90*Dt,this.applyRotation()}},Et.prototype.applyRotation=function(){var Ft=this.container.transform.baseVal.getItem(0);Ft.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ft,0)},Et.prototype.rotatePoint=function(Ft){if(this.rotationAngle===0)return Ft;var Dt=this.container.getCTM(),Wt=we.createPoint(Ft.x,Ft.y);return{x:(Wt=Wt.matrixTransform(Dt)).x,y:Wt.y}},Et.prototype.unrotatePoint=function(Ft){if(this.rotationAngle===0)return Ft;var Dt=this.container.getCTM();Dt=Dt.inverse();var Wt=we.createPoint(Ft.x,Ft.y);return{x:(Wt=Wt.matrixTransform(Dt)).x,y:Wt.y}},Et.prototype.select=function(){Kt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Et.prototype.deselect=function(){Kt.prototype.deselect.call(this),this.controlBox.style.display="none"},Et.prototype.setupControlBox=function(){this.controlBox=we.createGroup();var Ft=we.createTransform();Ft.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Ft),this.container.appendChild(this.controlBox),this.controlRect=we.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=we.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new lt,this.addControlGrips(),this.controlBox.style.display="none"},Et.prototype.adjustControlBox=function(){var Ft=this.controlBox.transform.baseVal.getItem(0);Ft.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Ft,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},Et.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},Et.prototype.createGrip=function(){var Ft=new ct;return Ft.visual.transform.baseVal.appendItem(we.createTransform()),this.controlBox.appendChild(Ft.visual),Ft},Et.prototype.positionGrips=function(){var Ft=this.controlGrips.topLeft.GRIP_SIZE,Dt=-Ft/2,Wt=Dt,kt=(this.width+this.CB_DISTANCE)/2-Ft/2,Ue=(this.height+this.CB_DISTANCE)/2-Ft/2,Tn=this.height+this.CB_DISTANCE-Ft/2,Ei=this.width+this.CB_DISTANCE-Ft/2;this.positionGrip(this.controlGrips.topLeft.visual,Dt,Wt),this.positionGrip(this.controlGrips.topCenter.visual,kt,Wt),this.positionGrip(this.controlGrips.topRight.visual,Ei,Wt),this.positionGrip(this.controlGrips.centerLeft.visual,Dt,Ue),this.positionGrip(this.controlGrips.centerRight.visual,Ei,Ue),this.positionGrip(this.controlGrips.bottomLeft.visual,Dt,Tn),this.positionGrip(this.controlGrips.bottomCenter.visual,kt,Tn),this.positionGrip(this.controlGrips.bottomRight.visual,Ei,Tn),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,kt,Wt-3*this.CB_DISTANCE)},Et.prototype.positionGrip=function(Ft,Dt,Wt){var kt=Ft.transform.baseVal.getItem(0);kt.setTranslate(Dt,Wt),Ft.transform.baseVal.replaceItem(kt,0)},Et.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Et.prototype.showControlBox=function(){this.controlBox.style.display=""},Et.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:yt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:yt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Kt.prototype.getState.call(this))},Et.prototype.restoreState=function(Ft){Kt.prototype.restoreState.call(this,Ft);var Dt=Ft;this.left=Dt.left,this.top=Dt.top,this.width=Dt.width,this.height=Dt.height,this.rotationAngle=Dt.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(yt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Dt.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(yt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Dt.containerTransformMatrix))},Et.prototype.scale=function(Ft,Dt){Kt.prototype.scale.call(this,Ft,Dt);var Wt=this.rotatePoint({x:this.left,y:this.top}),kt=this.unrotatePoint({x:Wt.x*Ft,y:Wt.y*Dt});this.left=kt.x,this.top=kt.y,this.width=this.width*Ft,this.height=this.height*Dt,this.adjustControlBox()},Et}(gt),Nt=function(Kt){function Et(Ft,Dt,Wt){var kt=Kt.call(this,Ft,Dt,Wt)||this;return kt.fillColor="transparent",kt.strokeColor="transparent",kt.strokeWidth=0,kt.strokeDasharray="",kt.opacity=1,kt.setStrokeColor=kt.setStrokeColor.bind(kt),kt.setFillColor=kt.setFillColor.bind(kt),kt.setStrokeWidth=kt.setStrokeWidth.bind(kt),kt.setStrokeDasharray=kt.setStrokeDasharray.bind(kt),kt.createVisual=kt.createVisual.bind(kt),kt}return Be(Et,Kt),Et.prototype.ownsTarget=function(Ft){return!(!Kt.prototype.ownsTarget.call(this,Ft)&&Ft!==this.visual)},Et.prototype.createVisual=function(){this.visual=we.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},Et.prototype.pointerDown=function(Ft,Dt){Kt.prototype.pointerDown.call(this,Ft,Dt),this.state==="new"&&(this.createVisual(),this.moveVisual(Ft),this._state="creating")},Et.prototype.manipulate=function(Ft){Kt.prototype.manipulate.call(this,Ft)},Et.prototype.resize=function(Ft){Kt.prototype.resize.call(this,Ft),this.setSize()},Et.prototype.setSize=function(){Kt.prototype.setSize.call(this),we.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Et.prototype.pointerUp=function(Ft){Kt.prototype.pointerUp.call(this,Ft),this.setSize()},Et.prototype.setStrokeColor=function(Ft){this.strokeColor=Ft,this.visual&&we.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Ft),this.stateChanged()},Et.prototype.setFillColor=function(Ft){this.fillColor=Ft,this.visual&&we.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Et.prototype.setStrokeWidth=function(Ft){this.strokeWidth=Ft,this.visual&&we.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Et.prototype.setStrokeDasharray=function(Ft){this.strokeDasharray=Ft,this.visual&&we.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Et.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Kt.prototype.getState.call(this))},Et.prototype.restoreState=function(Ft){var Dt=Ft;this.fillColor=Dt.fillColor,this.strokeColor=Dt.strokeColor,this.strokeWidth=Dt.strokeWidth,this.strokeDasharray=Dt.strokeDasharray,this.opacity=Dt.opacity,this.createVisual(),Kt.prototype.restoreState.call(this,Ft),this.setSize()},Et.prototype.scale=function(Ft,Dt){Kt.prototype.scale.call(this,Ft,Dt),this.setSize()},Et.title="Rectangle marker",Et}(Lt),Vt=function(Kt){function Et(Ft,Dt,Wt,kt){var Ue=Kt.call(this,Ft,kt||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Ue.widths=[],Ue.widthBoxes=[],Ue.widths=Dt,Ue.currentWidth=Wt,Ue.setCurrentWidth=Ue.setCurrentWidth.bind(Ue),Ue}return Be(Et,Kt),Et.prototype.getUi=function(){var Ft=this,Dt=document.createElement("div");return Dt.style.display="flex",Dt.style.overflow="hidden",Dt.style.flexGrow="2",this.widths.forEach(function(Wt){var kt=document.createElement("div");kt.style.display="flex",kt.style.flexGrow="2",kt.style.alignItems="center",kt.style.justifyContent="space-between",kt.style.padding="5px",kt.style.borderWidth="2px",kt.style.borderStyle="solid",kt.style.borderColor=Wt===Ft.currentWidth?Ft.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){Ft.setCurrentWidth(Wt,kt)}),Dt.appendChild(kt);var Ue=document.createElement("div");Ue.innerText=Wt.toString(),Ue.style.marginRight="5px",kt.appendChild(Ue);var Tn=document.createElement("div");Tn.style.minHeight="20px",Tn.style.flexGrow="2",Tn.style.display="flex",Tn.style.alignItems="center";var Ei=document.createElement("hr");Ei.style.minWidth="20px",Ei.style.border="0px",Ei.style.borderTop=Wt+"px solid "+Ft.uiStyleSettings.toolboxColor,Ei.style.flexGrow="2",Tn.appendChild(Ei),kt.appendChild(Tn),Ft.widthBoxes.push(kt)}),Dt},Et.prototype.setCurrentWidth=function(Ft,Dt){var Wt=this;this.currentWidth=Ft,this.widthBoxes.forEach(function(kt){kt.style.borderColor=kt===Dt?Wt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Et}(et),Jt=function(Kt){function Et(Ft,Dt,Wt,kt){var Ue=Kt.call(this,Ft,kt||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return Ue.styles=[],Ue.styleBoxes=[],Ue.styles=Dt,Ue.currentStyle=Wt,Ue.setCurrentStyle=Ue.setCurrentStyle.bind(Ue),Ue}return Be(Et,Kt),Et.prototype.getUi=function(){var Ft=this,Dt=document.createElement("div");return Dt.style.display="flex",Dt.style.overflow="hidden",Dt.style.flexGrow="2",this.styles.forEach(function(Wt){var kt=document.createElement("div");kt.style.display="flex",kt.style.alignItems="center",kt.style.justifyContent="space-between",kt.style.padding="5px",kt.style.borderWidth="2px",kt.style.borderStyle="solid",kt.style.overflow="hidden",kt.style.maxWidth=100/Ft.styles.length-5+"%",kt.style.borderColor=Wt===Ft.currentStyle?Ft.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){Ft.setCurrentStyle(Wt,kt)}),Dt.appendChild(kt);var Ue=document.createElement("div");Ue.style.minHeight="20px",Ue.style.flexGrow="2",Ue.style.overflow="hidden";var Tn=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Ft.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Wt!==""?'stroke-dasharray="'+Wt+'"':"")+` />
</svg>`;Ue.innerHTML=Tn,kt.appendChild(Ue),Ft.styleBoxes.push(kt)}),Dt},Et.prototype.setCurrentStyle=function(Ft,Dt){var Wt=this;this.currentStyle=Ft,this.styleBoxes.forEach(function(kt){kt.style.borderColor=kt===Dt?Wt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Et}(et),Ae=function(Kt){function Et(Ft,Dt,Wt){var kt=Kt.call(this,Ft,Dt,Wt)||this;return kt.strokeColor=Wt.defaultColor,kt.strokeWidth=Wt.defaultStrokeWidth,kt.strokeDasharray=Wt.defaultStrokeDasharray,kt.strokePanel=new nt("Line color",Wt.defaultColorSet,Wt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.strokeWidthPanel=new Vt("Line width",Wt.defaultStrokeWidths,Wt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Jt("Line style",Wt.defaultStrokeDasharrays,Wt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt}return Be(Et,Kt),Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var Ft=Kt.prototype.getState.call(this);return Ft.typeName=Et.typeName,Ft},Et.typeName="FrameMarker",Et.title="Frame marker",Et.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',Et}(Nt),he=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},le=function(Kt){function Et(Ft,Dt,Wt){var kt=Kt.call(this,Ft,Dt,Wt)||this;return kt.x1=0,kt.y1=0,kt.x2=0,kt.y2=0,kt.defaultLength=50,kt.manipulationStartX=0,kt.manipulationStartY=0,kt.manipulationStartX1=0,kt.manipulationStartY1=0,kt.manipulationStartX2=0,kt.manipulationStartY2=0,kt.setupControlBox(),kt}return Be(Et,Kt),Et.prototype.ownsTarget=function(Ft){return!!Kt.prototype.ownsTarget.call(this,Ft)||!(!this.grip1.ownsTarget(Ft)&&!this.grip2.ownsTarget(Ft))},Et.prototype.pointerDown=function(Ft,Dt){Kt.prototype.pointerDown.call(this,Ft,Dt),this.manipulationStartX=Ft.x,this.manipulationStartY=Ft.y,this.state==="new"&&(this.x1=Ft.x,this.y1=Ft.y,this.x2=Ft.x,this.y2=Ft.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(Dt)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Dt)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Et.prototype.pointerUp=function(Ft){var Dt=this.state;Kt.prototype.pointerUp.call(this,Ft),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(Ft),this._state="select",Dt==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Et.prototype.adjustVisual=function(){},Et.prototype.manipulate=function(Ft){this.state==="creating"?this.resize(Ft):this.state==="move"?(this.x1=this.manipulationStartX1+Ft.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Ft.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Ft.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Ft.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Ft)},Et.prototype.resize=function(Ft){switch(this.activeGrip){case this.grip1:this.x1=Ft.x,this.y1=Ft.y;break;case this.grip2:case void 0:this.x2=Ft.x,this.y2=Ft.y}this.adjustVisual(),this.adjustControlBox()},Et.prototype.select=function(){Kt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Et.prototype.deselect=function(){Kt.prototype.deselect.call(this),this.controlBox.style.display="none"},Et.prototype.setupControlBox=function(){this.controlBox=we.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Et.prototype.adjustControlBox=function(){this.positionGrips()},Et.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Et.prototype.createGrip=function(){var Ft=new ct;return Ft.visual.transform.baseVal.appendItem(we.createTransform()),this.controlBox.appendChild(Ft.visual),Ft},Et.prototype.positionGrips=function(){var Ft=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Ft/2,this.y1-Ft/2),this.positionGrip(this.grip2.visual,this.x2-Ft/2,this.y2-Ft/2)},Et.prototype.positionGrip=function(Ft,Dt,Wt){var kt=Ft.transform.baseVal.getItem(0);kt.setTranslate(Dt,Wt),Ft.transform.baseVal.replaceItem(kt,0)},Et.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Kt.prototype.getState.call(this))},Et.prototype.restoreState=function(Ft){Kt.prototype.restoreState.call(this,Ft);var Dt=Ft;this.x1=Dt.x1,this.y1=Dt.y1,this.x2=Dt.x2,this.y2=Dt.y2},Et.prototype.scale=function(Ft,Dt){Kt.prototype.scale.call(this,Ft,Dt),this.x1=this.x1*Ft,this.y1=this.y1*Dt,this.x2=this.x2*Ft,this.y2=this.y2*Dt,this.adjustVisual(),this.adjustControlBox()},Et}(gt),We=function(Kt){function Et(Ft,Dt,Wt){var kt=Kt.call(this,Ft,Dt,Wt)||this;return kt.strokeColor="transparent",kt.strokeWidth=0,kt.strokeDasharray="",kt.setStrokeColor=kt.setStrokeColor.bind(kt),kt.setStrokeWidth=kt.setStrokeWidth.bind(kt),kt.setStrokeDasharray=kt.setStrokeDasharray.bind(kt),kt.strokeColor=Wt.defaultColor,kt.strokeWidth=Wt.defaultStrokeWidth,kt.strokeDasharray=Wt.defaultStrokeDasharray,kt.strokePanel=new nt("Line color",Wt.defaultColorSet,Wt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.strokeWidthPanel=new Vt("Line width",Wt.defaultStrokeWidths,Wt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Jt("Line style",Wt.defaultStrokeDasharrays,Wt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt}return Be(Et,Kt),Et.prototype.ownsTarget=function(Ft){return!(!Kt.prototype.ownsTarget.call(this,Ft)&&Ft!==this.visual&&Ft!==this.selectorLine&&Ft!==this.visibleLine)},Et.prototype.createVisual=function(){this.visual=we.createGroup(),this.selectorLine=we.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=we.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},Et.prototype.pointerDown=function(Ft,Dt){Kt.prototype.pointerDown.call(this,Ft,Dt),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Et.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),we.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),we.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),we.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Et.prototype.setStrokeColor=function(Ft){this.strokeColor=Ft,this.adjustVisual(),this.colorChanged(Ft)},Et.prototype.setStrokeWidth=function(Ft){this.strokeWidth=Ft,this.adjustVisual()},Et.prototype.setStrokeDasharray=function(Ft){this.strokeDasharray=Ft,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var Ft=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Kt.prototype.getState.call(this));return Ft.typeName=Et.typeName,Ft},Et.prototype.restoreState=function(Ft){Kt.prototype.restoreState.call(this,Ft);var Dt=Ft;this.strokeColor=Dt.strokeColor,this.strokeWidth=Dt.strokeWidth,this.strokeDasharray=Dt.strokeDasharray,this.createVisual(),this.adjustVisual()},Et.typeName="LineMarker",Et.title="Line marker",Et.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',Et}(le),me=function(Kt){function Et(Ft,Dt,Wt,kt){var Ue=Kt.call(this,Ft,kt||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return Ue.fonts=[],Ue.fontBoxes=[],Ue.fonts=Dt,Ue.currentFont=Wt,Ue.setCurrentFont=Ue.setCurrentFont.bind(Ue),Ue}return Be(Et,Kt),Et.prototype.getUi=function(){var Ft=this,Dt=document.createElement("div");return Dt.style.overflow="hidden",Dt.style.flexGrow="2",this.fonts.forEach(function(Wt){var kt=document.createElement("div");kt.style.display="inline-block",kt.style.alignItems="center",kt.style.justifyContent="space-between",kt.style.padding="5px",kt.style.borderWidth="2px",kt.style.borderStyle="solid",kt.style.overflow="hidden",kt.style.maxWidth=100/Ft.fonts.length-5+"%",kt.style.borderColor=Wt===Ft.currentFont?Ft.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){Ft.setCurrentFont(Wt,kt)}),Dt.appendChild(kt);var Ue=document.createElement("div");Ue.style.display="flex",Ue.style.minHeight="20px",Ue.style.flexGrow="2",Ue.style.fontFamily=Wt,Ue.style.overflow="hidden";var Tn=document.createElement("div");Tn.style.whiteSpace="nowrap",Tn.style.overflow="hidden",Tn.style.textOverflow="ellipsis",Tn.innerHTML="The quick brown fox jumps over the lazy dog",Ue.appendChild(Tn),kt.appendChild(Ue),Ft.fontBoxes.push(kt)}),Dt},Et.prototype.setCurrentFont=function(Ft,Dt){var Wt=this;this.currentFont=Ft,this.fontBoxes.forEach(function(kt){kt.style.borderColor=kt===Dt?Wt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Et}(et),Je=function(Kt){function Et(Ft,Dt,Wt){var kt=Kt.call(this,Ft,Dt,Wt)||this;return kt.color="transparent",kt.padding=5,kt.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",kt.text=kt.DEFAULT_TEXT,kt.isMoved=!1,kt.color=Wt.defaultColor,kt.fontFamily=Wt.defaultFontFamily,kt.defaultSize={x:100,y:30},kt.setColor=kt.setColor.bind(kt),kt.setFont=kt.setFont.bind(kt),kt.renderText=kt.renderText.bind(kt),kt.sizeText=kt.sizeText.bind(kt),kt.textEditDivClicked=kt.textEditDivClicked.bind(kt),kt.showTextEditor=kt.showTextEditor.bind(kt),kt.setSize=kt.setSize.bind(kt),kt.positionTextEditor=kt.positionTextEditor.bind(kt),kt.colorPanel=new nt("Color",Wt.defaultColorSet,Wt.defaultColor),kt.colorPanel.onColorChanged=kt.setColor,kt.fontFamilyPanel=new me("Font",Wt.defaultFontFamilies,Wt.defaultFontFamily),kt.fontFamilyPanel.onFontChanged=kt.setFont,kt}return Be(Et,Kt),Et.prototype.ownsTarget=function(Ft){if(Kt.prototype.ownsTarget.call(this,Ft)||Ft===this.visual||Ft===this.textElement||Ft===this.bgRectangle)return!0;var Dt=!1;return this.textElement.childNodes.forEach(function(Wt){Wt===Ft&&(Dt=!0)}),Dt},Et.prototype.createVisual=function(){this.visual=we.createGroup(),this.bgRectangle=we.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=we.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(we.createTransform()),this.textElement.transform.baseVal.appendItem(we.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Et.prototype.pointerDown=function(Ft,Dt){Kt.prototype.pointerDown.call(this,Ft,Dt),this.isMoved=!1,this.pointerDownPoint=Ft,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Ft),this._state="creating")},Et.prototype.renderText=function(){var Ft=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(Dt){Ft.textElement.appendChild(we.createTSpan(Dt.trim()===""?" ":Dt.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Et.prototype.getTextScale=function(){var Ft=this.textElement.getBBox(),Dt=1;if(Ft.width>0&&Ft.height>0){var Wt=(1*this.width-this.width*this.padding*2/100)/Ft.width,kt=(1*this.height-this.height*this.padding*2/100)/Ft.height;Dt=Math.min(Wt,kt)}return Dt},Et.prototype.getTextPosition=function(Ft){var Dt=this.textElement.getBBox(),Wt=0,kt=0;return Dt.width>0&&Dt.height>0&&(Wt=(this.width-Dt.width*Ft)/2,kt=this.height/2-Dt.height*Ft/2),{x:Wt,y:kt}},Et.prototype.sizeText=function(){var Ft=this.textElement.getBBox(),Dt=this.getTextScale(),Wt=this.getTextPosition(Dt);Wt.y-=Ft.y*Dt,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Wt.x+"px, "+Wt.y+"px) scale("+Dt+", "+Dt+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Wt.x,Wt.y),this.textElement.transform.baseVal.getItem(1).setScale(Dt,Dt))},Et.prototype.manipulate=function(Ft){Kt.prototype.manipulate.call(this,Ft),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Ft.x-this.pointerDownPoint.x)>5||Math.abs(Ft.y-this.pointerDownPoint.y)>5)},Et.prototype.resize=function(Ft){Kt.prototype.resize.call(this,Ft),this.isMoved=!0,this.setSize(),this.sizeText()},Et.prototype.setSize=function(){Kt.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(we.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),we.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Et.prototype.pointerUp=function(Ft){var Dt=this.state;Dt==="creating"&&(this._suppressMarkerCreateEvent=!0),Kt.prototype.pointerUp.call(this,Ft),this.setSize(),(Dt==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Et.prototype.showTextEditor=function(){var Ft=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(Dt){Dt.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Dt=Number.parseFloat(Ft.textEditor.style.fontSize);Ft.textEditor.clientWidth>=Number.parseInt(Ft.textEditor.style.maxWidth)&&Dt>.9;)Dt-=.1,Ft.textEditor.style.fontSize=Math.max(Dt,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Dt){Dt.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Dt){if(Dt.clipboardData){var Wt=Dt.clipboardData.getData("text"),kt=window.getSelection();if(!kt.rangeCount)return!1;kt.deleteFromDocument(),kt.getRangeAt(0).insertNode(document.createTextNode(Wt)),Dt.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Ft.textEditDivClicked(Ft.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},Et.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Ft=this.getTextScale(),Dt=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Wt=this.textElement.getBBox(),kt={x:Wt.width*Ft,y:Wt.height*Ft};Dt.x-=kt.x/2,Dt.y-=kt.y/2,this.textEditor.style.top=Dt.y+"px",this.textEditor.style.left=Dt.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Dt.x+"px",this.textEditor.style.fontSize=Math.max(16*Ft,12)+"px",this.textElement.style.display="none"}},Et.prototype.textEditDivClicked=function(Ft){this.text=Ft.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},Et.prototype.select=function(){Kt.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Et.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Kt.prototype.deselect.call(this)},Et.prototype.dblClick=function(Ft,Dt){Kt.prototype.dblClick.call(this,Ft,Dt),this.showTextEditor()},Et.prototype.setColor=function(Ft){this.textElement&&we.setAttributes(this.textElement,[["fill",Ft]]),this.color=Ft,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Ft)},Et.prototype.setFont=function(Ft){this.textElement&&we.setAttributes(this.textElement,[["font-family",Ft]]),this.fontFamily=Ft,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},Et.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Et.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var Ft=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Kt.prototype.getState.call(this));return Ft.typeName=Et.typeName,Ft},Et.prototype.restoreState=function(Ft){var Dt=Ft;this.color=Dt.color,this.fontFamily=Dt.fontFamily,this.padding=Dt.padding,this.text=Dt.text,this.createVisual(),Kt.prototype.restoreState.call(this,Ft),this.setSize()},Et.prototype.scale=function(Ft,Dt){Kt.prototype.scale.call(this,Ft,Dt),this.setSize(),this.sizeText(),this.positionTextEditor()},Et.typeName="TextMarker",Et.title="Text marker",Et.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',Et}(Lt),fn=function(Kt){function Et(Ft,Dt,Wt){var kt=Kt.call(this,Ft,Dt,Wt)||this;return kt.color="transparent",kt.lineWidth=3,kt.drawing=!1,kt.pixelRatio=1,kt.color=Wt.defaultColor,kt.lineWidth=Wt.defaultStrokeWidth,kt.pixelRatio=Wt.freehandPixelRatio,kt.setColor=kt.setColor.bind(kt),kt.addCanvas=kt.addCanvas.bind(kt),kt.finishCreation=kt.finishCreation.bind(kt),kt.setLineWidth=kt.setLineWidth.bind(kt),kt.colorPanel=new nt("Color",Wt.defaultColorSet,Wt.defaultColor),kt.colorPanel.onColorChanged=kt.setColor,kt.lineWidthPanel=new Vt("Line width",Wt.defaultStrokeWidths,Wt.defaultStrokeWidth),kt.lineWidthPanel.onWidthChanged=kt.setLineWidth,kt}return Be(Et,Kt),Et.prototype.ownsTarget=function(Ft){return!(!Kt.prototype.ownsTarget.call(this,Ft)&&Ft!==this.visual&&Ft!==this.drawingImage)},Et.prototype.createVisual=function(){this.visual=we.createGroup(),this.drawingImage=we.createImage(),this.visual.appendChild(this.drawingImage);var Ft=we.createTransform();this.visual.transform.baseVal.appendItem(Ft),this.addMarkerVisualToContainer(this.visual)},Et.prototype.pointerDown=function(Ft,Dt){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(Ft.x,Ft.y),this.drawing=!0):Kt.prototype.pointerDown.call(this,Ft,Dt)},Et.prototype.manipulate=function(Ft){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Ft.x,Ft.y),this.canvasContext.stroke()):Kt.prototype.manipulate.call(this,Ft)},Et.prototype.resize=function(Ft){Kt.prototype.resize.call(this,Ft),we.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),we.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Et.prototype.pointerUp=function(Ft){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Kt.prototype.pointerUp.call(this,Ft)},Et.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},Et.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Kt.prototype.select.call(this)},Et.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Kt.prototype.deselect.call(this)},Et.prototype.finishCreation=function(){for(var Ft=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Dt=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Wt=Dt[0],kt=Dt[1],Ue=Dt[2],Tn=Dt[3],Ei=!1,Xn=0;Xn<this.canvasElement.height;Xn++)for(var si=0;si<this.canvasElement.width;si++)Ft.data[Xn*this.canvasElement.width*4+4*si+3]>0&&(Ei=!0,Xn<kt&&(kt=Xn),si<Wt&&(Wt=si),Xn>Tn&&(Tn=Xn),si>Ue&&(Ue=si));if(Ei){this.left=Wt/this.pixelRatio,this.top=kt/this.pixelRatio,this.width=(Ue-Wt)/this.pixelRatio,this.height=(Tn-kt)/this.pixelRatio;var Qi=document.createElement("canvas");Qi.width=Ue-Wt,Qi.height=Tn-kt,Qi.getContext("2d").putImageData(this.canvasContext.getImageData(Wt,kt,Ue-Wt,Tn-kt),0,0),this.drawingImgUrl=Qi.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Et.prototype.setDrawingImage=function(){we.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),we.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Et.prototype.setColor=function(Ft){this.color=Ft,this.colorChanged(Ft)},Et.prototype.setLineWidth=function(Ft){this.lineWidth=Ft},Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var Ft=Object.assign({drawingImgUrl:this.drawingImgUrl},Kt.prototype.getState.call(this));return Ft.typeName=Et.typeName,Ft},Et.prototype.restoreState=function(Ft){this.createVisual(),Kt.prototype.restoreState.call(this,Ft),this.drawingImgUrl=Ft.drawingImgUrl,this.setDrawingImage()},Et.prototype.scale=function(Ft,Dt){Kt.prototype.scale.call(this,Ft,Dt),this.setDrawingImage()},Et.typeName="FreehandMarker",Et.title="Freehand marker",Et.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',Et}(Lt),sn=function(Kt){function Et(Ft,Dt,Wt){var kt=Kt.call(this,Ft,Wt||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return kt.typeBoxes=[],kt.currentType=Dt,kt.setCurrentType=kt.setCurrentType.bind(kt),kt}return Be(Et,Kt),Et.prototype.getUi=function(){var Ft=this,Dt=document.createElement("div");Dt.style.display="flex",Dt.style.overflow="hidden",Dt.style.flexGrow="2";for(var Wt=function(Tn){var Ei="both";switch(Tn){case 0:Ei="both";break;case 1:Ei="start";break;case 2:Ei="end";break;case 3:Ei="none"}var Xn=document.createElement("div");if(Xn.style.display="flex",Xn.style.flexGrow="2",Xn.style.alignItems="center",Xn.style.justifyContent="space-between",Xn.style.padding="5px",Xn.style.borderWidth="2px",Xn.style.borderStyle="solid",Xn.style.borderColor=Ei===kt.currentType?kt.uiStyleSettings.toolboxAccentColor:"transparent",Xn.addEventListener("click",function(){Ft.setCurrentType(Ei,Xn)}),Dt.appendChild(Xn),Ei==="both"||Ei==="start"){var si=document.createElement("div");si.style.display="flex",si.style.alignItems="center",si.style.minHeight="20px",si.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,5 10,0 10,10" fill="`+(kt.uiStyleSettings!==void 0?kt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,si.style.marginLeft="5px",Xn.appendChild(si)}var Qi=document.createElement("div");Qi.style.display="flex",Qi.style.alignItems="center",Qi.style.minHeight="20px",Qi.style.flexGrow="2";var Ln=document.createElement("hr");if(Ln.style.minWidth="20px",Ln.style.border="0px",Ln.style.borderTop="3px solid "+(kt.uiStyleSettings!==void 0?kt.uiStyleSettings.toolboxColor:"#eeeeee"),Ln.style.flexGrow="2",Qi.appendChild(Ln),Xn.appendChild(Qi),Ei==="both"||Ei==="end"){var Ci=document.createElement("div");Ci.style.display="flex",Ci.style.alignItems="center",Ci.style.minHeight="20px",Ci.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 10,5 0,10" fill="`+(kt.uiStyleSettings!==void 0?kt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Ci.style.marginRight="5px",Xn.appendChild(Ci)}kt.typeBoxes.push(Xn)},kt=this,Ue=0;Ue<4;Ue++)Wt(Ue);return Dt},Et.prototype.setCurrentType=function(Ft,Dt){var Wt=this;this.currentType=Ft,this.typeBoxes.forEach(function(kt){kt.style.borderColor=kt===Dt?Wt.uiStyleSettings!==void 0?Wt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Et}(et),ui=function(Kt){function Et(Ft,Dt,Wt){var kt=Kt.call(this,Ft,Dt,Wt)||this;return kt.arrowType="end",kt.arrowBaseHeight=10,kt.arrowBaseWidth=10,kt.getArrowPoints=kt.getArrowPoints.bind(kt),kt.setArrowType=kt.setArrowType.bind(kt),kt.arrowTypePanel=new sn("Arrow type","end"),kt.arrowTypePanel.onArrowTypeChanged=kt.setArrowType,kt}return Be(Et,Kt),Et.prototype.ownsTarget=function(Ft){return!(!Kt.prototype.ownsTarget.call(this,Ft)&&Ft!==this.arrow1&&Ft!==this.arrow2)},Et.prototype.getArrowPoints=function(Ft,Dt){var Wt=this.arrowBaseWidth+2*this.strokeWidth,kt=this.arrowBaseHeight+2*this.strokeWidth;return Ft-Wt/2+","+(Dt+kt/2)+" "+Ft+","+(Dt-kt/2)+" "+(Ft+Wt/2)+","+(Dt+kt/2)},Et.prototype.createTips=function(){this.arrow1=we.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(we.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=we.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(we.createTransform()),this.visual.appendChild(this.arrow2)},Et.prototype.pointerDown=function(Ft,Dt){Kt.prototype.pointerDown.call(this,Ft,Dt),this.state==="creating"&&this.createTips()},Et.prototype.adjustVisual=function(){if(Kt.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",we.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),we.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Ft=0;Math.abs(this.x1-this.x2)>.1&&(Ft=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Dt=this.arrow1.transform.baseVal.getItem(0);Dt.setRotate(Ft,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Dt,0);var Wt=this.arrow2.transform.baseVal.getItem(0);Wt.setRotate(Ft+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Wt,0)}},Et.prototype.setArrowType=function(Ft){this.arrowType=Ft,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var Ft=Object.assign({arrowType:this.arrowType},Kt.prototype.getState.call(this));return Ft.typeName=Et.typeName,Ft},Et.prototype.restoreState=function(Ft){Kt.prototype.restoreState.call(this,Ft);var Dt=Ft;this.arrowType=Dt.arrowType,this.createTips(),this.adjustVisual()},Et.typeName="ArrowMarker",Et.title="Arrow marker",Et.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',Et}(We),hi=function(Kt){function Et(Ft,Dt,Wt){var kt=Kt.call(this,Ft,Dt,Wt)||this;return kt.fillColor=Wt.defaultFillColor,kt.strokeWidth=0,kt.fillPanel=new nt("Color",Wt.defaultColorSet,Wt.defaultFillColor),kt.fillPanel.onColorChanged=kt.setFillColor,kt}return Be(Et,Kt),Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var Ft=Kt.prototype.getState.call(this);return Ft.typeName=Et.typeName,Ft},Et.typeName="CoverMarker",Et.title="Cover marker",Et.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',Et}(Nt),Si=function(Kt){function Et(Ft,Dt,Wt,kt){var Ue=Kt.call(this,Ft,kt||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return Ue.opacities=[],Ue.opacityBoxes=[],Ue.opacities=Dt,Ue.currentOpacity=Wt,Ue.setCurrentOpacity=Ue.setCurrentOpacity.bind(Ue),Ue}return Be(Et,Kt),Et.prototype.getUi=function(){var Ft=this,Dt=document.createElement("div");return Dt.style.display="flex",Dt.style.overflow="hidden",Dt.style.flexGrow="2",Dt.style.justifyContent="space-between",this.opacities.forEach(function(Wt){var kt=document.createElement("div");kt.style.display="flex",kt.style.alignItems="center",kt.style.justifyContent="center",kt.style.padding="5px",kt.style.borderWidth="2px",kt.style.borderStyle="solid",kt.style.borderColor=Wt===Ft.currentOpacity?Ft.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){Ft.setCurrentOpacity(Wt,kt)}),Dt.appendChild(kt);var Ue=document.createElement("div");Ue.innerText=100*Wt+"%",kt.appendChild(Ue),Ft.opacityBoxes.push(kt)}),Dt},Et.prototype.setCurrentOpacity=function(Ft,Dt){var Wt=this;this.currentOpacity=Ft,this.opacityBoxes.forEach(function(kt){kt.style.borderColor=kt===Dt?Wt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Et}(et),fr=function(Kt){function Et(Ft,Dt,Wt){var kt=Kt.call(this,Ft,Dt,Wt)||this;return kt.setOpacity=kt.setOpacity.bind(kt),kt.fillColor=Wt.defaultHighlightColor,kt.strokeWidth=0,kt.opacity=Wt.defaultHighlightOpacity,kt.fillPanel=new nt("Color",Wt.defaultColorSet,kt.fillColor),kt.fillPanel.onColorChanged=kt.setFillColor,kt.opacityPanel=new Si("Opacity",Wt.defaultOpacitySteps,kt.opacity),kt.opacityPanel.onOpacityChanged=kt.setOpacity,kt}return Be(Et,Kt),Et.prototype.setOpacity=function(Ft){this.opacity=Ft,this.visual&&we.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var Ft=Kt.prototype.getState.call(this);return Ft.typeName=Et.typeName,Ft},Et.typeName="HighlightMarker",Et.title="Highlight marker",Et.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',Et}(hi),qt='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',Ht='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',je=function(Kt){function Et(Ft,Dt,Wt){var kt=Kt.call(this,Ft,Dt,Wt)||this;return kt.bgColor="transparent",kt.tipPosition={x:0,y:0},kt.tipBase1Position={x:0,y:0},kt.tipBase2Position={x:0,y:0},kt.tipMoving=!1,kt.color=Wt.defaultStrokeColor,kt.bgColor=Wt.defaultFillColor,kt.fontFamily=Wt.defaultFontFamily,kt.defaultSize={x:100,y:30},kt.setBgColor=kt.setBgColor.bind(kt),kt.getTipPoints=kt.getTipPoints.bind(kt),kt.positionTip=kt.positionTip.bind(kt),kt.setTipPoints=kt.setTipPoints.bind(kt),kt.colorPanel=new nt("Text color",Wt.defaultColorSet,kt.color,qt),kt.colorPanel.onColorChanged=kt.setColor,kt.bgColorPanel=new nt("Fill color",Wt.defaultColorSet,kt.bgColor,Ht),kt.bgColorPanel.onColorChanged=kt.setBgColor,kt.fontFamilyPanel=new me("Font",Wt.defaultFontFamilies,Wt.defaultFontFamily),kt.fontFamilyPanel.onFontChanged=kt.setFont,kt.tipGrip=new ct,kt.tipGrip.visual.transform.baseVal.appendItem(we.createTransform()),kt.controlBox.appendChild(kt.tipGrip.visual),kt}return Be(Et,Kt),Et.prototype.ownsTarget=function(Ft){return Kt.prototype.ownsTarget.call(this,Ft)||this.tipGrip.ownsTarget(Ft)||this.tip===Ft},Et.prototype.createTip=function(){we.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=we.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Et.prototype.pointerDown=function(Ft,Dt){this.state==="new"&&Kt.prototype.pointerDown.call(this,Ft,Dt),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Dt)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Kt.prototype.pointerDown.call(this,Ft,Dt)},Et.prototype.pointerUp=function(Ft){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Kt.prototype.pointerUp.call(this,Ft);else{var Dt=this.state==="creating";Kt.prototype.pointerUp.call(this,Ft),this.setTipPoints(Dt),this.positionTip()}},Et.prototype.manipulate=function(Ft){if(this.tipMoving){var Dt=this.unrotatePoint(Ft);this.tipPosition={x:Dt.x-this.manipulationStartLeft,y:Dt.y-this.manipulationStartTop},this.positionTip()}else Kt.prototype.manipulate.call(this,Ft)},Et.prototype.setBgColor=function(Ft){this.bgRectangle&&this.tip&&(we.setAttributes(this.bgRectangle,[["fill",Ft]]),we.setAttributes(this.tip,[["fill",Ft]])),this.bgColor=Ft,this.fillColorChanged(Ft)},Et.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},Et.prototype.setTipPoints=function(Ft){Ft===void 0&&(Ft=!1);var Dt=Math.min(this.height/2,15),Wt=this.height/5;Ft&&(this.tipPosition={x:Dt+Wt/2,y:this.height+20});var kt=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?kt<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Wt=this.width/5,Dt=Math.min(this.width/2,15),this.tipBase1Position={x:Dt,y:0},this.tipBase2Position={x:Dt+Wt,y:0}):(this.tipBase1Position={x:0,y:Dt},this.tipBase2Position={x:0,y:Dt+Wt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?kt<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Wt=this.width/5,Dt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Dt-Wt,y:0},this.tipBase2Position={x:this.width-Dt,y:0}):(this.tipBase1Position={x:this.width,y:Dt},this.tipBase2Position={x:this.width,y:Dt+Wt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?kt<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Wt=this.width/5,Dt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Dt-Wt,y:this.height},this.tipBase2Position={x:this.width-Dt,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Dt-Wt},this.tipBase2Position={x:this.width,y:this.height-Dt}):kt<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Wt=this.width/5,Dt=Math.min(this.width/2,15),this.tipBase1Position={x:Dt,y:this.height},this.tipBase2Position={x:Dt+Wt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Dt},this.tipBase2Position={x:0,y:this.height-Dt-Wt})},Et.prototype.resize=function(Ft){Kt.prototype.resize.call(this,Ft),this.positionTip()},Et.prototype.positionTip=function(){we.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Ft=this.tipGrip.visual.transform.baseVal.getItem(0);Ft.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Ft,0)},Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Et.prototype.select=function(){this.positionTip(),Kt.prototype.select.call(this)},Et.prototype.getState=function(){var Ft=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Kt.prototype.getState.call(this));return Ft.typeName=Et.typeName,Ft},Et.prototype.restoreState=function(Ft){var Dt=Ft;this.bgColor=Dt.bgColor,this.tipPosition=Dt.tipPosition,Kt.prototype.restoreState.call(this,Ft),this.createTip(),this.setTipPoints()},Et.prototype.scale=function(Ft,Dt){Kt.prototype.scale.call(this,Ft,Dt),this.tipPosition={x:this.tipPosition.x*Ft,y:this.tipPosition.y*Dt},this.positionTip()},Et.typeName="CalloutMarker",Et.title="Callout marker",Et.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',Et}(Je),Nn=function(Kt){function Et(Ft,Dt,Wt){var kt=Kt.call(this,Ft,Dt,Wt)||this;return kt.fillColor="transparent",kt.strokeColor="transparent",kt.strokeWidth=0,kt.strokeDasharray="",kt.opacity=1,kt.strokeColor=Wt.defaultColor,kt.strokeWidth=Wt.defaultStrokeWidth,kt.strokeDasharray=Wt.defaultStrokeDasharray,kt.fillColor=Wt.defaultFillColor,kt.setStrokeColor=kt.setStrokeColor.bind(kt),kt.setFillColor=kt.setFillColor.bind(kt),kt.setStrokeWidth=kt.setStrokeWidth.bind(kt),kt.setStrokeDasharray=kt.setStrokeDasharray.bind(kt),kt.setOpacity=kt.setOpacity.bind(kt),kt.createVisual=kt.createVisual.bind(kt),kt.strokePanel=new nt("Line color",be(Wt.defaultColorSet,["transparent"]),Wt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.fillPanel=new nt("Fill color",be(Wt.defaultColorSet,["transparent"]),kt.fillColor,Ht),kt.fillPanel.onColorChanged=kt.setFillColor,kt.strokeWidthPanel=new Vt("Line width",Wt.defaultStrokeWidths,Wt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Jt("Line style",Wt.defaultStrokeDasharrays,Wt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt.opacityPanel=new Si("Opacity",Wt.defaultOpacitySteps,kt.opacity),kt.opacityPanel.onOpacityChanged=kt.setOpacity,kt}return Be(Et,Kt),Et.prototype.ownsTarget=function(Ft){return!(!Kt.prototype.ownsTarget.call(this,Ft)&&Ft!==this.visual)},Et.prototype.createVisual=function(){this.visual=we.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},Et.prototype.pointerDown=function(Ft,Dt){Kt.prototype.pointerDown.call(this,Ft,Dt),this.state==="new"&&(this.createVisual(),this.moveVisual(Ft),this._state="creating")},Et.prototype.manipulate=function(Ft){Kt.prototype.manipulate.call(this,Ft)},Et.prototype.resize=function(Ft){Kt.prototype.resize.call(this,Ft),this.setSize()},Et.prototype.setSize=function(){Kt.prototype.setSize.call(this),we.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},Et.prototype.pointerUp=function(Ft){Kt.prototype.pointerUp.call(this,Ft),this.setSize()},Et.prototype.setStrokeColor=function(Ft){this.strokeColor=Ft,this.visual&&we.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Ft),this.stateChanged()},Et.prototype.setFillColor=function(Ft){this.fillColor=Ft,this.visual&&we.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Ft),this.stateChanged()},Et.prototype.setStrokeWidth=function(Ft){this.strokeWidth=Ft,this.visual&&we.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Et.prototype.setStrokeDasharray=function(Ft){this.strokeDasharray=Ft,this.visual&&we.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Et.prototype.setOpacity=function(Ft){this.opacity=Ft,this.visual&&we.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var Ft=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Kt.prototype.getState.call(this));return Ft.typeName=Et.typeName,Ft},Et.prototype.restoreState=function(Ft){var Dt=Ft;this.fillColor=Dt.fillColor,this.strokeColor=Dt.strokeColor,this.strokeWidth=Dt.strokeWidth,this.strokeDasharray=Dt.strokeDasharray,this.opacity=Dt.opacity,this.createVisual(),Kt.prototype.restoreState.call(this,Ft),this.setSize()},Et.prototype.scale=function(Ft,Dt){Kt.prototype.scale.call(this,Ft,Dt),this.setSize()},Et.typeName="EllipseMarker",Et.title="Ellipse marker",Et.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',Et}(Lt),Kn=function(Kt){function Et(Ft,Dt,Wt){return Kt.call(this,Ft,Dt,Wt)||this}return Be(Et,Kt),Object.defineProperty(Et.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),Et.prototype.ownsTarget=function(Ft){return!(!Kt.prototype.ownsTarget.call(this,Ft)&&Ft!==this.tip1&&Ft!==this.tip2)},Et.prototype.createTips=function(){this.tip1=we.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(we.createTransform()),this.visual.appendChild(this.tip1),this.tip2=we.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(we.createTransform()),this.visual.appendChild(this.tip2)},Et.prototype.pointerDown=function(Ft,Dt){Kt.prototype.pointerDown.call(this,Ft,Dt),this.state==="creating"&&this.createTips()},Et.prototype.adjustVisual=function(){if(Kt.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(we.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),we.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var Ft=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Dt=this.tip1.transform.baseVal.getItem(0);Dt.setRotate(Ft,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Dt,0);var Wt=this.tip2.transform.baseVal.getItem(0);Wt.setRotate(Ft+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Wt,0)}},Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var Ft=Kt.prototype.getState.call(this);return Ft.typeName=Et.typeName,Ft},Et.prototype.restoreState=function(Ft){Kt.prototype.restoreState.call(this,Ft),this.createTips(),this.adjustVisual()},Et.typeName="MeasurementMarker",Et.title="Measurement marker",Et.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',Et}(We),He=function(Kt){function Et(Ft,Dt,Wt){var kt=Kt.call(this,Ft,Dt,Wt)||this;return kt.strokePanel.colors=Wt.defaultColorSet,kt.fillColor="transparent",kt}return Be(Et,Kt),Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var Ft=Kt.prototype.getState.call(this);return Ft.typeName=Et.typeName,Ft},Et.typeName="EllipseFrameMarker",Et.title="Ellipse frame marker",Et.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',Et}(Nn),mn=function(){function Kt(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Kt.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Kt.prototype.addUndoStep=function(Et){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Et)||(this.undoStack.push(Et),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Et)&&this.redoStack.splice(0,this.redoStack.length))},Kt.prototype.replaceLastUndoStep=function(Et){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Et)},Kt.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Kt.prototype.undo=function(){if(this.undoStack.length>1){var Et=this.undoStack.pop();return Et!==void 0&&this.redoStack.push(Et),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Kt.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Kt}(),Cn=function(Kt){function Et(Ft,Dt,Wt){var kt=Kt.call(this,Ft,Dt,Wt)||this;return kt.strokeColor="transparent",kt.strokeWidth=0,kt.strokeDasharray="",kt.curveX=0,kt.curveY=0,kt.manipulationStartCurveX=0,kt.manipulationStartCurveY=0,kt.setStrokeColor=kt.setStrokeColor.bind(kt),kt.setStrokeWidth=kt.setStrokeWidth.bind(kt),kt.setStrokeDasharray=kt.setStrokeDasharray.bind(kt),kt.positionGrips=kt.positionGrips.bind(kt),kt.addControlGrips=kt.addControlGrips.bind(kt),kt.adjustVisual=kt.adjustVisual.bind(kt),kt.setupControlBox=kt.setupControlBox.bind(kt),kt.resize=kt.resize.bind(kt),kt.strokeColor=Wt.defaultColor,kt.strokeWidth=Wt.defaultStrokeWidth,kt.strokeDasharray=Wt.defaultStrokeDasharray,kt.strokePanel=new nt("Line color",Wt.defaultColorSet,Wt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.strokeWidthPanel=new Vt("Line width",Wt.defaultStrokeWidths,Wt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Jt("Line style",Wt.defaultStrokeDasharrays,Wt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt}return Be(Et,Kt),Et.prototype.ownsTarget=function(Ft){return!(!Kt.prototype.ownsTarget.call(this,Ft)&&Ft!==this.visual&&Ft!==this.selectorCurve&&Ft!==this.visibleCurve&&!this.curveGrip.ownsTarget(Ft))},Et.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Et.prototype.createVisual=function(){this.visual=we.createGroup(),this.selectorCurve=we.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=we.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},Et.prototype.pointerDown=function(Ft,Dt){Kt.prototype.pointerDown.call(this,Ft,Dt),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Ft.x,this.curveY=Ft.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Dt)&&(this.activeGrip=this.curveGrip,this._state="resize")},Et.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),we.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),we.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),we.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Et.prototype.setupControlBox=function(){Kt.prototype.setupControlBox.call(this),this.curveControlLine1=we.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=we.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},Et.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Kt.prototype.addControlGrips.call(this)},Et.prototype.positionGrips=function(){Kt.prototype.positionGrips.call(this);var Ft=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Ft/2,this.curveY-Ft/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},Et.prototype.manipulate=function(Ft){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Ft.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Ft.y-this.manipulationStartY),Kt.prototype.manipulate.call(this,Ft)},Et.prototype.resize=function(Ft){this.activeGrip===this.curveGrip&&(this.curveX=Ft.x,this.curveY=Ft.y),Kt.prototype.resize.call(this,Ft),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},Et.prototype.setStrokeColor=function(Ft){this.strokeColor=Ft,this.adjustVisual(),this.colorChanged(Ft)},Et.prototype.setStrokeWidth=function(Ft){this.strokeWidth=Ft,this.adjustVisual()},Et.prototype.setStrokeDasharray=function(Ft){this.strokeDasharray=Ft,this.adjustVisual()},Et.prototype.scale=function(Ft,Dt){this.curveX=this.curveX*Ft,this.curveY=this.curveY*Dt,Kt.prototype.scale.call(this,Ft,Dt)},Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var Ft=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Kt.prototype.getState.call(this));return Ft.typeName=Et.typeName,Ft},Et.prototype.restoreState=function(Ft){Kt.prototype.restoreState.call(this,Ft);var Dt=Ft;this.strokeColor=Dt.strokeColor,this.strokeWidth=Dt.strokeWidth,this.strokeDasharray=Dt.strokeDasharray,this.curveX=Dt.curveX,this.curveY=Dt.curveY,this.createVisual(),this.adjustVisual()},Et.typeName="CurveMarker",Et.title="Curve marker",Et.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',Et}(le),Jn=function(Kt){function Et(Ft,Dt,Wt){var kt=Kt.call(this,Ft,Dt,Wt)||this;return kt.fillColor="transparent",kt.strokeColor="transparent",kt.strokeWidth=0,kt.strokeDasharray="",kt.textColor="transparent",kt.fontSize="1rem",kt.isMoved=!1,kt.captionText="Caption",kt.PADDING=5,kt.captionBoxWidth=0,kt.captionBoxHeight=0,kt.strokeColor=Wt.defaultColor,kt.strokeWidth=Wt.defaultStrokeWidth,kt.strokeDasharray=Wt.defaultStrokeDasharray,kt.fillColor=Wt.defaultFillColor,kt.textColor=Wt.defaultStrokeColor,kt.fontFamily=Wt.defaultFontFamily,kt.fontSize=Wt.defaultCaptionFontSize,kt.captionText=Wt.defaultCaptionText,kt.setStrokeColor=kt.setStrokeColor.bind(kt),kt.setFillColor=kt.setFillColor.bind(kt),kt.setStrokeWidth=kt.setStrokeWidth.bind(kt),kt.setStrokeDasharray=kt.setStrokeDasharray.bind(kt),kt.createVisual=kt.createVisual.bind(kt),kt.sizeCaption=kt.sizeCaption.bind(kt),kt.setCaptionText=kt.setCaptionText.bind(kt),kt.showTextEditor=kt.showTextEditor.bind(kt),kt.positionTextEditor=kt.positionTextEditor.bind(kt),kt.finishTextEditing=kt.finishTextEditing.bind(kt),kt.setFont=kt.setFont.bind(kt),kt.setTextColor=kt.setTextColor.bind(kt),kt.strokePanel=new nt("Line color",be(Wt.defaultColorSet,["transparent"]),kt.strokeColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.fillPanel=new nt("Fill color",be(Wt.defaultColorSet,["transparent"]),kt.fillColor,Ht),kt.fillPanel.onColorChanged=kt.setFillColor,kt.strokeWidthPanel=new Vt("Line width",Wt.defaultStrokeWidths,Wt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Jt("Line style",Wt.defaultStrokeDasharrays,Wt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt.fontFamilyPanel=new me("Font",Wt.defaultFontFamilies,Wt.defaultFontFamily),kt.fontFamilyPanel.onFontChanged=kt.setFont,kt.textColorPanel=new nt("Text color",Wt.defaultColorSet,kt.textColor,qt),kt.textColorPanel.onColorChanged=kt.setTextColor,kt}return Be(Et,Kt),Et.prototype.ownsTarget=function(Ft){return!(!Kt.prototype.ownsTarget.call(this,Ft)&&Ft!==this.visual&&Ft!==this.frame&&Ft!==this.captionBg&&Ft!==this.captionElement)},Et.prototype.createVisual=function(){this.visual=we.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=we.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=we.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=we.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},Et.prototype.setCaptionText=function(Ft){this.captionText=Ft,this.captionElement.textContent=this.captionText,this.sizeCaption()},Et.prototype.pointerDown=function(Ft,Dt){Kt.prototype.pointerDown.call(this,Ft,Dt),this.isMoved=!1,this.pointerDownPoint=Ft,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Ft),this._state="creating")},Et.prototype.manipulate=function(Ft){Kt.prototype.manipulate.call(this,Ft),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Ft.x-this.pointerDownPoint.x)>5||Math.abs(Ft.y-this.pointerDownPoint.y)>5)},Et.prototype.resize=function(Ft){Kt.prototype.resize.call(this,Ft),this.setSize()},Et.prototype.sizeCaption=function(){var Ft=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Ft.width+2*this.PADDING,this.captionBoxHeight=Ft.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),we.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),we.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},Et.prototype.showTextEditor=function(){var Ft=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function(Dt){Dt.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Dt){Dt.key==="Enter"&&Ft.finishTextEditing(Ft.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Dt){Dt.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Ft.finishTextEditing(Ft.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Ft.finishTextEditing(Ft.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},Et.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},Et.prototype.finishTextEditing=function(Ft){this.setCaptionText(Ft.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Et.prototype.setFont=function(Ft){this.captionElement&&we.setAttributes(this.captionElement,[["font-family",Ft]]),this.fontFamily=Ft,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Et.prototype.setTextColor=function(Ft){this.captionElement&&we.setAttributes(this.captionElement,[["fill",Ft]]),this.textColor=Ft,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Et.prototype.setSize=function(){Kt.prototype.setSize.call(this),we.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Et.prototype.pointerUp=function(Ft){Kt.prototype.pointerUp.call(this,Ft),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Et.prototype.dblClick=function(Ft,Dt){Kt.prototype.dblClick.call(this,Ft,Dt),this.showTextEditor()},Et.prototype.setStrokeColor=function(Ft){this.strokeColor=Ft,this.frame&&we.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Ft),this.stateChanged()},Et.prototype.setFillColor=function(Ft){this.fillColor=Ft,this.captionBg&&we.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Ft),this.stateChanged()},Et.prototype.setStrokeWidth=function(Ft){this.strokeWidth=Ft,this.frame&&we.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Et.prototype.setStrokeDasharray=function(Ft){this.strokeDasharray=Ft,this.frame&&we.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var Ft=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},Kt.prototype.getState.call(this));return Ft.typeName=this.typeName,Ft},Et.prototype.restoreState=function(Ft){var Dt=Ft;this.fillColor=Dt.fillColor,this.strokeColor=Dt.strokeColor,this.strokeWidth=Dt.strokeWidth,this.strokeDasharray=Dt.strokeDasharray,this.textColor=Dt.textColor,this.fontFamily=Dt.fontFamily,this.captionText=Dt.captionText,this.fontSize=Dt.fontSize,this.createVisual(),Kt.prototype.restoreState.call(this,Ft),this.setSize()},Et.prototype.scale=function(Ft,Dt){Kt.prototype.scale.call(this,Ft,Dt),this.setSize()},Et.typeName="CaptionFrameMarker",Et.title="Caption frame marker",Et.icon='<svg viewBox="0 0 24 24"><path d="M5 3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2H5m0 2h14v14H5V5m2 2v2h10V7H7z"/></svg>',Et}(Lt),bn=function(){function Kt(Et,Ft){Ft===void 0&&(Ft=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Et,this.cancelable=Ft}return Object.defineProperty(Kt.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Kt.prototype.preventDefault=function(){this._defaultPrevented=!0},Kt}(),ve=function(Kt){function Et(Ft,Dt,Wt){var kt=Kt.call(this,Ft,!1)||this;return kt.dataUrl=Dt,kt.state=Wt,kt}return Be(Et,Kt),Et}(bn),Le=function(Kt){function Et(Ft,Dt,Wt){Wt===void 0&&(Wt=!1);var kt=Kt.call(this,Ft,Wt)||this;return kt.marker=Dt,kt}return Be(Et,Kt),Et}(bn),Sn=function(){function Kt(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return Kt.prototype.addEventListener=function(Et,Ft){this[Et].push(Ft)},Kt.prototype.removeEventListener=function(Et,Ft){var Dt=this[Et].indexOf(Ft);Dt>-1&&this[Et].splice(Dt,1)},Kt}(),xn=function(){function Kt(Et){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new he,this._isOpen=!1,this.undoRedoManager=new mn,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Sn,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Kt.instanceCounter++,this.styles=new Qe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Et,this.targetRoot=document.body,this.width=Et.clientWidth,this.height=Et.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(Kt.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ae,fn,ui,Je,He,Nn,fr,je,Kn,hi,We,Cn,Jn]},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ae,fn,ui,Je,Nn,fr,je]},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ae,fn,ui,Je,fr]},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Et){var Ft=this;this._availableMarkerTypes.splice(0),Et.forEach(function(Dt){if(typeof Dt=="string"){var Wt=Ft.ALL_MARKER_TYPES.find(function(kt){return kt.typeName===Dt});Wt!==void 0&&Ft._availableMarkerTypes.push(Wt)}else Ft._availableMarkerTypes.push(Dt)})},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(Et){this._zoomLevel=Et,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Kt.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ne.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Kt.prototype.show=function(){var Et=this;this.styles.styleSheetRoot===void 0&&fe.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=fe.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Ft){return Ft(new bn(Et))})},Kt.prototype.render=function(){return Ne(this,void 0,void 0,function(){var Et;return ln(this,function(Ft){switch(Ft.label){case 0:return this.setCurrentMarker(),(Et=new De).naturalSize=this.renderAtNaturalSize,Et.imageType=this.renderImageType,Et.imageQuality=this.renderImageQuality,Et.markersOnly=this.renderMarkersOnly,Et.width=this.renderWidth,Et.height=this.renderHeight,[4,Et.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Ft.sent(),[4,Et.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Ft.sent()]}})})},Kt.prototype.close=function(Et){var Ft=this;if(Et===void 0&&(Et=!1),this.isOpen){var Dt=!1;Et||this.eventListeners.beforeclose.forEach(function(Wt){var kt=new bn(Ft,!0);Wt(kt),kt.defaultPrevented&&(Dt=!0)}),Dt||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(Wt){return Wt(new bn(Ft))}),this.detachEvents(),this._isOpen=!1)}},Kt.prototype.addMarkersToToolbar=function(){for(var Et,Ft=[],Dt=0;Dt<arguments.length;Dt++)Ft[Dt]=arguments[Dt];(Et=this._availableMarkerTypes).push.apply(Et,Ft)},Kt.prototype.addRenderEventListener=function(Et){this.addEventListener("render",function(Ft){Et(Ft.dataUrl,Ft.state)})},Kt.prototype.removeRenderEventListener=function(Et){},Kt.prototype.addCloseEventListener=function(Et){this.addEventListener("close",function(){Et()})},Kt.prototype.removeCloseEventListener=function(Et){},Kt.prototype.setupResizeObserver=function(){var Et=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){Et.resize(Et.target.clientWidth,Et.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return Et.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Kt.prototype.onPopupTargetResize=function(){var Et=1*this.target.clientWidth/this.target.clientHeight,Ft=this.editorCanvas.clientWidth/Et>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Et:this.editorCanvas.clientWidth,Dt=Ft<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/Et;this.resize(Ft,Dt)},Kt.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Kt.prototype.resize=function(Et,Ft){this._isResizing=!0;var Dt=Et/this.imageWidth,Wt=Ft/this.imageHeight;this.imageWidth=Math.round(Et),this.imageHeight=Math.round(Ft),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(Dt,Wt),this._isResizing=!1},Kt.prototype.scaleMarkers=function(Et,Ft){var Dt,Wt=this;this._currentMarker&&this._currentMarker instanceof Je?this._currentMarker.scale(Et,Ft):(Dt=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(kt){kt!==Wt._currentMarker&&kt.scale(Et,Ft)}),Dt!==void 0&&this.setCurrentMarker(Dt)},Kt.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},Kt.prototype.setTopLeft=function(){var Et=this.editingTarget.getBoundingClientRect(),Ft=this.editorCanvas.getBoundingClientRect();this.left=Et.left-Ft.left,this.top=Et.top-Ft.top},Kt.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},Kt.prototype.addDefs=function(){for(var Et,Ft=[],Dt=0;Dt<arguments.length;Dt++)Ft[Dt]=arguments[Dt];this.defs=we.createDefs(),this.addDefsToImage(),(Et=this.defs).append.apply(Et,Ft)},Kt.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Kt.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},Kt.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Kt.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Kt.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},Kt.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Kt.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},Kt.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var Et=document.createElement("a");Et.href="https://markerjs.com/",Et.target="_blank",Et.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',Et.title="Powered by marker.js",Et.style.display="grid",Et.style.alignItems="center",Et.style.justifyItems="center",Et.style.padding="3px",Et.style.width="20px",Et.style.height="20px",this.logoUI.appendChild(Et),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Kt.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},Kt.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},Kt.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Kt.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var Et=this.settings.uiOffsetTop!==void 0?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Et+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new kn(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.settings.uiOffsetTop===void 0&&this.target.offsetTop<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new Ut(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Kt.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Kt.prototype.removeMarker=function(Et){this.markerImage.removeChild(Et.container),this.markers.indexOf(Et)>-1&&this.markers.splice(this.markers.indexOf(Et),1),Et.dispose()},Kt.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},Kt.prototype.toolbarButtonClicked=function(Et,Ft){if(Et==="marker"&&Ft!==void 0)this.createNewMarker(Ft);else if(Et==="action")switch(Ft){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},Kt.prototype.deleteSelectedMarker=function(){var Et=this;if(this._currentMarker!==void 0){var Ft=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Wt){var kt=new Le(Et,Et._currentMarker,!0);Wt(kt),kt.defaultPrevented&&(Ft=!0)}),!Ft){var Dt=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(Wt){return Wt(new Le(Et,Dt))})}}},Kt.prototype.clear=function(){var Et=this,Ft=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ue){var Tn=new Le(Et,void 0,!0);Ue(Tn),Tn.defaultPrevented&&(Ft=!0)}),!Ft)){this.setCurrentMarker();for(var Dt=function(Ue){var Tn=Wt.markers[Ue];Wt.setCurrentMarker(Wt.markers[Ue]),Wt._currentMarker.dispose(),Wt.markerImage.removeChild(Wt._currentMarker.container),Wt.markers.splice(Wt.markers.indexOf(Wt._currentMarker),1),Wt.eventListeners.markerdelete.forEach(function(Ei){return Ei(new Le(Et,Tn))})},Wt=this,kt=this.markers.length-1;kt>=0;kt--)Dt(kt);this.addUndoStep()}},Object.defineProperty(Kt.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Kt.prototype.showNotesEditor=function(){var Et;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(Et=this._currentMarker.notes)!==null&&Et!==void 0?Et:"",this.overlayContainer.appendChild(this.notesArea))},Kt.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},Kt.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Kt.prototype.addUndoStep=function(){var Et=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Ft=this.getState(),Dt=this.undoRedoManager.getLastUndoStep();if(!Dt||Dt.width===Ft.width&&Dt.height===Ft.height){var Wt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Ft),Wt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(kt){return kt(new bn(Et))})}else this.undoRedoManager.replaceLastUndoStep(Ft),this.eventListeners.statechange.forEach(function(kt){return kt(new bn(Et))})}},Kt.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Kt.prototype.undoStep=function(){var Et=this,Ft=this.undoRedoManager.undo();Ft!==void 0&&(this.restoreState(Ft),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Dt){return Dt(new bn(Et))}))},Kt.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Kt.prototype.redoStep=function(){var Et=this,Ft=this.undoRedoManager.redo();Ft!==void 0&&(this.restoreState(Ft),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Dt){return Dt(new bn(Et))}))},Kt.prototype.stepZoom=function(){var Et=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=Et<this.zoomSteps.length-1?this.zoomSteps[Et+1]:this.zoomSteps[0]},Kt.prototype.panTo=function(Et){this.contentDiv.scrollBy({left:this.prevPanPoint.x-Et.x,top:this.prevPanPoint.y-Et.y}),this.prevPanPoint=Et},Kt.prototype.startRenderAndClose=function(){return Ne(this,void 0,void 0,function(){var Et,Ft,Dt=this;return ln(this,function(Wt){switch(Wt.label){case 0:return[4,this.render()];case 1:return Et=Wt.sent(),Ft=this.getState(),this.eventListeners.render.forEach(function(kt){return kt(new ve(Dt,Et,Ft))}),this.close(!0),[2]}})})},Kt.prototype.getState=function(Et){Et===!0&&this.setCurrentMarker();var Ft={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Dt){return Ft.markers.push(Dt.getState())}),Ft},Kt.prototype.restoreState=function(Et){var Ft=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);Et.markers.forEach(function(Dt){var Wt=Ft._availableMarkerTypes.find(function(Ue){return Ue.typeName===Dt.typeName});if(Wt!==void 0){var kt=Ft.addNewMarker(Wt);kt.restoreState(Dt),Ft.markers.push(kt)}}),Et.width&&Et.height&&(Et.width!==this.imageWidth||Et.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/Et.width,this.imageHeight/Et.height),this.eventListeners.restorestate.forEach(function(Dt){return Dt(new bn(Ft))})},Kt.prototype.addNewMarker=function(Et){var Ft=we.createGroup();return this.markerImage.appendChild(Ft),new Et(Ft,this.overlayContainer,this.settings)},Kt.prototype.createNewMarker=function(Et){var Ft,Dt=this;(Ft=typeof Et=="string"?this._availableMarkerTypes.find(function(Wt){return Wt.typeName===Et}):Et)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Ft),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(Ft.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Wt){return Wt(new Le(Dt,Dt._currentMarker))}))},Kt.prototype.markerCreated=function(Et){var Ft=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(Et),this.setCurrentMarker(Et),Et instanceof fn&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(fn):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Dt){return Dt(new Le(Ft,Ft._currentMarker))})},Kt.prototype.colorChanged=function(Et){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=Et,this.settings.defaultStrokeColor=Et)},Kt.prototype.fillColorChanged=function(Et){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=Et)},Kt.prototype.markerStateChanged=function(Et){var Ft=this;this.eventListeners.markerchange.forEach(function(Dt){return Dt(new Le(Ft,Et))})},Kt.prototype.setCurrentMarker=function(Et){var Ft=this;this._currentMarker!==Et&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Dt){return Dt(new Le(Ft,Ft._currentMarker))})),this._currentMarker=Et,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(Dt){return Dt(new Le(Ft,Ft._currentMarker))}))},Kt.prototype.onPointerDown=function(Et){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||Et.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Ft=this.markers.find(function(Dt){return Dt.ownsTarget(Et.target)});Ft!==void 0?(this.setCurrentMarker(Ft),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Et.clientX,Et.clientY),Et.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:Et.clientX,y:Et.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Et.clientX,Et.clientY))},Kt.prototype.onDblClick=function(Et){if(this._isFocused||this.focus(),this.mode==="select"){var Ft=this.markers.find(function(Dt){return Dt.ownsTarget(Et.target)});Ft!==void 0&&Ft!==this._currentMarker&&this.setCurrentMarker(Ft),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(Et.clientX,Et.clientY),Et.target):this.setCurrentMarker()}},Kt.prototype.onPointerMove=function(Et){this.touchPoints!==1&&Et.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||Et.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(Et.clientX,Et.clientY)):this.zoomLevel>1&&this.panTo({x:Et.clientX,y:Et.clientY}))},Kt.prototype.onPointerUp=function(Et){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Et.clientX,Et.clientY)),this.isDragging=!1,this.addUndoStep()},Kt.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Kt.prototype.onKeyUp=function(Et){this._currentMarker===void 0||this.notesArea!==void 0||Et.key!=="Delete"&&Et.key!=="Backspace"||this.deleteSelectedMarker()},Kt.prototype.clientToLocalCoordinates=function(Et,Ft){var Dt=this.markerImage.getBoundingClientRect();return{x:(Et-Dt.left)/this.zoomLevel,y:(Ft-Dt.top)/this.zoomLevel}},Kt.prototype.onWindowResize=function(){this.positionUI()},Kt.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var Et=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Et+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},Kt.prototype.addLicenseKey=function(Et){ne.addKey(Et)},Kt.prototype.addEventListener=function(Et,Ft){this.eventListeners.addEventListener(Et,Ft)},Kt.prototype.removeEventListener=function(Et,Ft){this.eventListeners.removeEventListener(Et,Ft)},Kt.prototype.renderState=function(Et){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Et),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Kt.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Kt.prototype.focus=function(){var Et=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Ft){return Ft(new bn(Et))}))},Kt.prototype.blur=function(){var Et=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Ft){return Ft(new bn(Et))}))},Kt.instanceCounter=0,Kt}()},71032:function(yn,qn,ee){"use strict";ee.d(qn,{Z:function(){return yt}});var Tt=ee(87462),Be=ee(4942),Ne=ee(97685),ln=ee(45987),be=ee(94184),we=ee.n(be),ne=ee(21770),De=ee(15105),fe=ee(64217),Qe=ee(67294);function gn(Lt,Nt){var Vt=Lt.disabled,Jt=Lt.prefixCls,Ae=Lt.character,he=Lt.characterRender,le=Lt.index,We=Lt.count,me=Lt.value,Je=Lt.allowHalf,fn=Lt.focused,sn=Lt.onHover,ui=Lt.onClick,hi=function(He){sn(He,le)},Si=function(He){ui(He,le)},fr=function(He){He.keyCode===De.Z.ENTER&&ui(He,le)},qt=le+1,Ht=new Set([Jt]);me===0&&le===0&&fn?Ht.add("".concat(Jt,"-focused")):Je&&me+.5>=qt&&me<qt?(Ht.add("".concat(Jt,"-half")),Ht.add("".concat(Jt,"-active")),fn&&Ht.add("".concat(Jt,"-focused"))):(qt<=me?Ht.add("".concat(Jt,"-full")):Ht.add("".concat(Jt,"-zero")),qt===me&&fn&&Ht.add("".concat(Jt,"-focused")));var je=typeof Ae=="function"?Ae(Lt):Ae,Nn=Qe.createElement("li",{className:we()(Array.from(Ht)),ref:Nt},Qe.createElement("div",{onClick:Vt?null:Si,onKeyDown:Vt?null:fr,onMouseMove:Vt?null:hi,role:"radio","aria-checked":me>le?"true":"false","aria-posinset":le+1,"aria-setsize":We,tabIndex:Vt?-1:0},Qe.createElement("div",{className:"".concat(Jt,"-first")},je),Qe.createElement("div",{className:"".concat(Jt,"-second")},je)));return he&&(Nn=he(Nn,Lt)),Nn}var Xe=Qe.forwardRef(gn);function kn(){var Lt=Qe.useRef({});function Nt(Jt){return Lt.current[Jt]}function Vt(Jt){return function(Ae){Lt.current[Jt]=Ae}}return[Nt,Vt]}function Ut(Lt){var Nt=Lt.pageXOffset,Vt="scrollLeft";if(typeof Nt!="number"){var Jt=Lt.document;Nt=Jt.documentElement[Vt],typeof Nt!="number"&&(Nt=Jt.body[Vt])}return Nt}function et(Lt){var Nt,Vt,Jt=Lt.ownerDocument,Ae=Jt.body,he=Jt&&Jt.documentElement,le=Lt.getBoundingClientRect();return Nt=le.left,Vt=le.top,Nt-=he.clientLeft||Ae.clientLeft||0,Vt-=he.clientTop||Ae.clientTop||0,{left:Nt,top:Vt}}function nt(Lt){var Nt=et(Lt),Vt=Lt.ownerDocument,Jt=Vt.defaultView||Vt.parentWindow;return Nt.left+=Ut(Jt),Nt.left}var gt=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","keyboard","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function lt(Lt,Nt){var Vt=Lt.prefixCls,Jt=Vt===void 0?"rc-rate":Vt,Ae=Lt.className,he=Lt.defaultValue,le=Lt.value,We=Lt.count,me=We===void 0?5:We,Je=Lt.allowHalf,fn=Je===void 0?!1:Je,sn=Lt.allowClear,ui=sn===void 0?!0:sn,hi=Lt.keyboard,Si=hi===void 0?!0:hi,fr=Lt.character,qt=fr===void 0?"\u2605":fr,Ht=Lt.characterRender,je=Lt.disabled,Nn=Lt.direction,Kn=Nn===void 0?"ltr":Nn,He=Lt.tabIndex,mn=He===void 0?0:He,Cn=Lt.autoFocus,Jn=Lt.onHoverChange,bn=Lt.onChange,ve=Lt.onFocus,Le=Lt.onBlur,Sn=Lt.onKeyDown,xn=Lt.onMouseLeave,Kt=(0,ln.Z)(Lt,gt),Et=kn(),Ft=(0,Ne.Z)(Et,2),Dt=Ft[0],Wt=Ft[1],kt=Qe.useRef(null),Ue=function(){if(!je){var er;(er=kt.current)===null||er===void 0||er.focus()}};Qe.useImperativeHandle(Nt,function(){return{focus:Ue,blur:function(){if(!je){var er;(er=kt.current)===null||er===void 0||er.blur()}}}});var Tn=(0,ne.Z)(he||0,{value:le}),Ei=(0,Ne.Z)(Tn,2),Xn=Ei[0],si=Ei[1],Qi=(0,ne.Z)(null),Ln=(0,Ne.Z)(Qi,2),Ci=Ln[0],gi=Ln[1],qi=function(er,en){var Bt=Kn==="rtl",Qn=er+1;if(fn){var Dn=Dt(er),cn=nt(Dn),un=Dn.clientWidth;(Bt&&en-cn>un/2||!Bt&&en-cn<un/2)&&(Qn-=.5)}return Qn},fi=function(er){si(er),bn==null||bn(er)},Pr=Qe.useState(!1),kr=(0,Ne.Z)(Pr,2),yr=kr[0],or=kr[1],Es=function(){or(!0),ve==null||ve()},Wr=function(){or(!1),Le==null||Le()},Wo=Qe.useState(null),Fo=(0,Ne.Z)(Wo,2),$r=Fo[0],ur=Fo[1],So=function(er,en){var Bt=qi(en,er.pageX);Bt!==Ci&&(ur(Bt),gi(null)),Jn==null||Jn(Bt)},Er=function(er){je||(ur(null),gi(null),Jn==null||Jn(void 0)),er&&(xn==null||xn(er))},bo=function(er,en){var Bt=qi(en,er.pageX),Qn=!1;ui&&(Qn=Bt===Xn),Er(),fi(Qn?0:Bt),gi(Qn?Bt:null)},Ss=function(er){var en=er.keyCode,Bt=Kn==="rtl",Qn=fn?.5:1;Si&&(en===De.Z.RIGHT&&Xn<me&&!Bt?(fi(Xn+Qn),er.preventDefault()):en===De.Z.LEFT&&Xn>0&&!Bt||en===De.Z.RIGHT&&Xn>0&&Bt?(fi(Xn-Qn),er.preventDefault()):en===De.Z.LEFT&&Xn<me&&Bt&&(fi(Xn+Qn),er.preventDefault())),Sn==null||Sn(er)};Qe.useEffect(function(){Cn&&!je&&Ue()},[]);var Ms=new Array(me).fill(0).map(function(xo,er){return Qe.createElement(Xe,{ref:Wt(er),index:er,count:me,disabled:je,prefixCls:"".concat(Jt,"-star"),allowHalf:fn,value:$r===null?Xn:$r,onClick:bo,onHover:So,key:xo||er,character:qt,characterRender:Ht,focused:yr})}),$s=we()(Jt,Ae,(0,Be.Z)((0,Be.Z)({},"".concat(Jt,"-disabled"),je),"".concat(Jt,"-rtl"),Kn==="rtl"));return Qe.createElement("ul",(0,Tt.Z)({className:$s,onMouseLeave:Er,tabIndex:je?-1:mn,onFocus:je?null:Es,onBlur:je?null:Wr,onKeyDown:je?null:Ss,ref:kt},(0,fe.Z)(Kt,{aria:!0,data:!0,attr:!0})),Ms)}var ct=Qe.forwardRef(lt),yt=ct},58212:function(yn,qn,ee){"use strict";ee.d(qn,{Z:function(){return fr}});function Tt(){return Tt=Object.assign?Object.assign.bind():function(qt){for(var Ht=1;Ht<arguments.length;Ht++){var je=arguments[Ht];for(var Nn in je)Object.prototype.hasOwnProperty.call(je,Nn)&&(qt[Nn]=je[Nn])}return qt},Tt.apply(this,arguments)}function Be(qt){"@babel/helpers - typeof";return Be=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ht){return typeof Ht}:function(Ht){return Ht&&typeof Symbol=="function"&&Ht.constructor===Symbol&&Ht!==Symbol.prototype?"symbol":typeof Ht},Be(qt)}function Ne(qt,Ht){if(Be(qt)!=="object"||qt===null)return qt;var je=qt[Symbol.toPrimitive];if(je!==void 0){var Nn=je.call(qt,Ht||"default");if(Be(Nn)!=="object")return Nn;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Ht==="string"?String:Number)(qt)}function ln(qt){var Ht=Ne(qt,"string");return Be(Ht)==="symbol"?Ht:String(Ht)}function be(qt,Ht,je){return Ht=ln(Ht),Ht in qt?Object.defineProperty(qt,Ht,{value:je,enumerable:!0,configurable:!0,writable:!0}):qt[Ht]=je,qt}function we(qt){if(Array.isArray(qt))return qt}function ne(qt,Ht){var je=qt==null?null:typeof Symbol!="undefined"&&qt[Symbol.iterator]||qt["@@iterator"];if(je!=null){var Nn,Kn,He,mn,Cn=[],Jn=!0,bn=!1;try{if(He=(je=je.call(qt)).next,Ht===0){if(Object(je)!==je)return;Jn=!1}else for(;!(Jn=(Nn=He.call(je)).done)&&(Cn.push(Nn.value),Cn.length!==Ht);Jn=!0);}catch(ve){bn=!0,Kn=ve}finally{try{if(!Jn&&je.return!=null&&(mn=je.return(),Object(mn)!==mn))return}finally{if(bn)throw Kn}}return Cn}}function De(qt,Ht){(Ht==null||Ht>qt.length)&&(Ht=qt.length);for(var je=0,Nn=new Array(Ht);je<Ht;je++)Nn[je]=qt[je];return Nn}function fe(qt,Ht){if(qt){if(typeof qt=="string")return De(qt,Ht);var je=Object.prototype.toString.call(qt).slice(8,-1);if(je==="Object"&&qt.constructor&&(je=qt.constructor.name),je==="Map"||je==="Set")return Array.from(qt);if(je==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(je))return De(qt,Ht)}}function Qe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gn(qt,Ht){return we(qt)||ne(qt,Ht)||fe(qt,Ht)||Qe()}function Xe(qt,Ht){if(qt==null)return{};var je={},Nn=Object.keys(qt),Kn,He;for(He=0;He<Nn.length;He++)Kn=Nn[He],!(Ht.indexOf(Kn)>=0)&&(je[Kn]=qt[Kn]);return je}function kn(qt,Ht){if(qt==null)return{};var je=Xe(qt,Ht),Nn,Kn;if(Object.getOwnPropertySymbols){var He=Object.getOwnPropertySymbols(qt);for(Kn=0;Kn<He.length;Kn++)Nn=He[Kn],!(Ht.indexOf(Nn)>=0)&&Object.prototype.propertyIsEnumerable.call(qt,Nn)&&(je[Nn]=qt[Nn])}return je}var Ut=ee(67294),et=ee(94184),nt=ee.n(et);function gt(qt){if(Array.isArray(qt))return qt}function lt(qt,Ht){var je=qt==null?null:typeof Symbol!="undefined"&&qt[Symbol.iterator]||qt["@@iterator"];if(je!=null){var Nn,Kn,He,mn,Cn=[],Jn=!0,bn=!1;try{if(He=(je=je.call(qt)).next,Ht===0){if(Object(je)!==je)return;Jn=!1}else for(;!(Jn=(Nn=He.call(je)).done)&&(Cn.push(Nn.value),Cn.length!==Ht);Jn=!0);}catch(ve){bn=!0,Kn=ve}finally{try{if(!Jn&&je.return!=null&&(mn=je.return(),Object(mn)!==mn))return}finally{if(bn)throw Kn}}return Cn}}function ct(qt,Ht){(Ht==null||Ht>qt.length)&&(Ht=qt.length);for(var je=0,Nn=new Array(Ht);je<Ht;je++)Nn[je]=qt[je];return Nn}function yt(qt,Ht){if(qt){if(typeof qt=="string")return ct(qt,Ht);var je=Object.prototype.toString.call(qt).slice(8,-1);if(je==="Object"&&qt.constructor&&(je=qt.constructor.name),je==="Map"||je==="Set")return Array.from(qt);if(je==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(je))return ct(qt,Ht)}}function Lt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nt(qt,Ht){return gt(qt)||lt(qt,Ht)||yt(qt,Ht)||Lt()}function Vt(qt){var Ht=Ut.useRef();Ht.current=qt;var je=Ut.useCallback(function(){for(var Nn,Kn=arguments.length,He=new Array(Kn),mn=0;mn<Kn;mn++)He[mn]=arguments[mn];return(Nn=Ht.current)===null||Nn===void 0?void 0:Nn.call.apply(Nn,[Ht].concat(He))},[]);return je}function Jt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Ae=Jt()?Ut.useLayoutEffect:Ut.useEffect,he=function(Ht,je){var Nn=Ut.useRef(!0);Ae(function(){return Ht(Nn.current)},je),Ae(function(){return Nn.current=!1,function(){Nn.current=!0}},[])},le=function(Ht,je){he(function(Nn){if(!Nn)return Ht()},je)},We=null;function me(qt){var Ht=Ut.useRef(!1),je=Ut.useState(qt),Nn=Nt(je,2),Kn=Nn[0],He=Nn[1];Ut.useEffect(function(){return Ht.current=!1,function(){Ht.current=!0}},[]);function mn(Cn,Jn){Jn&&Ht.current||He(Cn)}return[Kn,mn]}function Je(qt){return qt!==void 0}function fn(qt,Ht){var je=Ht||{},Nn=je.defaultValue,Kn=je.value,He=je.onChange,mn=je.postState,Cn=me(function(){return Je(Kn)?Kn:Je(Nn)?typeof Nn=="function"?Nn():Nn:typeof qt=="function"?qt():qt}),Jn=Nt(Cn,2),bn=Jn[0],ve=Jn[1],Le=Kn!==void 0?Kn:bn,Sn=mn?mn(Le):Le,xn=Vt(He),Kt=me([Le]),Et=Nt(Kt,2),Ft=Et[0],Dt=Et[1];le(function(){var kt=Ft[0];bn!==kt&&xn(bn,kt)},[Ft]),le(function(){Je(Kn)||ve(Kn)},[Kn]);var Wt=Vt(function(kt,Ue){ve(kt,Ue),Dt([Le],Ue)});return[Sn,Wt]}var sn={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(Ht){var je=Ht.keyCode;if(Ht.altKey&&!Ht.ctrlKey||Ht.metaKey||je>=sn.F1&&je<=sn.F12)return!1;switch(je){case sn.ALT:case sn.CAPS_LOCK:case sn.CONTEXT_MENU:case sn.CTRL:case sn.DOWN:case sn.END:case sn.ESC:case sn.HOME:case sn.INSERT:case sn.LEFT:case sn.MAC_FF_META:case sn.META:case sn.NUMLOCK:case sn.NUM_CENTER:case sn.PAGE_DOWN:case sn.PAGE_UP:case sn.PAUSE:case sn.PRINT_SCREEN:case sn.RIGHT:case sn.SHIFT:case sn.UP:case sn.WIN_KEY:case sn.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Ht){if(Ht>=sn.ZERO&&Ht<=sn.NINE||Ht>=sn.NUM_ZERO&&Ht<=sn.NUM_MULTIPLY||Ht>=sn.A&&Ht<=sn.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Ht===0)return!0;switch(Ht){case sn.SPACE:case sn.QUESTION_MARK:case sn.NUM_PLUS:case sn.NUM_MINUS:case sn.NUM_PERIOD:case sn.NUM_DIVISION:case sn.SEMICOLON:case sn.DASH:case sn.EQUALS:case sn.COMMA:case sn.PERIOD:case sn.SLASH:case sn.APOSTROPHE:case sn.SINGLE_QUOTE:case sn.OPEN_SQUARE_BRACKET:case sn.BACKSLASH:case sn.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},ui=sn,hi=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Si=Ut.forwardRef(function(qt,Ht){var je,Nn=qt.prefixCls,Kn=Nn===void 0?"rc-switch":Nn,He=qt.className,mn=qt.checked,Cn=qt.defaultChecked,Jn=qt.disabled,bn=qt.loadingIcon,ve=qt.checkedChildren,Le=qt.unCheckedChildren,Sn=qt.onClick,xn=qt.onChange,Kt=qt.onKeyDown,Et=kn(qt,hi),Ft=fn(!1,{value:mn,defaultValue:Cn}),Dt=gn(Ft,2),Wt=Dt[0],kt=Dt[1];function Ue(si,Qi){var Ln=Wt;return Jn||(Ln=si,kt(Ln),xn==null||xn(Ln,Qi)),Ln}function Tn(si){si.which===ui.LEFT?Ue(!1,si):si.which===ui.RIGHT&&Ue(!0,si),Kt==null||Kt(si)}function Ei(si){var Qi=Ue(!Wt,si);Sn==null||Sn(Qi,si)}var Xn=nt()(Kn,He,(je={},be(je,"".concat(Kn,"-checked"),Wt),be(je,"".concat(Kn,"-disabled"),Jn),je));return Ut.createElement("button",Tt({},Et,{type:"button",role:"switch","aria-checked":Wt,disabled:Jn,className:Xn,ref:Ht,onKeyDown:Tn,onClick:Ei}),bn,Ut.createElement("span",{className:"".concat(Kn,"-inner")},Ut.createElement("span",{className:"".concat(Kn,"-inner-checked")},ve),Ut.createElement("span",{className:"".concat(Kn,"-inner-unchecked")},Le)))});Si.displayName="Switch";var fr=Si},73299:function(yn,qn,ee){"use strict";ee.d(qn,{Z:function(){return er}});var Tt=ee(87462),Be=ee(1413),Ne=ee(71002),ln=ee(97685),be=ee(4942),we=ee(45987),ne=ee(67294),De=ee(73935),fe=ee(94184),Qe=ee.n(fe),gn=ee(48555),Xe=ne.forwardRef(function(en,Bt){var Qn=en.height,Dn=en.offsetY,cn=en.offsetX,un=en.children,wn=en.prefixCls,Hn=en.onInnerResize,di=en.innerProps,ke=en.rtl,Ee=en.extra,ue={},Ie={display:"flex",flexDirection:"column"};if(Dn!==void 0){var On;ue={height:Qn,position:"relative",overflow:"hidden"},Ie=(0,Be.Z)((0,Be.Z)({},Ie),{},(On={transform:"translateY(".concat(Dn,"px)")},(0,be.Z)(On,ke?"marginRight":"marginLeft",-cn),(0,be.Z)(On,"position","absolute"),(0,be.Z)(On,"left",0),(0,be.Z)(On,"right",0),(0,be.Z)(On,"top",0),On))}return ne.createElement("div",{style:ue},ne.createElement(gn.Z,{onResize:function(Zn){var Fe=Zn.offsetHeight;Fe&&Hn&&Hn()}},ne.createElement("div",(0,Tt.Z)({style:Ie,className:Qe()((0,be.Z)({},"".concat(wn,"-holder-inner"),wn)),ref:Bt},di),un,Ee)))});Xe.displayName="Filler";var kn=Xe,Ut=function(Bt){return+setTimeout(Bt,16)},et=function(Bt){return clearTimeout(Bt)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Ut=function(Bt){return window.requestAnimationFrame(Bt)},et=function(Bt){return window.cancelAnimationFrame(Bt)});var nt=0,gt=new Map;function lt(en){gt.delete(en)}var ct=function(Bt){var Qn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;nt+=1;var Dn=nt;function cn(un){if(un===0)lt(Dn),Bt();else{var wn=Ut(function(){cn(un-1)});gt.set(Dn,wn)}}return cn(Qn),Dn};ct.cancel=function(en){var Bt=gt.get(en);return lt(Bt),et(Bt)};var yt=ct;function Lt(en,Bt){var Qn="touches"in en?en.touches[0]:en;return Qn[Bt?"pageX":"pageY"]}var Nt=ne.forwardRef(function(en,Bt){var Qn,Dn=en.prefixCls,cn=en.rtl,un=en.scrollOffset,wn=en.scrollRange,Hn=en.onStartMove,di=en.onStopMove,ke=en.onScroll,Ee=en.horizontal,ue=en.spinSize,Ie=en.containerSize,On=en.style,zn=en.thumbStyle,Zn=ne.useState(!1),Fe=(0,ln.Z)(Zn,2),Se=Fe[0],Pn=Fe[1],ti=ne.useState(null),nn=(0,ln.Z)(ti,2),pe=nn[0],Un=nn[1],pi=ne.useState(null),Oi=(0,ln.Z)(pi,2),on=Oi[0],ni=Oi[1],ie=!cn,se=ne.useRef(),ye=ne.useRef(),Ce=ne.useState(!1),Oe=(0,ln.Z)(Ce,2),Ze=Oe[0],En=Oe[1],Wn=ne.useRef(),Te=function(){clearTimeout(Wn.current),En(!0),Wn.current=setTimeout(function(){En(!1)},3e3)},pn=wn-Ie||0,ri=Ie-ue||0,Ji=pn>0,zi=ne.useMemo(function(){if(un===0||pn===0)return 0;var Ni=un/pn;return Ni*ri},[un,pn,ri]),ce=function(Vi){Vi.stopPropagation(),Vi.preventDefault()},$n=ne.useRef({top:zi,dragging:Se,pageY:pe,startTop:on});$n.current={top:zi,dragging:Se,pageY:pe,startTop:on};var mi=function(Vi){Pn(!0),Un(Lt(Vi,Ee)),ni($n.current.top),Hn(),Vi.stopPropagation(),Vi.preventDefault()};ne.useEffect(function(){var Ni=function(Ye){Ye.preventDefault()},Vi=se.current,Ke=ye.current;return Vi.addEventListener("touchstart",Ni),Ke.addEventListener("touchstart",mi),function(){Vi.removeEventListener("touchstart",Ni),Ke.removeEventListener("touchstart",mi)}},[]);var Yn=ne.useRef();Yn.current=pn;var hr=ne.useRef();hr.current=ri,ne.useEffect(function(){if(Se){var Ni,Vi=function(Ye){var rr=$n.current,Ro=rr.dragging,gr=rr.pageY,lo=rr.startTop;if(yt.cancel(Ni),Ro){var pr=Lt(Ye,Ee)-gr,_i=lo;!ie&&Ee?_i-=pr:_i+=pr;var cr=Yn.current,qr=hr.current,Fr=qr?_i/qr:0,Rn=Math.ceil(Fr*cr);Rn=Math.max(Rn,0),Rn=Math.min(Rn,cr),Ni=yt(function(){ke(Rn,Ee)})}},Ke=function(){Pn(!1),di()};return window.addEventListener("mousemove",Vi),window.addEventListener("touchmove",Vi),window.addEventListener("mouseup",Ke),window.addEventListener("touchend",Ke),function(){window.removeEventListener("mousemove",Vi),window.removeEventListener("touchmove",Vi),window.removeEventListener("mouseup",Ke),window.removeEventListener("touchend",Ke),yt.cancel(Ni)}}},[Se]),ne.useEffect(function(){Te()},[un]),ne.useImperativeHandle(Bt,function(){return{delayHidden:Te}});var Mi="".concat(Dn,"-scrollbar"),xi={position:"absolute",visibility:Ze&&Ji?null:"hidden"},ci={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Ee?(xi.height=8,xi.left=0,xi.right=0,xi.bottom=0,ci.height="100%",ci.width=ue,ie?ci.left=zi:ci.right=zi):(xi.width=8,xi.top=0,xi.bottom=0,ie?xi.right=0:xi.left=0,ci.width="100%",ci.height=ue,ci.top=zi),ne.createElement("div",{ref:se,className:Qe()(Mi,(Qn={},(0,be.Z)(Qn,"".concat(Mi,"-horizontal"),Ee),(0,be.Z)(Qn,"".concat(Mi,"-vertical"),!Ee),(0,be.Z)(Qn,"".concat(Mi,"-visible"),Ze),Qn)),style:(0,Be.Z)((0,Be.Z)({},xi),On),onMouseDown:ce,onMouseMove:Te},ne.createElement("div",{ref:ye,className:Qe()("".concat(Mi,"-thumb"),(0,be.Z)({},"".concat(Mi,"-thumb-moving"),Se)),style:(0,Be.Z)((0,Be.Z)({},ci),zn),onMouseDown:mi}))}),Vt=Nt;function Jt(en){var Bt=en.children,Qn=en.setRef,Dn=ne.useCallback(function(cn){Qn(cn)},[]);return ne.cloneElement(Bt,{ref:Dn})}function Ae(en,Bt,Qn,Dn,cn,un,wn){var Hn=wn.getKey;return en.slice(Bt,Qn+1).map(function(di,ke){var Ee=Bt+ke,ue=un(di,Ee,{style:{width:Dn}}),Ie=Hn(di);return ne.createElement(Jt,{key:Ie,setRef:function(zn){return cn(di,zn)}},ue)})}function he(en){return en instanceof HTMLElement||en instanceof SVGElement}function le(en){return he(en)?en:en instanceof ne.Component?De.findDOMNode(en):null}var We=ee(15671),me=ee(43144),Je=function(){function en(){(0,We.Z)(this,en),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,me.Z)(en,[{key:"set",value:function(Qn,Dn){this.maps[Qn]=Dn,this.id+=1}},{key:"get",value:function(Qn){return this.maps[Qn]}}]),en}(),fn=Je;function sn(en,Bt,Qn){var Dn=ne.useState(0),cn=(0,ln.Z)(Dn,2),un=cn[0],wn=cn[1],Hn=(0,ne.useRef)(new Map),di=(0,ne.useRef)(new fn),ke=(0,ne.useRef)();function Ee(){yt.cancel(ke.current)}function ue(){var On=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Ee();var zn=function(){Hn.current.forEach(function(Fe,Se){if(Fe&&Fe.offsetParent){var Pn=le(Fe),ti=Pn.offsetHeight;di.current.get(Se)!==ti&&di.current.set(Se,Pn.offsetHeight)}}),wn(function(Fe){return Fe+1})};On?zn():ke.current=yt(zn)}function Ie(On,zn){var Zn=en(On),Fe=Hn.current.get(Zn);zn?(Hn.current.set(Zn,zn),ue()):Hn.current.delete(Zn),!Fe!=!zn&&(zn?Bt==null||Bt(On):Qn==null||Qn(On))}return(0,ne.useEffect)(function(){return Ee},[]),[Ie,ue,di.current,un]}function ui(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var hi=ui()?ne.useLayoutEffect:ne.useEffect,Si=function(Bt,Qn){var Dn=ne.useRef(!0);hi(function(){return Bt(Dn.current)},Qn),hi(function(){return Dn.current=!1,function(){Dn.current=!0}},[])},fr=function(Bt,Qn){Si(function(Dn){if(!Dn)return Bt()},Qn)},qt=Si;function Ht(en){var Bt=ne.useRef();Bt.current=en;var Qn=ne.useCallback(function(){for(var Dn,cn=arguments.length,un=new Array(cn),wn=0;wn<cn;wn++)un[wn]=arguments[wn];return(Dn=Bt.current)===null||Dn===void 0?void 0:Dn.call.apply(Dn,[Bt].concat(un))},[]);return Qn}function je(en){var Bt=React.useRef(!1),Qn=React.useState(en),Dn=_slicedToArray(Qn,2),cn=Dn[0],un=Dn[1];React.useEffect(function(){return Bt.current=!1,function(){Bt.current=!0}},[]);function wn(Hn,di){di&&Bt.current||un(Hn)}return[cn,wn]}function Nn(en){return en!==void 0}function Kn(en,Bt){var Qn=Bt||{},Dn=Qn.defaultValue,cn=Qn.value,un=Qn.onChange,wn=Qn.postState,Hn=useState(function(){return Nn(cn)?cn:Nn(Dn)?typeof Dn=="function"?Dn():Dn:typeof en=="function"?en():en}),di=_slicedToArray(Hn,2),ke=di[0],Ee=di[1],ue=cn!==void 0?cn:ke,Ie=wn?wn(ue):ue,On=useEvent(un),zn=useState([ue]),Zn=_slicedToArray(zn,2),Fe=Zn[0],Se=Zn[1];useLayoutUpdateEffect(function(){var ti=Fe[0];ke!==ti&&On(ke,ti)},[Fe]),useLayoutUpdateEffect(function(){Nn(cn)||Ee(cn)},[cn]);var Pn=useEvent(function(ti,nn){Ee(ti,nn),Se([ue],nn)});return[Ie,Pn]}var He=ee(31461);function mn(en,Bt,Qn){var Dn=React.useRef({});return(!("value"in Dn.current)||Qn(Dn.current.condition,Bt))&&(Dn.current.value=en(),Dn.current.condition=Bt),Dn.current.value}function Cn(en,Bt){typeof en=="function"?en(Bt):_typeof(en)==="object"&&en&&"current"in en&&(en.current=Bt)}function Jn(){for(var en=arguments.length,Bt=new Array(en),Qn=0;Qn<en;Qn++)Bt[Qn]=arguments[Qn];var Dn=Bt.filter(function(cn){return cn});return Dn.length<=1?Dn[0]:function(cn){Bt.forEach(function(un){Cn(un,cn)})}}function bn(){for(var en=arguments.length,Bt=new Array(en),Qn=0;Qn<en;Qn++)Bt[Qn]=arguments[Qn];return useMemo(function(){return Jn.apply(void 0,Bt)},Bt,function(Dn,cn){return Dn.length!==cn.length||Dn.every(function(un,wn){return un!==cn[wn]})})}function ve(en){var Bt,Qn,Dn=isMemo(en)?en.type.type:en.type;return!(typeof Dn=="function"&&!((Bt=Dn.prototype)!==null&&Bt!==void 0&&Bt.render)||typeof en=="function"&&!((Qn=en.prototype)!==null&&Qn!==void 0&&Qn.render))}function Le(en){return!isValidElement(en)||isFragment(en)?!1:ve(en)}function Sn(en,Bt,Qn,Dn){if(!Bt.length)return Qn;var cn=_toArray(Bt),un=cn[0],wn=cn.slice(1),Hn;return!en&&typeof un=="number"?Hn=[]:Array.isArray(en)?Hn=_toConsumableArray(en):Hn=_objectSpread({},en),Dn&&Qn===void 0&&wn.length===1?delete Hn[un][wn[0]]:Hn[un]=Sn(Hn[un],wn,Qn,Dn),Hn}function xn(en,Bt,Qn){var Dn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Bt.length&&Dn&&Qn===void 0&&!get(en,Bt.slice(0,-1))?en:Sn(en,Bt,Qn,Dn)}function Kt(en){return _typeof(en)==="object"&&en!==null&&Object.getPrototypeOf(en)===Object.prototype}function Et(en){return Array.isArray(en)?[]:{}}var Ft=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function Dt(){for(var en=arguments.length,Bt=new Array(en),Qn=0;Qn<en;Qn++)Bt[Qn]=arguments[Qn];var Dn=Et(Bt[0]);return Bt.forEach(function(cn){function un(wn,Hn){var di=new Set(Hn),ke=get(cn,wn),Ee=Array.isArray(ke);if(Ee||Kt(ke)){if(!di.has(ke)){di.add(ke);var ue=get(Dn,wn);Ee?Dn=xn(Dn,wn,[]):(!ue||_typeof(ue)!=="object")&&(Dn=xn(Dn,wn,Et(ke))),Ft(ke).forEach(function(Ie){un([].concat(_toConsumableArray(wn),[Ie]),di)})}}else Dn=xn(Dn,wn,ke)}un([])}),Dn}var Wt={},kt=[],Ue=function(Bt){kt.push(Bt)};function Tn(en,Bt){if(0)var Qn}function Ei(en,Bt){if(0)var Qn}function Xn(){Wt={}}function si(en,Bt,Qn){!Bt&&!Wt[Qn]&&(en(!1,Qn),Wt[Qn]=!0)}function Qi(en,Bt){si(Tn,en,Bt)}function Ln(en,Bt){si(Ei,en,Bt)}Qi.preMessage=Ue,Qi.resetWarned=Xn,Qi.noteOnce=Ln;var Ci=null,gi=10;function qi(en,Bt,Qn,Dn,cn,un,wn,Hn){var di=ne.useRef(),ke=ne.useState(null),Ee=(0,ln.Z)(ke,2),ue=Ee[0],Ie=Ee[1];return qt(function(){if(ue&&ue.times<gi){if(!en.current){Ie(function(Te){return(0,Be.Z)({},Te)});return}un();var On=ue.targetAlign,zn=ue.originAlign,Zn=ue.index,Fe=ue.offset,Se=en.current.clientHeight,Pn=!1,ti=On,nn=null;if(Se){for(var pe=On||zn,Un=0,pi=0,Oi=0,on=Math.min(Bt.length-1,Zn),ni=0;ni<=on;ni+=1){var ie=cn(Bt[ni]);pi=Un;var se=Qn.get(ie);Oi=pi+(se===void 0?Dn:se),Un=Oi}for(var ye=pe==="top"?Fe:Se-Fe,Ce=on;Ce>=0;Ce-=1){var Oe=cn(Bt[Ce]),Ze=Qn.get(Oe);if(Ze===void 0){Pn=!0;break}if(ye-=Ze,ye<=0)break}switch(pe){case"top":nn=pi-Fe;break;case"bottom":nn=Oi-Se+Fe;break;default:{var En=en.current.scrollTop,Wn=En+Se;pi<En?ti="top":Oi>Wn&&(ti="bottom")}}nn!==null&&wn(nn),nn!==ue.lastTop&&(Pn=!0)}Pn&&Ie(function(Te){return(0,Be.Z)((0,Be.Z)({},Te),{},{times:Te.times+1,targetAlign:ti,lastTop:nn})})}},[ue,en.current]),function(On){if(On==null){Hn();return}if(yt.cancel(di.current),typeof On=="number")wn(On);else if(On&&(0,Ne.Z)(On)==="object"){var zn,Zn=On.align;"index"in On?zn=On.index:zn=Bt.findIndex(function(Pn){return cn(Pn)===On.key});var Fe=On.offset,Se=Fe===void 0?0:Fe;Ie({times:0,index:zn,offset:Se,originAlign:Zn})}}}function fi(en,Bt,Qn,Dn){var cn=Qn-en,un=Bt-Qn,wn=Math.min(cn,un)*2;if(Dn<=wn){var Hn=Math.floor(Dn/2);return Dn%2?Qn+Hn+1:Qn-Hn}return cn>un?Qn-(Dn-un):Qn+(Dn-cn)}function Pr(en,Bt,Qn){var Dn=en.length,cn=Bt.length,un,wn;if(Dn===0&&cn===0)return null;Dn<cn?(un=en,wn=Bt):(un=Bt,wn=en);var Hn={__EMPTY_ITEM__:!0};function di(zn){return zn!==void 0?Qn(zn):Hn}for(var ke=null,Ee=Math.abs(Dn-cn)!==1,ue=0;ue<wn.length;ue+=1){var Ie=di(un[ue]),On=di(wn[ue]);if(Ie!==On){ke=ue,Ee=Ee||Ie!==di(wn[ue+1]);break}}return ke===null?null:{index:ke,multiple:Ee}}function kr(en,Bt,Qn){var Dn=ne.useState(en),cn=(0,ln.Z)(Dn,2),un=cn[0],wn=cn[1],Hn=ne.useState(null),di=(0,ln.Z)(Hn,2),ke=di[0],Ee=di[1];return ne.useEffect(function(){var ue=Pr(un||[],en||[],Bt);(ue==null?void 0:ue.index)!==void 0&&(Qn==null||Qn(ue.index),Ee(en[ue.index])),wn(en)},[en]),[ke]}var yr=(typeof navigator=="undefined"?"undefined":(0,Ne.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),or=yr,Es=function(en,Bt){var Qn=(0,ne.useRef)(!1),Dn=(0,ne.useRef)(null);function cn(){clearTimeout(Dn.current),Qn.current=!0,Dn.current=setTimeout(function(){Qn.current=!1},50)}var un=(0,ne.useRef)({top:en,bottom:Bt});return un.current.top=en,un.current.bottom=Bt,function(wn){var Hn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,di=wn<0&&un.current.top||wn>0&&un.current.bottom;return Hn&&di?(clearTimeout(Dn.current),Qn.current=!1):(!di||Qn.current)&&cn(),!Qn.current&&di}};function Wr(en,Bt,Qn,Dn,cn){var un=(0,ne.useRef)(0),wn=(0,ne.useRef)(null),Hn=(0,ne.useRef)(null),di=(0,ne.useRef)(!1),ke=Es(Bt,Qn);function Ee(Fe,Se){yt.cancel(wn.current),un.current+=Se,Hn.current=Se,!ke(Se)&&(or||Fe.preventDefault(),wn.current=yt(function(){var Pn=di.current?10:1;cn(un.current*Pn),un.current=0}))}function ue(Fe,Se){cn(Se,!0),or||Fe.preventDefault()}var Ie=(0,ne.useRef)(null),On=(0,ne.useRef)(null);function zn(Fe){if(en){yt.cancel(On.current),On.current=yt(function(){Ie.current=null},2);var Se=Fe.deltaX,Pn=Fe.deltaY,ti=Fe.shiftKey,nn=Se,pe=Pn;(Ie.current==="sx"||!Ie.current&&ti&&Pn&&!Se)&&(nn=Pn,pe=0,Ie.current="sx");var Un=Math.abs(nn),pi=Math.abs(pe);Ie.current===null&&(Ie.current=Dn&&Un>pi?"x":"y"),Ie.current==="y"?Ee(Fe,pe):ue(Fe,nn)}}function Zn(Fe){en&&(di.current=Fe.detail===Hn.current)}return[zn,Zn]}var Wo=14/15;function Fo(en,Bt,Qn){var Dn=(0,ne.useRef)(!1),cn=(0,ne.useRef)(0),un=(0,ne.useRef)(null),wn=(0,ne.useRef)(null),Hn,di=function(Ie){if(Dn.current){var On=Math.ceil(Ie.touches[0].pageY),zn=cn.current-On;cn.current=On,Qn(zn)&&Ie.preventDefault(),clearInterval(wn.current),wn.current=setInterval(function(){zn*=Wo,(!Qn(zn,!0)||Math.abs(zn)<=.1)&&clearInterval(wn.current)},16)}},ke=function(){Dn.current=!1,Hn()},Ee=function(Ie){Hn(),Ie.touches.length===1&&!Dn.current&&(Dn.current=!0,cn.current=Math.ceil(Ie.touches[0].pageY),un.current=Ie.target,un.current.addEventListener("touchmove",di),un.current.addEventListener("touchend",ke))};Hn=function(){un.current&&(un.current.removeEventListener("touchmove",di),un.current.removeEventListener("touchend",ke))},qt(function(){return en&&Bt.current.addEventListener("touchstart",Ee),function(){var ue;(ue=Bt.current)===null||ue===void 0||ue.removeEventListener("touchstart",Ee),Hn(),clearInterval(wn.current)}},[en])}var $r=20;function ur(){var en=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Qn=en/Bt*100;return isNaN(Qn)&&(Qn=0),Qn=Math.max(Qn,$r),Qn=Math.min(Qn,en/2),Math.floor(Qn)}function So(en,Bt,Qn,Dn){var cn=ne.useMemo(function(){return[new Map,[]]},[en,Qn.id,Dn]),un=(0,ln.Z)(cn,2),wn=un[0],Hn=un[1],di=function(Ee){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ee,Ie=wn.get(Ee),On=wn.get(ue);if(Ie===void 0||On===void 0)for(var zn=en.length,Zn=Hn.length;Zn<zn;Zn+=1){var Fe,Se=en[Zn],Pn=Bt(Se);wn.set(Pn,Zn);var ti=(Fe=Qn.get(Pn))!==null&&Fe!==void 0?Fe:Dn;if(Hn[Zn]=(Hn[Zn-1]||0)+ti,Pn===Ee&&(Ie=Zn),Pn===ue&&(On=Zn),Ie!==void 0&&On!==void 0)break}return{top:Hn[Ie-1]||0,bottom:Hn[On]}};return di}var Er=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],bo=[],Ss={overflowY:"auto",overflowAnchor:"none"};function Ms(en,Bt){var Qn=en.prefixCls,Dn=Qn===void 0?"rc-virtual-list":Qn,cn=en.className,un=en.height,wn=en.itemHeight,Hn=en.fullHeight,di=Hn===void 0?!0:Hn,ke=en.style,Ee=en.data,ue=en.children,Ie=en.itemKey,On=en.virtual,zn=en.direction,Zn=en.scrollWidth,Fe=en.component,Se=Fe===void 0?"div":Fe,Pn=en.onScroll,ti=en.onVirtualScroll,nn=en.onVisibleChange,pe=en.innerProps,Un=en.extraRender,pi=en.styles,Oi=(0,we.Z)(en,Er),on=!!(On!==!1&&un&&wn),ni=on&&Ee&&(wn*Ee.length>un||!!Zn),ie=zn==="rtl",se=Qe()(Dn,(0,be.Z)({},"".concat(Dn,"-rtl"),ie),cn),ye=Ee||bo,Ce=(0,ne.useRef)(),Oe=(0,ne.useRef)(),Ze=(0,ne.useState)(0),En=(0,ln.Z)(Ze,2),Wn=En[0],Te=En[1],pn=(0,ne.useState)(0),ri=(0,ln.Z)(pn,2),Ji=ri[0],zi=ri[1],ce=(0,ne.useState)(!1),$n=(0,ln.Z)(ce,2),mi=$n[0],Yn=$n[1],hr=function(){Yn(!0)},Mi=function(){Yn(!1)},xi=ne.useCallback(function(sr){return typeof Ie=="function"?Ie(sr):sr==null?void 0:sr[Ie]},[Ie]),ci={getKey:xi};function Ni(sr){Te(function(dr){var Zr;typeof sr=="function"?Zr=sr(dr):Zr=sr;var Bo=Yi(Zr);return Ce.current.scrollTop=Bo,Bo})}var Vi=(0,ne.useRef)({start:0,end:ye.length}),Ke=(0,ne.useRef)(),ki=kr(ye,xi),Ye=(0,ln.Z)(ki,1),rr=Ye[0];Ke.current=rr;var Ro=sn(xi,null,null),gr=(0,ln.Z)(Ro,4),lo=gr[0],pr=gr[1],_i=gr[2],cr=gr[3],qr=ne.useMemo(function(){if(!on)return{scrollHeight:void 0,start:0,end:ye.length-1,offset:void 0};if(!ni){var sr;return{scrollHeight:((sr=Oe.current)===null||sr===void 0?void 0:sr.offsetHeight)||0,start:0,end:ye.length-1,offset:void 0}}for(var dr=0,Zr,Bo,Pi,lf=ye.length,EA=0;EA<lf;EA+=1){var El=ye[EA],fg=xi(El),dh=_i.get(fg),Vn=dr+(dh===void 0?wn:dh);Vn>=Wn&&Zr===void 0&&(Zr=EA,Bo=dr),Vn>Wn+un&&Pi===void 0&&(Pi=EA),dr=Vn}return Zr===void 0&&(Zr=0,Bo=0,Pi=Math.ceil(un/wn)),Pi===void 0&&(Pi=ye.length-1),Pi=Math.min(Pi+1,ye.length-1),{scrollHeight:dr,start:Zr,end:Pi,offset:Bo}},[ni,on,Wn,ye,cr,un]),Fr=qr.scrollHeight,Rn=qr.start,Rt=qr.end,Gr=qr.offset;Vi.current.start=Rn,Vi.current.end=Rt;var ps=ne.useState({width:0,height:un}),xs=(0,ln.Z)(ps,2),Lo=xs[0],os=xs[1],el=function(dr){os({width:dr.width||dr.offsetWidth,height:dr.height||dr.offsetHeight})},gl=(0,ne.useRef)(),Ra=(0,ne.useRef)(),_r=ne.useMemo(function(){return ur(Lo.width,Zn)},[Lo.width,Zn]),To=ne.useMemo(function(){return ur(Lo.height,Fr)},[Lo.height,Fr]),Ui=Fr-un,ii=(0,ne.useRef)(Ui);ii.current=Ui;function Yi(sr){var dr=sr;return Number.isNaN(ii.current)||(dr=Math.min(dr,ii.current)),dr=Math.max(dr,0),dr}var an=Wn<=0,Nr=Wn>=Ui,Xr=Es(an,Nr),_o=function(){return{x:ie?-Ji:Ji,y:Wn}},Ao=(0,ne.useRef)(_o()),fo=Ht(function(){if(ti){var sr=_o();(Ao.current.x!==sr.x||Ao.current.y!==sr.y)&&(ti(sr),Ao.current=sr)}});function Yo(sr,dr){var Zr=sr;dr?((0,De.flushSync)(function(){zi(Zr)}),fo()):Ni(Zr)}function ga(sr){var dr=sr.currentTarget.scrollTop;dr!==Wn&&Ni(dr),Pn==null||Pn(sr),fo()}var js=function(dr){var Zr=dr,Bo=Zn-Lo.width;return Zr=Math.max(Zr,0),Zr=Math.min(Zr,Bo),Zr},Ca=Ht(function(sr,dr){dr?((0,De.flushSync)(function(){zi(function(Zr){var Bo=Zr+(ie?-sr:sr);return js(Bo)})}),fo()):Ni(function(Zr){var Bo=Zr+sr;return Bo})}),fl=Wr(on,an,Nr,!!Zn,Ca),Me=(0,ln.Z)(fl,2),fa=Me[0],Ll=Me[1];Fo(on,Ce,function(sr,dr){return Xr(sr,dr)?!1:(fa({preventDefault:function(){},deltaY:sr}),!0)}),qt(function(){function sr(Zr){on&&Zr.preventDefault()}var dr=Ce.current;return dr.addEventListener("wheel",fa),dr.addEventListener("DOMMouseScroll",Ll),dr.addEventListener("MozMousePixelScroll",sr),function(){dr.removeEventListener("wheel",fa),dr.removeEventListener("DOMMouseScroll",Ll),dr.removeEventListener("MozMousePixelScroll",sr)}},[on]),qt(function(){Zn&&zi(function(sr){return js(sr)})},[Lo.width,Zn]);var ZA=function(){var dr,Zr;(dr=gl.current)===null||dr===void 0||dr.delayHidden(),(Zr=Ra.current)===null||Zr===void 0||Zr.delayHidden()},Go=qi(Ce,ye,_i,wn,xi,function(){return pr(!0)},Ni,ZA);ne.useImperativeHandle(Bt,function(){return{getScrollInfo:_o,scrollTo:function(dr){function Zr(Bo){return Bo&&(0,Ne.Z)(Bo)==="object"&&("left"in Bo||"top"in Bo)}Zr(dr)?(dr.left!==void 0&&zi(js(dr.left)),Go(dr.top)):Go(dr)}}}),qt(function(){if(nn){var sr=ye.slice(Rn,Rt+1);nn(sr,ye)}},[Rn,Rt,ye]);var LA=So(ye,xi,_i,wn),fh=Un==null?void 0:Un({start:Rn,end:Rt,virtual:ni,offsetX:Ji,offsetY:Gr,rtl:ie,getSize:LA}),JA=Ae(ye,Rn,Rt,Zn,lo,ue,ci),Yr=null;un&&(Yr=(0,Be.Z)((0,be.Z)({},di?"height":"maxHeight",un),Ss),on&&(Yr.overflowY="hidden",Zn&&(Yr.overflowX="hidden"),mi&&(Yr.pointerEvents="none")));var $o={};return ie&&($o.dir="rtl"),ne.createElement("div",(0,Tt.Z)({style:(0,Be.Z)((0,Be.Z)({},ke),{},{position:"relative"}),className:se},$o,Oi),ne.createElement(gn.Z,{onResize:el},ne.createElement(Se,{className:"".concat(Dn,"-holder"),style:Yr,ref:Ce,onScroll:ga,onMouseEnter:ZA},ne.createElement(kn,{prefixCls:Dn,height:Fr,offsetX:Ji,offsetY:Gr,scrollWidth:Zn,onInnerResize:pr,ref:Oe,innerProps:pe,rtl:ie,extra:fh},JA))),ni&&Fr>un&&ne.createElement(Vt,{ref:gl,prefixCls:Dn,scrollOffset:Wn,scrollRange:Fr,rtl:ie,onScroll:Yo,onStartMove:hr,onStopMove:Mi,spinSize:To,containerSize:Lo.height,style:pi==null?void 0:pi.verticalScrollBar,thumbStyle:pi==null?void 0:pi.verticalScrollBarThumb}),ni&&Zn&&ne.createElement(Vt,{ref:Ra,prefixCls:Dn,scrollOffset:Ji,scrollRange:Zn,rtl:ie,onScroll:Yo,onStartMove:hr,onStopMove:Mi,spinSize:_r,containerSize:Lo.width,horizontal:!0,style:pi==null?void 0:pi.horizontalScrollBar,thumbStyle:pi==null?void 0:pi.horizontalScrollBarThumb}))}var $s=ne.forwardRef(Ms);$s.displayName="List";var xo=$s,er=xo},66392:function(yn,qn){"use strict";var ee;var Tt=Symbol.for("react.element"),Be=Symbol.for("react.portal"),Ne=Symbol.for("react.fragment"),ln=Symbol.for("react.strict_mode"),be=Symbol.for("react.profiler"),we=Symbol.for("react.provider"),ne=Symbol.for("react.context"),De=Symbol.for("react.server_context"),fe=Symbol.for("react.forward_ref"),Qe=Symbol.for("react.suspense"),gn=Symbol.for("react.suspense_list"),Xe=Symbol.for("react.memo"),kn=Symbol.for("react.lazy"),Ut=Symbol.for("react.offscreen"),et;et=Symbol.for("react.module.reference");function nt(gt){if(typeof gt=="object"&&gt!==null){var lt=gt.$$typeof;switch(lt){case Tt:switch(gt=gt.type,gt){case Ne:case be:case ln:case Qe:case gn:return gt;default:switch(gt=gt&&gt.$$typeof,gt){case De:case ne:case fe:case kn:case Xe:case we:return gt;default:return lt}}case Be:return lt}}}ee=ne,ee=we,ee=Tt,ee=fe,ee=Ne,ee=kn,ee=Xe,ee=Be,ee=be,ee=ln,ee=Qe,ee=gn,ee=function(){return!1},ee=function(){return!1},ee=function(gt){return nt(gt)===ne},ee=function(gt){return nt(gt)===we},ee=function(gt){return typeof gt=="object"&&gt!==null&&gt.$$typeof===Tt},ee=function(gt){return nt(gt)===fe},ee=function(gt){return nt(gt)===Ne},ee=function(gt){return nt(gt)===kn},ee=function(gt){return nt(gt)===Xe},ee=function(gt){return nt(gt)===Be},ee=function(gt){return nt(gt)===be},ee=function(gt){return nt(gt)===ln},ee=function(gt){return nt(gt)===Qe},ee=function(gt){return nt(gt)===gn},ee=function(gt){return typeof gt=="string"||typeof gt=="function"||gt===Ne||gt===be||gt===ln||gt===Qe||gt===gn||gt===Ut||typeof gt=="object"&&gt!==null&&(gt.$$typeof===kn||gt.$$typeof===Xe||gt.$$typeof===we||gt.$$typeof===ne||gt.$$typeof===fe||gt.$$typeof===et||gt.getModuleId!==void 0)},ee=nt},31461:function(yn,qn,ee){"use strict";ee(66392)},4977:function(yn){"use strict";yn.exports="data:image/png;base64,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"},96908:function(yn){"use strict";yn.exports="data:image/png;base64,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"},57177:function(yn){"use strict";yn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANQAAAA8CAYAAAAeyZT3AAAAAXNSR0IArs4c6QAAEpJJREFUeF7tXQeYFdUV/mcbS1F6UUEsoLC7IGKNJWpERbEgSoxGo7HEQFDRWCAGgdASNBbEhglqsC1rAxVBNGg0qNgLsJRddmFhe3vby3uT7393ZmfeezOv7M57W3LP9/EtM3Pn3DPn3n/uvf85c58CKdID0gOOeUBxTJNUJD0gPQAJKNkJpAcc9EALoNRpCaqt3rh4QIkDvH/jxV/zuZZjrVy8uRzvSzDdrx3HxWnnEnz1eevhOf/79HpNdrAs6wrQr9VvtiMc+/kc0HSan9Nrq8Uzt9hquuZjv8kPev26r8x16X5VPYDHDYT7Vy/L8vo94d7P8u5mcV+w+1U34GEZ7a+5Tg/vV31tbrmu36ff23JcB9VdBo9a5v2rekq14/1wN30GNXGzctPKKgf7eExVKUGBpJsSEkgWYPMHXEuH0sHlB5iW8jrAtE6sd9AW8GidVD9mR/fvxDrAzJ3Yp/ObAGL3srC1XweJnf0awHUQWgGJ52i3P+D9OyOP/QHSAjYT8Lwd3gRGH3Bp5dza34D7LUDsD04vmPzuN9cZGkSAF3xm4JttNoFWdasNlRVNta4SV21l6YHakvyPGurrNivA12kZ2B1TdLSisvAA1QrF8hbpAUsP8EWVkAwkdgMSugHxiUB8EpDcC+g1AOjeG+BciSBWPXA3NaA8Pxel+7LRXF+bCwXpShxeTX0V33ZED0tAdcRW+X+2iaN3j35Ar/7iX/e+XnCpbg9cZfkozctBrauci/9tioIlKSpeUTLg7iguk4DqKC0h7bD2QPJBQP/hUHsNhsIVv+qBq7QI+7O2w93USGDtUoEFaavxoqJ4x7Z2FQmodnW/rDxsD3Ba2PcwqL0PhaLEobmxAXnZmaiuKPOqUBRsSlBx06gM7AlbZxQKSkBFwalSZRQ9kJAEDD4GSD7Yyz6WFu5HQV4uVI+Ho1W1ouCe1NV4OooWBFUtAdVenpf1ts0DfQ6F2mcoOMurq6nCnp2Z8DAMwNEKWJEKTG+PtZUEVNuaVd7dnh5I6gF1wFFQEpJQW+1CTtYueBgeEPLuwGRcNWQVamJpogRULL0t63LeA/GJUAeNhBKXgOpqF3Kzs6Ey3iVGqs29gQnDMlDnfMXWGiWgYuVpWU/0PBCfBHXQ0VCUeLgqK7B3b67I4BDyZloKrlTmQ6AsyiIBFWUHS/Ux8kBCMtT+w70MYGlJMfILCloqVoDH0jIwMxaWSEDFwsuyjth4IKk71D7DGKzCnj05qK0zZnoKMDUtA69F2xAJqGh7WOqPrQeYvtSjL+rr65C1JxeqMfUrTkpAyrGvoCSaBklARdO7UnfsPaAAat/DocTFo7C4FMWlIvBLUYD0tAz8KppGSUBF07tSd/t4ILE71N5DoHrcyMrJQ0NjY4sd8QompazGumgZJgEVLc9Kve3rgZ79gW49UVVdg9wDhWZbMtNSMEaZDxEFdlgkoBx2qFTXQTygxHnz/gAPdu3NR2Njk9mwmWMy8Fg0LJWAioZXpU7DA/0OB479hTguyQZ2/Sdm3lF79IWS2B2llVXILylvqVcBuLAamZbh/euotA+geg0E/ponHqSpDrizj6MP1WGU8WM671eq7fhVweTFwIQ/Cpe8PRfY8NfYuue4y4BbNbb6y1eA534Tu/rjEqEeNAAejxs7cgvg4VfGmijA8rQM3Oa0Me0HqKUHxLM01gEzD3b6udpXX+9DgNNvBs64GVh0PFDj+Isw/Oe7fAlw3t2i/NoHgPVLwr/XiZLtCShGpHr29zJ++aWVKHX5pPU1Iw5jx6RjuxOP2QLUsPaUcLJG6uII1ZUBtTAb6McAI4B7BktAtdcIRf/zM/vkg9HY3IydeQxBGbMFBVifloELnezecoRy0pu6rsU5QJ/DJKDogXYeoWiCp2c/7mWF7MJy1Nb7kBNwmkaXgJKAioYHDJ0dAFBqt55Q4ruhyFWDooqArzkcpdE7HqBOuxE4aKBokE9WALUGO9PSStxc4Px7xWFzI/DhI0YDDjoGOP5ycbxjE5CzBRh/JTDiDGD4CaL83m/E+W9e8yUM+g0HTtIC6f56/bvd8JOAURp75SoAKvYDh58gStG27tq68L3FQGOtOP/TOmD/j76aOP09YSowbBww9DigtgLY9y2w7zvguzeEvf5ifsb8bcAPbwNjLwF+Pg3oPQTgubfnAcW7ASfXUAOOBH52PTB0nKiHn6UXZwFFu4DPVwEFFssRK0BRz7gpwn/0U+7XQM6XwFfpYrsxpyUhEUjqhdqGJmQXVgRoj1NwR+pqLHOi2o4HqD99DQwdK55t7mjRKfyF++4t1xIf66uAu/oZJcwNuGYOMHgkcKoNs7TtfWDltQZoOd9eshfoqel76OdA9mfWfp6+FkjTpt/vLhA79Jw1PXibrLoZ+OwFo8yIM4EbXwT6MF5iIblfASumAuUaI6oX8e+kOz4Crn3GV8HjFwLbP3AOUJfMBybO9m7eYCnuJmDjQ4L4MIu/rR8+Bty2zvCxuezuT4AVVwHVxU70bR8dao8+XsY1c38F3Ca2j4WcpNG7NqA4MiT1AJoagNwtwIFtwJBRwPATvVF0r5TmAItPBOoqxfEVDwLnapn+n/4DeHlaYONyVCHw4hPErqoPjATOvRM4Syvr3RVWE2/jaQvhF38HfP4vcYEd7ZZ0sWsu5cBPYlTiW58j6cCjxfmqYuDRCWLU0cXcSQ9sBQaOEPvcmcVJQF08F7joz4b2sr3iRcOX2eHjxT9dVl4HfPWqta0cnRmX4r58WZ8CRbsD24Mvj8UnOE7kqN16eT/t2FdWjcrawFHfKRq9awOKzVpdAjxxCcC3vS79jwBmvCs2+6CQStbfrJxOzdsqzte5gFmHAU31vp317BnAL7VpJke55ZN8r4ciJQjyedsM4uLl6cCnzxo6uDcdp42XLRDnvlsDrLjSupPqZ7duAD5+EqgqEmBkh2fHb+uUjy+eJXliI0rK6/f6TrF5ji+TK5aK65wCzh1lbyvb48nJQM4XRpkBRwHT3gIOGS3Obfw78OYsX5+29YgvnLgklNc0YH+FNgX31ekIjd71AfXU5cCP7wQ2B9/q7NScwjTUAHNGCPBR7tgIHHu2+D8DkQxImuXezcARJ4kzz14FfPuG7/VQgLpkHnDh/eIerj3+daN1d9GnlQwM862tr7/MI1QoHW0FFNdLE+8ToQ6uFTlFtpJFe4C+Q8WVmb2NdaO/rS/cCHyxyro95m4Ve9ozNsn24MvBKeHW10nd0dTsxo5C663TnaDRuzagOJ2bM9K+SWZ+ABxzlrj+1GTgx3fF/0kS3PSy+H/mv4FlFxg6zCMYG3z28MCFdChAzd4CDDte6Hz0PGDnR9Y2nvxr4IbnxbX3HwTe+pP4v7mT8mVw/5HW5A3LthVQ4XboO94Hjj1HlF403hr8ZfsEULQ9HwJUz1gHpJwnTj89RZAtTgpHW9WD3cU1qG+y/iK+rTR61wbUD+8AT2uMn1XDTH0YOEfLPsn4I7BJI3q43zZBcdAgsUZiJyjfJzSYRxcuwt+cHag5FKAerRRrO8p3bwVOKXWNJEdSzhdHHAU5GvoDas/nwINn2nc7JwHF2NrxUwCydP2PFEQMiRzulcdjfV1Ke2iXv61b14vpt52Y169v3Ad88LCTcBJ2KvEoqmpAUbUFeypqaxON3rUB9Z9ngFdn2DfK+fcAzHWjbFoOZNxplL1sIXDBfeJ47VxgvVbuLztFh6LMSwWKdgbqDwYodkpej1RIpS85ObCTfrUaWPnr6AKKDNlVy4DxUwURE0rsABWqPZhzOEXLNfz4KSD99lA1RXbd+1NCiahrdCOrzH4jpLbQ6M4Daswk4MhTxYNu32idXcxcN7JklPpq4K6+hmOcpM23vAw8f7290yc9AEyaI65v+BuwxsRkkbiYv0PM6fWF9lGnAXd/LMoza/qRc611BwMUR6ZHKgz6mbE2uymQWTsZNaspX6iE07aOUInJwO0bgKNPM9qL8bHCXUBVoRhdmxuAibOMaawdoL54EXjht/btYR791y0E3pkfGWBClSbjH0c21IPM4no0e6yTlttCozsPqEsXCOdSzOyZ+WFJs87SWJ7CncD8VOOqeX2xYByQrzFu5vsZgF2oxaeCxaHIdDGWZCfXPgucdoO4uuoW4DNtvaKX/8M7QKq2fvr7OcDJVwNn/k5cff4GYMtLkQOKd5hz/exGuWCdI5Lsg7YCimzj5EXCmrzvBYXP4LO/zPrcCGzbASrYS4j6rvuHCBxT7MiLUKAJdZ3Teag44GpCWZ39j3a0lkZ3HlCnXAdcv1I81tcZwD+vCXxEc5nMD4FlE40yv38TGHuxOF5+MbBtQ+D91z8HnKKxTcEAxSyDeaMFfewvDA4TlHrO3UNnAdmbfUsx++D3GoPH0S51oghIskPNHma/9gm1hjIvvv0pc7MF4yaLNQuF9Dzf8JRYAop0NmcdlGeuBL5fE+hL/qbT0gJjOmgHKLbHn48CXD5f0Ap9bA/67eDB4njp6SKbxWnRfjmzqr4ZuZVBszJaRaM7DygGTe/TsgsYUF0wBigx/SACpxB3fyJSbSj/Xga8pn2vw+OpjwDnaOseqynbYWOB2V+KqRglGKB4neksVlQvyQiSEhQGVJdoNLi5ARkPWpRtgE6/xnhP+h32TW1eZ5FlJNtoluMuBW59XZxhytL8NKCh2rcMR+H7vzFSmB7+BcBMAkosAWWegvPlyJekv5hBx2t2gOK1/64EXro1UMeEu4ApfxPnmYa0VJti2nu59Vfi4r27y24vaYYnyLdqraHRnQcUH/P29cAobX1RXSpAw8U7O8mp1wGHalM8bu7OEcTc4UZPAG57z3AWsxW+eEnM148+XUw/yL7pEgxQZOgIvG9eF8HC4l3A4FHAib802D3qefJS4CdTneamumgOcLFfOs0ixoR+sG9QMx1P2j3zA5EzSFZQF3MnZMYA10cMPvOzbU4zT77GyJbwZ8daCyjq58sjHPlhrfDJb1aKNqMU7gBemgZk/VdkeHCtfPliY82s6w0GKJYhkULSgdN5Zq4wTKGzrbzOGQtnLtES9gmPB/uqPKhsCL6hbFwcLkpNh03nCDQwOoBirIajlJ4gaueY95cCb2kBTnMZc0zD/16CZO0cY14fDFAEEmX8FdYWsJOvWwAwF89OOCVcmGWkCIXz9uR0lNNSf5mRLH6rlsIg6LQ1Rt6iXf1ct3B0qncZJVoLqEg6qM5sWrUlM0hIruiM386PBdj09aUdoLZtFOSGTq8HtK1bZKywX0RVvL/cBlejir2u4D9+qCjYnjoaY8Pd1CU6gKIz2BGvecpIIDU7qDRX0Nl881oJf7WOMYnTb/K9Wpkv7vtxXXjJsWTASB6Q8uVbVo/9UCunWqRlv18buunIcumZ5czt46gZSs64BTh7OjBwpJFnZwYU7+cCmTlyzB0028ZrXKcR6Jxe+mdgxxJQtOWIU4CrHzdYPP3Z2Y7fvi5GV+b7MXmWYgcopi0xiM2g+aARvh7kfhP0LUf0GAk5vu2l7qDTPpoSCY0ePUDpTunRVwzrnO6xE/NNFm5KCXcBHTJaLFT5yQWdHkrsOhs7L6co+ucCTKMJR9jRF+cCjMUwK2HW0MD1Tjh6gpVh+hPz2Q5NE+ApyBTrznDo9LbWHe79tHFIigACaXJOH/VUrXB1mMuxTbne1j+nqSltjZY235NX5UFFiGlfJDR69AHV5keOUEEkb+9wVHMac/UTouTm5wBmjEvpMh6oblKRUxnGb14reHzMaoSMNEtAheoac74HDkkRpZae4ZslHepeeb3De4DL6O1load9/JQ1nE1dJKCCNTmTPUmQUPi90kItobXDdxNpYCQe2F/tQXl96J+PUoD30jJwUdDZe7vsehTJ00Za1skpH4O6DO5SMu4CNj0eqTWyfCfwQF0zkFUR3qf3oWj0rjdCHZJqxE0YczF/PRpJ4zJyf+l8b3ayV5jrZ7W/RSQ6ZdkO6QGyfTvL3Giyye0zGx2KRu96gOqQTSaN6ugeKKpTUVQTBjkRgkaXgOroLS3ti4kH+L3hjjICKvS22cFodAmomDSXrKQzeGBPpQc1Nl/yBthvQ6NLQHWGlpY2xsQDFQ0q8qrCm/bZ0egSUDFpKllJZ/AAOYnM8GJS3sexotEloDpDS0sbY+aBAzUelNWFjknpBvnT6BJQMWsqWVFn8EC9G9hdHl5MyjtK+WWjS0B1hlaWNsbUA9mVbtQ2hWb7TKPU7anp8Eb9JaBi2lSyss7ggQjJCZ+90SWgOkMLSxtj5gGOS/zHmJQ7jMyJFsM0Gl0CKmZNJSvqTB4oqPGgJAJyQqfRJaA6UytLW2PmgcoGFfvCj0m10Oj/A9jGm+feuyEMAAAAAElFTkSuQmCC"},81378:function(yn){"use strict";yn.exports="data:image/png;base64,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"},17423:function(yn,qn,ee){"use strict";ee.d(qn,{Z:function(){return De}});const Tt=fe=>typeof fe=="object"&&fe!=null&&fe.nodeType===1,Be=(fe,Qe)=>(!Qe||fe!=="hidden")&&fe!=="visible"&&fe!=="clip",Ne=(fe,Qe)=>{if(fe.clientHeight<fe.scrollHeight||fe.clientWidth<fe.scrollWidth){const gn=getComputedStyle(fe,null);return Be(gn.overflowY,Qe)||Be(gn.overflowX,Qe)||(Xe=>{const kn=(Ut=>{if(!Ut.ownerDocument||!Ut.ownerDocument.defaultView)return null;try{return Ut.ownerDocument.defaultView.frameElement}catch(et){return null}})(Xe);return!!kn&&(kn.clientHeight<Xe.scrollHeight||kn.clientWidth<Xe.scrollWidth)})(fe)}return!1},ln=(fe,Qe,gn,Xe,kn,Ut,et,nt)=>Ut<fe&&et>Qe||Ut>fe&&et<Qe?0:Ut<=fe&&nt<=gn||et>=Qe&&nt>=gn?Ut-fe-Xe:et>Qe&&nt<gn||Ut<fe&&nt>gn?et-Qe+kn:0,be=fe=>{const Qe=fe.parentElement;return Qe==null?fe.getRootNode().host||null:Qe},we=(fe,Qe)=>{var gn,Xe,kn,Ut;if(typeof document=="undefined")return[];const{scrollMode:et,block:nt,inline:gt,boundary:lt,skipOverflowHiddenElements:ct}=Qe,yt=typeof lt=="function"?lt:Kn=>Kn!==lt;if(!Tt(fe))throw new TypeError("Invalid target");const Lt=document.scrollingElement||document.documentElement,Nt=[];let Vt=fe;for(;Tt(Vt)&&yt(Vt);){if(Vt=be(Vt),Vt===Lt){Nt.push(Vt);break}Vt!=null&&Vt===document.body&&Ne(Vt)&&!Ne(document.documentElement)||Vt!=null&&Ne(Vt,ct)&&Nt.push(Vt)}const Jt=(Xe=(gn=window.visualViewport)==null?void 0:gn.width)!=null?Xe:innerWidth,Ae=(Ut=(kn=window.visualViewport)==null?void 0:kn.height)!=null?Ut:innerHeight,{scrollX:he,scrollY:le}=window,{height:We,width:me,top:Je,right:fn,bottom:sn,left:ui}=fe.getBoundingClientRect(),{top:hi,right:Si,bottom:fr,left:qt}=(Kn=>{const He=window.getComputedStyle(Kn);return{top:parseFloat(He.scrollMarginTop)||0,right:parseFloat(He.scrollMarginRight)||0,bottom:parseFloat(He.scrollMarginBottom)||0,left:parseFloat(He.scrollMarginLeft)||0}})(fe);let Ht=nt==="start"||nt==="nearest"?Je-hi:nt==="end"?sn+fr:Je+We/2-hi+fr,je=gt==="center"?ui+me/2-qt+Si:gt==="end"?fn+Si:ui-qt;const Nn=[];for(let Kn=0;Kn<Nt.length;Kn++){const He=Nt[Kn],{height:mn,width:Cn,top:Jn,right:bn,bottom:ve,left:Le}=He.getBoundingClientRect();if(et==="if-needed"&&Je>=0&&ui>=0&&sn<=Ae&&fn<=Jt&&Je>=Jn&&sn<=ve&&ui>=Le&&fn<=bn)return Nn;const Sn=getComputedStyle(He),xn=parseInt(Sn.borderLeftWidth,10),Kt=parseInt(Sn.borderTopWidth,10),Et=parseInt(Sn.borderRightWidth,10),Ft=parseInt(Sn.borderBottomWidth,10);let Dt=0,Wt=0;const kt="offsetWidth"in He?He.offsetWidth-He.clientWidth-xn-Et:0,Ue="offsetHeight"in He?He.offsetHeight-He.clientHeight-Kt-Ft:0,Tn="offsetWidth"in He?He.offsetWidth===0?0:Cn/He.offsetWidth:0,Ei="offsetHeight"in He?He.offsetHeight===0?0:mn/He.offsetHeight:0;if(Lt===He)Dt=nt==="start"?Ht:nt==="end"?Ht-Ae:nt==="nearest"?ln(le,le+Ae,Ae,Kt,Ft,le+Ht,le+Ht+We,We):Ht-Ae/2,Wt=gt==="start"?je:gt==="center"?je-Jt/2:gt==="end"?je-Jt:ln(he,he+Jt,Jt,xn,Et,he+je,he+je+me,me),Dt=Math.max(0,Dt+le),Wt=Math.max(0,Wt+he);else{Dt=nt==="start"?Ht-Jn-Kt:nt==="end"?Ht-ve+Ft+Ue:nt==="nearest"?ln(Jn,ve,mn,Kt,Ft+Ue,Ht,Ht+We,We):Ht-(Jn+mn/2)+Ue/2,Wt=gt==="start"?je-Le-xn:gt==="center"?je-(Le+Cn/2)+kt/2:gt==="end"?je-bn+Et+kt:ln(Le,bn,Cn,xn,Et+kt,je,je+me,me);const{scrollLeft:Xn,scrollTop:si}=He;Dt=Ei===0?0:Math.max(0,Math.min(si+Dt/Ei,He.scrollHeight-mn/Ei+Ue)),Wt=Tn===0?0:Math.max(0,Math.min(Xn+Wt/Tn,He.scrollWidth-Cn/Tn+kt)),Ht+=si-Dt,je+=Xn-Wt}Nn.push({el:He,top:Dt,left:Wt})}return Nn},ne=fe=>fe===!1?{block:"end",inline:"nearest"}:(Qe=>Qe===Object(Qe)&&Object.keys(Qe).length!==0)(fe)?fe:{block:"start",inline:"nearest"};function De(fe,Qe){if(!fe.isConnected||!(kn=>{let Ut=kn;for(;Ut&&Ut.parentNode;){if(Ut.parentNode===document)return!0;Ut=Ut.parentNode instanceof ShadowRoot?Ut.parentNode.host:Ut.parentNode}return!1})(fe))return;const gn=(kn=>{const Ut=window.getComputedStyle(kn);return{top:parseFloat(Ut.scrollMarginTop)||0,right:parseFloat(Ut.scrollMarginRight)||0,bottom:parseFloat(Ut.scrollMarginBottom)||0,left:parseFloat(Ut.scrollMarginLeft)||0}})(fe);if((kn=>typeof kn=="object"&&typeof kn.behavior=="function")(Qe))return Qe.behavior(we(fe,Qe));const Xe=typeof Qe=="boolean"||Qe==null?void 0:Qe.behavior;for(const{el:kn,top:Ut,left:et}of we(fe,ne(Qe))){const nt=Ut-gn.top+gn.bottom,gt=et-gn.left+gn.right;kn.scroll({top:nt,left:gt,behavior:Xe})}}}}]);