(self.webpackChunk=self.webpackChunk||[]).push([[5314],{37388:function(un,Nn,Mt){"use strict";Mt.d(Nn,{Z:function(){return Ut}});var Pt=Mt(87462),ne=Mt(67294),Ne={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"minus",theme:"outlined"},Be=Ne,Pe=Mt(17207),Bt=function(se,Se){return ne.createElement(Pe.Z,(0,Pt.Z)({},se,{ref:Se,icon:Be}))},Ut=ne.forwardRef(Bt)},71749:function(){"use strict"},30483:function(){"use strict"},71736:function(un,Nn){"use strict";Nn.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},18023:function(){"use strict";function un(Dt,nt,et,ht){et===void 0&&(et=0),ht===void 0&&(ht=1/0),this._name=Dt,this._defaultValue=nt,this._minimum=et,this._maximum=ht}Object.defineProperty(un.prototype,"name",{get:function(){return this._name},set:function(Dt){if(typeof Dt!="string"||Dt==="")throw new Error("Shape name must be a valid string.");this._name=Dt}}),Object.defineProperty(un.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(Dt){if(typeof Dt!="number"||isNaN(Dt))throw new Error("The default value must be a real number, not: "+Dt);this._defaultValue=Dt}}),Object.defineProperty(un.prototype,"minimum",{get:function(){return this._minimum},set:function(Dt){if(typeof Dt!="number"||isNaN(Dt))throw new Error("Minimum must be a real number, not: "+Dt);this._minimum=Dt}}),Object.defineProperty(un.prototype,"maximum",{get:function(){return this._maximum},set:function(Dt){if(typeof Dt!="number"||isNaN(Dt))throw new Error("Maximum must be a real number, not: "+Dt);this._maximum=Dt}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(Dt,nt){var et=go.Shape._FigureParameters[Dt];return et?et[nt]:null},go.Shape.setFigureParameter=function(Dt,nt,et){if(!(et instanceof un))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+et);if(et.defaultValueet.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+et.defaultValue);var ht=go.Shape._FigureParameters[Dt];ht||(ht=[],go.Shape._FigureParameters[Dt]=ht),ht[nt]=et};var Nn=[];function Mt(Dt,nt){var et=Nn.pop();return et===void 0?new go.Point(Dt,nt):(et.x=Dt,et.y=nt,et)}function Pt(){var Dt=Nn.pop();return Dt===void 0?new go.Point:Dt}function ne(Dt){Nn.push(Dt)}function Ne(Dt,nt,et,ht,lt,gt,mt,xt,St){St||(St=new go.Point);var zt=Dt-et,Jt=lt-mt,re=NaN,oe=NaN;if(zt===0)if(Jt===0)Dt===et&&(re=Dt,oe=nt);else{var $t=(gt-xt)/Jt,Le=gt-$t*lt;re=Dt,oe=$t*re+Le}else if(Jt===0){var de=(nt-ht)/zt,Fe=nt-de*Dt;re=lt,oe=de*re+Fe}else{var de=(nt-ht)/zt,$t=(gt-xt)/Jt,Fe=nt-de*Dt,Le=gt-$t*lt;re=(Le-Fe)/(de-$t),oe=de*re+Fe}return St.x=re,St.y=oe,St}function Be(Dt,nt,et,ht,lt,gt,mt,xt,St,zt,Jt,re,oe,$t){var Le=1-St,de=St,Fe=Dt*Le+et*de,rn=nt*Le+ht*de,De=et*Le+lt*de,jn=ht*Le+gt*de,Bn=lt*Le+mt*de,an=gt*Le+xt*de,Zn=Fe*Le+De*de,_t=rn*Le+jn*de,Tt=De*Le+Bn*de,ce=jn*Le+an*de,_e=Zn*Le+Tt*de,Ye=_t*Le+ce*de;zt.x=Fe,zt.y=rn,Jt.x=Zn,Jt.y=_t,re.x=_e,re.y=Ye,oe.x=Tt,oe.y=ce,$t.x=Bn,$t.y=an}var Pe=new go.Spot(.156,.156),Bt=new go.Spot(.844,.844),Ut=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new un("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=5),ht=Math.min(ht,nt/3),ht=Math.min(ht,et/3);var lt=ht*Ut,gt=new go.Geometry().add(new go.PathFigure(ht,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt-ht,0)).add(new go.PathSegment(go.PathSegment.Bezier,nt,ht,nt-lt,0,nt,lt)).add(new go.PathSegment(go.PathSegment.Line,nt,et-ht)).add(new go.PathSegment(go.PathSegment.Bezier,nt-ht,et,nt,et-lt,nt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,ht,et)).add(new go.PathSegment(go.PathSegment.Bezier,0,et-ht,lt,et,0,et-lt)).add(new go.PathSegment(go.PathSegment.Line,0,ht)).add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,lt,lt,0).close()));return lt>1&&(gt.spot1=new go.Spot(0,0,lt,lt),gt.spot2=new go.Spot(1,1,-lt,-lt)),gt}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(nt,et).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(nt,et).add(new go.PathSegment(go.PathSegment.Line,0,et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(Dt,nt,et){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=0,ht.startY=et/2,ht.endX=nt,ht.endY=et/2,ht}),go.Shape.defineFigureGenerator("LineV",function(Dt,nt,et){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=nt/2,ht.startY=0,ht.endX=nt/2,ht.endY=et,ht}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,et/2,!1).add(new go.PathSegment(go.PathSegment.Line,nt,et/2)).add(new go.PathSegment(go.PathSegment.Move,nt/2,0)).add(new go.PathSegment(go.PathSegment.Line,nt/2,et)))}),go.Shape.defineFigureGenerator("XLine",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)))}),go.Shape.defineFigureGenerator("LineRight",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(.25*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.25*nt,et)))}),go.Shape.defineFigureGenerator("LineDown",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,.25*et,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.75*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)))}),go.Shape.defineFigureGenerator("LineLeft",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(.75*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.75*nt,et)))}),go.Shape.defineFigureGenerator("LineUp",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,.75*et,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.25*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(Dt,nt,et){var ht=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(ht*nt,(1-ht)*et,!1).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,ht*et)).add(new go.PathSegment(go.PathSegment.Move,ht*nt,ht*et)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,(1-ht)*et)).add(new go.PathSegment(go.PathSegment.Move,0,et/2)).add(new go.PathSegment(go.PathSegment.Line,nt,et/2)).add(new go.PathSegment(go.PathSegment.Move,nt/2,0)).add(new go.PathSegment(go.PathSegment.Line,nt/2,et)))}),go.Shape.defineFigureGenerator("CircleLine",function(Dt,nt,et){var ht=nt/2,lt=new go.Geometry().add(new go.PathFigure(nt,nt/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,ht,ht,ht,ht).close()));return lt.spot1=Pe,lt.spot2=Bt,lt.defaultStretch=go.GraphObject.Uniform,lt}),go.Shape.defineFigureGenerator("Line1",function(Dt,nt,et){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=0,ht.startY=0,ht.endX=nt,ht.endY=et,ht}),go.Shape.defineFigureGenerator("Line2",function(Dt,nt,et){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=nt,ht.startY=0,ht.endX=0,ht.endY=et,ht}),go.Shape.defineFigureGenerator("Curve1",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,nt,et,Ut*nt,0,nt,(1-Ut)*et)))}),go.Shape.defineFigureGenerator("Curve2",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,nt,et,0,Ut*et,(1-Ut)*nt,et)))}),go.Shape.defineFigureGenerator("Curve3",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,Ut*et,Ut*nt,et)))}),go.Shape.defineFigureGenerator("Curve4",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,et,(1-Ut)*nt,0,0,(1-Ut)*et)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new un("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN;isNaN(ht)?ht=.1:ht<-1?ht=-1:ht>1&&(ht=1);var lt=Math.abs(ht)*nt;if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=nt,gt.endY=et,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt-lt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,lt,et).close())),ltnt&&(ht=nt);var lt=Math.abs(ht);if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=nt,gt.endY=et,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt-lt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,lt,et).close())),lt.5&&(ht=.5);var lt=Math.abs(ht)*nt;if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=nt,gt.endY=et,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,nt-lt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,lt,et).close())),ltnt&&(ht=nt/2);var lt=Math.abs(ht);if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=nt,gt.endY=et,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,nt-lt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,lt,et).close())),ltnt&&(ht=nt/2);var lt=Math.abs(ht);if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=nt,gt.endY=et,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,lt,et).close())):gt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,nt-lt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())),lt0&&(mt.add(new go.PathSegment(go.PathSegment.Move,nt/2+xt,nt/2)),mt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,lt,lt,xt,xt).close())),gt.spot1=Pe,gt.spot2=Bt,gt.defaultStretch=go.GraphObject.Uniform,gt}),go.Shape.defineFigureGenerator("Cloud",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(.08034461*nt,.1944299*et,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*nt,.05349299*et,-.09239631*nt,.07836421*et,.1406031*nt,-.0542823*et)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*nt,.074219*et,.2450511*nt,-.00697547*et,.3776197*nt,-.01112067*et)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*nt,.07004196*et,.4539471*nt,0,.6066018*nt,-.02526587*et)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*nt,.08370865*et,.6914277*nt,-.01904177*et,.8921095*nt,-.01220843*et)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*nt,.3194596*et,1.036446*nt,.04105738*et,1.020377*nt,.3022052*et)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*nt,.562044*et,1.04448*nt,.360238*et,.992256*nt,.5219009*et)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*nt,.8217117*et,1.032337*nt,.5771781*et,1.018411*nt,.8120651*et)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*nt,.9156953*et,1.028411*nt,.9571472*et,.8556702*nt,1.052487*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*nt,.9310455*et,.7431877*nt,1.009325*et,.5624123*nt,1.021761*et)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*nt,.9344623*et,.4820677*nt,1.031761*et,.3030112*nt,1.002796*et)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*nt,.870098*et,.2329994*nt,1.01518*et,.03213784*nt,1.01518*et)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*nt,.6545475*et,-.02812061*nt,.9032597*et,-.01205169*nt,.6835638*et)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*nt,.4265613*et,-.01812061*nt,.6089503*et,-.00606892*nt,.4555777*et)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*nt,.1944299*et,-.01606892*nt,.3892545*et,-.01205169*nt,.1944299*et))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(Dt,nt,et){var ht=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(ht*nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,ht*et)).add(new go.PathSegment(go.PathSegment.Line,nt,(1-ht)*et)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,et)).add(new go.PathSegment(go.PathSegment.Line,ht*nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,(1-ht)*et)).add(new go.PathSegment(go.PathSegment.Line,0,ht*et).close())).setSpots(ht/2,ht/2,1-ht/2,1-ht/2)}),go.Shape.setFigureParameter("Pie",0,new un("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new un("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN,lt=Dt?Dt.parameter2:NaN;isNaN(ht)&&(ht=0),isNaN(lt)&&(lt=315);var gt=ht%360;gt<0&&(gt+=360);var mt=lt%360,xt=Math.min(nt,et)/2;return new go.Geometry().add(new go.PathFigure(xt,xt).add(new go.PathSegment(go.PathSegment.Arc,gt,mt,xt,xt,xt,xt).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(Dt,nt,et){var ht=Ut/Math.SQRT2*.5,lt=Math.SQRT2/2,gt=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(nt,et,!0).add(new go.PathSegment(go.PathSegment.Bezier,lt*nt,gt*et,nt,(1-ht)*et,(lt+ht)*nt,(gt+ht)*et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close()))}),go.Shape.setFigureParameter("ThickCross",0,new un("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=30);var lt=Math.min(ht,nt)/2,gt=nt/2,mt=et/2;return new go.Geometry().add(new go.PathFigure(gt-lt,0,!0).add(new go.PathSegment(go.PathSegment.Line,gt+lt,0)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,mt-lt)).add(new go.PathSegment(go.PathSegment.Line,nt,mt-lt)).add(new go.PathSegment(go.PathSegment.Line,nt,mt+lt)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,mt+lt)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,et)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,mt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,mt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,mt-lt)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,mt-lt).close()))}),go.Shape.setFigureParameter("ThinCross",0,new un("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=10);var lt=Math.min(ht,nt)/2,gt=nt/2,mt=et/2;return new go.Geometry().add(new go.PathFigure(gt-lt,0,!0).add(new go.PathSegment(go.PathSegment.Line,gt+lt,0)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,mt-lt)).add(new go.PathSegment(go.PathSegment.Line,nt,mt-lt)).add(new go.PathSegment(go.PathSegment.Line,nt,mt+lt)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,mt+lt)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,et)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,mt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,mt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,mt-lt)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,mt-lt).close()))}),go.Shape.setFigureParameter("ThickX",0,new un("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN;if((isNaN(ht)||ht<0)&&(ht=30),nt===0||et===0){var lt=new go.Geometry(go.Geometry.Rectangle);return lt.startX=0,lt.startY=0,lt.endX=nt,lt.endY=et,lt}else{var gt=nt/2,mt=et/2,xt=Math.atan2(et,nt),St=ht-Math.min(Math.cos(xt)*ht/2,gt),zt=ht-Math.min(Math.sin(xt)*ht/2,mt),lt=new go.Geometry,Jt=new go.PathFigure(St,0,!0);return lt.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Line,gt,.2*et)),Jt.add(new go.PathSegment(go.PathSegment.Line,nt-St,0)),Jt.add(new go.PathSegment(go.PathSegment.Line,nt,zt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,mt)),Jt.add(new go.PathSegment(go.PathSegment.Line,nt,et-zt)),Jt.add(new go.PathSegment(go.PathSegment.Line,nt-St,et)),Jt.add(new go.PathSegment(go.PathSegment.Line,gt,.8*et)),Jt.add(new go.PathSegment(go.PathSegment.Line,St,et)),Jt.add(new go.PathSegment(go.PathSegment.Line,0,et-zt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,mt)),Jt.add(new go.PathSegment(go.PathSegment.Line,0,zt).close()),lt}}),go.Shape.setFigureParameter("ThinX",0,new un("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=10);var lt=new go.Geometry,gt=new go.PathFigure(.1*nt,0,!0);return lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.1*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.9*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.1*et).close()),lt}),go.Shape.setFigureParameter("SquareIBeam",0,new un("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN;isNaN(ht)&&(ht=.2);var lt=new go.Geometry,gt=new go.PathFigure(0,0,!0);return lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,ht*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5+ht/2)*nt,ht*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5+ht/2)*nt,(1-ht)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,(1-ht)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,(1-ht)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5-ht/2)*nt,(1-ht)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5-ht/2)*nt,ht*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,ht*et).close()),lt}),go.Shape.setFigureParameter("RoundedIBeam",0,new un("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN;isNaN(ht)&&(ht=.5);var lt=new go.Geometry,gt=new go.PathFigure(0,0,!0);return lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,et,Math.abs(1-ht)*nt,.25*et,Math.abs(1-ht)*nt,.75*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ht*nt,.75*et,ht*nt,.25*et).close()),lt}),go.Shape.defineFigureGenerator("HalfEllipse",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,Ut*nt,0,nt,(.5-Ut/2)*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,(.5+Ut/2)*et,Ut*nt,et).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,0,nt,et)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*nt,.75*et,.5*nt,.25*et).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,et,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*et,.1*nt,.8*et,0,.5*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,0,0,.45*nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,nt,.3*et,.55*nt,0,nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,.5*et,.9*nt,.8*et).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*nt,.01*et)).add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,.6*nt,.2*et,nt,.25*et)).add(new go.PathSegment(go.PathSegment.Bezier,.55*nt,.7*et,nt,.8*et,.6*nt,.8*et)).add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,et,.5*nt,.75*et,.55*nt,.95*et)).add(new go.PathSegment(go.PathSegment.Line,.25*nt,et)).add(new go.PathSegment(go.PathSegment.Bezier,.45*nt,.7*et,.45*nt,.95*et,.5*nt,.75*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,.4*nt,.8*et,0,.8*et)).add(new go.PathSegment(go.PathSegment.Bezier,.49*nt,.01*et,0,.25*et,.4*nt,.2*et).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.4*nt,.6*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.15*nt,et,.5*nt,.75*et,.45*nt,.95*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.6*nt,.6*et,.55*nt,.95*et,.5*nt,.75*et));var gt=.2,mt=.3,xt=0,St=gt*Ut;return lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+mt)*nt,(.5+gt+xt)*et,(.5-gt+mt)*nt,(.5+St+xt)*et,(.5-St+mt)*nt,(.5+gt+xt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+gt+mt)*nt,(.5+xt)*et,(.5+St+mt)*nt,(.5+gt+xt)*et,(.5+gt+mt)*nt,(.5+St+xt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+mt)*nt,(.5-gt+xt)*et,(1-.5+gt+mt)*nt,(.5-St+xt)*et,(.5+St+mt)*nt,(.5-gt+xt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.65*nt,.36771243*et,(.5-St+mt)*nt,(.5-gt+xt)*et,(.5-gt+mt+.05)*nt,(.5-St+xt-.02)*et)),gt=.2,mt=0,xt=-.3,St=gt*Ut,lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+gt+mt)*nt,(.5+xt)*et,(.5+St+mt)*nt,(.5+gt+xt)*et,(.5+gt+mt)*nt,(.5+St+xt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+mt)*nt,(.5-gt+xt)*et,(1-.5+gt+mt)*nt,(.5-St+xt)*et,(.5+St+mt)*nt,(.5-gt+xt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-gt+mt)*nt,(.5+xt)*et,(.5-St+mt)*nt,(.5-gt+xt)*et,(.5-gt+mt)*nt,(.5-St+xt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-St+mt)*nt,(.5+gt+xt)*et,(.5-gt+mt)*nt,(.5+St+xt)*et,(.5-St+mt)*nt,(.5+gt+xt)*et)),gt=.2,mt=-.3,xt=0,St=gt*Ut,lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+mt)*nt,(.5-gt+xt)*et,(1-.5+gt+mt-.05)*nt,(.5-St+xt-.02)*et,(.5+St+mt)*nt,(.5-gt+xt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-gt+mt)*nt,(.5+xt)*et,(.5-St+mt)*nt,(.5-gt+xt)*et,(.5-gt+mt)*nt,(.5-St+xt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+mt)*nt,(.5+gt+xt)*et,(.5-gt+mt)*nt,(.5+St+xt)*et,(.5-St+mt)*nt,(.5+gt+xt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,.6*et,(.5+St+mt)*nt,(.5+gt+xt)*et,(.5+gt+mt)*nt,(.5+St+xt)*et).close()),ht.setSpots(.06,.33,.93,.68),ht}),go.Shape.defineFigureGenerator("YinYang",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*.5,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,180,nt*.5,nt*.5,nt*.5,nt*.5)),lt.add(new go.PathSegment(go.PathSegment.Arc,90,-180,nt*.5,nt*.75,nt*.25,nt*.25)),lt.add(new go.PathSegment(go.PathSegment.Arc,90,180,nt*.5,nt*.25,nt*.25,nt*.25));var gt=.1,mt=.5,xt=.25;return lt.add(new go.PathSegment(go.PathSegment.Move,(mt+gt)*nt,xt*et)),lt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,nt*mt,et*xt,gt*nt,gt*nt).close()),lt=new go.PathFigure(nt*.5,0,!1),ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,-180,nt*.5,nt*.5,nt*.5,nt*.5)),xt=.75,lt=new go.PathFigure((mt+gt)*nt,xt*et,!0),ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,0,360,nt*mt,et*xt,gt*nt,gt*nt).close()),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("Peace",function(Dt,nt,et){var ht=.8535533905932737,lt=.5*nt,gt=.5*et;return new go.Geometry().add(new go.PathFigure(lt,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,lt,gt,lt,gt)).add(new go.PathSegment(go.PathSegment.Line,lt,et)).add(new go.PathSegment(go.PathSegment.Move,lt,gt)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,ht*et)).add(new go.PathSegment(go.PathSegment.Move,lt,gt)).add(new go.PathSegment(go.PathSegment.Line,ht*nt,ht*et)))}),go.Shape.defineFigureGenerator("NotAllowed",function(Dt,nt,et){var ht=new go.Geometry,lt=Ut*.5,gt=.5,mt=.5,xt=.5,St=new go.PathFigure(mt*nt,(xt-gt)*et);ht.add(St),St.add(new go.PathSegment(go.PathSegment.Bezier,(mt-gt)*nt,xt*et,(mt-lt)*nt,(xt-gt)*et,(mt-gt)*nt,(xt-lt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt+gt)*et,(mt-gt)*nt,(xt+lt)*et,(mt-lt)*nt,(xt+gt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,xt*et,(mt+lt)*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt-gt)*et,(mt+gt)*nt,(xt-lt)*et,(mt+lt)*nt,(xt-gt)*et)),gt=.4,lt=Ut*.4;var zt=Pt(),Jt=Pt(),re=Pt(),oe=Pt();Be(mt,xt-gt,mt+lt,xt-gt,mt+gt,xt-lt,mt+gt,xt,.42,zt,Jt,re,oe,oe);var $t=Pt(),Le=Pt(),de=Pt();Be(mt,xt-gt,mt+lt,xt-gt,mt+gt,xt-lt,mt+gt,xt,.58,oe,oe,de,$t,Le);var Fe=Pt(),rn=Pt(),De=Pt();Be(mt,xt+gt,mt-lt,xt+gt,mt-gt,xt+lt,mt-gt,xt,.42,Fe,rn,De,oe,oe);var jn=Pt(),Bn=Pt(),an=Pt();return Be(mt,xt+gt,mt-lt,xt+gt,mt-gt,xt+lt,mt-gt,xt,.58,oe,oe,an,jn,Bn),St.add(new go.PathSegment(go.PathSegment.Move,an.x*nt,an.y*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,(mt-gt)*nt,xt*et,jn.x*nt,jn.y*et,Bn.x*nt,Bn.y*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt-gt)*et,(mt-gt)*nt,(xt-lt)*et,(mt-lt)*nt,(xt-gt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,re.x*nt,re.y*et,zt.x*nt,zt.y*et,Jt.x*nt,Jt.y*et)),St.add(new go.PathSegment(go.PathSegment.Line,an.x*nt,an.y*et).close()),St.add(new go.PathSegment(go.PathSegment.Move,De.x*nt,De.y*et)),St.add(new go.PathSegment(go.PathSegment.Line,de.x*nt,de.y*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,xt*et,$t.x*nt,$t.y*et,Le.x*nt,Le.y*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et,(mt+lt)*nt,(xt+gt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,De.x*nt,De.y*et,Fe.x*nt,Fe.y*et,rn.x*nt,rn.y*et).close()),ne(zt),ne(Jt),ne(re),ne(oe),ne($t),ne(Le),ne(de),ne(Fe),ne(rn),ne(De),ne(jn),ne(Bn),ne(an),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("Fragile",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*nt,0)).add(new go.PathSegment(go.PathSegment.Line,.2*nt,.15*et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.25*et)).add(new go.PathSegment(go.PathSegment.Line,.29*nt,.33*et)).add(new go.PathSegment(go.PathSegment.Line,.35*nt,.25*et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.15*et)).add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*nt,.5*et,nt,.25*et,.75*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.55*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.45*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.45*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.5*et,0,.25*et).close()))}),go.Shape.setFigureParameter("HourGlass",0,new un("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=30),ht>nt&&(ht=nt);var lt=(nt-ht)/2,gt=lt+ht;return new go.Geometry().add(new go.PathFigure(gt,.5*et).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et)).add(new go.PathSegment(go.PathSegment.Line,lt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,nt,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,.55*et).add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.45*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.45*et)).add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.55*et).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(Dt,nt,et){var ht=new go.Geometry,lt=Ut*.4,gt=.4,mt=.5,xt=.5,St=Pt(),zt=Pt(),Jt=Pt(),re=Pt(),oe=new go.PathFigure((mt-gt)*nt,xt*et,!1);ht.add(oe),oe.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt-gt)*et,(mt-gt)*nt,(xt-lt)*et,(mt-lt)*nt,(xt-gt)*et)),Be(mt,xt-gt,mt+lt,xt-gt,mt+gt,xt-lt,mt+gt,xt,.44,Jt,re,zt,St,St),oe.add(new go.PathSegment(go.PathSegment.Bezier,zt.x*nt,zt.y*et,Jt.x*nt,Jt.y*et,re.x*nt,re.y*et));var $t=Mt(zt.x,zt.y);Be(mt,xt-gt,mt+lt,xt-gt,mt+gt,xt-lt,mt+gt,xt,.56,St,St,zt,Jt,re);var Le=Mt(zt.x,zt.y);oe.add(new go.PathSegment(go.PathSegment.Line,($t.x*.1+.95*.9)*nt,$t.y*.1*et)),oe.add(new go.PathSegment(go.PathSegment.Line,.85*nt,$t.y*.1*et)),oe.add(new go.PathSegment(go.PathSegment.Line,.85*nt,0)),oe.add(new go.PathSegment(go.PathSegment.Line,nt,0)),oe.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),oe.add(new go.PathSegment(go.PathSegment.Line,(Le.x*.1+.9)*nt,.15*et)),oe.add(new go.PathSegment(go.PathSegment.Line,(Le.x*.1+.9)*nt,(Le.y*.1+.05*.9)*et)),oe.add(new go.PathSegment(go.PathSegment.Line,Le.x*nt,Le.y*et)),oe.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,xt*et,Jt.x*nt,Jt.y*et,re.x*nt,re.y*et)),oe.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et,(mt+lt)*nt,(xt+gt)*et)),oe.add(new go.PathSegment(go.PathSegment.Bezier,(mt-gt)*nt,xt*et,(mt-lt)*nt,(xt+gt)*et,(mt-gt)*nt,(xt+lt)*et)),gt=.35,lt=Ut*.35;var de=new go.PathFigure(mt*nt,(xt-gt)*et,!1);ht.add(de),de.add(new go.PathSegment(go.PathSegment.Bezier,(mt-gt)*nt,xt*et,(mt-lt)*nt,(xt-gt)*et,(mt-gt)*nt,(xt-lt)*et)),de.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt+gt)*et,(mt-gt)*nt,(xt+lt)*et,(mt-lt)*nt,(xt+gt)*et)),de.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,xt*et,(mt+lt)*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et)),de.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt-gt)*et,(mt+gt)*nt,(xt-lt)*et,(mt+lt)*nt,(xt-gt)*et));var Fe=new go.PathFigure((mt-gt)*nt,xt*et,!1);return ht.add(Fe),ne(St),ne(zt),ne(Jt),ne(re),ne($t),ne(Le),ht.spot1=new go.Spot(.202,.257),ht.spot2=new go.Spot(.792,.739),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("GenderFemale",function(Dt,nt,et){var ht=new go.Geometry,lt=.375,gt=0,mt=-.125,xt=lt*Ut,St=new go.PathFigure((.525+gt)*nt,(.5+lt+mt)*et,!1);ht.add(St),St.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+gt)*nt,(.5+mt)*et,(.5+xt+gt)*nt,(.5+lt+mt)*et,(.5+lt+gt)*nt,(.5+xt+mt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*nt,(.5-lt+mt)*et,(1-.5+lt+gt)*nt,(.5-xt+mt)*et,(.5+xt+gt)*nt,(.5-lt+mt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+gt)*nt,(.5+mt)*et,(.5-xt+gt)*nt,(.5-lt+mt)*et,(.5-lt+gt)*nt,(.5-xt+mt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,(.475+gt)*nt,(.5+lt+mt)*et,(.5-lt+gt)*nt,(.5+xt+mt)*et,(.5-xt+gt)*nt,(.5+lt+mt)*et)),St.add(new go.PathSegment(go.PathSegment.Line,.475*nt,.85*et)),St.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.85*et)),St.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.9*et)),St.add(new go.PathSegment(go.PathSegment.Line,.475*nt,.9*et)),St.add(new go.PathSegment(go.PathSegment.Line,.475*nt,et)),St.add(new go.PathSegment(go.PathSegment.Line,.525*nt,et)),St.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.9*et)),St.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.9*et)),St.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.85*et)),St.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.85*et).close()),lt=.325,gt=0,mt=-.125,xt=lt*Ut;var St=new go.PathFigure((1-.5+lt+gt)*nt,(.5+mt)*et,!1);ht.add(St),St.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*nt,(.5+lt+mt)*et,(.5+lt+gt)*nt,(.5+xt+mt)*et,(.5+xt+gt)*nt,(.5+lt+mt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+gt)*nt,(.5+mt)*et,(.5-xt+gt)*nt,(.5+lt+mt)*et,(.5-lt+gt)*nt,(.5+xt+mt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*nt,(.5-lt+mt)*et,(.5-lt+gt)*nt,(.5-xt+mt)*et,(.5-xt+gt)*nt,(.5-lt+mt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+gt)*nt,(.5+mt)*et,(.5+xt+gt)*nt,(.5-lt+mt)*et,(1-.5+lt+gt)*nt,(.5-xt+mt)*et));var St=new go.PathFigure((.525+gt)*nt,(.5+lt+mt)*et,!1);return ht.add(St),ht.spot1=new go.Spot(.232,.136),ht.spot2=new go.Spot(.682,.611),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("LogicImplies",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN;return isNaN(ht)&&(ht=.2),new go.Geometry().add(new go.PathFigure((1-ht)*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,et)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN;return isNaN(ht)&&(ht=.2),new go.Geometry().add(new go.PathFigure((1-ht)*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,et)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Move,ht*nt,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,ht*nt,et))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)))}),go.Shape.defineFigureGenerator("LogicAnd",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,nt,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(Dt,nt,et){var ht=new go.Geometry().add(new go.PathFigure(.5*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*nt,.5*et,.5*nt,.5*et)));return ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("LogicTruth",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,.5*nt,0)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Move,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Move,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et)))}),go.Shape.defineFigureGenerator("LogicForAll",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,.25*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.75*nt,.5*et))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Move,0,et)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(Dt,nt,et){var ht=.5;return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,0,ht*et)).add(new go.PathSegment(go.PathSegment.Arc,180,180,ht*nt,ht*et,ht*nt,ht*et)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(Dt,nt,et){var ht=.5;return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,ht*et)).add(new go.PathSegment(go.PathSegment.Arc,0,180,ht*nt,ht*et,ht*nt,ht*et)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new un("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new un("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN;isNaN(ht)&&(ht=.3);var lt=Dt?Dt.parameter2:NaN;isNaN(lt)&&(lt=.3);var gt=(1-ht)*nt,mt=(.5-lt/2)*et,xt=(.5+lt/2)*et,St=new go.Geometry,zt=new go.PathFigure(0,mt,!0);St.add(zt),zt.add(new go.PathSegment(go.PathSegment.Line,gt,mt)),zt.add(new go.PathSegment(go.PathSegment.Line,gt,0)),zt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),zt.add(new go.PathSegment(go.PathSegment.Line,gt,et)),zt.add(new go.PathSegment(go.PathSegment.Line,gt,xt)),zt.add(new go.PathSegment(go.PathSegment.Line,0,xt).close()),St.spot1=new go.Spot(0,mt/et);var Jt=Ne(0,xt/et,1,xt/et,gt/nt,1,1,.5,Pt());return St.spot2=new go.Spot(Jt.x,Jt.y),ne(Jt),St}),go.Shape.setFigureParameter("Arrow2",0,new un("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new un("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN;isNaN(ht)&&(ht=30),ht>nt&&(ht=nt);var lt=Dt?Dt.parameter2:NaN;isNaN(lt)&&(lt=30),lt=Math.min(lt,et/2);var gt=nt-ht,mt=(et-lt)/2,xt=mt+lt,St=new go.Geometry,zt=new go.PathFigure(0,mt,!0);St.add(zt),zt.add(new go.PathSegment(go.PathSegment.Line,gt,mt)),zt.add(new go.PathSegment(go.PathSegment.Line,gt,0)),zt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),zt.add(new go.PathSegment(go.PathSegment.Line,gt,et)),zt.add(new go.PathSegment(go.PathSegment.Line,gt,xt)),zt.add(new go.PathSegment(go.PathSegment.Line,0,xt).close()),St.spot1=new go.Spot(0,mt/et);var Jt=Ne(0,xt/et,1,xt/et,gt/nt,1,1,.5,Pt());return St.spot2=new go.Spot(Jt.x,Jt.y),ne(Jt),St}),go.Shape.defineFigureGenerator("Chevron",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et).close()),ht}),go.Shape.defineFigureGenerator("DoubleArrow",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.214*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,1*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,1*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.786*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,1*et).close()),ht}),go.Shape.setFigureParameter("DoubleEndArrow",0,new un("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN;isNaN(ht)&&(ht=.3);var lt=(.5-ht/2)*et,gt=(.5+ht/2)*et,mt=new go.Geometry,xt=new go.PathFigure(nt,.5*et,!0);mt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,gt)),xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,gt)),xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0)),xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,lt)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,lt)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close());var St=Ne(0,.5,.3,0,0,lt/et,.1,lt/et,Pt());return mt.spot1=new go.Spot(St.x,St.y),St=Ne(.7,1,1,.5,0,gt/et,1,gt/et,St),mt.spot2=new go.Spot(St.x,St.y),ne(St),mt}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new un("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new un("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN;isNaN(ht)&&(ht=40);var lt=Dt?Dt.parameter2:NaN;isNaN(lt)&&(lt=100);var gt=(et-ht)/2,mt=gt+ht,xt=(et-lt)/2,St=xt+lt;(ht>et||lt>et)&&(lt>ht?(ht=ht*et/lt,gt=(et-ht)/2,mt=gt+ht,xt=0,St=et):(gt=0,mt=et,xt=0,St=et));var zt=new go.Geometry,Jt=new go.PathFigure(nt,.5*et,!0);zt.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,St)),Jt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,mt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,mt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,St)),Jt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),Jt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,xt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,gt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,gt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,xt).close());var re=Ne(0,.5,.3,xt/et,0,gt/et,1,gt/et,Pt());return zt.spot1=new go.Spot(re.x,re.y),re=Ne(.7,St/et,1,.5,0,mt/et,1,mt/et,re),zt.spot2=new go.Spot(re.x,re.y),ne(re),zt}),go.Shape.setFigureParameter("IBeamArrow",0,new un("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN;isNaN(ht)&&(ht=.3);var lt=(.5-ht/2)*et,gt=(.5+ht/2)*et,mt=new go.Geometry,xt=new go.PathFigure(nt,.5*et,!0);mt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,gt)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,gt)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,0)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,0)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,lt)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,lt)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),mt.spot1=new go.Spot(0,lt/et);var St=Ne(.7,1,1,.5,0,gt/et,1,gt/et,Pt());return mt.spot2=new go.Spot(St.x,St.y),ne(St),mt}),go.Shape.setFigureParameter("IBeamArrow2",0,new un("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new un("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN;isNaN(ht)&&(ht=40);var lt=Dt?Dt.parameter2:NaN;isNaN(lt)&&(lt=100);var gt=(et-ht)/2,mt=gt+ht,xt=(et-lt)/2,St=xt+lt;(ht>et||lt>et)&&(lt>ht?(ht=ht*et/lt,gt=(et-ht)/2,mt=gt+ht,xt=0,St=et):(gt=0,mt=et,xt=0,St=et));var zt=new go.Geometry,Jt=new go.PathFigure(nt,.5*et,!0);zt.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,St)),Jt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,mt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,mt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,St)),Jt.add(new go.PathSegment(go.PathSegment.Line,0,St)),Jt.add(new go.PathSegment(go.PathSegment.Line,0,xt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,xt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,gt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,gt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,xt).close()),zt.spot1=new go.Spot(0,gt/et);var re=Ne(.7,St/et,1,.5,0,mt/et,1,mt/et,Pt());return zt.spot2=new go.Spot(re.x,re.y),ne(re),zt}),go.Shape.setFigureParameter("Pointer",0,new un("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN;isNaN(ht)&&(ht=.1);var lt=new go.Geometry,gt=new go.PathFigure(nt,.5*et,!0);lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,et)),gt.add(new go.PathSegment(go.PathSegment.Line,ht*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),lt.spot1=new go.Spot(ht,.35);var mt=Ne(.2,.65,1,.65,0,1,1,.5,Pt());return lt.spot2=new go.Spot(mt.x,mt.y),ne(mt),lt}),go.Shape.setFigureParameter("RoundedPointer",0,new un("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN;isNaN(ht)&&(ht=.3);var lt=new go.Geometry,gt=new go.PathFigure(nt,.5*et,!0);lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ht*nt,.75*et,ht*nt,.25*et).close()),lt.spot1=new go.Spot(ht,.35);var mt=Ne(0,.65,1,.65,0,1,1,.5,Pt());return lt.spot2=new go.Spot(mt.x,mt.y),ne(mt),lt}),go.Shape.setFigureParameter("SplitEndArrow",0,new un("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN;isNaN(ht)&&(ht=.4);var lt=(.5-ht/2)*et,gt=(.5+ht/2)*et,mt=new go.Geometry,xt=new go.PathFigure(nt,.5*et,!0);mt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,gt)),xt.add(new go.PathSegment(go.PathSegment.Line,0,gt)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,lt)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),mt.spot1=new go.Spot(.2,.3);var St=Ne(.7,1,1,.5,0,gt/et,1,gt/et,Pt());return mt.spot2=new go.Spot(St.x,St.y),ne(St),mt}),go.Shape.setFigureParameter("SplitEndArrow2",0,new un("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN;isNaN(ht)&&(ht=50);var lt=(et-ht)/2,gt=lt+ht;ht>et&&(lt=0,gt=et);var mt=new go.Geometry,xt=new go.PathFigure(nt,.5*et,!0);mt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,gt)),xt.add(new go.PathSegment(go.PathSegment.Line,0,gt)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,lt)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),mt.spot1=new go.Spot(.2,lt/et);var St=Ne(.7,1,1,.5,0,gt/et,1,gt/et,Pt());return mt.spot2=new go.Spot(St.x,St.y),ne(St),mt}),go.Shape.setFigureParameter("SquareArrow",0,new un("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN;isNaN(ht)&&(ht=.7);var lt=new go.Geometry,gt=new go.PathFigure(nt,.5*et,!0);return lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,ht*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,0)),gt.add(new go.PathSegment(go.PathSegment.Line,ht*nt,0).close()),lt.spot1=go.Spot.TopLeft,lt.spot2=new go.Spot(ht,1),lt}),go.Shape.defineFigureGenerator("Cone1",function(Dt,nt,et){var ht=new go.Geometry,lt=Ut*.5,gt=Ut*.1,mt=new go.PathFigure(0,.9*et,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.9+gt)*et,(.5+lt)*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-lt)*nt,et,0,(.9+gt)*et).close()),ht.spot1=new go.Spot(.25,.5),ht.spot2=new go.Spot(.75,.97),ht}),go.Shape.defineFigureGenerator("Cone2",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.9*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.9*et,(1-.85/.9)*nt,et,.85/.9*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.9*et).close());var gt=new go.PathFigure(0,.9*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.9*et,(1-.85/.9)*nt,.8*et,.85/.9*nt,.8*et)),ht.spot1=new go.Spot(.25,.5),ht.spot2=new go.Spot(.75,.82),ht}),go.Shape.defineFigureGenerator("Cube1",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.5*nt,et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.15*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.85*et).close());var gt=new go.PathFigure(.5*nt,et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.3*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.15*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.3*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),ht.spot1=new go.Spot(0,.3),ht.spot2=new go.Spot(.5,.85),ht}),go.Shape.defineFigureGenerator("Cube2",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.3*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0).close());var gt=new go.PathFigure(0,.3*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.3*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Move,.7*nt,.3*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),ht.spot1=new go.Spot(0,.3),ht.spot2=new go.Spot(.7,1),ht}),go.Shape.defineFigureGenerator("Cylinder1",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,et/3);var lt=new go.Geometry,gt=Ut*.5,mt=new go.PathFigure(0,ht,!0);lt.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,Ut*ht,(.5-gt)*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,1*nt,ht,(.5+gt)*nt,0,1*nt,Ut*ht)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,et-ht)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,1*et,1*nt,et-Ut*ht,(.5+gt)*nt,1*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-ht,(.5-gt)*nt,1*et,0,et-Ut*ht)),mt.add(new go.PathSegment(go.PathSegment.Line,0,ht));var xt=new go.PathFigure(nt,ht,!1);return lt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,2*ht,1*nt,2*ht-Ut*ht,(.5+gt)*nt,2*ht)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,ht,(.5-gt)*nt,2*ht,0,2*ht-Ut*ht)),lt.spot1=new go.Spot(0,0,0,2*ht),lt.spot2=new go.Spot(1,1),lt}),go.Shape.defineFigureGenerator("Cylinder2",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,et/3);var lt=new go.Geometry,gt=Ut*.5,mt=new go.PathFigure(0,et-ht,!0);lt.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,0,ht)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,Ut*ht,(.5-gt)*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,ht,(.5+gt)*nt,0,nt,Ut*ht)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,et-ht)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,et-Ut*ht,(.5+gt)*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-ht,(.5-gt)*nt,et,0,et-Ut*ht));var xt=new go.PathFigure(0,et-ht,!1);return lt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et-2*ht,0,et-ht-Ut*ht,(.5-gt)*nt,et-2*ht)),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt,et-ht,(.5+gt)*nt,et-2*ht,nt,et-ht-Ut*ht)),lt.spot1=new go.Spot(0,0),lt.spot2=new go.Spot(1,1,0,-2*ht),lt}),go.Shape.defineFigureGenerator("Cylinder3",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,nt/3);var lt=new go.Geometry,gt=Ut*.5,mt=new go.PathFigure(ht,0,!0);lt.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt-ht,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,nt-Ut*ht,0,nt,(.5-gt)*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt-ht,et,nt,(.5+gt)*et,nt-Ut*ht,et)),mt.add(new go.PathSegment(go.PathSegment.Line,ht,et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,Ut*ht,et,0,(.5+gt)*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,(.5-gt)*et,Ut*ht,0));var xt=new go.PathFigure(ht,0,!1);return lt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,2*ht,.5*et,ht+Ut*ht,0,2*ht,(.5-gt)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,ht,et,2*ht,(.5+gt)*et,ht+Ut*ht,et)),lt.spot1=new go.Spot(0,0,2*ht,0),lt.spot2=new go.Spot(1,1),lt}),go.Shape.defineFigureGenerator("Cylinder4",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,nt/3);var lt=new go.Geometry,gt=Ut*.5,mt=new go.PathFigure(nt-ht,0,!0);lt.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,nt-Ut*ht,0,nt,(.5-gt)*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt-ht,et,nt,(.5+gt)*et,nt-Ut*ht,et)),mt.add(new go.PathSegment(go.PathSegment.Line,ht,et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,Ut*ht,et,0,(.5+gt)*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,(.5-gt)*et,Ut*ht,0)),mt.add(new go.PathSegment(go.PathSegment.Line,nt-ht,0));var xt=new go.PathFigure(nt-ht,0,!1);return lt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt-2*ht,.5*et,nt-ht-Ut*ht,0,nt-2*ht,(.5-gt)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt-ht,et,nt-2*ht,(.5+gt)*et,nt-ht-Ut*ht,et)),lt.spot1=new go.Spot(0,0),lt.spot2=new go.Spot(1,1,-2*ht,0),lt}),go.Shape.defineFigureGenerator("Prism1",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.25*nt,.25*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var gt=new go.PathFigure(.25*nt,.25*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),ht.spot1=new go.Spot(.408,.172),ht.spot2=new go.Spot(.833,.662),ht}),go.Shape.defineFigureGenerator("Prism2",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.25*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var gt=new go.PathFigure(0,et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),gt.add(new go.PathSegment(go.PathSegment.Move,0,.25*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.5*et)),ht.spot1=new go.Spot(.25,.5),ht.spot2=new go.Spot(.75,.75),ht}),go.Shape.defineFigureGenerator("Pyramid1",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.75*et).close());var gt=new go.PathFigure(.5*nt,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),ht.spot1=new go.Spot(.25,.367),ht.spot2=new go.Spot(.75,.875),ht}),go.Shape.defineFigureGenerator("Pyramid2",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.85*et).close());var gt=new go.PathFigure(.5*nt,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.7*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.85*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.7*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),ht.spot1=new go.Spot(.25,.367),ht.spot2=new go.Spot(.75,.875),ht}),go.Shape.defineFigureGenerator("Actor",function(Dt,nt,et){var ht=new go.Geometry,lt=.2,gt=.1,mt=Ut*lt,xt=Ut*gt,St=.5,zt=.1,Jt=new go.PathFigure(St*nt,(zt+gt)*et,!0);ht.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(St-lt)*nt,zt*et,(St-mt)*nt,(zt+gt)*et,(St-lt)*nt,(zt+xt)*et)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,St*nt,(zt-gt)*et,(St-lt)*nt,(zt-xt)*et,(St-mt)*nt,(zt-gt)*et)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(St+lt)*nt,zt*et,(St+mt)*nt,(zt-gt)*et,(St+lt)*nt,(zt-xt)*et)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,St*nt,(zt+gt)*et,(St+lt)*nt,(zt+xt)*et,(St+mt)*nt,(zt+gt)*et));var re=.05,oe=Ut*re;St=.05,zt=.25;var $t=new go.PathFigure(.5*nt,.2*et,!0);return ht.add($t),$t.add(new go.PathSegment(go.PathSegment.Line,.95*nt,.2*et)),St=.95,zt=.25,$t.add(new go.PathSegment(go.PathSegment.Bezier,(St+re)*nt,zt*et,(St+oe)*nt,(zt-re)*et,(St+re)*nt,(zt-oe)*et)),$t.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.35*et)),re=.025,oe=Ut*re,St=.825,zt=.35,$t.add(new go.PathSegment(go.PathSegment.Bezier,St*nt,(zt-re)*et,(St+re)*nt,(zt-oe)*et,(St+oe)*nt,(zt-re)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(St-re)*nt,zt*et,(St-oe)*nt,(zt-re)*et,(St-re)*nt,(zt-oe)*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),$t.add(new go.PathSegment(go.PathSegment.Line,.55*nt,et)),$t.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.7*et)),re=.05,oe=Ut*re,St=.5,zt=.7,$t.add(new go.PathSegment(go.PathSegment.Bezier,St*nt,(zt-re)*et,(St+re)*nt,(zt-oe)*et,(St+oe)*nt,(zt-re)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(St-re)*nt,zt*et,(St-oe)*nt,(zt-re)*et,(St-re)*nt,(zt-oe)*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.45*nt,et)),$t.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),$t.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.35*et)),re=.025,oe=Ut*re,St=.175,zt=.35,$t.add(new go.PathSegment(go.PathSegment.Bezier,St*nt,(zt-re)*et,(St+re)*nt,(zt-oe)*et,(St+oe)*nt,(zt-re)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(St-re)*nt,zt*et,(St-oe)*nt,(zt-re)*et,(St-re)*nt,(zt-oe)*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et)),$t.add(new go.PathSegment(go.PathSegment.Line,0,.6*et)),$t.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),re=.05,oe=Ut*re,St=.05,zt=.25,$t.add(new go.PathSegment(go.PathSegment.Bezier,St*nt,(zt-re)*et,(St-re)*nt,(zt-oe)*et,(St-oe)*nt,(zt-re)*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.2*et)),ht.spot1=new go.Spot(.2,.2),ht.spot2=new go.Spot(.8,.65),ht}),go.Shape.setFigureParameter("Card",0,new un("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN;isNaN(ht)&&(ht=.2);var lt=new go.Geometry,gt=new go.PathFigure(nt,0,!0);return lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,ht*et)),gt.add(new go.PathSegment(go.PathSegment.Line,ht*nt,0).close()),lt.spot1=new go.Spot(0,ht),lt.spot2=go.Spot.BottomRight,lt}),go.Shape.defineFigureGenerator("Collate",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.5*nt,.5*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et));var gt=new go.PathFigure(.5*nt,.5*et,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),ht.spot1=new go.Spot(.25,0),ht.spot2=new go.Spot(.75,.25),ht}),go.Shape.defineFigureGenerator("CreateRequest",function(Dt,nt,et){var ht=new go.Geometry,lt=Dt?Dt.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var mt=new go.PathFigure(0,lt*et,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt,lt*et)),mt.add(new go.PathSegment(go.PathSegment.Move,0,(1-lt)*et)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,(1-lt)*et)),ht}),go.Shape.defineFigureGenerator("Database",function(Dt,nt,et){var ht=new go.Geometry,lt=Ut*.5,gt=Ut*.1,mt=new go.PathFigure(nt,.1*et,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.9+gt)*et,(.5+lt)*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-lt)*nt,et,0,(.9+gt)*et)),mt.add(new go.PathSegment(go.PathSegment.Line,0,.1*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,(.1-gt)*et,(.5-lt)*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,(.5+lt)*nt,0,nt,(.1-gt)*et));var xt=new go.PathFigure(nt,.1*et,!1);return ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,nt,(.1+gt)*et,(.5+lt)*nt,.2*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*et,(.5-lt)*nt,.2*et,0,(.1+gt)*et)),xt.add(new go.PathSegment(go.PathSegment.Move,nt,.2*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,nt,(.2+gt)*et,(.5+lt)*nt,.3*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*et,(.5-lt)*nt,.3*et,0,(.2+gt)*et)),xt.add(new go.PathSegment(go.PathSegment.Move,nt,.3*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.4*et,nt,(.3+gt)*et,(.5+lt)*nt,.4*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*et,(.5-lt)*nt,.4*et,0,(.3+gt)*et)),ht.spot1=new go.Spot(0,.4),ht.spot2=new go.Spot(1,.9),ht}),go.Shape.defineFigureGenerator("DataStorage",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,et,nt,0,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.9*et,.25*nt,.1*et).close()),ht.spot1=new go.Spot(.226,0),ht.spot2=new go.Spot(.81,1),ht}),go.Shape.defineFigureGenerator("DiskStorage",function(Dt,nt,et){var ht=new go.Geometry,lt=Ut*.5,gt=Ut*.1,mt=new go.PathFigure(nt,.1*et,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.9+gt)*et,(.5+lt)*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-lt)*nt,et,0,(.9+gt)*et)),mt.add(new go.PathSegment(go.PathSegment.Line,0,.1*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,(.1-gt)*et,(.5-lt)*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,(.5+lt)*nt,0,nt,(.1-gt)*et));var xt=new go.PathFigure(nt,.1*et,!1);return ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,nt,(.1+gt)*et,(.5+lt)*nt,.2*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*et,(.5-lt)*nt,.2*et,0,(.1+gt)*et)),xt.add(new go.PathSegment(go.PathSegment.Move,nt,.2*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,nt,(.2+gt)*et,(.5+lt)*nt,.3*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*et,(.5-lt)*nt,.3*et,0,(.2+gt)*et)),ht.spot1=new go.Spot(0,.3),ht.spot2=new go.Spot(1,.9),ht}),go.Shape.defineFigureGenerator("Display",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.25*nt,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,et,nt,0,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et).close()),ht.spot1=new go.Spot(.25,0),ht.spot2=new go.Spot(.75,1),ht}),go.Shape.defineFigureGenerator("DividedEvent",function(Dt,nt,et){var ht=new go.Geometry,lt=Dt?Dt.parameter1:NaN;isNaN(lt)?lt=.2:lt<.15&&(lt=.15);var gt=Ut*.2,mt=new go.PathFigure(0,.2*et,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,0,(.2-gt)*et,(.2-gt)*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.2*et,(.8+gt)*nt,0,nt,(.2-gt)*et)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,et,nt,(.8+gt)*et,(.8+gt)*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*et,(.2-gt)*nt,et,0,(.8+gt)*et)),mt.add(new go.PathSegment(go.PathSegment.Line,0,.2*et));var xt=new go.PathFigure(0,lt*et,!1);return ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt,lt*et)),ht}),go.Shape.defineFigureGenerator("DividedProcess",function(Dt,nt,et){var ht=new go.Geometry,lt=Dt?Dt.parameter1:NaN;(isNaN(lt)||lt<.1)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var mt=new go.PathFigure(0,lt*et,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt,lt*et)),ht}),go.Shape.defineFigureGenerator("Document",function(Dt,nt,et){var ht=new go.Geometry;et=et/.8;var lt=new go.PathFigure(0,.7*et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.5*nt,.4*et,.5*nt,et).close()),ht.spot1=go.Spot.TopLeft,ht.spot2=new go.Spot(1,.6),ht}),go.Shape.defineFigureGenerator("ExternalOrganization",function(Dt,nt,et){var ht=new go.Geometry,lt=Dt?Dt.parameter1:NaN;(isNaN(lt)||lt<.2)&&(lt=.2);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var mt=new go.PathFigure(lt*nt,0,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,0,lt*et)),mt.add(new go.PathSegment(go.PathSegment.Move,nt,lt*et)),mt.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Move,0,(1-lt)*et)),mt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Move,(1-lt)*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,(1-lt)*et)),ht}),go.Shape.defineFigureGenerator("ExternalProcess",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et).close());var gt=new go.PathFigure(.1*nt,.4*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.9*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.6*nt,.1*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.1*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.4*nt,.9*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.9*et)),ht.spot1=new go.Spot(.25,.25),ht.spot2=new go.Spot(.75,.75),ht}),go.Shape.defineFigureGenerator("File",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var gt=new go.PathFigure(.75*nt,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.25*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),ht.spot1=new go.Spot(0,.25),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("Interrupt",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt,.5*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et));var gt=new go.PathFigure(nt,.5*et,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et));var mt=new go.PathFigure(nt,.5*et,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.5,.75),ht}),go.Shape.defineFigureGenerator("InternalStorage",function(Dt,nt,et){var ht=new go.Geometry,lt=Dt?Dt.parameter1:NaN,gt=Dt?Dt.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(gt)&&(gt=.1);var mt=new go.PathFigure(0,0,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),mt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var xt=new go.PathFigure(lt*nt,0,!1);return ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Move,0,gt*et)),xt.add(new go.PathSegment(go.PathSegment.Line,nt,gt*et)),ht}),go.Shape.defineFigureGenerator("Junction",function(Dt,nt,et){var ht=new go.Geometry,lt=1/Math.SQRT2,gt=(1-1/Math.SQRT2)/2,mt=Ut*.5,xt=.5,St=new go.PathFigure(nt,xt*et,!0);ht.add(St),St.add(new go.PathSegment(go.PathSegment.Bezier,xt*nt,et,nt,(xt+mt)*et,(xt+mt)*nt,et)),St.add(new go.PathSegment(go.PathSegment.Bezier,0,xt*et,(xt-mt)*nt,et,0,(xt+mt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,xt*nt,0,0,(xt-mt)*et,(xt-mt)*nt,0)),St.add(new go.PathSegment(go.PathSegment.Bezier,nt,xt*et,(xt+mt)*nt,0,nt,(xt-mt)*et));var zt=new go.PathFigure((gt+lt)*nt,(gt+lt)*et,!1);return ht.add(zt),zt.add(new go.PathSegment(go.PathSegment.Line,gt*nt,gt*et)),zt.add(new go.PathSegment(go.PathSegment.Move,gt*nt,(gt+lt)*et)),zt.add(new go.PathSegment(go.PathSegment.Line,(gt+lt)*nt,gt*et)),ht}),go.Shape.defineFigureGenerator("LinedDocument",function(Dt,nt,et){var ht=new go.Geometry;et=et/.8;var lt=new go.PathFigure(0,.7*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.5*nt,.4*et,.5*nt,et).close());var gt=new go.PathFigure(.1*nt,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.75*et)),ht.spot1=new go.Spot(.1,0),ht.spot2=new go.Spot(1,.6),ht}),go.Shape.defineFigureGenerator("LoopLimit",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("MagneticTape",function(Dt,nt,et){var ht=new go.Geometry,lt=Ut*.5,gt=.5,mt=new go.PathFigure(.5*nt,et,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*et,(gt-lt)*nt,et,0,(gt+lt)*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,0,0,(gt-lt)*et,(gt-lt)*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,gt*et,(gt+lt)*nt,0,nt,(gt-lt)*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+.1)*nt,.9*et,nt,(gt+lt)*et,(gt+lt)*nt,.9*et)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),mt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),ht.spot1=new go.Spot(.15,.15),ht.spot2=new go.Spot(.85,.8),ht}),go.Shape.defineFigureGenerator("ManualInput",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*et).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("MessageFromUser",function(Dt,nt,et){var ht=new go.Geometry,lt=Dt?Dt.parameter1:NaN;isNaN(lt)&&(lt=.7);var gt=new go.PathFigure(0,0,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht.spot1=go.Spot.TopLeft,ht}),go.Shape.defineFigureGenerator("MicroformProcessing",function(Dt,nt,et){var ht=new go.Geometry,lt=Dt?Dt.parameter1:NaN;isNaN(lt)&&(lt=.25);var gt=new go.PathFigure(0,0,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,lt*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,(1-lt)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht}),go.Shape.defineFigureGenerator("MicroformRecording",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(1,.75),ht}),go.Shape.defineFigureGenerator("MultiDocument",function(Dt,nt,et){var ht=new go.Geometry;et=et/.8;var lt=new go.PathFigure(nt,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,.44*et,.96*nt,.47*et,.93*nt,.45*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.54*et,.86*nt,.57*et,.83*nt,.55*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.4*nt,.4*et,.4*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,0).close());var gt=new go.PathFigure(.1*nt,.2*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.54*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.1*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.1*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.44*et)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.8,.77),ht}),go.Shape.defineFigureGenerator("MultiProcess",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.1*nt,.1*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.9*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.9*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.2*et).close());var gt=new go.PathFigure(.2*nt,.1*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.1*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.1*nt,.2*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.9*et)),ht.spot1=new go.Spot(0,.2),ht.spot2=new go.Spot(.8,1),ht}),go.Shape.defineFigureGenerator("OfflineStorage",function(Dt,nt,et){var ht=new go.Geometry,lt=Dt?Dt.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=1-lt,mt=new go.PathFigure(0,0,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),mt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et).close());var xt=new go.PathFigure(.5*lt*nt,lt*et,!1);return ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,(1-.5*lt)*nt,lt*et)),ht}),go.Shape.defineFigureGenerator("OffPageConnector",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht.spot1=go.Spot.TopLeft,ht.spot2=new go.Spot(.75,1),ht}),go.Shape.defineFigureGenerator("Or",function(Dt,nt,et){var ht=new go.Geometry,lt=Ut*.5,gt=.5,mt=new go.PathFigure(nt,gt*et,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,et,nt,(gt+lt)*et,(gt+lt)*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*et,(gt-lt)*nt,et,0,(gt+lt)*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,0,0,(gt-lt)*et,(gt-lt)*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,gt*et,(gt+lt)*nt,0,nt,(gt-lt)*et));var xt=new go.PathFigure(nt,.5*et,!1);return ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),ht}),go.Shape.defineFigureGenerator("PaperTape",function(Dt,nt,et){var ht=new go.Geometry;et=et/.8;var lt=new go.PathFigure(0,.7*et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.3*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.3*et,.5*nt,.6*et,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.5*nt,.4*et,.5*nt,et).close()),ht.spot1=new go.Spot(0,.49),ht.spot2=new go.Spot(1,.75),ht}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(Dt,nt,et){var ht=new go.Geometry,lt=Dt?Dt.parameter1:NaN,gt=Dt?Dt.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(gt)&&(gt=.3);var mt=new go.PathFigure(0,0,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),mt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*nt,.5*et)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),mt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(Dt,nt,et){var ht=new go.Geometry,lt=Dt?Dt.parameter1:NaN,gt=Dt?Dt.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(gt)&&(gt=.3);var mt=new go.PathFigure(0,0,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),mt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht}),go.Shape.defineFigureGenerator("Procedure",function(Dt,nt,et){var ht=new go.Geometry,lt=Dt?Dt.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var mt=new go.PathFigure((1-lt)*nt,0,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Move,lt*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,et)),ht}),go.Shape.defineFigureGenerator("Process",function(Dt,nt,et){var ht=new go.Geometry,lt=Dt?Dt.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var mt=new go.PathFigure(lt*nt,0,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,et)),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("Sort",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et).close());var gt=new go.PathFigure(0,.5*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),ht.spot1=new go.Spot(.25,.25),ht.spot2=new go.Spot(.75,.5),ht}),go.Shape.defineFigureGenerator("Start",function(Dt,nt,et){var ht=new go.Geometry,lt=Dt?Dt.parameter1:NaN;isNaN(lt)&&(lt=.25);var gt=new go.PathFigure(lt*nt,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*nt,.5*et,.25*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*nt,.5*et,.25*nt,.5*et));var mt=new go.PathFigure(lt*nt,0,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Move,(1-lt)*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*nt,et)),ht.spot1=new go.Spot(lt,0),ht.spot2=new go.Spot(1-lt,1),ht}),go.Shape.defineFigureGenerator("Terminator",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.25*nt,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*nt,.5*et,.25*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*nt,.5*et,.25*nt,.5*et)),ht.spot1=new go.Spot(.23,0),ht.spot2=new go.Spot(.77,1),ht}),go.Shape.defineFigureGenerator("TransmittalTape",function(Dt,nt,et){var ht=new go.Geometry,lt=Dt?Dt.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,(1-lt)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,(1-lt)*et).close()),ht.spot1=go.Spot.TopLeft,ht}),go.Shape.defineFigureGenerator("AndGate",function(Dt,nt,et){var ht=new go.Geometry,lt=Ut*.5,gt=new go.PathFigure(0,0,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(.5+lt)*nt,0,nt,(.5-lt)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.5+lt)*et,(.5+lt)*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht.spot1=go.Spot.TopLeft,ht.spot2=new go.Spot(.55,1),ht}),go.Shape.defineFigureGenerator("Buffer",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.5,.75),ht}),go.Shape.defineFigureGenerator("Clock",function(Dt,nt,et){var ht=new go.Geometry,lt=Ut*.5,gt=.5,mt=new go.PathFigure(nt,gt*et,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,et,nt,(gt+lt)*et,(gt+lt)*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*et,(gt-lt)*nt,et,0,(gt+lt)*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,0,0,(gt-lt)*et,(gt-lt)*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,gt*et,(gt+lt)*nt,0,nt,(gt-lt)*et));var xt=new go.PathFigure(nt,gt*et,!1);ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt,gt*et));var St=new go.PathFigure(.8*nt,.75*et,!1);return ht.add(St),St.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.25*et)),St.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.25*et)),St.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.75*et)),St.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.75*et)),St.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.25*et)),St.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.25*et)),St.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.75*et)),ht}),go.Shape.defineFigureGenerator("Ground",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.3*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.4*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,et)),ht}),go.Shape.defineFigureGenerator("Inverter",function(Dt,nt,et){var ht=new go.Geometry,lt=Ut*.1,gt=.1,mt=.9,xt=.5,St=new go.PathFigure(.8*nt,.5*et,!0);ht.add(St),St.add(new go.PathSegment(go.PathSegment.Line,0,et)),St.add(new go.PathSegment(go.PathSegment.Line,0,0)),St.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et));var zt=new go.PathFigure((mt+gt)*nt,xt*et,!0);return ht.add(zt),zt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et,(mt+lt)*nt,(xt+gt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-gt)*nt,xt*et,(mt-lt)*nt,(xt+gt)*et,(mt-gt)*nt,(xt+lt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt-gt)*et,(mt-gt)*nt,(xt-lt)*et,(mt-lt)*nt,(xt-gt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,xt*et,(mt+lt)*nt,(xt-gt)*et,(mt+gt)*nt,(xt-lt)*et)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.4,.75),ht}),go.Shape.defineFigureGenerator("NandGate",function(Dt,nt,et){var ht=new go.Geometry,lt=Ut*.5,gt=Ut*.4,mt=Ut*.1,xt=.1,St=.9,zt=.5,Jt=new go.PathFigure(.8*nt,.5*et,!0);ht.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,et,.8*nt,(.5+gt)*et,(.4+lt)*nt,et)),Jt.add(new go.PathSegment(go.PathSegment.Line,0,et)),Jt.add(new go.PathSegment(go.PathSegment.Line,0,0)),Jt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(.4+lt)*nt,0,.8*nt,(.5-gt)*et));var re=new go.PathFigure((St+xt)*nt,zt*et,!0);return ht.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,St*nt,(zt+xt)*et,(St+xt)*nt,(zt+mt)*et,(St+mt)*nt,(zt+xt)*et)),re.add(new go.PathSegment(go.PathSegment.Bezier,(St-xt)*nt,zt*et,(St-mt)*nt,(zt+xt)*et,(St-xt)*nt,(zt+mt)*et)),re.add(new go.PathSegment(go.PathSegment.Bezier,St*nt,(zt-xt)*et,(St-xt)*nt,(zt-mt)*et,(St-mt)*nt,(zt-xt)*et)),re.add(new go.PathSegment(go.PathSegment.Bezier,(St+xt)*nt,zt*et,(St+mt)*nt,(zt-xt)*et,(St+xt)*nt,(zt-mt)*et)),ht.spot1=new go.Spot(0,.05),ht.spot2=new go.Spot(.55,.95),ht}),go.Shape.defineFigureGenerator("NorGate",function(Dt,nt,et){var ht=new go.Geometry,lt=.5,gt=Ut*lt,mt=0,xt=.5,St=new go.PathFigure(.8*nt,.5*et,!0);ht.add(St),St.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.7*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.75*et,.25*nt,.25*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(mt+gt)*nt,(xt-lt)*et,.7*nt,(xt-gt)*et)),lt=.1,gt=Ut*.1,mt=.9,xt=.5;var zt=new go.PathFigure((mt-lt)*nt,xt*et,!0);return ht.add(zt),zt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt-lt)*et,(mt-lt)*nt,(xt-gt)*et,(mt-gt)*nt,(xt-lt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+lt)*nt,xt*et,(mt+gt)*nt,(xt-lt)*et,(mt+lt)*nt,(xt-gt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt+lt)*et,(mt+lt)*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-lt)*nt,xt*et,(mt-gt)*nt,(xt+lt)*et,(mt-lt)*nt,(xt+gt)*et)),ht.spot1=new go.Spot(.2,.25),ht.spot2=new go.Spot(.6,.75),ht}),go.Shape.defineFigureGenerator("OrGate",function(Dt,nt,et){var ht=new go.Geometry,lt=.5,gt=Ut*lt,mt=0,xt=.5,St=new go.PathFigure(0,0,!0);return ht.add(St),St.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(mt+gt+gt)*nt,(xt-lt)*et,.8*nt,(xt-gt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.8*nt,(xt+gt)*et,(mt+gt+gt)*nt,(xt+lt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.75*et,.25*nt,.25*et).close()),ht.spot1=new go.Spot(.2,.25),ht.spot2=new go.Spot(.75,.75),ht}),go.Shape.defineFigureGenerator("XnorGate",function(Dt,nt,et){var ht=new go.Geometry,lt=.5,gt=Ut*lt,mt=.2,xt=.5,St=new go.PathFigure(.1*nt,0,!1);ht.add(St),St.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,et,.35*nt,.25*et,.35*nt,.75*et));var zt=new go.PathFigure(.8*nt,.5*et,!0);ht.add(zt),zt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,et,.7*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,.45*nt,.75*et,.45*nt,.25*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(mt+gt)*nt,(xt-lt)*et,.7*nt,(xt-gt)*et)),lt=.1,gt=Ut*.1,mt=.9,xt=.5;var Jt=new go.PathFigure((mt-lt)*nt,xt*et,!0);return ht.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt-lt)*et,(mt-lt)*nt,(xt-gt)*et,(mt-gt)*nt,(xt-lt)*et)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+lt)*nt,xt*et,(mt+gt)*nt,(xt-lt)*et,(mt+lt)*nt,(xt-gt)*et)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt+lt)*et,(mt+lt)*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-lt)*nt,xt*et,(mt-gt)*nt,(xt+lt)*et,(mt-lt)*nt,(xt+gt)*et)),ht.spot1=new go.Spot(.4,.25),ht.spot2=new go.Spot(.65,.75),ht}),go.Shape.defineFigureGenerator("XorGate",function(Dt,nt,et){var ht=new go.Geometry,lt=.5,gt=Ut*lt,mt=.2,xt=.5,St=new go.PathFigure(.1*nt,0,!1);ht.add(St),St.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,et,.35*nt,.25*et,.35*nt,.75*et));var zt=new go.PathFigure(.2*nt,0,!0);return ht.add(zt),zt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(mt+gt)*nt,(xt-lt)*et,.9*nt,(xt-gt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,et,.9*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,.45*nt,.75*et,.45*nt,.25*et).close()),ht.spot1=new go.Spot(.4,.25),ht.spot2=new go.Spot(.8,.75),ht}),go.Shape.defineFigureGenerator("Capacitor",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Move,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht}),go.Shape.defineFigureGenerator("Resistor",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.5*et,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.5*et)),ht}),go.Shape.defineFigureGenerator("Inductor",function(Dt,nt,et){var ht=new go.Geometry,lt=Ut*.1,gt=.1,mt=.1,xt=.5,St=new go.PathFigure((mt-lt*.5)*nt,et,!1);return ht.add(St),St.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,0,(mt-lt)*nt,et,(mt-gt)*nt,0)),mt=.3,St.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,et,(mt+gt)*nt,0,(mt+lt)*nt,et)),St.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,0,(mt-lt)*nt,et,(mt-gt)*nt,0)),mt=.5,St.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,et,(mt+gt)*nt,0,(mt+lt)*nt,et)),St.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,0,(mt-lt)*nt,et,(mt-gt)*nt,0)),mt=.7,St.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,et,(mt+gt)*nt,0,(mt+lt)*nt,et)),St.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,0,(mt-lt)*nt,et,(mt-gt)*nt,0)),mt=.9,St.add(new go.PathSegment(go.PathSegment.Bezier,(mt+lt*.5)*nt,et,(mt+gt)*nt,0,(mt+lt)*nt,et)),ht}),go.Shape.defineFigureGenerator("ACvoltageSource",function(Dt,nt,et){var ht=new go.Geometry,lt=Ut*.5,gt=.5,mt=.5,xt=.5,St=new go.PathFigure((mt-gt)*nt,xt*et,!1);return ht.add(St),St.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt-gt)*et,(mt-gt)*nt,(xt-lt)*et,(mt-lt)*nt,(xt-gt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,xt*et,(mt+lt)*nt,(xt-gt)*et,(mt+gt)*nt,(xt-lt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et,(mt+lt)*nt,(xt+gt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,(mt-gt)*nt,xt*et,(mt-lt)*nt,(xt+gt)*et,(mt-gt)*nt,(xt+lt)*et)),St.add(new go.PathSegment(go.PathSegment.Move,(mt-gt+.1)*nt,xt*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt-.1)*nt,xt*et,mt*nt,(xt-gt)*et,mt*nt,(xt+gt)*et)),ht}),go.Shape.defineFigureGenerator("DCvoltageSource",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.75*et,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Move,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht}),go.Shape.defineFigureGenerator("Diode",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt,0,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.5,.75),ht}),go.Shape.defineFigureGenerator("Wifi",function(Dt,nt,et){var ht=new go.Geometry,lt=nt,gt=et;nt=nt*.38,et=et*.6;var mt=Ut*.8,xt=.8,St=0,zt=.5,Jt=(lt-nt)/2,re=(gt-et)/2,oe=new go.PathFigure(St*nt+Jt,(zt+xt)*et+re,!0);ht.add(oe),oe.add(new go.PathSegment(go.PathSegment.Bezier,(St-xt)*nt+Jt,zt*et+re,(St-mt)*nt+Jt,(zt+xt)*et+re,(St-xt)*nt+Jt,(zt+mt)*et+re)),oe.add(new go.PathSegment(go.PathSegment.Bezier,St*nt+Jt,(zt-xt)*et+re,(St-xt)*nt+Jt,(zt-mt)*et+re,(St-mt)*nt+Jt,(zt-xt)*et+re)),oe.add(new go.PathSegment(go.PathSegment.Bezier,(St-xt+mt*.5)*nt+Jt,zt*et+re,St*nt+Jt,(zt-xt)*et+re,(St-xt+mt*.5)*nt+Jt,(zt-mt)*et+re)),oe.add(new go.PathSegment(go.PathSegment.Bezier,St*nt+Jt,(zt+xt)*et+re,(St-xt+mt*.5)*nt+Jt,(zt+mt)*et+re,St*nt+Jt,(zt+xt)*et+re).close()),mt=Ut*.4,xt=.4,St=.2,zt=.5;var $t=new go.PathFigure(St*nt+Jt,(zt+xt)*et+re,!0);ht.add($t),$t.add(new go.PathSegment(go.PathSegment.Bezier,(St-xt)*nt+Jt,zt*et+re,(St-mt)*nt+Jt,(zt+xt)*et+re,(St-xt)*nt+Jt,(zt+mt)*et+re)),$t.add(new go.PathSegment(go.PathSegment.Bezier,St*nt+Jt,(zt-xt)*et+re,(St-xt)*nt+Jt,(zt-mt)*et+re,(St-mt)*nt+Jt,(zt-xt)*et+re)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(St-xt+mt*.5)*nt+Jt,zt*et+re,St*nt+Jt,(zt-xt)*et+re,(St-xt+mt*.5)*nt+Jt,(zt-mt)*et+re)),$t.add(new go.PathSegment(go.PathSegment.Bezier,St*nt+Jt,(zt+xt)*et+re,(St-xt+mt*.5)*nt+Jt,(zt+mt)*et+re,St*nt+Jt,(zt+xt)*et+re).close()),mt=Ut*.2,xt=.2,St=.5,zt=.5;var Le=new go.PathFigure((St-xt)*nt+Jt,zt*et+re,!0);ht.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,St*nt+Jt,(zt-xt)*et+re,(St-xt)*nt+Jt,(zt-mt)*et+re,(St-mt)*nt+Jt,(zt-xt)*et+re)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(St+xt)*nt+Jt,zt*et+re,(St+mt)*nt+Jt,(zt-xt)*et+re,(St+xt)*nt+Jt,(zt-mt)*et+re)),Le.add(new go.PathSegment(go.PathSegment.Bezier,St*nt+Jt,(zt+xt)*et+re,(St+xt)*nt+Jt,(zt+mt)*et+re,(St+mt)*nt+Jt,(zt+xt)*et+re)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(St-xt)*nt+Jt,zt*et+re,(St-mt)*nt+Jt,(zt+xt)*et+re,(St-xt)*nt+Jt,(zt+mt)*et+re)),mt=Ut*.4,xt=.4,St=.8,zt=.5;var de=new go.PathFigure(St*nt+Jt,(zt-xt)*et+re,!0);ht.add(de),de.add(new go.PathSegment(go.PathSegment.Bezier,(St+xt)*nt+Jt,zt*et+re,(St+mt)*nt+Jt,(zt-xt)*et+re,(St+xt)*nt+Jt,(zt-mt)*et+re)),de.add(new go.PathSegment(go.PathSegment.Bezier,St*nt+Jt,(zt+xt)*et+re,(St+xt)*nt+Jt,(zt+mt)*et+re,(St+mt)*nt+Jt,(zt+xt)*et+re)),de.add(new go.PathSegment(go.PathSegment.Bezier,(St+xt-mt*.5)*nt+Jt,zt*et+re,St*nt+Jt,(zt+xt)*et+re,(St+xt-mt*.5)*nt+Jt,(zt+mt)*et+re)),de.add(new go.PathSegment(go.PathSegment.Bezier,St*nt+Jt,(zt-xt)*et+re,(St+xt-mt*.5)*nt+Jt,(zt-mt)*et+re,St*nt+Jt,(zt-xt)*et+re).close()),mt=Ut*.8,xt=.8,St=1,zt=.5;var Fe=new go.PathFigure(St*nt+Jt,(zt-xt)*et+re,!0);return ht.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(St+xt)*nt+Jt,zt*et+re,(St+mt)*nt+Jt,(zt-xt)*et+re,(St+xt)*nt+Jt,(zt-mt)*et+re)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,St*nt+Jt,(zt+xt)*et+re,(St+xt)*nt+Jt,(zt+mt)*et+re,(St+mt)*nt+Jt,(zt+xt)*et+re)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(St+xt-mt*.5)*nt+Jt,zt*et+re,St*nt+Jt,(zt+xt)*et+re,(St+xt-mt*.5)*nt+Jt,(zt+mt)*et+re)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,St*nt+Jt,(zt-xt)*et+re,(St+xt-mt*.5)*nt+Jt,(zt-mt)*et+re,St*nt+Jt,(zt-xt)*et+re).close()),ht}),go.Shape.defineFigureGenerator("Email",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(0,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Move,0,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.54*et)),gt.add(new go.PathSegment(go.PathSegment.Move,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.54*et)),ht}),go.Shape.defineFigureGenerator("Ethernet",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.35*nt,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*nt,0).close());var gt=new go.PathFigure(.1*nt,et,!0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et).close());var mt=new go.PathFigure(.6*nt,et,!0,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.6*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.6*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,et).close());var xt=new go.PathFigure(0,.5*et,!1);return ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),xt.add(new go.PathSegment(go.PathSegment.Move,.75*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.6*et)),xt.add(new go.PathSegment(go.PathSegment.Move,.25*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.6*et)),ht}),go.Shape.defineFigureGenerator("Power",function(Dt,nt,et){var ht=new go.Geometry,lt=Ut*.4,gt=.4,mt=.5,xt=.5,St=Pt(),zt=Pt(),Jt=Pt(),re=Pt();Be(mt,xt-gt,mt+lt,xt-gt,mt+gt,xt-lt,mt+gt,xt,.5,St,St,zt,Jt,re);var oe=Mt(zt.x,zt.y),$t=new go.PathFigure(zt.x*nt,zt.y*et,!0);ht.add($t),$t.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,xt*et,Jt.x*nt,Jt.y*et,re.x*nt,re.y*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et,(mt+lt)*nt,(xt+gt)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(mt-gt)*nt,xt*et,(mt-lt)*nt,(xt+gt)*et,(mt-gt)*nt,(xt+lt)*et)),Be(mt-gt,xt,mt-gt,xt-lt,mt-lt,xt-gt,mt,xt-gt,.5,Jt,re,zt,St,St),$t.add(new go.PathSegment(go.PathSegment.Bezier,zt.x*nt,zt.y*et,Jt.x*nt,Jt.y*et,re.x*nt,re.y*et)),lt=Ut*.3,gt=.3,Be(mt-gt,xt,mt-gt,xt-lt,mt-lt,xt-gt,mt,xt-gt,.5,Jt,re,zt,St,St),$t.add(new go.PathSegment(go.PathSegment.Line,zt.x*nt,zt.y*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(mt-gt)*nt,xt*et,re.x*nt,re.y*et,Jt.x*nt,Jt.y*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt+gt)*et,(mt-gt)*nt,(xt+lt)*et,(mt-lt)*nt,(xt+gt)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,xt*et,(mt+lt)*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et)),Be(mt,xt-gt,mt+lt,xt-gt,mt+gt,xt-lt,mt+gt,xt,.5,St,St,zt,Jt,re),$t.add(new go.PathSegment(go.PathSegment.Bezier,zt.x*nt,zt.y*et,re.x*nt,re.y*et,Jt.x*nt,Jt.y*et).close());var $t=new go.PathFigure(.45*nt,0,!0);return ht.add($t),$t.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.5*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.5*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.55*nt,0).close()),ne(St),ne(zt),ne(Jt),ne(re),ne(oe),ht.spot1=new go.Spot(.25,.45),ht.spot2=new go.Spot(.75,.8),ht}),go.Shape.defineFigureGenerator("Fallout",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,et/2,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,180,360,nt/2,et/2,nt/2,et/2));function gt(mt,xt,St){mt.add(new go.PathSegment(go.PathSegment.Move,(.3+xt)*nt,(.8+St)*et)),mt.add(new go.PathSegment(go.PathSegment.Line,(.5+xt)*nt,(.5+St)*et)),mt.add(new go.PathSegment(go.PathSegment.Line,(.1+xt)*nt,(.5+St)*et)),mt.add(new go.PathSegment(go.PathSegment.Line,(.3+xt)*nt,(.8+St)*et).close())}return gt(lt,0,0),gt(lt,.4,0),gt(lt,.2,-.3),ht}),go.Shape.defineFigureGenerator("IrritationHazard",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.2*nt,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.3*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.2*et).close()),ht.spot1=new go.Spot(.3,.3),ht.spot2=new go.Spot(.7,.7),ht}),go.Shape.defineFigureGenerator("ElectricalHazard",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.37*nt,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.11*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.77*nt,.04*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*nt,.49*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.37*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.63*nt,.86*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.77*nt,.91*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.34*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.34*nt,.78*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.44*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.56*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.68*et).close()),ht}),go.Shape.defineFigureGenerator("FireHazard",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.1*nt,et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.29*nt,0,-.25*nt,.63*et,.45*nt,.44*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.51*nt,.42*et,.48*nt,.17*et,.54*nt,.35*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.59*nt,.18*et,.59*nt,.29*et,.58*nt,.28*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,.6*et,.8*nt,.34*et,.88*nt,.43*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.88*nt,.31*et,.87*nt,.48*et,.88*nt,.43*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,et,1.17*nt,.76*et,.82*nt,.8*et).close()),ht.spot1=new go.Spot(.07,.445),ht.spot2=new go.Spot(.884,.958),ht}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(Dt,nt,et){var ht=new go.Geometry,lt=.5,gt=0,mt=0,xt=lt*Ut,St=.4*Math.SQRT2/2+.5,zt=.5-.5*Math.SQRT2/2,Jt=1,re=.5,oe=.5,$t=0,Le=new go.PathFigure(St*nt,(1-zt)*et,!1);return ht.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,Jt*nt,re*et,Jt*nt,.7*et,Jt*nt,re*et)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(oe+gt)*nt,($t+gt)*et,(.5+lt+gt)*nt,(.5-xt+gt)*et,(.5+xt+gt)*nt,(.5-lt+gt)*et)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+gt)*nt,(.5+mt)*et,(.5-xt+gt)*nt,(.5-lt+mt)*et,(.5-lt+gt)*nt,(.5-xt+mt)*et)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(.35+gt)*nt,.9*et,(.5-lt+gt)*nt,(.5+xt+mt)*et,(.5-xt+gt)*nt,.9*et)),Le.add(new go.PathSegment(go.PathSegment.Move,(.25+gt)*nt,.8*et)),Le.add(new go.PathSegment(go.PathSegment.Line,(.35+gt)*nt,.9*et)),Le.add(new go.PathSegment(go.PathSegment.Line,(.2+gt)*nt,.95*et)),ht}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Move,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Move,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);ht.add(lt);var gt=new go.PathFigure(nt,et,!1);ht.add(gt);var mt=new go.PathFigure(0,.5*et,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.5*et,.2*nt,.35*et,.3*nt,.35*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,.7*nt,.65*et,.8*nt,.65*et)),ht}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.5*et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et).close()),ht}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.2*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et).close());var lt=new go.PathFigure(0,.2*et,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),ht}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.7*nt,et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,0,.6*nt,.5*et,0,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.7*nt,et,.4*nt,.5*et,nt,.5*et).close());var gt=new go.PathFigure(.45*nt,.73*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.73*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.38*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.63*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.31*nt,.27*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.56*nt,.27*et)),ht}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);ht.add(lt);var gt=new go.PathFigure(.335*nt,(1-.555)*et,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.335*nt,(1-.405)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.405)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.555)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.68*et,(1-.12)*nt,.46*et,(1-.02)*nt,.54*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.68*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.335*nt,(1-.555)*et,.02*nt,.54*et,.12*nt,.46*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.365*nt,(1-.595)*et));var mt=.5-.285,xt=.5,St=mt,zt=Math.PI/4,Jt=4*(1-Math.cos(zt))/(3*Math.sin(zt)),re=Jt*.5,oe=mt,$t=mt,Le=Jt*oe,de=Jt*$t;gt.add(new go.PathSegment(go.PathSegment.Bezier,(xt-oe)*nt,St*et,(xt-(Le+oe)/2)*nt,(St+($t+de)/2)*et,(xt-oe)*nt,(St+de)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,xt*nt,(St-$t)*et,(xt-oe)*nt,(St-de)*et,(xt-Le)*nt,(St-$t)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(xt+oe)*nt,St*et,(xt+Le)*nt,(St-$t)*et,(xt+oe)*nt,(St-de)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*nt,(1-.595)*et,(xt+oe)*nt,(St+de)*et,(xt+(Le+oe)/2)*nt,(St+($t+de)/2)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*nt,(1-.595)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.555)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.405)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.335*nt,(1-.405)*et));var Fe=new go.PathFigure(.2*nt,et,!1);ht.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.8*et));var rn=new go.PathFigure(.8*nt,et,!1);return ht.add(rn),rn.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.8*et)),ht}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.1*nt,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et).close());var gt=new go.PathFigure(.2*nt,.2*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.8*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.8*et)),ht}),go.Shape.defineFigureGenerator("BpmnEventError",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.33*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*nt,.5*et).close()),ht}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);ht.add(lt);var gt=new go.PathFigure(nt,et,!1);ht.add(gt);var mt=new go.PathFigure(.1*nt,et,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et).close()),ht}),go.Shape.defineFigureGenerator("Caution",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.05*nt,et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,.8*et,0,et,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.55*nt,.1*et,.5*nt,0,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.95*nt,.9*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,et,nt,et,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.05*nt,et));var gt=.05;return lt.add(new go.PathSegment(go.PathSegment.Move,(.5-gt)*nt,.875*et)),lt.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*nt,.875*et,gt*nt,gt*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.325*et,.575*nt,.725*et,.625*nt,.375*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.75*et,.375*nt,.375*et,.425*nt,.725*et)),ht}),go.Shape.defineFigureGenerator("Recycle",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.45*nt,.95*et,!1);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.95*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.185*nt,.85*et,.17*nt,.95*et,.15*nt,.9*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.235*nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.625*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*nt,.65*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.275*nt,.45*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.05*nt,.45*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.05*nt,.575*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.1875*nt,.95*et,0,.675*et,0,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.45*nt,.95*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.775*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.22*nt,.775*et));var gt=new go.PathFigure(.475*nt,.2*et,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.225*nt,.3*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.275*nt,.175*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.325*nt,.05*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,.05*et,.35*nt,0,.375*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.375*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.475*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.315*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.32*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.05*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.575*nt,0,.65*nt,.05*et,.625*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.38*nt,.0105*et));var mt=new go.PathFigure(.675*nt,.575*et,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.875*nt,.525*et)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,.775*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.85*nt,.95*et,nt,.8*et,nt,.85*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.95*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.85*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.725*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.775*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.775*et)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,.775*et)),mt.add(new go.PathSegment(go.PathSegment.Move,.675*nt,.575*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.775*nt,.775*et)),ht}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(Dt,nt,et){var ht=new go.Geometry,lt=.5,gt=Ut*.5,mt=new go.PathFigure(nt,lt*et,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,lt*nt,et,nt,(lt+gt)*et,(lt+gt)*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,lt*et,(lt-gt)*nt,et,0,(lt+gt)*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,lt*nt,0,0,(lt-gt)*et,(lt-gt)*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,lt*et,(lt+gt)*nt,0,nt,(lt-gt)*et));var xt=new go.PathFigure(lt*nt,0,!1);return ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,.15*et)),xt.add(new go.PathSegment(go.PathSegment.Move,lt*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,.85*et)),xt.add(new go.PathSegment(go.PathSegment.Move,0,lt*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,lt*et)),xt.add(new go.PathSegment(go.PathSegment.Move,nt,lt*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,lt*et)),xt.add(new go.PathSegment(go.PathSegment.Move,lt*nt,lt*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.58*nt,.1*et)),xt.add(new go.PathSegment(go.PathSegment.Move,lt*nt,lt*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.78*nt,.54*et)),ht}),go.Shape.defineFigureGenerator("Package",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.15*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var gt=new go.PathFigure(0,.15*et,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.15*et).close()),ht.spot1=new go.Spot(0,.1),ht.spot2=new go.Spot(1,1),ht}),go.Shape.defineFigureGenerator("Class",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(0,.2*et,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et).close());var mt=new go.PathFigure(0,.5*et,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et).close()),ht}),go.Shape.defineFigureGenerator("Component",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt,et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et).close());var gt=new go.PathFigure(0,.2*et,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.2*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.2*et).close());var mt=new go.PathFigure(0,.6*et,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.6*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.8*et)),mt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),mt.add(new go.PathSegment(go.PathSegment.Line,0,.6*et).close()),ht}),go.Shape.defineFigureGenerator("Boat Shipment",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.15*nt,.6*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et));var gt=new go.PathFigure(.15*nt,.6*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),ht}),go.Shape.defineFigureGenerator("Customer/Supplier",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt,et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*nt,.33*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*nt,.33*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.33*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),ht}),go.Shape.defineFigureGenerator("Workcell",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht}),go.Shape.defineFigureGenerator("Supermarket",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.33*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.33*et)),lt.add(new go.PathSegment(go.PathSegment.Move,nt,.33*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.66*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.66*et)),lt.add(new go.PathSegment(go.PathSegment.Move,nt,.66*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),ht}),go.Shape.defineFigureGenerator("TruckShipment",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(nt,.8*et,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.8*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et).close());var mt=.1,xt=Ut*.1,St=.2,zt=.9,Jt=new go.PathFigure((St-mt)*nt,zt*et,!0);ht.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Bezier,St*nt,(zt-mt)*et,(St-mt)*nt,(zt-xt)*et,(St-xt)*nt,(zt-mt)*et)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(St+mt)*nt,zt*et,(St+xt)*nt,(zt-mt)*et,(St+mt)*nt,(zt-xt)*et)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,St*nt,(zt+mt)*et,(St+mt)*nt,(zt+xt)*et,(St+xt)*nt,(zt+mt)*et)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(St-mt)*nt,zt*et,(St-xt)*nt,(zt+mt)*et,(St-mt)*nt,(zt+xt)*et).close()),mt=.1,xt=Ut*.1,St=.8,zt=.9;var re=new go.PathFigure((St-mt)*nt,zt*et,!0);return ht.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,St*nt,(zt-mt)*et,(St-mt)*nt,(zt-xt)*et,(St-xt)*nt,(zt-mt)*et)),re.add(new go.PathSegment(go.PathSegment.Bezier,(St+mt)*nt,zt*et,(St+xt)*nt,(zt-mt)*et,(St+mt)*nt,(zt-xt)*et)),re.add(new go.PathSegment(go.PathSegment.Bezier,St*nt,(zt+mt)*et,(St+mt)*nt,(zt+xt)*et,(St+xt)*nt,(zt+mt)*et)),re.add(new go.PathSegment(go.PathSegment.Bezier,(St-mt)*nt,zt*et,(St-xt)*nt,(zt+mt)*et,(St-mt)*nt,(zt+xt)*et).close()),ht}),go.Shape.defineFigureGenerator("KanbanPost",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.2*nt,0,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),ht}),go.Shape.defineFigureGenerator("Forklift",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0));var gt=new go.PathFigure(0,.5*et,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.8*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et));var mt=new go.PathFigure(.5*nt,.8*et,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.1*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.1*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.8*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.8*et));var xt=new go.PathFigure(.5*nt,.7*et,!1);ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et));var St=.1,zt=Ut*.1,Jt=.1,re=.9,oe=new go.PathFigure((Jt-St)*nt,re*et,!0);ht.add(oe),oe.add(new go.PathSegment(go.PathSegment.Bezier,Jt*nt,(re-St)*et,(Jt-St)*nt,(re-zt)*et,(Jt-zt)*nt,(re-St)*et)),oe.add(new go.PathSegment(go.PathSegment.Bezier,(Jt+St)*nt,re*et,(Jt+zt)*nt,(re-St)*et,(Jt+St)*nt,(re-zt)*et)),oe.add(new go.PathSegment(go.PathSegment.Bezier,Jt*nt,(re+St)*et,(Jt+St)*nt,(re+zt)*et,(Jt+zt)*nt,(re+St)*et)),oe.add(new go.PathSegment(go.PathSegment.Bezier,(Jt-St)*nt,re*et,(Jt-zt)*nt,(re+St)*et,(Jt-St)*nt,(re+zt)*et)),St=.1,zt=Ut*.1,Jt=.4,re=.9;var $t=new go.PathFigure((Jt-St)*nt,re*et,!0);return ht.add($t),$t.add(new go.PathSegment(go.PathSegment.Bezier,Jt*nt,(re-St)*et,(Jt-St)*nt,(re-zt)*et,(Jt-zt)*nt,(re-St)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(Jt+St)*nt,re*et,(Jt+zt)*nt,(re-St)*et,(Jt+St)*nt,(re-zt)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,Jt*nt,(re+St)*et,(Jt+St)*nt,(re+zt)*et,(Jt+zt)*nt,(re+St)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(Jt-St)*nt,re*et,(Jt-zt)*nt,(re+St)*et,(Jt-St)*nt,(re+zt)*et)),ht}),go.Shape.defineFigureGenerator("RailShipment",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.1*nt,.4*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.9*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.9*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.4*et).close());var gt=new go.PathFigure(.45*nt,.7*et,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.7*et));var mt=new go.PathFigure(.55*nt,.4*et,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.9*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.9*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.4*et).close());var Jt=.05,re=Ut*.05,oe=.175,$t=.95,xt=new go.PathFigure((oe-Jt)*nt,$t*et,!0);ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,oe*nt,($t-Jt)*et,(oe-Jt)*nt,($t-re)*et,(oe-re)*nt,($t-Jt)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,(oe+Jt)*nt,$t*et,(oe+re)*nt,($t-Jt)*et,(oe+Jt)*nt,($t-re)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,oe*nt,($t+Jt)*et,(oe+Jt)*nt,($t+re)*et,(oe+re)*nt,($t+Jt)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,(oe-Jt)*nt,$t*et,(oe-re)*nt,($t+Jt)*et,(oe-Jt)*nt,($t+re)*et));var Jt=.05,re=Ut*.05,oe=.375,$t=.95,St=new go.PathFigure((oe-Jt)*nt,$t*et,!0);ht.add(St),St.add(new go.PathSegment(go.PathSegment.Bezier,oe*nt,($t-Jt)*et,(oe-Jt)*nt,($t-re)*et,(oe-re)*nt,($t-Jt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,(oe+Jt)*nt,$t*et,(oe+re)*nt,($t-Jt)*et,(oe+Jt)*nt,($t-re)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,oe*nt,($t+Jt)*et,(oe+Jt)*nt,($t+re)*et,(oe+re)*nt,($t+Jt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,(oe-Jt)*nt,$t*et,(oe-re)*nt,($t+Jt)*et,(oe-Jt)*nt,($t+re)*et));var Jt=.05,re=Ut*.05,oe=.625,$t=.95,zt=new go.PathFigure((oe-Jt)*nt,$t*et,!0);ht.add(zt),zt.add(new go.PathSegment(go.PathSegment.Bezier,oe*nt,($t-Jt)*et,(oe-Jt)*nt,($t-re)*et,(oe-re)*nt,($t-Jt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(oe+Jt)*nt,$t*et,(oe+re)*nt,($t-Jt)*et,(oe+Jt)*nt,($t-re)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,oe*nt,($t+Jt)*et,(oe+Jt)*nt,($t+re)*et,(oe+re)*nt,($t+Jt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(oe-Jt)*nt,$t*et,(oe-re)*nt,($t+Jt)*et,(oe-Jt)*nt,($t+re)*et));var Jt=.05,re=Ut*.05,oe=.825,$t=.95,Le=new go.PathFigure((oe-Jt)*nt,$t*et,!0);ht.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,oe*nt,($t-Jt)*et,(oe-Jt)*nt,($t-re)*et,(oe-re)*nt,($t-Jt)*et)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(oe+Jt)*nt,$t*et,(oe+re)*nt,($t-Jt)*et,(oe+Jt)*nt,($t-re)*et)),Le.add(new go.PathSegment(go.PathSegment.Bezier,oe*nt,($t+Jt)*et,(oe+Jt)*nt,($t+re)*et,(oe+re)*nt,($t+Jt)*et)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(oe-Jt)*nt,$t*et,(oe-re)*nt,($t+Jt)*et,(oe-Jt)*nt,($t+re)*et).close());var de=new go.PathFigure(0,et,!1);return ht.add(de),de.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),ht}),go.Shape.defineFigureGenerator("Warehouse",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(0,.2*et,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et).close());var mt=new go.PathFigure(.15*nt,et,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.5*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.5*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,et).close());var xt=.05,St=Ut*.05,zt=.35,Jt=.775,re=new go.PathFigure((zt-xt)*nt,Jt*et,!0);return ht.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,zt*nt,(Jt-xt)*et,(zt-xt)*nt,(Jt-St)*et,(zt-St)*nt,(Jt-xt)*et)),re.add(new go.PathSegment(go.PathSegment.Bezier,(zt+xt)*nt,Jt*et,(zt+St)*nt,(Jt-xt)*et,(zt+xt)*nt,(Jt-St)*et)),re.add(new go.PathSegment(go.PathSegment.Bezier,zt*nt,(Jt+xt)*et,(zt+xt)*nt,(Jt+St)*et,(zt+St)*nt,(Jt+xt)*et)),re.add(new go.PathSegment(go.PathSegment.Bezier,(zt-xt)*nt,Jt*et,(zt-St)*nt,(Jt+xt)*et,(zt-xt)*nt,(Jt+St)*et).close()),ht}),go.Shape.defineFigureGenerator("ControlCenter",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Move,.1*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et).close()),ht}),go.Shape.defineFigureGenerator("Bluetooth",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.75*et,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),ht}),go.Shape.defineFigureGenerator("Bookmark",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.4*et)),ht}),go.Shape.defineFigureGenerator("Bookmark",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.4*et)),ht}),go.Shape.defineFigureGenerator("Globe",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,.75*nt,0,nt,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,.75*et,.75*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,.25*nt,et,0,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,.25*et,.25*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,.15*nt,.25*et,.15*nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,.85*nt,.75*et,.85*nt,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.1675*nt,.15*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8325*nt,.15*et,.35*nt,.3*et,.65*nt,.3*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.1675*nt,.85*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8325*nt,.85*et,.35*nt,.7*et,.65*nt,.7*et)),ht}),go.Shape.defineFigureGenerator("Wave",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.25*et,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.25*et,.1*nt,0,.2*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.7*nt,.25*et,.425*nt,.5*et,.575*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.25*et,.8*nt,0,.9*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.75*et,.1*nt,.5*et,.2*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.7*nt,.75*et,.425*nt,et,.575*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.75*et,.8*nt,.5*et,.9*nt,.5*et)),ht}),go.Shape.defineFigureGenerator("Operator",function(Dt,nt,et){var ht=new go.Geometry,lt=.3,gt=Ut*.3,mt=.5,xt=.7,St=new go.PathFigure((mt-lt)*nt,xt*et,!0);ht.add(St),St.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt-lt)*et,(mt-lt)*nt,(xt-gt)*et,(mt-gt)*nt,(xt-lt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,(mt+lt)*nt,xt*et,(mt+gt)*nt,(xt-lt)*et,(mt+lt)*nt,(xt-gt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt+lt)*et,(mt+lt)*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,(mt-lt)*nt,xt*et,(mt-gt)*nt,(xt+lt)*et,(mt-lt)*nt,(xt+gt)*et));var zt=new go.PathFigure(0,.7*et,!1);return ht.add(zt),zt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.7*et,0,0,nt,0)),ht}),go.Shape.defineFigureGenerator("TripleFanBlades",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.65*et,.65*nt,.3*et,.65*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,.35*nt,.5*et,.35*nt,.3*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.65*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.3*nt,.6*et,.1*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.65*et,.2*nt,et,.35*nt,.95*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.65*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,et,.7*nt,.6*et,.9*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.65*et,.8*nt,et,.65*nt,.95*et)),ht}),go.Shape.defineFigureGenerator("CentrifugalPump",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,0,.075*et,0,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,et,0,et,.4*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.4*et,.8*nt,et,.85*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ht}),go.Shape.defineFigureGenerator("Battery",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Move,.4*nt,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.1*et));var gt=new go.PathFigure(0,.6*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Move,0,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),ht}),go.Shape.defineFigureGenerator("Delete",function(Dt,nt,et){var ht=new go.Geometry,lt=.5,gt=Ut*.5,mt=.5,xt=.5,St=new go.PathFigure((mt-lt)*nt,xt*et,!0);ht.add(St),St.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt-lt)*et,(mt-lt)*nt,(xt-gt)*et,(mt-gt)*nt,(xt-lt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,(mt+lt)*nt,xt*et,(mt+gt)*nt,(xt-lt)*et,(mt+lt)*nt,(xt-gt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt+lt)*et,(mt+lt)*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,(mt-lt)*nt,xt*et,(mt-gt)*nt,(xt+lt)*et,(mt-lt)*nt,(xt+gt)*et));var zt=new go.PathFigure(.15*nt,.5*et,!1);return ht.add(zt),zt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.5*et)),ht}),go.Shape.defineFigureGenerator("Flag",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.1*et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.1*et,.15*nt,0,.35*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,.65*nt,.2*et,.85*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.5*et,.85*nt,.6*et,.65*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,.35*nt,.4*et,.15*nt,.4*et).close()),ht}),go.Shape.defineFigureGenerator("Help",function(Dt,nt,et){var ht=new go.Geometry,lt=.5,gt=Ut*.5,mt=.5,xt=.5,St=new go.PathFigure((mt-lt)*nt,xt*et,!1);ht.add(St),St.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt-lt)*et,(mt-lt)*nt,(xt-gt)*et,(mt-gt)*nt,(xt-lt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,(mt+lt)*nt,xt*et,(mt+gt)*nt,(xt-lt)*et,(mt+lt)*nt,(xt-gt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt+lt)*et,(mt+lt)*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,(mt-lt)*nt,xt*et,(mt-gt)*nt,(xt+lt)*et,(mt-lt)*nt,(xt+gt)*et).close()),lt=.05,gt=Ut*.05,mt=.5,xt=.8;var zt=new go.PathFigure((mt-lt)*nt,xt*et,!1);return ht.add(zt),zt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt-lt)*et,(mt-lt)*nt,(xt-gt)*et,(mt-gt)*nt,(xt-lt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+lt)*nt,xt*et,(mt+gt)*nt,(xt-lt)*et,(mt+lt)*nt,(xt-gt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt+lt)*et,(mt+lt)*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-lt)*nt,xt*et,(mt-gt)*nt,(xt+lt)*et,(mt-lt)*nt,(xt+gt)*et).close()),zt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.7*et)),zt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,.75*nt,.475*et,.75*nt,.225*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.35*et,.4*nt,.2*et,.3*nt,.25*et)),ht}),go.Shape.defineFigureGenerator("Location",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,et,!0).add(new go.PathSegment(go.PathSegment.Line,.75*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,.975*nt,.025*et,.5*nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*nt,.5*et,.5*nt,0,.025*nt,.025*et).close()).add(new go.PathSegment(go.PathSegment.Move,.5*nt,.2*et)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*nt,.3*et,.1*nt,.1*et).close()))}),go.Shape.defineFigureGenerator("Lock",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.5*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et));var gt=new go.PathFigure(.2*nt,.5*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.3*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.3*et,.25*nt,0,.75*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.3*et)),ht}),go.Shape.defineFigureGenerator("Unlocked",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.5*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et));var gt=new go.PathFigure(.2*nt,.5*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.3*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.3*et,.25*nt,0,.75*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.35*et)),ht}),go.Shape.defineFigureGenerator("Gear",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(.9375*nt,.56246875*et,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*nt,.4375*et)).add(new go.PathSegment(go.PathSegment.Line,.80621875*nt,.4375*et)).add(new go.PathSegment(go.PathSegment.Bezier,.763*nt,.3316875*et,.79840625*nt,.39915625*et,.7834375*nt,.3635*et)).add(new go.PathSegment(go.PathSegment.Line,.8566875*nt,.23796875*et)).add(new go.PathSegment(go.PathSegment.Line,.76825*nt,.14959375*et)).add(new go.PathSegment(go.PathSegment.Line,.67596875*nt,.24184375*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*nt,.19378125*et,.64228125*nt,.2188125*et,.603875*nt,.2021875*et)).add(new go.PathSegment(go.PathSegment.Line,.5625*nt,.0625*et)).add(new go.PathSegment(go.PathSegment.Line,.4375*nt,.0625*et)).add(new go.PathSegment(go.PathSegment.Line,.4375*nt,.19378125*et)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*nt,.239375*et,.39759375*nt,.20190625*et,.36053125*nt,.2176875*et)).add(new go.PathSegment(go.PathSegment.Line,.2379375*nt,.14959375*et)).add(new go.PathSegment(go.PathSegment.Line,.14953125*nt,.2379375*et)).add(new go.PathSegment(go.PathSegment.Line,.23934375*nt,.3278125*et)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*nt,.4375*et,.21765625*nt,.36059375*et,.201875*nt,.397625*et)).add(new go.PathSegment(go.PathSegment.Line,.0625*nt,.4375*et)).add(new go.PathSegment(go.PathSegment.Line,.0625*nt,.5625*et)).add(new go.PathSegment(go.PathSegment.Line,.1938125*nt,.5625*et)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*nt,.67596875*et,.20221875*nt,.603875*et,.21884375*nt,.64228125*et)).add(new go.PathSegment(go.PathSegment.Line,.1495625*nt,.76825*et)).add(new go.PathSegment(go.PathSegment.Line,.238*nt,.8566875*et)).add(new go.PathSegment(go.PathSegment.Line,.3316875*nt,.76296875*et)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*nt,.80621875*et,.36353125*nt,.78340625*et,.3991875*nt,.79840625*et)).add(new go.PathSegment(go.PathSegment.Line,.43753125*nt,.9375*et)).add(new go.PathSegment(go.PathSegment.Line,.5625*nt,.9375*et)).add(new go.PathSegment(go.PathSegment.Line,.5625*nt,.80621875*et)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*nt,.760625*et,.602375*nt,.79809375*et,.63946875*nt,.78234375*et)).add(new go.PathSegment(go.PathSegment.Line,.76828125*nt,.8566875*et)).add(new go.PathSegment(go.PathSegment.Line,.85671875*nt,.76825*et)).add(new go.PathSegment(go.PathSegment.Line,.76065625*nt,.67221875*et)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*nt,.56246875*et,.78234375*nt,.63940625*et,.798125*nt,.602375*et)).add(new go.PathSegment(go.PathSegment.Line,.9375*nt,.56246875*et).close()).add(new go.PathSegment(go.PathSegment.Move,.5*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*nt,.5*et,.1*nt,.1*et).close()))}),go.Shape.defineFigureGenerator("Hand",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.5*et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,.3*et,0,.375*et,.05*nt,.325*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.45*nt,.075*et,.3*nt,.225*et,.4*nt,.175*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.525*nt,.075*et,.46*nt,.05*et,.525*nt,.05*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.4*et,.525*nt,.275*et,.475*nt,.325*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,.55*et,nt,.4*et,nt,.55*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.55*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.55*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.6*nt,.7*et,.675*nt,.55*et,.675*nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.575*nt,.85*et,.65*nt,.7*et,.65*nt,.85*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.85*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.85*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.535*nt,et,.61*nt,.85*et,.61*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,.435*nt,et,0,et).close()),ht}),go.Shape.defineFigureGenerator("Map",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.2*et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),lt.add(new go.PathSegment(go.PathSegment.Move,.25*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Move,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.8*et)),ht}),go.Shape.defineFigureGenerator("Eject",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et*.7)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*.7).close());var gt=new go.PathFigure(0,et*.6,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0).close()),ht}),go.Shape.defineFigureGenerator("Pencil",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*nt,.1*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.1*nt,.2*et).close()))}),go.Shape.defineFigureGenerator("Building",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*1,et*1,!1);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*.85)),lt.add(new go.PathSegment(go.PathSegment.Line,.046*nt,et*.85)),lt.add(new go.PathSegment(go.PathSegment.Line,.046*nt,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,.046*nt,et*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*nt,et*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*nt,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*nt,et*.85)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et*.85).close());var gt=new go.PathFigure(.126*nt,.85*et,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.126*nt,.45*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.322*nt,.45*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.322*nt,.85*et).close());var mt=new go.PathFigure(.402*nt,.85*et,!1);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.402*nt,.45*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.598*nt,.45*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.598*nt,.85*et).close());var xt=new go.PathFigure(.678*nt,.85*et,!1);ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.678*nt,.45*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.874*nt,.45*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.874*nt,.85*et).close());var St=new go.PathFigure(.5*nt,.1*et,!1);return ht.add(St),St.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*nt,.3*et)),St.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*nt,.3*et).close()),ht}),go.Shape.defineFigureGenerator("Staircase",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,et*1,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*.8)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.8)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.6)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.6)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.4)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*.4)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*.2)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.2)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.15)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.15)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.15,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.15,et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*.95).close()),ht}),go.Shape.defineFigureGenerator("5Bars",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,et*1,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.184,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.184,et*(1-.184)).close());var gt=new go.PathFigure(nt*.204,et,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.204,et*(1-.184))),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.388,et*(1-.184*2))),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.388,et*1).close());var mt=new go.PathFigure(nt*.408,et,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.408,et*(1-.184*2))),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.592,et*(1-.184*3))),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.592,et*1).close());var xt=new go.PathFigure(nt*.612,et,!0);ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.612,et*(1-.184*3))),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.796,et*(1-.184*4))),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.796,et*1).close());var St=new go.PathFigure(nt*.816,et,!0);return ht.add(St),St.add(new go.PathSegment(go.PathSegment.Line,nt*.816,et*(1-.184*4))),St.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-.184*5))),St.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1).close()),ht}),go.Shape.defineFigureGenerator("PC",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,0).close());var gt=new go.PathFigure(nt*.055,.07*et,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.07)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.055,et*.1).close());var mt=new go.PathFigure(nt*.055,.13*et,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.13)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.16)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.055,et*.16).close());var xt=new go.PathFigure(nt*.055,.18*et,!0);ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.18)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.21)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.055,et*.21).close());var St=new go.PathFigure(nt*1,0,!0);return ht.add(St),St.add(new go.PathSegment(go.PathSegment.Line,nt*.4,0)),St.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.65)),St.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.65).close()),ht}),go.Shape.defineFigureGenerator("Plane",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.55*nt,et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.475*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.35*nt,.525*et,0,.4*et,.225*nt,.45*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.475*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.35*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.325*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.325*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,.2*et,.975*nt,0,nt,.08*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.45*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.95*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,et).close()),ht}),go.Shape.defineFigureGenerator("Key",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*1,et*.5,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.9,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.35*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,.35*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.15,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.35*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.65*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.15,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,.65*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.65*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.65,.55*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,.55*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.85,.575*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.9,.6*et).close()),lt.add(new go.PathSegment(go.PathSegment.Move,.17*nt,.425*et)),lt.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*nt,.5*et,.075*nt,.075*et).close()),ht}),go.Shape.defineFigureGenerator("FilmTape",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,180,nt*0,nt*.3,nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.08,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.08,et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*1),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*1),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*2),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*2),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*3),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*3),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*4),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*4),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*5),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*5),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*6),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*6),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*7),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*7),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*8),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*8),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*9),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*9),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*10),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*10),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*11),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*11),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*12),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*12),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*13),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*13),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*14),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*14),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*15),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*15),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1));var gt=new go.PathFigure(0,0,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*0)),gt.add(new go.PathSegment(go.PathSegment.Arc,270,-180,nt*1,nt*.3,nt*.055)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1));var mt=new go.PathFigure(nt*.11,et*.1,!1);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*1+.028*0),et*.1)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*1+.028*0),et*.8)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.11,et*.8).close());var xt=new go.PathFigure(nt*(.11+.24133333*1+.028*1),et*.1,!1);ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*1),et*.1)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*1),et*.8)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*1+.028*1),et*.8).close());var St=new go.PathFigure(nt*(.11+.24133333*2+.028*2),et*.1,!1);return ht.add(St),St.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*3+.028*2),et*.1)),St.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*3+.028*2),et*.8)),St.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*2),et*.8).close()),ht}),go.Shape.defineFigureGenerator("FloppyDisk",function(Dt,nt,et){var ht=new go.Geometry,lt=8,gt=lt*Ut,mt=new go.PathFigure(lt,0,!1);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.86,0)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.14)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,et-lt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt-lt,et,nt,et-gt,nt-gt,et)),mt.add(new go.PathSegment(go.PathSegment.Line,lt,et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-lt,gt,et,0,et-gt)),mt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,lt,0,0,gt,gt,0).close());var xt=new go.PathFigure(nt*.83,0,!1);ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.83,et*.3)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*.3)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*0).close());var St=new go.PathFigure(nt*.83,et*1,!1);ht.add(St),St.add(new go.PathSegment(go.PathSegment.Line,nt*.83,et*.5)),St.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*.5)),St.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*1).close());var zt=new go.PathFigure(nt*.78,et*.05,!1);return ht.add(zt),zt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.05)),zt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.25)),zt.add(new go.PathSegment(go.PathSegment.Line,nt*.78,et*.25).close()),ht}),go.Shape.defineFigureGenerator("SpeechBubble",function(Dt,nt,et){var ht=Dt?Dt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=15),ht=Math.min(ht,nt/3),ht=Math.min(ht,et/3);var lt=ht*Ut,gt=et*.8,mt=new go.Geometry,xt=new go.PathFigure(ht,0,!0);return mt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt-ht,0)),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt,ht,nt-lt,0,nt,lt)),xt.add(new go.PathSegment(go.PathSegment.Line,nt,gt-ht)),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt-ht,gt,nt,gt-lt,nt-lt,gt)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,gt)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,gt)),xt.add(new go.PathSegment(go.PathSegment.Line,ht,gt)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt-ht,lt,gt,0,gt-lt)),xt.add(new go.PathSegment(go.PathSegment.Line,0,ht)),xt.add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,lt,lt,0).close()),lt>1?(mt.spot1=new go.Spot(0,0,lt,lt),mt.spot2=new go.Spot(1,.8,-lt,-lt)):(mt.spot1=go.Spot.TopLeft,mt.spot2=new go.Spot(1,.8)),mt}),go.Shape.defineFigureGenerator("Repeat",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*0,et*.45,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*.9)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.9)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.65,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*.45).close());var gt=new go.PathFigure(nt*1,et*.55,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*1)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.55)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*.55)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*.55).close()),ht}),go.Shape.defineFigureGenerator("Windows",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close()).add(new go.PathSegment(go.PathSegment.Move,.4*nt,.4*et)).add(new go.PathSegment(go.PathSegment.Line,.4*nt,.8*et)).add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)).add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et).close()).add(new go.PathSegment(go.PathSegment.Move,.2*nt,.1*et)).add(new go.PathSegment(go.PathSegment.Line,.2*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.1*et).close()).add(new go.PathSegment(go.PathSegment.Move,.1*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Line,.1*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et).close()))}),go.Shape.defineFigureGenerator("Terminal",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*0,et*.1,!1);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.9)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*.9).close());var gt=new go.PathFigure(nt*.1,et*.2,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.25)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.22,et*.285)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.32)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.37)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.275,et*.32)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.275,et*.25).close());var mt=new go.PathFigure(nt*.28,et*.37,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.37)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.41)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.28,et*.41).close()),ht}),go.Shape.defineFigureGenerator("Beaker",function(Dt,nt,et){var ht=new go.Geometry,lt=15,gt=lt*Ut,mt=new go.PathFigure(nt*.62,et*.475,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt,et-lt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt-lt,et,nt,et-gt,nt-gt,et)),mt.add(new go.PathSegment(go.PathSegment.Line,lt,et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-lt,gt,et,0,et-gt)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.38,et*.475)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.38,et*.03)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*0)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*0)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.62,et*.03).close()),gt>1?(ht.spot1=new go.Spot(0,0,gt,gt),ht.spot2=new go.Spot(1,1,-gt,-gt)):(ht.spot1=go.Spot.TopLeft,ht.spot2=go.Spot.BottomRight),ht}),go.Shape.defineFigureGenerator("Download",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*0,et*1,!0);ht.add(lt);var gt=.1/.3;lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.755,et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.93,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.61,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.39,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.755),et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.8),et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*(1-gt)).close());var mt=new go.PathFigure(nt*.4,et*0,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.44)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.26,et*.44)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.66)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.26),et*.44)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.44)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*0).close()),ht}),go.Shape.defineFigureGenerator("Bin",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*0,et*1,!0);ht.add(lt);var gt=.1/.3;return lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.755,et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.93,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.61,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.39,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.755),et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.8),et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*(1-gt)).close()),ht}),go.Shape.defineFigureGenerator("Upload",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*0,et*1,!0);ht.add(lt);var gt=.1/.3;lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.755,et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.93,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.61,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.39,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.755),et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.8),et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*(1-gt)).close());var mt=new go.PathFigure(nt*.5,et*0,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.26,et*.25)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.25)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.63)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.63)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.25)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.74,et*.25).close()),ht}),go.Shape.defineFigureGenerator("EmptyDrink",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*.15,et*0,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.85,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*1).close()),ht}),go.Shape.defineFigureGenerator("Drink",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*.15,et*0,!1);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.85,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*1).close());var gt=new go.PathFigure(nt*.235,et*.28,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.765,et*.28)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.655,et*.97)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.345,et*.97).close()),ht}),go.Shape.defineFigureGenerator("4Arrows",function(Dt,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*.5,et*0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.65,et*.25)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.25)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.5)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.65)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.65,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.65)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*.5)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.25)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.25).close()),ht}),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 un={},Nn="5.0",Mt={},Pt=null,ne=!1,Ne=!1,Be=null,Pe=!1,Bt=null,Ut=null,ue=0;ue4?parseFloat(xe):5};un.setHTML5Codebase=function(xe,on){Ut=xe,ce(xe,on)},un.setJavaCodebase=un.setJavaCodebaseVersion=un.isCompiledInstalled=un.setPreCompiledScriptPath=un.setPreCompiledResourcePath=function(){},un.setHTML5CodebaseVersion=function(xe,on){var tn=parseFloat(xe);if(tn!==NaN&&tn<5){console.log("The GeoGebra HTML5 codebase version "+tn+" is deprecated. Using version latest instead.");return}Bt=xe,Tt(xe,on)},un.getHTML5CodebaseVersion=function(){return Dt},un.getParameters=function(){return Mt},un.setFontsCSSURL=function(xe){mt=xe},un.setGiacJSURL=function(xe){},un.setJNLPFile=function(xe){Se=xe},un.setJNLPBaseDir=function(xe){},un.inject=function(){function xe(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var on="auto",tn=Mt.id,Cn,Ie=!1,ve=0;ve=5)return!0;var xe=un.getAppletObject();return xe&&typeof xe.recalculateEnvironments=="function"?(xe.recalculateEnvironments(),!0):!1},un.startAnimation=function(){var xe=un.getAppletObject();return xe&&typeof xe.startAnimation=="function"?(xe.startAnimation(),!0):!1},un.stopAnimation=function(){var xe=un.getAppletObject();return xe&&typeof xe.stopAnimation=="function"?(xe.stopAnimation(),!0):!1},un.getAppletObject=function(){var xe=Mt.id!==void 0?Mt.id:"ggbApplet";return window[xe]},un.resize=function(){};var Le=function(xe,on,tn){var Cn=document.createElement("param");Cn.setAttribute("name",on),Cn.setAttribute("value",tn),xe.appendChild(Cn)},de=function(xe){return xe&&xe!=="false"},Fe=function(xe,on,tn){St(Dt)<=4.2&&(tn=!0);var Cn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Dt||ggbHTML5LoadedCodebaseIsWebSimple&&!et)&&(Cn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Ie=document.createElement("div");Ie.classList.add("appletParameters","notranslate");var ve=on.width,ze=on.height;if(on.disableAutoScale=on.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():on.disableAutoScale,on.width!==void 0)if(St(Dt)<=4.4)de(on.showToolBar)&&(on.height-=7),de(on.showAlgebraInput)&&(on.height-=37),on.width<605&&de(on.showToolBar)&&(on.width=605,ve=605);else{var je=100;(de(on.showToolBar)||de(on.showMenuBar))&&(on.hasOwnProperty("customToolBar")&&(on.customToolbar=on.customToolBar),je=de(on.showMenuBar)?245:155),ve=5?(on.appletOnLoad=function(Ue){var ti=xe.querySelector(".ggb_preview");ti&&ti.parentNode.removeChild(ti),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Lt),window.GGBT_wsf_view&&$(window).trigger("resize"),Ot(Ue)},wt||Lt.appendChild(Ft)):Ie.appendChild(Ft),Lt.appendChild(Ie),wt||xe.appendChild(Lt),setTimeout(function(){un.resize()},1)}else{var Wt=document.createElement("div");Wt.className="applet_scaler",Wt.style.position="relative",Wt.style.display="block",Wt.appendChild(Ie),xe.appendChild(Wt),on.appletOnLoad=function(Ue){un.resize(),Ot(Ue)}}function kt(Ue,ti){ti&&typeof ti.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Ue,ti.appletOnLoad):renderGGBElement(Ue),_e("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",ti)}function Xt(Ue,ti){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Ue,params:ti}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Qn){kt(Qn.article,Qn.params)}),html5AppletsToProcess=null)},St(Dt)<5&&(Ue.className+=" geogebraweb")):kt(Ue,ti)}if(Cn){scriptLoadStarted=!0;for(var $e=0;$e0?(He.remove(),Lt.attr("id","fullscreencontent").show(),jQuery(Ot).append(Lt),window.dispatchEvent(new Event("resize"))):Fe(He,on,!1),window.GGBT_wsf_view.launchFullScreen(Ot)}else Ht=Cn,Fe(xe,on,!1);if(!window.GGBT_wsf_view)for(ze=0;zexe/4*3&&(He=xe/4*3),Ot=He/5.8,je.setAttribute("src",lt),je.setAttribute("width",He),je.setAttribute("height",Ot);var Lt=(xe-He)/2,wt=(on-Ot)/2;je.style.left=Lt+"px",je.style.top=wt+"px",Ie.appendChild(je)}}return Ie.appendChild(ze),Ie},Zn=function(xe){return xe=xe.toLowerCase(),xe==="html5"||xe==="screenshot"?xe:"html5"},_t=["web","webSimple","web3d","tablet","tablet3d","phone"],Tt=function(xe,on){if(Dt=xe,on){ce(Dt,!0);return}var tn=!ne;if(tn){var Cn=St(Dt);!isNaN(Cn)&&Cn<4.4&&(tn=!1)}var Ie,ve;window.location.protocol.substr(0,4)==="http"?Ie=window.location.protocol:Ie="http:";var ze=Dt.indexOf("//");ze>0?ve=Dt:ze===0?ve=Ie+Dt:ve="https://www.geogebra.org/apps/5.2.814.0/";for(var je in _t)if(Dt.slice(_t[je].length*-1)===_t[je]||Dt.slice((_t[je].length+1)*-1)===_t[je]+"/"){ce(ve,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&tn&&!Pt.is3D&&!Pt.AV&&!Pt.SV&&!Pt.CV&&!Pt.EV2&&!Pt.CP&&!Pt.PC&&!Pt.DA&&!Pt.FI&&!Pt.PV&&!de(Mt.showToolBar)&&!de(Mt.showMenuBar)&&!de(Mt.showAlgebraInput)&&!de(Mt.enableRightClick)&&(!Mt.appName||Mt.appName=="classic")?ve+="webSimple/":ve+="web3d/",ce(ve,!1)},ce=function(xe,on){if(xe.requirejs){Xe=xe;return}xe.slice(-1)!=="/"&&(xe+="/"),Xe=xe,on===null&&(on=xe.indexOf("http")===-1),pe=on,nt="web.nocache.js",et=!1;var tn=Xe.split("/");tn.length>1&&(!on&&tn[tn.length-2]==="webSimple"?(nt="webSimple.nocache.js",et=!0):_t.indexOf(tn[tn.length-2])>=0&&(nt=tn[tn.length-2]+".nocache.js")),tn=xe.split("/"),Dt=tn[tn.length-3],Dt.substr(0,4)==="test"?Dt=Dt.substr(4,1)+"."+Dt.substr(5,1):(Dt.substr(0,3)==="war"||Dt.substr(0,4)==="beta")&&(Dt="5.0");var Cn=parseFloat(Dt);Cn!==NaN&&Cn<5&&xe.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Cn+" is deprecated. Using version latest instead."),Tt("5.0",on))},_e=function(xe,on){window.console&&window.console.log&&(!on||typeof on.showLogging=="undefined"||on.showLogging&&on.showLogging!=="false")&&console.log(xe)};Mt.material_id!==void 0?re(Ye):Ye();function Ye(){var xe=Nn;Bt!==null?xe=Bt:parseFloat(xe)<5&&(xe="5.0"),Tt(xe,!1),Ut!==null&&ce(Ut,pe),Pe=!0}return un},GGBAppletUtils=function(){"use strict";function un(){return window.GGBT_wsf_edit!==void 0}function Nn(Pe,Bt){Bt!=1?(Pe.style.transformOrigin="0% 0% 0px",Pe.style.webkitTransformOrigin="0% 0% 0px",Pe.style.transform="scale("+Bt+","+Bt+")",Pe.style.webkitTransform="scale("+Bt+","+Bt+")",Pe.style.maxWidth="initial",Pe.querySelector(".ggb_preview")!==null&&(Pe.querySelector(".ggb_preview").style.maxWidth="initial"),Pe.querySelectorAll(".ggb_preview img")[0]!==void 0&&(Pe.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),Pe.querySelectorAll(".ggb_preview img")[1]!==void 0&&(Pe.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(Pe.style.transform="none",Pe.style.webkitTransform="none")}function Mt(Pe,Bt,Ut,ue,se,Se){var Xe=null;if(Se!=null&&Se!="")for(var pe=Pe.parentNode;pe!=null;)if((" "+pe.className+" ").indexOf(" "+Se+" ")>-1){Xe=pe;break}else pe=pe.parentNode;var Ht=0,Dt=0,nt=0,et=0,ht=0,lt=0,gt=0;if(Xe)Ht=Xe.offsetWidth,Dt=Math.max(ue?Xe.offsetWidth:0,Xe.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(Ht=Math.min(window.innerWidth,document.documentElement.clientWidth),Dt=Math.min(window.innerHeight,document.documentElement.clientHeight),nt=Ht):(Ht=window.innerWidth,Dt=window.innerHeight,nt=window.innerWidth),Pe){var mt=Pe.getBoundingClientRect();mt.left>0&&mt.left<=Ht&&(se===void 0||!se)&&(document.dir==="rtl"?(ht=Ht-mt.width-mt.left,lt=nt<=480?10:30):(lt=mt.left,ht=nt<=480?10:30),et=lt+ht)}if(Pe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var xt=Pe.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(et=40,gt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(et=0,gt=40)}}return Pe&&((Ut===void 0||!Ut)&&Bt>0&&Bt+et1&&(Se=!0)),Bt&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Se=!0),!(Pe.hasOwnProperty("disableAutoScale")&&Pe.disableAutoScale))se=Pt(Pe,Bt,Se,Ut,Pe.scaleContainerClass);else return ue;return Se&&(!Pe.hasOwnProperty("scale")||ue===1)?se:Math.min(ue,se)}function Ne(Pe){var Bt=Math.min(window.innerWidth,document.documentElement.clientWidth),Ut=Math.min(window.innerHeight,document.documentElement.clientHeight),ue=Pe.getBoundingClientRect(),se=(Bt-ue.width)/2,Se=(Ut-ue.height)/2;Se<0&&(Se=0),Pe.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(se<40?Pe.style.left="40px":Pe.style.left=se+"px",Pe.style.top=Se+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Se<40?Pe.style.top="40px":Pe.style.top=Se+"px",Pe.style.left=se+"px")}function Be(Pe,Bt){var Ut=Pe.querySelector(".appletParameters");if(Ut){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Bt.id!==Ut.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Pe)}if(Ut.parentElement&&/fullscreen/.test(Ut.parentElement.className))return;var ue=ne(Bt,Pe);un()&&Ut.setAttribute("data-param-scale",ue);for(var se=null,Se=0;Se=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(un){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(un){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(un){var Nn=c[un];return Nn==null?null:Nn},r=d,webModule.__errFn=e}function B(){function un(Pe){var Bt=Pe.lastIndexOf(rb);Bt==-1&&(Bt=Pe.length);var Ut=Pe.indexOf(sb);Ut==-1&&(Ut=Pe.length);var ue=Pe.lastIndexOf(tb,Math.min(Ut,Bt));return ue>=O?Pe.substring(O,ue+P):W}function Nn(Pe){if(!Pe.match(/^\w+:\/\//)){var Bt=o.createElement(ub);Bt.src=Pe+vb,Pe=un(Bt.src)}return Pe}function Mt(){var Pe=__gwt_getMetaProperty(wb);return Pe!=null?Pe:W}function Pt(){for(var Pe=o.getElementsByTagName(_),Bt=O;BtO?Pe[Pe.length-P].href:W}function Ne(){var Pe=o.location;return Pe.href==Pe.protocol+zb+Pe.host+Pe.pathname+Pe.search+Pe.hash}var Be=Mt();return Be==W&&(Be=Pt()),Be==W&&(Be=ne()),Be==W&&Ne()&&(Be=un(o.location.href)),Be=Nn(Be),Be}function C(un){return un.match(/^\//)||un.match(/^[a-zA-Z]+:\/\//)?un:webModule.__moduleBase+un}function D(){var un=[],Nn=O,Mt=[],Pt=[];function ne(Pe){var Bt=Pt[Pe](),Ut=Mt[Pe];if(Bt in Ut)return Bt;var ue=[];for(var se in Ut)ue[Ut[se]]=se;throw r&&r(Pe,ue,Bt),null}if(__gwt_isKnownPropertyValue=function(Pe,Bt){return Bt in Mt[Pe]},webModule.__getPropMap=function(){var Pe={};for(var Bt in Mt)Mt.hasOwnProperty(Bt)&&(Pe[Bt]=ne(Bt));return Pe},webModule.__computePropValue=ne,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Ne;try{Ne=Cb;var Be=Ne.indexOf(Db);Be!=-1&&(Nn=parseInt(Ne.substring(Be+P),$),Ne=Ne.substring(O,Be))}catch(Pe){}return webModule.__softPermutationId=Nn,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(un,Nn,Mt){"use strict";Mt.d(Nn,{Ax:function(){return Be},Ds:function(){return Pe},KI:function(){return Ut},SI:function(){return Ne},f1:function(){return ne}});var Pt=Mt(11320);function ne(ue){let se=!0;if(ue.length>0){for(let Se=0;SeDt in Ht?Bt(Ht,Dt,{enumerable:!0,configurable:!0,writable:!0,value:nt}):Ht[Dt]=nt,Xe=(Ht,Dt)=>{for(var nt in Dt||(Dt={}))ue.call(Dt,nt)&&Se(Ht,nt,Dt[nt]);if(Ut)for(var nt of Ut(Dt))se.call(Dt,nt)&&Se(Ht,nt,Dt[nt]);return Ht};const pe=({cancelText:Ht="\u53D6\u6D88",okText:Dt="\u786E\u5B9A",loading:nt=!1,hasOkBtn:et=!0,hasCancelBtn:ht=!0,okButtonProps:lt={},onCancel:gt=()=>{},onOk:mt=()=>{},className:xt=""})=>Pt.createElement("div",{className:Pe()(Ne.buttonFixed,xt)},Pt.createElement("div",{className:Ne.buttonWrap},ht&&Pt.createElement(ne.ZP,{size:"middle",className:`${Ne.button} mr20`,onClick:gt},Ht),et&&Pt.createElement(ne.ZP,Xe({size:"middle",type:"primary",className:`${Ne.button} mr20`,loading:nt,onClick:mt},lt),Dt)))},63205:function(un,Nn,Mt){"use strict";Mt.d(Nn,{Z:function(){return Xe}});var Pt=Mt(67294),ne={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Ne=Mt(94184),Be=Mt.n(Ne),Pe=Mt(74330),Bt=Mt(15979),Ut=Mt(33170),ue=Mt(28706),se=(pe,Ht,Dt)=>new Promise((nt,et)=>{var ht=mt=>{try{gt(Dt.next(mt))}catch(xt){et(xt)}},lt=mt=>{try{gt(Dt.throw(mt))}catch(xt){et(xt)}},gt=mt=>mt.done?nt(mt.value):Promise.resolve(mt.value).then(ht,lt);gt((Dt=Dt.apply(pe,Ht)).next())}),Xe=({data:pe,className:Ht,fullWidth:Dt,style:nt={},onClose:et,onOk:ht,showFullTools:lt,noAssociationId:gt})=>{const mt=(0,Pt.useRef)(null),xt=(0,Pt.useRef)(null),St=(0,Pt.useRef)(null),zt=(0,Pt.useRef)(null),[Jt,re]=(0,Pt.useState)(!1),[oe,$t]=(0,Pt.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,Pt.useEffect)(()=>(St.current||(St.current=document.createElement("style"),document.head.appendChild(St.current)),pe!=null&&pe.visible?(document.body.setAttribute("data-custom","y-hidden"),St.current.innerHTML=" html { overflow-y: hidden; }",pe!=null&&pe.src&&Le()):(document.body.removeAttribute("data-custom"),St.current&&(document.head.removeChild(St.current),St.current=null)),()=>{document.body.removeAttribute("data-custom"),St.current&&(document.head.removeChild(St.current),St.current=null)}),[pe==null?void 0:pe.visible]);const Le=()=>se(void 0,null,function*(){re(!0),$t("\u6B63\u5728\u52A0\u8F7D\u4E2D");const De=yield(0,ue.ZJ)(pe==null?void 0:pe.src);mt.current.src="",mt.current.src=De,mt.current.onload=function(){rn()},re(!1),$t("")}),de=De=>se(void 0,null,function*(){re(!0),$t("\u6B63\u5728\u4FDD\u5B58\u4E2D");const jn=yield(0,Ut.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:pe.title,file:De.dataUrl}});jn!=null&&jn.id&&!gt?(yield(0,Ut.ZP)(`/api/attachments/${pe.id}/add_subitem.json`,{method:"post",body:{subitem_id:jn==null?void 0:jn.id,settings:JSON.stringify(De.state)}})).status===0&&ht():jn!=null&&jn.id&&ht(jn),re(!1),$t("")}),Fe=()=>{const De=document.querySelector('a[href="https://markerjs.com/"]');De&&De.parentNode&&(De.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(Bn=>{const an=document.querySelector(Bn.name);an&&an.setAttribute("title",Bn.title)})},rn=()=>{xt.current=new Bt.hP(mt.current),xt.current.targetRoot=zt.current,xt.current.addEventListener("render",de),xt.current.addEventListener("beforeclose",et),lt&&(xt.current.availableMarkerTypes=xt.current.ALL_MARKER_TYPES,xt.current.uiStyleSettings.redoButtonVisible=!0,xt.current.uiStyleSettings.notesButtonVisible=!0,xt.current.uiStyleSettings.zoomButtonVisible=!0,xt.current.uiStyleSettings.zoomOutButtonVisible=!0,xt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=xt.current.uiStyleSettings,xt.current.show(),pe!=null&&pe.snapshotData&&xt.current.restoreState(pe.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Fe()},300)};return Pt.createElement(Pt.Fragment,null,(pe==null?void 0:pe.visible)&&Pt.createElement(Pe.Z,{spinning:Jt,tip:oe,style:{position:"absolute",width:"100vw"}},Pt.createElement("div",{ref:zt,className:Be()(ne.imageDimensions,Ht,Dt?ne.fullWidth:""),style:nt},Pt.createElement("img",{className:ne.img,ref:mt}))))}},36527:function(un,Nn,Mt){"use strict";var Pt=Mt(67294),ne=Mt(71230),Ne=Mt(15746),Be=Mt(55238),Pe=Mt(85804),Bt=Mt(65226),Ut=Mt(71736),ue=Mt(84279),se=Mt(67294);const Se=(0,Pt.forwardRef)(({callback:Xe,showSaveButton:pe,value:Ht=""},Dt)=>{const nt=(0,Pt.useRef)(),et=[{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 "}]}]}],ht=[{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=xt=>{nt.current.setValue(nt.current.getValue()+" "+xt.value+" ")},gt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:se.createElement(ne.Z,{className:Ut.Z.lists,gutter:[10,10]},et.map((xt,St)=>se.createElement(Ne.Z,{flex:"110px",className:Ut.Z.item},se.createElement("div",null,se.createElement(Bt.Z,{value:`$$${xt.value}$$`}),xt.name),se.createElement("div",{className:Ut.Z.children},xt.children.map((zt,Jt)=>se.createElement("div",{key:Jt},se.createElement("h1",null,zt.name),se.createElement(ne.Z,{gutter:[10,10]},zt.data.map((re,oe)=>se.createElement(Ne.Z,{key:oe,onClick:()=>lt(re),className:Ut.Z.diamond},se.createElement(Bt.Z,{value:"`$$"+re.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:se.createElement(ne.Z,{className:Ut.Z.lists,gutter:[10,10]},ht.map((xt,St)=>se.createElement(Ne.Z,{flex:"110px",className:Ut.Z.item},se.createElement("div",null,se.createElement(Bt.Z,{value:"`$$"+xt.value+"$$`"}),xt.name),se.createElement("div",{className:Ut.Z.children},xt.children.map((zt,Jt)=>se.createElement("div",{key:Jt},zt.name&&se.createElement("h1",null,zt.name),se.createElement(ne.Z,{gutter:[10,10]},zt.data.map((re,oe)=>se.createElement(Ne.Z,{key:oe,onClick:()=>lt(re),className:Ut.Z.diamond},se.createElement(Bt.Z,{value:"`$$"+re.value+"$$`"}))))))))))}],mt=()=>{var xt=document.createElement("div");xt.innerHTML=nt.current.getValue();var St=xt.innerText;return Xe&&Xe(St),St};return(0,Pt.useImperativeHandle)(Dt,()=>({getData:mt})),se.createElement("div",{className:Ut.Z.mathWrap},se.createElement(Be.default,{defaultActiveKey:"1",items:gt}),se.createElement("math-field",{locale:"zh_cn",className:Ut.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:nt,style:{width:800,marginTop:30,fontSize:18}},Ht||""),pe&&se.createElement("div",{className:Ut.Z.button},se.createElement(Pe.ZP,{size:"large",onClick:mt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Nn.Z=Se},26194:function(un,Nn,Mt){"use strict";var Pt=Mt(67294),ne=Mt(4977),Ne=Mt(85804),Be=Object.defineProperty,Pe=Object.defineProperties,Bt=Object.getOwnPropertyDescriptors,Ut=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,Se=(Dt,nt,et)=>nt in Dt?Be(Dt,nt,{enumerable:!0,configurable:!0,writable:!0,value:et}):Dt[nt]=et,Xe=(Dt,nt)=>{for(var et in nt||(nt={}))ue.call(nt,et)&&Se(Dt,et,nt[et]);if(Ut)for(var et of Ut(nt))se.call(nt,et)&&Se(Dt,et,nt[et]);return Dt},pe=(Dt,nt)=>Pe(Dt,Bt(nt));const Ht=({img:Dt,buttonProps:nt={},styles:et={},customText:ht,ButtonText:lt,ButtonClick:gt,Buttonclass:mt,ButtonTwo:xt,imgStyles:St,loading:zt=!1,className:Jt=""})=>Pt.createElement("section",{className:`tc animated fadeIn ${Jt}`,style:Xe({color:"#999",margin:"100px auto",visibility:zt?"hidden":"visible"},et)},Pt.createElement("img",{src:Dt||ne,style:pe(Xe({},St),{pointerEvents:"none",userSelect:"none"})}),Pt.createElement("p",{className:"mt20 font14"},ht||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),lt&&Pt.createElement(Ne.ZP,Xe({className:mt,onClick:gt},nt),lt),xt&&xt);Nn.Z=Ht},20819:function(un,Nn,Mt){"use strict";Mt.d(Nn,{Z:function(){return mt}});var Pt=Mt(67294),ne={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Ne=Mt(85804),Be=Mt(30153),Pe=Mt(36295),Bt=Mt(83062),Ut=Mt(28706),ue=Mt(15835),se=Mt(26194),Se=Mt(11320),Xe=Mt(66540),pe=Mt(67294),Ht=Object.defineProperty,Dt=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,ht=(xt,St,zt)=>St in xt?Ht(xt,St,{enumerable:!0,configurable:!0,writable:!0,value:zt}):xt[St]=zt,lt=(xt,St)=>{for(var zt in St||(St={}))nt.call(St,zt)&&ht(xt,zt,St[zt]);if(Dt)for(var zt of Dt(St))et.call(St,zt)&&ht(xt,zt,St[zt]);return xt},gt=(xt,St,zt)=>new Promise((Jt,re)=>{var oe=de=>{try{Le(zt.next(de))}catch(Fe){re(Fe)}},$t=de=>{try{Le(zt.throw(de))}catch(Fe){re(Fe)}},Le=de=>de.done?Jt(de.value):Promise.resolve(de.value).then(oe,$t);Le((zt=zt.apply(xt,St)).next())}),mt=({editOffice:xt="view",data:St,issaver:zt,onSaver:Jt,theme:re,type:oe,filename:$t,monacoEditor:Le,className:de,style:Fe,close:rn,onClose:De,hasMask:jn,disabledDownload:Bn,onImgDimensions:an,showNodata:Zn,recordInfo:_t})=>{const[Tt,ce]=(0,Pt.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[_e,Ye]=(0,Pt.useState)(""),[xe,on]=(0,Pt.useState)(),tn=window.ENV==="build"?"/react/build":"",Cn=location.host.startsWith("localhost")?Se.Z.PROXY_SERVER:Se.Z.API_SERVER,ve=10*(1024*1024),ze=(0,Pt.useRef)();St!=null&&St.startsWith("/api")&&oe!=="txt"&&(St=Se.Z.API_SERVER+St);const je=Ft=>Ft.substring(Ft.lastIndexOf("/")+1).split(".").pop();$t&&Le&&(Le.filename=$t),(0,Pt.useEffect)(()=>{var Ft,Wt;const kt=(Wt=(Ft=document.cookie)==null?void 0:Ft.replace(/\s/g,""))==null?void 0:Wt.split(";");kt==null||kt.map(Xt=>{let $e=Xt.split("=");$e[0]==="_educoder_session"&&Ye($e[1])})},[]),(0,Pt.useEffect)(()=>{oe==="office"&&(St.indexOf("bigfilescdn.")>-1||St.indexOf("bigfiles1")>-1?on({url:St,fileType:je(St),model:St.indexOf("model=edit")?"edit":"view"}):Ot())},[oe,St]);function He(Ft){return gt(this,null,function*(){Ft.data.type==="pdfdata"&&(Jt(Ft.data.data),window.removeEventListener("message",He,!1)),console.log("mess---:",Ft.data)})}const Ot=()=>gt(void 0,null,function*(){console.log("data:",St);let Ft=St;St.startsWith("http")||(Ft=location.origin+Ft);let Wt=new URL(Ft).pathname.split("/").pop();const kt=yield(0,ue.gJ)({attachment_id:Wt});kt.url=Cn+kt.url,on(kt)}),Lt=()=>{if(St.startsWith("http")||St.startsWith("blob:")){wt();return}(0,Ut.Sv)($t||"educoder",St,$t)},wt=()=>{_t&&(0,Xe.fc)({id:_t==null?void 0:_t.id,watch_type:1,course_id:_t==null?void 0:_t.course_id}),(0,Ut.Nd)($t||"educoder",decodeURIComponent(St))};return pe.createElement("div",{style:lt({},Fe||{}),className:`${jn&&ne.bgBlack} ${oe?ne.wrp:"hide"}`},rn&&pe.createElement("div",{className:ne.close,ref:ze},!!an&&pe.createElement(Bt.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>ze.current},pe.createElement("span",{onClick:()=>{De(),an()}},pe.createElement("i",{className:"icon-yulanpizhu"}))),!Bn&&pe.createElement(Bt.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>ze.current},pe.createElement("span",{onClick:wt},pe.createElement("i",{className:"icon-quxiaozhiding"}))),zt&&pe.createElement(Bt.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>ze.current},pe.createElement("span",{className:"",onClick:()=>{const Ft=document.getElementById("pdfiframe");window.addEventListener("message",He,!1),setTimeout(()=>{Ft.contentWindow.postMessage("getData","*")},300)}},pe.createElement("i",{className:"icon-baocun"}))),pe.createElement(Bt.Z,{title:"\u5173\u95ED",getPopupContainer:()=>ze.current},pe.createElement("span",{className:"",onClick:()=>{De()}},pe.createElement("i",{className:"icon-guanbi1"})))),pe.createElement("div",{className:`${ne[de]} ${de} ${ne.monaco} ${oe==="txt"?"show":"hide"}`},oe==="txt"&&pe.createElement(pe.Fragment,null,pe.createElement(Pe.ZP,lt({},Le)))),oe==="audio"&&pe.createElement("audio",{src:`${(St==null?void 0:St.indexOf("http://"))>-1||(St==null?void 0:St.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${St}`,autoPlay:!0}),oe==="video"&&pe.createElement(pe.Fragment,null,(St==null?void 0:St.indexOf("http"))>-1?pe.createElement("video",{controls:!0,src:`${St}`,autoPlay:!0}):pe.createElement("video",{controls:!0,src:`data:video/mp4;base64,${St}`,autoPlay:!0})),oe==="office"&&xe&&pe.createElement("iframe",{src:`${tn}/office.html?key=${xe.key}&url=${btoa(xe.url)}&callbackUrl=${Cn+(xe.callbackUrl||"")}&fileType=${xe.fileType}&title=${xe.title||""}&model=${xt}&officeServer=${Se.Z.ONLYOFFICE}&disabledDownload=${!!Bn}`}),oe==="html"&&pe.createElement("iframe",{src:St+"&disposition=inline"}),oe==="pdf"&&pe.createElement("iframe",{id:"pdfiframe",src:`${tn}/js/pdfview/index.html?filename=${$t||"educoder.pdf"}&url=${encodeURIComponent(St)}&disabledDownload=${!!Bn}&model=${xt}`}),oe==="image"&&pe.createElement("img",{src:`${(St==null?void 0:St.indexOf("http://"))>-1||(St==null?void 0:St.indexOf("https://"))>-1?"":"data:image/png;base64,"}${St}`}),(oe==="other"||oe==="download")&&pe.createElement(pe.Fragment,null,Zn?pe.createElement(se.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:pe.createElement(Ne.ZP,{icon:pe.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Lt,disabled:Bn},"\u4E0B\u8F7D")}):pe.createElement(Ne.ZP,{type:"primary",size:"middle",onClick:Lt,disabled:Bn},pe.createElement(Be.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},65226:function(un,Nn,Mt){"use strict";Mt.d(Nn,{z:function(){return oe},Z:function(){return $t}});var Pt=Mt(67294),ne=Mt(81897),Ne=Mt(51161),Be=Mt(11771),Pe=Mt(67631),Bt=Mt.n(Pe),Ut=Mt(11320),ue=Mt(28706),se=Mt(20527),Se=Mt(25934),Xe=Mt(20819),pe=Mt(67294),Dt=({html:Le})=>{const de=(0,Pt.useRef)(null),Fe=(0,Pt.useRef)(null),rn=`.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,Pt.useEffect)(()=>{const De=de.current.attachShadow({mode:"open"});Fe.current=document.createElement("div"),Fe.current.className="markdown-body",Fe.current.innerHTML=Le,De.appendChild(Fe.current);const jn=document.createElement("style");return jn.textContent=rn,De.appendChild(jn),()=>{De.innerHTML=""}},[]),(0,Pt.useEffect)(()=>{Fe.current&&(Fe.current.innerHTML=Le)},[Le]),pe.createElement("div",{ref:de})};function nt(Le){const de=["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"],Fe=new RegExp(`\\b(${de.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Le.replace(Fe,"").trim()}var et=Object.defineProperty,ht=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable,mt=(Le,de,Fe)=>de in Le?et(Le,de,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):Le[de]=Fe,xt=(Le,de)=>{for(var Fe in de||(de={}))lt.call(de,Fe)&&mt(Le,Fe,de[Fe]);if(ht)for(var Fe of ht(de))gt.call(de,Fe)&&mt(Le,Fe,de[Fe]);return Le};const St="@\u2581\u2581@",zt="@\u2581@",Jt=/]*>/g;function re(Le){let de=document.createElement("div");return de.innerHTML=Le,de.childNodes.length===0?"":de.childNodes[0].nodeValue}const oe=(Le,de)=>{Le=Le||"";const Fe=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,rn=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,De=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,jn=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return de?Le.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Fe,(Bn,an,Zn,_t,Tt,ce,_e)=>{const Ye=an||_t||ce,xe=Zn||Tt||_e||"?";return Ut.Z.API_SERVER+"/api/attachments/"+Ye+xe+"&t="+(0,ue.Jn)(Ye,Date.now())+(Bn.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Le=Le.replace(jn,(Bn,an,Zn,_t,Tt,ce,_e)=>{const Ye=an||_t||ce,xe=Zn||Tt||_e||"?";return Ut.Z.API_SERVER+"/attachments/download/"+Ye+xe+"&t="+(0,ue.Jn)(Ye,Date.now())+(Bn.indexOf(")")>-1?")":"&")}).replace(Fe,(Bn,an,Zn,_t,Tt,ce,_e)=>{const Ye=an||_t||ce,xe=Zn||Tt||_e||"?";return Ut.Z.API_SERVER+"/api/attachments/"+Ye+xe+"&t="+(0,ue.Jn)(Ye,Date.now())+(Bn.indexOf(")")>-1?")":"&")}).replace(rn,(Bn,an,Zn,_t,Tt)=>{const ce=an||_t,_e=Zn||Tt||"";return'"'+Ut.Z.API_SERVER+"/api/attachments/"+ce+_e+ce+_e+"&t="+(0,ue.Jn)(ce,Date.now())}).replace(De,(Bn,an,Zn,_t,Tt)=>{const ce=an||_t,_e=Zn||Tt||"";return"("+Ut.Z.API_SERVER+"/files/uploads/"+ce+_e+ce+_e+"&t="+(0,ue.Jn)(ce,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,` `),Le)};var $t=({value:Le="",className:de,showTextOnly:Fe,showLines:rn,style:De={},stylesPrev:jn={},highlightKeywords:Bn,showProgramFill:an,isProgramFill:Zn,disabledFill:_t=!1,programFillValue:Tt,onFillChange:ce=xe=>{},onFillBlur:_e=()=>{},onFillFocus:Ye=()=>{}})=>{let xe=nt(String(Le||""));const[on,tn]=(0,Pt.useState)(""),[Cn,Ie]=(0,Pt.useState)("office"),[ve,ze]=(0,Pt.useState)([]),je=(0,Pt.useRef)("a"+(0,Se.Z)()),He={},Ot=Ue=>//i.test(Ue||""),Lt=(Ue,ti,Qn)=>{const Hn=document.createElement(Ue===zt?"input":"textarea");Hn.style.width="100%",Hn.style.height=Ue===zt?"40px":"151px",Hn.rows=5,Hn.spellcheck=!1,Hn.name="edu-program-fill",Hn.placeholder="\u8BF7\u8F93\u5165",Hn.dataset.id=ti;const pn=Object.keys(He).length;return He[pn]=Hn,`${Hn.outerHTML}`};function wt(Ue){return Ue=Ue.replace(/!\[.*?\]\(.*?\)/g,""),Ue=Ue.replace(/\[.*?\]\(.*?\)/g,""),Ue=Ue.replace(new RegExp("","gs"),""),Ue=Ue.replace(//g,""),Ue=Ue.replace(//g,""),Ue=Ue.replace(new RegExp(".*?<\\/video>","gs"),""),Ue=Ue.replace(new RegExp(".*?<\\/audio>","gs"),""),Ue=Ue.replace(new RegExp(".*?<\\/style>","gs"),""),Ue=Ue.replace(new RegExp(".*?<\\/script>","gs"),""),Ue}const Ft=Ue=>!Fe&&Ot(xe)?Ue:Ue.replace(/([\s\S]+?)<\/style>/gim,function(ti,Qn){let Hn=Qn.replace(/(\n|\r)/g,"").split("}"),pn=[];return Hn.map(gi=>{gi!=""&&pn.push(`.${je.current} ${gi}`)}),``}),Wt=(0,Pt.useMemo)(()=>{try{const Hn=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,pn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,gi=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Mi=/\(\/attachments\/download\//g;xe=xe.replace(Mi,"("+Ut.Z.API_SERVER+"/attachments/download/").replace(Hn,"("+Ut.Z.API_SERVER+"/api/attachments/").replace(pn,'"'+Ut.Z.API_SERVER+"/api/attachments/").replace(gi,'"'+Ut.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(Hn){}if(an){let Hn=-1;return xe=xe.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(pn,gi,Mi){var In;return++Hn,Lt(pn,Hn,(In=Tt==null?void 0:Tt[Hn])==null?void 0:In.value.replaceAll("<","<").replaceAll(">",">"))}),`
${Ft(xe||"")}
`}let Ue=Ft(xe);Ue=(0,Ne.ZP)(Ue);const ti=(0,Ne.ez)();xe.match(/\[TOC\]/)&&(Ue=Ue.replace("

[TOC]

",(0,Ne.Qv)()),(0,Ne.Iy)()),Ue=Ue.replace(/(__special_katext_id_\d+__)/g,(Hn,pn)=>{const{type:gi,expression:Mi}=ti[pn];return(0,se.renderToString)(re(Mi)||"",{displayMode:gi==="block",throwOnError:!1,output:"html"})}),Ue=Ue.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Ne.AL)();const Qn=document.createElement("div");if(Qn.innerHTML=Ue,Fe)return Qn.innerText;if(Bn){const Hn=Bn.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Je(Qn,Hn),Qn.innerHTML}return setTimeout(()=>Mn(),500),Qn.innerHTML},[xe,Bn]);(0,Pt.useEffect)(()=>{fn.current&&fn.current.querySelectorAll(["input","textarea"]).forEach(ti=>{ti.oninput=kt,ti.onblur=Xt,ti.onfocus=$e})},[ve]),(0,Pt.useEffect)(()=>{var Ue,ti,Qn,Hn,pn;if(Tt!=null&&Tt.length)try{const gi=fn.current.querySelectorAll(".edu-program-fill-score"),Mi=fn.current.querySelectorAll('[name="edu-program-fill"]');for(const[In,ei]of Mi.entries())ei.value=((Ue=Tt==null?void 0:Tt[In])==null?void 0:Ue.value)||"",((ti=Tt==null?void 0:Tt[In])==null?void 0:ti.type)==="warning"?ei.className="program-fill-warning":((Qn=Tt==null?void 0:Tt[In])==null?void 0:Qn.type)==="success"?ei.className="program-fill-success":ei.className="";for(const[In,ei]of gi.entries())ei.innerHTML=(Hn=Tt==null?void 0:Tt[In])!=null&&Hn.score?`${(pn=Tt==null?void 0:Tt[In])==null?void 0:pn.score}\u5206`:"";ze(Tt)}catch(gi){console.log(gi,"error")}},[Tt]);const kt=Ue=>{ve[Ue.target.dataset.id]=ve[Ue.target.dataset.id]||{},ve[Ue.target.dataset.id].value=Ue.target.value,ze([...ve]),ce(ve,Ue.target.dataset.id)},Xt=Ue=>{ve[Ue.target.dataset.id]=ve[Ue.target.dataset.id]||{},ve[Ue.target.dataset.id].value=Ue.target.value,ze([...ve]),_e(ve,Ue.target.dataset.id)},$e=Ue=>{ve[Ue.target.dataset.id]=ve[Ue.target.dataset.id]||{},ve[Ue.target.dataset.id].value=Ue.target.value,ze([...ve]),Ye(ve,Ue.target.dataset.id)};function Je(Ue,ti){return Ue.childNodes.forEach(Qn=>{var Hn;if(Qn.childNodes.length>0)Je(Qn,ti);else if(Qn.nodeName!=="IMG")if(Qn.innerHTML)Qn.innerHTML=(Hn=Qn.innerHTML)==null?void 0:Hn.replace(new RegExp(ti,"gi"),'$&');else{const pn=document.createElement("span");pn.innerHTML=Qn.textContent.replace(new RegExp(ti,"gi"),'$&'),Qn.replaceWith(pn)}})}const fn=(0,Pt.useRef)();Ne.jb.WebkitLineClamp=rn,rn&&(De=xt(xt({},De),Ne.jb));function Ve(Ue){let ti=Ue.target;if(ti.tagName.toUpperCase()==="A"){let Qn=ti.getAttribute("href");if(Qn.indexOf("office")>-1)Ue.preventDefault(),tn(Qn),Ie("office");else if(Qn.indexOf("application/pdf")>-1)Ue.preventDefault(),tn(Qn),Ie("pdf");else if(Qn.indexOf("text/html")>-1)Ue.preventDefault(),tn(Qn),Ie("html");else if(Qn.startsWith("#")){Ue.preventDefault();let Hn=document.getElementById(Qn.replace("#",""));Hn&&Hn.scrollIntoView(!0)}}}const Mn=()=>{var Ue;const ti=(Ue=fn.current)==null?void 0:Ue.querySelectorAll("video");ti==null||ti.forEach(Qn=>{if(Qn.oncontextmenu=()=>!1,Qn.src.indexOf(".m3u8")>-1&&!Qn.canPlayType("application/vnd.apple.mpegurl")){if(Bt().isSupported()){var Hn=new(Bt());Hn.loadSource(Qn.src),Hn.attachMedia(Qn)}}})};return(0,Pt.useEffect)(()=>{if(fn.current&&Wt&&Wt.match(Jt)&&window.PR.prettyPrint(),fn.current)return fn.current.addEventListener("click",Ve),()=>{var Ue;(Ue=fn.current)==null||Ue.removeEventListener("click",Ve),(0,Ne.AL)(),(0,Ne.Iy)()}},[Wt,fn.current,Ve]),(0,Pt.useEffect)(()=>{var Ue;const ti=Qn=>{Qn.preventDefault(),Qn.clipboardData.setData("text",window.getSelection().toString())};return(Ue=fn.current)==null||Ue.addEventListener("copy",ti),()=>{var Qn;(Qn=fn.current)==null||Qn.removeEventListener("copy",ti)}},[fn.current]),Pt.createElement(Pt.Fragment,null,Fe&&Pt.createElement("div",{ref:fn},Wt),!Fe&&!Ot(Wt)&&Pt.createElement("div",{ref:fn,style:xt({},De),className:`${de||""} ${_t?"disabled-fill":""} markdown-body ${je.current}`,dangerouslySetInnerHTML:{__html:Wt}}),!Fe&&Ot(Wt)&&Pt.createElement(Dt,{html:Wt}),Pt.createElement(Xe.Z,{close:!0,data:on,type:on!=null&&on.length?Cn:"",style:xt({},jn),onClose:()=>tn("")}))}},57444:function(un,Nn,Mt){"use strict";Mt.d(Nn,{h:function(){return xt}});var Pt=Mt(67294),ne=Mt(88044),Ne=Mt(91773),Be=Mt(85804),Pe=Mt(4631),Bt=Mt.n(Pe),Ut=Mt(71749),ue=Mt(30483),se=Object.defineProperty,Se=Object.defineProperties,Xe=Object.getOwnPropertyDescriptors,pe=Object.getOwnPropertySymbols,Ht=Object.prototype.hasOwnProperty,Dt=Object.prototype.propertyIsEnumerable,nt=(St,zt,Jt)=>zt in St?se(St,zt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):St[zt]=Jt,et=(St,zt)=>{for(var Jt in zt||(zt={}))Ht.call(zt,Jt)&&nt(St,Jt,zt[Jt]);if(pe)for(var Jt of pe(zt))Dt.call(zt,Jt)&&nt(St,Jt,zt[Jt]);return St},ht=(St,zt)=>Se(St,Xe(zt));const lt=ne.default.Option,gt={labelCol:{span:4},wrapperCol:{span:20}},mt={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"]};Nn.Z=({callback:St,onCancel:zt})=>{const[Jt,re]=(0,Pt.useState)("python");function oe(Le){re(mt[Le][1])}function $t(Le){St(Le)}return Pt.createElement(Ne.default,ht(et({},gt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:$t,style:{width:500}}),Pt.createElement(Ne.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},Pt.createElement(ne.default,{getPopupContainer:Le=>Le.parentNode,onChange:oe},Object.keys(mt).map(Le=>Pt.createElement(lt,{key:Le,value:Le},mt[Le][0])))),Pt.createElement(Ne.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},Pt.createElement(xt,{mode:Jt})),Pt.createElement("div",{className:"flex-container flex-end"},Pt.createElement(Be.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Pt.createElement(Be.ZP,{type:"ghost",onClick:zt},"\u53D6\u6D88")))};function xt({value:St,onChange:zt,mode:Jt,options:re={}}){const oe=(0,Pt.useRef)(),[$t,Le]=(0,Pt.useState)();return(0,Pt.useEffect)(()=>{if($t){let de=function(Fe){const rn=Fe.getValue();zt&&zt(rn)};return $t.on("change",de),()=>{$t.off("change",de)}}},[$t,zt]),(0,Pt.useEffect)(()=>{$t&&$t.setOption("mode",Jt)},[$t,Jt]),(0,Pt.useEffect)(()=>{$t&&(St!==$t.getValue()||St==="")&&setTimeout(()=>{$t.setValue(St||"")},300)},[$t,St]),(0,Pt.useEffect)(()=>{if(oe.current&&!$t){const de=Bt().fromTextArea(oe.current,et({mode:Jt,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},re));Le(de)}},[oe.current,$t]),Pt.createElement("div",{className:"my-codemirror-container"},Pt.createElement("textarea",{ref:oe}))}},35567:function(un,Nn,Mt){"use strict";Mt.d(Nn,{Z:function(){return Di}});var Pt=Mt(67294),ne=Mt(4631),Ne=Mt.n(ne),Be=Mt(91033),Pe=Mt(71749),Bt=Mt(57341),Ut=Mt(82801),ue=Mt(88386),se=Mt(49047),Se=Mt(80785),Xe=Mt(65226),pe=({value:te="",className:le,showTextOnly:ae,showLines:Ae,style:Sn={}})=>{const An=(0,Pt.useMemo)(()=>"",[te]);return Pt.createElement(Pt.Fragment,null,Pt.createElement("div",{dangerouslySetInnerHTML:{__html:An}}))},Ht=Object.defineProperty,Dt=Object.defineProperties,nt=Object.getOwnPropertyDescriptors,et=Object.getOwnPropertySymbols,ht=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable,gt=(te,le,ae)=>le in te?Ht(te,le,{enumerable:!0,configurable:!0,writable:!0,value:ae}):te[le]=ae,mt=(te,le)=>{for(var ae in le||(le={}))ht.call(le,ae)&>(te,ae,le[ae]);if(et)for(var ae of et(le))lt.call(le,ae)&>(te,ae,le[ae]);return te},xt=(te,le)=>Dt(te,nt(le));let St=[{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 zt({onActionCallback:te,title:le,icon:ae,actionName:Ae,className:Sn="",children:An}){function En(){te(Ae)}return Pt.createElement("a",{title:le,className:Sn,onClick:En},Pt.createElement("i",{className:`${ae}`}),An)}var Jt=({watch:te,showNullButton:le,showNullProgramButton:ae,onActionCallback:Ae,fullScreen:Sn,insertTemp:An,hidetoolBar:En,extraUse:ke})=>{const cn=[...St,{title:`${te?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${te?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return Pt.createElement("ul",{className:"markdown-toolbar-container"},!En&&cn.map((_n,vi)=>Pt.createElement("li",{key:vi},_n.actionName?Pt.createElement(zt,xt(mt({},_n),{onActionCallback:Ae})):Pt.createElement("span",{className:"v-line"}))),le?Pt.createElement("li",null,Pt.createElement(zt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ae},Pt.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,ae?Pt.createElement(Pt.Fragment,null,Pt.createElement("li",null,Pt.createElement(zt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Ae},Pt.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),Pt.createElement("li",null,Pt.createElement(zt,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Ae},Pt.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,An&&Pt.createElement("li",null,Pt.createElement(zt,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${An}`,onActionCallback:Ae},Pt.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),ke&&Pt.createElement("li",null,ke),Pt.createElement("li",{className:"btn-full-screen"},Pt.createElement(zt,{icon:`${Sn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Sn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ae})))},re=Mt(76621),oe=Mt(91773),$t=Mt(28802),Le=Mt(85804),de=Object.defineProperty,Fe=Object.defineProperties,rn=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,jn=Object.prototype.hasOwnProperty,Bn=Object.prototype.propertyIsEnumerable,an=(te,le,ae)=>le in te?de(te,le,{enumerable:!0,configurable:!0,writable:!0,value:ae}):te[le]=ae,Zn=(te,le)=>{for(var ae in le||(le={}))jn.call(le,ae)&&an(te,ae,le[ae]);if(De)for(var ae of De(le))Bn.call(le,ae)&&an(te,ae,le[ae]);return te},_t=(te,le)=>Fe(te,rn(le));const Tt={labelCol:{span:4},wrapperCol:{span:20}};var ce=({callback:te,onCancel:le})=>{function ae(Ae){te(Ae)}return Pt.createElement(oe.default,_t(Zn({},Tt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:ae,style:{width:500}}),Pt.createElement(oe.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},Pt.createElement($t.default,null)),Pt.createElement(oe.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},Pt.createElement($t.default,null)),Pt.createElement("div",{className:"flex-container flex-end"},Pt.createElement(Le.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Pt.createElement(Le.ZP,{type:"ghost",onClick:le},"\u53D6\u6D88")))},_e=Mt(57444),Ye=Mt(70859),xe=Mt(62844),on=Mt(71230),tn=Mt(63205),Cn=Mt(67294),Ie=({callback:te,onCancel:le})=>{const ae=document.createElement("canvas"),Ae=ae.getContext("2d");ae.width=1e3,ae.height=800,Ae.fillStyle="#ffffff",Ae.fillRect(0,0,ae.width,ae.height);const Sn=ae.toDataURL("image/png");return Cn.createElement(xe.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Cn.createElement(on.Z,{style:{height:"100vh"}},Cn.createElement(tn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Sn,visible:!0,title:String(Date.now())},onOk:An=>{te({src:An.url})},onClose:le})))},ve=Mt(23495);function ze(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(ze,go.CommandHandler),ze.prototype.canAlignSelection=function(){var te=this.diagram;return!(te===null||te.isReadOnly||te.isModelReadOnly||te.selection.count<2)},ze.prototype.alignLeft=function(){var te=this.diagram;te.startTransaction("aligning left");var le=1/0;te.selection.each(function(ae){ae instanceof go.Link||(le=Math.min(ae.position.x,le))}),te.selection.each(function(ae){ae instanceof go.Link||ae.move(new go.Point(le,ae.position.y))}),te.commitTransaction("aligning left")},ze.prototype.alignRight=function(){var te=this.diagram;te.startTransaction("aligning right");var le=-1/0;te.selection.each(function(ae){if(!(ae instanceof go.Link)){var Ae=ae.actualBounds.x+ae.actualBounds.width;le=Math.max(Ae,le)}}),te.selection.each(function(ae){ae instanceof go.Link||ae.move(new go.Point(le-ae.actualBounds.width,ae.position.y))}),te.commitTransaction("aligning right")},ze.prototype.alignTop=function(){var te=this.diagram;te.startTransaction("alignTop");var le=1/0;te.selection.each(function(ae){ae instanceof go.Link||(le=Math.min(ae.position.y,le))}),te.selection.each(function(ae){ae instanceof go.Link||ae.move(new go.Point(ae.position.x,le))}),te.commitTransaction("alignTop")},ze.prototype.alignBottom=function(){var te=this.diagram;te.startTransaction("aligning bottom");var le=-1/0;te.selection.each(function(ae){if(!(ae instanceof go.Link)){var Ae=ae.actualBounds.y+ae.actualBounds.height;le=Math.max(Ae,le)}}),te.selection.each(function(ae){ae instanceof go.Link||ae.move(new go.Point(ae.actualBounds.x,le-ae.actualBounds.height))}),te.commitTransaction("aligning bottom")},ze.prototype.alignCenterX=function(){var te=this.diagram,le=te.selection.first();if(le){te.startTransaction("aligning Center X");var ae=le.actualBounds.x+le.actualBounds.width/2;te.selection.each(function(Ae){Ae instanceof go.Link||Ae.move(new go.Point(ae-Ae.actualBounds.width/2,Ae.actualBounds.y))}),te.commitTransaction("aligning Center X")}},ze.prototype.alignCenterY=function(){var te=this.diagram,le=te.selection.first();if(le){te.startTransaction("aligning Center Y");var ae=le.actualBounds.y+le.actualBounds.height/2;te.selection.each(function(Ae){Ae instanceof go.Link||Ae.move(new go.Point(Ae.actualBounds.x,ae-Ae.actualBounds.height/2))}),te.commitTransaction("aligning Center Y")}},ze.prototype.alignColumn=function(te){var le=this.diagram;le.startTransaction("align Column"),te===void 0&&(te=0),te=parseFloat(te);var ae=new Array;le.selection.each(function(ke){ke instanceof go.Link||ae.push(ke)});for(var Ae=0;Ae0){for(var ke=An.elt(En-1);ke!==null&&ke.isTreeExpanded&&!ke.isTreeLeaf;){var cn=this._sortTreeChildrenByY(ke);ke=cn.last()}ke!==null&&te.select(ke)}else te.select(Sn)}}else if(ae.key==="Down")if(le.isTreeExpanded&&!le.isTreeLeaf){var Ae=this._sortTreeChildrenByY(le).first();Ae!==null&&te.select(Ae)}else for(;le!==null;){var Sn=le.findTreeParentNode();if(Sn===null)break;var An=this._sortTreeChildrenByY(Sn),En=An.indexOf(le);if(EnAn.y?1:Sn.xAn.x?1:0}),le},ze.prototype.copyToClipboard=function(te){go.CommandHandler.prototype.copyToClipboard.call(this,te),this._lastPasteOffset.set(this.pasteOffset)},ze.prototype.pasteFromClipboard=function(){var te=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(te,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),te},Object.defineProperty(ze.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(te){if(te!=="move"&&te!=="select"&&te!=="scroll"&&te!=="tree"&&te!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+te);this._arrowKeyBehavior=te}}),Object.defineProperty(ze.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(te){if(!(te instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+te);this._pasteOffset.set(te)}});var je=ze,He=Mt(18023),Ot=Mt(15746),Lt=Mt(33170),wt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},Ft=Mt(52262),Wt=Mt(67294),kt=(te,le,ae)=>new Promise((Ae,Sn)=>{var An=cn=>{try{ke(ae.next(cn))}catch(_n){Sn(_n)}},En=cn=>{try{ke(ae.throw(cn))}catch(_n){Sn(_n)}},ke=cn=>cn.done?Ae(cn.value):Promise.resolve(cn.value).then(An,En);ke((ae=ae.apply(te,le)).next())});function Xt({onCancel:te,callback:le}){let ae=(0,Pt.useRef)(),Ae=(0,Pt.useRef)(),Sn=(0,Pt.useRef)(),An=(0,Pt.useRef)(!1);const En=(0,Pt.useRef)(!1),[ke,cn]=(0,Pt.useState)(0);function _n(){const mn=ve.bx.make,Oe={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"};ae.current=new ve.S0(Ae.current,{padding:20,grid:mn(ve.s_,"Grid",mn(ve.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),mn(ve.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Ke=>{var ur=Ke.diagram.commandHandler.addTopLevelParts(Ke.diagram.selection,!0);ur||Ke.diagram.currentTool.doCancel()},commandHandler:mn(je),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Ke=>{var ur=Ke.subject;ur.location=ur.location.copy().snapToGridPoint(Ke.diagram.grid.gridOrigin,Ke.diagram.grid.gridCellSize),setTimeout(()=>{Ke.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Ke=>{var ur=Ke.subject;setTimeout(()=>{Ke.diagram.commandHandler.editTextBlock()})},LinkRelinked:Ke=>{var ur=Ke.parameter.part;ur.invalidateConnectedLinks();var Tr=Ke.subject;Ke.diagram.toolManager.linkingTool.isForwards?Tr.toNode.invalidateConnectedLinks():Tr.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),ae.current.nodeTemplate=mn(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),mn(ve.bn,{name:"SHAPE",fill:Oe.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")),mn(ve.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),mn(ve.al,{margin:1,textAlign:"center",overflow:ve.al.OverflowEllipsis,editable:!0},new ve.KX("text").makeTwoWay(),new ve.KX("stroke","color"))),ae.current.nodeTemplate.toolTip=mn("ToolTip",mn(ve.s_,"Vertical",{maxSize:new ve.$u(200,NaN)},mn(ve.al,{font:"bold 10pt sans-serif",textAlign:"center"},new ve.KX("text")),mn(ve.al,{font:"10pt sans-serif",textAlign:"center"},new ve.KX("text","details"))));function ni(Ke,ur){var Tr=(or,Vo)=>{or.handled=!0,or.diagram.model.commit(eo=>{var uo=Vo.part.adornedPart,Xr=new ve.E9().setRectSpot(uo.actualBounds,Ke);Xr.subtract(uo.location),Xr.scale(2,2),Xr.x+=Math.sign(Xr.x)*130,Xr.y+=Math.sign(Xr.y)*130,Xr.add(uo.location),Xr.snapToGridPoint(or.diagram.grid.gridOrigin,or.diagram.grid.gridCellSize);var Ir=eo.copyNodeData(uo.data);eo.setGroupKeyForNodeData(Ir,eo.getGroupKeyForNodeData(uo.data)),eo.addNodeData(Ir);var Mo={from:uo.key,to:eo.getKeyForNodeData(Ir)};eo.addLinkData(Mo);var Ln=or.diagram.findNodeForData(Ir);Ln.location=Xr,or.diagram.select(Ln),setTimeout(()=>{or.diagram.commandHandler.editTextBlock()},20)})};return mn(ve.bn,{figure:ur,alignment:Ke,alignmentFocus:Ke.opposite(),width:Ke.equals(ve.z6.Top)||Ke.equals(ve.z6.Bottom)?25:18,height:Ke.equals(ve.z6.Top)||Ke.equals(ve.z6.Bottom)?18:25,fill:"orange",stroke:Oe.white,strokeWidth:4,mouseEnter:(or,Vo)=>Vo.fill="dodgerblue",mouseLeave:(or,Vo)=>Vo.fill="orange",isActionable:!0,click:Tr,contextClick:Tr})}function Pi(Ke){return mn(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:(ur,Tr)=>Tr.fill="dodgerblue",mouseLeave:(ur,Tr)=>Tr.fill="orange",click:(ur,Tr)=>{ur.diagram.commandHandler.showContextMenu(Tr.part.adornedPart)}},Ke||{})}ae.current.nodeTemplate.selectionAdornmentTemplate=mn(ve.uz,"Spot",mn(ve.Vm,{padding:10}),ni(ve.z6.Top,"TriangleUp"),ni(ve.z6.Left,"TriangleLeft"),ni(ve.z6.Right,"TriangleRight"),ni(ve.z6.Bottom,"TriangleDown"),Pi({alignment:new ve.z6(.75,0)}));function Li(Ke,ur){return(Tr,or)=>{Tr.handled=!0,Tr.diagram.model.commit(Vo=>{Vo.set(or.part.adornedPart.data,Ke,ur)})}}function qe(Ke,ur){return ur||(ur="color"),mn(ve.bn,{width:16,height:16,stroke:"lightgray",fill:Ke,margin:1,background:"transparent",mouseEnter:(Tr,or)=>or.stroke="dodgerblue",mouseLeave:(Tr,or)=>or.stroke="lightgray",click:Li(ur,Ke),contextClick:Li(ur,Ke)})}function oi(){return[mn("ContextMenuButton",mn(ve.s_,"Horizontal",qe(Oe.white,"fill"),qe(Oe.beige,"fill"),qe(Oe.extralightblue,"fill"),qe(Oe.extralightred,"fill"))),mn("ContextMenuButton",mn(ve.s_,"Horizontal",qe(Oe.lightgray,"fill"),qe(Oe.lightgreen,"fill"),qe(Oe.lightblue,"fill"),qe(Oe.lightred,"fill")))]}function Ni(){return[mn("ContextMenuButton",mn(ve.s_,"Horizontal",qe(Oe.black),qe(Oe.green),qe(Oe.blue),qe(Oe.red))),mn("ContextMenuButton",mn(ve.s_,"Horizontal",qe(Oe.white),qe(Oe.magenta),qe(Oe.purple),qe(Oe.orange)))]}function gr(Ke,ur){return ur||(ur="thickness"),mn(ve.bn,"LineH",{width:16,height:16,strokeWidth:Ke,margin:1,background:"transparent",mouseEnter:(Tr,or)=>or.background="dodgerblue",mouseLeave:(Tr,or)=>or.background="transparent",click:Li(ur,Ke),contextClick:Li(ur,Ke)})}function xr(Ke,ur){return ur||(ur="dash"),mn(ve.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Ke,margin:1,background:"transparent",mouseEnter:(Tr,or)=>or.background="dodgerblue",mouseLeave:(Tr,or)=>or.background="transparent",click:Li(ur,Ke),contextClick:Li(ur,Ke)})}function Si(){return[mn("ContextMenuButton",mn(ve.s_,"Horizontal",gr(1),gr(2),gr(3),gr(4))),mn("ContextMenuButton",mn(ve.s_,"Horizontal",xr(null),xr([2,4]),xr([4,4])))]}function Fi(Ke,ur){return ur||(ur="figure"),mn(ve.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Ke,margin:1,background:"transparent",mouseEnter:(Tr,or)=>or.fill="dodgerblue",mouseLeave:(Tr,or)=>or.fill="lightgray",click:Li(ur,Ke),contextClick:Li(ur,Ke)})}ae.current.nodeTemplate.contextMenu=mn("ContextMenu",mn("ContextMenuButton",mn(ve.s_,"Horizontal",Fi("Rectangle"),Fi("RoundedRectangle"),Fi("Ellipse"),Fi("Diamond"))),mn("ContextMenuButton",mn(ve.s_,"Horizontal",Fi("Parallelogram2"),Fi("ManualOperation"),Fi("Procedure"),Fi("Cylinder1"))),mn("ContextMenuButton",mn(ve.s_,"Horizontal",Fi("Terminator"),Fi("CreateRequest"),Fi("Document"),Fi("TriangleDown"))),oi(),Ni(),Si()),ae.current.groupTemplate=mn(ve.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:ve.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Ke,ur)=>{var Tr=ur.addMembers(ur.diagram.selection,!0);Tr||ur.diagram.currentTool.doCancel()},avoidable:!1},new ve.KX("location","loc",ve.E9.parse).makeTwoWay(ve.E9.stringify),mn(ve.s_,"Auto",{name:"BODY"},mn(ve.bn,{parameter1:10,fill:Oe.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")),mn(ve.Vm,{background:"transparent",margin:20})),mn(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"))),ae.current.groupTemplate.selectionAdornmentTemplate=mn(ve.uz,"Spot",mn(ve.s_,"Auto",mn(ve.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),mn(ve.Vm,{margin:1.5})),Pi({alignment:ve.z6.TopRight,alignmentFocus:ve.z6.BottomRight})),ae.current.groupTemplate.contextMenu=mn("ContextMenu",oi(),Ni(),Si()),ae.current.linkTemplate=mn(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",Ke=>Ke>=1?10:0),new ve.KX("toShortLength","dir",Ke=>Ke>=1?10:0),new ve.KX("points").makeTwoWay(),mn(ve.bn,{strokeWidth:2},new ve.KX("stroke","color"),new ve.KX("strokeWidth","thickness"),new ve.KX("strokeDashArray","dash")),mn(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",Ke=>Ke===1)),mn(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",Ke=>Ke>=1),new ve.KX("width","thickness",Ke=>7+3*Ke),new ve.KX("height","thickness",Ke=>7+3*Ke),new ve.KX("segmentOffset","thickness",Ke=>new ve.E9(-15,4+1.5*Ke))),mn(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",Ke=>Ke===2),new ve.KX("width","thickness",Ke=>7+3*Ke),new ve.KX("height","thickness",Ke=>7+3*Ke),new ve.KX("segmentOffset","thickness",Ke=>new ve.E9(-15,4+1.5*Ke))),mn(ve.al,{alignmentFocus:new ve.z6(0,1,-4,0),editable:!0},new ve.KX("text").makeTwoWay(),new ve.KX("stroke","color"))),ae.current.linkTemplate.selectionAdornmentTemplate=mn(ve.uz,mn(ve.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Gi(2)},new ve.KX("pathPattern","thickness",Gi)),Pi({alignmentFocus:new ve.z6(0,0,-6,-4)}));function Gi(Ke){return mn(ve.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Ke+4).toString()+" H3"})}function Mr(Ke){var ur="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Ke===0?ur="M0 0 M16 16 M0 8 L16 8":Ke===2&&(ur="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),mn(ve.bn,{geometryString:ur,margin:2,background:"transparent",mouseEnter:(Tr,or)=>or.background="dodgerblue",mouseLeave:(Tr,or)=>or.background="transparent",click:Li("dir",Ke),contextClick:Li("dir",Ke)})}function hr(Ke){var ur=(Tr,or)=>{Tr.handled=!0,Tr.diagram.model.commit(Vo=>{var eo=or.part.adornedPart;Vo.set(eo.data,Ke?"toSpot":"fromSpot",ve.z6.stringify(ve.z6.AllSides)),(Ke?eo.toNode:eo.fromNode).invalidateConnectedLinks()})};return mn(ve.bn,{width:12,height:12,fill:"transparent",mouseEnter:(Tr,or)=>or.background="dodgerblue",mouseLeave:(Tr,or)=>or.background="transparent",click:ur,contextClick:ur})}function Yn(Ke,ur){var Tr=0,or=ve.z6.RightSide;Ke.equals(ve.z6.Top)?(Tr=270,or=ve.z6.TopSide):Ke.equals(ve.z6.Left)?(Tr=180,or=ve.z6.LeftSide):Ke.equals(ve.z6.Bottom)&&(Tr=90,or=ve.z6.BottomSide),ur||(Tr-=180);var Vo=(eo,uo)=>{eo.handled=!0,eo.diagram.model.commit(Xr=>{var Ir=uo.part.adornedPart;Xr.set(Ir.data,ur?"toSpot":"fromSpot",ve.z6.stringify(or)),(ur?Ir.toNode:Ir.fromNode).invalidateConnectedLinks()})};return mn(ve.bn,{alignment:Ke,alignmentFocus:Ke.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:Tr,background:"transparent",mouseEnter:(eo,uo)=>uo.background="dodgerblue",mouseLeave:(eo,uo)=>uo.background="transparent",click:Vo,contextClick:Vo})}ae.current.linkTemplate.contextMenu=mn("ContextMenu",Ni(),Si(),mn("ContextMenuButton",mn(ve.s_,"Horizontal",Mr(0),Mr(1),Mr(2))),mn("ContextMenuButton",mn(ve.s_,"Horizontal",mn(ve.s_,"Spot",hr(!1),Yn(ve.z6.Top,!1),Yn(ve.z6.Left,!1),Yn(ve.z6.Right,!1),Yn(ve.z6.Bottom,!1)),mn(ve.s_,"Spot",{margin:new ve.Zt(0,0,0,2)},hr(!0),Yn(ve.z6.Top,!0),Yn(ve.z6.Left,!0),Yn(ve.z6.Right,!0),Yn(ve.z6.Bottom,!0)))));const zi=`{ "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 qo=["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 sa(Ke){return console.log("shapeName:",Ke),qo.indexOf(Ke)>=0}var la=new ve.YI(Sn.current,{maxSelectionCount:1,linkTemplate:mn(ve.rU,{locationSpot:ve.z6.Center,selectionAdornmentTemplate:mn(ve.uz,"Link",{locationSpot:ve.z6.Center},mn(ve.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),mn(ve.bn,{toArrow:"Standard",stroke:null}))},{routing:ve.rU.AvoidsNodes,curve:ve.rU.JumpOver,corner:5,toShortLength:4},new ve.KX("points"),mn(ve.bn,{isPanelMain:!0,strokeWidth:2}),mn(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(Ke=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Ke.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return ae.current.addDiagramListener("TextEdited",function(Ke){var ur;const Tr=Ke.subject.part;var or=(ur=document.activeElement)==null?void 0:ur.value;typeof or=="string"&&or.trim()===""&&ae.current.model.commit(function(Vo){Vo.set(Tr.data,"text","\u672A\u547D\u540D"),ae.current.commandHandler.stopCommand()},"increment")}),la.nodeTemplate=mn(ve.NB,"Auto",{locationSpot:ve.z6.Center},new ve.KX("location","location",ve.E9.parse).makeTwoWay(ve.E9.stringify),mn(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")),mn(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(()=>{ae.current.grid=mn(ve.s_,"Grid",mn(ve.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),mn(ve.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),ae.current.grid.visible=!0,ae.current.grid.gridCellStroke="darkgray",ae.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=ae.current,ae.current}const vi=()=>kt(this,null,function*(){var mn,Oe=ae.current.makeImage();const ni=yield(0,Lt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:Oe.src,file_data:JSON.stringify({login:(mn=(0,Ft.eY)())==null?void 0:mn.login,data:JSON.parse(ae.current.model.toJson())})}});le({src:ni.url})});return(0,Pt.useEffect)(()=>(setTimeout(()=>{_n()},500),cn(ke+1),()=>{ae.current=null}),[]),Wt.createElement("div",{ref:En,className:"body-overflow-initial"},Wt.createElement(xe.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!ke,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:Wt.createElement(on.Z,null,Wt.createElement(Ot.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Wt.createElement(Ot.Z,{onClick:()=>{var mn,Oe,ni=ae.current.selection.first();if(An.current=!An.current,document.activeElement&&ni){let Pi=(Oe=(mn=document.activeElement)==null?void 0:mn.value)==null?void 0:Oe.trim();typeof Pi=="string"&&ae.current.model.commit(function(Li){Li.set(ni.data,"text",Pi||"\u672A\u547D\u540D"),ae.current.commandHandler.stopCommand()},"increment")}cn(ke+1)}},Wt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:te},Wt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:An.current?"none":"block"},className:wt.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:wt.myPaletteDiv,ref:Sn})),Wt.createElement("div",{style:{flex:1,position:"relative"}},Wt.createElement("div",{ref:Ae,style:{height:"80vh"}}))),Wt.createElement("div",{className:"tr"},Wt.createElement(Le.ZP,{size:"large",onClick:vi,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var $e=Xt,Je=Mt(98813),fn=Mt(37720);const Ve=Je.ZP.Group,Mn={margin:"0 8px"};var Ue=({callback:te,onCancel:le})=>{function ae(Ae){te(Ae)}return Pt.createElement(oe.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:ae},Pt.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},Pt.createElement("span",{style:Mn},"\u5355\u5143\u683C\u6570\uFF1A"),Pt.createElement("span",{style:Mn},"\u884C\u6570"),Pt.createElement(oe.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},Pt.createElement(fn.Z,null)),Pt.createElement("span",{style:Mn},"\u5217\u6570"),Pt.createElement(oe.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},Pt.createElement(fn.Z,null))),Pt.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},Pt.createElement("span",{style:Mn},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),Pt.createElement(oe.default.Item,{name:"align"},Pt.createElement(Ve,null,Pt.createElement(Je.ZP,{value:"default"},Pt.createElement("i",{className:"fa fa-align-justify"})),Pt.createElement(Je.ZP,{value:"left"},Pt.createElement("i",{className:"fa fa-align-left"})),Pt.createElement(Je.ZP,{value:"center"},Pt.createElement("i",{className:"fa fa-align-center"})),Pt.createElement(Je.ZP,{value:"right"},Pt.createElement("i",{className:"fa fa-align-right"}))))),Pt.createElement("div",{className:"flex-container flex-end"},Pt.createElement(Le.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Pt.createElement(Le.ZP,{type:"ghost",onClick:le},"\u53D6\u6D88")))},ti=Mt(59637),Qn=Mt(61016),Hn=Mt.n(Qn),gi=(0,Pt.forwardRef)(({use3d:te,width:le,height:ae,callback:Ae,showSaveButton:Sn},An)=>{const En=(0,Pt.useRef)(),ke=(0,Pt.useRef)(),[cn,_n]=(0,Pt.useState)(!1),vi=(0,Pt.useRef)({id:En,appName:"graphing",width:le||1e3,height:ae||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,Pt.useEffect)(()=>{ke.current=new(Hn())(vi.current,!0),window.onload=function(){ke.current.inject("applet_container")}},[]);const mn=()=>{var Oe=window.ggbApplet.getPNGBase64(1,!0,72);return Ae&&Ae(Oe),Oe};return(0,Pt.useEffect)(()=>{vi.current.appName=cn?"3D":"graphing",ke.current.inject("applet_container")},[cn]),(0,Pt.useEffect)(()=>{_n(te)},[te]),(0,Pt.useImperativeHandle)(An,()=>({getImgData:mn})),Pt.createElement(Pt.Fragment,null,Pt.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:En}),Pt.createElement(on.Z,{align:"middle"},Pt.createElement(Ot.Z,{flex:1},Pt.createElement(ti.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:cn,onChange:Oe=>_n(Oe)})),Pt.createElement(Ot.Z,null,Pt.createElement(Le.ZP,{size:"large",onClick:mn,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Mi=Mt(36527),In=Mt(2453);const ei="link",Ki="upload-image",hi="add-flowchart",$i="draw-image",pr="add-flowchart",rr="code-block",ki="add-table",sr="------------",Ur={default:sr,left:`:${sr}`,center:`:${sr}:`,right:`${sr}:`};var Jo=Mt(99914);function Rr(){}let To=0;const pa=1e4,co="\u2581",Xi="@\u2581\u2581@",bn="@\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`,wn=["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 Fn(te){return/^\d+$/.test(te)?`${te}px`:te}const Xn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",ai={[Xn+"-B"]:"bold",[Xn+"-I"]:"italic"},Tn={[ei]:"\u6DFB\u52A0\u94FE\u63A5",[rr]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Ki]:"\u6DFB\u52A0\u56FE\u7247",[$i]:"\u6DFB\u52A0\u753B\u56FE",[hi]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[ki]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Di=({defaultValue:te="",onChange:le,width:ae="100%",height:Ae=400,miniToolbar:Sn=!1,isFocus:An=!1,watch:En,insertTemp:ke,mode:cn="markdown",id:_n="markdown-editor-id",showResizeBar:vi=!1,noStorage:mn=!1,showNullButton:Oe=!1,showNullProgramButton:ni=!1,hidetoolBar:Pi=!1,fullScreen:Li=!1,onBlur:qe,onCMBeforeChange:oi,onFullScreen:Ni,className:gr="",disablePaste:xr=!1,disabled:Si=!1,disabledFill:Fi=!1,placeholder:Gi="",values:Mr="",extraUse:hr})=>{const[Yn,zi]=(0,Pt.useState)(null),[qo,sa]=(0,Pt.useState)(te),[la,Ke]=(0,Pt.useState)(En),[ur,Tr]=(0,Pt.useState)(Li),[or,Vo]=(0,Pt.useState)(""),[eo,uo]=(0,Pt.useState)(0),[Xr,Ir]=(0,Pt.useState)(Ae),[Mo,Ln]=(0,Pt.useState)(!1),[$r,Pn]=(0,Pt.useState)(0),[Br,Ga]=(0,Pt.useState)(0),Te=(0,Pt.useRef)(),Ze=(0,Pt.useRef)(),sn=(0,Pt.useRef)(),zn=(0,Pt.useRef)();(0,Pt.useEffect)(()=>{const er=window.scrollY||window.pageYOffset;sa(Mr),Yn==null||Yn.setValue(Mr),window.scrollTo(0,er)},[Mr]),(0,Pt.useEffect)(()=>{Ni==null||Ni(ur)},[ur]),(0,Pt.useEffect)(()=>{if(Te.current){let er=function(Er,hn){var ar;if(xr){hn.preventDefault();return}const oo=hn.clipboardData;if(oo){const ca=oo.types.toString(),$o=oo.items;if(ca==="Files"||oo.types.indexOf("Files")>-1){if(hn.preventDefault(),cn=="stex")return;try{let ia=$o[1];((ar=$o[0])==null?void 0:ar.kind)==="file"&&(ia=$o[0]);const as=ia.getAsFile(),Ks=as.name.split(".").pop();(0,Ye.I)(as,vs=>{var au,ks,en;vs.id?((au=as==null?void 0:as.type)==null?void 0:au.indexOf("image"))>-1?Qi.replaceSelection(``):((ks=as==null?void 0:as.type)==null?void 0:ks.indexOf("video"))>-1?Qi.replaceSelection(``):((en=as==null?void 0:as.type)==null?void 0:en.indexOf("pdf"))>-1?Qi.replaceSelection(`${as.name}`):wn.includes(Ks)?Qi.replaceSelection(`${as.name}`):Qi.replaceSelection(`[${as.name}](/api/attachments/${vs.id}?type=${vs.content_type})`):(vs==null?void 0:vs.status)===401&&(document.location.href="/user/login")})}catch(ia){In.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Qi=Ne().fromTextArea(Te.current,{mode:cn,lineNumbers:!Sn,lineWrapping:!0,value:te,autoCloseTags:!0,autoCloseBrackets:!0});return Qi.on("keyup",function(Er,hn){hn.keyCode===8&&(Er.getValue()==""?Qi.setOption("placeholder",Gi):Qi.setOption("placeholder",null))}),Qi.on("keydown",function(Er,hn){if(hn.keyCode===8){var ar=Nr(Er);ar&&hn.preventDefault()}}),An&&Qi.focus(),Qi.on("paste",er),Si&&Qi.on("beforeChange",function(Er,hn){(hn.origin==="paste"||hn.origin==="+input")&&hn.cancel()}),zi(Qi),()=>{Qi.off("paste",er)}}},[]);const Ii=(0,Pt.useCallback)(()=>{if(Ze.current)try{}catch(er){console.log(er,"---- to set md editor body height")}},[Xr,Ze,ur]);(0,Pt.useEffect)(()=>{function er(){let Qi=new Be.Z(Er=>{for(let hn of Er)(hn.target.offsetHeight>0||hn.target.offsetWidth>0)&&(Ii(),Yn.setSize("100%","100%"),Yn.refresh())});return Qi.observe(Te.current.parentElement),Qi}if(Yn){const Qi=er();return()=>{var Er,hn;(Er=Te.current)!=null&&Er.parentElement&&Qi.unobserve((hn=Te.current)==null?void 0:hn.parentElement)}}},[Yn,Ii]),(0,Pt.useEffect)(()=>{if(Yn){let er=[];for(const[Qi,Er]of Object.entries(ai)){let hn={[Qi]:()=>{lr(Er)}};er.push(hn),Yn.addKeyMap(hn)}return()=>{for(let Qi of er)Yn.removeKeyMap(Qi)}}},[Yn]),(0,Pt.useEffect)(()=>{Li!==ur&&Tr(Li)},[Li]),(0,Jo.Z)(()=>{if(!mn&&eo>0){let er=new Date().getTime(),Qi=window.sessionStorage.getItem(_n);er>=eo+pa&&(!Qi||Qi!==qo)&&(window.sessionStorage.setItem(_n,qo),Ln(!0))}},pa),(0,Pt.useEffect)(()=>{Ke(En)},[Yn,En]),(0,Pt.useEffect)(()=>{Yn&&An&&Yn.focus()},[Yn,An]),(0,Pt.useEffect)(()=>{if(la&&Yn){let er=function(Er){let hn=Er.target;if(zn.current){let ar=hn.scrollTop/hn.scrollHeight;zn.current.scrollTop=zn.current.scrollHeight*ar}};const Qi=Yn.getScrollerElement();return Qi.addEventListener("scroll",er),()=>{Qi.removeEventListener("scroll",er)}}},[Yn,la]),(0,Pt.useEffect)(()=>{if(Yn&&oi){let er=function(Qi,Er){oi(Qi,Er)};return Yn.on("beforeChange",er),()=>{Yn.off("beforeChange",er)}}},[Yn,oi]),(0,Pt.useEffect)(()=>{if(Yn&&qe){let er=function(){qe(Yn.getValue())};return Yn.on("blur",er),()=>{Yn.off("blur",er)}}},[Yn,qe]);function Nr(er,Qi){var Er=er.getDoc(),hn=Er.getCursor(),ar=Er.getLine(hn.line),oo=ar.charAt(hn.ch-1),ca=ar.lastIndexOf("@\u2581@",hn.ch),$o=ar.lastIndexOf("@\u2581\u2581@",hn.ch),ia=ca>$o?ca:$o,as=ca>$o?3:4;if(Xi.indexOf(oo)===-1)return null;if(console.log("change1:",Qi,er,ar,hn,ia,ca,$o,oo),ia>=0&&hn.ch-ia<5){var Ks=ia+as;return Er.replaceRange("",{line:hn.line,ch:ia},{line:hn.line,ch:Ks}),{line:hn.line,ch:Ks}}return null}(0,Pt.useEffect)(()=>{if(Yn){let er=function(Qi,Er){const hn=Qi.getValue();sa(hn),uo(new Date().getTime()),Qi.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),le&&(ni?le(hn,Eo(hn)):le(hn))};return Yn.on("change",er),()=>{Yn.off("change",er)}}},[Yn,le]),(0,Pt.useEffect)(()=>{if(Yn)if(te==null)Yn.setValue(""),sa("");else{const er=window.scrollY||window.pageYOffset;te!==Yn.getValue()&&(Yn.setValue(te),sa(te),Yn.setCursor(Si?1:Yn.lineCount(),0),window.scrollTo(0,er))}},[Yn,te]);const lr=(0,Pt.useCallback)(er=>{const Qi=Yn.getCursor(),Er=Yn.getSelection();let hn=Er.split(` `);switch(er){case"bold":return Yn.replaceSelection("**"+Er+"**"),Er===""&&Yn.setCursor(Qi.line,Qi.ch+2),Yn.focus();case"italic":return Yn.replaceSelection("*"+Er+"*"),Er===""&&Yn.setCursor(Qi.line,Qi.ch+1),Yn.focus();case"code":return Yn.replaceSelection("`"+Er+"`"),Er===""&&Yn.setCursor(Qi.line,Qi.ch+1),Yn.focus();case"inline-latex":return Vo("inline-latex"),Yn.focus();case"latex":return Yn.replaceSelection("```latex\n"+Er+"\n```"),Yn.setCursor(Qi.line+1,Er.length+1),Yn.focus();case"line-break":return Yn.replaceSelection(`
`),Yn.focus();case"list-ul":return Er===""?Yn.replaceSelection("- "+Er):Yn.replaceSelection(hn.map(ar=>ar===""?"":`- ${ar}`).join(` `)),Yn.focus();case"list-ol":return Er===""?Yn.replaceSelection("1. "+Er):Yn.replaceSelection(hn.map((ar,oo)=>ar===""?"":`${oo+1}. ${ar}`).join(` `)),Yn.focus();case"add-null-ch":return Er===""&&Yn.setCursor(Qi.line,Qi.ch),Yn.replaceSelection(co),Yn.focus();case"add-signal":return Er===""&&Yn.setCursor(Qi.line,Qi.ch),Yn.replaceSelection(bn),Yn.focus();case"add-multiple":return Er===""&&Yn.setCursor(Qi.line,Qi.ch),Yn.replaceSelection(Xi),Yn.focus();case"inster-template-1":return Er===""&&Yn.setCursor(Qi.line,Qi.ch),Yn.replaceSelection(bt),Yn.focus();case"eraser":return Yn.setValue(""),Yn.focus();case"trigger-watch":return Ke(!la),Yn.focus();case"trigger-full-screen":return Tr(!ur),Yn.focus();case ei:Vo(ei);return;case rr:Vo(rr);return;case Ki:Vo(Ki);return;case $i:Vo($i);return;case"maths-latex":Vo("maths-latex");return;case hi:Vo(hi);return;case ki:Vo(ki);return;default:throw new Error}},[Yn,la,ur]),si=(0,Pt.useCallback)((er,Qi)=>{var Er,hn,ar,oo,ca,$o;switch(Vo(""),or){case ei:const{title:au,link:ks}=er;return Yn.replaceSelection(`[${au}](${ks})`),Yn.focus();case rr:const{language:en,content:Us}=er;return Yn.replaceSelection(["```"+en,Us,"```"].join(` `)),Yn.focus();case"maths-latex":for(var ia=atob(er),as=new Uint8Array(ia.length),Ks=0;Ks{so.id?Yn.replaceSelection(`![,](/api/attachments/${so.id}?type=${so.content_type})`):(so==null?void 0:so.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":Yn.replaceSelection("`$$"+er+"$$`");break;case Ki:case $i:case pr:const{src:kl,alt:xu}=er,ma=Qi,Pl=(ar=(hn=(Er=ma==null?void 0:ma.name)==null?void 0:Er.split("."))==null?void 0:hn.pop)==null?void 0:ar.call(hn);return((oo=ma==null?void 0:ma.type)==null?void 0:oo.indexOf("image"))>-1||!(ma!=null&&ma.type)?ma!=null&&ma.align||ma!=null&&ma.width?Yn.replaceSelection(`

${xu||

`):Yn.replaceSelection(`${xu||`):((ca=ma==null?void 0:ma.type)==null?void 0:ca.indexOf("video"))>-1?Yn.replaceSelection(``):(($o=ma==null?void 0:ma.type)==null?void 0:$o.indexOf("pdf"))>-1?Yn.replaceSelection(`${ma.name}`):wn.includes(Pl)?Yn.replaceSelection(`${ma.name}`):Yn.replaceSelection(`[${ma.name}](${kl})`),Yn.focus();case ki:const{row:wl,col:su,align:Aa}=er;let ps=` `;for(let so=0;so{switch(or){case ei:return Pt.createElement(ce,{callback:si,onCancel:Ao});case rr:return Pt.createElement(_e.Z,{callback:si,onCancel:Ao});case Ki:return Pt.createElement(Ye.Z,{callback:si,onCancel:Ao});case hi:return Pt.createElement($e,{callback:si,onCancel:Ao});case ki:return Pt.createElement(Ue,{callback:si,onCancel:Ao});case"maths-latex":return Pt.createElement(gi,{showSaveButton:!0,callback:si});case"inline-latex":return Pt.createElement(Mi.Z,{showSaveButton:!0,callback:si});default:return null}},[or]);function Ao(){Vo("")}(0,Pt.useEffect)(()=>{if(sn.current){let er=function(ca){ar=!0,oo=ca.pageY},Qi=function(){ar=!1},Er=function(ca){if(ar){let $o=ca.pageY-oo;$o<0&&($o=0),$o>300&&($o=300);let ia=Ae+$o+"px";Ir(ia)}},hn=sn.current,ar=!1,oo=0;return hn.addEventListener("mousedown",er),document.addEventListener("mousemove",Er),document.addEventListener("mouseup",Qi),()=>{hn.removeEventListener("mousedown",er),document.removeEventListener("mousemove",Er),document.removeEventListener("mouseup",Qi)}}},[Yn,sn]),(0,Pt.useEffect)(()=>{Ir(Ae)},[Ae]);const rs=Fn(ae),Ls=Fn(Xr),Xa={width:rs,height:Ls},Ea=(0,Pt.useMemo)(()=>{if(eo){let er=new Date(eo),Qi=er.getHours(),Er=er.getMinutes(),hn=er.getSeconds();return Qi=Qi<10?"0"+Qi:Qi,Er=Er<10?"0"+Er:Er,hn=hn<10?"0"+hn:hn,`${Qi}:${Er}:${hn}`}return 0},[eo]),Eo=er=>{const Qi=[];if(ni){let Er=-1;er=er.replace(/(@▁▁@|@▁@)/g,function(hn,ar,oo){Qi.push({multiLine:hn!==bn})})}return Qi};function gs(){window.sessionStorage.removeItem(_n),Ln(!1),uo(0)}function os(){Ln(!1),uo(0),Yn.setValue(window.sessionStorage.getItem(_n))}(0,Pt.useEffect)(()=>{Tn[or]&&or!==$i&&or!==hi&&setTimeout(()=>{const er=document.getElementsByClassName("markdown-popup-form")[0],Qi=window.innerWidth/2-er.offsetWidth/2,Er=window.innerHeight/2-er.offsetHeight/2;Pn(Qi),Ga(Er)},0)},[or]);const Ho=er=>{er.preventDefault();const Qi=er.clientX-$r,Er=er.clientY-Br;document.body.onmousemove=hn=>{let ar=hn.clientX-Qi,oo=hn.clientY-Er;const ca=document.getElementsByClassName("markdown-popup-form")[0],$o=window.innerWidth-ca.offsetWidth,ia=window.innerHeight-ca.offsetHeight;ar=Math.max(0,Math.min(ar,$o)),oo=Math.max(0,Math.min(oo,ia)),_o(hn.clientX,hn.clientY,Qi,Er)&&(Pn(ar),Ga(oo))},document.body.onmouseup=function(){document.body.onmousemove=null}},_o=(er,Qi,Er,hn)=>{const ar=document.body.clientHeight,oo=document.body.clientWidth;return er<20&&Er>er||er>oo-20&&ErQi||Qi>ar-20&&hn$t in oe?Xe(oe,$t,{enumerable:!0,configurable:!0,writable:!0,value:Le}):oe[$t]=Le,lt=(oe,$t)=>{for(var Le in $t||($t={}))nt.call($t,Le)&&ht(oe,Le,$t[Le]);if(Dt)for(var Le of Dt($t))et.call($t,Le)&&ht(oe,Le,$t[Le]);return oe},gt=(oe,$t)=>pe(oe,Ht($t));const{useForm:mt}=Pt.default,xt={width:280,marginRight:10},St={labelCol:{span:5},wrapperCol:{span:19}};var zt=({callback:oe,onCancel:$t})=>{const[Le]=mt();let de=(0,se.useRef)();function Fe(jn){de.current.width=Le.getFieldValue("width"),de.current.align=Le.getFieldValue("align"),oe(jn,de.current)}function rn(jn,Bn){if(jn.status===-1){ne.ZP.error(jn.message);return}Le.setFieldsValue({src:`/api/attachments/${jn.id}`,type:Bn.type})}function De(jn){let Bn=jn.target.files[0];de.current=Bn,re(Bn,rn)}return Se.createElement(Pt.default,gt(lt({form:Le},St),{className:"upload-image-panel",onFinish:Fe,style:{width:470,overflow:"hidden"}}),Se.createElement(Pt.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},Se.createElement("div",{className:"flex-container"},Se.createElement(Pt.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},Se.createElement(Ne.default,{style:xt})),Se.createElement(Jt,{onFileChange:De}))),Se.createElement(Pt.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},Se.createElement(Ne.default,{style:{width:264}})),Se.createElement(Pt.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},Se.createElement(Be.Z,null,Se.createElement(Pt.default.Item,{name:"width",style:{margin:0}},Se.createElement(Pe.Z,{style:{width:264}})),Se.createElement("span",{className:"ml8"},"%"))),Se.createElement(Pt.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},Se.createElement(Bt.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"}]})),Se.createElement("aside",null,Se.createElement(Pt.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},Se.createElement(Ut.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Se.createElement(Ut.ZP,{type:"default",onClick:$t},"\u53D6\u6D88"))))};function Jt({onFileChange:oe}){return Se.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",Se.createElement("input",{type:"file",onChange:oe}))}function re(oe,$t){if(!oe)throw new String("\u6CA1\u6709\u6587\u4EF6");let Le=new FormData;Le.append("editormd-image-file",oe),Le.append("file_param_name","editormd-image-file"),Le.append("byxhr","true");var de=new window.XMLHttpRequest;de.withCredentials=!0,de.addEventListener("load",function(Fe){$t(JSON.parse(Fe.target.responseText),oe)},!1),de.addEventListener("error",function(Fe){console.error(Fe)},!1),de.open("POST",`${ue.KI}/api/attachments.json`),de.send(Le)}},76621:function(un,Nn,Mt){"use strict";Mt.d(Nn,{Z:function(){return Ne}});var Pt=Mt(67294),ne=Mt(73935);class Ne extends Pt.Component{constructor(Pe){super(Pe);const Bt=window.document;this.node=Bt.createElement("div"),Bt.body.appendChild(this.node)}render(){const{children:Pe}=this.props;return(0,ne.createPortal)(Pe,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},36295:function(un,Nn,Mt){"use strict";Mt.d(Nn,{SV:function(){return ve},ZP:function(){return Ie}});var Pt=Mt(67294),ne=Mt(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"]},Be={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"]},Pe={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 ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)}]},Bt={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(` `)}]},Ut={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 ue=Mt(84204),se=Mt.n(ue),Se=(ze,je,He)=>new Promise((Ot,Lt)=>{var wt=kt=>{try{Wt(He.next(kt))}catch(Xt){Lt(Xt)}},Ft=kt=>{try{Wt(He.throw(kt))}catch(Xt){Lt(Xt)}},Wt=kt=>kt.done?Ot(kt.value):Promise.resolve(kt.value).then(wt,Ft);Wt((He=He.apply(ze,je)).next())});const Xe={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"]}},pe=(ze,je,He,Ot)=>{const Lt=je.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:He.lineNumber,endColumn:He.column});return Array.from(new Set(Lt.match(/\b\w{2,}\b/g)||[])).map(Ft=>({label:Ft,kind:ze.languages.CompletionItemKind.Text,insertText:Ft,range:Ot}))},Ht=(ze,je,He,Ot)=>{ze.languages.registerCompletionItemProvider(je,{provideCompletionItems(Lt,wt){const Ft=Lt.getWordUntilPosition(wt),Wt={startLineNumber:wt.lineNumber,endLineNumber:wt.lineNumber,startColumn:Ft.startColumn,endColumn:Ft.endColumn},kt=Lt.getLineContent(wt.lineNumber).substring(Ft.startColumn-2,Ft.endColumn);return{suggestions:[...pe(ze,Lt,wt,Wt),...He.map($e=>({label:$e,kind:ze.languages.CompletionItemKind.Keyword,documentation:$e,insertText:$e,insertTextRules:ze.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Wt})),...Ot.map($e=>({label:$e.label,kind:ze.languages.CompletionItemKind.Snippet,documentation:$e.content,insertText:kt.startsWith("#")?$e.content.replace(/#/,""):$e.content,insertTextRules:ze.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Wt}))]}}})};var Dt=ze=>{Xe.languages.forEach(je=>{ze.languages.registerDocumentFormattingEditProvider(je,{provideDocumentFormattingEdits(He){return Se(this,null,function*(){const Ot=se()(He.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:He.getFullModelRange(),text:Ot}]})}})}),Ht(ze,"java",Be.keywords,Be.quickKey),Ht(ze,"cpp",Pe.keywords,Pe.quickKey),Ht(ze,"c",Ne.keywords,[]),Ht(ze,"python",Bt.keywords,Bt.quickKey),Ht(ze,"scala",Ut.keywords,Ut.quickKey)};const nt="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var et=Object.defineProperty,ht=(ze,je,He)=>je in ze?et(ze,je,{enumerable:!0,configurable:!0,writable:!0,value:He}):ze[je]=He,lt=(ze,je,He)=>ht(ze,typeof je!="symbol"?je+"":je,He);const gt=class px{constructor(je,He,Ot){this.placeholder=je,this.editor=He,this.monaco=Ot,He.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return px.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(gt,"ID","editor.widget.placeholderHint");var xt=gt,St=Mt(84144),zt=Mt(2453),Jt=Mt(83062),re=Mt(96486),oe=Mt(33054),$t=Mt(74855),Le=Object.defineProperty,de=Object.defineProperties,Fe=Object.getOwnPropertyDescriptors,rn=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,jn=Object.prototype.propertyIsEnumerable,Bn=(ze,je,He)=>je in ze?Le(ze,je,{enumerable:!0,configurable:!0,writable:!0,value:He}):ze[je]=He,an=(ze,je)=>{for(var He in je||(je={}))De.call(je,He)&&Bn(ze,He,je[He]);if(rn)for(var He of rn(je))jn.call(je,He)&&Bn(ze,He,je[He]);return ze},Zn=(ze,je)=>de(ze,Fe(je)),_t=(ze,je)=>{var He={};for(var Ot in ze)De.call(ze,Ot)&&je.indexOf(Ot)<0&&(He[Ot]=ze[Ot]);if(ze!=null&&rn)for(var Ot of rn(ze))je.indexOf(Ot)<0&&jn.call(ze,Ot)&&(He[Ot]=ze[Ot]);return He},Tt=(ze,je,He)=>new Promise((Ot,Lt)=>{var wt=kt=>{try{Wt(He.next(kt))}catch(Xt){Lt(Xt)}},Ft=kt=>{try{Wt(He.throw(kt))}catch(Xt){Lt(Xt)}},Wt=kt=>kt.done?Ot(kt.value):Promise.resolve(kt.value).then(wt,Ft);Wt((He=He.apply(ze,je)).next())});function ce(ze){return/^\d+$/.test(ze)?`${ze}px`:ze}function _e(){}let Ye=!1;const xe={"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 on(ze=[]){let je=ze;if(Array.isArray(ze)){for(let He=0;HeTt(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(ze){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",ze)}});var Ie=ze=>{var je=ze,{width:He="100%",height:Ot="100%",value:Lt,language:wt="javascript",style:Ft={},options:Wt={},overrideServices:kt={},theme:Xt="vs-dark",onEditBlur:$e,isCopy:Je=!1,onSave:fn,autoHeight:Ve=!1,forbidCopy:Mn=!1,onChange:Ue=_e,editorDidMount:ti=_e,onFocus:Qn=_e,onBreakPoint:Hn=_e,breakPointValue:pn=[],filename:gi="educoder.txt",errorLine:Mi,errorContent:In="",highlightLine:ei,openBreakPoint:Ki=!1,placeholder:hi="",showMiniMap:$i=!0}=je,pr=_t(je,["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 rr=(0,Pt.useRef)(),ki=(0,Pt.useRef)({}),sr=(0,Pt.useRef)(),Ur=(0,Pt.useRef)(),Jo=(0,Pt.useRef)([]),Rr=(0,Pt.useRef)(!1),To=(0,Pt.useRef)(),pa=(0,Pt.useRef)(),co=(0,Pt.useRef)(!1),[Xi,bn]=(0,Pt.useState)(!1);function bt(){let ke;return rr.current&&(ke=new ne.Z(cn=>{for(let _n of cn)(_n.target.offsetHeight>0||_n.target.offsetWidth>0)&&ki.current.instance.layout()}),ke.observe(rr.current)),ke}function wn(){zt.ZP.warning({content:decodeURIComponent(nt),key:"monaco-editor-tip"})}const Fn=()=>{let ke=ki.current.instance;if(Lt!=null&&ke&&Xi){const cn=ke.getModel();cn&&Lt!==cn.getValue()&&(Ye=!0,cn.setValue(Lt),ke.layout(),Ye=!1)}};(0,Pt.useEffect)(()=>{const ke=oe.Z.subscribe("formatDocument",cn=>{var _n;let vi=ki.current.instance;(_n=vi==null?void 0:vi.getAction)==null||_n.call(vi,"editor.action.formatDocument").run()});return window.updateMonacoValue=cn=>{Ue(cn)},ke},[]),(0,Pt.useEffect)(()=>{var ke;let cn=ki.current.instance;Ur.current&&clearTimeout(Ur.current),Ur.current=setTimeout(()=>{Fn()},500),Lt&&(Lt!=null&&Lt.length)&&((ke=cn==null?void 0:cn.updateOptions)==null||ke.call(cn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Lt.split(/\r\n|\r|\n/g).length))+3,5)}))},[Lt,Xi,ki.current]),(0,Pt.useEffect)(()=>{if(Mi&&ki.current&&ki.current.instance){let cn=ki.current.instance;cn.changeViewZones(function(_n){var vi=document.createElement("div");vi.style.padding="10px 20px",vi.style.width="calc(100% - 20px)",vi.className="my-error-line-wrp",vi.innerHTML=In,_n.addZone({afterLineNumber:Mi||11,heightInLines:3,domNode:vi})});var ke={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}};cn.addOverlayWidget(ke),cn.revealPositionInCenter({lineNumber:20,column:1})}},[Mi,ki.current,Xi]);const Un=(ke="",cn)=>{if(!ke||ke.trim()==="")return!0;const vi=ki.current.instance.getModel().getLineTokens(cn);let mn=!1;for(let Oe=0;Oe<2;Oe++)vi.getStandardTokenType(Oe)===1&&(mn=!0);return mn};(0,Pt.useEffect)(()=>{var ke;const cn=(ke=ki.current)==null?void 0:ke.instance;if(cn&&Xi&&Mn){const _n=cn.onDidBlurEditorWidget(()=>{co.current=!1}),vi=cn.onDidFocusEditorText(()=>{co.current=!0});return()=>{_n.dispose(),vi.dispose()}}},[ki.current,Xi,Mn]),(0,Pt.useEffect)(()=>{var ke;if((ke=ki.current)!=null&&ke.instance&&Xi&&Ki){let cn=ki.current.instance,_n=cn.getModel();if(!_n)return;(()=>{var Si;let Fi=[],Gi=[];const Mr=_n.getAllDecorations();for(let Yn of Mr)Yn.options.className==="highlighted-line"&&(Fi.push((Si=Yn==null?void 0:Yn.range)==null?void 0:Si.startLineNumber),Gi.push(Yn==null?void 0:Yn.id));if(ei===Fi[0])return;_n.deltaDecorations(Gi,[]);const hr=_n.getLineCount();ei&&ei<=hr&&(cn.deltaDecorations([],[{range:new tn.Range(ei,1,ei,_n.getLineMaxColumn(ei)),options:{isWholeLine:!0,className:"highlighted-line"}}]),cn.revealLineInCenter(ei))})();const mn=(Si=!1)=>{var Fi;let Gi=[],Mr=[];const hr=_n.getAllDecorations();for(let Yn of hr)Yn.options.linesDecorationsClassName==="breakpoints-select"&&(Gi.push((Fi=Yn==null?void 0:Yn.range)==null?void 0:Fi.startLineNumber),Mr.push(Yn==null?void 0:Yn.id));if(Si)return{lines:Gi,ids:Mr};Hn(Gi)},Oe=Si=>Tt(void 0,null,function*(){let Fi={range:new tn.Range(Si,1,Si,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield _n.deltaDecorations([],[Fi]),mn()}),ni=Si=>Tt(void 0,null,function*(){let Fi=[];const Gi=cn.getLineDecorations(Si);for(let Mr of Gi)Mr.options.linesDecorationsClassName==="breakpoints-select"&&Fi.push(Mr.id);yield _n.deltaDecorations(Fi,[]),mn()}),Pi=Si=>{let Fi=cn.getLineDecorations(Si);for(let Gi of Fi)if(Gi.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,re.isEqual)(pn,mn(!0).lines)){_n.deltaDecorations(mn(!0).ids,[]);const Si=pn.map(Fi=>({range:new tn.Range(Fi,1,Fi,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));_n.deltaDecorations([],Si)}const Li=cn.onDidChangeModelContent(Si=>{let Fi=cn.getPosition();if(Fi){let Gi=Fi.lineNumber;clearTimeout(pa.current),pa.current=setTimeout(()=>{Un(_n.getLineContent(Gi),Gi)?ni(Gi):Pi(Gi)?(ni(Gi),Oe(Gi)):mn()},100)}}),qe=cn.onMouseDown(Si=>{var Fi,Gi,Mr;if(Si.target.detail&&((Mr=(Gi=(Fi=Si.target)==null?void 0:Fi.element)==null?void 0:Gi.className)!=null&&Mr.includes("line-numbers"))){let hr=Si.target.position.lineNumber;if(Un(_n.getLineContent(hr),hr))return;Pi(hr)?ni(hr):Oe(hr)}}),oi=Si=>{let Fi={range:new tn.Range(Si,1,Si,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Jo.current=cn.deltaDecorations(Jo.current,[Fi])},Ni=()=>{Jo.current=cn.deltaDecorations(Jo.current,[])},gr=cn.onMouseMove(Si=>{var Fi,Gi,Mr;if(Ni(),Si.target.detail&&((Mr=(Gi=(Fi=Si.target)==null?void 0:Fi.element)==null?void 0:Gi.className)!=null&&Mr.includes("line-numbers"))){let hr=Si.target.position.lineNumber;if(Un(_n.getLineContent(hr),hr))return;oi(hr)}}),xr=cn.onMouseLeave(()=>{Ni()});return()=>{Li.dispose(),qe.dispose(),gr.dispose(),xr.dispose()}}},[ki.current,Xi,pn,ei,Ki,wt]),(0,Pt.useEffect)(()=>{var ke;(ke=ki.current)!=null&&ke.instance&&Ki&&ki.current.instance.setPosition({lineNumber:0,column:0})},[ei]);function Xn(){let ke=ki.current.instance;if(ke){const cn=ke.getSelection(),_n=ki.current.pastePos||{},vi=new tn.Range(_n.startLineNumber||cn.endLineNumber,_n.startColumn||cn.endColumn,_n.endLineNumber||cn.endLineNumber,_n.endColumn||cn.endColumn);setTimeout(()=>{ke.executeEdits("",[{range:vi,text:""}])},300)}}function ai(ke){(window.navigator.platform.match("Mac")?ke.metaKey:ke.ctrlKey)&&ke.keyCode==83&&(ke.preventDefault(),fn())}const Tn=()=>{if(Ve&&ki.current.instance){const ke=ki.current.instance.getContentHeight();An(ke{if(!co.current)return;const{keyCode:cn,ctrlKey:_n,metaKey:vi,target:mn,type:Oe}=ke;return(Oe==="paste"||(cn===67||cn===86)&&(vi||_n))&&mn.nodeName==="TEXTAREA"&&(wn(),ke.preventDefault()),!1};function le(ke,cn){var _n=window.URL||window.webkitURL||window,vi=new Blob([cn]),mn=document.createElementNS("http://www.w3.org/1999/xhtml","a");mn.href=_n.createObjectURL(vi),mn.download=ke,Di(mn)}(0,Pt.useEffect)(()=>{Tn()},[Tn]),(0,Pt.useEffect)(()=>{rr.current&&!Xi&&Promise.all([Mt.e(5552),Mt.e(9651)]).then(Mt.bind(Mt,55826)).then(ke=>{try{tn=ke,ki.current.instance=tn.editor.create(rr.current,{value:Lt,language:on(wt),theme:Xt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:$i||!1}},kt);const cn=ki.current.instance;let mn=[...St.BH._menuItems].find(Li=>Li[0]._debugName=="EditorContext")[1],Oe=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],ni=(Li,qe)=>{var oi,Ni;let gr=Li._first;do qe.includes((Ni=(oi=gr.element)==null?void 0:oi.command)==null?void 0:Ni.id)&&Li._remove(gr);while(gr=gr.next)};if(ti(cn,tn),setTimeout(()=>{Tn(),ki.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{le(gi||"educoder.txt",cn.getValue())}})},500),ki.current.subscription=cn.onDidChangeModelContent(Li=>{Rr.current?clearTimeout(To.current):(Tn(),Ue(cn.getValue(),Li)),To.current=setTimeout(()=>{Rr.current=!1},500)}),window.Monaco||Dt(tn,on(wt)),Mn&&(ni(mn,Oe),rr.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",te),window.removeEventListener("paste",te),window.addEventListener("keydown",te),window.addEventListener("paste",te)),window.Monaco=tn,$e&&cn.onDidBlurEditorWidget(()=>{$e(cn.getValue())}),Qn&&cn.onDidFocusEditorText(()=>{Mn&&Cn(),Qn(cn.getValue())}),Mn){Cn();try{cn.onDidPaste(Li=>{const qe=cn.getSelection(),oi=ki.current.pastePos||{},Ni=new tn.Range(oi.startLineNumber||qe.endLineNumber,oi.startColumn||qe.endColumn,oi.endLineNumber||qe.endLineNumber,oi.endColumn||qe.endColumn);cn.executeEdits("",[{range:Li.range,text:""}])})}catch(Li){}}let Pi=bt();return hi&&typeof hi=="string"&&new xt(hi,cn,tn),bn(!0),()=>{const Li=ki.current.instance;Li.dispose();const qe=Li.getModel();qe&&qe.dispose(),ki.current.subscription&&ki.current.subscription.dispose(),Pi.unobserve(rr.current)}}catch(cn){}})},[]),(0,Pt.useEffect)(()=>{if(ki.current.instance&&Xi)return document.addEventListener("keydown",ai,!1),()=>{document.removeEventListener("keydown",ai)}},[fn,Xi]),(0,Pt.useEffect)(()=>{let ke=ki.current.instance;if(ke&&Xi){let cn=on(wt);tn.editor.setModelLanguage(ke.getModel(),cn)}},[wt,Xi]),(0,Pt.useEffect)(()=>{ki.current.instance&&Xi&&tn.editor.setTheme(Xt)},[Xt,Xi]),(0,Pt.useEffect)(()=>{let ke=ki.current.instance;sr.current=Wt,ke&&Xi&&(ke.updateOptions(an({},Wt)),setTimeout(()=>{ke.getModel().updateOptions(an({},Wt))},200))},[JSON.stringify(Wt),Xi]),(0,Pt.useEffect)(()=>{let ke=ki.current.instance;ke&&Xi&&ke.layout()},[He,Ot,Xi]);const[ae,Ae]=(0,Pt.useState)(ce(He)),[Sn,An]=(0,Pt.useState)(ce(Ot)),En=Zn(an({},Ft),{width:ae,height:Sn,position:"relative"});return Pt.createElement("div",{className:"my-monaco-editor",ref:rr,style:En},Je&&Pt.createElement($t.CopyToClipboard,{text:Lt,onCopy:()=>zt.ZP.success("\u590D\u5236\u6210\u529F")},Pt.createElement(Jt.Z,{title:"\u590D\u5236\u4EE3\u7801"},Pt.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},Pt.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function ve({width:ze="100%",height:je="100%",original:He,modified:Ot,language:Lt,options:wt={}}){const Ft=(0,Pt.useRef)(),[Wt,kt]=(0,Pt.useState)(null);function Xt(Ve){let Mn;return Ft.current&&(Mn=new ne.Z(Ue=>{for(let ti of Ue)(ti.target.offsetHeight>0||ti.target.offsetWidth>0)&&Ve.layout()}),Mn.observe(Ft.current)),Mn}(0,Pt.useEffect)(()=>(Ft.current&&Promise.all([Mt.e(5552),Mt.e(9404)]).then(Mt.bind(Mt,50048)).then(Ve=>{tn=Ve;const Mn=tn.editor.createDiffEditor(Ft.current,Zn(an({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},wt),{wordWrap:!0}));kt(Mn);let Ue=Xt(Mn);return()=>{Mn.dispose();const ti=Mn.getModel();ti&&ti.dispose(),Ue.unobserve(Ft.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,Pt.useEffect)(()=>{Wt&&Wt.setModel({original:tn.editor.createModel(He,Lt),modified:tn.editor.createModel(Ot,Lt)})},[He,Ot,Lt,Wt]);const $e=ce(ze),Je=ce(je),fn={width:$e,height:Je};return Pt.createElement("div",{className:"my-diff-editor",ref:Ft,style:fn})}},5476:function(un,Nn,Mt){"use strict";Mt.d(Nn,{Z:function(){return Xe}});var Pt={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"},ne=Mt(74330),Ne=Mt(83062),Be=Mt(94184),Pe=Mt.n(Be),Bt=Mt(28706),Ut=Mt(26194),ue=Mt(52262),se=Mt(67294),Xe=({className:pe,dataSource:Ht=[],col:Dt=4,right:nt,bottom:et=23,precision:ht=0,wrapWidth:lt=1200,trackEventItems:gt,loading:mt,onRemove:xt=()=>{},isCurrent:St=!0,showAlias:zt=!1})=>{const Jt=Math.floor((lt-(Dt-1)*nt)/Dt),re=[{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 se.createElement(ne.Z,{spinning:mt},se.createElement("div",{className:Pe()(Pt.list,pe)},!!(Ht!=null&&Ht.length)&&(Ht==null?void 0:Ht.map((oe,$t)=>{var Le;const{name:de,id:Fe,identifier:rn,featured:De,school_name:jn,image_url:Bn,excellent:an,is_plan:Zn}=oe;return se.createElement("div",{key:Fe,className:Pt.wrap,style:{width:Jt,marginRight:(1+$t)%Dt===0?0:nt+ht,marginBottom:et}},se.createElement("a",{className:Pt.li,onClick:_t=>{_t.preventDefault(),_t.stopPropagation(),gt&&(0,Bt.L9)([gt]),(0,Bt.xg)(`/paths/${rn}`)}},se.createElement("div",{className:Pt.img},se.createElement("img",{className:Pt.cover,src:`${Bn}`}),St&&(0,ue.bg)()&&(oe==null?void 0:oe.studying)&&se.createElement("div",{className:`${Pt.movebq} user-path-items`,onClick:_t=>{_t.stopPropagation(),xt(oe)}},se.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),se.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Le=oe==null?void 0:oe.subject_tags)==null?void 0:Le.map((_t,Tt)=>{var ce,_e;if(Tt===0){const xe=(ce=re.find(on=>on.name==_t))==null?void 0:ce.swimg;return se.createElement("img",{className:Pt.sign,src:xe,style:{left:"-4px"}})}const Ye=(_e=re.find(xe=>xe.name==_t))==null?void 0:_e.ptimg;return se.createElement("img",{className:Pt.sign,src:Ye,style:{left:`${48+52*(Tt-1)+2*Tt}px`}})}),se.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(oe==null?void 0:oe.excellent)&&se.createElement("div",{className:Pt.bq},"\u5F00\u653E\u8BFE\u7A0B"))),se.createElement("div",{className:Pt.name},se.createElement(Ne.Z,{title:zt&&(oe!=null&&oe.excellent_alias_name)?se.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${de}`,se.createElement("br",null),se.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${oe==null?void 0:oe.excellent_alias_name}`)):de},se.createElement("span",{className:Pt.e},zt&&(oe==null?void 0:oe.excellent_alias_name)||de))),se.createElement(Ne.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${jn}`},se.createElement("div",{className:Pt.unit},se.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),jn)),se.createElement("div",{className:Pt.tags},se.createElement("div",null,se.createElement(Ne.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},se.createElement("span",null,se.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),se.createElement("span",null,oe.stages_count))),se.createElement(Ne.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},se.createElement("span",null,se.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),se.createElement("span",null,oe.members_count)))))))})),!Ht.length&&se.createElement(Ut.Z,null)))}},30001:function(un,Nn,Mt){"use strict";Mt.d(Nn,{jL:function(){return Pe},w9:function(){return ce},QD:function(){return Mi},cQ:function(){return Bn.Z},op:function(){return Ue},O5:function(){return Fn},_b:function(){return pr},t7:function(){return lt},Gi:function(){return Cn},YG:function(){return on},qp:function(){return Xe},vr:function(){return Ki},qE:function(){return Hn},Je:function(){return xt},wb:function(){return jn},cq:function(){return Ot},tp:function(){return Dt}});var Pt=Mt(67294),ne={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,iVBORw0KGgoAAAANSUhEUgAAAE4AAAA0CAYAAAAkEw66AAAAAXNSR0IArs4c6QAAGNVJREFUeF7VmwmwHVWdxr9zuvvu9+3ZXsxCiNkIQZOwEzMgyADjggsWgzPqOAJaMiCjYiGKqDBQAo4iWGAxA+ooMm7gBhSyhBBRIIBSAQlrHuTt7913t97PmfpOd4cXlLAFGO6rW9237719+/z6+6/nPIHX+XHttddaex38nlW2lLO1svq1wJ4aeFMM9CqFnNKoaYVapDAOicfjGEMKqKk2nrx59Lbt5xx6aPR6DEG8Hj/K3xwY0YtjSx2vYnlspLEsX0BRKUBrINtyX+PZp0r3fR+IIgzFSo9EsahFUfSHWIj7Pa919zvf2vlo+rFXdWivObjHJvR8S6vTJORHckV0+4GBAF4InwQlBCAIkEMXgCLA9Mn9WCef4ft8HWkgVIDn6ckwUA/HQfCzoFX71TsP6n/41aL3moHTWotnJnGysPEFx8ZcAtMqGTjh2NmVTL+iDB6BZurjsRSe2SogjhNwMZIngbZbqgXom8N26/KjV3femB7ebRxfE3DbRnW/k8c3LQvv5yCjOFVVqhgCyNnJmAhoxyOFasz1OeCM2lLTJryI4BQQUn1RAhI24Lc1dBjc2K6Nnv2edfP+sLvIvergxqb0vpHA1fk8lre9xBZpZsYKU9sMYiDvAHKaqU4HuANcZrIpcILiezRdo7z0aUw3BoJYI4gELAeI/bjZmBq9+PGNd5x/+unHua8U4KsKbriujxUSV9gW+rwg9WPTfpHgpEgUQgAFJwU6LSDwjSxA8F2jslSBBJaZKwVGJRv1pSAJLyQ8qlwLOA4Q1us31Z58+OTj3rX/E68E3qsGbmhK/6Nt40oIFMJwZ5URFh/cZoGgHQKODeSsaUEiA5iSy6IqYRnfmPq66YojPILbYbqpGXuhRhRrFPMSUaP+6OTAtuPff8ze97xceK8KuJGG/oBl4XsaKMTTsiwDKVXZjm1qsgRBU84TXi5VXqo24/syP5ce2xEg0gBDeAZWFijo79JnpLQxXSo7iICiIyD8qUfdxuQRRx24x5MvB95uBzfW1G+XFn4GoMMojQNOYWUK45b+jG9mW+PvFNAKEkqVYgI583VZcOB7WRrCqGwiaQovU1lAlaXKM/BMQNIGbN0FLGh0lySCVv0OP3aPOnKf2a2XCm+3ghuc1AvzOdwmLSwIwkQlBoxMtgZYCkvwQLafBYo0l2v6gBcCxRxQyifwM9PckRCniXIGbjo8wiI4bgnRRFul0XAZMABbaggVoytvo12vff7Qt/Rc8LqBm5jQndrBr3MFHOwyemaJbGaaAKzMp00zV2O+6VVnSTCPcYCNdrItEGAOcKxpVUQKLjPZ6VHVgEuf3Kf/rLk0Y4ViTpiAEUYKJaEgVDg2OTq1+j3r5w68FHi7TXFDU/El1Yr8VLudDM4IjUpLVWW2Mg0GgubybATNfN/0C5+eqjQ9oO0ngAmR0ZF5X2bKjLRZBUFgNE03AKhcPqk62wJsm+qjvyM4Aa0idFN1zcmvHraq90uvObihqej4YsH6nzCEyHwRB0WFZeZJ05xupsZSp6sty+2mXX2a/5rP0fT8MAHRZpmWph48J38zi6xUF1Vqft9KAg2BES6PmyChGGFTBVJ1kb/dq7XeeuTBs0deLLxXrLhHn2nP6+4s3Gk7Yl6Q5mpZMMjAGWjT0o+dgkR6BVnUzJSW2PpzhpHVqIygdPiEET3rzwiHP2QCSlrjUm1epE0el+R1/E6SmjDa2nGEat5Bu9089bC9O7/1moDT0GJkMv5eR6f1oVY7MRfjp2SiNgOO5pkFBpnkadmD/qflRrAtiUrBhJFdPnauJhI6SU6noXSyb2BmUZUqzYKEqSSSZ6SUSU34WagYVUsg9N27R7DtkONWrmRcf8HHK1Lc4EjrqHJn6ZdxBIsXkXU2MqVZqU/ja5ZU/MyWR5/Bps1/wfD2p+G7TUy1QziWRHfZgVXsREd3H1YtnoW+vl709nSjv7f0V4MwPnRaRUGlxSm8rG7N0pAMlim/CE4Jk+tRbTxmAoYK4Qit/Mhb9/a9eze9ILW/YQwv5jvmM/fcs720YMnMDeWStabtJrmVUVaqtsy3sRqgAm+96yH85qbb4DZqWNjfi57uHlRKJViWjSCM0Wr5aDRaqDebqDeaqLkRLFugp7OIQudMrFn+JvT3z8Ee8+dgVldxp+tkpUB42ZZgqLrEnyUq89MkODkunjVVoREFMao5G367een6lZ2fejEQXrbiBgbbn+qZUbyETcWs2KZ/Ynsoi6aMgEPjLVz6Xz/B1OjT2P8tyzB7Zm/i6IMQYRghDGk2ielkLaKIPiiM4PshGk0XzWYDU40a6m6Ickmi3N2Lt+y1B5a+eQ+sXLIQM7rLxi1QiR47I2l3xPizFFyitsQnmqhq8juNks1go2BrDRG4WwMv3veItT1TLwTvZYH7w0NP9y7sn3NPqSgXMiCYRuNz1MbE9eEnRnDhpVdh1fxu7L1iCYIwghcECKMYUfaMY4Rh8jogxJgQNQjP+CECpUK4H8bwPR8tgmzW0Ao8lEsW+vrn4sA1S7Fs2VKsXDIP1UrO3BymMD7PEwvj6wJjnjTTJFAEsUJOJj4y8iMUWIfE8bp1Kzs2virgtg23PtHTV7os9JI0wASFNPWg4vI54LGBMZz/je/i71YvQv/sWXA9D2EYIooiAzCOYoRxDM/z4Xo+PC+Az2MR31NpkU4fpKGUQKRkoiSCjCSiSCAKVPLddgON9hQsK0TXjA7su3YVDjt0Hdbu82ZzbQYgVZb6OJOW0GQjZW54XtACInTkHXjt5kXr9+r4zG4Hd/bZZ8uTTz1rY7liHxiHiR9h+sFAQHNxJMulCGed/x2jtHlv6ofruogILaZpEl6MIAiML2u1XQRhaIDxeKZGqoEAObgoTkBGkUp7bvRRfC0QRpZRkYqk6SjHcYDQryNXVNj/oLX4yIc/iMULZyVVSFr0GxVmlQWDg0xSFG5j372rV1fXr1wpdhldX7Kpbn2mtbqrs7jRkqLIC6VDzgIBwZUKwGXfuwFjA49g331WoO26CSwDh/BieK6HyakaPM9LTZbv0WQJL0r2o9ioMkhN2gDka0JkDhYpExW1FtCQEMKGlg6gbWhTxjPFaKBvZgUfP/njOHz9WrRS5QXG9AkvzeXoHxXrVw0n9puxEm8+dGVlaFeqe8ngBifiT1Y65aUha7+0+M7Sj0IeeOixYXznO1fiHQfvY1REs4wiBoIAcRQZkBOTk/B9P1GSCRBBoraQn/dTmDxOiATGLV+nioxjA49wINjAY4YtIaQFwX1hQYtkn/AtW+Okfzsdf/+OA9H2Uj+XdoiZltBebaGh2a9DrONYvfdtK8q/2L3gaurXxaI4WqUJJH2ETTPltVsaX73wvzG7IjGrrwce4RhoieKCMMDY+LiBZ2AwGJjAQKg0Sx6jCrWBmQAlTJo3vx+ZvIvOXLBEEAJCMPFNQrkBBwnNfcuGMFAFlIqRyxdw+he/gv1WL0PDTftzSicd41jBYaURa/SUHLTrjc+vX9mxy47JS1LcpoGB4qKOuZvzebFMpyUPT0BoTD023P0wfvWL67DfPsvhut4O80z8Woip+hQma41UWVQRDMwEXIQ43Se4OApSYEAYeAijwADSmp1RghPGt3Kb5MMJxEx9VJ2QNu8mYNlQUYj+hUtx9nnnolIpw83KrrSSMOCURmfOQejWr37bis6P7DbFba/ptZal77SlyPFy6WC5ZedBKYWLLrkKs6oOCvl8AoR+zWwjeL6L4dFRuJ5CEGpTsEeBQBD4iFWMWEWIwjpU6Ca+kNswNll+zCgECSkcKM02CQtS/nK0oxPDFDzRIYFSfYRIcFRfzgDktRz7z5/E8Scci7ar0g4xc0aePen0VaSAiLxHutVTe6/cRfn1khQ3OBEdU6xYv4oZbzjJopJISrX96aFtuOaH12D5ogXw/QABVZQFhCDC5NQ4xienEIQCbijh+RKTvXPhVYrIPTGAXLOOOJ4AwhAxzTKomTTEdHy1l/guc5voWTmXSPWFSVAwf7FRH83YuD5jxgQooS3HqE9Bomf2fJx9wcXo7KjAp3swLSZApjPeJUvDioLBkttYvHZtf/v5VPeSwD09Fp9Z7pDnEhzvD1MEqo2d2ut+swEPbr4fM3p7jIqYbhjlBKHxdcMjQ0ZtXmjDbSsMLFqJx048AWDWv/kvWPjNy2DXB5hXAHEIpZqwZNVct1INSFkyoJRyE1g6hjaFnp2IDyrxezqFaMClHQdjsjljsrzuk8/4Cg46ZF9zPQYc05k0qpYswFH+uCW9VYcsm7F994CbiL5fKlkf4lyC1nSswnRlWcBfftVP0RgZRqGQR2jKKd/4JZrpxOQExicmEIQWvDCHhu9gyz99FN76VQCt0AZmnnUxSg/cAUuGEKoJaBdSZjVpBCk7EnDahxRlKHCfjbccNPMis29mWSGMH6TqNKQxWStJVayccQvrjv4ATj7lRLTcpL1k2kym0GUJJlASvuvo6JADV3RtfsngbtXa3gsoBA3k3Rakb8GtiuiaUtk+xveUqRjoU9gmKuYFLr/yGkwMjSBH5xrQ4dNPBaYiGBwehOu24QUCXuhgSnTjsTPOQDxvRjqjrNB31tdRfvwB5O0cEI9BaA9SVhCpGqA56+NAa/oIC5AER2XlmfdDhT60FLBoxlYAof0UnjLukAo1arPyxhev2vcAnHbWOSaJNmWe6elRCAm4TukrS0XvOGivrt+9aHDba8GaQt56r4A8XADztYIVKgimXH6M7iDUebackzJLIm8LlIsSP/jRz/HU1ieQcywDLnHwAWq1BsbGR5M6lYrzJEZmLsHw5z8LlOm0AWwfQ885X0Ol/oypHRFPwpZF2FYXwngEgoBEHpEaNwpTyJsqROsCgupMtFeshLt8Oap/ug8d998CKQgvgICfRFppm/QEBAdg1oIlOOMrF6BcLsAPlCnHIjPvClQcgW4nhFThPxy8ovPXLwjugaGh8uxyzwXlvPOxsoPC9PUaZpYoLZobHtAMtAEhoVDKSXSUHdy+YSN+d9MGFKm4NK0gwKHhUTSaNZPL+ZEFzwXGVrwNk6edlkDjHMLmrei78DzkLR8W18qoEUiRgxR5xKoJ2+ox4EJVh5B9UDqPel8vWgccAW/Naug5Myk84OkJzDn3FOTbIwacFASXJMSC/XOZhxISHTP6ceZ5F6GzuxNekEb5IKlIOvISvU7AhPiog5ZVbtgluE0DurigHPx4RnfunXQXbNJm8wEZQAYCphDs99c9YMqDKbALtjJNyNGRQVx++dWwtDA5GHMyz/ewfXAYntdE4AfwjFkINHsXY+JzXwPmdptGXunKH6D79uuRzxVhqwBKDSFnzTTRNIrHIQXz+RAxTVF1obFqPcY/ehLQVU2CLG+AApwNGzHjR99GTk0Bqg0pvCQ9sRxIY6o5aGmjWOnCmed/A70zZ8INmCpxbGwoAF0Fgd5cEBVkfNj+Szvu2CW4rUPumTN6C+faCijwxqTTeNmXssV+bM1w9oiqm2wToELgt1AtSHQULVxzzU/w5/u2mKUMcRCg3W7hmeFhBF4rKaPY6WDGJDrQnrcUrdX7wRkcQuXe22HHU7CFgDT+zE/AKR9au7CsPkSqAWWiaieG3nkCvPe9G+DSGQrqwUdRuHUjylvvQS4ahaObELoBAVqFSCsJzto4Jkg4OQdn/sd/ord/Plw/MtAIj5Y1oywxq+DXrThae8CKzq3PC+6ux4dndRZ67uut2nM68sn6jWxtx/QvZebKiWKCq7WAmtm2IZSPGR0FjI9uxxVXfB+tqTokYgNu++AQVOSZ1EErunSWRBXTyYASkLIAbdGnMBhI6Lhu5COlA61Ck39JUTHRVAtO73ej0TMbEyeeBj1vjlGauP8RVL7/A+SDQdiowVF1SN02UVaa2fAkl2NU5TNnC5z+5QswY/5iuG4EN1KmhtWxwNwuBws7w+G85S1ftaBr8nnB3f1Y8/hqtfzDzhzQU0qm0v4WOLam6ecIjl2GWhuYaFF5IcamJtFZtNDX4WDzvZvxv9dej9BzoaIIo+Oj0FEAzSxfhyYSa50W5iAU20RNafIuwmol/k0yGPAGJJ0OZSJqHkqWEcU22vPegua/nAR0dxvVWZv+iI6fXomcrsNRDWhNU9UmAWZoVVYOgsFBOCjlLXzqjC+ia+6eaHsRmp5GMScxu8NCf4eF7qKIRBQ8mnfkz4PQ/83SuX/d2BSbHmne3Fktv72vDHQUEsWxGnjuIwPH3hf93FQbGKnTXDUeGhiCFDFmVHPoKlu49dYN+O1vb4alYozXpqBjggvNBHDyYIHDhJVQ+IiSYolFuXHqBQhGT+VCWiUTGaOYQIuIhYWQ34tLcBeugH/ch4DuXmBkEJXvXoB8ewwWXGiT77GWSBoA9G9cKBcLB92dFZx02umI8r0m9Vszv4QVsx10FYUZu7GuNHeuN1XkB9FN7Xbwmb0XVh/KuIhNWwOvs2Tn+6rCZAecITezU9PWc5i0Ml0JZKbfwsTHDU0Bky6wYcs20w7qrThGeaW8xJ0bN+HW2+5Eo9k0lQT9jWkEMVHl2dnhoNp4VLBc4uI4JrKRAcgEO7HDXFLQE64oGNz0k0pUkvUhCxZDrz4A4tEHkXvwLtgihNSJa0gEQNfAXp0NZTnGVSxeuADHHHcCpJXD+9f0YcUc2zRgn6sXnr9O3yeBlqeGJyfDE1cvKlxvkuvfP6512QF6y8kCFwYHllHZsgSezAwh7ZhyPIRHH/fMJDDWAn72x8dQb7XRVbZNoKgWLBRyAvfe/wBuuf0u1CYnIWVaQ9K5pRMrdNw8v5khM2rjZ2iYVGJWfxJunJbwBGjm0kx6ohj/zQpryyS82lKQpopgI0AnLodmaop9C4rVAwTWH3wgluy9Fh/cbxbWLSqa6idbJfpcS3PNupNkQnuioVrDk976I1eV7xW3b2lvL5eKczoLQKWQrIqk6rIeWwYuWw1kymwFTLaAgQlgsK5xxa1bUGu66ChYqOSpXMss4Ms5EtsGnsatGzahMTaWhutsLWsaug2s7F5nix7S/CKZ/08L+7RlZMqpDJ4hk62JShWbLj805Ve2II9zlCbJQqW7C/sftA4HrZiPUw/vRweD7S7A0a/XXW1SsLYSeGpIbxiZeOpIccufG8dVOys/5r2o5JNVQaw9WUrxhDRbk46k62/5moobbySKu397gK/9ZgsKFlDNSZQJzhHI2xKOJVDISTRbbfzpwS0YePxxxL73rJzNwNJZ62yG2dzydNlOUqVnK4PTdpKRWLqfLe/JPpO9nuZnTFRNyFj5Apbtswr5rpn4wpELcPiyqhHKrhTHsTJ4TLnCWNdgA3Dr/lHiuo2j1XJf7x2VvNiHTbZyBs9OA8U02zcTMjKJrsNTwEgT+NE9ow9864Ytt/dVZVDNW6LsSBT5XUsgZ7P7L5BzbDPX+qeHH8HAlr+YZQeJjSWpwk4P2pdhk05mcHfHa3YyzXKa9GD6mez9hOiOhHjHwjzzOzZ65s3B/D2XolSt7nnh+5a9a0mfZcZLkTz3MrJronVxoQ+ziPEWsL3GXDZ60NjIr/6sjynk8EsHEPRxDBK8E1ztw+k+njhHFTqJCTMl4Qm21eDd/KR7+NePLt35fPnO/8fj592ljz5sPn49rwBUC4mF0bqmp2HZMguKhOC4kpPpF8fNgLEjkPzyz/qzjo3zcwKSyqOfy2avePKuNHgwUjEB3j4FbB1R973/3zfsh9ten/+nerk35RM36MPfswdu2qMDoqOY9BO59jhb6zJdbVneyhSMixPpnphR7BSBr3tAf9i2cH45j9k0Dy58Zreitwr0dSRK5J0YbwJDLfo39eWTDrTOebkDeL2+13e5nnPZfrh/UTdmVvOJb6fq6OsIzziK9H8lCI6RldtMcX46ZbDT9V//oJ6fAz4iBI7VMfYp5SBmEFw1uTNcezFcB56YQPv329qHfPXo8n2vF4BX8rsXbdS/WD0L72ZThfA4NrqiLIdlMGSfjtBYn1Nx9HH1wDQ7Nj9v6/zGB3S5HWCvUlFfvWiGWMYFQpQzzXSoAfxlWD1w0X1y33tPEkyy33CPk6/TBx8yF7f05pDjuIrOzuaaVUoExxKT43a5akFCtVys3+Wcwweu1dbHV+LxN3VhPsEx8jANGfOAh4eiL5x0iHPeG47YtAv+9I3xp9f0yIvLDAw6ySIY/ExSnpkqVcels/x/syLgtXHpx9bhlF2CO/tanVuzHHfPqmJVOf0nNdr5SFP7D02Eb/3iEfkdtdsbFeCXbtYfXlDGueU85iKZsjXZklnpyZdpGmgWFcS4pGsQnzvuOBG/4CzXFX/Qp+zZi28pPzkZHeNIS337X2+Qp+IckWajb1RsyXWffqOeN8tRH+rKyWOhsSBnYyYziiCAa0k8EQKb2kF01acPc3akXS8IbsW1Onf6AnVib16ewqWz21vq9qu2yNPeqL7thW7xZ65391jcV1jE/1qKFcaeCfDwOYeK9D83nv32/wHzrWgvjJ8Q7AAAAABJRU5ErkJggg==",Pe=({dataSource:Un=[],img:Xn,imgWidth:ai=346,title:Tn,sunTitle:Di,bannerExtraContent:te})=>Pt.createElement("div",{className:ne.banner},Pt.createElement("div",{className:ne.content},Pt.createElement("aside",null,Pt.createElement("p",null,Pt.createElement("b",null,Tn),Pt.createElement("span",null,Di)),Un.length>0&&Pt.createElement("div",{className:ne.btns},Un.map((le,ae)=>Pt.createElement("div",{key:ae,onClick:le.click},le.name,le.sign?Pt.createElement("img",{src:Ne,width:39}):null))),te),Xn&&Pt.createElement("img",{style:{marginTop:33,marginRight:38},src:Xn,width:ai}))),Bt={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"},Ut=Mt(94184),ue=Mt.n(Ut),se=Mt(96486),Xe=({dataSource:Un=[],value:Xn,onChange:ai,onTitleChange:Tn,className:Di,title:te,titleWidth:le=41,style:ae={},fontColor:Ae="#6A7283",showCount:Sn})=>{const[An,En]=(0,Pt.useState)(0),[ke,cn]=(0,Pt.useState)(!1),_n=(0,Pt.useRef)(null),vi=(0,Pt.useRef)(null);return(0,Pt.useEffect)(()=>{var mn;Un.length!==0&&(((mn=_n==null?void 0:_n.current)==null?void 0:mn.clientHeight)>97?En(1):En(0)),Un.length===0&&En(0),cn(!1)},[Un]),Pt.createElement("div",{className:ue()(Bt.row,Di),style:ae},Pt.createElement("div",{onClick:(0,se.throttle)(()=>Tn==null?void 0:Tn(),2e3),style:{width:le,marginTop:ke?12:4},className:`${Bt.title} ${Tn?"current":""}`},te),Pt.createElement("div",{className:ke?`${Bt.tagsWrap} ${Bt.tagsBorderWrap}`:Bt.tagsWrap},Pt.createElement("div",{className:Bt.bar,ref:vi,style:An>0?{height:An===1?97:"auto",overflow:An===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},Pt.createElement("div",{className:Bt.tag,ref:_n},Un==null?void 0:Un.map(mn=>Pt.createElement("span",{onClick:()=>ai(mn.id),key:mn.id,style:{color:Ae},className:Xn===mn.id?Bt.active:""},Pt.createElement("span",{title:mn.name,className:Bt.name},mn.name),!!Sn&&Pt.createElement("span",{className:Bt.num},mn.count))))),!!An&&Pt.createElement(Pt.Fragment,null,An===1?Pt.createElement("div",{onClick:()=>{var mn;En(2),((mn=_n==null?void 0:_n.current)==null?void 0:mn.clientHeight)>245?cn(!0):cn(!1)},className:Bt.action},"\u5C55\u5F00",Pt.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):Pt.createElement("div",{onClick:()=>{vi.current.scrollTop=0,En(1),cn(!1)},className:Bt.action},"\u6536\u8D77",Pt.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},pe={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"},Dt=({dataSource:Un=[],value:Xn,onChange:ai,className:Tn,style:Di={}})=>Pt.createElement("div",{style:Di,className:ue()(pe.tabs,Tn)},Un.map(te=>Pt.createElement("span",{onClick:()=>ai(te.id),className:Xn===te.id?pe.active:"",key:te.id},te.name))),nt={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"},et=Mt(28802),lt=({dataSource:Un=[],value:Xn="",onChange:ai,onInputChange:Tn=()=>{},className:Di,style:te={},placeholder:le,allowClear:ae=!1})=>{var Ae;const[Sn,An]=(0,Pt.useState)(""),[En,ke]=(0,Pt.useState)("");(0,Pt.useEffect)(()=>{var vi;let mn=Xn;(vi=JSON.stringify(Xn))!=null&&vi.includes("{")&&(An(Xn.id),mn=Xn.value||"");try{ke(decodeURIComponent(mn||""))}catch(Oe){ke(decodeURIComponent(mn||""))}},[Xn]);const cn=()=>{ai(encodeURIComponent(En),Sn||null)},_n=vi=>{vi!==Sn&&(An(vi),ai(encodeURIComponent(En),vi))};return Pt.createElement("div",{className:ue()(nt.input,Di),style:te},!!Un.length&&Pt.createElement("div",{className:nt.dropdown},Pt.createElement("div",{className:nt.text},(Ae=Un.find(vi=>vi.id===Sn))==null?void 0:Ae.name,Pt.createElement("i",{className:"iconfont icon-zhankai4"}),Pt.createElement("b",{className:nt.b1}),Pt.createElement("b",{className:nt.b2})),Pt.createElement("div",{className:nt.menu},Un.map((vi,mn)=>Pt.createElement("div",{key:mn,onClick:()=>_n(vi.id)},vi.name)))),Pt.createElement(et.default,{onPressEnter:cn,value:En,onChange:vi=>{ke(vi.target.value),Tn(encodeURIComponent(vi.target.value),Sn||null)},bordered:!1,placeholder:le}),Pt.createElement("i",{onClick:cn,className:"iconfont icon-sousuo9 font14 pl10 current"}))},gt={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"},xt=({value:Un,onChange:Xn,className:ai,total:Tn,pageSize:Di,style:te={}})=>{const le=Un<2,ae=Un>=Math.ceil(Tn/Di);return Tn<=Di?Pt.createElement(Pt.Fragment,null):Pt.createElement("div",{className:ue()(gt.quickPager,ai),style:te},Pt.createElement("div",{onClick:()=>{le||Xn(Un-1,"prev")},className:le?gt.disabled:""},"\u4E0A\u4E00\u9875"),Pt.createElement("div",{onClick:()=>{ae||Xn(Un+1,"next")},className:ae?gt.disabled:""},"\u4E0B\u4E00\u9875"))},St={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"},zt=Mt(74330),Jt=Mt(83062),re=Mt(57097),oe=Mt(11320),$t=Mt(28706),Le=Mt(96908),de=Mt(57177),Fe=Mt(81378),rn=Mt(26194),jn=({className:Un,dataSource:Xn=[],col:ai=4,right:Tn,bottom:Di=23,precision:te=0,wrapWidth:le=1200,trackEventItems:ae,loading:Ae})=>{const Sn=Math.floor((le-(ai-1)*Tn)/ai);return Pt.createElement(zt.Z,{spinning:Ae},Pt.createElement("div",{className:ue()(St.list,Un)},!!Xn.length&&Xn.map((An,En)=>{const{name:ke,id:cn,identifier:_n,power:vi,cover_image_id:mn,pic:Oe}=An;return Pt.createElement("div",{className:St.wrap,key:cn,style:{width:Sn,marginRight:(1+En)%ai===0?0:Tn+te,marginBottom:Di}},Pt.createElement("a",{target:"_blank",href:`/shixuns/${_n}/challenges`,className:St.li,onClick:ni=>{ni.preventDefault(),ae&&(0,$t.L9)([ae]),vi&&(0,$t.xg)(`/shixuns/${_n}/challenges`)}},Pt.createElement("div",{className:St.img},Pt.createElement("img",{className:St.cover,src:`${Oe}`}),An.is_jupyter&&Pt.createElement("img",{className:St.sign,src:Le}),An.is_jupyter_lab&&Pt.createElement("img",{className:St.sign,src:de}),An.is_unity_3d&&Pt.createElement("img",{className:St.sign,src:Fe})),Pt.createElement("div",{className:St.name},Pt.createElement(Jt.Z,{title:ke||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},Pt.createElement("span",{className:St.e},ke||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),Pt.createElement("div",{className:St.tags},Pt.createElement(Jt.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},Pt.createElement("span",null,Pt.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),Pt.createElement("span",null,An.challenges_count))),!!An.myshixuns_count&&Pt.createElement(Jt.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},Pt.createElement("span",null,Pt.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),Pt.createElement("span",null,An.myshixuns_count))),Pt.createElement(Jt.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},Pt.createElement("span",null,Pt.createElement("span",null,An.level))),Pt.createElement("div",{className:St.rate},Pt.createElement(re.Z,{allowHalf:!0,disabled:!0,defaultValue:An.score_info}),Pt.createElement("span",null,"\xA0",An.score_info?`${An.score_info}\u5206`:"5\u5206")))),!vi&&Pt.createElement("div",{className:St.lockWrap},Pt.createElement("img",{src:`${oe.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),Pt.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!Xn.length&&Pt.createElement(rn.Z,null)))},Bn=Mt(5476),an={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"},Zn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXWmQXFd1/s59r3t6nX00o93GluV9AQNxiAkIB0OMISFsFQqSAhOohFR+JKmEQPILClJZfpEfIUAChFQSHIJxnGDiDYwsb8KRLUuWZcmSxqN9pJF6nV7eSZ373u1509Mzvd2eGVt6VV2z9Ht3+9459+yX8Bq4mDmWK2GLqla3MvFWZt4KpjVMSBNzGoQ0M6WJkJbpMiNDxBkwMkyUIUYGxCeJaB8x7fMcZ18yiv1EVHy1Lw+9GicwO8tXlSrlbSB6O4HfANAmZlY250JEHsBHGLQTzA9H3chDfX2012Yfy9HWqwJgZh7NF6vvY/a2gWkbgyeWY3Hq+yDQcRA/RKQeSsSce4jo9EqMo50+Vy3AzNxXKFTv9MAfB/AuZo60M7Fe30tEZQA/UqBvx+POvUQ02+s+O2l/1QGcy5Xe6Cn1SXj8YYAHO5nU8j9DM1D0b8rzvpFMRp9a/v4X73HVAJwplN9GHj7P4NtW0wK1OxYCPcAKX0rHI4+0+2wv7l9xgHPFyrs9j78A5l/sxQRXrE2ix5SiLyZj7v+s2BgArBjA+XzpzR7oq8x880ouQK/7JqKnFfiziUT0iV731aj9ZQeYmYez+fJXiOguZl72/ldkkYmYmb+eSkT+lIjOLOcYlm2BBcx8sfoJz+O/BHhkOSe5evqiaaXoTxIx55tExMsxrmUBOJ/njVVUvgvmW5djUqu+D6JHHbgfTSRostdj7TnAuWLlDq/K37pwqXYxCGlaOfRbyZh7Xy9B7hnAzOzmCpUvA/jDC2WvbReogE3/TTLufo6IKu0+38r9PQE4n+f1VVS+B+ZbWhnEBX8P0Q4H7gcTCZqyvRbWARZHQLlavp8ZG20P9rXcHhEmI07kdtsODasA5/OlX6gy/dfF/bbTV5GmHeL3JBLRxzttof45awCLRYo9vpuZE7YGdyG2Q0R5UvQBWxYwKwBn8pWPEPg7IlhdiKDYnrMIXAz6WDrh/mu3bXcNcEC5P7wIbrdQzH9eQCZF7+2WkrsCWPZcD/TgRbZsF1zTmrBrBX5HN3tyxwD7YTOVRy8KVL0Bd65Vmo667q2dStcdASx6rofyjouqUK/B9dsXFUohcksnenLbAMtemy1UfnrRiLE84NZ6IdqRirtvbdfi1TbA2Xz5r5j5j5Z5ehe705RMf51KRP64ncVoC2BxHLDH9/batlz2gJPnFc7PArNVgvjViABH6Zhm/ZErQoxkH7AmxYhHlsX71s7aWr9XbNek6M52HBQtA6xdflx5pldCVaEMHDuvcK5A8AjI5oB8EShXgEoZKFeBSgVQCohEgKjr/4z3AUP9gCIg7jLWpBn9fa9lsMXa5d7UqquxJYCFYrOFyk964c8V4F44oVCsEs5lgfNZIJcHPMFIk27wU0sbof/V0UcyBgz2AyMDQDQCbBzwXrtAEz2airu/3ErQQEsA5wqVT3qe93WbPKfqAS+eUsiWCWdmgJPTQLVaB2gjw6oB3U9B0azbsGz5XV6KsWFg01pAzGqXjniIua89ilZK3ZWMu99ohklTgP0YqsqLNlnz+SJh7ymF8xkf2JKEkFu+BOx1Y8CGNcBAH2P9gGe5h5VujqZTCfeKZjFeTQHO5EpfA/ApW9N5ZYYweU5h6jhwPlfHcpux5Ha/BxCLAldfBqSijMtHX2sg4x/SyejvLIXNkgAHoa07bEnNe48rnCkQDr8CFBokehh2q1ntIizYsOVG3y/g6AH7dl3gykuAvj4gAkahSihUCCVP9nryJfNgj1dguIrQ5wKJCCMZZaSjjOGEh6jV9LbuSUb2YAW+ZamQ3CUBzubLT9mKW95zTOFkhnDoqC8NL8clL0oqSYgnCSoCVIM92580axAjji+BuyqQ4RgQOq8wUKrK/0jv83Ilo8BQzMO6VBUDseWYQfM+JO46lYi8cbE7FwVYZxxUvf9u3kXzOyZnCIfPKuw/FAhSgcxTz3GbyFQLpOh6Ics877qE9AAQiZEGSyJUI6JGOT5VxlxocEWvdgTcAGQBUtQwWRTDTQTkYhXIlQnZElD2fMBjDmMizdjYX0VkhSlbOepXF/M6LQpwJl/ebiOd5FyR8PxxhQNHgGKP8+9EL04PKU2tAr5LjIQLJB0DJmswDbACpuP41KuBFYDlEwBsKFdz72ClZqvA2SJpI4yALc+PJ6rYPCDSevOXvSd3EG1PJyK/1KjthgBLIhg8frjbwYgq9MRhB5PHgXOZha01k5nq9d4FalEgowk4/UMKTp/fR59iJBX0nqkBo8ASpsGVPdYHVD7yuwY8uLcGcrAyNZCljbopZErAqQKhWPGB3pD2cEl/RUyK3S5d+88renujhLeGI8nmyv9rI8vv+aMKh6cJk8eC8Tbjye1Oi4BEkpDo91lxVDFSjghS/lVjuQZgMXc6DDdgxRrYEAWbl0GDHwC6FMBmuLkycKJAKFUJMQe4YriCwdjy6t6S1ZhKRn6l0TY37386Pxd4st21rr9fWNnTkw72HeyNnit7Z/+YAsn+CUbaBWJ68wzADbFZQ8GaJSuex6INy9ZCVmDvNkBLW2Y/DrPpxdbmTBGYLhCYCBvSVWzury4rNSvgTfX5yQsoOJMr/T2AJXWrVsDfeUThldOEoydbubu9e9wIYWBUFtJnxwPOHPuct28KyHWs1yHWVCsgCgULwAZkDXBA3ealaAdgmYWoXlNZ0vtzfx9wzUhZ97NM19fSyeinw33NA1jKJmTzlePdZtaL40Cod8+BQGq2OLtIFBgcVVrlSTiMtDPXeHgy+ndDgYFkrPfZEBUb9cgA7H8X7M/B3m0o17QXNLvkjGRsx/OkJW+R2q8erWjW3fuLZlIJdyJcTmIewPl85QNV9r7X7UD2nVTYd4wweXTplpoZNuqf7osB6WEFD4xBw5IbdFG/b8rfMlENoKZQn01rISvYg42qNPcSzLFneRH0FWL/razR6QLh7KxvNLl2tLwsUrZD6oOJhHu3Gd88gLP5skRH3tnK4Je6Z/tBBwenGkvOnbYtHqL+Nb5DeFgMFK2wPSNBB9gYdu2zaNZg14QsvZfPl6r1ixH+NFCfms3nfBk4lSdEXcK1Y2X0tTLuZo0u8T0R3ZtKRN67AGApVZQrVI52W81GDANPHnGw64XA5RcaTODsWbSswGJCthguhsYJHjNGWwXXEJ0BSChYfjdsGKzB05Qb/M/swWGVSb8MwbMycNNGeG9uhse5EnC6qLShRUAWga5Xl1T/ScbddabEU42CbbkEX55W2DtFONAg87WZltToBZAFHV4rbBkYiDASLSzOPLYUAtgA6APFvkFD2HQAvBikjSQt1C036BdAKDt4EbSEbQwjIQNIM8BEXz5fJu3Zunqkt7basCuxthbZfOm7zPjNZgNt9v3OSYWXpgjHpxf655sB3Kjt0XEhLyDpMvrrBZVGqmadXlDbPo3QFLJUacOJYuhce+NXDu4z0nRY0hbDiTgu6oWxZmsi30sXIniJk0NUKDGK9Ooiwr+kEtGPhsQGCZEpH7NRQc7sv9PnlgzA0HNrZslKpgnxftKq0FCHZkAjYEl/AkxNWBKngo4aYWxdR7h8Qr5f3AJVKDF2H/FNnZHASSHgmz26FbCkv6kcoQrCVaMVpHsUiCAV+VLJyNoawEHtxz2tDLLZPT894OClI37oTTeXcoHRCaUdBbLvLrH2S3YzT481+CrA84CKJ2oc49feRHA1T176+vlBT8eGxSJ+PJgxc7ZjmRQ9+WiOEHMJ142WemYIibqRqyVYXs8qkyv9HoCvNptgK98/+rKD3S8CxVIrdy9+z8ioguoDBiOMePO1X9hQ6JkwFcuNQkns+UaJSpnx4V8iOC28QY+/6KFSBeIxaJVHuxoDo0k7sz1bIpwrETalq5hI9oxVfzadjP6dD3C+/B9gfn87g1zs3u2HHDz9/CIGjmY8OWhUjBlD4wpR8lWijq6wcyD4XW/ZQTBfqeJHbM5WGB9/W2sA/2yvp6k+0Qckoj6rNlaxdsYoe/8reV/6u3GsBKcdFtBqR0T/kU5EPqABzuZLLzPjklafXeq+n73s4JkXgFIXFDw2IdIMMBbh1vTdRgOqM0roNQwiN8TLpcEtC6dhfPK25gCLivbALtZUm4wDcQFYjCQdbh/ioDg1q3TwwIaUfSomwqFUInqpVOiK5QqVnK16yz854OCFg/LSLBSi6nFopBaJnXlkgtBHjCEb9WVDDgPDmiVao6zBBUR4+sztPsAvHmU89KwvOMn+KuDJfhuLsLZ7y/8kPFc+ArDEZndCwWYdROAShnLjmjKUZSqWetfJuJuk7Cxfx5XyszaoV9rQQtYkMD3TWYsjYwQ3ThgV6u1k7w11G1aRTJy1sEfJnBAOU5DPLOOzd/gA//wA49+3+/ZoAU8C9hIxRqoPSCeAlAG3zwc+2uEebIaYKQPTswqbByoYj9t3L5IbuZ5s2Z/NoB9/WWH/FOHY6QZ6cIM45nAQnbQxsVHpSIzRaGcvSPgpAViANTZvEazEEWDYswB8+QTjnTdKGA7hbJbx7YeBM1mgT8CNCqjsAxuHTpOR/Ve+kxfA2LE7JT6zF8vLcs2wfeOH2KUpVyh/3vP4i90vp9/CnuMKe15pbMlqxqJF700PkdYPJSKjkyvs9dEB8SEjhuy9IgUbAeuWrcC1m+aziVKF8cOngJdPCKA8n3KjQFxYdjRwMYZiuToZqzxzukjIVwnXj5T1S2PzUoq+QNl86dvM+JithjNFwtOTCk8+17zFeqF6fK2CijLWRHyvTzeX5gwBBUs7QrkSzSl6rLDW224A1gws3snOA4xnXvapt541a0NHKOynm3FKQN+JosLGlIeJpKR22LuI8B3K5sr3M/id9pr19+Fn9/sJZK3mFkn/Gy5ROjpj1IJwpfdcAVhin4U1e6ISARMDwLbrhAqbv0FHzzCeeInR5wCpuL/v9sneKy9gyG/czdrJMEVlSrmErcN2UzwI9GPK5MuP2U7mfmZS4YVX/Bjo8LWUGizS85p1hGSdE7+txTP6bqAOCRVrlajqS83XbwbecJnOs2252fwsQ6hZ2pFMRtl/ayG3gamy5cYWufFkUYLwCTeNWbZsEe2gbK70LAPXdTvI8PPTeYKA/OTu4L9GQFzCXzgwAKSGFIYc7spnKtgZdUgAFvelsOZrNwE3X946sOH5VD3Gjn2sbdkxAdmCgBVuX9yJ58oKVw1XkLSY50zAc7IHWzNyhAf96AEH+yehpelWrjVjhGiSMBZlcR51fIUBFoFKqFcMGrddD1w63hnAMpgn93uQUCRRmbQU3aWKFJ5gvgKcLilc2l/FSMye0UOMHZTJlU/bzBw0Az+dIzx3TGHHLn8PbHZt2KSgHMZ4N+qRsVYFrFnSUWXfFYPGO28ELptYCHClyrjnCeCJF32Hxi1XAnfcLFLy/Hu37w0ADqxYhoprHqpmE1zie9HLjxUUxpNVLWzZu2iasvnyLDN3s6yLjuexgw4OHAUOmbjoJUa++RKlY5bFc9TxFQZY2HPZ/+RngXe/Hrh87UKAv79DTJDzA99Fwn7PG+ff+8huD/kS0C/6cNwXtsRUaSNiUnawyRxhKAZcNmBPHyaiUk8Bzs4SnplSePw5P5uwfgsOC12XvE7BdRgjXfDnmr3ZWKvEHBkAfMfrgS3rFgL8Z//M+gUQsIxrUSTmP//Q/Hsf2OXp+/qTvtokurCoSyaeuuOXMnjwlRwhFSVcMWRPktYA94pFmwnvO6EgyWdPPOdLtDUvf92KXHKZ7z3qxLEvL4oSyVli8uTEQckOrPgClrxYuSLjzpsJV6xfCPBf/AvrPVrAMi+gWKw+5/thatf9z3g4XwAGk0DaOBsCn7D2NNZnQrSJ+NG8H30pgpa9S7Po3ghZ4UE+dUjh+DnCzr3zSy6E77lsi9KpJ+0ArM2QoRIe2lsURGr4rkDfW5QtAu97E+HKBgDf97RIyHMAS5ti4br9pvkA3/e0h5k8MBAALGZM0Yd1THUQ01XLoOhAljteJN3ONRbjtbSQ1Qs1qf4NFIqS/fjISWDfoSDZuq6myqVbFGLi/zXSQJ3tPaxpSfvakCFxVAFXEEuV1nsFYDFJGndghZErAO+/hXDVhsZC1oPPAruP+C/LdZuBt1+3UMj6wROM0xnGQMKn4Hk26SDHycRxmQS2dijxaIEQUaQzIWxdWk2ylSbabFCirkim4akZ4NmXfBDCe/DlW5SOvdJOBpNxv0ijJiPfUKuxVA0lgY0jvgAkL4BsCcb+fOm4sNcOSCsYw6GTrL1P2gccfKTfmTxr27b8XwcAhCxcbdhTMCUsOgJcPWSRRRM9JqbKHzH49mYA2fheFuSpIw7OFYCn9wRhPQHKW7YqXdhsIsicr0VfBB2HKdgYMgyI8vKsHwLeek17Viobc2Jm7J1iZIq+AaRmp24zlMcXsoArLAJMoPutOxtaWbTnjymcLRB27YcOr5Vr6xWkY5Q3JedaMKCaMknyjfEQyXeyzwqFFivAnW/ojkJbGfdi92SLjJ0HWbsXta06FAjQChXLnCbzhOE+xusG7TkctLPBtruw1YU6lSHsP62QLQC7DwJrxhWqirFloI5FByjXtuTQPlsTpMrAb79t+anXzFWo+Me7WEd6yN4sTgmTEtMKwBL8d7ygsDZZxXqLhg7tLrTt8G8VYHPfoWmF4znC0TMKmSrwun5PmwH9sjfBj9CebGpVihnSWKlyReBTv9KhA7ndAS9y/z1PeugPoj5MOE+rEZe5ih/ZIUaOIYuJ49rhbztkp5P1kr10+wEXB2cIG/s9DPbNVa+rUYnZi4N4ZpGShTVLPctMAfjM7Z0BfOgE4+cHgfN5YP0ocOtVrbkS6+f5b9s9DKUCCTtg1SbdpdmazJT8tJZrR+xmIOqQHdtBd80ms9j3UtTkP3dHMBpnbOpnQ8C1MoXmOSMxi+QqUq2w+Ewe+My72gf4wV2Me570JV/tpPB8gH7/DmDNYHsS93d/4gNcs3QFOnIrtmrRgUWWuGmNPQm6FnQnC7ccxo5WgL/72QgqHuPGCV4ArBG05Kdmz2UgN+sDfDYL/O672wN4aprxt/fMpaEIECacdt0w8Ad3tgfwPz3kYbQfWk/WwQFBWG0zgEWNFwl6oA/YMmgT4CBsVhY+ky/fDebfaAWEXt7zyAEHR2YUbpjwEHfnDCI1cg4iNLQLMGDPYj48m2kfYKHeR3b7QpGoNgZg8TzJnv4XH5bvWgf5Hx/0MNLvmzLDADdzRuSrUqlH6XoeaxIWPUnhwHebqSvdvABTM8CDByLYMMDYPNA4jNQYLjQQs5J240dBtsuif/A4Y9+UgMFatRGAhTMUSqT39N/eBmwYaR3gbz7oYTQNDKR8Z4REf7TibZJojlmPcMOo9bzhudQVm8ln3QAsz37vWVez5zdvDAEc+tUALM53EbBmAoA//c72WPR9TzFePsma2kR/FR1cABbqPZ8nfPhWYP1wewCPpIHBNgAWs6qwZynWstWigUPWcV7ymd6HLaWPdgvwzikHe04oXD/uYbjBIXnzKLgInAsAvqtNNen+ZxiTp1mrNkJtYkcWwU24grT5628mrG0DYM2iDcChPXgpFi2hOjNlhcstq0cL0kcDQctKAni3AIv/9vu7I7rK683rF7LpBQAXgDMZ4BPvaI+CJc/o2FnW3iHRW8UTJHu7ULAIbe+5mTAx1DoFf+thD8MCcEjIMtV7Gq2JCXqX6gLXj5XbCgRstsYNE8BtlXBo1nkr3+84pPDSGQc3rfMwUkfFJq9XVCRh0YaCP/QWQryFUFjTv0RonJzxU1I0BSs/+kMoeCbruwvHW1SVJL/p7sdYAyxStE5Oa6ImCfWeLYlwVcF4wm7aSsMSDraKsLQCYLN7ciXgnr0RXQfrzZt4XtEWDXCdFC37sGQoXLe5dYr72R4PJ87DZ9GBkGUo+FweeMd1tGRgfHgOzx1mPH+E9f4rAGtX4hIAy94r3iOXCNePlawmni1ahMVn03bKKDUDsJXv/++4g+eOKlw55mHT4NwT2oMU6MEiaIkeLFQsku8Nl0jUhqScNAf68X0eTmXmwm8MixbOIJXof/kawmj/0u3kZhn7p4Bdh31hTbPn4IURgBfLPJR0lUyZsGWwiuG4RdXIP1upcRklWcKVtkuHgfc8xg/3RFGsspaoE0G2gzZ0BA59baoUVSnvmxoF5GyBtIVL9nJxRsglViqxb+uEMskUjPvClXwkPEe8P1pNEs9UYB0TKpb2MtKelA4O0l5M6SVxKMjeLWqWBOJJW8LujbNBUk8bxWsVKuJYIKTlqAGL0Rtm7ZYshGarlGErFNrKPScyhAdecrXA9cYNfhlgk60gYMii66C6or93SuSGRD4KSKUKaVYuFK9LFjoCJOv9Viq362zBIM9Xx2OJqTJg/aYt+SltSx+Vqm9OlMu0pdNLg7YkXlpKOwi7X6x+R1lYc9Yv43PDSFn7j+1eTUoZSme2ipHaGviuowq7TzgYTTJuWucLI8Yebfbi2QBUne8rlBscpCXgGoAFZDE8SByVpj5x64XSQOV7aVf2YT8x3P+ISVTUJ+nLpLqatvTBXAElS1smrSVc+9Ksg6mwU2afNY9YZs26H6X+Ph13PxNe+wWbjK1ywrYAFl/rAy9FcSoHbB5kbBllDZpJKtPpoKGUUJGEBSShNh35EQiopui3T30+0Pr0tKDAmc4hDgQ4kw1hgJW/dX9BrrGpVGteGOEAus0glMcUSgvXddHFSSukzZGXWXTqh9e5pXLCWtiyVBDcFsiywD960UVmlnDNuIe16YCKg2o5RjfWe7MAEQBsYrfmFSM1Vd5DZYRN8W8twAVCnGlT/5T4MX34g++gNtXwxN+rSz0EFfG0V6pW8HRu9lKUVFyCUuXuqhH75Rq0nNFqQXDNpi2V9LcFsLQjqtOPX3Qhhca3jjHWpX1nhA7eC1ixYd36b3koFCigIx39lai5B8Phrvr2IGHcsHbNBYLgwHDYkC6FGDows1Yhvu5QD2nTgCv7vtTFsl2Lo7bG7ZT01yBbOpTDJsiZWeDhgxEtSIlDQth1GBQTqFeLugx1HsSm+1uVsOPQWQ4B7r7TKngpwjU9arFhcxWF5yrBm1LFQQeGLcvzx/KEfIV0wtq1wz0sDE70WDoReUujtV5U0bN5rI5NkCUT75EDEQjYw3HGNeNz0nWAT8jP2KDnYMZm4o1ipswLop9eysgUqsUVbsdUs9NV36OMa0Z7w5bN7Do6VkfvxRYPxrIJsuzJ2w9HcCLrn4N07bicUGazh87bkvpXx3JySAhhPCkCVaV3bNk3bHR2MJZM0fbRdp0vW+Mnxeu055QDqTa1cRDYNMAd17TsdmyyX5+UksEl2eMJW4aqGLPpwG/EjLo92k7vxZYPp+x2Ieufl1NOdr7i4lxRLEuMSwcYo6mFZxzZ7te0J3vtzKwvTMk5iAMxxpXDlR4YMRrOoLvDKX3J0v7xsrYXW3Rl8T7tOen4xUIjrIWwsYSd/N1G4xXVSYA9UyRUPKkeC1w+WMVo74qL1g3D0vGy0upqciUu9XJIwN6+0w4OTit9rI2rWLsb1yQZ6b7OSxKbPkVHlvMLZ2ZJq23i55LDpzcNVrE26fV0r62ft7UDogMq7tkR77apWdqrMuPwjMLhGQdydqI2TijW8dZyVKzYjyWoT2zBi1URFtYrOrcOrq+I98ePwxbmLwYNOdlsfdrDaHx5D7/S62X7iHdf4OKNVa4804t6Hr0A2bQpOvPRjIOTOYWzRd/VOFel3a9ma8yYNcNJrQSir0zJ/RHJXY5D25BFOhYz5cpcNO2Qe1MiQQ1OxVg4ouaO09AzuWLlDvb4XlsHRi/3AklJ4POzCjkpyD0rjgmlvUQV5uBsYXHC+6BHHKF01npsqo+RtFCcrdv5yoHQpOjOZMy9r9W22gJYGs3my3/FzH/UagcX77O3AkT016lE5I/babFtgJnZzRYqP7VdHa+dQV+Q9xLtSMXdtxJRW+kPbQMc7MfrPZR3MGPjBbnYyzxpIkwqRG5JJGiq3a47Alg68YPlK4++2oSudhdo5e+n6ajr3ionqHQylo4B9im59Ase6EFmbhCi3slwLj4TXgEiyivwOxKJ6OOdrkxXAEun4nVij+VQS+sRRp1O6rXwnOy1pOi9yZj7P93Mp2uApfNMvvIRAn/nIsjdQDH3rIDLoI+lE+6/dtuiFYBDlHz3RXbdHSTClknRB7qlXDMKawCbPbnK9F8XBa9OQRYrFb+nmz23vmerABvpulwt339RhWoPZFGFIk7k9k6l5cV6sw6w0ZOrqHzvojGkRZCJdjhwP9iJntush54ALJ2KwJUrVL4M4A9frbbrZovX7fdiWwbwN8m4+7l2LVSt9t0zgM0AxEHhVflbF/flBbvjtHLot9pxHLQK6jxdupOH2n1GuxpR+S6Yb2332dfk/USPOnA/2qrLr5s16DkFm8EJm84Xq5/wPP7LC5eaaVop+pNEzPlmwJ67wa6lZ5cN4BDQw9l8+StEdNeFsjcLmMz89VQi8qdEdKYlZCzdtOwAm3EHIblfZeabLc1lVTYjccsK/NlEIvrESgxwxQAOCWHv9jz+Aph/cSUWoGd9Ej2mFH3RlkWq03GuOMBm4JLwRh4+z+DbOp3ManhOsvxY4UvpeOSR1TGe1TCK0BiC/OS7APoQwKHqHKtsoPOGQzMA/7sCvp5MRp9aTSNdNRRcvyhSTqJQqN7pgT8O4F3MvArC3uZGKdVsAPxIgb4djzv3EtHsagLWjGXVAhxeLCnxlC9W38fsbQPTNgZPrMRiSgU5ED9EpB5KxJx7iKjFkxlXYrR+n68KgOuXJ6ituQ1E2wj8eoA2McuxWPYuqbcM8BEG7QTzw1E38pBtR4C90S7e0qsS4AbsPJYrYYuqVrcy8VZm3gqmcSakiTkFQpqZ0kRIy7PMyBBxBowME2WJkQHxCSLaR0z7PMfZl4xiPxFdXaKvAAAADElEQVQVlwOEXvbx/3Bccpan8cseAAAAAElFTkSuQmCC",_t=Mt(67294),ce=({className:Un,dataSource:Xn=[],col:ai=4,right:Tn,bottom:Di=23,precision:te=0,wrapWidth:le=1200,trackEventItems:ae,loading:Ae,handleVery:Sn=()=>!0})=>{const An=Math.floor((le-(ai-1)*Tn)/ai);return _t.createElement(zt.Z,{spinning:Ae},_t.createElement("div",{className:ue()(an.list,Un)},!!Xn.length&&Xn.map((En,ke)=>{const{subject_identifier:cn,id:_n,identifier:vi,power:mn}=En,Oe=En.is_public!=0&&En.is_public;return _t.createElement("div",{className:an.wrap,key:_n,style:{width:An,marginRight:(1+ke)%ai===0?0:Tn+te,marginBottom:Di}},_t.createElement("a",{className:an.li,onClick:ni=>{ni.preventDefault(),Sn(En==null?void 0:En.first_category_url)&&(ae&&(0,$t.L9)([ae]),(0,$t.xg)(En.first_category_url))}},_t.createElement("div",{className:an.top},_t.createElement(Jt.Z,{title:En.name},_t.createElement("div",{className:an.name},En.name)),_t.createElement("img",{className:an.img,src:oe.Z.IMG_SERVER+"/images/"+En.avatar_url}),_t.createElement("div",{className:an.text,title:En.creator},En.creator),cn&&_t.createElement("div",{className:an.btns},_t.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),_t.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),Oe&&_t.createElement("div",{className:an.sign},"\u516C\u5F00")),_t.createElement("div",{className:an.bottom},En.visits>0&&_t.createElement(Jt.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},_t.createElement("span",null,_t.createElement("i",{className:"iconfont icon-liulanyan"}),_t.createElement("span",null,En.visits))),En.course_members_count>0&&_t.createElement(Jt.Z,{title:"\u6210\u5458",placement:"bottom"},_t.createElement("span",null,_t.createElement("i",{className:"iconfont icon-chengyuan"}),En.course_members_count)),En.tasks_count>0&&_t.createElement(Jt.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},_t.createElement("span",null,_t.createElement("i",{className:"iconfont icon-zuoye"}),En.tasks_count)),En.is_end?_t.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):_t.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!En.is_accessible&&_t.createElement("div",{className:an.lockWrap},_t.createElement("img",{src:`${oe.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),_t.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!Xn.length&&_t.createElement(rn.Z,null)))},_e={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"},Ye=Mt(35973),on=({dataSource:Un=[],value:Xn,onChange:ai,className:Tn,style:Di={},tabBarExtraContent:te})=>Pt.createElement("div",{className:ue()(_e.tabs,Tn),style:Di},Pt.createElement("div",{className:_e.tabsWrap},Un.map((le,ae)=>!(le!=null&&le.hide)&&Pt.createElement("aside",{className:_e.tab,onClick:()=>{ai(le.id),le.link&&Ye.history.push(le.link)},key:ae},Pt.createElement("div",{className:Xn===le.id?_e.active:""},le.name),(le==null?void 0:le.resetCount)==null&&(le==null?void 0:le.total)!==void 0&&Pt.createElement("span",null,"\uFF08",le==null?void 0:le.total,"\uFF09"),(le==null?void 0:le.resetCount)!==void 0&&(le==null?void 0:le.total)!==void 0&&Pt.createElement(Jt.Z,{title:(le==null?void 0:le.tip)!=null?le==null?void 0:le.tip:""},Pt.createElement("span",{style:{color:"#9096A3"}},"\uFF08",Pt.createElement("span",{style:{color:"#000"}},le==null?void 0:le.resetCount),"/",Pt.createElement("span",null,le==null?void 0:le.total),"\uFF09"))))),Pt.createElement("div",{className:_e.tabBar},te)),Cn=({className:Un,style:Xn={},children:ai})=>Pt.createElement("div",{className:ue()(Un),style:Xn},ai),Ie={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=Mt(85418),ze=Mt(50136);const je=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var Ot=({sortValue:Un,dropValue:Xn,className:ai,onSort:Tn,onDrop:Di,dataSource:te=je})=>{var le;return Pt.createElement("div",{className:ue()(Ie.orderWrap,ai)},Pt.createElement(ve.Z,{dropdownRender:()=>Pt.createElement(ze.default,null,te.map((ae,Ae)=>Pt.createElement(ze.default.Item,{key:Ae,onClick:()=>Di(ae.id)},ae.name)))},Pt.createElement("span",{className:Ie.orderTextWrap},(le=te.find(ae=>Xn===ae.id))==null?void 0:le.name)),Pt.createElement("span",{className:Ie.orderIconWrap},Pt.createElement("span",{className:Ie.orderAsc},Pt.createElement("i",{className:Un==="asc"?`iconfont icon-sanjiaoxing-up font12 ${Ie.cursorPointer} ${Ie.active}`:`iconfont icon-sanjiaoxing-up font12 ${Ie.cursorPointer}`,onClick:()=>Tn(Un==="asc"?"desc":"asc")})),Pt.createElement("span",{className:Ie.orderDesc},Pt.createElement("i",{className:Un==="desc"?`iconfont icon-sanjiaoxing-down font12 ${Ie.cursorPointer} ${Ie.active}`:`iconfont icon-sanjiaoxing-down font12 ${Ie.cursorPointer}`,onClick:()=>Tn(Un==="asc"?"desc":"asc")}))))},Lt={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"},wt=Mt(85804),Ft=Object.defineProperty,Wt=Object.getOwnPropertySymbols,kt=Object.prototype.hasOwnProperty,Xt=Object.prototype.propertyIsEnumerable,$e=(Un,Xn,ai)=>Xn in Un?Ft(Un,Xn,{enumerable:!0,configurable:!0,writable:!0,value:ai}):Un[Xn]=ai,Je=(Un,Xn)=>{for(var ai in Xn||(Xn={}))kt.call(Xn,ai)&&$e(Un,ai,Xn[ai]);if(Wt)for(var ai of Wt(Xn))Xt.call(Xn,ai)&&$e(Un,ai,Xn[ai]);return Un},fn=(Un,Xn)=>{var ai={};for(var Tn in Un)kt.call(Un,Tn)&&Xn.indexOf(Tn)<0&&(ai[Tn]=Un[Tn]);if(Un!=null&&Wt)for(var Tn of Wt(Un))Xn.indexOf(Tn)<0&&Xt.call(Un,Tn)&&(ai[Tn]=Un[Tn]);return ai},Ve=(Un,Xn,ai)=>new Promise((Tn,Di)=>{var te=Ae=>{try{ae(ai.next(Ae))}catch(Sn){Di(Sn)}},le=Ae=>{try{ae(ai.throw(Ae))}catch(Sn){Di(Sn)}},ae=Ae=>Ae.done?Tn(Ae.value):Promise.resolve(Ae.value).then(te,le);ae((ai=ai.apply(Un,Xn)).next())}),Ue=Un=>{var Xn=Un,{className:ai,style:Tn,children:Di,loading:te=!1,openLoading:le,onClick:ae=()=>{},size:Ae="middle",shape:Sn="round"}=Xn,An=fn(Xn,["className","style","children","loading","openLoading","onClick","size","shape"]);const[En,ke]=(0,Pt.useState)(!1);return Pt.createElement(wt.ZP,Je({onClick:(0,se.throttle)(cn=>Ve(void 0,null,function*(){le&&ke(!0);try{yield ae(cn)}catch(_n){console.log("error",_n)}le&&ke(!1)}),2e3,{leading:!0,trailing:!1}),className:ue()(Lt.btn,Lt[`${Ae}-${Sn}`],ai),style:Tn,size:Ae,shape:Sn,loading:En||te},An),Di)},ti={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"},Hn=({className:Un,style:Xn,children:ai=null,onClick:Tn,title:Di})=>Pt.createElement("div",{className:ue()(ti.head,Un),style:Xn},Pt.createElement("span",{className:"primary-hover",onClick:Tn},Pt.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),Pt.createElement("b",{title:Di},Di),Pt.createElement("div",{className:ti.node},ai)),pn={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"},Mi=({confirmShow:Un=!0,confirmTitle:Xn,confirmClick:ai,cancelShow:Tn=!0,cancelTitle:Di,cancelClick:te,className:le,style:ae,confirmLoading:Ae=!1})=>Pt.createElement("div",{className:ue()(pn.btns,le),style:ae},Un&&Pt.createElement(wt.ZP,{loading:Ae,onClick:ai,type:"primary",className:pn.confirm},Xn),Tn&&Pt.createElement(wt.ZP,{onClick:te,className:pn.cancel},Di)),In={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"},Ki=({className:Un,style:Xn={},LeftContent:ai,children:Tn,RightContent:Di})=>Pt.createElement("div",{className:ue()(In.fixedBottom,Un),style:Xn},Pt.createElement("div",{className:In.wrap},Pt.createElement("div",{className:In.left},ai),Pt.createElement("div",{className:In.center},Tn),Pt.createElement("div",{className:In.right},Di))),hi={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"},pr=({className:Un,style:Xn={},dataSource:ai=[]})=>Pt.createElement("div",{className:ue()(hi.crumbs,Un),style:Xn},ai.map((Tn,Di)=>DiYe.history.push(Tn.path)},Tn.name):Pt.createElement("span",null,Tn.name),Pt.createElement("span",null,"\xA0",">","\xA0")):Pt.createElement("span",{key:Di,style:{color:"#5F6368"}},Tn.name))),rr=Mt(55054),ki=Object.defineProperty,sr=Object.defineProperties,Ur=Object.getOwnPropertyDescriptors,Jo=Object.getOwnPropertySymbols,Rr=Object.prototype.hasOwnProperty,To=Object.prototype.propertyIsEnumerable,pa=(Un,Xn,ai)=>Xn in Un?ki(Un,Xn,{enumerable:!0,configurable:!0,writable:!0,value:ai}):Un[Xn]=ai,co=(Un,Xn)=>{for(var ai in Xn||(Xn={}))Rr.call(Xn,ai)&&pa(Un,ai,Xn[ai]);if(Jo)for(var ai of Jo(Xn))To.call(Xn,ai)&&pa(Un,ai,Xn[ai]);return Un},Xi=(Un,Xn)=>sr(Un,Ur(Xn)),bn=(Un,Xn)=>{var ai={};for(var Tn in Un)Rr.call(Un,Tn)&&Xn.indexOf(Tn)<0&&(ai[Tn]=Un[Tn]);if(Un!=null&&Jo)for(var Tn of Jo(Un))Xn.indexOf(Tn)<0&&To.call(Un,Tn)&&(ai[Tn]=Un[Tn]);return ai};const{Countdown:bt}=rr.default;var Fn=Un=>{var Xn=Un,{onChange:ai}=Xn,Tn=bn(Xn,["onChange"]);const[Di,te]=(0,Pt.useState)(null);(0,Pt.useEffect)(()=>{typeof Di=="number"&&Di>=0&&ai(Di)},[Di]);const le=ae=>{const Ae=Math.floor(ae/1e3);te(Ae)};return Pt.createElement(bt,Xi(co({},Tn),{onChange:le}))}},99914:function(un,Nn,Mt){"use strict";Mt.d(Nn,{Z:function(){return ne}});var Pt=Mt(67294);function ne(Ne,Be){const Pe=(0,Pt.useRef)();(0,Pt.useEffect)(()=>{Pe.current=Ne}),(0,Pt.useEffect)(()=>{function Bt(){Pe.current()}if(Be!==null){let Ut=setInterval(Bt,Be);return()=>clearInterval(Ut)}},[Be])}},75319:function(un,Nn,Mt){"use strict";Mt.d(Nn,{Z:function(){return Zn}});var Pt=Mt(67294),ne=Mt(35973),Ne=Mt(69234),Be=Mt(28802),Pe=Mt(91773),Bt=Mt(2453),Ut=Mt(62844),ue=Mt(84567),se=Mt(83062),Se=Mt(37720),Xe=Mt(98813),pe=Mt(78957),Ht=Mt(71230),Dt=Mt(88044),nt=Mt(59637),et=Mt(96670),ht=Mt(30001),lt={wrap:"wrap___BgpUe",row:"row___UWxAG",textarea:"textarea___gaLin",btn:"btn___ZpuhS",sub:"sub___Jd_ZS"},gt=Mt(36295),mt=Mt(33170),xt=Mt(52262),St=Mt(67294),zt=Object.defineProperty,Jt=Object.defineProperties,re=Object.getOwnPropertyDescriptors,oe=Object.getOwnPropertySymbols,$t=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,de=(_t,Tt,ce)=>Tt in _t?zt(_t,Tt,{enumerable:!0,configurable:!0,writable:!0,value:ce}):_t[Tt]=ce,Fe=(_t,Tt)=>{for(var ce in Tt||(Tt={}))$t.call(Tt,ce)&&de(_t,ce,Tt[ce]);if(oe)for(var ce of oe(Tt))Le.call(Tt,ce)&&de(_t,ce,Tt[ce]);return _t},rn=(_t,Tt)=>Jt(_t,re(Tt)),De=(_t,Tt,ce)=>new Promise((_e,Ye)=>{var xe=Cn=>{try{tn(ce.next(Cn))}catch(Ie){Ye(Ie)}},on=Cn=>{try{tn(ce.throw(Cn))}catch(Ie){Ye(Ie)}},tn=Cn=>Cn.done?_e(Cn.value):Promise.resolve(Cn.value).then(xe,on);tn((ce=ce.apply(_t,Tt)).next())});const{Panel:jn}=Ne.default,{TextArea:Bn}=Be.default;var Zn=({active:_t,type:Tt="jupyter"})=>{var ce,_e;const Ye=(0,ne.useParams)(),[xe]=Pe.default.useForm(),[on,tn]=(0,Pt.useState)({}),[Cn,Ie]=(0,Pt.useState)(!1),[ve,ze]=(0,Pt.useState)(0),[je,He]=(0,Pt.useState)([]),[Ot,Lt]=(0,Pt.useState)([]),[wt,Ft]=(0,Pt.useState)([]),Wt=(_e=(ce=(0,xt.eY)())==null?void 0:ce.shixun)==null?void 0:_e.editable;(0,Pt.useEffect)(()=>{_t==="testCase"&&kt()},[_t]),(0,Pt.useEffect)(()=>{Xt()},[]);const kt=()=>De(void 0,null,function*(){var Hn,pn,gi,Mi,In,ei,Ki,hi,$i,pr,rr,ki,sr,Ur;const Jo=[{hidden:0,input:"",output:"",score:100}],Rr=yield(0,mt.ZP)(`/api/shixuns/${Ye==null?void 0:Ye.id}/jupyter_evalute_setting.json`,{method:"get"});if((Rr==null?void 0:Rr.status)===0){Ft((Hn=Rr==null?void 0:Rr.data)==null?void 0:Hn.standard_scripts);const To={open_evaluate:(pn=Rr==null?void 0:Rr.data)==null?void 0:pn.open_evaluate,exec_time:((gi=Rr==null?void 0:Rr.data)==null?void 0:gi.exec_time)||3,test_set_score:((Mi=Rr==null?void 0:Rr.data)==null?void 0:Mi.test_set_score)===null?!1:(In=Rr==null?void 0:Rr.data)==null?void 0:In.test_set_score,test_set_average:((ei=Rr==null?void 0:Rr.data)==null?void 0:ei.test_set_average)===null?!0:(Ki=Rr==null?void 0:Rr.data)==null?void 0:Ki.test_set_average,choice_standard_scripts:((hi=Rr==null?void 0:Rr.data)==null?void 0:hi.choice_standard_scripts)||null,evaluate_script:(($i=Rr==null?void 0:Rr.data)==null?void 0:$i.evaluate_script)||"",evaluate_method:(pr=Rr==null?void 0:Rr.data)==null?void 0:pr.evaluate_method,use_jupyter_result:(rr=Rr==null?void 0:Rr.data)==null?void 0:rr.use_jupyter_result};xe.setFieldsValue(To),tn(To),He((sr=(ki=Rr==null?void 0:Rr.data)==null?void 0:ki.test_sets)!=null&&sr.length?(Ur=Rr==null?void 0:Rr.data)==null?void 0:Ur.test_sets:Jo)}}),Xt=()=>De(void 0,null,function*(){var Hn;const pn=yield(0,mt.ZP)(`/api/shixuns/${Ye==null?void 0:Ye.id}/get_jupyter_tags.json`,{method:"get"});(pn==null?void 0:pn.status)===0&&Lt(((Hn=pn==null?void 0:pn.data)==null?void 0:Hn.list)||[])}),$e=Hn=>De(void 0,null,function*(){const gi=je.map(In=>In.score).reduce((In,ei)=>In+ei,0);if(Hn.test_set_score&&gi!==100){Bt.ZP.warning("\u6D4B\u8BD5\u7528\u4F8B\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100");return}if(Hn.evaluate_method===3&&(je!=null&&je.some(In=>!In.tags))){Bt.ZP.warning("\u8BF7\u9009\u62E9\u6307\u5B9A\u4EE3\u7801\u5757");return}Ie(!0),(yield(0,mt.ZP)(`/api/shixuns/${Ye==null?void 0:Ye.id}/update_jupyter_evaluate_setting.json`,{method:"post",body:rn(Fe({},Hn),{mirror_script_id:Hn==null?void 0:Hn.choice_standard_scripts,open_evaluate:Hn!=null&&Hn.open_evaluate?1:0,test_set:je.map(In=>rn(Fe({},In),{is_file:!1}))})})).status===0&&Bt.ZP.success("\u4FDD\u5B58\u6210\u529F"),Ie(!1)}),Je=Hn=>{tn(Fe({},xe.getFieldsValue())),"test_set_average"in Hn&&(Hn!=null&&Hn.test_set_average)&&fn(je),"test_set_score"in Hn&&(Hn!=null&&Hn.test_set_score)&&(xe.setFieldsValue({test_set_average:!0}),tn(rn(Fe({},xe.getFieldsValue()),{test_set_average:!0})),fn(je)),"choice_standard_scripts"in Hn&&Ut.default.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:St.createElement("div",{className:"tc font16"},"\u539F\u6709\u811A\u672C\u5C06\u88AB\u65B0\u7684\u811A\u672C\u8986\u76D6\uFF0C\u65E0\u6CD5\u64A4\u9500",St.createElement("br",null),"\u662F\u5426\u786E\u8BA4\u6267\u884C\u8986\u76D6\u64CD\u4F5C"),onOk:()=>De(void 0,null,function*(){const pn=yield(0,mt.ZP)(`/api/shixuns/${Ye==null?void 0:Ye.id}/get_script_contents.json`,{method:"get",params:{id:Ye==null?void 0:Ye.id,script_id:Hn==null?void 0:Hn.choice_standard_scripts}});pn!=null&&pn.content&&(Ut.default.info({centered:!0,title:"\u63D0\u793A",okText:"\u77E5\u9053\u5566",content:St.createElement("div",{className:"tc font16"},"\u8BC4\u6D4B\u811A\u672C\u751F\u6210\u6210\u529F\uFF01")}),xe.setFieldsValue({evaluate_script:pn==null?void 0:pn.content}),tn(rn(Fe({},xe.getFieldsValue()),{evaluate_script:pn==null?void 0:pn.content})))})})},fn=Hn=>{let pn=0;const gi=Math.floor((100-pn)/Hn.length),Mi=gi+(100-pn)%Hn.length;Hn=Hn.map((In,ei)=>ei===Hn.length-1?rn(Fe({},In),{score:Mi}):rn(Fe({},In),{score:gi})),He(Hn)},Ve=()=>{const Hn=[...je,{hidden:0,input:"",output:"",score:0}];xe.getFieldValue("test_set_average")?fn(Hn):He(Hn)},{test_set_score:Mn,test_set_average:Ue,choice_standard_scripts:ti,open_evaluate:Qn}=on;return St.createElement("section",{className:lt.wrap},St.createElement(Pe.default,{form:xe,disabled:!Qn,layout:"vertical",onValuesChange:Je,onFinish:$e},St.createElement(Pe.default.Item,{name:"open_evaluate",style:{marginTop:10},valuePropName:"checked"},St.createElement(ue.default,{disabled:!1},"\u542F\u7528Jupyter\u8BC4\u6D4B\u529F\u80FD")),St.createElement("h4",{className:"font14"},"\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"),St.createElement(se.Z,{title:!Qn&&"\u8BF7\u542F\u7528Jupyter\u8BC4\u6D4B\u529F\u80FD\u540E\uFF0C\u8FDB\u884C\u7F16\u8F91",placement:"topLeft"},St.createElement(Pe.default.Item,{label:"\u8BC4\u6D4B\u65F6\u957F\uFF08\u79D2\uFF09\uFF1A",name:"exec_time",className:lt.row,rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"},{type:"number",min:3,message:"\u6700\u5C0F\u9650\u5236\u65F6\u95F4\u662F3\u79D2"}]},St.createElement(Se.Z,{size:"large",style:{width:400},min:3}))),St.createElement("h4",{className:"font14 mb10"},"\u7CFB\u7EDF\u8BC4\u5206\u89C4\u5219"),St.createElement(se.Z,{title:!Qn&&"\u8BF7\u542F\u7528Jupyter\u8BC4\u6D4B\u529F\u80FD\u540E\uFF0C\u8FDB\u884C\u7F16\u8F91",placement:"topLeft"},St.createElement(Pe.default.Item,{name:"test_set_score"},St.createElement(Xe.ZP.Group,null,St.createElement(pe.Z,{direction:"vertical"},St.createElement(Xe.ZP,{value:!1},"\u901A\u8FC7\u5168\u90E8\u6D4B\u8BD5\u96C6",St.createElement("span",{className:"c-grey-999"}," \uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u4EC5\u5F53\u6240\u6709\u6D4B\u8BD5\u96C6\u90FD\u6B63\u786E\u65F6\uFF0C\u624D\u83B7\u5F97\u4E00\u6B21\u6027\u5956\u52B1\uFF09")),St.createElement(Xe.ZP,{value:!0},"\u901A\u8FC7\u90E8\u5206\u6D4B\u8BD5\u96C6",St.createElement("span",{className:"c-grey-999"}," \uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u901A\u8FC7\u6D4B\u8BD5\u96C6\u5373\u53EF\u83B7\u5F97\u5BF9\u5E94\u5956\u52B1\uFF09")))))),St.createElement(Pe.default.Item,{label:St.createElement("span",{style:{fontWeight:500},className:"c-black"},"\u8BC4\u6D4B\u8BBE\u7F6E"),name:"evaluate_method",style:{flexDirection:"row",marginTop:15},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BC4\u6D4B\u8BBE\u7F6E"}]},St.createElement(Xe.ZP.Group,null,St.createElement(pe.Z,{direction:"vertical"},St.createElement(Xe.ZP,{value:1},"\u901A\u8FC7\u6240\u6709\u4EE3\u7801\u5757\u8BC4\u6D4B",St.createElement("span",{className:"c-grey-999"}," \uFF08\u5BF9\u5B66\u5458\u4EFB\u52A1\u6587\u4EF6\u7684\u6240\u6709\u975E\u7A7A\u4EE3\u7801\u5757\u8FDB\u884C\u8BC4\u6D4B\uFF09")),St.createElement(Xe.ZP,{value:3},"\u901A\u8FC7\u6307\u5B9A\u4EE3\u7801\u5757\u8BC4\u6D4B",St.createElement("span",{className:"c-grey-999"}," \uFF08\u5BF9\u5B66\u5458\u4EFB\u52A1\u6587\u4EF6\u7684\u6307\u5B9A\u975E\u7A7A\u4EE3\u7801\u5757\u8FDB\u884C\u8BC4\u6D4B\uFF09"))))),St.createElement(Ht.Z,{align:"middle",justify:"space-between",className:"font14"},St.createElement("div",{style:{fontWeight:500}},St.createElement("span",{className:lt.sub},"*"),"\u6D4B\u8BD5\u7528\u4F8B"),St.createElement(se.Z,{title:!Qn&&"\u8BF7\u542F\u7528Jupyter\u8BC4\u6D4B\u529F\u80FD\u540E\uFF0C\u8FDB\u884C\u7F16\u8F91",placement:"topLeft"},St.createElement(ht.op,{style:{borderRadius:2},onClick:Ve},"\u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B"))),Mn&&St.createElement(Pe.default.Item,{name:"test_set_average"},St.createElement(Xe.ZP.Group,null,St.createElement(Xe.ZP,{value:!0},"\u5747\u5206\u6BD4\u4F8B"),St.createElement(Xe.ZP,{value:!1,style:{marginLeft:50}},"\u81EA\u5B9A\u4E49\u6BD4\u4F8B"))),St.createElement(se.Z,{title:!Qn&&"\u8BF7\u542F\u7528Jupyter\u8BC4\u6D4B\u529F\u80FD\u540E\uFF0C\u8FDB\u884C\u7F16\u8F91",placement:"topLeft"},St.createElement("div",null,je.map((Hn,pn)=>St.createElement(Ne.default,{activeKey:ve,key:pn,onChange:()=>{ze(gi=>gi===pn?null:pn)}},St.createElement(jn,{header:St.createElement("div",{className:"font16"},St.createElement("span",{className:"mr10"},"\u6D4B\u8BD5\u7528\u4F8B",pn+1),on.test_set_score&&St.createElement("span",{style:{marginLeft:40}},St.createElement(Se.Z,{style:{width:120},value:Hn.score,onClick:gi=>gi.stopPropagation(),min:0,max:100,precision:0,onBlur:gi=>{if(Number(gi)<0||Number(gi)>100){Bt.ZP.info("\u6D4B\u8BD5\u7528\u4F8B\u7684\u6743\u91CD\u6BD4\u4F8B\u503C\u9650\u5236\u4E3A 0-100");const Mi=je.map((ei,Ki)=>Ki===pn?rn(Fe({},ei),{score:100}):ei),In={test_set_average:!1};tn(Fe(Fe({},on),In)),xe.setFieldsValue(In),He(Mi)}},disabled:Ue,onChange:gi=>{const Mi=je.map((ei,Ki)=>Ki===pn?rn(Fe({},ei),{score:gi?Number(gi):0}):ei),In={test_set_average:!1};tn(Fe(Fe({},on),In)),xe.setFieldsValue(In),He(Mi)}}),St.createElement("span",{className:"ml10 mr10"},"%")),St.createElement("span",{className:"tr flex1",style:{float:"right"}},pn!==0&&St.createElement(se.Z,{placement:"bottom",title:"\u5220\u9664"},St.createElement("span",{style:{color:"#c5c5c5"},className:"current iconfont icon-shanchu4",onClick:gi=>{gi.stopPropagation(),Ut.default.confirm({centered:!0,icon:null,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u6D4B\u8BD5\u7528\u4F8B\u5417\uFF1F",onOk:()=>{const Mi=je.filter((In,ei)=>ei!==pn);fn(Mi)}})}})))),key:pn},St.createElement("div",null,on.evaluate_method===3&&St.createElement(Ht.Z,{align:"middle",className:"mb20"},St.createElement("div",null,St.createElement("span",{className:lt.sub},"*"),St.createElement("span",null,"\u6307\u5B9A\u4EE3\u7801\u5757"),St.createElement(se.Z,{title:"\u8BF7\u5148\u5728Jupyter\u4E2D\u5BF9\u60A8\u9700\u8981\u8BC4\u6D4B\u7684\u6307\u5B9A\u4EE3\u7801\u5757\u5B8C\u6210\u6807\u7B7E\u8BBE\u7F6E\u3002"},St.createElement("i",{style:{marginLeft:6,marginRight:20,color:"#145DFF"},className:"iconfont icon-xiaowenhao2 font14"}))),St.createElement(Dt.default,{value:Hn.tags,size:"large",style:{width:450},onChange:gi=>{const Mi=je.map((In,ei)=>ei===pn?rn(Fe({},In),{tags:gi}):In);He(Mi)}},Ot==null?void 0:Ot.map(gi=>St.createElement(Dt.default.Option,{value:gi==null?void 0:gi.tags,key:gi==null?void 0:gi.tags},gi==null?void 0:gi.tags)))),St.createElement(Ht.Z,{align:"middle"},St.createElement("div",null," ",St.createElement("span",null,"\u9884\u671F\u8F93\u51FA")),St.createElement(Bn,{bordered:!1,className:lt.textarea,rows:5,placeholder:"\u9884\u671F\u8F93\u51FA",value:Hn.output,onChange:gi=>{const Mi=je.map((In,ei)=>ei===pn?rn(Fe({},In),{output:gi.target.value}):In);He(Mi)}})),St.createElement(Ht.Z,{className:"mt20",align:"middle"},St.createElement("div",null,St.createElement("span",null,"\u53EF\u89C1\u6027"),St.createElement(se.Z,{title:St.createElement("div",null,St.createElement("div",null,'\u5168\u90E8\u9690\u85CF\uFF1A\u9690\u85CF\u6D4B\u8BD5\u96C6\u53EF\u4EE5\u9632\u6B62\u5B66\u751F\u901A\u8FC7"print"\u7B49\u624B\u6BB5\u76F4\u63A5\u901A\u5173'),St.createElement("div",null,"\u9690\u85CF\u9884\u671F\u8F93\u51FA\uFF1A\u52FE\u9009\u540E\u9884\u671F\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"),St.createElement("div",null,"\u9690\u85CF\u5B9E\u9645\u8F93\u51FA\uFF1A\u52FE\u9009\u540E\u5B9E\u9645\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"))},St.createElement("i",{style:{marginLeft:6,marginRight:13,color:"#145DFF"},className:"iconfont icon-xiaowenhao2 font14"}))),St.createElement("div",null,St.createElement(ue.default,{className:"font14 ml5",checked:Hn.hidden===1,onChange:gi=>{const Mi=je.map((In,ei)=>{if(ei===pn){let Ki={is_invisible:!1,actual_output_visible:!1};return gi.target.checked&&(Ki={is_invisible:!0,actual_output_visible:!0}),rn(Fe(Fe({},In),Ki),{hidden:gi.target.checked?1:0})}return In});He(Mi)}},"\u5168\u90E8\u9690\u85CF")),St.createElement(ue.default,{checked:Hn.is_invisible,style:{margin:"0 60px"},onChange:gi=>{const Mi=je.map((In,ei)=>{if(ei===pn){let Ki=0;return gi.target.checked&&In.actual_output_visible&&(Ki=1),rn(Fe({},In),{hidden:Ki,is_invisible:gi.target.checked})}return In});He(Mi)}},"\u9690\u85CF\u9884\u671F\u8F93\u51FA"),St.createElement(ue.default,{checked:Hn.actual_output_visible,onChange:gi=>{const Mi=je.map((In,ei)=>{if(ei===pn){let Ki=0;return gi.target.checked&&In.is_invisible&&(Ki=1),rn(Fe({},In),{hidden:Ki,actual_output_visible:gi.target.checked})}return In});He(Mi)}},"\u9690\u85CF\u5B9E\u9645\u8F93\u51FA")),St.createElement("div",{className:"mt20"},St.createElement("span",{className:"font14 mr20"},"\u7279\u6B8A\u5224\u5B9A:"),St.createElement(ue.default,{checked:Hn.last_match_rule,onChange:gi=>{const Mi=je.map((In,ei)=>ei===pn?rn(Fe({},In),{last_match_rule:gi.target.checked}):In);He(Mi)}},St.createElement("span",{className:"font14"},"\u672B\u5C3E\u5339\u914D",St.createElement("span",{className:"font12 c-light-black"},"\uFF08\u5B9E\u9645\u8F93\u51FA\u4E0E\u9884\u671F\u8F93\u51FA\u6700\u540E\u4E00\u884C\u76F8\u540C\u5373\u53EF\u901A\u5173\uFF09")))))))))),St.createElement("h4",{className:"font14 mt20 mb10"},St.createElement("span",{className:lt.sub},"*"),"\u8BC4\u6D4B\u811A\u672C"),St.createElement(se.Z,{title:!Qn&&"\u8BF7\u542F\u7528Jupyter\u8BC4\u6D4B\u529F\u80FD\u540E\uFF0C\u8FDB\u884C\u7F16\u8F91",placement:"topLeft"},St.createElement(Pe.default.Item,{name:"choice_standard_scripts",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BC4\u6D4B\u811A\u672C"}]},St.createElement(Dt.default,{getPopupContainer:Hn=>Hn.parentNode,size:"large",style:{width:400},placeholder:"\u8BF7\u9009\u62E9\u8BC4\u6D4B\u811A\u672C"},wt.map((Hn,pn)=>St.createElement(Dt.default.Option,{value:Hn.id,key:pn},Hn.scptname))))),St.createElement(se.Z,{title:!Qn&&"\u8BF7\u542F\u7528Jupyter\u8BC4\u6D4B\u529F\u80FD\u540E\uFF0C\u8FDB\u884C\u7F16\u8F91",placement:"topLeft"},St.createElement(Pe.default.Item,{name:"evaluate_script"},St.createElement(gt.ZP,{height:450,style:{border:"1px solid #ccc"},language:"shell",theme:"vs-light",options:{readOnly:!Qn}}))),(0,xt.Ny)()&&St.createElement(Ht.Z,{className:"mb20",align:"middle"},St.createElement(Pe.default.Item,{name:"use_jupyter_result",className:"mt10",valuePropName:"checked",noStyle:!0},St.createElement(nt.Z,null)),St.createElement("div",{className:"ml10"},"\u662F\u5426\u6CBF\u7528Jupyter\u8FD0\u884C\u7ED3\u679C"))),St.createElement(et.t,{okText:"\u4FDD\u5B58",hasOkBtn:Wt,loading:Cn,onCancel:()=>ne.history.push(`/shixuns/${Ye==null?void 0:Ye.id}/challenges`),onOk:()=>xe.submit(),className:Tt==="jupyterLab"?lt.btn:""}))}},99456:function(un,Nn,Mt){"use strict";Mt.d(Nn,{Z:function(){return re}});var Pt=Mt(67294),ne=Mt(62844),Ne=Mt(85804),Be=Mt(2453),Pe=Mt(55238),Bt=Mt(74330),Ut=Mt(56672),ue=Mt(37720),se={modal:"modal___NEEbt",con_warp:"con_warp___fZ8It",flex:"flex___Vqd1D",config_Warp:"config_Warp___m6wfT",config_btn:"config_btn___OL6qH",sceneList:"sceneList___SKegj",sceneItem:"sceneItem___RPw0S",sceneItemActive:"sceneItemActive___O_xTR"},Se=Mt(37388),Xe=Mt(38308),pe=Mt(33170),Ht=Mt(67294),Dt=Object.defineProperty,nt=Object.defineProperties,et=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable,mt=(oe,$t,Le)=>$t in oe?Dt(oe,$t,{enumerable:!0,configurable:!0,writable:!0,value:Le}):oe[$t]=Le,xt=(oe,$t)=>{for(var Le in $t||($t={}))lt.call($t,Le)&&mt(oe,Le,$t[Le]);if(ht)for(var Le of ht($t))gt.call($t,Le)&&mt(oe,Le,$t[Le]);return oe},St=(oe,$t)=>nt(oe,et($t)),zt=(oe,$t,Le)=>new Promise((de,Fe)=>{var rn=Bn=>{try{jn(Le.next(Bn))}catch(an){Fe(an)}},De=Bn=>{try{jn(Le.throw(Bn))}catch(an){Fe(an)}},jn=Bn=>Bn.done?de(Bn.value):Promise.resolve(Bn.value).then(rn,De);jn((Le=Le.apply(oe,$t)).next())}),re=({visible:oe,onOk:$t,onCancel:Le,info:de})=>{const[Fe,rn]=(0,Pt.useState)("1"),[De,jn]=(0,Pt.useState)([{name:"gpu_limit",label:"GPU\u663E\u5361\u6570\u91CF",value:1,min:0,max:4,typeName:"\u4E2A"},{name:"gpu_memory_limit",label:"GPU\u663E\u5B58\u5927\u5C0F",value:1,min:0,max:64,typeName:"GB"}]),[Bn,an]=(0,Pt.useState)([]),[Zn,_t]=(0,Pt.useState)(0),[Tt,ce]=(0,Pt.useState)(null),[_e,Ye]=(0,Pt.useState)(!1);(0,Pt.useEffect)(()=>{oe&&xe()},[oe]);const xe=()=>{rn("1"),ce(null),_t(0),De[0].value=(de==null?void 0:de.gpu_limit)||1,De[1].value=(de==null?void 0:de.gpu_memory_limit)||16,jn([...De])};(0,Pt.useEffect)(()=>{var Ot,Lt;((Lt=(Ot=Bn==null?void 0:Bn[Zn])==null?void 0:Ot.content)==null?void 0:Lt.length)>0&&ce(St(xt({},Bn[Zn].content[0]),{index:0}))},[Fe,Zn,Bn]);const on=()=>zt(void 0,null,function*(){yield(0,pe.ZP)("/api/home/example_cpu_list.json",{method:"GET"}).then(Ot=>{var Lt;if(an(Ot),(Ot==null?void 0:Ot.length)>0){let wt=St(xt({},(Lt=Ot==null?void 0:Ot[0])==null?void 0:Lt.content[0]),{index:0});ce(wt)}})}),tn=Ot=>{rn(Ot),Ot==="2"&&_t(0)},Cn=(Ot,Lt)=>{jn(De.map(wt=>wt.name===Ot?Lt(wt):wt))},Ie=(Ot,Lt)=>{isNaN(Ot)||Cn(Lt,wt=>St(xt({},wt),{value:Ot}))},ve=(Ot,Lt)=>{var wt;if(console.log("decline",Ot.value),Ot.value=Number(Ot.value),Ot.value<=((wt=Ot.min)!=null?wt:-1/0))return;let Ft=Ot.value-.5St(xt({},Wt),{value:Ft}))},ze=(Ot,Lt)=>{var wt;if(Ot.value=Number(Ot.value),Ot.value>=((wt=Ot.max)!=null?wt:1/0))return;let Ft=Ot.value+.5>Ot.max?Ot.max:Ot.value+(Lt||.5);Cn(Ot.name,Wt=>St(xt({},Wt),{value:Ft}))},je=(Ot,Lt)=>{isNaN(Ot)||Cn(Lt,wt=>St(xt({},wt),{value:Ot}))},He=Ot=>{if(Ot==null||Number.isInteger(Ot))return Ot;const Lt=Ot%1;return Lt===.5?Ot:Math.floor(Ot)+(Lt<.5?.5:1)};return Ht.createElement(Ht.Fragment,null,Ht.createElement(ne.default,{title:"\u8D44\u6E90\u914D\u7F6E",open:oe,width:752,destroyOnClose:!0,centered:!0,onCancel:Le,className:se.modal,footer:[Ht.createElement("div",{className:se.btn_warp,key:"1"},Ht.createElement(Ne.ZP,{onClick:Le},"\u53D6\u6D88"),Ht.createElement(Ne.ZP,{type:"primary",onClick:()=>{let Ot=xt({},de);if(Fe=="1")Ot.gpu_limit=De[0].value,Ot.gpu_memory_limit=De[1].value;else if(Fe=="2"){if(!Tt){Be.ZP.error("\u8BF7\u9009\u62E9\u4E00\u6761\u573A\u666F\u5BF9\u5E94\u7684CPU\u4E0E\u5185\u5B58");return}Ot=St(xt({},Ot),{gpu_limit:Tt.gpu_limit,gpu_memory_limit:Tt.gpu_memory_limit})}$t(Ot)}},"\u4FDD\u5B58"))]},Ht.createElement(Pe.default,{activeKey:Fe,onChange:tn},Ht.createElement(Pe.default.TabPane,{tab:"GPU\u914D\u7F6E",key:1},Ht.createElement(Bt.Z,{spinning:_e},De==null?void 0:De.map(Ot=>Ht.createElement("div",{className:se.con_warp,key:Ot==null?void 0:Ot.name},Ht.createElement("div",null,Ot==null?void 0:Ot.label),Ht.createElement("div",null,Ht.createElement(Ut.Z,{min:Ot==null?void 0:Ot.min,max:Ot==null?void 0:Ot.max,onChange:Lt=>Ie(Lt,Ot==null?void 0:Ot.name),value:Ot==null?void 0:Ot.value,step:Ot.name==="gpu_limit"?1:.5,style:{width:422,height:6,margin:"0 20px 0 12px"}})),Ht.createElement("div",{className:`${se.config_Warp} ${se.flex}`},Ht.createElement("div",{className:`${se.config_btn} ${se.flex}`,onClick:()=>ve(Ot,Ot.name==="gpu_limit"?1:.5)},Ht.createElement(Se.Z,null)),Ht.createElement(ue.Z,{min:Ot==null?void 0:Ot.min,max:Ot==null?void 0:Ot.max,size:"large",step:Ot.name==="gpu_limit"?1:.5,controls:!1,style:{width:55},value:Ot==null?void 0:Ot.value,onChange:Lt=>{const wt=He(Lt);je(wt,Ot==null?void 0:Ot.name)}}),Ht.createElement("div",{className:`${se.config_btn} ${se.flex}`,onClick:()=>ze(Ot,Ot.name==="gpu_limit"?1:.5)},Ht.createElement(Xe.Z,null))),Ht.createElement("div",null,Ot==null?void 0:Ot.typeName))))))))}},2156:function(un,Nn,Mt){"use strict";Mt.d(Nn,{Z:function(){return Lt}});var Pt=Mt(67294),ne=Mt(62844),Ne=Mt(2453),Be=Mt(95012),Pe=Mt(55238),Bt=Mt(74330),Ut=Mt(83062),ue=Mt(85804),se={header_body:"header_body___lAlEX",close:"close___OXweN",no_data:"no_data___h77J2",recommend_config_introduce:"recommend_config_introduce___ifFGY",recommend_config:"recommend_config___UXyKS",recommend_config_item:"recommend_config_item___zONum",item_title:"item_title___w5vXw",recommend_text:"recommend_text___f68Eu",item_content:"item_content___j_zbN",recommend_config_active_item:"recommend_config_active_item___SrTkJ",recommend_config_footer:"recommend_config_footer___PHnlA",application:"application___uh4gI",tooltip:"tooltip___f0uXh",disabled:"disabled___Ha9Ba"},Se=Mt(73475),Xe=Mt(17663),pe=Mt(13014),Ht=Mt(4977),Dt=Mt(33170),nt=Mt(70596),et={lineChart:"lineChart___dCEZW"},ht=Mt(94699),lt=Mt.n(ht),gt=Mt(67294),xt=({dataInfo:wt,indexKey:Ft,valueName:Wt,startAndEndTime:kt,colors:Xt=["#DA4928","#2EC25B","#FEBD49","#498FEA","#9363D8"],imageTypeName:$e})=>{let Je=null;(0,Pt.useEffect)(()=>{Hn()},[wt]),(0,Pt.useEffect)(()=>{window.addEventListener("resize",fn(()=>{Je&&Je.resize()},200))},[window.onresize]);const fn=(pn,gi,Mi=!1)=>{let In,ei;return(...Ki)=>{if(Mi){pn.apply(ei,Ki),Mi=!1;return}clearTimeout(In),In=setTimeout(()=>{pn.apply(ei,Ki)},gi)}},Ve=pn=>pn?pn.map(gi=>{const Mi=new Date(gi),In=String(Mi.getMonth()+1).padStart(2,"0"),ei=String(Mi.getDate()).padStart(2,"0"),Ki=String(Mi.getHours()).padStart(2,"0"),hi=String(Mi.getMinutes()).padStart(2,"0");return`${In}/${ei} ${Ki}:${hi}`}):[],Mn=(pn,gi)=>pn.map(Mi=>{const In=gi.timestamps.indexOf(Mi);return In!==-1?gi.values[In]:null});function Ue(pn){let gi=1/0;for(let In=0;In{let In=[];for(let ei=pn;ei<=gi;ei+=Mi)In.push(ei);return In},Qn=()=>{var pn;const gi=((pn=wt==null?void 0:wt.x)==null?void 0:pn.flat())||[];let Mi=[...new Set(gi)].sort((ki,sr)=>ki-sr),In=Ue(Mi),ei=In==null?void 0:In.newArray,Ki=In==null?void 0:In.minInterval;Mi=[...new Set([...Mi,...ei])].sort((ki,sr)=>ki-sr);let hi=lt()(kt[0],"YYYY-MM-DD HH:mm").valueOf(),$i=ti(hi,Mi[0]-Ki,Ki),pr=lt()(kt[1],"YYYY-MM-DD HH:mm").valueOf(),rr=ti(Mi[Mi.length-1]+Ki,pr,Ki);return Mi=[...$i,...Mi,...rr],[...new Set(Mi)].sort((ki,sr)=>ki-sr)},Hn=()=>{var pn;Je=nt.init(document.getElementById(`lineChart${Ft}`));let gi=Qn(),Mi=(pn=wt==null?void 0:wt.y)==null?void 0:pn.map((ei,Ki)=>{var hi;let $i={timestamps:(hi=wt==null?void 0:wt.x)==null?void 0:hi[Ki],values:ei};return ei=Mn(gi,$i),{name:Wt[Ki],type:"line",itemStyle:{show:!1},lineStyle:{color:Xt[Ki]},data:ei}}),In={tooltip:{trigger:"axis",axisPointer:{type:"line",lineStyle:{color:"rgba(212, 217, 227, 1)",type:"dashed"}},backgroundColor:"#fff",textStyle:{color:"#333333"},padding:10,extraCssText:"box-shadow: 0px 4px 8px 0px rgba(184,194,202,0.5)",formatter:function(ei){var Ki;let hi="";return ei.forEach(($i,pr)=>{console.log("item",$i),hi+=`
${$e[$i==null?void 0:$i.componentIndex]}
${$i.value>0?$i.value.toFixed(5):$i.value==0?0:"--"} ${Ft==0?"Cores":"MiB"}
`}),`
${(Ki=ei[0])==null?void 0:Ki.name}
${hi}
`}},grid:{right:"5%",bottom:"20%",top:"10%"},dataZoom:[{show:!0,start:0,end:100},{type:"inside",start:20,end:100}],xAxis:[{type:"category",gridIndex:0,boundaryGap:!0,axisTick:{show:!1,alignWithLabel:!1},axisLine:{show:!0,lineStyle:{color:"#F0F0F0",type:"solid"}},axisLabel:{show:!0,color:"#9096A3"},splitLine:{show:!1},data:Ve(gi)}],yAxis:[{type:"value",gridIndex:0,axisTick:{show:!1},axisLine:{show:!1},axisLabel:{show:!0,color:"#9096A3",formatter:Ft==1?"{value} MiB":"{value} Cores"},splitLine:{show:!0,lineStyle:{color:"#EDEDED",type:"dashed"}}}],series:Mi};Je.setOption(In)};return gt.createElement("div",{id:`lineChart${Ft}`,className:et.lineChart})},St=Mt(30001),zt={flex_warp:"flex_warp___Rtigf",chart_content:"chart_content___tVmUj",chart_title:"chart_title___AOPx7",listdata:"listdata___mi4KG",block:"block___prArl",typename:"typename___j4diD",val:"val___MeuWc",info_con:"info_con___eIdJL",info_top:"info_top___UKMbT",fullscreen:"fullscreen___PICBn",chart_content_qp:"chart_content_qp___ae1n1",spin_dom:"spin_dom___T7PCy"},Jt=Mt(88044),re=Mt(18046),oe=Mt(63960);const $t=wt=>{const Ft=new Date,kt=(Xt=>{const $e=new Date(Ft);switch(Xt){case"\u6700\u8FD130\u5206\u949F":$e.setMinutes(Ft.getMinutes()-30);break;case"\u6700\u8FD13\u5C0F\u65F6":$e.setHours(Ft.getHours()-3);break;case"\u6700\u8FD124\u5C0F\u65F6":$e.setDate(Ft.getDate()-1);break;case"\u6700\u8FD17\u5929":$e.setDate(Ft.getDate()-7);break;case"\u6700\u8FD115\u5929":$e.setDate(Ft.getDate()-15);break;default:return null}return $e})(wt);return kt?{startTime:kt,endTime:Ft}:null},Le=(wt,Ft,Wt)=>{if(!wt)return!1;const kt=lt()(),[Xt,$e]=Ft;if(wt.isAfter(kt))return!0;if(Xt){const Je=Xt.clone().add(Wt,"days");if($e&&wt.isAfter(Je))return!0}if($e){const Je=$e.clone().subtract(Wt,"days");return wt.isBefore(Je)||wt.isAfter(kt)}return!1},de=wt=>wt<=5?"30s":wt<=15?"1m":wt<=30?"2m":wt<=60?"5m":wt<=180?"10m":wt<=360?"30m":wt<=720?"1h":wt<=1440?"2h":wt<=2880?"4h":wt<=4320?"8h":wt<=10080||wt<=14400?"12h":wt<=21600?"1d":"\u6CA1\u6709\u5339\u914D\u7684\u65F6\u95F4\u95F4\u9694",Fe=wt=>{const[Ft,Wt]=wt,kt=moment.isMoment(Ft)?Ft:moment(Ft),Xt=moment.isMoment(Wt)?Wt:moment(Wt);if(!kt.isValid()||!Xt.isValid())throw new Error("Invalid date provided");const Je=moment.duration(Xt.diff(kt)).asMinutes();return de(Je)},rn=(wt,Ft,Wt=20)=>{const kt=new Date(wt).getTime(),Xt=new Date(Ft).getTime(),$e=Wt*1e3,Je=[];let fn=kt;for(;fn<=Xt;)Je.push(fn),fn+=$e;return Je};var De=Mt(96486),jn=Mt(26194),Bn=Mt(51959),an=Mt(67294),Zn=(wt,Ft,Wt)=>new Promise((kt,Xt)=>{var $e=Ve=>{try{fn(Wt.next(Ve))}catch(Mn){Xt(Mn)}},Je=Ve=>{try{fn(Wt.throw(Ve))}catch(Mn){Xt(Mn)}},fn=Ve=>Ve.done?kt(Ve.value):Promise.resolve(Ve.value).then($e,Je);fn((Wt=Wt.apply(wt,Ft)).next())});const _t=Jt.default.Option,{RangePicker:Tt}=re.default;var _e=({identifier:wt,data:Ft,isFirst:Wt,setIsFirst:kt,info:Xt})=>{var $e;const[Je,fn]=(0,Pt.useState)([]),[Ve,Mn]=(0,Pt.useState)([]),[Ue,ti]=(0,Pt.useState)(null),[Qn,Hn]=(0,Pt.useState)(""),[pn,gi]=(0,Pt.useState)([null,null]),[Mi,In]=(0,Pt.useState)([]),[ei,Ki]=(0,Pt.useState)(!1),[hi,$i]=(0,Pt.useState)([]),[pr,rr]=(0,Pt.useState)(!1),[ki,sr]=(0,Pt.useState)(!1),[Ur,Jo]=(0,Pt.useState)(""),[Rr,To]=(0,Pt.useState)(1),pa=["\u6700\u8FD130\u5206\u949F","\u6700\u8FD13\u5C0F\u65F6","\u6700\u8FD124\u5C0F\u65F6","\u6700\u8FD17\u5929","\u6700\u8FD115\u5929"],co=["#DA4928","#2EC25B","#FEBD49","#498FEA","#9363D8"];(0,Pt.useEffect)(()=>{var Tn,Di,te,le;if(Ft&&Wt){Xn(),fn(Ft==null?void 0:Ft.recent_users),Mn(Ft==null?void 0:Ft.managers);const ae=(Xt==null?void 0:Xt.type)==="\u6311\u6218\u9875\u9762";((Tn=Ft==null?void 0:Ft.managers)==null?void 0:Tn.length)>0?ti(ae?Xt==null?void 0:Xt.myshixun_id:(Di=Ft==null?void 0:Ft.managers[0])==null?void 0:Di.id):((te=Ft==null?void 0:Ft.recent_users)==null?void 0:te.length)>0&&ti(ae?Xt==null?void 0:Xt.myshixun_id:(le=Ft==null?void 0:Ft.recent_users[0])==null?void 0:le.id),Hn("\u6700\u8FD130\u5206\u949F"),kt(!1)}},[Ft]),(0,Pt.useEffect)(()=>{if(Qn){let Tn=$t(Qn);gi([lt()(Tn==null?void 0:Tn.startTime),lt()(Tn==null?void 0:Tn.endTime)])}},[Qn]),(0,Pt.useEffect)(()=>{Ue&&(pn!=null&&pn[0])&&(pn!=null&&pn[1])&&Xi()},[Ue,pn]);const Xi=()=>Zn(void 0,null,function*(){var Tn;Ki(!0);let Di={startTimeString:pn[0]?pn[0].format("YYYY-MM-DD HH:mm"):null,endTimeString:pn[1]?pn[1].format("YYYY-MM-DD HH:mm"):null,samplingInterval:"20s",isSortBoolean:!1,id:Ue};const te=yield(0,Dt.ZP)(`/api/shixuns/${wt}/cpu_rank_data.json`,{method:"get",params:Di});(te==null?void 0:te.status)==0&&($i((Tn=te==null?void 0:te.data)==null?void 0:Tn.statisticsList),To(Rr+1)),Ki(!1)}),bn=(0,Pt.useRef)((0,De.throttle)(Tn=>bt(Tn),1200,{leading:!0,trailing:!0})).current,bt=Tn=>Zn(void 0,null,function*(){if(Tn=="")return;const Di=yield(0,Dt.ZP)(`/api/shixuns/${wt}/cpu_search_data`,{method:"get",params:{search:Tn}});(Di==null?void 0:Di.status)==0&&In(Di==null?void 0:Di.data)}),wn=(Tn,Di)=>{Tn==="CPU"?(pr?(0,Bn.BU)():(0,Bn.Dj)(document.getElementById(`tj${Di}`)),rr(!pr)):(ki?(0,Bn.BU)():(0,Bn.Dj)(document.getElementById(`tj${Di}`)),sr(!ki))},Fn=(Tn,Di,te)=>{const le=Di==="CPU"?"cpuUsageChart":"memoryUsageChart";let ae=Tn.map(Sn=>{var An,En,ke,cn;const _n=(An=Sn.promQueryResult)==null?void 0:An[le],vi=`${Sn.envId}-${Sn.myPracticalTrainingId}_${Di}`,mn=((cn=(ke=(En=_n==null?void 0:_n.results[vi])==null?void 0:En.frames[0])==null?void 0:ke.data)==null?void 0:cn.values)||[];return mn.length>0?mn[te]:[]});return ae.some(Sn=>Array.isArray(Sn)&&Sn.length>0)?ae:[]},Un=Tn=>{ti(Tn),Xn()},Xn=()=>{In([]),Jo("")},ai=Tn=>{let Di=!1;for(let te=0;te<(hi==null?void 0:hi.length);te++){let le=Fn(hi,Tn,1)[te];if(le&&(le==null?void 0:le.length)>0){Di=!0;break}}return(hi==null?void 0:hi.length)>0&&Di};return an.createElement(an.Fragment,null,an.createElement("div",{className:`${zt.flex_warp}`},an.createElement(oe.Z,{allowClear:!0,showSearch:!0,value:Ur,style:{width:280},onSearch:bn,placeholder:"\u641C\u7D22\u59D3\u540D/\u624B\u673A\u53F7/\u90AE\u7BB1",onChange:(Tn,Di)=>{Jo(Tn),Di!=null&&Di.key&&ti(Number(Di==null?void 0:Di.key))},onClear:Xn,size:"large"},Mi==null?void 0:Mi.map((Tn,Di)=>an.createElement(_t,{key:Tn.id,value:Tn.name},Tn.name.length>4?`${Tn.name.slice(0,4)}...`:Tn.name,`( ${Tn.phone?Tn.phone:""} ${Tn.mail?` - ${Tn.mail}`:""})`))),an.createElement("div",null,an.createElement(Jt.default,{style:{width:130,marginRight:20},placeholder:"\u8BF7\u9009\u62E9",size:"large",value:Qn,onChange:Tn=>{Hn(Tn)}},pa.map((Tn,Di)=>an.createElement(Jt.default.Option,{key:Di,value:Tn},Tn))),an.createElement(Tt,{style:{width:320},showTime:!0,size:"large",allowClear:!1,value:pn,disabledDate:Tn=>Le(Tn,pn,15),format:"YYYY-MM-DD HH:mm",onChange:Tn=>{gi(Tn),Hn(void 0)}}))),an.createElement(St.qp,{title:"\u5408\u4F5C\u6210\u5458",style:{marginTop:"24px"},value:Ue,onChange:Tn=>Un(Tn),dataSource:Ve,titleWidth:60,key:1}),an.createElement(St.qp,{title:"\u6700\u8FD1\u5B9E\u9A8C",className:(Je==null?void 0:Je.length)==0?"mt0":"",style:{marginBottom:(Je==null?void 0:Je.length)>0?"0px":"17px"},value:Ue,onChange:Tn=>Un(Tn),dataSource:Je,titleWidth:60,key:2}),($e=[{name:"CPU",type:"CPU"},{name:"\u5185\u5B58",type:"MEMORY"}])==null?void 0:$e.map((Tn,Di)=>an.createElement("div",{className:`${zt.chart_content}`,key:Di,id:`tj${Di}`},an.createElement("div",{className:zt.chart_title},an.createElement("span",null,Tn==null?void 0:Tn.name,"\u4F7F\u7528\u91CF"),an.createElement("i",{className:`${zt.fullscreen} iconfont ${(Tn==null?void 0:Tn.type)=="CPU"?pr?"icon-tuichuquanping2":"icon-quanping2":ki?"icon-tuichuquanping2":"icon-quanping2"} `,onClick:()=>wn(Tn.type,Di)})),an.createElement(Bt.Z,{spinning:ei},ai(Tn.type)?an.createElement("div",{style:{marginTop:(Tn==null?void 0:Tn.type)=="CPU"?pr?"7%":"":ki?"7%":""}},an.createElement(xt,{dataInfo:{y:Fn(hi,Tn==null?void 0:Tn.type,1)||[],x:Fn(hi,Tn==null?void 0:Tn.type,0)||[]},startAndEndTime:pn,colors:co,indexKey:Di,valueName:hi.map(te=>te.name),imageTypeName:hi.map(te=>{var le;return(le=te==null?void 0:te.promQueryResult)==null?void 0:le.imageTypeName}),key:`${Di}-${Rr}`}),an.createElement("div",{className:zt.info_con},an.createElement("div",{className:zt.info_top},an.createElement("div",null,"\u6700\u5927\u503C"),an.createElement("div",null,"\u6700\u5C0F\u503C"),an.createElement("div",null,"\u5E73\u5747\u503C")),hi.map((te,le)=>{var ae;let Ae=te==null?void 0:te.promQueryResult;return an.createElement("div",{className:zt.listdata,key:le},an.createElement("div",{className:zt.block,style:{backgroundColor:co[le],marginRight:10}}),an.createElement("div",{className:zt.typename},(ae=te==null?void 0:te.promQueryResult)==null?void 0:ae.imageTypeName),an.createElement("div",{className:zt.val},(Tn==null?void 0:Tn.type)=="CPU"?`${Ae==null?void 0:Ae.cpuMaxDoubleValue}Cores`:`${Ae==null?void 0:Ae.memoryDoubleMaxValue}MiB`),an.createElement("div",{className:zt.val},(Tn==null?void 0:Tn.type)=="CPU"?`${Ae==null?void 0:Ae.cpuMinDoubleValue}Cores`:`${Ae==null?void 0:Ae.memoryDoubleMinValue}MiB`),an.createElement("div",{className:zt.val},(Tn==null?void 0:Tn.type)=="CPU"?`${Ae==null?void 0:Ae.cpuAvgDoubleValue}Cores`:`${Ae==null?void 0:Ae.memoryDoubleAvgValue}MiB`))}))):an.createElement(jn.Z,null)))))},Ye=Mt(67294),xe=(wt,Ft,Wt)=>new Promise((kt,Xt)=>{var $e=Ve=>{try{fn(Wt.next(Ve))}catch(Mn){Xt(Mn)}},Je=Ve=>{try{fn(Wt.throw(Ve))}catch(Mn){Xt(Mn)}},fn=Ve=>Ve.done?kt(Ve.value):Promise.resolve(Ve.value).then($e,Je);fn((Wt=Wt.apply(wt,Ft)).next())}),tn=({getApi:wt,identifier:Ft,visible:Wt,info:kt})=>{const[Xt,$e]=(0,Pt.useState)({}),[Je,fn]=(0,Pt.useState)(!0);(0,Pt.useEffect)(()=>{fn(!0)},[Wt]),(0,Pt.useEffect)(()=>{wt&&Je&&Ve()},[wt]);const Ve=()=>xe(void 0,null,function*(){const Mn=yield(0,Dt.ZP)(`/api/shixuns/${Ft}/cpu_basic_data.json`,{method:"get"});(Mn==null?void 0:Mn.status)==0&&$e(Mn)});return Ye.createElement("div",null,Ye.createElement(_e,{isFirst:Je,setIsFirst:Mn=>fn(Mn),identifier:Ft,data:Xt,info:kt}))},Cn=Mt(28706),Ie=Mt(35973),ve=Mt(93686),ze=Mt(78207),je=Mt(67294),He=(wt,Ft,Wt)=>new Promise((kt,Xt)=>{var $e=Ve=>{try{fn(Wt.next(Ve))}catch(Mn){Xt(Mn)}},Je=Ve=>{try{fn(Wt.throw(Ve))}catch(Mn){Xt(Mn)}},fn=Ve=>Ve.done?kt(Ve.value):Promise.resolve(Ve.value).then($e,Je);fn((Wt=Wt.apply(wt,Ft)).next())});const Ot=({globalSetting:wt,dispatch:Ft,practiceSetting:Wt,shixunsDetail:kt,visible:Xt,onCancel:$e,info:Je,identifier:fn,isJupyter:Ve,onOk:Mn})=>{const[Ue,ti]=(0,Pt.useState)("1"),[Qn,Hn]=(0,Pt.useState)("\u63A8\u8350\u914D\u7F6E"),[pn,gi]=(0,Pt.useState)([]),[Mi,In]=(0,Pt.useState)(!1),[ei,Ki]=(0,Pt.useState)(!1),[hi,$i]=(0,Pt.useState)({}),[pr,rr]=(0,Pt.useState)(!1);(0,Pt.useEffect)(()=>{Xt&&(Ki(!1),ti("1"),Hn("\u63A8\u8350\u914D\u7F6E"),(Je==null?void 0:Je.type)=="\u6311\u6218\u9875\u9762"?gi(["\u5F53\u524D\u914D\u7F6E","\u63A8\u8350\u914D\u7F6E"]):gi(["\u5F53\u524D\u914D\u7F6E","\u63A8\u8350\u914D\u7F6E","\u589E\u5F3A\u914D\u7F6E"]),$i({}),ki(),(Je==null?void 0:Je.type)=="\u6311\u6218\u9875\u9762"&&Ft({type:"shixunsDetail/getShixunsDetail",payload:{id:fn}}))},[Xt]);const ki=()=>He(void 0,null,function*(){rr(!0);const Xi=yield(0,ve.HS)(fn);[0,-10].includes(Xi.status)&&($i(Xi),rr(!1))}),sr=Xi=>{Xi=="2"?Ki(!0):Ki(!1),ti(Xi)},Ur=()=>{ne.default.info({centered:!0,icon:null,width:424,title:"\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458",content:je.createElement("div",{className:"tc"},je.createElement("img",{src:pe,alt:"\u4E8C\u7EF4\u7801",width:182,height:182,style:{pointerEvents:"none",userSelect:"none"}})),okText:"\u6211\u77E5\u9053\u4E86"})},Jo=()=>He(void 0,null,function*(){if((0,ze.gy)(Ft,"\u4E0D\u80FD\u9009\u62E9/\u66F4\u6362\u5B9E\u9A8C\u73AF\u5883")||Qn=="\u5F53\u524D\u914D\u7F6E")return;In(!0),(yield(0,Dt.ZP)(`/api/shixuns/${fn}/apply_recommend_config.json`,{method:"put",body:{data:Qn=="\u63A8\u8350\u914D\u7F6E"?hi==null?void 0:hi.recommend:hi==null?void 0:hi.high}})).status==0&&(Ne.ZP.success("\u5E94\u7528\u6210\u529F"),In(!1),$e(),Mn())}),Rr=()=>He(void 0,null,function*(){var Xi,bn;if(yield To(),(0,Cn.L9)(["\u5B9E\u8DF5\u9879\u76EE","\u8BBE\u7F6E","\u6A21\u62DF\u5B9E\u6218"]),(Xi=kt.detail)!=null&&Xi.is_jupyter||(bn=kt.detail)!=null&&bn.is_jupyter_lab){Ft({type:"shixunsDetail/execJupyter",payload:{id:fn}}).then(wn=>{var Fn;wn!=null&&wn.identifier&&((Fn=Ie.history)==null||Fn.push(`/tasks/${wn.identifier}/jupyter`))});return}Ft({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u8FDB\u5165\u5B9E\u8DF5\u9879\u76EE\uFF0C\u8BF7\u7A0D\u540E..."}});const bt=Ve?yield(0,ve.BK)({id:fn}):yield(0,ve.Ir)({id:fn});if(Ft({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}}),bt!=null&&bt.game_identifier||bt!=null&&bt.identifier){(0,Cn.xg)(Ve?`/tasks/${bt==null?void 0:bt.identifier}/jupyter`:`/tasks/${bt.game_identifier}`);return}(bt==null?void 0:bt.status)===-3?(0,Cn.eF)():(bt==null?void 0:bt.status)===2?pa(bt==null?void 0:bt.message):(bt==null?void 0:bt.status)===3&&co(bt==null?void 0:bt.message)}),To=()=>new Promise((Xi,bn)=>{var bt;(bt=Wt==null?void 0:Wt.sideBar)!=null&&bt.confirmLeave?ne.default.confirm({title:"\u79BB\u5F00\u6B64\u9875\u63D0\u793A",content:"\u7CFB\u7EDF\u53EF\u80FD\u4E0D\u4F1A\u4FDD\u5B58\u60A8\u6240\u505A\u7684\u66F4\u6539\u3002",okText:"\u79BB\u5F00",cancelText:"\u53D6\u6D88",onOk:()=>{Ft({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}}),Xi()},onCancel:()=>{bn()}}):Xi()}),pa=Xi=>{Xi=Xi!=null&&Xi.includes(".json")?Xi:`${Xi}.json`,ne.default.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:je.createElement("div",{className:"tc font16"},"\u5B9E\u8BAD\u5DF2\u7ECF\u66F4\u65B0\u4E86\uFF0C\u6B63\u5728\u4E3A\u60A8\u91CD\u7F6E!"),onOk:()=>He(void 0,null,function*(){const bn=yield(0,Dt.ZP)("/api"+Xi,{method:"get"});if(!bn)return;Ne.ZP.success("\u91CD\u7F6E\u6210\u529F\uFF0C\u6B63\u5728\u8FDB\u5165\u5B9E\u8DF5\u9879\u76EE\uFF01");const bt=yield(0,ve.Ir)({id:bn.shixun_identifier});if(bt!=null&&bt.game_identifier){(0,Cn.xg)(`/tasks/${bt.game_identifier}`);return}(bt==null?void 0:bt.status)===2?pa(bt==null?void 0:bt.message):(bt==null?void 0:bt.status)===3&&co(bt==null?void 0:bt.message)})})},co=Xi=>{ne.default.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:je.createElement("div",{className:"tc font16"},"\u76EE\u524D\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5C1A\u5728\u5185\u6D4B\u4E2D\uFF0C\u5C06\u4E8E",Xi,"\u4E4B\u540E\u5F00\u653E\uFF0C\u8C22\u8C22\uFF01")})};return je.createElement(je.Fragment,null,je.createElement(Be.Z,{title:null,placement:"right",open:Xt,width:1e3,onClose:$e,closeIcon:null,footer:null},je.createElement("div",{className:se.header_body},je.createElement("span",null,"\u914D\u7F6E\u4E0E\u76D1\u63A7"),je.createElement(Se.Z,{className:se.close,onClick:$e})),je.createElement(Pe.default,{activeKey:Ue,onChange:sr},je.createElement(Pe.default.TabPane,{tab:"\u63A8\u8350\u914D\u7F6E",key:1},je.createElement(Bt.Z,{spinning:pr,size:"large",tip:je.createElement("div",{style:{color:"#666",fontSize:"14px"}},je.createElement("div",{style:{color:"#232B40",fontWeight:"bolder",marginBottom:24,marginTop:14}},"\u6B63\u5728\u8BA1\u7B97\u2026"),je.createElement("div",{style:{lineHeight:"26px"}},"\u7CFB\u7EDF\u6B63\u5728\u6839\u636E\u5B9E\u8DF5\u9879\u76EE\u4F7F\u7528\u7684\u5B9E\u9645\u60C5\u51B5\u8BA1\u7B97\u63A8\u8350\u914D\u7F6E",je.createElement("br",null),"\u8BF7\u8010\u5FC3\u7B49\u5F85\u2026"))},(hi==null?void 0:hi.status)==0?je.createElement(je.Fragment,null,je.createElement("div",{className:se.recommend_config_introduce},je.createElement("div",null,"\u5F53\u524D\u914D\u7F6E\uFF1A\u5B9E\u9A8C\u73AF\u5883\u76EE\u524D\u5DF2\u7ECF\u914D\u7F6E\u7684\u8D44\u6E90\u3002"),je.createElement("div",null,"\u63A8\u8350\u914D\u7F6E\uFF1A\u7CFB\u7EDF\u6839\u636E\u5B9E\u8DF5\u9879\u76EE\u4F7F\u7528\u7684\u5B9E\u9645\u60C5\u51B5\uFF0C\u8BA1\u7B97\u51FA\u63A8\u8350\u914D\u7F6E\u3002\u4F7F\u7528\u7684\u4EBA\u8D8A\u591A\uFF0C\u63A8\u8350\u8D8A\u51C6\u786E\u3002"),je.createElement("div",null,"\u589E\u5F3A\u914D\u7F6E\uFF1A\u9002\u7528\u4E8E\u8D44\u6E90\u6D88\u8017\u8F83\u9AD8\u7684\u5B9E\u8DF5\u9879\u76EE\u3002")),je.createElement("div",{className:se.recommend_config},pn.map((Xi,bn)=>je.createElement("div",{className:`${se.recommend_config_item} ${Xi==Qn?se.recommend_config_active_item:""}`,key:Xi,onClick:()=>Hn(Xi)},je.createElement("div",{className:se.item_title},je.createElement("div",null,Xi),bn==1?je.createElement("div",{className:se.recommend_text},"\u63A8\u8350"):je.createElement(je.Fragment,null)),(Xi=="\u5F53\u524D\u914D\u7F6E"&&(hi==null?void 0:hi.current)||Xi=="\u63A8\u8350\u914D\u7F6E"&&(hi==null?void 0:hi.recommend)||Xi=="\u589E\u5F3A\u914D\u7F6E"&&(hi==null?void 0:hi.high)||[]).map((bt,wn)=>je.createElement("div",{className:se.item_content,key:wn},je.createElement("span",null,bt==null?void 0:bt.image_name),bt!=null&&bt.cpu_limit?je.createElement("span",null,bt==null?void 0:bt.cpu_limit,"\u6838",bt==null?void 0:bt.memory_limit,"G"):je.createElement("div",null,je.createElement("span",null,"\u6682\u65E0\u63A8\u8350"),je.createElement(Ut.Z,{title:je.createElement("div",{style:{lineHeight:"22px",padding:5}},"\u5B9E\u9A8C\u73AF\u5883\u4E3A\u7279\u6B8A\u7684\u4E13\u6709\u4E91\u6216\u65E0\u4F7F\u7528\u6570",je.createElement("br",null),"\u636E\uFF0C\u7CFB\u7EDF\u65E0\u6CD5\u7ED9\u51FA\u63A8\u8350\u503C\u3002\u4E00\u952E\u5E94\u7528",je.createElement("br",null),"\u7684\u65F6\u5019\uFF0C\u5C06\u4F7F\u7528\u539F\u914D\u7F6E\u3002")},je.createElement(Xe.Z,{className:se.tooltip})))))))),je.createElement("div",{className:se.recommend_config_footer},je.createElement("div",null,je.createElement("span",null,"\u6CA1\u627E\u5230\u5408\u9002\u7684\u914D\u7F6E\uFF1F"),je.createElement("span",{style:{color:"#3061D0",cursor:"pointer"},onClick:()=>Ur()},"\u8054\u7CFB\u7BA1\u7406\u5458")),je.createElement(ue.ZP,{type:"primary",shape:"round",disabled:Qn=="\u5F53\u524D\u914D\u7F6E",onClick:Jo,loading:Mi},"\u4E00\u952E\u5E94\u7528"))):pr?je.createElement("div",{style:{height:400}}):je.createElement("div",{className:se.no_data},je.createElement("img",{src:Ht,style:{pointerEvents:"none",userSelect:"none",width:212,height:160}}),je.createElement("p",{className:"mt20 mb20 font14",style:{color:"#7B8394",width:"100%",lineHeight:"26px"}},"\u5F53\u524D\u5B9E\u8DF5\u9879\u76EE\u6CA1\u6709\u4EFB\u4F55\u4EBA\u4F7F\u7528\u8FC7\uFF0C\u7CFB\u7EDF\u65E0\u6CD5\u6839\u636E\u5B9E\u9645\u4F7F\u7528\u60C5\u51B5\u7ED9\u51FA\u63A8\u8350\u914D\u7F6E\u3002",je.createElement("br",null),"\u5EFA\u8BAE\u60A8\u5148\u6A21\u62DF\u5B9E\u6218\u5E76\u901A\u5173~"),(Je==null?void 0:Je.type)!="\u6311\u6218\u9875\u9762"&&je.createElement("div",{className:se.application,onClick:()=>{Rr(),$e()}},"\u6A21\u62DF\u5B9E\u6218")))),je.createElement(Pe.default.TabPane,{tab:"\u8D44\u6E90\u76D1\u63A7",key:2},je.createElement(tn,{getApi:ei,identifier:fn,visible:Xt,info:Je})))))};var Lt=(0,Ie.connect)(({globalSetting:wt,practiceSetting:Ft,shixunsDetail:Wt})=>({globalSetting:wt,practiceSetting:Ft,shixunsDetail:Wt}))(Ot)},16987:function(un,Nn,Mt){"use strict";Mt.d(Nn,{Z:function(){return $t}});var Pt=Mt(67294),ne=Mt(62844),Ne=Mt(85804),Be=Mt(2453),Pe=Mt(55238),Bt=Mt(74330),Ut=Mt(56672),ue=Mt(37720),se=Mt(57399),Se={modal:"modal___aF6vS",con_warp:"con_warp___W1gHS",flex:"flex___Cbe__",config_Warp:"config_Warp___lXnUZ",config_btn:"config_btn___OAH7T",sceneList:"sceneList___N5Y3k",sceneItem:"sceneItem____bE1H",sceneItemActive:"sceneItemActive___e82B8"},Xe=Mt(37388),pe=Mt(38308),Ht=Mt(33170),Dt=Mt(26194),nt=Mt(67294),et=Object.defineProperty,ht=Object.defineProperties,lt=Object.getOwnPropertyDescriptors,gt=Object.getOwnPropertySymbols,mt=Object.prototype.hasOwnProperty,xt=Object.prototype.propertyIsEnumerable,St=(Le,de,Fe)=>de in Le?et(Le,de,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):Le[de]=Fe,zt=(Le,de)=>{for(var Fe in de||(de={}))mt.call(de,Fe)&&St(Le,Fe,de[Fe]);if(gt)for(var Fe of gt(de))xt.call(de,Fe)&&St(Le,Fe,de[Fe]);return Le},Jt=(Le,de)=>ht(Le,lt(de)),re=(Le,de,Fe)=>new Promise((rn,De)=>{var jn=Zn=>{try{an(Fe.next(Zn))}catch(_t){De(_t)}},Bn=Zn=>{try{an(Fe.throw(Zn))}catch(_t){De(_t)}},an=Zn=>Zn.done?rn(Zn.value):Promise.resolve(Zn.value).then(jn,Bn);an((Fe=Fe.apply(Le,de)).next())}),$t=({visible:Le,onOk:de,onCancel:Fe,info:rn})=>{var De,jn,Bn,an,Zn;const[_t,Tt]=(0,Pt.useState)("1"),[ce,_e]=(0,Pt.useState)([]),[Ye,xe]=(0,Pt.useState)([]),[on,tn]=(0,Pt.useState)(0),[Cn,Ie]=(0,Pt.useState)(null),[ve,ze]=(0,Pt.useState)(!1);(0,Pt.useEffect)(()=>{Le&&(je(),He(),Ot())},[Le]);const je=()=>{Tt("1"),_e([]),Ie(null),tn(0)};(0,Pt.useEffect)(()=>{var Je,fn;((fn=(Je=Ye==null?void 0:Ye[on])==null?void 0:Je.content)==null?void 0:fn.length)>0&&Ie(Jt(zt({},Ye[on].content[0]),{index:0}))},[_t,on,Ye]);const He=()=>re(void 0,null,function*(){ze(!0),yield(0,Ht.ZP)("/api/home/cpu_memory_limit.json",{method:"GET"}).then(Je=>{let{max_cpu:fn,max_memory:Ve,min_cpu:Mn,min_memory:Ue}=Je,{cpu:ti,memory:Qn}=rn;_e([{name:"CPU",value:ti,min:Mn,max:fn,typeName:"\u6838"},{name:"\u5185\u5B58",value:Qn,min:Ue,max:Ve,typeName:"GB"}])}),ze(!1)}),Ot=()=>re(void 0,null,function*(){yield(0,Ht.ZP)("/api/home/example_cpu_list.json",{method:"GET"}).then(Je=>{var fn;if(xe(Je),(Je==null?void 0:Je.length)>0){let Ve=Jt(zt({},(fn=Je==null?void 0:Je[0])==null?void 0:fn.content[0]),{index:0});Ie(Ve)}})}),Lt=Je=>{Tt(Je),Je==="2"&&tn(0)},wt=(Je,fn)=>{_e(ce.map(Ve=>Ve.name===Je?fn(Ve):Ve))},Ft=(Je,fn)=>{isNaN(Je)||wt(fn,Ve=>Jt(zt({},Ve),{value:Je}))},Wt=Je=>{var fn;if(console.log("decline",Je.value),Je.value=Number(Je.value),Je.value<=((fn=Je.min)!=null?fn:-1/0))return;let Ve=Je.value-.5Jt(zt({},Mn),{value:Ve}))},kt=Je=>{var fn;if(Je.value=Number(Je.value),Je.value>=((fn=Je.max)!=null?fn:1/0))return;let Ve=Je.value+.5>Je.max?Je.max:Je.value+.5;wt(Je.name,Mn=>Jt(zt({},Mn),{value:Ve}))},Xt=(Je,fn)=>{isNaN(Je)||wt(fn,Ve=>Jt(zt({},Ve),{value:Je}))},$e=Je=>{if(Je==null||Number.isInteger(Je))return Je;const fn=Je%1;return fn===.5?Je:Math.floor(Je)+(fn<.5?.5:1)};return nt.createElement(nt.Fragment,null,nt.createElement(ne.default,{title:"\u8D44\u6E90\u914D\u7F6E",open:Le,width:752,destroyOnClose:!0,centered:!0,onCancel:Fe,className:Se.modal,footer:[nt.createElement("div",{className:Se.btn_warp,key:"1"},nt.createElement(Ne.ZP,{onClick:Fe},"\u53D6\u6D88"),nt.createElement(Ne.ZP,{type:"primary",onClick:()=>{let Je=zt({},rn);if(_t=="1")Je.cpu=ce[0].value,Je.memory=ce[1].value;else if(_t=="2"){if(!Cn){Be.ZP.error("\u8BF7\u9009\u62E9\u4E00\u6761\u573A\u666F\u5BF9\u5E94\u7684CPU\u4E0E\u5185\u5B58");return}Je=Jt(zt({},Je),{cpu:Cn.cpu,memory:Cn.memory})}de(Je)}},"\u4FDD\u5B58"))]},nt.createElement(Pe.default,{activeKey:_t,onChange:Lt},nt.createElement(Pe.default.TabPane,{tab:"\u81EA\u5B9A\u4E49\u914D\u7F6E",key:1},nt.createElement(Bt.Z,{spinning:ve},ce==null?void 0:ce.map(Je=>nt.createElement("div",{className:Se.con_warp,key:Je==null?void 0:Je.name},nt.createElement("div",null,Je==null?void 0:Je.name),nt.createElement("div",null,nt.createElement(Ut.Z,{min:Je==null?void 0:Je.min,max:Je==null?void 0:Je.max,onChange:fn=>Ft(fn,Je==null?void 0:Je.name),value:Je==null?void 0:Je.value,step:.5,style:{width:482,height:6,margin:"0 20px 0 12px"}})),nt.createElement("div",{className:`${Se.config_Warp} ${Se.flex}`},nt.createElement("div",{className:`${Se.config_btn} ${Se.flex}`,onClick:()=>Wt(Je)},nt.createElement(Xe.Z,null)),nt.createElement(ue.Z,{min:Je==null?void 0:Je.min,max:Je==null?void 0:Je.max,size:"large",step:"0.1",controls:!1,style:{width:50},value:Je==null?void 0:Je.value,onChange:fn=>{const Ve=$e(fn);Xt(Ve,Je==null?void 0:Je.name)}}),nt.createElement("div",{className:`${Se.config_btn} ${Se.flex}`,onClick:()=>kt(Je)},nt.createElement(pe.Z,null))),nt.createElement("div",null,Je==null?void 0:Je.typeName))))),(Ye==null?void 0:Ye.length)>0&&nt.createElement(Pe.default.TabPane,{tab:"\u6309\u573A\u666F\u9009\u62E9",key:2},nt.createElement("div",{className:Se.sceneList},Ye==null?void 0:Ye.map((Je,fn)=>nt.createElement("div",{className:`${Se.sceneItem} ${on==fn&&Se.sceneItemActive}`,key:Je==null?void 0:Je.id,onClick:()=>{tn(fn)}},Je==null?void 0:Je.name))),((jn=(De=Ye==null?void 0:Ye[on])==null?void 0:De.content)==null?void 0:jn.length)>0?nt.createElement(se.default,{rowSelection:{type:"radio",selectedRowKeys:[Cn==null?void 0:Cn.index],onChange:(Je,fn)=>{Ie(fn[0])}},columns:[{title:"CPU",dataIndex:"cpu",align:"center",render:(Je,fn)=>nt.createElement("div",null,Je,"\u6838")},{title:"\u5185\u5B58",dataIndex:"memory",align:"center",render:(Je,fn)=>nt.createElement("div",null,Je,"GB")}],dataSource:(Bn=Ye==null?void 0:Ye[on])==null?void 0:Bn.content.map((Je,fn)=>Jt(zt({},Je),{index:fn})),rowKey:"index",pagination:!1,scroll:((Zn=(an=Ye==null?void 0:Ye[on])==null?void 0:an.content)==null?void 0:Zn.length)>3?{y:148}:{}}):nt.createElement(Dt.Z,null)))))}},9916:function(un,Nn,Mt){"use strict";Mt.d(Nn,{Z:function(){return gt}});var Pt=Mt(67294),ne=Mt(35973),Ne=Mt(28802),Be=Mt(91773),Pe=Mt(62844),Bt=Mt(2453),Ut=Mt(35059),ue=Mt(85804),se=Mt(11320),Se=Mt(55351),Xe={flexRow:"flexRow___JBN3B",flexColumn:"flexColumn___zXgFj",formWrap:"formWrap___aNgan",upload:"upload___yGdLQ",color0152d9:"color0152d9___zzEpS",colorCCC:"colorCCC___k4Dxq",footerWrap:"footerWrap___WrUZd",qrCode:"qrCode___GPwSg",a1:"a1___R6etl",code:"code___fCL_L",group:"group___n7tgy",groupNumber:"groupNumber___tw7hA",a2:"a2___GGjDE"},pe=Object.getOwnPropertySymbols,Ht=Object.prototype.hasOwnProperty,Dt=Object.prototype.propertyIsEnumerable,nt=(mt,xt)=>{var St={};for(var zt in mt)Ht.call(mt,zt)&&xt.indexOf(zt)<0&&(St[zt]=mt[zt]);if(mt!=null&&pe)for(var zt of pe(mt))xt.indexOf(zt)<0&&Dt.call(mt,zt)&&(St[zt]=mt[zt]);return St},et=(mt,xt,St)=>new Promise((zt,Jt)=>{var re=Le=>{try{$t(St.next(Le))}catch(de){Jt(de)}},oe=Le=>{try{$t(St.throw(Le))}catch(de){Jt(de)}},$t=Le=>Le.done?zt(Le.value):Promise.resolve(Le.value).then(re,oe);$t((St=St.apply(mt,xt)).next())});const ht=Ne.default.TextArea,lt=mt=>{var xt=mt,{newShixuns:St,globalSetting:zt,loading:Jt,dispatch:re}=xt,oe=nt(xt,["newShixuns","globalSetting","loading","dispatch"]);const[$t]=Be.default.useForm(),[Le,de]=(0,Pt.useState)([]),Fe=an=>{["uploading","done","removed"].includes(an.file.status)&&de(an.fileList)},rn=an=>{var Zn;if(!an.percent||an.percent==100){const _t=(Zn=an.response)==null?void 0:Zn.id;return Pe.default.confirm({centered:!0,title:"\u786E\u5B9A\u8981\u5220\u9664\u8FD9\u4E2A\u9644\u4EF6\u5417?",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>et(void 0,null,function*(){(yield re({type:"newShixuns/deleteAttachment",payload:{id:_t}}))&&de(Le.filter(ce=>{var _e;return((_e=ce.response)==null?void 0:_e.id)!==_t}))})}),!1}},De=an=>Le.length?!1:an.size/1024/1024>50?(Bt.ZP.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E50MB"),!1):!0,jn=an=>et(void 0,null,function*(){var Zn,_t;const{language:Tt,env:ce,mode:_e,code:Ye}=an||{},xe=yield re({type:"newShixuns/applyShixunMirror",payload:{language:Tt,runtime:ce,run_method:_e,attachment_id:(_t=(Zn=Le==null?void 0:Le[0])==null?void 0:Zn.response)==null?void 0:_t.id}});re({type:"newShixuns/setActionTabs",payload:{}}),xe&&Bt.ZP.success("\u65B0\u5EFA\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u7BA1\u7406\u5458\u5BA1\u6838\u3002")}),Bn=()=>{$t.resetFields(),de([])};return Pt.createElement(Pe.default,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,open:St.actionTabs.key==="NewShixuns-Apply",title:"\u7533\u8BF7\u65B0\u5EFA",width:"1000px",footer:null,afterClose:Bn},Pt.createElement("section",{className:Xe.qrCode},Pt.createElement("aside",{className:Xe.a1},Pt.createElement("div",{className:Xe.code},Pt.createElement("img",{width:120,height:120,src:Se,alt:"\u4E8C\u7EF4\u7801"})),Pt.createElement("div",{className:Xe.group},"\u5B9E\u9A8C\u73AF\u5883\u7533\u8BF7QQ\u7FA4"),Pt.createElement("div",{className:Xe.groupNumber},"\u7FA4\u53F7\uFF1A740157011")),Pt.createElement("aside",{className:Xe.a2},"\u5C0A\u656C\u7684\u8001\u5E08/\u540C\u5B66\u60A8\u597D\uFF0C",Pt.createElement("br",null),"\u5982\u679C\u60A8\u60F3\u65B0\u5EFA\u5B9E\u9A8C\u73AF\u5883\uFF0C\u53EF\u4EE5\u626B\u63CF\u5DE6\u4FA7\u4E8C\u7EF4\u7801\u8FDB\u7FA4\uFF0C\u76F4\u63A5\u5411\u6211\u4EEC\u7684\u5DE5\u4F5C\u4EBA\u5458\u7533\u8BF7\u54E6~ \u4E5F\u53EF\u4EE5\u63D0\u4EA4\u4E0B\u9762\u7684\u8868\u5355\u7533\u8BF7\uFF0C\u6211\u4EEC\u7684\u5DE5\u4F5C\u4EBA\u5458\u6536\u5230\u7533\u8BF7\u4FE1\u606F\u5C06\u4F1A\u7B2C\u4E00\u65F6\u95F4\u8054\u7CFB\u60A8\uFF01")),Pt.createElement(Be.default,{className:Xe.formWrap,form:$t,labelCol:{span:4},wrapperCol:{span:20},onFinish:jn},Pt.createElement(Be.default.Item,{label:"\u8BED\u8A00\uFF1A",name:"language",rules:[{required:!0,message:"\u8BF7\u586B\u5199\u8BE5\u955C\u50CF\u8BED\u8A00"}]},Pt.createElement(ht,{placeholder:"\u8BF7\u586B\u5199\u8BE5\u955C\u50CF\u662F\u57FA\u4E8E\u4EC0\u4E48\u8BED\u8A00\uFF1A\u793A\u4F8B\uFF1APython",rows:4})),Pt.createElement(Be.default.Item,{label:"\u7CFB\u7EDF\u73AF\u5883\uFF1A",name:"env",rules:[{required:!0,message:"\u8BF7\u586B\u5199\u8BE5\u955C\u50CF\u8BED\u8A00\u7CFB\u7EDF\u73AF\u5883"}]},Pt.createElement(ht,{placeholder:"\u8BF7\u586B\u5199\u8BE5\u955C\u50CF\u662F\u57FA\u4E8E\u4EC0\u4E48linux\u7CFB\u7EDF\u73AF\u5883,\u4EE3\u7801\u8FD0\u884C\u73AF\u5883",rows:4})),Pt.createElement(Be.default.Item,{label:"\u6D4B\u8BD5\u4EE3\u7801\u8FD0\u884C\u65B9\u5F0F\uFF1A",name:"mode",rules:[{required:!0,message:"\u8BF7\u586B\u5199\u8BE5\u955C\u50CF\u6D4B\u8BD5\u4EE3\u7801\u8FD0\u884C\u65B9\u5F0F"}]},Pt.createElement(ht,{placeholder:"\u8BF7\u586B\u5199\u8BE5\u955C\u50CF\u4E2D\u6D4B\u8BD5\u4EE3\u7801\u8FD0\u884C\u65B9\u5F0F",rows:4})),Pt.createElement(Be.default.Item,{label:"\u6D4B\u8BD5\u4EE3\u7801\uFF1A",name:"code",rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u9644\u4EF6"}]},Pt.createElement("div",{className:Xe.upload},Pt.createElement(Ut.default,{fileList:Le,action:`${se.Z.API_SERVER}/api/attachments.json?client_key=6d57f8c3dd186c5ada392546ace9620a`,onChange:Fe,onRemove:rn,beforeUpload:De,withCredentials:!0},Pt.createElement("span",{className:`${Xe.color0152d9} current`},"\u4E0A\u4F20\u9644\u4EF6"),Pt.createElement("span",{className:`${Xe.colorCCC} ml10`},"(\u5355\u4E2A\u6587\u4EF650M\u4EE5\u5185)")))),Pt.createElement("div",{className:Xe.footerWrap},Pt.createElement(Be.default.Item,null,Pt.createElement(ue.ZP,{className:"mr5",size:"middle",onClick:()=>{re({type:"newShixuns/setActionTabs",payload:{}})}},"\u53D6\u6D88"),Pt.createElement(ue.ZP,{size:"middle",type:"primary",htmlType:"submit",loading:Jt["newShixuns/applyShixunMirror"]},"\u4FDD\u5B58")))))};var gt=(0,ne.connect)(({newShixuns:mt,loading:xt,globalSetting:St})=>({newShixuns:mt,globalSetting:St,loading:xt.effects}))(lt)},96289:function(un,Nn,Mt){"use strict";var Pt=Mt(67294),ne=Mt(35973),Ne=Mt(62844),Be=Mt(55351);const Pe=({newShixuns:Bt,dispatch:Ut,user:ue})=>{var se;const[Se,Xe]=(0,Pt.useState)(!1);(0,Pt.useEffect)(()=>{Bt.actionTabs.key==="Create-Environment"&&Ht()},[(se=Bt==null?void 0:Bt.actionTabs)==null?void 0:se.key]);const pe=()=>{Ut({type:"newShixuns/setActionTabs",payload:{}})},Ht=()=>{var Dt,nt,et,ht;pe(),((Dt=ue.userInfo)==null?void 0:Dt.mirror_marker_status)===0?Xe(!0):((nt=ue.userInfo)==null?void 0:nt.mirror_marker_status)===1?ne.history.push(`/users/${(et=ue.userInfo)==null?void 0:et.login}/experiment-img/add`):((ht=ue.userInfo)==null?void 0:ht.mirror_marker_status)===2&&Ne.default.confirm({title:"\u60A8\u4ECA\u65E5\u5DF2\u8FBE\u5230\u7533\u8BF7\u4E0A\u9650\uFF0C\u662F\u5426\u8DF3\u8F6C\u81F3\u4E91\u4E3B\u673A\u5217\u8868\uFF1F",content:"\u63D0\u793A\uFF1A\u6BCF\u5929\u6700\u591A\u5141\u8BB8\u7533\u8BF7\u4E00\u53F0\u4E91\u4E3B\u673A",okText:"\u8DF3\u8F6C",cancelText:"\u53D6\u6D88",onOk(){var lt;ne.history.push(`/users/${(lt=ue.userInfo)==null?void 0:lt.login}/experiment-img`)}})};return Pt.createElement(Ne.default,{title:"\u52A0\u5165qq\u7FA4\u63D0\u793A",open:Se,footer:null,onCancel:()=>{Xe(!1)}},Pt.createElement("div",{style:{textAlign:"center"}},Pt.createElement("br",null),Pt.createElement("img",{width:120,height:120,style:{marginTop:"20px"},src:Be,alt:"\u4E8C\u7EF4\u7801"})),Pt.createElement("img",null))};Nn.Z=(0,ne.connect)(({newShixuns:Bt,user:Ut,globalSetting:ue})=>({newShixuns:Bt,globalSetting:ue,user:Ut}))(Pe)},51959:function(un,Nn,Mt){"use strict";Mt.d(Nn,{BU:function(){return ne},Dj:function(){return Pt},gH:function(){return Ne},vp:function(){return Be}});function Pt(Pe){try{Pe.mozRequestFullScreen?Pe.mozRequestFullScreen():Pe.webkitRequestFullScreen&&Pe.webkitRequestFullScreen()}catch(Bt){console.log(Bt,":e")}}function ne(){window.top.document.webkitExitFullscreen?window.top.document.webkitExitFullscreen():document.exitFullscreen?window.top.document.exitFullscreen():document.msExitFullscreen?window.top.document.msExitFullscreen():document.mozCancelFullScreen&&window.top.document.mozCancelFullScreen()}const Ne=()=>{if(document.webkitExitFullscreen)return"webkitfullscreenchange";if(document.exitFullscreen)return"fullscreenchange";if(document.msExitFullscreen)return"msfullscreenchange";if(document.mozCancelFullScreen)return"mozfullscreenchange"};function Be(){var Pe=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement,Bt=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",Pe),window.isFullScreen?window.isFullScreen:Pe!=null}},51161:function(un,Nn,Mt){"use strict";Mt.d(Nn,{AL:function(){return xt},Iy:function(){return Xe},Qv:function(){return Dt},ez:function(){return mt},jb:function(){return pe}});var Pt=Mt(47084),ne=Mt.n(Pt),Ne=Mt(90621),Be=Mt.n(Ne);let Pe=1;function Bt(oe,$t){const Le=oe.match(/^(\s+)(?:```)/);if(Le===null)return $t;const de=Le[1];return $t.split(` `).map(Fe=>{const rn=Fe.match(/^\s+/);if(rn===null)return Fe;const[De]=rn;return De.length>=de.length?Fe.slice(de.length):Fe}).join(` `)}let Ut=[],ue=["
    "];const se=new(ne()).Renderer,Se=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Xe(){Ut.length=0,ue=["
      "]}const pe={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function Ht(oe,$t,Le,de){if($t>=oe.length||oe[$t].level<=Le)return $t;var Fe=oe[$t];de.push("
    • "+Fe.text+""),$t++;var rn=[];return $t=Ht(oe,$t,Fe.level,rn),rn.length>0&&(de.push("
        "),rn.forEach(function(De){de.push(De)}),de.push("
      ")),de.push("
    • "),$t=Ht(oe,$t,Le,de),$t}function Dt(){return Ht(Ut,0,0,ue),ue.push("
    "),ue.join("")}const nt={heading(oe){const $t=Se.exec(oe);if(Pe+=1,$t)return{type:"heading",raw:$t[0],depth:$t[1].length,text:$t[2]}},fences(oe){const $t=this.rules.block.fences.exec(oe);if($t){const Le=$t[0];let de=Bt(Le,$t[3]||"");const Fe=$t[2]?$t[2].trim():$t[2];if(["latex","katex","math"].indexOf(Fe)>=0){const rn=lt(),De=de;de=rn,gt[rn]={type:"block",expression:De}}return{type:"code",raw:Le,lang:Fe,text:de}}}},et=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ht=0;const lt=()=>`__special_katext_id_${ht++}__`;let gt={};function mt(){return gt}function xt(){ht=0,gt={}}function St(oe){return oe=oe.replace(et,($t,Le)=>{const de=lt();return gt[de]={type:"inline",expression:Le},de}),oe}const zt=se.listitem;se.listitem=function(oe){return zt(St(oe))};const Jt=se.paragraph;se.paragraph=function(oe){return Jt(St(oe))};const re=se.tablecell;se.tablecell=function(oe,$t){return re(St(oe),$t)},se.code=function(oe,$t,Le){const de=($t||"").match(/\S*/)[0];return de?["latex","katex","math"].indexOf(de)>=0?`

    ${oe}

    `:`
    ${Le?oe:(0,Ne.escape)(oe,!0)}
    `:'
    '+(Le?oe:(0,Ne.escape)(oe,!0))+"
    "},se.heading=function(oe,$t,Le){let de=this.options.headerPrefix+Le.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Ut.push({anchor:de,level:$t,text:oe}),"'+oe+""},ne().setOptions({silent:!0,gfm:!0,pedantic:!1}),ne().use({tokenizer:nt,renderer:se}),Nn.ZP=ne()},78207:function(un,Nn,Mt){"use strict";Mt.d(Nn,{rX:function(){return St},pW:function(){return zt},gy:function(){return Jt},xY:function(){return xt},O5:function(){return mt},hs:function(){return et},tJ:function(){return Dt},o1:function(){return nt},Rd:function(){return gt}});var Pt=Mt(35973),ne=Mt(62844),Ne=Mt(96074),Be=Mt(2453),Pe=Mt(52262),Bt=Mt(28706),Ut=Mt(55304),ue=Mt(25510),se="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAIAAAAP3aGbAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAABcRAAAXEQHKJvM/AAAouElEQVR42u3de5gU1Z038HOqqu89PQPMhQHkNqCiCCK5qMRojIkXRNFERDTGNRvik5hNjPtgzEuyJLq6sq/EbEyy+u5jjBEhSEREvKyXQJRVs1FEMARhhhlgLsDAMD3T96o67x8zzPQMPTPVU12XX8/38/D4PDZdVedUd3+py6nf4UIIBgBAgeR0AwAAjEJgAQAZCCwAIAOBBQBkILAAgAwEFgCQgcACADIQWABABgILAMhAYAEAGQgsACADgQUAZCCwAIAMxfhbOedOt7a/nKUmcrbT2aIUxned8Xaa/DhMbsi2dppk8nO3ovG27XnbemTbDmE4wgIAQhBYAEAGAgsAyEBgAQAZCCwAIAOBBQBk5DGsIaedO3dWVFRY3cpVq1atXLnS4JuNj3WwgvF7tCbHZFhxe9u2dZp8Z04uHGlhxbAbKz44F/6KB2I2sCoqKqqqqqzuajgctnoTACMWoV8xTgkBgAwEFgCQgcACADIQWABABgILAMgwe5cwJ5O3jVtaWgp+z8KKW+bOPvjuwq1bMaTD+OLG2+ks2/aSSS78FTMcYQEAIQgsACADgQUAZCCwAIAMBBYAkIHAAgAyLBnW4CxnS/fb9k4r7nk7W8LBClZUQbBiYIEVI2ycnXjFIjjCAgAyEFgAQAYCCwDIQGABABkILAAgA4EFAGQU4bAGK25Fu/Besm03wm27i2/bEATbNmTbN6QoRzDkhCMsACADgQUAZCCwAIAMBBYAkIHAAgAyEFgAQIYlwxpaWlrMLG5F7Xpnpy2w7Ta8bawo4eDC6RVIf0YmufBXzCwKLIvaCgC2ceevGKeEAEAGAgsAyEBgAQAZCCwAIMPsRfdVq1aFw2GrW7llyxZ7dgfACEToV8ydvd9vkhV1CPBOvHOkvdNZeY0IwSkhAJCBwAIAMhBYAEAGAgsAyEBgAQAZCCwAICOPcVhUnke3rcg/lYktbLuT7eyet+0zIo16j3CEBQBkILAAgAwEFgCQgcACADIQWABABgILAMjIo1pDHit19K6zFXfxXTiwgMqz+FZ004Wc/YidHSJjsuILqjUAQHFCYAEAGQgsACADgQUAZCCwAIAMBBYAkGF21hxnKxZQqdJvW5Nsm1LEinbmXNy2vlNZ3DhnfwgWjbDBERYAkIHAAgAyEFgAQAYCCwDIQGABABkILAAgw+ywBpOsuMlKZZ3GN2RycdsKcriQC3cIlclH3FkOBEdYAEAGAgsAyEBgAQAZCCwAIAOBBQBkILAAgAz7JqHIiUqZfeONN8nZ4gS29d2KggcmWbF1Z4tnGN8QlZk+GI6wAIAQBBYAkIHAAgAyEFgAQAYCCwDIQGABABl5VGuw7Z63FSMYSN/NpTK1hEkuHC5AZdzMyPl14AgLAMhAYAEAGQgsACADgQUAZCCwAIAMBBYAkGG2WoMLa++bbKdxzvbIZN+pVL9wdqyDs01y4eKO/95xhAUAZCCwAIAMBBYAkIHAAgAyEFgAQAYCCwDIyKNaQ0623bA3eUPUhdMBmOym8XdaMdOH8b67cLYLZ1kxdsS2ARDOThTCcIQFAIQgsACADAQWAJCBwAIAMhBYAEAGAgsAyDBbrSGPLbmvEgDpDRnfum3VGqzYEJXSCC5skjtnkTAJR1gAQAYCCwDIQGABABkILAAgA4EFAGQgsACAjDyqNdh2x93kOq1ovLM9smIQgG1lDEw2ydlhNzk5+7lb0U1n5+/AJBQAUJwQWABABgILAMhAYAEAGQgsACADgQUAZJidhMI2VlTpt22sQ045t27baAPjO8TZ2S5sG/hiRa0IZ4tSWNFO4zAJBQCMdAgsACADgQUAZCCwAIAMBBYAkIHAAgAyzA5rcPYpc2ebZFvjTXJ2h9h2v9/Zxhtf3OSGrJjpw2Q7c7LogyMzDguMsOKbN5LbCW6DU0IYcdasWTNhwgSnWwHDkce8hM7OOmcclUHtJtcJJi1ZsmTNmjU9/+vCT9PxankONn4gOMKCEeqZZ55ZtmyZ062A/OAIq8AbyglHWK510003rV27lrny08QRVo7VIrAKu6GcEFhuNnHixIMHD7rw00Rg5Vitsx2wIu+c/c2T/pIZbXkyqbceUxsOqrV16r46rf6A1tist7Xp7e2iIyYyaZFRGWPco3CPl5eEpNJSadQoeXy1PHmiMm2qUjNVmXSaVD6G+/1Od4Uxxp599tlFixbl7qkF/5wbX9x4k6xIB3d+FRFYdnQzJyo96m5DJqO3HM7s2p1+f3vmo13q3lrtaKuIdghVZcabxzlXFB4pkSvKlek1nlkzvXPneGbOkMZWcY/Hwd5VVlYePXo0R68RWMNd3CIILDu6mROJHolMRqs/kNr2burNrentO7SDjSKVKuD6uc8nnzbeO2e279KLffPOlydPdCS5+t0x7O0+Amu4i1sEgWVHN3NyeY/01mOpbe8mNm5ObXtHa2xmmmbt9mRZHl/tm3dB4Nr5vnnnS+Vj7OzsunXrbrzxxlNfR2ANe3GLILDs6GZOLu2REGp9Q/KFl+Lrn8/s2i2SSfs23bUH/H7PzBnBry70XzNfmTyR2fJoTlNT0/jx43PtDATWMBe3CALLjm7m5LoeCaHW1cfXPBv/w3Nq3X6m63ZsdCCSpNRMCS66PnjTDcrUyTbElhWJg8AqOASWHd3MyVU90ppb4qvXxZ56Rt1Xl8dFdKtxrkybGrp1SfDmRXL1WIs3hcAqZI8sYsk4LLNtct84F+Mc/0TzbnA8kXjx5c5fPpbevsPyC1XDI8veObPD3/1W4OoreTBg0UZcOGrJihGFtpVbsGjXIbAKjFZgZT7e3bHq0cTzm0Q84XRbhsCDgcDCBSU/uNNz9gxL1o/AcmhDeUFgFRiVwBLJZGL9xuhDP1f31Trdljwo02oi99wV+Oq1BR90isByakN5QWAVGInA0pqaOx56JLZ6rYjFnW5L3ngoGLp5cck935fHVRdytQgshzaUFwRWgbk/sNLvf9i+/GeprW+76OJ6vjj3Xfy50vt/4p17buFWicByZkN5QXmZkUQXyc2vHL/tjtSWtwinFWNMiNSWt47fdkdy8ytMp9wRyBMCa8RQ1dhTq9u+czeti1aDdWhfbdt37o49tZqpqtNtAZvYV17GOCqFPqwYSGXRiYlIZ2KPPxG9f6XeHjW5KreRSiOR5ctCS2/nXlMPIbpwAJ0Lf0dWbD0vmISi+Il0pvNXj0UfeFh0djrdlsLT26PtP/03kcmEv/Mtk5kF7odTwmKnqrHHnyjWtOoiOjujDzwce/wJnBsWPQRWURMi9vTa6P0rizitujva2Rm9f2Xs6bW0bybAUBBYxSy5+dXoigeL77pVTnp7NLriweTmV51uCFgIgVW00u9vP/GjFdrhI043xD7a4SMnfrQi/f52pxsCVkFgFSetqbl9+X3q3iIZwWCcure2ffl9WlOz0w0BS5gtL0Nlghxnh0rYPGhYpFLt9/yk87EnzGyUtPC3bi996Gfc5zO+CJXyMjk5+8CJSZhIdaRLPLsh9vRap1vhpNjTaxPPbnC6FVB4CKxik9m1O7ryEYpPNReQiMWjKx/JfLzb6YZAgSGwioqIJzoeeXQEXro6lbq3tuPnj7q/zhfkBYFVVBKbXkps2OR0K9wisWFTYtNLTrcCCgmBVTy05pbOXz2OY4oeIp7o/NXjWnOL0w2BgkFgFY/46nXp9z90uhXukn7/w/jqdU63AgrGbLUG45ytbeBsqQnzd4iH3CdqbV3rdUtw9epUyvSa8g3PKDVTB3+bC2d1craIgjtLOOAIq0jE16xHWuWk7q2Nr1nvdCugMBBYxUCtq4+ve86SVQvBdL3Pn7z0WzbfP13/IJtpAGOMsfi659S6ekv2D9gL9bCKQXLTS+q+usKvVzBp9Gipopyxk0fyqqodbBSZjKHFZVmedBr3+XsXz4uua43NTFXl08Yz5eQXNZPRDjUZbcBJ6r665KaXwt/7duF3EdgLgUWe3nosvn6j0bIqksR0vXvCVM67/wy4ai2wcH5k+bLu4xpJ0hqbjn9tqbq/nklDHZsLIZWWjvrFv3tmnT2c+Vk5F52x40u/q+5vGPX/fqlMnsR0nUmy+vc9x267Qxw5mt/k9ULE128M3nyjVD6mwHsf7IXAIi+17d3Mro+NvJN7veE7vyVVVqh792kNB9WDh/Rjx0VHh0ilezOF8z5hJMty9djedNB1pshGWyZLUlXFsKeYF50x7vMxIeSKip4ZvdRP9opEcoh0zpVlmV0fp7a9G7h2fmF2OjgEgUVcRk1s3CySqaHfKQTz+fxXXub73IVMFyKR0KMd+uEjWlOzWrtf3V+v7m/Qmpr11mPakaO9pTu7LiT1REC+53ambgoJJgQPBJjX2/OS1tTCFZmXlrIBDrBEOiOSyRyvJ1OJjZsDV13OPPjOE2b2wzN+N9f4XVKT91OtmA7AhVN1dFHrG1Lb3jHaNq9HKokwxpjEeSgoh4JydZXn3HO6m5hIing88/dPjn/j21r9gazjLBPtNPdJMsakkrAU6J3k2ff5C8f84XcDLiFJsaeeiT+1JudBVmrbO2p9gzK9Jo8WOPqltYJtG7II/rWhLbXtXe1Qk6G3CsH9fl4Szv23nPNggAcDUqSEJVMDXiHiLI8Q0nX9SKvW3DLErT0heDgklZX1vhCL6+3tojMmkkmpojy7zfKE8fKE8YNsMfa71UzXmZzjvFU71JTa9m5egQVug8AiTGQyqTe3Gr/TL0VKeCAw+Hu0xmY9Gu0bWKInpISqCdXYHTrO9RPtbf/0z0MXpdL14A3XRZYv6zmmS7zyWvS+h5imaQcOhW67mfv9Q26te00n2tVP9g2yodSbW0M3L2IeTK5DFQKLML35cHr7jjzeH4+n3tyqnHWmXFXRHV6nHImo++tFKt3zv9zr7XMNXlVZMmX0IEvTtLp6MUSecsaE1nI4+zq6ONGu/v0TputMUTyzzzF+Q1A/clRrbB7k/entO7Tmw/LECeZ2PDgGgUVY5uPd2qFGo++WJO3AobZv38VLI3L5GKmqUh43VpkyWamZKk86TR5fLY0qk8JhdX89U9WeIOM+b/Y6RDotdN3oSaEQ8qSJ/su/yBUl9309SdIONSZe+m/GeZ8Q5IzJMhNCKh/jmTPr1NX2+d+seFIPHtJPnBgksLRDjZmPdyOw6EJgEZb+4END9wd7CCHSaXHkqN5yhO36G2OMSRLzeKRwSBpVJo+rlieMT3/4Ud8xVn1+/CKeyGPuP133nHl62cr7BjwP5Tz15p+Tb2wdqLWeGWcoU6f0vKDure38zX+JRKI7knThn//lwIKret+we4+IxQcJLJFMpT/40H/llwr9UYBNEFhUiWQys2Nn/osJxhiT+5zl6W0n9ONt6r46JgST5d4fPOc8FOyzdCwm8p2sdPCxqQP9jRBMUQJXXymVRnpeS7ywufPRx5jouqYmmCR5P31eVke0zK7dTNNyXnHvkdmxUySTxq+LgavkEVi2VUGwYl4M295pxfiJnFvXW4/l/bSzokiREhGLi1Sqz0jRfoNFszfc9+BI7+hkeT4WM0y6rpx5uv/qK3pfaDuRfOX1rl507Slp9CjPWWf2viEazezeM+SK1b21euuxwW41DsW2CU2cnZnCtqIUecERFlVqwwHtaGseC+i6MmVS2cMPiERSO9SoHWpUDxzS6hu0I0f1Y20imWSZDBOMSVnhJUk80mcYhIh2iIya32MxgxtoVUJ4Pz1XmXRazwuZ7TsyH+3qbZsQ8tgqOesNWlOzdvDQkM8MaUdb1YYDZgILHITAokqt3S+iHXksIIQ0epT3U+dJo8q6X0ilRWen3npMa2pWGw6otfvV+gPq7j2Z3Xt6Hh6USkuz16G3nRjOg4Enpf705/T/fsCknlNOSd1XK9JdNyX7/YPMpdKSnvQRGTX+x436ifbswFKmTZVGj+rdIX//RD/eNmSYimiHWrvfN++Cgn8iYAMEFlXqvrr8ihYIIZWEs0dFcZ+X+0ZLY0YrZ0z3nXxPfN1zbd/8btdYBK7I2eM5GWPakaNM14d+8nkAiU0vd/z8l4xLJ69ddT/003/wBOt/bSvz0c7ky6/1eUmWvZ+em30pKv3RLpFKDdk2oWY0KypbgC0QWFRp9QfyXYSXlAwxZpJzrflwdw4Kwf3+7GveTNf1I0eMloXIxTN7ZuAr1/E+mSKYzxf4yrW5joxOjlZNp2NPrtYam7IPr6RIxPuZub1ricUzH+401DbB1Px3HbgEAosqrdHYEzk9OJdGj+LyoAcgQmj1Dd032oTgoSAv6z0lFKqqHztu5nnm0C2LgzfdcErDJN7/gWTOOJfC3ZfPUlu3JZ57oU+i6bo8ZZJy5unZeyOzZ6/Bi2taIyaypwqBRZXediK/BSQp/Zf3o//678q0GnnSBLm6WhpdJoVCvbXxGBPxhLq/oXeJsrLsi0QintBaj5l6nlmWuTx0dRqhaUywrrIKasOBjodW6a3H+p3reT8zVy4f031IxXnmk3264SJZelubiT6Ak/IILGdnfLDz1qkZtg2A0Nvb821ZZseuzI6dzOORgkFpzChp7FhlyiRl8iRl+lR5XLVUVck0TWts6v7ZCyFPGN9zmMMYEx0d+rHjhbxFOFDXWg4zXWNcUusb2u/5SWrbu/2vTMlyZuff2u76IdNPBtbHu0UyaTSwcu06275Lzs5yYtvvyKIN4QiLKtERy3sZiTPGmabp0aje3s5q96fffofJEvMo3B+QIiVSaUStb2C8Ox2UaVN5VmkXrblFb80zsPKq7sAYY0zd35B85XXGeeqtbcmXXhlo4rL0O++ls+vqSJLxWwHD2XXgDggsqkQmPfyF+40+VzXR0aFFo9qhRiZJ3Qnj8XjOOrPPk3r7G0RHNJ/A4npbe+qd97jPa/DKl360Nfbk6vT2HUySUlve6r4jKQQvKQl/8zZ5fLXQdc640NT46nV9hmXZtuvAUQgsqkTGwCMyeR2BnzwT7PqvFClRzpie/feZj3eL5FDjBrLjTJbS23ccW/T1PI6x0hmRSPYO1OralhBSaST09SU97RGpVGrL28N5Msn4rgNXQmAVL865z9f748+LpnvOmenJCiyRTKqf1HK/f/Ca7iKj9j4d3dUAzvOolOz19taHEEwkEl3jVLnPx/xZdbXSGZFIOLRbwUkILKq4RxGDDDoXQopEIivuVaZMEnr+VzqFUCaM7zPHjCSF71wa/NriQU4JucRjT61JrN/IZIkJIZWVlj74U+X0acOZTJBzEU+0/+S+zPsfMsZ4KCiFQj1/qcfjejQ67ALMHGXdycInRxX3eIeoLePz+i660DPzrMJszuv1fW7ox1lS297rPQ/1eLxzZnlmnzO8LYrOmFRa2lXuVCorzb78Lzpjoj067AEW3OMd5pLgNEsCy4q7pC4cwWCFPEaElIRYx6DPEgphbtKaYenb1OEc3GUtffKCGpPHVmXPnSNiMb0zNuwBFrwkNLwFuxe3ax4HF/6OrKg/kVeTMFU9Vf0eS87N/hlS+KD/O9x1yuOqedZDRfrxNpFIDnt9hnYduBJOCamSRo0a8j0ik2GaJvKrr8C595TnDVV1qNLsjDHGJalPLQchWEY10gAuyQNfyxdM8chTJmW/pB05KmIxpmmMc2Zg6Pwwdh24EwKLKnl89WB/zbmIdrT/aIUUKTU0uIGzrnKjodtu8V/+xey/UffVdqz8hX7ixBDHS5wxxjJ/29NdzpRz0dHR/uP7pNIhGiCEHvjSpaF//HrPgInUn7fFf79WpNPqnr1MkngwoNRMyV5ECocDV1/BGNdjsfT/vNdbNLkguw5cDIFFlTJ5Iht0wIBIp1NvbDU+FEvoeuCqL3tmnd3nxXi84//+R+y3vzfarKwR5yKVTr2xZYjDK86ZEHL5mFBWO9VP9sV+t7q7XjNjckW5Mmli9kL+L1/q++IljDMR7Tj29aWp1/6Ux3EWZ8rkiUbfDC6DwKJKnjaVK54hSmIZ/xlrmnfunNIHfypXj81+ObFhU/zZ57sLvZ+afYMf1wghjRmjnD6NDVgigov29szuPUyS+xy+SZx5PN2DIXRdHlctVVb0WU5RuMIYY7x8THDhgtSWt42PnOCKR5421eTOB6cgsKhSaqbwSIk4drwA69J1efKk0gdX9BsDkd7+UfShn4vOTibLgQVXej/7aSZO5gKXUlvfSr765mCnibrumTNr9G9/wwP+nEeCXJaTW986/rWlg48sVc48XcqesFqI7KD0XXKRMnWy+sk+g4/p8EiJUoPAosq+SSiMs+22scm+G2+8FVMMKJMmyhXluvnA0nV5bFXpA//iv/TiPi+3Hove/1DXVSSmatznC3/7H7MrfPo+d37mw51ay5FBBtNzRZFKI4NMNy2FQkMcpnm93s/MzQ4jtW4/D4XlsZXd+6Fmiv/KL3UOMuFzX3JFeXap+N6mWvCtM/m1Mfnjsq1HxhtvHoY1UCWVj1Gm15hdi65LY0aXPvAvweuvyQ4OkUp1PPLr5CuvdyeFxJNvbEn/dXv2op45s/3XXJXHYzfDap5cUe6dOyf7tcSml1Ov/ylrR0iBa6+Wxow2eLVOmV7TZwQ/kILAoor7/cMeRN5N16XKitL7fxJc/NU+51NCxH+/tvM3/5U9FZjeeiz+hz9mT0rIPZ7QLTdKVZVmiiYPeRXMc+45ytTJvS8kEqktbyde2CySveOwvHNm+y660OBlLM/sczApIV24hkWY97xzud+X3+TPPbrOBB/8aXDxV/pd/Um+sTX64MOis7P/6y+/pn7zNs+smT2veM6dFbjyy7EnnzY4qiCzZ6/WcKDn+jqXpfT2j5jWFYK5Uk9R/Jd9gQd7J3PVmlvUv38iMhl1X13PFTceDAQWLki+8vrJCXgGxP0+73nnWvBRgE0QWIR5zp4hTxivDmMOGE2Xp0ws+7efBa6d3y+V0n/9oH3Z8u7CWNkkSWtsSrz4SnZgcZ8v9A83J17+b4PlieO/W9356ONZNw050zQRT+SeHVrX5dMm+C65qE/zPtihtbSIVDr56uvZtwh8F12onDE9s2Pn4Jfe5QnjPWfPsO4TAavhlJAwqbrKO2d23ovpuufsM0c9uipw3YJ+P291z94Td/+fzMe7c//sdT2xYZN2qDH7Nc95cwLzLzd4VshDIamyQqqsPPmnQqquUmac4bvw/BxbFML3+QuVrCEIIpNJvvq6iCeYpiVffi27qr08YVzg6iuGDE3vnNlydZUFHwXYBEdYhHGPx3fpxfE/bjQ6CkkIxpjvC58vffCn3jmz+v2lure27a4fpt/73wEPUiQps3tP4sVXw3fc3tsGryd065LE5leNHGSF7/hG8KYb+oyEEIx7PNLJW349a2VCSKPKgjfdkD2RorqvLrX17a7DsfSOnem/vJ89KD9wzVWx3z6tNTUP0n7fpRcPMdEZuJvZSSisWNzZMQRWjN6wbqyDb9758oRx2oFDRjrGFCV4/TWR+5b3GzjOGFPr6k/84N7UG1uGGM2UTifWbwguWiiNHt3zmue82f4vXxp/ai2Th2i8NGa0NGY0G5IQTNd9l32hX0Gb5Euvage7z1VFtCPx4sv+yy7pGRyrnHWm79LPx3+/dqC1yhPG+eadP/A2C/+1Mcn4Ol04g4ZFTcIpIW3K5EmGZl3Xdam0NPLDH5T9x8pT0yqzY2fbHd9LvvanocdeSlJ6+0ept9/Nfo37fKHbbpEqy03dLsxubNsJqaI8fMc3sgdwaQcb4+s2ZB9Lpv68Tc06P+Veb/ArC3kkMlAzfPMuUPo+RA3kILCI8yiBa+fz7PLBpxJCmXHGqF+vKrnnrn5TzzNdT/152/Gl/5Ta+rahUjCci46O+Nr12aMKGGPez3wqMP+KggSW3h5N/c97wZtu8F3wmezXEy9szvwt6+KaJGn7G1JvvZP9Hu9nP+U556ycJ8jc7wtcOz97EkagCJ8feb5553tmnp3+6wcDvcH76fMiP7zbM2eWfuRoVqZwpmuJza92rHpUO3Awj+lnJCm15a3ka3/yfmpO70AtWfZ96QuJjS/qJ9r7DEBNJrXGZh7wG6sYwUVnLPbkav3o0eCy72tHjnZHjySp9Q2djz3B0pnsdopkMrFhk2/eZ7nXe3JGVcl3wWfT7/zl1HV7Zp49yPkgUMGtGOlv2+UAF17DcuRiWecvfn3i3hW5Q4FzuapSKivNUdBK07RDTSKRGMZkWXJVJS/rWzdG1bRDh0Q662FswXgoKI+vNl77RcTjWlOLFCnpMx6Vc9HRqTXlmF+e+3zyhPG94yS63tnc0n9XcF724Irw976dbzdtu2SDeYKNNgCBNezF3RNYal1968LF6t7agbY04AFOzgFQRugix1DPXEMT8j5PlKTcS+VMVcF6n8ce+J3K9Jry59dmj5g3CIHl1A4ZCK5hFQNl6uTgousH/GvOu8tUnfpn2Hd+pVzrzGvTA/0ZaKncXWNG3hlcdP0w0gpcKI8jrNzLO/pEuLP/BJnse2Ebr9bWtV63ZMCDrBFMmV5TvuEZR0rKOPvrsGJDVnQTk1CMRErN1NCtS4Y3dXsxk6TQrUtQAKto4PtdPII3L/LOPdfpVriLd+65wZsXOd0KKBgEVvGQq8eGv7OUBwPmV1UceDAQ/s7SfkWfgTQEVlEJLLgqcN0Cp1vhFoHrFgQWXOV0K6CQEFhFhQcDJXfdqUyf5nRDnKdMn1Zy15043iwyCKxi4zl7RmTZ93goaH5VdPFQMLLseyh9VXzsq9aQk8nn0W2r0p9znS4c19clcMN16b9u73zsCacb4pjQLYsDN1xn0cptG0FtG5M/Lju7iSOsIsR9vpJl3+9Xq3Pk8F1yUcmy72cX0oKigcAqTvK46tL7f1yAaXWoUabXlN7/Y3kcJqMvTgisouWdO6fsgRVyVaX5VVEhV1WWPbCi37RgUEwQWMXMP//yyIp7pdKI0w2xg1Qaiay41z//cqcbAhZCYBU1zkO3LI4sX8bDYfMrczMeDkeWLwvdsnj4j3MDBQisYqcooaW3R350dxFnFg+HIz+6O7T0dhQULXpurNZgkhWjDWwr5mVRj0Q6E3v8iej9K/X2aMF3jrOk0khk+bLQ0tu519R0OLaVHLCi7ogLG29ReRUEVoG76c7AYowxVY09vTa64kHt8JGC7x+nyFWVkRX3hm5ZbP7YyoW/edKNtyiwcEo4YihK6NYlo371sDKtSMY6KNNqRv3q4dCtS3AmOHIgsEYSSfLPv2L0k//pu+Qi2henOfddctHoJ//TP/8KlAAbUXBKWOBuuveUMIvW1Nzx0COx1WtFLF7YNduAh4KhmxeX3PP9wo4OdeFZFenG4xqWUQgsQ+tMJhPrN0Yf+rm6j1JVZWVaTeSeuwJfvZb7/YVdswt/86Qbj8AyCoFlXObj3R2rHk08v0nEExZtolB4MBBYuKDkB3daVIPBhb950o13PrBsa6sVc2oZZ1veuaTYg4gnEi++3PnLx9Lbd/ROjOoqsuydMzv83W8Frr7SuvpWVvzmXbhO4xvKCYFV+A2ZNNICq4vW3BJfvS721DPqvrqCzDhfGJwr06aGbl0SvHmR1ZWOXRguLvzOI7AKvyGTRmZgdTVIrauPr3k2/ofn1Lr97NSZou0kScrUKcEbrw/edIMydbIN9zRdGC4u/M4jsAq/IZNGbmCdbJZafyD5wub4+uczu3aLZNLm7XO/3zNzRvCrC/3XzFcmT7Rt+IULw8WF33kEVuE3ZNJID6yT9NZjqW3vJjZuTm17R2tstvzylizL46t98y4IXDvfN+98qXyMzf11Ybi48DuPwCr8hkxCYPVpZCaj1R9IbXs39ebW9PYd2sFGkUoVcs/4fPJp471zZvsuvdg373x58kTuMfVI4PBb4r5wceF3HoFV+A2ZhMDKSWQyesvhzK7d6fe3Zz7ape6t1Y62imiHUNU8LtJzzhWFR0rkinJleo1n1kzv3DmemTOksVVO5VR200ztHwTWcN+ZF7PjsKzolXG0fvNGkIg2kUzqrcfUhoNqbZ26r06rP6A1NultJ/T2dtERE5m0yKiMMe5RuMfLS0JSaak0qkweP06ePFGZNlWpmapMOk0qH1PwwZ/2sO3fY5NNMs62wYPm+47AchcSgTXCIbCGvU7zfceDowBABgILAMhAYAEAGQgsqtauXet0EwDshovu7pLXrqusrLzssssWLlx40UUXjR1r7aN20AMX3Ye9TvN9t6S2rMm2OjsOy2Q3c7KikowVWzfZ95Hzsyl4O40vnrOdVnwczn5pB4JTQgAgA4EFAGQgsACADAQWAJCBwAIAMhBYAECGfeVlnOXCqXSojMexopvO7qWcRsiX1njf3VlnCUdYAEAGAgsAyEBgAQAZCCwAIAOBBQBkILAAgIw8qjXYdpPVtkodVgzUoHIr2rbBCiZ7ZFvfnS0xYlvtDePFHoyz89eBIywAIAOBBQBkILAAgAwEFgCQgcACADIQWABARh7DGpx97N62ev5W3KO1besmpy0wyYXDBXKiUmLEWVZMgYFqDQAwgiCwAIAMBBYAkIHAAgAyEFgAQAYCCwDIyGMSCks2774n161op8l12nbH3YUzkpCelcMkZ7+fJjdkUQkHHGEBABkILAAgA4EFAGQgsACADAQWAJCBwAIAMsgMa3DhU/vO3sV34Z1sk+s0zoVbd+E4D2fLq1gER1gAQAYCCwDIQGABABkILAAgA4EFAGQgsACAjDwmoTDOihoMxhc3eefVZEV9K7hwAg6T7XR2ZgrH780XvEkunGPFor7jCAsAyEBgAQAZCCwAIAOBBQBkILAAgAwEFgCQkUe1BmfLGFixIdv6bnydLpwXwzjbboTbtnXbyi04O6TD2flQMKwBAIoTAgsAyEBgAQAZCCwAIAOBBQBkILAAgIw8qjWYLGNg2/wIVrBitIELZ9BwdoeYXNy2cR623e/PyYq+W7FOi3YIjrAAgAwEFgCQgcACADIQWABABgILAMhAYAEAGXlUazC7JUeLEzhbK8K2IR3FN3bEhTVCrOhmTi4cVGFbjwaCIywAIAOBBQBkILAAgAwEFgCQgcACADIQWABARh7VGkxytjyAyQ1ZcdvYtjoEVgyAoDLbhbPrNF7LxHiTbCvI4WydjIHgCAsAyEBgAQAZCCwAIAOBBQBkILAAgAwEFgCQkcewBioPvlsxAMK2u/gunHPB5OJWjJ+wbeSKs1u3YnHqRT5whAUAZCCwAIAMBBYAkIHAAgAyEFgAQAYCCwDIMFutYefOnRUVFVa3ctWqVStXrjT4ZtsqK+RE5Ql7K1BpvAtHmdhWI8S2QhcWDWswG1gVFRVVVVVWtCxbOBy2ehMA4H44JQQAMhBYAEAGAgsAyEBgAQAZCCwAIMOSSShM3tFsaWkp+J1HZx+RN75O23pkRWEGk5wdEWJFN0023mTdEWfH9xjvZl5whAUAZCCwAIAMBBYAkIHAAgAyEFgAQAYCCwDIsGRYg7NIP99vRd+tKDlg2zutYLxJzk7/Ydv+dOEcKwPBERYAkIHAAgAyEFgAQAYCCwDIQGABABkILAAgowiHNYzk4QJWPEzvwm7mZEVlBZP1Epwd65CTbSMYLBq5giMsACADgQUAZCCwAIAMBBYAkIHAAgAyEFgAQIYlwxpaWlrMLG5yBgrbSvfbVnKASsED25j8iE2u0/jiJsc6uLBWhLPrZBYFVsHnvAEAYDglBABCEFgAQAYCCwDIQGABABlmL7qvWrUqHA5b3cotW7bYszsAwM24FXeIbUPl0XPbahsY76ZtU3W48+64ma0bZ9tnZFtdB9tKoQwEp4QAQAYCCwDIQGABABkILAAgA4EFAGQgsACAjDyGNQAAOAtHWABABgILAMhAYAEAGQgsACADgQUAZCCwAIAMBBYAkIHAAgAyEFgAQAYCCwDIQGABABkILAAgA4EFAGQgsACAjP8Prqme11Be/zoAAAAASUVORK5CYII=",Se=Mt.p+"static/newqrcode.a8740efb.png",Xe=Mt(32637),pe=Mt(67294),Ht=(re,oe,$t)=>new Promise((Le,de)=>{var Fe=jn=>{try{De($t.next(jn))}catch(Bn){de(Bn)}},rn=jn=>{try{De($t.throw(jn))}catch(Bn){de(Bn)}},De=jn=>jn.done?Le(jn.value):Promise.resolve(jn.value).then(Fe,rn);De(($t=$t.apply(re,oe)).next())});const Dt=(re,oe=!1,$t=!1,Le="",de=!1)=>!!(nt(re)&&ht(re,oe,$t,Le,de)),nt=re=>(0,Pe.bg)()?!0:(re({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1),et=re=>{var oe,$t,Le;const{user:de}=(0,Pt.getDvaApp)()._store.getState();(0,Pe.bg)()&&!(($t=(oe=de==null?void 0:de.userInfo)==null?void 0:oe.course)!=null&&$t.course_public)&&!((Le=de==null?void 0:de.userInfo)!=null&&Le.profile_completed)&&re({type:"user/showUpdateProfilePanel",payload:{showUpdateProfilePanel:!0,showClosable:!0,backurl:"/account/profile/edit",isCurrentPage:!0}})},ht=(re,oe=!1,$t=!0,Le="",de=!1)=>{var Fe;const{user:rn}=(0,Pt.getDvaApp)()._store.getState();return(Fe=rn.userInfo)!=null&&Fe.profile_completed?!0:($t?re({type:"user/showUpdateProfilePanel",payload:{showUpdateProfilePanel:!0,showClosable:!0,backurl:Le,isCurrentPage:de}}):ne.default.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:()=>{(0,Bt.xg)("/account/profile/edit"),lt()}}),!1)},lt=()=>{ne.default.success({title:"\u63D0\u793A",width:430,closable:!0,centered:!0,content:"\u5DF2\u5B8C\u5584\u4E2A\u4EBA\u8D44\u6599\uFF1F\u8BF7\u5237\u65B0\u9875\u9762",okText:"\u7ACB\u5373\u5237\u65B0",icon:null,onOk:()=>{location.reload()}})},gt=()=>{ne.default.warning({title:"\u63D0\u793A",icon:null,width:400,content:pe.createElement("div",{style:{textAlign:"center"}},pe.createElement("div",{style:{color:"#191919",fontSize:14,marginBottom:15,textAlign:"left"}},"\u8001\u5E08\u60A8\u597D\uFF0C\u60A8\u7684\u8BFE\u5802\u8BD5\u7528\u671F\u5DF2\u7ED3\u675F\uFF0C\u76F8\u5173\u529F\u80FD\u88AB\u9650\u5236\u3002 \u5982\u9700\u7EE7\u7EED\u4F7F\u7528\uFF0C\u8BF7\u5C3D\u5FEB\u5BF9\u63A5\u4EBA\u5DE5\u652F\u6301\uFF01"),pe.createElement("img",{style:{border:"1px solid #D8E3E9",width:190,height:180},src:Xe}),pe.createElement("div",{style:{color:"#666666",fontSize:14,marginTop:15}},"\u6DFB\u52A0\u5BA2\u670D\u4EBA\u5458\u5FAE\u4FE1\uFF0C\u83B7\u5F97\u66F4\u591A\u652F\u6301"))})},mt=()=>{var re;const{user:oe}=(0,Pt.getDvaApp)()._store.getState();return(re=oe.userInfo)!=null&&re.professional_certification?!0:(ne.default.confirm({title:"\u63D0\u793A",centered:!0,content:pe.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:()=>{(0,Bt.xg)("/account/certification")}}),!1)},xt=()=>(0,Pe.V9)()?!0:(ne.default.warning({centered:!0,width:530,title:"\u63D0\u793A",content:pe.createElement("div",{className:"tc",style:{marginLeft:-38}},pe.createElement("p",null,"\u626B\u7801\u52A0\u5934\u6B4C\u52A9\u6559\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650"),pe.createElement("img",{src:Se,width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1),St=(re,oe)=>re?!0:(ne.default.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:pe.createElement("div",null,pe.createElement("p",null,oe||"\u8BE5\u5B9E\u8DF5\u8D44\u6E90\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002"),pe.createElement("div",{style:{marginLeft:"110px"}},pe.createElement("img",{src:se,width:200}),pe.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:()=>{(0,Bt.xg)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1),zt=re=>{ne.default.info({title:"\u8054\u7CFB\u5E73\u53F0\u8FD0\u8425",icon:null,width:615,centered:!0,content:pe.createElement("div",null,pe.createElement("div",null,pe.createElement("p",{style:{color:"#191919",fontWeight:400,fontSize:14}},"\u201C\u4FDD\u5B58\u5B9E\u9A8C\u4E34\u65F6\u6570\u636E\u201D\u529F\u80FD\u4E3A\u4ED8\u8D39\u529F\u80FD\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u8FD0\u8425\u8FDB\u884C\u5F00\u901A\u3002"),pe.createElement(Ne.Z,null),pe.createElement("p",{style:{color:"#666666",fontSize:12}}," ",pe.createElement("span",{style:{display:"inline-flex",width:14,height:14,borderRadius:2,background:"#F3F3F3",justifyContent:"center",color:"#666666",fontSize:12,lineHeight:"14px",marginRight:8}},"1")," \u56E0\u5E73\u53F0\u7684\u5B9E\u9A8C\u6570\u636E\u50A8\u5B58\u5BB9\u91CF\u548C\u6210\u672C\u6D88\u8017\u8F83\u5927\uFF0C\u5B9E\u8DF5\u9879\u76EE\u9ED8\u8BA4\u4FDD\u5B58\u5B9E\u9A8C\u73AF\u5883\u4E2D\u4E34\u65F6\u6570\u636E ",pe.createElement("a",null,re),"\u5929\u3002"),pe.createElement("p",{style:{color:"#666666",fontSize:12}}," ",pe.createElement("span",{style:{display:"inline-flex",width:14,height:14,borderRadius:2,background:"#F3F3F3",justifyContent:"center",color:"#666666",fontSize:12,lineHeight:"14px",marginRight:8}},"2"),"\u82E5\u60A8\u9700\u8981\u4E2A\u6027\u5316\u7684\u6570\u636E\u4FDD\u5B58\u5468\u671F\u670D\u52A1\uFF0C\u6211\u4EEC\u53EF\u4EE5\u63D0\u4F9B\u76F8\u5173\u6280\u672F\u652F\u6301\uFF0C\u5E76\u6839\u636E\u60A8\u7684\u9700\u6C42\u6536\u53D6\u5B9A\u5236\u8D39\u7528\u3002")),pe.createElement("div",{style:{textAlign:"center",marginTop:30}},pe.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:ue,alt:"\u4E8C\u7EF4\u7801",width:160})))})},Jt=(re,oe="")=>{const{shixunsDetail:{detail:$t}}=(0,Pt.getDvaApp)()._store.getState();if(($t==null?void 0:$t.public)===2||($t==null?void 0:$t.public)===1||($t==null?void 0:$t.shixun_status)===3){let Le="";return($t==null?void 0:$t.public)===2&&(Le="\u5DF2\u516C\u5F00"),($t==null?void 0:$t.public)===1&&(Le="\u5F85\u5BA1\u6838"),($t==null?void 0:$t.shixun_status)===3&&(Le="\u5DF2\u5173\u95ED"),ne.default.info({centered:!0,icon:pe.createElement(Ut.Z,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:pe.createElement("div",{className:"tc",style:{marginLeft:-38}},pe.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},pe.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",Le,"\uFF0C",oe,"\u3002"),pe.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),pe.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:ue,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0}return($t==null?void 0:$t.shixun_status)===2?(ne.default.confirm({centered:!0,icon:pe.createElement(Ut.Z,null),title:"\u63D0\u793A",content:pe.createElement("div",null,pe.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",oe,"\u3002"),pe.createElement("br",null),pe.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:()=>{ne.default.confirm({width:440,centered:!0,icon:pe.createElement(Ut.Z,{style:{color:"#faad14"}}),title:"\u63D0\u793A",content:"\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u5B66\u5458\u5C06\u65E0\u6CD5\u8FDB\u884C\u7EC3\u4E60\u3002\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F",okText:"\u786E\u5B9A\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:()=>Ht(void 0,null,function*(){(yield re({type:"shixunsDetail/cancelRelease",payload:{id:$t==null?void 0:$t.identifier}})).status!==401&&(Be.ZP.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),re({type:"shixunsDetail/getShixunsDetail",payload:{id:$t==null?void 0:$t.identifier}}),re({type:"practiceSetting/getCommonData",payload:{id:$t==null?void 0:$t.identifier}}))})})}}),!0):!1}},40411:function(un,Nn,Mt){"use strict";Mt.d(Nn,{Z:function(){return _t}});var Pt=Mt(67294),ne=Mt(13144),Ne=Mt.n(ne),Be=Mt(15602),Pe=Mt(98787),Bt=Mt(96159),Ut=Mt(53124),ue=Mt(16777),se=Mt(14747),Se=Mt(98719),Xe=Mt(43259),pe=Mt(83559);const Ht=new ue.Keyframes("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),Dt=new ue.Keyframes("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),nt=new ue.Keyframes("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),et=new ue.Keyframes("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),ht=new ue.Keyframes("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),lt=new ue.Keyframes("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),gt=Tt=>{const{componentCls:ce,iconCls:_e,antCls:Ye,badgeShadowSize:xe,textFontSize:on,textFontSizeSM:tn,statusSize:Cn,dotSize:Ie,textFontWeight:ve,indicatorHeight:ze,indicatorHeightSM:je,marginXS:He,calc:Ot}=Tt,Lt=`${Ye}-scroll-number`,wt=(0,Se.Z)(Tt,(Ft,Wt)=>{let{darkColor:kt}=Wt;return{[`&${ce} ${ce}-color-${Ft}`]:{background:kt,[`&:not(${ce}-count)`]:{color:kt},"a:hover &":{background:kt}}}});return{[ce]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,se.Wf)(Tt)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${ce}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:Tt.indicatorZIndex,minWidth:ze,height:ze,color:Tt.badgeTextColor,fontWeight:ve,fontSize:on,lineHeight:(0,ue.unit)(ze),whiteSpace:"nowrap",textAlign:"center",background:Tt.badgeColor,borderRadius:Ot(ze).div(2).equal(),boxShadow:`0 0 0 ${(0,ue.unit)(xe)} ${Tt.badgeShadowColor}`,transition:`background ${Tt.motionDurationMid}`,a:{color:Tt.badgeTextColor},"a:hover":{color:Tt.badgeTextColor},"a:hover &":{background:Tt.badgeColorHover}},[`${ce}-count-sm`]:{minWidth:je,height:je,fontSize:tn,lineHeight:(0,ue.unit)(je),borderRadius:Ot(je).div(2).equal()},[`${ce}-multiple-words`]:{padding:`0 ${(0,ue.unit)(Tt.paddingXS)}`,bdi:{unicodeBidi:"plaintext"}},[`${ce}-dot`]:{zIndex:Tt.indicatorZIndex,width:Ie,minWidth:Ie,height:Ie,background:Tt.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${(0,ue.unit)(xe)} ${Tt.badgeShadowColor}`},[`${ce}-count, ${ce}-dot, ${Lt}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${_e}-spin`]:{animationName:lt,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${ce}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${ce}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:Cn,height:Cn,verticalAlign:"middle",borderRadius:"50%"},[`${ce}-status-success`]:{backgroundColor:Tt.colorSuccess},[`${ce}-status-processing`]:{overflow:"visible",color:Tt.colorInfo,backgroundColor:Tt.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:xe,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:Ht,animationDuration:Tt.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${ce}-status-default`]:{backgroundColor:Tt.colorTextPlaceholder},[`${ce}-status-error`]:{backgroundColor:Tt.colorError},[`${ce}-status-warning`]:{backgroundColor:Tt.colorWarning},[`${ce}-status-text`]:{marginInlineStart:He,color:Tt.colorText,fontSize:Tt.fontSize}}}),wt),{[`${ce}-zoom-appear, ${ce}-zoom-enter`]:{animationName:Dt,animationDuration:Tt.motionDurationSlow,animationTimingFunction:Tt.motionEaseOutBack,animationFillMode:"both"},[`${ce}-zoom-leave`]:{animationName:nt,animationDuration:Tt.motionDurationSlow,animationTimingFunction:Tt.motionEaseOutBack,animationFillMode:"both"},[`&${ce}-not-a-wrapper`]:{[`${ce}-zoom-appear, ${ce}-zoom-enter`]:{animationName:et,animationDuration:Tt.motionDurationSlow,animationTimingFunction:Tt.motionEaseOutBack},[`${ce}-zoom-leave`]:{animationName:ht,animationDuration:Tt.motionDurationSlow,animationTimingFunction:Tt.motionEaseOutBack},[`&:not(${ce}-status)`]:{verticalAlign:"middle"},[`${Lt}-custom-component, ${ce}-count`]:{transform:"none"},[`${Lt}-custom-component, ${Lt}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[Lt]:{overflow:"hidden",transition:`all ${Tt.motionDurationMid} ${Tt.motionEaseOutBack}`,[`${Lt}-only`]:{position:"relative",display:"inline-block",height:ze,transition:`all ${Tt.motionDurationSlow} ${Tt.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${Lt}-only-unit`]:{height:ze,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${Lt}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${ce}-count, ${ce}-dot, ${Lt}-custom-component`]:{transform:"translate(-50%, -50%)"}}})}},mt=Tt=>{const{fontHeight:ce,lineWidth:_e,marginXS:Ye,colorBorderBg:xe}=Tt,on=ce,tn=_e,Cn=Tt.colorTextLightSolid,Ie=Tt.colorError,ve=Tt.colorErrorHover;return(0,Xe.mergeToken)(Tt,{badgeFontHeight:on,badgeShadowSize:tn,badgeTextColor:Cn,badgeColor:Ie,badgeColorHover:ve,badgeShadowColor:xe,badgeProcessingDuration:"1.2s",badgeRibbonOffset:Ye,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},xt=Tt=>{const{fontSize:ce,lineHeight:_e,fontSizeSM:Ye,lineWidth:xe}=Tt;return{indicatorZIndex:"auto",indicatorHeight:Math.round(ce*_e)-2*xe,indicatorHeightSM:ce,dotSize:Ye/2,textFontSize:Ye,textFontSizeSM:Ye,textFontWeight:"normal",statusSize:Ye/2}};var St=(0,pe.I$)("Badge",Tt=>{const ce=mt(Tt);return gt(ce)},xt);const zt=Tt=>{const{antCls:ce,badgeFontHeight:_e,marginXS:Ye,badgeRibbonOffset:xe,calc:on}=Tt,tn=`${ce}-ribbon`,Cn=`${ce}-ribbon-wrapper`,Ie=(0,Se.Z)(Tt,(ve,ze)=>{let{darkColor:je}=ze;return{[`&${tn}-color-${ve}`]:{background:je,color:je}}});return{[Cn]:{position:"relative"},[tn]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,se.Wf)(Tt)),{position:"absolute",top:Ye,padding:`0 ${(0,ue.unit)(Tt.paddingXS)}`,color:Tt.colorPrimary,lineHeight:(0,ue.unit)(_e),whiteSpace:"nowrap",backgroundColor:Tt.colorPrimary,borderRadius:Tt.borderRadiusSM,[`${tn}-text`]:{color:Tt.badgeTextColor},[`${tn}-corner`]:{position:"absolute",top:"100%",width:xe,height:xe,color:"currentcolor",border:`${(0,ue.unit)(on(xe).div(2).equal())} solid`,transform:Tt.badgeRibbonCornerTransform,transformOrigin:"top",filter:Tt.badgeRibbonCornerFilter}}),Ie),{[`&${tn}-placement-end`]:{insetInlineEnd:on(xe).mul(-1).equal(),borderEndEndRadius:0,[`${tn}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${tn}-placement-start`]:{insetInlineStart:on(xe).mul(-1).equal(),borderEndStartRadius:0,[`${tn}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}};var Jt=(0,pe.I$)(["Badge","Ribbon"],Tt=>{const ce=mt(Tt);return zt(ce)},xt),oe=Tt=>{const{className:ce,prefixCls:_e,style:Ye,color:xe,children:on,text:tn,placement:Cn="end",rootClassName:Ie}=Tt,{getPrefixCls:ve,direction:ze}=Pt.useContext(Ut.E_),je=ve("ribbon",_e),He=`${je}-wrapper`,[Ot,Lt,wt]=Jt(je,He),Ft=(0,Pe.o2)(xe,!1),Wt=Ne()(je,`${je}-placement-${Cn}`,{[`${je}-rtl`]:ze==="rtl",[`${je}-color-${xe}`]:Ft},ce),kt={},Xt={};return xe&&!Ft&&(kt.background=xe,Xt.color=xe),Ot(Pt.createElement("div",{className:Ne()(He,Ie,Lt,wt)},on,Pt.createElement("div",{className:Ne()(Wt,Lt),style:Object.assign(Object.assign({},kt),Ye)},Pt.createElement("span",{className:`${je}-text`},tn),Pt.createElement("div",{className:`${je}-corner`,style:Xt}))))};const $t=Tt=>{const{prefixCls:ce,value:_e,current:Ye,offset:xe=0}=Tt;let on;return xe&&(on={position:"absolute",top:`${xe}00%`,left:0}),Pt.createElement("span",{style:on,className:Ne()(`${ce}-only-unit`,{current:Ye})},_e)};function Le(Tt,ce,_e){let Ye=Tt,xe=0;for(;(Ye+10)%10!==ce;)Ye+=_e,xe+=_e;return xe}var Fe=Tt=>{const{prefixCls:ce,count:_e,value:Ye}=Tt,xe=Number(Ye),on=Math.abs(_e),[tn,Cn]=Pt.useState(xe),[Ie,ve]=Pt.useState(on),ze=()=>{Cn(xe),ve(on)};Pt.useEffect(()=>{const Ot=setTimeout(ze,1e3);return()=>clearTimeout(Ot)},[xe]);let je,He;if(tn===xe||Number.isNaN(xe)||Number.isNaN(tn))je=[Pt.createElement($t,Object.assign({},Tt,{key:xe,current:!0}))],He={transition:"none"};else{je=[];const Ot=xe+10,Lt=[];for(let kt=xe;kt<=Ot;kt+=1)Lt.push(kt);const wt=Iekt%10===tn);je=(wt<0?Lt.slice(0,Ft+1):Lt.slice(Ft)).map((kt,Xt)=>{const $e=kt%10;return Pt.createElement($t,Object.assign({},Tt,{key:kt,value:$e,offset:wt<0?Xt-Ft:Xt,current:Xt===Ft}))}),He={transform:`translateY(${-Le(tn,xe,wt)}00%)`}}return Pt.createElement("span",{className:`${ce}-only`,style:He,onTransitionEnd:ze},je)},rn=function(Tt,ce){var _e={};for(var Ye in Tt)Object.prototype.hasOwnProperty.call(Tt,Ye)&&ce.indexOf(Ye)<0&&(_e[Ye]=Tt[Ye]);if(Tt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var xe=0,Ye=Object.getOwnPropertySymbols(Tt);xe{const{prefixCls:_e,count:Ye,className:xe,motionClassName:on,style:tn,title:Cn,show:Ie,component:ve="sup",children:ze}=Tt,je=rn(Tt,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:He}=Pt.useContext(Ut.E_),Ot=He("scroll-number",_e),Lt=Object.assign(Object.assign({},je),{"data-show":Ie,style:tn,className:Ne()(Ot,xe,on),title:Cn});let wt=Ye;if(Ye&&Number(Ye)%1===0){const Ft=String(Ye).split("");wt=Pt.createElement("bdi",null,Ft.map((Wt,kt)=>Pt.createElement(Fe,{prefixCls:Ot,count:Number(Ye),value:Wt,key:Ft.length-kt})))}return tn!=null&&tn.borderColor&&(Lt.style=Object.assign(Object.assign({},tn),{boxShadow:`0 0 0 1px ${tn.borderColor} inset`})),ze?(0,Bt.Tm)(ze,Ft=>({className:Ne()(`${Ot}-custom-component`,Ft==null?void 0:Ft.className,on)})):Pt.createElement(ve,Object.assign({},Lt,{ref:ce}),wt)}),Bn=function(Tt,ce){var _e={};for(var Ye in Tt)Object.prototype.hasOwnProperty.call(Tt,Ye)&&ce.indexOf(Ye)<0&&(_e[Ye]=Tt[Ye]);if(Tt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var xe=0,Ye=Object.getOwnPropertySymbols(Tt);xe{var _e,Ye,xe,on,tn;const{prefixCls:Cn,scrollNumberPrefixCls:Ie,children:ve,status:ze,text:je,color:He,count:Ot=null,overflowCount:Lt=99,dot:wt=!1,size:Ft="default",title:Wt,offset:kt,style:Xt,className:$e,rootClassName:Je,classNames:fn,styles:Ve,showZero:Mn=!1}=Tt,Ue=Bn(Tt,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:ti,direction:Qn,badge:Hn}=Pt.useContext(Ut.E_),pn=ti("badge",Cn),[gi,Mi,In]=St(pn),ei=Ot>Lt?`${Lt}+`:Ot,Ki=ei==="0"||ei===0,hi=Ot===null||Ki&&!Mn,$i=(ze!=null||He!=null)&&hi,pr=wt&&!Ki,rr=pr?"":ei,ki=(0,Pt.useMemo)(()=>(rr==null||rr===""||Ki&&!Mn)&&!pr,[rr,Ki,Mn,pr]),sr=(0,Pt.useRef)(Ot);ki||(sr.current=Ot);const Ur=sr.current,Jo=(0,Pt.useRef)(rr);ki||(Jo.current=rr);const Rr=Jo.current,To=(0,Pt.useRef)(pr);ki||(To.current=pr);const pa=(0,Pt.useMemo)(()=>{if(!kt)return Object.assign(Object.assign({},Hn==null?void 0:Hn.style),Xt);const Xn={marginTop:kt[1]};return Qn==="rtl"?Xn.left=parseInt(kt[0],10):Xn.right=-parseInt(kt[0],10),Object.assign(Object.assign(Object.assign({},Xn),Hn==null?void 0:Hn.style),Xt)},[Qn,kt,Xt,Hn==null?void 0:Hn.style]),co=Wt!=null?Wt:typeof Ur=="string"||typeof Ur=="number"?Ur:void 0,Xi=ki||!je?null:Pt.createElement("span",{className:`${pn}-status-text`},je),bn=!Ur||typeof Ur!="object"?void 0:(0,Bt.Tm)(Ur,Xn=>({style:Object.assign(Object.assign({},pa),Xn.style)})),bt=(0,Pe.o2)(He,!1),wn=Ne()(fn==null?void 0:fn.indicator,(_e=Hn==null?void 0:Hn.classNames)===null||_e===void 0?void 0:_e.indicator,{[`${pn}-status-dot`]:$i,[`${pn}-status-${ze}`]:!!ze,[`${pn}-color-${He}`]:bt}),Fn={};He&&!bt&&(Fn.color=He,Fn.background=He);const Un=Ne()(pn,{[`${pn}-status`]:$i,[`${pn}-not-a-wrapper`]:!ve,[`${pn}-rtl`]:Qn==="rtl"},$e,Je,Hn==null?void 0:Hn.className,(Ye=Hn==null?void 0:Hn.classNames)===null||Ye===void 0?void 0:Ye.root,fn==null?void 0:fn.root,Mi,In);if(!ve&&$i){const Xn=pa.color;return gi(Pt.createElement("span",Object.assign({},Ue,{className:Un,style:Object.assign(Object.assign(Object.assign({},Ve==null?void 0:Ve.root),(xe=Hn==null?void 0:Hn.styles)===null||xe===void 0?void 0:xe.root),pa)}),Pt.createElement("span",{className:wn,style:Object.assign(Object.assign(Object.assign({},Ve==null?void 0:Ve.indicator),(on=Hn==null?void 0:Hn.styles)===null||on===void 0?void 0:on.indicator),Fn)}),je&&Pt.createElement("span",{style:{color:Xn},className:`${pn}-status-text`},je)))}return gi(Pt.createElement("span",Object.assign({ref:ce},Ue,{className:Un,style:Object.assign(Object.assign({},(tn=Hn==null?void 0:Hn.styles)===null||tn===void 0?void 0:tn.root),Ve==null?void 0:Ve.root)}),ve,Pt.createElement(Be.default,{visible:!ki,motionName:`${pn}-zoom`,motionAppear:!1,motionDeadline:1e3},Xn=>{let{className:ai}=Xn;var Tn,Di;const te=ti("scroll-number",Ie),le=To.current,ae=Ne()(fn==null?void 0:fn.indicator,(Tn=Hn==null?void 0:Hn.classNames)===null||Tn===void 0?void 0:Tn.indicator,{[`${pn}-dot`]:le,[`${pn}-count`]:!le,[`${pn}-count-sm`]:Ft==="small",[`${pn}-multiple-words`]:!le&&Rr&&Rr.toString().length>1,[`${pn}-status-${ze}`]:!!ze,[`${pn}-color-${He}`]:bt});let Ae=Object.assign(Object.assign(Object.assign({},Ve==null?void 0:Ve.indicator),(Di=Hn==null?void 0:Hn.styles)===null||Di===void 0?void 0:Di.indicator),pa);return He&&!bt&&(Ae=Ae||{},Ae.background=He),Pt.createElement(jn,{prefixCls:te,show:!ki,motionClassName:ai,className:ae,count:Rr,title:co,style:Ae,key:"scrollNumber"},bn)}),Xi))});Zn.Ribbon=oe;var _t=Zn},56672:function(un,Nn,Mt){"use strict";Mt.d(Nn,{Z:function(){return Di}});var Pt=Mt(67294),ne=Mt(13144),Ne=Mt.n(ne),Be=Mt(1413),Pe=Mt(4942),Bt=Mt(74902),Ut=Mt(71002),ue=Mt(97685),se=Mt(94184),Se=Mt.n(se);function Xe(te){var le=Pt.useRef();le.current=te;var ae=Pt.useCallback(function(){for(var Ae,Sn=arguments.length,An=new Array(Sn),En=0;En2&&arguments[2]!==void 0?arguments[2]:!1,Ae=new Set;function Sn(An,En){var ke=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,cn=Ae.has(An);if(de(!cn,"Warning: There may be circular references"),cn)return!1;if(An===En)return!0;if(ae&&ke>1)return!1;Ae.add(An);var _n=ke+1;if(Array.isArray(An)){if(!Array.isArray(En)||An.length!==En.length)return!1;for(var vi=0;vi=Tt.F1&&ae<=Tt.F12)return!1;switch(ae){case Tt.ALT:case Tt.CAPS_LOCK:case Tt.CONTEXT_MENU:case Tt.CTRL:case Tt.DOWN:case Tt.END:case Tt.ESC:case Tt.HOME:case Tt.INSERT:case Tt.LEFT:case Tt.MAC_FF_META:case Tt.META:case Tt.NUMLOCK:case Tt.NUM_CENTER:case Tt.PAGE_DOWN:case Tt.PAGE_UP:case Tt.PAUSE:case Tt.PRINT_SCREEN:case Tt.RIGHT:case Tt.SHIFT:case Tt.UP:case Tt.WIN_KEY:case Tt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(le){if(le>=Tt.ZERO&&le<=Tt.NINE||le>=Tt.NUM_ZERO&&le<=Tt.NUM_MULTIPLY||le>=Tt.A&&le<=Tt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&le===0)return!0;switch(le){case Tt.SPACE:case Tt.QUESTION_MARK:case Tt.NUM_PLUS:case Tt.NUM_MINUS:case Tt.NUM_PERIOD:case Tt.NUM_DIVISION:case Tt.SEMICOLON:case Tt.DASH:case Tt.EQUALS:case Tt.COMMA:case Tt.PERIOD:case Tt.SLASH:case Tt.APOSTROPHE:case Tt.SINGLE_QUOTE:case Tt.OPEN_SQUARE_BRACKET:case Tt.BACKSLASH:case Tt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},ce=Tt,_e=Pt.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),Ye=_e,xe=Pt.createContext({}),on=["prefixCls","value","valueIndex","onStartMove","onDelete","style","render","dragging","draggingDelete","onOffsetChange","onChangeComplete","onFocus","onMouseEnter"],tn=Pt.forwardRef(function(te,le){var ae=te.prefixCls,Ae=te.value,Sn=te.valueIndex,An=te.onStartMove,En=te.onDelete,ke=te.style,cn=te.render,_n=te.dragging,vi=te.draggingDelete,mn=te.onOffsetChange,Oe=te.onChangeComplete,ni=te.onFocus,Pi=te.onMouseEnter,Li=(0,jn.Z)(te,on),qe=Pt.useContext(Ye),oi=qe.min,Ni=qe.max,gr=qe.direction,xr=qe.disabled,Si=qe.keyboard,Fi=qe.range,Gi=qe.tabIndex,Mr=qe.ariaLabelForHandle,hr=qe.ariaLabelledByForHandle,Yn=qe.ariaRequired,zi=qe.ariaValueTextFormatterForHandle,qo=qe.styles,sa=qe.classNames,la="".concat(ae,"-handle"),Ke=function(Ln){xr||An(Ln,Sn)},ur=function(Ln){ni==null||ni(Ln,Sn)},Tr=function(Ln){Pi(Ln,Sn)},or=function(Ln){if(!xr&&Si){var $r=null;switch(Ln.which||Ln.keyCode){case ce.LEFT:$r=gr==="ltr"||gr==="btt"?-1:1;break;case ce.RIGHT:$r=gr==="ltr"||gr==="btt"?1:-1;break;case ce.UP:$r=gr!=="ttb"?1:-1;break;case ce.DOWN:$r=gr!=="ttb"?-1:1;break;case ce.HOME:$r="min";break;case ce.END:$r="max";break;case ce.PAGE_UP:$r=2;break;case ce.PAGE_DOWN:$r=-2;break;case ce.BACKSPACE:case ce.DELETE:En(Sn);break}$r!==null&&(Ln.preventDefault(),mn($r,Sn))}},Vo=function(Ln){switch(Ln.which||Ln.keyCode){case ce.LEFT:case ce.RIGHT:case ce.UP:case ce.DOWN:case ce.HOME:case ce.END:case ce.PAGE_UP:case ce.PAGE_DOWN:Oe==null||Oe();break}},eo=Zn(gr,Ae,oi,Ni),uo={};if(Sn!==null){var Xr;uo={tabIndex:xr?null:_t(Gi,Sn),role:"slider","aria-valuemin":oi,"aria-valuemax":Ni,"aria-valuenow":Ae,"aria-disabled":xr,"aria-label":_t(Mr,Sn),"aria-labelledby":_t(hr,Sn),"aria-required":_t(Yn,Sn),"aria-valuetext":(Xr=_t(zi,Sn))===null||Xr===void 0?void 0:Xr(Ae),"aria-orientation":gr==="ltr"||gr==="rtl"?"horizontal":"vertical",onMouseDown:Ke,onTouchStart:Ke,onFocus:ur,onMouseEnter:Tr,onKeyDown:or,onKeyUp:Vo}}var Ir=Pt.createElement("div",(0,De.Z)({ref:le,className:Se()(la,(0,Pe.Z)((0,Pe.Z)((0,Pe.Z)({},"".concat(la,"-").concat(Sn+1),Sn!==null&&Fi),"".concat(la,"-dragging"),_n),"".concat(la,"-dragging-delete"),vi),sa.handle),style:(0,Be.Z)((0,Be.Z)((0,Be.Z)({},eo),ke),qo.handle)},uo,Li));return cn&&(Ir=cn(Ir,{index:Sn,prefixCls:ae,value:Ae,dragging:_n,draggingDelete:vi})),Ir}),Cn=tn,Ie=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","activeHandleRender","draggingIndex","draggingDelete","onFocus"],ve=Pt.forwardRef(function(te,le){var ae=te.prefixCls,Ae=te.style,Sn=te.onStartMove,An=te.onOffsetChange,En=te.values,ke=te.handleRender,cn=te.activeHandleRender,_n=te.draggingIndex,vi=te.draggingDelete,mn=te.onFocus,Oe=(0,jn.Z)(te,Ie),ni=Pt.useRef({}),Pi=Pt.useState(!1),Li=(0,ue.Z)(Pi,2),qe=Li[0],oi=Li[1],Ni=Pt.useState(-1),gr=(0,ue.Z)(Ni,2),xr=gr[0],Si=gr[1],Fi=function(zi){Si(zi),oi(!0)},Gi=function(zi,qo){Fi(qo),mn==null||mn(zi)},Mr=function(zi,qo){Fi(qo)};Pt.useImperativeHandle(le,function(){return{focus:function(zi){var qo;(qo=ni.current[zi])===null||qo===void 0||qo.focus()},hideHelp:function(){(0,Bn.flushSync)(function(){oi(!1)})}}});var hr=(0,Be.Z)({prefixCls:ae,onStartMove:Sn,onOffsetChange:An,render:ke,onFocus:Gi,onMouseEnter:Mr},Oe);return Pt.createElement(Pt.Fragment,null,En.map(function(Yn,zi){var qo=_n===zi;return Pt.createElement(Cn,(0,De.Z)({ref:function(la){la?ni.current[zi]=la:delete ni.current[zi]},dragging:qo,draggingDelete:qo&&vi,style:_t(Ae,zi),key:zi,value:Yn,valueIndex:zi},hr))}),cn&&qe&&Pt.createElement(Cn,(0,De.Z)({key:"a11y"},hr,{value:En[xr],valueIndex:null,dragging:_n!==-1,draggingDelete:vi,render:cn,style:{pointerEvents:"none"},tabIndex:null,"aria-hidden":!0})))}),ze=ve,je=function(le){var ae=le.prefixCls,Ae=le.style,Sn=le.children,An=le.value,En=le.onClick,ke=Pt.useContext(Ye),cn=ke.min,_n=ke.max,vi=ke.direction,mn=ke.includedStart,Oe=ke.includedEnd,ni=ke.included,Pi="".concat(ae,"-text"),Li=Zn(vi,An,cn,_n);return Pt.createElement("span",{className:Se()(Pi,(0,Pe.Z)({},"".concat(Pi,"-active"),ni&&mn<=An&&An<=Oe)),style:(0,Be.Z)((0,Be.Z)({},Li),Ae),onMouseDown:function(oi){oi.stopPropagation()},onClick:function(){En(An)}},Sn)},He=je,Ot=function(le){var ae=le.prefixCls,Ae=le.marks,Sn=le.onClick,An="".concat(ae,"-mark");return Ae.length?Pt.createElement("div",{className:An},Ae.map(function(En){var ke=En.value,cn=En.style,_n=En.label;return Pt.createElement(He,{key:ke,prefixCls:An,style:cn,value:ke,onClick:Sn},_n)})):null},Lt=Ot,wt=function(le){var ae=le.prefixCls,Ae=le.value,Sn=le.style,An=le.activeStyle,En=Pt.useContext(Ye),ke=En.min,cn=En.max,_n=En.direction,vi=En.included,mn=En.includedStart,Oe=En.includedEnd,ni="".concat(ae,"-dot"),Pi=vi&&mn<=Ae&&Ae<=Oe,Li=(0,Be.Z)((0,Be.Z)({},Zn(_n,Ae,ke,cn)),typeof Sn=="function"?Sn(Ae):Sn);return Pi&&(Li=(0,Be.Z)((0,Be.Z)({},Li),typeof An=="function"?An(Ae):An)),Pt.createElement("span",{className:Se()(ni,(0,Pe.Z)({},"".concat(ni,"-active"),Pi)),style:Li})},Ft=wt,Wt=function(le){var ae=le.prefixCls,Ae=le.marks,Sn=le.dots,An=le.style,En=le.activeStyle,ke=Pt.useContext(Ye),cn=ke.min,_n=ke.max,vi=ke.step,mn=Pt.useMemo(function(){var Oe=new Set;if(Ae.forEach(function(Pi){Oe.add(Pi.value)}),Sn&&vi!==null)for(var ni=cn;ni<=_n;)Oe.add(ni),ni+=vi;return Array.from(Oe)},[cn,_n,vi,Sn,Ae]);return Pt.createElement("div",{className:"".concat(ae,"-step")},mn.map(function(Oe){return Pt.createElement(Ft,{prefixCls:ae,key:Oe,value:Oe,style:An,activeStyle:En})}))},kt=Wt,Xt=function(le){var ae=le.prefixCls,Ae=le.style,Sn=le.start,An=le.end,En=le.index,ke=le.onStartMove,cn=le.replaceCls,_n=Pt.useContext(Ye),vi=_n.direction,mn=_n.min,Oe=_n.max,ni=_n.disabled,Pi=_n.range,Li=_n.classNames,qe="".concat(ae,"-track"),oi=an(Sn,mn,Oe),Ni=an(An,mn,Oe),gr=function(Gi){!ni&&ke&&ke(Gi,-1)},xr={};switch(vi){case"rtl":xr.right="".concat(oi*100,"%"),xr.width="".concat(Ni*100-oi*100,"%");break;case"btt":xr.bottom="".concat(oi*100,"%"),xr.height="".concat(Ni*100-oi*100,"%");break;case"ttb":xr.top="".concat(oi*100,"%"),xr.height="".concat(Ni*100-oi*100,"%");break;default:xr.left="".concat(oi*100,"%"),xr.width="".concat(Ni*100-oi*100,"%")}var Si=cn||Se()(qe,(0,Pe.Z)((0,Pe.Z)({},"".concat(qe,"-").concat(En+1),En!==null&&Pi),"".concat(ae,"-track-draggable"),ke),Li.track);return Pt.createElement("div",{className:Si,style:(0,Be.Z)((0,Be.Z)({},xr),Ae),onMouseDown:gr,onTouchStart:gr})},$e=Xt,Je=function(le){var ae=le.prefixCls,Ae=le.style,Sn=le.values,An=le.startPoint,En=le.onStartMove,ke=Pt.useContext(Ye),cn=ke.included,_n=ke.range,vi=ke.min,mn=ke.styles,Oe=ke.classNames,ni=Pt.useMemo(function(){if(!_n){if(Sn.length===0)return[];var Li=An!=null?An:vi,qe=Sn[0];return[{start:Math.min(Li,qe),end:Math.max(Li,qe)}]}for(var oi=[],Ni=0;NiVe&&vi3&&arguments[3]!==void 0?arguments[3]:"unit";if(typeof Li=="number"){var Ni,gr=Pi[qe],xr=gr+Li,Si=[];Ae.forEach(function(Yn){Si.push(Yn.value)}),Si.push(te,le),Si.push(ke(gr));var Fi=Li>0?1:-1;oi==="unit"?Si.push(ke(gr+Fi*ae)):Si.push(ke(xr)),Si=Si.filter(function(Yn){return Yn!==null}).filter(function(Yn){return Li<0?Yn<=gr:Yn>=gr}),oi==="unit"&&(Si=Si.filter(function(Yn){return Yn!==gr}));var Gi=oi==="unit"?gr:xr;Ni=Si[0];var Mr=Math.abs(Ni-Gi);if(Si.forEach(function(Yn){var zi=Math.abs(Yn-Gi);zi1){var hr=(0,Bt.Z)(Pi);return hr[qe]=Ni,ni(hr,Li-Fi,qe,oi)}return Ni}else{if(Li==="min")return te;if(Li==="max")return le}},vi=function(Pi,Li,qe){var oi=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",Ni=Pi[qe],gr=_n(Pi,Li,qe,oi);return{value:gr,changed:gr!==Ni}},mn=function(Pi){return An===null&&Pi===0||typeof An=="number"&&Pi3&&arguments[3]!==void 0?arguments[3]:"unit",Ni=Pi.map(cn),gr=Ni[qe],xr=_n(Ni,Li,qe,oi);if(Ni[qe]=xr,Sn===!1){var Si=An||0;qe>0&&Ni[qe-1]!==gr&&(Ni[qe]=Math.max(Ni[qe],Ni[qe-1]+Si)),qe0;hr-=1)for(var Yn=!0;mn(Ni[hr]-Ni[hr-1])&&Yn;){var zi=vi(Ni,-1,hr-1);Ni[hr-1]=zi.value,Yn=zi.changed}for(var qo=Ni.length-1;qo>0;qo-=1)for(var sa=!0;mn(Ni[qo]-Ni[qo-1])&&sa;){var la=vi(Ni,-1,qo-1);Ni[qo-1]=la.value,sa=la.changed}for(var Ke=0;Ke=0?Tr:!1},[Tr,Er]),ar=Pt.useMemo(function(){return Object.keys(Br||{}).map(function(Pa){var Qr=Br[Pa],ua={value:Number(Pa)};return Qr&&(0,Ut.Z)(Qr)==="object"&&!Pt.isValidElement(Qr)&&("label"in Qr||"style"in Qr)?(ua.style=Qr.style,ua.label=Qr.label):ua.label=Qr,ua}).filter(function(Pa){var Qr=Pa.label;return Qr||typeof Qr=="number"}).sort(function(Pa,Qr){return Pa.value-Qr.value})},[Br]),oo=Qn(er,Qi,Er,ar,Ke,hn),ca=(0,ue.Z)(oo,2),$o=ca[0],ia=ca[1],as=gt(Gi,{value:Fi}),Ks=(0,ue.Z)(as,2),vs=Ks[0],au=Ks[1],ks=Pt.useMemo(function(){var Pa=vs==null?[]:Array.isArray(vs)?vs:[vs],Qr=(0,ue.Z)(Pa,1),ua=Qr[0],Za=ua===void 0?er:ua,Xs=vs===null?[]:[Za];if(Eo){if(Xs=(0,Bt.Z)(Pa),hr||vs===void 0){var Nl=hr>=0?hr+1:2;for(Xs=Xs.slice(0,Nl);Xs.length=0&&Ao.current.focus(Pa)}zl(null)},[Gu]);var Zh=Pt.useMemo(function(){return os&&Er===null?!1:os},[os,Er]),Zu=Xe(function(Pa,Qr){so(Pa,Qr),zi==null||zi(en(ks))}),Bi=wl!==-1;Pt.useEffect(function(){if(!Bi){var Pa=ks.lastIndexOf(su);Ao.current.focus(Pa)}},[Bi]);var ds=Pt.useMemo(function(){return(0,Bt.Z)(ps).sort(function(Pa,Qr){return Pa-Qr})},[ps]),Ns=Pt.useMemo(function(){return Eo?[ds[0],ds[ds.length-1]]:[er,ds[0]]},[ds,Eo,er]),Xl=(0,ue.Z)(Ns,2),Ms=Xl[0],Fs=Xl[1];Pt.useImperativeHandle(le,function(){return{focus:function(){Ao.current.focus(0)},blur:function(){var Qr,ua=document,Za=ua.activeElement;(Qr=rs.current)!==null&&Qr!==void 0&&Qr.contains(Za)&&(Za==null||Za.blur())}}}),Pt.useEffect(function(){ni&&Ao.current.focus(0)},[]);var no=Pt.useMemo(function(){return{min:er,max:Qi,direction:Ls,disabled:vi,keyboard:Oe,step:Er,included:uo,includedStart:Ms,includedEnd:Fs,range:Eo,tabIndex:Ii,ariaLabelForHandle:Nr,ariaLabelledByForHandle:lr,ariaRequired:si,ariaValueTextFormatterForHandle:Zt,styles:ke||{},classNames:En||{}}},[er,Qi,Ls,vi,Oe,Er,uo,Ms,Fs,Eo,Ii,Nr,lr,si,Zt,ke,En]);return Pt.createElement(Ye.Provider,{value:no},Pt.createElement("div",{ref:rs,className:Se()(Ae,Sn,(0,Pe.Z)((0,Pe.Z)((0,Pe.Z)((0,Pe.Z)({},"".concat(Ae,"-disabled"),vi),"".concat(Ae,"-vertical"),Vo),"".concat(Ae,"-horizontal"),!Vo),"".concat(Ae,"-with-marks"),ar.length)),style:An,onMouseDown:ka,id:cn},Pt.createElement("div",{className:Se()("".concat(Ae,"-rail"),En==null?void 0:En.rail),style:(0,Be.Z)((0,Be.Z)({},Ln),ke==null?void 0:ke.rail)}),sn!==!1&&Pt.createElement(fn,{prefixCls:Ae,style:Ir,values:ks,startPoint:Xr,onStartMove:Zh?Zu:void 0}),Pt.createElement(kt,{prefixCls:Ae,marks:ar,dots:Ga,style:$r,activeStyle:Pn}),Pt.createElement(ze,{ref:Ao,prefixCls:Ae,style:Mo,values:ps,draggingIndex:wl,draggingDelete:Aa,onStartMove:Zu,onOffsetChange:Cl,onFocus:Pi,onBlur:Li,handleRender:Te,activeHandleRender:Ze,onChangeComplete:kl,onDelete:gs?xu:void 0}),Pt.createElement(Lt,{prefixCls:Ae,marks:ar,onClick:Do})))}),gi=pn,Mi=gi,In=Mt(96523),ei=Mt(98866),hi=(0,Pt.createContext)({}),$i=Mt(17799),pr=Mt(83062),ki=Pt.forwardRef((te,le)=>{const{open:ae,draggingDelete:Ae}=te,Sn=(0,Pt.useRef)(null),An=ae&&!Ae,En=(0,Pt.useRef)(null);function ke(){In.Z.cancel(En.current),En.current=null}function cn(){En.current=(0,In.Z)(()=>{var _n;(_n=Sn.current)===null||_n===void 0||_n.forceAlign(),En.current=null})}return Pt.useEffect(()=>(An?cn():ke(),ke),[An,te.title]),Pt.createElement(pr.Z,Object.assign({ref:(0,$i.sQ)(Sn,le)},te,{open:An}))}),sr=Mt(16777),Ur=Mt(24327),Jo=Mt(14747),Rr=Mt(83559),To=Mt(43259);const pa=te=>{const{componentCls:le,antCls:ae,controlSize:Ae,dotSize:Sn,marginFull:An,marginPart:En,colorFillContentHover:ke,handleColorDisabled:cn,calc:_n,handleSize:vi,handleSizeHover:mn,handleActiveColor:Oe,handleActiveOutlineColor:ni,handleLineWidth:Pi,handleLineWidthHover:Li,motionDurationMid:qe}=te;return{[le]:Object.assign(Object.assign({},(0,Jo.Wf)(te)),{position:"relative",height:Ae,margin:`${(0,sr.unit)(En)} ${(0,sr.unit)(An)}`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${(0,sr.unit)(An)} ${(0,sr.unit)(En)}`},[`${le}-rail`]:{position:"absolute",backgroundColor:te.railBg,borderRadius:te.borderRadiusXS,transition:`background-color ${qe}`},[`${le}-track,${le}-tracks`]:{position:"absolute",transition:`background-color ${qe}`},[`${le}-track`]:{backgroundColor:te.trackBg,borderRadius:te.borderRadiusXS},[`${le}-track-draggable`]:{boxSizing:"content-box",backgroundClip:"content-box",border:"solid rgba(0,0,0,0)"},"&:hover":{[`${le}-rail`]:{backgroundColor:te.railHoverBg},[`${le}-track`]:{backgroundColor:te.trackHoverBg},[`${le}-dot`]:{borderColor:ke},[`${le}-handle::after`]:{boxShadow:`0 0 0 ${(0,sr.unit)(Pi)} ${te.colorPrimaryBorderHover}`},[`${le}-dot-active`]:{borderColor:te.dotActiveBorderColor}},[`${le}-handle`]:{position:"absolute",width:vi,height:vi,outline:"none",userSelect:"none","&-dragging-delete":{opacity:0},"&::before":{content:'""',position:"absolute",insetInlineStart:_n(Pi).mul(-1).equal(),insetBlockStart:_n(Pi).mul(-1).equal(),width:_n(vi).add(_n(Pi).mul(2)).equal(),height:_n(vi).add(_n(Pi).mul(2)).equal(),backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:vi,height:vi,backgroundColor:te.colorBgElevated,boxShadow:`0 0 0 ${(0,sr.unit)(Pi)} ${te.handleColor}`,outline:"0px solid transparent",borderRadius:"50%",cursor:"pointer",transition:` inset-inline-start ${qe}, inset-block-start ${qe}, width ${qe}, height ${qe}, box-shadow ${qe}, outline ${qe} `},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:_n(mn).sub(vi).div(2).add(Li).mul(-1).equal(),insetBlockStart:_n(mn).sub(vi).div(2).add(Li).mul(-1).equal(),width:_n(mn).add(_n(Li).mul(2)).equal(),height:_n(mn).add(_n(Li).mul(2)).equal()},"&::after":{boxShadow:`0 0 0 ${(0,sr.unit)(Li)} ${Oe}`,outline:`6px solid ${ni}`,width:mn,height:mn,insetInlineStart:te.calc(vi).sub(mn).div(2).equal(),insetBlockStart:te.calc(vi).sub(mn).div(2).equal()}}},[`&-lock ${le}-handle`]:{"&::before, &::after":{transition:"none"}},[`${le}-mark`]:{position:"absolute",fontSize:te.fontSize},[`${le}-mark-text`]:{position:"absolute",display:"inline-block",color:te.colorTextDescription,textAlign:"center",wordBreak:"keep-all",cursor:"pointer",userSelect:"none","&-active":{color:te.colorText}},[`${le}-step`]:{position:"absolute",background:"transparent",pointerEvents:"none"},[`${le}-dot`]:{position:"absolute",width:Sn,height:Sn,backgroundColor:te.colorBgElevated,border:`${(0,sr.unit)(Pi)} solid ${te.dotBorderColor}`,borderRadius:"50%",cursor:"pointer",transition:`border-color ${te.motionDurationSlow}`,pointerEvents:"auto","&-active":{borderColor:te.dotActiveBorderColor}},[`&${le}-disabled`]:{cursor:"not-allowed",[`${le}-rail`]:{backgroundColor:`${te.railBg} !important`},[`${le}-track`]:{backgroundColor:`${te.trackBgDisabled} !important`},[` ${le}-dot `]:{backgroundColor:te.colorBgElevated,borderColor:te.trackBgDisabled,boxShadow:"none",cursor:"not-allowed"},[`${le}-handle::after`]:{backgroundColor:te.colorBgElevated,cursor:"not-allowed",width:vi,height:vi,boxShadow:`0 0 0 ${(0,sr.unit)(Pi)} ${cn}`,insetInlineStart:0,insetBlockStart:0},[` ${le}-mark-text, ${le}-dot `]:{cursor:"not-allowed !important"}},[`&-tooltip ${ae}-tooltip-inner`]:{minWidth:"unset"}})}},co=(te,le)=>{const{componentCls:ae,railSize:Ae,handleSize:Sn,dotSize:An,marginFull:En,calc:ke}=te,cn=le?"paddingBlock":"paddingInline",_n=le?"width":"height",vi=le?"height":"width",mn=le?"insetBlockStart":"insetInlineStart",Oe=le?"top":"insetInlineStart",ni=ke(Ae).mul(3).sub(Sn).div(2).equal(),Pi=ke(Sn).sub(Ae).div(2).equal(),Li=le?{borderWidth:`${(0,sr.unit)(Pi)} 0`,transform:`translateY(${(0,sr.unit)(ke(Pi).mul(-1).equal())})`}:{borderWidth:`0 ${(0,sr.unit)(Pi)}`,transform:`translateX(${(0,sr.unit)(te.calc(Pi).mul(-1).equal())})`};return{[cn]:Ae,[vi]:ke(Ae).mul(3).equal(),[`${ae}-rail`]:{[_n]:"100%",[vi]:Ae},[`${ae}-track,${ae}-tracks`]:{[vi]:Ae},[`${ae}-track-draggable`]:Object.assign({},Li),[`${ae}-handle`]:{[mn]:ni},[`${ae}-mark`]:{insetInlineStart:0,top:0,[Oe]:ke(Ae).mul(3).add(le?0:En).equal(),[_n]:"100%"},[`${ae}-step`]:{insetInlineStart:0,top:0,[Oe]:Ae,[_n]:"100%",[vi]:Ae},[`${ae}-dot`]:{position:"absolute",[mn]:ke(Ae).sub(An).div(2).equal()}}},Xi=te=>{const{componentCls:le,marginPartWithMark:ae}=te;return{[`${le}-horizontal`]:Object.assign(Object.assign({},co(te,!0)),{[`&${le}-with-marks`]:{marginBottom:ae}})}},bn=te=>{const{componentCls:le}=te;return{[`${le}-vertical`]:Object.assign(Object.assign({},co(te,!1)),{height:"100%"})}},bt=te=>{const ae=te.controlHeightLG/4,Ae=te.controlHeightSM/2,Sn=te.lineWidth+1,An=te.lineWidth+1*1.5,En=te.colorPrimary,ke=new Ur.FastColor(En).setA(.2).toRgbString();return{controlSize:ae,railSize:4,handleSize:ae,handleSizeHover:Ae,dotSize:8,handleLineWidth:Sn,handleLineWidthHover:An,railBg:te.colorFillTertiary,railHoverBg:te.colorFillSecondary,trackBg:te.colorPrimaryBorder,trackHoverBg:te.colorPrimaryBorderHover,handleColor:te.colorPrimaryBorder,handleActiveColor:En,handleActiveOutlineColor:ke,handleColorDisabled:new Ur.FastColor(te.colorTextDisabled).onBackground(te.colorBgContainer).toHexString(),dotBorderColor:te.colorBorderSecondary,dotActiveBorderColor:te.colorPrimaryBorder,trackBgDisabled:te.colorBgContainerDisabled}};var wn=(0,Rr.I$)("Slider",te=>{const le=(0,To.mergeToken)(te,{marginPart:te.calc(te.controlHeight).sub(te.controlSize).div(2).equal(),marginFull:te.calc(te.controlSize).div(2).equal(),marginPartWithMark:te.calc(te.controlHeightLG).sub(te.controlSize).equal()});return[pa(le),Xi(le),bn(le)]},bt);function Fn(){const[te,le]=Pt.useState(!1),ae=Pt.useRef(null),Ae=()=>{In.Z.cancel(ae.current)},Sn=An=>{Ae(),An?le(An):ae.current=(0,In.Z)(()=>{le(An)})};return Pt.useEffect(()=>Ae,[]),[te,Sn]}var Un=Mt(53124),Xn=function(te,le){var ae={};for(var Ae in te)Object.prototype.hasOwnProperty.call(te,Ae)&&le.indexOf(Ae)<0&&(ae[Ae]=te[Ae]);if(te!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Sn=0,Ae=Object.getOwnPropertySymbols(te);Sntypeof ae=="number"?ae.toString():""}var Di=Pt.forwardRef((te,le)=>{const{prefixCls:ae,range:Ae,className:Sn,rootClassName:An,style:En,disabled:ke,tooltipPrefixCls:cn,tipFormatter:_n,tooltipVisible:vi,getTooltipPopupContainer:mn,tooltipPlacement:Oe,tooltip:ni={},onChangeComplete:Pi,classNames:Li,styles:qe}=te,oi=Xn(te,["prefixCls","range","className","rootClassName","style","disabled","tooltipPrefixCls","tipFormatter","tooltipVisible","getTooltipPopupContainer","tooltipPlacement","tooltip","onChangeComplete","classNames","styles"]),{vertical:Ni}=te,{getPrefixCls:gr,direction:xr,className:Si,style:Fi,classNames:Gi,styles:Mr,getPopupContainer:hr}=(0,Un.dj)("slider"),Yn=Pt.useContext(ei.Z),zi=ke!=null?ke:Yn,{handleRender:qo,direction:sa}=Pt.useContext(hi),Ke=(sa||xr)==="rtl",[ur,Tr]=Fn(),[or,Vo]=Fn(),eo=Object.assign({},ni),{open:uo,placement:Xr,getPopupContainer:Ir,prefixCls:Mo,formatter:Ln}=eo,$r=uo!=null?uo:vi,Pn=(ur||or)&&$r!==!1,Br=ai(Ln,_n),[Ga,Te]=Fn(),Ze=Eo=>{Pi==null||Pi(Eo),Te(!1)},sn=(Eo,gs)=>Eo||(gs?Ke?"left":"right":"top"),zn=gr("slider",ae),[Ii,Nr,lr]=wn(zn),si=Ne()(Sn,Si,Gi.root,Li==null?void 0:Li.root,An,{[`${zn}-rtl`]:Ke,[`${zn}-lock`]:Ga},Nr,lr);Ke&&!oi.vertical&&(oi.reverse=!oi.reverse),Pt.useEffect(()=>{const Eo=()=>{(0,In.Z)(()=>{Vo(!1)},1)};return document.addEventListener("mouseup",Eo),()=>{document.removeEventListener("mouseup",Eo)}},[]);const Zt=Ae&&!$r,Ao=qo||((Eo,gs)=>{const{index:os}=gs,Ho=Eo.props;function _o(hn,ar,oo){var ca,$o,ia,as;oo&&(($o=(ca=oi)[hn])===null||$o===void 0||$o.call(ca,ar)),(as=(ia=Ho)[hn])===null||as===void 0||as.call(ia,ar)}const er=Object.assign(Object.assign({},Ho),{onMouseEnter:hn=>{Tr(!0),_o("onMouseEnter",hn)},onMouseLeave:hn=>{Tr(!1),_o("onMouseLeave",hn)},onMouseDown:hn=>{Vo(!0),Te(!0),_o("onMouseDown",hn)},onFocus:hn=>{var ar;Vo(!0),(ar=oi.onFocus)===null||ar===void 0||ar.call(oi,hn),_o("onFocus",hn,!0)},onBlur:hn=>{var ar;Vo(!1),(ar=oi.onBlur)===null||ar===void 0||ar.call(oi,hn),_o("onBlur",hn,!0)}}),Qi=Pt.cloneElement(Eo,er),Er=(!!$r||Pn)&&Br!==null;return Zt?Qi:Pt.createElement(ki,Object.assign({},eo,{prefixCls:gr("tooltip",Mo!=null?Mo:cn),title:Br?Br(gs.value):"",open:Er,placement:sn(Xr!=null?Xr:Oe,Ni),key:os,classNames:{root:`${zn}-tooltip`},getPopupContainer:Ir||mn||hr}),Qi)}),rs=Zt?(Eo,gs)=>{const os=Pt.cloneElement(Eo,{style:Object.assign(Object.assign({},Eo.props.style),{visibility:"hidden"})});return Pt.createElement(ki,Object.assign({},eo,{prefixCls:gr("tooltip",Mo!=null?Mo:cn),title:Br?Br(gs.value):"",open:Br!==null&&Pn,placement:sn(Xr!=null?Xr:Oe,Ni),key:"tooltip",classNames:{root:`${zn}-tooltip`},getPopupContainer:Ir||mn||hr,draggingDelete:gs.draggingDelete}),os)}:void 0,Ls=Object.assign(Object.assign(Object.assign(Object.assign({},Mr.root),Fi),qe==null?void 0:qe.root),En),Xa=Object.assign(Object.assign({},Mr.tracks),qe==null?void 0:qe.tracks),Ea=Ne()(Gi.tracks,Li==null?void 0:Li.tracks);return Ii(Pt.createElement(Mi,Object.assign({},oi,{classNames:Object.assign({handle:Ne()(Gi.handle,Li==null?void 0:Li.handle),rail:Ne()(Gi.rail,Li==null?void 0:Li.rail),track:Ne()(Gi.track,Li==null?void 0:Li.track)},Ea?{tracks:Ea}:{}),styles:Object.assign({handle:Object.assign(Object.assign({},Mr.handle),qe==null?void 0:qe.handle),rail:Object.assign(Object.assign({},Mr.rail),qe==null?void 0:qe.rail),track:Object.assign(Object.assign({},Mr.track),qe==null?void 0:qe.track)},Object.keys(Xa).length?{tracks:Xa}:{}),step:oi.step,range:Ae,className:si,style:Ls,disabled:zi,ref:le,prefixCls:zn,handleRender:Ao,activeHandleRender:rs,onChangeComplete:Ze})))})},5584:function(un,Nn,Mt){"use strict";var Pt,ne=Mt(85269).default;Pt={value:!0},Nn.Z=void 0;var Ne=ne(Mt(85369)),Be=ne(Mt(15704));const Pe={lang:Object.assign({placeholder:"\u8BF7\u9009\u62E9\u65E5\u671F",yearPlaceholder:"\u8BF7\u9009\u62E9\u5E74\u4EFD",quarterPlaceholder:"\u8BF7\u9009\u62E9\u5B63\u5EA6",monthPlaceholder:"\u8BF7\u9009\u62E9\u6708\u4EFD",weekPlaceholder:"\u8BF7\u9009\u62E9\u5468",rangePlaceholder:["\u5F00\u59CB\u65E5\u671F","\u7ED3\u675F\u65E5\u671F"],rangeYearPlaceholder:["\u5F00\u59CB\u5E74\u4EFD","\u7ED3\u675F\u5E74\u4EFD"],rangeMonthPlaceholder:["\u5F00\u59CB\u6708\u4EFD","\u7ED3\u675F\u6708\u4EFD"],rangeQuarterPlaceholder:["\u5F00\u59CB\u5B63\u5EA6","\u7ED3\u675F\u5B63\u5EA6"],rangeWeekPlaceholder:["\u5F00\u59CB\u5468","\u7ED3\u675F\u5468"]},Ne.default),timePickerLocale:Object.assign({},Be.default)};Pe.lang.ok="\u786E\u5B9A";var Bt=Nn.Z=Pe},15704:function(un,Nn){"use strict";Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.default=void 0;const Mt={placeholder:"\u8BF7\u9009\u62E9\u65F6\u95F4",rangePlaceholder:["\u5F00\u59CB\u65F6\u95F4","\u7ED3\u675F\u65F6\u95F4"]};var Pt=Nn.default=Mt},88386:function(un,Nn,Mt){(function(Pt){Pt(Mt(4631))})(function(Pt){Pt.defineOption("placeholder","",function(ue,se,Se){var Xe=Se&&Se!=Pt.Init;if(se&&!Xe)ue.on("blur",Pe),ue.on("change",Bt),ue.on("swapDoc",Bt),Pt.on(ue.getInputField(),"compositionupdate",ue.state.placeholderCompose=function(){Be(ue)}),Bt(ue);else if(!se&&Xe){ue.off("blur",Pe),ue.off("change",Bt),ue.off("swapDoc",Bt),Pt.off(ue.getInputField(),"compositionupdate",ue.state.placeholderCompose),ne(ue);var pe=ue.getWrapperElement();pe.className=pe.className.replace(" CodeMirror-empty","")}se&&!ue.hasFocus()&&Pe(ue)});function ne(ue){ue.state.placeholder&&(ue.state.placeholder.parentNode.removeChild(ue.state.placeholder),ue.state.placeholder=null)}function Ne(ue){ne(ue);var se=ue.state.placeholder=document.createElement("pre");se.style.cssText="height: 0; overflow: visible",se.style.direction=ue.getOption("direction"),se.className="CodeMirror-placeholder CodeMirror-line-like";var Se=ue.getOption("placeholder");typeof Se=="string"&&(Se=document.createTextNode(Se)),se.appendChild(Se),ue.display.lineSpace.insertBefore(se,ue.display.lineSpace.firstChild)}function Be(ue){setTimeout(function(){var se=!1,Se=ue.getInputField();Se.nodeName=="TEXTAREA"?se=!Se.value:ue.lineCount()==1&&(se=!/[^\u200b]/.test(Se.querySelector(".CodeMirror-line").textContent)),se?Ne(ue):ne(ue)},20)}function Pe(ue){Ut(ue)&&Ne(ue)}function Bt(ue){var se=ue.getWrapperElement(),Se=Ut(ue);se.className=se.className.replace(" CodeMirror-empty","")+(Se?" CodeMirror-empty":""),Se?Ne(ue):ne(ue)}function Ut(ue){return ue.lineCount()===1&&ue.getLine(0)===""}})},82801:function(un,Nn,Mt){(function(Pt){Pt(Mt(4631))})(function(Pt){var ne={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Ne=Pt.Pos;Pt.defineOption("autoCloseBrackets",!1,function(nt,et,ht){ht&&ht!=Pt.Init&&(nt.removeKeyMap(Pe),nt.state.closeBrackets=null),et&&(Bt(Be(et,"pairs")),nt.state.closeBrackets=et,nt.addKeyMap(Pe))});function Be(nt,et){return et=="pairs"&&typeof nt=="string"?nt:typeof nt=="object"&&nt[et]!=null?nt[et]:ne[et]}var Pe={Backspace:se,Enter:Se};function Bt(nt){for(var et=0;et=0;gt--){var xt=lt[gt].head;nt.replaceRange("",Ne(xt.line,xt.ch-1),Ne(xt.line,xt.ch+1),"+delete")}}function Se(nt){var et=ue(nt),ht=et&&Be(et,"explode");if(!ht||nt.getOption("disableInput"))return Pt.Pass;for(var lt=nt.listSelections(),gt=0;gt0;return{anchor:new Ne(nt.anchor.line,nt.anchor.ch+(et?-1:1)),head:new Ne(nt.head.line,nt.head.ch+(et?1:-1))}}function pe(nt,et){var ht=ue(nt);if(!ht||nt.getOption("disableInput"))return Pt.Pass;var lt=Be(ht,"pairs"),gt=lt.indexOf(et);if(gt==-1)return Pt.Pass;for(var mt=Be(ht,"closeBefore"),xt=Be(ht,"triples"),St=lt.charAt(gt+1)==et,zt=nt.listSelections(),Jt=gt%2==0,re,oe=0;oe=0&&nt.getRange(Le,Ne(Le.line,Le.ch+3))==et+et+et?de="skipThree":de="skip";else if(St&&Le.ch>1&&xt.indexOf(et)>=0&&nt.getRange(Ne(Le.line,Le.ch-2),Le)==et+et){if(Le.ch>2&&/\bstring/.test(nt.getTokenTypeAt(Ne(Le.line,Le.ch-2))))return Pt.Pass;de="addFour"}else if(St){var rn=Le.ch==0?" ":nt.getRange(Ne(Le.line,Le.ch-1),Le);if(!Pt.isWordChar(Fe)&&rn!=et&&!Pt.isWordChar(rn))de="both";else return Pt.Pass}else if(Jt&&(Fe.length===0||/\s/.test(Fe)||mt.indexOf(Fe)>-1))de="both";else return Pt.Pass;if(!re)re=de;else if(re!=de)return Pt.Pass}var De=gt%2?lt.charAt(gt-1):et,jn=gt%2?et:lt.charAt(gt+1);nt.operation(function(){if(re=="skip")nt.execCommand("goCharRight");else if(re=="skipThree")for(var Bn=0;Bn<3;Bn++)nt.execCommand("goCharRight");else if(re=="surround"){for(var an=nt.getSelections(),Bn=0;Bn'"]=function(Ht){return Be(Ht)}),se.addKeyMap(pe)}});var ne=["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 Be(se){if(se.getOption("disableInput"))return Pt.Pass;for(var Se=se.listSelections(),Xe=[],pe=se.getOption("autoCloseTags"),Ht=0;HtDt.ch&&(gt=gt.slice(0,gt.length-nt.end+Dt.ch));var zt=gt.toLowerCase();if(!gt||nt.type=="string"&&(nt.end!=Dt.ch||!/[\"\']/.test(nt.string.charAt(nt.string.length-1))||nt.string.length==1)||nt.type=="tag"&<.close||nt.string.indexOf("/")==Dt.ch-nt.start-1||xt&&Ut(xt,zt)>-1||ue(se,et.mode.xmlCurrentContext&&et.mode.xmlCurrentContext(ht)||[],gt,Dt,!0))return Pt.Pass;var Jt=typeof pe=="object"&&pe.emptyTags;if(Jt&&Ut(Jt,gt)>-1){Xe[Ht]={text:"/>",newPos:Pt.Pos(Dt.line,Dt.ch+2)};continue}var re=St&&Ut(St,zt)>-1;Xe[Ht]={indent:re,text:">"+(re?` `:"")+"",newPos:re?Pt.Pos(Dt.line+1,0):Pt.Pos(Dt.line,Dt.ch+1)}}for(var oe=typeof pe=="object"&&pe.dontIndentOnAutoClose,Ht=Se.length-1;Ht>=0;Ht--){var $t=Xe[Ht];se.replaceRange($t.text,Se[Ht].head,Se[Ht].anchor,"+insert");var Le=se.listSelections().slice(0);Le[Ht]={head:$t.newPos,anchor:$t.newPos},se.setSelections(Le),!oe&&$t.indent&&(se.indentLine($t.newPos.line,null,!0),se.indentLine($t.newPos.line+1,null,!0))}}function Pe(se,Se){for(var Xe=se.listSelections(),pe=[],Ht=Se?"/":""&&(xt+=">"),pe[et]=xt}if(se.replaceSelections(pe),Xe=se.listSelections(),!nt)for(var et=0;et=0&&Se[ht]==Xe;ht--)++et;pe=nt.to;for(var ht=1;ht=ht.max))return ht.ch=0,ht.text=ht.cm.getLine(++ht.line),!0}function Se(ht){if(!(ht.line<=ht.min))return ht.text=ht.cm.getLine(--ht.line),ht.ch=ht.text.length,!0}function Xe(ht){for(;;){var lt=ht.text.indexOf(">",ht.ch);if(lt==-1){if(se(ht))continue;return}if(!ue(ht,lt+1)){ht.ch=lt+1;continue}var gt=ht.text.lastIndexOf("/",lt),mt=gt>-1&&!/\S/.test(ht.text.slice(gt+1,lt));return ht.ch=lt+1,mt?"selfClose":"regular"}}function pe(ht){for(;;){var lt=ht.ch?ht.text.lastIndexOf("<",ht.ch-1):-1;if(lt==-1){if(Se(ht))continue;return}if(!ue(ht,lt+1)){ht.ch=lt;continue}Bt.lastIndex=lt,ht.ch=lt;var gt=Bt.exec(ht.text);if(gt&>.index==lt)return gt}}function Ht(ht){for(;;){Bt.lastIndex=ht.ch;var lt=Bt.exec(ht.text);if(!lt){if(se(ht))continue;return}if(!ue(ht,lt.index+1)){ht.ch=lt.index+1;continue}return ht.ch=lt.index+lt[0].length,lt}}function Dt(ht){for(;;){var lt=ht.ch?ht.text.lastIndexOf(">",ht.ch-1):-1;if(lt==-1){if(Se(ht))continue;return}if(!ue(ht,lt+1)){ht.ch=lt;continue}var gt=ht.text.lastIndexOf("/",lt),mt=gt>-1&&!/\S/.test(ht.text.slice(gt+1,lt));return ht.ch=lt+1,mt?"selfClose":"regular"}}function nt(ht,lt){for(var gt=[];;){var mt=Ht(ht),xt,St=ht.line,zt=ht.ch-(mt?mt[0].length:0);if(!mt||!(xt=Xe(ht)))return;if(xt!="selfClose")if(mt[1]){for(var Jt=gt.length-1;Jt>=0;--Jt)if(gt[Jt]==mt[2]){gt.length=Jt;break}if(Jt<0&&(!lt||lt==mt[2]))return{tag:mt[2],from:ne(St,zt),to:ne(ht.line,ht.ch)}}else gt.push(mt[2])}}function et(ht,lt){for(var gt=[];;){var mt=Dt(ht);if(!mt)return;if(mt=="selfClose"){pe(ht);continue}var xt=ht.line,St=ht.ch,zt=pe(ht);if(!zt)return;if(zt[1])gt.push(zt[2]);else{for(var Jt=gt.length-1;Jt>=0;--Jt)if(gt[Jt]==zt[2]){gt.length=Jt;break}if(Jt<0&&(!lt||lt==zt[2]))return{tag:zt[2],from:ne(ht.line,ht.ch),to:ne(xt,St)}}}}Pt.registerHelper("fold","xml",function(ht,lt){for(var gt=new Ut(ht,lt.line,0);;){var mt=Ht(gt);if(!mt||gt.line!=lt.line)return;var xt=Xe(gt);if(!xt)return;if(!mt[1]&&xt!="selfClose"){var St=ne(gt.line,gt.ch),zt=nt(gt,mt[2]);return zt&&Ne(zt.from,St)>0?{from:St,to:zt.from}:null}}}),Pt.findMatchingTag=function(ht,lt,gt){var mt=new Ut(ht,lt.line,lt.ch,gt);if(!(mt.text.indexOf(">")==-1&&mt.text.indexOf("<")==-1)){var xt=Xe(mt),St=xt&&ne(mt.line,mt.ch),zt=xt&&pe(mt);if(!(!xt||!zt||Ne(mt,lt)>0)){var Jt={from:ne(mt.line,mt.ch),to:St,tag:zt[2]};return xt=="selfClose"?{open:Jt,close:null,at:"open"}:zt[1]?{open:et(mt,zt[2]),close:Jt,at:"close"}:(mt=new Ut(ht,St.line,St.ch,gt),{open:Jt,close:nt(mt,zt[2]),at:"open"})}}},Pt.findEnclosingTag=function(ht,lt,gt,mt){for(var xt=new Ut(ht,lt.line,lt.ch,gt);;){var St=et(xt,mt);if(!St)break;var zt=new Ut(ht,lt.line,lt.ch,gt),Jt=nt(zt,St.tag);if(Jt)return{open:St,close:Jt}}},Pt.scanForClosingTag=function(ht,lt,gt,mt){var xt=new Ut(ht,lt.line,lt.ch,mt?{from:0,to:mt}:null);return nt(xt,gt)}})},4631:function(un){(function(Nn,Mt){un.exports=Mt()})(this,function(){"use strict";var Nn=navigator.userAgent,Mt=navigator.platform,Pt=/gecko\/\d/i.test(Nn),ne=/MSIE \d/.test(Nn),Ne=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Nn),Be=/Edge\/(\d+)/.exec(Nn),Pe=ne||Ne||Be,Bt=Pe&&(ne?document.documentMode||6:+(Be||Ne)[1]),Ut=!Be&&/WebKit\//.test(Nn),ue=Ut&&/Qt\/\d+\.\d+/.test(Nn),se=!Be&&/Chrome\//.test(Nn),Se=/Opera\//.test(Nn),Xe=/Apple Computer/.test(navigator.vendor),pe=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Nn),Ht=/PhantomJS/.test(Nn),Dt=!Be&&/AppleWebKit/.test(Nn)&&/Mobile\/\w+/.test(Nn),nt=/Android/.test(Nn),et=Dt||nt||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Nn),ht=Dt||/Mac/.test(Mt),lt=/\bCrOS\b/.test(Nn),gt=/win/i.test(Mt),mt=Se&&Nn.match(/Version\/(\d*\.\d*)/);mt&&(mt=Number(mt[1])),mt&&mt>=15&&(Se=!1,Ut=!0);var xt=ht&&(ue||Se&&(mt==null||mt<12.11)),St=Pt||Pe&&Bt>=9;function zt(it){return new RegExp("(^|\\s)"+it+"(?:$|\\s)\\s*")}var Jt=function(it,ot){var ct=it.className,dt=zt(ot).exec(ct);if(dt){var pt=ct.slice(dt.index+dt[0].length);it.className=ct.slice(0,dt.index)+(pt?dt[1]+pt:"")}};function re(it){for(var ot=it.childNodes.length;ot>0;--ot)it.removeChild(it.firstChild);return it}function oe(it,ot){return re(it).appendChild(ot)}function $t(it,ot,ct,dt){var pt=document.createElement(it);if(ct&&(pt.className=ct),dt&&(pt.style.cssText=dt),typeof ot=="string")pt.appendChild(document.createTextNode(ot));else if(ot)for(var At=0;At=ot)return jt+(ot-At);jt+=qt-At,jt+=ct-jt%ct,At=qt+1}}var Tt=function(){this.id=null,this.f=null,this.time=0,this.handler=an(this.onTimeout,this)};Tt.prototype.onTimeout=function(it){it.id=0,it.time<=+new Date?it.f():setTimeout(it.handler,it.time-+new Date)},Tt.prototype.set=function(it,ot){this.f=ot;var ct=+new Date+it;(!this.id||ct=ot)return dt+Math.min(jt,ot-pt);if(pt+=At-dt,pt+=ct-pt%ct,dt=At+1,pt>=ot)return dt}}var Ie=[""];function ve(it){for(;Ie.length<=it;)Ie.push(ze(Ie)+" ");return Ie[it]}function ze(it){return it[it.length-1]}function je(it,ot){for(var ct=[],dt=0;dt"\x80"&&(it.toUpperCase()!=it.toLowerCase()||wt.test(it))}function Wt(it,ot){return ot?ot.source.indexOf("\\w")>-1&&Ft(it)?!0:ot.test(it):Ft(it)}function kt(it){for(var ot in it)if(it.hasOwnProperty(ot)&&it[ot])return!1;return!0}var Xt=/[\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 $e(it){return it.charCodeAt(0)>=768&&Xt.test(it)}function Je(it,ot,ct){for(;(ct<0?ot>0:otct?-1:1;;){if(ot==ct)return ot;var pt=(ot+ct)/2,At=dt<0?Math.ceil(pt):Math.floor(pt);if(At==ot)return it(At)?ot:ct;it(At)?ct=At:ot=At+dt}}function Ve(it,ot,ct,dt){if(!it)return dt(ot,ct,"ltr",0);for(var pt=!1,At=0;Atot||ot==ct&&jt.to==ot)&&(dt(Math.max(jt.from,ot),Math.min(jt.to,ct),jt.level==1?"rtl":"ltr",At),pt=!0)}pt||dt(ot,ct,"ltr")}var Mn=null;function Ue(it,ot,ct){var dt;Mn=null;for(var pt=0;ptot)return pt;At.to==ot&&(At.from!=At.to&&ct=="before"?dt=pt:Mn=pt),At.from==ot&&(At.from!=At.to&&ct!="before"?dt=pt:Mn=pt)}return dt!=null?dt:Mn}var ti=function(){var it="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ot="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ct(fe){return fe<=247?it.charAt(fe):1424<=fe&&fe<=1524?"R":1536<=fe&&fe<=1785?ot.charAt(fe-1536):1774<=fe&&fe<=2220?"r":8192<=fe&&fe<=8203?"w":fe==8204?"b":"L"}var dt=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,pt=/[stwN]/,At=/[LRr]/,jt=/[Lb1n]/,qt=/[1n]/;function Yt(fe,Ge,ge){this.level=fe,this.from=Ge,this.to=ge}return function(fe,Ge){var ge=Ge=="ltr"?"L":"R";if(fe.length==0||Ge=="ltr"&&!dt.test(fe))return!1;for(var dn=fe.length,gn=[],fi=0;fi-1&&(dt[ot]=pt.slice(0,At).concat(pt.slice(At+1)))}}}function In(it,ot){var ct=gi(it,ot);if(ct.length)for(var dt=Array.prototype.slice.call(arguments,2),pt=0;pt0}function $i(it){it.prototype.on=function(ot,ct){pn(this,ot,ct)},it.prototype.off=function(ot,ct){Mi(this,ot,ct)}}function pr(it){it.preventDefault?it.preventDefault():it.returnValue=!1}function rr(it){it.stopPropagation?it.stopPropagation():it.cancelBubble=!0}function ki(it){return it.defaultPrevented!=null?it.defaultPrevented:it.returnValue==!1}function sr(it){pr(it),rr(it)}function Ur(it){return it.target||it.srcElement}function Jo(it){var ot=it.which;return ot==null&&(it.button&1?ot=1:it.button&2?ot=3:it.button&4&&(ot=2)),ht&&it.ctrlKey&&ot==1&&(ot=3),ot}var Rr=function(){if(Pe&&Bt<9)return!1;var it=$t("div");return"draggable"in it||"dragDrop"in it}(),To;function pa(it){if(To==null){var ot=$t("span","\u200B");oe(it,$t("span",[ot,document.createTextNode("x")])),it.firstChild.offsetHeight!=0&&(To=ot.offsetWidth<=1&&ot.offsetHeight>2&&!(Pe&&Bt<8))}var ct=To?$t("span","\u200B"):$t("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ct.setAttribute("cm-text",""),ct}var co;function Xi(it){if(co!=null)return co;var ot=oe(it,document.createTextNode("A\u062EA")),ct=de(ot,0,1).getBoundingClientRect(),dt=de(ot,1,2).getBoundingClientRect();return re(it),!ct||ct.left==ct.right?!1:co=dt.right-ct.right<3}var bn=` b`.split(/\n/).length!=3?function(it){for(var ot=0,ct=[],dt=it.length;ot<=dt;){var pt=it.indexOf(` `,ot);pt==-1&&(pt=it.length);var At=it.slice(ot,it.charAt(pt-1)=="\r"?pt-1:pt),jt=At.indexOf("\r");jt!=-1?(ct.push(At.slice(0,jt)),ot+=jt+1):(ct.push(At),ot=pt+1)}return ct}:function(it){return it.split(/\r\n?|\n/)},bt=window.getSelection?function(it){try{return it.selectionStart!=it.selectionEnd}catch(ot){return!1}}:function(it){var ot;try{ot=it.ownerDocument.selection.createRange()}catch(ct){}return!ot||ot.parentElement()!=it?!1:ot.compareEndPoints("StartToEnd",ot)!=0},wn=function(){var it=$t("div");return"oncopy"in it?!0:(it.setAttribute("oncopy","return;"),typeof it.oncopy=="function")}(),Fn=null;function Un(it){if(Fn!=null)return Fn;var ot=oe(it,$t("span","x")),ct=ot.getBoundingClientRect(),dt=de(ot,0,1).getBoundingClientRect();return Fn=Math.abs(ct.left-dt.left)>1}var Xn={},ai={};function Tn(it,ot){arguments.length>2&&(ot.dependencies=Array.prototype.slice.call(arguments,2)),Xn[it]=ot}function Di(it,ot){ai[it]=ot}function te(it){if(typeof it=="string"&&ai.hasOwnProperty(it))it=ai[it];else if(it&&typeof it.name=="string"&&ai.hasOwnProperty(it.name)){var ot=ai[it.name];typeof ot=="string"&&(ot={name:ot}),it=Lt(ot,it),it.name=ot.name}else{if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(it))return te("application/xml");if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(it))return te("application/json")}return typeof it=="string"?{name:it}:it||{name:"null"}}function le(it,ot){ot=te(ot);var ct=Xn[ot.name];if(!ct)return le(it,"text/plain");var dt=ct(it,ot);if(ae.hasOwnProperty(ot.name)){var pt=ae[ot.name];for(var At in pt)pt.hasOwnProperty(At)&&(dt.hasOwnProperty(At)&&(dt["_"+At]=dt[At]),dt[At]=pt[At])}if(dt.name=ot.name,ot.helperType&&(dt.helperType=ot.helperType),ot.modeProps)for(var jt in ot.modeProps)dt[jt]=ot.modeProps[jt];return dt}var ae={};function Ae(it,ot){var ct=ae.hasOwnProperty(it)?ae[it]:ae[it]={};Zn(ot,ct)}function Sn(it,ot){if(ot===!0)return ot;if(it.copyState)return it.copyState(ot);var ct={};for(var dt in ot){var pt=ot[dt];pt instanceof Array&&(pt=pt.concat([])),ct[dt]=pt}return ct}function An(it,ot){for(var ct;it.innerMode&&(ct=it.innerMode(ot),!(!ct||ct.mode==it));)ot=ct.state,it=ct.mode;return ct||{mode:it,state:ot}}function En(it,ot,ct){return it.startState?it.startState(ot,ct):!0}var ke=function(it,ot,ct){this.pos=this.start=0,this.string=it,this.tabSize=ot||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=ct};ke.prototype.eol=function(){return this.pos>=this.string.length},ke.prototype.sol=function(){return this.pos==this.lineStart},ke.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ke.prototype.next=function(){if(this.posot},ke.prototype.eatSpace=function(){for(var it=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>it},ke.prototype.skipToEnd=function(){this.pos=this.string.length},ke.prototype.skipTo=function(it){var ot=this.string.indexOf(it,this.pos);if(ot>-1)return this.pos=ot,!0},ke.prototype.backUp=function(it){this.pos-=it},ke.prototype.column=function(){return this.lastColumnPos0?null:(At&&ot!==!1&&(this.pos+=At[0].length),At)}},ke.prototype.current=function(){return this.string.slice(this.start,this.pos)},ke.prototype.hideFirstChars=function(it,ot){this.lineStart+=it;try{return ot()}finally{this.lineStart-=it}},ke.prototype.lookAhead=function(it){var ot=this.lineOracle;return ot&&ot.lookAhead(it)},ke.prototype.baseToken=function(){var it=this.lineOracle;return it&&it.baseToken(this.pos)};function cn(it,ot){if(ot-=it.first,ot<0||ot>=it.size)throw new Error("There is no line "+(ot+it.first)+" in the document.");for(var ct=it;!ct.lines;)for(var dt=0;;++dt){var pt=ct.children[dt],At=pt.chunkSize();if(ot=it.first&&otct?qe(ct,cn(it,ct).text.length):Mr(ot,cn(it,ot.line).text.length)}function Mr(it,ot){var ct=it.ch;return ct==null||ct>ot?qe(it.line,ot):ct<0?qe(it.line,0):it}function hr(it,ot){for(var ct=[],dt=0;dtthis.maxLookAhead&&(this.maxLookAhead=it),ot},zi.prototype.baseToken=function(it){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=it;)this.baseTokenPos+=2;var ot=this.baseTokens[this.baseTokenPos+1];return{type:ot&&ot.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-it}},zi.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},zi.fromSaved=function(it,ot,ct){return ot instanceof Yn?new zi(it,Sn(it.mode,ot.state),ct,ot.lookAhead):new zi(it,Sn(it.mode,ot),ct)},zi.prototype.save=function(it){var ot=it!==!1?Sn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Yn(ot,this.maxLookAhead):ot};function qo(it,ot,ct,dt){var pt=[it.state.modeGen],At={};uo(it,ot.text,it.doc.mode,ct,function(fe,Ge){return pt.push(fe,Ge)},At,dt);for(var jt=ct.state,qt=function(fe){ct.baseTokens=pt;var Ge=it.state.overlays[fe],ge=1,dn=0;ct.state=!0,uo(it,ot.text,Ge.mode,ct,function(gn,fi){for(var Ri=ge;dngn&&pt.splice(ge,1,gn,pt[ge+1],Ji),ge+=2,dn=Math.min(gn,Ji)}if(fi)if(Ge.opaque)pt.splice(Ri,ge-Ri,gn,"overlay "+fi),ge=Ri+2;else for(;Riit.options.maxHighlightLength&&Sn(it.doc.mode,dt.state),At=qo(it,ot,dt);pt&&(dt.state=pt),ot.stateAfter=dt.save(!pt),ot.styles=At.styles,At.classes?ot.styleClasses=At.classes:ot.styleClasses&&(ot.styleClasses=null),ct===it.doc.highlightFrontier&&(it.doc.modeFrontier=Math.max(it.doc.modeFrontier,++it.doc.highlightFrontier))}return ot.styles}function la(it,ot,ct){var dt=it.doc,pt=it.display;if(!dt.mode.startState)return new zi(dt,!0,ot);var At=Xr(it,ot,ct),jt=At>dt.first&&cn(dt,At-1).stateAfter,qt=jt?zi.fromSaved(dt,jt,At):new zi(dt,En(dt.mode),At);return dt.iter(At,ot,function(Yt){Ke(it,Yt.text,qt);var fe=qt.line;Yt.stateAfter=fe==ot-1||fe%5==0||fe>=pt.viewFrom&&feot.start)return At}throw new Error("Mode "+it.name+" failed to advance stream.")}var or=function(it,ot,ct){this.start=it.start,this.end=it.pos,this.string=it.current(),this.type=ot||null,this.state=ct};function Vo(it,ot,ct,dt){var pt=it.doc,At=pt.mode,jt;ot=Gi(pt,ot);var qt=cn(pt,ot.line),Yt=la(it,ot.line,ct),fe=new ke(qt.text,it.options.tabSize,Yt),Ge;for(dt&&(Ge=[]);(dt||fe.posit.options.maxHighlightLength?(qt=!1,jt&&Ke(it,ot,dt,Ge.pos),Ge.pos=ot.length,ge=null):ge=eo(Tr(ct,Ge,dt.state,dn),At),dn){var gn=dn[0].name;gn&&(ge="m-"+(ge?gn+" "+ge:gn))}if(!qt||fe!=ge){for(;Ytjt;--qt){if(qt<=At.first)return At.first;var Yt=cn(At,qt-1),fe=Yt.stateAfter;if(fe&&(!ct||qt+(fe instanceof Yn?fe.lookAhead:0)<=At.modeFrontier))return qt;var Ge=_t(Yt.text,null,it.options.tabSize);(pt==null||dt>Ge)&&(pt=qt-1,dt=Ge)}return pt}function Ir(it,ot){if(it.modeFrontier=Math.min(it.modeFrontier,ot),!(it.highlightFrontierct;dt--){var pt=cn(it,dt).stateAfter;if(pt&&(!(pt instanceof Yn)||dt+pt.lookAhead=ot:At.to>ot);(dt||(dt=[])).push(new Br(jt,At.from,Yt?null:At.to))}}return dt}function zn(it,ot,ct){var dt;if(it)for(var pt=0;pt=ot:At.to>ot);if(qt||At.from==ot&&jt.type=="bookmark"&&(!ct||At.marker.insertLeft)){var Yt=At.from==null||(jt.inclusiveLeft?At.from<=ot:At.from0&&qt)for(var lo=0;lo0)){var Ge=[Yt,1],ge=oi(fe.from,qt.from),dn=oi(fe.to,qt.to);(ge<0||!jt.inclusiveLeft&&!ge)&&Ge.push({from:fe.from,to:qt.from}),(dn>0||!jt.inclusiveRight&&!dn)&&Ge.push({from:qt.to,to:fe.to}),pt.splice.apply(pt,Ge),Yt+=Ge.length-3}}return pt}function si(it){var ot=it.markedSpans;if(ot){for(var ct=0;ctot)&&(!dt||Ls(dt,At.marker)<0)&&(dt=At.marker)}return dt}function os(it,ot,ct,dt,pt){var At=cn(it,ot),jt=Ln&&At.markedSpans;if(jt)for(var qt=0;qt=0&&ge<=0||Ge<=0&&ge>=0)&&(Ge<=0&&(Yt.marker.inclusiveRight&&pt.inclusiveLeft?oi(fe.to,ct)>=0:oi(fe.to,ct)>0)||Ge>=0&&(Yt.marker.inclusiveRight&&pt.inclusiveLeft?oi(fe.from,dt)<=0:oi(fe.from,dt)<0)))return!0}}}function Ho(it){for(var ot;ot=Ea(it);)it=ot.find(-1,!0).line;return it}function _o(it){for(var ot;ot=Eo(it);)it=ot.find(1,!0).line;return it}function er(it){for(var ot,ct;ot=Eo(it);)it=ot.find(1,!0).line,(ct||(ct=[])).push(it);return ct}function Qi(it,ot){var ct=cn(it,ot),dt=Ho(ct);return ct==dt?ot:Oe(dt)}function Er(it,ot){if(ot>it.lastLine())return ot;var ct=cn(it,ot),dt;if(!hn(it,ct))return ot;for(;dt=Eo(ct);)ct=dt.find(1,!0).line;return Oe(ct)+1}function hn(it,ot){var ct=Ln&&ot.markedSpans;if(ct){for(var dt=void 0,pt=0;ptot.maxLineLength&&(ot.maxLineLength=pt,ot.maxLine=dt)})}var ia=function(it,ot,ct){this.text=it,Zt(this,ot),this.height=ct?ct(this):1};ia.prototype.lineNo=function(){return Oe(this)},$i(ia);function as(it,ot,ct,dt){it.text=ot,it.stateAfter&&(it.stateAfter=null),it.styles&&(it.styles=null),it.order!=null&&(it.order=null),si(it),Zt(it,ct);var pt=dt?dt(it):1;pt!=it.height&&mn(it,pt)}function Ks(it){it.parent=null,si(it)}var vs={},au={};function ks(it,ot){if(!it||/^\s*$/.test(it))return null;var ct=ot.addModeClass?au:vs;return ct[it]||(ct[it]=it.replace(/\S+/g,"cm-$&"))}function en(it,ot){var ct=Le("span",null,null,Ut?"padding-right: .1px":null),dt={pre:Le("pre",[ct],"CodeMirror-line"),content:ct,col:0,pos:0,cm:it,trailingSpace:!1,splitSpaces:it.getOption("lineWrapping")};ot.measure={};for(var pt=0;pt<=(ot.rest?ot.rest.length:0);pt++){var At=pt?ot.rest[pt-1]:ot.line,jt=void 0;dt.pos=0,dt.addToken=kl,Xi(it.display.measure)&&(jt=Qn(At,it.doc.direction))&&(dt.addToken=ma(dt.addToken,jt)),dt.map=[];var qt=ot!=it.display.externalMeasured&&Oe(At);wl(At,dt,sa(it,At,qt)),At.styleClasses&&(At.styleClasses.bgClass&&(dt.bgClass=jn(At.styleClasses.bgClass,dt.bgClass||"")),At.styleClasses.textClass&&(dt.textClass=jn(At.styleClasses.textClass,dt.textClass||""))),dt.map.length==0&&dt.map.push(0,0,dt.content.appendChild(pa(it.display.measure))),pt==0?(ot.measure.map=dt.map,ot.measure.cache={}):((ot.measure.maps||(ot.measure.maps=[])).push(dt.map),(ot.measure.caches||(ot.measure.caches=[])).push({}))}if(Ut){var Yt=dt.content.lastChild;(/\bcm-tab\b/.test(Yt.className)||Yt.querySelector&&Yt.querySelector(".cm-tab"))&&(dt.content.className="cm-tab-wrap-hack")}return In(it,"renderLine",it,ot.line,dt.pre),dt.pre.className&&(dt.textClass=jn(dt.pre.className,dt.textClass||"")),dt}function Us(it){var ot=$t("span","\u2022","cm-invalidchar");return ot.title="\\u"+it.charCodeAt(0).toString(16),ot.setAttribute("aria-label",ot.title),ot}function kl(it,ot,ct,dt,pt,At,jt){if(ot){var qt=it.splitSpaces?xu(ot,it.trailingSpace):ot,Yt=it.cm.state.specialChars,fe=!1,Ge;if(!Yt.test(ot))it.col+=ot.length,Ge=document.createTextNode(qt),it.map.push(it.pos,it.pos+ot.length,Ge),Pe&&Bt<9&&(fe=!0),it.pos+=ot.length;else{Ge=document.createDocumentFragment();for(var ge=0;;){Yt.lastIndex=ge;var dn=Yt.exec(ot),gn=dn?dn.index-ge:ot.length-ge;if(gn){var fi=document.createTextNode(qt.slice(ge,ge+gn));Pe&&Bt<9?Ge.appendChild($t("span",[fi])):Ge.appendChild(fi),it.map.push(it.pos,it.pos+gn,fi),it.col+=gn,it.pos+=gn}if(!dn)break;ge+=gn+1;var Ri=void 0;if(dn[0]==" "){var Ji=it.cm.options.tabSize,fr=Ji-it.col%Ji;Ri=Ge.appendChild($t("span",ve(fr),"cm-tab")),Ri.setAttribute("role","presentation"),Ri.setAttribute("cm-text"," "),it.col+=fr}else dn[0]=="\r"||dn[0]==` `?(Ri=Ge.appendChild($t("span",dn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ri.setAttribute("cm-text",dn[0]),it.col+=1):(Ri=it.cm.options.specialCharPlaceholder(dn[0]),Ri.setAttribute("cm-text",dn[0]),Pe&&Bt<9?Ge.appendChild($t("span",[Ri])):Ge.appendChild(Ri),it.col+=1);it.map.push(it.pos,it.pos+1,Ri),it.pos++}}if(it.trailingSpace=qt.charCodeAt(ot.length-1)==32,ct||dt||pt||fe||At||jt){var _r=ct||"";dt&&(_r+=dt),pt&&(_r+=pt);var kr=$t("span",[Ge],_r,At);if(jt)for(var lo in jt)jt.hasOwnProperty(lo)&&lo!="style"&&lo!="class"&&kr.setAttribute(lo,jt[lo]);return it.content.appendChild(kr)}it.content.appendChild(Ge)}}function xu(it,ot){if(it.length>1&&!/ /.test(it))return it;for(var ct=ot,dt="",pt=0;ptfe&&ge.from<=fe));dn++);if(ge.to>=Ge)return it(ct,dt,pt,At,jt,qt,Yt);it(ct,dt.slice(0,ge.to-fe),pt,At,null,qt,Yt),At=null,dt=dt.slice(ge.to-fe),fe=ge.to}}}function Pl(it,ot,ct,dt){var pt=!dt&&ct.widgetNode;pt&&it.map.push(it.pos,it.pos+ot,pt),!dt&&it.cm.display.input.needsContentAttribute&&(pt||(pt=it.content.appendChild(document.createElement("span"))),pt.setAttribute("cm-marker",ct.id)),pt&&(it.cm.display.input.setUneditable(pt),it.content.appendChild(pt)),it.pos+=ot,it.trailingSpace=!1}function wl(it,ot,ct){var dt=it.markedSpans,pt=it.text,At=0;if(!dt){for(var jt=1;jtYt||ja.collapsed&&Ar.to==Yt&&Ar.from==Yt)){if(Ar.to!=null&&Ar.to!=Yt&&gn>Ar.to&&(gn=Ar.to,Ri=""),ja.className&&(fi+=" "+ja.className),ja.css&&(dn=(dn?dn+";":"")+ja.css),ja.startStyle&&Ar.from==Yt&&(Ji+=" "+ja.startStyle),ja.endStyle&&Ar.to==gn&&(lo||(lo=[])).push(ja.endStyle,Ar.to),ja.title&&((_r||(_r={})).title=ja.title),ja.attributes)for(var il in ja.attributes)(_r||(_r={}))[il]=ja.attributes[il];ja.collapsed&&(!fr||Ls(fr.marker,ja)<0)&&(fr=Ar)}else Ar.from>Yt&&gn>Ar.from&&(gn=Ar.from)}if(lo)for(var nu=0;nu=qt)break;for(var uh=Math.min(qt,gn);;){if(Ge){var Ru=Yt+Ge.length;if(!fr){var Vl=Ru>uh?Ge.slice(0,uh-Yt):Ge;ot.addToken(ot,Vl,ge?ge+fi:fi,Ji,Yt+Vl.length==gn?Ri:"",dn,_r)}if(Ru>=uh){Ge=Ge.slice(uh-Yt),Yt=uh;break}Yt=Ru,Ji=""}Ge=pt.slice(At,At=ct[fe++]),ge=ks(ct[fe++],ot.cm.options)}}}function su(it,ot,ct){this.line=ot,this.rest=er(ot),this.size=this.rest?Oe(ze(this.rest))-ct+1:1,this.node=this.text=null,this.hidden=hn(it,ot)}function Aa(it,ot,ct){for(var dt=[],pt,At=ot;At2&&At.push((Yt.bottom+fe.top)/2-ct.top)}}At.push(ct.bottom-ct.top)}}function mh(it,ot,ct){if(it.line==ot)return{map:it.measure.map,cache:it.measure.cache};for(var dt=0;dtct)return{map:it.measure.maps[pt],cache:it.measure.caches[pt],before:!0}}function eh(it,ot){ot=Ho(ot);var ct=Oe(ot),dt=it.display.externalMeasured=new su(it.doc,ot,ct);dt.lineN=ct;var pt=dt.built=en(it,dt);return dt.text=pt.pre,oe(it.display.lineMeasure,pt.pre),dt}function Fu(it,ot,ct,dt){return nh(it,ac(it,ot),ct,dt)}function Yl(it,ot){if(ot>=it.display.viewFrom&&ot=ct.lineN&&otot)&&(At=Yt-qt,pt=At-1,ot>=Yt&&(jt="right")),pt!=null){if(dt=it[fe+2],qt==Yt&&ct==(dt.insertLeft?"left":"right")&&(jt=ct),ct=="left"&&pt==0)for(;fe&&it[fe-2]==it[fe-3]&&it[fe-1].insertLeft;)dt=it[(fe-=3)+2],jt="left";if(ct=="right"&&pt==Yt-qt)for(;fe=0&&(ct=it[pt]).left==ct.right;pt--);return ct}function al(it,ot,ct,dt){var pt=Dd(ot.map,ct,dt),At=pt.node,jt=pt.start,qt=pt.end,Yt=pt.collapse,fe;if(At.nodeType==3){for(var Ge=0;Ge<4;Ge++){for(;jt&&$e(ot.line.text.charAt(pt.coverStart+jt));)--jt;for(;pt.coverStart+qt0&&(Yt=dt="right");var ge;it.options.lineWrapping&&(ge=At.getClientRects()).length>1?fe=ge[dt=="right"?ge.length-1:0]:fe=At.getBoundingClientRect()}if(Pe&&Bt<9&&!jt&&(!fe||!fe.left&&!fe.right)){var dn=At.parentNode.getClientRects()[0];dn?fe={left:dn.left,right:dn.left+Lc(it.display),top:dn.top,bottom:dn.bottom}:fe=dd}for(var gn=fe.top-ot.rect.top,fi=fe.bottom-ot.rect.top,Ri=(gn+fi)/2,Ji=ot.view.measure.heights,fr=0;fr=dt.text.length?(Yt=dt.text.length,fe="before"):Yt<=0&&(Yt=0,fe="after"),!qt)return jt(fe=="before"?Yt-1:Yt,fe=="before");function Ge(fi,Ri,Ji){var fr=qt[Ri],_r=fr.level==1;return jt(Ji?fi-1:fi,_r!=Ji)}var ge=Ue(qt,Yt,fe),dn=Mn,gn=Ge(Yt,ge,fe=="before");return dn!=null&&(gn.other=Ge(Yt,dn,fe!="before")),gn}function Nh(it,ot){var ct=0;ot=Gi(it.doc,ot),it.options.lineWrapping||(ct=Lc(it.display)*ot.ch);var dt=cn(it.doc,ot.line),pt=oo(dt)+Za(it.display);return{left:ct,right:ct,top:pt,bottom:pt+dt.height}}function Zc(it,ot,ct,dt,pt){var At=qe(it,ot,ct);return At.xRel=pt,dt&&(At.outside=dt),At}function Bd(it,ot,ct){var dt=it.doc;if(ct+=it.display.viewOffset,ct<0)return Zc(dt.first,0,null,-1,-1);var pt=ni(dt,ct),At=dt.first+dt.size-1;if(pt>At)return Zc(dt.first+dt.size-1,cn(dt,At).text.length,null,1,1);ot<0&&(ot=0);for(var jt=cn(dt,pt);;){var qt=Vn(it,jt,pt,ot,ct),Yt=gs(jt,qt.ch+(qt.xRel>0||qt.outside>0?1:0));if(!Yt)return qt;var fe=Yt.find(1);if(fe.line==pt)return fe;jt=cn(dt,pt=fe.line)}}function br(it,ot,ct,dt){dt-=ul(ot);var pt=ot.text.length,At=fn(function(jt){return nh(it,ct,jt-1).bottom<=dt},pt,0);return pt=fn(function(jt){return nh(it,ct,jt).top>dt},At,pt),{begin:At,end:pt}}function cf(it,ot,ct,dt){ct||(ct=ac(it,ot));var pt=bl(it,ot,nh(it,ct,dt),"line").top;return br(it,ot,ct,pt)}function Ee(it,ot,ct,dt){return it.bottom<=ct?!1:it.top>ct?!0:(dt?it.left:it.right)>ot}function Vn(it,ot,ct,dt,pt){pt-=oo(ot);var At=ac(it,ot),jt=ul(ot),qt=0,Yt=ot.text.length,fe=!0,Ge=Qn(ot,it.doc.direction);if(Ge){var ge=(it.options.lineWrapping?df:Od)(it,ot,ct,At,Ge,dt,pt);fe=ge.level!=1,qt=fe?ge.from:ge.to-1,Yt=fe?ge.to:ge.from-1}var dn=null,gn=null,fi=fn(function(ea){var Ar=nh(it,At,ea);return Ar.top+=jt,Ar.bottom+=jt,Ee(Ar,dt,pt,!1)?(Ar.top<=pt&&Ar.left<=dt&&(dn=ea,gn=Ar),!0):!1},qt,Yt),Ri,Ji,fr=!1;if(gn){var _r=dt-gn.left=lo.bottom?1:0}return fi=Je(ot.text,fi,1),Zc(ct,fi,Ji,fr,dt-Ri)}function Od(it,ot,ct,dt,pt,At,jt){var qt=fn(function(ge){var dn=pt[ge],gn=dn.level!=1;return Ee(Ys(it,qe(ct,gn?dn.to:dn.from,gn?"before":"after"),"line",ot,dt),At,jt,!0)},0,pt.length-1),Yt=pt[qt];if(qt>0){var fe=Yt.level!=1,Ge=Ys(it,qe(ct,fe?Yt.from:Yt.to,fe?"after":"before"),"line",ot,dt);Ee(Ge,At,jt,!0)&&Ge.top>jt&&(Yt=pt[qt-1])}return Yt}function df(it,ot,ct,dt,pt,At,jt){var qt=br(it,ot,dt,jt),Yt=qt.begin,fe=qt.end;/\s/.test(ot.text.charAt(fe-1))&&fe--;for(var Ge=null,ge=null,dn=0;dn=fe||gn.to<=Yt)){var fi=gn.level!=1,Ri=nh(it,dt,fi?Math.min(fe,gn.to)-1:Math.max(Yt,gn.from)).right,Ji=RiJi)&&(Ge=gn,ge=Ji)}}return Ge||(Ge=pt[pt.length-1]),Ge.fromfe&&(Ge={from:Ge.from,to:fe,level:Ge.level}),Ge}var Vh;function vh(it){if(it.cachedTextHeight!=null)return it.cachedTextHeight;if(Vh==null){Vh=$t("pre",null,"CodeMirror-line-like");for(var ot=0;ot<49;++ot)Vh.appendChild(document.createTextNode("x")),Vh.appendChild($t("br"));Vh.appendChild(document.createTextNode("x"))}oe(it.measure,Vh);var ct=Vh.offsetHeight/50;return ct>3&&(it.cachedTextHeight=ct),re(it.measure),ct||1}function Lc(it){if(it.cachedCharWidth!=null)return it.cachedCharWidth;var ot=$t("span","xxxxxxxxxx"),ct=$t("pre",[ot],"CodeMirror-line-like");oe(it.measure,ct);var dt=ot.getBoundingClientRect(),pt=(dt.right-dt.left)/10;return pt>2&&(it.cachedCharWidth=pt),pt||10}function Mc(it){for(var ot=it.display,ct={},dt={},pt=ot.gutters.clientLeft,At=ot.gutters.firstChild,jt=0;At;At=At.nextSibling,++jt){var qt=it.display.gutterSpecs[jt].className;ct[qt]=At.offsetLeft+At.clientLeft+pt,dt[qt]=At.clientWidth}return{fixedPos:sc(ot),gutterTotalWidth:ot.gutters.offsetWidth,gutterLeft:ct,gutterWidth:dt,wrapperWidth:ot.wrapper.clientWidth}}function sc(it){return it.scroller.getBoundingClientRect().left-it.sizer.getBoundingClientRect().left}function Is(it){var ot=vh(it.display),ct=it.options.lineWrapping,dt=ct&&Math.max(5,it.display.scroller.clientWidth/Lc(it.display)-3);return function(pt){if(hn(it.doc,pt))return 0;var At=0;if(pt.widgets)for(var jt=0;jt0&&(fe=cn(it.doc,Yt.line).text).length==Yt.ch){var Ge=_t(fe,fe.length,it.options.tabSize)-fe.length;Yt=qe(Yt.line,Math.max(0,Math.round((At-Nl(it.display).left)/Lc(it.display))-Ge))}return Yt}function Tu(it,ot){if(ot>=it.display.viewTo||(ot-=it.display.viewFrom,ot<0))return null;for(var ct=it.display.view,dt=0;dtot)&&(pt.updateLineNumbers=ot),it.curOp.viewChanged=!0,ot>=pt.viewTo)Ln&&Qi(it.doc,ot)pt.viewFrom?tl(it):(pt.viewFrom+=dt,pt.viewTo+=dt);else if(ot<=pt.viewFrom&&ct>=pt.viewTo)tl(it);else if(ot<=pt.viewFrom){var At=lu(it,ct,ct+dt,1);At?(pt.view=pt.view.slice(At.index),pt.viewFrom=At.lineN,pt.viewTo+=dt):tl(it)}else if(ct>=pt.viewTo){var jt=lu(it,ot,ot,-1);jt?(pt.view=pt.view.slice(0,jt.index),pt.viewTo=jt.lineN):tl(it)}else{var qt=lu(it,ot,ot,-1),Yt=lu(it,ct,ct+dt,1);qt&&Yt?(pt.view=pt.view.slice(0,qt.index).concat(Aa(it,qt.lineN,Yt.lineN)).concat(pt.view.slice(Yt.index)),pt.viewTo+=dt):tl(it)}var fe=pt.externalMeasured;fe&&(ct=pt.lineN&&ot=dt.viewTo)){var At=dt.view[Tu(it,ot)];if(At.node!=null){var jt=At.changes||(At.changes=[]);ce(jt,ct)==-1&&jt.push(ct)}}}function tl(it){it.display.viewFrom=it.display.viewTo=it.doc.first,it.display.view=[],it.display.viewOffset=0}function lu(it,ot,ct,dt){var pt=Tu(it,ot),At,jt=it.display.view;if(!Ln||ct==it.doc.first+it.doc.size)return{index:pt,lineN:ct};for(var qt=it.display.viewFrom,Yt=0;Yt0){if(pt==jt.length-1)return null;At=qt+jt[pt].size-ot,pt++}else At=qt-ot;ot+=At,ct+=At}for(;Qi(it.doc,ct)!=ct;){if(pt==(dt<0?0:jt.length-1))return null;ct+=dt*jt[pt-(dt<0?1:0)].size,pt+=dt}return{index:pt,lineN:ct}}function Ss(it,ot,ct){var dt=it.display,pt=dt.view;pt.length==0||ot>=dt.viewTo||ct<=dt.viewFrom?(dt.view=Aa(it,ot,ct),dt.viewFrom=ot):(dt.viewFrom>ot?dt.view=Aa(it,ot,dt.viewFrom).concat(dt.view):dt.viewFromct&&(dt.view=dt.view.slice(0,Tu(it,ct)))),dt.viewTo=ct}function Cu(it){for(var ot=it.display.view,ct=0,dt=0;dt=it.display.viewTo||qt.to().line0?ot.blinker=setInterval(function(){it.hasFocus()||Ec(it),ot.cursorDiv.style.visibility=(ct=!ct)?"":"hidden"},it.options.cursorBlinkRate):it.options.cursorBlinkRate<0&&(ot.cursorDiv.style.visibility="hidden")}}function us(it){it.state.focused||(it.display.input.focus(),Ka(it))}function Hs(it){it.state.delayingBlurEvent=!0,setTimeout(function(){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1,Ec(it))},100)}function Ka(it,ot){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1),it.options.readOnly!="nocursor"&&(it.state.focused||(In(it,"focus",it,ot),it.state.focused=!0,De(it.display.wrapper,"CodeMirror-focused"),!it.curOp&&it.display.selForContextMenu!=it.doc.sel&&(it.display.input.reset(),Ut&&setTimeout(function(){return it.display.input.reset(!0)},20)),it.display.input.receivedFocus()),Ha(it))}function Ec(it,ot){it.state.delayingBlurEvent||(it.state.focused&&(In(it,"blur",it,ot),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 io(it){for(var ot=it.display,ct=ot.lineDiv.offsetTop,dt=0;dt.005||Ge<-.005)&&(mn(pt.line,jt),Kh(pt.line),pt.rest))for(var ge=0;geit.display.sizerWidth){var dn=Math.ceil(qt/Lc(it.display));dn>it.display.maxLineLength&&(it.display.maxLineLength=dn,it.display.maxLine=pt.line,it.display.maxLineChanged=!0)}}}}function Kh(it){if(it.widgets)for(var ot=0;ot=jt&&(At=ni(ot,oo(cn(ot,Yt))-it.wrapper.clientHeight),jt=Yt)}return{from:At,to:Math.max(jt,At+1)}}function zf(it,ot){if(!ei(it,"scrollCursorIntoView")){var ct=it.display,dt=ct.sizer.getBoundingClientRect(),pt=null;if(ot.top+dt.top<0?pt=!0:ot.bottom+dt.top>(window.innerHeight||document.documentElement.clientHeight)&&(pt=!1),pt!=null&&!Ht){var At=$t("div","\u200B",null,`position: absolute; top: `+(ot.top-ct.viewOffset-Za(it.display))+`px; height: `+(ot.bottom-ot.top+Ts(it)+ct.barHeight)+`px; left: `+ot.left+"px; width: "+Math.max(2,ot.right-ot.left)+"px;");it.display.lineSpace.appendChild(At),At.scrollIntoView(pt),it.display.lineSpace.removeChild(At)}}}function Ac(it,ot,ct,dt){dt==null&&(dt=0);var pt;!it.options.lineWrapping&&ot==ct&&(ot=ot.ch?qe(ot.line,ot.sticky=="before"?ot.ch-1:ot.ch,"after"):ot,ct=ot.sticky=="before"?qe(ot.line,ot.ch+1,"before"):ot);for(var At=0;At<5;At++){var jt=!1,qt=Ys(it,ot),Yt=!ct||ct==ot?qt:Ys(it,ct);pt={left:Math.min(qt.left,Yt.left),top:Math.min(qt.top,Yt.top)-dt,right:Math.max(qt.left,Yt.left),bottom:Math.max(qt.bottom,Yt.bottom)+dt};var fe=ff(it,pt),Ge=it.doc.scrollTop,ge=it.doc.scrollLeft;if(fe.scrollTop!=null&&(ye(it,fe.scrollTop),Math.abs(it.doc.scrollTop-Ge)>1&&(jt=!0)),fe.scrollLeft!=null&&(Me(it,fe.scrollLeft),Math.abs(it.doc.scrollLeft-ge)>1&&(jt=!0)),!jt)break}return pt}function pd(it,ot){var ct=ff(it,ot);ct.scrollTop!=null&&ye(it,ct.scrollTop),ct.scrollLeft!=null&&Me(it,ct.scrollLeft)}function ff(it,ot){var ct=it.display,dt=vh(it.display);ot.top<0&&(ot.top=0);var pt=it.curOp&&it.curOp.scrollTop!=null?it.curOp.scrollTop:ct.scroller.scrollTop,At=Pu(it),jt={};ot.bottom-ot.top>At&&(ot.bottom=ot.top+At);var qt=it.doc.height+Xs(ct),Yt=ot.topqt-dt;if(ot.toppt+At){var Ge=Math.min(ot.top,(fe?qt:ot.bottom)-At);Ge!=pt&&(jt.scrollTop=Ge)}var ge=it.options.fixedGutter?0:ct.gutters.offsetWidth,dn=it.curOp&&it.curOp.scrollLeft!=null?it.curOp.scrollLeft:ct.scroller.scrollLeft-ge,gn=fl(it)-ct.gutters.offsetWidth,fi=ot.right-ot.left>gn;return fi&&(ot.right=ot.left+gn),ot.left<10?jt.scrollLeft=0:ot.leftgn+dn-3&&(jt.scrollLeft=ot.right+(fi?0:10)-gn),jt}function rh(it,ot){ot!=null&&(yh(it),it.curOp.scrollTop=(it.curOp.scrollTop==null?it.doc.scrollTop:it.curOp.scrollTop)+ot)}function Uh(it){yh(it);var ot=it.getCursor();it.curOp.scrollToPos={from:ot,to:ot,margin:it.options.cursorScrollMargin}}function oh(it,ot,ct){(ot!=null||ct!=null)&&yh(it),ot!=null&&(it.curOp.scrollLeft=ot),ct!=null&&(it.curOp.scrollTop=ct)}function Ya(it,ot){yh(it),it.curOp.scrollToPos=ot}function yh(it){var ot=it.curOp.scrollToPos;if(ot){it.curOp.scrollToPos=null;var ct=Nh(it,ot.from),dt=Nh(it,ot.to);Vt(it,ct,dt,ot.margin)}}function Vt(it,ot,ct,dt){var pt=ff(it,{left:Math.min(ot.left,ct.left),top:Math.min(ot.top,ct.top)-dt,right:Math.max(ot.right,ct.right),bottom:Math.max(ot.bottom,ct.bottom)+dt});oh(it,pt.scrollLeft,pt.scrollTop)}function ye(it,ot){Math.abs(it.doc.scrollTop-ot)<2||(Pt||Gr(it,{top:ot}),be(it,ot,!0),Pt&&Gr(it),ra(it,100))}function be(it,ot,ct){ot=Math.max(0,Math.min(it.display.scroller.scrollHeight-it.display.scroller.clientHeight,ot)),!(it.display.scroller.scrollTop==ot&&!ct)&&(it.doc.scrollTop=ot,it.display.scrollbars.setScrollTop(ot),it.display.scroller.scrollTop!=ot&&(it.display.scroller.scrollTop=ot))}function Me(it,ot,ct,dt){ot=Math.max(0,Math.min(ot,it.display.scroller.scrollWidth-it.display.scroller.clientWidth)),!((ct?ot==it.doc.scrollLeft:Math.abs(it.doc.scrollLeft-ot)<2)&&!dt)&&(it.doc.scrollLeft=ot,Ra(it),it.display.scroller.scrollLeft!=ot&&(it.display.scroller.scrollLeft=ot),it.display.scrollbars.setScrollLeft(ot))}function Qe(it){var ot=it.display,ct=ot.gutters.offsetWidth,dt=Math.round(it.doc.height+Xs(it.display));return{clientHeight:ot.scroller.clientHeight,viewHeight:ot.wrapper.clientHeight,scrollWidth:ot.scroller.scrollWidth,clientWidth:ot.scroller.clientWidth,viewWidth:ot.wrapper.clientWidth,barLeft:it.options.fixedGutter?ct:0,docHeight:dt,scrollHeight:dt+Ts(it)+ot.barHeight,nativeBarWidth:ot.nativeBarWidth,gutterWidth:ct}}var ln=function(it,ot,ct){this.cm=ct;var dt=this.vert=$t("div",[$t("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),pt=this.horiz=$t("div",[$t("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");dt.tabIndex=pt.tabIndex=-1,it(dt),it(pt),pn(dt,"scroll",function(){dt.clientHeight&&ot(dt.scrollTop,"vertical")}),pn(pt,"scroll",function(){pt.clientWidth&&ot(pt.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Pe&&Bt<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ln.prototype.update=function(it){var ot=it.scrollWidth>it.clientWidth+1,ct=it.scrollHeight>it.clientHeight+1,dt=it.nativeBarWidth;if(ct){this.vert.style.display="block",this.vert.style.bottom=ot?dt+"px":"0";var pt=it.viewHeight-(ot?dt:0);this.vert.firstChild.style.height=Math.max(0,it.scrollHeight-it.clientHeight+pt)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(ot){this.horiz.style.display="block",this.horiz.style.right=ct?dt+"px":"0",this.horiz.style.left=it.barLeft+"px";var At=it.viewWidth-it.barLeft-(ct?dt:0);this.horiz.firstChild.style.width=Math.max(0,it.scrollWidth-it.clientWidth+At)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&it.clientHeight>0&&(dt==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:ct?dt:0,bottom:ot?dt:0}},ln.prototype.setScrollLeft=function(it){this.horiz.scrollLeft!=it&&(this.horiz.scrollLeft=it),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ln.prototype.setScrollTop=function(it){this.vert.scrollTop!=it&&(this.vert.scrollTop=it),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ln.prototype.zeroWidthHack=function(){var it=ht&&!pe?"12px":"18px";this.horiz.style.height=this.vert.style.width=it,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Tt,this.disableVert=new Tt},ln.prototype.enableZeroWidthBar=function(it,ot,ct){it.style.pointerEvents="auto";function dt(){var pt=it.getBoundingClientRect(),At=ct=="vert"?document.elementFromPoint(pt.right-1,(pt.top+pt.bottom)/2):document.elementFromPoint((pt.right+pt.left)/2,pt.bottom-1);At!=it?it.style.pointerEvents="none":ot.set(1e3,dt)}ot.set(1e3,dt)},ln.prototype.clear=function(){var it=this.horiz.parentNode;it.removeChild(this.horiz),it.removeChild(this.vert)};var yn=function(){};yn.prototype.update=function(){return{bottom:0,right:0}},yn.prototype.setScrollLeft=function(){},yn.prototype.setScrollTop=function(){},yn.prototype.clear=function(){};function On(it,ot){ot||(ot=Qe(it));var ct=it.display.barWidth,dt=it.display.barHeight;li(it,ot);for(var pt=0;pt<4&&ct!=it.display.barWidth||dt!=it.display.barHeight;pt++)ct!=it.display.barWidth&&it.options.lineWrapping&&io(it),li(it,Qe(it)),ct=it.display.barWidth,dt=it.display.barHeight}function li(it,ot){var ct=it.display,dt=ct.scrollbars.update(ot);ct.sizer.style.paddingRight=(ct.barWidth=dt.right)+"px",ct.sizer.style.paddingBottom=(ct.barHeight=dt.bottom)+"px",ct.heightForcer.style.borderBottom=dt.bottom+"px solid transparent",dt.right&&dt.bottom?(ct.scrollbarFiller.style.display="block",ct.scrollbarFiller.style.height=dt.bottom+"px",ct.scrollbarFiller.style.width=dt.right+"px"):ct.scrollbarFiller.style.display="",dt.bottom&&it.options.coverGutterNextToScrollbar&&it.options.fixedGutter?(ct.gutterFiller.style.display="block",ct.gutterFiller.style.height=dt.bottom+"px",ct.gutterFiller.style.width=ot.gutterWidth+"px"):ct.gutterFiller.style.display=""}var qn={native:ln,null:yn};function Ai(it){it.display.scrollbars&&(it.display.scrollbars.clear(),it.display.scrollbars.addClass&&Jt(it.display.wrapper,it.display.scrollbars.addClass)),it.display.scrollbars=new qn[it.options.scrollbarStyle](function(ot){it.display.wrapper.insertBefore(ot,it.display.scrollbarFiller),pn(ot,"mousedown",function(){it.state.focused&&setTimeout(function(){return it.display.input.focus()},0)}),ot.setAttribute("cm-not-content","true")},function(ot,ct){ct=="horizontal"?Me(it,ot):ye(it,ot)},it),it.display.scrollbars.addClass&&De(it.display.wrapper,it.display.scrollbars.addClass)}var ri=0;function xi(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:++ri},so(it.curOp)}function di(it){var ot=it.curOp;ot&&ka(ot,function(ct){for(var dt=0;dt=ct.viewTo)||ct.maxLineChanged&&ot.options.lineWrapping,it.update=it.mustUpdate&&new va(ot,it.mustUpdate&&{top:it.scrollTop,ensure:it.scrollToPos},it.forceUpdate)}function Pr(it){it.updatedDisplay=it.mustUpdate&&wo(it.cm,it.update)}function zr(it){var ot=it.cm,ct=ot.display;it.updatedDisplay&&io(ot),it.barMeasure=Qe(ot),ct.maxLineChanged&&!ot.options.lineWrapping&&(it.adjustWidthTo=Fu(ot,ct.maxLine,ct.maxLine.text.length).left+3,ot.display.sizerWidth=it.adjustWidthTo,it.barMeasure.scrollWidth=Math.max(ct.scroller.clientWidth,ct.sizer.offsetLeft+it.adjustWidthTo+Ts(ot)+ot.display.barWidth),it.maxScrollLeft=Math.max(0,ct.sizer.offsetLeft+it.adjustWidthTo-fl(ot))),(it.updatedDisplay||it.selectionChanged)&&(it.preparedSelection=ct.input.prepareSelection())}function Yi(it){var ot=it.cm;it.adjustWidthTo!=null&&(ot.display.sizer.style.minWidth=it.adjustWidthTo+"px",it.maxScrollLeft=it.display.viewTo)){var ct=+new Date+it.options.workTime,dt=la(it,ot.highlightFrontier),pt=[];ot.iter(dt.line,Math.min(ot.first+ot.size,it.display.viewTo+500),function(At){if(dt.line>=it.display.viewFrom){var jt=At.styles,qt=At.text.length>it.options.maxHighlightLength?Sn(ot.mode,dt.state):null,Yt=qo(it,At,dt,!0);qt&&(dt.state=qt),At.styles=Yt.styles;var fe=At.styleClasses,Ge=Yt.classes;Ge?At.styleClasses=Ge:fe&&(At.styleClasses=null);for(var ge=!jt||jt.length!=At.styles.length||fe!=Ge&&(!fe||!Ge||fe.bgClass!=Ge.bgClass||fe.textClass!=Ge.textClass),dn=0;!ge&&dnct)return ra(it,it.options.workDelay),!0}),ot.highlightFrontier=dt.line,ot.modeFrontier=Math.max(ot.modeFrontier,dt.line),pt.length&&nr(it,function(){for(var At=0;At=ct.viewFrom&&ot.visible.to<=ct.viewTo&&(ct.updateLineNumbers==null||ct.updateLineNumbers>=ct.viewTo)&&ct.renderedView==ct.view&&Cu(it)==0)return!1;Ko(it)&&(tl(it),ot.dims=Mc(it));var pt=dt.first+dt.size,At=Math.max(ot.visible.from-it.options.viewportMargin,dt.first),jt=Math.min(pt,ot.visible.to+it.options.viewportMargin);ct.viewFromjt&&ct.viewTo-jt<20&&(jt=Math.min(pt,ct.viewTo)),Ln&&(At=Qi(it.doc,At),jt=Er(it.doc,jt));var qt=At!=ct.viewFrom||jt!=ct.viewTo||ct.lastWrapHeight!=ot.wrapperHeight||ct.lastWrapWidth!=ot.wrapperWidth;Ss(it,At,jt),ct.viewOffset=oo(cn(it.doc,ct.viewFrom)),it.display.mover.style.top=ct.viewOffset+"px";var Yt=Cu(it);if(!qt&&Yt==0&&!ot.force&&ct.renderedView==ct.view&&(ct.updateLineNumbers==null||ct.updateLineNumbers>=ct.viewTo))return!1;var fe=wa(it);return Yt>4&&(ct.lineDiv.style.display="none"),ko(it,ct.updateLineNumbers,ot.dims),Yt>4&&(ct.lineDiv.style.display=""),ct.renderedView=ct.view,yo(fe),re(ct.cursorDiv),re(ct.selectionDiv),ct.gutters.style.height=ct.sizer.style.minHeight=0,qt&&(ct.lastWrapHeight=ot.wrapperHeight,ct.lastWrapWidth=ot.wrapperWidth,ra(it,400)),ct.updateLineNumbers=null,!0}function tr(it,ot){for(var ct=ot.viewport,dt=!0;;dt=!1){if(!dt||!it.options.lineWrapping||ot.oldDisplayWidth==fl(it)){if(ct&&ct.top!=null&&(ct={top:Math.min(it.doc.height+Xs(it.display)-Pu(it),ct.top)}),ot.visible=Fa(it.display,it.doc,ct),ot.visible.from>=it.display.viewFrom&&ot.visible.to<=it.display.viewTo)break}else dt&&(ot.visible=Fa(it.display,it.doc,ct));if(!wo(it,ot))break;io(it);var pt=Qe(it);gl(it),On(it,pt),Oo(it,pt),ot.force=!1}ot.signal(it,"update",it),(it.display.viewFrom!=it.display.reportedViewFrom||it.display.viewTo!=it.display.reportedViewTo)&&(ot.signal(it,"viewportChange",it,it.display.viewFrom,it.display.viewTo),it.display.reportedViewFrom=it.display.viewFrom,it.display.reportedViewTo=it.display.viewTo)}function Gr(it,ot){var ct=new va(it,ot);if(wo(it,ct)){io(it),tr(it,ct);var dt=Qe(it);gl(it),On(it,dt),Oo(it,dt),ct.finish()}}function ko(it,ot,ct){var dt=it.display,pt=it.options.lineNumbers,At=dt.lineDiv,jt=At.firstChild;function qt(fi){var Ri=fi.nextSibling;return Ut&&ht&&it.display.currentWheelTarget==fi?fi.style.display="none":fi.parentNode.removeChild(fi),Ri}for(var Yt=dt.view,fe=dt.viewFrom,Ge=0;Ge-1&&(gn=!1),zl(it,ge,fe,ct)),gn&&(re(ge.lineNumber),ge.lineNumber.appendChild(document.createTextNode(Li(it.options,fe)))),jt=ge.node.nextSibling}fe+=ge.size}for(;jt;)jt=qt(jt)}function Bo(it){var ot=it.gutters.offsetWidth;it.sizer.style.marginLeft=ot+"px"}function Oo(it,ot){it.display.sizer.style.minHeight=ot.docHeight+"px",it.display.heightForcer.style.top=ot.docHeight+"px",it.display.gutters.style.height=ot.docHeight+it.display.barHeight+Ts(it)+"px"}function Ra(it){var ot=it.display,ct=ot.view;if(!(!ot.alignWidgets&&(!ot.gutters.firstChild||!it.options.fixedGutter))){for(var dt=sc(ot)-ot.scroller.scrollLeft+it.doc.scrollLeft,pt=ot.gutters.offsetWidth,At=dt+"px",jt=0;jtjt.clientWidth,Yt=jt.scrollHeight>jt.clientHeight;if(dt&&qt||pt&&Yt){if(pt&&ht&&Ut){t:for(var fe=ot.target,Ge=At.view;fe!=jt;fe=fe.parentNode)for(var ge=0;ge=0&&oi(it,dt.to())<=0)return ct}return-1};var Yr=function(it,ot){this.anchor=it,this.head=ot};Yr.prototype.from=function(){return Si(this.anchor,this.head)},Yr.prototype.to=function(){return xr(this.anchor,this.head)},Yr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Wa(it,ot,ct){var dt=it&&it.options.selectionsMayTouch,pt=ot[ct];ot.sort(function(dn,gn){return oi(dn.from(),gn.from())}),ct=ce(ot,pt);for(var At=1;At0:Yt>=0){var fe=Si(qt.from(),jt.from()),Ge=xr(qt.to(),jt.to()),ge=qt.empty()?jt.from()==jt.head:qt.from()==qt.head;At<=ct&&--ct,ot.splice(--At,2,new Yr(ge?Ge:fe,ge?fe:Ge))}}return new Da(ot,ct)}function Js(it,ot){return new Da([new Yr(it,ot||it)],0)}function Ll(it){return it.text?qe(it.from.line+it.text.length-1,ze(it.text).length+(it.text.length==1?it.from.ch:0)):it.to}function jl(it,ot){if(oi(it,ot.from)<0)return it;if(oi(it,ot.to)<=0)return Ll(ot);var ct=it.line+ot.text.length-(ot.to.line-ot.from.line)-1,dt=it.ch;return it.line==ot.to.line&&(dt+=Ll(ot).ch-ot.to.ch),qe(ct,dt)}function ql(it,ot){for(var ct=[],dt=0;dt1&&it.remove(qt.line+1,fi-1),it.insert(qt.line+1,fr)}qi(it,"change",it,ot)}function Tl(it,ot,ct){function dt(pt,At,jt){if(pt.linked)for(var qt=0;qt1&&!it.done[it.done.length-2].ranges)return it.done.pop(),ze(it.done)}function Xh(it,ot,ct,dt){var pt=it.history;pt.undone.length=0;var At=+new Date,jt,qt;if((pt.lastOp==dt||pt.lastOrigin==ot.origin&&ot.origin&&(ot.origin.charAt(0)=="+"&&pt.lastModTime>At-(it.cm?it.cm.options.historyEventDelay:500)||ot.origin.charAt(0)=="*"))&&(jt=ah(pt,pt.lastOp==dt)))qt=ze(jt.changes),oi(ot.from,ot.to)==0&&oi(ot.from,qt.to)==0?qt.to=Ll(ot):jt.changes.push(zs(it,ot));else{var Yt=ze(pt.done);for((!Yt||!Yt.ranges)&&Dl(it.sel,pt.done),jt={changes:[zs(it,ot)],generation:pt.generation},pt.done.push(jt);pt.done.length>pt.undoDepth;)pt.done.shift(),pt.done[0].ranges||pt.done.shift()}pt.done.push(ct),pt.generation=++pt.maxGeneration,pt.lastModTime=pt.lastSelTime=At,pt.lastOp=pt.lastSelOp=dt,pt.lastOrigin=pt.lastSelOrigin=ot.origin,qt||In(it,"historyAdded")}function Vc(it,ot,ct,dt){var pt=ot.charAt(0);return pt=="*"||pt=="+"&&ct.ranges.length==dt.ranges.length&&ct.somethingSelected()==dt.somethingSelected()&&new Date-it.history.lastSelTime<=(it.cm?it.cm.options.historyEventDelay:500)}function lc(it,ot,ct,dt){var pt=it.history,At=dt&&dt.origin;ct==pt.lastSelOp||At&&pt.lastSelOrigin==At&&(pt.lastModTime==pt.lastSelTime&&pt.lastOrigin==At||Vc(it,At,ze(pt.done),ot))?pt.done[pt.done.length-1]=ot:Dl(ot,pt.done),pt.lastSelTime=+new Date,pt.lastSelOrigin=At,pt.lastSelOp=ct,dt&&dt.clearRedo!==!1&&Bu(pt.undone)}function Dl(it,ot){var ct=ze(ot);ct&&ct.ranges&&ct.equals(it)||ot.push(it)}function Sh(it,ot,ct,dt){var pt=ot["spans_"+it.id],At=0;it.iter(Math.max(it.first,ct),Math.min(it.first+it.size,dt),function(jt){jt.markedSpans&&((pt||(pt=ot["spans_"+it.id]={}))[At]=jt.markedSpans),++At})}function Bl(it){if(!it)return null;for(var ot,ct=0;ct-1&&(ze(qt)[ge]=fe[ge],delete fe[ge])}}return dt}function kc(it,ot,ct,dt){if(dt){var pt=it.anchor;if(ct){var At=oi(ot,pt)<0;At!=oi(ct,pt)<0?(pt=ot,ot=ct):At!=oi(ot,ct)<0&&(ot=ct)}return new Yr(pt,ot)}else return new Yr(ct||ot,ot)}function uc(it,ot,ct,dt,pt){pt==null&&(pt=it.cm&&(it.cm.display.shift||it.extend)),Es(it,new Da([kc(it.sel.primary(),ot,ct,pt)],0),dt)}function Kc(it,ot,ct){for(var dt=[],pt=it.cm&&(it.cm.display.shift||it.extend),At=0;At=ot.ch:qt.to>ot.ch))){if(pt&&(In(Yt,"beforeCursorEnter"),Yt.explicitlyCleared))if(At.markedSpans){--jt;continue}else break;if(!Yt.atomic)continue;if(ct){var ge=Yt.find(dt<0?1:-1),dn=void 0;if((dt<0?Ge:fe)&&(ge=me(it,ge,-dt,ge&&ge.line==ot.line?At:null)),ge&&ge.line==ot.line&&(dn=oi(ge,ct))&&(dt<0?dn<0:dn>0))return It(it,ge,ot,dt,pt)}var gn=Yt.find(dt<0?-1:1);return(dt<0?fe:Ge)&&(gn=me(it,gn,dt,gn.line==ot.line?At:null)),gn?It(it,gn,ot,dt,pt):null}}return ot}function Kt(it,ot,ct,dt,pt){var At=dt||1,jt=It(it,ot,ct,At,pt)||!pt&&It(it,ot,ct,At,!0)||It(it,ot,ct,-At,pt)||!pt&&It(it,ot,ct,-At,!0);return jt||(it.cantEdit=!0,qe(it.first,0))}function me(it,ot,ct,dt){return ct<0&&ot.ch==0?ot.line>it.first?Gi(it,qe(ot.line-1)):null:ct>0&&ot.ch==(dt||cn(it,ot.line)).text.length?ot.line=0;--pt)Rn(it,{from:dt[pt].from,to:dt[pt].to,text:pt?[""]:ot.text,origin:ot.origin});else Rn(it,ot)}}function Rn(it,ot){if(!(ot.text.length==1&&ot.text[0]==""&&oi(ot.from,ot.to)==0)){var ct=ql(it,ot);Xh(it,ot,ct,it.cm?it.cm.curOp.id:NaN),wi(it,ot,ct,Ii(it,ot));var dt=[];Tl(it,function(pt,At){!At&&ce(dt,pt.history)==-1&&(Ci(pt.history,ot),dt.push(pt.history)),wi(pt,ot,null,Ii(pt,ot))})}}function Jn(it,ot,ct){var dt=it.cm&&it.cm.state.suppressEdits;if(!(dt&&!ct)){for(var pt=it.history,At,jt=it.sel,qt=ot=="undo"?pt.done:pt.undone,Yt=ot=="undo"?pt.undone:pt.done,fe=0;fe=0;--gn){var fi=dn(gn);if(fi)return fi.v}}}}function kn(it,ot){if(ot!=0&&(it.first+=ot,it.sel=new Da(je(it.sel.ranges,function(pt){return new Yr(qe(pt.anchor.line+ot,pt.anchor.ch),qe(pt.head.line+ot,pt.head.ch))}),it.sel.primIndex),it.cm)){Ps(it.cm,it.first,it.first-ot,ot);for(var ct=it.cm.display,dt=ct.viewFrom;dtit.lastLine())){if(ot.from.lineAt&&(ot={from:ot.from,to:qe(At,cn(it,At).text.length),text:[ot.text[0]],origin:ot.origin}),ot.removed=_n(it,ot.from,ot.to),ct||(ct=ql(it,ot)),it.cm?Hi(it.cm,ot,dt):Ml(it,ot,dt),Gl(it,ct,xe),it.cantEdit&&Kt(it,qe(it.firstLine(),0))&&(it.cantEdit=!1)}}function Hi(it,ot,ct){var dt=it.doc,pt=it.display,At=ot.from,jt=ot.to,qt=!1,Yt=At.line;it.options.lineWrapping||(Yt=Oe(Ho(cn(dt,At.line))),dt.iter(Yt,jt.line+1,function(gn){if(gn==pt.maxLine)return qt=!0,!0})),dt.sel.contains(ot.from,ot.to)>-1&&Ki(it),Ml(dt,ot,ct,Is(it)),it.options.lineWrapping||(dt.iter(Yt,At.line+ot.text.length,function(gn){var fi=ca(gn);fi>pt.maxLineLength&&(pt.maxLine=gn,pt.maxLineLength=fi,pt.maxLineChanged=!0,qt=!1)}),qt&&(it.curOp.updateMaxLine=!0)),Ir(dt,At.line),ra(it,400);var fe=ot.text.length-(jt.line-At.line)-1;ot.full?Ps(it):At.line==jt.line&&ot.text.length==1&&!ns(it.doc,ot)?da(it,At.line,"text"):Ps(it,At.line,jt.line+1,fe);var Ge=hi(it,"changes"),ge=hi(it,"change");if(ge||Ge){var dn={from:At,to:jt,text:ot.text,removed:ot.removed,origin:ot.origin};ge&&qi(it,"change",it,dn),Ge&&(it.curOp.changeObjs||(it.curOp.changeObjs=[])).push(dn)}it.display.selForContextMenu=null}function Oi(it,ot,ct,dt,pt){var At;dt||(dt=ct),oi(dt,ct)<0&&(At=[dt,ct],ct=At[0],dt=At[1]),typeof ot=="string"&&(ot=it.splitLines(ot)),vn(it,{from:ct,to:dt,text:ot,origin:pt})}function pi(it,ot,ct,dt){ct1||!(this.children[0]instanceof ci))){var qt=[];this.collapse(qt),this.children=[new ci(qt)],this.children[0].parent=this}},collapse:function(it){for(var ot=0;ot50){for(var jt=pt.lines.length%25+25,qt=jt;qt10);it.parent.maybeSpill()}},iterN:function(it,ot,ct){for(var dt=0;dtit.display.maxLineLength&&(it.display.maxLine=fe,it.display.maxLineLength=Ge,it.display.maxLineChanged=!0)}dt!=null&&it&&this.collapsed&&Ps(it,dt,pt+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,it&&yt(it.doc)),it&&qi(it,"markerCleared",it,this,dt,pt),ot&&di(it),this.parent&&this.parent.clear()}},we.prototype.find=function(it,ot){it==null&&this.type=="bookmark"&&(it=1);for(var ct,dt,pt=0;pt0||jt==0&&At.clearWhenEmpty!==!1)return At;if(At.replacedWith&&(At.collapsed=!0,At.widgetNode=Le("span",[At.replacedWith],"CodeMirror-widget"),dt.handleMouseEvents||At.widgetNode.setAttribute("cm-ignore-events","true"),dt.insertLeft&&(At.widgetNode.insertLeft=!0)),At.collapsed){if(os(it,ot.line,ot,ct,At)||ot.line!=ct.line&&os(it,ct.line,ot,ct,At))throw new Error("Inserting collapsed marker partially overlapping an existing one");Pn()}At.addToHistory&&Xh(it,{from:ot,to:ct,origin:"markText"},it.sel,NaN);var qt=ot.line,Yt=it.cm,fe;if(it.iter(qt,ct.line+1,function(ge){Yt&&At.collapsed&&!Yt.options.lineWrapping&&Ho(ge)==Yt.display.maxLine&&(fe=!0),At.collapsed&&qt!=ot.line&&mn(ge,0),Ze(ge,new Br(At,qt==ot.line?ot.ch:null,qt==ct.line?ct.ch:null)),++qt}),At.collapsed&&it.iter(ot.line,ct.line+1,function(ge){hn(it,ge)&&mn(ge,0)}),At.clearOnEnter&&pn(At,"beforeCursorEnter",function(){return At.clear()}),At.readOnly&&($r(),(it.history.done.length||it.history.undone.length)&&it.clearHistory()),At.collapsed&&(At.id=++Zi,At.atomic=!0),Yt){if(fe&&(Yt.curOp.updateMaxLine=!0),At.collapsed)Ps(Yt,ot.line,ct.line+1);else if(At.className||At.startStyle||At.endStyle||At.css||At.attributes||At.title)for(var Ge=ot.line;Ge<=ct.line;Ge++)da(Yt,Ge,"text");At.atomic&&yt(Yt.doc),qi(Yt,"markerAdded",Yt,At)}return At}var wr=function(it,ot){this.markers=it,this.primary=ot;for(var ct=0;ct=0;Yt--)vn(this,dt[Yt]);qt?Th(this,qt):this.cm&&Uh(this.cm)}),undo:Or(function(){Jn(this,"undo")}),redo:Or(function(){Jn(this,"redo")}),undoSelection:Or(function(){Jn(this,"undo",!0)}),redoSelection:Or(function(){Jn(this,"redo",!0)}),setExtending:function(it){this.extend=it},getExtending:function(){return this.extend},historySize:function(){for(var it=this.history,ot=0,ct=0,dt=0;dt=it.ch)&&ot.push(pt.marker.parent||pt.marker)}return ot},findMarks:function(it,ot,ct){it=Gi(this,it),ot=Gi(this,ot);var dt=[],pt=it.line;return this.iter(it.line,ot.line+1,function(At){var jt=At.markedSpans;if(jt)for(var qt=0;qt=Yt.to||Yt.from==null&&pt!=it.line||Yt.from!=null&&pt==ot.line&&Yt.from>=ot.ch)&&(!ct||ct(Yt.marker))&&dt.push(Yt.marker.parent||Yt.marker)}++pt}),dt},getAllMarks:function(){var it=[];return this.iter(function(ot){var ct=ot.markedSpans;if(ct)for(var dt=0;dtit)return ot=it,!0;it-=At,++ct}),Gi(this,qe(ct,ot))},indexFromPos:function(it){it=Gi(this,it);var ot=it.ch;if(it.lineot&&(ot=it.from),it.to!=null&&it.to-1){ot.state.draggingText(it),setTimeout(function(){return ot.display.input.focus()},20);return}try{var Ge=it.dataTransfer.getData("Text");if(Ge){var ge;if(ot.state.draggingText&&!ot.state.draggingText.copy&&(ge=ot.listSelections()),Gl(ot.doc,Js(ct,ct)),ge)for(var dn=0;dn=0;qt--)Oi(it.doc,"",dt[qt].from,dt[qt].to,"+delete");Uh(it)})}function _a(it,ot,ct){var dt=Je(it.text,ot+ct,ct);return dt<0||dt>it.text.length?null:dt}function xo(it,ot,ct){var dt=_a(it,ot.ch,ct);return dt==null?null:new qe(ot.line,dt,ct<0?"after":"before")}function ya(it,ot,ct,dt,pt){if(it){ot.doc.direction=="rtl"&&(pt=-pt);var At=Qn(ct,ot.doc.direction);if(At){var jt=pt<0?ze(At):At[0],qt=pt<0==(jt.level==1),Yt=qt?"after":"before",fe;if(jt.level>0||ot.doc.direction=="rtl"){var Ge=ac(ot,ct);fe=pt<0?ct.text.length-1:0;var ge=nh(ot,Ge,fe).top;fe=fn(function(dn){return nh(ot,Ge,dn).top==ge},pt<0==(jt.level==1)?jt.from:jt.to-1,fe),Yt=="before"&&(fe=_a(ct,fe,1))}else fe=pt<0?jt.to:jt.from;return new qe(dt,fe,Yt)}}return new qe(dt,pt<0?ct.text.length:0,pt<0?"before":"after")}function Cs(it,ot,ct,dt){var pt=Qn(ot,it.doc.direction);if(!pt)return xo(ot,ct,dt);ct.ch>=ot.text.length?(ct.ch=ot.text.length,ct.sticky="before"):ct.ch<=0&&(ct.ch=0,ct.sticky="after");var At=Ue(pt,ct.ch,ct.sticky),jt=pt[At];if(it.doc.direction=="ltr"&&jt.level%2==0&&(dt>0?jt.to>ct.ch:jt.from=jt.from&&dn>=Ge.begin)){var gn=ge?"before":"after";return new qe(ct.line,dn,gn)}}var fi=function(fr,_r,kr){for(var lo=function(il,nu){return nu?new qe(ct.line,qt(il,1),"before"):new qe(ct.line,il,"after")};fr>=0&&fr0==(ea.level!=1),ja=Ar?kr.begin:qt(kr.end,-1);if(ea.from<=ja&&ja0?Ge.end:qt(Ge.begin,-1);return Ji!=null&&!(dt>0&&Ji==ot.text.length)&&(Ri=fi(dt>0?0:pt.length-1,dt,fe(Ji)),Ri)?Ri:null}var cs={selectAll:Re,singleSelection:function(it){return it.setSelection(it.getCursor("anchor"),it.getCursor("head"),xe)},killLine:function(it){return aa(it,function(ot){if(ot.empty()){var ct=cn(it.doc,ot.head.line).text.length;return ot.head.ch==ct&&ot.head.line0)pt=new qe(pt.line,pt.ch+1),it.replaceRange(At.charAt(pt.ch-1)+At.charAt(pt.ch-2),qe(pt.line,pt.ch-2),pt,"+transpose");else if(pt.line>it.doc.first){var jt=cn(it.doc,pt.line-1).text;jt&&(pt=new qe(pt.line,1),it.replaceRange(At.charAt(0)+it.doc.lineSeparator()+jt.charAt(jt.length-1),qe(pt.line-1,jt.length-1),pt,"+transpose"))}}ct.push(new Yr(pt,pt))}it.setSelections(ct)})},newlineAndIndent:function(it){return nr(it,function(){for(var ot=it.listSelections(),ct=ot.length-1;ct>=0;ct--)it.replaceRange(it.doc.lineSeparator(),ot[ct].anchor,ot[ct].head,"+input");ot=it.listSelections();for(var dt=0;dtit&&oi(ot,this.pos)==0&&ct==this.button};var eu,ml;function lh(it,ot){var ct=+new Date;return ml&&ml.compare(ct,it,ot)?(eu=ml=null,"triple"):eu&&eu.compare(ct,it,ot)?(ml=new qs(ct,it,ot),eu=null,"double"):(eu=new qs(ct,it,ot),ml=null,"single")}function hl(it){var ot=this,ct=ot.display;if(!(ei(ot,it)||ct.activeTouch&&ct.input.supportsTouch())){if(ct.input.ensurePolled(),ct.shift=it.shiftKey,ua(ct,it)){Ut||(ct.scroller.draggable=!1,setTimeout(function(){return ct.scroller.draggable=!0},100));return}if(!Tc(ot,it)){var dt=Jl(ot,it),pt=Jo(it),At=dt?lh(dt,pt):"single";window.focus(),pt==1&&ot.state.selectingText&&ot.state.selectingText(it),!(dt&&Xu(ot,pt,dt,At,it))&&(pt==1?dt?fs(ot,dt,At,it):Ur(it)==ct.scroller&&pr(it):pt==2?(dt&&uc(ot.doc,dt),setTimeout(function(){return ct.input.focus()},20)):pt==3&&(St?ot.display.input.onContextMenu(it):Hs(ot)))}}}function Xu(it,ot,ct,dt,pt){var At="Click";return dt=="double"?At="Double"+At:dt=="triple"&&(At="Triple"+At),At=(ot==1?"Left":ot==2?"Middle":"Right")+At,js(it,bo(At,pt),pt,function(jt){if(typeof jt=="string"&&(jt=cs[jt]),!jt)return!1;var qt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),qt=jt(it,ct)!=Ye}finally{it.state.suppressEdits=!1}return qt})}function na(it,ot,ct){var dt=it.getOption("configureMouse"),pt=dt?dt(it,ot,ct):{};if(pt.unit==null){var At=lt?ct.shiftKey&&ct.metaKey:ct.altKey;pt.unit=At?"rectangle":ot=="single"?"char":ot=="double"?"word":"line"}return(pt.extend==null||it.doc.extend)&&(pt.extend=it.doc.extend||ct.shiftKey),pt.addNew==null&&(pt.addNew=ht?ct.metaKey:ct.ctrlKey),pt.moveOnDrag==null&&(pt.moveOnDrag=!(ht?ct.altKey:ct.ctrlKey)),pt}function fs(it,ot,ct,dt){Pe?setTimeout(an(us,it),0):it.curOp.focus=rn();var pt=na(it,ct,dt),At=it.doc.sel,jt;it.options.dragDrop&&Rr&&!it.isReadOnly()&&ct=="single"&&(jt=At.contains(ot))>-1&&(oi((jt=At.ranges[jt]).from(),ot)<0||ot.xRel>0)&&(oi(jt.to(),ot)>0||ot.xRel<0)?nl(it,dt,ot,pt):Dh(it,dt,ot,pt)}function nl(it,ot,ct,dt){var pt=it.display,At=!1,jt=jr(it,function(fe){Ut&&(pt.scroller.draggable=!1),it.state.draggingText=!1,Mi(pt.wrapper.ownerDocument,"mouseup",jt),Mi(pt.wrapper.ownerDocument,"mousemove",qt),Mi(pt.scroller,"dragstart",Yt),Mi(pt.scroller,"drop",jt),At||(pr(fe),dt.addNew||uc(it.doc,ct,null,null,dt.extend),Ut&&!Xe||Pe&&Bt==9?setTimeout(function(){pt.wrapper.ownerDocument.body.focus({preventScroll:!0}),pt.input.focus()},20):pt.input.focus())}),qt=function(fe){At=At||Math.abs(ot.clientX-fe.clientX)+Math.abs(ot.clientY-fe.clientY)>=10},Yt=function(){return At=!0};Ut&&(pt.scroller.draggable=!0),it.state.draggingText=jt,jt.copy=!dt.moveOnDrag,pt.scroller.dragDrop&&pt.scroller.dragDrop(),pn(pt.wrapper.ownerDocument,"mouseup",jt),pn(pt.wrapper.ownerDocument,"mousemove",qt),pn(pt.scroller,"dragstart",Yt),pn(pt.scroller,"drop",jt),Hs(it),setTimeout(function(){return pt.input.focus()},20)}function Rl(it,ot,ct){if(ct=="char")return new Yr(ot,ot);if(ct=="word")return it.findWordAt(ot);if(ct=="line")return new Yr(qe(ot.line,0),Gi(it.doc,qe(ot.line+1,0)));var dt=ct(it,ot);return new Yr(dt.from,dt.to)}function Dh(it,ot,ct,dt){var pt=it.display,At=it.doc;pr(ot);var jt,qt,Yt=At.sel,fe=Yt.ranges;if(dt.addNew&&!dt.extend?(qt=At.sel.contains(ct),qt>-1?jt=fe[qt]:jt=new Yr(ct,ct)):(jt=At.sel.primary(),qt=At.sel.primIndex),dt.unit=="rectangle")dt.addNew||(jt=new Yr(ct,ct)),ct=Jl(it,ot,!0,!0),qt=-1;else{var Ge=Rl(it,ct,dt.unit);dt.extend?jt=kc(jt,Ge.anchor,Ge.head,dt.extend):jt=Ge}dt.addNew?qt==-1?(qt=fe.length,Es(At,Wa(it,fe.concat([jt]),qt),{scroll:!1,origin:"*mouse"})):fe.length>1&&fe[qt].empty()&&dt.unit=="char"&&!dt.extend?(Es(At,Wa(it,fe.slice(0,qt).concat(fe.slice(qt+1)),0),{scroll:!1,origin:"*mouse"}),Yt=At.sel):Fh(At,qt,jt,on):(qt=0,Es(At,new Da([jt],0),on),Yt=At.sel);var ge=ct;function dn(kr){if(oi(ge,kr)!=0)if(ge=kr,dt.unit=="rectangle"){for(var lo=[],ea=it.options.tabSize,Ar=_t(cn(At,ct.line).text,ct.ch,ea),ja=_t(cn(At,kr.line).text,kr.ch,ea),il=Math.min(Ar,ja),nu=Math.max(Ar,ja),cl=Math.min(ct.line,kr.line),uh=Math.min(it.lastLine(),Math.max(ct.line,kr.line));cl<=uh;cl++){var Ru=cn(At,cl).text,Vl=Cn(Ru,il,ea);il==nu?lo.push(new Yr(qe(cl,Vl),qe(cl,Vl))):Ru.length>Vl&&lo.push(new Yr(qe(cl,Vl),qe(cl,Cn(Ru,nu,ea))))}lo.length||lo.push(new Yr(ct,ct)),Es(At,Wa(it,Yt.ranges.slice(0,qt).concat(lo),qt),{origin:"*mouse",scroll:!1}),it.scrollIntoView(kr)}else{var Ph=jt,Lu=Rl(it,kr,dt.unit),Kl=Ph.anchor,ys;oi(Lu.anchor,Kl)>0?(ys=Lu.head,Kl=Si(Ph.from(),Lu.anchor)):(ys=Lu.anchor,Kl=xr(Ph.to(),Lu.head));var yl=Yt.ranges.slice(0);yl[qt]=Nc(it,new Yr(Gi(At,Kl),ys)),Es(At,Wa(it,yl,qt),on)}}var gn=pt.wrapper.getBoundingClientRect(),fi=0;function Ri(kr){var lo=++fi,ea=Jl(it,kr,!0,dt.unit=="rectangle");if(ea)if(oi(ea,ge)!=0){it.curOp.focus=rn(),dn(ea);var Ar=Fa(pt,At);(ea.line>=Ar.to||ea.linegn.bottom?20:0;ja&&setTimeout(jr(it,function(){fi==lo&&(pt.scroller.scrollTop+=ja,Ri(kr))}),50)}}function Ji(kr){it.state.selectingText=!1,fi=1/0,kr&&(pr(kr),pt.input.focus()),Mi(pt.wrapper.ownerDocument,"mousemove",fr),Mi(pt.wrapper.ownerDocument,"mouseup",_r),At.history.lastSelOrigin=null}var fr=jr(it,function(kr){kr.buttons===0||!Jo(kr)?Ji(kr):Ri(kr)}),_r=jr(it,Ji);it.state.selectingText=_r,pn(pt.wrapper.ownerDocument,"mousemove",fr),pn(pt.wrapper.ownerDocument,"mouseup",_r)}function Nc(it,ot){var ct=ot.anchor,dt=ot.head,pt=cn(it.doc,ct.line);if(oi(ct,dt)==0&&ct.sticky==dt.sticky)return ot;var At=Qn(pt);if(!At)return ot;var jt=Ue(At,ct.ch,ct.sticky),qt=At[jt];if(qt.from!=ct.ch&&qt.to!=ct.ch)return ot;var Yt=jt+(qt.from==ct.ch==(qt.level!=1)?0:1);if(Yt==0||Yt==At.length)return ot;var fe;if(dt.line!=ct.line)fe=(dt.line-ct.line)*(it.doc.direction=="ltr"?1:-1)>0;else{var Ge=Ue(At,dt.ch,dt.sticky),ge=Ge-jt||(dt.ch-ct.ch)*(qt.level==1?-1:1);Ge==Yt-1||Ge==Yt?fe=ge<0:fe=ge>0}var dn=At[Yt+(fe?-1:0)],gn=fe==(dn.level==1),fi=gn?dn.from:dn.to,Ri=gn?"after":"before";return ct.ch==fi&&ct.sticky==Ri?ot:new Yr(new qe(ct.line,fi,Ri),dt)}function Fc(it,ot,ct,dt){var pt,At;if(ot.touches)pt=ot.touches[0].clientX,At=ot.touches[0].clientY;else try{pt=ot.clientX,At=ot.clientY}catch(dn){return!1}if(pt>=Math.floor(it.display.gutters.getBoundingClientRect().right))return!1;dt&&pr(ot);var jt=it.display,qt=jt.lineDiv.getBoundingClientRect();if(At>qt.bottom||!hi(it,ct))return ki(ot);At-=qt.top-jt.viewOffset;for(var Yt=0;Yt=pt){var Ge=ni(it.doc,At),ge=it.display.gutterSpecs[Yt];return In(it,ct,it,Ge,ge.className,ot),ki(ot)}}}function Tc(it,ot){return Fc(it,ot,"gutterClick",!0)}function md(it,ot){ua(it.display,ot)||jf(it,ot)||ei(it,ot,"contextmenu")||St||it.display.input.onContextMenu(ot)}function jf(it,ot){return hi(it,"gutterContextMenu")?Fc(it,ot,"gutterContextMenu",!1):!1}function Rd(it){it.display.wrapper.className=it.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+it.options.theme.replace(/(^|\s)\s*/g," cm-s-"),bc(it)}var Yh={toString:function(){return"CodeMirror.Init"}},Id={},vd={};function gf(it){var ot=it.optionHandlers;function ct(dt,pt,At,jt){it.defaults[dt]=pt,At&&(ot[dt]=jt?function(qt,Yt,fe){fe!=Yh&&At(qt,Yt,fe)}:At)}it.defineOption=ct,it.Init=Yh,ct("value","",function(dt,pt){return dt.setValue(pt)},!0),ct("mode",null,function(dt,pt){dt.doc.modeOption=pt,Co(dt)},!0),ct("indentUnit",2,Co,!0),ct("indentWithTabs",!1),ct("smartIndent",!0),ct("tabSize",4,function(dt){$l(dt),bc(dt),Ps(dt)},!0),ct("lineSeparator",null,function(dt,pt){if(dt.doc.lineSep=pt,!!pt){var At=[],jt=dt.doc.first;dt.doc.iter(function(Yt){for(var fe=0;;){var Ge=Yt.text.indexOf(pt,fe);if(Ge==-1)break;fe=Ge+pt.length,At.push(qe(jt,Ge))}jt++});for(var qt=At.length-1;qt>=0;qt--)Oi(dt.doc,pt,At[qt],qe(At[qt].line,At[qt].ch+pt.length))}}),ct("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(dt,pt,At){dt.state.specialChars=new RegExp(pt.source+(pt.test(" ")?"":"| "),"g"),At!=Yh&&dt.refresh()}),ct("specialCharPlaceholder",Us,function(dt){return dt.refresh()},!0),ct("electricChars",!0),ct("inputStyle",et?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),ct("spellcheck",!1,function(dt,pt){return dt.getInputField().spellcheck=pt},!0),ct("autocorrect",!1,function(dt,pt){return dt.getInputField().autocorrect=pt},!0),ct("autocapitalize",!1,function(dt,pt){return dt.getInputField().autocapitalize=pt},!0),ct("rtlMoveVisually",!gt),ct("wholeLineUpdateBefore",!0),ct("theme","default",function(dt){Rd(dt),ws(dt)},!0),ct("keyMap","default",function(dt,pt,At){var jt=jo(pt),qt=At!=Yh&&jo(At);qt&&qt.detach&&qt.detach(dt,jt),jt.attach&&jt.attach(dt,qt||null)}),ct("extraKeys",null),ct("configureMouse",null),ct("lineWrapping",!1,zd,!0),ct("gutters",[],function(dt,pt){dt.display.gutterSpecs=ts(pt,dt.options.lineNumbers),ws(dt)},!0),ct("fixedGutter",!0,function(dt,pt){dt.display.gutters.style.left=pt?sc(dt.display)+"px":"0",dt.refresh()},!0),ct("coverGutterNextToScrollbar",!1,function(dt){return On(dt)},!0),ct("scrollbarStyle","native",function(dt){Ai(dt),On(dt),dt.display.scrollbars.setScrollTop(dt.doc.scrollTop),dt.display.scrollbars.setScrollLeft(dt.doc.scrollLeft)},!0),ct("lineNumbers",!1,function(dt,pt){dt.display.gutterSpecs=ts(dt.options.gutters,pt),ws(dt)},!0),ct("firstLineNumber",1,ws,!0),ct("lineNumberFormatter",function(dt){return dt},ws,!0),ct("showCursorWhenSelecting",!1,gl,!0),ct("resetSelectionOnContextMenu",!0),ct("lineWiseCopyCut",!0),ct("pasteLinesPerSelection",!0),ct("selectionsMayTouch",!1),ct("readOnly",!1,function(dt,pt){pt=="nocursor"&&(Ec(dt),dt.display.input.blur()),dt.display.input.readOnlyChanged(pt)}),ct("screenReaderLabel",null,function(dt,pt){pt=pt===""?null:pt,dt.display.input.screenReaderLabelChanged(pt)}),ct("disableInput",!1,function(dt,pt){pt||dt.display.input.reset()},!0),ct("dragDrop",!0,Bh),ct("allowDropFileTypes",null),ct("cursorBlinkRate",530),ct("cursorScrollMargin",0),ct("cursorHeight",1,gl,!0),ct("singleCursorHeightPerLine",!0,gl,!0),ct("workTime",100),ct("workDelay",100),ct("flattenSpans",!0,$l,!0),ct("addModeClass",!1,$l,!0),ct("pollInterval",100),ct("undoDepth",200,function(dt,pt){return dt.doc.history.undoDepth=pt}),ct("historyEventDelay",1250),ct("viewportMargin",10,function(dt){return dt.refresh()},!0),ct("maxHighlightLength",1e4,$l,!0),ct("moveInputWithCursor",!0,function(dt,pt){pt||dt.display.input.resetPosition()}),ct("tabindex",null,function(dt,pt){return dt.display.input.getField().tabIndex=pt||""}),ct("autofocus",null),ct("direction","ltr",function(dt,pt){return dt.doc.setDirection(pt)},!0),ct("phrases",null)}function Bh(it,ot,ct){var dt=ct&&ct!=Yh;if(!ot!=!dt){var pt=it.display.dragFunctions,At=ot?pn:Mi;At(it.display.scroller,"dragstart",pt.start),At(it.display.scroller,"dragenter",pt.enter),At(it.display.scroller,"dragover",pt.over),At(it.display.scroller,"dragleave",pt.leave),At(it.display.scroller,"drop",pt.drop)}}function zd(it){it.options.lineWrapping?(De(it.display.wrapper,"CodeMirror-wrap"),it.display.sizer.style.minWidth="",it.display.sizerWidth=null):(Jt(it.display.wrapper,"CodeMirror-wrap"),$o(it)),ho(it),Ps(it),bc(it),setTimeout(function(){return On(it)},100)}function Oa(it,ot){var ct=this;if(!(this instanceof Oa))return new Oa(it,ot);this.options=ot=ot?Zn(ot):{},Zn(Id,ot,!1);var dt=ot.value;typeof dt=="string"?dt=new Dr(dt,ot.mode,null,ot.lineSeparator,ot.direction):ot.mode&&(dt.modeOption=ot.mode),this.doc=dt;var pt=new Oa.inputStyles[ot.inputStyle](this),At=this.display=new pl(it,dt,pt,ot);At.wrapper.CodeMirror=this,Rd(this),ot.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ai(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 Tt,keySeq:null,specialChars:null},ot.autofocus&&!et&&At.input.focus(),Pe&&Bt<11&&setTimeout(function(){return ct.display.input.reset(!0)},20),Uc(this),Cr(),xi(this),this.curOp.forceUpdate=!0,el(this,dt),ot.autofocus&&!et||this.hasFocus()?setTimeout(function(){ct.hasFocus()&&!ct.state.focused&&Ka(ct)},20):Ec(this);for(var jt in vd)vd.hasOwnProperty(jt)&&vd[jt](this,ot[jt],Yh);Ko(this),ot.finishInit&&ot.finishInit(this);for(var qt=0;qt20*20}pn(ot.scroller,"touchstart",function(Yt){if(!ei(it,Yt)&&!At(Yt)&&!Tc(it,Yt)){ot.input.ensurePolled(),clearTimeout(ct);var fe=+new Date;ot.activeTouch={start:fe,moved:!1,prev:fe-dt.end<=300?dt:null},Yt.touches.length==1&&(ot.activeTouch.left=Yt.touches[0].pageX,ot.activeTouch.top=Yt.touches[0].pageY)}}),pn(ot.scroller,"touchmove",function(){ot.activeTouch&&(ot.activeTouch.moved=!0)}),pn(ot.scroller,"touchend",function(Yt){var fe=ot.activeTouch;if(fe&&!ua(ot,Yt)&&fe.left!=null&&!fe.moved&&new Date-fe.start<300){var Ge=it.coordsChar(ot.activeTouch,"page"),ge;!fe.prev||jt(fe,fe.prev)?ge=new Yr(Ge,Ge):!fe.prev.prev||jt(fe,fe.prev.prev)?ge=it.findWordAt(Ge):ge=new Yr(qe(Ge.line,0),Gi(it.doc,qe(Ge.line+1,0))),it.setSelection(ge.anchor,ge.head),it.focus(),pr(Yt)}pt()}),pn(ot.scroller,"touchcancel",pt),pn(ot.scroller,"scroll",function(){ot.scroller.clientHeight&&(ye(it,ot.scroller.scrollTop),Me(it,ot.scroller.scrollLeft,!0),In(it,"scroll",it))}),pn(ot.scroller,"mousewheel",function(Yt){return es(it,Yt)}),pn(ot.scroller,"DOMMouseScroll",function(Yt){return es(it,Yt)}),pn(ot.wrapper,"scroll",function(){return ot.wrapper.scrollTop=ot.wrapper.scrollLeft=0}),ot.dragFunctions={enter:function(Yt){ei(it,Yt)||sr(Yt)},over:function(Yt){ei(it,Yt)||(zo(it,Yt),sr(Yt))},start:function(Yt){return Wo(it,Yt)},drop:jr(it,ta),leave:function(Yt){ei(it,Yt)||to(it)}};var qt=ot.input.getField();pn(qt,"keyup",function(Yt){return fo.call(it,Yt)}),pn(qt,"keydown",jr(it,qa)),pn(qt,"keypress",jr(it,ms)),pn(qt,"focus",function(Yt){return Ka(it,Yt)}),pn(qt,"blur",function(Yt){return Ec(it,Yt)})}var cc=[];Oa.defineInitHook=function(it){return cc.push(it)};function El(it,ot,ct,dt){var pt=it.doc,At;ct==null&&(ct="add"),ct=="smart"&&(pt.mode.indent?At=la(it,ot).state:ct="prev");var jt=it.options.tabSize,qt=cn(pt,ot),Yt=_t(qt.text,null,jt);qt.stateAfter&&(qt.stateAfter=null);var fe=qt.text.match(/^\s*/)[0],Ge;if(!dt&&!/\S/.test(qt.text))Ge=0,ct="not";else if(ct=="smart"&&(Ge=pt.mode.indent(At,qt.text.slice(fe.length),qt.text),Ge==Ye||Ge>150)){if(!dt)return;ct="prev"}ct=="prev"?ot>pt.first?Ge=_t(cn(pt,ot-1).text,null,jt):Ge=0:ct=="add"?Ge=Yt+it.options.indentUnit:ct=="subtract"?Ge=Yt-it.options.indentUnit:typeof ct=="number"&&(Ge=Yt+ct),Ge=Math.max(0,Ge);var ge="",dn=0;if(it.options.indentWithTabs)for(var gn=Math.floor(Ge/jt);gn;--gn)dn+=jt,ge+=" ";if(dnjt,Yt=bn(ot),fe=null;if(qt&&dt.ranges.length>1)if(Zl&&Zl.text.join(` `)==ot){if(dt.ranges.length%Zl.text.length==0){fe=[];for(var Ge=0;Ge=0;dn--){var gn=dt.ranges[dn],fi=gn.from(),Ri=gn.to();gn.empty()&&(ct&&ct>0?fi=qe(fi.line,fi.ch-ct):it.state.overwrite&&!qt?Ri=qe(Ri.line,Math.min(cn(At,Ri.line).text.length,Ri.ch+ze(Yt).length)):qt&&Zl&&Zl.lineWise&&Zl.text.join(` `)==Yt.join(` `)&&(fi=Ri=qe(fi.line,0)));var Ji={from:fi,to:Ri,text:fe?fe[dn%fe.length]:Yt,origin:pt||(qt?"paste":it.state.cutIncoming>jt?"cut":"+input")};vn(it.doc,Ji),qi(it,"inputRead",it,Ji)}ot&&!qt&&Xc(it,ot),Uh(it),it.curOp.updateInput<2&&(it.curOp.updateInput=ge),it.curOp.typing=!0,it.state.pasteIncoming=it.state.cutIncoming=-1}function Jh(it,ot){var ct=it.clipboardData&&it.clipboardData.getData("Text");if(ct)return it.preventDefault(),!ot.isReadOnly()&&!ot.options.disableInput&&nr(ot,function(){return Bc(ot,ct,0,null,"paste")}),!0}function Xc(it,ot){if(!(!it.options.electricChars||!it.options.smartIndent))for(var ct=it.doc.sel,dt=ct.ranges.length-1;dt>=0;dt--){var pt=ct.ranges[dt];if(!(pt.head.ch>100||dt&&ct.ranges[dt-1].head.line==pt.head.line)){var At=it.getModeAt(pt.head),jt=!1;if(At.electricChars){for(var qt=0;qt-1){jt=El(it,pt.head.line,"smart");break}}else At.electricInput&&At.electricInput.test(cn(it.doc,pt.head.line).text.slice(0,pt.head.ch))&&(jt=El(it,pt.head.line,"smart"));jt&&qi(it,"electricInput",it,pt.head.line)}}}function Yc(it){for(var ot=[],ct=[],dt=0;dtAt&&(El(this,qt.head.line,dt,!0),At=qt.head.line,jt==this.doc.sel.primIndex&&Uh(this));else{var Yt=qt.from(),fe=qt.to(),Ge=Math.max(At,Yt.line);At=Math.min(this.lastLine(),fe.line-(fe.ch?0:1))+1;for(var ge=Ge;ge0&&Fh(this.doc,jt,new Yr(Yt,dn[jt].to()),xe)}}}),getTokenAt:function(dt,pt){return Vo(this,dt,pt)},getLineTokens:function(dt,pt){return Vo(this,qe(dt),pt,!0)},getTokenTypeAt:function(dt){dt=Gi(this.doc,dt);var pt=sa(this,cn(this.doc,dt.line)),At=0,jt=(pt.length-1)/2,qt=dt.ch,Yt;if(qt==0)Yt=pt[2];else for(;;){var fe=At+jt>>1;if((fe?pt[fe*2-1]:0)>=qt)jt=fe;else if(pt[fe*2+1]Yt&&(dt=Yt,jt=!0),qt=cn(this.doc,dt)}else qt=dt;return bl(this,qt,{top:0,left:0},pt||"page",At||jt).top+(jt?this.doc.height-oo(qt):0)},defaultTextHeight:function(){return vh(this.display)},defaultCharWidth:function(){return Lc(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(dt,pt,At,jt,qt){var Yt=this.display;dt=Ys(this,Gi(this.doc,dt));var fe=dt.bottom,Ge=dt.left;if(pt.style.position="absolute",pt.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(pt),Yt.sizer.appendChild(pt),jt=="over")fe=dt.top;else if(jt=="above"||jt=="near"){var ge=Math.max(Yt.wrapper.clientHeight,this.doc.height),dn=Math.max(Yt.sizer.clientWidth,Yt.lineSpace.clientWidth);(jt=="above"||dt.bottom+pt.offsetHeight>ge)&&dt.top>pt.offsetHeight?fe=dt.top-pt.offsetHeight:dt.bottom+pt.offsetHeight<=ge&&(fe=dt.bottom),Ge+pt.offsetWidth>dn&&(Ge=dn-pt.offsetWidth)}pt.style.top=fe+"px",pt.style.left=pt.style.right="",qt=="right"?(Ge=Yt.sizer.clientWidth-pt.offsetWidth,pt.style.right="0px"):(qt=="left"?Ge=0:qt=="middle"&&(Ge=(Yt.sizer.clientWidth-pt.offsetWidth)/2),pt.style.left=Ge+"px"),At&&pd(this,{left:Ge,top:fe,right:Ge+pt.offsetWidth,bottom:fe+pt.offsetHeight})},triggerOnKeyDown:Po(qa),triggerOnKeyPress:Po(ms),triggerOnKeyUp:fo,triggerOnMouseDown:Po(hl),execCommand:function(dt){if(cs.hasOwnProperty(dt))return cs[dt].call(null,this)},triggerElectric:Po(function(dt){Xc(this,dt)}),findPosH:function(dt,pt,At,jt){var qt=1;pt<0&&(qt=-1,pt=-pt);for(var Yt=Gi(this.doc,dt),fe=0;fe0&&Ge(At.charAt(jt-1));)--jt;for(;qt.5||this.options.lineWrapping)&&ho(this),In(this,"refresh",this)}),swapDoc:Po(function(dt){var pt=this.doc;return pt.cm=null,this.state.selectingText&&this.state.selectingText(),el(this,dt),bc(this),this.display.input.reset(),oh(this,dt.scrollLeft,dt.scrollTop),this.curOp.forceScroll=!0,qi(this,"swapDoc",this,pt),pt}),phrase:function(dt){var pt=this.options.phrases;return pt&&Object.prototype.hasOwnProperty.call(pt,dt)?pt[dt]:dt},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}},$i(it),it.registerHelper=function(dt,pt,At){ct.hasOwnProperty(dt)||(ct[dt]=it[dt]={_global:[]}),ct[dt][pt]=At},it.registerGlobalHelper=function(dt,pt,At,jt){it.registerHelper(dt,pt,jt),ct[dt]._global.push({pred:At,val:jt})}}function Oc(it,ot,ct,dt,pt){var At=ot,jt=ct,qt=cn(it,ot.line),Yt=pt&&it.direction=="rtl"?-ct:ct;function fe(){var _r=ot.line+Yt;return _r=it.first+it.size?!1:(ot=new qe(_r,ot.ch,ot.sticky),qt=cn(it,_r))}function Ge(_r){var kr;if(dt=="codepoint"){var lo=qt.text.charCodeAt(ot.ch+(dt>0?0:-1));isNaN(lo)?kr=null:kr=new qe(ot.line,Math.max(0,Math.min(qt.text.length,ot.ch+ct*(lo>=55296&&lo<56320?2:1))),-ct)}else pt?kr=Cs(it.cm,qt,ot,ct):kr=xo(qt,ot,ct);if(kr==null)if(!_r&&fe())ot=ya(pt,it.cm,qt,ot.line,Yt);else return!1;else ot=kr;return!0}if(dt=="char"||dt=="codepoint")Ge();else if(dt=="column")Ge(!0);else if(dt=="word"||dt=="group")for(var ge=null,dn=dt=="group",gn=it.cm&&it.cm.getHelper(ot,"wordChars"),fi=!0;!(ct<0&&!Ge(!fi));fi=!1){var Ri=qt.text.charAt(ot.ch)||` `,Ji=Wt(Ri,gn)?"w":dn&&Ri==` `?"n":!dn||/\s/.test(Ri)?null:"p";if(dn&&!fi&&!Ji&&(Ji="s"),ge&&ge!=Ji){ct<0&&(ct=1,Ge(),ot.sticky="after");break}if(Ji&&(ge=Ji),ct>0&&!Ge(!fi))break}var fr=Kt(it,ot,At,jt,!0);return Ni(At,fr)&&(fr.hitSide=!0),fr}function fc(it,ot,ct,dt){var pt=it.doc,At=ot.left,jt;if(dt=="page"){var qt=Math.min(it.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Yt=Math.max(qt-.5*vh(it.display),3);jt=(ct>0?ot.bottom:ot.top)+ct*Yt}else dt=="line"&&(jt=ct>0?ot.bottom+3:ot.top-3);for(var fe;fe=Bd(it,At,jt),!!fe.outside;){if(ct<0?jt<=0:jt>=pt.height){fe.hitSide=!0;break}jt+=ct*5}return fe}var bs=function(it){this.cm=it,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Tt,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};bs.prototype.init=function(it){var ot=this,ct=this,dt=ct.cm,pt=ct.div=it.lineDiv;yd(pt,dt.options.spellcheck,dt.options.autocorrect,dt.options.autocapitalize);function At(qt){for(var Yt=qt.target;Yt;Yt=Yt.parentNode){if(Yt==pt)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Yt.className))break}return!1}pn(pt,"paste",function(qt){!At(qt)||ei(dt,qt)||Jh(qt,dt)||Bt<=11&&setTimeout(jr(dt,function(){return ot.updateFromDOM()}),20)}),pn(pt,"compositionstart",function(qt){ot.composing={data:qt.data,done:!1}}),pn(pt,"compositionupdate",function(qt){ot.composing||(ot.composing={data:qt.data,done:!1})}),pn(pt,"compositionend",function(qt){ot.composing&&(qt.data!=ot.composing.data&&ot.readFromDOMSoon(),ot.composing.done=!0)}),pn(pt,"touchstart",function(){return ct.forceCompositionEnd()}),pn(pt,"input",function(){ot.composing||ot.readFromDOMSoon()});function jt(qt){if(!(!At(qt)||ei(dt,qt))){if(dt.somethingSelected())Dc({lineWise:!1,text:dt.getSelections()}),qt.type=="cut"&&dt.replaceSelection("",null,"cut");else if(dt.options.lineWiseCopyCut){var Yt=Yc(dt);Dc({lineWise:!0,text:Yt.text}),qt.type=="cut"&&dt.operation(function(){dt.setSelections(Yt.ranges,0,xe),dt.replaceSelection("",null,"cut")})}else return;if(qt.clipboardData){qt.clipboardData.clearData();var fe=Zl.text.join(` `);if(qt.clipboardData.setData("Text",fe),qt.clipboardData.getData("Text")==fe){qt.preventDefault();return}}var Ge=jd(),ge=Ge.firstChild;dt.display.lineSpace.insertBefore(Ge,dt.display.lineSpace.firstChild),ge.value=Zl.text.join(` `);var dn=document.activeElement;Bn(ge),setTimeout(function(){dt.display.lineSpace.removeChild(Ge),dn.focus(),dn==pt&&ct.showPrimarySelection()},50)}}pn(pt,"copy",jt),pn(pt,"cut",jt)},bs.prototype.screenReaderLabelChanged=function(it){it?this.div.setAttribute("aria-label",it):this.div.removeAttribute("aria-label")},bs.prototype.prepareSelection=function(){var it=ih(this.cm,!1);return it.focus=document.activeElement==this.div,it},bs.prototype.showSelection=function(it,ot){!it||!this.cm.display.view.length||((it.focus||ot)&&this.showPrimarySelection(),this.showMultipleSelections(it))},bs.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},bs.prototype.showPrimarySelection=function(){var it=this.getSelection(),ot=this.cm,ct=ot.doc.sel.primary(),dt=ct.from(),pt=ct.to();if(ot.display.viewTo==ot.display.viewFrom||dt.line>=ot.display.viewTo||pt.line=ot.display.viewFrom&&Hd(ot,dt)||{node:qt[0].measure.map[2],offset:0},fe=pt.lineit.firstLine()&&(dt=qe(dt.line-1,cn(it.doc,dt.line-1).length)),pt.ch==cn(it.doc,pt.line).text.length&&pt.lineot.viewTo-1)return!1;var At,jt,qt;dt.line==ot.viewFrom||(At=Tu(it,dt.line))==0?(jt=Oe(ot.view[0].line),qt=ot.view[0].node):(jt=Oe(ot.view[At].line),qt=ot.view[At-1].node.nextSibling);var Yt=Tu(it,pt.line),fe,Ge;if(Yt==ot.view.length-1?(fe=ot.viewTo-1,Ge=ot.lineDiv.lastChild):(fe=Oe(ot.view[Yt+1].line)-1,Ge=ot.view[Yt+1].node.previousSibling),!qt)return!1;for(var ge=it.doc.splitLines(Qc(it,qt,Ge,jt,fe)),dn=_n(it.doc,qe(jt,0),qe(fe,cn(it.doc,fe).text.length));ge.length>1&&dn.length>1;)if(ze(ge)==ze(dn))ge.pop(),dn.pop(),fe--;else if(ge[0]==dn[0])ge.shift(),dn.shift(),jt++;else break;for(var gn=0,fi=0,Ri=ge[0],Ji=dn[0],fr=Math.min(Ri.length,Ji.length);gndt.ch&&_r.charCodeAt(_r.length-fi-1)==kr.charCodeAt(kr.length-fi-1);)gn--,fi++;ge[ge.length-1]=_r.slice(0,_r.length-fi).replace(/^\u200b+/,""),ge[0]=ge[0].slice(gn).replace(/\u200b+$/,"");var ea=qe(jt,gn),Ar=qe(fe,dn.length?ze(dn).length-fi:0);if(ge.length>1||ge[0]||oi(ea,Ar))return Oi(it.doc,ge,ea,Ar,"+input"),!0},bs.prototype.ensurePolled=function(){this.forceCompositionEnd()},bs.prototype.reset=function(){this.forceCompositionEnd()},bs.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},bs.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))},bs.prototype.updateFromDOM=function(){var it=this;(this.cm.isReadOnly()||!this.pollContent())&&nr(this.cm,function(){return Ps(it.cm)})},bs.prototype.setUneditable=function(it){it.contentEditable="false"},bs.prototype.onKeyPress=function(it){it.charCode==0||this.composing||(it.preventDefault(),this.cm.isReadOnly()||jr(this.cm,Bc)(this.cm,String.fromCharCode(it.charCode==null?it.keyCode:it.charCode),0))},bs.prototype.readOnlyChanged=function(it){this.div.contentEditable=String(it!="nocursor")},bs.prototype.onContextMenu=function(){},bs.prototype.resetPosition=function(){},bs.prototype.needsContentAttribute=!0;function Hd(it,ot){var ct=Yl(it,ot.line);if(!ct||ct.hidden)return null;var dt=cn(it.doc,ot.line),pt=mh(ct,dt,ot.line),At=Qn(dt,it.doc.direction),jt="left";if(At){var qt=Ue(At,ot.ch);jt=qt%2?"right":"left"}var Yt=Dd(pt.map,ot.ch,jt);return Yt.offset=Yt.collapse=="right"?Yt.end:Yt.start,Yt}function pf(it){for(var ot=it;ot;ot=ot.parentNode)if(/CodeMirror-gutter-wrapper/.test(ot.className))return!0;return!1}function Jc(it,ot){return ot&&(it.bad=!0),it}function Qc(it,ot,ct,dt,pt){var At="",jt=!1,qt=it.doc.lineSeparator(),Yt=!1;function fe(gn){return function(fi){return fi.id==gn}}function Ge(){jt&&(At+=qt,Yt&&(At+=qt),jt=Yt=!1)}function ge(gn){gn&&(Ge(),At+=gn)}function dn(gn){if(gn.nodeType==1){var fi=gn.getAttribute("cm-text");if(fi){ge(fi);return}var Ri=gn.getAttribute("cm-marker"),Ji;if(Ri){var fr=it.findMarks(qe(dt,0),qe(pt+1,0),fe(+Ri));fr.length&&(Ji=fr[0].find(0))&&ge(_n(it.doc,Ji.from,Ji.to).join(qt));return}if(gn.getAttribute("contenteditable")=="false")return;var _r=/^(pre|div|p|li|table|br)$/i.test(gn.nodeName);if(!/^br$/i.test(gn.nodeName)&&gn.textContent.length==0)return;_r&&Ge();for(var kr=0;kr=9&&ot.hasSelection&&(ot.hasSelection=null),ct.poll()}),pn(pt,"paste",function(jt){ei(dt,jt)||Jh(jt,dt)||(dt.state.pasteIncoming=+new Date,ct.fastPoll())});function At(jt){if(!ei(dt,jt)){if(dt.somethingSelected())Dc({lineWise:!1,text:dt.getSelections()});else if(dt.options.lineWiseCopyCut){var qt=Yc(dt);Dc({lineWise:!0,text:qt.text}),jt.type=="cut"?dt.setSelections(qt.ranges,null,xe):(ct.prevInput="",pt.value=qt.text.join(` `),Bn(pt))}else return;jt.type=="cut"&&(dt.state.cutIncoming=+new Date)}}pn(pt,"cut",At),pn(pt,"copy",At),pn(it.scroller,"paste",function(jt){if(!(ua(it,jt)||ei(dt,jt))){if(!pt.dispatchEvent){dt.state.pasteIncoming=+new Date,ct.focus();return}var qt=new Event("paste");qt.clipboardData=jt.clipboardData,pt.dispatchEvent(qt)}}),pn(it.lineSpace,"selectstart",function(jt){ua(it,jt)||pr(jt)}),pn(pt,"compositionstart",function(){var jt=dt.getCursor("from");ct.composing&&ct.composing.range.clear(),ct.composing={start:jt,range:dt.markText(jt,dt.getCursor("to"),{className:"CodeMirror-composing"})}}),pn(pt,"compositionend",function(){ct.composing&&(ct.poll(),ct.composing.range.clear(),ct.composing=null)})},vl.prototype.createField=function(it){this.wrapper=jd(),this.textarea=this.wrapper.firstChild},vl.prototype.screenReaderLabelChanged=function(it){it?this.textarea.setAttribute("aria-label",it):this.textarea.removeAttribute("aria-label")},vl.prototype.prepareSelection=function(){var it=this.cm,ot=it.display,ct=it.doc,dt=ih(it);if(it.options.moveInputWithCursor){var pt=Ys(it,ct.sel.primary().head,"div"),At=ot.wrapper.getBoundingClientRect(),jt=ot.lineDiv.getBoundingClientRect();dt.teTop=Math.max(0,Math.min(ot.wrapper.clientHeight-10,pt.top+jt.top-At.top)),dt.teLeft=Math.max(0,Math.min(ot.wrapper.clientWidth-10,pt.left+jt.left-At.left))}return dt},vl.prototype.showSelection=function(it){var ot=this.cm,ct=ot.display;oe(ct.cursorDiv,it.cursors),oe(ct.selectionDiv,it.selection),it.teTop!=null&&(this.wrapper.style.top=it.teTop+"px",this.wrapper.style.left=it.teLeft+"px")},vl.prototype.reset=function(it){if(!(this.contextMenuPending||this.composing)){var ot=this.cm;if(ot.somethingSelected()){this.prevInput="";var ct=ot.getSelection();this.textarea.value=ct,ot.state.focused&&Bn(this.textarea),Pe&&Bt>=9&&(this.hasSelection=ct)}else it||(this.prevInput=this.textarea.value="",Pe&&Bt>=9&&(this.hasSelection=null))}},vl.prototype.getField=function(){return this.textarea},vl.prototype.supportsTouch=function(){return!1},vl.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!et||rn()!=this.textarea))try{this.textarea.focus()}catch(it){}},vl.prototype.blur=function(){this.textarea.blur()},vl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},vl.prototype.receivedFocus=function(){this.slowPoll()},vl.prototype.slowPoll=function(){var it=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){it.poll(),it.cm.state.focused&&it.slowPoll()})},vl.prototype.fastPoll=function(){var it=!1,ot=this;ot.pollingFast=!0;function ct(){var dt=ot.poll();!dt&&!it?(it=!0,ot.polling.set(60,ct)):(ot.pollingFast=!1,ot.slowPoll())}ot.polling.set(20,ct)},vl.prototype.poll=function(){var it=this,ot=this.cm,ct=this.textarea,dt=this.prevInput;if(this.contextMenuPending||!ot.state.focused||bt(ct)&&!dt&&!this.composing||ot.isReadOnly()||ot.options.disableInput||ot.state.keySeq)return!1;var pt=ct.value;if(pt==dt&&!ot.somethingSelected())return!1;if(Pe&&Bt>=9&&this.hasSelection===pt||ht&&/[\uf700-\uf7ff]/.test(pt))return ot.display.input.reset(),!1;if(ot.doc.sel==ot.display.selForContextMenu){var At=pt.charCodeAt(0);if(At==8203&&!dt&&(dt="\u200B"),At==8666)return this.reset(),this.cm.execCommand("undo")}for(var jt=0,qt=Math.min(dt.length,pt.length);jt1e3||pt.indexOf(` `)>-1?ct.value=it.prevInput="":it.prevInput=pt,it.composing&&(it.composing.range.clear(),it.composing.range=ot.markText(it.composing.start,ot.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},vl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},vl.prototype.onKeyPress=function(){Pe&&Bt>=9&&(this.hasSelection=null),this.fastPoll()},vl.prototype.onContextMenu=function(it){var ot=this,ct=ot.cm,dt=ct.display,pt=ot.textarea;ot.contextMenuPending&&ot.contextMenuPending();var At=Jl(ct,it),jt=dt.scroller.scrollTop;if(!At||Se)return;var qt=ct.options.resetSelectionOnContextMenu;qt&&ct.doc.sel.contains(At)==-1&&jr(ct,Es)(ct.doc,Js(At),xe);var Yt=pt.style.cssText,fe=ot.wrapper.style.cssText,Ge=ot.wrapper.offsetParent.getBoundingClientRect();ot.wrapper.style.cssText="position: static",pt.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(it.clientY-Ge.top-5)+"px; left: "+(it.clientX-Ge.left-5)+`px; z-index: 1000; background: `+(Pe?"rgba(255, 255, 255, .05)":"transparent")+`; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var ge;Ut&&(ge=window.scrollY),dt.input.focus(),Ut&&window.scrollTo(null,ge),dt.input.reset(),ct.somethingSelected()||(pt.value=ot.prevInput=" "),ot.contextMenuPending=gn,dt.selForContextMenu=ct.doc.sel,clearTimeout(dt.detectingSelectAll);function dn(){if(pt.selectionStart!=null){var Ri=ct.somethingSelected(),Ji="\u200B"+(Ri?pt.value:"");pt.value="\u21DA",pt.value=Ji,ot.prevInput=Ri?"":"\u200B",pt.selectionStart=1,pt.selectionEnd=Ji.length,dt.selForContextMenu=ct.doc.sel}}function gn(){if(ot.contextMenuPending==gn&&(ot.contextMenuPending=!1,ot.wrapper.style.cssText=fe,pt.style.cssText=Yt,Pe&&Bt<9&&dt.scrollbars.setScrollTop(dt.scroller.scrollTop=jt),pt.selectionStart!=null)){(!Pe||Pe&&Bt<9)&&dn();var Ri=0,Ji=function(){dt.selForContextMenu==ct.doc.sel&&pt.selectionStart==0&&pt.selectionEnd>0&&ot.prevInput=="\u200B"?jr(ct,Re)(ct):Ri++<10?dt.detectingSelectAll=setTimeout(Ji,500):(dt.selForContextMenu=null,dt.input.reset())};dt.detectingSelectAll=setTimeout(Ji,200)}}if(Pe&&Bt>=9&&dn(),St){sr(it);var fi=function(){Mi(window,"mouseup",fi),setTimeout(gn,20)};pn(window,"mouseup",fi)}else setTimeout(gn,50)},vl.prototype.readOnlyChanged=function(it){it||this.reset(),this.textarea.disabled=it=="nocursor",this.textarea.readOnly=!!it},vl.prototype.setUneditable=function(){},vl.prototype.needsContentAttribute=!1;function Wf(it,ot){if(ot=ot?Zn(ot):{},ot.value=it.value,!ot.tabindex&&it.tabIndex&&(ot.tabindex=it.tabIndex),!ot.placeholder&&it.placeholder&&(ot.placeholder=it.placeholder),ot.autofocus==null){var ct=rn();ot.autofocus=ct==it||it.getAttribute("autofocus")!=null&&ct==document.body}function dt(){it.value=qt.getValue()}var pt;if(it.form&&(pn(it.form,"submit",dt),!ot.leaveSubmitMethodAlone)){var At=it.form;pt=At.submit;try{var jt=At.submit=function(){dt(),At.submit=pt,At.submit(),At.submit=jt}}catch(Yt){}}ot.finishInit=function(Yt){Yt.save=dt,Yt.getTextArea=function(){return it},Yt.toTextArea=function(){Yt.toTextArea=isNaN,dt(),it.parentNode.removeChild(Yt.getWrapperElement()),it.style.display="",it.form&&(Mi(it.form,"submit",dt),!ot.leaveSubmitMethodAlone&&typeof it.form.submit=="function"&&(it.form.submit=pt))}},it.style.display="none";var qt=Oa(function(Yt){return it.parentNode.insertBefore(Yt,it.nextSibling)},ot);return qt}function qc(it){it.off=Mi,it.on=pn,it.wheelEventPixels=Ja,it.Doc=Dr,it.splitLines=bn,it.countColumn=_t,it.findColumn=Cn,it.isWordChar=Ft,it.Pass=Ye,it.signal=In,it.Line=ia,it.changeEnd=Ll,it.scrollbarModel=qn,it.Pos=qe,it.cmpPos=oi,it.modes=Xn,it.mimeModes=ai,it.resolveMode=te,it.getMode=le,it.modeExtensions=ae,it.extendMode=Ae,it.copyState=Sn,it.startState=En,it.innerMode=An,it.commands=cs,it.keyMap=Io,it.keyName=Ia,it.isModifierKey=Go,it.lookupKey=vr,it.normalizeKeyMap=Vr,it.StringStream=ke,it.SharedTextMarker=wr,it.TextMarker=we,it.LineWidget=yi,it.e_preventDefault=pr,it.e_stopPropagation=rr,it.e_stop=sr,it.addClass=De,it.contains=Fe,it.rmClass=Jt,it.keyNames=No}gf(Oa),dc(Oa);var Qh="iter insert remove copy getEditor constructor".split(" ");for(var xd in Dr.prototype)Dr.prototype.hasOwnProperty(xd)&&ce(Qh,xd)<0&&(Oa.prototype[xd]=function(it){return function(){return it.apply(this.doc,arguments)}}(Dr.prototype[xd]));return $i(Dr),Oa.inputStyles={textarea:vl,contenteditable:bs},Oa.defineMode=function(it){!Oa.defaults.mode&&it!="null"&&(Oa.defaults.mode=it),Tn.apply(this,arguments)},Oa.defineMIME=Di,Oa.defineMode("null",function(){return{token:function(it){return it.skipToEnd()}}}),Oa.defineMIME("text/plain","null"),Oa.defineExtension=function(it,ot){Oa.prototype[it]=ot},Oa.defineDocExtension=function(it,ot){Dr.prototype[it]=ot},Oa.fromTextArea=Wf,qc(Oa),Oa.version="5.58.2",Oa})},49047:function(un,Nn,Mt){(function(Pt){Pt(Mt(4631),Mt(29589),Mt(52539))})(function(Pt){"use strict";Pt.defineMode("markdown",function(ne,Ne){var Be=Pt.getMode(ne,"text/html"),Pe=Be.name=="null";function Bt(_t){if(Pt.findModeByName){var Tt=Pt.findModeByName(_t);Tt&&(_t=Tt.mime||Tt.mimes[0])}var ce=Pt.getMode(ne,_t);return ce.name=="null"?null:ce}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 Ut={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 ue in Ut)Ut.hasOwnProperty(ue)&&Ne.tokenTypeOverrides[ue]&&(Ut[ue]=Ne.tokenTypeOverrides[ue]);var se=/^([*\-_])(?:\s*\1){2,}\s*$/,Se=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Xe=/^\[(x| )\](?=\s)/i,pe=Ne.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,Ht=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Dt=/^[^#!\[\]*_\\<>` "'(~:]+/,nt=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,et=/^\s*\[[^\]]+?\]:.*$/,ht=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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 gt(_t,Tt,ce){return Tt.f=Tt.inline=ce,ce(_t,Tt)}function mt(_t,Tt,ce){return Tt.f=Tt.block=ce,ce(_t,Tt)}function xt(_t){return!_t||!/\S/.test(_t.string)}function St(_t){if(_t.linkTitle=!1,_t.linkHref=!1,_t.linkText=!1,_t.em=!1,_t.strong=!1,_t.strikethrough=!1,_t.quote=0,_t.indentedCode=!1,_t.f==Jt){var Tt=Pe;if(!Tt){var ce=Pt.innerMode(Be,_t.htmlState);Tt=ce.mode.name=="xml"&&ce.state.tagStart===null&&!ce.state.context&&ce.state.tokenize.isInText}Tt&&(_t.f=Le,_t.block=zt,_t.htmlState=null)}return _t.trailingSpace=0,_t.trailingSpaceNewLine=!1,_t.prevLine=_t.thisLine,_t.thisLine={stream:null},null}function zt(_t,Tt){var ce=_t.column()===Tt.indentation,_e=xt(Tt.prevLine.stream),Ye=Tt.indentedCode,xe=Tt.prevLine.hr,on=Tt.list!==!1,tn=(Tt.listStack[Tt.listStack.length-1]||0)+3;Tt.indentedCode=!1;var Cn=Tt.indentation;if(Tt.indentationDiff===null&&(Tt.indentationDiff=Tt.indentation,on)){for(Tt.list=null;Cn=4&&(Ye||Tt.prevLine.fencedCodeEnd||Tt.prevLine.header||_e))return _t.skipToEnd(),Tt.indentedCode=!0,Ut.code;if(_t.eatSpace())return null;if(ce&&Tt.indentation<=tn&&(ze=_t.match(pe))&&ze[1].length<=6)return Tt.quote=0,Tt.header=ze[1].length,Tt.thisLine.header=!0,Ne.highlightFormatting&&(Tt.formatting="header"),Tt.f=Tt.inline,oe(Tt);if(Tt.indentation<=tn&&_t.eat(">"))return Tt.quote=ce?1:Tt.quote+1,Ne.highlightFormatting&&(Tt.formatting="quote"),_t.eatSpace(),oe(Tt);if(!ve&&!Tt.setext&&ce&&Tt.indentation<=tn&&(ze=_t.match(Se))){var je=ze[1]?"ol":"ul";return Tt.indentation=Cn+_t.current().length,Tt.list=!0,Tt.quote=0,Tt.listStack.push(Tt.indentation),Tt.em=!1,Tt.strong=!1,Tt.code=!1,Tt.strikethrough=!1,Ne.taskLists&&_t.match(Xe,!1)&&(Tt.taskList=!0),Tt.f=Tt.inline,Ne.highlightFormatting&&(Tt.formatting=["list","list-"+je]),oe(Tt)}else{if(ce&&Tt.indentation<=tn&&(ze=_t.match(nt,!0)))return Tt.quote=0,Tt.fencedEndRE=new RegExp(ze[1]+"+ *$"),Tt.localMode=Ne.fencedCodeBlockHighlighting&&Bt(ze[2]||Ne.fencedCodeBlockDefaultMode),Tt.localMode&&(Tt.localState=Pt.startState(Tt.localMode)),Tt.f=Tt.block=re,Ne.highlightFormatting&&(Tt.formatting="code-block"),Tt.code=-1,oe(Tt);if(Tt.setext||(!Ie||!on)&&!Tt.quote&&Tt.list===!1&&!Tt.code&&!ve&&!et.test(_t.string)&&(ze=_t.lookAhead(1))&&(ze=ze.match(Ht)))return Tt.setext?(Tt.header=Tt.setext,Tt.setext=0,_t.skipToEnd(),Ne.highlightFormatting&&(Tt.formatting="header")):(Tt.header=ze[0].charAt(0)=="="?1:2,Tt.setext=Tt.header),Tt.thisLine.header=!0,Tt.f=Tt.inline,oe(Tt);if(ve)return _t.skipToEnd(),Tt.hr=!0,Tt.thisLine.hr=!0,Ut.hr;if(_t.peek()==="[")return gt(_t,Tt,jn)}return gt(_t,Tt,Tt.inline)}function Jt(_t,Tt){var ce=Be.token(_t,Tt.htmlState);if(!Pe){var _e=Pt.innerMode(Be,Tt.htmlState);(_e.mode.name=="xml"&&_e.state.tagStart===null&&!_e.state.context&&_e.state.tokenize.isInText||Tt.md_inside&&_t.current().indexOf(">")>-1)&&(Tt.f=Le,Tt.block=zt,Tt.htmlState=null)}return ce}function re(_t,Tt){var ce=Tt.listStack[Tt.listStack.length-1]||0,_e=Tt.indentation=_t.quote?Tt.push(Ut.formatting+"-"+_t.formatting[ce]+"-"+_t.quote):Tt.push("error"))}if(_t.taskOpen)return Tt.push("meta"),Tt.length?Tt.join(" "):null;if(_t.taskClosed)return Tt.push("property"),Tt.length?Tt.join(" "):null;if(_t.linkHref?Tt.push(Ut.linkHref,"url"):(_t.strong&&Tt.push(Ut.strong),_t.em&&Tt.push(Ut.em),_t.strikethrough&&Tt.push(Ut.strikethrough),_t.emoji&&Tt.push(Ut.emoji),_t.linkText&&Tt.push(Ut.linkText),_t.code&&Tt.push(Ut.code),_t.image&&Tt.push(Ut.image),_t.imageAltText&&Tt.push(Ut.imageAltText,"link"),_t.imageMarker&&Tt.push(Ut.imageMarker)),_t.header&&Tt.push(Ut.header,Ut.header+"-"+_t.header),_t.quote&&(Tt.push(Ut.quote),!Ne.maxBlockquoteDepth||Ne.maxBlockquoteDepth>=_t.quote?Tt.push(Ut.quote+"-"+_t.quote):Tt.push(Ut.quote+"-"+Ne.maxBlockquoteDepth)),_t.list!==!1){var _e=(_t.listStack.length-1)%3;_e?_e===1?Tt.push(Ut.list2):Tt.push(Ut.list3):Tt.push(Ut.list1)}return _t.trailingSpaceNewLine?Tt.push("trailing-space-new-line"):_t.trailingSpace&&Tt.push("trailing-space-"+(_t.trailingSpace%2?"a":"b")),Tt.length?Tt.join(" "):null}function $t(_t,Tt){if(_t.match(Dt,!0))return oe(Tt)}function Le(_t,Tt){var ce=Tt.text(_t,Tt);if(typeof ce!="undefined")return ce;if(Tt.list)return Tt.list=null,oe(Tt);if(Tt.taskList){var _e=_t.match(Xe,!0)[1]===" ";return _e?Tt.taskOpen=!0:Tt.taskClosed=!0,Ne.highlightFormatting&&(Tt.formatting="task"),Tt.taskList=!1,oe(Tt)}if(Tt.taskOpen=!1,Tt.taskClosed=!1,Tt.header&&_t.match(/^#+$/,!0))return Ne.highlightFormatting&&(Tt.formatting="header"),oe(Tt);var Ye=_t.next();if(Tt.linkTitle){Tt.linkTitle=!1;var xe=Ye;Ye==="("&&(xe=")"),xe=(xe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var on="^\\s*(?:[^"+xe+"\\\\]+|\\\\\\\\|\\\\.)"+xe;if(_t.match(new RegExp(on),!0))return Ut.linkHref}if(Ye==="`"){var tn=Tt.formatting;Ne.highlightFormatting&&(Tt.formatting="code"),_t.eatWhile("`");var Cn=_t.current().length;if(Tt.code==0&&(!Tt.quote||Cn==1))return Tt.code=Cn,oe(Tt);if(Cn==Tt.code){var Ie=oe(Tt);return Tt.code=0,Ie}else return Tt.formatting=tn,oe(Tt)}else if(Tt.code)return oe(Tt);if(Ye==="\\"&&(_t.next(),Ne.highlightFormatting)){var ve=oe(Tt),ze=Ut.formatting+"-escape";return ve?ve+" "+ze:ze}if(Ye==="!"&&_t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Tt.imageMarker=!0,Tt.image=!0,Ne.highlightFormatting&&(Tt.formatting="image"),oe(Tt);if(Ye==="["&&Tt.imageMarker&&_t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Tt.imageMarker=!1,Tt.imageAltText=!0,Ne.highlightFormatting&&(Tt.formatting="image"),oe(Tt);if(Ye==="]"&&Tt.imageAltText){Ne.highlightFormatting&&(Tt.formatting="image");var ve=oe(Tt);return Tt.imageAltText=!1,Tt.image=!1,Tt.inline=Tt.f=Fe,ve}if(Ye==="["&&!Tt.image)return Tt.linkText&&_t.match(/^.*?\]/)||(Tt.linkText=!0,Ne.highlightFormatting&&(Tt.formatting="link")),oe(Tt);if(Ye==="]"&&Tt.linkText){Ne.highlightFormatting&&(Tt.formatting="link");var ve=oe(Tt);return Tt.linkText=!1,Tt.inline=Tt.f=_t.match(/\(.*?\)| ?\[.*?\]/,!1)?Fe:Le,ve}if(Ye==="<"&&_t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Tt.f=Tt.inline=de,Ne.highlightFormatting&&(Tt.formatting="link");var ve=oe(Tt);return ve?ve+=" ":ve="",ve+Ut.linkInline}if(Ye==="<"&&_t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Tt.f=Tt.inline=de,Ne.highlightFormatting&&(Tt.formatting="link");var ve=oe(Tt);return ve?ve+=" ":ve="",ve+Ut.linkEmail}if(Ne.xml&&Ye==="<"&&_t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var je=_t.string.indexOf(">",_t.pos);if(je!=-1){var He=_t.string.substring(_t.start,je);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(He)&&(Tt.md_inside=!0)}return _t.backUp(1),Tt.htmlState=Pt.startState(Be),mt(_t,Tt,Jt)}if(Ne.xml&&Ye==="<"&&_t.match(/^\/\w*?>/))return Tt.md_inside=!1,"tag";if(Ye==="*"||Ye==="_"){for(var Ot=1,Lt=_t.pos==1?" ":_t.string.charAt(_t.pos-2);Ot<3&&_t.eat(Ye);)Ot++;var wt=_t.peek()||" ",Ft=!/\s/.test(wt)&&(!ht.test(wt)||/\s/.test(Lt)||ht.test(Lt)),Wt=!/\s/.test(Lt)&&(!ht.test(Lt)||/\s/.test(wt)||ht.test(wt)),kt=null,Xt=null;if(Ot%2&&(!Tt.em&&Ft&&(Ye==="*"||!Wt||ht.test(Lt))?kt=!0:Tt.em==Ye&&Wt&&(Ye==="*"||!Ft||ht.test(wt))&&(kt=!1)),Ot>1&&(!Tt.strong&&Ft&&(Ye==="*"||!Wt||ht.test(Lt))?Xt=!0:Tt.strong==Ye&&Wt&&(Ye==="*"||!Ft||ht.test(wt))&&(Xt=!1)),Xt!=null||kt!=null){Ne.highlightFormatting&&(Tt.formatting=kt==null?"strong":Xt==null?"em":"strong em"),kt===!0&&(Tt.em=Ye),Xt===!0&&(Tt.strong=Ye);var Ie=oe(Tt);return kt===!1&&(Tt.em=!1),Xt===!1&&(Tt.strong=!1),Ie}}else if(Ye===" "&&(_t.eat("*")||_t.eat("_"))){if(_t.peek()===" ")return oe(Tt);_t.backUp(1)}if(Ne.strikethrough){if(Ye==="~"&&_t.eatWhile(Ye)){if(Tt.strikethrough){Ne.highlightFormatting&&(Tt.formatting="strikethrough");var Ie=oe(Tt);return Tt.strikethrough=!1,Ie}else if(_t.match(/^[^\s]/,!1))return Tt.strikethrough=!0,Ne.highlightFormatting&&(Tt.formatting="strikethrough"),oe(Tt)}else if(Ye===" "&&_t.match(/^~~/,!0)){if(_t.peek()===" ")return oe(Tt);_t.backUp(2)}}if(Ne.emoji&&Ye===":"&&_t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Tt.emoji=!0,Ne.highlightFormatting&&(Tt.formatting="emoji");var $e=oe(Tt);return Tt.emoji=!1,$e}return Ye===" "&&(_t.match(/^ +$/,!1)?Tt.trailingSpace++:Tt.trailingSpace&&(Tt.trailingSpaceNewLine=!0)),oe(Tt)}function de(_t,Tt){var ce=_t.next();if(ce===">"){Tt.f=Tt.inline=Le,Ne.highlightFormatting&&(Tt.formatting="link");var _e=oe(Tt);return _e?_e+=" ":_e="",_e+Ut.linkInline}return _t.match(/^[^>]+/,!0),Ut.linkInline}function Fe(_t,Tt){if(_t.eatSpace())return null;var ce=_t.next();return ce==="("||ce==="["?(Tt.f=Tt.inline=De(ce==="("?")":"]"),Ne.highlightFormatting&&(Tt.formatting="link-string"),Tt.linkHref=!0,oe(Tt)):"error"}var rn={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function De(_t){return function(Tt,ce){var _e=Tt.next();if(_e===_t){ce.f=ce.inline=Le,Ne.highlightFormatting&&(ce.formatting="link-string");var Ye=oe(ce);return ce.linkHref=!1,Ye}return Tt.match(rn[_t]),ce.linkHref=!0,oe(ce)}}function jn(_t,Tt){return _t.match(/^([^\]\\]|\\.)*\]:/,!1)?(Tt.f=Bn,_t.next(),Ne.highlightFormatting&&(Tt.formatting="link"),Tt.linkText=!0,oe(Tt)):gt(_t,Tt,Le)}function Bn(_t,Tt){if(_t.match(/^\]:/,!0)){Tt.f=Tt.inline=an,Ne.highlightFormatting&&(Tt.formatting="link");var ce=oe(Tt);return Tt.linkText=!1,ce}return _t.match(/^([^\]\\]|\\.)+/,!0),Ut.linkText}function an(_t,Tt){return _t.eatSpace()?null:(_t.match(/^[^\s]+/,!0),_t.peek()===void 0?Tt.linkTitle=!0:_t.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Tt.f=Tt.inline=Le,Ut.linkHref+" url")}var Zn={startState:function(){return{f:zt,prevLine:{stream:null},thisLine:{stream:null},block:zt,htmlState:null,indentation:0,inline:Le,text:$t,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(_t){return{f:_t.f,prevLine:_t.prevLine,thisLine:_t.thisLine,block:_t.block,htmlState:_t.htmlState&&Pt.copyState(Be,_t.htmlState),indentation:_t.indentation,localMode:_t.localMode,localState:_t.localMode?Pt.copyState(_t.localMode,_t.localState):null,inline:_t.inline,text:_t.text,formatting:!1,linkText:_t.linkText,linkTitle:_t.linkTitle,linkHref:_t.linkHref,code:_t.code,em:_t.em,strong:_t.strong,strikethrough:_t.strikethrough,emoji:_t.emoji,header:_t.header,setext:_t.setext,hr:_t.hr,taskList:_t.taskList,list:_t.list,listStack:_t.listStack.slice(0),quote:_t.quote,indentedCode:_t.indentedCode,trailingSpace:_t.trailingSpace,trailingSpaceNewLine:_t.trailingSpaceNewLine,md_inside:_t.md_inside,fencedEndRE:_t.fencedEndRE}},token:function(_t,Tt){if(Tt.formatting=!1,_t!=Tt.thisLine.stream){if(Tt.header=0,Tt.hr=!1,_t.match(/^\s*$/,!0))return St(Tt),null;if(Tt.prevLine=Tt.thisLine,Tt.thisLine={stream:_t},Tt.taskList=!1,Tt.trailingSpace=0,Tt.trailingSpaceNewLine=!1,!Tt.localState&&(Tt.f=Tt.block,Tt.f!=Jt)){var ce=_t.match(/^\s*/,!0)[0].replace(/\t/g,lt).length;if(Tt.indentation=ce,Tt.indentationDiff=null,ce>0)return null}}return Tt.f(_t,Tt)},innerMode:function(_t){return _t.block==Jt?{state:_t.htmlState,mode:Be}:_t.localState?{state:_t.localState,mode:_t.localMode}:{state:_t,mode:Zn}},indent:function(_t,Tt,ce){return _t.block==Jt&&Be.indent?Be.indent(_t.htmlState,Tt,ce):_t.localState&&_t.localMode.indent?_t.localMode.indent(_t.localState,Tt,ce):Pt.Pass},blankLine:St,getType:oe,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Zn},"xml"),Pt.defineMIME("text/markdown","markdown"),Pt.defineMIME("text/x-markdown","markdown")})},52539:function(un,Nn,Mt){(function(Pt){Pt(Mt(4631))})(function(Pt){"use strict";Pt.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 ne=0;ne-1&&Be.substring(Ut+1,Be.length);if(ue)return Pt.findModeByExtension(ue)},Pt.findModeByName=function(Be){Be=Be.toLowerCase();for(var Pe=0;Pe0?Dt.cmdState[Dt.cmdState.length-1]:null}function Bt(Dt){var nt=Dt.cmdState.pop();nt&&nt.closeBracket()}function Ut(Dt){for(var nt=Dt.cmdState,et=nt.length-1;et>=0;et--){var ht=nt[et];if(ht.name!="DEFAULT")return ht}return{styleIdentifier:function(){return null}}}function ue(Dt,nt,et){return function(){this.name=Dt,this.bracketNo=0,this.style=nt,this.styles=et,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var se={};se.importmodule=ue("importmodule","tag",["string","builtin"]),se.documentclass=ue("documentclass","tag",["","atom"]),se.usepackage=ue("usepackage","tag",["atom"]),se.begin=ue("begin","tag",["atom"]),se.end=ue("end","tag",["atom"]),se.label=ue("label","tag",["atom"]),se.ref=ue("ref","tag",["atom"]),se.eqref=ue("eqref","tag",["atom"]),se.cite=ue("cite","tag",["atom"]),se.bibitem=ue("bibitem","tag",["atom"]),se.Bibitem=ue("Bibitem","tag",["atom"]),se.RBibitem=ue("RBibitem","tag",["atom"]),se.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Se(Dt,nt){Dt.f=nt}function Xe(Dt,nt){var et;if(Dt.match(/^\\[a-zA-Z@]+/)){var ht=Dt.current().slice(1);return et=se.hasOwnProperty(ht)?se[ht]:se.DEFAULT,et=new et,Be(nt,et),Se(nt,Ht),et.style}if(Dt.match(/^\\[$&%#{}_]/)||Dt.match(/^\\[,;!\/\\]/))return"tag";if(Dt.match("\\["))return Se(nt,function(gt,mt){return pe(gt,mt,"\\]")}),"keyword";if(Dt.match("\\("))return Se(nt,function(gt,mt){return pe(gt,mt,"\\)")}),"keyword";if(Dt.match("$$"))return Se(nt,function(gt,mt){return pe(gt,mt,"$$")}),"keyword";if(Dt.match("$"))return Se(nt,function(gt,mt){return pe(gt,mt,"$")}),"keyword";var lt=Dt.next();if(lt=="%")return Dt.skipToEnd(),"comment";if(lt=="}"||lt=="]"){if(et=Pe(nt),et)et.closeBracket(lt),Se(nt,Ht);else return"error";return"bracket"}else return lt=="{"||lt=="["?(et=se.DEFAULT,et=new et,Be(nt,et),"bracket"):/\d/.test(lt)?(Dt.eatWhile(/[\w.%]/),"atom"):(Dt.eatWhile(/[\w\-_]/),et=Ut(nt),et.name=="begin"&&(et.argument=Dt.current()),et.styleIdentifier())}function pe(Dt,nt,et){if(Dt.eatSpace())return null;if(et&&Dt.match(et))return Se(nt,Xe),"keyword";if(Dt.match(/^\\[a-zA-Z@]+/))return"tag";if(Dt.match(/^[a-zA-Z]+/))return"variable-2";if(Dt.match(/^\\[$&%#{}_]/)||Dt.match(/^\\[,;!\/]/)||Dt.match(/^[\^_&]/))return"tag";if(Dt.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Dt.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ht=Dt.next();return ht=="{"||ht=="}"||ht=="["||ht=="]"||ht=="("||ht==")"?"bracket":ht=="%"?(Dt.skipToEnd(),"comment"):"error"}function Ht(Dt,nt){var et=Dt.peek(),ht;return et=="{"||et=="["?(ht=Pe(nt),ht.openBracket(et),Dt.eat(et),Se(nt,Xe),"bracket"):/[ \t\r]/.test(et)?(Dt.eat(et),null):(Se(nt,Xe),Bt(nt),Xe(Dt,nt))}return{startState:function(){var Dt=Ne.inMathMode?function(nt,et){return pe(nt,et)}:Xe;return{cmdState:[],f:Dt}},copyState:function(Dt){return{cmdState:Dt.cmdState.slice(),f:Dt.f}},token:function(Dt,nt){return nt.f(Dt,nt)},blankLine:function(Dt){Dt.f=Xe,Dt.cmdState.length=0},lineComment:"%"}}),Pt.defineMIME("text/x-stex","stex"),Pt.defineMIME("text/x-latex","stex")})},29589:function(un,Nn,Mt){(function(Pt){Pt(Mt(4631))})(function(Pt){"use strict";var ne={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};Pt.defineMode("xml",function(Be,Pe){var Bt=Be.indentUnit,Ut={},ue=Pe.htmlMode?ne:Ne;for(var se in ue)Ut[se]=ue[se];for(var se in Pe)Ut[se]=Pe[se];var Se,Xe;function pe(de,Fe){function rn(Bn){return Fe.tokenize=Bn,Bn(de,Fe)}var De=de.next();if(De=="<")return de.eat("!")?de.eat("[")?de.match("CDATA[")?rn(nt("atom","]]>")):null:de.match("--")?rn(nt("comment","-->")):de.match("DOCTYPE",!0,!0)?(de.eatWhile(/[\w\._\-]/),rn(et(1))):null:de.eat("?")?(de.eatWhile(/[\w\._\-]/),Fe.tokenize=nt("meta","?>"),"meta"):(Se=de.eat("/")?"closeTag":"openTag",Fe.tokenize=Ht,"tag bracket");if(De=="&"){var jn;return de.eat("#")?de.eat("x")?jn=de.eatWhile(/[a-fA-F\d]/)&&de.eat(";"):jn=de.eatWhile(/[\d]/)&&de.eat(";"):jn=de.eatWhile(/[\w\.\-:]/)&&de.eat(";"),jn?"atom":"error"}else return de.eatWhile(/[^&<]/),null}pe.isInText=!0;function Ht(de,Fe){var rn=de.next();if(rn==">"||rn=="/"&&de.eat(">"))return Fe.tokenize=pe,Se=rn==">"?"endTag":"selfcloseTag","tag bracket";if(rn=="=")return Se="equals",null;if(rn=="<"){Fe.tokenize=pe,Fe.state=mt,Fe.tagName=Fe.tagStart=null;var De=Fe.tokenize(de,Fe);return De?De+" tag error":"tag error"}else return/[\'\"]/.test(rn)?(Fe.tokenize=Dt(rn),Fe.stringStartCol=de.column(),Fe.tokenize(de,Fe)):(de.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Dt(de){var Fe=function(rn,De){for(;!rn.eol();)if(rn.next()==de){De.tokenize=Ht;break}return"string"};return Fe.isInAttribute=!0,Fe}function nt(de,Fe){return function(rn,De){for(;!rn.eol();){if(rn.match(Fe)){De.tokenize=pe;break}rn.next()}return de}}function et(de){return function(Fe,rn){for(var De;(De=Fe.next())!=null;){if(De=="<")return rn.tokenize=et(de+1),rn.tokenize(Fe,rn);if(De==">")if(de==1){rn.tokenize=pe;break}else return rn.tokenize=et(de-1),rn.tokenize(Fe,rn)}return"meta"}}function ht(de,Fe,rn){this.prev=de.context,this.tagName=Fe,this.indent=de.indented,this.startOfLine=rn,(Ut.doNotIndent.hasOwnProperty(Fe)||de.context&&de.context.noIndent)&&(this.noIndent=!0)}function lt(de){de.context&&(de.context=de.context.prev)}function gt(de,Fe){for(var rn;;){if(!de.context||(rn=de.context.tagName,!Ut.contextGrabbers.hasOwnProperty(rn)||!Ut.contextGrabbers[rn].hasOwnProperty(Fe)))return;lt(de)}}function mt(de,Fe,rn){return de=="openTag"?(rn.tagStart=Fe.column(),xt):de=="closeTag"?St:mt}function xt(de,Fe,rn){return de=="word"?(rn.tagName=Fe.current(),Xe="tag",re):Ut.allowMissingTagName&&de=="endTag"?(Xe="tag bracket",re(de,Fe,rn)):(Xe="error",xt)}function St(de,Fe,rn){if(de=="word"){var De=Fe.current();return rn.context&&rn.context.tagName!=De&&Ut.implicitlyClosed.hasOwnProperty(rn.context.tagName)&<(rn),rn.context&&rn.context.tagName==De||Ut.matchClosing===!1?(Xe="tag",zt):(Xe="tag error",Jt)}else return Ut.allowMissingTagName&&de=="endTag"?(Xe="tag bracket",zt(de,Fe,rn)):(Xe="error",Jt)}function zt(de,Fe,rn){return de!="endTag"?(Xe="error",zt):(lt(rn),mt)}function Jt(de,Fe,rn){return Xe="error",zt(de,Fe,rn)}function re(de,Fe,rn){if(de=="word")return Xe="attribute",oe;if(de=="endTag"||de=="selfcloseTag"){var De=rn.tagName,jn=rn.tagStart;return rn.tagName=rn.tagStart=null,de=="selfcloseTag"||Ut.autoSelfClosers.hasOwnProperty(De)?gt(rn,De):(gt(rn,De),rn.context=new ht(rn,De,jn==rn.indented)),mt}return Xe="error",re}function oe(de,Fe,rn){return de=="equals"?$t:(Ut.allowMissing||(Xe="error"),re(de,Fe,rn))}function $t(de,Fe,rn){return de=="string"?Le:de=="word"&&Ut.allowUnquoted?(Xe="string",re):(Xe="error",re(de,Fe,rn))}function Le(de,Fe,rn){return de=="string"?Le:re(de,Fe,rn)}return{startState:function(de){var Fe={tokenize:pe,state:mt,indented:de||0,tagName:null,tagStart:null,context:null};return de!=null&&(Fe.baseIndent=de),Fe},token:function(de,Fe){if(!Fe.tagName&&de.sol()&&(Fe.indented=de.indentation()),de.eatSpace())return null;Se=null;var rn=Fe.tokenize(de,Fe);return(rn||Se)&&rn!="comment"&&(Xe=null,Fe.state=Fe.state(Se||rn,de,Fe),Xe&&(rn=Xe=="error"?rn+" error":Xe)),rn},indent:function(de,Fe,rn){var De=de.context;if(de.tokenize.isInAttribute)return de.tagStart==de.indented?de.stringStartCol+1:de.indented+Bt;if(De&&De.noIndent)return Pt.Pass;if(de.tokenize!=Ht&&de.tokenize!=pe)return rn?rn.match(/^(\s*)/)[0].length:0;if(de.tagName)return Ut.multilineTagIndentPastTag!==!1?de.tagStart+de.tagName.length+2:de.tagStart+Bt*(Ut.multilineTagIndentFactor||1);if(Ut.alignCDATA&&/$/,blockCommentStart:"",configuration:Ut.htmlMode?"html":"xml",helperType:Ut.htmlMode?"html":"xml",skipAttribute:function(de){de.state==$t&&(de.state=re)},xmlCurrentTag:function(de){return de.tagName?{name:de.tagName,close:de.type=="closeTag"}:null},xmlCurrentContext:function(de){for(var Fe=[],rn=de.context;rn;rn=rn.prev)rn.tagName&&Fe.push(rn.tagName);return Fe.reverse()}}}),Pt.defineMIME("text/xml","xml"),Pt.defineMIME("application/xml","xml"),Pt.mimeModes.hasOwnProperty("text/html")||Pt.defineMIME("text/html",{name:"xml",htmlMode:!0})})},28734:function(un){(function(Nn,Mt){un.exports=Mt()})(this,function(){"use strict";return function(Nn,Mt){var Pt=Mt.prototype,ne=Pt.format;Pt.format=function(Ne){var Be=this,Pe=this.$locale();if(!this.isValid())return ne.bind(this)(Ne);var Bt=this.$utils(),Ut=(Ne||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(ue){switch(ue){case"Q":return Math.ceil((Be.$M+1)/3);case"Do":return Pe.ordinal(Be.$D);case"gggg":return Be.weekYear();case"GGGG":return Be.isoWeekYear();case"wo":return Pe.ordinal(Be.week(),"W");case"w":case"ww":return Bt.s(Be.week(),ue==="w"?1:2,"0");case"W":case"WW":return Bt.s(Be.isoWeek(),ue==="W"?1:2,"0");case"k":case"kk":return Bt.s(String(Be.$H===0?24:Be.$H),ue==="k"?1:2,"0");case"X":return Math.floor(Be.$d.getTime()/1e3);case"x":return Be.$d.getTime();case"z":return"["+Be.offsetName()+"]";case"zzz":return"["+Be.offsetName("long")+"]";default:return ue}});return ne.bind(this)(Ut)}}})},96036:function(un){(function(Nn,Mt){un.exports=Mt()})(this,function(){"use strict";return function(Nn,Mt,Pt){var ne=Mt.prototype,Ne=function(ue){return ue&&(ue.indexOf?ue:ue.s)},Be=function(ue,se,Se,Xe,pe){var Ht=ue.name?ue:ue.$locale(),Dt=Ne(Ht[se]),nt=Ne(Ht[Se]),et=Dt||nt.map(function(lt){return lt.slice(0,Xe)});if(!pe)return et;var ht=Ht.weekStart;return et.map(function(lt,gt){return et[(gt+(ht||0))%7]})},Pe=function(){return Pt.Ls[Pt.locale()]},Bt=function(ue,se){return ue.formats[se]||function(Se){return Se.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(Xe,pe,Ht){return pe||Ht.slice(1)})}(ue.formats[se.toUpperCase()])},Ut=function(){var ue=this;return{months:function(se){return se?se.format("MMMM"):Be(ue,"months")},monthsShort:function(se){return se?se.format("MMM"):Be(ue,"monthsShort","months",3)},firstDayOfWeek:function(){return ue.$locale().weekStart||0},weekdays:function(se){return se?se.format("dddd"):Be(ue,"weekdays")},weekdaysMin:function(se){return se?se.format("dd"):Be(ue,"weekdaysMin","weekdays",2)},weekdaysShort:function(se){return se?se.format("ddd"):Be(ue,"weekdaysShort","weekdays",3)},longDateFormat:function(se){return Bt(ue.$locale(),se)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};ne.localeData=function(){return Ut.bind(this)()},Pt.localeData=function(){var ue=Pe();return{firstDayOfWeek:function(){return ue.weekStart||0},weekdays:function(){return Pt.weekdays()},weekdaysShort:function(){return Pt.weekdaysShort()},weekdaysMin:function(){return Pt.weekdaysMin()},months:function(){return Pt.months()},monthsShort:function(){return Pt.monthsShort()},longDateFormat:function(se){return Bt(ue,se)},meridiem:ue.meridiem,ordinal:ue.ordinal}},Pt.months=function(){return Be(Pe(),"months")},Pt.monthsShort=function(){return Be(Pe(),"monthsShort","months",3)},Pt.weekdays=function(ue){return Be(Pe(),"weekdays",null,null,ue)},Pt.weekdaysShort=function(ue){return Be(Pe(),"weekdaysShort","weekdays",3,ue)},Pt.weekdaysMin=function(ue){return Be(Pe(),"weekdaysMin","weekdays",2,ue)}}})},55183:function(un){(function(Nn,Mt){un.exports=Mt()})(this,function(){"use strict";var Nn="week",Mt="year";return function(Pt,ne,Ne){var Be=ne.prototype;Be.week=function(Pe){if(Pe===void 0&&(Pe=null),Pe!==null)return this.add(7*(Pe-this.week()),"day");var Bt=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var Ut=Ne(this).startOf(Mt).add(1,Mt).date(Bt),ue=Ne(this).endOf(Nn);if(Ut.isBefore(ue))return 1}var se=Ne(this).startOf(Mt).date(Bt).startOf(Nn).subtract(1,"millisecond"),Se=this.diff(se,Nn,!0);return Se<0?Ne(this).startOf("week").week():Math.ceil(Se)},Be.weeks=function(Pe){return Pe===void 0&&(Pe=null),this.week(Pe)}}})},172:function(un){(function(Nn,Mt){un.exports=Mt()})(this,function(){"use strict";return function(Nn,Mt){Mt.prototype.weekYear=function(){var Pt=this.month(),ne=this.week(),Ne=this.year();return ne===1&&Pt===11?Ne+1:Pt===0&&ne>=52?Ne-1:Ne}}})},6833:function(un){(function(Nn,Mt){un.exports=Mt()})(this,function(){"use strict";return function(Nn,Mt){Mt.prototype.weekday=function(Pt){var ne=this.$locale().weekStart||0,Ne=this.$W,Be=(Nex&&(x=Math.max(0,E+x)),(b==null||b>E)&&(b=E),b=Number(b),0>b&&(b=Math.max(0,E+b)),x=Number(x||0);x=a.length?a.push(x):a.splice(y,0,x):Oe("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function xr(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Oe("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Si(){var a=la.pop();return a===void 0?[]:a}function Fi(a){a.length=0,la.push(a)}function Gi(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(qe(a)&&a.constructor)return Gi(a.constructor);return typeof a}function Mr(a){var y=a;return qe(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 hr(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 Yn(a,y,x){Object.defineProperty(Fa.prototype,a,{get:y,set:x})}function zi(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 b=0,E=0;Ex;x++)y[x]=x;for(x=b=0;256>x;x++)b=(b+y[x]+119)%256,E=y[x],y[x]=y[b],y[b]=E;b=x=0;for(var z="",tt=0;tt-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 qo=ke.navigator!==void 0&&0this.key)return!1;a=a.s;var y=a.length,x=++this.Za,b=this.qf;if(b!==null)for(;xthis.key)return!1;var y=--this.Za;return 0<=y?(this.key=y,this.value=a.s[y],!0):(this.de(),!1)},Mo.prototype.Ad=function(){return this.next()},Mo.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},Mo.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},Mo.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},Mo.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},Mo.prototype.map=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--)x.push(a(y[b]));return a=new Ln,a.s=x,a.xb(),a.iterator},Mo.prototype.filter=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--){var E=y[b];a(E)&&x.push(E)}return a=new Ln,a.s=x,a.xb(),a.iterator},Mo.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},Mo.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Ae.Object.defineProperties(Mo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),Mo.prototype.first=Mo.prototype.first,Mo.prototype.hasNext=Mo.prototype.Ad,Mo.prototype.next=Mo.prototype.next,Mo.prototype.reset=Mo.prototype.reset,Mo.className="ListIteratorBackwards";function Ln(a){Br(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Oe("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}bt=Ln.prototype,bt.xb=function(){var a=this.Ja;a++,999999999a||a>=y.length)&&Pi(a,"0 <= i < length",Ln,"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",Ln,"setElt:i"),this._isFrozen&&ni(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 0a&&Pi(a,">= 0",Ln,"insertAt:i"),this._isFrozen&&ni(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&&ni(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",Ln,"removeAt:i"),this._isFrozen&&ni(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},bt.removeRange=function(a,y){var x=this.s,b=x.length;if(0>a)a=0;else if(a>=b)return this;if(0>y)return this;if(y>=b&&(y=b-1),a>y)return this;this._isFrozen&&ni(this);for(var E=a,z=y+1;z=z)return this;if((0>y||y>=E-1)&&Pi(y,"0 <= from < length",Ln,"sortRange:from"),z===2)return x=b[y],E=b[y+1],0=E)b.sort(a);else for(y=b.slice(0,x),y.sort(a),a=0;a=E)for(x=b.slice(y),x.sort(a),a=y;a=this.s.length)return uo;var a=this.Sa;return a!==null?(a.reset(),a):new Ir(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return uo;var a=this.Hg;return a!==null?(a.reset(),a):new Mo(this)}}}),Ln.prototype.reverse=Ln.prototype.reverse,Ln.prototype.sortRange=Ln.prototype.zi,Ln.prototype.sort=Ln.prototype.sort,Ln.prototype.toSet=Ln.prototype.Iv,Ln.prototype.toArray=Ln.prototype.Fa,Ln.prototype.removeRange=Ln.prototype.removeRange,Ln.prototype.removeAt=Ln.prototype.mb,Ln.prototype.delete=Ln.prototype.delete,Ln.prototype.remove=Ln.prototype.remove,Ln.prototype.insertAt=Ln.prototype.Gb,Ln.prototype.pop=Ln.prototype.pop,Ln.prototype.last=Ln.prototype.jc,Ln.prototype.first=Ln.prototype.first,Ln.prototype.set=Ln.prototype.set,Ln.prototype.setElt=Ln.prototype.cd,Ln.prototype.get=Ln.prototype.get,Ln.prototype.elt=Ln.prototype.M,Ln.prototype.indexOf=Ln.prototype.indexOf,Ln.prototype.has=Ln.prototype.has,Ln.prototype.contains=Ln.prototype.contains,Ln.prototype.clear=Ln.prototype.clear,Ln.prototype.addAll=Ln.prototype.addAll,Ln.prototype.push=Ln.prototype.push,Ln.prototype.add=Ln.prototype.add,Ln.prototype.thaw=Ln.prototype.ka,Ln.prototype.freeze=Ln.prototype.freeze,Ln.className="List";function $r(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}$r.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},$r.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)},$r.prototype.Ad=function(){return this.next()},$r.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},$r.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},$r.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},$r.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},$r.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new Ln;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},$r.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new Ln;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},$r.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},$r.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Ae.Object.defineProperties($r.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),$r.prototype.first=$r.prototype.first,$r.prototype.hasNext=$r.prototype.Ad,$r.prototype.next=$r.prototype.next,$r.prototype.reset=$r.prototype.reset,$r.className="SetIterator";function Pn(a){Br(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Oe("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}bt=Pn.prototype,bt.xb=function(){var a=this.Ja;a++,999999999=this.Sb)return uo;var a=this.Sa;return a!==null?(a.reset(),a):new $r(this)}}}),Pn.prototype.toList=Pn.prototype.Hv,Pn.prototype.toArray=Pn.prototype.Fa,Pn.prototype.clear=Pn.prototype.clear,Pn.prototype.retainAll=Pn.prototype.pA,Pn.prototype.removeAll=Pn.prototype.hp,Pn.prototype.delete=Pn.prototype.delete,Pn.prototype.remove=Pn.prototype.remove,Pn.prototype.first=Pn.prototype.first,Pn.prototype.containsAny=Pn.prototype.Ty,Pn.prototype.containsAll=Pn.prototype.Sy,Pn.prototype.has=Pn.prototype.has,Pn.prototype.contains=Pn.prototype.contains,Pn.prototype.addAll=Pn.prototype.addAll,Pn.prototype.add=Pn.prototype.add,Pn.prototype.thaw=Pn.prototype.ka,Pn.prototype.freeze=Pn.prototype.freeze;var Ze=1;Pn.className="Set",Pn.uniqueHash=Br,Pn.hashIdUnique=Ga,Pn.hashId=Te;function sn(a){this.ma=a,this.qa=a.Ja,this.sa=null}sn.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},sn.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)},sn.prototype.Ad=function(){return this.next()},sn.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},sn.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},sn.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},sn.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},sn.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new Ln;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},sn.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new Ln;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},sn.prototype.de=function(){this.value=this.key=null,this.qa=-1},sn.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Ae.Object.defineProperties(sn.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),sn.prototype.first=sn.prototype.first,sn.prototype.hasNext=sn.prototype.Ad,sn.prototype.next=sn.prototype.next,sn.prototype.reset=sn.prototype.reset,sn.className="MapKeySetIterator";function zn(a){Pn.call(this),Br(this),this._isFrozen=!0,this.ma=a}ae(zn,Pn),bt=zn.prototype,bt.freeze=function(){return this},bt.ka=function(){return this},bt.toString=function(){return"MapKeySet("+this.ma.toString()+")"},bt.add=function(){Oe("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(){Oe("This Set is read-only: "+this.toString())},bt.delete=function(a){return this.remove(a)},bt.clear=function(){Oe("This Set is read-only: "+this.toString())},bt.first=function(){var a=this.ma.ea;return a!==null?a.key:null},zn.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},zn.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},zn.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},zn.prototype.map=function(a){for(var y=new Pn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},zn.prototype.filter=function(a){for(var y=new Pn,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},zn.prototype.copy=function(){return new zn(this.ma)},zn.prototype.Iv=function(){var a=new Pn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},zn.prototype.Fa=function(){var a=this.ma.Tb,y=Array(this.ma.Sb),x=0,b;for(b in a)y[x]=a[b].key,x++;return y},zn.prototype.Hv=function(){var a=new Ln,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Ae.Object.defineProperties(zn.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?uo:new sn(this.ma)}}}),zn.prototype.toList=zn.prototype.Hv,zn.prototype.toArray=zn.prototype.Fa,zn.prototype.toSet=zn.prototype.Iv,zn.prototype.first=zn.prototype.first,zn.prototype.clear=zn.prototype.clear,zn.prototype.delete=zn.prototype.delete,zn.prototype.remove=zn.prototype.remove,zn.prototype.has=zn.prototype.has,zn.prototype.contains=zn.prototype.contains,zn.prototype.add=zn.prototype.add,zn.prototype.thaw=zn.prototype.ka,zn.prototype.freeze=zn.prototype.freeze,zn.className="MapKeySet";function Ii(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Ii.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Ii.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)},Ii.prototype.Ad=function(){return this.next()},Ii.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},Ii.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},Ii.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},Ii.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},Ii.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Ln;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Ii.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Ln;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Ii.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Ii.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Ae.Object.defineProperties(Ii.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Ii.prototype.first=Ii.prototype.first,Ii.prototype.hasNext=Ii.prototype.Ad,Ii.prototype.next=Ii.prototype.next,Ii.prototype.reset=Ii.prototype.reset,Ii.className="MapValueSetIterator";function Nr(a,y){this.key=a,this.value=y,this.ll=this.va=null}Nr.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},Nr.className="KeyValuePair";function lr(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}lr.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},lr.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)},lr.prototype.Ad=function(){return this.next()},lr.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},lr.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},lr.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},lr.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},lr.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Ln;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},lr.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Ln;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},lr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},lr.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Ae.Object.defineProperties(lr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),lr.prototype.first=lr.prototype.first,lr.prototype.hasNext=lr.prototype.Ad,lr.prototype.next=lr.prototype.next,lr.prototype.reset=lr.prototype.reset,lr.className="MapIterator";function si(a){Br(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"&&Oe("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}bt=si.prototype,bt.xb=function(){var a=this.Ja;a++,999999999=this.count)return uo;var a=this.Sa;return a!==null?(a.reset(),a):new lr(this)}},iteratorKeys:{get:function(){return 0>=this.count?uo:new sn(this)}},iteratorValues:{get:function(){if(0>=this.count)return uo;var a=this.jf;return a!==null?(a.reset(),a):new Ii(this)}}}),si.prototype.toKeySet=si.prototype.Lf,si.prototype.toArray=si.prototype.Fa,si.prototype.clear=si.prototype.clear,si.prototype.delete=si.prototype.delete,si.prototype.remove=si.prototype.remove,si.prototype.get=si.prototype.get,si.prototype.getValue=si.prototype.I,si.prototype.has=si.prototype.has,si.prototype.contains=si.prototype.contains,si.prototype.first=si.prototype.first,si.prototype.addAll=si.prototype.addAll,si.prototype.set=si.prototype.set,si.prototype.add=si.prototype.add,si.prototype.thaw=si.prototype.ka,si.prototype.freeze=si.prototype.freeze,si.className="Map";function Zt(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):Oe("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Ao,rs,Ls,Xa,Ea;Zt.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},Zt.prototype.h=function(a,y){return this.x=a,this.y=y,this},Zt.prototype.sg=function(a,y){return this.x=a,this.y=y,this},Zt.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},Zt.prototype.copy=function(){var a=new Zt;return a.x=this.x,a.y=this.y,a},bt=Zt.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)&&Oe("cannot thaw constant: "+this),this._isFrozen=!1,this};function Eo(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new Zt(x,E)}return new Zt}function gs(a){return a.x.toString()+" "+a.y.toString()}bt.toString=function(){return"Point("+this.x+","+this.y+")"},bt.D=function(a){return a instanceof Zt?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 Ee.B(this.x,a.x)&&Ee.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},Zt.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 b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));return this.x=a*y-b*x,this.y=b*y+a*x,this},bt=Zt.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 0y?270:0;if(y===0)return 0a?x=0>y?x+180:180-x:0>y&&(x=360-x),x}bt.Ry=function(a,y){return Ee.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},bt.fA=function(a,y,x,b){return Ee.qh(a,y,x,b,this.x,this.y,this),this},bt.gA=function(a,y){return Ee.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},bt.uA=function(a,y,x,b){return Ee.No(this.x,this.y,a,y,x,b,this),this},bt.vA=function(a,y){return Ee.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,b,E){return this.x=a+E.x*x+E.offsetX,this.y=y+E.y*b+E.offsetY,this},bt.transform=function(a){return a.Ga(this),this};function Ho(a,y){return y.Cd(a),a}function _o(a,y,x,b,E,z){var tt=E-x,rt=z-b,at=tt*tt+rt*rt;x-=a,b-=y;var st=-x*tt-b*rt;return 0>=st||st>=at?(tt=E-a,rt=z-y,Math.min(x*x+b*b,tt*tt+rt*rt)):(a=tt*b-rt*x,a*a/at)}function er(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function Qi(a,y,x,b){return a=x-a,y=b-y,a===0?0y?270:0:y===0?0a?b=0>y?b+180:180-b:0>y&&(b=360-b),b)}bt.w=function(){return isFinite(this.x)&&isFinite(this.y)},Zt.alloc=function(){var a=Er.pop();return a===void 0?new Zt:a},Zt.allocAt=function(a,y){var x=Er.pop();return x===void 0?new Zt(a,y):(x.x=a,x.y=y,x)},Zt.free=function(a){Er.push(a)},Zt.prototype.isReal=Zt.prototype.w,Zt.prototype.setSpot=Zt.prototype.yi,Zt.prototype.setRectSpot=Zt.prototype.xi,Zt.prototype.snapToGridPoint=Zt.prototype.vA,Zt.prototype.snapToGrid=Zt.prototype.uA,Zt.prototype.projectOntoLineSegmentPoint=Zt.prototype.gA,Zt.prototype.projectOntoLineSegment=Zt.prototype.fA,Zt.intersectingLineSegments=function(a,y,x,b,E,z,tt,rt){return Ee.Rl(a,y,x,b,E,z,tt,rt)},Zt.prototype.compareWithLineSegmentPoint=Zt.prototype.Ry,Zt.compareWithLineSegment=function(a,y,x,b,E,z){return Ee.Fl(a,y,x,b,E,z)},Zt.prototype.direction=Zt.prototype.direction,Zt.prototype.directionPoint=Zt.prototype.ab,Zt.prototype.normalize=Zt.prototype.normalize,Zt.prototype.distanceSquared=Zt.prototype.zd,Zt.prototype.distanceSquaredPoint=Zt.prototype.Bf,Zt.prototype.scale=Zt.prototype.scale,Zt.prototype.rotate=Zt.prototype.rotate,Zt.prototype.offset=Zt.prototype.offset,Zt.prototype.subtract=Zt.prototype.re,Zt.prototype.add=Zt.prototype.add,Zt.prototype.equalsApprox=Zt.prototype.Xa,Zt.prototype.equalTo=Zt.prototype.hi,Zt.prototype.equals=Zt.prototype.D,Zt.prototype.set=Zt.prototype.set,Zt.prototype.setTo=Zt.prototype.sg;var Er=[];Zt.className="Point",Zt.parse=Eo,Zt.stringify=gs,Zt.distanceLineSegmentSquared=_o,Zt.distanceSquared=er,Zt.direction=Qi,Zt.Origin=Ao=new Zt(0,0).ja(),Zt.InfiniteTopLeft=rs=new Zt(-1/0,-1/0).ja(),Zt.InfiniteBottomRight=Ls=new Zt(1/0,1/0).ja(),Zt.SixPoint=Xa=new Zt(6,6).ja(),Zt.NoPoint=Ea=new Zt(NaN,NaN).ja(),Zt.parse=Eo,Zt.stringify=gs,Zt.distanceLineSegmentSquared=_o,Zt.distanceSquared=er,Zt.direction=Qi;function hn(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):Oe("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var ar,oo,ca,$o,ia,as,Ks;hn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},hn.prototype.h=function(a,y){return this.width=a,this.height=y,this},hn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},hn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},hn.prototype.copy=function(){var a=new hn;return a.width=this.width,a.height=this.height,a},bt=hn.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)&&Oe("cannot thaw constant: "+this),this._isFrozen=!1,this};function vs(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new hn(x,E)}return new hn}function au(a){return a.width.toString()+" "+a.height.toString()}bt.toString=function(){return"Size("+this.width+","+this.height+")"},bt.D=function(a){return a instanceof hn?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 Ee.B(this.width,a.width)&&Ee.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)},hn.alloc=function(){var a=ks.pop();return a===void 0?new hn:a},hn.free=function(a){ks.push(a)},hn.prototype.isReal=hn.prototype.w,hn.prototype.inflate=hn.prototype.Bc,hn.prototype.equalsApprox=hn.prototype.Xa,hn.prototype.equalTo=hn.prototype.hi,hn.prototype.equals=hn.prototype.D,hn.prototype.set=hn.prototype.set,hn.prototype.setTo=hn.prototype.sg;var ks=[];hn.className="Size",hn.parse=vs,hn.stringify=au,hn.ZeroSize=ar=new hn(0,0).ja(),hn.OneSize=oo=new hn(1,1).ja(),hn.SixSize=ca=new hn(6,6).ja(),hn.EightSize=$o=new hn(8,8).ja(),hn.TenSize=ia=new hn(10,10).ja(),hn.InfiniteSize=as=new hn(1/0,1/0).ja(),hn.NoSize=Ks=new hn(NaN,NaN).ja(),hn.parse=vs,hn.stringify=au;function en(a,y,x,b){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 b=="number"&&(0<=b||isNaN(b))?(this.x=a,this.y=y,this.width=x,this.height=b):a instanceof Zt?(x=a.x,a=a.y,y instanceof Zt?(b=y.x,y=y.y,this.x=Math.min(x,b),this.y=Math.min(a,y),this.width=Math.abs(x-b),this.height=Math.abs(a-y)):y instanceof hn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):Oe("Incorrect second argument supplied to Rect constructor "+y)):Oe("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}bt=en.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,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function Us(a,y,x){a.width=y,a.height=x}bt.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,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},en.prototype.copy=function(){var a=new en;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},bt=en.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)&&Oe("cannot thaw constant: "+this),this._isFrozen=!1,this};function kl(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;(b=a[y++])&&(E=parseFloat(b));for(var z=0;a[y]==="";)y++;(b=a[y++])&&(z=parseFloat(b));for(var tt=0;a[y]==="";)y++;return(b=a[y++])&&(tt=parseFloat(b)),new en(x,E,z,tt)}return new en}function xu(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 en?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},bt.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},bt.Xa=function(a){return Ee.B(this.x,a.x)&&Ee.B(this.y,a.y)&&Ee.B(this.width,a.width)&&Ee.B(this.height,a.height)};function ma(a,y){return Ee.$(a.x,y.x)&&Ee.$(a.y,y.y)&&Ee.$(a.width,y.width)&&Ee.$(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,b){return x===void 0&&(x=0),b===void 0&&(b=0),this.x<=a&&a+x<=this.x+this.width&&this.y<=y&&y+b<=this.y+this.height},bt.offset=function(a,y){return this.x+=a,this.y+=y,this},bt.Bc=function(a,y){return Pl(this,y,a,y,a)},bt.Co=function(a){return Pl(this,a.top,a.right,a.bottom,a.left)},bt.Fv=function(a){return Pl(this,-a.top,-a.right,-a.bottom,-a.left)},bt.Hz=function(a,y,x,b){return Pl(this,a,y,x,b)};function Pl(a,y,x,b,E){var z=a.width;return x+E<=-z?(a.x+=z/2,a.width=0):(a.x-=E,a.width+=x+E),x=a.height,y+b<=-x?(a.y+=x/2,a.height=0):(a.y-=y,a.height+=y+b),a}bt.Ex=function(a){return wl(this,a.x,a.y,a.width,a.height)},bt.Uu=function(a,y,x,b){return wl(this,a,y,x,b)};function wl(a,y,x,b,E){var z=Math.max(a.x,y),tt=Math.max(a.y,x);return y=Math.min(a.x+a.width,y+b),x=Math.min(a.y+a.height,x+E),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,b){var E=this.width,z=this.x;return E!==1/0&&x!==1/0&&(E+=z,x+=a,isNaN(x)||isNaN(E)||z>x||a>E)?!1:(a=this.height,x=this.y,!(a!==1/0&&b!==1/0&&(a+=x,b+=y,isNaN(b)||isNaN(a)||x>b||y>a)))};function su(a,y){var x=a.width,b=a.x,E=y.x-10;return b>y.width+10+10+E||E>x+b?!1:(x=a.height,a=a.y,b=y.y-10,!(a>y.height+10+10+b||b>x+a))}bt.Ye=function(a){return Aa(this,a.x,a.y,0,0)},bt.ed=function(a){return Aa(this,a.x,a.y,a.width,a.height)},bt.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),Aa(this,a,y,x,b)};function Aa(a,y,x,b,E){var z=Math.min(a.x,y),tt=Math.min(a.y,x);return y=Math.max(a.x+a.width,y+b),x=Math.max(a.y+a.height,x+E),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 ps(a,y,x,b,E,z,tt,rt){return tt===void 0&&(tt=0),rt===void 0&&(rt=0),a<=E&&E+tt<=a+x&&y<=z&&z+rt<=y+b}function so(a,y,x,b,E,z,tt,rt){return a>tt+E||E>x+a?!1:!(y>rt+z||z>b+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},en.alloc=function(){var a=ls.pop();return a===void 0?new en:a},en.allocAt=function(a,y,x,b){var E=ls.pop();return E===void 0?new en(a,y,x,b):E.h(a,y,x,b)},en.free=function(a){ls.push(a)},Ae.Object.defineProperties(en.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 Zt(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new hn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new Zt(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}}}),en.prototype.isEmpty=en.prototype.Mz,en.prototype.isReal=en.prototype.w,en.intersectsLineSegment=function(a,y,x,b,E,z,tt,rt){return Ee.Fx(a,y,x,b,E,z,tt,rt)},en.prototype.setSpot=en.prototype.yi,en.prototype.union=en.prototype.Kv,en.prototype.unionRect=en.prototype.ed,en.prototype.unionPoint=en.prototype.Ye,en.prototype.intersects=en.prototype.Vu,en.prototype.intersectsRect=en.prototype.Yc,en.prototype.intersect=en.prototype.Uu,en.prototype.intersectRect=en.prototype.Ex,en.prototype.grow=en.prototype.Hz,en.prototype.subtractMargin=en.prototype.Fv,en.prototype.addMargin=en.prototype.Co,en.prototype.inflate=en.prototype.Bc,en.prototype.offset=en.prototype.offset,en.prototype.contains=en.prototype.contains,en.prototype.containsRect=en.prototype.Re,en.prototype.containsPoint=en.prototype.ca,en.prototype.equalsApprox=en.prototype.Xa,en.prototype.equalTo=en.prototype.hi,en.prototype.equals=en.prototype.D,en.prototype.setSize=en.prototype.tA,en.prototype.setPoint=en.prototype.dd,en.prototype.set=en.prototype.set,en.prototype.setTo=en.prototype.sg;var Do=null,ka=null,ls=[];en.className="Rect",en.parse=kl,en.stringify=xu,en.contains=ps,en.intersects=so,en.ZeroRect=Do=new en(0,0,0,0).ja(),en.NoRect=ka=new en(NaN,NaN,NaN,NaN).ja(),en.parse=kl,en.stringify=xu,en.contains=ps,en.intersects=so;function qi(a,y,x,b){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):b!==void 0?(this.top=a,this.right=y,this.bottom=x,this.left=b):Oe("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}qi.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},qi.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},qi.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},qi.prototype.copy=function(){var a=new qi;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},bt=qi.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)&&Oe("cannot thaw constant: "+this),this._isFrozen=!1,this};function Gu(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=NaN;a[y]==="";)y++;var b=a[y++];if(b&&(x=parseFloat(b)),isNaN(x))return new qi;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new qi(x);for(var z=NaN;a[y]==="";)y++;if((b=a[y++])&&(z=parseFloat(b)),isNaN(z))return new qi(x,E);for(var tt=NaN;a[y]==="";)y++;return(b=a[y++])&&(tt=parseFloat(b)),isNaN(tt)?new qi(x,E):new qi(x,E,z,tt)}return new qi}function zl(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 qi?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},bt.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},bt.Xa=function(a){return Ee.B(this.top,a.top)&&Ee.B(this.right,a.right)&&Ee.B(this.bottom,a.bottom)&&Ee.B(this.left,a.left)},bt.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},qi.alloc=function(){var a=Zu.pop();return a===void 0?new qi:a},qi.free=function(a){Zu.push(a)},qi.prototype.isReal=qi.prototype.w,qi.prototype.equalsApprox=qi.prototype.Xa,qi.prototype.equalTo=qi.prototype.hi,qi.prototype.equals=qi.prototype.D,qi.prototype.set=qi.prototype.set,qi.prototype.setTo=qi.prototype.sg;var Cl=null,Zh=null,Zu=[];qi.className="Margin",qi.parse=Gu,qi.stringify=zl,qi.ZeroMargin=Cl=new qi(0,0,0,0).ja(),qi.TwoMargin=Zh=new qi(2,2,2,2).ja(),qi.parse=Gu,qi.stringify=zl;function Bi(a,y,x,b){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),b===void 0&&(b=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=b),this._isFrozen=!1}var ds,Ns,Xl,Ms,Fs,no,Pa,Qr,ua,Za,Xs,Nl,Ts,fl,Pu,ph,mh,eh,Fu,Yl,ac,nh,dd,Dd,uf,al,ag,hf,fd,bc,Hl,Fl,ul,bl,gd,wu;Bi.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Bi.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},Bi.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Bi.prototype.copy=function(){var a=new Bi;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},bt=Bi.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)&&Oe("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ys(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function Nh(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return ds;if(a==="TopLeft")return Ns;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return Xl;if(a==="TopRight")return Ms;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Fs;if(a==="Center")return no;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return Pa;if(a==="BottomLeft")return Qr;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return ua;if(a==="BottomRight")return Za;if(a==="TopSide")return Xs;if(a==="LeftSide")return Nl;if(a==="RightSide")return Ts;if(a==="BottomSide")return fl;if(a==="TopBottomSides")return Pu;if(a==="LeftRightSides")return ph;if(a==="TopLeftSides")return mh;if(a==="TopRightSides")return eh;if(a==="BottomLeftSides")return Fu;if(a==="BottomRightSides")return Yl;if(a==="NotTopSide")return ac;if(a==="NotLeftSide")return nh;if(a==="NotRightSide")return dd;if(a==="NotBottomSide")return Dd;if(a==="AllSides")return uf;if(a==="Default")return al;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b!==void 0&&0a&&(a+=360),a===0)return this;if(this.translate(y,x),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.m12*a+this.m22*b,z=this.m11*-b+this.m21*a,tt=this.m12*-b+this.m22*a;return this.m11=this.m11*a+this.m21*b,this.m12=E,this.m21=z,this.m22=tt,this.translate(-y,-x),this},bt=br.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,b=a.y;return a.h(x*this.m22*y+b*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+b*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,b=1.2*a.y;return a.h(x*this.m22*y+b*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+b*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},bt.pp=function(a){var y=a.x,x=a.y,b=y+a.width,E=x+a.height,z=this.m11,tt=this.m12,rt=this.m21,at=this.m22,st=this.dx,ut=this.dy,ft=y*z+x*rt+st,vt=y*tt+x*at+ut,Ct=b*z+x*rt+st,Et=b*tt+x*at+ut;return x=y*z+E*rt+st,y=y*tt+E*at+ut,z=b*z+E*rt+st,b=b*tt+E*at+ut,E=Math.min(ft,Ct),ft=Math.max(ft,Ct),Ct=Math.min(vt,Et),vt=Math.max(vt,Et),E=Math.min(E,x),ft=Math.max(ft,x),Ct=Math.min(Ct,y),vt=Math.max(vt,y),E=Math.min(E,z),ft=Math.max(ft,z),Ct=Math.min(Ct,b),vt=Math.max(vt,b),a.h(E,Ct,ft-E,vt-Ct),a},br.alloc=function(){var a=cf.pop();return a===void 0?new br:a},br.free=function(a){cf.push(a)},br.prototype.transformRect=br.prototype.pp,br.prototype.transformPoint=br.prototype.Ga,br.prototype.scale=br.prototype.scale,br.prototype.translate=br.prototype.translate,br.prototype.rotate=br.prototype.rotate,br.prototype.invert=br.prototype.Vj,br.prototype.multiplyInverted=br.prototype.bv,br.prototype.multiply=br.prototype.multiply,br.prototype.reset=br.prototype.reset,br.prototype.isIdentity=br.prototype.ws,br.prototype.equals=br.prototype.D,br.prototype.setTransform=br.prototype.setTransform,br.prototype.set=br.prototype.set;var cf=[];br.className="Transform",br.xF="54a702f3e53909c447824c6706603faf4c";var Ee={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=Ee.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);Ee.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&&-.5a&&-5e-8=E&&(E=1e-6),aut-st)if(a-x>E||x-a>E){if(z=(b-y)/(x-a)*(z-a)+y,z-E<=tt&&tt<=z+E)return!0}else return!0;else if(y-b>E||b-y>E){if(tt=(x-a)/(b-y)*(tt-y)+a,tt-E<=z&&z<=tt+E)return!0}else return!0;return!1},cs:function(a,y,x,b,E,z,tt,rt,at,st,ut,ft){if(Ee.Yb(a,y,tt,rt,ft,x,b)&&Ee.Yb(a,y,tt,rt,ft,E,z))return Ee.Yb(a,y,tt,rt,ft,st,ut);var vt=(a+x)/2,Ct=(y+b)/2,Et=(x+E)/2,Nt=(b+z)/2;E=(E+tt)/2,z=(z+rt)/2,b=(vt+Et)/2,x=(Ct+Nt)/2,Et=(Et+E)/2,Nt=(Nt+z)/2;var Qt=(b+Et)/2,Gt=(x+Nt)/2;return Ee.cs(a,y,vt,Ct,b,x,Qt,Gt,at,st,ut,ft)||Ee.cs(Qt,Gt,Et,Nt,E,z,tt,rt,at,st,ut,ft)},ax:function(a,y,x,b,E,z,tt,rt,at){var st=(x+E)/2,ut=(b+z)/2;return at.h((((a+x)/2+st)/2+(st+(E+tt)/2)/2)/2,(((y+b)/2+ut)/2+(ut+(z+rt)/2)/2)/2),at},My:function(a,y,x,b,E,z,tt,rt){var at=(x+E)/2,st=(b+z)/2;return Qi(((a+x)/2+at)/2,((y+b)/2+st)/2,(at+(E+tt)/2)/2,(st+(z+rt)/2)/2)},Dl:function(a,y,x,b,E,z,tt,rt,at,st){if(Ee.Yb(a,y,tt,rt,at,x,b)&&Ee.Yb(a,y,tt,rt,at,E,z))Aa(st,a,y,0,0),Aa(st,tt,rt,0,0);else{var ut=(a+x)/2,ft=(y+b)/2,vt=(x+E)/2,Ct=(b+z)/2;E=(E+tt)/2,z=(z+rt)/2,b=(ut+vt)/2,x=(ft+Ct)/2,vt=(vt+E)/2,Ct=(Ct+z)/2;var Et=(b+vt)/2,Nt=(x+Ct)/2;Ee.Dl(a,y,ut,ft,b,x,Et,Nt,at,st),Ee.Dl(Et,Nt,vt,Ct,E,z,tt,rt,at,st)}return st},Qe:function(a,y,x,b,E,z,tt,rt,at,st){if(Ee.Yb(a,y,tt,rt,at,x,b)&&Ee.Yb(a,y,tt,rt,at,E,z))st.length===0&&(st.push(a),st.push(y)),st.push(tt),st.push(rt);else{var ut=(a+x)/2,ft=(y+b)/2,vt=(x+E)/2,Ct=(b+z)/2;E=(E+tt)/2,z=(z+rt)/2,b=(ut+vt)/2,x=(ft+Ct)/2,vt=(vt+E)/2,Ct=(Ct+z)/2;var Et=(b+vt)/2,Nt=(x+Ct)/2;Ee.Qe(a,y,ut,ft,b,x,Et,Nt,at,st),Ee.Qe(Et,Nt,vt,Ct,E,z,tt,rt,at,st)}return st},jv:function(a,y,x,b,E,z,tt,rt,at,st){if(Ee.Yb(a,y,E,z,st,x,b))return Ee.Yb(a,y,E,z,st,rt,at);var ut=(a+x)/2,ft=(y+b)/2;x=(x+E)/2,b=(b+z)/2;var vt=(ut+x)/2,Ct=(ft+b)/2;return Ee.jv(a,y,ut,ft,vt,Ct,tt,rt,at,st)||Ee.jv(vt,Ct,x,b,E,z,tt,rt,at,st)},OA:function(a,y,x,b,E,z,tt){return tt.h(((a+x)/2+(x+E)/2)/2,((y+b)/2+(b+z)/2)/2),tt},iv:function(a,y,x,b,E,z,tt,rt){if(Ee.Yb(a,y,E,z,tt,x,b))Aa(rt,a,y,0,0),Aa(rt,E,z,0,0);else{var at=(a+x)/2,st=(y+b)/2;x=(x+E)/2,b=(b+z)/2;var ut=(at+x)/2,ft=(st+b)/2;Ee.iv(a,y,at,st,ut,ft,tt,rt),Ee.iv(ut,ft,x,b,E,z,tt,rt)}return rt},ep:function(a,y,x,b,E,z,tt,rt){if(Ee.Yb(a,y,E,z,tt,x,b))rt.length===0&&(rt.push(a),rt.push(y)),rt.push(E),rt.push(z);else{var at=(a+x)/2,st=(y+b)/2;x=(x+E)/2,b=(b+z)/2;var ut=(at+x)/2,ft=(st+b)/2;Ee.ep(a,y,at,st,ut,ft,tt,rt),Ee.ep(ut,ft,x,b,E,z,tt,rt)}return rt},Eo:function(a,y,x,b,E,z,tt,rt,at,st,ut,ft,vt,Ct){if(Ee.Yb(a,y,tt,rt,vt,x,b)&&Ee.Yb(a,y,tt,rt,vt,E,z))return!Ee.Rl(a,y,tt,rt,at,st,ut,ft)||(vt=(a-tt)*(st-ft)-(y-rt)*(at-ut),vt===0)?!1:(Ct.h(((a*rt-y*tt)*(at-ut)-(a-tt)*(at*ft-st*ut))/vt,((a*rt-y*tt)*(st-ft)-(y-rt)*(at*ft-st*ut))/vt),!0);var Et=(a+x)/2,Nt=(y+b)/2,Qt=(x+E)/2,Gt=(b+z)/2;E=(E+tt)/2,z=(z+rt)/2,b=(Et+Qt)/2,x=(Nt+Gt)/2,Qt=(Qt+E)/2,Gt=(Gt+z)/2;var ee=(b+Qt)/2,ie=(x+Gt)/2,he=1/0,Ce=!1,We=0,ii=0;return Ee.Eo(a,y,Et,Nt,b,x,ee,ie,at,st,ut,ft,vt,Ct)&&(a=(Ct.x-at)*(Ct.x-at)+(Ct.y-st)*(Ct.y-st),a=ut)return Ct;if((at>ut?at-ut:ut-at)<(st>ft?st-ft:ft-st)){if(ya)return Ct}else if(aa)return Ct;0vt&&Ct--}else{Et=(a+x)/2,Nt=(y+b)/2;var Qt=(x+E)/2,Gt=(b+z)/2;E=(E+tt)/2,z=(z+rt)/2,b=(Et+Qt)/2,x=(Nt+Gt)/2,Qt=(Qt+E)/2,Gt=(Gt+z)/2;var ee=(b+Qt)/2,ie=(x+Gt)/2;Ct+=Ee.Fo(a,y,Et,Nt,b,x,ee,ie,at,st,ut,ft,vt),Ct+=Ee.Fo(ee,ie,Qt,Gt,E,z,tt,rt,at,st,ut,ft,vt)}return Ct},qh:function(a,y,x,b,E,z,tt){return Ee.$(a,x)?(yy?(tt.h(a,y),!1):(tt.h(a,z),!0)):Ee.$(y,b)?(aa?(tt.h(a,y),!1):(tt.h(E,y),!0)):(E=((a-E)*(a-x)+(y-z)*(y-b))/((x-a)*(x-a)+(b-y)*(b-y)),-5e-6>E?(tt.h(a,y),!1):1.000005y?(at.h(a,y),!1):(at.h(a,x),!0)):(tt=(b-y)/(x-a),Ee.$(rt,tt)?(Ee.qh(a,y,x,b,E,z,at),!1):(E=(tt*a-rt*E+z-y)/(tt-rt),Ee.$(tt,0)?(aa?(at.h(a,y),!1):(at.h(E,y),!0)):Ee.qh(a,y,x,b,E,tt*(E-a)+y,at))))},MA:function(a,y,x,b,E){return Ee.Ve(x.x,x.y,b.x,b.y,a.x,a.y,y.x,y.y,E)},KA:function(a,y,x,b,E,z,tt,rt,at,st){function ut(Qt,Gt){var ee=(Qt-a)*(Qt-a)+(Gt-y)*(Gt-y);ee(x>a?x-a:a-x)){if(vt=1-(x-E)*(x-E)/(vt*vt),0>vt)return at;vt=Math.sqrt(vt),b=-st*vt+z,ut(x,st*vt+z),ut(x,b)}else{if(x=(b-y)/(x-a),b=1/(vt*vt)+x*x/(st*st),rt=2*x*(y-x*a)/(st*st)-2*x*z/(st*st)-2*E/(vt*vt),vt=rt*rt-4*b*(2*x*a*z/(st*st)-2*y*z/(st*st)+z*z/(st*st)+E*E/(vt*vt)-1+(y-x*a)*(y-x*a)/(st*st)),0>vt)return at;vt=Math.sqrt(vt),st=(-rt+vt)/(2*b),ut(st,x*st-x*a+y),vt=(-rt-vt)/(2*b),ut(vt,x*vt-x*a+y)}return at},Ff:function(a,y,x,b,E,z,tt,rt,at){var st=1e21,ut=a,ft=y;if(Ee.Ve(a,y,a,b,E,z,tt,rt,at)){var vt=(at.x-E)*(at.x-E)+(at.y-z)*(at.y-z);vtst},us:function(a,y,x){return Ee.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,b,E,z,tt,rt){var at=a+x,st=y+b;return E===tt?(z=y):z===rt?(E=a):!!(ps(a,y,x,b,E,z)||ps(a,y,x,b,tt,rt)||Ee.Rl(a,y,at,y,E,z,tt,rt)||Ee.Rl(at,y,at,st,E,z,tt,rt)||Ee.Rl(at,st,a,st,E,z,tt,rt)||Ee.Rl(a,st,a,y,E,z,tt,rt))},Rl:function(a,y,x,b,E,z,tt,rt){return a===x&&y===b&&E===tt&&z===rt?a===E&&y===z:0>=Ee.Fl(a,y,x,b,E,z)*Ee.Fl(a,y,x,b,tt,rt)&&0>=Ee.Fl(E,z,tt,rt,a,y)*Ee.Fl(E,z,tt,rt,x,b)},Fl:function(a,y,x,b,E,z){return x-=a,b-=y,a=E-a,y=z-y,z=a*b-y*x,z===0&&(z=a*x+y*b,0z&&(z=0))),z},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,b,E,z){var tt=Math.PI;z||(b*=tt/180,E*=tt/180);var rt=b>E?-1:1;z=[];var at=tt/2,st=b;if(b=Math.min(2*tt,Math.abs(E-b)),1e-5>b)return at=st+rt*Math.min(b,at),rt=a+x*Math.cos(st),st=y+x*Math.sin(st),a+=x*Math.cos(at),y+=x*Math.sin(at),x=(rt+a)/2,at=(st+y)/2,z.push([rt,st,x,at,x,at,a,y]),z;for(;1e-5x,z=0>b;if(ast&&(y=.5*(rt+at),!(y===rt||y===at));++st){var ut=a/(y+E),ft=tt/(y+z);if(ut=ut*ut+ft*ft-1,0ut)at=y;else break}x=E*x/(y+E)-x,b=z*b/(y+z)-b,x=Math.sqrt(x*x+b*b)}else x=Math.abs(b-y);else b=a*a-y*y,z=a*x,za?"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 Vn.u:var y=new en(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 Vn.F:if(y=new en(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 Vn.o:y="",x=this.figures.s;for(var b=x.length,E=0;E=he-1?!0:st[Nt+1].match(Ce)!==null}function b(){return Nt++,st[Nt]}function E(cr){var ir=parseFloat(b()),Lo=parseFloat(b());Qt===Qt.toLowerCase()&&(ir=ie.x+ir,Lo=ie.y+Lo),cr.h(ir,Lo)}function z(){return E(ie),ie}function tt(){return E(ee),ee}function rt(){var cr=Gt.toLowerCase();return cr!=="c"&&cr!=="s"&&cr!=="q"&&cr!=="t"?ie:new Zt(2*ie.x-ee.x,2*ie.y-ee.y)}y===void 0&&(y=!1);var at=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(at,"$1 $2"),a=a.replace(at,"$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 st=a.split(" ");for(a=0;a=he-1);)if(Gt=Qt,Qt=b(),Qt!=="")switch(Qt.toUpperCase()){case"X":Ct=!0,ft=ut=!1;break;case"M":for(Et=z(),a.mc===null||Ct===!0?(Zg(a,Et.x,Et.y,ut,!ft,vt),Ct=!1):a.moveTo(Et.x,Et.y),at.assign(ie);!x();)Et=z(),a.lineTo(Et.x,Et.y);break;case"L":for(;!x();)Et=z(),a.lineTo(Et.x,Et.y);break;case"H":for(;!x();)ie=new Zt((Qt===Qt.toLowerCase()?ie.x:0)+parseFloat(b()),ie.y),a.lineTo(ie.x,ie.y);break;case"V":for(;!x();)ie=new Zt(ie.x,(Qt===Qt.toLowerCase()?ie.y:0)+parseFloat(b())),a.lineTo(ie.x,ie.y);break;case"C":for(;!x();){Et=new Zt,E(Et);var We=tt(),ii=z();Vd(a,Et.x,Et.y,We.x,We.y,ii.x,ii.y)}break;case"S":for(;!x();)Et=rt(),We=tt(),ii=z(),Vd(a,Et.x,Et.y,We.x,We.y,ii.x,ii.y);break;case"Q":for(;!x();)Et=tt(),We=z(),Gm(a,Et.x,Et.y,We.x,We.y);break;case"T":for(;!x();)ee=Et=rt(),We=z(),Gm(a,Et.x,Et.y,We.x,We.y);break;case"B":for(;!x();){Et=parseFloat(b()),We=parseFloat(b()),ii=parseFloat(b());var bi=parseFloat(b()),mi=parseFloat(b()),Wn=mi,xn=!1;x()||(Wn=parseFloat(b()),x()||(xn=parseFloat(b())!==0)),Qt===Qt.toLowerCase()&&(ii+=ie.x,bi+=ie.y),a.arcTo(Et,We,ii,bi,mi,Wn,xn)}break;case"A":for(;!x();)Et=Math.abs(parseFloat(b())),We=Math.abs(parseFloat(b())),ii=parseFloat(b()),mi=bi=!1,xn=Wn=0,Wn=b(),Wn.length===1?(bi=!!parseFloat(Wn),mi=!!parseFloat(b()),Wn=parseFloat(b())):Wn.length===2?(bi=!!parseFloat(Wn[0]),mi=!!parseFloat(Wn[1]),Wn=parseFloat(b())):(bi=!!parseFloat(Wn[0]),mi=!!parseFloat(Wn[1]),Wn=parseFloat(Wn.slice(2))),xn=parseFloat(b()),Qt===Qt.toLowerCase()&&(Wn=ie.x+Wn,xn=ie.y+xn),ie.h(Wn,xn),wx(a,Et,We,ii,bi,mi,Wn,xn);break;case"Z":Px(a),ie.assign(at);break;case"F":for(Et="",We=1;st[Nt+We];)if(st[Nt+We]==="0")vt=!0,We++;else if(st[Nt+We].match(/[Uu]/)!==null)We++;else if(st[Nt+We].match(Ce)===null)We++;else{Et=st[Nt+We];break}Et.match(/[Mm]/)?ut=!0:0tt&&(tt+=360),Et.startAngle+=tt),0>a&&(Et.startAngle=180-Et.startAngle,Et.sweepAngle=-Et.sweepAngle),0>b&&(Et.startAngle=-Et.startAngle,Et.sweepAngle=-Et.sweepAngle),Et.radiusX*=Math.sqrt(a*a+x*x),Et.radiusY!==void 0&&(Et.radiusY*=Math.sqrt(y*y+b*b));break;case Cu:if(tt=Et.endX,rt=Et.endY,Et.endX=tt*a+rt*x+E,Et.endY=tt*y+rt*b+z,Et.radiusX===0||Et.radiusY===0)break;y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),Et.xAxisRotation+=tt),0>a&&(Et.xAxisRotation=180-Et.xAxisRotation,Et.isClockwiseArc=!Et.isClockwiseArc),0>b&&(Et.xAxisRotation=-Et.xAxisRotation,Et.isClockwiseArc=!Et.isClockwiseArc),Et.radiusX*=Math.sqrt(a*a+x*x),Et.radiusY*=Math.sqrt(y*y+b*b);break;default:Oe("Unknown Segment type: "+Et.type)}}}}return this._isInvalidBounds=!0,this},bt.ca=function(a,y){y===void 0&&(y=0);var x=this.od,b=this.pd,E=this.Dc,z=this.Ec;switch(this.type){case Vn.j:return Ee.Yb(x,b,E,z,y,a.x,a.y);case Vn.u:var tt=en.allocAt(Math.min(x,E)-y,Math.min(b,z)-y,Math.abs(E-x)+2*y,Math.abs(z-b)+2*y);return a=tt.ca(a),en.free(tt),a;case Vn.F:tt=Math.min(x,E)-y;var rt=Math.min(b,z)-y;return x=(Math.abs(E-x)+2*y)/2,y=(Math.abs(z-b)+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 Vn.o:return Vh(this,a,y,!0,!1);default:return!1}};function Vh(a,y,x,b,E){var z=y.x;y=y.y;for(var tt=a.bounds.x-20,rt=0,at,st,ut,ft,vt=a.figures.s,Ct=vt.length,Et=0;Et=a)return 0;if((E>tt?E-tt:tt-E)<(z>rt?z-rt:rt-z)){if(zrt)return 0}else if(yz)return 0}else if(Ett)return 0}else if(stE)return 0;return 0a?a=0:1=z)return b=z-tt,b=ut===0?0:b/ut,x=x[rt],rt=x[2*a],E=x[2*a+1],y.h(rt+(x[2*a+2]-rt)*b,E+(x[2*a+3]-E)*b),y;tt+=ut}}return y},bt.wx=function(a){if(0>a?a=0:1=E)return E=y[tt],y=E[2*a],x=E[2*a+1],b=E[2*a+2],a=E[2*a+3],1>Math.abs(b-y)&&1>Math.abs(a-x)?0:1>Math.abs(b-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=b-y?0:180:180*Math.atan2(a-x,b-y)/Math.PI;z+=st}}return NaN},bt.Qu=function(a,y){if(0>a?a=0:1=z)return b=z-tt,b=ut===0?0:b/ut,ut=x[rt],x=ut[2*a],rt=ut[2*a+1],E=ut[2*a+2],a=ut[2*a+3],y[0]=x+(E-x)*b,y[1]=rt+(a-rt)*b,y[2]=1>Math.abs(E-x)&&1>Math.abs(a-rt)?0:1>Math.abs(E-x)?0<=a-rt?90:270:1>Math.abs(a-rt)?0<=E-x?0:180:180*Math.atan2(a-rt,E-x)/Math.PI,y;tt+=ut}}return y},bt.xx=function(a){if(this.type===Vn.j){var y=this.startX,x=this.startY,b=this.endX,E=this.endY;if(y!==b||x!==E){var z=a.x;if(a=a.y,y===b){if(x=b?b===x?0:1:Math.abs(a-x)/(b-tt)}if(x===E)return y=b?b===y?0:1:Math.abs(z-y)/(b-tt);tt=(b-y)*(b-y)+(E-x)*(E-x);var rt=Zt.alloc();return Ee.qh(y,x,b,E,z,a,rt),a=rt.x,z=rt.y,Zt.free(rt),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/tt)}}else if(this.type===Vn.u){tt=this.startX,rt=this.startY;var at=this.endX;if(E=this.endY,tt!==at||rt!==E){y=at-tt,x=E-rt,z=2*y+2*x,b=a.x,a=a.y,b=Math.min(Math.max(b,tt),at),a=Math.min(Math.max(a,rt),E),tt=Math.abs(b-tt),at=Math.abs(b-at),rt=Math.abs(a-rt),E=Math.abs(a-E);var st=Math.min(tt,at,rt,E);if(st===rt)return b/z;if(st===at)return(y+a)/z;if(st===E)return(2*y+x-b)/z;if(st===tt)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,b=Zt.alloc(),E=1/0,rt=tt=0,at=y.length;for(var ut=st=0,ft=0;fta?0:1a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a),x=this.segments.s,b=x.length,E=0;Ea&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(b,0),this.Pg=Math.max(E,0),typeof tt=="boolean"?tt&&(this.isLargeArc=!0):typeof tt=="number"&&tt&&(this.isLargeArc=!0),rt&&(this.isClockwiseArc=!0)):(this.Ne=b,this.Vh=E,a===Ss&&(z=Math.max(z,0)),this.Wh=z,typeof tt=="number"?(a===Ss&&(tt=Math.max(tt,0)),this.Pg=tt):this.Pg=0),this.ae=null}ho.prototype.copy=function(){var a=new ho;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=ho.prototype,bt.Xa=function(a){if(!(a instanceof ho)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Ps:case da:return Ee.B(this.endX,a.endX)&&Ee.B(this.endY,a.endY);case tl:return Ee.B(this.endX,a.endX)&&Ee.B(this.endY,a.endY)&&Ee.B(this.point1X,a.point1X)&&Ee.B(this.point1Y,a.point1Y)&&Ee.B(this.point2X,a.point2X)&&Ee.B(this.point2Y,a.point2Y);case lu:return Ee.B(this.endX,a.endX)&&Ee.B(this.endY,a.endY)&&Ee.B(this.point1X,a.point1X)&&Ee.B(this.point1Y,a.point1Y);case Ss:return Ee.B(this.startAngle,a.startAngle)&&Ee.B(this.sweepAngle,a.sweepAngle)&&Ee.B(this.centerX,a.centerX)&&Ee.B(this.centerY,a.centerY)&&Ee.B(this.radiusX,a.radiusX)&&Ee.B(this.radiusY,a.radiusY);case Cu:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&Ee.B(this.xAxisRotation,a.xAxisRotation)&&Ee.B(this.endX,a.endX)&&Ee.B(this.endY,a.endY)&&Ee.B(this.radiusX,a.radiusX)&&Ee.B(this.radiusY,a.radiusY);default:return!1}},bt.qb=function(a){a.classType===ho&&(this.type=a)},bt.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Ps:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case da:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case tl: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 lu: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 Ss: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 Cu: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 Jl(a,y){if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;var x=a.radiusX,b=a.radiusY;if(b===void 0&&(b=x),x===0||b===0)return a.ae=[],a.ae;y=a.Ne;var E=a.Vh,z=Ee.jx(0,0,x=Ct?tt=Math.PI:1<=Ct&&(tt=0),!at&&0tt&&(tt+=2*Math.PI),at=y>z?1:y/z,Ct=y>z?z/y:1,y=Ee.jx(0,0,y>z?y:z,ut,ut+tt,!0),z=br.alloc(),z.reset(),z.translate(x,b),z.rotate(a.Ne,0,0),z.scale(at,Ct),Vn.Ha(y,z),br.free(z),a.ae=y,a.ae}Ae.Object.defineProperties(ho.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&&ni(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&ni(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&ni(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&ni(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&ni(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&ni(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&ni(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&ni(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&ni(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Pi(a,">= zero",ho,"radiusX"),this._isFrozen&&ni(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Pi(a,">= zero",ho,"radiusY"),this._isFrozen&&ni(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&ni(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&&ni(this,a),360a&&(a=-360),this.Ec=a,this._isInvalidBounds=!0}},isClockwiseArc:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&ni(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&&ni(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&&ni(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),ho.prototype.equalsApprox=ho.prototype.Xa;var Ps=new Ke(ho,"Move",0),da=new Ke(ho,"Line",1),tl=new Ke(ho,"Bezier",2),lu=new Ke(ho,"QuadraticBezier",3),Ss=new Ke(ho,"Arc",4),Cu=new Ke(ho,"SvgArc",4);ho.className="PathSegment",ho.Move=Ps,ho.Line=da,ho.Bezier=tl,ho.QuadraticBezier=lu,ho.Arc=Ss,ho.SvgArc=Cu;function gl(){this.H=null,this.xu=new Zt(0,0).freeze(),this.mt=new Zt(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}gl.prototype.copy=function(){var a=new gl;return this.clone(a)},gl.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},gl.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},gl.prototype.So=function(a,y){var x=this.diagram;return x===null||bo(x,a,y),y},gl.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(bo(x,a,y),y.assign(x.Ps(y))),y},Ae.Object.defineProperties(gl.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}}}),gl.prototype.getMultiTouchDocumentPoint=gl.prototype.Bz,gl.prototype.getMultiTouchViewPoint=gl.prototype.So,gl.className="InputEvent";function ih(){this.H=null,this.xa="",this.ar=this.Lr=null}ih.prototype.copy=function(){var a=new ih;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},ih.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},Ae.Object.defineProperties(ih.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}}}),ih.className="DiagramEvent";function Va(){this.Fm=Na,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Va.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Va.prototype.copy=function(){var a=new Va;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=qe(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=qe(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=qe(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=qe(y)&&typeof y.J=="function"?y.J():y,a},Va.prototype.qb=function(a){a.classType===Va&&(this.change=a)},Va.prototype.toString=function(){var a="";return a=this.change===Ql?a+"* ":this.change===Na?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===Ql?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=Mr(this.object)),this.oldValue!==null&&(a+=" old: "+Mr(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+Mr(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},Va.prototype.I=function(a){return a?this.oldValue:this.newValue},Va.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Va.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Va.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Va.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Va.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},Ae.Object.defineProperties(Va.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===Ql&&(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}}}),Va.prototype.redo=Va.prototype.redo,Va.prototype.canRedo=Va.prototype.canRedo,Va.prototype.undo=Va.prototype.undo,Va.prototype.canUndo=Va.prototype.canUndo,Va.prototype.getParam=Va.prototype.Dz,Va.prototype.getValue=Va.prototype.I,Va.prototype.clear=Va.prototype.clear;var Ql=new Ke(Va,"Transaction",-1),Na=new Ke(Va,"Property",0),Ha=new Ke(Va,"Insert",1),us=new Ke(Va,"Remove",2);Va.className="ChangedEvent",Va.Transaction=Ql,Va.Property=Na,Va.Insert=Ha,Va.Remove=us;function Hs(){this.o=new Ln().freeze(),this.xa="",this.j=!1}Hs.prototype.toString=function(a){var y="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(a!==void 0&&0y&&a.cd(y,b),y++);for(;a.length>y;)a.pop();a.freeze()}},Ae.Object.defineProperties(Hs.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}}}),Hs.prototype.optimize=Hs.prototype.ak,Hs.prototype.redo=Hs.prototype.redo,Hs.prototype.canRedo=Hs.prototype.canRedo,Hs.prototype.undo=Hs.prototype.undo,Hs.prototype.canUndo=Hs.prototype.canUndo,Hs.prototype.clear=Hs.prototype.clear,Hs.className="Transaction";function Ka(){this.Pt=new Pn,this.Jd=!1,this.u=new Ln().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new Ln().freeze(),this.hl=new Ln,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}Ka.prototype.toString=function(a){var y="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;y+="[";for(var x=this.nestedTransactionNames.count,b=0;ba.transactionLevel&&Li("Ending transaction without having started a transaction: "+x);var b=a.transactionLevel===1,E=a.currentTransaction;b&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,E));var z=0;if(0=b&&(z=y.M(0),z!==null&&z.clear(),y.mb(0),a.Ce--)),b===0||y.count!==0&&y.get(y.count-1)===E||(y.add(E),a.Ce++),y.freeze()),a.isInternalTransaction||a.Ob("CommittedTransaction",x,E);else{a.Fe=!0;try{a.isEnabled&&E!==null&&(E.isComplete=!0,E.undo())}finally{a.isInternalTransaction||a.Ob("RolledBackTransaction",x,E),a.Fe=!1}E!==null&&E.clear()}return a.Np=null,a.isPendingClear&&a.clear(),a.isPendingClear=!1,a.isPendingUnmodified=!1,!0}if(a.isEnabled&&!y&&E!==null){for(a=z,x=E.changes,E=x.count-1;E>=a;E--)y=x.M(E),y!==null&&y.undo(),x.ka(),x.mb(E);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()}},Ka.prototype.canUndo=function(){if(!this.isEnabled||0=this.transactionLevel&&!this.tt&&(a=a.diagram,a!==null&&a.pi===!1||Li("Change not within a transaction: "+x.toString()))}},Ka.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},Ae.Object.defineProperties(Ka.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.historyIndexE||Math.abs(y.y-a.y)>b},Ae.Object.defineProperties(io.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof we&&(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}}}),io.prototype.startTransaction=io.prototype.Ea,io.className="Tool";function Fa(){io.call(this),this.name="ToolManager",this.hb=new Ln,this.ob=new Ln,this.Hb=new Ln,this.F=this.V=850,this.o=new hn(2,2).ja(),this.Ha=5e3,this.ia=Ac,this.u=rh,this.Mp=this.j=null,this.zj=-1}ae(Fa,io),Fa.prototype.initializeStandardTools=function(){},Fa.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof mo&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Fa.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===Uh&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===oh){y.bubbles=!0;return}if(this.gestureBehavior===Uh)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var x=this.mouseDownTools.length,b=0;bE.right&&(x.x-=b.width+5/y.scale),x.xE.bottom?x.y-(b.height+5/y.scale):x.y+20/y.scale,x.yx.pointsCount)){var b=a.diagram;if(!b.isReadOnly){var E=a.Oe;if(E!==null){var z=null,tt=null;x.fromNode===null&&(z=ri(a,x.i(0),!1),z!==null&&(tt=z.part));var rt=null,at=null;x.toNode===null&&(rt=ri(a,x.i(x.pointsCount-1),!0),rt!==null&&(at=rt.part)),E.isValidLink(tt,z,at,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=at,rt!==null&&(x.toPortId=rt.portId),x.fromPort!==b.Mx&&b.R("LinkRelinked",x,b.Mx),x.toPort!==b.Nx&&b.R("LinkRelinked",x,b.Nx)):wo(E,tt,z,at,rt):wo(E,null,null,null,null)}}}}Ya.prototype.doDragOver=function(){};function di(a,y){var x=a.diagram;a.dragsLink&&xi(a,!0),ye(a);var b=a.findDragOverObject(y),E=x.lastInput;if(E.targetObject=b,b!==null){E.handled=!1;for(var z=b;z!==null;){var tt=z.mouseDrop;if(tt!==null&&(tt(E,z),E.handled))break;ji(a,E,z),z=Ai(z)}}else z=x.mouseDrop,z!==null&&z(E);if(a.isActive||Yi!==null){for(E=(a.copiedParts||a.draggedParts).iterator;E.next();)z=E.key,z instanceof ui&&z.linksConnected.each(function(rt){rt.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||Yi!==null){for(a=en.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof ui&&_i(x,b,a);en.free(a)}}}function ji(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof dr||(x=a.mouseDrop,x!==null&&x(y))}function _i(a,y,x){var b=!1;if(x=y.getAvoidableRect(x),a.viewportBounds.Re(x)&&(b=!0),a=a.Nu(x,function(E){return E.part},function(E){return E instanceof Gn},!0,function(E){return E instanceof Gn},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}Ya.prototype.doDropOnto=function(){},Ya.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()?(Me(this,!1),Fo(a,this.copiedParts),yn(this,this.copiedParts,!1),Kr(a,this.copiedParts)):this.mayMove()?(Qe(this),yn(this,this.draggedParts,!0)):this.mayDragOut()?(Me(this,!1),yn(this,this.copiedParts,!1)):Qe(this),li(this,a.lastInput.documentPoint))}},Ya.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?(Qe(this),Me(this,!0),Fo(a,this.copiedParts),yn(this,this.copiedParts,!1),Kr(a,this.copiedParts),this.copiedParts!==null&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0}))):(y=!0,Qe(this),this.mayMove()&&(yn(this,this.draggedParts,!0),li(this,a.lastInput.documentPoint))),this.Ym=!0,di(this,a.lastInput.documentPoint),this.isActive){var b=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&Pr(this),a.Ya(),Kr(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",b)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},Ya.prototype.simulatedMouseMove=function(a,y,x){if(Yi===null)return!1;var b=Yi.diagram;x instanceof we||(x=null);var E=mr;return x!==E&&(E!==null&&E!==b&&(E.ug(),Yi.isDragOutStarted=!1,E=E.toolManager.findTool("Dragging"),E!==null&&E.doSimulatedDragLeave()),mr=x,x!==null&&x!==b&&(be(),E=x.toolManager.findTool("Dragging"),E!==null&&(yh.contains(E)||yh.add(E),E.doSimulatedDragEnter())),this.doUpdateCursor(null)),x===null||x===b||!x.allowDrop||x.isReadOnly||!x.allowInsert?!1:(b=x.toolManager.findTool("Dragging"),b!==null&&(a!==null&&(a.targetTouches!==void 0&&(0tt&&(tt=st),ut>rt&&(rt=ut))}}for(b===1/0?z.h(0,0,0,0):z.h(b,E,tt-b,rt-E),b=z.x+z.width/2,E=z.y+z.height/2,en.free(z),z=a.Fr,tt=new si,rt=Zt.alloc(),at=y.iterator;at.next();)st=at.value,st instanceof Gn&&st.canCopy()&&(ut=x.I(st),ut!==null&&(ut.points=st.points,Xd(ut,z.x-b,z.y-E),ut.suspendsRouting=!0,tt.add(ut,a.Pd())));for(y=y.iterator;y.next();)st=y.value,st.Zc()&&st.canCopy()&&(at=x.I(st),at!==null&&(st=st.location,rt.h(z.x-(b-st.x),z.y-(E-st.y)),at.location=rt,at.Va(),tt.add(at,a.Pd(rt))));Zt.free(rt),a.copiedParts=tt,Vt(a,tt.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Xd(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}Ya.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},Ya.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new Zt},Ae.Object.defineProperties(Ya.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}}}),Ya.prototype.getDraggingSource=Ya.prototype.Az;var Yi=null,mr=null;Ya.className="DraggingTool",yh=new Ln,Yn("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Fa.prototype.doCancel=function(){Yi!==null&&Yi.doCancel(),io.prototype.doCancel.call(this)};function nr(){io.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Gn,y=new Sr;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new Sr,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new ui,y=new Sr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=oo,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new ui,y=new Sr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=oo,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 si,this.Of=this.gj=this.Pf=null}ae(nr,io),nr.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},nr.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var z=y.Df(),tt=hn.alloc();tt.width=y.naturalBounds.width*z,tt.height=y.naturalBounds.height*z,b.desiredSize=tt,hn.free(tt),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=no,z=Zt.alloc(),x.location=y.ga(no,z),Zt.free(z),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},nr.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=oo,y.fromSpot=ds,y.toSpot=ds),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},nr.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},nr.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof ui){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)}},nr.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof ui))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof ui)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},nr.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,b=this.portGravity;0>=b&&(b=.1);var E=this,z=y.og(x,b,function(ft){return E.findValidLinkablePort(ft,a)},null,!0);for(b=1/0,y=null,z=z.iterator;z.next();){var tt=z.value,rt=tt.part;if(rt instanceof ui){var at=tt.ga(no,Zt.alloc()),st=x.x-at.x,ut=x.y-at.y;Zt.free(at),at=st*st+ut*ut,atx){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},nr.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},nr.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},nr.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof ui))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof ui))return!1;for(y=y.portId,y===null&&(y=""),y=b.Sd(y);y.next();)if(b=y.value,b.fromNode===x&&b.fromPortId===a)return!0;return!1},nr.prototype.isValidLink=function(a,y,x,b){if(!this.isValidFrom(a,y)||!this.isValidTo(x,b)||!(y===null||b===null||(y.fromLinkableSelfNode&&b.toLinkableSelfNode||!this.isInSameNode(y,b))&&(y.fromLinkableDuplicates&&b.toLinkableDuplicates||!this.isLinked(y,b)))||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 E=a.linkValidation;if(E!==null&&!E(a,y,x,b,this.originalLink))return!1}return x!==null&&(E=x.linkValidation,E!==null&&!E(a,y,x,b,this.originalLink))?!1:(E=this.linkValidation,E!==null?E(a,y,x,b,this.originalLink):!0)},nr.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 b=new Pn;return b.add(a),jr(this,x,y,b)};function jr(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),jr(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),jr(a,y.labeledLink,x,b))))}nr.prototype.isValidCycle=function(a,y,x){if(x===void 0&&(x=null),a===null||y===null)return this.isUnconnectedLinkValid;var b=this.diagram.validCycle;if(b!==Bc){if(b===yd){if(b=x||this.temporaryLink,b!==null&&!b.isTreeLink)return!0;for(b=y.linksConnected;b.next();){var E=b.value;if(E!==x&&E.isTreeLink&&E.toNode===y)return!1}return!Po(this,a,y,x,!0)}if(b===jd){if(b=x||this.temporaryLink,b!==null&&!b.isTreeLink)return!0;for(b=a.linksConnected;b.next();)if(E=b.value,E!==x&&E.isTreeLink&&E.fromNode===a)return!1;return!Po(this,a,y,x,!0)}if(b===Jh)return a===y?a=!0:(b=new Pn,b.add(y),a=Or(this,b,a,y,x)),!a;if(b===Xc)return!Po(this,a,y,x,!1);if(b===Yc)return a===y?a=!0:(b=new Pn,b.add(y),a=ra(this,b,a,y,x)),!a}return!0};function Po(a,y,x,b,E){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!==b&&(!E||tt.isTreeLink)&&tt.toNode===y&&(tt=tt.fromNode,tt!==y&&Po(a,tt,x,b,E)))return!0}return!1}function Or(a,y,x,b,E){if(x===b)return!0;if(x===null||b===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var tt=z.value;if(tt!==E&&tt.toNode===x&&(tt=tt.fromNode,tt!==x&&Or(a,y,tt,b,E)))return!0}return!1}function ra(a,y,x,b,E){if(x===b)return!0;if(x===null||b===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var tt=z.value;if(tt!==E){var rt=tt.fromNode;if(tt=tt.toNode,rt=rt===x?tt:rt,rt!==x&&ra(a,y,rt,b,E))return!0}}return!1}Ae.Object.defineProperties(nr.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}}}),nr.className="LinkingBaseTool";function vo(){nr.call(this),this.name="Linking",this.V={},this.F=null,this.K=va,this.Xd=null}ae(vo,nr),vo.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},vo.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 ui)))return null;var x=this.direction;if(x===va||x===$a){var b=this.findValidLinkablePort(y,!1);if(b!==null||this.startObject===a&&(b=a.port,this.findValidLinkablePort(b,!1)))return this.isForwards=!0,b}return(x===va||x===wa)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},vo.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 ui&&(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 ui&&(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)},vo.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()},vo.prototype.doStop=function(){nr.prototype.doStop.call(this),this.startObject=null},vo.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,b=null,E=null,z=null;try{var tt=this.targetPort=this.findTargetPort(this.isForwards);if(tt!==null){var rt=tt.part;rt instanceof ui&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),b=rt,E=tt):(y=rt,x=tt,this.originalToNode!==null&&(b=this.originalToNode,E=this.originalToPort)))}else this.isForwards?this.originalFromNode!==null&&this.isUnconnectedLinkValid&&(y=this.originalFromNode,x=this.originalFromPort):this.originalToNode!==null&&this.isUnconnectedLinkValid&&(b=this.originalToNode,E=this.originalToPort);y!==null||b!==null?(z=this.insertLink(y,x,b,E),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,b,E)):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)}}},vo.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof Gn)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)},vo.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},vo.prototype.doNoLink=function(){},Ae.Object.defineProperties(vo.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 va=new Ke(vo,"Either",0),$a=new Ke(vo,"ForwardsOnly",0),wa=new Ke(vo,"BackwardsOnly",0);vo.className="LinkingTool",vo.Either=va,vo.ForwardsOnly=$a,vo.BackwardsOnly=wa;function yo(){nr.call(this),this.name="Relinking";var a=new Sr;a.figure="Diamond",a.desiredSize=$o,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Sr,a.figure="Diamond",a.desiredSize=$o,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new en}ae(yo,nr),yo.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Gn){var y="RelinkFrom",x=null;if(a.isSelected&&!this.diagram.isReadOnly){var b=a.selectionObject;b!==null&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&b.actualBounds.w()&&b.Ed()&&(x=a.Pj(y),x===null&&(x=this.makeAdornment(b,!1),a.bh(y,x)))}x===null&&a.Jf(y),y="RelinkTo",x=null,a.isSelected&&!this.diagram.isReadOnly&&(b=a.selectionObject,b!==null&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&b.actualBounds.w()&&b.Ed()&&(x=a.Pj(y),x===null?(x=this.makeAdornment(b,!0),a.bh(y,x)):x.v())),x===null&&a.Jf(y)}},yo.prototype.makeAdornment=function(a,y){var x=new mo;return x.type=Dn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},yo.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},yo.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 mo&&x.adornedPart instanceof Gn))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&&0y.firstPickIndex+1&&x=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 Dn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},Ko.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},Ko.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))},Ko.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},Ko.prototype.stopTransaction=function(){var a=this.diagram,y=io.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ko.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},Ko.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,Zt.alloc()),z=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,z),this.resize(y),a.bd(),Zt.free(E)}},Ko.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,Zt.alloc()),z=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,z),this.resize(y),Zt.free(E),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},Ko.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 dr){var b=new Ln;if(b.add(a),!this.dragsMembers&&a.placeholder===null){var E=new ot;E.dragsMembers=!1}y.moveParts(b,this.oppositePoint.copy().re(x),!0,E)}else a.location=a.location.copy().re(x).add(this.oppositePoint);y.bd()}},Ko.prototype.computeResize=function(a,y,x,b,E,z){y.Mc()&&(y=no);var tt=this.adornedObject.naturalBounds,rt=tt.x,at=tt.y,st=tt.x+tt.width,ut=tt.y+tt.height,ft=1;if(!z){ft=tt.width;var vt=tt.height;0>=ft&&(ft=1),0>=vt&&(vt=1),ft=vt/ft}return vt=Zt.alloc(),Ee.No(a.x,a.y,rt,at,E.width,E.height,vt),a=tt.copy(),0>=y.x?0>=y.y?(a.x=Math.max(vt.x,st-b.width),a.x=Math.min(a.x,st-x.width),a.width=Math.max(st-a.x,x.width),a.y=Math.max(vt.y,ut-b.height),a.y=Math.min(a.y,ut-x.height),a.height=Math.max(ut-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,b.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,b.width),x.width),a.height=ft*a.width),a.x=st-a.width,a.y=ut-a.height)):1<=y.y?(a.x=Math.max(vt.x,st-b.width),a.x=Math.min(a.x,st-x.width),a.width=Math.max(st-a.x,x.width),a.height=Math.max(Math.min(vt.y-at,b.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,b.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,b.width),x.width),a.height=ft*a.width),a.x=st-a.width)):(a.x=Math.max(vt.x,st-b.width),a.x=Math.min(a.x,st-x.width),a.width=st-a.x,z||(a.height=Math.max(Math.min(ft*a.width,b.height),x.height),a.width=a.height/ft,a.y=at+.5*(ut-at-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(vt.x-rt,b.width),x.width),a.y=Math.max(vt.y,ut-b.height),a.y=Math.min(a.y,ut-x.height),a.height=Math.max(ut-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,b.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,b.width),x.width),a.height=ft*a.width),a.y=ut-a.height)):1<=y.y?(a.width=Math.max(Math.min(vt.x-rt,b.width),x.width),a.height=Math.max(Math.min(vt.y-at,b.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,b.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,b.width),x.width),a.height=ft*a.width))):(a.width=Math.max(Math.min(vt.x-rt,b.width),x.width),z||(a.height=Math.max(Math.min(ft*a.width,b.height),x.height),a.width=a.height/ft,a.y=at+.5*(ut-at-a.height))):0>=y.y?(a.y=Math.max(vt.y,ut-b.height),a.y=Math.min(a.y,ut-x.height),a.height=ut-a.y,z||(a.width=Math.max(Math.min(a.height/ft,b.width),x.width),a.height=ft*a.width,a.x=rt+.5*(st-rt-a.width))):1<=y.y&&(a.height=Math.max(Math.min(vt.y-at,b.height),x.height),z||(a.width=Math.max(Math.min(a.height/ft,b.width),x.width),a.height=ft*a.width,a.x=rt+.5*(st-rt-a.width))),Zt.free(vt),a},Ko.prototype.computeReshape=function(){var a=gn;return this.adornedObject instanceof Sr&&(a=b0(this.adornedObject)),!(a===fi||this.diagram.lastInput.shift)},Ko.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},Ko.prototype.computeMaxSize=function(){var a=this.adornedObject.maxSize.copy(),y=this.maxSize;return!isNaN(y.width)&&y.widthx?x+=360:360<=x&&(x-=360),x=Math.round(45*Math.round(x/45));var b=this.handleDistance;return x===0?y.x=a.naturalBounds.width+b:x===45?(y.x=a.naturalBounds.width+b,y.y=a.naturalBounds.height+b):x===90?y.y=a.naturalBounds.height+b:x===135?(y.x=-b,y.y=a.naturalBounds.height+b):x===180?y.x=-b:x===225?(y.x=-b,y.y=-b):x===270?y.y=-b:x===315&&(y.x=a.naturalBounds.width+b,y.y=-b),a.ga(y)},ts.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new Zt(NaN,NaN),this.isActive=a.isMouseCaptured=!1},ts.prototype.stopTransaction=function(){var a=this.diagram,y=io.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},ts.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},ts.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},ts.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()},ts.prototype.rotate=function(a){var y=this.adornedObject;if(y!==null){y.angle=a,y=y.part,y.Va();var x=y.locationObject,b=y.rotateObject;(x===b||x.rg(b))&&(x=this.Tn.copy(),y.location=x.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint)),this.diagram.bd()}},ts.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&&0y-x&&(a=(Math.floor(a/y)+1)*y)),360<=a?a-=360:0>a&&(a+=360),a},Ae.Object.defineProperties(ts.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 mo))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 mo)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}}}),ts.className="RotatingTool",Yn("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function hs(){io.call(this),this.name="ClickSelecting"}ae(hs,io),hs.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},hs.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},hs.className="ClickSelectingTool";function ws(){io.call(this),this.name="Action",this.pk=null}ae(ws,io),ws.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,y=a.lastInput,x=a.ic(y.documentPoint,function(b){for(;b.panel!==null&&!b.isActionable;)b=b.panel;return b});return x!==null&&x.isActionable?(this.pk=x,a.Ck=a.ic(y.documentPoint,null,null),!0):!1},ws.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()},ws.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))}},ws.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()},ws.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())},ws.prototype.doStop=function(){this.pk=null},ws.className="ActionTool";function pl(){io.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Zt(0,0)}ae(pl,io),pl.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)},pl.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},pl.prototype.insertPart=function(a){var y=this.diagram,x=this.archetypeNodeData;if(x===null)return null;var b=null;try{if(y.R("ChangingSelection",y.selection),this.Ea(this.name),x instanceof Wi)x.Zc()&&(Ih(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);qe(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var z=Zt.allocAt(a.x,a.y);this.isGridSnapEnabled&&tu(this.diagram,b,a,z),b.location=z,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),Zt.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",b)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return b},Ae.Object.defineProperties(pl.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}}}),pl.className="ClickCreatingTool";function Ws(){io.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Wi;a.layerName="Tool",a.selectable=!1;var y=new Sr;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}ae(Ws,io),Ws.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.timestampE.right&&(x.x-=b.width+5/y.scale),x.xE.bottom&&(x.y-=b.height+5/y.scale),x.ya.lastInput.clickCount)):!1},Co.prototype.doStart=function(){Sh=this,this.textBlock!==null&&this.doActivate()},Co.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 Ca&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=ah;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new en(this.textBlock.ga(Ns),this.textBlock.ga(Za));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},Co.prototype.doCancel=function(){this.stopTool()},Co.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},Co.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Tl)},Co.prototype.acceptText=function(a){switch(a){case Tl:this.qa===Dl?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===ah||this.qa===lc||this.qa===Xh)&&(this.qa=Vc,ns(this));break;case Ml:case Du:case el:(Du!==a||this.textBlock.isMultiline!==!0)&&(this.qa===ah||this.qa===lc||this.qa===Xh)&&(this.qa=Vc,ns(this))}};function ns(a){var y=a.textBlock,x=a.diagram,b=a.currentTextEditor;if(y!==null&&b!==null){var E=y.text,z="";b.valueFunction!==null&&(z=b.valueFunction()),a.isValidText(y,E,z)?(a.Ea(a.name),a.qa=Dl,a.transactionResult=a.name,y.text=z,a.doSuccess(E,z),x!==null&&x.R("TextEdited",y,E),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=lc,a.doError(E,z))}}Co.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)},Co.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},Co.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Bu,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},Co.prototype.doStop=function(){Sh=null},Co.prototype.isValidText=function(a,y,x){var b=this.textValidation;return b!==null&&!b(a,y,x)?!1:(b=a.textValidation,!!(b===null||b(a,y,x)))},Co.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Ae.Object.defineProperties(Co.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)}}}),Co.prototype.measureTemporaryTextBlock=Co.prototype.Lx;var Ml=new Ke(Co,"LostFocus",0),Tl=new Ke(Co,"MouseDown",1),el=new Ke(Co,"Tab",2),Du=new Ke(Co,"Enter",3),Wl=new Ke(Co,"SingleClick",0),Vu=new Ke(Co,"SingleClickSelected",1),zs=new Ke(Co,"DoubleClick",2),Bu=new Ke(Co,"StateNone",0),ah=new Ke(Co,"StateActive",1),Xh=new Ke(Co,"StateEditing",2),Vc=new Ke(Co,"StateValidating",3),lc=new Ke(Co,"StateInvalid",4),Dl=new Ke(Co,"StateValidated",5),Sh=null;Co.className="TextEditingTool",Co.LostFocus=Ml,Co.MouseDown=Tl,Co.Tab=el,Co.Enter=Du,Co.SingleClick=Wl,Co.SingleClickSelected=Vu,Co.DoubleClick=zs,Co.StateNone=Bu,Co.StateActive=ah,Co.StateEditing=Xh,Co.StateValidating=Vc,Co.StateInvalid=lc,Co.StateValidated=Dl,Yn("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function Bl(a){Rt||(sh(),Rt=!0),this.H=wr,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=It,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new Pn,this.ce=new Re,this.ce.Yd=this,this.Ei=new Pn,this.pu=new Pn,this.Sr=new Pn,this.pr=new Pn,a&&Object.assign(this,a)}Bl.prototype.Xe=function(a){this.H=a},Bl.prototype.canStart=function(){return!0};function Ku(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),xo(a.H),a.zb=!0)}function Ou(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,b=a.Zd.contains("Model");b&&(a.Ok=!0,a.Pk===It?(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===me&&y.vc.clear(),a.Qw=!!(a.Pk===Kt&&x.du.D(x.pa)),x.R("InitialAnimationStarting",a)),b&&!a.Gh||y.vc.count===0?(a.Zd.clear(),a.zb=!1,y.vc.clear(),nn(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,b=y.vc.get(x),x.autoScale!==El&&b!==null&&(delete b.start.scale,delete b.end.scale),ke.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Dr(x),ta(x),a.zb=!1,y.start(),y.bc&&(Fh(a),x.Ya(),kn(y,0),aa(x,!0),Uu(a),x.R("AnimationStarting",a)))}))}}function xh(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function kc(a,y,x,b){a.isTicking||xh(a)||y instanceof Gn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}bt=Bl.prototype,bt.fv=function(a){return this.ce.fv(a)},bt.Xu=function(a){return this.ce.Xu(a)};function uc(a,y){function x(){if(0z?z+=360:at+=360),z=E(x,z,at-z,b)%360,tt=E(x,tt,st-tt,b),rt=E(x,rt,ut-rt,b),x=E(x,a,y-a,b),"hsla("+z+", "+tt+"%, "+rt+"%, "+x+")"}function sh(){function a(x,b,E,z,tt,rt){x.position=new Zt(z(tt,b.x,E.x-b.x,rt),z(tt,b.y,E.y-b.y,rt))}var y=new si;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,b,E,z,tt,rt){tta&&Pi(a,">= 1",Bl,"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}}}),Bl.prototype.stopAnimation=Bl.prototype.Cc;var yt=null,Rt=!1,It=new Ke(Bl,"Default",1),Kt=new Ke(Bl,"AnimateLocations",2),me=new Ke(Bl,"None",3);Bl.className="AnimationManager",Bl.defineAnimationEffect=function(a,y){Rt||(sh(),Rt=!0),yt.add(a,y)},Bl.Default=It,Bl.AnimateLocations=Kt,Bl.None=me;function Re(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=wi,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=Ao,this.vc=new si,this.Tt=new si,this.yl=new Pn,this.Ut=new Pn,this.dw=dc,a&&Object.assign(this,a)}Re.prototype.suspend=function(){this.Xk=!0},Re.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,Jn(this,!0),Fh(this.Yd),aa(this.H),Uu(this.Yd),this.H.redraw()};function nn(a,y){if(a.Tt.clear(),a.Wk=!1,a.au=0,a.Gd=NaN,0a.cn?a.Gd:b-a.Qd;y&&(E=a.gw,Ea.cn&&(a.ho&&!a.Wk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Wk=!0):a.Ml(!1))}}}function kn(a,y){for(var x=a.Gd,b=a.vc.iterator,E=a.Wk;b.next();){var z=b.key;if(!(z instanceof ge&&z.diagram===null)){var tt=b.value,rt=E?tt.end:tt.start;tt=E?tt.start:tt.end;var at=yt,st;for(st in tt)st==="position"&&(tt["position:placeholder"]||tt["position:nodeCollapse"])||at.get(st)===null||at.get(st)(z,rt[st],tt[st],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,Fh(x);for(var b=this.vc,E=this.yl.iterator;E.next();)y.remove(E.value);for(E=this.Ut.iterator;E.next();)E.value.v();E=this.ho,b=b.iterator;for(var z=yt;b.next();){var tt=b.key,rt=b.value,at=E?rt.end:rt.start,st=E?rt.start:rt.end,ut=rt.Ku,ft;for(ft in st)if(z.get(ft)!==null){var vt=ft;!rt.Hu||vt!=="position:nodeCollapse"&&vt!=="position:placeholder"||(vt="position"),z.get(vt)(tt,at[ft],ut[ft]!==void 0?ut[ft]:rt.Hu?at[ft]:st[ft],this.Lp,this.Gd,this.Gd,this)}rt.Hu&&ut.location!==void 0&&tt instanceof Wi&&(tt.location=ut.location),rt.nv&&tt instanceof Wi&&tt.Zb(!1)}if(y.As.clear(),So(y,!1),y.Ya(),y.N(),aa(y,!0),x.defaultAnimation===this){for(ft=x.pr.iterator;ft.next();)E=ft.value,E.Tg!==null&&(E.points=E.Tg,E.Tg=null);x.pr.clear()}aa(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Uu(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),nn(this,null),x.Ml(this),y.$b())}},bt.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof dr&&(b=y.placeholder),b!==null?(x=b.ga(Ns),b=b.padding,x.x+=b.left,x.y+=b.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new Zt(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof dr)for(a=a.memberParts;a.next();)b=a.value,b instanceof ui&&this.Cj(b,y)},bt.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof dr&&(x=y.placeholder),x!==null){var b=x.ga(Ns);x=x.padding,b.x+=x.left,b.y+=x.top,this.add(a,"position:placeholder",a.position,b,!0)}else this.add(a,"position:nodeCollapse",a.position,y,!0);if(this.add(a,"scale",a.scale,.01,!0),b=this.vc,b.contains(a)&&(b.I(a).nv=!0),a instanceof dr)for(a=a.memberParts;a.next();)b=a.value,b instanceof ui&&this.Aj(b,y)}},bt.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},Ae.Object.defineProperties(Re.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Pi(a,">= 1",Re,"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){0a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function Hi(a,y,x,b){return a===b?y+x:x*(-Math.pow(2,-10*a/b)+1)+y}Re.className="Animation",Re.EaseLinear=function(a,y,x,b){return x*a/b+y},Re.EaseInOutQuad=wi,Re.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},Re.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},Re.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},Re.EaseOutExpo=Hi;function Oi(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}Oi.className="AnimationState";function pi(a,y,x){this.xd=null,this.rf=a,this.so=x||Ci,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=Kn))}pi.prototype.copy=function(){var a=new pi(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 Ei(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))}Ae.Object.defineProperties(pi.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 Ci=new Ke(pi,"Default",1),Kn=new Ke(pi,"Immediate",2),ci=new Ke(pi,"Bundled",3);pi.className="AnimationTrigger",pi.Default=Ci,pi.Immediate=Kn,pi.Bundled=ci;function $n(a){Br(this),this.H=null,this.Pa=new Ln,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=$n.prototype,bt.clear=function(){for(var a=this.Pa,y=0;y=a)return y;for(var x=0,b=0,E=0,z=0,tt=0,rt=this.Pa.iterator;rt.next();){var at=rt.value;at instanceof dr?E++:at instanceof ui?b++:at instanceof Gn?z++:at instanceof mo?tt++:x++}if(rt="",0x.Oq||rt.height*E>x.Oq?y.gc(a,x):(E=y.actualBounds,z=y.naturalBounds,E.width===0||E.height===0||isNaN(E.x)||isNaN(E.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(ys(y,a,y.areaBackground,!0,!0,z,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(ys(y,a,"rgba(0,0,0,0.3)",!0,!1,z,E),a.fillRect(E.x,E.y,E.width,E.height)),y.background!==null&&(a.transform(x.m11,x.m12,x.m21,x.m22,x.dx,x.dy),ys(y,a,y.background,!0,!1,z,E),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)))))),b&&(a.restore(),a.Vc(!0))}},bt.g=function(a,y,x,b,E){var z=this.diagram;z!==null&&z.cb(Na,a,this,y,x,b,E)},bt.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&Kl(y),a>=b.count)a=b.count;else if(b.M(a)===y)return-1;return b.Gb(a,y),y.Vo(x),b=this.diagram,b!==null&&(x?b.N():b.oi(y)),Vi(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 b=this.Pa;if(0>a||a>=b.length){if(a=b.indexOf(y),0>a)return-1}else if(b.M(a)!==y&&(a=b.indexOf(y),0>a))return-1;return y.Wo(x),b.mb(a),b=this.diagram,b!==null&&(x?b.N():b.pc(y)),y.Ig=null,Kl(y),a};function Vi(a,y,x){if(y=Zi(a,y,x),x instanceof dr&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var b=-1,E=a.Pa.s,z=E.length,tt=0;ttb&&rt.containingGroup===x&&(b=tt,0<=y))break}!(0>b)&&b=E)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,at=NaN;rtb)for(;;){if(z===-1||tt<=b){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(at)&&at=b){if(rt--,rt===y)break;return a.mb(y),a.Gb(rt,x),rt}for(at=NaN;++rta||1=a)return y;for(var x=this.Wa.iterator;x.next();)y+=` `+x.value.toString(a-1);return y};function Zr(a,y){if(Oa){if(y!=null||Oe("Diagram setup requires an argument DIV."),a.Ka!==null&&Oe("Diagram has already completed setup."),typeof y=="string"?a.Ka=ke.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Oe("No DIV or DIV id supplied: "+y),a.Ka===null&&Oe("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Oe("Invalid div id; div already has a Diagram associated with it."),!a.ol&&ke.ResizeObserver){var x=_n(function(){a.$b()},250);a.ol=new ke.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}ke.getComputedStyle(a.Ka,null).position==="static"&&(a.Ka.style.position="relative"),y=5;var b="rgba(2"+y+"5, 255, 255, 0)";y--,a.Ka.style["-webkit-tap-highlight-color"]=b,a.Ka.innerHTML="",a.Ka.H=a,a.Ka.goDiagram=a,a.Ka.go=ke.go;var E=new Rh(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",ke.getComputedStyle(a.Ka,null).getPropertyValue("direction")==="rtl"&&(a.tn=!0),E.style.zIndex="2",E.style.userSelect="none",E.style.MozUserSelect="none",E.style.touchAction="none",E.style.letterSpacing="normal !important",E.style.wordSpacing="normal !important"),a.ta=E,a.ib=E.context,b=a.ib,a.Mb=a.computePixelRatio(),a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1),Ol(a,a.Aa,a.ya),a.Ka.insertBefore(E.Oa,a.Ka.firstChild),E=new Rh(null),E.width=1,E.height=1,a.jw=E,a.oy=E.context,Oa){E=mn("div");var z=mn("div");E.style.position="absolute",E.style.overflow="auto",E.style.width=a.Aa+"px",E.style.height=a.ya+"px",E.style.zIndex="1",z.style.position="absolute",z.style.width="1px",z.style.height="1px",a.Ka.appendChild(E),E.appendChild(z),E.onscroll=to,E.addEventListener("pointerdown",Lr),E.H=a,E.uy=!0,E.vy=!0,a.ku=E,a.hu=z}a.hk=_n(function(){a.Yh=null,a.N()},300),a.Ov=_n(function(){ta(a)},250),a.preventDefault=function(tt){return tt.preventDefault(),!1},a.$j=function(tt){if(a.isEnabled){var rt=Io(a,tt,!0);rt.bubbles=!0;var at=0,st=0;rt.delta=0,tt.deltaX!==void 0?(tt.deltaX!==0&&(at=0Math.abs(tt.deltaY)?-at:-st):tt.wheelDeltaX!==void 0?(tt.wheelDeltaX!==0&&(at=0Math.abs(tt.wheelDeltaY)?-at:-st):tt.wheelDelta!==void 0&&tt.wheelDelta!==0&&(rt.delta=0rt||Math.abs(st.y-tt.screenY)>rt)?a.yq++:a.yq=1,at.clickCount=a.yq,a.tw=tt.timeStamp,a.uw.sg(tt.screenX,tt.screenY),a.doMouseDown(),tt.button===1?tt.preventDefault():vr(at,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=Vr(a,tt,!1,!1,!1,rt[1]!==null);var at=ke.document.elementFromPoint(tt.clientX,tt.clientY)||null;at!==null&&at.shadowRoot!==void 0&&at.shadowRoot!==null&&(at=at.shadowRoot.elementFromPoint(tt.clientX,tt.clientY));var st=a,ut=tt;at&&at.H&&(ut=tt,st=at.H),rt.targetDiagram=st,Go(a,ut,rt),rt.targetObject=null,a.doMouseMove(),vr(rt,tt)}}},a.fk=function(tt){if(a.isEnabled){a.Vk=!0;var rt=tt.pointerType==="touch"||tt.pointerType==="pen",at=a.Yt;if(rt&&a.qu)delete at[tt.pointerId],tt.preventDefault();else if(at=a.oj,at[0]===null||at[0].pointerId!==tt.pointerId&&at[0].pointerType===tt.pointerType)at[1]!==null&&at[1].pointerId===tt.pointerId&&(at[1]=null);else{at[0]=null,at=Vr(a,tt,!1,!0,!0,!1);var st=ke.document.elementFromPoint(tt.clientX,tt.clientY)||null;st!==null&&st.shadowRoot!==void 0&&st.shadowRoot!==null&&(st=st.shadowRoot.elementFromPoint(tt.clientX,tt.clientY)),st!==null&&st.H instanceof we&&st.H!==a&&Go(st.H,tt,at),st===null&&(st=tt.target),Go(a,tt,at),at.clickCount=a.yq,at.targetDiagram=La(tt,st),at.targetObject=null,a.doMouseUp(),vr(at,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=b.Z["d"+xd[1]+xd[2]+"wI"+Qc.slice(1,5)]["b"+Tx.slice(1,y)](b.Z,Sd,y,y),b.Vc(!0),ao(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}we.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},we.prototype.removeEventListener=function(a,y,x,b){a.removeEventListener(y,x,{capture:b})};function ao(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(ke,"resize",a.Ov,!1)}function Dr(a){30Et&&(this.position=Qt.h(-(y.scrollWidth-this.Aa)+Gt-this.Aa/E+ut,this.position.y))),a.vy&&this.allowVerticalScroll&&(rtNt&&(this.position=Qt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+z))),Zt.free(Qt),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,ut=b.right,Et=E.right,z=b.bottom,Nt=E.bottom,tt=b.x,ft=E.x,rt=b.y,b=E.y,vt>=at&&tt>=ft&&ut<=Et&&(x.style.width="1px"),Ct>=st&&rt>=b&&z<=Nt&&(x.style.height="1px"))}},we.prototype.computeBounds=function(a){return a===void 0&&(a=new en),xo(this),qr(this,a)};function qr(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,b=a.Wa.s,E=b.length,z=0;zx&&(y=x),ya.maxScale&&(y=a.maxScale),y):y===Dc?(y=at>rt?(tt-a.Db)/b:(z-a.Db)/E,y>x&&(y=x),ya.maxScale&&(y=a.maxScale),y):a.scale}we.prototype.zoomToFit=function(){var a=this.sj;this.sj=dc,this.scale=Uo(this,Zl),a!==dc&&(Cr(this,!1),fa(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},bt=we.prototype,bt.BA=function(a,y){y===void 0&&(y=Zl);var x=a.width,b=a.height;if(!(x===0||b===0||isNaN(x)&&isNaN(b))){var E=1;if(y===Zl||y===Dc)if(isNaN(x))E=this.viewportBounds.height*this.scale/b;else if(isNaN(b))E=this.viewportBounds.width*this.scale/x;else{E=this.Aa;var z=this.ya;E=y===Dc?z/b>E/x?(z-(this.Be?this.Db:0))/b:(E-(this.gf?this.Db:0))/x:Math.min(z/b,E/x)}this.scale=E,this.position=new Zt(a.x,a.y)}},bt.Jy=function(a,y){this.Va();var x=this.documentBounds,b=this.viewportBounds;this.position=new Zt(x.x+(a.x*x.width+a.offsetX)-(y.x*b.width-y.offsetX),x.y+(a.y*x.height+a.offsetY)-(y.y*b.height-y.offsetY))},bt.zz=function(a){if(a instanceof ge){this.eq=a;var y=Zt.alloc();this.fq=this.op(a.ga(Ns,y)),Zt.free(y)}else this.eq=null,this.fq=Ea};function fa(a,y,x,b,E,z){var tt=Zt.allocAt(a.pa.x,a.pa.y),rt=tt.x,at=tt.y;if(a.eq!==null){var st=Zt.alloc();st=a.eq.ga(Ns,st),rt=st.x-a.fq.x/a.scale,at=st.y-a.fq.y/a.scale,E=ds,Zt.free(st)}(z||a.scrollMode===dc)&&(E.sb()&&(x>y.width&&(rt=y.x+(E.x*y.width+E.offsetX)-(E.x*x-E.offsetX)),b>y.height&&(at=y.y+(E.y*y.height+E.offsetY)-(E.y*b-E.offsetY))),E=a.rj,z=x-y.width,xy.left?rt=y.left:rty.top?at=y.top:aty;y++){var x=a.De.iterator;if(x===null||a.De.count===0)break;a.De=new Pn,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof dr&&b.U&65536&&(b.U=b.U^65536)})}}bt.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof dr||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof dr&&x.isVisible()&&ya(this,x);for(a.reset();a.next();)x=a.value,x instanceof Gn&&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 mo&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function ya(a,y){for(var x=Si(),b=Si(),E=y.memberParts;E.next();){var z=E.value;z.isVisible()&&(z instanceof dr?(hh(z)||hu(z)||vf(z))&&ya(a,z):z instanceof Gn?z.fromNode===y||z.toNode===y?b.push(z):x.push(z):(z.measure(1/0,1/0),z.arrange()))}for(a=x.length,E=0;ECe&&(Gt=ii.left,ee=ii.right),Qt.height>We&&(ie=ii.top,he=ii.bottom)):(Gt=ii.left,ee=ii.right,ie=ii.top,he=ii.bottom);var bi=Qt.width+Gt+ee,mi=Qt.height+ie+he;ii=a.scale;var Wn=bi>at/ii,xn=mi>st/ii;if(!(z||a.gf||a.Be||Wn||xn))return!0;Gt=Qt.x-Gt,at=ut.x,ee=Qt.right+ee,st=ut.right+tt,ie=Qt.y-ie;var cr=ut.y;Qt=Qt.bottom+he,ut=ut.bottom+rt;var ir="1px";if(he="1px",a.scrollMode===dc&&(Wn||xn)&&(Wn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Wn=1,Gt+1st+1&&(Wn=Math.max((ee-st)*ii+a.Aa,Wn)),Ce+tt+1ut+1&&(Wn=Math.max((Qt-ut)*ii+a.ya,Wn)),We+rt+1st+1&&(tt=Math.max((ee-st)*ii+a.Aa,tt)),Ce+1ut+1&&(rt=Math.max((Qt-ut)*ii+tt,rt)),We+1st+1&&(y=a.position.x*ii)),a.tn)switch(a.bu){case"negative":y=-(Et.scrollWidth-y-Et.clientWidth);break;case"reverse":y=Et.scrollWidth-y-Et.clientWidth}return Et.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(We+1ut+1&&(Et.scrollTop=a.position.y*ii)),at=a.Aa,st=a.ya,Et.style.width=at+(a.gf?a.Db:0)+"px",Et.style.height=st+(a.Be?a.Db:0)+"px",x!==at||b!==st||a.animationManager.zb?(x=en.allocAt(E,ft,vt,Ct),a.onViewportBoundsChanged(x,a.viewportBounds,ii,z),en.free(x),!1):!0}bt=we.prototype,bt.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Oe("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&&Oe('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(Ha,"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;Kf(a,function(x){eu(y,x)}),(a instanceof mo||a instanceof dr&&a.placeholder!==null)&&a.v(),a.data!==null&&Kf(a,function(x){sy(y.partManager,x)}),hu(a)!==!0&&vf(a)!==!0||this.De.add(a),IS(a,!0,this),jS(a)?(a.actualBounds.w()&&this.N(Yf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Yf(a,a.actualBounds)),this.$b()},bt.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Kf(a,function(x){ly(y.partManager,x,y)}),this.De.remove(a),jS(a)?(a.actualBounds.w()&&this.N(Yf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Yf(a,a.actualBounds)),this.$b()},bt.remove=function(a){Ba(this,a,!0)};function Ba(a,y,x){var b=y.layer;b!==null&&b.diagram===a&&(y.isSelected=!1,y.isHighlighted=!1,y.C(2),x&&y.Lj(),x=b.pc(-1,y,!1),0<=x&&a.cb(us,"parts",b,y,null,x,null),a=y.layerChanged,a!==null&&a(y,b,null))}bt.Is=function(a,y){if(y===void 0&&(y=!1),oi(a))for(var x=a.length,b=0;bb&&this.Ya(),this},bt.Cy=function(a,y){Jr(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(us,"layers",this,a,null,b,null));var E=x.count,z;for(z=0;zb&&this.Ya(),this},bt.kA=function(a){if(a.diagram!==this&&Oe("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 b=y.value,E=b.layerName;E!==a.name?b.layerName=E:b.layerName=""}this.cc!==null&&this.cb(us,"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 Ln),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 Ln),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!==Ql&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,b=0;bft.Pa.indexOf(Ct)&&ft.oi(vt,Ct,Et):(Ct.isSelected=!1,Ct.isHighlighted=!1,Ct.Wb(),ft.pc(Et?vt:-1,Ct,Et)))}else ft instanceof we?typeof vt=="number"&&Ct instanceof $n&&(y?(Ct.Xe(this),this.Wa.Gb(vt,Ct)):this.Wa.mb(vt)):Oe("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==Ql&&Oe("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},we.prototype.Ea=function(a){return this.undoManager.Ea(a)},we.prototype.eb=function(a){return this.undoManager.eb(a)},we.prototype.Kf=function(){return this.undoManager.Kf()},we.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var b=!1;try{a(this),b=!0}finally{b?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},we.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},we.prototype.rp=function(){this.partManager.rp()};function fo(a,y,x){var b=a.animationManager;if(a.vb||a.ld)a.Ca=x,hl(a),a.N(),a.Ee=!0,b.zb&&(xh(b)||b.ce.add(b.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,hl(a);else{a.vb=!0;var E=a.viewportBounds.copy(),z=a.Aa,tt=a.ya,rt=a.zoomPoint.x,at=a.zoomPoint.y,st=a.contentAlignment;isNaN(rt)&&(st.$c()?st.Hf(Nl)?rt=0:st.Hf(Ts)&&(rt=z-1):rt=st.sb()?st.x*(z-1):z/2),isNaN(at)&&(st.$c()?st.Hf(Xs)?at=0:st.Hf(fl)&&(at=tt-1):at=st.sb()?st.y*(tt-1):tt/2),a.scaleComputation===null||a.animationManager.defaultAnimation.isAnimating||(x=a.scaleComputation(a,x)),xa.maxScale&&(x=a.maxScale),z=Zt.allocAt(a.pa.x+rt/y-rt/x,a.pa.y+at/y-at/x),a.position=z,Zt.free(z),a.Ca=x,hl(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),Cr(a,!1),b.zb&&(xh(b)||b.ce.add(b.H,"scale",y,a.Ca))}}we.prototype.onViewportBoundsChanged=function(a,y,x,b){if(!a.D(y)){b===void 0&&(b=!1),b||(this.Ee=!0),this.vd=!0;var E=this.layout;E===null||!E.isViewportSized||this.autoScale!==El||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof Fa&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),zf(E,this)),this.vb||this.invalidateViewport(a,y),ms(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=b,this.R("ViewportBoundsChanged",this.fc,a),this.isVirtualized&&this.links.each(function(z){z.isAvoiding&&z.actualBounds.Yc(y)&&z.bb()})}};function ms(a,y){var x=a.fe;if(x!==null&&x.visible){for(var b=hn.alloc(),E=1,z=1,tt=x.O.s,rt=tt.length,at=0;atut||(p0(st.figure)?z=z*ut/Ee.vx(z,ut):E=E*ut/Ee.vx(E,ut))}if(tt=x.gridCellSize,b.h(z*tt.width,E*tt.height),y!==void 0)E=y.width,z=y.height,a=y.x,tt=y.y;else{if(y=en.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){en.free(y);return}E=y.width,z=y.height,a=y.x,tt=y.y,en.free(y)}x.width=E+2*b.width,x.height=z+2*b.height,y=Zt.alloc(),Ee.No(a,tt,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),hn.free(b),x.part.location=y,Zt.free(y)}}we.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(),b=x.length,E=0;E=b&&!z.defaultAnimation.isAnimating&&!z.zb&&(y||Ku(z,"Layout")),a.xh=!1;for(var tt=a.ai.iterator;tt.next();)Rl(a,tt.value,y,b);E.isValidLayout||(!y||E.isRealtime||E.isRealtime===null||b===0?(E.doLayout(a),xo(a),E.isValidLayout=!0):a.xh=!0)}finally{y=a.undoManager.isInternalTransaction,b===0&&(a.eb("Layout"),a.undoManager.isInternalTransaction=!1),!y||b!==0&&b!==1||Ou(z),a.aa=x}}}function Rl(a,y,x,b){if(y!==null){for(var E=y.gl.iterator;E.next();)Rl(a,E.value,x,b);E=y.layout,E===null||E.isValidLayout||(!x||E.isRealtime||b===0?(y.rh=!y.location.w(),E.doLayout(y),y.C(32),ya(a,y),E.isValidLayout=!0):a.xh=!0)}}bt.yz=function(){for(var a=new Ln,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function Dh(a){function y(E){var z=E.toLowerCase(),tt=new Ln;x.add(E,tt),x.add(z,tt),b.add(E,E),b.add(z,E)}var x=new si,b=new si;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=b}function Nc(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function Fc(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;Oe("Unknown DiagramEvent name: "+y)}bt.Bj=function(a,y){return a=Fc(this,a),a!==null&&a.add(y),this},bt.am=function(a,y){a=Fc(this,a),a!==null&&a.remove(y)},bt.R=function(a,y,x){var b=Fc(this,a),E=new ih;if(E.diagram=this,a=Nc(this,a),a!==null&&(E.name=a),y!==void 0&&(E.subject=y),x!==void 0&&(E.parameter=x),y=b.length,y===1)b.M(0)(E);else if(y!==0)for(b=b.Fa(),x=0;x=x.top&&0>=x.left&&0>=x.right&&0>=x.bottom)return y;var b=this.viewportBounds,E=this.scale;b=en.allocAt(0,0,b.width*E,b.height*E);var z=Zt.allocAt(0,0);if(a.x>=b.x&&a.xb.x+b.width-x.right&&this.allowHorizontalScroll&&(tt=Math.max(this.scrollHorizontalLineChange,1),tt|=0,z.x+=tt,a.x>b.x+b.width-x.right/2&&(z.x+=tt),a.x>b.x+b.width-x.right/4&&(z.x+=4*tt));return a.y>=b.y&&a.yb.y+b.height-x.bottom&&this.allowVerticalScroll&&(tt=Math.max(this.scrollVerticalLineChange,1),tt|=0,z.y+=tt,a.y>b.y+b.height-x.bottom/2&&(z.y+=tt),a.y>b.y+b.height-x.bottom/4&&(z.y+=4*tt)),z.Xa(Ao)||(y=new Zt(y.x+z.x/E,y.y+z.y/E)),en.free(b),Zt.free(z),y},bt=we.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 dr&&(y.$p=null)})};function vd(a,y,x){function b(){var ut=+new Date;for(z=!0,tt.reset();tt.next();)if(!tt.value[0].al){z=!1;break}z||ut-st>at?y(x,E,rt):ke.requestAnimationFrame(b)}for(var E=x.callback,z=!0,tt=a.Og.iterator;tt.next();)if(!tt.value[0].al){z=!1;break}if(typeof E!="function"||z)return y(x,E,a);var rt=a,at=x.callbackTimeout||300,st=+new Date;return ke.requestAnimationFrame(function(){b()}),null}bt.Wz=function(a){return Oa?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},bt.Jx=function(a){return a===void 0&&(a={}),vd(this,this.Xz,a)},bt.Xz=function(a,y,x){var b=gf(x,a,"canvas",null);if(b===null)return null;x=b.Z.canvas;var E=null;if(x!==null)switch(E=a.returnType,E===void 0?E="string":E=E.toLowerCase(),E){case Qc+"data":E=b.getImageData(0,0,x.width,x.height);break;case Qc:b=(a.document||document).createElement("img"),b.src=x.toDataURL(a.type,a.details),E=b;break;case"blob":return typeof y!="function"&&Oe('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:E=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(E),null):E};function gf(a,y,x,b){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&Oe("properties argument must be an Object.");var E=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 hn(1/0,1/0):new hn(2e3,2e3));var rt=y.position||null,at=y.parts||null,st=y.padding===void 0?1:y.padding,ut=y.background||null,ft=y.omitTemporary;ft===void 0&&(ft=!0);var vt=y.document||document,Ct=y.elementFinished||null,Et=y.showTemporary;Et===void 0&&(Et=!ft),y=y.showGrid,y===void 0&&(y=Et),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof st=="number"?st=new qi(st):st instanceof qi||Oe("MakeImage padding must be a Margin or a number."),st.left=Math.max(st.left,0),st.right=Math.max(st.right,0),st.top=Math.max(st.top,0),st.bottom=Math.max(st.bottom,0),a.ib.Vc(!0),ft=new Rh(null,vt,void 0,!0);var Nt=ft.context;if(!(E||z||at||rt))return ft.width=a.Aa+Math.ceil(st.left+st.right),ft.height=a.ya+Math.ceil(st.top+st.bottom),x==="SVG"?b===null?null:(b.resize(ft.width,ft.height,ft.width,ft.height),b.ownerDocument=vt,b.hs=Ct,Cs(a,b.context,st,new hn(ft.width,ft.height),a.Ca,a.pa,at,ut,Et,y),b.context):(a.Xm=!1,Cs(a,Nt,st,new hn(ft.width,ft.height),a.Ca,a.pa,at,ut,Et,y),a.Xm=!0,ft.context);var Qt=a.Pp,Gt=a.documentBounds.copy();if(Gt.Fv(a.yb),Et)for(var ee=a.Wa.s,ie=ee.length,he=0;heQt?(z=Qt,E=Gt.width,Gt=Gt.height):(E=tt.width,Gt=tt.height)):(E=Gt.width*z,Gt=Gt.height*z):(z=Qt,E=Gt.width,Gt=Gt.height),st!==null?(E+=rt,Gt+=ie):st=new qi(0),tt!==null&&(Qt=tt.width,tt=tt.height,isNaN(Qt)&&(Qt=2e3),isNaN(tt)&&(tt=2e3),isFinite(Qt)&&(E=Math.min(E,Qt)),isFinite(tt)&&(Gt=Math.min(Gt,tt))),ft.width=Math.ceil(E),ft.height=Math.ceil(Gt),x==="SVG"?b===null?null:(b.resize(ft.width,ft.height,ft.width,ft.height),b.ownerDocument=vt,b.hs=Ct,Cs(a,b.context,st,new hn(Math.ceil(E),Math.ceil(Gt)),z,ee,at,ut,Et,y),b.context):(a.Xm=!1,Cs(a,Nt,st,new hn(Math.ceil(E),Math.ceil(Gt)),z,ee,at,ut,Et,y),a.Xm=!0,ft.context)}Ae.Object.defineProperties(we.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof pt||(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 Rc(this,ke.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 Rc(this,ke.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(ke,"resize",this.Ov,!1),this.removeEventListener(ke,"wheel",this.$j,!0),wr===this&&(wr=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Zr(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||1a&&Pi(a,">= 0",we,"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",we,"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 b=y.style.cursor;y.style.cursor=a,x.style.cursor=a,y.style.cursor===b&&(y.style.cursor="-webkit-"+a,x.style.cursor="-webkit-"+a,y.style.cursor===b&&(y.style.cursor="-moz-"+a,x.style.cursor="-moz-"+a,y.style.cursor===b&&(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= 0",we,"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||Qs(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&&Oe("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=po(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var b=this.vb;this.vb=!0,Ku(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=qs(this.cc.type);for(var E=0;Ethis.scale&&(this.scale=a)):Pi(a,"> 0",we,"minScale"))}},maxScale:{get:function(){return this.Mt},set:function(a){var y=this.Mt;y!==a&&(0 0",we,"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),Cr(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 qi(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&&Oe("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();)Ep(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==fc&&a!==bs&&a!==Hd&&Oe("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 hn(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 qi(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Ae.Object.defineProperties(we,{licenseKey:{get:function(){return pf.jc()},set:function(a){pf.add(a.replace(/\s/g,""))}},version:{get:function(){return Jc}}}),we.prototype.makeImageData=we.prototype.Jx,we.prototype.makeImage=we.prototype.Wz,we.prototype.cacheGroupExternalLinks=we.prototype.Fu,we.prototype.addRenderer=we.prototype.bs,we.prototype.makeSVG=we.prototype.av,we.prototype.makeSvg=we.prototype.Cs,we.prototype.stopAutoScroll=we.prototype.ug,we.prototype.doAutoScroll=we.prototype.gs,we.prototype.isUnoccupied=we.prototype.Yj,we.prototype.raiseDiagramEvent=we.prototype.R,we.prototype.removeDiagramListener=we.prototype.am,we.prototype.addDiagramListener=we.prototype.Bj,we.prototype.findTreeRoots=we.prototype.yz,we.prototype.layoutDiagram=we.prototype.Uz,we.prototype.findTopLevelGroups=we.prototype.qz,we.prototype.findTopLevelNodesAndLinks=we.prototype.rz,we.prototype.ensureBounds=we.prototype.Va,we.prototype.findLinksByExample=we.prototype.ls,we.prototype.findNodesByExample=we.prototype.ms,we.prototype.findLinkForData=we.prototype.Kc,we.prototype.findNodeForData=we.prototype.ii,we.prototype.findPartForData=we.prototype.Lc,we.prototype.findLinkForKey=we.prototype.findLinkForKey,we.prototype.findNodeForKey=we.prototype.Vb,we.prototype.findPartForKey=we.prototype.findPartForKey,we.prototype.rebuildParts=we.prototype.Wd,we.prototype.transformViewToDoc=we.prototype.Ps,we.prototype.transformRectDocToView=we.prototype.zA,we.prototype.transformDocToView=we.prototype.op,we.prototype.centerRect=we.prototype.es,we.prototype.scrollToRect=we.prototype.tv,we.prototype.scroll=we.prototype.scroll,we.prototype.highlightCollection=we.prototype.Jz,we.prototype.highlight=we.prototype.Iz,we.prototype.selectCollection=we.prototype.rA,we.prototype.select=we.prototype.select,we.prototype.updateAllRelationshipsFromData=we.prototype.rp,we.prototype.updateAllTargetBindings=we.prototype.updateAllTargetBindings,we.prototype.commit=we.prototype.commit,we.prototype.rollbackTransaction=we.prototype.Kf,we.prototype.commitTransaction=we.prototype.eb,we.prototype.startTransaction=we.prototype.Ea,we.prototype.raiseChanged=we.prototype.g,we.prototype.raiseChangedEvent=we.prototype.cb,we.prototype.removeChangedListener=we.prototype.ik,we.prototype.addChangedListener=we.prototype.Pe,we.prototype.removeModelChangedListener=we.prototype.mA,we.prototype.addModelChangedListener=we.prototype.Yw,we.prototype.findLayer=we.prototype.Qj,we.prototype.removeLayer=we.prototype.kA,we.prototype.addLayerAfter=we.prototype.Cy,we.prototype.addLayerBefore=we.prototype.Ww,we.prototype.addLayer=we.prototype.Al,we.prototype.moveParts=we.prototype.moveParts,we.prototype.copyParts=we.prototype.Kj,we.prototype.removeParts=we.prototype.Is,we.prototype.remove=we.prototype.remove,we.prototype.add=we.prototype.add,we.prototype.clearDelayedGeometries=we.prototype.bx,we.prototype.setProperties=we.prototype.nm,we.prototype.attach=we.prototype.Du,we.prototype.set=we.prototype.set,we.prototype.resetInputOptions=we.prototype.Sx,we.prototype.setInputOption=we.prototype.sA,we.prototype.getInputOption=we.prototype.Ql,we.prototype.resetRenderingHints=we.prototype.Tx,we.prototype.setRenderingHint=we.prototype.Xx,we.prototype.getRenderingHint=we.prototype.Gf,we.prototype.maybeUpdate=we.prototype.bd,we.prototype.requestUpdate=we.prototype.$b,we.prototype.delayInitialization=we.prototype.Xy,we.prototype.isUpdateRequested=we.prototype.Pz,we.prototype.invalidateDocumentBounds=we.prototype.Ya,we.prototype.findObjectsNear=we.prototype.og,we.prototype.findPartsNear=we.prototype.mz,we.prototype.findObjectsIn=we.prototype.Cf,we.prototype.findPartsIn=we.prototype.ux,we.prototype.findObjectsAt=we.prototype.ji,we.prototype.findPartsAt=we.prototype.lz,we.prototype.findObjectAt=we.prototype.ic,we.prototype.findPartAt=we.prototype.Ol,we.prototype.focusObject=we.prototype.zz,we.prototype.alignDocument=we.prototype.Jy,we.prototype.zoomToRect=we.prototype.BA,we.prototype.zoomToFit=we.prototype.zoomToFit,we.prototype.diagramScroll=we.prototype.kx,we.prototype.focus=we.prototype.focus;var Bh=new si,zd=null,Oa=ke.document!==void 0,Uc=null,cc="",El=new Ke(we,"None",0),Zl=new Ke(we,"Uniform",1),Dc=new Ke(we,"UniformToFill",2),Bc=new Ke(we,"CycleAll",10),Jh=new Ke(we,"CycleNotDirected",11),Xc=new Ke(we,"CycleNotDirectedFast",12),Yc=new Ke(we,"CycleNotUndirected",13),yd=new Ke(we,"CycleDestinationTree",14),jd=new Ke(we,"CycleSourceTree",15),dc=new Ke(we,"DocumentScroll",1),Oc=new Ke(we,"InfiniteScroll",2),fc=new Ke(we,"TreeParentCollapsed",21),bs=new Ke(we,"AllParentsCollapsed",22),Hd=new Ke(we,"AnyParentsCollapsed",23),pf=new Ln,Jc="2.3.10",Qc="image",Sd=null,Hf=!1;function vl(){if(Oa){var a=ke.document.createElement("canvas"),y=a.getContext("2d"),x=zi("7ca11abfd022028846");y[x]=zi("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",cn.Dx+"4ae6247590da4bb21c324ba3a84e385776",br.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",Ee.za],E=1;5>E;E++)y[zi("7ca11abfd7330390")](zi(b[E-1]),10,15*E);for(y[x]=zi("39f046ebb36e4b"),x=1;5>x;x++)y[zi("7ca11abfd7330390")](zi(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(br.prototype.Cd=br.prototype.Eu),Sd=a}}we.className="Diagram",we.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=ke.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof we?y.H:null},we.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},we.useDOM=function(a){Oa=a?ke.document!==void 0:!1},we.isUsingDOM=function(){return Oa},we.None=El,we.Uniform=Zl,we.UniformToFill=Dc,we.CycleAll=Bc,we.CycleNotDirected=Jh,we.CycleNotDirectedFast=Xc,we.CycleNotUndirected=Yc,we.CycleDestinationTree=yd,we.CycleSourceTree=jd,we.DocumentScroll=dc,we.InfiniteScroll=Oc,we.TreeParentCollapsed=fc,we.AllParentsCollapsed=bs,we.AnyParentsCollapsed=Hd;function Wf(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function qc(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=ke[zi("76a715b2f73f148a")][zi("72ba13b5")]||"";if(a.Rc=!0,Oa){var b=we[zi("76a115b6ed251eaf4692")];if(b)for(var E=pf.iterator;E.next()&&(b=E.value,b=zi(b).split(zi("39e9")),!(6>b.length));){var z=zi(b[1]).split(".");if(b[4]!=="7da71ca0")break;var tt=zi(cn[zi("6cae19")]).split(".");if(z[0]>tt[0]||z[0]===tt[0]&&z[1]>=tt[1]){var rt=ke[zi("74a900bae4370f8b51")][zi("6fbb13a1c2311e8a57")].toLowerCase();if(tt=rt[zi("73a612b6fb191d")](zi("3aad1ab6e022098b4dc4")),z=zi(b[2]),-1tt&&z!==zi("7da71ca0ad381e90")&&(tt=y[zi("73a612b6fb191d")](zi("76a715b2ef3e149757"))),0>tt&&(tt=y[zi("73a612b6fb191d")](zi("76a715b2ef3e149757"))),0>tt&&(tt=y[zi("73a612b6fb191d")](zi("2bfa41fdb3784bca12"))),0>tt&&(tt=x[zi("73a612b6fb191d")](zi("7baa19a6f76c1988428554"))),a.Rc=!(0<=tt&&ttrt),!a.Rc)))break;if(z[0]==="#"){tt=ke.document.createElement("div");for(var at=b[0].replace(/[A-Za-z]/g,"");4>at.length;)at+="9";if(rt=at,at=at.substr(at.length-4),b="",b+=["gsh","gsf"][parseInt(at.substr(0,1),10)%2],b+=["Header","Background","Display","Feedback"][parseInt(at.substr(0,1),10)%4],tt[zi("79a417a0f0181a8946")]=b,ke.document[zi("78a712aa")]){ke.document[zi("78a712aa")][zi("7bb806b6ed32388c4a875b")](tt),at=ke.getComputedStyle(tt).getPropertyValue(zi("78a704b7e62456904c9b12701b6532a8"));var st=ke.getComputedStyle(tt).getPropertyValue(zi("75b817b0ea2202"));if(ke.document[zi("78a712aa")][zi("68ad1bbcf533388c4a875b")](tt),at){if(tt=ke[zi("77a902b0eb1b1e804a8a")],st==="0."+parseInt(rt,10)%100||at.indexOf(parseInt(z[1]+z[2],16))!==-1&&at.indexOf(parseInt(z[3]+z[4],16))!==-1){a.Rc=!1;break}else if(tt&&tt(zi("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(b="."+b,z=0;zb.updateDelay?b.N():b.o||(b.o=!0,setTimeout(function(){return b.redraw()},b.updateDelay))},x.Of=function(){b.observed!==null&&jt(b)},x.autoScale=Zl,x.vb=!1,y&&Object.assign(x,y),x}ae(pt,we),pt.prototype.computePixelRatio=function(){return 1},pt.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(ha(this),this.ql===null){var x=new Rh(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),At(this)}finally{this.ta=a,this.ib=y}}}we.prototype.redraw.call(this)},pt.prototype.gc=function(){if(this.Ka===null&&Oe("No div specified"),this.ta===null&&Oe("No canvas specified"),!(this.ta instanceof Rc)&&(O0(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){ha(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?At(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,b=0;ba&&(a=0),this.ia!==a&&(this.ia=a)}}}),pt.className="Overview";function qt(){Ya.call(this),this.j=null}ae(qt,Ya),qt.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.timestampy.maxScale||(y.scale=a))},Yt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==El?!1:(a=y.scale*a,ay.maxScale?!1:y.allowZoom)},Yt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===El&&(a=y.scale*a,ay.maxScale||(y.scale=a))},Yt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==El?!1:(a=y.scale*a,ay.maxScale?!1:y.allowZoom)},Yt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;ay.maxScale||(y.scale=a)},Yt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return ay.maxScale?!1:y.allowZoom},Yt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,b=a.scale;Ku(y,"Zoom To Fit"),this.isZoomToFitRestoreEnabled&&b===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.sw,this.Au=NaN,this.yu=Do):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),Ou(y)},Yt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Yt.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(at){this.cg=null}a===null&&(0a&&(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 Zt),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,b,E){var z=this.transform,tt=1/(z.m11*z.m22-z.m12*z.m21),rt=z.m22*tt,at=-z.m12*tt,st=-z.m21*tt,ut=z.m11*tt,ft=tt*(z.m21*z.dy-z.m22*z.dx),vt=tt*(z.m12*z.dx-z.m11*z.dy);return this.areaBackground!==null?(z=this.actualBounds,Ee.Ff(z.left,z.top,z.right,z.bottom,a,y,x,b,E)):(tt=a*rt+y*st+ft,a=a*at+y*ut+vt,y=x*rt+b*st+ft,x=x*at+b*ut+vt,E.h(0,0),b=this.naturalBounds,x=Ee.Ff(0,0,b.width,b.height,tt,a,y,x,E),E.transform(z),x)},ge.prototype.measure=function(a,y,x,b){if(hh(this)!==!1){var E=this.Kg,z=E.right+E.left;E=E.top+E.bottom,a=Math.max(a-z,0),y=Math.max(y-E,0),x=Math.max((x||0)-z,0),b=Math.max((b||0)-E,0),z=this.angle,E=this.desiredSize;var tt=this.kq();z===90||z===270?(a=isFinite(E.height)?E.height+tt:a,y=isFinite(E.width)?E.width+tt:y):(a=isFinite(E.width)?E.width+tt:a,y=isFinite(E.height)?E.height+tt:y),E=x||0,tt=b||0;var rt=this instanceof Dn;switch(Mu(this,!0)){case gn:tt=E=0,rt&&(y=a=1/0);break;case dn:isFinite(a)&&a>x&&(E=a),isFinite(y)&&y>b&&(tt=y);break;case Ri:isFinite(a)&&a>x&&(E=a),tt=0,rt&&(y=1/0);break;case Ji:isFinite(y)&&y>b&&(tt=y),E=0,rt&&(a=1/0)}rt=this.maxSize;var at=this.minSize;E>rt.width&&at.widthrt.height&&at.heighta.height||this.Cb>a.width))&&(x=!0)),this.l=x?this.l|256:this.l&-257,this.Ib.w()||Oe("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),_c(this,!1),en.free(z)},bt=ge.prototype,bt.eh=function(){};function nu(a,y,x,b,E){if(a.Ib.h(y,x,b,E),!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,b+=y,E+=tt,y=Mu(a,!0),x===b&&z===E&&(y=gn),y){case gn:(x>b||z>E)&&(Gs(a,!0),a.measure(x>b?b:x,z>E?E:z,0,0));break;case dn:Gs(a,!0),a.measure(b,E,0,0);break;case Ri:Gs(a,!0),a.measure(b,z,0,0);break;case Ji:Gs(a,!0),a.measure(x,E,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||z0(x,!0),this.N(),ma(a,y)||(x.oh(),this.Pn(x)))},bt.Pn=function(a){this.portId!==null&&(z0(a,!0),a instanceof ui&&ZS(a,this))},bt.gc=function(a,y){if(!Ph(this,a,y)&&this.visible){var x=this.opacity;if(x!==0){var b=1;x!==1&&(b=a.globalAlpha,a.globalAlpha=b*x);var E="";this.filter!==""&&(E=a.filter,a.filter=this.filter);var z=this instanceof Dn&&Zd(this),tt=this.Ib;if(z){var rt=this.Ib,at=this.dc,st=this.areaBackground,ut=this.Ma;st===null&&ut===null||a.yc(),st!==null&&(ys(this,a,st,!0,!0,at,rt),st instanceof Zo&&st.type===bh?(a.beginPath(),a.rect(rt.x,rt.y,rt.width,rt.height),a.ng(st)):a.fillRect(rt.x,rt.y,rt.width,rt.height)),ut!==null&&(ys(this,a,ut,!0,!1,at,rt),ut instanceof Zo&&ut.type===bh?(a.beginPath(),a.rect(rt.x,rt.y,rt.width,rt.height),a.ng(ut)):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&&yl(this),st=this.part,at=!1;var ft=0;st&&y.Gf("drawShadows")&&(at=st.isShadowed)&&(ut=st.shadowOffset,ft=Math.max(ut.y,ut.x)*y.scale*y.Mb),ut=this.Dd();var vt;if(!(vt=y.$i||!ut)){var Ct=this.naturalBounds;vt=this.wh;var Et=vt.m11,Nt=vt.m21,Qt=vt.dx,Gt=vt.m12,ee=vt.m22,ie=vt.dy,he,Ce=he=0;vt=he*Et+Ce*Nt+Qt;var We=he*Gt+Ce*ee+ie;he=Ct.width+ft,Ce=0;var ii=he*Et+Ce*Nt+Qt;he=he*Gt+Ce*ee+ie,Ce=Math.min(vt,ii);var bi=Math.min(We,he),mi=Math.max(vt+0,ii)-Ce,Wn=Math.max(We+0,he)-bi;vt=Ce,We=bi,he=Ct.width+ft,Ce=Ct.height+ft,ii=he*Et+Ce*Nt+Qt,he=he*Gt+Ce*ee+ie,Ce=Math.min(vt,ii),bi=Math.min(We,he),mi=Math.max(vt+mi,ii)-Ce,Wn=Math.max(We+Wn,he)-bi,vt=Ce,We=bi,he=0,Ce=Ct.height+ft,ii=he*Et+Ce*Nt+Qt,he=he*Gt+Ce*ee+ie,Ce=Math.min(vt,ii),bi=Math.min(We,he),mi=Math.max(vt+mi,ii)-Ce,Wn=Math.max(We+Wn,he)-bi,vt=Ce,We=bi,ft=y.viewportBounds,Ct=ft.x,Et=ft.y,vt=!(vt>ft.width+Ct||Ct>mi+vt||We>ft.height+Et||Et>Wn+We)}if(vt){if(vt=(this.l&256)!==0,a.clipInsteadOfFill&&(vt=!1),this instanceof Ca&&(a.font=this.font),vt){if(We=rt.se()?rt.naturalBounds:rt.actualBounds,mi=Math.max(tt.x,We.x),Wn=Math.max(tt.y,We.y),ft=Math.min(tt.right,We.right)-mi,Ct=Math.min(tt.bottom,We.bottom)-Wn,Et=this.tb,Et!==null&&(mi=Et.x,Wn=Et.y,ft=Et.width,Ct=Et.height),mi>tt.width+tt.x||tt.x>We.width+We.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(mi,Wn,ft,Ct),a.clip()}if(ut){if(!st.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}at&&(We=st.shadowOffset,a.Ev(We.x*y.scale*this.scale*y.Mb,We.y*y.scale*this.scale*y.Mb,st.shadowBlur),Pd(a),a.shadowColor=st.shadowColor)}at&&this.shadowVisible===!0?Pd(a):at&&this.shadowVisible===!1&&$c(a),st=this.naturalBounds,this.areaBackground!==null&&(a.yc(),uh(this,a,st,tt)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),at&&cl(this,rt)&&this.shadowVisible===null&&$c(a),this.Ma!==null&&(a.yc(),Ru(this,a,st,tt)),at&&(this.Ma!==null||this.areaBackground!==null||cl(this,rt))?(qh(this,!0),this.shadowVisible===null&&$c(a)):qh(this,!1),this.hh(a,y),at&&this.l&512&&Pd(a),ut&&at&&$c(a),vt&&(a.restore(),a.Vc(this instanceof Dn)),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=b),this.filter!==""&&(a.filter=E)}}};function cl(a,y){return y===null?!1:(Zd(y)&&(y=y.panel),(y.l&512)!==0||(y.type===Dn.Auto||y.type===Dn.Spot)&&y.Pb()!==a)}bt.Dv=function(){};function uh(a,y,x,b){ys(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof Zo&&a.areaBackground.type===bh?(y.beginPath(),y.rect(b.x,b.y,b.width,b.height),y.ng(a.areaBackground)):y.fillRect(b.x,b.y,b.width,b.height)}function Ru(a,y,x,b){var E=a.kq(),z=x.x,tt=x.y,rt=x.width+E,at=x.height+E;ys(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof Zo&&a.Ma.type===bh?(y.beginPath(),y.rect(z-E/2,tt-E/2,rt,at),y.ng(a.Ma)):y.fillRect(z-E/2,tt-E/2,rt,at)}function Vl(a,y,x){for(var b=y.O.s,E=b.length,z=-1,tt=0;ttE)&&Oe("Must specify non-negative integer row for RowColumnDefinition "+y+", not: "+E),a.isRow=!0,a.index=E):y.column!==void 0&&(E=y.column,(E==null||E===1/0||isNaN(E)||0>E)&&Oe("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new or;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);Ds(a,E)}else Ds(a,y);else Oe('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function Wd(a,y){Ng.add(a,y)}function fm(a,y,x){x===void 0&&(x=null);var b=a[1];if(typeof x=="function"?x(b):typeof b=="string")return a.splice(1,1),b;if(y===void 0)throw Error("no "+(typeof x=="function"?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return y}Ae.Object.defineProperties(ge.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new lg),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 lg),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 lg),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(Ar(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&&(Ar(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:fu},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new mf),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===fu&&(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 mf),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:1a||1=a&&Oe("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,Xy(this),this.v(),this.g("angle",y,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var y=a.width,x=a.height,b=this.jd,E=b.width,z=b.height;(E===y||isNaN(E)&&isNaN(y))&&(z===x||isNaN(z)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof Sr&&this.qc(),this.g("desiredSize",b,a),Al(this)&&(a=this.part,a!==null&&(ja(this,a,"width"),ja(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 hn(a,this.jd.height).freeze(),this.v(),this instanceof Sr&&this.qc(),this.g("desiredSize",y,a),Al(this)&&(a=this.part,a!==null&&ja(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 hn(this.jd.width,a).freeze(),this.v(),this instanceof Sr&&this.qc(),this.g("desiredSize",y,a),Al(this)&&(a=this.part,a!==null&&ja(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:ar},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(),Ar(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:as},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(),Ar(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 qi(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&&yl(this),this.Ab}},oe:{get:function(){return this.l&4096&&yl(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(Ar(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:gn},set:function(a){this.reshapingBehavior!==a&&(Ar(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()&&Oe("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),uu(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",ge,"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",ge,"columnSpan"),Ar(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",ge,"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",ge,"rowSpan"),Ar(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&&(Ar(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 ui||Oe("Cannot set portID on a Link: "+a),y!==null&&x!==null&&G0(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,US(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:ds},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Gf(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",ge,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Gf(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),Gf(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",ge,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:ds},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Gf(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",ge,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Gf(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),Gf(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",ge,"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&&(Ar(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&&(Ar(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&&(Ar(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&&(Ar(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&&(Ar(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&&(Ar(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&&(Ar(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&&(Ar(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&&(Ar(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&&(Ar(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&&(Ar(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&&(Ar(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&&(Ar(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&&(Ar(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&&(Ar(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&&(Ar(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&&(Ar(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&&(Ar(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),ge.prototype.trigger=ge.prototype.Jv,ge.prototype.findBindingPanel=ge.prototype.ih,ge.prototype.findTemplateBinder=ge.prototype.pz,ge.prototype.setProperties=ge.prototype.nm,ge.prototype.apply=ge.prototype.apply,ge.prototype.attach=ge.prototype.Du,ge.prototype.set=ge.prototype.set,ge.prototype.isEnabledObject=ge.prototype.If,ge.prototype.isVisibleObject=ge.prototype.Ed,ge.prototype.isContainedBy=ge.prototype.rg,ge.prototype.getNearestIntersectionPoint=ge.prototype.rs,ge.prototype.getLocalPoint=ge.prototype.qs,ge.prototype.getDocumentScale=ge.prototype.Df,ge.prototype.getDocumentAngle=ge.prototype.li,ge.prototype.getDocumentBounds=ge.prototype.mi,ge.prototype.getDocumentPoint=ge.prototype.ga,ge.prototype.intersectsRect=ge.prototype.Yc,ge.prototype.containedInRect=ge.prototype.fh,ge.prototype.containsRect=ge.prototype.Re,ge.prototype.containsPoint=ge.prototype.ca,ge.prototype.raiseChanged=ge.prototype.g,ge.prototype.raiseChangedEvent=ge.prototype.cb,ge.prototype.addCopyProperty=ge.prototype.Vw;var Ng=null;ge.className="GraphObject",Ng=new si,Wd("Button",function(){function a(x,b){return x.diagram.ic(x.documentPoint,function(E){for(;E.panel!==null&&!E.isActionable;)E=E.panel;return E},function(E){return E===b})!==null}var y=Ch(Dn,Dn.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof Dn){var E=x.fb("ButtonBorder");E!==null&&(E.fill=b?x._buttonFillNormal:x._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD",_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Ch(Sr,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Bi(0,0,2.76142374915397,2.761423749153969),spot2:new Bi(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));return y.mouseEnter=function(x,b){if(b.If()&&b instanceof Dn&&(x=b.fb("ButtonBorder"),x instanceof Sr)){var E=b._buttonFillOver;b._buttonFillNormal=x.fill,x.fill=E,E=b._buttonStrokeOver,b._buttonStrokeNormal=x.stroke,x.stroke=E}},y.mouseLeave=function(x,b){b.If()&&b instanceof Dn&&(x=b.fb("ButtonBorder"),x instanceof Sr&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof Dn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof Sr){x=x.diagram;var z=x.skipsUndoManager;x.skipsUndoManager=!0;var tt=b._buttonFillPressed;b._buttonFillOver=E.fill,E.fill=tt,tt=b._buttonStrokePressed,b._buttonStrokeOver=E.stroke,E.stroke=tt,x.skipsUndoManager=z}}},y.actionUp=function(x,b){if(b.If()&&b instanceof Dn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof Sr){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionCancel=function(x,b){if(b.If()&&b instanceof Dn&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof Sr){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionMove=function(x,b){if(b.If()&&b instanceof Dn&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof Sr))){var z=E.skipsUndoManager;E.skipsUndoManager=!0;var tt=b._buttonFillPressed;x.fill!==tt&&(x.fill=tt),tt=b._buttonStrokePressed,x.stroke!==tt&&(x.stroke=tt),E.skipsUndoManager=z}}},y}),Wd("TreeExpanderButton",function(){var a=Ch("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Ch(Sr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:$o},new Bs("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Bs("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof mo&&(x=x.adornedPart),x instanceof ui){var b=x.diagram;if(b!==null){if(b=b.commandHandler,x.isTreeExpanded){if(!b.canCollapseTree(x))return}else if(!b.canExpandTree(x))return;y.handled=!0,x.isTreeExpanded?b.collapseTree(x):b.expandTree(x)}}},a}),Wd("SubGraphExpanderButton",function(){var a=Ch("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Ch(Sr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:$o},new Bs("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 mo&&(x=x.adornedPart),x instanceof dr){var b=x.diagram;if(b!==null){if(b=b.commandHandler,x.isSubGraphExpanded){if(!b.canCollapseSubGraph(x))return}else if(!b.canExpandSubGraph(x))return;y.handled=!0,x.isSubGraphExpanded?b.collapseSubGraph(x):b.expandSubGraph(x)}}},a}),Wd("ToolTip",function(){return Ch(mo,Dn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Zt(0,3),shadowBlur:5},Ch(Sr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Bi(0,0,4,6),spot2:new Bi(1,1,-4,-4)}))}),Wd("ContextMenu",function(){return Ch(mo,Dn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Zt(0,3),shadowBlur:5},new Bs("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),Wd("ContextMenuButton",function(){var a=Ch("Button");a.stretch=Ri;var y=a.fb("ButtonBorder");return y instanceof Sr&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new Bi(0,0,2,3),y.spot2=new Bi(1,1,-2,-2)),a}),Wd("PanelExpanderButton",function(a){var y=fm(a,"COLLAPSIBLE"),x=Ch("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},Ch(Sr,{name:"ButtonIcon",strokeWidth:2},new Bs("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof Sr&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(b,E){var z=E.diagram;if(z!==null&&!z.isReadOnly){var tt=E.ih();tt===null&&(tt=E.part),tt!==null&&(E=tt.fb(y),E!==null&&(b.handled=!0,z.Ea("Collapse/Expand Panel"),E.visible=!E.visible,z.eb("Collapse/Expand Panel")))}},x}),Wd("CheckBoxButton",function(a){var y=fm(a);return a=Ch("Button",{desiredSize:new hn(14,14)},Ch(Sr,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:dn,geometryStretch:fi,visible:!1},y!==""?new Bs("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof Dn){var E=x.diagram;if(!(E===null||E.isReadOnly||y!==""&&E.model.isReadOnly)){x.handled=!0;var z=b.fb("ButtonIcon");E.Ea("checkbox"),z.visible=!z.visible,typeof b._doClick=="function"&&b._doClick(x,b),E.eb("checkbox")}}},a}),Wd("CheckBox",function(a){a=fm(a),a=Ch("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new qi(0,1,0,0)});var y=Ch(Dn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new qi(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}),ge.None=gn=new Ke(ge,"None",0),ge.Default=fr=new Ke(ge,"Default",0),ge.Vertical=Ji=new Ke(ge,"Vertical",4),ge.Horizontal=Ri=new Ke(ge,"Horizontal",5),ge.Fill=dn=new Ke(ge,"Fill",3),ge.Uniform=fi=new Ke(ge,"Uniform",1),ge.UniformToFill=_r=new Ke(ge,"UniformToFill",2),ge.FlipVertical=kr=new Ke(ge,"FlipVertical",1),ge.FlipHorizontal=lo=new Ke(ge,"FlipHorizontal",2),ge.FlipBoth=ea=new Ke(ge,"FlipBoth",3),ge.make=Ch,ge.getBuilders=function(){var a=new si,y;for(y in Ng)if(y!==y.toLowerCase()){var x=Ng.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},ge.defineBuilder=Wd,ge.build=function(a,y,x){for(var b=[],E=2;Ea&&(a+=360),a!==0){if(this.translate(y,x),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.ha[1]*a+this.ha[3]*b,z=this.ha[0]*-b+this.ha[2]*a,tt=this.ha[1]*-b+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*b,this.ha[1]=E,this.ha[2]=z,this.ha[3]=tt,this.translate(-y,-x)}},Zf.className="STransform";function ug(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}ug.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},ug.className="SGradient";function Rc(a,y,x){this.ownerDocument=a=y===void 0?ke.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 Yu(this,x)}Rc.prototype.resize=function(a,y,x,b){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=b+"px",this.Oa.setAttributeNS(null,"width",x+"px"),this.Oa.setAttributeNS(null,"height",b+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+x+" "+b),this.context.ww.firstElementChild.setAttributeNS(null,"width",x+"px"),this.context.ww.firstElementChild.setAttributeNS(null,"height",b+"px"),!0):!1},Rc.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),qe(y))for(var b in y)a.setAttributeNS(b==="href"?"http://www.w3.org/1999/xlink":"",b,y[b]);return x!==void 0&&(a.textContent=x),a},Rc.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Rc.prototype.focus=function(){this.Oa.focus()},Rc.prototype.mx=function(){this.ownerDocument=null},Ae.Object.defineProperties(Rc.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}}}),Rc.className="SVGSurface";function Yu(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 Zf,this.j=gm(this),this.Nj=gm(this,"gojs-diagram"),this.Hl=this.ti=null;var x=Ze++,b=this.Ud("clipPath",{id:"mainClip"+x});b.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height})),this.ww=b,this.svg.appendChild(this.j),this.j.appendChild(this.Nj),this.svg.appendChild(b),this.j.setAttributeNS(null,"clip-path","url(#mainClip"+x+")"),this.eA={},this.isTemporary=!!y,this.filter="",this.bk=null}function Yy(a,y,x,b,E,z,tt){a.Nj===void 0?vp(a,y,x,b,E,z,tt):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+b+", "+E+", "+z+", "+tt+")")}bt=Yu.prototype,bt.arc=function(a,y,x,b,E,z,tt,rt){var at=2*Math.PI,st=at-1e-6,ut=x*Math.cos(b),ft=x*Math.sin(b),vt=a+ut,Ct=y+ft,Et=z?0:1;b=z?b-E:E-b,(1e-6b&&(b=b%at+at),b>st?(this.path.push(["A",x,x,0,1,Et,a-ut,y-ft]),this.path.push(["A",x,x,0,1,Et,vt,Ct])):1e-6=Math.PI),Et,a+x*Math.cos(E),y+x*Math.sin(E)])},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,b,E,z){this.path.push(["C",a,y,x,b,E,z])},bt.clearRect=function(){},bt.clip=function(){this.Yl.clipPath=!0},bt.closePath=function(){this.path.push(["z"])},bt.createLinearGradient=function(a,y,x,b){var E=new ug("linear");return E.x1=a,E.y1=y,E.x2=x,E.y2=b,E},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 b="PATTERN"+Ze++,E={x:0,y:0,width:a.width,height:a.height,href:y};return a=this.Ud("pattern",{width:a.width,height:a.height,id:b,patternUnits:"userSpaceOnUse"}),a.appendChild(this.Ud(Qc,E)),this.svg.appendChild(a),x[y]=b,"url(#"+b+")"},bt.createRadialGradient=function(a,y,x,b,E,z){var tt=new ug("radial");return tt.x1=a,tt.y1=y,tt.r1=x,tt.x2=b,tt.y2=E,tt.r2=z,tt};function Jy(a,y,x,b,E,z,tt,rt,at){b=rt/b,E=at/E,z===0&&tt===0||a.rb.translate(z,tt),b===1&&E===1||a.rb.scale(b,E),y===0&&x===0||a.rb.translate(-y,-x)}bt.drawImage=function(a,y,x,b,E,z,tt,rt,at){var st="";a instanceof HTMLCanvasElement&&(st=a.toDataURL()),a instanceof HTMLImageElement&&(st=a.getAttribute("src"));var ut=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,b===void 0&&(z=y,tt=x,rt=b=ut,at=E=a),b=b||0,E=E||0,rt=rt||0,at=at||0,Jy(this,y,x,b,E,z||0,tt||0,rt,at),z={x:0,y:0,width:ut||b,height:a||E,href:st},Ee.$(b,rt)&&Ee.$(E,at)?st.toLowerCase().indexOf(".svg")===-1&&st.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||b!==ut||E!==a)&&(b+=y,E+=x,z["clip-path"]="path('M "+y+","+x+" L "+b+" "+x+" L "+b+" "+E+" L "+y+" "+E+" z')"),Fg(this,Qc,z,this.rb),this.addElement(Qc,z)},bt.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),i0(this,this.Yl)},bt.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},bt.fillRect=function(a,y,x,b){a=[a,y,x,b],a={x:a[0],y:a[1],width:a[2],height:a[3]},Fg(this,"fill",a,this.rb),this.addElement("rect",a)},bt.ox=function(a,y,x,b){a={x:a,y,width:x,height:b},Fg(this,"fill",a,this.rb),i0(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},Fg(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,b){this.path.push(["Q",a,y,x,b])},bt.rect=function(a,y,x,b){this.path.push(["M",a,y],["L",a+x,y],["L",a+x,y+b],["L",a,y+b],["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;yut.offset?1:-1}),E=0;Ex?(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(mx),a.lineDashOffset=0)},bt.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},bt.Hs=function(){},Ae.Object.defineProperties(Vf.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 mx=Object.freeze([]);Vf.className="CanvasSurfaceContext";function yp(){this.F=this.o=this.u=this.j=0}yp.className="ColorNumbers";function Zo(a,y){Og||(h0(),Og=!0),Br(this),this._isFrozen=!1,a===void 0?(this.na=Gd,this.xk="black"):typeof a=="string"?(this.na=Gd,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===Cd?(this.Qd=Xl,this.Lk=ua):this.Lk=a===bh?this.Qd=no:this.Qd=ds,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}Zo.prototype.copy=function(){var a=new Zo;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=Zo.prototype,bt.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},bt.ka=function(){return Object.isFrozen(this)&&Oe("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},bt.qb=function(a){a.classType===Zo&&(this.type=a)},bt.toString=function(){var a="Brush(";if(this.type===Gd)a+=this.color;else if(a=this.type===Cd?a+"Linear ":this.type===bh?a+"Radial ":this.type===Rg?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&&ni(this),(typeof a!="number"||!isFinite(a)||1a)&&Pi(a,"0 <= loc <= 1",Zo,"addColorStop:loc"),this.we===null&&(this.we=new si),this.we.add(a,y),this.na===Gd&&(this.type=Cd),this.xe=null,this},bt.Vz=function(a,y){if(this._isFrozen&&ni(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Ig:y,this.type===Gd)wd(this.color),this.color=Dg(a,y);else if((this.type===Cd||this.type===bh)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)wd(x.value),this.addColorStop(x.key,Dg(a,y));return this};function $y(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Ig:x,wd(a),Dg(y,x)}bt.Wy=function(a,y){if(this._isFrozen&&ni(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Ig:y,this.type===Gd)wd(this.color),this.color=Dg(-a,y);else if((this.type===Cd||this.type===bh)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)wd(x.value),this.addColorStop(x.key,Dg(-a,y));return this};function tS(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Ig:x,wd(a),Dg(-y,x)}function o0(a,y,x){wd(a),a=Ma.j;var b=Ma.u,E=Ma.o,z=Ma.F;return wd(y),x===void 0&&(x=.5),"rgba("+Math.round((Ma.j-a)*x+a)+", "+Math.round((Ma.u-b)*x+b)+", "+Math.round((Ma.o-E)*x+E)+", "+Math.round((Ma.F-z)*x+z)+")"}bt.Gx=function(){if(this.type===Gd)return Tg(this.color);if((this.type===Cd||this.type===bh)&&this.colorStops!==null){var a=this.colorStops;if(this.type===bh)return Tg(a.first().value);if(a.get(.5)!==null)return Tg(a.get(.5));if(a.count===2)return a=a.Fa(),Tg(o0(a[0].value,a[1].value));for(var y=a.iterator,x=-1,b=-1,E=1,z=1;y.next();){var tt=y.key,rt=Math.abs(.5-y.key);E>z&&rt=E&&rtb&&(z=x,x=b,b=z,z=E),E=b-x,Tg(o0(a.get(x),a.get(b),1-z/E))}return!1};function Tg(a){return a?a instanceof Zo?a.Gx():(wd(a),128>(299*Ma.j+587*Ma.u+114*Ma.o)/1e3):!1}function Dg(a,y){switch(y){case Ig:y=100*s0(Ma.j);var x=100*s0(Ma.u),b=100*s0(Ma.o);return cu.j=.4124564*y+.3575761*x+.1804375*b,cu.u=.2126729*y+.7151522*x+.072175*b,cu.o=.0193339*y+.119192*x+.9503041*b,cu.F=Ma.F,y=u0(cu.j/Bg[0]),x=u0(cu.u/Bg[1]),b=u0(cu.o/Bg[2]),td.j=116*x-16,td.u=500*(y-x),td.o=200*(x-b),td.F=cu.F,td.j=Math.min(100,Math.max(0,td.j+100*a)),a=(td.j+16)/116,y=a-td.o/200,cu.j=Bg[0]*eS(td.u/500+a),cu.u=Bg[1]*(td.j>mm*c0?Math.pow(a,3):td.j/mm),cu.o=Bg[2]*eS(y),cu.F=td.F,a=-.969266*cu.j+1.8760108*cu.u+.041556*cu.o,y=.0556434*cu.j+-.2040259*cu.u+1.0572252*cu.o,Ma.j=255*l0((3.2404542*cu.j+-1.5371385*cu.u+-.4985314*cu.o)/100),Ma.u=255*l0(a/100),Ma.o=255*l0(y/100),Ma.F=cu.F,Ma.j=Math.round(Ma.j),255Ma.j&&(Ma.j=0),Ma.u=Math.round(Ma.u),255Ma.u&&(Ma.u=0),Ma.o=Math.round(Ma.o),255Ma.o&&(Ma.o=0),"rgba("+Ma.j+", "+Ma.u+", "+Ma.o+", "+Ma.F+")";case nS:return a0(),ch.o=Math.min(100,Math.max(0,ch.o+100*a)),"hsla("+ch.j+", "+ch.u+"%, "+ch.o+"%, "+ch.F+")";default:Oe("Unknown color space: "+y)}}function wd(a){Og||(h0(),Og=!0);var y=d0;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,Ma.j=a[0],Ma.u=a[1],Ma.o=a[2],Ma.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Ma.j=0,Ma.u=0,Ma.o=0,Ma.F=1)}}function a0(){var a=Ma.j/255,y=Ma.u/255,x=Ma.o/255,b=Math.max(a,y,x),E=Math.min(a,y,x),z=b-E;if(E=(b+E)/2,z===0)var tt=a=0;else{switch(b){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*E-1))}ch.j=Math.round(tt),ch.u=Math.round(100*a),ch.o=Math.round(100*E),ch.F=Ma.F}function s0(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function l0(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function u0(a){return a>c0?Math.pow(a,1/3):(mm*a+16)/116}function eS(a){var y=a*a*a;return y>c0?y:(116*a-16)/mm}function hg(a,y){typeof a!="string"&&(a instanceof Zo||Oe("Value for "+y+" must be a color string or a Brush, not "+a))}function h0(){d0=Oa?new Rh(null,void 0,{willReadFrequently:!0}).context:null}Ae.Object.defineProperties(Zo.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&ni(this,a),this.na=a,this.start.Mc()&&(a===Cd?this.start=Xl:a===bh&&(this.start=no)),this.end.Mc()&&(a===Cd?this.end=ua:a===bh&&(this.end=no)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&ni(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&ni(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&ni(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&ni(this,a),0>a&&Pi(a,">= zero",Zo,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&ni(this,a),0>a&&Pi(a,">= zero",Zo,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&ni(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&ni(this,a),this.cr=a,this.xe=null}}}),Zo.prototype.isDark=Zo.prototype.Gx,Zo.prototype.darkenBy=Zo.prototype.Wy,Zo.prototype.lightenBy=Zo.prototype.Vz,Zo.prototype.addColorStop=Zo.prototype.addColorStop;var c0=216/24389,mm=24389/27,Bg=[95.047,100,108.883],d0=null,Ma=new yp,ch=new yp,cu=new yp,td=new yp,Og=!1;Zo.className="Brush";var Gd;Zo.Solid=Gd=new Ke(Zo,"Solid",0);var Cd;Zo.Linear=Cd=new Ke(Zo,"Linear",1);var bh;Zo.Radial=bh=new Ke(Zo,"Radial",2);var Rg;Zo.Pattern=Rg=new Ke(Zo,"Pattern",4);var Ig;Zo.Lab=Ig=new Ke(Zo,"Lab",5);var nS;Zo.HSL=nS=new Ke(Zo,"HSL",6),Zo.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 b=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>b.length&&(b="0"+b),2>a.length&&(a="0"+a),"#"+y+b+a},Zo.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;Og||(h0(),Og=!0);var y=d0;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)},Zo.lighten=function(a){return $y(a)},Zo.lightenBy=$y,Zo.darken=function(a){return tS(a)},Zo.darkenBy=tS,Zo.mix=o0,Zo.isDark=Tg;function _s(){this.xa="Base"}_s.prototype.measure=function(){},_s.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},_s.prototype.arrange=function(){},_s.prototype.Ly=function(a,y,x,b,E,z){a.arrange(y,x,b,E,z)},_s.prototype.iA=function(a){a.Uj()},_s.prototype.gc=function(){},Ae.Object.defineProperties(_s.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Dn}}}),_s.prototype.remeasureObject=_s.prototype.iA,_s.prototype.arrangeElement=_s.prototype.Ly,_s.prototype.measureElement=_s.prototype.Yz,_s.className="PanelLayout";function vm(){this.xa="Base"}ae(vm,_s),vm.prototype.measure=function(a,y,x,b,E,z,tt){var rt=b.length;a=bd(a);for(var at=0;atbi&&(ol=Math.max(bi-Ff,0));var Kv=xn.oa===0;xn.oc=xn.oc+ol,xn.actual=xn.oa+ol,bi=Math.max(bi-(ol+(Kv?Ff:0)),0)}if(zu.columnSpan===1&&(ou===gn||ou===Ji)){xn=a.Eb(ru);var am=xn.Wc();ol=Math.max($f-xn.actual,0),ol+am>ii&&(ol=Math.max(ii-am,0));var Hy=xn.oa===0;xn.oc=xn.oc+ol,xn.actual=xn.oa+ol,ii=Math.max(ii-(ol+(Hy?am:0)),0)}Nf&&zu.Uj()}}}}}Fi(ee);var ud=0,Ed=0;z=a.columnCount;for(var Cg=0;Cg=a.rowCount);rf++)xn=a.Fb(xs.row+rf),ol=0,ol=ou===dn||ou===Ji?Math.max(xn.minimum,wc[xs.row+rf]===0?xn.maximum:Math.min(wc[xs.row+rf],xn.maximum)):Math.max(xn.minimum,isNaN(xn.Hc)?xn.maximum:Math.min(xn.Hc,xn.maximum)),Nd.height+=ol,th+=xn.minimum;for(var Gh=1;Gh=a.columnCount);Gh++)xn=a.Eb(xs.column+Gh),ol=0,ol=ou===dn||ou===Ri?Math.max(xn.minimum,kh[xs.column+Gh]===0?xn.maximum:Math.min(kh[xs.column+Gh],xn.maximum)):Math.max(xn.minimum,isNaN(xn.Hc)?xn.maximum:Math.min(xn.Hc,xn.maximum)),Nd.width+=ol,Jv+=xn.minimum;xl.width+=Nd.width,xl.height+=Nd.height;var fp=xs.margin,Rf=fp.right+fp.left,lm=fp.top+fp.bottom;xs.measure(xl.width,xl.height,Jv,th);for(var gp=xs.measuredBounds,Gc=Math.max(gp.width+Rf,0),ig=Math.max(gp.height+lm,0),If=0,pp=0;pp=a.rowCount);pp++)xn=a.Fb(xs.row+pp),If+=xn.total||0;if(If=of)&&!(xs.row+Fd>=a.rowCount);Fd++){xn=a.Fb(xs.row+Fd);var sf=xn.oa||0,rg=af(xs,xn,cd);xn.actual=Math.min(xn.maximum,sf+rg),xn.oa!==sf&&(of-=xn.oa-sf)}for(;0Cc&&(xn.actual=Math.min(xn.maximum,Cc+of),xn.oa!==Cc&&(of-=xn.oa-Cc)),xn.index===0)break;xn=a.Fb(xn.index-1)}}for(var Mg=0,lf=0;lf=a.columnCount);lf++)xn=a.Eb(xs.column+lf),Mg+=xn.total||0;if(Mg=Eg)&&!(xs.column+og>=a.columnCount);og++){xn=a.Eb(xs.column+og);var um=xn.oa||0,Zy=Td(xs,xn,Gy);xn.actual=Math.min(xn.maximum,um+Zy),xn.oa!==um&&(Eg-=xn.oa-um)}for(;0Qv&&(xn.actual=Math.min(xn.maximum,Qv+Eg),xn.oa!==Qv&&(Eg-=xn.oa-Qv)),xn.index===0)break;xn=a.Eb(xn.index-1)}}}}Fi(ie),hn.free(Nd),hn.free(xl),wc!==void 0&&Fi(wc),kh!==void 0&&Fi(kh);var Ag=0,kg=0,qv=a.desiredSize,gx=a.maxSize;ou=Mu(a,!0);var hm=Ed=ud=0,cm=0;z=a.columnCount;for(var _v=0;_v=a.rowCount);xn++){var cr=a.Fb(ee+xn);cr.oa!==0&&(Gt.height+=cr.total)}for(xn=1;xn=a.columnCount);xn++)cr=a.Eb(he+xn),cr.oa!==0&&(Gt.width+=cr.total);var ir=Ce.oa+Gt.width,Lo=ie.oa+Gt.height;xn=rt,cr=at;var xa=ir,rl=Lo,ll=rt,iu=at,ol=ir,$d=Lo;rt+ir>x.width&&(ol=Math.max(x.width-rt,0)),at+Lo>x.height&&($d=Math.max(x.height-at,0));var Os=mi.alignment;if(Os.Xb()){Os=a.defaultAlignment,Os.sb()||(Os=no);var Sc=Os.x,ru=Os.y,tf=Os.offsetX;Os=Os.offsetY;var gh=Ce.alignment,Hh=ie.alignment;gh.sb()&&(Sc=gh.x,tf=gh.offsetX),Hh.sb()&&(ru=Hh.y,Os=Hh.offsetY)}else Sc=Os.x,ru=Os.y,tf=Os.offsetX,Os=Os.offsetY;(isNaN(Sc)||isNaN(ru))&&(ru=Sc=.5,Os=tf=0),gh=Wn.width,Hh=Wn.height;var qu=mi.margin,zu=qu.left+qu.right,Nf=qu.top+qu.bottom,xc=gc(mi,ie,Ce,!1);!isNaN(mi.desiredSize.width)||xc!==dn&&xc!==Ri||(gh=Math.max(ir-zu,0)),!isNaN(mi.desiredSize.height)||xc!==dn&&xc!==Ji||(Hh=Math.max(Lo-Nf,0)),ir=mi.maxSize,Lo=mi.minSize,gh=Math.min(ir.width,gh),Hh=Math.min(ir.height,Hh),gh=Math.max(Lo.width,gh),Hh=Math.max(Lo.height,Hh),ir=Hh+Nf,xn+=xa*Sc-(gh+zu)*Sc+tf+qu.left,cr+=rl*ru-ir*ru+Os+qu.top,mi.visible&&(ps(ll,iu,ol,$d,xn,cr,Wn.width,Wn.height)?mi.arrange(xn,cr,gh,Hh):mi.arrange(xn,cr,gh,Hh,new en(ll,iu,ol,$d)))}}}for(hn.free(Gt),a=0;a=x&&(x=1);var b=a.gridCellSize,E=b.width;b=b.height;var z=a.naturalBounds,tt=a.actualBounds,rt=z.width,at=z.height,st=Math.ceil(rt/E),ut=Math.ceil(at/b),ft=a.gridOrigin,vt=ft.x;ft=ft.y,y.save(),y.beginPath(),y.rect(0,0,rt,at),y.clip(),y.Se();for(var Ct=[],Et=a.O.s,Nt=Et.length,Qt=0;Qtie)){Gt=p0(Gt.figure);for(var he=0;heie&&ee.push(Ce))}}}}for(Et=a.O.s,Nt=Et.length,Qt=0;QtE*Gt*x))){if(ie=We.segmentIndex,(!isFinite(ie)||isNaN(ie))&&(ie=0),0>ie&&(ie=Gt-Math.min(-ie,Gt)),ie=Math.round(ie%Gt),Gt=We.opacity,he=1,Gt!==1){if(Gt===0)continue;he=y.globalAlpha,y.globalAlpha=he*Gt}Ce=Ct[Qt];var ii=!1,bi=We.strokeDashArray;if(bi!==null&&(ii=!0,y.js(bi,We.strokeDashOffset)),We.figure==="LineV"&&We.stroke!==null&&0y)return a%y===x;if(a%y!==x)return!1;y=b.length;for(var E=0;Eft)ee.measure(1/0,1/0,0,0),ie=ee.measuredBounds,x.ed(ie),Ct.push(ie);else{var he=ee.segmentIndex,Ce=ee.segmentFraction,We=ee.alignmentFocus;We.Mc()&&(We=no);var ii=ee.segmentOrientation,bi=ee.segmentOffset;if(isNaN(he)){var mi=at.ua;ie=Si(),mi.Qu(Ce,ie);var Wn=Zt.allocAt(ie[0],ie[1]);if(Wn.add(at.i(0)),mi.type===Vn.j?Wn.offset(-mi.startX,-mi.startY):(mi=mi.figures.first(),mi!==null&&Wn.offset(-mi.startX,-mi.startY)),mi=ie[2],ii!==fu){var xn=at.computeAngle(ee,ii,mi);ee.Kb=xn}xn=Wn.x-y.x;var cr=Wn.y-y.y;Zt.free(Wn),Fi(ie)}else if(he<-ft||he>=ft)ie=Zt.alloc(),at.vg(),at.computeMidPoint(ie),mi=at.midAngle,ii!==fu&&(xn=at.computeAngle(ee,ii,mi),ee.Kb=xn),xn=ie.x-y.x,cr=ie.y-y.y,Zt.free(ie);else{if(xn=0,0<=he?(cr=ut.M(he),ie=heir+10?0<=he?mi.ab(cr):cr.ab(mi):ir>Wn+10?0<=he?ie.ab(xn):xn.ab(ie):0<=he?mi.ab(xn):xn.ab(mi)}else mi=0<=he?cr.ab(ie):ie.ab(cr);ii!==fu&&(xn=at.computeAngle(ee,ii,mi),ee.Kb=xn),xn=cr.x+(ie.x-cr.x)*Ce-y.x,cr=cr.y+(ie.y-cr.y)*Ce-y.y}ee.measure(1/0,1/0,0,0),ie=ee.measuredBounds,Wn=ee.naturalBounds;var Lo=0;ee instanceof Sr&&(Lo=ee.strokeWidth),ir=Wn.width+Lo;var xa=Wn.height+Lo;Et.reset(),Et.translate(-ie.x,-ie.y),Et.scale(ee.scale,ee.scale),Et.rotate(ii===fu?ee.angle:mi,ir/2,xa/2),ii!==Tp&&ii!==Bp||Et.rotate(90,ir/2,xa/2),ii!==Dp&&ii!==Op||Et.rotate(-90,ir/2,xa/2),ii===iv&&(45mi||225mi)&&Et.rotate(-mi,ir/2,xa/2),Wn=new en(0,0,ir,xa),Nt.xi(Wn,We),Et.Ga(Nt),We=-Nt.x+Lo/2*ee.scale,ee=-Nt.y+Lo/2*ee.scale,Qt.assign(bi),Lo=isNaN(bi.x);var rl=isNaN(bi.y);if(Lo||rl){ir=ir/2+3,xa=xa/2+3;var ll=45<=mi&&135>=mi,iu=225<=mi&&315>=mi;ii===fu&&(ll||iu)?(Qt.x=rl?ir:bi.y,Qt.y=Lo?xa:bi.x,ll?0<=he||isNaN(he)&&.5>Ce||!Lo||(Qt.y=-xa):iu&&((0<=he||isNaN(he)&&.5>Ce)&&Lo&&(Qt.y=-xa),rl&&(Qt.x=-ir))):(Lo&&(Qt.x=0<=he||isNaN(he)&&.5>Ce?ir:-ir),rl&&(Qt.y=-xa),Qt.rotate(mi))}else Qt.rotate(mi);xn+=Qt.x,cr+=Qt.y,Wn.set(ie),Wn.h(xn+We,cr+ee,ie.width,ie.height),Ct.push(Wn),x.ed(Wn)}}if(tt!==null)for(b=tt.labelNodes;b.next();)b.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),Us(E,x.width||0,x.height||0),br.free(Et),Zt.free(Nt),Zt.free(Qt)}}}},Em.prototype.arrange=function(a,y){var x=y.length;if(a instanceof mo||a instanceof Gn){var b=a,E=null;a instanceof mo&&(E=a,b=E.adornedPart);var z=a instanceof mo?null:b.path,tt=a.j;if(tt.length!==0){var rt=0;if(z!==null&&rt=x)Et=Zt.alloc(),Ct=ft,Qt=Et,Ct.vg(),Ct.computeMidPoint(Qt),Ct=ft.midAngle,st!==fu&&(ft=ft.computeAngle(tt,st,Ct),tt.angle=ft),ft=Et.x,Qt=Et.y,Zt.free(Et);else{if(Nt=0,0<=rt?(Et=y.s[rt],Qt=rtee+10?0<=rt?Ct.ab(Et):Et.ab(Ct):ee>Gt+10?0<=rt?Qt.ab(Nt):Nt.ab(Qt):0<=rt?Ct.ab(Nt):Nt.ab(Ct)}else Ct=0<=rt?Et.ab(Qt):Qt.ab(Et);st!==fu&&(ft=ft.computeAngle(tt,st,Ct),tt.angle=ft),ft=Et.x+(Qt.x-Et.x)*at,Qt=Et.y+(Qt.y-Et.y)*at}if(vt.ys())tt.location=new Zt(ft,Qt);else{vt.Mc()&&(vt=no),Et=br.alloc(),Et.reset(),Et.scale(tt.scale,tt.scale),Et.rotate(tt.angle,0,0);var ie=tt.naturalBounds;Nt=en.allocAt(0,0,ie.width,ie.height),Gt=Zt.alloc(),Gt.xi(Nt,vt),Et.Ga(Gt),vt=-Gt.x,ee=-Gt.y;var he=ie.width,Ce=ie.height;ie=Zt.alloc(),ie.assign(ut);var We=isNaN(ut.x),ii=isNaN(ut.y);if(We||ii){he=he/2+3,Ce=Ce/2+3;var bi=45<=Ct&&135>=Ct,mi=225<=Ct&&315>=Ct;st===fu&&(bi||mi)?(ie.x=ii?he:ut.y,ie.y=We?Ce:ut.x,bi?0<=rt||isNaN(rt)&&.5>at||!We||(ie.y=-Ce):mi&&((0<=rt||isNaN(rt)&&.5>at)&&We&&(ie.y=-Ce),ii&&(ie.x=-he))):(We&&(ie.x=0<=rt||isNaN(rt)&&.5>at?he:-he),ii&&(ie.y=-Ce),ie.rotate(Ct))}else ie.rotate(Ct);ft+=ie.x,Qt+=ie.y,Et.pp(Nt),vt+=Nt.x,ee+=Nt.y,rt=Zt.allocAt(ft+vt,Qt+ee),tt.move(rt),Zt.free(rt),Zt.free(ie),Zt.free(Gt),en.free(Nt),br.free(Et)}}E!==null?E.Ul(!1):b.Ul(!1),b=TS(a),a.location.h(a.position.x+b.x,a.position.y+b.y),Zt.free(b)}};function iS(a,y,x,b){if(hh(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof mo&&a.type===Dn.Link&&a.adornedObject instanceof Sr&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof Gn&&a.ua!==null?(a=a.geometry.bounds,b.Ge(a.x-E/2,a.y-E/2,a.width+E,a.height+E)):a instanceof mo&&a.adornedPart.ua!==null?(a=a.adornedPart.ua.bounds,b.Ge(a.x-E/2,a.y-E/2,a.width+E,a.height+E)):b.Ge(-(E/2),-(E/2),y+E,x+E),E=b.desiredSize,E.w()||b.ua===null?b.dc.h(0,0,E.width,E.height):b.dc.assign(b.ua.bounds),Gs(b,!1)}}function xp(){this.xa="Base"}ae(xp,_s),xp.prototype.measure=function(a,y,x,b,E,z,tt){var rt=a.Pb();a.graduatedBounds=[];var at=rt.margin,st=at.right+at.left,ut=at.top+at.bottom;rt.measure(y,x,z,tt);var ft=rt.measuredBounds,vt=new en(-at.left,-at.top,Math.max(ft.width+st,0),Math.max(ft.height+ut,0));a.graduatedBounds.push(vt),E.assign(vt);for(var Ct=rt.geometry,Et=rt.strokeWidth,Nt=Ct.flattenedSegments,Qt=Ct.flattenedLengths,Gt=Ct.flattenedTotalLength,ee=Nt.length,ie=0,he=0,Ce=Si(),We=0;Weir&&(ir+=360),bi.push(ir)}ie=xn,he=cr}Ce.push(bi)}if(a.graduatedIntervals===null){for(var Lo=[],xa=a.O.s,rl=xa.length,ll=0;ll$d)){for(var Os=0;Os$d&&ol.push(ru)}}}}}a.graduatedIntervals=Lo}var tf=a.graduatedIntervals,gh=a.O.s,Hh=gh.length,qu=0,zu=0,Nf=Gt;a.graduatedMarks=[];for(var xc,ap=0;apom*ou*Gt/a.graduatedRange&&_u.graduatedSkip===null)){var wg=Qt[0][0],jc=0,ju=0;zu=Gt*_u.graduatedStart-1e-4,Nf=Gt*_u.graduatedEnd+1e-4;var $f=om*ou,$u=a.graduatedTickBase;if($ua.graduatedMin+$f&&($u-=Math.floor(($u-a.graduatedMin)/$f)*$f);for(var Kv=tf[ap],am=$u,Hy=1e-6*a.graduatedMax,ud=1;$u<=a.graduatedMax+Hy;ud++){t:{for(var Ed=Kv.length,Cg=0;Cg-sp){var Df=!1;break t}}Df=!0}if(Df&&($u>a.graduatedMax&&($u=a.graduatedMax),_u.graduatedSkip===null||_u instanceof Ca&&!_u.graduatedSkip($u,_u)||_u instanceof Sr&&!_u.graduatedSkip($u,_u))&&(qu=($u-a.graduatedMin)*Gt/a.graduatedRange,qu>Gt&&(qu=Gt),zu<=qu&&qu<=Nf)){for(var hd=Ce[jc][ju],ef=Qt[jc][ju];jcwg&&juAd&&.4995Ad?0Ad||.9995bg){var up=1-Math.abs(.5-Ad);hd=(Pc*up+Wc*(1-up))%360;break t}}}hd=Pc}if(_u instanceof Ca){var rc="";_u.graduatedFunction!==null?(rc=_u.graduatedFunction($u,_u),rc=rc!=null?rc.toString():""):rc=(+$u.toFixed(2)).toString(),rc!==""&&xc.push({$l:lp,angle:hd,text:rc})}else xc.push({$l:lp,angle:hd})}$u=am+ud*$f}}}a.graduatedMarks.push(xc)}Fi(Ce);var xl=a.graduatedMarks;if(xl!==null)for(var sm=b.length,yu=0;yuoc;oc++){switch(oc){case 0:Wu.h(Nd,wc);break;case 1:Wu.h(Nd+hp,wc);break;case 2:Wu.h(Nd,wc+ng);break;case 3:Wu.h(Nd+hp,wc+ng)}Wu.rotate(xs+Rs.angle),Wu.offset(Yv,dp),cp===0&&oc===0?kh.h(Wu.x,Wu.y,0,0):kh.Ye(Wu),Wu.offset(-Yv,-dp),Wu.rotate(-xs-Rs.angle)}Zt.free(Wu),kd.graduatedBounds!==null&&kd.graduatedBounds.push(kh),Aa(nf,kh.x,kh.y,kh.width,kh.height)}else if(Rs instanceof Ca){var Wh=a,Jv=E;Wh.temporaryTextBlock===null&&(Wh.temporaryTextBlock=new Ca);var th=Wh.temporaryTextBlock;yS(th,Rs);var rf=Rs.alignmentFocus;rf.Mc()&&(rf=Xl);for(var Gh=Rs.segmentOrientation,fp=Rs.segmentOffset,Rf=new en,lm=0,gp=0,Gc=0,ig=0,If=0,pp=Su.length,of=0;ofGc||225Gc)&&Cc.rotate(-Gc,sf/2,rg/2);var Mg=en.allocAt(0,0,sf,rg),lf=Zt.alloc();lf.xi(Mg,rf),Cc.Ga(lf);var Eg=-lf.x,Gy=-lf.y,Td=Zt.alloc();Td.assign(fp),isNaN(Td.x)&&(Td.x=sf/2+3),isNaN(Td.y)&&(Td.y=-(rg/2+3)),Td.rotate(Gc),lm+=Td.x+Eg,gp+=Td.y+Gy;var og=new en(lm,gp,af.width,af.height),um=new en(af.x,af.y,af.width,af.height),Zy=new en(Fd.x,Fd.y,Fd.width,Fd.height);cd.Sz=ig,cd.lineCount=th.lineCount,cd.lines=[th.Cb,th.Ih,th.df,th.Le,th.Qc,th.Qb,th.ze],cd.actualBounds=og,cd.measuredBounds=um,cd.naturalBounds=Zy,of===0?Rf.assign(og):Rf.ed(og),Zt.free(Td),Zt.free(lf),en.free(Mg),br.free(Cc)}Wh.graduatedBounds!==null&&Wh.graduatedBounds.push(Rf),Aa(Jv,Rf.x,Rf.y,Rf.width,Rf.height)}Gs(Rs,!1)}}},xp.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var b=a.Pb(),E=a.graduatedMarks;if(E!==null){var z=a.graduatedBounds,tt=0,rt=z[tt];tt++,b!==null&&b.arrange(rt.x-x.x,rt.y-x.y,rt.width,rt.height);for(var at=y.length,st=0;st=tt&&(tt=1);for(var rt=z.actualBounds,at=a.O.s,st=a.graduatedMarks,ut=at.length,ft=0;fta.graduatedTickUnit*vt.interval*z.geometry.flattenedTotalLength/a.graduatedRange*tt&&vt.graduatedSkip===null)){var Nt=vt.measuredBounds,Qt=vt.strokeWidth*vt.scale,Gt=vt.alignmentFocus;Gt.Mc()&&(Gt=Xl);for(var ee=0;eett.height)continue}else if(st.position>tt.width)continue;var ut=st.separatorStrokeWidth;isNaN(ut)&&(ut=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var ft=st.separatorStroke;if(ft===null&&(ft=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ut!==0&&ft!==null){ys(a,y,ft,!1,!1,tt,z),ft=!1;var vt=st.separatorDashArray;vt===null&&(vt=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),vt!==null&&(ft=!0,y.js(vt,0)),y.beginPath(),vt=st.position+ut,x?vt>tt.height&&(ut-=vt-tt.height):vt>tt.width&&(ut-=vt-tt.width),st=st.position+ut/2,y.lineWidth=ut,ut=a.yb,x?(st+=ut.top,vt=tt.width-ut.right,y.moveTo(ut.left,st),y.lineTo(vt,st)):(st+=ut.left,vt=tt.height-ut.bottom,y.moveTo(st,ut.top),y.lineTo(st,vt)),y.stroke(),y.Se(),ft&&y.fs()}}}}function Am(a,y,x,b,E){for(var z=b.length,tt=a.actualBounds,rt=a.naturalBounds,at=oS(a,!0),st=oS(a,!1),ut=0;utvt)){var Ct=ft.Wc(),Et=ft.separatorStrokeWidth;isNaN(Et)&&(Et=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Nt=ft.separatorStroke;Nt===null&&(Nt=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(Nt===null||ft.index===(x?at:st))&&(Et=0),Ct-=Et,Et=ft.position+Et,Ct+=ft.actual,Et+Ct>vt&&(Ct=vt-Et),0>=Ct||(vt=a.yb,ys(a,y,ft.background,!0,!1,rt,tt),x?y.fillRect(vt.left,Et+vt.top,tt.width-(vt.left+vt.right),Ct):y.fillRect(Et+vt.left,vt.top,Ct,tt.height-(vt.top+vt.bottom)))}}}}function oS(a,y){for(var x=y?a.rowCount:a.columnCount,b=0;bb&&E.set(Et),Zt.free(Et)),Zt.free(ut),z&&E.transform(tt),st},bt.Gj=function(){for(var a=this.O.s,y=a.length,x=0;xx||z>b)&&(this.v(),this.measure(y>x?x:y,z>b?b:z,0,0));break;case dn:this.v(!0),this.measure(x+rt,b+tt,0,0);break;case Ri:this.v(!0),this.measure(x+rt,z+tt,0,0);break;case Ji:this.v(!0),this.measure(y+rt,b+tt,0,0)}}this.na.arrange(this,E,this.jg)}},bt.gh=function(a){var y=this.naturalBounds,x=bd(this);if(ps(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var b=y.length,E=Zt.allocAt(0,0);b--;){var z=y[b];if((z.visible||z===x)&&(Ho(E.set(a),z.transform),z.ca(E)))return Zt.free(E),!0}return Zt.free(E),!(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,b=0;bvt.width||ft.y>vt.height||0>ft.x+ft.width||0>ft.y+ft.height||(ft=ut,ut=ut instanceof Dn?ut:null,vt=br.alloc(),vt.set(tt),(ut!==null?ut.Cf(a,y,x,b,E,vt):il(ft,a,b,vt))&&(y!==null&&(ft=y(ft)),ft===null||x!==null&&!x(ft)||E.add(ft)),br.free(vt))}}return z===void 0&&br.free(tt),b}return z===void 0&&br.free(tt),!1};function m0(a,y,x,b){for(var E=a.O.s,z=E.length;z--;){var tt=E[z];if(tt.visible){var rt=tt.actualBounds,at=a.naturalBounds;rt.x>at.width||rt.y>at.height||0>rt.x+rt.width||0>rt.y+rt.height||(tt instanceof Dn&&m0(tt,y,x,b),y!==null&&(tt=y(tt)),tt===null||x!==null&&!x(tt)||b.add(tt))}}}bt.og=function(a,y,x,b,E,z){if(this.pickable===!1)return!1;x===void 0&&(x=null),b===void 0&&(b=null);var tt=this.naturalBounds,rt=this.se(),at=rt?a:Ho(Zt.allocAt(a.x,a.y),this.transform),st=rt?y:Ho(Zt.allocAt(y.x,y.y),this.transform),ut=at.Bf(st),ft=0Qt.width||Nt.y>Qt.height||0>Nt.x+Nt.width||0>Nt.y+Nt.height))&&(Et.se()?(Nt=Et.transform,Ho(at.set(a),Nt),Ho(st.set(y),Nt)):(at.set(a),st.set(y)),Nt=Et,Et=Et instanceof Dn?Et:null,(Et!==null?Et.og(at,st,x,b,E,z):Nt.tx(at,st,E))&&(x!==null&&(Nt=x(Nt)),Nt===null||b!==null&&!b(Nt)||z.add(Nt)))}}Zt.free(at),Zt.free(st)}return E?ft:tt}return!1};function v0(a){var y=null;return a instanceof Sr&&(y=a.spot1,y===al&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Ns),y}function y0(a){var y=null;return a instanceof Sr&&(y=a.spot2,y===al&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=Za),y}bt.add=function(a){for(var y=[],x=0;x=E.count&&a>=E.count)return;E.mb(z),b=z}else Oe("element "+y.toString()+" has panel "+x.toString()+" but is not contained by it.")}(0>a||a>E.count)&&(a=E.count),E.Gb(a,y),(a===0||y.isPanelMain)&&(this.$g=null),hh(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof Dn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Nm(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof ui&&(x.Te=!0),x.Te&&x instanceof ui&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(us,"elements",this,y,null,b,null),x.cb(Ha,"elements",this,null,y,null,a)))};function S0(a,y){a.l=y?a.l|16777216:a.l&-16777217}bt.remove=function(a){for(var y=this.O.s,x=y.length,b=-1,E=0;Ea&&Pi(a,">= 0",Dn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Zs;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(Ha,"rowdefs",this,null,x,null,a)}return y[a]},bt.oA=function(a){if(0>a&&Pi(a,">= 0",Dn,"removeRowDefinition:idx"),this.rowCount!==0){a=Math.round(a);var y=this.rowDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(us,"rowdefs",this,x,null,a,null),this.v()}}};function hS(a,y,x){var b=a.rowDefs;if(!(0>y)){if(b[y]=x instanceof Zs?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}bt.Eb=function(a){0>a&&Pi(a,">= 0",Dn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Zs;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(Ha,"coldefs",this,null,x,null,a)}return y[a]},bt.jA=function(a){if(0>a&&Pi(a,">= 0",Dn,"removeColumnDefinition:idx"),this.columnCount!==0){a=Math.round(a);var y=this.colDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(us,"coldefs",this,x,null,a,null),this.v()}}};function cS(a,y,x){var b=a.colDefs;if(!(0>y)){if(b[y]=x instanceof Zs?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.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&&Fm(y,a),this},bt.Hy=function(a,y){return(a=this.Fb(a))&&Fm(a,new Zs(y)),this},bt.By=function(a,y){return(a=this.Eb(a))&&Fm(a,new Zs(y)),this},bt.nz=function(a){if(0>a||this.type!==Dn.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,b=x.length,E=this.topIndex;Ea||this.type!==Dn.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,b=x.length,E=this.leftIndex;Ea;)this.pc(this.O.length-1,!1);fS(this,this.itemArray)};function fS(a,y){var x=Pp(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 b=0;bx)){var E=P0(a,y);if(E=w0(a,E),E!==null){if(Ih(E),E=E.copy(),E.l&16777216){var z=a.ih();z!==null&&S0(z,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new si),a.ge.add(y,E)),z=x+Pp(a),a.Gb(z,E),b&&(E.ub=y,x0(a,z,x),E.ub=null),E.data=y}}}function x0(a,y,x){for(a=a.O;ya&&Pi(a,">= 0",Dn,"padding"),a=new qi(a)):(0>a.left&&Pi(a.left,">= 0",Dn,"padding:value.left"),0>a.right&&Pi(a.right,">= 0",Dn,"padding:value.right"),0>a.top&&Pi(a.top,">= 0",Dn,"padding:value.top"),0>a.bottom&&Pi(a.bottom,">= 0",Dn,"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:Cl},set:function(a){typeof a=="number"&&(a=new qi(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new Lh),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 Zo)&&(a instanceof Zo&&a.freeze(),this.T===null&&(this.T=new Lh),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 Lh),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,b=0,E=0;Ea)&&Oe("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Lh),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)&&Oe("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Lh),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 Wi&&!(this instanceof mo);Ih(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof Gn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Wi&&(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),b!==null&&b.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 lg),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&yx(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&ly(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&sy(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||fS(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 si}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Wi||a.isPanelMain)&&Oe("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(););Ar(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&&(Ar(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 dr&&(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&&Nm(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))}}}),Ae.Object.defineProperties(Dn,{Position:{get:function(){return _h.I("Position")}},Horizontal:{get:function(){return _h.I("Horizontal")}},Vertical:{get:function(){return _h.I("Vertical")}},Spot:{get:function(){return _h.I("Spot")}},Auto:{get:function(){return _h.I("Auto")}},Table:{get:function(){return _h.I("Table")}},Viewbox:{get:function(){return _h.I("Viewbox")}},TableRow:{get:function(){return _h.I("TableRow")}},TableColumn:{get:function(){return _h.I("TableColumn")}},Link:{get:function(){return _h.I("Link")}},Grid:{get:function(){return _h.I("Grid")}},Graduated:{get:function(){return _h.I("Graduated")}}}),Dn.prototype.rebuildItemElements=Dn.prototype.mv,Dn.prototype.findItemPanelForData=Dn.prototype.sx,Dn.prototype.updateTargetBindings=Dn.prototype.La,Dn.prototype.copyTemplate=Dn.prototype.Uy,Dn.prototype.graduatedValueForPoint=Dn.prototype.Gz,Dn.prototype.graduatedPointForValue=Dn.prototype.Fz,Dn.prototype.findColumnForLocalX=Dn.prototype.fz,Dn.prototype.findRowForLocalY=Dn.prototype.nz,Dn.prototype.addColumnDefinition=Dn.prototype.By,Dn.prototype.addRowDefinition=Dn.prototype.Hy,Dn.prototype.addRowColumnDefinition=Dn.prototype.Gy,Dn.prototype.removeColumnDefinition=Dn.prototype.jA,Dn.prototype.getColumnDefinition=Dn.prototype.Eb,Dn.prototype.removeRowDefinition=Dn.prototype.oA,Dn.prototype.getRowDefinition=Dn.prototype.Fb,Dn.prototype.removeAt=Dn.prototype.mb,Dn.prototype.remove=Dn.prototype.remove,Dn.prototype.insertAt=Dn.prototype.Gb,Dn.prototype.elt=Dn.prototype.M,Dn.prototype.add=Dn.prototype.add,Dn.prototype.findObject=Dn.prototype.fb,Dn.prototype.findInVisualTree=Dn.prototype.Nl,Dn.prototype.walkVisualTreeFrom=Dn.prototype.qm,Dn.prototype.findMainElement=Dn.prototype.Pb;var gS=!1,pS=null,_h=new si;Dn.className="Panel",Dn.definePanelLayout=Ic,Ic("Position",new vm),Ic("Vertical",new Sm),Ic("Auto",new Pm),Ic("Link",new Em);function Ld(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}Ld.prototype.copy=function(){var a=new Ld;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},Ld.className="GradPanelSettings";function Lh(){this.Pc=[],this.Oc=[],this.j=this.ob=Dm,this.hb=this.Hb=0,this.Qp=Cl,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}Lh.prototype.copy=function(a){for(var y=new Lh,x=this.Pc,b=x.length,E=y.Pc,z=0;za&&Pi(a,">= 0",Zs,"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",Zs,"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",Zs,"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",Zs,"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 qi(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&&hg(a,"RowColumnDefinition.separatorStroke"),a instanceof Zo&&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,b=0,E=0;EE)){var z=b.measuredBounds,tt=Math.max(1,z.width);z=z.height;for(var rt=x[0],at=x[1],st,ut,ft,vt,Ct,Et,Nt=0,Qt=Si(),Gt=2;Gtft&&(ft=1),E=x=ft,st=tt/2,ut=st!==0,Gt=0,Et=Qt[Gt],ft=Et[0],Ct=Et[1],vt=Et[2],Et=Et[3];for(var ee=0;.1<=Nt;){if(ee===0&&(ut?(E=x,E-=st,Nt-=st,ut=!1):E=x,E===0&&(E=1)),E>Nt){Fi(Qt);return}E>Et?(ee=E-Et,E=Et):ee=0;var ie=Math.sqrt(E*E/(1+vt*vt));if(0>ft&&(ie=-ie),rt+=ie,at+=vt*ie,a.translate(rt,at),a.rotate(Ct),a.translate(-(tt/2),-(z/2)),ee===0&&b.hh(a,y),a.translate(tt/2,z/2),a.rotate(-Ct),a.translate(-rt,-at),Nt-=E,Et-=E,ee!==0){if(Gt++,Gt===Qt.length){Fi(Qt);return}Et=Qt[Gt],ft=Et[0],Ct=Et[1],vt=Et[2],Et=Et[3],E=ee}}Fi(Qt)}}bt.hh=function(a,y){var x=this.xc,b=this.Ui;if(x!==null||b!==null){var E=this.ua;if(E!==null){a.yc();var z=this.actualBounds,tt=this.naturalBounds;b!==null&&ys(this,a,b,!0,!1,tt,z);var rt=this.part,at=this.ig;if(x===null||at!==0||rt===null||!this.isPanelMain&&rt.Pb()!==this||(at=rt.type===Dn.Link&&rt instanceof mo&&rt.category==="Selection"&&rt.adornedObject instanceof Sr&&rt.adornedPart.Pb()===rt.adornedObject?rt.adornedObject.strokeWidth:0),at===0&&(x=null),x!==null&&at!==0&&(ys(this,a,x,!1,!1,tt,z),a.lineWidth=at,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||b!==null&&b!=="transparent"||(rt=!1),tt=!1,at=this.strokeDashArray,at!==null&&(tt=!0,a.js(at,this.strokeDashOffset)),E.type===Vn.j)a.beginPath(),a.moveTo(E.startX,E.startY),a.lineTo(E.endX,E.endY),x!==null&&a.jk(),a.Se();else if(E.type===Vn.u){var st=E.startX;at=E.startY;var ut=E.endX,ft=E.endY;E=Math.min(st,ut);var vt=Math.min(at,ft);st=Math.abs(ut-st),at=Math.abs(ft-at),a.beginPath(),a.rect(E,vt,st,at),b!==null&&a.ng(b),x!==null&&(rt&&z&&$c(a),a.jk(),rt&&z&&Pd(a)),a.Se()}else if(E.type===Vn.F)st=E.startX,at=E.startY,ut=E.endX,ft=E.endY,E=Math.abs(ut-st)/2,vt=Math.abs(ft-at)/2,st=Math.min(st,ut)+E,at=Math.min(at,ft)+vt,a.beginPath(),a.moveTo(st,at-vt),a.bezierCurveTo(st+Ee.wg*E,at-vt,st+E,at-Ee.wg*vt,st+E,at),a.bezierCurveTo(st+E,at+Ee.wg*vt,st+Ee.wg*E,at+vt,st,at+vt),a.bezierCurveTo(st-Ee.wg*E,at+vt,st-E,at+Ee.wg*vt,st-E,at),a.bezierCurveTo(st-E,at-Ee.wg*vt,st-Ee.wg*E,at-vt,st,at-vt),a.closePath(),b!==null&&a.ng(b),x!==null&&(rt&&z&&$c(a),a.jk(),rt&&z&&Pd(a)),a.Se();else if(E.type===Vn.o)for(E=E.figures,at=E.length,vt=0;vtNt.sweepAngle,Ct!==null?Ct.endX:st.startX,Ct!==null?Ct.endY:st.startY)}else if(Ct=Jl(Nt,st),Qt=Ct.length,Qt===0)a.lineTo(Nt.centerX,Nt.centerY);else for(var Gt=0;Gt(x.startX-x.endX)*(a.x-x.endX)+(x.startY-x.endY)*(a.y-x.endY)||0>b)?!1:(en.free(z),Ee.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===Vn.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(-b,-b),z.ca(a))return en.free(z),!1;z.Bc(b,b)}return this.stroke!==null&&z.Bc(E,E),a=z.ca(a),en.free(z),a}if(x.type===Vn.F){tt=x.startX,E=x.startY,rt=x.endX;var at=x.endY;if(x=Math.min(tt,rt),y=Math.min(E,at),tt=Math.abs(rt-tt)/2,E=Math.abs(at-E)/2,x=a.x-(x+tt),y=a.y-(y+E),this.fill===null){if(tt-=b,E-=b,0>=tt||0>=E||1>=x*x/(tt*tt)+y*y/(E*E))return en.free(z),!1;tt+=b,E+=b}return this.stroke!==null&&(tt+=b,E+=b),en.free(z),0>=tt||0>=E?!1:1>=x*x/(tt*tt)+y*y/(E*E)}if(x.type===Vn.o)return en.free(z),this.fill===null?Lc(x,a.x,a.y,E):Vh(x,a,E,1=this.strokeWidth)ut=Ee.Ve(st.startX,st.startY,st.endX,st.endY,z,tt,rt,at,E);else{if(st.startX===st.endX?(b=ft,ut=0):(y=(st.endY-st.startY)/(st.endX-st.startX),ut=ft/Math.sqrt(1+y*y),b=ut*y),y=Si(),a=new Zt,Ee.Ve(st.startX+b,st.startY+ut,st.endX+b,st.endY+ut,z,tt,rt,at,a)&&y.push(a),a=new Zt,Ee.Ve(st.startX-b,st.startY-ut,st.endX-b,st.endY-ut,z,tt,rt,at,a)&&y.push(a),a=new Zt,Ee.Ve(st.startX+b,st.startY+ut,st.startX-b,st.startY-ut,z,tt,rt,at,a)&&y.push(a),a=new Zt,Ee.Ve(st.endX+b,st.endY+ut,st.endX-b,st.endY-ut,z,tt,rt,at,a)&&y.push(a),rt=y.length,rt===0)return Fi(y),!1;for(ut=!0,at=1/0,b=0;bMath.abs(x)){if(at=tt-ut-x*(z-b),0>a*a*x*x+st*st-at*at){E.x=NaN,E.y=NaN,ut=!1;break t}ft=Math.sqrt(a*a*x*x+st*st-at*at),rt=(-(a*a*x*at)+a*st*ft)/(st*st+a*a*x*x)+b,a=(-(a*a*x*at)-a*st*ft)/(st*st+a*a*x*x)+b,st=x*(rt-b)+at+ut,at=x*(a-b)+at+ut,Math.abs((z-rt)*(z-rt))+Math.abs((tt-st)*(tt-st))rt){E.x=NaN,E.y=NaN,ut=!1;break t}at=Math.sqrt(rt),rt=ut+at,at=ut-at,Math.abs(rt-tt)Math.abs(Et)?(Nt*=.5/Et,Et=.5):Nt!==0&&.5>Math.abs(Nt)&&(Et*=.5/Nt,Nt=.5),Gt-=Et,ee-=Nt;Ct.contains(Gt,ee);)Gt-=Et,ee-=Nt;for(E.x=rt,E.y=at,Nt=0;Ntx?a-x:x-a)<(y>b?y-b:b-y)?(a=ya||Ee.$(at.y,a))&&(at.yy||Ee.$(at.x,y))&&(at.x=a&&b<=y):(a=b&&x<=a)}bt.tx=function(a,y,x){function b(Qt,Gt){for(var ee=Qt.length,ie=0;ieE)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var E=a.Bf(y),z=E;if(1.5=E||er(y,z,0,-ft)>=E||er(y,z,0,ft)>=E||er(y,z,ut,0)>=E)}else if(y.type===Vn.o){if(st=y.bounds,z=st.x,rt=st.y,at=st.x+st.width,st=st.y+st.height,a.x>at&&a.xst&&a.yE&&_o(a.x,a.y,z,rt,at,rt)>E&&_o(a.x,a.y,at,st,z,st)>E&&_o(a.x,a.y,at,st,at,rt)>E)return!1;if(z=Math.sqrt(E),x){if(this.fill===null?Lc(y,a.x,a.y,z):Vh(y,a,z,!0,!1))return!0}else{for(x=y.figures,y=0;yE)return!1;for(rt=z.segments.s,at=rt.length,st=0;stE)return!1;break;case tl:var vt=Si();if(Ee.Qe(tt,ut,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.8,vt),tt=b(vt,a),Fi(vt),tt||(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>E))return!1;break;case lu:if(vt=Si(),Ee.ep(tt,ut,ft.point1X,ft.point1Y,ft.endX,ft.endY,.8,vt),tt=b(vt,a),Fi(vt),tt||(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>E))return!1;break;case Ss:case Cu:vt=ft.type===Ss?Jl(ft,z):Tu(ft,z,tt,ut);var Ct=vt.length;if(Ct===0){if(tt=ft.type===Ss?ft.centerX:ft.endX,ut=ft.type===Ss?ft.centerY:ft.endY,a.zd(tt,ut)>E)return!1;break}ft=null;for(var Et=Si(),Nt=0;Nt= 0",Sr,"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"',Sr,"strokeCap"):(Uf(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"',Sr,"strokeJoin"):(Uf(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){Uf(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,b=0,E=0;Ea?a=0:1a?a=0:1(ft*ft+ut*ut)*vt*vt&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Yu&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,ft=this.spacingBelow,this.flip){case lo:a.translate(E,0),a.scale(-1,1);break;case kr:a.translate(0,z),a.scale(1,-1);break;case ea:a.translate(E,z),a.scale(-1,-1)}if(a.yc(),ut=this.Gc,vt=(y+tt+ft)*ut,z>vt&&(b=this.verticalAlignment,b=b.y*z-b.y*vt+b.offsetY),ut===1&&this.ze!==null)ft=this.Cb,ft>E&&(ft=E),this.Oj(this.ze,a,0,b+y,E,tt,ft,x,rt,at,st);else if(this.Qc!==null&&this.Qb!==null)for(vt=0;vtE&&(Ct=E),b+=y,this.Oj(this.Qb[vt],a,0,b,E,tt,Ct,x,rt,at,st),b+=tt+ft}switch(this.flip){case lo:a.scale(-1,1),a.translate(-E,0);break;case kr:a.scale(1,-1),a.translate(0,-z);break;case ea:a.scale(-1,-1),a.translate(-E,-z)}}},bt.Oj=function(a,y,x,b,E,z,tt,rt,at,st,ut){var ft=0;if(rt)at==="left"?ft=0:at==="right"?ft=E-tt:at==="center"&&(ft=(E-tt)/2),y.fillRect(x+ft,b+.25*z,tt,1);else{if(at==="left"?ft=0:at==="right"?ft=E:at==="center"&&(ft=E/2),E=Rm!==null?Rm(this,z):.75*z,y.fillText(a,x+ft,b+E),a=z/20|0,a===0&&(a=1),at==="right"?ft-=tt:at==="center"&&(ft-=tt/2),st){rt=Im!==null?Im(this,z):.8*z,at=x+ft,st=b+rt,E=x+ft+tt,rt=b+rt;var vt=a;y.beginPath(),y.lineWidth=vt,y.moveTo(at,st),y.lineTo(E,rt),y.stroke(),y.Se(),y instanceof Yu&&y.ad.classList.add("gojs-td")}ut&&(ut=b+z-z/2.2|0,a%2!==0&&(ut+=.5),b=x+ft,z=ut,x=x+ft+tt,tt=ut,ft=a,y.beginPath(),y.lineWidth=ft,y.moveTo(b,z),y.lineTo(x,tt),y.stroke(),y.Se(),y instanceof Yu&&y.ad.classList.add("gojs-td"))}},bt.kk=function(a,y,x){if(!ge.prototype.kk.call(this,a,y,x))return!1;if(ys(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=this.Qb.length))){for(this.l|=16777216,st=this.Qb[at],y=Math.max(1,a-y);$h(st)>y&&1a.maxLines&&(a.l|=16777216))}function E0(a,y,x,b){var E=a.formatting===Lp;E&&(y=y.trim());var z=0,tt=a.Ae,rt=a.spacingAbove+a.spacingBelow;rt=Math.max(0,bp(a)+rt);var at=a.overflow===zm?SS(tt):0;if(a.Gc>=a.maxLines)b!==null&&b.h(0,rt);else if(tt=y,a.wrap===A0){a.Le=1;var st=$h(y);if(at===0||st<=x)a.Cb=Math.max(a.Cb,st),Cp(a,y,a.Cb),b!==null&&b.h(st,rt);else{for(z=jg(a,tt),tt=tt.substr(z.length),y=jg(a,tt),st=$h(z+y);0x&&1x;){var ft=1;for(st=$h(y.substr(0,ft)),ut=0;st<=x;)ft++,ut=st,st=$h(y.substr(0,ft));if(ft===1){var vt=st;z=Math.max(z,st)}else vt=ut,z=Math.max(z,ut);if(ft--,1>ft&&(ft=1),Cp(a,y.substr(0,ft),vt),at++,y=y.substr(ft),a.Gc+at>a.maxLines)break}for(ut=jg(a,tt),st=$h(y+ut);0a.maxLines))break}a.Le=Math.min(a.maxLines,at),a.Cb=Math.max(a.Cb,z),b!==null&&b.h(a.Cb,rt*a.Le)}}function jg(a,y){if(a.wrap===wS)return y.substr(0,1);for(var x=y.length,b=0,E=Sx;b=y.length?y:y.substr(0,b)}function $h(a){return Eu===null?8*a.length:Eu.measureText(a).width}function bp(a){if(a.df!==null)return a.df;var y=a.Ae;if(Eu===null){var x=16;return a.df=x}return F0[y]!==void 0&&5e3>bS?x=F0[y]:(x=1.3*Eu.measureText("M").width,F0[y]=x,bS++),a.df=x}function SS(a){if(Eu===null)return 6;if(jm[a]!==void 0&&5e3>T0)var y=jm[a];else y=Eu.measureText(Mp).width,jm[a]=y,T0++;return y}function xS(a,y){var x=a.ec.replace(/\r\n/g,` `).replace(/\r/g,` `),b=a.spacingAbove+a.spacingBelow;if(b=Math.max(0,bp(a)+b),x.length===0)return a.Cb=0,a.Gc=1,b;if(!a.isMultiline){var E=x.indexOf(` `,0);0<=E&&(x=x.substr(0,E))}E=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!==A0){a.Le=0;var at=hn.alloc();E0(a,z,y,at),E+=at.height,hn.free(at),a.Gc+=a.Le}else E0(a,z,y,null),E+=b,a.Gc++;a.Gc===a.maxLines&&(rt=!0)}z=tt+1}return a.Lq=E}Ae.Object.defineProperties(Ca.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"||(zc(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:gn},set:function(a){var y=this.flip;y!==a&&(zc(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:fd},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),zc(this),this.da.Yr=a,uu(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=hn.alloc();E0(this,this.ec,999999,a);var y=a.width;hn.free(a),a=xS(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Us(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:k0},set:function(a){var y=this.wrap;y!==a&&(zc(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:N0},set:function(a){var y=this.overflow;y!==a&&(zc(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&&hg(a,"TextBlock.stroke"),a instanceof Zo&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return bp(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&&(zc(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&&(zc(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 nd),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:1a?a=0:1=a&&Pi(a,"> 0",Ca,"maxLines"),zc(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 Rm=null,Im=null,A0=new Ke(Ca,"None",0),PS=new Ke(Ca,"WrapFit",1),k0=new Ke(Ca,"WrapDesiredSize",2),wS=new Ke(Ca,"WrapBreakAll",3),N0=new Ke(Ca,"OverflowClip",0),zm=new Ke(Ca,"OverflowEllipsis",1),Lp=new Ke(Ca,"FormatTrim",0),CS=new Ke(Ca,"FormatNone",0),Sx=/[ \u200b\u00ad]/,F0=new or,bS=0,jm=new or,T0=0,Mp="...",LS="",Eu=null,Hm=!1;Ca.className="TextBlock";function D0(){this.nc=!1,this.Hd=null,this.Xf=gn,this.gq=Lp,this.Jq=1/0,this.$q=N0,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=fd,this.$r=k0}D0.prototype.copy=function(){var a=new D0;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},Ca.getEllipsis=function(){return Mp},Ca.setEllipsis=function(a){Mp=a,jm=new or,T0=0},Ca.getBaseline=function(){return Rm},Ca.setBaseline=function(a){Rm=a},Ca.getUnderline=function(){return Im},Ca.setUnderline=function(a){Im=a},Ca.isValidFont=function(a){if(Hm||(Eu=Oa?new Rh(null).context:null,Hm=!0),Eu===null)return!0;var y=Eu.font;if(a===y||a==="10px sans-serif")return!0;Eu.font="10px sans-serif",Eu.font=a;var x=Eu.font;if(x!=="10px sans-serif")return Eu.font=y,!0;Eu.font="19px serif";var b=Eu.font;return Eu.font=a,x=Eu.font,Eu.font=y,x!==b},Ca.FormatNone=CS,Ca.FormatTrim=Lp,Ca.None=A0,Ca.OverflowClip=N0,Ca.OverflowEllipsis=zm,Ca.WrapBreakAll=wS,Ca.WrapDesiredSize=k0,Ca.WrapFit=PS;function nd(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}nd.prototype.copy=function(){var a=new nd;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},nd.className="GradElementSettings";function Au(a,y){ge.call(this),this.Eg=null,this.qo="",this.Xg=ka,this.Nk=dn,this.Zg=this.Hd=null,this.Mk=no,this.Xf=gn,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 Hg;ae(Au,ge),Au.prototype.cloneProtected=function(a){ge.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},Au.prototype.qb=function(a){a===gn||a===fi||a===_r?this.imageStretch=a:ge.prototype.qb.call(this,a)},Au.prototype.toString=function(){return"Picture("+this.source+")#"+Te(this)};function Wg(a){a===void 0&&(a=""),a!==""?Hg[a]&&(delete Hg[a],Wm--):(Hg=new or,Wm=0)}function MS(a,y){y.qy||(y.Fq=function(x){y.sq=!0,y.ln=!1;var b=y.Bg.copy();if(b!=null){for(b=b.iterator;b.next();){var E=b.value;E.N();var z=y.getAttribute("src")||"",tt=E.Og.I(z);if(tt!==null)for(var rt=tt.length,at=0;at=b.width&&(z=z+Et.offsetX+(ft*Et.x-b.width*Et.x)),vt>=b.height&&(tt=tt+Et.offsetY+(vt*Et.y-b.height*Et.y)),at=Math.min(b.width,ft),rt=Math.min(b.height,vt);break;case dn:ft=b.width,vt=b.height;break;case fi:case _r:Ct===fi?(Ct=Math.min(b.height/vt,b.width/ft),ft*=Ct,vt*=Ct):Ct===_r&&(Ct=Math.max(b.height/vt,b.width/ft),ft*=Ct,vt*=Ct,ft>=b.width&&(z=(z+Et.offsetX+(ft*Et.x-b.width*Et.x)/ft)*at),vt>=b.height&&(tt=(tt+Et.offsetY+(vt*Et.y-b.height*Et.y)/vt)*rt),at*=1/(ft/b.width),rt*=1/(vt/b.height),ft=b.width,vt=b.height)}Ct=this.Df()*y.scale;var Nt=ft*Ct*vt*Ct,Qt=at*rt/Nt,Gt=x.__goCache;Ct=null;var ee=xx;if(!E){if(x.sq&&Gt!==void 0&&4ee*ee)for(Gt.gi===null&&(AS(Gt,4,st,ut,x),AS(Gt,16,st,ut,x)),E=Gt.gi,st=E.length,ut=0;uta)&&(a=5),a=Math.min(a,y/3),a=Math.min(a,x/3);var b="rr"+y+","+x+","+a,E=Ee.Mf[b];if(E!==void 0)return E;var z=a*Ee.wg;return E=new Vn().add(new Is(a,0,!0).add(new ho(da,y-a,0)).add(new ho(tl,y,a,y-z,0,y,z)).add(new ho(da,y,x-a)).add(new ho(tl,y-a,x,y,x-z,y-z,x)).add(new ho(da,a,x)).add(new ho(tl,0,x-a,z,x,0,x-z)).add(new ho(da,0,a)).add(new ho(tl,a,0,0,z,z,0).close())),1E.x&&a.y>E.y&&a.rightE.x&&y.y>E.y&&y.right=x.maxSelectionCount)){this.G^=4096;var b=!1;if(x!==null){b=x.skipsUndoManager,x.skipsUndoManager=!0;var E=x.selection;E.ka(),a?E.add(this):E.remove(this),E.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=b)}}}},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&&(ku(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&&(ku(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&&(ku(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 Gn?(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&&(ku(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&&(ku(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&&(ku(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:Ks},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),ku(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&&(ku(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&&(ku(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:al},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),ku(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&&Oe("Cannot make a Group a member of itself: "+this.toString()),Oe("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?K0(y,this):this instanceof dr&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?V0(a,this):this instanceof dr&&x!==null&&x.ai.add(this),this.C(1),x!==null&&x.aa){var b=this.data,E=x.model;if(b!==null&&E.Xj()){var z=E.wa(a!==null?a.data:null);E.mp(b,z)}}if(b=this.containingGroupChanged,b!==null&&(E=!0,x!==null&&(E=x.aa,x.aa=!0),b(this,y,a),x!==null&&(x.aa=E)),this instanceof dr){for(x=new Pn,Sf(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof ui)for(b=b.linksConnected;b.next();)Vg(b.value)}if(this instanceof ui){for(x=this.linksConnected;x.next();)Vg(x.value);x=this.labeledLink,x!==null&&Vg(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&Vi(y,-1,a))}}else Oe("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&&(ku(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof ui&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(ku(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&&(ku(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:Xa},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),ku(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&&(ku(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&&(ku(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),Wi.prototype.invalidateLayout=Wi.prototype.C,Wi.prototype.findCommonContainingGroup=Wi.prototype.px,Wi.prototype.isMemberOf=Wi.prototype.Td,Wi.prototype.findTopLevelPart=Wi.prototype.sz,Wi.prototype.findSubGraphLevel=Wi.prototype.oz,Wi.prototype.ensureBounds=Wi.prototype.Va,Wi.prototype.getDocumentBounds=Wi.prototype.mi,Wi.prototype.findObject=Wi.prototype.fb,Wi.prototype.moveTo=Wi.prototype.moveTo,Wi.prototype.invalidateAdornments=Wi.prototype.Wb,Wi.prototype.clearAdornments=Wi.prototype.Ej,Wi.prototype.removeAdornment=Wi.prototype.Jf,Wi.prototype.addAdornment=Wi.prototype.bh,Wi.prototype.findAdornment=Wi.prototype.Pj,Wi.prototype.updateTargetBindings=Wi.prototype.La;var HS=!1;Wi.className="Part",Wi.LayoutNone=0,Wi.LayoutAdded=1,Wi.LayoutRemoved=2,Wi.LayoutShown=4,Wi.LayoutHidden=8,Wi.LayoutNodeSized=16,Wi.LayoutGroupLayout=32,Wi.LayoutNodeReplaced=64,Wi.LayoutStandard=127,Wi.LayoutAll=16777215;function mo(a,y){a===void 0||a instanceof _s||typeof a=="string"?Wi.call(this,a):(Wi.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)}ae(mo,Wi),mo.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},mo.prototype.updateRelationshipsFromData=function(){},mo.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Gn&&y instanceof Sr){y=x.path,x.Ul(a),a=y.geometry,x=this.O.s,y=x.length;for(var b=0;ba&&(a=1);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new Pn;x.add(this),YS(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===fc),y.Ue=!1}};function YS(a,y,x,b,E,z,tt){if(1a&&(a=2);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new Pn;x.add(this),QS(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===fc),y.Ue=!1}};function QS(a,y,x,b,E,z,tt){for(var rt=z===a?!1:a.isTreeExpanded,at=x?a.Mo():a.Sd(),st={};at.next();){var ut=at.value;if(ut.isTreeLink&&(rt||ut.fd||ut.bb(),ut=ut.To(a),ut!==null&&ut!==a&&!y.contains(ut))){if(y.add(ut),!rt){ut.Zb(!0),ut.oh();var ft=x?ut.Oo():ut.Po();st.vv=a,ft.all(function(vt){return function(Ct){return Ct===vt.vv||!Ct.isTreeExpanded}}(st))&&E.Cj(ut,z)}(2E&&(E=rt.right),rt.bottom>z&&(z=rt.bottom)}}return isFinite(x)&&isFinite(b)?a.h(x,b,E-x,z-b):(y=y.location,a.h(y.x,y.y,0,0)),a},Ae.Object.defineProperties(du.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new qi(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),du.className="Placeholder";function Gn(a){Wi.call(this,Dn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=fu,this.Om=0,this.Qm=fu,this.Rm=NaN,this.qj=Q0,this.po=.5,this.wd=null,this.Nb=new Ln().freeze(),this.Tg=this.Mg=null,this.ml=new en,this.ua=new Vn,this.u=this.o=this.Sf=this.Wf=null,this.su=new Zt,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}ae(Gn,Wi),Gn.prototype.cloneProtected=function(a){Wi.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=Gn.prototype,bt.Af=function(a){Wi.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&&Ju(y),a=a.toPort,a!==null&&Ju(a)},bt.qb=function(a){a.classType===Gn?(a.value&2)===2?this.routing=a:a===dh||a===Yd||a===Ug?this.curve=a:a===Np||a===tv||a===ev?this.adjusting=a:a!==Q0&&a!==fu&&Oe("Unknown Link enum value for a Link property: "+a):Wi.prototype.qb.call(this,a)},bt.Xc=function(){this.ba===null&&(this.ba=new mp)},bt.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),hu(a)||vf(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),hu(a)||vf(a)))},bt.zv=function(){return!1},bt.Av=function(){},bt.Zc=function(){return!1},Gn.prototype.computeAngle=function(a,y,x){return Gn.computeAngle(y,x)},Gn.computeAngle=function(a,y){switch(a){default:case fu:a=0;break;case Fp:a=y;break;case Tp:a=y+90;break;case Dp:a=y-90;break;case q0:a=y+180;break;case nv:a=Ee.bp(y),90a&&(a-=180);break;case Bp:a=Ee.bp(y+90),90a&&(a-=180);break;case Op:a=Ee.bp(y-90),90a&&(a-=180);break;case iv:if(a=Ee.bp(y),45a||225a)return 0;90a&&(a-=180)}return Ee.bp(a)};function Vg(a){var y=a.fromNode,x=a.toNode,b=null;if(y!==null?b=x!==null?y.px(x):y.containingGroup:x!==null?b=x.containingGroup:b=null,y=b,x=a.Ah,x!==y){x!==null&&K0(x,a),a.Ah=y,y!==null&&V0(y,a);var E=a.containingGroupChanged;if(E!==null){var z=!0,tt=a.diagram;tt!==null&&(z=tt.aa,tt.aa=!0),E(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=b}bt=Gn.prototype,bt.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Wi.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 $S(a,y){a.wd===null&&(a.wd=new Pn),a.wd.add(y),a.v()}bt.Vo=function(a){if(Wi.prototype.Vo.call(this,a),Jf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Um(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||Um(x,this,b)}Ap(this)}},bt.Wo=function(a){if(Wi.prototype.Wo.call(this,a),Jf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Xm(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||Xm(x,this,b)}kp(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))},Gn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Gn.prototype.move=function(a,y){var x=y?this.location:this.position,b=x.x;isNaN(b)&&(b=0);var E=x.y;for(isNaN(E)&&(E=0),b=a.x-b,E=a.y-E,y===!0?Wi.prototype.move.call(this,a,!1):(a=Zt.allocAt(x.x+b,x.y+E),Wi.prototype.move.call(this,a,!1),Zt.free(a)),Xd(this,b,E),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+b,x.y+E)},Gn.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},Gn.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},Gn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(Ea),a;if(y===1)return a.assign(this.i(0)),a;if(y===2){var x=this.i(0),b=this.i(1);return a.h((x.x+b.x)/2,(x.y+b.y)/2),a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===dh))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()===dh){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return Ee.ax(x.x,x.y,b.x,b.y,b.x,b.y,E.x,E.y,a),a}if(b=(y-1)/3|0,x=3*(b/2|0),b%2===1){b=this.i(x),E=this.i(x+1);var z=this.i(x+2);x=this.i(x+3),Ee.ax(b.x,b.y,E.x,E.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,E=z=b=0;bx/2));)b+=E,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-b)):a.h(y.x,y.y+(x/2-b)):1>Math.abs(y.y-z.y)?y.x>z.x?a.h(y.x-(x/2-b),y.y):a.h(y.x+(x/2-b),y.y):(x=(x/2-b)/E,a.h(y.x+x*(z.x-y.x),y.y+x*(z.y-y.y))),a},Gn.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()===dh))return this.ua.wx(.5);if(this.computeCurve()===dh&&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 b=this.i(x+2);return x=this.i(x+3),Ee.My(a.x,a.y,y.x,y.y,b.x,b.y,x.x,x.y)}if(0b/2));)E+=z,x++;if(y=this.i(x),b=this.i(x+1),1>Math.abs(y.x-b.x)&&1>Math.abs(y.y-b.y)){if(0Math.abs(y.x-b.x))return y.y>b.y?270:90;if(1>Math.abs(y.y-b.y))return y.x>b.x?180:0}return y.ab(b)},bt=Gn.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 Zt(y,x))},bt.Kz=function(a,y){this.Nb.Gb(a,y)},bt.m=function(a,y,x){this.Nb.Gb(a,new Zt(y,x))},bt.ne=function(a){this.Nb.add(a)},bt.yf=function(a,y){this.Nb.add(new Zt(a,y))},bt.pv=function(a){this.Nb.mb(a)},bt.Fj=function(){this.Nb.clear()};function Xd(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 b=a.fd,E=new Ln,z=a.Nb.iterator;z.next();){var tt=z.value;E.add(new Zt(tt.x+y,tt.y+x).freeze())}E.freeze(),z=a.Nb,a.Nb=E,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),uu(a)),b?Jm(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),tt!==null&&tt.animationManager.zb&&Th(tt.animationManager,a,E),a.g("points",z,E)}}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,b=1/0,E=a.s,z=E.length,tt=0;ttst&&(ft=-ft),Nt=(0>at?-1:1)*ft+Ct,Qt=ut*(Nt-Ct)+Et),Ct=z.x+2*rt/3,Et=z.y+2*at/3;var Gt=Ct,ee=Et;Ee.B(at,0)?ee=0at?-1:1)*ft+Ct,ee=ut*(Gt-Ct)+Et),this.Fj(),this.ne(z),this.yf(Nt,Qt),this.yf(Gt,ee),this.ne(vt),this.dd(0,this.getLinkPoint(a,y,tt,!0,!1,b,E)),this.dd(3,this.getLinkPoint(b,E,x,!1,!1,a,y))}else z=b,vt=E,b=this.getLinkPoint(a,y,tt,!0,!1,z,vt),E=this.getLinkPoint(z,vt,x,!1,!1,a,y),this.hasCurviness()?(vt=E.x-b.x,x=E.y-b.y,tt=this.computeCurviness(),a=b.x+vt/2,y=b.y+x/2,z=a,rt=y,Ee.B(x,0)?rt=0tt&&(z=-z),z=(0>x?-1:1)*z+a,rt=vt*(z-a)+y),this.ne(b),this.yf(z,rt),this.ne(E)):(this.ne(b),this.ne(E),rt=en.alloc(),y.mi(rt),at=rt.ca(E),vt.mi(rt),st=rt.ca(b),(at||st)&&(tt=y.ga(qm(tt),new Zt),this.dd(0,this.getLinkPointFromPoint(a,y,tt,E,!0,tt)),x=vt.ga(qm(x),new Zt),this.dd(1,this.getLinkPointFromPoint(z,vt,x,b,!1,x))),en.free(rt))}else{ft=this.isAvoiding,vt&&(ut&&ft||st)&&this.Fj();var ie=st?this.computeCurviness():0;ft=this.getLinkPoint(a,y,tt,!0,ut,b,E),Ct=Nt=Et=0,(ut||!rt||st)&&(Qt=this.computeEndSegmentLength(a,y,tt,!0),Ct=this.getLinkDirection(a,y,ft,tt,!0,ut,b,E),st&&(rt||tt.D(x)||!ut&&tt.x+x.x===1&&tt.y+x.y===1)&&(Ct-=ut?90:30,0>ie&&(Ct-=180)),0>Ct?Ct+=360:360<=Ct&&(Ct-=360),st&&(Qt+=Math.abs(ie)*(ut?1:2)),Ct===0?Et=Qt:Ct===90?Nt=Qt:Ct===180?Et=-Qt:Ct===270?Nt=-Qt:(Et=Qt*Math.cos(Ct*Math.PI/180),Nt=Qt*Math.sin(Ct*Math.PI/180)),tt.Mc()&&st&&(Qt=y.ga(no,Zt.alloc()),Gt=Zt.allocAt(Qt.x+1e3*Et,Qt.y+1e3*Nt),this.getLinkPointFromPoint(a,y,Qt,Gt,!0,ft),Zt.free(Qt),Zt.free(Gt))),Qt=this.getLinkPoint(b,E,x,!1,ut,a,y);var he=ee=Gt=0;if(ut||!at||st){var Ce=this.computeEndSegmentLength(b,E,x,!1);he=this.getLinkDirection(b,E,Qt,x,!1,ut,a,y),st&&(at||tt.D(x)||!ut&&tt.x+x.x===1&&tt.y+x.y===1)&&(he+=ut?0:30,0>ie&&(he+=180)),0>he?he+=360:360<=he&&(he-=360),st&&(Ce+=Math.abs(ie)*(ut?1:2)),he===0?Gt=Ce:he===90?ee=Ce:he===180?Gt=-Ce:he===270?ee=-Ce:(Gt=Ce*Math.cos(he*Math.PI/180),ee=Ce*Math.sin(he*Math.PI/180)),x.Mc()&&st&&(x=E.ga(no,Zt.alloc()),tt=Zt.allocAt(x.x+1e3*Gt,x.y+1e3*ee),this.getLinkPointFromPoint(b,E,x,tt,!1,Qt),Zt.free(x),Zt.free(tt))}x=ft,(ut||!rt||st)&&(x=new Zt(ft.x+Et,ft.y+Nt)),tt=Qt,(ut||!at||st)&&(tt=new Zt(Qt.x+Gt,Qt.y+ee)),!vt&&!ut&&rt&&3Math.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}Gn.prototype.getLinkPointFromPoint=function(a,y,x,b,E,z){if(z===void 0&&(z=new Zt),a===null||y===null)return z.assign(x),z;if(a.isVisible()||(E=a.findVisibleNode(),E!==null&&E!==a&&(y=E.port)),a=null,E=y.panel,E===null||E.se()||(E=E.panel),E===null){E=b.x,b=b.y;var tt=x.x;x=x.y}else{a=E.oe,E=1/(a.m11*a.m22-a.m12*a.m21),tt=a.m22*E;var rt=-a.m12*E,at=-a.m21*E,st=a.m11*E,ut=E*(a.m21*a.dy-a.m22*a.dx),ft=E*(a.m12*a.dx-a.m11*a.dy);E=b.x*tt+b.y*at+ut,b=b.x*rt+b.y*st+ft,tt=x.x*tt+x.y*at+ut,x=x.x*rt+x.y*st+ft}return y.Sj(E,b,tt,x,z),a!==null&&z.transform(a),z};function Qm(a,y){var x=y.Zn;return x===null&&(x=new pg,x.port=y,x.node=y.part,y.Zn=x),s1(x,a)}Gn.prototype.getLinkPoint=function(a,y,x,b,E,z,tt,rt){if(rt===void 0&&(rt=new Zt),x.sb()&&!Kg(x))return y.ga(x,rt),rt;if(x.$c()){var at=Qm(this,y);if(at!==null){if(rt.assign(at.Zo),E&&this.routing===e1){var st=Qm(this,tt);if(st!==null&&at.Gl=ut.y&&a.y<=ut.y+ut.height?rt.y=a.y:(x.Hf(Xs)||x.Hf(fl))&&a.x>=ut.x&&a.x<=ut.x+ut.width&&(rt.x=a.x),Zt.free(at),Zt.free(st)}}return rt}}return x=y.ga(qm(x),Zt.alloc()),this.pointsCount>(E?6:2)?(tt=b?this.i(1):this.i(this.pointsCount-2),E&&(tt=U0(x,tt.copy()))):(at=this.computeSpot(!b,tt),z=Zt.alloc(),tt=tt.ga(qm(at),z),E&&(tt=U0(x,tt)),Zt.free(z)),this.getLinkPointFromPoint(a,y,x,tt,b,rt),Zt.free(x),rt},Gn.prototype.getLinkDirection=function(a,y,x,b,E,z,tt,rt){t:if(b.sb())var at=b.x>b.y?b.x>1-b.y?0:b.x<1-b.y?270:315:b.x1-b.y?90:b.x<1-b.y?180:135:.5>b.x?225:.5(z?6:2)?(rt=E?this.i(1):this.i(this.pointsCount-2),rt=z?U0(at,rt.copy()):x):(x=Zt.alloc(),rt=rt.ga(no,x),Zt.free(x)),x=Math.abs(rt.x-at.x)>Math.abs(rt.y-at.y)?rt.x>=at.x?0:180:rt.y>=at.y?90:270,Zt.free(at),at=x}return b.Mc()&&tt.Td(a)&&(at+=180,360<=at&&(at-=360)),Kg(b)||(a=y.li(),a===0)||(45<=a&&135>a?at+=90:135<=a&&225>a?at+=180:225<=a&&315>a&&(at+=270),360<=at&&(at-=360)),at},Gn.prototype.computeEndSegmentLength=function(a,y,x,b){return y!==null&&x.$c()&&(a=Qm(this,y),a!==null)?a.Ju:(a=b?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=b?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},Gn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=no:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===al?ds:y)):(a=y||this.toPort,a===null?a=no:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===al?ds:y)),a};function Kg(a){return a===ds||a.x===.5&&a.y===.5}function qm(a){return a.x===.5&&a.y===.5?a:no}Gn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==fu&&4vt.width||ft.y>vt.height||0>ft.x+ft.width||0>ft.y+ft.height)){if(ft=br.alloc(),ft.set(tt),ut instanceof Dn)rt=ut.Cf(a,y,x,b,E,ft);else if(this.path===ut){if(ut instanceof Sr)if(rt=a,vt=b,ut.pickable===!1)rt=!1;else if(ft.multiply(ut.transform),vt)t:{var Ct=rt,Et=ft;if(ut.fh(Ct,Et))rt=!0;else{if(Et===void 0&&(Et=ut.transform,Ct.Re(ut.actualBounds))){rt=!0;break t}rt=Ct.left,vt=Ct.right;var Nt=Ct.top;Ct=Ct.bottom;var Qt=Zt.alloc(),Gt=Zt.alloc(),ee=Zt.alloc(),ie=br.alloc();ie.set(Et),ie.bv(ut.transform),ie.Vj(),Gt.x=vt,Gt.y=Nt,Gt.transform(ie),Qt.x=rt,Qt.y=Nt,Qt.transform(ie),Et=!1,Xf(ut,Qt,Gt,ee)?Et=!0:(Qt.x=vt,Qt.y=Ct,Qt.transform(ie),Xf(ut,Qt,Gt,ee)?Et=!0:(Gt.x=rt,Gt.y=Ct,Gt.transform(ie),Xf(ut,Qt,Gt,ee)?Et=!0:(Qt.x=rt,Qt.y=Nt,Qt.transform(ie),Xf(ut,Qt,Gt,ee)&&(Et=!0)))),br.free(ie),Zt.free(Qt),Zt.free(Gt),Zt.free(ee),rt=Et}}else rt=ut.fh(rt,ft)}else rt=il(ut,a,b,ft);rt&&(vt=ut,y!==null&&(vt=y(ut)),vt&&(x===null||x(vt))&&E.add(vt)),br.free(ft)}}}return z===void 0&&br.free(tt),rt||this.background!==null||this.areaBackground!==null}return z===void 0&&br.free(tt),!1},Gn.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?dh:this.curve},Gn.prototype.computeCorner=function(){if(this.curve===dh)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Gn.prototype.findMidLabel=function(){for(var a=this.path,y=this.O.s,x=y.length,b=0;bat?-Math.PI/2:Math.PI/2;else ut=Math.atan(at/Math.abs(rt)),0>rt&&(ut=Math.PI-ut);tt=y.x;var ft=y.y;rt=b.x-tt;var vt=b.y-ft;for(at=Math.sqrt(rt*rt+vt*vt),Ee.$(rt,0)?vt=0>vt?-Math.PI/2:Math.PI/2:(vt=Math.atan(vt/Math.abs(rt)),0>rt&&(vt=Math.PI-vt)),st=at/st,ut=vt-ut,this.dd(a,y),a+=1;aat?-Math.PI/2:Math.PI/2:(at=Math.atan(at/Math.abs(rt)),0>rt&&(at=Math.PI-at)),rt=at+ut,y*=st,this.L(a,tt+y*Math.cos(rt),ft+y*Math.sin(rt)));this.dd(x,b)}}return!0;case ev:if(z=this.i(a),ft=this.i(x),!z.Xa(y)||!ft.Xa(b)){E=z.x,z=z.y,tt=ft.x,ft=ft.y,st=(tt-E)*(tt-E)+(ft-z)*(ft-z),rt=y.x,ut=y.y,at=b.x,vt=b.y;var Ct=1;if(at-rt!==0){var Et=(vt-ut)/(at-rt);Ct=Math.sqrt(1+1/(Et*Et))}else Et=9e9;for(this.dd(a,y),a+=1;ay?y+=360:360<=y&&(y-=360),0>b?b+=360:360<=b&&(b-=360);var tt=b;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;var rt=E.actualBounds.copy(),at=z.actualBounds.copy();if(rt.w()&&at.w()){rt.Bc(Rp,Rp),at.Bc(Rp,Rp),rt.Ye(a),at.Ye(x);var st=Zt.alloc(),ut=Zt.alloc();y===0?x.x>a.x||b===270&&x.ya.x||b===90&&x.y>a.y&&at.right>a.x?(st.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),b===180?(st.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ut.x=st.x,ut.y=x.y):b===270&&x.ya.y?(st.x=a.xat.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):at.right,ut.x=st.x,ut.y=x.y):b===0&&a.xat.top&&a.yrt.bottom)&&(b===180&&(at.ca(a)||rt.ca(x))?st.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.ya.y&&(b===180||b===270)&&(st.y=this.computeMidOrthoPosition(a.x,rt.bottom,x.x,Math.min(x.y,at.top),!0)),ut.x=x.x,ut.y=st.y),st.y>rt.top&&st.y=rt.left&&x.x<=a.x||a.x<=at.right&&a.x>=x.x?(b===90||b===270)&&(st.h(Math.max((a.x+x.x)/2,a.x),a.y),ut.h(st.x,x.y)):(st.y=b===270||(b===0||b===180)&&x.ya.y&&at.lefta.y?(st.x=a.x>at.right?this.computeMidOrthoPosition(a.x,a.y,at.right,x.y,!1):a.x>at.left&&(b===270&&a.yat.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):at.left,ut.x=st.x,ut.y=x.y):b===180&&a.x>at.right&&a.y>at.top&&a.yrt.bottom)&&(b===0&&(at.ca(a)||rt.ca(x))?st.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.ya.y&&(b===0||b===270)&&(st.y=this.computeMidOrthoPosition(a.x,rt.bottom,x.x,Math.min(x.y,at.top),!0)),ut.x=x.x,ut.y=st.y),st.y>rt.top&&st.y=a.x||a.x>=at.left&&a.x<=x.x?(b===90||b===270)&&(st.h(Math.min((a.x+x.x)/2,a.x),a.y),ut.h(st.x,x.y)):(st.y=b===270||(b===0||b===180)&&x.ya.y||b===180&&x.xa.y||b===0&&x.x>a.x&&at.bottom>a.y?(st.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),b===270?(st.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ut.x=x.x,ut.y=st.y):b===180&&x.xa.x?(st.y=a.yat.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):at.bottom,ut.x=x.x,ut.y=st.y):b===90&&a.yat.left&&a.xrt.right)&&(b===270&&(at.ca(a)||rt.ca(x))?st.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.xa.x&&(b===270||b===180)&&(st.x=this.computeMidOrthoPosition(rt.right,a.y,Math.min(x.x,at.left),x.y,!1)),ut.x=st.x,ut.y=x.y),st.x>rt.left&&st.x=rt.top&&x.y<=a.y||a.y<=at.bottom&&a.y>=x.y?(b===0||b===180)&&(st.h(a.x,Math.max((a.y+x.y)/2,a.y)),ut.h(x.x,st.y)):(st.x=b===180||(b===90||b===270)&&x.xa.x&&at.top=a.x?(st.y=a.y>at.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,at.bottom,!0):a.y>at.top&&(b===180&&a.xat.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):at.top,ut.x=x.x,ut.y=st.y):b===270&&a.y>at.bottom&&a.x>at.left&&a.xrt.right)&&(b===90&&(at.ca(a)||rt.ca(x))?st.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.xa.x&&(b===90||b===180)&&(st.x=this.computeMidOrthoPosition(rt.right,a.y,Math.min(x.x,at.left),x.y,!1)),ut.x=st.x,ut.y=x.y),st.x>rt.left&&st.x=a.y||a.y>=at.top&&a.y<=x.y?(b===0||b===180)&&(st.h(a.x,Math.min((a.y+x.y)/2,a.y)),ut.h(x.x,st.y)):(st.x=b===180||(b===90||b===270)&&x.x=Yg&&(r1(Ct),rt.Bc(Ct.Ho*Ct.Hx,Ct.Go*Ct.Ix),o1(Ct,a,y,ft,b,rt,!1),at=id(Ct,ft.x,ft.y)),!Ct.abort&&atthis.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?Ee.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)):Ee.B(rt.y,tt.y)?(Math.abs(a.y-rt.y)<=Ct.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)&&(Ee.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)):Ee.B(rt.x,tt.x)?(Math.abs(a.x-rt.x)<=Ct.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,E.x,x.y):this.m(2,x.x,E.y)),Et!==null&&(b===0||b===180?this.yf(z.x,Et.y):this.yf(Et.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(st.copy()),this.ne(ut.copy())),Zt.free(st),Zt.free(ut)}},Gn.prototype.computeMidOrthoPosition=function(a,y,x,b,E){var z=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(z=this.computeCurviness()),E?(y+b)/2+z:(a+x)/2+z};function X0(a){if(a.diagram===null||!a.isAvoiding||!Tc(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=md(a.diagram,!0,a.containingGroup,null);for(var b=1;bQf&&id(y,ut,ft)!==st-1&&(id(y,x-rt,b)===st-1?(E=180,ut=x-rt,ft=b):id(y,x+rt,b)===st-1?(E=0,ut=x+rt,ft=b):id(y,x,b-at)===st-1?(E=270,ut=x,ft=b-at):id(y,x,b+at)===st-1&&(E=90,ut=x,ft=b+at));st>Qf&&id(y,ut,ft)===st-1;)x=ut,b=ft,E===0?ut+=rt:E===90?ft+=at:E===180?ut-=rt:ft-=at,--st;z?st>Qf&&(E===180||E===0?x=Math.floor(x/rt)*rt+rt/2:(E===90||E===270)&&(b=Math.floor(b/at)*at+at/2)):(x=Math.floor(x/rt)*rt+rt/2,b=Math.floor(b/at)*at+at/2),st>Qf&&(z=E,tt=x,ut=b,E===0?(z=90,ut+=at):E===90?(z=180,tt-=rt):E===180?(z=270,ut-=at):E===270&&(z=0,tt+=rt),id(y,tt,ut)===st-1?Y0(a,y,tt,ut,z,!1,z):(tt=x,ut=b,E===0?(z=270,ut-=at):E===90?(z=0,tt+=rt):E===180?(z=90,ut+=at):E===270&&(z=180,tt-=rt),id(y,tt,ut)===st-1&&Y0(a,y,tt,ut,z,!1,z))),a.yf(x,b)}Gn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=_o(y,a,x.x,x.y,b.x,b.y),z=0,tt=1;ttthis.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,b=0;b=y&&(b=y-1),at=this.i(b),z.x=Math.min(at.x,z.x),z.y=Math.min(at.y,z.y);b=z.x,at=z.y}else{for(at=0;atQt?Et>Ct?(z.x=Gt-ie,z.y=Ct-ie,E.x=Gt+Nt,E.y=Ct+Nt):(z.x=Gt-ie,z.y=Ct+ie,E.x=Gt+Nt,E.y=Ct-Nt):Et>Ct?(z.x=Gt+ie,z.y=Ct-ie,E.x=Gt-Nt,E.y=Ct+Nt):(z.x=Gt+ie,z.y=Ct+ie,E.x=Gt-Nt,E.y=Ct-Nt)),Ee.$(Qt,Gt)&&Ee.$(Ct,Et)&&(Ct>vt?(ee>Gt?(z.x=Gt-ie,z.y=Ct-ie,E.x=Gt+Nt):(z.x=Gt+ie,z.y=Ct-ie,E.x=Gt-Nt),E.y=Ct+Nt):(ee>Gt?(z.x=Gt-ie,z.y=Ct+ie,E.x=Gt+Nt):(z.x=Gt+ie,z.y=Ct+ie,E.x=Gt-Nt),E.y=Ct-Nt)),(Ee.$(Qt,Gt)&&Ee.$(Gt,ee)||Ee.$(vt,Ct)&&Ee.$(Ct,Et))&&(Qt=.5*(Qt+ee),vt=.5*(vt+Et),z.x=Qt,z.y=vt,E.x=Qt,E.y=vt),(ft===1||ft===2&&Ee.$(tt.x,this.i(0).x)&&Ee.$(tt.y,this.i(0).y))&&(x.x=.5*(tt.x+st.x),x.y=.5*(tt.y+st.y)),Vd(rt,x.x-b,x.y-at,z.x-b,z.y-at,st.x-b,st.y-at),y.set(z),x.set(E),tt=st}}st=tt.x,tt=tt.y,ut=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ut=cg(this,ut.copy(),!1,Ao)),st=.5*(st+ut.x),tt=.5*(tt+ut.y),Vd(rt,E.x-b,E.y-at,st-b,tt-at,ut.x-b,ut.y-at),Zt.free(y),Zt.free(x),Zt.free(z),Zt.free(E)}else for(x=3;x=y&&(x=y-1),E=this.i(x-1),tt=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(tt=cg(this,tt.copy(),!1,Ao)),Vd(rt,z.x-b,z.y-at,E.x-b,E.y-at,tt.x-b,tt.y-at);else{for(z=Zt.alloc(),z.assign(this.i(0)),E=Zt.alloc(),E.assign(z),tt=this.computeCorner(),ft=1,st=0;ft=y-1){if(!z.D(ut))this.computeShortLength(!1)!==0&&(ut=cg(this,ut.copy(),!1,Ao)),dg(this,rt,-b,-at,z,ut,x);else if(st===0)for(ft=1;ftz.x?he=vt.x-Et:he=vt.x+Et,Gt.y>vt.y?ee=vt.y+ie:ee=vt.y-ie,Gt=Zt.allocAt(he,Ce),dg(this,rt,ft,Qt,z,Gt,Nt),Zt.free(Gt),Gm(rt,vt.x+ft,vt.y+Qt,Ct+ft,ee+Qt),z.h(Ct,ee)}else Ee.B(z.x,vt.x)&&Ee.B(vt.y,Gt.y)?(Et=Math.min(tt,Math.abs(vt.y-E.y)/2),Et=ie=Math.min(Et,Math.abs(Gt.x-vt.x)/2),Ee.B(ie,0)?(dg(this,rt,ft,Qt,z,vt,Nt),z.assign(vt)):(he=vt.x,Ce=vt.y,Ct=he,ee=Ce,vt.y>z.y?Ce=vt.y-Et:Ce=vt.y+Et,Gt.x>vt.x?Ct=vt.x+ie:Ct=vt.x-ie,Gt=Zt.allocAt(he,Ce),dg(this,rt,ft,Qt,z,Gt,Nt),Zt.free(Gt),Gm(rt,vt.x+ft,vt.y+Qt,Ct+ft,ee+Qt),z.h(Ct,ee))):(dg(this,rt,ft,Qt,z,vt,Nt),z.assign(vt));E.assign(ut),ft=st}Zt.free(z)}Zm=rt}else rt=this.i(1).copy(),rt.x-=b,rt.y-=at,this.computeShortLength(!0)!==0&&(E=cg(this,E,!0,z)),this.computeShortLength(!1)!==0&&(rt=cg(this,rt,!1,z)),a.type=Vn.j,a.startX=E.x,a.startY=E.y,a.endX=rt.x,a.endY=rt.y;return this.lk=!0,a};function _m(a,y,x,b){return a=x-a,isNaN(a)||a===1/0||a===-1/0?NaN:(0>a&&(a=-a),y=b-y,isNaN(y)||y===1/0||y===-1/0?NaN:(0>y&&(y=-y),Ee.$(a,0)?y:Ee.$(y,0)?a:Math.sqrt(a*a+y*y)))}function cg(a,y,x,b){var E=a.pointsCount;if(2>E)return y;if(x){var z=a.i(1);if(x=z.x-b.x,z=z.y-b.y,b=_m(y.x,y.y,x,z),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!0),a>E&&(a=E),E=a*(z-y.y)/b,y.x+=a*(x-y.x)/b,y.y+=E}else{if(z=a.i(E-2),x=z.x-b.x,z=z.y-b.y,b=_m(y.x,y.y,x,z),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!1),a>E&&(a=E),E=a*(y.y-z)/b,y.x-=a*(y.x-x)/b,y.y-=E}return y}function J0(a,y,x,b){for(var E=a.pointsCount,z=y;Ee.$(y.x,z.x)&&Ee.$(y.y,z.y);){if(x>=E)return E-1;z=a.i(x++)}if(!Ee.$(y.x,z.x)&&!Ee.$(y.y,z.y))return x-1;for(var tt=z;Ee.$(y.x,z.x)&&Ee.$(z.x,tt.x)&&(!b||(y.y>=z.y?z.y>=tt.y:z.y<=tt.y))||Ee.$(y.y,z.y)&&Ee.$(z.y,tt.y)&&(!b||(y.x>=z.x?z.x>=tt.x:z.x<=tt.x));){if(x>=E)return E-1;tt=a.i(x++)}return x-2}Gn.prototype.computeJumpLength=function(){return 10};function dg(a,y,x,b,E,z,tt){if(!tt&&Jf(a)){tt=a.computeJumpLength();var rt=tt/2,at=[],st=0;if(a.isVisible()&&(st=Lx(a,E,z,at)),0ft-tt);)st--,ft=Math.max(ut-rt,z.x);ut=z.y-tt+b,ft+=x,Ct=z.y+b,a.curve===Yd?Zg(y,ft,Ct,!1):Vd(y,vt,ut,ft,ut,ft,Ct)}else if(Ee.B(E.x,z.x))if(E.yut-tt);)st--,ut=Math.max(ft-rt,z.y);ft=z.x-tt+x,Ct=z.x+x,ut+=b,a.curve===Yd?Zg(y,Ct,ut,!1):Vd(y,ft,vt,ft,ut,Ct,ut)}}}y.lineTo(z.x+x,z.y+b)}function Lx(a,y,x,b){var E=a.diagram;if(E===null||y.D(x))return 0;for(E=E.layers;E.next();){var z=E.value;if(z!==null&&z.visible){z=z.Pa.s;for(var tt=z.length,rt=0;rttt.x&&ut.x>=st.x||st.xtt.y&&ut.y>=st.y||st.ytt&&Math.min(Et,Nt)ut&&!Ee.B(Et,Nt)){rt.x=ut,rt.y=tt,ut=!0;break t}}else if(Ee.B(ft,Ct)&&Ee.B(Et,Nt)&&Math.min(ut,vt)Et&&Math.min(tt,Qt)ft&&!Ee.B(tt,Qt)){rt.x=Et,rt.y=ft,ut=!0;break t}rt.x=0,rt.y=0,ut=!1}ut&&(E?x.push(rt.x):x.push(rt.y)),tt=st}Zt.free(rt)}function Jf(a){return a=a.curve,a===Ug||a===Yd}function $m(a,y){(y||Jf(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()))}Gn.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 b=!1;for(x=x.layers;x.next();){var E=x.value;if(E.visible){if(E===y){b=!0;var z=!1;E=E.Pa.s;for(var tt=E.length,rt=0;rta&&Pi(a,">= 0",Gn,"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:al},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&&Ju(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",Gn,"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=b&&(z=b-1);var rt=this.i(z-1),at=this.i(z);Ee.Dl(E.x,E.y,tt.x,tt.y,rt.x,rt.y,at.x,at.y,.5,a),y=Math.min(at.x,y),x=Math.min(at.y,x),E=at}else for(E=this.i(0),z=this.i(1),y=Math.min(E.x,z.x),x=Math.min(E.y,z.y),a.h(E.x,E.y,0,0),a.Ye(z),E=2;Eb&&(b=-b)):Ee.$(b.y,E.y)?(b=E.x-b.x,0>b&&(b=-b)):b=Math.sqrt(b.Bf(E)),a.push(b)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,b=a=0;bthis.pointsCount)return this.lk=!0,this.ua;this.ua=this.makeGeometry()}return this.ua}},firstPickIndex:{get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!Kg(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!Kg(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(),$m(this,y===Yd||y===Ug||a===Yd||a===Ug),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(),$m(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)}}}),Gn.prototype.invalidateOtherJumpOvers=Gn.prototype.Xo,Gn.prototype.findClosestSegment=Gn.prototype.ez,Gn.prototype.updateRoute=Gn.prototype.vg,Gn.prototype.invalidateRoute=Gn.prototype.bb,Gn.prototype.rollbackRoute=Gn.prototype.rv,Gn.prototype.commitRoute=Gn.prototype.zf,Gn.prototype.startRoute=Gn.prototype.uh,Gn.prototype.clearPoints=Gn.prototype.Fj,Gn.prototype.removePoint=Gn.prototype.pv,Gn.prototype.addPointAt=Gn.prototype.yf,Gn.prototype.addPoint=Gn.prototype.ne,Gn.prototype.insertPointAt=Gn.prototype.m,Gn.prototype.insertPoint=Gn.prototype.Kz,Gn.prototype.setPointAt=Gn.prototype.L,Gn.prototype.setPoint=Gn.prototype.dd,Gn.prototype.getPoint=Gn.prototype.i,Gn.prototype.getOtherPort=Gn.prototype.Cz,Gn.prototype.getOtherNode=Gn.prototype.To;var fg=null,gg=null,Q0=new Ke(Gn,"Normal",1),Ex=new Ke(Gn,"Orthogonal",2),Ax=new Ke(Gn,"AvoidsNodes",6),e1=new Ke(Gn,"AvoidsNodesStraight",7),fu=new Ke(Gn,"None",0),dh=new Ke(Gn,"Bezier",9),Yd=new Ke(Gn,"JumpGap",10),Ug=new Ke(Gn,"JumpOver",11),Np=new Ke(Gn,"End",17),tv=new Ke(Gn,"Scale",18),ev=new Ke(Gn,"Stretch",19),Fp=new Ke(Gn,"OrientAlong",21),Tp=new Ke(Gn,"OrientPlus90",22),Dp=new Ke(Gn,"OrientMinus90",23),q0=new Ke(Gn,"OrientOpposite",24),nv=new Ke(Gn,"OrientUpright",25),Bp=new Ke(Gn,"OrientPlus90Upright",26),Op=new Ke(Gn,"OrientMinus90Upright",27),iv=new Ke(Gn,"OrientUpright45",28),n1=16,i1=14,Rp=8;Gn.className="Link",Gn.Normal=Q0,Gn.Orthogonal=Ex,Gn.AvoidsNodes=Ax,Gn.AvoidsNodesStraight=e1,Gn.None=fu,Gn.Bezier=dh,Gn.JumpGap=Yd,Gn.JumpOver=Ug,Gn.End=Np,Gn.Scale=tv,Gn.Stretch=ev,Gn.OrientAlong=Fp,Gn.OrientPlus90=Tp,Gn.OrientMinus90=Dp,Gn.OrientOpposite=q0,Gn.OrientUpright=nv,Gn.OrientPlus90Upright=Bp,Gn.OrientMinus90Upright=Op,Gn.OrientUpright45=iv,Gn.EndSegmentStep=8,Gn.CurvinessStart=n1,Gn.SpacingMin=i1,Gn.OrthoShortCut=Rp;function rv(a,y,x,b){Br(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=b,this.links=[]}rv.prototype.Sl=function(){if(!this.qq){var a=this.links;0=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,b=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((b+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=Qf&&(x[b]=_0)}Ip.prototype.Yj=function(a,y,x,b){if(a>this.En||a+xthis.Fn||y+ba&&(x+=a,a=0),0>y&&(E+=y,y=0),0>x||0>E)return!0;for(b=Math.min(a+x-1,this.di)|0,x=Math.min(y+E-1,this.ei)|0;a<=b;a++){E=this.ac[a];for(var z=y;z<=x;z++)if(E[z]===Jd)return!1}return!0};function rd(a,y,x,b,E,z,tt,rt,at){if(!(ytt||xat)){var st=y|0,ut=x|0,ft=a.ac[st][ut];if(ft>=Qf&&ft=a.ac[st][ut]);)a.ac[st][ut]=ft,ft+=1,E?ut+=b:st+=b;if(st=E?ut:st,E)if(0st;x+=b)rd(a,y,x,1,!E,z,tt,rt,at),rd(a,y,x,-1,!E,z,tt,rt,at);else if(0st;y+=b)rd(a,y,x,1,!E,z,tt,rt,at),rd(a,y,x,-1,!E,z,tt,rt,at)}}function ov(a,y,x,b,E,z,tt,rt,at){y|=0,x|=0;var st=Jd,ut=Qf;for(a.ac[y][x]=ut;st===Jd&&y>z&&yrt&&xz&&yrt&&x=Math.abs(rt-st)&&1>=Math.abs(at-ut))a.abort=!0;else{var ft=z.x;b=z.y,y=z.x+z.width;var vt=z.y+z.height;ft-=a.Nd,ft/=a.rc,b-=a.Od,b/=a.sc,y-=a.Nd,y/=a.rc,vt-=a.Od,vt/=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,b|0)),vt=Math.min(a.ei,Math.max(0,vt|0)),b=a.ac,rt|=0,at|=0,st|=0,ut|=0;var Ct=x===0||x===90?1:-1;if(x=x===90||x===270,b[rt][at]===Jd?(ov(a,rt,at,Ct,x,z,y,ft,vt),ov(a,rt,at,1,!x,z,y,ft,vt),ov(a,rt,at,-1,!x,z,y,ft,vt)):ov(a,rt,at,Ct,x,rt,at,rt,at),b[st][ut]===Jd?(av(a,st,ut,E===0||E===90?1:-1,E===90||E===270,z,y,ft,vt),av(a,st,ut,1,!(E===90||E===270),z,y,ft,vt),av(a,st,ut,-1,!(E===90||E===270),z,y,ft,vt)):av(a,st,ut,Ct,x,st,ut,st,ut),x=Si(),tt&&a1(a,st,ut,E,rt,at,x))for((x[0]!==st||x[1]!==ut)&&(x.unshift(ut),x.unshift(st)),(x[x.length-2]!==rt||x[x.length-1]!==at)&&(x.push(rt),x.push(at)),a=Qf,E=x[x.length-2],tt=x[x.length-1],b[E][tt]=a++,z=x.length-4;0<=z;z-=2)for(E=x[z+2],tt=x[z+3],y=x[z],st=x[z+1];y>E?E++:ytt?tt++:stE)ut--;else break;else if(ft>z)ft--;else break;var vt=rt[ut][ft];if(vt===0||vt===$0)break;at=ut,st=ft}for(;;){if(ut=b,ft=at,vt=st,b===0?vtz&&(ut=270,vt--):b===90?ftE&&(ut=180,ft--):b===180?vtz&&(ut=270,vt--):ftE&&(ut=180,ft--),ft=rt[ft][vt],ut!==b&&ft!==0&&ft!==$0){if(tt.push(at),tt.push(st),a1(a,at,st,ut,E,z,tt))return!0;tt.pop(),tt.pop()}if(rt[at][st]=$0,b===0){if(at===y)return!1;at--}else if(b===90){if(st===x)return!1;st--}else if(b===180){if(at===y)return!1;at++}else{if(st===x)return!1;st++}}}Ae.Object.defineProperties(Ip.prototype,{bounds:{get:function(){return new en(this.Nd,this.Od,this.En-this.Nd,this.Fn-this.Od)}},Ho:{get:function(){return this.rc},set:function(a){0=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 90180+a&&x<=360-a?270:0;case 13:return 180a&&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 b&&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}pg.prototype.Sl=function(){this.pe.length=0};function s1(a,y){var x=a.pe;if(x.length===0){t:if(!a.ap){x=a.ap,a.ap=!0;var b=null,E=a.node,z=E instanceof dr?E:null;if(z===null||z.isSubGraphExpanded)var tt=E.isTreeExpanded?E.findLinksConnected(a.port.portId):E.qx();else{if(!z.actualBounds.w()){a.ap=x;break t}b=z,tt=b.Lu()}z=a.pe.length=0;var rt=a.port.ga(Ns,Zt.alloc()),at=a.port.ga(Za,Zt.alloc());for(E=en.allocAt(rt.x,rt.y,0,0),E.Ye(at),Zt.free(rt),Zt.free(at),rt=Zt.allocAt(E.x+E.width/2,E.y+E.height/2),at=a.port.li(),tt=tt.iterator;tt.next();){var st=tt.value;if(st.isVisible()&&st.fromPort!==st.toPort){var ut=st.fromPort===a.port||st.fromNode!==null&&st.fromNode.Td(b),ft=st.computeSpot(ut,a.port);if(ft.$c()&&(ut=ut?st.toPort:st.fromPort,ut!==null)){var vt=ut.part;if(vt!==null){var Ct=vt.findVisibleNode();Ct!==null&&Ct!==vt&&(vt=Ct,ut=vt.port),ut=st.computeOtherPoint(vt,ut),vt=rt.ab(ut),vt-=at,0>vt?vt+=360:360<=vt&&(vt-=360),ft=kx(E,ft,vt,st.isOrthogonal),ft===0?(ft=4,180vt&&(vt+=360)),Ct=a.pe[z],Ct===void 0?(Ct=new ty(st,vt,ft),a.pe[z]=Ct):(Ct.link=st,Ct.angle=vt,Ct.Nc=ft),Ct.hv.set(ut),z++}}}}for(Zt.free(rt),a.pe.sort(pg.prototype.j),at=a.pe.length,b=-1,z=rt=0;zMath.abs(Nt)?(ee=Math.abs(Nt)/vt,vt=Math.abs(Nt)):ee=1;break;case 2:Ct>Math.abs(ie)?(ee=Math.abs(ie)/Ct,Ct=Math.abs(ie)):ee=1;break;case 1:ft>Math.abs(Nt)?(ee=Math.abs(Nt)/ft,ft=Math.abs(Nt)):ee=1;break;default:case 4:ut>Math.abs(ie)?(ee=Math.abs(ie)/ut,ut=Math.abs(ie)):ee=1}Gt=0}var We=he.Zo;if(b===Z0){switch(he=he.link.computeThickness(),he*=ee,We.set(Ce),Et){case 8:We.x=Ce.x+Nt/2+vt/2-Gt-he/2;break;case 2:We.y=Ce.y+ie/2+Ct/2-Gt-he/2;break;case 1:We.x=Ce.x+Nt/2-ft/2+Gt+he/2;break;default:case 4:We.y=Ce.y+ie/2-ut/2+Gt+he/2}Gt+=he}else{var ii=.5;b===Ym&&(ii=(he.Uo+1)/(he.Gl+1)),We.x=Ce.x+Nt*ii,We.y=Ce.y+ie*ii}}}for(Zt.free(rt),Zt.free(at),Zt.free(tt),Zt.free(st),Ce=a.pe,z=0;zy.Nc?1:a.angley.angle?1:0},pg.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,ds,y.fromPort===this.port),b=a.Uo;if(0>b)return x;var E=a.Gl;if(1>=E||!y.isOrthogonal)return x;y=a.hv;var z=a.Zo;return(a.Nc===2||a.Nc===8)&&(b=E-1-b),((a=a.Nc===2||a.Nc===4)?y.y=y-1?(z=0,b=x,E+=tt+20,tt=0):z++}},Qa.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,b=this.arrangementOrigin.y,E=0,z=0,tt=this.network.vertexes.iterator;tt.next();){var rt=tt.value.node;if(!(rt===null||rt instanceof Gn)&&(zp(rt),this.rh(rt))){var at=rt.measuredBounds,st=at.width;at=at.height,rt.moveTo(x,b),rt instanceof dr&&(rt.rh=!1),x+=Math.max(st,50)+20,z=Math.max(z,Math.max(at,50)),E>=a-1?(E=0,x=y,b+=z+20,z=0):E++}}},Qa.prototype.rh=function(a){return!!(!a.location.w()||a instanceof dr&&a.rh)};function xf(a,y,x,b,E,z,tt,rt){for(x=x.iterator;x.next();){var at=x.value;b&&!at.isTopLevel||E!==null&&!E(at)||!at.canLayout()||(z&&at instanceof ui?at.isLinkLabel||(at instanceof dr&&at.layout===null?xf(a,y,at.memberParts,!1,E,z,tt,rt):(zp(at),y.add(at))):tt&&at instanceof Gn?y.add(at):!rt||!at.Zc()||at instanceof ui||(zp(at),y.add(at)))}}function zp(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}Qa.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new en),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},Qa.prototype.ex=function(a){var y=new Pn;return a instanceof we?(xf(this,y,a.nodes,!0,null,!0,!0,!0),xf(this,y,a.links,!0,null,!0,!0,!0),xf(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof dr?xf(this,y,a.memberParts,!1,null,!0,!0,!0):xf(this,y,a.iterator,!1,null,!0,!0,!0),y},Qa.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(Ns),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},Ae.Object.defineProperties(Qa.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())}}}),Qa.prototype.collectParts=Qa.prototype.ex,Qa.prototype.getLayoutBounds=Qa.prototype.ni,Qa.prototype.invalidateLayout=Qa.prototype.C,Qa.className="Layout";function ba(a){Br(this),this.Sc=a,this.wf=new Pn,this.ye=new Pn,this.Es=new si,this.zs=new si}ba.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 Pn,this.ye=new Pn,this.Es=new si,this.zs=new si},ba.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,1y?1:0):1:y!==null?-1:0}Ae.Object.defineProperties($s.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,b=y.width;y=y.height,this.o.h(b/2,y/2),this.j.h(a,x,b,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=en.alloc(),b=y.ni(a,x);y=b.x;var E=b.y,z=b.width;if(b=b.height,isNaN(y)&&(y=0),isNaN(E)&&(E=0),this.j.h(y,E,z,b),en.free(x),!(a instanceof dr)&&(a=a.locationObject.ga(no),a.w())){this.o.h(a.x-y,a.y-E);return}this.o.h(z/2,b/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 Pn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new Pn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new Pn,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 Ln,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}}}),$s.prototype.deleteDestinationEdge=$s.prototype.Jl,$s.prototype.addDestinationEdge=$s.prototype.zl,$s.prototype.deleteSourceEdge=$s.prototype.Kl,$s.prototype.addSourceEdge=$s.prototype.Cl,$s.className="LayoutVertex",$s.standardComparer=ry,$s.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 "+(this.qd?this.qd.toString():"null"))),y},Qu.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Qu.prototype.commit=function(){},Qu.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},Ae.Object.defineProperties(Qu.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)}}}),Qu.prototype.getOtherVertex=Qu.prototype.Ax,Qu.className="LayoutEdge";function Sl(a){Qa.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new hn(NaN,NaN).freeze(),this.tf=new hn(10,10).freeze(),this.Jb=jp,this.Rb=lv,this.nd=Hp,this.hd=u1,a&&Object.assign(this,a)}ae(Sl,Qa),Sl.prototype.cloneProtected=function(a){Qa.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},Sl.prototype.qb=function(a){a.classType===Sl?a===Hp||a===hv||a===oy||a===uv?this.sorting=a:a===lv||a===pc?this.arrangement=a:a===jp||a===sv?this.alignment=a:Oe("Unknown enum value: "+a):Qa.prototype.qb.call(this,a)},Sl.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 b=x.value;if(!b.ph()||b.fromNode===null&&b.toNode===null){if(b.Va(),b instanceof dr)for(b=b.memberParts;b.next();)y.remove(b.value)}else y.remove(b)}var E=y.Fa();if(E.length!==0){switch(this.sorting){case uv:E.reverse();break;case Hp:E.sort(this.comparer);break;case hv:E.sort(this.comparer),E.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"),b=[],this.alignment){case sv:var rt=y,at=x,st=en.alloc(),ut=Math.max(this.cellSize.width,1);if(!isFinite(ut))for(var ft=ut=0;ftz-1||0tt)&&(b.push(new en(0,Nt,tt+rt,Gt)),Qt=0,Et=Ct,Nt+=Gt,Gt=0),Gt=Math.max(Gt,We),vt){case pc:he=-he.width;break;default:he=0}switch(ie.moveTo(Et+he,Nt),vt){case pc:Et-=Ce;break;default:Et+=Ce}Qt++}b.push(new en(0,Nt,tt+rt,Gt)),en.free(st);break;case jp:for(at=tt,ut=z,ft=y,vt=x,tt=en.alloc(),Ct=Math.max(this.cellSize.width,1),z=Nt=st=0,rt=Zt.alloc(),Et=0;Et=st&&(at-=st),st=ie=0,Ce=Math.max(this.cellSize.height,1),he=z=0,We=!0,Qt=Zt.alloc(),ii=0;iiut-1||0at){for(b.push(new en(0,We?ee-z:ee,at+ft,he+z+vt)),bi=0;bist&&(z.width+=z.x-st,z.x=st);en.free(tt)}for(rt=z=tt=E=0;rty?1:0}Ae.Object.defineProperties(Sl.prototype,{wrappingWidth:{get:function(){return this.zo},set:function(a){this.zo!==a&&(0ft)){var Nt=ft+Pp(Et);Et.pc(Nt,!0),x0(Et,Nt,ft)}}y.isModified=!0}}finally{y.aa=!0}}}}},Xo.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)},Xo.prototype.rp=function(){for(var a=this.H.model,y=new Pn,x=a.nodeDataArray,b=0;b=b)return"[]";var E=new Tr;E.add("["),x&&1b)return;xr(a.Tc,b)}Vs(a,"nodeDataArray",us,"nodeDataArray",a,y,null,b,null),a.qp(y)}bt.nA=function(a){if(oi(a))for(var y=a.length,x=0;xy&&(y=a.length),gr(a,y,x),Vs(this,"",Ha,"",a,null,x,null,y)},bt.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Oe("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];xr(a,y),Vs(this,"",us,"",a,x,null,y,null)},bt.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=As(a,y),y===void 0))return"";if(typeof y=="string")return y;Oe("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 b=As(a,x);b===void 0&&(b=""),b!==y&&(Ua(a,x,y),Vs(this,"nodeCategory",Na,x,a,b,y))}else Ua(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 hy(){return new Ti}function Gp(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 Gp(a,y.constructor);return typeof y}function cy(a){return tc[a]?tc[a]:ke.go!==void 0&&ke.go[a]?ke.go[a]:null}function As(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(b){}return x}function Ua(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(b){}}Ae.Object.defineProperties(Ti.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===""&&Oe("Model.nodeKeyProperty may not be the empty string"),0"+fh(this,E,!1)}return y},bt.Qv=function(a,y){this.linkKeyProperty===""&&Oe("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=Ti.prototype.Qv.call(this,a,y),b=this,E=new Pn,z=new Pn,tt=new Pn,rt=this.vh;a.changes.each(function(ut){ut.model===b&&(ut.modelChange==="linkDataArray"?ut.change===Ha?E.add(ut.newValue):ut.change===us&&tt.add(ut.oldValue):b.Jc(ut.object)?z.add(ut.object):ut.object!==null&&(ut.object!==null&&rt&&rt.contains(ut.object)?rt.get(ut.object).each(function(ft){b.Jc(ft)&&z.add(ft)}):ut.object instanceof Ti||b.lb(ut.object)||A1(b,ut.object).each(function(ft){z.add(ft)})))});var at=this.il;at.clear(),E.each(function(ut){at.add(b.Ac(ut)),y||z.add(ut)});var st=this.kl;return st.clear(),tt.each(function(ut){st.add(b.Ac(ut)),y&&z.add(ut)}),a=b.cloneDeep(z.Fa()),0b.indexOf(a.newValue)&&b.splice(x,0,a.newValue));return}}else if(a.change===us){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,qe(a)&&typeof x=="number"&&(b=this.Ac(a),y?(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),b!==void 0&&this.wb.add(b,a)):(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),b!==void 0&&this.wb.remove(b)));return}if(a.modelChange==="linkLabelKeys"){b=this.Ef(a.object),Array.isArray(b)&&typeof x=="number"&&(y?0>b.indexOf(a.newValue)&&b.splice(x,0,a.newValue):(x=b.indexOf(a.newValue),0<=x&&b.splice(x,1)));return}}Ti.prototype.changeState.call(this,a,y)}},bt=ro.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),Ua(x,this.nodeKeyProperty,a),this.xf(x))}return a}},bt.yx=function(a){return fh(this,a,!0)},bt.wv=function(a,y){Qg(this,a,y,!0)},bt.Bx=function(a){return fh(this,a,!1)},bt.Bv=function(a,y){Qg(this,a,y,!1)};function fh(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=As(y,a),a!==void 0))){if(wf(a))return a;Oe((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function Qg(a,y,x,b){if(x===null&&(x=void 0),y!==null){var E=b?a.lf:a.mf;if(E!=="")if(x=a.Vl(x),a.Jc(y)){var z=As(y,E);z!==x&&(vc(a,z,y),Ua(y,E,x),a.hc(x)===null&&mc(a,x,y),Vs(a,b?"linkFromKey":"linkToKey",Na,E,y,z,x),typeof E=="string"&&a.La(y,E))}else Ua(y,E,x)}}bt.zx=function(a){return pv(this,a,!0)},bt.xv=function(a,y){qg(this,a,y,!0)},bt.Cx=function(a){return pv(this,a,!1)},bt.Cv=function(a,y){qg(this,a,y,!1)};function pv(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=As(y,a),y===void 0?"":y)}function qg(a,y,x,b){if(y!==null){var E=b?a.ej:a.fj;if(E!=="")if(a.Jc(y)){var z=As(y,E);z===void 0&&(z=""),z!==x&&(Ua(y,E,x),Vs(a,b?"linkFromPortId":"linkToPortId",Na,E,y,z,x),typeof E=="string"&&a.La(y,E))}else Ua(y,E,x)}}bt.Ef=function(a){if(a===null)return mv;var y=this.je;return y===""?mv:(a=As(a,y),a===void 0?mv:a)},bt.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=As(a,x);if(b===void 0&&(b=mv),b!==y){if(Array.isArray(b))for(var E=b.length,z=0;zE||(b.splice(E,1),this.Jc(a)&&(vc(this,y,a),Vs(this,"linkLabelKeys",us,x,a,y,null,E,null)))}else b!==void 0&&Oe(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},bt.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=As(a,y),y!==void 0)){if(wf(y))return y;Oe("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 b=As(a,x);b!==y&&this.jh(y)===null&&(Ua(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),Vs(this,"linkKey",Na,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Ua(a,x,y)}},bt.jh=function(a){return a===null&&Oe("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&wf(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 b=this.cl;if(b!==null&&(x=b(this,a),x!=null&&!this.wb.contains(x))){Ua(a,y,x);return}if(typeof x=="string"){for(b=2;this.wb.contains(x+b);)b++;Ua(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;Ua(a,y,x)}}}}},bt.Jc=function(a){return a===null?!1:this.$f.contains(a)},bt.fi=function(a){a!==null&&(Ga(a),this.Jc(a)||k1(this,a,!0))};function k1(a,y,x){if(a.linkKeyProperty!==""){var b=a.Ac(y);if(b!==void 0&&a.wb.I(b)===y)return;a.Bs(y),b=a.Ac(y),b===void 0&&Oe("GraphLinksModel.makeLinkDataKeyUnique failed on "+y+". Data not added to model."),a.wb.add(b,y)}a.$f.add(y),b=null,x&&(b=a.md.length,a.md.splice(b,0,y)),Vs(a,"linkDataArray",Ha,"linkDataArray",a,null,y,null,b),dy(a,y)}bt.Ey=function(a){if(Array.isArray(a))for(var y=a.length,x=0;xb)return;a.md.splice(b,1)}if(Vs(a,"linkDataArray",us,"linkDataArray",a,y,null,b,null),x=fh(a,y,!0),vc(a,x,y),x=fh(a,y,!1),vc(a,x,y),b=a.Ef(y),Array.isArray(b))for(var E=b.length,z=0;z=a.count)a.count===1&&(a=a.first(),a.centerX=0,a.centerY=0);else{var y=new Ln;y.addAll(a.iterator),a=new Ln;var x=new Ln,b=this.sort(y),E,z,tt=this.Jp,rt=this.arrangement,at=this.nodeDiameterFormula,st=this.radius;(!isFinite(st)||0>=st)&&(st=NaN);var ut=this.aspectRatio;(!isFinite(ut)||0>=ut)&&(ut=1);var ft=this.startAngle;isFinite(ft)||(ft=0);var vt=this.sweepAngle;if((!isFinite(vt)||360vt)&&(vt=360),y=this.spacing,isFinite(y)||(y=NaN),rt===nc&&at===mg?rt=ec:rt===nc&&at!==mg&&(rt=this.arrangement),(this.direction===qf||this.direction===_g)&&this.sorting!==$g){for(at=0;!(at>=b.length)&&(a.add(b.M(at)),!(at+1>=b.length));at+=2)x.add(b.M(at+1));this.direction===qf?(this.arrangement===nc&&a.reverse(),b=new Ln,b.addAll(a),b.addAll(x)):(this.arrangement===nc&&x.reverse(),b=new Ln,b.addAll(x),b.addAll(a))}at=b.length;for(var Ct=z=E=0;Ctvt&&(Ct===0||Ct===b.length-1)&&(Nt/=2),E+=Nt,z++}if(isNaN(st)||rt===nc){if(isNaN(y)&&(y=6),rt!==ec&&rt!==nc){for(z=-1/0,tt=0;ttst?(st=E,z=st*ut):tt=Ct/(360<=vt?at:at-1)}if(this.kw=rt,this.lc=st,this.Zm=ut,this.lw=ft,this.Wp=vt,this.Ti=y,this.me=z,this.Jp=tt,y=b,b=this.kw,rt=this.lc,st=this.lw,ut=this.Wp,ft=this.Ti,vt=this.me,at=this.Jp,this.direction!==qf&&this.direction!==_g||b!==nc)if(this.direction===qf||this.direction===_g){switch(tt=0,b){case Cf:tt=180*yv(this,rt,vt,st,at)/Math.PI;break;case ec:at=y=0,tt=a.first(),tt!==null&&(y=Lf(tt,Math.PI/2)),tt=x.first(),tt!==null&&(at=Lf(tt,Math.PI/2)),tt=180*yv(this,rt,vt,st,ft+(y+at)/2)/Math.PI;break;case Qd:tt=ut/y.length}if(this.direction===qf){switch(b){case Cf:Up(this,a,st,bf);break;case ec:Kp(this,a,st,bf);break;case Qd:Vp(this,a,ut/2,st,bf)}switch(b){case Cf:Up(this,x,st+tt,vu);break;case ec:Kp(this,x,st+tt,vu);break;case Qd:Vp(this,x,ut/2,st+tt,vu)}}else{switch(b){case Cf:Up(this,x,st,bf);break;case ec:Kp(this,x,st,bf);break;case Qd:Vp(this,x,ut/2,st,bf)}switch(b){case Cf:Up(this,a,st+tt,vu);break;case ec:Kp(this,a,st+tt,vu);break;case Qd:Vp(this,a,ut/2,st+tt,vu)}}}else switch(b){case Cf:Up(this,y,st,this.direction);break;case ec:Kp(this,y,st,this.direction);break;case Qd:Vp(this,y,ut,st,this.direction);break;case nc:T1(this,y,ut,st,this.direction)}else T1(this,y,ut,st-ut/2,vu)}this.updateParts(),this.network=null,this.isValidLayout=!0};function Vp(a,y,x,b,E){var z=a.Wp,tt=a.lc;a=a.me,b=b*Math.PI/180,x=x*Math.PI/180;for(var rt=y.length,at=0;atx){for(z=b+(E===vu?z:-z);0>z;)z+=360;z%=360,180=ut.length-1));ft++)O1(a,at,st,ut,ft,E,z)||R1(a,at,st,ut,ft,E,z),at=z.x,st=z.y;if(Zt.free(z),a.mj++,!(23Math.abs(Ct)?Math.abs(at-z)<(ut[0].width+ut[ut.length-1].width)/2&&(tt=0):tt=0Math.abs(vt)?0:vt,at=Math.abs(z)>Math.abs(ft)?0ft:0a.mj?a.lc-tt/(2*Math.PI):5>ut.length&&10=ft.length-1));vt++)O1(a,at,st,ft,vt,E,ut)||R1(a,at,st,ft,vt,E,ut),at=ut.x,st=ut.y;if(Zt.free(ut),a.mj++,!(23a.mj?a.lc-z/(2*Math.PI):a.lc-(0rt){if(z=y-a,z<-rt)return tt.x=z,tt.y=st,!1;ut=!0}}else if(z=y-a,z<-rt){if(z=y+a,z>rt)return tt.x=z,tt.y=st,!1;ut=!0}return st=Math.sqrt(1-Math.min(1,z*z/(rt*rt)))*at,0>x!==ut&&(st=-st),Math.abs(x-st)>(b[E].height+b[E+1].height)/2?(tt.x=z,tt.y=st,!1):(tt.x=z,tt.y=st,!0)}function R1(a,y,x,b,E,z,tt){var rt=a.lc,at=a.me,st=0;if(a=(b[E].height+b[E+1].height)/2+a.Ti,b=!1,0<=y!=(z===vu)){if(z=x-a,z<-at){if(z=x+a,z>at){tt.x=st,tt.y=z;return}b=!0}}else if(z=x+a,z>at){if(z=x-a,z<-at){tt.x=st,tt.y=z;return}b=!0}st=Math.sqrt(1-Math.min(1,z*z/(at*at)))*rt,0>y!==b&&(st=-st),tt.x=st,tt.y=z}ss.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},ss.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 Zt(0,0):(x.x=this.arrangementOrigin.x+this.lc,x.y=this.arrangementOrigin.y+this.me);for(var b=this.network.vertexes.iterator;b.next();){var E=b.value;E.x+=x.x,E.y+=x.y,E.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))},ss.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function fy(a,y,x,b,E){var z=a.ty;if(.001>Math.abs(a.Zm-1))return b!==void 0&&E!==void 0?E*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=b!==void 0&&E!==void 0?E/(z+1):Math.PI/(2*(z+1)),at=0,st=0;st<=z;st++){b!==void 0&&E!==void 0?at=b+st*E/z:at=st*Math.PI/(2*z);var ut=Math.sin(at);tt+=Math.sqrt(1-a*a*ut*ut)*rt}return b!==void 0&&E!==void 0?(y>x?y:x)*tt:4*(y>x?y:x)*tt}function vv(a,y,x,b,E){return y/(b!==void 0&&E!==void 0?fy(a,1,x,b,E):fy(a,1,x))}function yv(a,y,x,b,E){if(.001>Math.abs(a.Zm-1))return E/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&&(b+=Math.PI/2);for(var rt=0;;rt++){var at=Math.sin(b+rt*a);if(tt+=(y>x?y:x)*Math.sqrt(1-z*z*at*at)*a,tt>=E)return rt*a}}ss.prototype.sort=function(a){switch(this.sorting){case Sv:break;case xv:a.reverse();break;case Pv:a.sort(this.comparer);break;case wv:a.sort(this.comparer),a.reverse();break;case $g:return this.ak(Dx(a));default:Oe("Invalid sorting type.")}return a};function Dx(a){for(var y=[],x=0;xE&&(E=rt,z=tt)}else for(tt=0;ttE&&(E=rt,z=tt);for(x.add(a.M(z)),y[z]=-1,z=a.M(z),tt=z.sourceEdges;tt.next();)E=a.indexOf(tt.value.fromVertex),0>E||0<=y[E]&&y[E]++;for(z=z.destinationEdges;z.next();)E=a.indexOf(z.value.toVertex),0>E||0<=y[E]&&y[E]++}return x}ss.prototype.ak=function(a){for(var y=[],x=0;xy[x].indexOf(E)&&y[x].push(E);for(b=b.sourceEdges;b.next();)E=a.indexOf(b.value.fromVertex),E!==x&&0>y[x].indexOf(E)&&y[x].push(E)}for(z=[],x=0;xy[x[Et]].indexOf(x[Et===x.length-1?0:Et+1])&&Ct.push(Et===x.length-1?0:Et+1);if(Ct.length===0)for(Et=0;Etx.indexOf(We)||Cex.indexOf(We)||Ce=Nt?Ce+1:Ce)),Gt+=Ce=Nt&&Ce++,ie>=Nt&&ie++,Ce>ie&&(he=ie,ie=Ce,Ce=he),ie-Ce<(x.length+2)/2==(CeCt||Ct===ut||(Et=Ct>ut?Ct-ut:ut-Ct,ft+=Cttt-Et?1:-1);x.splice(0>ft?ut:ut+1,0,at),b.splice(rt,1),rt--}else z=!1;if(z)break;x.push(b[0]),b.splice(0,1)}for(y=0;y=a?this.ul=a:this.ul=360,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==nc&&a!==ec&&a!==Cf&&a!==Qd||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==vu&&a!==bf&&a!==qf&&a!==_g||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==Sv&&a!==xv&&a!==Pv&&!wv&&a!==$g||(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!==Cv&&a!==mg||(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 ec=new Ke(ss,"ConstantSpacing",0),Cf=new Ke(ss,"ConstantDistance",1),Qd=new Ke(ss,"ConstantAngle",2),nc=new Ke(ss,"Packed",3),vu=new Ke(ss,"Clockwise",4),bf=new Ke(ss,"Counterclockwise",5),qf=new Ke(ss,"BidirectionalLeft",6),_g=new Ke(ss,"BidirectionalRight",7),Sv=new Ke(ss,"Forwards",8),xv=new Ke(ss,"Reverse",9),Pv=new Ke(ss,"Ascending",10),wv=new Ke(ss,"Descending",11),$g=new Ke(ss,"Optimized",12),Cv=new Ke(ss,"Pythagorean",13),mg=new Ke(ss,"Circular",14);ss.className="CircularLayout",ss.ConstantSpacing=ec,ss.ConstantDistance=Cf,ss.ConstantAngle=Qd,ss.Packed=nc,ss.Clockwise=vu,ss.Counterclockwise=bf,ss.BidirectionalLeft=qf,ss.BidirectionalRight=_g,ss.Forwards=Sv,ss.Reverse=xv,ss.Ascending=Pv,ss.Descending=wv,ss.Optimized=$g,ss.Pythagorean=Cv,ss.Circular=mg;function Xp(){this.Pl=-1/0,this.tm=this.mk=null}Xp.prototype.compare=function(a,y){if(0this.Pl||Math.abs(a)a&&0rt?(E=vt.x+vt.width/2,z=vt.y+vt.height/2,st[0]=new Zt(vt.x+vt.width+b.width,vt.y),st[1]=new Zt(vt.x,vt.y+vt.height+b.height),rt=2):(at=z1(st,rt,E,z,vt.width,vt.height,b),ft=st[at],Ct=new Zt(ft.x+vt.width+b.width,ft.y),vt=new Zt(ft.x,ft.y+vt.height+b.height),at+1this.network.vertexes.count)return!1;for(var a=0,y=0,x=this.network.vertexes.first().bounds,b=this.network.vertexes.iterator;b.next();){if(b.value.bounds.Yc(x)&&(a++,2a.network.vertexes.count)return!1;for(a.ah=a.network.vertexes.Fa(),a=a.ah,a.sort(function(x,b){return x===null||b===null||x===b?0:b.Vd-x.Vd}),y=a.length-1;0<=y&&1>=a[y].Vd;)y--;return 1=tt))){for(var st=rt=0,ut=at.count-tt;utCt&&(Ct=1),rt=Ee.sqrt((rt+Ct+st*st*4/(tt*tt))/Ct),tt=(rt-1)*ut/2,rt=(rt-1)*ft/2,E.bounds=new en(z-vt.x-tt,at-vt.y-rt,ut+2*tt,ft+2*rt),E.focus=new Zt(vt.x+tt,vt.y+rt)}}return a.network=b,x}function Rx(a,y){for(var x=a.network.vertexes.iterator;x.next();){var b=x.value;if(b.network=y,b.We!==null){var E=b.We.M(b.sv);b.Vd=E.Rs;var z=E.Sv,tt=E.Tv;b.bounds=new en(b.centerX-z,b.centerY-tt,E.Ss,E.Qs),b.focus=new Zt(z,tt),b.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function Ix(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var b=y.centerX,E=y.centerY,z=y.width,tt=y.height;y.We!==null&&0=ft.Vd?at++:(rt=!0,st++,tt+=Math.atan2(y.centerY-ft.centerY,y.centerX-ft.centerX))}if(at!==0){for(0>1)+st)*(rt%2===0?1:-1),at.centerX=b+ut*Math.cos(ft),at.centerY=E+ut*Math.sin(ft),rt++}}}}function z1(a,y,x,b,E,z,tt){var rt=9e19,at=-1,st=0;t:for(;stut.y&&a[vt].x-ut.xut.x&&a[vt].y-ut.yy+z?(x=b+E-tt,a=a-y-z,Ee.sqrt(x*x+a*a)):a+xtt+rt?a>y+z?(x=b-tt-rt,a=a-y-z,Ee.sqrt(x*x+a*a)):a+xy+z?a-(y+z):a+x=y.length)return!1;var x=y[0];x.forceX=0,x.forceY=0;for(var b=x.centerX,E=b,z=x=x.centerY,tt=1;ttz-x)?y.sort(function(Nt,Qt){return Nt===null||Qt===null||Nt===Qt?0:Nt.centerX-Qt.centerX}):y.sort(function(Nt,Qt){return Nt===null||Qt===null||Nt===Qt?0:Nt.centerY-Qt.centerY}),x=a.Zf;var st=b=rt=0;for(z=0;zx||st-at>x){if(E)break}else if(ut-Ct>x||Ct-ut>x){if(!E)break}else{var Et=j1(tt,vt);1>Et?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new Lv),Et=b.random(),rt=b.random(),at>st?(b=Math.abs(vt.bounds.right-tt.bounds.x),b=(1+b)*Et):atCt?(st=Math.abs(vt.bounds.bottom-tt.bounds.y),st=(1+st)*rt):atft?(ft=a.randomNumberGenerator,ft===null&&(a.randomNumberGenerator=ft=new Lv),rt=ft.random(),ft=ft.random(),b=(b>at?1:-1)*(1+(z.width>x.width?z.width:x.width))*rt,st=(tt>ut?1:-1)*(1+(z.height>x.height?z.height:x.height))*ft):(rt=rt.stiffness*(ft-rt.length),b=(at-b)/ft*rt,st=(ut-tt)/ft*rt),x.forceX+=b,x.forceY+=st,z.forceX-=b,z.forceY-=st;for(E=b=0;Ea.epsilonDistance*a.epsilonDistance}Il.prototype.moveVertex=function(a){var y=a.forceX,x=a.forceY,b=this.moveLimit;return y<-b?y=-b:y>b&&(y=b),x<-b?x=-b:x>b&&(x=b),a.centerX+=y,a.centerY+=x,y*y+x*x},Il.prototype.moveFixedVertex=function(){},Il.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},Il.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=al,y.toSpot=al)}},Il.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=en.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,en.free(x)}x=en.alloc();for(var b=this.network.vertexes.iterator;b.next();){var E=b.value;(a!==0||y!==0)&&(x.assign(E.bounds),x.x+=a,x.y+=y,E.bounds=x),E.commit()}en.free(x)},Il.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Il.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},Il.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},Il.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},Il.prototype.electricalFieldX=function(){return 0},Il.prototype.electricalFieldY=function(){return 0},Il.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},Il.prototype.gravitationalFieldX=function(){return 0},Il.prototype.gravitationalFieldY=function(){return 0},Il.prototype.isFixed=function(a){return a.isFixed},Ae.Object.defineProperties(Il.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&&0Nt&&0Nt&&0a[this.Md]&&(this.Iq=a[x]-1,this.Md=x),a[x]tt)for(var ut=tt+1;utat;ut--)ft=b[ut],ft.near===st&&ft.Dj===st.Dj||rt++;var vt;if(0<=x)for(at=b[tt].sourceEdgesArrayAccess,st=0;stNt||ft===Nt&&Ct>Et)&&rt++,Qtft||Nt===ft&&Et>Ct)&&rt++}}}if(0>=x){for(at=b[tt].destinationEdgesArrayAccess,st=0;stNt||ft===Nt&&ut>Qt)&&rt++,Etft||Nt===ft&&Qt>ut)&&rt++)}for(z[tt*E+tt]=rt,at=tt+1;at=x){for(rt=b[tt].destinationEdgesArrayAccess,ie=b[at].destinationEdgesArrayAccess,st=0;st=x&&(at=rt.sourceEdgesArrayAccess);var st=null;0<=x&&(st=rt.destinationEdgesArrayAccess);var ut=0,ft=0,vt=rt.near;if(vt!==null&&vt.layer===rt.layer&&(ut+=vt.column-1,ft++),at!==null)for(vt=0;vt=x&&(at=rt.sourceEdgesArrayAccess);var st=null;0<=x&&(st=rt.destinationEdgesArrayAccess);var ut=0,ft=[],vt=rt.near;if(vt!==null&&vt.layer===rt.layer&&(ft[ut]=vt.column-1,ut++),rt=void 0,at!==null)for(vt=0;vt>1,z[tt]=ut&1?ft[st]:ft[st-1]+ft[st]>>1)}return Ef(a,y,b),z}function qp(a,y,x,b,E,z){if(y.component===b){if(y.component=x,E)for(var tt=y.destinationEdges;tt.next();){var rt=tt.value,at=rt.toVertex,st=y.layer-at.layer;rt=a.linkMinLength(rt),st===rt&&qp(a,at,x,b,E,z)}if(z)for(tt=y.sourceEdges;tt.next();)rt=tt.value,at=rt.fromVertex,st=at.layer-y.layer,rt=a.linkMinLength(rt),st===rt&&qp(a,at,x,b,E,z)}}function my(a,y,x,b,E,z){if(y.component===b){if(y.component=x,E)for(var tt=y.destinationEdges;tt.next();)my(a,tt.value.toVertex,x,b,E,z);if(z)for(y=y.sourceEdges;y.next();)my(a,y.value.fromVertex,x,b,E,z)}}Yo.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case Sy:a=this.network;var y=0,x=a.vertexes.count-1,b=[];b.length=x+1;for(var E=a.vertexes.iterator;E.next();)E.value.valid=!0;for(;jx(a)!==null;){for(E=V1(a);E!==null;)b[x]=E,x--,E.valid=!1,E=V1(a);for(E=K1(a);E!==null;)b[y]=E,y++,E.valid=!1,E=K1(a);E=null;for(var z=0,tt=this.network.vertexes.iterator;tt.next();){var rt=tt.value;if(rt.valid){for(var at=0,st=rt.destinationEdges;st.next();)st.value.toVertex.valid&&at++;st=0;for(var ut=rt.sourceEdges;ut.next();)ut.value.fromVertex.valid&&st++;(E===null||zy.toVertex.index&&(a.gm(y),y.rev=!0);break;case Nv:for(b=this.network.vertexes.iterator;b.next();)a=b.value,a.Ll=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;for(this.Kn=0,b.reset();b.next();)y=b.value,y.sourceEdges.count===0&&vy(this,y);for(b.reset();b.next();)y=b.value,y.Ll===-1&&vy(this,y);for(a.reset();a.next();)b=a.value,b.forest||(y=b.fromVertex,x=y.finish,E=b.toVertex,z=E.finish,E.Llb){if(0>b)for(y.reset();y.next();)y.value.layer-=b;for(b=[],y.reset();y.next();)x=y.value,E=b[x.layer],E===void 0?b[x.layer]=[x]:E.push(x);for(x=y=0;xtt&&qp(a,rt,0,-1,!0,!1)}for(qp(a,y,1,-1,!0,!0);y.component!==0;){for(z=0,b=1/0,rt=0,at=null,tt=a.network.vertexes.iterator;tt.next();){var st=tt.value;if(st.component===1){var ut=0,ft=!1,vt=st.sourceEdgesArrayAccess;E=vt.length;for(var Ct=0;Ctz)&&!ut&&(rt=tt,z=st)}if(0>b){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer-=E);y.component=0}else rt.component=0}}}function Q1(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}Yo.prototype.initializeIndices=function(){switch(this.Qk){default:case Cy: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 Tv: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&&q1(this,x);break;case wy: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&&_1(this,x)}};function q1(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 b=0;bz.portFromColOffset&&(x=!0,y[b]=z,y[b+1]=E)}}for(x=0;xz.portToColOffset&&(b=!0,y[x]=z,y[x+1]=E)}for(x=0;x=tt;b--)z=zh(this,b,-1)||z;for(E=this.countCrossings(),E>=a?Eh(this,y):(a=E,y=Nu(this)),z=!0;z;)for(z=!1,b=x;b>=tt;b--)z=zh(this,b,1)||z;for(E=this.countCrossings(),E>=a?Eh(this,y):(a=E,y=Nu(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=zh(this,b,1)||z;for(E>=a?Eh(this,y):(a=E,y=Nu(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=zh(this,b,-1)||z;for(E>=a?Eh(this,y):(a=E,y=Nu(this)),z=!0;z;)for(z=!1,b=x;b>=tt;b--)z=zh(this,b,0)||z;for(E>=a?Eh(this,y):(a=E,y=Nu(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=zh(this,b,0)||z;E>=a?Eh(this,y):(a=E,y=Nu(this))}break;default:case Dv:for(x=this.Ia,tt=0,rt=a+1;(b=this.countCrossings())=tt;b--)z=zh(this,b,-1)||z;for(E=this.countCrossings(),E>=a?Eh(this,y):(a=E,y=Nu(this)),z=!0;z;)for(z=!1,b=x;b>=tt;b--)z=zh(this,b,1)||z;for(E=this.countCrossings(),E>=a?Eh(this,y):(a=E,y=Nu(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=zh(this,b,1)||z;for(E>=a?Eh(this,y):(a=E,y=Nu(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=zh(this,b,-1)||z;for(E>=a?Eh(this,y):(a=E,y=Nu(this)),z=!0;z;)for(z=!1,b=x;b>=tt;b--)z=zh(this,b,0)||z;for(E>=a?Eh(this,y):(a=E,y=Nu(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=zh(this,b,0)||z;E>=a?Eh(this,y):(a=E,y=Nu(this))}}Eh(this,y)};function Ev(a,y,x){var b=Mf(a,y),E=a.tc[y],z=Z1(a,y,x),tt=py(a,y,x);for(x=0;xz+1&&(vt+=4*(ee-z),Ct+=4*(ee-(z+1)))}for(he=b[z].destinationEdges.iterator,he.reset();he.next();)if(ee=he.value,ie=ee.toVertex,ee.valid&&ie.layer===y){for(ee=0;b[ee]!==ie;)ee++;ee===z+1&&(Ct+=1)}for(he=b[z+1].sourceEdges.iterator,he.reset();he.next();)if(ee=he.value,ie=ee.fromVertex,ee.valid&&ie.layer===y){for(ee=0;b[ee]!==ie;)ee++;eez+1&&(vt+=4*(ee-(z+1)),Ct+=4*(ee-z))}for(he=b[z+1].destinationEdges.iterator,he.reset();he.next();)if(ee=he.value,ie=ee.toVertex,ee.valid&&ie.layer===y){for(ee=0;b[ee]!==ie;)ee++;ee===z&&(vt+=1)}ee=ie=0,he=tt[b[z].index];var Ce=rt[b[z].index],We=tt[b[z+1].index],ii=rt[b[z+1].index];he!==-1&&(ie+=Math.abs(he-Et),ee+=Math.abs(he-Gt)),Ce!==-1&&(ie+=Math.abs(Ce-Et),ee+=Math.abs(Ce-Gt)),We!==-1&&(ie+=Math.abs(We-Nt),ee+=Math.abs(We-Qt)),ii!==-1&&(ie+=Math.abs(ii-Nt),ee+=Math.abs(ii-Qt)),(Ct>1)+8*b;this.Ra*=8}if(this.bg&2)for(x=!0;x;){for(x=!1,y=this.Md+1;y<=this.Ia;y++)x=ep(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=ep(this,y,-1)||x;x=ep(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)yy(this,y,1);for(y=this.Md-1;0<=y;y--)yy(this,y,-1);yy(this,this.Md,0)}if(a&&($1(this,-1),$1(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=ep(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=ep(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=ep(this,y,0)||x}}else Zx(this)};function ep(a,y,x){for(var b=!1;Hx(a,y,x);)b=!0;return b}function Hx(a,y,x){var b,E=Mf(a,y),z=a.tc[y],tt=py(a,y,-1);if(0x)for(b=0;bb-1||ut-E[b-1].column-1>ft+a.nodeMinColumnSpace(E[b-1],!1)?Ct=ut-1:Ct=ut,ft=b+1>=z||E[b+1].column-ut-1>vt+a.nodeMinColumnSpace(E[b+1],!0)?ut+1:ut;var Et=vt=0,Nt=0;if(0>=x)for(var Qt=E[b].sourceEdges.iterator;Qt.next();){var Gt=Qt.value,ee=Gt.fromVertex;if(Gt.valid&&ee.layer!==y){var ie=gy(Gt),he=Gt.portFromColOffset;Gt=Gt.portToColOffset,ee=ee.column,vt+=(Math.abs(ut+Gt-(ee+he))+1)*ie,Et+=(Math.abs(Ct+Gt-(ee+he))+1)*ie,Nt+=(Math.abs(ft+Gt-(ee+he))+1)*ie}}if(0<=x)for(Qt=E[b].destinationEdges.iterator;Qt.next();)Gt=Qt.value,ee=Gt.toVertex,Gt.valid&&ee.layer!==y&&(ie=gy(Gt),he=Gt.portFromColOffset,Gt=Gt.portToColOffset,ee=ee.column,vt+=(Math.abs(ut+he-(ee+Gt))+1)*ie,Et+=(Math.abs(Ct+he-(ee+Gt))+1)*ie,Nt+=(Math.abs(ft+he-(ee+Gt))+1)*ie);Gt=he=ie=0,Qt=tt[E[b].index],ee=rt[E[b].index],Qt!==-1&&(ie+=Math.abs(Qt-ut),he+=Math.abs(Qt-Ct),Gt+=Math.abs(Qt-ft)),ee!==-1&&(ie+=Math.abs(ee-ut),he+=Math.abs(ee-Ct),Gt+=Math.abs(ee-ft)),Et=tt[x]?ut=at:st<=tt[x]&&(ut=st));ut!==rt&&(z=!0,b[x].column=ut)}Ef(a,y,b),a.normalize()}function Wx(a,y){for(var x=!0,b=a.network.vertexes.iterator;b.next();){var E=b.value,z=a.nodeMinColumnSpace(E,!0),tt=a.nodeMinColumnSpace(E,!1);if(E.column-z<=y&&E.column+tt>=y){x=!1;break}}if(a=!1,x)for(b.reset();b.next();)x=b.value,x.column>y&&(--x.column,a=!0);return a}function Gx(a,y){var x=y+1,b,E=[],z=[];for(b=0;b<=a.Ia;b++)E[b]=!1,z[b]=!1;for(var tt=a.network.vertexes.iterator;tt.next();){b=tt.value;var rt=b.column-a.nodeMinColumnSpace(b,!0),at=b.column+a.nodeMinColumnSpace(b,!1);rt<=y&&at>=y&&(E[b.layer]=!0),rt<=x&&at>=x&&(z[b.layer]=!0)}for(rt=!0,x=!1,b=0;b<=a.Ia;b++)rt=rt&&!(E[b]&&z[b]);if(rt)for(tt.reset();tt.next();)a=tt.value,a.column>y&&(--a.column,x=!0);return x}function $1(a,y){for(var x=0;x<=a.Ra;x++)for(;Wx(a,x););for(a.normalize(),x=0;xz?Eh(a,E):tty)for(x=a.Ra;0<=x;x--)for(E=Nu(a),z=Mv(a),b=z+1;zz?Eh(a,E):ttx)for(b.reset();b.next();)E=b.value,E.column+a.nodeMinColumnSpace(E,!1)>=y&&(E.component=a.le);for(a.le++,b.reset();b.next();)y=b.value,y.component===-1&&(my(a,y,a.le,-1,!0,!0),a.le++);var z;for(y=[],z=0;zx)for(tt=a.Ra;0x)for(b.reset();b.next();)x=b.value,E[x.component]&&(x.column+=1)}function Zx(a){for(var y=Si(),x=a.fl.length,b=0;b<=x;b++)y[b]=[];for(b=a.network.vertexes.iterator;b.next();){var E=b.value;y[x-E.layer][E.index]=E}x=new Pn,Vx(y,x);var z=null,tt=null,rt=null,at=null,st=(a.ve&1)!==0,ut=(a.ve&2)!==0,ft=(a.ve&4)!==0,vt=(a.ve&8)!==0;for(st&&(a.verticalAlignment(y,x,!0),z=Av(a,y,!0,!1)),y.reverse(),ft&&(a.verticalAlignment(y,x,!1),rt=Av(a,y,!1,!1)),b=Fn(y),E=b.next();!E.done;E=b.next())E.value.reverse();vt&&(a.verticalAlignment(y,x,!1),at=Av(a,y,!1,!0)),y.reverse(),ut&&(a.verticalAlignment(y,x,!0),tt=Av(a,y,!0,!0)),Fi(y),a.u(z,tt,rt,at),a.network.vertexes.each(function(Ct){var Et=Si();st&&Et.push(z.get(Ct)),ut&&Et.push(tt.get(Ct)),ft&&Et.push(rt.get(Ct)),vt&&Et.push(at.get(Ct)),Et.sort(function(Qt,Gt){return Qt-Gt});var Nt=Et.length;Nt=(Et[Math.floor((Nt-1)/2)]+Et[Math.ceil((Nt-1)/2)])/2,Fi(Et),Ct.zc=Nt})}function Vx(a,y){for(var x=a.length,b=1;but)&&y.add(ft);z++}E=ut}}}Yo.prototype.verticalAlignment=function(a,y,x){Kx(a),a=Fn(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=Fn(b.value);for(var z=b.next();!z.done;z=b.next()){z=z.value;var tt=x?My(z):Yx(z),rt=tt.length;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++,0a&&Oe("Could not determine previous vertex in layer"),y[x][a-1]}Yo.prototype.u=function(a){for(var y=[],x=0;xtt;tt++)if(y[tt]){var rt=Ux(this,y[tt],b,E,tt);rttt;z={delta:z.delta},tt++)y[tt]&&(z.delta=tt===0||tt===2?b[x]-b[tt]:E[x]-E[tt],z.delta!==0&&y[tt].each(function(at){return function(st){st.value+=at.delta}}(z)));Fi(b),Fi(E)};function Ux(a,y,x,b,E){if(!y||y.count===0)return x[E]=0,b[E]=0,1/0;var z=1/0,tt=-1/0;return y.each(function(rt){var at=rt.key;rt=rt.value,at=a.K===90||a.K===270?at.width:at.height,rttt&&(tt=rt+at)}),x[E]=z,b[E]=tt,tt-z}Yo.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=kv(this,!0),y=kv(this,!1),x=this.network.edges.iterator;x.next();){var b=x.value.link;b!==null&&(b.fromSpot=a,b.toSpot=y)}this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()};function kv(a,y){return a.K===270?y?Hl:bl:a.K===90?y?bl:Hl:a.K===180?y?Fl:ul:y?ul:Fl}Yo.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 b=0;b<=this.Ia;b++){var E=x;0>=this.he[b]+this.Ld[b]&&(E=0),0=ft.bounds.bottom?(ft=ft.bounds.y+ft.bounds.height,y.m(Nt++,he,ft+We),y.m(Nt++,he,ft),y.m(Nt++,he,ft-ie)):(y.m(Nt++,he,Ce+We),y.m(Nt++,he,Ce),y.m(Nt++,he,Ce-ie)):this.K===270?Ce<=ft.bounds.y?(ft=ft.bounds.y,y.m(Nt++,he,ft-ie),y.m(Nt++,he,ft),y.m(Nt++,he,ft+We)):(y.m(Nt++,he,Ce-ie),y.m(Nt++,he,Ce),y.m(Nt++,he,Ce+We)):this.K===0&&(he>=ft.bounds.right?(ft=ft.bounds.x+ft.bounds.width,y.m(Nt++,ft+We,Ce),y.m(Nt++,ft,Ce),y.m(Nt++,ft-ie,Ce)):(y.m(Nt++,he+We,Ce),y.m(Nt++,he,Ce),y.m(Nt++,he-ie,Ce)));else{y.m(Nt++,Gt,ee);var ii=0;this.K===180||this.K===0?((this.K===180?he>=ft.bounds.right:he<=ft.bounds.x)&&(ii=(this.K===0?-ie:We)/2),y.m(Nt++,Gt+ii,Ce)):((this.K===270?Ce>=ft.bounds.bottom:Ce<=ft.bounds.y)&&(ii=(this.K===90?-ie:We)/2),y.m(Nt++,he,ee+ii)),y.m(Nt++,he,Ce)}}else ie=Math.max(10,this.he[Qt.layer]),We=Math.max(10,this.Ld[Qt.layer]),vt?this.K===180?(y.m(Nt++,he-ie-Et,Ce),y.m(Nt++,Math.min(he-ie+Et/2,he),Ce),y.m(Nt++,he,Ce),y.m(Nt++,he,Ce),y.m(Nt++,Math.max(he+We-Et/2,he),Ce),y.m(Nt++,he+We+Et,Ce)):this.K===90?(y.m(Nt++,he,Ce+We+Et),y.m(Nt++,he,Math.max(Ce+We-Et/2,Ce)),y.m(Nt++,he,Ce),y.m(Nt++,he,Ce),y.m(Nt++,he,Math.min(Ce-ie+Et/2,Ce)),y.m(Nt++,he,Ce-ie-Et)):this.K===270?(y.m(Nt++,he,Ce-ie-Et),y.m(Nt++,he,Math.min(Ce-ie+Et/2,Ce)),y.m(Nt++,he,Ce),y.m(Nt++,he,Ce),y.m(Nt++,he,Math.max(Ce+We-Et/2,Ce)),y.m(Nt++,he,Ce+We+Et)):(y.m(Nt++,he+We+Et,Ce),y.m(Nt++,Math.max(he+We-Et/2,he),Ce),y.m(Nt++,he,Ce),y.m(Nt++,he,Ce),y.m(Nt++,Math.min(he-ie+Et/2,he),Ce),y.m(Nt++,he-ie-Et,Ce)):y.m(Nt++,he,Ce)}ft=Qt}(rt===null||st!==ds||Ct)&&(Gt=y.i(Nt-1).x,ee=y.i(Nt-1).y,he=y.i(Nt).x,Ce=y.i(Nt).y,Ct?(Et=this.Ld[ut.layer],this.K===180||this.K===0?(Ct=ee,Ct>=ut.bounds.y&&Ct<=ut.bounds.bottom&&(this.K===180?he>=ut.bounds.x:he<=ut.bounds.right)&&(ft=ut.centerX+(this.K===180?-Et:Et),Ct=ut.bounds.x&&Ct<=ut.bounds.right&&(this.K===270?Ce>=ut.bounds.y:Ce<=ut.bounds.bottom)&&(ft=ut.centerY+(this.K===270?-Et:Et),Ct=ut.bounds.x?(ft=ut.bounds.x+ut.bounds.width,y.L(Nt-2,ft,ee),y.L(Nt-1,ft+We,ee)):this.K===90&&Ce<=ut.bounds.bottom?(ft=ut.bounds.y,y.L(Nt-2,Gt,ft),y.L(Nt-1,Gt,ft-ie)):this.K===270&&Ce>=ut.bounds.y?(ft=ut.bounds.y+ut.bounds.height,y.L(Nt-2,Gt,ft),y.L(Nt-1,Gt,ft+We)):this.K===0&&he<=ut.bounds.right&&(ft=ut.bounds.x,y.L(Nt-2,ft,ee),y.L(Nt-1,ft-ie,ee))):(ie=Math.max(10,this.he[ut.layer]),We=Math.max(10,this.Ld[ut.layer]),Ct=0,this.K===180||this.K===0?((this.K===180?he<=ut.bounds.x:he>=ut.bounds.right)&&(Ct=(this.K===0?We:-ie)/2),y.m(Nt++,he+Ct,ee)):((this.K===270?Ce<=ut.bounds.y:Ce>=ut.bounds.bottom)&&(Ct=(this.K===90?We:-ie)/2),y.m(Nt++,Gt,Ce+Ct)),y.m(Nt++,he,Ce)))}else{for(;ut!==null&&ut!==ft;){for(ie=Qt=null,ut=ut.destinationEdges.iterator;ut.next()&&(Gt=ut.value,Gt.link!==x.link||(Qt=Gt.toVertex,ie=Gt.fromVertex,ie.node!==null&&(ie=null),Qt.node!==null)););if(Qt===null)break;Qt!==ft&&(Gt=y.i(Nt-1).x,ee=y.i(Nt-1).y,he=Qt.centerX,Ce=Qt.centerY,Ct?this.K===180||this.K===0?(ie!==null?ie.centerY:ee)!==Ce&&(ie=this.Ta[Qt.layer]+this.Rf.x,Nt===y.firstPickIndex+1&&(ie=this.K===0?Math.max(ie,Gt):Math.min(ie,Gt)),y.m(Nt++,ie,ee),y.m(Nt++,ie,Ce)):(ie!==null?ie.centerX:Gt)!==he&&(ie=this.Ta[Qt.layer]+this.Rf.y,Nt===y.firstPickIndex+1&&(ie=this.K===90?Math.max(ie,ee):Math.min(ie,ee)),y.m(Nt++,Gt,ie),y.m(Nt++,he,ie)):(ie=Math.max(10,this.he[Qt.layer]),We=Math.max(10,this.Ld[Qt.layer]),vt?this.K===180?(y.m(Nt++,he+We+Et,Ce),y.m(Nt++,Math.max(he+We-Et/2,he),Ce),y.m(Nt++,he,Ce),y.m(Nt++,he,Ce),y.m(Nt++,Math.min(he-ie+Et/2,he),Ce),y.m(Nt++,he-ie-Et,Ce)):this.K===90?(y.m(Nt++,he,Ce-ie-Et),y.m(Nt++,he,Math.min(Ce-ie+Et/2,Ce)),y.m(Nt++,he,Ce),y.m(Nt++,he,Ce),y.m(Nt++,he,Math.max(Ce+We-Et/2,Ce)),y.m(Nt++,he,Ce+We+Et)):this.K===270?(y.m(Nt++,he,Ce+We+Et),y.m(Nt++,he,Math.max(Ce+We-Et/2,Ce)),y.m(Nt++,he,Ce),y.m(Nt++,he,Ce),y.m(Nt++,he,Math.min(Ce-ie+Et/2,Ce)),y.m(Nt++,he,Ce-ie-Et)):(y.m(Nt++,he-ie-Et,Ce),y.m(Nt++,Math.min(he-ie+Et/2,he),Ce),y.m(Nt++,he,Ce),y.m(Nt++,he,Ce),y.m(Nt++,Math.max(he+We-Et/2,he),Ce),y.m(Nt++,he+We+Et,Ce)):this.K===180?(y.m(Nt++,he+We,Ce),y.m(Nt++,he-ie,Ce)):this.K===90?(y.m(Nt++,he,Ce-ie),y.m(Nt++,he,Ce+We)):this.K===270?(y.m(Nt++,he,Ce+We),y.m(Nt++,he,Ce-ie)):(y.m(Nt++,he-ie,Ce),y.m(Nt++,he+We,Ce)))),ut=Qt}Ct&&(Gt=y.i(Nt-1).x,ee=y.i(Nt-1).y,he=y.i(Nt).x,Ce=y.i(Nt).y,this.K===180||this.K===0?ee!==Ce&&(ie=this.K===0?Math.min(Math.max((he+Gt)/2,this.Ta[ft.layer]+this.Rf.x),he):Math.max(Math.min((he+Gt)/2,this.Ta[ft.layer]+this.Rf.x),he),y.m(Nt++,ie,ee),y.m(Nt++,ie,Ce)):Gt!==he&&(ie=this.K===90?Math.min(Math.max((Ce+ee)/2,this.Ta[ft.layer]+this.Rf.y),Ce):Math.max(Math.min((Ce+ee)/2,this.Ta[ft.layer]+this.Rf.y),Ce),y.m(Nt++,Gt,ie),y.m(Nt++,he,ie)))}b!==null&&vt&&4<=y.pointsCount&&(tt!==null&&(tt=st===ds?y.getLinkPointFromPoint(E,tt,tt.ga(no),y.i(3),!0):y.i(0),st===ds&&(st=y.i(2),b=y.i(3),this.direction===90||this.direction===270?(y.L(1,(tt.x+st.x)/2,st.y),y.L(2,b.x,(st.y+b.y)/2)):(y.L(1,st.x,(tt.y+st.y)/2),y.L(2,(st.x+b.x)/2,b.y))),tt.w()||tt.set(E.actualBounds.center),y.L(0,tt.x,tt.y)),rt!==null&&(E=at===ds?y.getLinkPointFromPoint(z,rt,rt.ga(no),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),at===ds&&(rt=y.i(y.pointsCount-3),at=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(E.x+rt.x)/2,rt.y),y.L(y.pointsCount-2,at.x,(rt.y+at.y)/2)):(y.L(y.pointsCount-2,rt.x,(E.y+rt.y)/2),y.L(y.pointsCount-3,(rt.x+at.x)/2,at.y))),E.w()||E.set(z.actualBounds.center),y.L(y.pointsCount-1,E.x,E.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},Yo.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new Ln,y=this.network.edges.iterator;y.next();){var x=y.value.link;x!==null&&x.isOrthogonal&&!a.contains(x)&&a.add(x)}if(0z.y&&(ut=st.y>z.y?0:tt.xz.x&&(ut=st.x>z.x?0:tt.yy.layer?1:a.rdy.rd?1:a.Icy.Ic?1:0:0},bt.Ux=function(a,y){return a instanceof Af&&y instanceof Af&&a!==y?a.firsty.first||a.jy.j||a.rdy.rd?1:a.Icy.Ic?1:0:0},bt.Js=function(a,y){return a instanceof Af&&y instanceof Af&&a!==y?a.jcy.jc||a.jy.j||a.rdy.rd?1:a.Icy.Ic?1:0:0},bt.B=function(a,y){return a-=y,-1a},bt.zi=function(a,y,x,b){var E=a.length,z=b-x;if(!(1>=z))if((0>x||x>=E-1)&&Oe("not in range 0 <= from < length: "+x),z===2)b=a[x],E=a[x+1],0=E)a.sort(y);else for(x=a.slice(0,b),x.sort(y),y=0;y=E)for(b=a.slice(x),b.sort(y),y=x;y=a.He.length){for(var b=[],E=0;Ea&&(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 Nv=new Ke(Yo,"CycleDepthFirst",0),Sy=new Ke(Yo,"CycleGreedy",1),_p=new Ke(Yo,"CycleFromLayers",2),Fv=new Ke(Yo,"LayerOptimalLinkLength",0),xy=new Ke(Yo,"LayerLongestPathSink",1),Py=new Ke(Yo,"LayerLongestPathSource",2),Tv=new Ke(Yo,"InitDepthFirstOut",0),wy=new Ke(Yo,"InitDepthFirstIn",1),Cy=new Ke(Yo,"InitNaive",2),by=new Ke(Yo,"AggressiveNone",0),Dv=new Ke(Yo,"AggressiveLess",1),Ly=new Ke(Yo,"AggressiveMore",2),Xx=8;Yo.className="LayeredDigraphLayout",Yo.CycleDepthFirst=Nv,Yo.CycleGreedy=Sy,Yo.CycleFromLayers=_p,Yo.LayerOptimalLinkLength=Fv,Yo.LayerLongestPathSink=xy,Yo.LayerLongestPathSource=Py,Yo.InitDepthFirstOut=Tv,Yo.InitDepthFirstIn=wy,Yo.InitNaive=Cy,Yo.AggressiveNone=by,Yo.AggressiveLess=Dv,Yo.AggressiveMore=Ly,Yo.PackNone=0,Yo.PackExpand=1,Yo.PackStraighten=2,Yo.PackMedian=4,Yo.PackAll=15,Yo.AlignNone=0,Yo.AlignUpperLeft=1,Yo.AlignUpperRight=2,Yo.AlignLowerLeft=4,Yo.AlignLowerRight=8,Yo.AlignAll=15;function Af(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}Af.className="SegInfo";function np(a){ba.call(this,a)}ae(np,ba),np.prototype.createVertex=function(){return new Ah(this)},np.prototype.createEdge=function(){return new $p(this)},np.className="LayeredDigraphNetwork";function Ah(a){$s.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}ae(Ah,$s);function ix(a,y){return a.index-y.index}function Bv(a,y){if(!a.$n){for(var x=[],b=Fn(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=Fn(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;Oe("Unable to find destination edge to given vertex")}function My(a){if(!a.co){for(var y=[],x=Fn(a.sourceEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.fromVertex);y.sort(ix),a.co=y}return a.co}function Yx(a){if(!a.ao){for(var y=[],x=Fn(a.destinationEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.toVertex);y.sort(ix),a.ao=y}return a.ao}Ah.prototype.Cl=function(a){$s.prototype.Cl.call(this,a),this.bo=this.co=null},Ah.prototype.Kl=function(a){$s.prototype.Kl.call(this,a),this.bo=this.co=null},Ah.prototype.zl=function(a){$s.prototype.zl.call(this,a),this.$n=this.ao=null},Ah.prototype.Jl=function(a){$s.prototype.Jl.call(this,a),this.$n=this.ao=null},Ae.Object.defineProperties(Ah.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)}}}),Ah.prototype.deleteDestinationEdge=Ah.prototype.Jl,Ah.prototype.addDestinationEdge=Ah.prototype.zl,Ah.prototype.deleteSourceEdge=Ah.prototype.Kl,Ah.prototype.addSourceEdge=Ah.prototype.Cl,Ah.className="LayeredDigraphVertex";function $p(a){Qu.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}ae($p,Qu),Ae.Object.defineProperties($p.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)}}}),$p.className="LayeredDigraphEdge";function Wr(a){Qa.call(this),this.Ub=new Pn,this.Wn=zv,this.ud=od,this.vo=Hv,this.Bq=Iy,this.$v=[],this.td=!0,this.Rb=Wv,this.$d=new hn(10,10).freeze();var y=new Pg(this);this.W=new jh(y),this.Y=new jh(y),this.ru=[],a&&Object.assign(this,a)}ae(Wr,Qa),Wr.prototype.cloneProtected=function(a){Qa.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)},Wr.prototype.qb=function(a){a.classType===Wr?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:Oe("Unknown enum value: "+a):Qa.prototype.qb.call(this,a)},Wr.prototype.createNetwork=function(){return new Pg(this)},Wr.prototype.makeNetwork=function(a){function y(b){if(b instanceof ui)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof Gn){var E=b.fromNode;return E===null||E.isLinkLabel||E.category==="Comment"?!1:(b=b.toNode,!(b===null||b.isLinkLabel||b.category==="Comment"))}return!1}var x=this.createNetwork();return a instanceof we?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof dr?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Wr.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==Gv&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof we&&(y=a),this.path===zv&&y!==null?this.ud=y.isTreePathToChildren?od:Sg:this.ud=this.path===zv?od:this.path,0y.level)return!1;a.removeChild(x.parent,x)}return!0}Wr.prototype.removeChild=function(a,y){if(a!==null&&y!==null){for(var x=a.children,b=0,E=0;EE?hx(this,a,tt,ir,Gt,ee):cx(this,a,tt,ir,Gt,ee),ir=ee.x,Gt=ee.width,ee=ee.height;break;case _d:for(he=0;heft&&(bill&&(yg(a,-ll,0,cr,Lo-1),Iv(he,-ll,0),Iv(Ce,-ll,0),ll=0)}xa.S.h(ll,mi),Gt=Math.max(Gt,We),ee=Math.max(ee,ie+(Wn===0?0:Et)+rl.height),bi=We}else 0ft&&(mill&&(yg(a,0,-ll,cr,Lo-1),Iv(he,0,-ll),Iv(Ce,0,-ll),ll=0)),xa.S.h(bi,ll),ee=Math.max(ee,ii),Gt=Math.max(Gt,ie+(Wn===0?0:Et)+rl.width),mi=ii;xn++}switch(0st&&(st=0),135Nt&&(Nt=0),at===Md&&(rt+=vt/2+a.focus.y),tt+=b+x):y?(a.comments===null?b>Gt&&(Gt=Fy(at,b-Gt,0),tt=Gt.x,rt=Gt.y,Gt=b,st=0):Gt=ky(a,Gt,st),0>st&&(tt-=st,st=0),135ee&&(ee=Fy(at,0,Qt-ee),tt=ee.x,rt=ee.y,ee=Qt,Nt=0):ee=Ny(a,ee,Nt),0>Nt&&(rt-=Nt,Nt=0),tt+=b+x),0E[0].x?E[2].assign(E[1]):E[1].assign(E[2])),E[3].yE[0].x?E[3].assign(E[2]):E[2].assign(E[3])),Wn[0].h(st+b,0),Wn[1].h(Wn[0].x,Qt),Wn[2].yE[0].y?E[2].assign(E[1]):E[1].assign(E[2])),E[3].xE[0].y?E[3].assign(E[2]):E[2].assign(E[3])),Wn[0].h(0,Nt+Qt),Wn[1].h(b,Wn[0].y),Wn[2].xb?hx(a,y,E,xn,ie,he):cx(a,y,E,xn,ie,he),xn=he.x,ie=he.width,he=he.height;break;case _d:for(vt=0;vtvt&&(Wevt&&(iift&&(ft=0),135Gt&&(Gt=0)),y.la.h(ft,Gt),y.Da.h(ie,he)}}Wr.prototype.customAlignment=function(a,y,x,b,E){return[y,x,b,E]};function hx(a,y,x,b,E,z){var tt=x.length;if(tt===0)return new en(b,0,E,z);if(tt===1)return y=x[0],E=y.Da.width,z=y.Da.height,new en(b,0,E,z);for(var rt=y.nodeSpacing,at=y.rowSpacing,st=ic(y)===90,ut=0,ft=0,vt=0,Ct=0;Ctst&&(E-=st),z=Math.max(z,Math.max(Ct,vt)+a+tt.height),0>x.S.x&&(b=Ov(y,x.S.x,!1,b,rt))):(x.S.h(E+a,b+rt/2-x.focus.y-x.la.y),E=Math.max(E,Math.max(Et,ft)+a+tt.width),vt=b+rt/2-x.focus.y-x.la.y,z=Math.max(z,vt+tt.height),0>vt&&(z-=vt),0>x.S.y&&(b=Ov(y,x.S.y,!0,b,rt)))),new en(b,0,E,z)}function cx(a,y,x,b,E,z){var tt=x.length;if(tt===0)return new en(b,0,E,z);if(tt===1)return x=x[0],E=x.Da.width,z=x.Da.height,new en(b,0,E,z);for(var rt=y.nodeSpacing,at=y.rowSpacing,st=ic(y)===270,ut=0,ft=0,vt=0,Ct=0;Ctft&&(E-=ft),z=Math.max(z,Math.abs(Math.min(Ct,vt))+a+ut.height),0>at.S.x&&(b=Ov(y,at.S.x,!1,b,rt))):(at.S.h(-E-ut.width-a,b+rt/2-at.focus.y-at.la.y),E=Math.max(E,Math.abs(Math.min(Et,ft))+a+ut.width),vt=b+rt/2-at.focus.y-at.la.y,z=Math.max(z,vt+ut.height),0>vt&&(z-=vt),0>at.S.y&&(b=Ov(y,at.S.y,!0,b,rt)))),y=0;yy&&(y=x+a.width),0>x&&(y-=x),y;case ad:return a.width>y?a.width:y;case sd:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case qd:case ld:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case _d:return a.width-a.focus.x+a.nodeSpacing/2+y;case Md:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Ny(a,y,x){switch(a.alignment){case xg:case rp:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case ad:return a.height>y?a.height:y;case sd:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case qd:case ld:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case _d:return a.height-a.focus.y+a.nodeSpacing/2+y;case Md:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Fy(a,y,x){switch(a){case rp:y/=2,x/=2;break;case xg:y/=2,x/=2;break;case ad:x=y=0;break;case sd:break;default:Oe("Unhandled alignment value "+a.toString())}return new Zt(y,x)}function _f(a,y,x,b,E,z){y=Fy(y,x,b),yg(a,y.x,y.y,E,z)}function yg(a,y,x,b,E){if(y!==0||x!==0)for(a=a.children;b<=E;b++){var z=a[b].S;z.x+=y,z.y+=x}}function Rv(a,y,x,b){var E=y.parent;switch(a.ud){case od:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===E&&y.relativePoint.h(x,b);break;case Sg:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===E&&y.relativePoint.h(x,b);break;default:Oe("Unhandled path value "+a.ud.toString())}}function Iv(a,y,x){for(var b=0;bft.length||Ct===null||2>Ct.length))for(E=x=0;xst&&z.yz.y&&sty.length||x===null||2>x.length)b=null;else{for(ut=Iu(a,y.length+x.length),b=z=at=0;zat;)st=x[z++],ut[b++].h(st.x+E,st.y);for(x=Iu(a,b),at=0;atft.length||z===null||2>z.length)E=null;else{for(ut=Iu(a,ft.length+z.length),E=st=x=0;xz;)at=ft[x++],ut[E++].h(at.x,at.y);for(z=Iu(a,E),x=0;xft.length||Ct===null||2>Ct.length))for(E=x=0;xat&&z.xz.x&&aty.length||x===null||2>x.length)b=null;else{for(ut=Iu(a,y.length+x.length),b=z=at=0;zat;)st=x[z++],ut[b++].h(st.x,st.y+E);for(x=Iu(a,b),at=0;atft.length||z===null||2>z.length)E=null;else{for(ut=Iu(a,ft.length+z.length),E=st=x=0;xz;)at=ft[x++],ut[E++].h(at.x,at.y);for(z=Iu(a,E),x=0;x=a?0:135>=a?90:225>=a?180:315>=a?270:0}Wr.prototype.computeLayerSpacing=function(a){var y=ic(a);y=y===90||y===270;var x=a.layerSpacing;if(0=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!==jv&&a!==rm||(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!==ip&&a!==em&&a!==nm&&!im||(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!==jv&&a!==rm||(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 zv=new Ke(Wr,"PathDefault",-1),od=new Ke(Wr,"PathDestination",0),Sg=new Ke(Wr,"PathSource",1),ip=new Ke(Wr,"SortingForwards",10),em=new Ke(Wr,"SortingReverse",11),nm=new Ke(Wr,"SortingAscending",12),im=new Ke(Wr,"SortingDescending",13),rp=new Ke(Wr,"AlignmentCenterSubtrees",20),xg=new Ke(Wr,"AlignmentCenterChildren",21),ad=new Ke(Wr,"AlignmentStart",22),sd=new Ke(Wr,"AlignmentEnd",23),qd=new Ke(Wr,"AlignmentBus",24),ld=new Ke(Wr,"AlignmentBusBranching",25),_d=new Ke(Wr,"AlignmentTopLeftBus",26),Md=new Ke(Wr,"AlignmentBottomRightBus",27),jv=new Ke(Wr,"CompactionNone",30),rm=new Ke(Wr,"CompactionBlock",31),Hv=new Ke(Wr,"StyleLayered",40),Dy=new Ke(Wr,"StyleLastParents",41),By=new Ke(Wr,"StyleAlternating",42),Oy=new Ke(Wr,"StyleRootOnly",43),Wv=new Ke(Wr,"ArrangementVertical",50),Ry=new Ke(Wr,"ArrangementHorizontal",51),Gv=new Ke(Wr,"ArrangementFixedRoots",52),Iy=new Ke(Wr,"LayerIndividual",60),zy=new Ke(Wr,"LayerSiblings",61),Zv=new Ke(Wr,"LayerUniform",62);Wr.className="TreeLayout",Wr.PathDefault=zv,Wr.PathDestination=od,Wr.PathSource=Sg,Wr.SortingForwards=ip,Wr.SortingReverse=em,Wr.SortingAscending=nm,Wr.SortingDescending=im,Wr.AlignmentCenterSubtrees=rp,Wr.AlignmentCenterChildren=xg,Wr.AlignmentStart=ad,Wr.AlignmentEnd=sd,Wr.AlignmentBus=qd,Wr.AlignmentBusBranching=ld,Wr.AlignmentTopLeftBus=_d,Wr.AlignmentBottomRightBus=Md,Wr.CompactionNone=jv,Wr.CompactionBlock=rm,Wr.StyleLayered=Hv,Wr.StyleLastParents=Dy,Wr.StyleAlternating=By,Wr.StyleRootOnly=Oy,Wr.ArrangementVertical=Wv,Wr.ArrangementHorizontal=Ry,Wr.ArrangementFixedRoots=Gv,Wr.LayerIndividual=Iy,Wr.LayerSiblings=zy,Wr.LayerUniform=Zv;function Pg(a){ba.call(this,a)}ae(Pg,ba),Pg.prototype.createVertex=function(){return new jh(this)},Pg.prototype.createEdge=function(){return new op(this)},Pg.className="TreeNetwork";function jh(a){$s.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 Zt(0,0),this.Da=new hn(0,0),this.la=new Zt(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=ip,this.hd=ry,this.Kb=0,this.Jb=xg,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=rm,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=al,this.wr=!0,this.Dp=al}ae(jh,$s),jh.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)},Ae.Object.defineProperties(jh.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;xCt.y+x.rowIndent&&(z=Math.min(z,Math.max(ft.y,z-y.computeNodeIndent(x))))):x.alignment===ad?(z=b.top+E.y,E.y===0&&ft.yCt.x+x.rowIndent&&(z=Math.min(z,Math.max(ft.x,z-y.computeNodeIndent(x))))):x.alignment===ad?(z=b.left+E.x,E.x===0&&ft.xCt.y+x.rowIndent&&(z=Math.min(z,Math.max(ft.y,z-y.computeNodeIndent(x))))):x.alignment===ad?(z=b.top+E.y,E.y===0&&ft.yCt.x+x.rowIndent&&(z=Math.min(z,Math.max(ft.x,z-y.computeNodeIndent(x))))):x.alignment===ad?(z=b.left+E.x,E.x===0&&ft.x0&&Wt[Wt.length-1])||Ve[0]!==6&&Ve[0]!==2)){Xt=0;continue}if(Ve[0]===3&&(!Wt||Ve[1]>Wt[0]&&Ve[1]',"select"),this.addActionButton(Ft,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(Ft,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(Ft,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(Ft,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(Ft,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(Ft,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(Ft,'',"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 Xt=document.createElement("div");Xt.className=""+wt.toolbarButtonStyleClass.name,Xt.setAttribute("data-type-name",kt.typeName),Xt.innerHTML=kt.icon,Xt.addEventListener("click",function(){wt.markerToolbarButtonClicked(Xt,kt)}),wt.buttons.push(Xt),wt.markerButtons.push(Xt)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',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,'',"render"),this.addActionButton(Wt,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},Ot.prototype.addButtonClickListener=function(Lt){this.buttonClickListeners.push(Lt)},Ot.prototype.removeButtonClickListener=function(Lt){this.buttonClickListeners.indexOf(Lt)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Lt),1)},Ot.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Ot.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Lt=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var wt=0;wt0&&this.buttonClickListeners.forEach(function(Ft){return Ft("marker",wt)}),this.markerButtonOverflowBlock.style.display="none"},Ot.prototype.actionToolbarButtonClicked=function(Lt,wt){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ft){return Ft("action",wt)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Ot.prototype.setActiveButton=function(Lt){this.resetButtonStyles(),Lt.className=Lt.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Lt.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Ot.prototype.setActiveMarkerButton=function(Lt){var wt=this.markerButtons.find(function(Ft){return Ft.getAttribute("data-type-name")===Lt});wt&&this.setActiveButton(wt)},Ot.prototype.setCurrentMarker=function(Lt){var wt=this;this.currentMarker=Lt,this.buttons.filter(function(Ft){return/delete|notes/.test(Ft.getAttribute("data-action"))}).forEach(function(Ft){wt.currentMarker===void 0?(Ft.style.fillOpacity="0.4",Ft.style.pointerEvents="none"):(Ft.style.fillOpacity="1",Ft.style.pointerEvents="all")})},Ot}(),Dt=function(){function Ot(Lt,wt,Ft,Wt){this.panels=[],this.panelButtons=[],this.markerjsContainer=Lt,this.displayMode=wt,this.uiStyleSettings=Ft,this.styles=Wt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Ot.prototype.addStyles=function(){var Lt;this.toolboxStyleClass=this.styles.addClass(new pe("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 pe("toolbox_colors",` color: `+this.uiStyleSettings.toolboxColor+`; `));var wt=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new pe("toolbox-button-row",` display: flex; cursor: default; box-sizing: content-box; `)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new pe("toolbox-button-row_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`; `)),this.toolboxPanelRowStyleClass=this.styles.addClass(new pe("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 pe("toolbox-panel-row_colors",` background-color: `+((Lt=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Lt!==void 0?Lt:this.uiStyleSettings.toolbarBackgroundHoverColor)+`; `)),this.toolboxButtonStyleClass=this.styles.addClass(new pe("toolbox_button",` display: inline-block; width: `+(this.uiStyleSettings.toolbarHeight-2*wt)+`px; height: `+(this.uiStyleSettings.toolbarHeight-2*wt)+`px; padding: `+wt+`px; box-sizing: content-box; `)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new pe("toolbox-button_colors",` fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new pe("toolbox-active-button_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`; fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.styles.addRule(new Xe("."+this.toolboxButtonStyleColorsClass.name+":hover",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+` `)),this.styles.addRule(new Xe("."+this.toolboxButtonStyleClass.name+" svg",` height: `+this.uiStyleSettings.toolbarHeight/2+`px; `))},Ot.prototype.show=function(Lt){var wt;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Lt,this.uiContainer.className=this.toolboxStyleClass.name+" "+((wt=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&wt!==void 0?wt:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Ot.prototype.setPanelButtons=function(Lt){var wt,Ft,Wt=this;this.panels=Lt,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((wt=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&wt!==void 0?wt:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Ft=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Ft!==void 0?Ft:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(kt){var Xt;kt.uiStyleSettings=Wt.uiStyleSettings;var $e=document.createElement("div");$e.className=Wt.toolboxButtonStyleClass.name+" "+((Xt=Wt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Xt!==void 0?Xt:Wt.toolboxButtonStyleColorsClass.name),$e.innerHTML=kt.icon,$e.title=kt.title,$e.addEventListener("click",function(){Wt.panelButtonClick(kt)}),Wt.panelButtons.push($e),Wt.buttonRow.appendChild($e)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Ot.prototype.panelButtonClick=function(Lt){var wt=this,Ft=-1;if(Lt!==this.activePanel){Ft=this.panels.indexOf(Lt),this.panelRow.innerHTML="";var Wt=Lt.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=Lt}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){wt.displayMode==="inline"?wt.panelRow.style.display="none":wt.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(kt,Xt){var $e,Je;kt.className=wt.toolboxButtonStyleClass.name+" "+(Xt===Ft?""+(($e=wt.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&$e!==void 0?$e:wt.toolboxActiveButtonStyleColorsClass.name):""+((Je=wt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Je!==void 0?Je:wt.toolboxButtonStyleColorsClass.name))})},Ot}(),nt=function(Ot,Lt){this.title=Ot,this.icon=Lt},et=function(Ot){function Lt(wt,Ft,Wt,kt){var Xt=Ot.call(this,wt,kt||'')||this;return Xt.colors=[],Xt.addTransparent=!1,Xt.colorBoxes=[],Xt.colors=Ft,Xt.currentColor=Wt,Xt.setCurrentColor=Xt.setCurrentColor.bind(Xt),Xt.getColorBox=Xt.getColorBox.bind(Xt),Xt}return ne(Lt,Ot),Lt.prototype.getUi=function(){var wt=this,Ft=document.createElement("div");return Ft.style.overflow="hidden",Ft.style.whiteSpace="nowrap",this.colors.forEach(function(Wt){var kt=wt.getColorBox(Wt);Ft.appendChild(kt),wt.colorBoxes.push(kt)}),Ft},Lt.prototype.getColorBox=function(wt){var Ft=this,Wt=this.uiStyleSettings.toolbarHeight/4,kt=this.uiStyleSettings.toolbarHeight-Wt,Xt=document.createElement("div");Xt.style.display="inline-block",Xt.style.boxSizing="content-box",Xt.style.width=kt-2+"px",Xt.style.height=kt-2+"px",Xt.style.padding="1px",Xt.style.marginRight="2px",Xt.style.marginBottom="2px",Xt.style.borderWidth="2px",Xt.style.borderStyle="solid",Xt.style.borderRadius=(kt+2)/2+"px",Xt.style.borderColor=wt===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Xt.addEventListener("click",function(){Ft.setCurrentColor(wt,Xt)});var $e=document.createElement("div");return $e.style.display="inline-block",$e.style.width=kt-2+"px",$e.style.height=kt-2+"px",$e.style.backgroundColor=wt,$e.style.borderRadius=kt/2+"px",wt==="transparent"&&($e.style.fill=this.uiStyleSettings.toolboxAccentColor,$e.innerHTML=` `),Xt.appendChild($e),Xt},Lt.prototype.setCurrentColor=function(wt,Ft){var Wt=this;this.currentColor=wt,this.colorBoxes.forEach(function(kt){kt.style.borderColor=kt===Ft?Wt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(wt)},Lt}(nt),ht=function(){function Ot(Lt,wt,Ft){this._state="new",this._isSelected=!1,this._container=Lt,this._overlayContainer=wt,this.globalSettings=Ft,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Ot.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Ot.prototype.ownsTarget=function(Lt){return!1},Object.defineProperty(Ot.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Ot.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Ot.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Ot.prototype.pointerDown=function(Lt,wt){},Ot.prototype.dblClick=function(Lt,wt){},Ot.prototype.manipulate=function(Lt){},Ot.prototype.pointerUp=function(Lt){this.stateChanged()},Ot.prototype.dispose=function(){},Ot.prototype.addMarkerVisualToContainer=function(Lt){this.container.childNodes.length>0?this.container.insertBefore(Lt,this.container.childNodes[0]):this.container.appendChild(Lt)},Ot.prototype.getState=function(){return{typeName:Ot.typeName,state:this.state,notes:this.notes}},Ot.prototype.restoreState=function(Lt){this._state=Lt.state,this.notes=Lt.notes},Ot.prototype.scale=function(Lt,wt){},Ot.prototype.colorChanged=function(Lt){this.onColorChanged&&this.onColorChanged(Lt),this.stateChanged()},Ot.prototype.fillColorChanged=function(Lt){this.onFillColorChanged&&this.onFillColorChanged(Lt),this.stateChanged()},Ot.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Lt=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Lt.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Lt)&&this.onStateChanged(this)}},Ot.typeName="MarkerBase",Ot}(),lt=function(){function Ot(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Ot.prototype.findGripByVisual=function(Lt){return this.topLeft.ownsTarget(Lt)?this.topLeft:this.topCenter.ownsTarget(Lt)?this.topCenter:this.topRight.ownsTarget(Lt)?this.topRight:this.centerLeft.ownsTarget(Lt)?this.centerLeft:this.centerRight.ownsTarget(Lt)?this.centerRight:this.bottomLeft.ownsTarget(Lt)?this.bottomLeft:this.bottomCenter.ownsTarget(Lt)?this.bottomCenter:this.bottomRight.ownsTarget(Lt)?this.bottomRight:void 0},Ot}(),gt=function(){function Ot(){this.GRIP_SIZE=10,this.visual=Bt.createGroup(),this.visual.appendChild(Bt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Bt.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Ot.prototype.ownsTarget=function(Lt){return Lt===this.visual||Lt===this.visual.childNodes[0]||Lt===this.visual.childNodes[1]},Ot}(),mt=function(){function Ot(){}return Ot.toITransformMatrix=function(Lt){return{a:Lt.a,b:Lt.b,c:Lt.c,d:Lt.d,e:Lt.e,f:Lt.f}},Ot.toSVGMatrix=function(Lt,wt){return Lt.a=wt.a,Lt.b=wt.b,Lt.c=wt.c,Lt.d=wt.d,Lt.e=wt.e,Lt.f=wt.f,Lt},Ot}(),xt=function(Ot){function Lt(wt,Ft,Wt){var kt=Ot.call(this,wt,Ft,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(Bt.createTransform()),kt.setupControlBox(),kt}return ne(Lt,Ot),Object.defineProperty(Lt.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Lt.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Lt.prototype,"visual",{get:function(){return this._visual},set:function(wt){this._visual=wt;var Ft=Bt.createTransform();this._visual.transform.baseVal.appendItem(Ft)},enumerable:!1,configurable:!0}),Lt.prototype.ownsTarget=function(wt){return!!Ot.prototype.ownsTarget.call(this,wt)||!!(this.controlGrips.findGripByVisual(wt)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(wt))},Lt.prototype.pointerDown=function(wt,Ft){Ot.prototype.pointerDown.call(this,wt,Ft),this.state==="new"&&(this.left=wt.x,this.top=wt.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Wt=this.unrotatePoint(wt);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(Ft),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Ft)){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 Xt=this.container.transform.baseVal.getItem(0);Xt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Xt,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Lt.prototype.pointerUp=function(wt){var Ft=this.state;Ot.prototype.pointerUp.call(this,wt),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(wt),this._state="select",Ft==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Lt.prototype.moveVisual=function(wt){this.visual.style.transform="translate("+wt.x+"px, "+wt.y+"px)"},Lt.prototype.manipulate=function(wt){var Ft=this.unrotatePoint(wt);this.state==="creating"?this.resize(wt):this.state==="move"?(this.left=this.manipulationStartLeft+(Ft.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Ft.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Ft):this.state==="rotate"&&this.rotate(wt)},Lt.prototype.resize=function(wt){var Ft=this.manipulationStartLeft,Wt=this.manipulationStartWidth,kt=this.manipulationStartTop,Xt=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Ft=this.manipulationStartLeft+wt.x-this.manipulationStartX,Wt=this.manipulationStartWidth+this.manipulationStartLeft-Ft;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Wt=this.manipulationStartWidth+wt.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:kt=this.manipulationStartTop+wt.y-this.manipulationStartY,Xt=this.manipulationStartHeight+this.manipulationStartTop-kt;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Xt=this.manipulationStartHeight+wt.y-this.manipulationStartY}Wt>=0?(this.left=Ft,this.width=Wt):(this.left=Ft+Wt,this.width=-Wt),Xt>=0?(this.top=kt,this.height=Xt):(this.top=kt+Xt,this.height=-Xt),this.setSize()},Lt.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Lt.prototype.rotate=function(wt){if(Math.abs(wt.x-this.centerX)>.1){var Ft=Math.sign(wt.x-this.centerX);this.rotationAngle=180*Math.atan((wt.y-this.centerY)/(wt.x-this.centerX))/Math.PI+90*Ft,this.applyRotation()}},Lt.prototype.applyRotation=function(){var wt=this.container.transform.baseVal.getItem(0);wt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(wt,0)},Lt.prototype.rotatePoint=function(wt){if(this.rotationAngle===0)return wt;var Ft=this.container.getCTM(),Wt=Bt.createPoint(wt.x,wt.y);return{x:(Wt=Wt.matrixTransform(Ft)).x,y:Wt.y}},Lt.prototype.unrotatePoint=function(wt){if(this.rotationAngle===0)return wt;var Ft=this.container.getCTM();Ft=Ft.inverse();var Wt=Bt.createPoint(wt.x,wt.y);return{x:(Wt=Wt.matrixTransform(Ft)).x,y:Wt.y}},Lt.prototype.select=function(){Ot.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Lt.prototype.deselect=function(){Ot.prototype.deselect.call(this),this.controlBox.style.display="none"},Lt.prototype.setupControlBox=function(){this.controlBox=Bt.createGroup();var wt=Bt.createTransform();wt.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(wt),this.container.appendChild(this.controlBox),this.controlRect=Bt.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=Bt.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"},Lt.prototype.adjustControlBox=function(){var wt=this.controlBox.transform.baseVal.getItem(0);wt.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(wt,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()},Lt.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()},Lt.prototype.createGrip=function(){var wt=new gt;return wt.visual.transform.baseVal.appendItem(Bt.createTransform()),this.controlBox.appendChild(wt.visual),wt},Lt.prototype.positionGrips=function(){var wt=this.controlGrips.topLeft.GRIP_SIZE,Ft=-wt/2,Wt=Ft,kt=(this.width+this.CB_DISTANCE)/2-wt/2,Xt=(this.height+this.CB_DISTANCE)/2-wt/2,$e=this.height+this.CB_DISTANCE-wt/2,Je=this.width+this.CB_DISTANCE-wt/2;this.positionGrip(this.controlGrips.topLeft.visual,Ft,Wt),this.positionGrip(this.controlGrips.topCenter.visual,kt,Wt),this.positionGrip(this.controlGrips.topRight.visual,Je,Wt),this.positionGrip(this.controlGrips.centerLeft.visual,Ft,Xt),this.positionGrip(this.controlGrips.centerRight.visual,Je,Xt),this.positionGrip(this.controlGrips.bottomLeft.visual,Ft,$e),this.positionGrip(this.controlGrips.bottomCenter.visual,kt,$e),this.positionGrip(this.controlGrips.bottomRight.visual,Je,$e),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,kt,Wt-3*this.CB_DISTANCE)},Lt.prototype.positionGrip=function(wt,Ft,Wt){var kt=wt.transform.baseVal.getItem(0);kt.setTranslate(Ft,Wt),wt.transform.baseVal.replaceItem(kt,0)},Lt.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Lt.prototype.showControlBox=function(){this.controlBox.style.display=""},Lt.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:mt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:mt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Ot.prototype.getState.call(this))},Lt.prototype.restoreState=function(wt){Ot.prototype.restoreState.call(this,wt);var Ft=wt;this.left=Ft.left,this.top=Ft.top,this.width=Ft.width,this.height=Ft.height,this.rotationAngle=Ft.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(mt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Ft.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(mt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Ft.containerTransformMatrix))},Lt.prototype.scale=function(wt,Ft){Ot.prototype.scale.call(this,wt,Ft);var Wt=this.rotatePoint({x:this.left,y:this.top}),kt=this.unrotatePoint({x:Wt.x*wt,y:Wt.y*Ft});this.left=kt.x,this.top=kt.y,this.width=this.width*wt,this.height=this.height*Ft,this.adjustControlBox()},Lt}(ht),St=function(Ot){function Lt(wt,Ft,Wt){var kt=Ot.call(this,wt,Ft,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 ne(Lt,Ot),Lt.prototype.ownsTarget=function(wt){return!(!Ot.prototype.ownsTarget.call(this,wt)&&wt!==this.visual)},Lt.prototype.createVisual=function(){this.visual=Bt.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)},Lt.prototype.pointerDown=function(wt,Ft){Ot.prototype.pointerDown.call(this,wt,Ft),this.state==="new"&&(this.createVisual(),this.moveVisual(wt),this._state="creating")},Lt.prototype.manipulate=function(wt){Ot.prototype.manipulate.call(this,wt)},Lt.prototype.resize=function(wt){Ot.prototype.resize.call(this,wt),this.setSize()},Lt.prototype.setSize=function(){Ot.prototype.setSize.call(this),Bt.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Lt.prototype.pointerUp=function(wt){Ot.prototype.pointerUp.call(this,wt),this.setSize()},Lt.prototype.setStrokeColor=function(wt){this.strokeColor=wt,this.visual&&Bt.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(wt),this.stateChanged()},Lt.prototype.setFillColor=function(wt){this.fillColor=wt,this.visual&&Bt.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Lt.prototype.setStrokeWidth=function(wt){this.strokeWidth=wt,this.visual&&Bt.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Lt.prototype.setStrokeDasharray=function(wt){this.strokeDasharray=wt,this.visual&&Bt.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Lt.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Ot.prototype.getState.call(this))},Lt.prototype.restoreState=function(wt){var Ft=wt;this.fillColor=Ft.fillColor,this.strokeColor=Ft.strokeColor,this.strokeWidth=Ft.strokeWidth,this.strokeDasharray=Ft.strokeDasharray,this.opacity=Ft.opacity,this.createVisual(),Ot.prototype.restoreState.call(this,wt),this.setSize()},Lt.prototype.scale=function(wt,Ft){Ot.prototype.scale.call(this,wt,Ft),this.setSize()},Lt.title="Rectangle marker",Lt}(xt),zt=function(Ot){function Lt(wt,Ft,Wt,kt){var Xt=Ot.call(this,wt,kt||'')||this;return Xt.widths=[],Xt.widthBoxes=[],Xt.widths=Ft,Xt.currentWidth=Wt,Xt.setCurrentWidth=Xt.setCurrentWidth.bind(Xt),Xt}return ne(Lt,Ot),Lt.prototype.getUi=function(){var wt=this,Ft=document.createElement("div");return Ft.style.display="flex",Ft.style.overflow="hidden",Ft.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===wt.currentWidth?wt.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){wt.setCurrentWidth(Wt,kt)}),Ft.appendChild(kt);var Xt=document.createElement("div");Xt.innerText=Wt.toString(),Xt.style.marginRight="5px",kt.appendChild(Xt);var $e=document.createElement("div");$e.style.minHeight="20px",$e.style.flexGrow="2",$e.style.display="flex",$e.style.alignItems="center";var Je=document.createElement("hr");Je.style.minWidth="20px",Je.style.border="0px",Je.style.borderTop=Wt+"px solid "+wt.uiStyleSettings.toolboxColor,Je.style.flexGrow="2",$e.appendChild(Je),kt.appendChild($e),wt.widthBoxes.push(kt)}),Ft},Lt.prototype.setCurrentWidth=function(wt,Ft){var Wt=this;this.currentWidth=wt,this.widthBoxes.forEach(function(kt){kt.style.borderColor=kt===Ft?Wt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Lt}(nt),Jt=function(Ot){function Lt(wt,Ft,Wt,kt){var Xt=Ot.call(this,wt,kt||'')||this;return Xt.styles=[],Xt.styleBoxes=[],Xt.styles=Ft,Xt.currentStyle=Wt,Xt.setCurrentStyle=Xt.setCurrentStyle.bind(Xt),Xt}return ne(Lt,Ot),Lt.prototype.getUi=function(){var wt=this,Ft=document.createElement("div");return Ft.style.display="flex",Ft.style.overflow="hidden",Ft.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/wt.styles.length-5+"%",kt.style.borderColor=Wt===wt.currentStyle?wt.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){wt.setCurrentStyle(Wt,kt)}),Ft.appendChild(kt);var Xt=document.createElement("div");Xt.style.minHeight="20px",Xt.style.flexGrow="2",Xt.style.overflow="hidden";var $e=` `;Xt.innerHTML=$e,kt.appendChild(Xt),wt.styleBoxes.push(kt)}),Ft},Lt.prototype.setCurrentStyle=function(wt,Ft){var Wt=this;this.currentStyle=wt,this.styleBoxes.forEach(function(kt){kt.style.borderColor=kt===Ft?Wt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Lt}(nt),re=function(Ot){function Lt(wt,Ft,Wt){var kt=Ot.call(this,wt,Ft,Wt)||this;return kt.strokeColor=Wt.defaultColor,kt.strokeWidth=Wt.defaultStrokeWidth,kt.strokeDasharray=Wt.defaultStrokeDasharray,kt.strokePanel=new et("Line color",Wt.defaultColorSet,Wt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.strokeWidthPanel=new zt("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 ne(Lt,Ot),Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var wt=Ot.prototype.getState.call(this);return wt.typeName=Lt.typeName,wt},Lt.typeName="FrameMarker",Lt.title="Frame marker",Lt.icon='',Lt}(St),oe=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"},$t=function(Ot){function Lt(wt,Ft,Wt){var kt=Ot.call(this,wt,Ft,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 ne(Lt,Ot),Lt.prototype.ownsTarget=function(wt){return!!Ot.prototype.ownsTarget.call(this,wt)||!(!this.grip1.ownsTarget(wt)&&!this.grip2.ownsTarget(wt))},Lt.prototype.pointerDown=function(wt,Ft){Ot.prototype.pointerDown.call(this,wt,Ft),this.manipulationStartX=wt.x,this.manipulationStartY=wt.y,this.state==="new"&&(this.x1=wt.x,this.y1=wt.y,this.x2=wt.x,this.y2=wt.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(Ft)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Ft)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Lt.prototype.pointerUp=function(wt){var Ft=this.state;Ot.prototype.pointerUp.call(this,wt),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(wt),this._state="select",Ft==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Lt.prototype.adjustVisual=function(){},Lt.prototype.manipulate=function(wt){this.state==="creating"?this.resize(wt):this.state==="move"?(this.x1=this.manipulationStartX1+wt.x-this.manipulationStartX,this.y1=this.manipulationStartY1+wt.y-this.manipulationStartY,this.x2=this.manipulationStartX2+wt.x-this.manipulationStartX,this.y2=this.manipulationStartY2+wt.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(wt)},Lt.prototype.resize=function(wt){switch(this.activeGrip){case this.grip1:this.x1=wt.x,this.y1=wt.y;break;case this.grip2:case void 0:this.x2=wt.x,this.y2=wt.y}this.adjustVisual(),this.adjustControlBox()},Lt.prototype.select=function(){Ot.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Lt.prototype.deselect=function(){Ot.prototype.deselect.call(this),this.controlBox.style.display="none"},Lt.prototype.setupControlBox=function(){this.controlBox=Bt.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Lt.prototype.adjustControlBox=function(){this.positionGrips()},Lt.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Lt.prototype.createGrip=function(){var wt=new gt;return wt.visual.transform.baseVal.appendItem(Bt.createTransform()),this.controlBox.appendChild(wt.visual),wt},Lt.prototype.positionGrips=function(){var wt=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-wt/2,this.y1-wt/2),this.positionGrip(this.grip2.visual,this.x2-wt/2,this.y2-wt/2)},Lt.prototype.positionGrip=function(wt,Ft,Wt){var kt=wt.transform.baseVal.getItem(0);kt.setTranslate(Ft,Wt),wt.transform.baseVal.replaceItem(kt,0)},Lt.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Ot.prototype.getState.call(this))},Lt.prototype.restoreState=function(wt){Ot.prototype.restoreState.call(this,wt);var Ft=wt;this.x1=Ft.x1,this.y1=Ft.y1,this.x2=Ft.x2,this.y2=Ft.y2},Lt.prototype.scale=function(wt,Ft){Ot.prototype.scale.call(this,wt,Ft),this.x1=this.x1*wt,this.y1=this.y1*Ft,this.x2=this.x2*wt,this.y2=this.y2*Ft,this.adjustVisual(),this.adjustControlBox()},Lt}(ht),Le=function(Ot){function Lt(wt,Ft,Wt){var kt=Ot.call(this,wt,Ft,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 et("Line color",Wt.defaultColorSet,Wt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.strokeWidthPanel=new zt("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 ne(Lt,Ot),Lt.prototype.ownsTarget=function(wt){return!(!Ot.prototype.ownsTarget.call(this,wt)&&wt!==this.visual&&wt!==this.selectorLine&&wt!==this.visibleLine)},Lt.prototype.createVisual=function(){this.visual=Bt.createGroup(),this.selectorLine=Bt.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Bt.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)},Lt.prototype.pointerDown=function(wt,Ft){Ot.prototype.pointerDown.call(this,wt,Ft),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Lt.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()),Bt.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Bt.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Bt.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Lt.prototype.setStrokeColor=function(wt){this.strokeColor=wt,this.adjustVisual(),this.colorChanged(wt)},Lt.prototype.setStrokeWidth=function(wt){this.strokeWidth=wt,this.adjustVisual()},Lt.prototype.setStrokeDasharray=function(wt){this.strokeDasharray=wt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var wt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Ot.prototype.getState.call(this));return wt.typeName=Lt.typeName,wt},Lt.prototype.restoreState=function(wt){Ot.prototype.restoreState.call(this,wt);var Ft=wt;this.strokeColor=Ft.strokeColor,this.strokeWidth=Ft.strokeWidth,this.strokeDasharray=Ft.strokeDasharray,this.createVisual(),this.adjustVisual()},Lt.typeName="LineMarker",Lt.title="Line marker",Lt.icon='',Lt}($t),de=function(Ot){function Lt(wt,Ft,Wt,kt){var Xt=Ot.call(this,wt,kt||'')||this;return Xt.fonts=[],Xt.fontBoxes=[],Xt.fonts=Ft,Xt.currentFont=Wt,Xt.setCurrentFont=Xt.setCurrentFont.bind(Xt),Xt}return ne(Lt,Ot),Lt.prototype.getUi=function(){var wt=this,Ft=document.createElement("div");return Ft.style.overflow="hidden",Ft.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/wt.fonts.length-5+"%",kt.style.borderColor=Wt===wt.currentFont?wt.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){wt.setCurrentFont(Wt,kt)}),Ft.appendChild(kt);var Xt=document.createElement("div");Xt.style.display="flex",Xt.style.minHeight="20px",Xt.style.flexGrow="2",Xt.style.fontFamily=Wt,Xt.style.overflow="hidden";var $e=document.createElement("div");$e.style.whiteSpace="nowrap",$e.style.overflow="hidden",$e.style.textOverflow="ellipsis",$e.innerHTML="The quick brown fox jumps over the lazy dog",Xt.appendChild($e),kt.appendChild(Xt),wt.fontBoxes.push(kt)}),Ft},Lt.prototype.setCurrentFont=function(wt,Ft){var Wt=this;this.currentFont=wt,this.fontBoxes.forEach(function(kt){kt.style.borderColor=kt===Ft?Wt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Lt}(nt),Fe=function(Ot){function Lt(wt,Ft,Wt){var kt=Ot.call(this,wt,Ft,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 et("Color",Wt.defaultColorSet,Wt.defaultColor),kt.colorPanel.onColorChanged=kt.setColor,kt.fontFamilyPanel=new de("Font",Wt.defaultFontFamilies,Wt.defaultFontFamily),kt.fontFamilyPanel.onFontChanged=kt.setFont,kt}return ne(Lt,Ot),Lt.prototype.ownsTarget=function(wt){if(Ot.prototype.ownsTarget.call(this,wt)||wt===this.visual||wt===this.textElement||wt===this.bgRectangle)return!0;var Ft=!1;return this.textElement.childNodes.forEach(function(Wt){Wt===wt&&(Ft=!0)}),Ft},Lt.prototype.createVisual=function(){this.visual=Bt.createGroup(),this.bgRectangle=Bt.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Bt.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Bt.createTransform()),this.textElement.transform.baseVal.appendItem(Bt.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Lt.prototype.pointerDown=function(wt,Ft){Ot.prototype.pointerDown.call(this,wt,Ft),this.isMoved=!1,this.pointerDownPoint=wt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(wt),this._state="creating")},Lt.prototype.renderText=function(){var wt=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(Ft){wt.textElement.appendChild(Bt.createTSpan(Ft.trim()===""?" ":Ft.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Lt.prototype.getTextScale=function(){var wt=this.textElement.getBBox(),Ft=1;if(wt.width>0&&wt.height>0){var Wt=(1*this.width-this.width*this.padding*2/100)/wt.width,kt=(1*this.height-this.height*this.padding*2/100)/wt.height;Ft=Math.min(Wt,kt)}return Ft},Lt.prototype.getTextPosition=function(wt){var Ft=this.textElement.getBBox(),Wt=0,kt=0;return Ft.width>0&&Ft.height>0&&(Wt=(this.width-Ft.width*wt)/2,kt=this.height/2-Ft.height*wt/2),{x:Wt,y:kt}},Lt.prototype.sizeText=function(){var wt=this.textElement.getBBox(),Ft=this.getTextScale(),Wt=this.getTextPosition(Ft);Wt.y-=wt.y*Ft,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Wt.x+"px, "+Wt.y+"px) scale("+Ft+", "+Ft+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Wt.x,Wt.y),this.textElement.transform.baseVal.getItem(1).setScale(Ft,Ft))},Lt.prototype.manipulate=function(wt){Ot.prototype.manipulate.call(this,wt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(wt.x-this.pointerDownPoint.x)>5||Math.abs(wt.y-this.pointerDownPoint.y)>5)},Lt.prototype.resize=function(wt){Ot.prototype.resize.call(this,wt),this.isMoved=!0,this.setSize(),this.sizeText()},Lt.prototype.setSize=function(){Ot.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Bt.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Bt.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Lt.prototype.pointerUp=function(wt){var Ft=this.state;Ft==="creating"&&(this._suppressMarkerCreateEvent=!0),Ot.prototype.pointerUp.call(this,wt),this.setSize(),(Ft==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Lt.prototype.showTextEditor=function(){var wt=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(Ft){Ft.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Ft=Number.parseFloat(wt.textEditor.style.fontSize);wt.textEditor.clientWidth>=Number.parseInt(wt.textEditor.style.maxWidth)&&Ft>.9;)Ft-=.1,wt.textEditor.style.fontSize=Math.max(Ft,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Ft){Ft.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Ft){if(Ft.clipboardData){var Wt=Ft.clipboardData.getData("text"),kt=window.getSelection();if(!kt.rangeCount)return!1;kt.deleteFromDocument(),kt.getRangeAt(0).insertNode(document.createTextNode(Wt)),Ft.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){wt.textEditDivClicked(wt.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},Lt.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var wt=this.getTextScale(),Ft=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Wt=this.textElement.getBBox(),kt={x:Wt.width*wt,y:Wt.height*wt};Ft.x-=kt.x/2,Ft.y-=kt.y/2,this.textEditor.style.top=Ft.y+"px",this.textEditor.style.left=Ft.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Ft.x+"px",this.textEditor.style.fontSize=Math.max(16*wt,12)+"px",this.textElement.style.display="none"}},Lt.prototype.textEditDivClicked=function(wt){this.text=wt.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},Lt.prototype.select=function(){Ot.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Lt.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Ot.prototype.deselect.call(this)},Lt.prototype.dblClick=function(wt,Ft){Ot.prototype.dblClick.call(this,wt,Ft),this.showTextEditor()},Lt.prototype.setColor=function(wt){this.textElement&&Bt.setAttributes(this.textElement,[["fill",wt]]),this.color=wt,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(wt)},Lt.prototype.setFont=function(wt){this.textElement&&Bt.setAttributes(this.textElement,[["font-family",wt]]),this.fontFamily=wt,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},Lt.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Lt.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var wt=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Ot.prototype.getState.call(this));return wt.typeName=Lt.typeName,wt},Lt.prototype.restoreState=function(wt){var Ft=wt;this.color=Ft.color,this.fontFamily=Ft.fontFamily,this.padding=Ft.padding,this.text=Ft.text,this.createVisual(),Ot.prototype.restoreState.call(this,wt),this.setSize()},Lt.prototype.scale=function(wt,Ft){Ot.prototype.scale.call(this,wt,Ft),this.setSize(),this.sizeText(),this.positionTextEditor()},Lt.typeName="TextMarker",Lt.title="Text marker",Lt.icon='',Lt}(xt),rn=function(Ot){function Lt(wt,Ft,Wt){var kt=Ot.call(this,wt,Ft,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 et("Color",Wt.defaultColorSet,Wt.defaultColor),kt.colorPanel.onColorChanged=kt.setColor,kt.lineWidthPanel=new zt("Line width",Wt.defaultStrokeWidths,Wt.defaultStrokeWidth),kt.lineWidthPanel.onWidthChanged=kt.setLineWidth,kt}return ne(Lt,Ot),Lt.prototype.ownsTarget=function(wt){return!(!Ot.prototype.ownsTarget.call(this,wt)&&wt!==this.visual&&wt!==this.drawingImage)},Lt.prototype.createVisual=function(){this.visual=Bt.createGroup(),this.drawingImage=Bt.createImage(),this.visual.appendChild(this.drawingImage);var wt=Bt.createTransform();this.visual.transform.baseVal.appendItem(wt),this.addMarkerVisualToContainer(this.visual)},Lt.prototype.pointerDown=function(wt,Ft){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(wt.x,wt.y),this.drawing=!0):Ot.prototype.pointerDown.call(this,wt,Ft)},Lt.prototype.manipulate=function(wt){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(wt.x,wt.y),this.canvasContext.stroke()):Ot.prototype.manipulate.call(this,wt)},Lt.prototype.resize=function(wt){Ot.prototype.resize.call(this,wt),Bt.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Bt.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Lt.prototype.pointerUp=function(wt){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Ot.prototype.pointerUp.call(this,wt)},Lt.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)},Lt.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Ot.prototype.select.call(this)},Lt.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Ot.prototype.deselect.call(this)},Lt.prototype.finishCreation=function(){for(var wt=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Ft=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Wt=Ft[0],kt=Ft[1],Xt=Ft[2],$e=Ft[3],Je=!1,fn=0;fn0&&(Je=!0,fn$e&&($e=fn),Ve>Xt&&(Xt=Ve));if(Je){this.left=Wt/this.pixelRatio,this.top=kt/this.pixelRatio,this.width=(Xt-Wt)/this.pixelRatio,this.height=($e-kt)/this.pixelRatio;var Mn=document.createElement("canvas");Mn.width=Xt-Wt,Mn.height=$e-kt,Mn.getContext("2d").putImageData(this.canvasContext.getImageData(Wt,kt,Xt-Wt,$e-kt),0,0),this.drawingImgUrl=Mn.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Lt.prototype.setDrawingImage=function(){Bt.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Bt.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Lt.prototype.setColor=function(wt){this.color=wt,this.colorChanged(wt)},Lt.prototype.setLineWidth=function(wt){this.lineWidth=wt},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var wt=Object.assign({drawingImgUrl:this.drawingImgUrl},Ot.prototype.getState.call(this));return wt.typeName=Lt.typeName,wt},Lt.prototype.restoreState=function(wt){this.createVisual(),Ot.prototype.restoreState.call(this,wt),this.drawingImgUrl=wt.drawingImgUrl,this.setDrawingImage()},Lt.prototype.scale=function(wt,Ft){Ot.prototype.scale.call(this,wt,Ft),this.setDrawingImage()},Lt.typeName="FreehandMarker",Lt.title="Freehand marker",Lt.icon='',Lt}(xt),De=function(Ot){function Lt(wt,Ft,Wt){var kt=Ot.call(this,wt,Wt||'')||this;return kt.typeBoxes=[],kt.currentType=Ft,kt.setCurrentType=kt.setCurrentType.bind(kt),kt}return ne(Lt,Ot),Lt.prototype.getUi=function(){var wt=this,Ft=document.createElement("div");Ft.style.display="flex",Ft.style.overflow="hidden",Ft.style.flexGrow="2";for(var Wt=function($e){var Je="both";switch($e){case 0:Je="both";break;case 1:Je="start";break;case 2:Je="end";break;case 3:Je="none"}var fn=document.createElement("div");if(fn.style.display="flex",fn.style.flexGrow="2",fn.style.alignItems="center",fn.style.justifyContent="space-between",fn.style.padding="5px",fn.style.borderWidth="2px",fn.style.borderStyle="solid",fn.style.borderColor=Je===kt.currentType?kt.uiStyleSettings.toolboxAccentColor:"transparent",fn.addEventListener("click",function(){wt.setCurrentType(Je,fn)}),Ft.appendChild(fn),Je==="both"||Je==="start"){var Ve=document.createElement("div");Ve.style.display="flex",Ve.style.alignItems="center",Ve.style.minHeight="20px",Ve.innerHTML=` `,Ve.style.marginLeft="5px",fn.appendChild(Ve)}var Mn=document.createElement("div");Mn.style.display="flex",Mn.style.alignItems="center",Mn.style.minHeight="20px",Mn.style.flexGrow="2";var Ue=document.createElement("hr");if(Ue.style.minWidth="20px",Ue.style.border="0px",Ue.style.borderTop="3px solid "+(kt.uiStyleSettings!==void 0?kt.uiStyleSettings.toolboxColor:"#eeeeee"),Ue.style.flexGrow="2",Mn.appendChild(Ue),fn.appendChild(Mn),Je==="both"||Je==="end"){var ti=document.createElement("div");ti.style.display="flex",ti.style.alignItems="center",ti.style.minHeight="20px",ti.innerHTML=` `,ti.style.marginRight="5px",fn.appendChild(ti)}kt.typeBoxes.push(fn)},kt=this,Xt=0;Xt<4;Xt++)Wt(Xt);return Ft},Lt.prototype.setCurrentType=function(wt,Ft){var Wt=this;this.currentType=wt,this.typeBoxes.forEach(function(kt){kt.style.borderColor=kt===Ft?Wt.uiStyleSettings!==void 0?Wt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Lt}(nt),jn=function(Ot){function Lt(wt,Ft,Wt){var kt=Ot.call(this,wt,Ft,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 De("Arrow type","end"),kt.arrowTypePanel.onArrowTypeChanged=kt.setArrowType,kt}return ne(Lt,Ot),Lt.prototype.ownsTarget=function(wt){return!(!Ot.prototype.ownsTarget.call(this,wt)&&wt!==this.arrow1&&wt!==this.arrow2)},Lt.prototype.getArrowPoints=function(wt,Ft){var Wt=this.arrowBaseWidth+2*this.strokeWidth,kt=this.arrowBaseHeight+2*this.strokeWidth;return wt-Wt/2+","+(Ft+kt/2)+" "+wt+","+(Ft-kt/2)+" "+(wt+Wt/2)+","+(Ft+kt/2)},Lt.prototype.createTips=function(){this.arrow1=Bt.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Bt.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Bt.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Bt.createTransform()),this.visual.appendChild(this.arrow2)},Lt.prototype.pointerDown=function(wt,Ft){Ot.prototype.pointerDown.call(this,wt,Ft),this.state==="creating"&&this.createTips()},Lt.prototype.adjustVisual=function(){if(Ot.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",Bt.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Bt.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var wt=0;Math.abs(this.x1-this.x2)>.1&&(wt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Ft=this.arrow1.transform.baseVal.getItem(0);Ft.setRotate(wt,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Ft,0);var Wt=this.arrow2.transform.baseVal.getItem(0);Wt.setRotate(wt+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Wt,0)}},Lt.prototype.setArrowType=function(wt){this.arrowType=wt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var wt=Object.assign({arrowType:this.arrowType},Ot.prototype.getState.call(this));return wt.typeName=Lt.typeName,wt},Lt.prototype.restoreState=function(wt){Ot.prototype.restoreState.call(this,wt);var Ft=wt;this.arrowType=Ft.arrowType,this.createTips(),this.adjustVisual()},Lt.typeName="ArrowMarker",Lt.title="Arrow marker",Lt.icon='',Lt}(Le),Bn=function(Ot){function Lt(wt,Ft,Wt){var kt=Ot.call(this,wt,Ft,Wt)||this;return kt.fillColor=Wt.defaultFillColor,kt.strokeWidth=0,kt.fillPanel=new et("Color",Wt.defaultColorSet,Wt.defaultFillColor),kt.fillPanel.onColorChanged=kt.setFillColor,kt}return ne(Lt,Ot),Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var wt=Ot.prototype.getState.call(this);return wt.typeName=Lt.typeName,wt},Lt.typeName="CoverMarker",Lt.title="Cover marker",Lt.icon='',Lt}(St),an=function(Ot){function Lt(wt,Ft,Wt,kt){var Xt=Ot.call(this,wt,kt||'')||this;return Xt.opacities=[],Xt.opacityBoxes=[],Xt.opacities=Ft,Xt.currentOpacity=Wt,Xt.setCurrentOpacity=Xt.setCurrentOpacity.bind(Xt),Xt}return ne(Lt,Ot),Lt.prototype.getUi=function(){var wt=this,Ft=document.createElement("div");return Ft.style.display="flex",Ft.style.overflow="hidden",Ft.style.flexGrow="2",Ft.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===wt.currentOpacity?wt.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){wt.setCurrentOpacity(Wt,kt)}),Ft.appendChild(kt);var Xt=document.createElement("div");Xt.innerText=100*Wt+"%",kt.appendChild(Xt),wt.opacityBoxes.push(kt)}),Ft},Lt.prototype.setCurrentOpacity=function(wt,Ft){var Wt=this;this.currentOpacity=wt,this.opacityBoxes.forEach(function(kt){kt.style.borderColor=kt===Ft?Wt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Lt}(nt),Zn=function(Ot){function Lt(wt,Ft,Wt){var kt=Ot.call(this,wt,Ft,Wt)||this;return kt.setOpacity=kt.setOpacity.bind(kt),kt.fillColor=Wt.defaultHighlightColor,kt.strokeWidth=0,kt.opacity=Wt.defaultHighlightOpacity,kt.fillPanel=new et("Color",Wt.defaultColorSet,kt.fillColor),kt.fillPanel.onColorChanged=kt.setFillColor,kt.opacityPanel=new an("Opacity",Wt.defaultOpacitySteps,kt.opacity),kt.opacityPanel.onOpacityChanged=kt.setOpacity,kt}return ne(Lt,Ot),Lt.prototype.setOpacity=function(wt){this.opacity=wt,this.visual&&Bt.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var wt=Ot.prototype.getState.call(this);return wt.typeName=Lt.typeName,wt},Lt.typeName="HighlightMarker",Lt.title="Highlight marker",Lt.icon='',Lt}(Bn),_t='',Tt='',ce=function(Ot){function Lt(wt,Ft,Wt){var kt=Ot.call(this,wt,Ft,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 et("Text color",Wt.defaultColorSet,kt.color,_t),kt.colorPanel.onColorChanged=kt.setColor,kt.bgColorPanel=new et("Fill color",Wt.defaultColorSet,kt.bgColor,Tt),kt.bgColorPanel.onColorChanged=kt.setBgColor,kt.fontFamilyPanel=new de("Font",Wt.defaultFontFamilies,Wt.defaultFontFamily),kt.fontFamilyPanel.onFontChanged=kt.setFont,kt.tipGrip=new gt,kt.tipGrip.visual.transform.baseVal.appendItem(Bt.createTransform()),kt.controlBox.appendChild(kt.tipGrip.visual),kt}return ne(Lt,Ot),Lt.prototype.ownsTarget=function(wt){return Ot.prototype.ownsTarget.call(this,wt)||this.tipGrip.ownsTarget(wt)||this.tip===wt},Lt.prototype.createTip=function(){Bt.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Bt.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Lt.prototype.pointerDown=function(wt,Ft){this.state==="new"&&Ot.prototype.pointerDown.call(this,wt,Ft),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Ft)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Ot.prototype.pointerDown.call(this,wt,Ft)},Lt.prototype.pointerUp=function(wt){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Ot.prototype.pointerUp.call(this,wt);else{var Ft=this.state==="creating";Ot.prototype.pointerUp.call(this,wt),this.setTipPoints(Ft),this.positionTip()}},Lt.prototype.manipulate=function(wt){if(this.tipMoving){var Ft=this.unrotatePoint(wt);this.tipPosition={x:Ft.x-this.manipulationStartLeft,y:Ft.y-this.manipulationStartTop},this.positionTip()}else Ot.prototype.manipulate.call(this,wt)},Lt.prototype.setBgColor=function(wt){this.bgRectangle&&this.tip&&(Bt.setAttributes(this.bgRectangle,[["fill",wt]]),Bt.setAttributes(this.tip,[["fill",wt]])),this.bgColor=wt,this.fillColorChanged(wt)},Lt.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},Lt.prototype.setTipPoints=function(wt){wt===void 0&&(wt=!1);var Ft=Math.min(this.height/2,15),Wt=this.height/5;wt&&(this.tipPosition={x:Ft+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.width/2&&this.tipPosition.y>=this.height/2?kt.1)){var wt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Ft=this.tip1.transform.baseVal.getItem(0);Ft.setRotate(wt,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Ft,0);var Wt=this.tip2.transform.baseVal.getItem(0);Wt.setRotate(wt+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Wt,0)}},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var wt=Ot.prototype.getState.call(this);return wt.typeName=Lt.typeName,wt},Lt.prototype.restoreState=function(wt){Ot.prototype.restoreState.call(this,wt),this.createTips(),this.adjustVisual()},Lt.typeName="MeasurementMarker",Lt.title="Measurement marker",Lt.icon='',Lt}(Le),xe=function(Ot){function Lt(wt,Ft,Wt){var kt=Ot.call(this,wt,Ft,Wt)||this;return kt.strokePanel.colors=Wt.defaultColorSet,kt.fillColor="transparent",kt}return ne(Lt,Ot),Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var wt=Ot.prototype.getState.call(this);return wt.typeName=Lt.typeName,wt},Lt.typeName="EllipseFrameMarker",Lt.title="Ellipse frame marker",Lt.icon='',Lt}(_e),on=function(){function Ot(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Ot.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Ot.prototype.addUndoStep=function(Lt){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Lt)||(this.undoStack.push(Lt),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Lt)&&this.redoStack.splice(0,this.redoStack.length))},Ot.prototype.replaceLastUndoStep=function(Lt){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Lt)},Ot.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Ot.prototype.undo=function(){if(this.undoStack.length>1){var Lt=this.undoStack.pop();return Lt!==void 0&&this.redoStack.push(Lt),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Ot.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Ot}(),tn=function(Ot){function Lt(wt,Ft,Wt){var kt=Ot.call(this,wt,Ft,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 et("Line color",Wt.defaultColorSet,Wt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.strokeWidthPanel=new zt("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 ne(Lt,Ot),Lt.prototype.ownsTarget=function(wt){return!(!Ot.prototype.ownsTarget.call(this,wt)&&wt!==this.visual&&wt!==this.selectorCurve&&wt!==this.visibleCurve&&!this.curveGrip.ownsTarget(wt))},Lt.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Lt.prototype.createVisual=function(){this.visual=Bt.createGroup(),this.selectorCurve=Bt.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Bt.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)},Lt.prototype.pointerDown=function(wt,Ft){Ot.prototype.pointerDown.call(this,wt,Ft),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=wt.x,this.curveY=wt.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Ft)&&(this.activeGrip=this.curveGrip,this._state="resize")},Lt.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Bt.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Bt.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Bt.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Lt.prototype.setupControlBox=function(){Ot.prototype.setupControlBox.call(this),this.curveControlLine1=Bt.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Bt.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)},Lt.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Ot.prototype.addControlGrips.call(this)},Lt.prototype.positionGrips=function(){Ot.prototype.positionGrips.call(this);var wt=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-wt/2,this.curveY-wt/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()))},Lt.prototype.manipulate=function(wt){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+wt.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+wt.y-this.manipulationStartY),Ot.prototype.manipulate.call(this,wt)},Lt.prototype.resize=function(wt){this.activeGrip===this.curveGrip&&(this.curveX=wt.x,this.curveY=wt.y),Ot.prototype.resize.call(this,wt),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},Lt.prototype.setStrokeColor=function(wt){this.strokeColor=wt,this.adjustVisual(),this.colorChanged(wt)},Lt.prototype.setStrokeWidth=function(wt){this.strokeWidth=wt,this.adjustVisual()},Lt.prototype.setStrokeDasharray=function(wt){this.strokeDasharray=wt,this.adjustVisual()},Lt.prototype.scale=function(wt,Ft){this.curveX=this.curveX*wt,this.curveY=this.curveY*Ft,Ot.prototype.scale.call(this,wt,Ft)},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var wt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Ot.prototype.getState.call(this));return wt.typeName=Lt.typeName,wt},Lt.prototype.restoreState=function(wt){Ot.prototype.restoreState.call(this,wt);var Ft=wt;this.strokeColor=Ft.strokeColor,this.strokeWidth=Ft.strokeWidth,this.strokeDasharray=Ft.strokeDasharray,this.curveX=Ft.curveX,this.curveY=Ft.curveY,this.createVisual(),this.adjustVisual()},Lt.typeName="CurveMarker",Lt.title="Curve marker",Lt.icon='',Lt}($t),Cn=function(Ot){function Lt(wt,Ft,Wt){var kt=Ot.call(this,wt,Ft,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 et("Line color",Pe(Wt.defaultColorSet,["transparent"]),kt.strokeColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.fillPanel=new et("Fill color",Pe(Wt.defaultColorSet,["transparent"]),kt.fillColor,Tt),kt.fillPanel.onColorChanged=kt.setFillColor,kt.strokeWidthPanel=new zt("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 de("Font",Wt.defaultFontFamilies,Wt.defaultFontFamily),kt.fontFamilyPanel.onFontChanged=kt.setFont,kt.textColorPanel=new et("Text color",Wt.defaultColorSet,kt.textColor,_t),kt.textColorPanel.onColorChanged=kt.setTextColor,kt}return ne(Lt,Ot),Lt.prototype.ownsTarget=function(wt){return!(!Ot.prototype.ownsTarget.call(this,wt)&&wt!==this.visual&&wt!==this.frame&&wt!==this.captionBg&&wt!==this.captionElement)},Lt.prototype.createVisual=function(){this.visual=Bt.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Bt.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Bt.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=Bt.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()},Lt.prototype.setCaptionText=function(wt){this.captionText=wt,this.captionElement.textContent=this.captionText,this.sizeCaption()},Lt.prototype.pointerDown=function(wt,Ft){Ot.prototype.pointerDown.call(this,wt,Ft),this.isMoved=!1,this.pointerDownPoint=wt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(wt),this._state="creating")},Lt.prototype.manipulate=function(wt){Ot.prototype.manipulate.call(this,wt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(wt.x-this.pointerDownPoint.x)>5||Math.abs(wt.y-this.pointerDownPoint.y)>5)},Lt.prototype.resize=function(wt){Ot.prototype.resize.call(this,wt),this.setSize()},Lt.prototype.sizeCaption=function(){var wt=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=wt.width+2*this.PADDING,this.captionBoxHeight=wt.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),Bt.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')"]]),Bt.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')"]])},Lt.prototype.showTextEditor=function(){var wt=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(Ft){Ft.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Ft){Ft.key==="Enter"&&wt.finishTextEditing(wt.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Ft){Ft.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){wt.finishTextEditing(wt.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){wt.finishTextEditing(wt.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},Lt.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"))},Lt.prototype.finishTextEditing=function(wt){this.setCaptionText(wt.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Lt.prototype.setFont=function(wt){this.captionElement&&Bt.setAttributes(this.captionElement,[["font-family",wt]]),this.fontFamily=wt,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Lt.prototype.setTextColor=function(wt){this.captionElement&&Bt.setAttributes(this.captionElement,[["fill",wt]]),this.textColor=wt,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Lt.prototype.setSize=function(){Ot.prototype.setSize.call(this),Bt.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Lt.prototype.pointerUp=function(wt){Ot.prototype.pointerUp.call(this,wt),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Lt.prototype.dblClick=function(wt,Ft){Ot.prototype.dblClick.call(this,wt,Ft),this.showTextEditor()},Lt.prototype.setStrokeColor=function(wt){this.strokeColor=wt,this.frame&&Bt.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(wt),this.stateChanged()},Lt.prototype.setFillColor=function(wt){this.fillColor=wt,this.captionBg&&Bt.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(wt),this.stateChanged()},Lt.prototype.setStrokeWidth=function(wt){this.strokeWidth=wt,this.frame&&Bt.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Lt.prototype.setStrokeDasharray=function(wt){this.strokeDasharray=wt,this.frame&&Bt.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var wt=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},Ot.prototype.getState.call(this));return wt.typeName=this.typeName,wt},Lt.prototype.restoreState=function(wt){var Ft=wt;this.fillColor=Ft.fillColor,this.strokeColor=Ft.strokeColor,this.strokeWidth=Ft.strokeWidth,this.strokeDasharray=Ft.strokeDasharray,this.textColor=Ft.textColor,this.fontFamily=Ft.fontFamily,this.captionText=Ft.captionText,this.fontSize=Ft.fontSize,this.createVisual(),Ot.prototype.restoreState.call(this,wt),this.setSize()},Lt.prototype.scale=function(wt,Ft){Ot.prototype.scale.call(this,wt,Ft),this.setSize()},Lt.typeName="CaptionFrameMarker",Lt.title="Caption frame marker",Lt.icon='',Lt}(xt),Ie=function(){function Ot(Lt,wt){wt===void 0&&(wt=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Lt,this.cancelable=wt}return Object.defineProperty(Ot.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Ot.prototype.preventDefault=function(){this._defaultPrevented=!0},Ot}(),ve=function(Ot){function Lt(wt,Ft,Wt){var kt=Ot.call(this,wt,!1)||this;return kt.dataUrl=Ft,kt.state=Wt,kt}return ne(Lt,Ot),Lt}(Ie),ze=function(Ot){function Lt(wt,Ft,Wt){Wt===void 0&&(Wt=!1);var kt=Ot.call(this,wt,Wt)||this;return kt.marker=Ft,kt}return ne(Lt,Ot),Lt}(Ie),je=function(){function Ot(){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 Ot.prototype.addEventListener=function(Lt,wt){this[Lt].push(wt)},Ot.prototype.removeEventListener=function(Lt,wt){var Ft=this[Lt].indexOf(wt);Ft>-1&&this[Lt].splice(Ft,1)},Ot}(),He=function(){function Ot(Lt){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new oe,this._isOpen=!1,this.undoRedoManager=new on,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 je,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Ot.instanceCounter++,this.styles=new Se(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Lt,this.targetRoot=document.body,this.width=Lt.clientWidth,this.height=Lt.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(Ot.prototype,"ALL_MARKER_TYPES",{get:function(){return[re,rn,jn,Fe,xe,_e,Zn,ce,Ye,Bn,Le,tn,Cn]},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[re,rn,jn,Fe,_e,Zn,ce]},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"BASIC_MARKER_TYPES",{get:function(){return[re,rn,jn,Fe,Zn]},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Lt){var wt=this;this._availableMarkerTypes.splice(0),Lt.forEach(function(Ft){if(typeof Ft=="string"){var Wt=wt.ALL_MARKER_TYPES.find(function(kt){return kt.typeName===Ft});Wt!==void 0&&wt._availableMarkerTypes.push(Wt)}else wt._availableMarkerTypes.push(Ft)})},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(Lt){this._zoomLevel=Lt,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(Ot.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Ot.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Ut.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Ot.prototype.show=function(){var Lt=this;this.styles.styleSheetRoot===void 0&&se.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=se.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(wt){return wt(new Ie(Lt))})},Ot.prototype.render=function(){return Ne(this,void 0,void 0,function(){var Lt;return Be(this,function(wt){switch(wt.label){case 0:return this.setCurrentMarker(),(Lt=new ue).naturalSize=this.renderAtNaturalSize,Lt.imageType=this.renderImageType,Lt.imageQuality=this.renderImageQuality,Lt.markersOnly=this.renderMarkersOnly,Lt.width=this.renderWidth,Lt.height=this.renderHeight,[4,Lt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return wt.sent(),[4,Lt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,wt.sent()]}})})},Ot.prototype.close=function(Lt){var wt=this;if(Lt===void 0&&(Lt=!1),this.isOpen){var Ft=!1;Lt||this.eventListeners.beforeclose.forEach(function(Wt){var kt=new Ie(wt,!0);Wt(kt),kt.defaultPrevented&&(Ft=!0)}),Ft||(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 Ie(wt))}),this.detachEvents(),this._isOpen=!1)}},Ot.prototype.addMarkersToToolbar=function(){for(var Lt,wt=[],Ft=0;Ftthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Lt:this.editorCanvas.clientWidth,Ft=wt',Lt.title="Powered by marker.js",Lt.style.display="grid",Lt.style.alignItems="center",Lt.style.justifyItems="center",Lt.style.padding="3px",Lt.style.width="20px",Lt.style.height="20px",this.logoUI.appendChild(Lt),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Ot.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")},Ot.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"},Ot.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Ot.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 Lt=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=Lt+"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 Ht(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-1&&this.markers.splice(this.markers.indexOf(Lt),1),Lt.dispose()},Ot.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())},Ot.prototype.toolbarButtonClicked=function(Lt,wt){if(Lt==="marker"&&wt!==void 0)this.createNewMarker(wt);else if(Lt==="action")switch(wt){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()}},Ot.prototype.deleteSelectedMarker=function(){var Lt=this;if(this._currentMarker!==void 0){var wt=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Wt){var kt=new ze(Lt,Lt._currentMarker,!0);Wt(kt),kt.defaultPrevented&&(wt=!0)}),!wt){var Ft=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 ze(Lt,Ft))})}}},Ot.prototype.clear=function(){var Lt=this,wt=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Xt){var $e=new ze(Lt,void 0,!0);Xt($e),$e.defaultPrevented&&(wt=!0)}),!wt)){this.setCurrentMarker();for(var Ft=function(Xt){var $e=Wt.markers[Xt];Wt.setCurrentMarker(Wt.markers[Xt]),Wt._currentMarker.dispose(),Wt.markerImage.removeChild(Wt._currentMarker.container),Wt.markers.splice(Wt.markers.indexOf(Wt._currentMarker),1),Wt.eventListeners.markerdelete.forEach(function(Je){return Je(new ze(Lt,$e))})},Wt=this,kt=this.markers.length-1;kt>=0;kt--)Ft(kt);this.addUndoStep()}},Object.defineProperty(Ot.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Ot.prototype.showNotesEditor=function(){var Lt;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=(Lt=this._currentMarker.notes)!==null&&Lt!==void 0?Lt:"",this.overlayContainer.appendChild(this.notesArea))},Ot.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)},Ot.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Ot.prototype.addUndoStep=function(){var Lt=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var wt=this.getState(),Ft=this.undoRedoManager.getLastUndoStep();if(!Ft||Ft.width===wt.width&&Ft.height===wt.height){var Wt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(wt),Wt1&&this.panTo({x:Lt.clientX,y:Lt.clientY}))},Ot.prototype.onPointerUp=function(Lt){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Lt.clientX,Lt.clientY)),this.isDragging=!1,this.addUndoStep()},Ot.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Ot.prototype.onKeyUp=function(Lt){this._currentMarker===void 0||this.notesArea!==void 0||Lt.key!=="Delete"&&Lt.key!=="Backspace"||this.deleteSelectedMarker()},Ot.prototype.clientToLocalCoordinates=function(Lt,wt){var Ft=this.markerImage.getBoundingClientRect();return{x:(Lt-Ft.left)/this.zoomLevel,y:(wt-Ft.top)/this.zoomLevel}},Ot.prototype.onWindowResize=function(){this.positionUI()},Ot.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var Lt=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Lt+"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()},Ot.prototype.addLicenseKey=function(Lt){Ut.addKey(Lt)},Ot.prototype.addEventListener=function(Lt,wt){this.eventListeners.addEventListener(Lt,wt)},Ot.prototype.removeEventListener=function(Lt,wt){this.eventListeners.removeEventListener(Lt,wt)},Ot.prototype.renderState=function(Lt){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Lt),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Ot.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Ot.prototype.focus=function(){var Lt=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(wt){return wt(new Ie(Lt))}))},Ot.prototype.blur=function(){var Lt=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(wt){return wt(new Ie(Lt))}))},Ot.instanceCounter=0,Ot}()},3510:function(un,Nn,Mt){"use strict";Mt.r(Nn),Mt.d(Nn,{Panel:function(){return rn},default:function(){return Fe}});var Pt=Mt(87462),ne=Mt(74902),Ne=Mt(97685),Be=Mt(71002),Pe=Mt(94184),Bt=Mt.n(Pe),Ut=Mt(21770),ue=Mt(80334),se=Mt(67294),Se=Mt(45987),Xe=Mt(50344),pe=Mt(1413),Ht=Mt(4942),Dt=Mt(62874),nt=Mt(15105),et=se.forwardRef(function(De,jn){var Bn=De.prefixCls,an=De.forceRender,Zn=De.className,_t=De.style,Tt=De.children,ce=De.isActive,_e=De.role,Ye=De.classNames,xe=De.styles,on=se.useState(ce||an),tn=(0,Ne.Z)(on,2),Cn=tn[0],Ie=tn[1];return se.useEffect(function(){(an||ce)&&Ie(!0)},[an,ce]),Cn?se.createElement("div",{ref:jn,className:Bt()("".concat(Bn,"-content"),(0,Ht.Z)((0,Ht.Z)({},"".concat(Bn,"-content-active"),ce),"".concat(Bn,"-content-inactive"),!ce),Zn),style:_t,role:_e},se.createElement("div",{className:Bt()("".concat(Bn,"-content-box"),Ye==null?void 0:Ye.body),style:xe==null?void 0:xe.body},Tt)):null});et.displayName="PanelContent";var ht=et,lt=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],gt=se.forwardRef(function(De,jn){var Bn=De.showArrow,an=Bn===void 0?!0:Bn,Zn=De.headerClass,_t=De.isActive,Tt=De.onItemClick,ce=De.forceRender,_e=De.className,Ye=De.classNames,xe=Ye===void 0?{}:Ye,on=De.styles,tn=on===void 0?{}:on,Cn=De.prefixCls,Ie=De.collapsible,ve=De.accordion,ze=De.panelKey,je=De.extra,He=De.header,Ot=De.expandIcon,Lt=De.openMotion,wt=De.destroyInactivePanel,Ft=De.children,Wt=(0,Se.Z)(De,lt),kt=Ie==="disabled",Xt=je!=null&&typeof je!="boolean",$e=(0,Ht.Z)((0,Ht.Z)((0,Ht.Z)({onClick:function(){Tt==null||Tt(ze)},onKeyDown:function(Qn){(Qn.key==="Enter"||Qn.keyCode===nt.Z.ENTER||Qn.which===nt.Z.ENTER)&&(Tt==null||Tt(ze))},role:ve?"tab":"button"},"aria-expanded",_t),"aria-disabled",kt),"tabIndex",kt?-1:0),Je=typeof Ot=="function"?Ot(De):se.createElement("i",{className:"arrow"}),fn=Je&&se.createElement("div",(0,Pt.Z)({className:"".concat(Cn,"-expand-icon")},["header","icon"].includes(Ie)?$e:{}),Je),Ve=Bt()("".concat(Cn,"-item"),(0,Ht.Z)((0,Ht.Z)({},"".concat(Cn,"-item-active"),_t),"".concat(Cn,"-item-disabled"),kt),_e),Mn=Bt()(Zn,"".concat(Cn,"-header"),(0,Ht.Z)({},"".concat(Cn,"-collapsible-").concat(Ie),!!Ie),xe.header),Ue=(0,pe.Z)({className:Mn,style:tn.header},["header","icon"].includes(Ie)?{}:$e);return se.createElement("div",(0,Pt.Z)({},Wt,{ref:jn,className:Ve}),se.createElement("div",Ue,an&&fn,se.createElement("span",(0,Pt.Z)({className:"".concat(Cn,"-header-text")},Ie==="header"?$e:{}),He),Xt&&se.createElement("div",{className:"".concat(Cn,"-extra")},je)),se.createElement(Dt.Z,(0,Pt.Z)({visible:_t,leavedClassName:"".concat(Cn,"-content-hidden")},Lt,{forceRender:ce,removeOnLeave:wt}),function(ti,Qn){var Hn=ti.className,pn=ti.style;return se.createElement(ht,{ref:Qn,prefixCls:Cn,className:Hn,classNames:xe,style:pn,styles:tn,isActive:_t,forceRender:ce,role:ve?"tabpanel":void 0},Ft)}))}),mt=gt,xt=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],St=function(jn,Bn){var an=Bn.prefixCls,Zn=Bn.accordion,_t=Bn.collapsible,Tt=Bn.destroyInactivePanel,ce=Bn.onItemClick,_e=Bn.activeKey,Ye=Bn.openMotion,xe=Bn.expandIcon;return jn.map(function(on,tn){var Cn=on.children,Ie=on.label,ve=on.key,ze=on.collapsible,je=on.onItemClick,He=on.destroyInactivePanel,Ot=(0,Se.Z)(on,xt),Lt=String(ve!=null?ve:tn),wt=ze!=null?ze:_t,Ft=He!=null?He:Tt,Wt=function($e){wt!=="disabled"&&(ce($e),je==null||je($e))},kt=!1;return Zn?kt=_e[0]===Lt:kt=_e.indexOf(Lt)>-1,se.createElement(mt,(0,Pt.Z)({},Ot,{prefixCls:an,key:Lt,panelKey:Lt,isActive:kt,accordion:Zn,openMotion:Ye,expandIcon:xe,header:Ie,collapsible:wt,onItemClick:Wt,destroyInactivePanel:Ft}),Cn)})},zt=function(jn,Bn,an){if(!jn)return null;var Zn=an.prefixCls,_t=an.accordion,Tt=an.collapsible,ce=an.destroyInactivePanel,_e=an.onItemClick,Ye=an.activeKey,xe=an.openMotion,on=an.expandIcon,tn=jn.key||String(Bn),Cn=jn.props,Ie=Cn.header,ve=Cn.headerClass,ze=Cn.destroyInactivePanel,je=Cn.collapsible,He=Cn.onItemClick,Ot=!1;_t?Ot=Ye[0]===tn:Ot=Ye.indexOf(tn)>-1;var Lt=je!=null?je:Tt,wt=function(kt){Lt!=="disabled"&&(_e(kt),He==null||He(kt))},Ft={key:tn,panelKey:tn,header:Ie,headerClass:ve,isActive:Ot,prefixCls:Zn,destroyInactivePanel:ze!=null?ze:ce,openMotion:xe,accordion:_t,children:jn.props.children,onItemClick:wt,expandIcon:on,collapsible:Lt};return typeof jn.type=="string"?jn:(Object.keys(Ft).forEach(function(Wt){typeof Ft[Wt]=="undefined"&&delete Ft[Wt]}),se.cloneElement(jn,Ft))};function Jt(De,jn,Bn){return Array.isArray(De)?St(De,Bn):(0,Xe.Z)(jn).map(function(an,Zn){return zt(an,Zn,Bn)})}var re=Jt,oe=Mt(64217);function $t(De){var jn=De;if(!Array.isArray(jn)){var Bn=(0,Be.Z)(jn);jn=Bn==="number"||Bn==="string"?[jn]:[]}return jn.map(function(an){return String(an)})}var Le=se.forwardRef(function(De,jn){var Bn=De.prefixCls,an=Bn===void 0?"rc-collapse":Bn,Zn=De.destroyInactivePanel,_t=Zn===void 0?!1:Zn,Tt=De.style,ce=De.accordion,_e=De.className,Ye=De.children,xe=De.collapsible,on=De.openMotion,tn=De.expandIcon,Cn=De.activeKey,Ie=De.defaultActiveKey,ve=De.onChange,ze=De.items,je=Bt()(an,_e),He=(0,Ut.Z)([],{value:Cn,onChange:function(Xt){return ve==null?void 0:ve(Xt)},defaultValue:Ie,postState:$t}),Ot=(0,Ne.Z)(He,2),Lt=Ot[0],wt=Ot[1],Ft=function(Xt){return wt(function(){if(ce)return Lt[0]===Xt?[]:[Xt];var $e=Lt.indexOf(Xt),Je=$e>-1;return Je?Lt.filter(function(fn){return fn!==Xt}):[].concat((0,ne.Z)(Lt),[Xt])})};(0,ue.ZP)(!Ye,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var Wt=re(ze,Ye,{prefixCls:an,accordion:ce,openMotion:on,expandIcon:tn,collapsible:xe,destroyInactivePanel:_t,onItemClick:Ft,activeKey:Lt});return se.createElement("div",(0,Pt.Z)({ref:jn,className:je,style:Tt,role:ce?"tablist":void 0},(0,oe.Z)(De,{aria:!0,data:!0})),Wt)}),de=Object.assign(Le,{Panel:mt}),Fe=de,rn=de.Panel},42289:function(un,Nn,Mt){"use strict";Mt.d(Nn,{Z:function(){return Ga}});function Pt(Te){"@babel/helpers - typeof";return Pt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ze){return typeof Ze}:function(Ze){return Ze&&typeof Symbol=="function"&&Ze.constructor===Symbol&&Ze!==Symbol.prototype?"symbol":typeof Ze},Pt(Te)}function ne(Te,Ze){if(Pt(Te)!="object"||!Te)return Te;var sn=Te[Symbol.toPrimitive];if(sn!==void 0){var zn=sn.call(Te,Ze||"default");if(Pt(zn)!="object")return zn;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Ze==="string"?String:Number)(Te)}function Ne(Te){var Ze=ne(Te,"string");return Pt(Ze)=="symbol"?Ze:Ze+""}function Be(Te,Ze,sn){return(Ze=Ne(Ze))in Te?Object.defineProperty(Te,Ze,{value:sn,enumerable:!0,configurable:!0,writable:!0}):Te[Ze]=sn,Te}function Pe(Te,Ze){var sn=Object.keys(Te);if(Object.getOwnPropertySymbols){var zn=Object.getOwnPropertySymbols(Te);Ze&&(zn=zn.filter(function(Ii){return Object.getOwnPropertyDescriptor(Te,Ii).enumerable})),sn.push.apply(sn,zn)}return sn}function Bt(Te){for(var Ze=1;ZeTe.length)&&(Ze=Te.length);for(var sn=0,zn=Array(Ze);snTe.length)&&(Ze=Te.length);for(var sn=0,zn=new Array(Ze);sn0&&arguments[0]!==void 0?arguments[0]:{},Ze=Te.mark;return Ze?Ze.startsWith("data-")?Ze:"data-".concat(Ze):He}function wt(Te){if(Te.attachTo)return Te.attachTo;var Ze=document.querySelector("head");return Ze||document.body}function Ft(Te){return Te==="queue"?"prependQueue":Te?"prepend":"append"}function Wt(Te){return Array.from((Ot.get(Te)||Te).children).filter(function(Ze){return Ze.tagName==="STYLE"})}function kt(Te){var Ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!xt())return null;var sn=Ze.csp,zn=Ze.prepend,Ii=document.createElement("style");Ii.setAttribute(je,Ft(zn)),sn!=null&&sn.nonce&&(Ii.nonce=sn==null?void 0:sn.nonce),Ii.innerHTML=Te;var Nr=wt(Ze),lr=Nr.firstChild;if(zn){if(zn==="queue"){var si=Wt(Nr).filter(function(Zt){return["prepend","prependQueue"].includes(Zt.getAttribute(je))});if(si.length)return Nr.insertBefore(Ii,si[si.length-1].nextSibling),Ii}Nr.insertBefore(Ii,lr)}else Nr.appendChild(Ii);return Ii}function Xt(Te){var Ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},sn=wt(Ze);return Wt(sn).find(function(zn){return zn.getAttribute(Lt(Ze))===Te})}function $e(Te){var Ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},sn=Xt(Te,Ze);if(sn){var zn=wt(Ze);zn.removeChild(sn)}}function Je(Te,Ze){var sn=Ot.get(Te);if(!sn||!ze(document,sn)){var zn=kt("",Ze),Ii=zn.parentNode;Ot.set(Te,Ii),Te.removeChild(zn)}}function fn(){Ot.clear()}function Ve(Te,Ze){var sn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},zn=wt(sn);Je(zn,sn);var Ii=Xt(Ze,sn);if(Ii){var Nr,lr;if((Nr=sn.csp)!==null&&Nr!==void 0&&Nr.nonce&&Ii.nonce!==((lr=sn.csp)===null||lr===void 0?void 0:lr.nonce)){var si;Ii.nonce=(si=sn.csp)===null||si===void 0?void 0:si.nonce}return Ii.innerHTML!==Te&&(Ii.innerHTML=Te),Ii}var Zt=kt(Te,sn);return Zt.setAttribute(Lt(sn),Ze),Zt}var Mn;function Ue(Te){if(typeof document=="undefined")return 0;if(Te||Mn===void 0){var Ze=document.createElement("div");Ze.style.width="100%",Ze.style.height="200px";var sn=document.createElement("div"),zn=sn.style;zn.position="absolute",zn.top="0",zn.left="0",zn.pointerEvents="none",zn.visibility="hidden",zn.width="200px",zn.height="150px",zn.overflow="hidden",sn.appendChild(Ze),document.body.appendChild(sn);var Ii=Ze.offsetWidth;sn.style.overflow="scroll";var Nr=Ze.offsetWidth;Ii===Nr&&(Nr=sn.clientWidth),document.body.removeChild(sn),Mn=Ii-Nr}return Mn}function ti(Te){var Ze=Te.match(/^(.*)px$/),sn=Number(Ze==null?void 0:Ze[1]);return Number.isNaN(sn)?Ue():sn}function Qn(Te){if(typeof document=="undefined"||!Te||!(Te instanceof Element))return{width:0,height:0};var Ze=getComputedStyle(Te,"::-webkit-scrollbar"),sn=Ze.width,zn=Ze.height;return{width:ti(sn),height:ti(zn)}}function Hn(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var pn="rc-util-locker-".concat(Date.now()),gi=0;function Mi(Te){var Ze=!!Te,sn=gt.useState(function(){return gi+=1,"".concat(pn,"_").concat(gi)}),zn=lt(sn,1),Ii=zn[0];tn(function(){if(Ze){var Nr=Qn(document.body).width,lr=Hn();Ve(` html body { overflow-y: hidden; `.concat(lr?"width: calc(100% - ".concat(Nr,"px);"):"",` }`),Ii)}else $e(Ii);return function(){$e(Ii)}},[Ze,Ii])}var In=!1;function ei(Te){return typeof Te=="boolean"&&(In=Te),In}var Ki=function(Ze){return Ze===!1?!1:!xt()||!Ze?null:typeof Ze=="string"?document.querySelector(Ze):typeof Ze=="function"?Ze():Ze},hi=gt.forwardRef(function(Te,Ze){var sn=Te.open,zn=Te.autoLock,Ii=Te.getContainer,Nr=Te.debug,lr=Te.autoDestroy,si=lr===void 0?!0:lr,Zt=Te.children,Ao=gt.useState(sn),rs=lt(Ao,2),Ls=rs[0],Xa=rs[1],Ea=Ls||sn;gt.useEffect(function(){(si||sn)&&Xa(sn)},[sn,si]);var Eo=gt.useState(function(){return Ki(Ii)}),gs=lt(Eo,2),os=gs[0],Ho=gs[1];gt.useEffect(function(){var as=Ki(Ii);Ho(as!=null?as:null)});var _o=ve(Ea&&!os,Nr),er=lt(_o,2),Qi=er[0],Er=er[1],hn=os!=null?os:Qi;Mi(zn&&sn&&xt()&&(hn===Qi||hn===document.body));var ar=null;if(Zt&&Zn(Zt)&&Ze){var oo=Zt;ar=oo.ref}var ca=an(ar,Ze);if(!Ea||!xt()||os===void 0)return null;var $o=hn===!1||ei(),ia=Zt;return Ze&&(ia=gt.cloneElement(Zt,{ref:ca})),gt.createElement(Tt.Provider,{value:Er},$o?ia:(0,mt.createPortal)(ia,hn))}),$i=hi,pr=$i;function rr(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var ki=rr()?gt.useLayoutEffect:gt.useEffect,sr=function(Ze,sn){var zn=gt.useRef(!0);ki(function(){return Ze(zn.current)},sn),ki(function(){return zn.current=!1,function(){zn.current=!0}},[])},Ur=function(Ze,sn){sr(function(zn){if(!zn)return Ze()},sn)},Jo=sr,Rr=gt.createContext(null),To=gt.createContext({}),pa=Rr;function co(){return co=Object.assign?Object.assign.bind():function(Te){for(var Ze=1;Ze=wn.F1&&sn<=wn.F12)return!1;switch(sn){case wn.ALT:case wn.CAPS_LOCK:case wn.CONTEXT_MENU:case wn.CTRL:case wn.DOWN:case wn.END:case wn.ESC:case wn.HOME:case wn.INSERT:case wn.LEFT:case wn.MAC_FF_META:case wn.META:case wn.NUMLOCK:case wn.NUM_CENTER:case wn.PAGE_DOWN:case wn.PAGE_UP:case wn.PAUSE:case wn.PRINT_SCREEN:case wn.RIGHT:case wn.SHIFT:case wn.UP:case wn.WIN_KEY:case wn.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Ze){if(Ze>=wn.ZERO&&Ze<=wn.NINE||Ze>=wn.NUM_ZERO&&Ze<=wn.NUM_MULTIPLY||Ze>=wn.A&&Ze<=wn.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Ze===0)return!0;switch(Ze){case wn.SPACE:case wn.QUESTION_MARK:case wn.NUM_PLUS:case wn.NUM_MINUS:case wn.NUM_PERIOD:case wn.NUM_DIVISION:case wn.SEMICOLON:case wn.DASH:case wn.EQUALS:case wn.COMMA:case wn.PERIOD:case wn.SLASH:case wn.APOSTROPHE:case wn.SINGLE_QUOTE:case wn.OPEN_SQUARE_BRACKET:case wn.BACKSLASH:case wn.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Fn=wn;function Un(Te){"@babel/helpers - typeof";return Un=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ze){return typeof Ze}:function(Ze){return Ze&&typeof Symbol=="function"&&Ze.constructor===Symbol&&Ze!==Symbol.prototype?"symbol":typeof Ze},Un(Te)}function Xn(Te,Ze){if(Un(Te)!=="object"||Te===null)return Te;var sn=Te[Symbol.toPrimitive];if(sn!==void 0){var zn=sn.call(Te,Ze||"default");if(Un(zn)!=="object")return zn;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Ze==="string"?String:Number)(Te)}function ai(Te){var Ze=Xn(Te,"string");return Un(Ze)==="symbol"?Ze:String(Ze)}function Tn(Te,Ze,sn){return Ze=ai(Ze),Ze in Te?Object.defineProperty(Te,Ze,{value:sn,enumerable:!0,configurable:!0,writable:!0}):Te[Ze]=sn,Te}function Di(Te,Ze){var sn=Object.keys(Te);if(Object.getOwnPropertySymbols){var zn=Object.getOwnPropertySymbols(Te);Ze&&(zn=zn.filter(function(Ii){return Object.getOwnPropertyDescriptor(Te,Ii).enumerable})),sn.push.apply(sn,zn)}return sn}function te(Te){for(var Ze=1;Ze