You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1177 lines
2.1 MiB
1177 lines
2.1 MiB
(self.webpackChunk=self.webpackChunk||[]).push([[1599],{37036:function(){"use strict"},95625:function(){"use strict"},88010:function(zn,oi){"use strict";oi.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},24990:function(zn,oi){"use strict";oi.Z={flex_box_center:"flex_box_center___IBr6x",flex_space_between:"flex_space_between___n2Iz0",flex_box_vertical_center:"flex_box_vertical_center___1umwO",flex_box_center_end:"flex_box_center_end___SRZYb",flex_box_column:"flex_box_column___b90Da",form:"form___V3fAH",title_icon:"title_icon____uDZy",title:"title___RxKwK",content:"content___vFT5m",pubColSty:"pubColSty___dfLkL",selectSty:"selectSty____Wuek",borderSty:"borderSty___EuFYV",delSty:"delSty___AdEeI",delBorder:"delBorder___vcTJc",copHover:"copHover___JVVXI",multiple_select:"multiple_select___ZMPhl",work_button:"work_button___TiK1a"}},1370:function(zn,oi){"use strict";oi.Z={flex_box_center:"flex_box_center___SF0m3",flex_space_between:"flex_space_between___ChLjp",flex_box_vertical_center:"flex_box_vertical_center____l_EF",flex_box_center_end:"flex_box_center_end___YcZNu",flex_box_column:"flex_box_column___R9dNq",downloadbutton:"downloadbutton___oEXJW",configWorkContainer:"configWorkContainer___CHUrh"}},74413:function(){"use strict";function zn(bt,nt,et,ct){et===void 0&&(et=0),ct===void 0&&(ct=1/0),this._name=bt,this._defaultValue=nt,this._minimum=et,this._maximum=ct}Object.defineProperty(zn.prototype,"name",{get:function(){return this._name},set:function(bt){if(typeof bt!="string"||bt==="")throw new Error("Shape name must be a valid string.");this._name=bt}}),Object.defineProperty(zn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(bt){if(typeof bt!="number"||isNaN(bt))throw new Error("The default value must be a real number, not: "+bt);this._defaultValue=bt}}),Object.defineProperty(zn.prototype,"minimum",{get:function(){return this._minimum},set:function(bt){if(typeof bt!="number"||isNaN(bt))throw new Error("Minimum must be a real number, not: "+bt);this._minimum=bt}}),Object.defineProperty(zn.prototype,"maximum",{get:function(){return this._maximum},set:function(bt){if(typeof bt!="number"||isNaN(bt))throw new Error("Maximum must be a real number, not: "+bt);this._maximum=bt}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(bt,nt){var et=go.Shape._FigureParameters[bt];return et?et[nt]:null},go.Shape.setFigureParameter=function(bt,nt,et){if(!(et instanceof zn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+et);if(et.defaultValue<et.minimum||et.defaultValue>et.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+et.defaultValue);var ct=go.Shape._FigureParameters[bt];ct||(ct=[],go.Shape._FigureParameters[bt]=ct),ct[nt]=et};var oi=[];function Ot(bt,nt){var et=oi.pop();return et===void 0?new go.Point(bt,nt):(et.x=bt,et.y=nt,et)}function Dt(){var bt=oi.pop();return bt===void 0?new go.Point:bt}function ee(bt){oi.push(bt)}function Pe(bt,nt,et,ct,lt,gt,mt,St,Mt){Mt||(Mt=new go.Point);var zt=bt-et,Ht=lt-mt,qt=NaN,jt=NaN;if(zt===0)if(Ht===0)bt===et&&(qt=bt,jt=nt);else{var Jt=(gt-St)/Ht,ge=gt-Jt*lt;qt=bt,jt=Jt*qt+ge}else if(Ht===0){var he=(nt-ct)/zt,Fe=nt-he*bt;qt=lt,jt=he*qt+Fe}else{var he=(nt-ct)/zt,Jt=(gt-St)/Ht,Fe=nt-he*bt,ge=gt-Jt*lt;qt=(ge-Fe)/(he-Jt),jt=he*qt+Fe}return Mt.x=qt,Mt.y=jt,Mt}function xe(bt,nt,et,ct,lt,gt,mt,St,Mt,zt,Ht,qt,jt,Jt){var ge=1-Mt,he=Mt,Fe=bt*ge+et*he,Re=nt*ge+ct*he,Ke=et*ge+lt*he,Mn=ct*ge+gt*he,tn=lt*ge+mt*he,rn=gt*ge+St*he,nn=Fe*ge+Ke*he,me=Re*ge+Mn*he,Xt=Ke*ge+tn*he,Ue=Mn*ge+rn*he,Pn=nn*ge+Xt*he,Yn=me*ge+Ue*he;zt.x=Fe,zt.y=Re,Ht.x=nn,Ht.y=me,qt.x=Pn,qt.y=Yn,jt.x=Xt,jt.y=Ue,Jt.x=tn,Jt.y=rn}var Se=new go.Spot(.156,.156),Wt=new go.Spot(.844,.844),se=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new zn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=5),ct=Math.min(ct,nt/3),ct=Math.min(ct,et/3);var lt=ct*se,gt=new go.Geometry().add(new go.PathFigure(ct,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt-ct,0)).add(new go.PathSegment(go.PathSegment.Bezier,nt,ct,nt-lt,0,nt,lt)).add(new go.PathSegment(go.PathSegment.Line,nt,et-ct)).add(new go.PathSegment(go.PathSegment.Bezier,nt-ct,et,nt,et-lt,nt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,ct,et)).add(new go.PathSegment(go.PathSegment.Bezier,0,et-ct,lt,et,0,et-lt)).add(new go.PathSegment(go.PathSegment.Line,0,ct)).add(new go.PathSegment(go.PathSegment.Bezier,ct,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(bt,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(bt,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(bt,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(bt,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(bt,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(bt,nt,et){var ct=new go.Geometry(go.Geometry.Line);return ct.startX=0,ct.startY=et/2,ct.endX=nt,ct.endY=et/2,ct}),go.Shape.defineFigureGenerator("LineV",function(bt,nt,et){var ct=new go.Geometry(go.Geometry.Line);return ct.startX=nt/2,ct.startY=0,ct.endX=nt/2,ct.endY=et,ct}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(bt,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(bt,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(bt,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(bt,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(bt,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(bt,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(bt,nt,et){var ct=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(ct*nt,(1-ct)*et,!1).add(new go.PathSegment(go.PathSegment.Line,(1-ct)*nt,ct*et)).add(new go.PathSegment(go.PathSegment.Move,ct*nt,ct*et)).add(new go.PathSegment(go.PathSegment.Line,(1-ct)*nt,(1-ct)*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(bt,nt,et){var ct=nt/2,lt=new go.Geometry().add(new go.PathFigure(nt,nt/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,ct,ct,ct,ct).close()));return lt.spot1=Se,lt.spot2=Wt,lt.defaultStretch=go.GraphObject.Uniform,lt}),go.Shape.defineFigureGenerator("Line1",function(bt,nt,et){var ct=new go.Geometry(go.Geometry.Line);return ct.startX=0,ct.startY=0,ct.endX=nt,ct.endY=et,ct}),go.Shape.defineFigureGenerator("Line2",function(bt,nt,et){var ct=new go.Geometry(go.Geometry.Line);return ct.startX=nt,ct.startY=0,ct.endX=0,ct.endY=et,ct}),go.Shape.defineFigureGenerator("Curve1",function(bt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,nt,et,se*nt,0,nt,(1-se)*et)))}),go.Shape.defineFigureGenerator("Curve2",function(bt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,nt,et,0,se*et,(1-se)*nt,et)))}),go.Shape.defineFigureGenerator("Curve3",function(bt,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,se*et,se*nt,et)))}),go.Shape.defineFigureGenerator("Curve4",function(bt,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,et,(1-se)*nt,0,0,(1-se)*et)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(bt,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(bt,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(bt,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(bt,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 zn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;isNaN(ct)?ct=.1:ct<-1?ct=-1:ct>1&&(ct=1);var lt=Math.abs(ct)*nt;if(ct===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 ct>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<nt/2&>.setSpots(lt/nt,0,(nt-lt)/nt,1),gt}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new zn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;isNaN(ct)?ct=10:ct<-nt?ct=-nt:ct>nt&&(ct=nt);var lt=Math.abs(ct);if(ct===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 ct>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<nt/2&>.setSpots(lt/nt,0,(nt-lt)/nt,1),gt}}),go.Shape.setFigureParameter("Trapezoid1",0,new zn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;isNaN(ct)?ct=.2:ct<.5?ct=-.5:ct>.5&&(ct=.5);var lt=Math.abs(ct)*nt;if(ct===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 ct>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())),lt<nt/2&>.setSpots(lt/nt,0,(nt-lt)/nt,1),gt}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new zn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;isNaN(ct)?ct=20:ct<-nt?ct=-nt/2:ct>nt&&(ct=nt/2);var lt=Math.abs(ct);if(ct===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 ct>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())),lt<nt/2&>.setSpots(lt/nt,0,(nt-lt)/nt,1),gt}}),go.Shape.setFigureParameter("ManualOperation",0,new zn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;isNaN(ct)?ct=10:ct<-nt?ct=-nt/2:ct>nt&&(ct=nt/2);var lt=Math.abs(ct);if(ct===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 ct>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())),lt<nt/2&>.setSpots(lt/nt,0,(nt-lt)/nt,1),gt}});var ze=[];function ye(){var bt=ze.pop();return bt===void 0?[]:bt}function Nt(bt){bt.length=0,ze.push(bt)}function We(bt){for(var nt=ye(),et=.5,ct=.5,lt=Math.PI*1.5,gt=0,mt=0;mt<bt;mt++)gt=2*Math.PI/bt*mt+lt,nt[mt]=new go.Point(ct+et*Math.cos(gt),ct+et*Math.sin(gt));return nt.push(nt[0]),nt}function ie(bt){var nt=Ne(bt),et=ye();et[0]=nt[0];for(var ct=1,lt=1;ct<nt.length;ct+=2,lt+=3)et[lt]=nt[ct],et[lt+1]=nt[ct],et[lt+2]=nt[ct+1];return Nt(nt),et}function Ne(bt){for(var nt=We(bt),et=ye(),ct=Math.floor(nt.length/2),lt=nt.length-1,gt=bt%2===0?2:1,mt=0;mt<lt;mt++){var St=nt[mt],Mt=nt[mt+1],zt=nt[(ct+mt-1)%lt],Ht=nt[(ct+mt+gt)%lt];et[mt*2]=St,et[mt*2+1]=Pe(St.x,St.y,zt.x,zt.y,Mt.x,Mt.y,Ht.x,Ht.y,new go.Point)}return et[et.length]=et[0],Nt(nt),et}go.Shape.defineFigureGenerator("Pentagon",function(bt,nt,et){var ct=We(5),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(gt);for(var mt=1;mt<5;mt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[mt].x*nt,ct[mt].y*et));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*nt,ct[0].y*et).close()),Nt(ct),lt.spot1=new go.Spot(.2,.22),lt.spot2=new go.Spot(.8,.9),lt}),go.Shape.defineFigureGenerator("Hexagon",function(bt,nt,et){var ct=We(6),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(gt);for(var mt=1;mt<6;mt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[mt].x*nt,ct[mt].y*et));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*nt,ct[0].y*et).close()),Nt(ct),lt.spot1=new go.Spot(.07,.25),lt.spot2=new go.Spot(.93,.75),lt}),go.Shape.defineFigureGenerator("Heptagon",function(bt,nt,et){var ct=We(7),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(gt);for(var mt=1;mt<7;mt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[mt].x*nt,ct[mt].y*et));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*nt,ct[0].y*et).close()),Nt(ct),lt.spot1=new go.Spot(.2,.15),lt.spot2=new go.Spot(.8,.85),lt}),go.Shape.defineFigureGenerator("Octagon",function(bt,nt,et){var ct=We(8),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(gt);for(var mt=1;mt<8;mt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[mt].x*nt,ct[mt].y*et));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*nt,ct[0].y*et).close()),Nt(ct),lt.spot1=new go.Spot(.15,.15),lt.spot2=new go.Spot(.85,.85),lt}),go.Shape.defineFigureGenerator("Nonagon",function(bt,nt,et){var ct=We(9),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(gt);for(var mt=1;mt<9;mt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[mt].x*nt,ct[mt].y*et));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*nt,ct[0].y*et).close()),Nt(ct),lt.spot1=new go.Spot(.17,.13),lt.spot2=new go.Spot(.82,.82),lt}),go.Shape.defineFigureGenerator("Decagon",function(bt,nt,et){var ct=We(10),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(gt);for(var mt=1;mt<10;mt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[mt].x*nt,ct[mt].y*et));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*nt,ct[0].y*et).close()),Nt(ct),lt.spot1=new go.Spot(.16,.16),lt.spot2=new go.Spot(.84,.84),lt}),go.Shape.defineFigureGenerator("Dodecagon",function(bt,nt,et){var ct=We(12),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(gt);for(var mt=1;mt<12;mt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[mt].x*nt,ct[mt].y*et));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*nt,ct[0].y*et).close()),Nt(ct),lt.spot1=new go.Spot(.16,.16),lt.spot2=new go.Spot(.84,.84),lt}),go.Shape.defineFigureGenerator("FivePointedStar",function(bt,nt,et){var ct=Ne(5),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(gt);for(var mt=1;mt<10;mt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[mt].x*nt,ct[mt].y*et));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*nt,ct[0].y*et).close()),Nt(ct),lt.spot1=new go.Spot(.266,.333),lt.spot2=new go.Spot(.733,.733),lt}),go.Shape.defineFigureGenerator("SixPointedStar",function(bt,nt,et){var ct=Ne(6),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(gt);for(var mt=1;mt<12;mt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[mt].x*nt,ct[mt].y*et));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*nt,ct[0].y*et).close()),Nt(ct),lt.spot1=new go.Spot(.17,.25),lt.spot2=new go.Spot(.83,.75),lt}),go.Shape.defineFigureGenerator("SevenPointedStar",function(bt,nt,et){var ct=Ne(7),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(gt);for(var mt=1;mt<14;mt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[mt].x*nt,ct[mt].y*et));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*nt,ct[0].y*et).close()),Nt(ct),lt.spot1=new go.Spot(.222,.277),lt.spot2=new go.Spot(.777,.666),lt}),go.Shape.defineFigureGenerator("EightPointedStar",function(bt,nt,et){var ct=Ne(8),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(gt);for(var mt=1;mt<16;mt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[mt].x*nt,ct[mt].y*et));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*nt,ct[0].y*et).close()),Nt(ct),lt.spot1=new go.Spot(.25,.25),lt.spot2=new go.Spot(.75,.75),lt}),go.Shape.defineFigureGenerator("NinePointedStar",function(bt,nt,et){var ct=Ne(9),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(gt);for(var mt=1;mt<18;mt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[mt].x*nt,ct[mt].y*et));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*nt,ct[0].y*et).close()),Nt(ct),lt.spot1=new go.Spot(.222,.277),lt.spot2=new go.Spot(.777,.666),lt}),go.Shape.defineFigureGenerator("TenPointedStar",function(bt,nt,et){var ct=Ne(10),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(gt);for(var mt=1;mt<20;mt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[mt].x*nt,ct[mt].y*et));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*nt,ct[0].y*et).close()),Nt(ct),lt.spot1=new go.Spot(.281,.261),lt.spot2=new go.Spot(.723,.748),lt}),go.Shape.defineFigureGenerator("FivePointedBurst",function(bt,nt,et){var ct=ie(5),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(gt);for(var mt=1;mt<ct.length;mt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ct[mt+2].x*nt,ct[mt+2].y*et,ct[mt].x*nt,ct[mt].y*et,ct[mt+1].x*nt,ct[mt+1].y*et));return gt.segments.last().close(),Nt(ct),lt.spot1=new go.Spot(.222,.277),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("SixPointedBurst",function(bt,nt,et){var ct=ie(6),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(gt);for(var mt=1;mt<ct.length;mt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ct[mt+2].x*nt,ct[mt+2].y*et,ct[mt].x*nt,ct[mt].y*et,ct[mt+1].x*nt,ct[mt+1].y*et));return gt.segments.last().close(),Nt(ct),lt.spot1=new go.Spot(.17,.222),lt.spot2=new go.Spot(.833,.777),lt}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(bt,nt,et){var ct=ie(7),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(gt);for(var mt=1;mt<ct.length;mt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ct[mt+2].x*nt,ct[mt+2].y*et,ct[mt].x*nt,ct[mt].y*et,ct[mt+1].x*nt,ct[mt+1].y*et));return gt.segments.last().close(),Nt(ct),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("EightPointedBurst",function(bt,nt,et){var ct=ie(8),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(gt);for(var mt=1;mt<ct.length;mt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ct[mt+2].x*nt,ct[mt+2].y*et,ct[mt].x*nt,ct[mt].y*et,ct[mt+1].x*nt,ct[mt+1].y*et));return gt.segments.last().close(),Nt(ct),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("NinePointedBurst",function(bt,nt,et){var ct=ie(9),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(gt);for(var mt=1;mt<ct.length;mt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ct[mt+2].x*nt,ct[mt+2].y*et,ct[mt].x*nt,ct[mt].y*et,ct[mt+1].x*nt,ct[mt+1].y*et));return gt.segments.last().close(),Nt(ct),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("TenPointedBurst",function(bt,nt,et){var ct=ie(10),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(gt);for(var mt=1;mt<ct.length;mt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ct[mt+2].x*nt,ct[mt+2].y*et,ct[mt].x*nt,ct[mt].y*et,ct[mt+1].x*nt,ct[mt+1].y*et));return gt.segments.last().close(),Nt(ct),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.setFigureParameter("FramedRectangle",0,new zn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new zn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(bt,nt,et){var ct=bt?bt.parameter1:NaN,lt=bt?bt.parameter2:NaN;isNaN(ct)&&(ct=8),isNaN(lt)&&(lt=8);var gt=new go.Geometry,mt=new go.PathFigure(0,0,!0);return gt.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()),ct<nt/2&<<et/2&&(mt.add(new go.PathSegment(go.PathSegment.Move,ct,lt)),mt.add(new go.PathSegment(go.PathSegment.Line,ct,et-lt)),mt.add(new go.PathSegment(go.PathSegment.Line,nt-ct,et-lt)),mt.add(new go.PathSegment(go.PathSegment.Line,nt-ct,lt).close())),gt.setSpots(0,0,1,1,ct,lt,-ct,-lt),gt}),go.Shape.setFigureParameter("Ring",0,new zn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=8);var lt=nt/2,gt=new go.Geometry,mt=new go.PathFigure(nt,nt/2,!0);gt.add(mt),mt.add(new go.PathSegment(go.PathSegment.Arc,0,360,lt,lt,lt,lt).close());var St=Math.max(lt-ct,0);return St>0&&(mt.add(new go.PathSegment(go.PathSegment.Move,nt/2+St,nt/2)),mt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,lt,lt,St,St).close())),gt.spot1=Se,gt.spot2=Wt,gt.defaultStretch=go.GraphObject.Uniform,gt}),go.Shape.defineFigureGenerator("Cloud",function(bt,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(bt,nt,et){var ct=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(ct*nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-ct)*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,ct*et)).add(new go.PathSegment(go.PathSegment.Line,nt,(1-ct)*et)).add(new go.PathSegment(go.PathSegment.Line,(1-ct)*nt,et)).add(new go.PathSegment(go.PathSegment.Line,ct*nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,(1-ct)*et)).add(new go.PathSegment(go.PathSegment.Line,0,ct*et).close())).setSpots(ct/2,ct/2,1-ct/2,1-ct/2)}),go.Shape.setFigureParameter("Pie",0,new zn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new zn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(bt,nt,et){var ct=bt?bt.parameter1:NaN,lt=bt?bt.parameter2:NaN;isNaN(ct)&&(ct=0),isNaN(lt)&&(lt=315);var gt=ct%360;gt<0&&(gt+=360);var mt=lt%360,St=Math.min(nt,et)/2;return new go.Geometry().add(new go.PathFigure(St,St).add(new go.PathSegment(go.PathSegment.Arc,gt,mt,St,St,St,St).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(bt,nt,et){var ct=se/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-ct)*et,(lt+ct)*nt,(gt+ct)*et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close()))}),go.Shape.setFigureParameter("ThickCross",0,new zn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=30);var lt=Math.min(ct,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 zn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=10);var lt=Math.min(ct,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 zn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;if((isNaN(ct)||ct<0)&&(ct=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,St=Math.atan2(et,nt),Mt=ct-Math.min(Math.cos(St)*ct/2,gt),zt=ct-Math.min(Math.sin(St)*ct/2,mt),lt=new go.Geometry,Ht=new go.PathFigure(Mt,0,!0);return lt.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Line,gt,.2*et)),Ht.add(new go.PathSegment(go.PathSegment.Line,nt-Mt,0)),Ht.add(new go.PathSegment(go.PathSegment.Line,nt,zt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.8*nt,mt)),Ht.add(new go.PathSegment(go.PathSegment.Line,nt,et-zt)),Ht.add(new go.PathSegment(go.PathSegment.Line,nt-Mt,et)),Ht.add(new go.PathSegment(go.PathSegment.Line,gt,.8*et)),Ht.add(new go.PathSegment(go.PathSegment.Line,Mt,et)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,et-zt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.2*nt,mt)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,zt).close()),lt}}),go.Shape.setFigureParameter("ThinX",0,new zn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=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 zn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;isNaN(ct)&&(ct=.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,ct*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5+ct/2)*nt,ct*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5+ct/2)*nt,(1-ct)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,(1-ct)*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-ct)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5-ct/2)*nt,(1-ct)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5-ct/2)*nt,ct*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,ct*et).close()),lt}),go.Shape.setFigureParameter("RoundedIBeam",0,new zn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;isNaN(ct)&&(ct=.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-ct)*nt,.25*et,Math.abs(1-ct)*nt,.75*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ct*nt,.75*et,ct*nt,.25*et).close()),lt}),go.Shape.defineFigureGenerator("HalfEllipse",function(bt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,se*nt,0,nt,(.5-se/2)*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,(.5+se/2)*et,se*nt,et).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(bt,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(bt,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(bt,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(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.4*nt,.6*et,!0);ct.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,St=0,Mt=gt*se;return lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+mt)*nt,(.5+gt+St)*et,(.5-gt+mt)*nt,(.5+Mt+St)*et,(.5-Mt+mt)*nt,(.5+gt+St)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+gt+mt)*nt,(.5+St)*et,(.5+Mt+mt)*nt,(.5+gt+St)*et,(.5+gt+mt)*nt,(.5+Mt+St)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+mt)*nt,(.5-gt+St)*et,(1-.5+gt+mt)*nt,(.5-Mt+St)*et,(.5+Mt+mt)*nt,(.5-gt+St)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.65*nt,.36771243*et,(.5-Mt+mt)*nt,(.5-gt+St)*et,(.5-gt+mt+.05)*nt,(.5-Mt+St-.02)*et)),gt=.2,mt=0,St=-.3,Mt=gt*se,lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+gt+mt)*nt,(.5+St)*et,(.5+Mt+mt)*nt,(.5+gt+St)*et,(.5+gt+mt)*nt,(.5+Mt+St)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+mt)*nt,(.5-gt+St)*et,(1-.5+gt+mt)*nt,(.5-Mt+St)*et,(.5+Mt+mt)*nt,(.5-gt+St)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-gt+mt)*nt,(.5+St)*et,(.5-Mt+mt)*nt,(.5-gt+St)*et,(.5-gt+mt)*nt,(.5-Mt+St)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Mt+mt)*nt,(.5+gt+St)*et,(.5-gt+mt)*nt,(.5+Mt+St)*et,(.5-Mt+mt)*nt,(.5+gt+St)*et)),gt=.2,mt=-.3,St=0,Mt=gt*se,lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+mt)*nt,(.5-gt+St)*et,(1-.5+gt+mt-.05)*nt,(.5-Mt+St-.02)*et,(.5+Mt+mt)*nt,(.5-gt+St)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-gt+mt)*nt,(.5+St)*et,(.5-Mt+mt)*nt,(.5-gt+St)*et,(.5-gt+mt)*nt,(.5-Mt+St)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+mt)*nt,(.5+gt+St)*et,(.5-gt+mt)*nt,(.5+Mt+St)*et,(.5-Mt+mt)*nt,(.5+gt+St)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,.6*et,(.5+Mt+mt)*nt,(.5+gt+St)*et,(.5+gt+mt)*nt,(.5+Mt+St)*et).close()),ct.setSpots(.06,.33,.93,.68),ct}),go.Shape.defineFigureGenerator("YinYang",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt*.5,0,!0);ct.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,St=.25;return lt.add(new go.PathSegment(go.PathSegment.Move,(mt+gt)*nt,St*et)),lt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,nt*mt,et*St,gt*nt,gt*nt).close()),lt=new go.PathFigure(nt*.5,0,!1),ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,-180,nt*.5,nt*.5,nt*.5,nt*.5)),St=.75,lt=new go.PathFigure((mt+gt)*nt,St*et,!0),ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,0,360,nt*mt,et*St,gt*nt,gt*nt).close()),ct.defaultStretch=go.GraphObject.Uniform,ct}),go.Shape.defineFigureGenerator("Peace",function(bt,nt,et){var ct=.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-ct)*nt,ct*et)).add(new go.PathSegment(go.PathSegment.Move,lt,gt)).add(new go.PathSegment(go.PathSegment.Line,ct*nt,ct*et)))}),go.Shape.defineFigureGenerator("NotAllowed",function(bt,nt,et){var ct=new go.Geometry,lt=se*.5,gt=.5,mt=.5,St=.5,Mt=new go.PathFigure(mt*nt,(St-gt)*et);ct.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-gt)*nt,St*et,(mt-lt)*nt,(St-gt)*et,(mt-gt)*nt,(St-lt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(St+gt)*et,(mt-gt)*nt,(St+lt)*et,(mt-lt)*nt,(St+gt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,St*et,(mt+lt)*nt,(St+gt)*et,(mt+gt)*nt,(St+lt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(St-gt)*et,(mt+gt)*nt,(St-lt)*et,(mt+lt)*nt,(St-gt)*et)),gt=.4,lt=se*.4;var zt=Dt(),Ht=Dt(),qt=Dt(),jt=Dt();xe(mt,St-gt,mt+lt,St-gt,mt+gt,St-lt,mt+gt,St,.42,zt,Ht,qt,jt,jt);var Jt=Dt(),ge=Dt(),he=Dt();xe(mt,St-gt,mt+lt,St-gt,mt+gt,St-lt,mt+gt,St,.58,jt,jt,he,Jt,ge);var Fe=Dt(),Re=Dt(),Ke=Dt();xe(mt,St+gt,mt-lt,St+gt,mt-gt,St+lt,mt-gt,St,.42,Fe,Re,Ke,jt,jt);var Mn=Dt(),tn=Dt(),rn=Dt();return xe(mt,St+gt,mt-lt,St+gt,mt-gt,St+lt,mt-gt,St,.58,jt,jt,rn,Mn,tn),Mt.add(new go.PathSegment(go.PathSegment.Move,rn.x*nt,rn.y*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-gt)*nt,St*et,Mn.x*nt,Mn.y*et,tn.x*nt,tn.y*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(St-gt)*et,(mt-gt)*nt,(St-lt)*et,(mt-lt)*nt,(St-gt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,qt.x*nt,qt.y*et,zt.x*nt,zt.y*et,Ht.x*nt,Ht.y*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,rn.x*nt,rn.y*et).close()),Mt.add(new go.PathSegment(go.PathSegment.Move,Ke.x*nt,Ke.y*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,he.x*nt,he.y*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,St*et,Jt.x*nt,Jt.y*et,ge.x*nt,ge.y*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(St+gt)*et,(mt+gt)*nt,(St+lt)*et,(mt+lt)*nt,(St+gt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,Ke.x*nt,Ke.y*et,Fe.x*nt,Fe.y*et,Re.x*nt,Re.y*et).close()),ee(zt),ee(Ht),ee(qt),ee(jt),ee(Jt),ee(ge),ee(he),ee(Fe),ee(Re),ee(Ke),ee(Mn),ee(tn),ee(rn),ct.defaultStretch=go.GraphObject.Uniform,ct}),go.Shape.defineFigureGenerator("Fragile",function(bt,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 zn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=30),ct>nt&&(ct=nt);var lt=(nt-ct)/2,gt=lt+ct;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(bt,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(bt,nt,et){var ct=new go.Geometry,lt=se*.4,gt=.4,mt=.5,St=.5,Mt=Dt(),zt=Dt(),Ht=Dt(),qt=Dt(),jt=new go.PathFigure((mt-gt)*nt,St*et,!1);ct.add(jt),jt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(St-gt)*et,(mt-gt)*nt,(St-lt)*et,(mt-lt)*nt,(St-gt)*et)),xe(mt,St-gt,mt+lt,St-gt,mt+gt,St-lt,mt+gt,St,.44,Ht,qt,zt,Mt,Mt),jt.add(new go.PathSegment(go.PathSegment.Bezier,zt.x*nt,zt.y*et,Ht.x*nt,Ht.y*et,qt.x*nt,qt.y*et));var Jt=Ot(zt.x,zt.y);xe(mt,St-gt,mt+lt,St-gt,mt+gt,St-lt,mt+gt,St,.56,Mt,Mt,zt,Ht,qt);var ge=Ot(zt.x,zt.y);jt.add(new go.PathSegment(go.PathSegment.Line,(Jt.x*.1+.95*.9)*nt,Jt.y*.1*et)),jt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,Jt.y*.1*et)),jt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,0)),jt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),jt.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),jt.add(new go.PathSegment(go.PathSegment.Line,(ge.x*.1+.9)*nt,.15*et)),jt.add(new go.PathSegment(go.PathSegment.Line,(ge.x*.1+.9)*nt,(ge.y*.1+.05*.9)*et)),jt.add(new go.PathSegment(go.PathSegment.Line,ge.x*nt,ge.y*et)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,St*et,Ht.x*nt,Ht.y*et,qt.x*nt,qt.y*et)),jt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(St+gt)*et,(mt+gt)*nt,(St+lt)*et,(mt+lt)*nt,(St+gt)*et)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-gt)*nt,St*et,(mt-lt)*nt,(St+gt)*et,(mt-gt)*nt,(St+lt)*et)),gt=.35,lt=se*.35;var he=new go.PathFigure(mt*nt,(St-gt)*et,!1);ct.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,(mt-gt)*nt,St*et,(mt-lt)*nt,(St-gt)*et,(mt-gt)*nt,(St-lt)*et)),he.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(St+gt)*et,(mt-gt)*nt,(St+lt)*et,(mt-lt)*nt,(St+gt)*et)),he.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,St*et,(mt+lt)*nt,(St+gt)*et,(mt+gt)*nt,(St+lt)*et)),he.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(St-gt)*et,(mt+gt)*nt,(St-lt)*et,(mt+lt)*nt,(St-gt)*et));var Fe=new go.PathFigure((mt-gt)*nt,St*et,!1);return ct.add(Fe),ee(Mt),ee(zt),ee(Ht),ee(qt),ee(Jt),ee(ge),ct.spot1=new go.Spot(.202,.257),ct.spot2=new go.Spot(.792,.739),ct.defaultStretch=go.GraphObject.Uniform,ct}),go.Shape.defineFigureGenerator("GenderFemale",function(bt,nt,et){var ct=new go.Geometry,lt=.375,gt=0,mt=-.125,St=lt*se,Mt=new go.PathFigure((.525+gt)*nt,(.5+lt+mt)*et,!1);ct.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+gt)*nt,(.5+mt)*et,(.5+St+gt)*nt,(.5+lt+mt)*et,(.5+lt+gt)*nt,(.5+St+mt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*nt,(.5-lt+mt)*et,(1-.5+lt+gt)*nt,(.5-St+mt)*et,(.5+St+gt)*nt,(.5-lt+mt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+gt)*nt,(.5+mt)*et,(.5-St+gt)*nt,(.5-lt+mt)*et,(.5-lt+gt)*nt,(.5-St+mt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(.475+gt)*nt,(.5+lt+mt)*et,(.5-lt+gt)*nt,(.5+St+mt)*et,(.5-St+gt)*nt,(.5+lt+mt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,.85*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.85*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.9*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,.9*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.9*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.9*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.85*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.85*et).close()),lt=.325,gt=0,mt=-.125,St=lt*se;var Mt=new go.PathFigure((1-.5+lt+gt)*nt,(.5+mt)*et,!1);ct.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*nt,(.5+lt+mt)*et,(.5+lt+gt)*nt,(.5+St+mt)*et,(.5+St+gt)*nt,(.5+lt+mt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+gt)*nt,(.5+mt)*et,(.5-St+gt)*nt,(.5+lt+mt)*et,(.5-lt+gt)*nt,(.5+St+mt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*nt,(.5-lt+mt)*et,(.5-lt+gt)*nt,(.5-St+mt)*et,(.5-St+gt)*nt,(.5-lt+mt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+gt)*nt,(.5+mt)*et,(.5+St+gt)*nt,(.5-lt+mt)*et,(1-.5+lt+gt)*nt,(.5-St+mt)*et));var Mt=new go.PathFigure((.525+gt)*nt,(.5+lt+mt)*et,!1);return ct.add(Mt),ct.spot1=new go.Spot(.232,.136),ct.spot2=new go.Spot(.682,.611),ct.defaultStretch=go.GraphObject.Uniform,ct}),go.Shape.defineFigureGenerator("LogicImplies",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;return isNaN(ct)&&(ct=.2),new go.Geometry().add(new go.PathFigure((1-ct)*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,(1-ct)*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(bt,nt,et){var ct=bt?bt.parameter1:NaN;return isNaN(ct)&&(ct=.2),new go.Geometry().add(new go.PathFigure((1-ct)*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,(1-ct)*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,ct*nt,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,ct*nt,et))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(bt,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(bt,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(bt,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(bt,nt,et){var ct=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 ct.defaultStretch=go.GraphObject.Uniform,ct}),go.Shape.defineFigureGenerator("LogicTruth",function(bt,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(bt,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(bt,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(bt,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(bt,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(bt,nt,et){var ct=.5;return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,0,ct*et)).add(new go.PathSegment(go.PathSegment.Arc,180,180,ct*nt,ct*et,ct*nt,ct*et)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(bt,nt,et){var ct=.5;return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,ct*et)).add(new go.PathSegment(go.PathSegment.Arc,0,180,ct*nt,ct*et,ct*nt,ct*et)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new zn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new zn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;isNaN(ct)&&(ct=.3);var lt=bt?bt.parameter2:NaN;isNaN(lt)&&(lt=.3);var gt=(1-ct)*nt,mt=(.5-lt/2)*et,St=(.5+lt/2)*et,Mt=new go.Geometry,zt=new go.PathFigure(0,mt,!0);Mt.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,St)),zt.add(new go.PathSegment(go.PathSegment.Line,0,St).close()),Mt.spot1=new go.Spot(0,mt/et);var Ht=Pe(0,St/et,1,St/et,gt/nt,1,1,.5,Dt());return Mt.spot2=new go.Spot(Ht.x,Ht.y),ee(Ht),Mt}),go.Shape.setFigureParameter("Arrow2",0,new zn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new zn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;isNaN(ct)&&(ct=30),ct>nt&&(ct=nt);var lt=bt?bt.parameter2:NaN;isNaN(lt)&&(lt=30),lt=Math.min(lt,et/2);var gt=nt-ct,mt=(et-lt)/2,St=mt+lt,Mt=new go.Geometry,zt=new go.PathFigure(0,mt,!0);Mt.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,St)),zt.add(new go.PathSegment(go.PathSegment.Line,0,St).close()),Mt.spot1=new go.Spot(0,mt/et);var Ht=Pe(0,St/et,1,St/et,gt/nt,1,1,.5,Dt());return Mt.spot2=new go.Spot(Ht.x,Ht.y),ee(Ht),Mt}),go.Shape.defineFigureGenerator("Chevron",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ct.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()),ct}),go.Shape.defineFigureGenerator("DoubleArrow",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ct.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()),ct}),go.Shape.setFigureParameter("DoubleEndArrow",0,new zn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;isNaN(ct)&&(ct=.3);var lt=(.5-ct/2)*et,gt=(.5+ct/2)*et,mt=new go.Geometry,St=new go.PathFigure(nt,.5*et,!0);mt.add(St),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,gt)),St.add(new go.PathSegment(go.PathSegment.Line,.3*nt,gt)),St.add(new go.PathSegment(go.PathSegment.Line,.3*nt,et)),St.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),St.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0)),St.add(new go.PathSegment(go.PathSegment.Line,.3*nt,lt)),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,lt)),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close());var Mt=Pe(0,.5,.3,0,0,lt/et,.1,lt/et,Dt());return mt.spot1=new go.Spot(Mt.x,Mt.y),Mt=Pe(.7,1,1,.5,0,gt/et,1,gt/et,Mt),mt.spot2=new go.Spot(Mt.x,Mt.y),ee(Mt),mt}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new zn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new zn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;isNaN(ct)&&(ct=40);var lt=bt?bt.parameter2:NaN;isNaN(lt)&&(lt=100);var gt=(et-ct)/2,mt=gt+ct,St=(et-lt)/2,Mt=St+lt;(ct>et||lt>et)&&(lt>ct?(ct=ct*et/lt,gt=(et-ct)/2,mt=gt+ct,St=0,Mt=et):(gt=0,mt=et,St=0,Mt=et));var zt=new go.Geometry,Ht=new go.PathFigure(nt,.5*et,!0);zt.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*nt,Mt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*nt,mt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.3*nt,mt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.3*nt,Mt)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),Ht.add(new go.PathSegment(go.PathSegment.Line,.3*nt,St)),Ht.add(new go.PathSegment(go.PathSegment.Line,.3*nt,gt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*nt,gt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*nt,St).close());var qt=Pe(0,.5,.3,St/et,0,gt/et,1,gt/et,Dt());return zt.spot1=new go.Spot(qt.x,qt.y),qt=Pe(.7,Mt/et,1,.5,0,mt/et,1,mt/et,qt),zt.spot2=new go.Spot(qt.x,qt.y),ee(qt),zt}),go.Shape.setFigureParameter("IBeamArrow",0,new zn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;isNaN(ct)&&(ct=.3);var lt=(.5-ct/2)*et,gt=(.5+ct/2)*et,mt=new go.Geometry,St=new go.PathFigure(nt,.5*et,!0);mt.add(St),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,gt)),St.add(new go.PathSegment(go.PathSegment.Line,.2*nt,gt)),St.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),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,.2*nt,0)),St.add(new go.PathSegment(go.PathSegment.Line,.2*nt,lt)),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,lt)),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),mt.spot1=new go.Spot(0,lt/et);var Mt=Pe(.7,1,1,.5,0,gt/et,1,gt/et,Dt());return mt.spot2=new go.Spot(Mt.x,Mt.y),ee(Mt),mt}),go.Shape.setFigureParameter("IBeamArrow2",0,new zn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new zn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;isNaN(ct)&&(ct=40);var lt=bt?bt.parameter2:NaN;isNaN(lt)&&(lt=100);var gt=(et-ct)/2,mt=gt+ct,St=(et-lt)/2,Mt=St+lt;(ct>et||lt>et)&&(lt>ct?(ct=ct*et/lt,gt=(et-ct)/2,mt=gt+ct,St=0,Mt=et):(gt=0,mt=et,St=0,Mt=et));var zt=new go.Geometry,Ht=new go.PathFigure(nt,.5*et,!0);zt.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*nt,Mt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*nt,mt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.2*nt,mt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.2*nt,Mt)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,Mt)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,St)),Ht.add(new go.PathSegment(go.PathSegment.Line,.2*nt,St)),Ht.add(new go.PathSegment(go.PathSegment.Line,.2*nt,gt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*nt,gt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*nt,St).close()),zt.spot1=new go.Spot(0,gt/et);var qt=Pe(.7,Mt/et,1,.5,0,mt/et,1,mt/et,Dt());return zt.spot2=new go.Spot(qt.x,qt.y),ee(qt),zt}),go.Shape.setFigureParameter("Pointer",0,new zn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;isNaN(ct)&&(ct=.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,ct*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),lt.spot1=new go.Spot(ct,.35);var mt=Pe(.2,.65,1,.65,0,1,1,.5,Dt());return lt.spot2=new go.Spot(mt.x,mt.y),ee(mt),lt}),go.Shape.setFigureParameter("RoundedPointer",0,new zn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;isNaN(ct)&&(ct=.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,ct*nt,.75*et,ct*nt,.25*et).close()),lt.spot1=new go.Spot(ct,.35);var mt=Pe(0,.65,1,.65,0,1,1,.5,Dt());return lt.spot2=new go.Spot(mt.x,mt.y),ee(mt),lt}),go.Shape.setFigureParameter("SplitEndArrow",0,new zn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;isNaN(ct)&&(ct=.4);var lt=(.5-ct/2)*et,gt=(.5+ct/2)*et,mt=new go.Geometry,St=new go.PathFigure(nt,.5*et,!0);mt.add(St),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,gt)),St.add(new go.PathSegment(go.PathSegment.Line,0,gt)),St.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),St.add(new go.PathSegment(go.PathSegment.Line,0,lt)),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,lt)),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),mt.spot1=new go.Spot(.2,.3);var Mt=Pe(.7,1,1,.5,0,gt/et,1,gt/et,Dt());return mt.spot2=new go.Spot(Mt.x,Mt.y),ee(Mt),mt}),go.Shape.setFigureParameter("SplitEndArrow2",0,new zn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;isNaN(ct)&&(ct=50);var lt=(et-ct)/2,gt=lt+ct;ct>et&&(lt=0,gt=et);var mt=new go.Geometry,St=new go.PathFigure(nt,.5*et,!0);mt.add(St),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,gt)),St.add(new go.PathSegment(go.PathSegment.Line,0,gt)),St.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),St.add(new go.PathSegment(go.PathSegment.Line,0,lt)),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,lt)),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),mt.spot1=new go.Spot(.2,lt/et);var Mt=Pe(.7,1,1,.5,0,gt/et,1,gt/et,Dt());return mt.spot2=new go.Spot(Mt.x,Mt.y),ee(Mt),mt}),go.Shape.setFigureParameter("SquareArrow",0,new zn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;isNaN(ct)&&(ct=.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,ct*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,ct*nt,0).close()),lt.spot1=go.Spot.TopLeft,lt.spot2=new go.Spot(ct,1),lt}),go.Shape.defineFigureGenerator("Cone1",function(bt,nt,et){var ct=new go.Geometry,lt=se*.5,gt=se*.1,mt=new go.PathFigure(0,.9*et,!0);return ct.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()),ct.spot1=new go.Spot(.25,.5),ct.spot2=new go.Spot(.75,.97),ct}),go.Shape.defineFigureGenerator("Cone2",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.9*et,!0);ct.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 ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.9*et,(1-.85/.9)*nt,.8*et,.85/.9*nt,.8*et)),ct.spot1=new go.Spot(.25,.5),ct.spot2=new go.Spot(.75,.82),ct}),go.Shape.defineFigureGenerator("Cube1",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.5*nt,et,!0);ct.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 ct.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)),ct.spot1=new go.Spot(0,.3),ct.spot2=new go.Spot(.5,.85),ct}),go.Shape.defineFigureGenerator("Cube2",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.3*et,!0);ct.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 ct.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)),ct.spot1=new go.Spot(0,.3),ct.spot2=new go.Spot(.7,1),ct}),go.Shape.defineFigureGenerator("Cylinder1",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;isNaN(ct)&&(ct=5),ct=Math.min(ct,et/3);var lt=new go.Geometry,gt=se*.5,mt=new go.PathFigure(0,ct,!0);lt.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,se*ct,(.5-gt)*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,1*nt,ct,(.5+gt)*nt,0,1*nt,se*ct)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,et-ct)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,1*et,1*nt,et-se*ct,(.5+gt)*nt,1*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-ct,(.5-gt)*nt,1*et,0,et-se*ct)),mt.add(new go.PathSegment(go.PathSegment.Line,0,ct));var St=new go.PathFigure(nt,ct,!1);return lt.add(St),St.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,2*ct,1*nt,2*ct-se*ct,(.5+gt)*nt,2*ct)),St.add(new go.PathSegment(go.PathSegment.Bezier,0,ct,(.5-gt)*nt,2*ct,0,2*ct-se*ct)),lt.spot1=new go.Spot(0,0,0,2*ct),lt.spot2=new go.Spot(1,1),lt}),go.Shape.defineFigureGenerator("Cylinder2",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;isNaN(ct)&&(ct=5),ct=Math.min(ct,et/3);var lt=new go.Geometry,gt=se*.5,mt=new go.PathFigure(0,et-ct,!0);lt.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,0,ct)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,se*ct,(.5-gt)*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,ct,(.5+gt)*nt,0,nt,se*ct)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,et-ct)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,et-se*ct,(.5+gt)*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-ct,(.5-gt)*nt,et,0,et-se*ct));var St=new go.PathFigure(0,et-ct,!1);return lt.add(St),St.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et-2*ct,0,et-ct-se*ct,(.5-gt)*nt,et-2*ct)),St.add(new go.PathSegment(go.PathSegment.Bezier,nt,et-ct,(.5+gt)*nt,et-2*ct,nt,et-ct-se*ct)),lt.spot1=new go.Spot(0,0),lt.spot2=new go.Spot(1,1,0,-2*ct),lt}),go.Shape.defineFigureGenerator("Cylinder3",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;isNaN(ct)&&(ct=5),ct=Math.min(ct,nt/3);var lt=new go.Geometry,gt=se*.5,mt=new go.PathFigure(ct,0,!0);lt.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt-ct,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,nt-se*ct,0,nt,(.5-gt)*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt-ct,et,nt,(.5+gt)*et,nt-se*ct,et)),mt.add(new go.PathSegment(go.PathSegment.Line,ct,et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,se*ct,et,0,(.5+gt)*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,ct,0,0,(.5-gt)*et,se*ct,0));var St=new go.PathFigure(ct,0,!1);return lt.add(St),St.add(new go.PathSegment(go.PathSegment.Bezier,2*ct,.5*et,ct+se*ct,0,2*ct,(.5-gt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,ct,et,2*ct,(.5+gt)*et,ct+se*ct,et)),lt.spot1=new go.Spot(0,0,2*ct,0),lt.spot2=new go.Spot(1,1),lt}),go.Shape.defineFigureGenerator("Cylinder4",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;isNaN(ct)&&(ct=5),ct=Math.min(ct,nt/3);var lt=new go.Geometry,gt=se*.5,mt=new go.PathFigure(nt-ct,0,!0);lt.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,nt-se*ct,0,nt,(.5-gt)*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt-ct,et,nt,(.5+gt)*et,nt-se*ct,et)),mt.add(new go.PathSegment(go.PathSegment.Line,ct,et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,se*ct,et,0,(.5+gt)*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,ct,0,0,(.5-gt)*et,se*ct,0)),mt.add(new go.PathSegment(go.PathSegment.Line,nt-ct,0));var St=new go.PathFigure(nt-ct,0,!1);return lt.add(St),St.add(new go.PathSegment(go.PathSegment.Bezier,nt-2*ct,.5*et,nt-ct-se*ct,0,nt-2*ct,(.5-gt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,nt-ct,et,nt-2*ct,(.5+gt)*et,nt-ct-se*ct,et)),lt.spot1=new go.Spot(0,0),lt.spot2=new go.Spot(1,1,-2*ct,0),lt}),go.Shape.defineFigureGenerator("Prism1",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.25*nt,.25*et,!0);ct.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 ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),ct.spot1=new go.Spot(.408,.172),ct.spot2=new go.Spot(.833,.662),ct}),go.Shape.defineFigureGenerator("Prism2",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.25*et,!0);ct.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 ct.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)),ct.spot1=new go.Spot(.25,.5),ct.spot2=new go.Spot(.75,.75),ct}),go.Shape.defineFigureGenerator("Pyramid1",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!0);ct.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 ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),ct.spot1=new go.Spot(.25,.367),ct.spot2=new go.Spot(.75,.875),ct}),go.Shape.defineFigureGenerator("Pyramid2",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!0);ct.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 ct.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)),ct.spot1=new go.Spot(.25,.367),ct.spot2=new go.Spot(.75,.875),ct}),go.Shape.defineFigureGenerator("Actor",function(bt,nt,et){var ct=new go.Geometry,lt=.2,gt=.1,mt=se*lt,St=se*gt,Mt=.5,zt=.1,Ht=new go.PathFigure(Mt*nt,(zt+gt)*et,!0);ct.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-lt)*nt,zt*et,(Mt-mt)*nt,(zt+gt)*et,(Mt-lt)*nt,(zt+St)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(zt-gt)*et,(Mt-lt)*nt,(zt-St)*et,(Mt-mt)*nt,(zt-gt)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+lt)*nt,zt*et,(Mt+mt)*nt,(zt-gt)*et,(Mt+lt)*nt,(zt-St)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(zt+gt)*et,(Mt+lt)*nt,(zt+St)*et,(Mt+mt)*nt,(zt+gt)*et));var qt=.05,jt=se*qt;Mt=.05,zt=.25;var Jt=new go.PathFigure(.5*nt,.2*et,!0);return ct.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Line,.95*nt,.2*et)),Mt=.95,zt=.25,Jt.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+qt)*nt,zt*et,(Mt+jt)*nt,(zt-qt)*et,(Mt+qt)*nt,(zt-jt)*et)),Jt.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),Jt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),Jt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.35*et)),qt=.025,jt=se*qt,Mt=.825,zt=.35,Jt.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(zt-qt)*et,(Mt+qt)*nt,(zt-jt)*et,(Mt+jt)*nt,(zt-qt)*et)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-qt)*nt,zt*et,(Mt-jt)*nt,(zt-qt)*et,(Mt-qt)*nt,(zt-jt)*et)),Jt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),Jt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,et)),Jt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.7*et)),qt=.05,jt=se*qt,Mt=.5,zt=.7,Jt.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(zt-qt)*et,(Mt+qt)*nt,(zt-jt)*et,(Mt+jt)*nt,(zt-qt)*et)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-qt)*nt,zt*et,(Mt-jt)*nt,(zt-qt)*et,(Mt-qt)*nt,(zt-jt)*et)),Jt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,et)),Jt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),Jt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.35*et)),qt=.025,jt=se*qt,Mt=.175,zt=.35,Jt.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(zt-qt)*et,(Mt+qt)*nt,(zt-jt)*et,(Mt+jt)*nt,(zt-qt)*et)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-qt)*nt,zt*et,(Mt-jt)*nt,(zt-qt)*et,(Mt-qt)*nt,(zt-jt)*et)),Jt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et)),Jt.add(new go.PathSegment(go.PathSegment.Line,0,.6*et)),Jt.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),qt=.05,jt=se*qt,Mt=.05,zt=.25,Jt.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(zt-qt)*et,(Mt-qt)*nt,(zt-jt)*et,(Mt-jt)*nt,(zt-qt)*et)),Jt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.2*et)),ct.spot1=new go.Spot(.2,.2),ct.spot2=new go.Spot(.8,.65),ct}),go.Shape.setFigureParameter("Card",0,new zn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;isNaN(ct)&&(ct=.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,ct*et)),gt.add(new go.PathSegment(go.PathSegment.Line,ct*nt,0).close()),lt.spot1=new go.Spot(0,ct),lt.spot2=go.Spot.BottomRight,lt}),go.Shape.defineFigureGenerator("Collate",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.5*nt,.5*et,!0);ct.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 ct.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)),ct.spot1=new go.Spot(.25,0),ct.spot2=new go.Spot(.75,.25),ct}),go.Shape.defineFigureGenerator("CreateRequest",function(bt,nt,et){var ct=new go.Geometry,lt=bt?bt.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);ct.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 ct.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)),ct}),go.Shape.defineFigureGenerator("Database",function(bt,nt,et){var ct=new go.Geometry,lt=se*.5,gt=se*.1,mt=new go.PathFigure(nt,.1*et,!0);ct.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 St=new go.PathFigure(nt,.1*et,!1);return ct.add(St),St.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,nt,(.1+gt)*et,(.5+lt)*nt,.2*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*et,(.5-lt)*nt,.2*et,0,(.1+gt)*et)),St.add(new go.PathSegment(go.PathSegment.Move,nt,.2*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,nt,(.2+gt)*et,(.5+lt)*nt,.3*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*et,(.5-lt)*nt,.3*et,0,(.2+gt)*et)),St.add(new go.PathSegment(go.PathSegment.Move,nt,.3*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.4*et,nt,(.3+gt)*et,(.5+lt)*nt,.4*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*et,(.5-lt)*nt,.4*et,0,(.3+gt)*et)),ct.spot1=new go.Spot(0,.4),ct.spot2=new go.Spot(1,.9),ct}),go.Shape.defineFigureGenerator("DataStorage",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ct.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()),ct.spot1=new go.Spot(.226,0),ct.spot2=new go.Spot(.81,1),ct}),go.Shape.defineFigureGenerator("DiskStorage",function(bt,nt,et){var ct=new go.Geometry,lt=se*.5,gt=se*.1,mt=new go.PathFigure(nt,.1*et,!0);ct.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 St=new go.PathFigure(nt,.1*et,!1);return ct.add(St),St.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,nt,(.1+gt)*et,(.5+lt)*nt,.2*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*et,(.5-lt)*nt,.2*et,0,(.1+gt)*et)),St.add(new go.PathSegment(go.PathSegment.Move,nt,.2*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,nt,(.2+gt)*et,(.5+lt)*nt,.3*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*et,(.5-lt)*nt,.3*et,0,(.2+gt)*et)),ct.spot1=new go.Spot(0,.3),ct.spot2=new go.Spot(1,.9),ct}),go.Shape.defineFigureGenerator("Display",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.25*nt,0,!0);return ct.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()),ct.spot1=new go.Spot(.25,0),ct.spot2=new go.Spot(.75,1),ct}),go.Shape.defineFigureGenerator("DividedEvent",function(bt,nt,et){var ct=new go.Geometry,lt=bt?bt.parameter1:NaN;isNaN(lt)?lt=.2:lt<.15&&(lt=.15);var gt=se*.2,mt=new go.PathFigure(0,.2*et,!0);ct.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 St=new go.PathFigure(0,lt*et,!1);return ct.add(St),St.add(new go.PathSegment(go.PathSegment.Line,nt,lt*et)),ct}),go.Shape.defineFigureGenerator("DividedProcess",function(bt,nt,et){var ct=new go.Geometry,lt=bt?bt.parameter1:NaN;(isNaN(lt)||lt<.1)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);ct.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 ct.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt,lt*et)),ct}),go.Shape.defineFigureGenerator("Document",function(bt,nt,et){var ct=new go.Geometry;et=et/.8;var lt=new go.PathFigure(0,.7*et,!0);return ct.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()),ct.spot1=go.Spot.TopLeft,ct.spot2=new go.Spot(1,.6),ct}),go.Shape.defineFigureGenerator("ExternalOrganization",function(bt,nt,et){var ct=new go.Geometry,lt=bt?bt.parameter1:NaN;(isNaN(lt)||lt<.2)&&(lt=.2);var gt=new go.PathFigure(0,0,!0);ct.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 ct.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)),ct}),go.Shape.defineFigureGenerator("ExternalProcess",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!0);ct.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 ct.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)),ct.spot1=new go.Spot(.25,.25),ct.spot2=new go.Spot(.75,.75),ct}),go.Shape.defineFigureGenerator("File",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);ct.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 ct.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)),ct.spot1=new go.Spot(0,.25),ct.spot2=go.Spot.BottomRight,ct}),go.Shape.defineFigureGenerator("Interrupt",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt,.5*et,!0);ct.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);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et));var mt=new go.PathFigure(nt,.5*et,!1);return ct.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ct.spot1=new go.Spot(0,.25),ct.spot2=new go.Spot(.5,.75),ct}),go.Shape.defineFigureGenerator("InternalStorage",function(bt,nt,et){var ct=new go.Geometry,lt=bt?bt.parameter1:NaN,gt=bt?bt.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(gt)&&(gt=.1);var mt=new go.PathFigure(0,0,!0);ct.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 St=new go.PathFigure(lt*nt,0,!1);return ct.add(St),St.add(new go.PathSegment(go.PathSegment.Line,lt*nt,et)),St.add(new go.PathSegment(go.PathSegment.Move,0,gt*et)),St.add(new go.PathSegment(go.PathSegment.Line,nt,gt*et)),ct}),go.Shape.defineFigureGenerator("Junction",function(bt,nt,et){var ct=new go.Geometry,lt=1/Math.SQRT2,gt=(1-1/Math.SQRT2)/2,mt=se*.5,St=.5,Mt=new go.PathFigure(nt,St*et,!0);ct.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,St*nt,et,nt,(St+mt)*et,(St+mt)*nt,et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,0,St*et,(St-mt)*nt,et,0,(St+mt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,St*nt,0,0,(St-mt)*et,(St-mt)*nt,0)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,St*et,(St+mt)*nt,0,nt,(St-mt)*et));var zt=new go.PathFigure((gt+lt)*nt,(gt+lt)*et,!1);return ct.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)),ct}),go.Shape.defineFigureGenerator("LinedDocument",function(bt,nt,et){var ct=new go.Geometry;et=et/.8;var lt=new go.PathFigure(0,.7*et,!0);ct.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 ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.75*et)),ct.spot1=new go.Spot(.1,0),ct.spot2=new go.Spot(1,.6),ct}),go.Shape.defineFigureGenerator("LoopLimit",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,et,!0);return ct.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()),ct.spot1=new go.Spot(0,.25),ct.spot2=go.Spot.BottomRight,ct}),go.Shape.defineFigureGenerator("MagneticTape",function(bt,nt,et){var ct=new go.Geometry,lt=se*.5,gt=.5,mt=new go.PathFigure(.5*nt,et,!0);return ct.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)),ct.spot1=new go.Spot(.15,.15),ct.spot2=new go.Spot(.85,.8),ct}),go.Shape.defineFigureGenerator("ManualInput",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt,0,!0);return ct.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()),ct.spot1=new go.Spot(0,.25),ct.spot2=go.Spot.BottomRight,ct}),go.Shape.defineFigureGenerator("MessageFromUser",function(bt,nt,et){var ct=new go.Geometry,lt=bt?bt.parameter1:NaN;isNaN(lt)&&(lt=.7);var gt=new go.PathFigure(0,0,!0);return ct.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()),ct.spot1=go.Spot.TopLeft,ct}),go.Shape.defineFigureGenerator("MicroformProcessing",function(bt,nt,et){var ct=new go.Geometry,lt=bt?bt.parameter1:NaN;isNaN(lt)&&(lt=.25);var gt=new go.PathFigure(0,0,!0);return ct.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()),ct}),go.Shape.defineFigureGenerator("MicroformRecording",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ct.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()),ct.spot1=new go.Spot(0,.25),ct.spot2=new go.Spot(1,.75),ct}),go.Shape.defineFigureGenerator("MultiDocument",function(bt,nt,et){var ct=new go.Geometry;et=et/.8;var lt=new go.PathFigure(nt,0,!0);ct.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 ct.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)),ct.spot1=new go.Spot(0,.25),ct.spot2=new go.Spot(.8,.77),ct}),go.Shape.defineFigureGenerator("MultiProcess",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.1*nt,.1*et,!0);ct.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 ct.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)),ct.spot1=new go.Spot(0,.2),ct.spot2=new go.Spot(.8,1),ct}),go.Shape.defineFigureGenerator("OfflineStorage",function(bt,nt,et){var ct=new go.Geometry,lt=bt?bt.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=1-lt,mt=new go.PathFigure(0,0,!0);ct.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 St=new go.PathFigure(.5*lt*nt,lt*et,!1);return ct.add(St),St.add(new go.PathSegment(go.PathSegment.Line,(1-.5*lt)*nt,lt*et)),ct}),go.Shape.defineFigureGenerator("OffPageConnector",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ct.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()),ct.spot1=go.Spot.TopLeft,ct.spot2=new go.Spot(.75,1),ct}),go.Shape.defineFigureGenerator("Or",function(bt,nt,et){var ct=new go.Geometry,lt=se*.5,gt=.5,mt=new go.PathFigure(nt,gt*et,!0);ct.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 St=new go.PathFigure(nt,.5*et,!1);return ct.add(St),St.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),St.add(new go.PathSegment(go.PathSegment.Move,.5*nt,et)),St.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),ct}),go.Shape.defineFigureGenerator("PaperTape",function(bt,nt,et){var ct=new go.Geometry;et=et/.8;var lt=new go.PathFigure(0,.7*et,!0);return ct.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()),ct.spot1=new go.Spot(0,.49),ct.spot2=new go.Spot(1,.75),ct}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(bt,nt,et){var ct=new go.Geometry,lt=bt?bt.parameter1:NaN,gt=bt?bt.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(gt)&&(gt=.3);var mt=new go.PathFigure(0,0,!0);return ct.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()),ct}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(bt,nt,et){var ct=new go.Geometry,lt=bt?bt.parameter1:NaN,gt=bt?bt.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(gt)&&(gt=.3);var mt=new go.PathFigure(0,0,!0);return ct.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()),ct}),go.Shape.defineFigureGenerator("Procedure",function(bt,nt,et){var ct=new go.Geometry,lt=bt?bt.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);ct.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 ct.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)),ct}),go.Shape.defineFigureGenerator("Process",function(bt,nt,et){var ct=new go.Geometry,lt=bt?bt.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);ct.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 ct.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,et)),ct.spot2=go.Spot.BottomRight,ct}),go.Shape.defineFigureGenerator("Sort",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!0);ct.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 ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),ct.spot1=new go.Spot(.25,.25),ct.spot2=new go.Spot(.75,.5),ct}),go.Shape.defineFigureGenerator("Start",function(bt,nt,et){var ct=new go.Geometry,lt=bt?bt.parameter1:NaN;isNaN(lt)&&(lt=.25);var gt=new go.PathFigure(lt*nt,0,!0);ct.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 ct.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)),ct.spot1=new go.Spot(lt,0),ct.spot2=new go.Spot(1-lt,1),ct}),go.Shape.defineFigureGenerator("Terminator",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.25*nt,0,!0);return ct.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)),ct.spot1=new go.Spot(.23,0),ct.spot2=new go.Spot(.77,1),ct}),go.Shape.defineFigureGenerator("TransmittalTape",function(bt,nt,et){var ct=new go.Geometry,lt=bt?bt.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);return ct.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()),ct.spot1=go.Spot.TopLeft,ct}),go.Shape.defineFigureGenerator("AndGate",function(bt,nt,et){var ct=new go.Geometry,lt=se*.5,gt=new go.PathFigure(0,0,!0);return ct.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()),ct.spot1=go.Spot.TopLeft,ct.spot2=new go.Spot(.55,1),ct}),go.Shape.defineFigureGenerator("Buffer",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ct.spot1=new go.Spot(0,.25),ct.spot2=new go.Spot(.5,.75),ct}),go.Shape.defineFigureGenerator("Clock",function(bt,nt,et){var ct=new go.Geometry,lt=se*.5,gt=.5,mt=new go.PathFigure(nt,gt*et,!0);ct.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 St=new go.PathFigure(nt,gt*et,!1);ct.add(St),St.add(new go.PathSegment(go.PathSegment.Line,nt,gt*et));var Mt=new go.PathFigure(.8*nt,.75*et,!1);return ct.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.25*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.25*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.75*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.75*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.25*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.25*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.75*et)),ct}),go.Shape.defineFigureGenerator("Ground",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!1);return ct.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)),ct}),go.Shape.defineFigureGenerator("Inverter",function(bt,nt,et){var ct=new go.Geometry,lt=se*.1,gt=.1,mt=.9,St=.5,Mt=new go.PathFigure(.8*nt,.5*et,!0);ct.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Line,0,et)),Mt.add(new go.PathSegment(go.PathSegment.Line,0,0)),Mt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et));var zt=new go.PathFigure((mt+gt)*nt,St*et,!0);return ct.add(zt),zt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(St+gt)*et,(mt+gt)*nt,(St+lt)*et,(mt+lt)*nt,(St+gt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-gt)*nt,St*et,(mt-lt)*nt,(St+gt)*et,(mt-gt)*nt,(St+lt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(St-gt)*et,(mt-gt)*nt,(St-lt)*et,(mt-lt)*nt,(St-gt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,St*et,(mt+lt)*nt,(St-gt)*et,(mt+gt)*nt,(St-lt)*et)),ct.spot1=new go.Spot(0,.25),ct.spot2=new go.Spot(.4,.75),ct}),go.Shape.defineFigureGenerator("NandGate",function(bt,nt,et){var ct=new go.Geometry,lt=se*.5,gt=se*.4,mt=se*.1,St=.1,Mt=.9,zt=.5,Ht=new go.PathFigure(.8*nt,.5*et,!0);ct.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,et,.8*nt,(.5+gt)*et,(.4+lt)*nt,et)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,et)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,0)),Ht.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(.4+lt)*nt,0,.8*nt,(.5-gt)*et));var qt=new go.PathFigure((Mt+St)*nt,zt*et,!0);return ct.add(qt),qt.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(zt+St)*et,(Mt+St)*nt,(zt+mt)*et,(Mt+mt)*nt,(zt+St)*et)),qt.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-St)*nt,zt*et,(Mt-mt)*nt,(zt+St)*et,(Mt-St)*nt,(zt+mt)*et)),qt.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(zt-St)*et,(Mt-St)*nt,(zt-mt)*et,(Mt-mt)*nt,(zt-St)*et)),qt.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+St)*nt,zt*et,(Mt+mt)*nt,(zt-St)*et,(Mt+St)*nt,(zt-mt)*et)),ct.spot1=new go.Spot(0,.05),ct.spot2=new go.Spot(.55,.95),ct}),go.Shape.defineFigureGenerator("NorGate",function(bt,nt,et){var ct=new go.Geometry,lt=.5,gt=se*lt,mt=0,St=.5,Mt=new go.PathFigure(.8*nt,.5*et,!0);ct.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.7*nt,(St+gt)*et,(mt+gt)*nt,(St+lt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.75*et,.25*nt,.25*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(mt+gt)*nt,(St-lt)*et,.7*nt,(St-gt)*et)),lt=.1,gt=se*.1,mt=.9,St=.5;var zt=new go.PathFigure((mt-lt)*nt,St*et,!0);return ct.add(zt),zt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(St-lt)*et,(mt-lt)*nt,(St-gt)*et,(mt-gt)*nt,(St-lt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+lt)*nt,St*et,(mt+gt)*nt,(St-lt)*et,(mt+lt)*nt,(St-gt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(St+lt)*et,(mt+lt)*nt,(St+gt)*et,(mt+gt)*nt,(St+lt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-lt)*nt,St*et,(mt-gt)*nt,(St+lt)*et,(mt-lt)*nt,(St+gt)*et)),ct.spot1=new go.Spot(.2,.25),ct.spot2=new go.Spot(.6,.75),ct}),go.Shape.defineFigureGenerator("OrGate",function(bt,nt,et){var ct=new go.Geometry,lt=.5,gt=se*lt,mt=0,St=.5,Mt=new go.PathFigure(0,0,!0);return ct.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(mt+gt+gt)*nt,(St-lt)*et,.8*nt,(St-gt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.8*nt,(St+gt)*et,(mt+gt+gt)*nt,(St+lt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.75*et,.25*nt,.25*et).close()),ct.spot1=new go.Spot(.2,.25),ct.spot2=new go.Spot(.75,.75),ct}),go.Shape.defineFigureGenerator("XnorGate",function(bt,nt,et){var ct=new go.Geometry,lt=.5,gt=se*lt,mt=.2,St=.5,Mt=new go.PathFigure(.1*nt,0,!1);ct.add(Mt),Mt.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);ct.add(zt),zt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,et,.7*nt,(St+gt)*et,(mt+gt)*nt,(St+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,(St-lt)*et,.7*nt,(St-gt)*et)),lt=.1,gt=se*.1,mt=.9,St=.5;var Ht=new go.PathFigure((mt-lt)*nt,St*et,!0);return ct.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(St-lt)*et,(mt-lt)*nt,(St-gt)*et,(mt-gt)*nt,(St-lt)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(mt+lt)*nt,St*et,(mt+gt)*nt,(St-lt)*et,(mt+lt)*nt,(St-gt)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(St+lt)*et,(mt+lt)*nt,(St+gt)*et,(mt+gt)*nt,(St+lt)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(mt-lt)*nt,St*et,(mt-gt)*nt,(St+lt)*et,(mt-lt)*nt,(St+gt)*et)),ct.spot1=new go.Spot(.4,.25),ct.spot2=new go.Spot(.65,.75),ct}),go.Shape.defineFigureGenerator("XorGate",function(bt,nt,et){var ct=new go.Geometry,lt=.5,gt=se*lt,mt=.2,St=.5,Mt=new go.PathFigure(.1*nt,0,!1);ct.add(Mt),Mt.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 ct.add(zt),zt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(mt+gt)*nt,(St-lt)*et,.9*nt,(St-gt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,et,.9*nt,(St+gt)*et,(mt+gt)*nt,(St+lt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,.45*nt,.75*et,.45*nt,.25*et).close()),ct.spot1=new go.Spot(.4,.25),ct.spot2=new go.Spot(.8,.75),ct}),go.Shape.defineFigureGenerator("Capacitor",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ct.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)),ct}),go.Shape.defineFigureGenerator("Resistor",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.5*et,!1);return ct.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)),ct}),go.Shape.defineFigureGenerator("Inductor",function(bt,nt,et){var ct=new go.Geometry,lt=se*.1,gt=.1,mt=.1,St=.5,Mt=new go.PathFigure((mt-lt*.5)*nt,et,!1);return ct.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,0,(mt-lt)*nt,et,(mt-gt)*nt,0)),mt=.3,Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,et,(mt+gt)*nt,0,(mt+lt)*nt,et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,0,(mt-lt)*nt,et,(mt-gt)*nt,0)),mt=.5,Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,et,(mt+gt)*nt,0,(mt+lt)*nt,et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,0,(mt-lt)*nt,et,(mt-gt)*nt,0)),mt=.7,Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,et,(mt+gt)*nt,0,(mt+lt)*nt,et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,0,(mt-lt)*nt,et,(mt-gt)*nt,0)),mt=.9,Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+lt*.5)*nt,et,(mt+gt)*nt,0,(mt+lt)*nt,et)),ct}),go.Shape.defineFigureGenerator("ACvoltageSource",function(bt,nt,et){var ct=new go.Geometry,lt=se*.5,gt=.5,mt=.5,St=.5,Mt=new go.PathFigure((mt-gt)*nt,St*et,!1);return ct.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(St-gt)*et,(mt-gt)*nt,(St-lt)*et,(mt-lt)*nt,(St-gt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,St*et,(mt+lt)*nt,(St-gt)*et,(mt+gt)*nt,(St-lt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(St+gt)*et,(mt+gt)*nt,(St+lt)*et,(mt+lt)*nt,(St+gt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-gt)*nt,St*et,(mt-lt)*nt,(St+gt)*et,(mt-gt)*nt,(St+lt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Move,(mt-gt+.1)*nt,St*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt-.1)*nt,St*et,mt*nt,(St-gt)*et,mt*nt,(St+gt)*et)),ct}),go.Shape.defineFigureGenerator("DCvoltageSource",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.75*et,!1);return ct.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)),ct}),go.Shape.defineFigureGenerator("Diode",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt,0,!1);return ct.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)),ct.spot1=new go.Spot(0,.25),ct.spot2=new go.Spot(.5,.75),ct}),go.Shape.defineFigureGenerator("Wifi",function(bt,nt,et){var ct=new go.Geometry,lt=nt,gt=et;nt=nt*.38,et=et*.6;var mt=se*.8,St=.8,Mt=0,zt=.5,Ht=(lt-nt)/2,qt=(gt-et)/2,jt=new go.PathFigure(Mt*nt+Ht,(zt+St)*et+qt,!0);ct.add(jt),jt.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-St)*nt+Ht,zt*et+qt,(Mt-mt)*nt+Ht,(zt+St)*et+qt,(Mt-St)*nt+Ht,(zt+mt)*et+qt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Ht,(zt-St)*et+qt,(Mt-St)*nt+Ht,(zt-mt)*et+qt,(Mt-mt)*nt+Ht,(zt-St)*et+qt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-St+mt*.5)*nt+Ht,zt*et+qt,Mt*nt+Ht,(zt-St)*et+qt,(Mt-St+mt*.5)*nt+Ht,(zt-mt)*et+qt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Ht,(zt+St)*et+qt,(Mt-St+mt*.5)*nt+Ht,(zt+mt)*et+qt,Mt*nt+Ht,(zt+St)*et+qt).close()),mt=se*.4,St=.4,Mt=.2,zt=.5;var Jt=new go.PathFigure(Mt*nt+Ht,(zt+St)*et+qt,!0);ct.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-St)*nt+Ht,zt*et+qt,(Mt-mt)*nt+Ht,(zt+St)*et+qt,(Mt-St)*nt+Ht,(zt+mt)*et+qt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Ht,(zt-St)*et+qt,(Mt-St)*nt+Ht,(zt-mt)*et+qt,(Mt-mt)*nt+Ht,(zt-St)*et+qt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-St+mt*.5)*nt+Ht,zt*et+qt,Mt*nt+Ht,(zt-St)*et+qt,(Mt-St+mt*.5)*nt+Ht,(zt-mt)*et+qt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Ht,(zt+St)*et+qt,(Mt-St+mt*.5)*nt+Ht,(zt+mt)*et+qt,Mt*nt+Ht,(zt+St)*et+qt).close()),mt=se*.2,St=.2,Mt=.5,zt=.5;var ge=new go.PathFigure((Mt-St)*nt+Ht,zt*et+qt,!0);ct.add(ge),ge.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Ht,(zt-St)*et+qt,(Mt-St)*nt+Ht,(zt-mt)*et+qt,(Mt-mt)*nt+Ht,(zt-St)*et+qt)),ge.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+St)*nt+Ht,zt*et+qt,(Mt+mt)*nt+Ht,(zt-St)*et+qt,(Mt+St)*nt+Ht,(zt-mt)*et+qt)),ge.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Ht,(zt+St)*et+qt,(Mt+St)*nt+Ht,(zt+mt)*et+qt,(Mt+mt)*nt+Ht,(zt+St)*et+qt)),ge.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-St)*nt+Ht,zt*et+qt,(Mt-mt)*nt+Ht,(zt+St)*et+qt,(Mt-St)*nt+Ht,(zt+mt)*et+qt)),mt=se*.4,St=.4,Mt=.8,zt=.5;var he=new go.PathFigure(Mt*nt+Ht,(zt-St)*et+qt,!0);ct.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+St)*nt+Ht,zt*et+qt,(Mt+mt)*nt+Ht,(zt-St)*et+qt,(Mt+St)*nt+Ht,(zt-mt)*et+qt)),he.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Ht,(zt+St)*et+qt,(Mt+St)*nt+Ht,(zt+mt)*et+qt,(Mt+mt)*nt+Ht,(zt+St)*et+qt)),he.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+St-mt*.5)*nt+Ht,zt*et+qt,Mt*nt+Ht,(zt+St)*et+qt,(Mt+St-mt*.5)*nt+Ht,(zt+mt)*et+qt)),he.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Ht,(zt-St)*et+qt,(Mt+St-mt*.5)*nt+Ht,(zt-mt)*et+qt,Mt*nt+Ht,(zt-St)*et+qt).close()),mt=se*.8,St=.8,Mt=1,zt=.5;var Fe=new go.PathFigure(Mt*nt+Ht,(zt-St)*et+qt,!0);return ct.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+St)*nt+Ht,zt*et+qt,(Mt+mt)*nt+Ht,(zt-St)*et+qt,(Mt+St)*nt+Ht,(zt-mt)*et+qt)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Ht,(zt+St)*et+qt,(Mt+St)*nt+Ht,(zt+mt)*et+qt,(Mt+mt)*nt+Ht,(zt+St)*et+qt)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+St-mt*.5)*nt+Ht,zt*et+qt,Mt*nt+Ht,(zt+St)*et+qt,(Mt+St-mt*.5)*nt+Ht,(zt+mt)*et+qt)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Ht,(zt-St)*et+qt,(Mt+St-mt*.5)*nt+Ht,(zt-mt)*et+qt,Mt*nt+Ht,(zt-St)*et+qt).close()),ct}),go.Shape.defineFigureGenerator("Email",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);ct.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 ct.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)),ct}),go.Shape.defineFigureGenerator("Ethernet",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.35*nt,0,!0);ct.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);ct.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);ct.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 St=new go.PathFigure(0,.5*et,!1);return ct.add(St),St.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),St.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.5*et)),St.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),St.add(new go.PathSegment(go.PathSegment.Move,.75*nt,.5*et)),St.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.6*et)),St.add(new go.PathSegment(go.PathSegment.Move,.25*nt,.5*et)),St.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.6*et)),ct}),go.Shape.defineFigureGenerator("Power",function(bt,nt,et){var ct=new go.Geometry,lt=se*.4,gt=.4,mt=.5,St=.5,Mt=Dt(),zt=Dt(),Ht=Dt(),qt=Dt();xe(mt,St-gt,mt+lt,St-gt,mt+gt,St-lt,mt+gt,St,.5,Mt,Mt,zt,Ht,qt);var jt=Ot(zt.x,zt.y),Jt=new go.PathFigure(zt.x*nt,zt.y*et,!0);ct.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,St*et,Ht.x*nt,Ht.y*et,qt.x*nt,qt.y*et)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(St+gt)*et,(mt+gt)*nt,(St+lt)*et,(mt+lt)*nt,(St+gt)*et)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-gt)*nt,St*et,(mt-lt)*nt,(St+gt)*et,(mt-gt)*nt,(St+lt)*et)),xe(mt-gt,St,mt-gt,St-lt,mt-lt,St-gt,mt,St-gt,.5,Ht,qt,zt,Mt,Mt),Jt.add(new go.PathSegment(go.PathSegment.Bezier,zt.x*nt,zt.y*et,Ht.x*nt,Ht.y*et,qt.x*nt,qt.y*et)),lt=se*.3,gt=.3,xe(mt-gt,St,mt-gt,St-lt,mt-lt,St-gt,mt,St-gt,.5,Ht,qt,zt,Mt,Mt),Jt.add(new go.PathSegment(go.PathSegment.Line,zt.x*nt,zt.y*et)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-gt)*nt,St*et,qt.x*nt,qt.y*et,Ht.x*nt,Ht.y*et)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(St+gt)*et,(mt-gt)*nt,(St+lt)*et,(mt-lt)*nt,(St+gt)*et)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,St*et,(mt+lt)*nt,(St+gt)*et,(mt+gt)*nt,(St+lt)*et)),xe(mt,St-gt,mt+lt,St-gt,mt+gt,St-lt,mt+gt,St,.5,Mt,Mt,zt,Ht,qt),Jt.add(new go.PathSegment(go.PathSegment.Bezier,zt.x*nt,zt.y*et,qt.x*nt,qt.y*et,Ht.x*nt,Ht.y*et).close());var Jt=new go.PathFigure(.45*nt,0,!0);return ct.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.5*et)),Jt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.5*et)),Jt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,0).close()),ee(Mt),ee(zt),ee(Ht),ee(qt),ee(jt),ct.spot1=new go.Spot(.25,.45),ct.spot2=new go.Spot(.75,.8),ct}),go.Shape.defineFigureGenerator("Fallout",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,et/2,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,180,360,nt/2,et/2,nt/2,et/2));function gt(mt,St,Mt){mt.add(new go.PathSegment(go.PathSegment.Move,(.3+St)*nt,(.8+Mt)*et)),mt.add(new go.PathSegment(go.PathSegment.Line,(.5+St)*nt,(.5+Mt)*et)),mt.add(new go.PathSegment(go.PathSegment.Line,(.1+St)*nt,(.5+Mt)*et)),mt.add(new go.PathSegment(go.PathSegment.Line,(.3+St)*nt,(.8+Mt)*et).close())}return gt(lt,0,0),gt(lt,.4,0),gt(lt,.2,-.3),ct}),go.Shape.defineFigureGenerator("IrritationHazard",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.2*nt,0,!0);return ct.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()),ct.spot1=new go.Spot(.3,.3),ct.spot2=new go.Spot(.7,.7),ct}),go.Shape.defineFigureGenerator("ElectricalHazard",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.37*nt,0,!0);return ct.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()),ct}),go.Shape.defineFigureGenerator("FireHazard",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.1*nt,et,!0);return ct.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()),ct.spot1=new go.Spot(.07,.445),ct.spot2=new go.Spot(.884,.958),ct}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(bt,nt,et){var ct=new go.Geometry,lt=.5,gt=0,mt=0,St=lt*se,Mt=.4*Math.SQRT2/2+.5,zt=.5-.5*Math.SQRT2/2,Ht=1,qt=.5,jt=.5,Jt=0,ge=new go.PathFigure(Mt*nt,(1-zt)*et,!1);return ct.add(ge),ge.add(new go.PathSegment(go.PathSegment.Bezier,Ht*nt,qt*et,Ht*nt,.7*et,Ht*nt,qt*et)),ge.add(new go.PathSegment(go.PathSegment.Bezier,(jt+gt)*nt,(Jt+gt)*et,(.5+lt+gt)*nt,(.5-St+gt)*et,(.5+St+gt)*nt,(.5-lt+gt)*et)),ge.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+gt)*nt,(.5+mt)*et,(.5-St+gt)*nt,(.5-lt+mt)*et,(.5-lt+gt)*nt,(.5-St+mt)*et)),ge.add(new go.PathSegment(go.PathSegment.Bezier,(.35+gt)*nt,.9*et,(.5-lt+gt)*nt,(.5+St+mt)*et,(.5-St+gt)*nt,.9*et)),ge.add(new go.PathSegment(go.PathSegment.Move,(.25+gt)*nt,.8*et)),ge.add(new go.PathSegment(go.PathSegment.Line,(.35+gt)*nt,.9*et)),ge.add(new go.PathSegment(go.PathSegment.Line,(.2+gt)*nt,.95*et)),ct}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ct.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)),ct}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ct.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)),ct}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);ct.add(lt);var gt=new go.PathFigure(nt,et,!1);ct.add(gt);var mt=new go.PathFigure(0,.5*et,!1);return ct.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)),ct}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.5*et,!0);return ct.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()),ct}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.2*et,!0);ct.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 ct.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)),ct}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.7*nt,et,!0);ct.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 ct.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)),ct}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);ct.add(lt);var gt=new go.PathFigure(.335*nt,(1-.555)*et,!0);ct.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,St=.5,Mt=mt,zt=Math.PI/4,Ht=4*(1-Math.cos(zt))/(3*Math.sin(zt)),qt=Ht*.5,jt=mt,Jt=mt,ge=Ht*jt,he=Ht*Jt;gt.add(new go.PathSegment(go.PathSegment.Bezier,(St-jt)*nt,Mt*et,(St-(ge+jt)/2)*nt,(Mt+(Jt+he)/2)*et,(St-jt)*nt,(Mt+he)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,St*nt,(Mt-Jt)*et,(St-jt)*nt,(Mt-he)*et,(St-ge)*nt,(Mt-Jt)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(St+jt)*nt,Mt*et,(St+ge)*nt,(Mt-Jt)*et,(St+jt)*nt,(Mt-he)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*nt,(1-.595)*et,(St+jt)*nt,(Mt+he)*et,(St+(ge+jt)/2)*nt,(Mt+(Jt+he)/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);ct.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.8*et));var Re=new go.PathFigure(.8*nt,et,!1);return ct.add(Re),Re.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.8*et)),ct}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.1*nt,0,!0);ct.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 ct.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)),ct}),go.Shape.defineFigureGenerator("BpmnEventError",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,et,!0);return ct.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()),ct}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);ct.add(lt);var gt=new go.PathFigure(nt,et,!1);ct.add(gt);var mt=new go.PathFigure(.1*nt,et,!0);return ct.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()),ct}),go.Shape.defineFigureGenerator("Caution",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.05*nt,et,!0);ct.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)),ct}),go.Shape.defineFigureGenerator("Recycle",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.45*nt,.95*et,!1);ct.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);ct.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 ct.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)),ct}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(bt,nt,et){var ct=new go.Geometry,lt=.5,gt=se*.5,mt=new go.PathFigure(nt,lt*et,!0);ct.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 St=new go.PathFigure(lt*nt,0,!1);return ct.add(St),St.add(new go.PathSegment(go.PathSegment.Line,lt*nt,.15*et)),St.add(new go.PathSegment(go.PathSegment.Move,lt*nt,et)),St.add(new go.PathSegment(go.PathSegment.Line,lt*nt,.85*et)),St.add(new go.PathSegment(go.PathSegment.Move,0,lt*et)),St.add(new go.PathSegment(go.PathSegment.Line,.15*nt,lt*et)),St.add(new go.PathSegment(go.PathSegment.Move,nt,lt*et)),St.add(new go.PathSegment(go.PathSegment.Line,.85*nt,lt*et)),St.add(new go.PathSegment(go.PathSegment.Move,lt*nt,lt*et)),St.add(new go.PathSegment(go.PathSegment.Line,.58*nt,.1*et)),St.add(new go.PathSegment(go.PathSegment.Move,lt*nt,lt*et)),St.add(new go.PathSegment(go.PathSegment.Line,.78*nt,.54*et)),ct}),go.Shape.defineFigureGenerator("Package",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.15*et,!0);ct.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 ct.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()),ct.spot1=new go.Spot(0,.1),ct.spot2=new go.Spot(1,1),ct}),go.Shape.defineFigureGenerator("Class",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);ct.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);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et).close());var mt=new go.PathFigure(0,.5*et,!1);return ct.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et).close()),ct}),go.Shape.defineFigureGenerator("Component",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt,et,!0);ct.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);ct.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 ct.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()),ct}),go.Shape.defineFigureGenerator("Boat Shipment",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.15*nt,.6*et,!0);ct.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 ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),ct}),go.Shape.defineFigureGenerator("Customer/Supplier",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt,et,!0);return ct.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()),ct}),go.Shape.defineFigureGenerator("Workcell",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,et,!0);return ct.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()),ct}),go.Shape.defineFigureGenerator("Supermarket",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ct.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)),ct}),go.Shape.defineFigureGenerator("TruckShipment",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);ct.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);ct.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,St=se*.1,Mt=.2,zt=.9,Ht=new go.PathFigure((Mt-mt)*nt,zt*et,!0);ct.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(zt-mt)*et,(Mt-mt)*nt,(zt-St)*et,(Mt-St)*nt,(zt-mt)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+mt)*nt,zt*et,(Mt+St)*nt,(zt-mt)*et,(Mt+mt)*nt,(zt-St)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(zt+mt)*et,(Mt+mt)*nt,(zt+St)*et,(Mt+St)*nt,(zt+mt)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-mt)*nt,zt*et,(Mt-St)*nt,(zt+mt)*et,(Mt-mt)*nt,(zt+St)*et).close()),mt=.1,St=se*.1,Mt=.8,zt=.9;var qt=new go.PathFigure((Mt-mt)*nt,zt*et,!0);return ct.add(qt),qt.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(zt-mt)*et,(Mt-mt)*nt,(zt-St)*et,(Mt-St)*nt,(zt-mt)*et)),qt.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+mt)*nt,zt*et,(Mt+St)*nt,(zt-mt)*et,(Mt+mt)*nt,(zt-St)*et)),qt.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(zt+mt)*et,(Mt+mt)*nt,(zt+St)*et,(Mt+St)*nt,(zt+mt)*et)),qt.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-mt)*nt,zt*et,(Mt-St)*nt,(zt+mt)*et,(Mt-mt)*nt,(zt+St)*et).close()),ct}),go.Shape.defineFigureGenerator("KanbanPost",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.2*nt,0,!1);return ct.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)),ct}),go.Shape.defineFigureGenerator("Forklift",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);ct.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);ct.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);ct.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 St=new go.PathFigure(.5*nt,.7*et,!1);ct.add(St),St.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et));var Mt=.1,zt=se*.1,Ht=.1,qt=.9,jt=new go.PathFigure((Ht-Mt)*nt,qt*et,!0);ct.add(jt),jt.add(new go.PathSegment(go.PathSegment.Bezier,Ht*nt,(qt-Mt)*et,(Ht-Mt)*nt,(qt-zt)*et,(Ht-zt)*nt,(qt-Mt)*et)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(Ht+Mt)*nt,qt*et,(Ht+zt)*nt,(qt-Mt)*et,(Ht+Mt)*nt,(qt-zt)*et)),jt.add(new go.PathSegment(go.PathSegment.Bezier,Ht*nt,(qt+Mt)*et,(Ht+Mt)*nt,(qt+zt)*et,(Ht+zt)*nt,(qt+Mt)*et)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(Ht-Mt)*nt,qt*et,(Ht-zt)*nt,(qt+Mt)*et,(Ht-Mt)*nt,(qt+zt)*et)),Mt=.1,zt=se*.1,Ht=.4,qt=.9;var Jt=new go.PathFigure((Ht-Mt)*nt,qt*et,!0);return ct.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Bezier,Ht*nt,(qt-Mt)*et,(Ht-Mt)*nt,(qt-zt)*et,(Ht-zt)*nt,(qt-Mt)*et)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(Ht+Mt)*nt,qt*et,(Ht+zt)*nt,(qt-Mt)*et,(Ht+Mt)*nt,(qt-zt)*et)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,Ht*nt,(qt+Mt)*et,(Ht+Mt)*nt,(qt+zt)*et,(Ht+zt)*nt,(qt+Mt)*et)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(Ht-Mt)*nt,qt*et,(Ht-zt)*nt,(qt+Mt)*et,(Ht-Mt)*nt,(qt+zt)*et)),ct}),go.Shape.defineFigureGenerator("RailShipment",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.1*nt,.4*et,!0);ct.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);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.7*et));var mt=new go.PathFigure(.55*nt,.4*et,!0);ct.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 Ht=.05,qt=se*.05,jt=.175,Jt=.95,St=new go.PathFigure((jt-Ht)*nt,Jt*et,!0);ct.add(St),St.add(new go.PathSegment(go.PathSegment.Bezier,jt*nt,(Jt-Ht)*et,(jt-Ht)*nt,(Jt-qt)*et,(jt-qt)*nt,(Jt-Ht)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,(jt+Ht)*nt,Jt*et,(jt+qt)*nt,(Jt-Ht)*et,(jt+Ht)*nt,(Jt-qt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,jt*nt,(Jt+Ht)*et,(jt+Ht)*nt,(Jt+qt)*et,(jt+qt)*nt,(Jt+Ht)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,(jt-Ht)*nt,Jt*et,(jt-qt)*nt,(Jt+Ht)*et,(jt-Ht)*nt,(Jt+qt)*et));var Ht=.05,qt=se*.05,jt=.375,Jt=.95,Mt=new go.PathFigure((jt-Ht)*nt,Jt*et,!0);ct.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,jt*nt,(Jt-Ht)*et,(jt-Ht)*nt,(Jt-qt)*et,(jt-qt)*nt,(Jt-Ht)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(jt+Ht)*nt,Jt*et,(jt+qt)*nt,(Jt-Ht)*et,(jt+Ht)*nt,(Jt-qt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,jt*nt,(Jt+Ht)*et,(jt+Ht)*nt,(Jt+qt)*et,(jt+qt)*nt,(Jt+Ht)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(jt-Ht)*nt,Jt*et,(jt-qt)*nt,(Jt+Ht)*et,(jt-Ht)*nt,(Jt+qt)*et));var Ht=.05,qt=se*.05,jt=.625,Jt=.95,zt=new go.PathFigure((jt-Ht)*nt,Jt*et,!0);ct.add(zt),zt.add(new go.PathSegment(go.PathSegment.Bezier,jt*nt,(Jt-Ht)*et,(jt-Ht)*nt,(Jt-qt)*et,(jt-qt)*nt,(Jt-Ht)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(jt+Ht)*nt,Jt*et,(jt+qt)*nt,(Jt-Ht)*et,(jt+Ht)*nt,(Jt-qt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,jt*nt,(Jt+Ht)*et,(jt+Ht)*nt,(Jt+qt)*et,(jt+qt)*nt,(Jt+Ht)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(jt-Ht)*nt,Jt*et,(jt-qt)*nt,(Jt+Ht)*et,(jt-Ht)*nt,(Jt+qt)*et));var Ht=.05,qt=se*.05,jt=.825,Jt=.95,ge=new go.PathFigure((jt-Ht)*nt,Jt*et,!0);ct.add(ge),ge.add(new go.PathSegment(go.PathSegment.Bezier,jt*nt,(Jt-Ht)*et,(jt-Ht)*nt,(Jt-qt)*et,(jt-qt)*nt,(Jt-Ht)*et)),ge.add(new go.PathSegment(go.PathSegment.Bezier,(jt+Ht)*nt,Jt*et,(jt+qt)*nt,(Jt-Ht)*et,(jt+Ht)*nt,(Jt-qt)*et)),ge.add(new go.PathSegment(go.PathSegment.Bezier,jt*nt,(Jt+Ht)*et,(jt+Ht)*nt,(Jt+qt)*et,(jt+qt)*nt,(Jt+Ht)*et)),ge.add(new go.PathSegment(go.PathSegment.Bezier,(jt-Ht)*nt,Jt*et,(jt-qt)*nt,(Jt+Ht)*et,(jt-Ht)*nt,(Jt+qt)*et).close());var he=new go.PathFigure(0,et,!1);return ct.add(he),he.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),ct}),go.Shape.defineFigureGenerator("Warehouse",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);ct.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);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et).close());var mt=new go.PathFigure(.15*nt,et,!0);ct.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 St=.05,Mt=se*.05,zt=.35,Ht=.775,qt=new go.PathFigure((zt-St)*nt,Ht*et,!0);return ct.add(qt),qt.add(new go.PathSegment(go.PathSegment.Bezier,zt*nt,(Ht-St)*et,(zt-St)*nt,(Ht-Mt)*et,(zt-Mt)*nt,(Ht-St)*et)),qt.add(new go.PathSegment(go.PathSegment.Bezier,(zt+St)*nt,Ht*et,(zt+Mt)*nt,(Ht-St)*et,(zt+St)*nt,(Ht-Mt)*et)),qt.add(new go.PathSegment(go.PathSegment.Bezier,zt*nt,(Ht+St)*et,(zt+St)*nt,(Ht+Mt)*et,(zt+Mt)*nt,(Ht+St)*et)),qt.add(new go.PathSegment(go.PathSegment.Bezier,(zt-St)*nt,Ht*et,(zt-Mt)*nt,(Ht+St)*et,(zt-St)*nt,(Ht+Mt)*et).close()),ct}),go.Shape.defineFigureGenerator("ControlCenter",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,et,!0);return ct.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()),ct}),go.Shape.defineFigureGenerator("Bluetooth",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.75*et,!1);return ct.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)),ct}),go.Shape.defineFigureGenerator("Bookmark",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ct.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)),ct}),go.Shape.defineFigureGenerator("Bookmark",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ct.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)),ct}),go.Shape.defineFigureGenerator("Globe",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!1);return ct.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)),ct}),go.Shape.defineFigureGenerator("Wave",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.25*et,!1);return ct.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)),ct}),go.Shape.defineFigureGenerator("Operator",function(bt,nt,et){var ct=new go.Geometry,lt=.3,gt=se*.3,mt=.5,St=.7,Mt=new go.PathFigure((mt-lt)*nt,St*et,!0);ct.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(St-lt)*et,(mt-lt)*nt,(St-gt)*et,(mt-gt)*nt,(St-lt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+lt)*nt,St*et,(mt+gt)*nt,(St-lt)*et,(mt+lt)*nt,(St-gt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(St+lt)*et,(mt+lt)*nt,(St+gt)*et,(mt+gt)*nt,(St+lt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-lt)*nt,St*et,(mt-gt)*nt,(St+lt)*et,(mt-lt)*nt,(St+gt)*et));var zt=new go.PathFigure(0,.7*et,!1);return ct.add(zt),zt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.7*et,0,0,nt,0)),ct}),go.Shape.defineFigureGenerator("TripleFanBlades",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!0);return ct.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)),ct}),go.Shape.defineFigureGenerator("CentrifugalPump",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt,0,!0);return ct.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)),ct}),go.Shape.defineFigureGenerator("Battery",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,et,!0);ct.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 ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Move,0,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),ct}),go.Shape.defineFigureGenerator("Delete",function(bt,nt,et){var ct=new go.Geometry,lt=.5,gt=se*.5,mt=.5,St=.5,Mt=new go.PathFigure((mt-lt)*nt,St*et,!0);ct.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(St-lt)*et,(mt-lt)*nt,(St-gt)*et,(mt-gt)*nt,(St-lt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+lt)*nt,St*et,(mt+gt)*nt,(St-lt)*et,(mt+lt)*nt,(St-gt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(St+lt)*et,(mt+lt)*nt,(St+gt)*et,(mt+gt)*nt,(St+lt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-lt)*nt,St*et,(mt-gt)*nt,(St+lt)*et,(mt-lt)*nt,(St+gt)*et));var zt=new go.PathFigure(.15*nt,.5*et,!1);return ct.add(zt),zt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.5*et)),ct}),go.Shape.defineFigureGenerator("Flag",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.1*et,!0);return ct.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()),ct}),go.Shape.defineFigureGenerator("Help",function(bt,nt,et){var ct=new go.Geometry,lt=.5,gt=se*.5,mt=.5,St=.5,Mt=new go.PathFigure((mt-lt)*nt,St*et,!1);ct.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(St-lt)*et,(mt-lt)*nt,(St-gt)*et,(mt-gt)*nt,(St-lt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+lt)*nt,St*et,(mt+gt)*nt,(St-lt)*et,(mt+lt)*nt,(St-gt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(St+lt)*et,(mt+lt)*nt,(St+gt)*et,(mt+gt)*nt,(St+lt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-lt)*nt,St*et,(mt-gt)*nt,(St+lt)*et,(mt-lt)*nt,(St+gt)*et).close()),lt=.05,gt=se*.05,mt=.5,St=.8;var zt=new go.PathFigure((mt-lt)*nt,St*et,!1);return ct.add(zt),zt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(St-lt)*et,(mt-lt)*nt,(St-gt)*et,(mt-gt)*nt,(St-lt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+lt)*nt,St*et,(mt+gt)*nt,(St-lt)*et,(mt+lt)*nt,(St-gt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(St+lt)*et,(mt+lt)*nt,(St+gt)*et,(mt+gt)*nt,(St+lt)*et)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-lt)*nt,St*et,(mt-gt)*nt,(St+lt)*et,(mt-lt)*nt,(St+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)),ct}),go.Shape.defineFigureGenerator("Location",function(bt,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(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.5*et,!0);ct.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 ct.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)),ct}),go.Shape.defineFigureGenerator("Unlocked",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.5*et,!0);ct.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 ct.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)),ct}),go.Shape.defineFigureGenerator("Gear",function(bt,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(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.5*et,!0);return ct.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()),ct}),go.Shape.defineFigureGenerator("Map",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.2*et,!0);return ct.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)),ct}),go.Shape.defineFigureGenerator("Eject",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,et,!0);ct.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 ct.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()),ct}),go.Shape.defineFigureGenerator("Pencil",function(bt,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(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt*1,et*1,!1);ct.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);ct.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);ct.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 St=new go.PathFigure(.678*nt,.85*et,!1);ct.add(St),St.add(new go.PathSegment(go.PathSegment.Line,.678*nt,.45*et)),St.add(new go.PathSegment(go.PathSegment.Line,.874*nt,.45*et)),St.add(new go.PathSegment(go.PathSegment.Line,.874*nt,.85*et).close());var Mt=new go.PathFigure(.5*nt,.1*et,!1);return ct.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*nt,.3*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*nt,.3*et).close()),ct}),go.Shape.defineFigureGenerator("Staircase",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,et*1,!0);return ct.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()),ct}),go.Shape.defineFigureGenerator("5Bars",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,et*1,!0);ct.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);ct.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);ct.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 St=new go.PathFigure(nt*.612,et,!0);ct.add(St),St.add(new go.PathSegment(go.PathSegment.Line,nt*.612,et*(1-.184*3))),St.add(new go.PathSegment(go.PathSegment.Line,nt*.796,et*(1-.184*4))),St.add(new go.PathSegment(go.PathSegment.Line,nt*.796,et*1).close());var Mt=new go.PathFigure(nt*.816,et,!0);return ct.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*.816,et*(1-.184*4))),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-.184*5))),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1).close()),ct}),go.Shape.defineFigureGenerator("PC",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);ct.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);ct.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);ct.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 St=new go.PathFigure(nt*.055,.18*et,!0);ct.add(St),St.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.18)),St.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.21)),St.add(new go.PathSegment(go.PathSegment.Line,nt*.055,et*.21).close());var Mt=new go.PathFigure(nt*1,0,!0);return ct.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,0)),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.65)),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.65).close()),ct}),go.Shape.defineFigureGenerator("Plane",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.55*nt,et,!0);return ct.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()),ct}),go.Shape.defineFigureGenerator("Key",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt*1,et*.5,!0);return ct.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()),ct}),go.Shape.defineFigureGenerator("FilmTape",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);ct.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);ct.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);ct.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 St=new go.PathFigure(nt*(.11+.24133333*1+.028*1),et*.1,!1);ct.add(St),St.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*1),et*.1)),St.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*1),et*.8)),St.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*1+.028*1),et*.8).close());var Mt=new go.PathFigure(nt*(.11+.24133333*2+.028*2),et*.1,!1);return ct.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*3+.028*2),et*.1)),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*3+.028*2),et*.8)),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*2),et*.8).close()),ct}),go.Shape.defineFigureGenerator("FloppyDisk",function(bt,nt,et){var ct=new go.Geometry,lt=8,gt=lt*se,mt=new go.PathFigure(lt,0,!1);ct.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 St=new go.PathFigure(nt*.83,0,!1);ct.add(St),St.add(new go.PathSegment(go.PathSegment.Line,nt*.83,et*.3)),St.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*.3)),St.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*0).close());var Mt=new go.PathFigure(nt*.83,et*1,!1);ct.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*.83,et*.5)),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*.5)),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*1).close());var zt=new go.PathFigure(nt*.78,et*.05,!1);return ct.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()),ct}),go.Shape.defineFigureGenerator("SpeechBubble",function(bt,nt,et){var ct=bt?bt.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=15),ct=Math.min(ct,nt/3),ct=Math.min(ct,et/3);var lt=ct*se,gt=et*.8,mt=new go.Geometry,St=new go.PathFigure(ct,0,!0);return mt.add(St),St.add(new go.PathSegment(go.PathSegment.Line,nt-ct,0)),St.add(new go.PathSegment(go.PathSegment.Bezier,nt,ct,nt-lt,0,nt,lt)),St.add(new go.PathSegment(go.PathSegment.Line,nt,gt-ct)),St.add(new go.PathSegment(go.PathSegment.Bezier,nt-ct,gt,nt,gt-lt,nt-lt,gt)),St.add(new go.PathSegment(go.PathSegment.Line,nt*.7,gt)),St.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et)),St.add(new go.PathSegment(go.PathSegment.Line,nt*.55,gt)),St.add(new go.PathSegment(go.PathSegment.Line,ct,gt)),St.add(new go.PathSegment(go.PathSegment.Bezier,0,gt-ct,lt,gt,0,gt-lt)),St.add(new go.PathSegment(go.PathSegment.Line,0,ct)),St.add(new go.PathSegment(go.PathSegment.Bezier,ct,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(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt*0,et*.45,!0);ct.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 ct.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()),ct}),go.Shape.defineFigureGenerator("Windows",function(bt,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(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt*0,et*.1,!1);ct.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);ct.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 ct.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()),ct}),go.Shape.defineFigureGenerator("Beaker",function(bt,nt,et){var ct=new go.Geometry,lt=15,gt=lt*se,mt=new go.PathFigure(nt*.62,et*.475,!0);return ct.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?(ct.spot1=new go.Spot(0,0,gt,gt),ct.spot2=new go.Spot(1,1,-gt,-gt)):(ct.spot1=go.Spot.TopLeft,ct.spot2=go.Spot.BottomRight),ct}),go.Shape.defineFigureGenerator("Download",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt*0,et*1,!0);ct.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 ct.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()),ct}),go.Shape.defineFigureGenerator("Bin",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt*0,et*1,!0);ct.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()),ct}),go.Shape.defineFigureGenerator("Upload",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt*0,et*1,!0);ct.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 ct.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()),ct}),go.Shape.defineFigureGenerator("EmptyDrink",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt*.15,et*0,!1);return ct.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()),ct}),go.Shape.defineFigureGenerator("Drink",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt*.15,et*0,!1);ct.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 ct.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()),ct}),go.Shape.defineFigureGenerator("4Arrows",function(bt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt*.5,et*0,!0);return ct.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()),ct}),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")},80727: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 zn={},oi="5.0",Ot={},Dt=null,ee=!1,Pe=!1,xe=null,Se=!1,Wt=null,se=null,ze=0;ze<arguments.length;ze++){var ye=arguments[ze];if(ye!==null)switch(typeof ye){case"number":oi=ye.toFixed(1);break;case"string":ye.match(new RegExp("^[0-9]\\.[0-9]+$"))?oi=ye:xe=ye;break;case"object":typeof ye.is3D!="undefined"?Dt=ye:Ot=ye;break;case"boolean":ee=ye,Pe=!0;break}}Dt===null&&(Dt={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},Ot.material_id!==void 0&&!Pe&&(ee=!0)),xe!==null&&Ot.id===void 0&&(Ot.id=xe);var Nt="",We="",ie=!1,Ne=null,bt=null,nt=null,et=!1,ct=null,lt=null,gt=null,mt=null,St=null;Ot.height!==void 0&&(Ot.height=Math.round(Ot.height)),Ot.width!==void 0&&(Ot.width=Math.round(Ot.width));var Mt=function(Be){return parseFloat(Be)>4?parseFloat(Be):5};zn.setHTML5Codebase=function(Be,vn){se=Be,Ue(Be,vn)},zn.setJavaCodebase=zn.setJavaCodebaseVersion=zn.isCompiledInstalled=zn.setPreCompiledScriptPath=zn.setPreCompiledResourcePath=function(){},zn.setHTML5CodebaseVersion=function(Be,vn){var Je=parseFloat(Be);if(Je!==NaN&&Je<5){console.log("The GeoGebra HTML5 codebase version "+Je+" is deprecated. Using version latest instead.");return}Wt=Be,Xt(Be,vn)},zn.getHTML5CodebaseVersion=function(){return bt},zn.getParameters=function(){return Ot},zn.setFontsCSSURL=function(Be){mt=Be},zn.setGiacJSURL=function(Be){},zn.setJNLPFile=function(Be){Nt=Be},zn.setJNLPBaseDir=function(Be){},zn.inject=function(){function Be(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var vn="auto",Je=Ot.id,An,we=!1,sn=0;sn<arguments.length;sn++){var ce=arguments[sn];typeof ce=="string"?(ce=ce.toLowerCase(),ce.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?vn=ce:Je=arguments[sn]):typeof ce=="boolean"?we=ce:ce instanceof HTMLElement&&(An=ce)}Nn();function Nn(){if(!Se){setTimeout(Nn,200);return}vn=nn(vn);var Ci=An||document.getElementById(Je);if(!Ci){console.log("possibly bug on ajax loading? ");return}if(zn.removeExistingApplet(Ci,!1),Ot.width===void 0&&Ci.clientWidth&&(Ot.width=Ci.clientWidth),Ot.height===void 0&&Ci.clientHeight&&(Ot.height=Ci.clientHeight),!(Ot.width&&Ot.height)&&vn==="html5"&&(delete Ot.width,delete Ot.height),Ne=vn,vn==="screenshot")Re(Ci,Ot);else{var It=!1;Ot.hasOwnProperty("playButton")&&Ot.playButton||Ot.hasOwnProperty("clickToLoad")&&Ot.clickToLoad?It=!0:Ot.hasOwnProperty("playButtonAutoDecide")&&Ot.playButtonAutoDecide&&(It=(!zt()||Be())&&Ht()),It?(Ne="screenshot",Mn(Ci,Ot,we,vn)):Fe(Ci,Ot,we)}}};function zt(){try{return window.self!==window.top}catch(Be){return!0}}function Ht(){return Ot.hasOwnProperty("screenshotGenerator")&&Ot.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}zn.getViews=function(){return Dt},zn.isJavaInstalled=function(){return!1};var qt=function(Be){var vn=function(sn){var ce=JSON.parse(sn),Nn=function(wt){return wt.type=="G"||wt.type=="E"},Ci=ce.elements?ce.elements.filter(Nn)[0]:ce;if(!Ci||!Ci.url){Je();return}Ot.fileName=Ci.url,jt(Ci.settings||{}),Dt.is3D=!0;var It="https://www.geogebra.org/images/";zn.setPreviewImage(ct||Ci.previewUrl,It+"GeoGebra_loading.png",It+"applet_play.png"),Be()},Je=function(){Ot.onError&&Ot.onError(),Pn("Error: Fetching material (id "+Ot.material_id+") failed.",Ot)},An=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",we="/materials/"+Ot.material_id+"?scope=basic";Jt("https://"+An+"/api/proxy.php?path="+encodeURIComponent(we),vn,Je)};function jt(Be){var vn=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Je){Be[Je]=!!Be[Je]}),vn.forEach(function(Je){Ot[Je]===void 0&&Be[Je]!==void 0&&(Ot[Je]=Be[Je])}),Ot.showToolBarHelp===void 0&&(Ot.showToolBarHelp=Ot.showToolBar)}function Jt(Be,vn,Je){var An=new XMLHttpRequest;An.open("GET",Be),An.onload=function(){vn(An.responseText)},An.onerror=Je,An.send()}zn.isHTML5Installed=function(){return!0},zn.getLoadedAppletType=function(){return Ne},zn.setPreviewImage=function(Be,vn,Je){ct=Be,lt=vn,gt=Je},zn.removeExistingApplet=function(Be,vn){var Je;typeof Be=="string"&&(Be=document.getElementById(Be)),Ne=null;var An=null;for(Je=0;Je<Be.childNodes.length;Je++){var we=Be.childNodes[Je],sn=we.className;sn==="applet_screenshot"?vn?(we.style.display="block",Ne="screenshot"):we.style.display="none":sn!=="applet_scaler prerender"&&(Be.removeChild(we),An=sn&&sn.indexOf("appletParameters")!=-1?we.id:null,Je--)}var ce=Ot.id!==void 0?Ot.id:An,Nn=window[ce];Nn&&typeof Nn.getBase64=="function"&&(Nn.remove(),window[ce]=null)},zn.refreshHitPoints=function(){if(Mt(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Be=zn.getAppletObject();return Be&&typeof Be.recalculateEnvironments=="function"?(Be.recalculateEnvironments(),!0):!1},zn.startAnimation=function(){var Be=zn.getAppletObject();return Be&&typeof Be.startAnimation=="function"?(Be.startAnimation(),!0):!1},zn.stopAnimation=function(){var Be=zn.getAppletObject();return Be&&typeof Be.stopAnimation=="function"?(Be.stopAnimation(),!0):!1},zn.getAppletObject=function(){var Be=Ot.id!==void 0?Ot.id:"ggbApplet";return window[Be]},zn.resize=function(){};var ge=function(Be,vn,Je){var An=document.createElement("param");An.setAttribute("name",vn),An.setAttribute("value",Je),Be.appendChild(An)},he=function(Be){return Be&&Be!=="false"},Fe=function(Be,vn,Je){Mt(bt)<=4.2&&(Je=!0);var An=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==bt||ggbHTML5LoadedCodebaseIsWebSimple&&!et)&&(An=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var we=document.createElement("div");we.classList.add("appletParameters","notranslate");var sn=vn.width,ce=vn.height;if(vn.disableAutoScale=vn.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():vn.disableAutoScale,vn.width!==void 0)if(Mt(bt)<=4.4)he(vn.showToolBar)&&(vn.height-=7),he(vn.showAlgebraInput)&&(vn.height-=37),vn.width<605&&he(vn.showToolBar)&&(vn.width=605,sn=605);else{var Nn=100;(he(vn.showToolBar)||he(vn.showMenuBar))&&(vn.hasOwnProperty("customToolBar")&&(vn.customToolbar=vn.customToolBar),Nn=he(vn.showMenuBar)?245:155),sn<Nn&&(vn.width=Nn,sn=Nn)}we.style.border="none",we.style.display="inline-block";for(var Ci in vn)vn.hasOwnProperty(Ci)&&Ci!=="appletOnLoad"&&we.setAttribute("data-param-"+Ci,vn[Ci]);mt&&we.setAttribute("data-param-fontscssurl",mt),zn.resize=function(){GGBAppletUtils.responsiveResize(Be,vn)},window.addEventListener("resize",function(Ee){zn.resize()});var It=typeof vn.appletOnLoad=="function"?vn.appletOnLoad:function(){};if(!Je&&vn.width!==void 0){vn.hasOwnProperty("showSplash")||we.setAttribute("data-param-showSplash","false");var wt=Be.querySelector(".applet_scaler.prerender"),xt=wt!==null;if(xt)var Ft=wt.querySelector(".ggb_preview");else{var Ft=rn(sn,ce,vn.borderColor,!1);wt=document.createElement("div"),wt.className="applet_scaler",wt.style.position="relative",wt.style.display="block",wt.style.width=sn+"px",wt.style.height=ce+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(wt,"66%"),Mt(bt)>=5?(vn.appletOnLoad=function(Ee){var Ge=Be.querySelector(".ggb_preview");Ge&&Ge.parentNode.removeChild(Ge),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(wt),window.GGBT_wsf_view&&$(window).trigger("resize"),It(Ee)},xt||wt.appendChild(Ft)):we.appendChild(Ft),wt.appendChild(we),xt||Be.appendChild(wt),setTimeout(function(){zn.resize()},1)}else{var Gt=document.createElement("div");Gt.className="applet_scaler",Gt.style.position="relative",Gt.style.display="block",Gt.appendChild(we),Be.appendChild(Gt),vn.appletOnLoad=function(Ee){zn.resize(),It(Ee)}}function kt(Ee,Ge){Ge&&typeof Ge.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Ee,Ge.appletOnLoad):renderGGBElement(Ee),Pn("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Ge)}function Yt(Ee,Ge){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Ee,params:Ge}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(kn){kt(kn.article,kn.params)}),html5AppletsToProcess=null)},Mt(bt)<5&&(Ee.className+=" geogebraweb")):kt(Ee,Ge)}if(An){scriptLoadStarted=!0;for(var pe=0;pe<we.childNodes.length;pe++){var Le=we.childNodes[pe].tagName;Le==="TABLE"&&(we.removeChild(we.childNodes[pe]),pe--)}if(ggbHTML5LoadedScript!==null){var on=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');on!=null&&on.parentNode.removeChild(on)}var ve=document.createElement("script"),Ae=function(){Yt(we,vn)};ve.src=We+nt,ggbHTML5LoadedCodebaseIsWebSimple=et,ggbHTML5LoadedCodebaseVersion=bt,ggbHTML5LoadedScript=ve.src,Pn("GeoGebra HTML5 codebase loaded: '"+We+"'.",vn),!se&&(!Wt||Wt=="5.0")?(et?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Ae()):We.requirejs?__webpack_require__.e(4184).then(function(){var Ee=[__webpack_require__(74620)];Ae.apply(null,Ee)}.bind(this)).catch(__webpack_require__.oe):(ve.onload=Ae,Be.appendChild(ve))}else Yt(we,vn);vn.height=ce,vn.width=sn},Re=function(Be,vn,Je){var An=rn(vn.width,vn.height,vn.borderColor,Je),we=document.createElement("div");we.style.position="relative",we.style.display="block",we.style.width=vn.width+"px",we.style.height=vn.height+"px",we.className="applet_screenshot applet_scaler"+(Je?" applet_screenshot_play":""),we.appendChild(An);var sn=GGBAppletUtils.getScale(vn,Be,Je);Je?(Be.appendChild(tn()),window.GGBT_wsf_view||(Be.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(we,"66%"),Be.appendChild(we),sn!==1&&!isNaN(sn)&&(GGBAppletUtils.scaleElement(we,sn),we.style.width=vn.width+"px",we.style.height=vn.height+"px",we.parentNode.style.width=vn.width*sn+"px",we.parentNode.style.height=vn.height*sn+"px"),zn.resize=function(){Ke(Be,An,we,Je)},window.addEventListener("resize",function(ce){zn.resize()}),zn.resize()};function Ke(Be,vn,Je,An){if(Be.contains(vn)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Be.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Be)}var we=GGBAppletUtils.getScale(Ot,Be,An);Je.parentNode!==null&&(!isNaN(we)&&we!==1?(GGBAppletUtils.scaleElement(Je,we),Je.parentNode.style.width=Ot.width*we+"px",Je.parentNode.style.height=Ot.height*we+"px"):(GGBAppletUtils.scaleElement(Je,1),Je.parentNode.style.width=Ot.width+"px",Je.parentNode.style.height=Ot.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Be),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}zn.onExitFullscreen=function(Be,vn){vn.appendChild(Be)};var Mn=function(Be,vn,Je,An){Re(Be,vn,!0);for(var we=function(){var Nn=[];for(ce=0;ce<Be.childNodes.length;ce++)Nn.push(Be.childNodes[ce]);if(window.GGBT_wsf_view){var Ci=window.GGBT_wsf_view.renderFullScreen(Be,vn.id),It=document.getElementById("fullscreencontainer"),wt=jQuery(Be).find(".fullscreencontent");wt.length>0?(Ci.remove(),wt.attr("id","fullscreencontent").show(),jQuery(It).append(wt),window.dispatchEvent(new Event("resize"))):Fe(Ci,vn,!1),window.GGBT_wsf_view.launchFullScreen(It)}else Ne=An,Fe(Be,vn,!1);if(!window.GGBT_wsf_view)for(ce=0;ce<Nn.length;ce++)Be.removeChild(Nn[ce])},sn=Be.getElementsByClassName("ggb_preview_play"),ce=0;ce<sn.length;ce++)sn[ce].addEventListener("click",we,!1),sn[ce].addEventListener("ontouchstart",we,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Be),Ht()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},tn=function(){var Be=document.createElement("div");if(Be.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var vn='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',Je=document.createElement("style");Je.styleSheet?Je.styleSheet.cssText=vn:Je.appendChild(document.createTextNode(vn)),document.getElementsByTagName("head")[0].appendChild(Je)}return Be},rn=function(Be,vn,Je,An){var we=document.createElement("div");we.className="ggb_preview",we.style.position="absolute",we.style.zIndex="90",we.style.width=Be-2+"px",we.style.height=vn-2+"px",we.style.top="0px",we.style.left="0px",we.style.overflow="hidden",we.style.backgroundColor="white";var sn="lightgrey";Je!==void 0&&(Je==="none"?sn="transparent":sn=Je),we.style.border="1px solid "+sn;var ce=document.createElement("img");if(ce.style.position="relative",ce.style.zIndex="1000",ce.style.top="-1px",ce.style.left="-1px",ct!==null&&ce.setAttribute("src",ct),ce.style.opacity=.7,lt!==null){var Nn,Ci,It;if(!An){Nn=document.createElement("img"),Nn.style.position="absolute",Nn.style.zIndex="1001",Nn.style.opacity=1,ce.style.opacity=.3,Ci=360,Ci>Be/4*3&&(Ci=Be/4*3),It=Ci/5.8,Nn.setAttribute("src",lt),Nn.setAttribute("width",Ci),Nn.setAttribute("height",It);var wt=(Be-Ci)/2,xt=(vn-It)/2;Nn.style.left=wt+"px",Nn.style.top=xt+"px",we.appendChild(Nn)}}return we.appendChild(ce),we},nn=function(Be){return Be=Be.toLowerCase(),Be==="html5"||Be==="screenshot"?Be:"html5"},me=["web","webSimple","web3d","tablet","tablet3d","phone"],Xt=function(Be,vn){if(bt=Be,vn){Ue(bt,!0);return}var Je=!ee;if(Je){var An=Mt(bt);!isNaN(An)&&An<4.4&&(Je=!1)}var we,sn;window.location.protocol.substr(0,4)==="http"?we=window.location.protocol:we="http:";var ce=bt.indexOf("//");ce>0?sn=bt:ce===0?sn=we+bt:sn="https://www.geogebra.org/apps/5.2.814.0/";for(var Nn in me)if(bt.slice(me[Nn].length*-1)===me[Nn]||bt.slice((me[Nn].length+1)*-1)===me[Nn]+"/"){Ue(sn,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Je&&!Dt.is3D&&!Dt.AV&&!Dt.SV&&!Dt.CV&&!Dt.EV2&&!Dt.CP&&!Dt.PC&&!Dt.DA&&!Dt.FI&&!Dt.PV&&!he(Ot.showToolBar)&&!he(Ot.showMenuBar)&&!he(Ot.showAlgebraInput)&&!he(Ot.enableRightClick)&&(!Ot.appName||Ot.appName=="classic")?sn+="webSimple/":sn+="web3d/",Ue(sn,!1)},Ue=function(Be,vn){if(Be.requirejs){We=Be;return}Be.slice(-1)!=="/"&&(Be+="/"),We=Be,vn===null&&(vn=Be.indexOf("http")===-1),ie=vn,nt="web.nocache.js",et=!1;var Je=We.split("/");Je.length>1&&(!vn&&Je[Je.length-2]==="webSimple"?(nt="webSimple.nocache.js",et=!0):me.indexOf(Je[Je.length-2])>=0&&(nt=Je[Je.length-2]+".nocache.js")),Je=Be.split("/"),bt=Je[Je.length-3],bt.substr(0,4)==="test"?bt=bt.substr(4,1)+"."+bt.substr(5,1):(bt.substr(0,3)==="war"||bt.substr(0,4)==="beta")&&(bt="5.0");var An=parseFloat(bt);An!==NaN&&An<5&&Be.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+An+" is deprecated. Using version latest instead."),Xt("5.0",vn))},Pn=function(Be,vn){window.console&&window.console.log&&(!vn||typeof vn.showLogging=="undefined"||vn.showLogging&&vn.showLogging!=="false")&&console.log(Be)};Ot.material_id!==void 0?qt(Yn):Yn();function Yn(){var Be=oi;Wt!==null?Be=Wt:parseFloat(Be)<5&&(Be="5.0"),Xt(Be,!1),se!==null&&Ue(se,ie),Se=!0}return zn},GGBAppletUtils=function(){"use strict";function zn(){return window.GGBT_wsf_edit!==void 0}function oi(Se,Wt){Wt!=1?(Se.style.transformOrigin="0% 0% 0px",Se.style.webkitTransformOrigin="0% 0% 0px",Se.style.transform="scale("+Wt+","+Wt+")",Se.style.webkitTransform="scale("+Wt+","+Wt+")",Se.style.maxWidth="initial",Se.querySelector(".ggb_preview")!==null&&(Se.querySelector(".ggb_preview").style.maxWidth="initial"),Se.querySelectorAll(".ggb_preview img")[0]!==void 0&&(Se.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),Se.querySelectorAll(".ggb_preview img")[1]!==void 0&&(Se.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(Se.style.transform="none",Se.style.webkitTransform="none")}function Ot(Se,Wt,se,ze,ye,Nt){var We=null;if(Nt!=null&&Nt!="")for(var ie=Se.parentNode;ie!=null;)if((" "+ie.className+" ").indexOf(" "+Nt+" ")>-1){We=ie;break}else ie=ie.parentNode;var Ne=0,bt=0,nt=0,et=0,ct=0,lt=0,gt=0;if(We)Ne=We.offsetWidth,bt=Math.max(ze?We.offsetWidth:0,We.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(Ne=Math.min(window.innerWidth,document.documentElement.clientWidth),bt=Math.min(window.innerHeight,document.documentElement.clientHeight),nt=Ne):(Ne=window.innerWidth,bt=window.innerHeight,nt=window.innerWidth),Se){var mt=Se.getBoundingClientRect();mt.left>0&&mt.left<=Ne&&(ye===void 0||!ye)&&(document.dir==="rtl"?(ct=Ne-mt.width-mt.left,lt=nt<=480?10:30):(lt=mt.left,ct=nt<=480?10:30),et=lt+ct)}if(Se&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var St=Se.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(et=40,gt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(et=0,gt=40)}}return Se&&((se===void 0||!se)&&Wt>0&&Wt+et<Ne?Ne=Wt:Ne-=et,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(se===void 0||!se)&&(bt-=gt)),{width:Ne,height:bt}}function Dt(Se,Wt,se,ze,ye){if(Se.isScreenshoGenerator)return 1;var Nt=ze!==void 0&&ze,We=Se.noScaleMargin!=null&&Se.noScaleMargin,ie=function(St){return St&&St!=="false"},Ne=ie(Se.autoHeight),bt=Ot(Wt,Se.width,se,Ne,Nt&&window.GGBT_wsf_view||We,ye),nt=parseInt(bt.width),et=Se.width,ct=Se.height;if(et===void 0){var lt=Wt.querySelector(".appletParameters");lt&&(et=lt.offsetWidth,ct=lt.offsetHeight)}var gt=nt/et,mt=Nt?1:bt.height/ct;return se!==void 0&&!se&&(gt=Math.min(1,gt),mt=Math.min(1,mt)),Math.min(gt,mt)}function ee(Se,Wt,se){var ze=1,ye,Nt=!1;if(Se.hasOwnProperty("allowUpscale")&&(Nt=Se.allowUpscale),Se.hasOwnProperty("scale")&&(ze=parseFloat(Se.scale),(isNaN(ze)||ze===null||ze===0)&&(ze=1),ze>1&&(Nt=!0)),Wt&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Nt=!0),!(Se.hasOwnProperty("disableAutoScale")&&Se.disableAutoScale))ye=Dt(Se,Wt,Nt,se,Se.scaleContainerClass);else return ze;return Nt&&(!Se.hasOwnProperty("scale")||ze===1)?ye:Math.min(ze,ye)}function Pe(Se){var Wt=Math.min(window.innerWidth,document.documentElement.clientWidth),se=Math.min(window.innerHeight,document.documentElement.clientHeight),ze=Se.getBoundingClientRect(),ye=(Wt-ze.width)/2,Nt=(se-ze.height)/2;Nt<0&&(Nt=0),Se.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ye<40?Se.style.left="40px":Se.style.left=ye+"px",Se.style.top=Nt+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Nt<40?Se.style.top="40px":Se.style.top=Nt+"px",Se.style.left=ye+"px")}function xe(Se,Wt){var se=Se.querySelector(".appletParameters");if(se){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Wt.id!==se.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Se)}if(se.parentElement&&/fullscreen/.test(se.parentElement.className))return;var ze=ee(Wt,Se);zn()&&se.setAttribute("data-param-scale",ze);for(var ye=null,Nt=0;Nt<Se.childNodes.length;Nt++)if(Se.childNodes[Nt].className!==void 0&&Se.childNodes[Nt].className.match(/^applet_scaler/)){ye=Se.childNodes[Nt];break}if(ye!==null&&ye.querySelector(".noscale")!==null)return;var We=Wt.id!==void 0?Wt.id:"ggbApplet",ie=window[We];(ie==null||!ie.recalculateEnvironments)&&ye!==null&&!ye.className.match(/fullscreen/)&&(ye.parentNode.style.transform="",!isNaN(ze)&&ze!==1?(ye.parentNode.style.width=Wt.width*ze+"px",ye.parentNode.style.height=Wt.height*ze+"px",oi(ye,ze)):(oi(ye,1),ye.parentNode.style.width=Wt.width+"px",ye.parentNode.style.height=Wt.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Pe(Se),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(se).parents(".content-added-content"))}}return{responsiveResize:xe,isFlexibleWorksheetEditor:zn,positionCenter:Pe,getScale:ee,scaleElement:oi}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var zn=n.location.search;return zn.indexOf(J)!=-1||zn.indexOf(K)!=-1}function q(zn,oi){}webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(zn){var oi=s[L].bindings;s[L].bindings=function(){for(var Ot=oi?oi():{},Dt=zn[webModule.__softPermutationId],ee=O;ee<Dt.length;ee++){var Pe=Dt[ee];Ot[Pe[O]]=Pe[P]}return Ot}};var t;function u(){return v(),t}function v(){if(!t){var zn=o.createElement(Q);if(zn.id=L,zn.style.cssText=R+S,zn.tabIndex=-1,o.body.appendChild(zn),t=zn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var oi=document.compatMode==U?V:W;t.write(oi+X),t.close()}}}function w(zn){function oi(Dt){function ee(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Pe=ee();if(Pe){Dt();return}function xe(){if(!Pe){if(!ee())return;Pe=!0,Dt(),o.removeEventListener&&o.removeEventListener(Z,xe,!1),Se&&clearInterval(Se)}}o.addEventListener&&o.addEventListener(Z,xe,!1);var Se=setInterval(function(){xe()},$)}function Ot(Dt){var ee=u(),Pe=ee.body,xe=ee.createElement(_);xe.language=ab,xe.crossOrigin=W,xe.src=Dt,webModule.__errFn&&(xe.onerror=function(){webModule.__errFn(L,new Error(bb+Dt))}),Pe.appendChild(xe)}oi(function(){Ot(zn)})}webModule.__startLoadingFragment=function(zn){return C(zn)},webModule.__installRunAsyncCode=function(zn){var oi=u(),Ot=oi.body,Dt=oi.createElement(_);Dt.language=ab,Dt.text=zn,Ot.appendChild(Dt),Ot.removeChild(Dt)};function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(zn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(zn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(zn){var oi=c[zn];return oi==null?null:oi},r=d,webModule.__errFn=e}function B(){function zn(Se){var Wt=Se.lastIndexOf(rb);Wt==-1&&(Wt=Se.length);var se=Se.indexOf(sb);se==-1&&(se=Se.length);var ze=Se.lastIndexOf(tb,Math.min(se,Wt));return ze>=O?Se.substring(O,ze+P):W}function oi(Se){if(!Se.match(/^\w+:\/\//)){var Wt=o.createElement(ub);Wt.src=Se+vb,Se=zn(Wt.src)}return Se}function Ot(){var Se=__gwt_getMetaProperty(wb);return Se!=null?Se:W}function Dt(){for(var Se=o.getElementsByTagName(_),Wt=O;Wt<Se.length;++Wt)if(Se[Wt].src.indexOf(xb)!=-1)return zn(Se[Wt].src);return W}function ee(){var Se=o.getElementsByTagName(yb);return Se.length>O?Se[Se.length-P].href:W}function Pe(){var Se=o.location;return Se.href==Se.protocol+zb+Se.host+Se.pathname+Se.search+Se.hash}var xe=Ot();return xe==W&&(xe=Dt()),xe==W&&(xe=ee()),xe==W&&Pe()&&(xe=zn(o.location.href)),xe=oi(xe),xe}function C(zn){return zn.match(/^\//)||zn.match(/^[a-zA-Z]+:\/\//)?zn:webModule.__moduleBase+zn}function D(){var zn=[],oi=O,Ot=[],Dt=[];function ee(Se){var Wt=Dt[Se](),se=Ot[Se];if(Wt in se)return Wt;var ze=[];for(var ye in se)ze[se[ye]]=ye;throw r&&r(Se,ze,Wt),null}if(__gwt_isKnownPropertyValue=function(Se,Wt){return Wt in Ot[Se]},webModule.__getPropMap=function(){var Se={};for(var Wt in Ot)Ot.hasOwnProperty(Wt)&&(Se[Wt]=ee(Wt));return Se},webModule.__computePropValue=ee,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Pe;try{Pe=Cb;var xe=Pe.indexOf(Db);xe!=-1&&(oi=parseInt(Pe.substring(xe+P),$),Pe=Pe.substring(O,xe))}catch(Se){}return webModule.__softPermutationId=oi,C(Pe+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})()},77903:function(zn,oi,Ot){"use strict";Ot.d(oi,{Ax:function(){return xe},Ds:function(){return Se},KI:function(){return se},SI:function(){return Pe},f1:function(){return ee}});var Dt=Ot(3294);function ee(ze){let ye=!0;if(ze.length>0){for(let Nt=0;Nt<ze.length;Nt++)if(ze[Nt].compile_success==0||!ze[Nt].compile_success){ye=!1;break}}else ye=!1;return ye}function Pe(ze,ye=""){let Nt=[];for(let We=0;We<ze.length;We++){let ie=ze[We],Ne=ye?`${ye}/${ie.name}`:`${ie.name}`;Nt.push({title:ie.name,type:ie.type,isLeaf:ie.type!=="tree",key:Ne})}return Nt}function xe(ze,ye,Nt){for(let We=0;We<ze.length;We++){let ie=ze[We];if(ie.key===ye){ie.children=Nt;break}ie.children&&xe(ie.children,ye,Nt)}return ze}function Se(ze,ye,Nt){let We;return function(){let ie=this,Ne=arguments,bt=function(){We=null,Nt||ze.apply(ie,Ne)},nt=Nt&&!We;clearTimeout(We),We=setTimeout(bt,ye),nt&&ze.apply(ie,Ne)}}const Wt=!0,se=Dt.Z.API_SERVER},12393:function(zn,oi,Ot){"use strict";Ot.d(oi,{Z:function(){return gt}});var Dt=Ot(59301),ee=Ot(28284),Pe=Ot(6767),xe=Ot(62957),Se=Ot(16326),Wt=Ot(37568),se=Ot(54172),ze=Ot(77019),ye=Ot(5269),Nt=Ot(61186),We=Ot.n(Nt),ie=Ot(955),Ne=Ot(89070),bt={tips:"tips___e8J4O",homeworkType:"homeworkType___ZjN2X",antdTable:"antdTable___amDdp",modalWrapper:"modalWrapper___XPojI"},nt=Ot(92365),et=Ot(79834),ct=(mt,St,Mt)=>new Promise((zt,Ht)=>{var qt=ge=>{try{Jt(Mt.next(ge))}catch(he){Ht(he)}},jt=ge=>{try{Jt(Mt.throw(ge))}catch(he){Ht(he)}},Jt=ge=>ge.done?zt(ge.value):Promise.resolve(ge.value).then(qt,jt);Jt((Mt=Mt.apply(mt,St)).next())});const lt=({dispatch:mt,courseEndTime:St,classroomList:Mt,successCallback:zt=()=>{},visible:Ht,homeworkIds:qt,courseId:jt,isBatch:Jt,shixunHomeworks:ge})=>{const[he]=ee.default.useForm(),[Fe,Re]=(0,Dt.useState)(!1),[Ke,Mn]=(0,Dt.useState)(!1),[tn,rn]=(0,Dt.useState)(!1),[nn,me]=(0,Dt.useState)([]),[Xt,Ue]=(0,Dt.useState)([]),[Pn,Yn]=(0,Dt.useState)([]),[Be,vn]=(0,Dt.useState)([]),[Je,An]=(0,Dt.useState)([]),[we,sn]=(0,Dt.useState)([]),[ce,Nn]=(0,Dt.useState)([]),[Ci,It]=(0,Dt.useState)([]),[wt,xt]=(0,Dt.useState)([]);(0,Dt.useEffect)(()=>{Ht?Ft():kt()},[Ht]);const Ft=()=>ct(void 0,null,function*(){Re(!0);const Yt=yield(0,nt.oR)(qt[0],{course_id:jt});rn(Yt.no_group),Jt?(Nn(Yt.all_course_groups),It(Yt.all_course_groups)):(vn(Yt.late_course_groups),An(Yt.late_course_groups),me(Yt.submit_course_groups),Ue(Yt.submit_course_groups)),Re(!1),he.setFieldsValue({end_time:We()()})}),Gt=()=>ct(void 0,null,function*(){const Yt=he.getFieldsValue(),pe=We()(Yt.end_time).format("YYYY-MM-DD HH:mm");if((Jt?wt.length===0:Pn.length===0&&we.length===0)&&!tn){Pe.ZP.warning("\u8BF7\u9009\u62E9\u9700\u8981\u64CD\u4F5C\u7684\u73ED\u7EA7");return}Mn(!0);const on=yield(0,nt.Mc)(jt,{no_group:tn,homework_ids:qt,group_ids:Jt?wt:Pn,end_time:pe,late_group_ids:Jt?wt:we});Mn(!1),on.status===0&&(kt(),Pe.ZP.success("\u64CD\u4F5C\u6210\u529F"),zt(),mt({type:"classroomList/setActionTabs",payload:{key:"\u6E05\u9664\u9009\u62E9\u6570\u636E"}}))}),kt=()=>{Yn([]),sn([]),Ue([]),An([])};return Dt.createElement(xe.default,{centered:!0,title:"\u7ACB\u5373\u622A\u6B62",className:bt.modalWrapper,width:Jt||tn?520:760,open:Ht,confirmLoading:Ke,destroyOnClose:!0,okText:"\u622A\u6B62",cancelText:"\u53D6\u6D88",onOk:()=>Gt(),onCancel:()=>{kt(),mt({type:"classroomList/setActionTabs",payload:{}})}},Dt.createElement("div",{className:bt.tips},Dt.createElement("div",null,"1\u3001\u622A\u6B62\u540E\u5B66\u751F\u4E0D\u80FD\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"),Dt.createElement("div",null,"2\u3001\u672C\u64CD\u4F5C\u53EA\u5BF9\u201C\u63D0\u4EA4\u4E2D\u201D\u3001\u201C\u8865\u4EA4\u4E2D\u201D\u7684\u4F5C\u4E1A\u6709\u6548\u3002")),Dt.createElement(ee.default,{form:he,layout:"vertical"},Dt.createElement(ee.default.Item,{name:"end_time",label:"\u622A\u6B62\u65F6\u95F4"},Dt.createElement(Se.default,{style:{width:"100%"},disabledDate:Yt=>(0,et.Q8)(Yt,St),disabledTime:Yt=>(0,et.d0)(Yt),placeholder:"\u8BF7\u9009\u62E9\u7ED3\u675F\u65F6\u95F4",showTime:{format:"HH:mm",defaultValue:We()((0,ie.U6)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",allowClear:!1}))),!tn&&Dt.createElement(Dt.Fragment,null,Jt?Dt.createElement("div",null,Dt.createElement(Wt.default,{placeholder:"\u641C\u7D22\u73ED\u7EA7",onChange:Yt=>{It(ce.filter(pe=>pe.name.indexOf(Yt.target.value)>-1))}}),Dt.createElement(se.default,{style:{marginTop:"10px",height:"300px",overflow:"auto"},className:bt.antdTable,rowSelection:{type:"checkbox",onChange:Yt=>{xt(Yt)}},rowKey:"id",pagination:!1,dataSource:Ci,loading:Fe,columns:[{title:"\u73ED\u7EA7",dataIndex:"name"}]})):Dt.createElement(ze.Z,{gutter:24},Dt.createElement(ye.Z,{span:14},Dt.createElement("div",{className:bt.homeworkType},"\u4F5C\u4E1A\u622A\u6B62"),Dt.createElement(Wt.default,{placeholder:"\u641C\u7D22\u73ED\u7EA7",onChange:Yt=>{Ue(nn.filter(pe=>pe.name.indexOf(Yt.target.value)>-1))}}),Dt.createElement("div",{className:bt.tableWrapper},Dt.createElement(se.default,{style:{marginTop:"10px",height:"260px",overflow:"auto"},className:bt.antdTable,rowSelection:{type:"checkbox",onChange:Yt=>{Yn(Yt)}},rowKey:"id",pagination:!1,dataSource:Xt,loading:Fe,columns:[{title:"\u73ED\u7EA7",dataIndex:"name",ellipsis:!0},{title:"\u53D1\u5E03\u65F6\u95F4",dataIndex:"publish_time"},{title:"\u622A\u6B62\u65F6\u95F4",dataIndex:"end_time"}]}))),Dt.createElement(ye.Z,{flex:10,style:{maxWidth:"280px"}},Dt.createElement("div",{className:bt.homeworkType},"\u8865\u4EA4\u622A\u6B62"),Dt.createElement(Wt.default,{placeholder:"\u641C\u7D22\u73ED\u7EA7",onChange:Yt=>{An(Be.filter(pe=>pe.name.indexOf(Yt.target.value)>-1))}}),Dt.createElement("div",{className:bt.tableWrapper},Dt.createElement(se.default,{style:{marginTop:"10px",height:"260px",overflow:"auto",maxWidth:"280px"},className:bt.antdTable,rowSelection:{type:"checkbox",onChange:Yt=>{sn(Yt)}},rowKey:"id",pagination:!1,loading:Fe,dataSource:Je,columns:[{title:"\u73ED\u7EA7",dataIndex:"name",ellipsis:!0,width:120},{title:"\u622A\u6B62\u65F6\u95F4",dataIndex:"late_time"}]}))))))};var gt=(0,Ne.connect)(({shixunHomeworks:mt,classroomList:St})=>({shixunHomeworks:mt,classroomList:St}))(lt)},73524:function(zn,oi,Ot){"use strict";Ot.d(oi,{Z:function(){return We}});var Dt=Ot(59301),ee={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Pe=Ot(92310),xe=Ot.n(Pe),Se=Ot(29787),Wt=Ot(2859),se=Ot(99064),ze=Ot(955),ye=(ie,Ne,bt)=>new Promise((nt,et)=>{var ct=mt=>{try{gt(bt.next(mt))}catch(St){et(St)}},lt=mt=>{try{gt(bt.throw(mt))}catch(St){et(St)}},gt=mt=>mt.done?nt(mt.value):Promise.resolve(mt.value).then(ct,lt);gt((bt=bt.apply(ie,Ne)).next())}),We=({data:ie,className:Ne,fullWidth:bt,style:nt={},onClose:et,onOk:ct,showFullTools:lt,noAssociationId:gt})=>{const mt=(0,Dt.useRef)(null),St=(0,Dt.useRef)(null),Mt=(0,Dt.useRef)(null),zt=(0,Dt.useRef)(null),[Ht,qt]=(0,Dt.useState)(!1),[jt,Jt]=(0,Dt.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,Dt.useEffect)(()=>(Mt.current||(Mt.current=document.createElement("style"),document.head.appendChild(Mt.current)),ie!=null&&ie.visible?(document.body.setAttribute("data-custom","y-hidden"),Mt.current.innerHTML=" html { overflow-y: hidden; }",ie!=null&&ie.src&&ge()):(document.body.removeAttribute("data-custom"),Mt.current&&(document.head.removeChild(Mt.current),Mt.current=null)),()=>{document.body.removeAttribute("data-custom"),Mt.current&&(document.head.removeChild(Mt.current),Mt.current=null)}),[ie==null?void 0:ie.visible]);const ge=()=>ye(void 0,null,function*(){qt(!0),Jt("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Ke=yield(0,ze.ZJ)(ie==null?void 0:ie.src);mt.current.src="",mt.current.src=Ke,mt.current.onload=function(){Re()},qt(!1),Jt("")}),he=Ke=>ye(void 0,null,function*(){qt(!0),Jt("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Mn=yield(0,se.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:ie.title,file:Ke.dataUrl}});Mn!=null&&Mn.id&&!gt?(yield(0,se.ZP)(`/api/attachments/${ie.id}/add_subitem.json`,{method:"post",body:{subitem_id:Mn==null?void 0:Mn.id,settings:JSON.stringify(Ke.state)}})).status===0&&ct():Mn!=null&&Mn.id&&ct(Mn),qt(!1),Jt("")}),Fe=()=>{const Ke=document.querySelector('a[href="https://markerjs.com/"]');Ke&&Ke.parentNode&&(Ke.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(tn=>{const rn=document.querySelector(tn.name);rn&&rn.setAttribute("title",tn.title)})},Re=()=>{St.current=new Wt.hP(mt.current),St.current.targetRoot=zt.current,St.current.addEventListener("render",he),St.current.addEventListener("beforeclose",et),lt&&(St.current.availableMarkerTypes=St.current.ALL_MARKER_TYPES,St.current.uiStyleSettings.redoButtonVisible=!0,St.current.uiStyleSettings.notesButtonVisible=!0,St.current.uiStyleSettings.zoomButtonVisible=!0,St.current.uiStyleSettings.zoomOutButtonVisible=!0,St.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=St.current.uiStyleSettings,St.current.show(),ie!=null&&ie.snapshotData&&St.current.restoreState(ie.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Fe()},300)};return Dt.createElement(Dt.Fragment,null,(ie==null?void 0:ie.visible)&&Dt.createElement(Se.Z,{spinning:Ht,tip:jt,style:{position:"absolute",width:"100vw"}},Dt.createElement("div",{ref:zt,className:xe()(ee.imageDimensions,Ne,bt?ee.fullWidth:""),style:nt},Dt.createElement("img",{className:ee.img,ref:mt}))))}},41588:function(zn,oi,Ot){"use strict";var Dt=Ot(59301),ee=Ot(77019),Pe=Ot(5269),xe=Ot(20554),Se=Ot(99571),Wt=Ot(85149),se=Ot(88010),ze=Ot(48136),ye=Ot(59301);const Nt=(0,Dt.forwardRef)(({callback:We,showSaveButton:ie,value:Ne=""},bt)=>{const nt=(0,Dt.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 "}]}]}],ct=[{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=St=>{nt.current.setValue(nt.current.getValue()+" "+St.value+" ")},gt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:ye.createElement(ee.Z,{className:se.Z.lists,gutter:[10,10]},et.map((St,Mt)=>ye.createElement(Pe.Z,{flex:"110px",className:se.Z.item},ye.createElement("div",null,ye.createElement(Wt.Z,{value:`$$${St.value}$$`}),St.name),ye.createElement("div",{className:se.Z.children},St.children.map((zt,Ht)=>ye.createElement("div",{key:Ht},ye.createElement("h1",null,zt.name),ye.createElement(ee.Z,{gutter:[10,10]},zt.data.map((qt,jt)=>ye.createElement(Pe.Z,{key:jt,onClick:()=>lt(qt),className:se.Z.diamond},ye.createElement(Wt.Z,{value:"`$$"+qt.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:ye.createElement(ee.Z,{className:se.Z.lists,gutter:[10,10]},ct.map((St,Mt)=>ye.createElement(Pe.Z,{flex:"110px",className:se.Z.item},ye.createElement("div",null,ye.createElement(Wt.Z,{value:"`$$"+St.value+"$$`"}),St.name),ye.createElement("div",{className:se.Z.children},St.children.map((zt,Ht)=>ye.createElement("div",{key:Ht},zt.name&&ye.createElement("h1",null,zt.name),ye.createElement(ee.Z,{gutter:[10,10]},zt.data.map((qt,jt)=>ye.createElement(Pe.Z,{key:jt,onClick:()=>lt(qt),className:se.Z.diamond},ye.createElement(Wt.Z,{value:"`$$"+qt.value+"$$`"}))))))))))}],mt=()=>{var St=document.createElement("div");St.innerHTML=nt.current.getValue();var Mt=St.innerText;return We&&We(Mt),Mt};return(0,Dt.useImperativeHandle)(bt,()=>({getData:mt})),ye.createElement("div",{className:se.Z.mathWrap},ye.createElement(xe.default,{defaultActiveKey:"1",items:gt}),ye.createElement("math-field",{locale:"zh_cn",className:se.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:nt,style:{width:800,marginTop:30,fontSize:18}},Ne||""),ie&&ye.createElement("div",{className:se.Z.button},ye.createElement(Se.ZP,{size:"large",onClick:mt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});oi.Z=Nt},8797:function(zn,oi,Ot){"use strict";var Dt=Ot(59301),ee=Ot(93314),Pe=Ot(99571),xe=Object.defineProperty,Se=Object.defineProperties,Wt=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable,Nt=(bt,nt,et)=>nt in bt?xe(bt,nt,{enumerable:!0,configurable:!0,writable:!0,value:et}):bt[nt]=et,We=(bt,nt)=>{for(var et in nt||(nt={}))ze.call(nt,et)&&Nt(bt,et,nt[et]);if(se)for(var et of se(nt))ye.call(nt,et)&&Nt(bt,et,nt[et]);return bt},ie=(bt,nt)=>Se(bt,Wt(nt));const Ne=({img:bt,buttonProps:nt={},styles:et={},customText:ct,ButtonText:lt,ButtonClick:gt,Buttonclass:mt,ButtonTwo:St,imgStyles:Mt,loading:zt=!1,className:Ht=""})=>Dt.createElement("section",{className:`tc animated fadeIn ${Ht}`,style:We({color:"#999",margin:"100px auto",visibility:zt?"hidden":"visible"},et)},Dt.createElement("img",{src:bt||ee,style:ie(We({},Mt),{pointerEvents:"none",userSelect:"none"})}),Dt.createElement("p",{className:"mt20 font14"},ct||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),lt&&Dt.createElement(Pe.ZP,We({className:mt,onClick:gt},nt),lt),St&&St);oi.Z=Ne},40731:function(zn,oi,Ot){"use strict";Ot.d(oi,{Q:function(){return Wt}});var Dt=Ot(59301),ee=Ot(82326),Pe=Ot(47889),xe=Ot(71051),Se=Ot(59301),Wt=(ze=>(ze[ze.Number=1]="Number",ze[ze.Percent=2]="Percent",ze))(Wt||{});const se=({value:ze,onChange:ye,disabled:Nt,hidePercentOption:We=!1,percentType:ie="select"})=>{const Ne=(0,Dt.useMemo)(()=>We?1:2,[We]),[bt,nt]=(0,Dt.useState)(Ne);console.log(bt);const et=lt=>ze.type===1?`${lt}\u5206`:`${lt}%`,ct=(0,Dt.useCallback)(lt=>{if(bt===1){const gt=lt.replace("\u5206","");return isNaN(parseInt(gt,10))?0:gt}else return lt.replace("%","")},[bt]);return(0,Dt.useEffect)(()=>{nt(ze.type)},[ze]),Se.createElement("div",{style:{display:"flex",alignItems:"center"}},ie=="select"&&Se.createElement(ee.default,{size:"large",onChange:lt=>{nt(lt),ye({type:lt,inputValue:lt===1?5:20})},value:bt||Ne,style:{width:100},options:We?[{label:"\u5206\u503C",value:1}]:[{label:"\u767E\u5206\u6BD4",value:2},{label:"\u5206\u503C",value:1}],disabled:Nt}),ie=="radio"&&Se.createElement(Pe.ZP.Group,{size:"large",onChange:lt=>{const gt=lt.target.value;nt(gt),ye({type:gt,inputValue:gt===1?5:20})},value:bt||Ne,disabled:Nt},!We&&Se.createElement(Pe.ZP,{value:2,style:{marginRight:"50px"}},"\u767E\u5206\u6BD4\u6263\u5206"),Se.createElement(Pe.ZP,{value:1},"\u56FA\u5B9A\u5206\u503C")),ie=="radio"&&Se.createElement("div",{style:{marginRight:"10px",color:"#000000"}},ze.type==2?"\u6263\u9664\u8865\u4EA4\u9636\u6BB5\u5F97\u5206\u7684":"\u6263\u9664\u603B\u6210\u7EE9\u7684"),Se.createElement(xe.Z,{size:"large",disabled:Nt,value:ze.inputValue,style:{width:"120px"},parser:ct,addonAfter:ze.type===1?"\u5206":"%",max:bt===2?100:Number.MAX_SAFE_INTEGER,min:0,precision:0,onChange:lt=>{ye({type:bt,inputValue:lt})}}),ie=="radio"&&ze.type==2&&Se.createElement("div",{style:{marginLeft:"10px",color:"#000000"}},"\u5206\u6570"))};oi.Z=se},23210:function(zn,oi,Ot){"use strict";Ot.d(oi,{Z:function(){return mt}});var Dt=Ot(59301),ee={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Pe=Ot(99571),xe=Ot(70557),Se=Ot(23954),Wt=Ot(25399),se=Ot(955),ze=Ot(94941),ye=Ot(8797),Nt=Ot(3294),We=Ot(19381),ie=Ot(59301),Ne=Object.defineProperty,bt=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,ct=(St,Mt,zt)=>Mt in St?Ne(St,Mt,{enumerable:!0,configurable:!0,writable:!0,value:zt}):St[Mt]=zt,lt=(St,Mt)=>{for(var zt in Mt||(Mt={}))nt.call(Mt,zt)&&ct(St,zt,Mt[zt]);if(bt)for(var zt of bt(Mt))et.call(Mt,zt)&&ct(St,zt,Mt[zt]);return St},gt=(St,Mt,zt)=>new Promise((Ht,qt)=>{var jt=he=>{try{ge(zt.next(he))}catch(Fe){qt(Fe)}},Jt=he=>{try{ge(zt.throw(he))}catch(Fe){qt(Fe)}},ge=he=>he.done?Ht(he.value):Promise.resolve(he.value).then(jt,Jt);ge((zt=zt.apply(St,Mt)).next())}),mt=({editOffice:St="view",data:Mt,theme:zt,type:Ht,filename:qt,monacoEditor:jt,className:Jt,style:ge,close:he,onClose:Fe,hasMask:Re,disabledDownload:Ke,onImgDimensions:Mn,showNodata:tn,recordInfo:rn})=>{const[nn,me]=(0,Dt.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Xt,Ue]=(0,Dt.useState)(""),[Pn,Yn]=(0,Dt.useState)(),Be=window.ENV==="build"?"/react/build":"",vn=location.host.startsWith("localhost")?Nt.Z.PROXY_SERVER:Nt.Z.API_SERVER,An=10*(1024*1024),we=(0,Dt.useRef)();Mt!=null&&Mt.startsWith("/api")&&Ht!=="txt"&&(Mt=Nt.Z.API_SERVER+Mt);const sn=It=>It.substring(It.lastIndexOf("/")+1).split(".").pop();qt&&jt&&(jt.filename=qt),(0,Dt.useEffect)(()=>{var It,wt;const xt=(wt=(It=document.cookie)==null?void 0:It.replace(/\s/g,""))==null?void 0:wt.split(";");xt==null||xt.map(Ft=>{let Gt=Ft.split("=");Gt[0]==="_educoder_session"&&Ue(Gt[1])})},[]),(0,Dt.useEffect)(()=>{Ht==="office"&&(Mt.indexOf("bigfilescdn.")>-1||Mt.indexOf("bigfiles1")>-1?Yn({url:Mt,fileType:sn(Mt),model:Mt.indexOf("model=edit")?"edit":"view"}):ce())},[Ht,Mt]);const ce=()=>gt(void 0,null,function*(){console.log("data:",Mt);let It=Mt;Mt.startsWith("http")||(It=location.origin+It);let wt=new URL(It).pathname.split("/").pop();const xt=yield(0,ze.gJ)({attachment_id:wt});xt.url=vn+xt.url,Yn(xt)}),Nn=()=>{if(Mt.startsWith("http")||Mt.startsWith("blob:")){Ci();return}(0,se.Sv)(qt||"educoder",Mt,qt)},Ci=()=>{rn&&(0,We.fc)({id:rn==null?void 0:rn.id,watch_type:1,course_id:rn==null?void 0:rn.course_id}),(0,se.Nd)(qt||"educoder",decodeURIComponent(Mt))};return ie.createElement("div",{style:lt({},ge||{}),className:`${Re&&ee.bgBlack} ${Ht?ee.wrp:"hide"}`},he&&ie.createElement("div",{className:ee.close,ref:we},!!Mn&&ie.createElement(Wt.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>we.current},ie.createElement("span",{onClick:()=>{Fe(),Mn()}},ie.createElement("i",{className:"icon-yulanpizhu"}))),!Ke&&ie.createElement(Wt.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>we.current},ie.createElement("span",{onClick:Ci},ie.createElement("i",{className:"icon-quxiaozhiding"}))),ie.createElement(Wt.Z,{title:"\u5173\u95ED",getPopupContainer:()=>we.current},ie.createElement("span",{className:"",onClick:Fe},ie.createElement("i",{className:"icon-guanbi1"})))),ie.createElement("div",{className:`${ee[Jt]} ${Jt} ${ee.monaco} ${Ht==="txt"?"show":"hide"}`},Ht==="txt"&&ie.createElement(ie.Fragment,null,ie.createElement(Se.ZP,lt({},jt)))),Ht==="audio"&&ie.createElement("audio",{src:`${(Mt==null?void 0:Mt.indexOf("http://"))>-1||(Mt==null?void 0:Mt.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Mt}`,autoPlay:!0}),Ht==="video"&&ie.createElement(ie.Fragment,null,(Mt==null?void 0:Mt.indexOf("http"))>-1?ie.createElement("video",{controls:!0,src:`${Mt}`,autoPlay:!0}):ie.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Mt}`,autoPlay:!0})),Ht==="office"&&Pn&&ie.createElement("iframe",{src:`${Be}/office.html?key=${Pn.key}&url=${btoa(Pn.url)}&callbackUrl=${vn+(Pn.callbackUrl||"")}&fileType=${Pn.fileType}&title=${Pn.title||""}&model=${St}&officeServer=${Nt.Z.ONLYOFFICE}&disabledDownload=${!!Ke}`}),Ht==="html"&&ie.createElement("iframe",{src:Mt+"&disposition=inline"}),Ht==="pdf"&&ie.createElement("iframe",{src:`${Be}/js/pdfview/index.html?filename=${qt||"educoder.pdf"}&url=${encodeURIComponent(Mt)}&disabledDownload=${!!Ke}`}),Ht==="image"&&ie.createElement("img",{src:`${(Mt==null?void 0:Mt.indexOf("http://"))>-1||(Mt==null?void 0:Mt.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Mt}`}),(Ht==="other"||Ht==="download")&&ie.createElement(ie.Fragment,null,tn?ie.createElement(ye.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:ie.createElement(Pe.ZP,{icon:ie.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Nn,disabled:Ke},"\u4E0B\u8F7D")}):ie.createElement(Pe.ZP,{type:"primary",size:"middle",onClick:Nn,disabled:Ke},ie.createElement(xe.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},85149:function(zn,oi,Ot){"use strict";Ot.d(oi,{z:function(){return Ht},Z:function(){return qt}});var Dt=Ot(59301),ee=Ot(50304),Pe=Ot(24768),xe=Ot(64018),Se=Ot(79710),Wt=Ot(3294),se=Ot(955),ze=Ot(15342),ye=Ot(1012),Nt=Ot(23210),We=Ot(59301),Ne=({html:jt})=>{const Jt=(0,Dt.useRef)(null),ge=(0,Dt.useRef)(null),he=`.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 36px !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,Dt.useEffect)(()=>{const Fe=Jt.current.attachShadow({mode:"open"});ge.current=document.createElement("div"),ge.current.className="markdown-body",ge.current.innerHTML=jt,Fe.appendChild(ge.current);const Re=document.createElement("style");return Re.textContent=he,Fe.appendChild(Re),()=>{Fe.innerHTML=""}},[]),(0,Dt.useEffect)(()=>{ge.current&&(ge.current.innerHTML=jt)},[jt]),We.createElement("div",{ref:Jt})},bt=Object.defineProperty,nt=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,lt=(jt,Jt,ge)=>Jt in jt?bt(jt,Jt,{enumerable:!0,configurable:!0,writable:!0,value:ge}):jt[Jt]=ge,gt=(jt,Jt)=>{for(var ge in Jt||(Jt={}))et.call(Jt,ge)&<(jt,ge,Jt[ge]);if(nt)for(var ge of nt(Jt))ct.call(Jt,ge)&<(jt,ge,Jt[ge]);return jt};const mt="@\u2581\u2581@",St="@\u2581@",Mt=/<pre[^>]*>/g;function zt(jt){let Jt=document.createElement("div");return Jt.innerHTML=jt,Jt.childNodes.length===0?"":Jt.childNodes[0].nodeValue}const Ht=(jt,Jt)=>{jt=jt||"";const ge=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,he=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Fe=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Re=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Jt?jt.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(ge,(Ke,Mn,tn,rn,nn,me,Xt)=>{const Ue=Mn||rn||me,Pn=tn||nn||Xt||"?";return Wt.Z.API_SERVER+"/api/attachments/"+Ue+Pn+"&t="+(0,se.Jn)(Ue,Date.now())+(Ke.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(jt=jt.replace(Re,(Ke,Mn,tn,rn,nn,me,Xt)=>{const Ue=Mn||rn||me,Pn=tn||nn||Xt||"?";return Wt.Z.API_SERVER+"/attachments/download/"+Ue+Pn+"&t="+(0,se.Jn)(Ue,Date.now())+(Ke.indexOf(")")>-1?")":"&")}).replace(ge,(Ke,Mn,tn,rn,nn,me,Xt)=>{const Ue=Mn||rn||me,Pn=tn||nn||Xt||"?";return Wt.Z.API_SERVER+"/api/attachments/"+Ue+Pn+"&t="+(0,se.Jn)(Ue,Date.now())+(Ke.indexOf(")")>-1?")":"&")}).replace(he,(Ke,Mn,tn,rn,nn)=>{const me=Mn||rn,Xt=tn||nn||"";return'"'+Wt.Z.API_SERVER+"/api/attachments/"+me+Xt+me+Xt+"&t="+(0,se.Jn)(me,Date.now())}).replace(Fe,(Ke,Mn,tn,rn,nn)=>{const me=Mn||rn,Xt=tn||nn||"";return"("+Wt.Z.API_SERVER+"/files/uploads/"+me+Xt+me+Xt+"&t="+(0,se.Jn)(me,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,`
|
|
`),jt)};var qt=({value:jt="",className:Jt,showTextOnly:ge,showLines:he,style:Fe={},stylesPrev:Re={},highlightKeywords:Ke,showProgramFill:Mn,isProgramFill:tn,disabledFill:rn=!1,programFillValue:nn,onFillChange:me=Pn=>{},onFillBlur:Xt=()=>{},onFillFocus:Ue=()=>{}})=>{let Pn=String(jt);const[Yn,Be]=(0,Dt.useState)(""),[vn,Je]=(0,Dt.useState)("office"),[An,we]=(0,Dt.useState)([]),sn=(0,Dt.useRef)("a"+(0,ye.Z)()),ce={},Nn=(ve,Ae,Ee)=>{const Ge=document.createElement(ve===St?"input":"textarea");Ge.style.width="100%",Ge.style.height=ve===St?"40px":"151px",Ge.rows=5,Ge.spellcheck=!1,Ge.name="edu-program-fill",Ge.placeholder="\u8BF7\u8F93\u5165",Ge.dataset.id=Ae;const kn=Object.keys(ce).length;return ce[kn]=Ge,`<span class="edu-program-fill-wrap ${ve===St?"":"show"}" style="width:${ve===St?"400px":"100%"}" title=${Ee||""}><span>${Ge.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Ci(ve){return ve=ve.replace(/!\[.*?\]\(.*?\)/g,""),ve=ve.replace(/\[.*?\]\(.*?\)/g,""),ve=ve.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),ve=ve.replace(/<embed.*?>/g,""),ve=ve.replace(/<img.*?>/g,""),ve=ve.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),ve=ve.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),ve=ve.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),ve=ve.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),ve}const It=ve=>ve.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Ae,Ee){let Ge=Ee.replace(/(\n|\r)/g,"").split("}"),kn=[];return Ge.map(In=>{In!=""&&kn.push(`.${sn.current} ${In}`)}),`<style>${kn.join("}")}</style>`}),wt=(0,Dt.useMemo)(()=>{try{const Ge=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,kn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,In=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,gn=/\(\/attachments\/download\//g;Pn=Pn.replace(gn,"("+Wt.Z.API_SERVER+"/attachments/download/").replace(Ge,"("+Wt.Z.API_SERVER+"/api/attachments/").replace(kn,'"'+Wt.Z.API_SERVER+"/api/attachments/").replace(In,'"'+Wt.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(Ge){}if(Mn){let Ge=-1;return Pn=Pn.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(kn,In,gn){var ai;return++Ge,Nn(kn,Ge,(ai=nn==null?void 0:nn[Ge])==null?void 0:ai.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${It(Pn||"")}</pre>`}let ve=It(Pn);ve=(0,Pe.ZP)(ve);const Ae=(0,Pe.ez)();Pn.match(/\[TOC\]/)&&(ve=ve.replace("<p>[TOC]</p>",(0,Pe.Qv)()),(0,Pe.Iy)()),ve=ve.replace(/(__special_katext_id_\d+__)/g,(Ge,kn)=>{const{type:In,expression:gn}=Ae[kn];return(0,ze.renderToString)(zt(gn)||"",{displayMode:In==="block",throwOnError:!1,output:"html"})}),ve=ve.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Pe.AL)();const Ee=document.createElement("div");if(Ee.innerHTML=ve,ge)return Ee.innerText;if(Ke){const Ge=Ke.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return kt(Ee,Ge),Ee.innerHTML}return setTimeout(()=>Le(),500),Ee.innerHTML},[Pn,Ke]);(0,Dt.useEffect)(()=>{Yt.current&&Yt.current.querySelectorAll(["input","textarea"]).forEach(Ae=>{Ae.oninput=xt,Ae.onblur=Ft,Ae.onfocus=Gt})},[An]),(0,Dt.useEffect)(()=>{var ve,Ae,Ee,Ge,kn;if(nn!=null&&nn.length)try{const In=Yt.current.querySelectorAll(".edu-program-fill-score"),gn=Yt.current.querySelectorAll('[name="edu-program-fill"]');for(const[ai,xi]of gn.entries())xi.value=((ve=nn==null?void 0:nn[ai])==null?void 0:ve.value)||"",((Ae=nn==null?void 0:nn[ai])==null?void 0:Ae.type)==="warning"?xi.className="program-fill-warning":((Ee=nn==null?void 0:nn[ai])==null?void 0:Ee.type)==="success"?xi.className="program-fill-success":xi.className="";for(const[ai,xi]of In.entries())xi.innerHTML=(Ge=nn==null?void 0:nn[ai])!=null&&Ge.score?`${(kn=nn==null?void 0:nn[ai])==null?void 0:kn.score}\u5206`:"";we(nn)}catch(In){console.log(In,"error")}},[nn]);const xt=ve=>{An[ve.target.dataset.id]=An[ve.target.dataset.id]||{},An[ve.target.dataset.id].value=ve.target.value,we([...An]),me(An,ve.target.dataset.id)},Ft=ve=>{An[ve.target.dataset.id]=An[ve.target.dataset.id]||{},An[ve.target.dataset.id].value=ve.target.value,we([...An]),Xt(An,ve.target.dataset.id)},Gt=ve=>{An[ve.target.dataset.id]=An[ve.target.dataset.id]||{},An[ve.target.dataset.id].value=ve.target.value,we([...An]),Ue(An,ve.target.dataset.id)};function kt(ve,Ae){return ve.childNodes.forEach(Ee=>{var Ge;if(Ee.childNodes.length>0)kt(Ee,Ae);else if(Ee.nodeName!=="IMG")if(Ee.innerHTML)Ee.innerHTML=(Ge=Ee.innerHTML)==null?void 0:Ge.replace(new RegExp(Ae,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const kn=document.createElement("span");kn.innerHTML=Ee.textContent.replace(new RegExp(Ae,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Ee.replaceWith(kn)}})}const Yt=(0,Dt.useRef)();Pe.jb.WebkitLineClamp=he,he&&(Fe=gt(gt({},Fe),Pe.jb));function pe(ve){let Ae=ve.target;if(Ae.tagName.toUpperCase()==="A"){let Ee=Ae.getAttribute("href");if(Ee.indexOf("office")>-1)ve.preventDefault(),Be(Ee),Je("office");else if(Ee.indexOf("application/pdf")>-1)ve.preventDefault(),Be(Ee),Je("pdf");else if(Ee.indexOf("text/html")>-1)ve.preventDefault(),Be(Ee),Je("html");else if(Ee.startsWith("#")){ve.preventDefault();let Ge=document.getElementById(Ee.replace("#",""));Ge&&Ge.scrollIntoView(!0)}}}const Le=()=>{var ve;const Ae=(ve=Yt.current)==null?void 0:ve.querySelectorAll("video");Ae==null||Ae.forEach(Ee=>{if(Ee.oncontextmenu=()=>!1,Ee.src.indexOf(".m3u8")>-1&&!Ee.canPlayType("application/vnd.apple.mpegurl")){if(Se.ZP.isSupported()){var Ge=new Se.ZP;Ge.loadSource(Ee.src),Ge.attachMedia(Ee)}}})};(0,Dt.useEffect)(()=>{if(Yt.current&&wt&&wt.match(Mt)&&window.PR.prettyPrint(),Yt.current)return Yt.current.addEventListener("click",pe),()=>{var ve;(ve=Yt.current)==null||ve.removeEventListener("click",pe),(0,Pe.AL)(),(0,Pe.Iy)()}},[wt,Yt.current,pe]),(0,Dt.useEffect)(()=>{var ve;const Ae=Ee=>{Ee.preventDefault(),Ee.clipboardData.setData("text",window.getSelection().toString())};return(ve=Yt.current)==null||ve.addEventListener("copy",Ae),()=>{var Ee;(Ee=Yt.current)==null||Ee.removeEventListener("copy",Ae)}},[Yt.current]);const on=ve=>/<style[\s\S]*?>/i.test(ve||"");return Dt.createElement(Dt.Fragment,null,ge&&Dt.createElement("div",{ref:Yt},wt),!ge&&!on(wt)&&Dt.createElement("div",{ref:Yt,style:gt({},Fe),className:`${Jt||""} ${rn?"disabled-fill":""} markdown-body ${sn.current}`,dangerouslySetInnerHTML:{__html:wt}}),!ge&&on(wt)&&Dt.createElement(Ne,{html:wt}),Dt.createElement(Nt.Z,{close:!0,data:Yn,type:Yn!=null&&Yn.length?vn:"",style:gt({},Re),onClose:()=>Be("")}))}},82438:function(zn,oi,Ot){"use strict";Ot.d(oi,{Z:function(){return ze}});var Dt=Ot(59301),ee={flex_box_center:"flex_box_center___rQJfc",flex_space_between:"flex_space_between___MDW24",flex_box_vertical_center:"flex_box_vertical_center___RZbAv",flex_box_center_end:"flex_box_center_end___ILhJA",flex_box_column:"flex_box_column___Fmij7",orangeColor:"orangeColor___U5vU6",redColor:"redColor___qYa6X",statustitle:"statustitle___pTBLm",statusbody:"statusbody___qUPQx",flex:"flex___VtL45"},Pe=Ot(62957),xe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAPCAYAAADUFP50AAAAAXNSR0IArs4c6QAAAUFJREFUOE+V0ktKw1AUxvH/rVqIxT4wkgwEUSmK4APRBfiYCKU7cOZEBOkadAMZiwhuwJETBQciFRTtwJkPBLW2BRGrRanU9kpN2sSYiGaWc/PjuznnCN2Qh8AkPo+AzXxKLLiPhW7ICtDqB4GzQkqM/huGFZgZcDCBBDaaicsTMKbZH2xfwdY5/ICAEGSasC0AwRYblj+gKkENwfy4WS9V4LHsgsk49EZteJKHdBa6w7AybdZzr3D64ILxGKjtNrx9gfsSRBSYtf6xZh1/u+qQClrIhtdFuHmGvhisJcz65RPsZl2Jc/3QE7FhpgDHuT80x2+O9cR1K/GiCDt3rkQ/+Ns43gDFD0YVmHIuQGOOmiGTARhxwkGd1cZ7Vwd0OppWr3911StpcV++Iwn67q/kyBMuHchErcqwFxT1XZXsfQJqo2zI6kdI4QAAAABJRU5ErkJggg==",Se="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAW1JREFUOE+dkj1IQmEUht9z/blp4VQEjS39eW+oSCFCpFCI4BiKFGWWQUSrCjVVg+lQNJZQDZGNTm1B4NTibS3n2lo0wuqEN8i/a0HfeN7v+d73nO+QJEcKAJzQPAwCnSpKNtoqkyRHqgDrtUFAb6Rnedx43KgT6O5P0GQijFiNLe/Sy3/B8g+YTIRRrb5jP32JYNADr8eOldU0RJEqVlm8r1kyuA/AIEB10OWy4vBgA4ryCIdjCJlMDmfn1zAY6EmyGY/UrAwrgGATWKsn4mGEQl4Uiw+YX9hT73aZiEcl8eMbZAGA0AT6/ZPY3Ykiny/A55tA7uoGqdQFBD2VbDbDugoSTTEj3gTGYgG8Vt7UeG63hNkZJ7a2s+gw1XqPnf5REKhkt4kxNakO08ycbOtRC/7FcakCwNTJ0WwmDI+1LUCZZDkSYGa5Eewf0G0KAnprNYtFQHdPbZhNS1cmLafF5bUTJsyBSVMHPm+/ADTrfrtCH68WAAAAAElFTkSuQmCC",Wt=(ye,Nt,We)=>new Promise((ie,Ne)=>{var bt=ct=>{try{et(We.next(ct))}catch(lt){Ne(lt)}},nt=ct=>{try{et(We.throw(ct))}catch(lt){Ne(lt)}},et=ct=>ct.done?ie(ct.value):Promise.resolve(ct.value).then(bt,nt);et((We=We.apply(ye,Nt)).next())}),ze=({type:ye,resdata:Nt,onok:We,oktext:ie,okloading:Ne})=>{const[bt,nt]=(0,Dt.useState)(!1),{can_copy_list:et,can_copy_num:ct,challenge_type:lt,course_data_list:gt,no_copy_list:mt,no_copy_num:St,no_use_list:Mt,no_use_num:zt,repeat_shixun_num:Ht,student_count:qt,total_num:jt,use_num:Jt}=Nt;let ge=ct>0||ye==="exercise";(0,Dt.useEffect)(()=>{(Nt==null?void 0:Nt.student_count)>0&&nt(!0)},[Nt]),console.log("---11",Ne),(0,Dt.useEffect)(()=>{Ne||nt(!1)},[Ne]);const he=()=>{if(ye==="exercise"&<===1)return Dt.createElement(Dt.Fragment,null,"\u8BFE\u5802\u5185\u6709",Dt.createElement("span",{className:ee.orangeColor},qt),"\u540D\u5B66\u751F\u5DF2\u5728\u5176\u4ED6\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",Dt.createElement("span",{className:ee.orangeColor},Jt),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",Dt.createElement("span",{className:ee.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u4F5C\u7B54\u5DF2\u6311\u6218\u8FC7\u7684\u5B9E\u8BAD\u9898\u3002"));if(ye==="exercise"&<===2)return Dt.createElement(Dt.Fragment,null,"\u8BFE\u5802\u5185\u6709",Dt.createElement("span",{className:ee.orangeColor},qt),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",Dt.createElement("span",{className:ee.orangeColor},Jt),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",Dt.createElement("span",{className:ee.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ye==="shixun"&<===1)return Dt.createElement(Dt.Fragment,null,"\u8BFE\u5802\u5185\u6709",Dt.createElement("span",{className:ee.orangeColor},qt),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u8BE5\u5B9E\u8DF5\u9879\u76EE\uFF0C",Dt.createElement("span",{className:ee.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ye==="shixun"&<===2)return Dt.createElement(Dt.Fragment,null,"\u8BFE\u5802\u5185\u6709",Dt.createElement("span",{className:ee.orangeColor},qt),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7\u8BE5\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",Dt.createElement("span",{className:ee.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ye==="subject"&<===1)return Dt.createElement(Dt.Fragment,null,"\u8BFE\u5802\u5185\u6709",Dt.createElement("span",{className:ee.orangeColor},qt),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",Dt.createElement("span",{className:ee.orangeColor},Jt),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",Dt.createElement("span",{className:ee.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ye==="subject"&<===2)return Dt.createElement(Dt.Fragment,null,"\u8BFE\u5802\u5185\u6709 ",Dt.createElement("span",{className:ee.orangeColor},qt)," \u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u6311\u6218\u8FC7\u5176\u4E2D\u7684 ",Dt.createElement("span",{className:ee.orangeColor},Jt)," \u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",Dt.createElement("span",{className:ee.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ye==="exercisepush")return Dt.createElement(Dt.Fragment,null,"\u8BFE\u5802\u5185\u6709",Dt.createElement("span",{className:ee.orangeColor},qt),"\u540D\u5B66\u751F\u5DF2\u5728\u5176\u4ED6\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u8BD5\u5377\u4E2D\u7684",Dt.createElement("span",{className:ee.orangeColor},Jt),"\u4E2A\u5B9E\u8DF5\u9879\u76EE \uFF0C",Dt.createElement("span",{className:ee.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u5728\u5F53\u524D\u8003\u8BD5\u4E2D\u8FDB\u884C\u4F5C\u7B54\u3002"));if(ye==="shixunpush"&<===1)return Dt.createElement(Dt.Fragment,null,"\u8BFE\u5802\u5185\u6709",Dt.createElement("span",{className:ee.orangeColor},qt),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",Dt.createElement("span",{className:ee.orangeColor},Jt),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",Dt.createElement("span",{className:ee.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ye==="shixunpush"&<===2)return Dt.createElement(Dt.Fragment,null,"\u8BFE\u5802\u5185\u6709",Dt.createElement("span",{className:ee.orangeColor},qt),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7",Dt.createElement("span",{className:ee.orangeColor},Jt),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",Dt.createElement("span",{className:ee.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"))},Fe=()=>{if(ye==="exercise"||ye==="subject"||ye==="exercisepush"||ye==="shixunpush")return Dt.createElement("div",{style:{marginTop:20}},St>0&&Dt.createElement("div",null,Dt.createElement("span",{className:ee.flex},Dt.createElement("img",{src:Se,style:{width:14}}),Dt.createElement("span",{className:ee.statustitle},"\u4E0D\u652F\u6301\u590D\u5236\u7684\u5B9E\u8DF5\u9879\u76EE")),Dt.createElement("div",{className:ee.statusbody},ye==="exercise"&&Dt.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",Dt.createElement("span",{className:ee.redColor},"\u4EE5\u4E0B\u8BD5\u9898\u5C06\u4E0D\u4F1A\u88AB\u53D1\u9001\u81F3\u8BFE\u5802\u4E2D\u3002"),"\u60A8\u4E5F\u53EF\u4EE5\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8005\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002"),(ye==="subject"||ye==="exercisepush")&&Dt.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",ge&&Dt.createElement("span",{className:ee.redColor},"\u4E00\u952E\u590D\u5236\u4E0D\u4F1A\u590D\u5236\u6B64\u90E8\u5206\u9879\u76EE\u3002"),"\u60A8\u53EF\u4EE5\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8005\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002"),ye==="shixunpush"&&Dt.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",ge&&Dt.createElement("span",{className:ee.redColor},"\u4E00\u952E\u590D\u5236\u4E0D\u4F1A\u590D\u5236\u6B64\u90E8\u5206\u9879\u76EE\u3002"),"\u5EFA\u8BAE\u60A8\u91CD\u65B0\u9009\u62E9\u5B9E\u8DF5\u9879\u76EE\u518D\u53D1\u5E03\u4F5C\u4E1A\uFF0C\u4E5F\u53EF\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002"),Dt.createElement("div",null,mt==null?void 0:mt.map((Re,Ke)=>Dt.createElement("a",{href:`/shixuns/${Re.identifier}/challenges`,target:"_blank"},"\u300A",Re==null?void 0:Re.name,"\u300B",Ke+1!==St&&"\u3001"))))),ct>0&&Dt.createElement("div",{style:{marginTop:20}},Dt.createElement("span",{className:ee.flex},Dt.createElement("img",{src:xe,style:{width:14}}),Dt.createElement("span",{className:ee.statustitle},"\u652F\u6301\u590D\u5236\u7684\u5B9E\u8DF5\u9879\u76EE")),Dt.createElement("div",{className:ee.statusbody},ye==="exercise"&&Dt.createElement("div",{style:{marginBottom:15}},"\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u66FF\u6362\u8BD5\u9898\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\u66FF\u6362\u8BD5\u5377\u4E2D\u7684\u539F\u8BD5\u9898\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002"),(ye==="subject"||ye==="exercisepush")&&Dt.createElement("div",{style:{marginBottom:15}},"\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u53D1\u9001\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002"),ye==="shixunpush"&&Dt.createElement("div",{style:{marginBottom:15}},"\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u66FF\u6362\u8BD5\u9898\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\u66FF\u6362\u5F53\u524D\u4F5C\u4E1A\u4E2D\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002"),Dt.createElement("div",null,et==null?void 0:et.map((Re,Ke)=>Dt.createElement("a",{href:`/shixuns/${Re.identifier}/challenges`,target:"_blank"},"\u300A",Re==null?void 0:Re.name,"\u300B",Ke+1!==ct&&"\u3001"))))));if(ye==="shixun")return Dt.createElement("div",{style:{marginTop:20}},ct>0?"\u8BE5\u9879\u76EE\u652F\u6301\u590D\u5236\uFF0C\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u53D1\u9001\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002":"\u8BE5\u9879\u76EE\u4E0D\u652F\u6301\u590D\u5236\uFF0C\u60A8\u53EF\u4EE5\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8005\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002")};return Dt.createElement(Pe.default,{open:bt,onCancel:()=>{nt(!1)},cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",width:700,centered:!0,cancelButtonProps:{style:{display:!ge&&"none"}},zIndex:1003,confirmLoading:Ne,okText:ge?ie:"\u6211\u77E5\u9053\u4E86",onOk:()=>Wt(void 0,null,function*(){ge?yield We([...et,...Mt]):nt(!1)})},Dt.createElement("div",{style:{maxHeight:600,overflow:"auto"}},he(),Fe()))}},97692:function(zn,oi,Ot){"use strict";Ot.d(oi,{h:function(){return St}});var Dt=Ot(59301),ee=Ot(82326),Pe=Ot(28284),xe=Ot(99571),Se=Ot(89780),Wt=Ot.n(Se),se=Ot(37036),ze=Ot(95625),ye=Object.defineProperty,Nt=Object.defineProperties,We=Object.getOwnPropertyDescriptors,ie=Object.getOwnPropertySymbols,Ne=Object.prototype.hasOwnProperty,bt=Object.prototype.propertyIsEnumerable,nt=(Mt,zt,Ht)=>zt in Mt?ye(Mt,zt,{enumerable:!0,configurable:!0,writable:!0,value:Ht}):Mt[zt]=Ht,et=(Mt,zt)=>{for(var Ht in zt||(zt={}))Ne.call(zt,Ht)&&nt(Mt,Ht,zt[Ht]);if(ie)for(var Ht of ie(zt))bt.call(zt,Ht)&&nt(Mt,Ht,zt[Ht]);return Mt},ct=(Mt,zt)=>Nt(Mt,We(zt));const lt=ee.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"]};oi.Z=({callback:Mt,onCancel:zt})=>{const[Ht,qt]=(0,Dt.useState)("python");function jt(ge){qt(mt[ge][1])}function Jt(ge){Mt(ge)}return Dt.createElement(Pe.default,ct(et({},gt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Jt,style:{width:500}}),Dt.createElement(Pe.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},Dt.createElement(ee.default,{getPopupContainer:ge=>ge.parentNode,onChange:jt},Object.keys(mt).map(ge=>Dt.createElement(lt,{key:ge,value:ge},mt[ge][0])))),Dt.createElement(Pe.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},Dt.createElement(St,{mode:Ht})),Dt.createElement("div",{className:"flex-container flex-end"},Dt.createElement(xe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Dt.createElement(xe.ZP,{type:"ghost",onClick:zt},"\u53D6\u6D88")))};function St({value:Mt,onChange:zt,mode:Ht,options:qt={}}){const jt=(0,Dt.useRef)(),[Jt,ge]=(0,Dt.useState)();return(0,Dt.useEffect)(()=>{if(Jt){let he=function(Fe){const Re=Fe.getValue();zt&&zt(Re)};return Jt.on("change",he),()=>{Jt.off("change",he)}}},[Jt,zt]),(0,Dt.useEffect)(()=>{Jt&&Jt.setOption("mode",Ht)},[Jt,Ht]),(0,Dt.useEffect)(()=>{Jt&&(Mt!==Jt.getValue()||Mt==="")&&setTimeout(()=>{Jt.setValue(Mt||"")},300)},[Jt,Mt]),(0,Dt.useEffect)(()=>{if(jt.current&&!Jt){const he=Wt().fromTextArea(jt.current,et({mode:Ht,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},qt));ge(he)}},[jt.current,Jt]),Dt.createElement("div",{className:"my-codemirror-container"},Dt.createElement("textarea",{ref:jt}))}},12290:function(zn,oi,Ot){"use strict";Ot.d(oi,{Z:function(){return br}});var Dt=Ot(59301),ee=Ot(89780),Pe=Ot.n(ee),xe=Ot(76374),Se=Ot(37036),Wt=Ot(6313),se=Ot(25717),ze=Ot(99498),ye=Ot(25419),Nt=Ot(67549),We=Ot(85149),ie=({value:$e="",className:Oe,showTextOnly:Me,showLines:Pi,style:Vi={}})=>{const rr=(0,Dt.useMemo)(()=>"",[$e]);return Dt.createElement(Dt.Fragment,null,Dt.createElement("div",{dangerouslySetInnerHTML:{__html:rr}}))},Ne=Ot(59301),bt=Object.defineProperty,nt=Object.defineProperties,et=Object.getOwnPropertyDescriptors,ct=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable,mt=($e,Oe,Me)=>Oe in $e?bt($e,Oe,{enumerable:!0,configurable:!0,writable:!0,value:Me}):$e[Oe]=Me,St=($e,Oe)=>{for(var Me in Oe||(Oe={}))lt.call(Oe,Me)&&mt($e,Me,Oe[Me]);if(ct)for(var Me of ct(Oe))gt.call(Oe,Me)&&mt($e,Me,Oe[Me]);return $e},Mt=($e,Oe)=>nt($e,et(Oe));let zt=[{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\u56FE\u50CF",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"iconfont icon-jisuan1",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 Ht({onActionCallback:$e,title:Oe,icon:Me,actionName:Pi,className:Vi="",children:rr}){function Dn(){$e(Pi)}return Ne.createElement("a",{title:Oe,className:Vi,onClick:Dn},Ne.createElement("i",{className:`${Me}`}),rr)}var qt=({watch:$e,showNullButton:Oe,showNullProgramButton:Me,onActionCallback:Pi,fullScreen:Vi,insertTemp:rr,hidetoolBar:Dn,extraUse:pi})=>{const Ze=[...zt,{title:`${$e?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${$e?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return Ne.createElement("ul",{className:"markdown-toolbar-container"},!Dn&&Ze.map((je,mi)=>Ne.createElement("li",{key:mi},je.actionName?Ne.createElement(Ht,Mt(St({},je),{onActionCallback:Pi})):Ne.createElement("span",{className:"v-line"}))),Oe?Ne.createElement("li",null,Ne.createElement(Ht,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Pi},Ne.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Me?Ne.createElement(Ne.Fragment,null,Ne.createElement("li",null,Ne.createElement(Ht,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Pi},Ne.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),Ne.createElement("li",null,Ne.createElement(Ht,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Pi},Ne.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,rr&&Ne.createElement("li",null,Ne.createElement(Ht,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${rr}`,onActionCallback:Pi},Ne.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),pi&&Ne.createElement("li",null,pi),Ne.createElement("li",{className:"btn-full-screen"},Ne.createElement(Ht,{icon:`${Vi?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Vi?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Pi})))},jt=Ot(79346),Jt=Ot(28284),ge=Ot(37568),he=Ot(99571),Fe=Object.defineProperty,Re=Object.defineProperties,Ke=Object.getOwnPropertyDescriptors,Mn=Object.getOwnPropertySymbols,tn=Object.prototype.hasOwnProperty,rn=Object.prototype.propertyIsEnumerable,nn=($e,Oe,Me)=>Oe in $e?Fe($e,Oe,{enumerable:!0,configurable:!0,writable:!0,value:Me}):$e[Oe]=Me,me=($e,Oe)=>{for(var Me in Oe||(Oe={}))tn.call(Oe,Me)&&nn($e,Me,Oe[Me]);if(Mn)for(var Me of Mn(Oe))rn.call(Oe,Me)&&nn($e,Me,Oe[Me]);return $e},Xt=($e,Oe)=>Re($e,Ke(Oe));const Ue={labelCol:{span:4},wrapperCol:{span:20}};var Pn=({callback:$e,onCancel:Oe})=>{function Me(Pi){$e(Pi)}return Dt.createElement(Jt.default,Xt(me({},Ue),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Me,style:{width:500}}),Dt.createElement(Jt.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},Dt.createElement(ge.default,null)),Dt.createElement(Jt.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},Dt.createElement(ge.default,null)),Dt.createElement("div",{className:"flex-container flex-end"},Dt.createElement(he.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Dt.createElement(he.ZP,{type:"ghost",onClick:Oe},"\u53D6\u6D88")))},Yn=Ot(97692),Be=Ot(28451),vn=Ot(62957),Je=Ot(77019),An=Ot(73524),we=Ot(59301),sn=({callback:$e,onCancel:Oe})=>{const Me=document.createElement("canvas"),Pi=Me.getContext("2d");Me.width=1e3,Me.height=800,Pi.fillStyle="#ffffff",Pi.fillRect(0,0,Me.width,Me.height);const Vi=Me.toDataURL("image/png");return we.createElement(vn.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},we.createElement(Je.Z,{style:{height:"100vh"}},we.createElement(An.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Vi,visible:!0,title:String(Date.now())},onOk:rr=>{$e({src:rr.url})},onClose:Oe})))},ce=Ot(12378);function Nn(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(Nn,go.CommandHandler),Nn.prototype.canAlignSelection=function(){var $e=this.diagram;return!($e===null||$e.isReadOnly||$e.isModelReadOnly||$e.selection.count<2)},Nn.prototype.alignLeft=function(){var $e=this.diagram;$e.startTransaction("aligning left");var Oe=1/0;$e.selection.each(function(Me){Me instanceof go.Link||(Oe=Math.min(Me.position.x,Oe))}),$e.selection.each(function(Me){Me instanceof go.Link||Me.move(new go.Point(Oe,Me.position.y))}),$e.commitTransaction("aligning left")},Nn.prototype.alignRight=function(){var $e=this.diagram;$e.startTransaction("aligning right");var Oe=-1/0;$e.selection.each(function(Me){if(!(Me instanceof go.Link)){var Pi=Me.actualBounds.x+Me.actualBounds.width;Oe=Math.max(Pi,Oe)}}),$e.selection.each(function(Me){Me instanceof go.Link||Me.move(new go.Point(Oe-Me.actualBounds.width,Me.position.y))}),$e.commitTransaction("aligning right")},Nn.prototype.alignTop=function(){var $e=this.diagram;$e.startTransaction("alignTop");var Oe=1/0;$e.selection.each(function(Me){Me instanceof go.Link||(Oe=Math.min(Me.position.y,Oe))}),$e.selection.each(function(Me){Me instanceof go.Link||Me.move(new go.Point(Me.position.x,Oe))}),$e.commitTransaction("alignTop")},Nn.prototype.alignBottom=function(){var $e=this.diagram;$e.startTransaction("aligning bottom");var Oe=-1/0;$e.selection.each(function(Me){if(!(Me instanceof go.Link)){var Pi=Me.actualBounds.y+Me.actualBounds.height;Oe=Math.max(Pi,Oe)}}),$e.selection.each(function(Me){Me instanceof go.Link||Me.move(new go.Point(Me.actualBounds.x,Oe-Me.actualBounds.height))}),$e.commitTransaction("aligning bottom")},Nn.prototype.alignCenterX=function(){var $e=this.diagram,Oe=$e.selection.first();if(Oe){$e.startTransaction("aligning Center X");var Me=Oe.actualBounds.x+Oe.actualBounds.width/2;$e.selection.each(function(Pi){Pi instanceof go.Link||Pi.move(new go.Point(Me-Pi.actualBounds.width/2,Pi.actualBounds.y))}),$e.commitTransaction("aligning Center X")}},Nn.prototype.alignCenterY=function(){var $e=this.diagram,Oe=$e.selection.first();if(Oe){$e.startTransaction("aligning Center Y");var Me=Oe.actualBounds.y+Oe.actualBounds.height/2;$e.selection.each(function(Pi){Pi instanceof go.Link||Pi.move(new go.Point(Pi.actualBounds.x,Me-Pi.actualBounds.height/2))}),$e.commitTransaction("aligning Center Y")}},Nn.prototype.alignColumn=function($e){var Oe=this.diagram;Oe.startTransaction("align Column"),$e===void 0&&($e=0),$e=parseFloat($e);var Me=new Array;Oe.selection.each(function(pi){pi instanceof go.Link||Me.push(pi)});for(var Pi=0;Pi<Me.length-1;Pi++){var Vi=Me[Pi],rr=Vi.actualBounds.y+Vi.actualBounds.height+$e,Dn=Me[Pi+1];Dn.move(new go.Point(Vi.actualBounds.x,rr))}Oe.commitTransaction("align Column")},Nn.prototype.alignRow=function($e){$e===void 0&&($e=0),$e=parseFloat($e);var Oe=this.diagram;Oe.startTransaction("align Row");var Me=new Array;Oe.selection.each(function(pi){pi instanceof go.Link||Me.push(pi)});for(var Pi=0;Pi<Me.length-1;Pi++){var Vi=Me[Pi],rr=Vi.actualBounds.x+Vi.actualBounds.width+$e,Dn=Me[Pi+1];Dn.move(new go.Point(rr,Vi.actualBounds.y))}Oe.commitTransaction("align Row")},Nn.prototype.canRotate=function($e){var Oe=this.diagram;return!(Oe===null||Oe.isReadOnly||Oe.isModelReadOnly||Oe.selection.count<1)},Nn.prototype.rotate=function($e){$e===void 0&&($e=90);var Oe=this.diagram;Oe.startTransaction("rotate "+$e.toString());var Oe=this.diagram;Oe.selection.each(function(Me){Me instanceof go.Link||Me instanceof go.Group||(Me.angle+=$e)}),Oe.commitTransaction("rotate "+$e.toString())},Nn.prototype.pullToFront=function(){var $e=this.diagram;$e.startTransaction("pullToFront");var Oe=new go.Map;$e.selection.each(function(Me){Oe.set(Me.layer,0)}),Oe.iteratorKeys.each(function(Me){var Pi=0;Me.parts.each(function(Vi){if(!Vi.isSelected){var rr=Vi.zOrder;isNaN(rr)?Vi.zOrder=0:Pi=Math.max(Pi,rr)}}),Oe.set(Me,Pi)}),$e.selection.each(function(Me){Nn._assignZOrder(Me,Oe.get(Me.layer)+1)}),$e.commitTransaction("pullToFront")},Nn.prototype.pushToBack=function(){var $e=this.diagram;$e.startTransaction("pushToBack");var Oe=new go.Map;$e.selection.each(function(Me){Oe.set(Me.layer,0)}),Oe.iteratorKeys.each(function(Me){var Pi=0;Me.parts.each(function(Vi){if(!Vi.isSelected){var rr=Vi.zOrder;isNaN(rr)?Vi.zOrder=0:Pi=Math.min(Pi,rr)}}),Oe.set(Me,Pi)}),$e.selection.each(function(Me){Nn._assignZOrder(Me,Oe.get(Me.layer)-1-Nn._findGroupDepth(Me))}),$e.commitTransaction("pushToBack")},Nn._assignZOrder=function($e,Oe,Me){Me===void 0&&(Me=$e),$e.layer===Me.layer&&($e.zOrder=Oe),$e instanceof go.Group&&$e.memberParts.each(function(Pi){Nn._assignZOrder(Pi,Oe+1,Me)})},Nn._findGroupDepth=function($e){if($e instanceof go.Group){var Oe=0;return $e.memberParts.each(function(Me){Oe=Math.max(Oe,Nn._findGroupDepth(Me))}),Oe+1}else return 0},Nn.prototype.doKeyDown=function(){var $e=this.diagram;if($e!==null){var Oe=$e.lastInput;if(Oe.key==="Up"||Oe.key==="Down"||Oe.key==="Left"||Oe.key==="Right"){var Me=this.arrowKeyBehavior;if(Me==="none")return;if(Me==="select"){this._arrowKeySelect();return}else if(Me==="move"){this._arrowKeyMove();return}else if(Me==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},Nn.prototype._getAllParts=function(){var $e=new Array;return this.diagram.nodes.each(function(Oe){$e.push(Oe)}),this.diagram.parts.each(function(Oe){$e.push(Oe)}),$e},Nn.prototype._arrowKeyMove=function(){var $e=this.diagram,Oe=$e.lastInput,Me=0,Pi=0;if(Oe.control||Oe.meta)Me=1,Pi=1;else if($e.grid!==null){var Vi=$e.grid.gridCellSize;Pi=Vi.width,Me=Vi.height}$e.startTransaction("arrowKeyMove"),$e.selection.each(function(rr){Oe.key==="Up"?rr.move(new go.Point(rr.actualBounds.x,rr.actualBounds.y-Me)):Oe.key==="Down"?rr.move(new go.Point(rr.actualBounds.x,rr.actualBounds.y+Me)):Oe.key==="Left"?rr.move(new go.Point(rr.actualBounds.x-Pi,rr.actualBounds.y)):Oe.key==="Right"&&rr.move(new go.Point(rr.actualBounds.x+Pi,rr.actualBounds.y))}),$e.commitTransaction("arrowKeyMove")},Nn.prototype._arrowKeySelect=function(){var $e=this.diagram,Oe=$e.lastInput,Me=null;Oe.key==="Up"?Me=this._findNearestPartTowards(270):Oe.key==="Down"?Me=this._findNearestPartTowards(90):Oe.key==="Left"?Me=this._findNearestPartTowards(180):Oe.key==="Right"&&(Me=this._findNearestPartTowards(0)),Me!==null&&(Oe.shift?Me.isSelected=!0:Oe.control||Oe.meta?Me.isSelected=!Me.isSelected:$e.select(Me))},Nn.prototype._findNearestPartTowards=function($e){var Oe=this.diagram.selection.first();if(Oe===null)return null;for(var Me=Oe.actualBounds.center,Pi=this._getAllParts(),Vi=1/0,rr=Oe,Dn=0;Dn<Pi.length;Dn++){var pi=Pi[Dn];if(pi!==Oe&&pi.canSelect()){var Ze=pi.actualBounds.center,je=Me.directionPoint(Ze),mi=this._angleCloseness(je,$e);if(mi<=45){var $t=Me.distanceSquaredPoint(Ze);$t*=1+Math.sin(mi*Math.PI/180),$t<Vi&&(Vi=$t,rr=pi)}}}return rr},Nn.prototype._angleCloseness=function($e,Oe){return Math.min(Math.abs(Oe-$e),Math.min(Math.abs(Oe+360-$e),Math.abs(Oe-360-$e)))},Nn.prototype._arrowKeyTree=function(){var $e=this.diagram,Oe=$e.selection.first();if(Oe instanceof go.Node){var Me=$e.lastInput;if(Me.key==="Right"){if(!Oe.isTreeLeaf)if(!Oe.isTreeExpanded)$e.commandHandler.canExpandTree(Oe)&&$e.commandHandler.expandTree(Oe);else{var Pi=this._sortTreeChildrenByY(Oe).first();Pi!==null&&$e.select(Pi)}}else if(Me.key==="Left")if(!Oe.isTreeLeaf&&Oe.isTreeExpanded)$e.commandHandler.canCollapseTree(Oe)&&$e.commandHandler.collapseTree(Oe);else{var Vi=Oe.findTreeParentNode();Vi!==null&&$e.select(Vi)}else if(Me.key==="Up"){var Vi=Oe.findTreeParentNode();if(Vi!==null){var rr=this._sortTreeChildrenByY(Vi),Dn=rr.indexOf(Oe);if(Dn>0){for(var pi=rr.elt(Dn-1);pi!==null&&pi.isTreeExpanded&&!pi.isTreeLeaf;){var Ze=this._sortTreeChildrenByY(pi);pi=Ze.last()}pi!==null&&$e.select(pi)}else $e.select(Vi)}}else if(Me.key==="Down")if(Oe.isTreeExpanded&&!Oe.isTreeLeaf){var Pi=this._sortTreeChildrenByY(Oe).first();Pi!==null&&$e.select(Pi)}else for(;Oe!==null;){var Vi=Oe.findTreeParentNode();if(Vi===null)break;var rr=this._sortTreeChildrenByY(Vi),Dn=rr.indexOf(Oe);if(Dn<rr.length-1){$e.select(rr.elt(Dn+1));break}else Oe=Vi}var je=$e.selection.first();je!==null&&$e.scrollToRect(je.actualBounds)}},Nn.prototype._sortTreeChildrenByY=function($e){var Oe=new go.List().addAll($e.findTreeChildrenNodes());return Oe.sort(function(Me,Pi){var Vi=Me.location,rr=Pi.location;return Vi.y<rr.y?-1:Vi.y>rr.y?1:Vi.x<rr.x?-1:Vi.x>rr.x?1:0}),Oe},Nn.prototype.copyToClipboard=function($e){go.CommandHandler.prototype.copyToClipboard.call(this,$e),this._lastPasteOffset.set(this.pasteOffset)},Nn.prototype.pasteFromClipboard=function(){var $e=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts($e,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),$e},Object.defineProperty(Nn.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function($e){if($e!=="move"&&$e!=="select"&&$e!=="scroll"&&$e!=="tree"&&$e!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+$e);this._arrowKeyBehavior=$e}}),Object.defineProperty(Nn.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function($e){if(!($e instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+$e);this._pasteOffset.set($e)}});var Ci=Nn,It=Ot(74413),wt=Ot(5269),xt=Ot(99064),Ft={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},Gt=Ot(24065),kt=Ot(59301),Yt=($e,Oe,Me)=>new Promise((Pi,Vi)=>{var rr=Ze=>{try{pi(Me.next(Ze))}catch(je){Vi(je)}},Dn=Ze=>{try{pi(Me.throw(Ze))}catch(je){Vi(je)}},pi=Ze=>Ze.done?Pi(Ze.value):Promise.resolve(Ze.value).then(rr,Dn);pi((Me=Me.apply($e,Oe)).next())});function pe({onCancel:$e,callback:Oe}){let Me=(0,Dt.useRef)(),Pi=(0,Dt.useRef)(),Vi=(0,Dt.useRef)(),rr=(0,Dt.useRef)(!1);const Dn=(0,Dt.useRef)(!1),[pi,Ze]=(0,Dt.useState)(0);function je(){const $t=ce.bx.make,pn={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"};Me.current=new ce.S0(Pi.current,{padding:20,grid:$t(ce.s_,"Grid",$t(ce.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),$t(ce.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:ni=>{var Ni=ni.diagram.commandHandler.addTopLevelParts(ni.diagram.selection,!0);Ni||ni.diagram.currentTool.doCancel()},commandHandler:$t(Ci),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:ni=>{var Ni=ni.subject;Ni.location=Ni.location.copy().snapToGridPoint(ni.diagram.grid.gridOrigin,ni.diagram.grid.gridCellSize),setTimeout(()=>{ni.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:ni=>{var Ni=ni.subject;setTimeout(()=>{ni.diagram.commandHandler.editTextBlock()})},LinkRelinked:ni=>{var Ni=ni.parameter.part;Ni.invalidateConnectedLinks();var Hi=ni.subject;ni.diagram.toolManager.linkingTool.isForwards?Hi.toNode.invalidateConnectedLinks():Hi.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Me.current.nodeTemplate=$t(ce.NB,"Auto",{locationSpot:ce.z6.Center,locationObjectName:"SHAPE",desiredSize:new ce.$u(120,60),minSize:new ce.$u(40,40),resizable:!0,resizeCellSize:new ce.$u(10,10),rotatable:!0},new ce.KX("location","loc",ce.E9.parse).makeTwoWay(ce.E9.stringify),new ce.KX("desiredSize","size",ce.$u.parse).makeTwoWay(ce.$u.stringify),$t(ce.bn,{name:"SHAPE",fill:pn.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:ce.z6.AllSides,toSpot:ce.z6.AllSides},new ce.KX("figure"),new ce.KX("fill"),new ce.KX("stroke","borderColor"),new ce.KX("strokeWidth","thickness"),new ce.KX("strokeDashArray","dash")),$t(ce.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),$t(ce.al,{margin:1,textAlign:"center",overflow:ce.al.OverflowEllipsis,editable:!0},new ce.KX("text").makeTwoWay(),new ce.KX("stroke","color"))),Me.current.nodeTemplate.toolTip=$t("ToolTip",$t(ce.s_,"Vertical",{maxSize:new ce.$u(200,NaN)},$t(ce.al,{font:"bold 10pt sans-serif",textAlign:"center"},new ce.KX("text")),$t(ce.al,{font:"10pt sans-serif",textAlign:"center"},new ce.KX("text","details"))));function ei(ni,Ni){var Hi=(Ii,Qi)=>{Ii.handled=!0,Ii.diagram.model.commit(Or=>{var Lr=Qi.part.adornedPart,Nr=new ce.E9().setRectSpot(Lr.actualBounds,ni);Nr.subtract(Lr.location),Nr.scale(2,2),Nr.x+=Math.sign(Nr.x)*130,Nr.y+=Math.sign(Nr.y)*130,Nr.add(Lr.location),Nr.snapToGridPoint(Ii.diagram.grid.gridOrigin,Ii.diagram.grid.gridCellSize);var Rr=Or.copyNodeData(Lr.data);Or.setGroupKeyForNodeData(Rr,Or.getGroupKeyForNodeData(Lr.data)),Or.addNodeData(Rr);var dn={from:Lr.key,to:Or.getKeyForNodeData(Rr)};Or.addLinkData(dn);var $r=Ii.diagram.findNodeForData(Rr);$r.location=Nr,Ii.diagram.select($r),setTimeout(()=>{Ii.diagram.commandHandler.editTextBlock()},20)})};return $t(ce.bn,{figure:Ni,alignment:ni,alignmentFocus:ni.opposite(),width:ni.equals(ce.z6.Top)||ni.equals(ce.z6.Bottom)?25:18,height:ni.equals(ce.z6.Top)||ni.equals(ce.z6.Bottom)?18:25,fill:"orange",stroke:pn.white,strokeWidth:4,mouseEnter:(Ii,Qi)=>Qi.fill="dodgerblue",mouseLeave:(Ii,Qi)=>Qi.fill="orange",isActionable:!0,click:Hi,contextClick:Hi})}function Bi(ni){return $t(ce.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:(Ni,Hi)=>Hi.fill="dodgerblue",mouseLeave:(Ni,Hi)=>Hi.fill="orange",click:(Ni,Hi)=>{Ni.diagram.commandHandler.showContextMenu(Hi.part.adornedPart)}},ni||{})}Me.current.nodeTemplate.selectionAdornmentTemplate=$t(ce.uz,"Spot",$t(ce.Vm,{padding:10}),ei(ce.z6.Top,"TriangleUp"),ei(ce.z6.Left,"TriangleLeft"),ei(ce.z6.Right,"TriangleRight"),ei(ce.z6.Bottom,"TriangleDown"),Bi({alignment:new ce.z6(.75,0)}));function _e(ni,Ni){return(Hi,Ii)=>{Hi.handled=!0,Hi.diagram.model.commit(Qi=>{Qi.set(Ii.part.adornedPart.data,ni,Ni)})}}function un(ni,Ni){return Ni||(Ni="color"),$t(ce.bn,{width:16,height:16,stroke:"lightgray",fill:ni,margin:1,background:"transparent",mouseEnter:(Hi,Ii)=>Ii.stroke="dodgerblue",mouseLeave:(Hi,Ii)=>Ii.stroke="lightgray",click:_e(Ni,ni),contextClick:_e(Ni,ni)})}function $n(){return[$t("ContextMenuButton",$t(ce.s_,"Horizontal",un(pn.white,"fill"),un(pn.beige,"fill"),un(pn.extralightblue,"fill"),un(pn.extralightred,"fill"))),$t("ContextMenuButton",$t(ce.s_,"Horizontal",un(pn.lightgray,"fill"),un(pn.lightgreen,"fill"),un(pn.lightblue,"fill"),un(pn.lightred,"fill")))]}function vi(){return[$t("ContextMenuButton",$t(ce.s_,"Horizontal",un(pn.black),un(pn.green),un(pn.blue),un(pn.red))),$t("ContextMenuButton",$t(ce.s_,"Horizontal",un(pn.white),un(pn.magenta),un(pn.purple),un(pn.orange)))]}function Oi(ni,Ni){return Ni||(Ni="thickness"),$t(ce.bn,"LineH",{width:16,height:16,strokeWidth:ni,margin:1,background:"transparent",mouseEnter:(Hi,Ii)=>Ii.background="dodgerblue",mouseLeave:(Hi,Ii)=>Ii.background="transparent",click:_e(Ni,ni),contextClick:_e(Ni,ni)})}function Ei(ni,Ni){return Ni||(Ni="dash"),$t(ce.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:ni,margin:1,background:"transparent",mouseEnter:(Hi,Ii)=>Ii.background="dodgerblue",mouseLeave:(Hi,Ii)=>Ii.background="transparent",click:_e(Ni,ni),contextClick:_e(Ni,ni)})}function ri(){return[$t("ContextMenuButton",$t(ce.s_,"Horizontal",Oi(1),Oi(2),Oi(3),Oi(4))),$t("ContextMenuButton",$t(ce.s_,"Horizontal",Ei(null),Ei([2,4]),Ei([4,4])))]}function bi(ni,Ni){return Ni||(Ni="figure"),$t(ce.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:ni,margin:1,background:"transparent",mouseEnter:(Hi,Ii)=>Ii.fill="dodgerblue",mouseLeave:(Hi,Ii)=>Ii.fill="lightgray",click:_e(Ni,ni),contextClick:_e(Ni,ni)})}Me.current.nodeTemplate.contextMenu=$t("ContextMenu",$t("ContextMenuButton",$t(ce.s_,"Horizontal",bi("Rectangle"),bi("RoundedRectangle"),bi("Ellipse"),bi("Diamond"))),$t("ContextMenuButton",$t(ce.s_,"Horizontal",bi("Parallelogram2"),bi("ManualOperation"),bi("Procedure"),bi("Cylinder1"))),$t("ContextMenuButton",$t(ce.s_,"Horizontal",bi("Terminator"),bi("CreateRequest"),bi("Document"),bi("TriangleDown"))),$n(),vi(),ri()),Me.current.groupTemplate=$t(ce.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:ce.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(ni,Ni)=>{var Hi=Ni.addMembers(Ni.diagram.selection,!0);Hi||Ni.diagram.currentTool.doCancel()},avoidable:!1},new ce.KX("location","loc",ce.E9.parse).makeTwoWay(ce.E9.stringify),$t(ce.s_,"Auto",{name:"BODY"},$t(ce.bn,{parameter1:10,fill:pn.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:ce.z6.AllSides,toSpot:ce.z6.AllSides},new ce.KX("fill"),new ce.KX("stroke","color"),new ce.KX("strokeWidth","thickness"),new ce.KX("strokeDashArray","dash")),$t(ce.Vm,{background:"transparent",margin:20})),$t(ce.al,{alignment:ce.z6.Top,alignmentFocus:ce.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new ce.KX("text"),new ce.KX("stroke","color"))),Me.current.groupTemplate.selectionAdornmentTemplate=$t(ce.uz,"Spot",$t(ce.s_,"Auto",$t(ce.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),$t(ce.Vm,{margin:1.5})),Bi({alignment:ce.z6.TopRight,alignmentFocus:ce.z6.BottomRight})),Me.current.groupTemplate.contextMenu=$t("ContextMenu",$n(),vi(),ri()),Me.current.linkTemplate=$t(ce.rU,{layerName:"Foreground",routing:ce.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new ce.KX("fromSpot","fromSpot",ce.z6.parse),new ce.KX("toSpot","toSpot",ce.z6.parse),new ce.KX("fromShortLength","dir",ni=>ni>=1?10:0),new ce.KX("toShortLength","dir",ni=>ni>=1?10:0),new ce.KX("points").makeTwoWay(),$t(ce.bn,{strokeWidth:2},new ce.KX("stroke","color"),new ce.KX("strokeWidth","thickness"),new ce.KX("strokeDashArray","dash")),$t(ce.bn,{segmentIndex:0,segmentOffset:new ce.E9(15,0),segmentOrientation:ce.rU.OrientAlong,alignmentFocus:ce.z6.Right,figure:"circle",width:10,strokeWidth:0},new ce.KX("fill","color"),new ce.KX("visible","dir",ni=>ni===1)),$t(ce.bn,{segmentIndex:-1,segmentOffset:new ce.E9(-10,6),segmentOrientation:ce.rU.OrientPlus90,alignmentFocus:ce.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new ce.KX("fill","color"),new ce.KX("visible","dir",ni=>ni>=1),new ce.KX("width","thickness",ni=>7+3*ni),new ce.KX("height","thickness",ni=>7+3*ni),new ce.KX("segmentOffset","thickness",ni=>new ce.E9(-15,4+1.5*ni))),$t(ce.bn,{segmentIndex:0,segmentOffset:new ce.E9(15,-6),segmentOrientation:ce.rU.OrientMinus90,alignmentFocus:ce.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new ce.KX("fill","color"),new ce.KX("visible","dir",ni=>ni===2),new ce.KX("width","thickness",ni=>7+3*ni),new ce.KX("height","thickness",ni=>7+3*ni),new ce.KX("segmentOffset","thickness",ni=>new ce.E9(-15,4+1.5*ni))),$t(ce.al,{alignmentFocus:new ce.z6(0,1,-4,0),editable:!0},new ce.KX("text").makeTwoWay(),new ce.KX("stroke","color"))),Me.current.linkTemplate.selectionAdornmentTemplate=$t(ce.uz,$t(ce.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Sr(2)},new ce.KX("pathPattern","thickness",Sr)),Bi({alignmentFocus:new ce.z6(0,0,-6,-4)}));function Sr(ni){return $t(ce.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(ni+4).toString()+" H3"})}function mr(ni){var Ni="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return ni===0?Ni="M0 0 M16 16 M0 8 L16 8":ni===2&&(Ni="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),$t(ce.bn,{geometryString:Ni,margin:2,background:"transparent",mouseEnter:(Hi,Ii)=>Ii.background="dodgerblue",mouseLeave:(Hi,Ii)=>Ii.background="transparent",click:_e("dir",ni),contextClick:_e("dir",ni)})}function wr(ni){var Ni=(Hi,Ii)=>{Hi.handled=!0,Hi.diagram.model.commit(Qi=>{var Or=Ii.part.adornedPart;Qi.set(Or.data,ni?"toSpot":"fromSpot",ce.z6.stringify(ce.z6.AllSides)),(ni?Or.toNode:Or.fromNode).invalidateConnectedLinks()})};return $t(ce.bn,{width:12,height:12,fill:"transparent",mouseEnter:(Hi,Ii)=>Ii.background="dodgerblue",mouseLeave:(Hi,Ii)=>Ii.background="transparent",click:Ni,contextClick:Ni})}function an(ni,Ni){var Hi=0,Ii=ce.z6.RightSide;ni.equals(ce.z6.Top)?(Hi=270,Ii=ce.z6.TopSide):ni.equals(ce.z6.Left)?(Hi=180,Ii=ce.z6.LeftSide):ni.equals(ce.z6.Bottom)&&(Hi=90,Ii=ce.z6.BottomSide),Ni||(Hi-=180);var Qi=(Or,Lr)=>{Or.handled=!0,Or.diagram.model.commit(Nr=>{var Rr=Lr.part.adornedPart;Nr.set(Rr.data,Ni?"toSpot":"fromSpot",ce.z6.stringify(Ii)),(Ni?Rr.toNode:Rr.fromNode).invalidateConnectedLinks()})};return $t(ce.bn,{alignment:ni,alignmentFocus:ni.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:Hi,background:"transparent",mouseEnter:(Or,Lr)=>Lr.background="dodgerblue",mouseLeave:(Or,Lr)=>Lr.background="transparent",click:Qi,contextClick:Qi})}Me.current.linkTemplate.contextMenu=$t("ContextMenu",vi(),ri(),$t("ContextMenuButton",$t(ce.s_,"Horizontal",mr(0),mr(1),mr(2))),$t("ContextMenuButton",$t(ce.s_,"Horizontal",$t(ce.s_,"Spot",wr(!1),an(ce.z6.Top,!1),an(ce.z6.Left,!1),an(ce.z6.Right,!1),an(ce.z6.Bottom,!1)),$t(ce.s_,"Spot",{margin:new ce.Zt(0,0,0,2)},wr(!0),an(ce.z6.Top,!0),an(ce.z6.Left,!0),an(ce.z6.Right,!0),an(ce.z6.Bottom,!0)))));const wo=`{ "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 Ar=["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 mo(ni){return console.log("shapeName:",ni),Ar.indexOf(ni)>=0}var Ve=new ce.YI(Vi.current,{maxSelectionCount:1,linkTemplate:$t(ce.rU,{locationSpot:ce.z6.Center,selectionAdornmentTemplate:$t(ce.uz,"Link",{locationSpot:ce.z6.Center},$t(ce.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),$t(ce.bn,{toArrow:"Standard",stroke:null}))},{routing:ce.rU.AvoidsNodes,curve:ce.rU.JumpOver,corner:5,toShortLength:4},new ce.KX("points"),$t(ce.bn,{isPanelMain:!0,strokeWidth:2}),$t(ce.bn,{toArrow:"Standard",stroke:null})),model:new ce.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...ce.bn.getFigureGenerators().toArray().map(ni=>({text:"\u672A\u547D\u540D",size:"100 100",figure:ni.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Me.current.addDiagramListener("TextEdited",function(ni){var Ni;const Hi=ni.subject.part;var Ii=(Ni=document.activeElement)==null?void 0:Ni.value;typeof Ii=="string"&&Ii.trim()===""&&Me.current.model.commit(function(Qi){Qi.set(Hi.data,"text","\u672A\u547D\u540D"),Me.current.commandHandler.stopCommand()},"increment")}),Ve.nodeTemplate=$t(ce.NB,"Auto",{locationSpot:ce.z6.Center},new ce.KX("location","location",ce.E9.parse).makeTwoWay(ce.E9.stringify),$t(ce.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 ce.KX("stroke").makeTwoWay(),new ce.KX("fill").makeTwoWay(),new ce.KX("figure")),$t(ce.al,{margin:new ce.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new ce.$u(16,16),maxSize:new ce.$u(10,NaN),textAlign:"center",editable:!0},new ce.KX("key").makeTwoWay())),setTimeout(()=>{Me.current.grid=$t(ce.s_,"Grid",$t(ce.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),$t(ce.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Me.current.grid.visible=!0,Me.current.grid.gridCellStroke="darkgray",Me.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Me.current,Me.current}const mi=()=>Yt(this,null,function*(){var $t,pn=Me.current.makeImage();const ei=yield(0,xt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:pn.src,file_data:JSON.stringify({login:($t=(0,Gt.eY)())==null?void 0:$t.login,data:JSON.parse(Me.current.model.toJson())})}});Oe({src:ei.url})});return(0,Dt.useEffect)(()=>(setTimeout(()=>{je()},500),Ze(pi+1),()=>{Me.current=null}),[]),kt.createElement("div",{ref:Dn,className:rr.current?`${Ft.maxH60} body-overflow-initial`:"body-overflow-initial"},kt.createElement(vn.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!pi,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:kt.createElement(Je.Z,null,kt.createElement(wt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),kt.createElement(wt.Z,{onClick:()=>{var $t,pn,ei=Me.current.selection.first();if(rr.current=!rr.current,document.activeElement&&ei){let Bi=(pn=($t=document.activeElement)==null?void 0:$t.value)==null?void 0:pn.trim();typeof Bi=="string"&&Me.current.model.commit(function(_e){_e.set(ei.data,"text",Bi||"\u672A\u547D\u540D"),Me.current.commandHandler.stopCommand()},"increment")}Ze(pi+1)}},kt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:$e},kt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:Ft.flowChartWrp},kt.createElement("div",{style:{display:"flex",height:"100%"}},kt.createElement("div",{style:{width:"300px",height:"100%"}},kt.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),kt.createElement("div",{style:{height:"calc(100% - 50px)"},className:Ft.myPaletteDiv,ref:Vi})),kt.createElement("div",{style:{flex:1,position:"relative"}},kt.createElement("div",{ref:Pi,style:{height:"80vh"}}))),kt.createElement("div",{className:"tr"},kt.createElement(he.ZP,{size:"large",onClick:mi,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var Le=pe,on=Ot(47889),ve=Ot(71051);const Ae=on.ZP.Group,Ee={margin:"0 8px"};var Ge=({callback:$e,onCancel:Oe})=>{function Me(Pi){$e(Pi)}return Dt.createElement(Jt.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Me},Dt.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},Dt.createElement("span",{style:Ee},"\u5355\u5143\u683C\u6570\uFF1A"),Dt.createElement("span",{style:Ee},"\u884C\u6570"),Dt.createElement(Jt.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},Dt.createElement(ve.Z,null)),Dt.createElement("span",{style:Ee},"\u5217\u6570"),Dt.createElement(Jt.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},Dt.createElement(ve.Z,null))),Dt.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},Dt.createElement("span",{style:Ee},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),Dt.createElement(Jt.default.Item,{name:"align"},Dt.createElement(Ae,null,Dt.createElement(on.ZP,{value:"default"},Dt.createElement("i",{className:"fa fa-align-justify"})),Dt.createElement(on.ZP,{value:"left"},Dt.createElement("i",{className:"fa fa-align-left"})),Dt.createElement(on.ZP,{value:"center"},Dt.createElement("i",{className:"fa fa-align-center"})),Dt.createElement(on.ZP,{value:"right"},Dt.createElement("i",{className:"fa fa-align-right"}))))),Dt.createElement("div",{className:"flex-container flex-end"},Dt.createElement(he.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Dt.createElement(he.ZP,{type:"ghost",onClick:Oe},"\u53D6\u6D88")))},kn=Ot(71411),In=Ot(80727),gn=Ot.n(In),xi=(0,Dt.forwardRef)(({use3d:$e,width:Oe,height:Me,callback:Pi,showSaveButton:Vi},rr)=>{const Dn=(0,Dt.useRef)(),pi=(0,Dt.useRef)(),[Ze,je]=(0,Dt.useState)(!1),mi=(0,Dt.useRef)({id:Dn,appName:"graphing",width:Oe||1e3,height:Me||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,Dt.useEffect)(()=>{pi.current=new(gn())(mi.current,!0),window.onload=function(){pi.current.inject("applet_container")}},[]);const $t=()=>{var pn=window.ggbApplet.getPNGBase64(1,!0,72);return Pi&&Pi(pn),pn};return(0,Dt.useEffect)(()=>{mi.current.appName=Ze?"3D":"graphing",pi.current.inject("applet_container")},[Ze]),(0,Dt.useEffect)(()=>{je($e)},[$e]),(0,Dt.useImperativeHandle)(rr,()=>({getImgData:$t})),Dt.createElement(Dt.Fragment,null,Dt.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Dn}),Dt.createElement(Je.Z,{align:"middle"},Dt.createElement(wt.Z,{flex:1},Dt.createElement(kn.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Ze,onChange:pn=>je(pn)})),Dt.createElement(wt.Z,null,Dt.createElement(he.ZP,{size:"large",onClick:$t,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Gn=Ot(41588),Si=Ot(6767);const _n="link",Ti="upload-image",Di="add-flowchart",$i="draw-image",Kr="add-flowchart",Xi="code-block",zr="add-table",so="------------",po={default:so,left:`:${so}`,center:`:${so}:`,right:`${so}:`};var Jr=Ot(58856);function Do(){}let Bo=0;const Ko=1e4,bo="\u2581",ko="@\u2581\u2581@",Ct="@\u2581@",Zn=`
|
|
**\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`,bn=["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 Pr($e){return/^\d+$/.test($e)?`${$e}px`:$e}const Zi=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",_r={[Zi+"-B"]:"bold",[Zi+"-I"]:"italic"},ho={[_n]:"\u6DFB\u52A0\u94FE\u63A5",[Xi]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Ti]:"\u6DFB\u52A0\u56FE\u7247",[$i]:"\u6DFB\u52A0\u753B\u56FE",[Di]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[zr]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var br=({defaultValue:$e="",onChange:Oe,width:Me="100%",height:Pi=400,miniToolbar:Vi=!1,isFocus:rr=!1,watch:Dn,insertTemp:pi,mode:Ze="markdown",id:je="markdown-editor-id",showResizeBar:mi=!1,noStorage:$t=!1,showNullButton:pn=!1,showNullProgramButton:ei=!1,hidetoolBar:Bi=!1,fullScreen:_e=!1,onBlur:un,onCMBeforeChange:$n,onFullScreen:vi,className:Oi="",disablePaste:Ei=!1,disabled:ri=!1,disabledFill:bi=!1,placeholder:Sr="",values:mr="",extraUse:wr})=>{const[an,wo]=(0,Dt.useState)(null),[Ar,mo]=(0,Dt.useState)($e),[Ve,ni]=(0,Dt.useState)(Dn),[Ni,Hi]=(0,Dt.useState)(_e),[Ii,Qi]=(0,Dt.useState)(""),[Or,Lr]=(0,Dt.useState)(0),[Nr,Rr]=(0,Dt.useState)(Pi),[dn,$r]=(0,Dt.useState)(!1),[cn,Ri]=(0,Dt.useState)(0),[_i,xr]=(0,Dt.useState)(0),zo=(0,Dt.useRef)(),Mo=(0,Dt.useRef)(),qr=(0,Dt.useRef)(),vo=(0,Dt.useRef)();(0,Dt.useEffect)(()=>{const At=window.scrollY||window.pageYOffset;mo(mr),an==null||an.setValue(mr),window.scrollTo(0,At)},[mr]),(0,Dt.useEffect)(()=>{vi==null||vi(Ni)},[Ni]),(0,Dt.useEffect)(()=>{if(zo.current){let At=function(Ut,oe){var fe;if(Ei){oe.preventDefault();return}const De=oe.clipboardData;if(De){const He=De.types.toString(),Ye=De.items;if(He==="Files"||De.types.indexOf("Files")>-1){if(oe.preventDefault(),Ze=="stex")return;try{let Sn=Ye[1];((fe=Ye[0])==null?void 0:fe.kind)==="file"&&(Sn=Ye[0]);const xn=Sn.getAsFile(),Qe=xn.name.split(".").pop();(0,Be.I)(xn,jn=>{var hi,ae,En;jn.id?((hi=xn==null?void 0:xn.type)==null?void 0:hi.indexOf("image"))>-1?re.replaceSelection(`<img width="100%" src="/api/attachments/${jn.id}?type=${jn.content_type})" alt="" />`):((ae=xn==null?void 0:xn.type)==null?void 0:ae.indexOf("video"))>-1?re.replaceSelection(`<video width="100%" controls src="/api/attachments/${jn.id}"></video>`):((En=xn==null?void 0:xn.type)==null?void 0:En.indexOf("pdf"))>-1?re.replaceSelection(`<a href="/api/attachments/${jn.id}?type=${xn.type}&disposition=inline" target="_blank">${xn.name}</a>`):bn.includes(Qe)?re.replaceSelection(`<a href="/api/attachments/${jn.id}?type=office&disposition=inline" target="_blank">${xn.name}</a>`):re.replaceSelection(`[${xn.name}](/api/attachments/${jn.id}?type=${jn.content_type})`):(jn==null?void 0:jn.status)===401&&(document.location.href="/user/login")})}catch(Sn){Si.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const re=Pe().fromTextArea(zo.current,{mode:Ze,lineNumbers:!Vi,lineWrapping:!0,value:$e,autoCloseTags:!0,autoCloseBrackets:!0});return re.on("keyup",function(Ut,oe){oe.keyCode===8&&(Ut.getValue()==""?re.setOption("placeholder",Sr):re.setOption("placeholder",null))}),re.on("keydown",function(Ut,oe){if(oe.keyCode===8){var fe=hn(Ut);fe&&oe.preventDefault()}}),rr&&re.focus(),re.on("paste",At),ri&&re.on("beforeChange",function(Ut,oe){(oe.origin==="paste"||oe.origin==="+input")&&oe.cancel()}),wo(re),()=>{re.off("paste",At)}}},[]);const Te=(0,Dt.useCallback)(()=>{if(Mo.current)try{}catch(At){console.log(At,"---- to set md editor body height")}},[Nr,Mo,Ni]);(0,Dt.useEffect)(()=>{function At(){let re=new xe.Z(Ut=>{for(let oe of Ut)(oe.target.offsetHeight>0||oe.target.offsetWidth>0)&&(Te(),an.setSize("100%","100%"),an.refresh())});return re.observe(zo.current.parentElement),re}if(an){const re=At();return()=>{var Ut,oe;(Ut=zo.current)!=null&&Ut.parentElement&&re.unobserve((oe=zo.current)==null?void 0:oe.parentElement)}}},[an,Te]),(0,Dt.useEffect)(()=>{if(an){let At=[];for(const[re,Ut]of Object.entries(_r)){let oe={[re]:()=>{be(Ut)}};At.push(oe),an.addKeyMap(oe)}return()=>{for(let re of At)an.removeKeyMap(re)}}},[an]),(0,Dt.useEffect)(()=>{_e!==Ni&&Hi(_e)},[_e]),(0,Jr.Z)(()=>{if(!$t&&Or>0){let At=new Date().getTime(),re=window.sessionStorage.getItem(je);At>=Or+Ko&&(!re||re!==Ar)&&(window.sessionStorage.setItem(je,Ar),$r(!0))}},Ko),(0,Dt.useEffect)(()=>{ni(Dn)},[an,Dn]),(0,Dt.useEffect)(()=>{an&&rr&&an.focus()},[an,rr]),(0,Dt.useEffect)(()=>{if(Ve&&an){let At=function(Ut){let oe=Ut.target;if(vo.current){let fe=oe.scrollTop/oe.scrollHeight;vo.current.scrollTop=vo.current.scrollHeight*fe}};const re=an.getScrollerElement();return re.addEventListener("scroll",At),()=>{re.removeEventListener("scroll",At)}}},[an,Ve]),(0,Dt.useEffect)(()=>{if(an&&$n){let At=function(re,Ut){$n(re,Ut)};return an.on("beforeChange",At),()=>{an.off("beforeChange",At)}}},[an,$n]),(0,Dt.useEffect)(()=>{if(an&&un){let At=function(){un(an.getValue())};return an.on("blur",At),()=>{an.off("blur",At)}}},[an,un]);function hn(At,re){var Ut=At.getDoc(),oe=Ut.getCursor(),fe=Ut.getLine(oe.line),De=fe.charAt(oe.ch-1),He=fe.lastIndexOf("@\u2581@",oe.ch),Ye=fe.lastIndexOf("@\u2581\u2581@",oe.ch),Sn=He>Ye?He:Ye,xn=He>Ye?3:4;if(ko.indexOf(De)===-1)return null;if(console.log("change1:",re,At,fe,oe,Sn,He,Ye,De),Sn>=0&&oe.ch-Sn<5){var Qe=Sn+xn;return Ut.replaceRange("",{line:oe.line,ch:Sn},{line:oe.line,ch:Qe}),{line:oe.line,ch:Qe}}return null}(0,Dt.useEffect)(()=>{if(an){let At=function(re,Ut){const oe=re.getValue();mo(oe),Lr(new Date().getTime()),re.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Oe&&(ei?Oe(oe,Vn(oe)):Oe(oe))};return an.on("change",At),()=>{an.off("change",At)}}},[an,Oe]),(0,Dt.useEffect)(()=>{if(an)if($e==null)an.setValue(""),mo("");else{const At=window.scrollY||window.pageYOffset;$e!==an.getValue()&&(an.setValue($e),mo($e),an.setCursor(ri?1:an.lineCount(),0),window.scrollTo(0,At))}},[an,$e]);const be=(0,Dt.useCallback)(At=>{const re=an.getCursor(),Ut=an.getSelection();let oe=Ut.split(`
|
|
`);switch(At){case"bold":return an.replaceSelection("**"+Ut+"**"),Ut===""&&an.setCursor(re.line,re.ch+2),an.focus();case"italic":return an.replaceSelection("*"+Ut+"*"),Ut===""&&an.setCursor(re.line,re.ch+1),an.focus();case"code":return an.replaceSelection("`"+Ut+"`"),Ut===""&&an.setCursor(re.line,re.ch+1),an.focus();case"inline-latex":return Qi("inline-latex"),an.focus();case"latex":return an.replaceSelection("```latex\n"+Ut+"\n```"),an.setCursor(re.line+1,Ut.length+1),an.focus();case"line-break":return an.replaceSelection(`<br/>
|
|
`),an.focus();case"list-ul":return Ut===""?an.replaceSelection("- "+Ut):an.replaceSelection(oe.map(fe=>fe===""?"":`- ${fe}`).join(`
|
|
`)),an.focus();case"list-ol":return Ut===""?an.replaceSelection("1. "+Ut):an.replaceSelection(oe.map((fe,De)=>fe===""?"":`${De+1}. ${fe}`).join(`
|
|
`)),an.focus();case"add-null-ch":return Ut===""&&an.setCursor(re.line,re.ch),an.replaceSelection(bo),an.focus();case"add-signal":return Ut===""&&an.setCursor(re.line,re.ch),an.replaceSelection(Ct),an.focus();case"add-multiple":return Ut===""&&an.setCursor(re.line,re.ch),an.replaceSelection(ko),an.focus();case"inster-template-1":return Ut===""&&an.setCursor(re.line,re.ch),an.replaceSelection(Zn),an.focus();case"eraser":return an.setValue(""),an.focus();case"trigger-watch":return ni(!Ve),an.focus();case"trigger-full-screen":return Hi(!Ni),an.focus();case _n:Qi(_n);return;case Xi:Qi(Xi);return;case Ti:Qi(Ti);return;case $i:Qi($i);return;case"maths-latex":Qi("maths-latex");return;case Di:Qi(Di);return;case zr:Qi(zr);return;default:throw new Error}},[an,Ve,Ni]),Tt=(0,Dt.useCallback)((At,re)=>{var Ut,oe,fe,De,He,Ye;switch(Qi(""),Ii){case _n:const{title:hi,link:ae}=At;return an.replaceSelection(`[${hi}](${ae})`),an.focus();case Xi:const{language:En,content:Tn}=At;return an.replaceSelection(["```"+En,Tn,"```"].join(`
|
|
`)),an.focus();case"maths-latex":for(var Sn=atob(At),xn=new Uint8Array(Sn.length),Qe=0;Qe<Sn.length;Qe++)xn[Qe]=Sn.charCodeAt(Qe);var jn=new Blob([xn],{type:"image/png"});(0,Be.I)(jn,lr=>{lr.id?an.replaceSelection(``):(lr==null?void 0:lr.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":an.replaceSelection("`$$"+At+"$$`");break;case Ti:case $i:case Kr:const{src:wn,alt:Bn}=At,Rn=re,di=(fe=(oe=(Ut=Rn==null?void 0:Rn.name)==null?void 0:Ut.split("."))==null?void 0:oe.pop)==null?void 0:fe.call(oe);return((De=Rn==null?void 0:Rn.type)==null?void 0:De.indexOf("image"))>-1||!(Rn!=null&&Rn.type)?Rn!=null&&Rn.align||Rn!=null&&Rn.width?an.replaceSelection(`<p style="text-align:${Rn.align||"initial"}"><img width="${Rn.width?Rn.width+"%":"initial"}" src="${wn}" alt="${Bn||""}" /></p>`):an.replaceSelection(`<img width="100%" src="${wn}" alt="${Bn||""}" />`):((He=Rn==null?void 0:Rn.type)==null?void 0:He.indexOf("video"))>-1?an.replaceSelection(`<video width="100%" controls src="${wn}"></video>`):((Ye=Rn==null?void 0:Rn.type)==null?void 0:Ye.indexOf("pdf"))>-1?an.replaceSelection(`<a href="${wn}?type=${Rn.type}&disposition=inline" target="_blank">${Rn.name}</a>`):bn.includes(di)?an.replaceSelection(`<a href="${wn}?type=office&disposition=inline" target="_blank">${Rn.name}</a>`):an.replaceSelection(`[${Rn.name}](${wn})`),an.focus();case zr:const{row:qn,col:ui,align:ci}=At;let zi=`
|
|
`;for(let lr=0;lr<qn;lr++){let cr=[],yr=[];for(let ii=0;ii<ui;ii++)lr===1&&yr.push(po[ci]),cr.push(" ");lr===1&&(zi+=`| ${yr.join(" | ")} |
|
|
`),zi+=`| ${cr.join(ui===1?"":" | ")} |
|
|
`}return an.replaceSelection(zi+`
|
|
`),an.focus();default:throw new Error}},[an,Ii]),Wn=(0,Dt.useMemo)(()=>{switch(Ii){case _n:return Dt.createElement(Pn,{callback:Tt,onCancel:Fn});case Xi:return Dt.createElement(Yn.Z,{callback:Tt,onCancel:Fn});case Ti:return Dt.createElement(Be.Z,{callback:Tt,onCancel:Fn});case Di:return Dt.createElement(Le,{callback:Tt,onCancel:Fn});case zr:return Dt.createElement(Ge,{callback:Tt,onCancel:Fn});case"maths-latex":return Dt.createElement(xi,{showSaveButton:!0,callback:Tt});case"inline-latex":return Dt.createElement(Gn.Z,{showSaveButton:!0,callback:Tt});default:return null}},[Ii]);function Fn(){Qi("")}(0,Dt.useEffect)(()=>{if(qr.current){let At=function(He){fe=!0,De=He.pageY},re=function(){fe=!1},Ut=function(He){if(fe){let Ye=He.pageY-De;Ye<0&&(Ye=0),Ye>300&&(Ye=300);let Sn=Pi+Ye+"px";Rr(Sn)}},oe=qr.current,fe=!1,De=0;return oe.addEventListener("mousedown",At),document.addEventListener("mousemove",Ut),document.addEventListener("mouseup",re),()=>{oe.removeEventListener("mousedown",At),document.removeEventListener("mousemove",Ut),document.removeEventListener("mouseup",re)}}},[an,qr]),(0,Dt.useEffect)(()=>{Rr(Pi)},[Pi]);const Xn=Pr(Me),si=Pr(Nr),wi={width:Xn,height:si},yn=(0,Dt.useMemo)(()=>{if(Or){let At=new Date(Or),re=At.getHours(),Ut=At.getMinutes(),oe=At.getSeconds();return re=re<10?"0"+re:re,Ut=Ut<10?"0"+Ut:Ut,oe=oe<10?"0"+oe:oe,`${re}:${Ut}:${oe}`}return 0},[Or]),Vn=At=>{const re=[];if(ei){let Ut=-1;At=At.replace(/(@▁▁@|@▁@)/g,function(oe,fe,De){re.push({multiLine:oe!==Ct})})}return re};function Kn(){window.sessionStorage.removeItem(je),$r(!1),Lr(0)}function Jn(){$r(!1),Lr(0),an.setValue(window.sessionStorage.getItem(je))}(0,Dt.useEffect)(()=>{ho[Ii]&&Ii!==$i&&Ii!==Di&&setTimeout(()=>{const At=document.getElementsByClassName("markdown-popup-form")[0],re=window.innerWidth/2-At.offsetWidth/2,Ut=window.innerHeight/2-At.offsetHeight/2;Ri(re),xr(Ut)},0)},[Ii]);const Qn=At=>{At.preventDefault();const re=At.clientX-cn,Ut=At.clientY-_i;document.body.onmousemove=oe=>{let fe=oe.clientX-re,De=oe.clientY-Ut;const He=document.getElementsByClassName("markdown-popup-form")[0],Ye=window.innerWidth-He.offsetWidth,Sn=window.innerHeight-He.offsetHeight;fe=Math.max(0,Math.min(fe,Ye)),De=Math.max(0,Math.min(De,Sn)),Gi(oe.clientX,oe.clientY,re,Ut)&&(Ri(fe),xr(De))},document.body.onmouseup=function(){document.body.onmousemove=null}},Gi=(At,re,Ut,oe)=>{const fe=document.body.clientHeight,De=document.body.clientWidth;return At<20&&Ut>At||At>De-20&&Ut<At||re<20&&oe>re||re>fe-20&&oe<re?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return Dt.createElement(Dt.Fragment,null,Dt.createElement("div",{className:"markdown-editor-wrapper",ref:Mo},Dt.createElement("div",{className:`markdown-editor-container ${Oi} ${Ve?"on-preview":""} ${Vi?"mini":""} ${Ni?"full-screen":""}`,style:wi},Dt.createElement(qt,{insertTemp:pi,watch:Ve,fullScreen:Ni,showNullButton:pn,showNullProgramButton:ei,onActionCallback:be,hidetoolBar:Bi,extraUse:wr}),Dt.createElement("div",{className:"markdown-editor-body"},Dt.createElement("div",{className:"codemirror-container"},Dt.createElement("textarea",{ref:zo,placeholder:Sr})),Ve?Dt.createElement("div",{ref:vo,className:"preview-container"},Ze==="stex"&&Dt.createElement(ie,{value:Ar}),Ze!=="stex"&&Dt.createElement(We.Z,{disabledFill:bi,showProgramFill:ei,value:Ar})):null))),mi?Dt.createElement("a",{ref:qr,className:"editor-resize"}):null,Ii===$i&&Dt.createElement(sn,{callback:Tt,onCancel:Fn}),Ii===Di&&Dt.createElement(Le,{callback:Tt,onCancel:Fn}),Dt.createElement(jt.Z,null,ho[Ii]&&Ii!==$i&&Ii!==Di?Dt.createElement(vn.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:cn,top:_i},title:Dt.createElement("div",{style:{cursor:"move"},onMouseDown:Qn},ho[Ii]),open:!0,onCancel:Fn,footer:null,destroyOnClose:!0,width:Ii===Di?"1200px":null,height:Ii===Di?"80vh":null,className:"markdown-popup-form"},Wn):null))}},28451:function(zn,oi,Ot){"use strict";Ot.d(oi,{Z:function(){return zt},I:function(){return qt}});var Dt=Ot(28284),ee=Ot(6767),Pe=Ot(37568),xe=Ot(77736),Se=Ot(71051),Wt=Ot(47889),se=Ot(99571),ze=Ot(77903),ye=Ot(59301),Nt=Ot(59301),We=Object.defineProperty,ie=Object.defineProperties,Ne=Object.getOwnPropertyDescriptors,bt=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,ct=(jt,Jt,ge)=>Jt in jt?We(jt,Jt,{enumerable:!0,configurable:!0,writable:!0,value:ge}):jt[Jt]=ge,lt=(jt,Jt)=>{for(var ge in Jt||(Jt={}))nt.call(Jt,ge)&&ct(jt,ge,Jt[ge]);if(bt)for(var ge of bt(Jt))et.call(Jt,ge)&&ct(jt,ge,Jt[ge]);return jt},gt=(jt,Jt)=>ie(jt,Ne(Jt));const{useForm:mt}=Dt.default,St={width:280,marginRight:10},Mt={labelCol:{span:5},wrapperCol:{span:19}};var zt=({callback:jt,onCancel:Jt})=>{const[ge]=mt();let he=(0,ye.useRef)();function Fe(Mn){he.current.width=ge.getFieldValue("width"),he.current.align=ge.getFieldValue("align"),jt(Mn,he.current)}function Re(Mn,tn){if(Mn.status===-1){ee.ZP.error(Mn.message);return}ge.setFieldsValue({src:`/api/attachments/${Mn.id}`,type:tn.type})}function Ke(Mn){let tn=Mn.target.files[0];he.current=tn,qt(tn,Re)}return Nt.createElement(Dt.default,gt(lt({form:ge},Mt),{className:"upload-image-panel",onFinish:Fe,style:{width:470,overflow:"hidden"}}),Nt.createElement(Dt.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},Nt.createElement("div",{className:"flex-container"},Nt.createElement(Dt.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},Nt.createElement(Pe.default,{style:St})),Nt.createElement(Ht,{onFileChange:Ke}))),Nt.createElement(Dt.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},Nt.createElement(Pe.default,{style:{width:264}})),Nt.createElement(Dt.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},Nt.createElement(xe.Z,null,Nt.createElement(Dt.default.Item,{name:"width",style:{margin:0}},Nt.createElement(Se.Z,{style:{width:264}})),Nt.createElement("span",{className:"ml8"},"%"))),Nt.createElement(Dt.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},Nt.createElement(Wt.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"}]})),Nt.createElement("aside",null,Nt.createElement(Dt.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},Nt.createElement(se.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Nt.createElement(se.ZP,{type:"default",onClick:Jt},"\u53D6\u6D88"))))};function Ht({onFileChange:jt}){return Nt.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",Nt.createElement("input",{type:"file",onChange:jt}))}function qt(jt,Jt){if(!jt)throw new String("\u6CA1\u6709\u6587\u4EF6");let ge=new FormData;ge.append("editormd-image-file",jt),ge.append("file_param_name","editormd-image-file"),ge.append("byxhr","true");var he=new window.XMLHttpRequest;he.withCredentials=!0,he.addEventListener("load",function(Fe){Jt(JSON.parse(Fe.target.responseText),jt)},!1),he.addEventListener("error",function(Fe){console.error(Fe)},!1),he.open("POST",`${ze.KI}/api/attachments.json`),he.send(ge)}},79346:function(zn,oi,Ot){"use strict";Ot.d(oi,{Z:function(){return Pe}});var Dt=Ot(59301),ee=Ot(4676);class Pe extends Dt.Component{constructor(Se){super(Se);const Wt=window.document;this.node=Wt.createElement("div"),Wt.body.appendChild(this.node)}render(){const{children:Se}=this.props;return(0,ee.createPortal)(Se,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},23954:function(zn,oi,Ot){"use strict";Ot.d(oi,{SV:function(){return Yt},ZP:function(){return kt}});var Dt=Ot(59301),ee=Ot(76374);const Pe={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"]},xe={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"]},Se={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
`)}]},Wt={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(`
|
|
`)}]},se={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 ze=Ot(53184),ye=Ot.n(ze),Nt=Object.defineProperty,We=Object.defineProperties,ie=Object.getOwnPropertyDescriptors,Ne=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,et=(pe,Le,on)=>Le in pe?Nt(pe,Le,{enumerable:!0,configurable:!0,writable:!0,value:on}):pe[Le]=on,ct=(pe,Le)=>{for(var on in Le||(Le={}))bt.call(Le,on)&&et(pe,on,Le[on]);if(Ne)for(var on of Ne(Le))nt.call(Le,on)&&et(pe,on,Le[on]);return pe},lt=(pe,Le)=>We(pe,ie(Le)),gt=(pe,Le,on)=>new Promise((ve,Ae)=>{var Ee=In=>{try{kn(on.next(In))}catch(gn){Ae(gn)}},Ge=In=>{try{kn(on.throw(In))}catch(gn){Ae(gn)}},kn=In=>In.done?ve(In.value):Promise.resolve(In.value).then(Ee,Ge);kn((on=on.apply(pe,Le)).next())});const mt={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"]}},St=(pe,Le)=>Le.map(on=>({label:on,kind:pe.languages.CompletionItemKind.Keyword,insertText:on})),Mt=pe=>Object.keys(mt.tables).map(Le=>({label:Le,kind:pe.languages.CompletionItemKind.Variable,insertText:Le})),zt=(pe,Le)=>{const on=mt.tables[pe];return on?on.map(ve=>({label:ve,kind:Le.languages.CompletionItemKind.Field,insertText:ve})):[]};function Ht(pe,Le,on,ve,Ae){let Ee=Le.getWordUntilPosition(on),Ge={startLineNumber:on.lineNumber,endLineNumber:on.lineNumber,startColumn:Ee.startColumn,endColumn:Ee.endColumn},kn=ve.map(In=>({label:In,kind:pe.languages.CompletionItemKind.Keyword,insertText:In,insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ge}));return Ae.map(In=>{kn.push(lt(ct({},In),{range:Ge}))}),kn}var qt=pe=>{mt.languages.map(Ae=>(pe.languages.registerDocumentFormattingEditProvider(Ae,{provideDocumentFormattingEdits(Ee,Ge,kn){return gt(this,null,function*(){const In=ye()(Ee.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:Ee.getFullModelRange(),text:In}]})}}),Ae));const Le=Se.quickKey.map(Ae=>({label:Ae.label,kind:pe.languages.CompletionItemKind.Method,insertText:Ae.content,insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet})),on=Wt.quickKey.map(Ae=>({label:Ae.label,kind:pe.languages.CompletionItemKind.Method,insertText:Ae.content,insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet})),ve=xe.quickKey.map(Ae=>({label:Ae.label,kind:pe.languages.CompletionItemKind.Method,insertText:Ae.content,insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet}));pe.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Ae,Ee){var Ge=Ae.getWordUntilPosition(Ee),kn={startLineNumber:Ee.lineNumber,endLineNumber:Ee.lineNumber,startColumn:Ge.startColumn,endColumn:Ge.endColumn},In=Ae.getLineContent(Ee.lineNumber).substring(Ge.startColumn-2,Ge.endColumn);return{suggestions:[...Se.keywords.map(gn=>({label:gn,kind:pe.languages.CompletionItemKind.Function,documentation:gn,insertText:gn,insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:kn})),...Se.quickKey.map(gn=>({label:gn.label,kind:pe.languages.CompletionItemKind.Function,documentation:gn.content,insertText:In.startsWith("#")?gn.content.replace(/#/,""):gn.content,insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:kn}))]}}}),pe.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Ae,Ee){var Ge=Ae.getWordUntilPosition(Ee),kn={startLineNumber:Ee.lineNumber,endLineNumber:Ee.lineNumber,startColumn:Ge.startColumn,endColumn:Ge.endColumn};return{suggestions:[...Pe.keywords.map(In=>({label:In,kind:pe.languages.CompletionItemKind.Function,documentation:In,insertText:In,insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:kn}))]}}}),pe.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Ae,Ee){var Ge=Ae.getWordUntilPosition(Ee),kn={startLineNumber:Ee.lineNumber,endLineNumber:Ee.lineNumber,startColumn:Ge.startColumn,endColumn:Ge.endColumn},In=Ae.getLineContent(Ee.lineNumber).substring(Ge.startColumn-2,Ge.endColumn);return{suggestions:[...xe.keywords.map(gn=>({label:gn,kind:pe.languages.CompletionItemKind.Function,documentation:gn,insertText:gn,insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:kn})),...xe.quickKey.map(gn=>({label:gn.label,kind:pe.languages.CompletionItemKind.Function,documentation:gn.content,insertText:In.startsWith("#")?gn.content.replace(/#/,""):gn.content,insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:kn}))]}}}),pe.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Ae,Ee){var Ge=Ae.getWordUntilPosition(Ee),kn={startLineNumber:Ee.lineNumber,endLineNumber:Ee.lineNumber,startColumn:Ge.startColumn,endColumn:Ge.endColumn},In=Ae.getLineContent(Ee.lineNumber).substring(Ge.startColumn-2,Ge.endColumn);return{suggestions:[...se.keywords.map(gn=>({label:gn,kind:pe.languages.CompletionItemKind.Function,documentation:gn,insertText:gn,insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:kn})),...se.quickKey.map(gn=>({label:gn.label,kind:pe.languages.CompletionItemKind.Function,documentation:gn.content,insertText:In.startsWith("#")?gn.content.replace(/#/,""):gn.content,insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:kn}))]}}}),pe.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Ae,Ee){var Ge=Ae.getWordUntilPosition(Ee),kn={startLineNumber:Ee.lineNumber,endLineNumber:Ee.lineNumber,startColumn:Ge.startColumn,endColumn:Ge.endColumn},In=Ae.getLineContent(Ee.lineNumber).substring(Ge.startColumn-2,Ge.endColumn);return{suggestions:[...Wt.keywords.map(gn=>({label:gn,kind:pe.languages.CompletionItemKind.Function,documentation:gn,insertText:gn,insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:kn})),...Wt.quickKey.map(gn=>({label:gn.label,kind:pe.languages.CompletionItemKind.Function,documentation:gn.content,insertText:In.startsWith("#")?gn.content.replace(/#/,""):gn.content,insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:kn}))]}}})};const jt="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Jt=Object.defineProperty,ge=(pe,Le,on)=>Le in pe?Jt(pe,Le,{enumerable:!0,configurable:!0,writable:!0,value:on}):pe[Le]=on,he=(pe,Le,on)=>ge(pe,typeof Le!="symbol"?Le+"":Le,on);const Fe=class px{constructor(Le,on,ve){this.placeholder=Le,this.editor=on,this.monaco=ve,on.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)}};he(Fe,"ID","editor.widget.placeholderHint");var Ke=Fe,Mn=Ot(96236),tn=Ot(6767),rn=Ot(25399),nn=Ot(89392),me=Ot(34604),Xt=Ot(56102),Ue=Object.defineProperty,Pn=Object.defineProperties,Yn=Object.getOwnPropertyDescriptors,Be=Object.getOwnPropertySymbols,vn=Object.prototype.hasOwnProperty,Je=Object.prototype.propertyIsEnumerable,An=(pe,Le,on)=>Le in pe?Ue(pe,Le,{enumerable:!0,configurable:!0,writable:!0,value:on}):pe[Le]=on,we=(pe,Le)=>{for(var on in Le||(Le={}))vn.call(Le,on)&&An(pe,on,Le[on]);if(Be)for(var on of Be(Le))Je.call(Le,on)&&An(pe,on,Le[on]);return pe},sn=(pe,Le)=>Pn(pe,Yn(Le)),ce=(pe,Le)=>{var on={};for(var ve in pe)vn.call(pe,ve)&&Le.indexOf(ve)<0&&(on[ve]=pe[ve]);if(pe!=null&&Be)for(var ve of Be(pe))Le.indexOf(ve)<0&&Je.call(pe,ve)&&(on[ve]=pe[ve]);return on},Nn=(pe,Le,on)=>new Promise((ve,Ae)=>{var Ee=In=>{try{kn(on.next(In))}catch(gn){Ae(gn)}},Ge=In=>{try{kn(on.throw(In))}catch(gn){Ae(gn)}},kn=In=>In.done?ve(In.value):Promise.resolve(In.value).then(Ee,Ge);kn((on=on.apply(pe,Le)).next())});function Ci(pe){return/^\d+$/.test(pe)?`${pe}px`:pe}function It(){}let wt=!1;const xt={"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 Ft(pe=[]){let Le=pe;if(Array.isArray(pe)){for(let on=0;on<pe.length;on++){let ve=xt[pe[on]];if(ve)return ve}return Le[0]}return xt[Le]||Le}let Gt=null;var kt=pe=>{var Le=pe,{width:on="100%",height:ve="100%",value:Ae,language:Ee="javascript",style:Ge={},options:kn={},overrideServices:In={},theme:gn="vs-dark",onEditBlur:ai,isCopy:xi=!1,onSave:Gn,autoHeight:Si=!1,forbidCopy:_n=!1,onChange:Ti=It,editorDidMount:Di=It,onFocus:$i=It,onBreakPoint:Kr=It,breakPointValue:Xi=[],filename:zr="educoder.txt",errorLine:so,errorContent:po="",highlightLine:Jr,openBreakPoint:Do=!1,placeholder:Bo="",showMiniMap:Ko=!0}=Le,bo=ce(Le,["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 ko=(0,Dt.useRef)(),Ct=(0,Dt.useRef)({}),Zn=(0,Dt.useRef)(),bn=(0,Dt.useRef)(),Pr=(0,Dt.useRef)([]),Er=(0,Dt.useRef)(!1),Zi=(0,Dt.useRef)(),_r=(0,Dt.useRef)(),ho=(0,Dt.useRef)(!1),[br,$e]=(0,Dt.useState)(!1);function Oe(){let un;return ko.current&&(un=new ee.Z($n=>{for(let vi of $n)(vi.target.offsetHeight>0||vi.target.offsetWidth>0)&&Ct.current.instance.layout()}),un.observe(ko.current)),un}function Me(){tn.ZP.warning({content:decodeURIComponent(jt),key:"monaco-editor-tip"})}const Pi=()=>{let un=Ct.current.instance;if(Ae!=null&&un&&br){const $n=un.getModel();$n&&Ae!==$n.getValue()&&(wt=!0,$n.setValue(Ae),un.layout(),wt=!1)}};(0,Dt.useEffect)(()=>{const un=me.Z.subscribe("formatDocument",$n=>{var vi;let Oi=Ct.current.instance;(vi=Oi==null?void 0:Oi.getAction)==null||vi.call(Oi,"editor.action.formatDocument").run()});return window.updateMonacoValue=$n=>{Ti($n)},un},[]),(0,Dt.useEffect)(()=>{var un;let $n=Ct.current.instance;bn.current&&clearTimeout(bn.current),bn.current=setTimeout(()=>{Pi()},500),Ae&&(Ae!=null&&Ae.length)&&((un=$n==null?void 0:$n.updateOptions)==null||un.call($n,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Ae.split(/\r\n|\r|\n/g).length))+3,5)}))},[Ae,br,Ct.current]),(0,Dt.useEffect)(()=>{if(so&&Ct.current&&Ct.current.instance){let $n=Ct.current.instance;$n.changeViewZones(function(vi){var Oi=document.createElement("div");Oi.style.padding="10px 20px",Oi.style.width="calc(100% - 20px)",Oi.className="my-error-line-wrp",Oi.innerHTML=po,vi.addZone({afterLineNumber:so||11,heightInLines:3,domNode:Oi})});var un={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}};$n.addOverlayWidget(un),$n.revealPositionInCenter({lineNumber:20,column:1})}},[so,Ct.current,br]);const Vi=(un="",$n)=>{if(!un||un.trim()==="")return!0;const Oi=Ct.current.instance.getModel().getLineTokens($n);let Ei=!1;for(let ri=0;ri<2;ri++)Oi.getStandardTokenType(ri)===1&&(Ei=!0);return Ei};(0,Dt.useEffect)(()=>{var un;const $n=(un=Ct.current)==null?void 0:un.instance;if($n&&br&&_n){const vi=$n.onDidBlurEditorWidget(()=>{ho.current=!1}),Oi=$n.onDidFocusEditorText(()=>{ho.current=!0});return()=>{vi.dispose(),Oi.dispose()}}},[Ct.current,br,_n]),(0,Dt.useEffect)(()=>{var un;if((un=Ct.current)!=null&&un.instance&&br&&Do){let $n=Ct.current.instance,vi=$n.getModel();if(!vi)return;(()=>{var Ve;let ni=[],Ni=[];const Hi=vi.getAllDecorations();for(let Qi of Hi)Qi.options.className==="highlighted-line"&&(ni.push((Ve=Qi==null?void 0:Qi.range)==null?void 0:Ve.startLineNumber),Ni.push(Qi==null?void 0:Qi.id));if(Jr===ni[0])return;vi.deltaDecorations(Ni,[]);const Ii=vi.getLineCount();Jr&&Jr<=Ii&&($n.deltaDecorations([],[{range:new Gt.Range(Jr,1,Jr,vi.getLineMaxColumn(Jr)),options:{isWholeLine:!0,className:"highlighted-line"}}]),$n.revealLineInCenter(Jr))})();const Ei=(Ve=!1)=>{var ni;let Ni=[],Hi=[];const Ii=vi.getAllDecorations();for(let Qi of Ii)Qi.options.linesDecorationsClassName==="breakpoints-select"&&(Ni.push((ni=Qi==null?void 0:Qi.range)==null?void 0:ni.startLineNumber),Hi.push(Qi==null?void 0:Qi.id));if(Ve)return{lines:Ni,ids:Hi};Kr(Ni)},ri=Ve=>Nn(void 0,null,function*(){let ni={range:new Gt.Range(Ve,1,Ve,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield vi.deltaDecorations([],[ni]),Ei()}),bi=Ve=>Nn(void 0,null,function*(){let ni=[];const Ni=$n.getLineDecorations(Ve);for(let Hi of Ni)Hi.options.linesDecorationsClassName==="breakpoints-select"&&ni.push(Hi.id);yield vi.deltaDecorations(ni,[]),Ei()}),Sr=Ve=>{let ni=$n.getLineDecorations(Ve);for(let Ni of ni)if(Ni.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,nn.isEqual)(Xi,Ei(!0).lines)){vi.deltaDecorations(Ei(!0).ids,[]);const Ve=Xi.map(ni=>({range:new Gt.Range(ni,1,ni,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));vi.deltaDecorations([],Ve)}const mr=$n.onDidChangeModelContent(Ve=>{let ni=$n.getPosition();if(ni){let Ni=ni.lineNumber;clearTimeout(_r.current),_r.current=setTimeout(()=>{Vi(vi.getLineContent(Ni),Ni)?bi(Ni):Sr(Ni)?(bi(Ni),ri(Ni)):Ei()},100)}}),wr=$n.onMouseDown(Ve=>{var ni,Ni,Hi;if(Ve.target.detail&&((Hi=(Ni=(ni=Ve.target)==null?void 0:ni.element)==null?void 0:Ni.className)!=null&&Hi.includes("line-numbers"))){let Ii=Ve.target.position.lineNumber;if(Vi(vi.getLineContent(Ii),Ii))return;Sr(Ii)?bi(Ii):ri(Ii)}}),an=Ve=>{let ni={range:new Gt.Range(Ve,1,Ve,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Pr.current=$n.deltaDecorations(Pr.current,[ni])},wo=()=>{Pr.current=$n.deltaDecorations(Pr.current,[])},Ar=$n.onMouseMove(Ve=>{var ni,Ni,Hi;if(wo(),Ve.target.detail&&((Hi=(Ni=(ni=Ve.target)==null?void 0:ni.element)==null?void 0:Ni.className)!=null&&Hi.includes("line-numbers"))){let Ii=Ve.target.position.lineNumber;if(Vi(vi.getLineContent(Ii),Ii))return;an(Ii)}}),mo=$n.onMouseLeave(()=>{wo()});return()=>{mr.dispose(),wr.dispose(),Ar.dispose(),mo.dispose()}}},[Ct.current,br,Xi,Jr,Do,Ee]),(0,Dt.useEffect)(()=>{var un;(un=Ct.current)!=null&&un.instance&&Do&&Ct.current.instance.setPosition({lineNumber:0,column:0})},[Jr]);function rr(){let un=Ct.current.instance;if(un){const $n=un.getSelection(),vi=Ct.current.pastePos||{},Oi=new Gt.Range(vi.startLineNumber||$n.endLineNumber,vi.startColumn||$n.endColumn,vi.endLineNumber||$n.endLineNumber,vi.endColumn||$n.endColumn);setTimeout(()=>{un.executeEdits("",[{range:Oi,text:""}])},300)}}function Dn(un){(window.navigator.platform.match("Mac")?un.metaKey:un.ctrlKey)&&un.keyCode==83&&(un.preventDefault(),Gn())}const pi=()=>{if(Si&&Ct.current.instance){const un=Ct.current.instance.getContentHeight();Bi(un<ve?ve:un)}else Bi(ve)};function Ze(un){var $n=document.createEvent("MouseEvents");$n.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),un.dispatchEvent($n)}const je=un=>{if(!ho.current)return;const{keyCode:$n,ctrlKey:vi,metaKey:Oi,target:Ei,type:ri}=un;return(ri==="paste"||($n===67||$n===86)&&(Oi||vi))&&Ei.nodeName==="TEXTAREA"&&(Me(),un.preventDefault()),!1};function mi(un,$n){var vi=window.URL||window.webkitURL||window,Oi=new Blob([$n]),Ei=document.createElementNS("http://www.w3.org/1999/xhtml","a");Ei.href=vi.createObjectURL(Oi),Ei.download=un,Ze(Ei)}(0,Dt.useEffect)(()=>{pi()},[pi]),(0,Dt.useEffect)(()=>{ko.current&&!br&&Promise.all([Ot.e(8909),Ot.e(3267)]).then(Ot.bind(Ot,71448)).then(un=>{try{Gt=un,Ct.current.instance=Gt.editor.create(ko.current,{value:Ae,language:Ft(Ee),theme:gn,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Ko||!1}},In);const $n=Ct.current.instance;let Ei=[...Mn.BH._menuItems].find(mr=>mr[0]._debugName=="EditorContext")[1],ri=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],bi=(mr,wr)=>{var an,wo;let Ar=mr._first;do wr.includes((wo=(an=Ar.element)==null?void 0:an.command)==null?void 0:wo.id)&&mr._remove(Ar);while(Ar=Ar.next)};if(Di($n,Gt),setTimeout(()=>{pi(),Ct.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{mi(zr||"educoder.txt",$n.getValue())}})},500),Ct.current.subscription=$n.onDidChangeModelContent(mr=>{Er.current?clearTimeout(Zi.current):(pi(),Ti($n.getValue(),mr)),Zi.current=setTimeout(()=>{Er.current=!1},500)}),window.Monaco||qt(Gt,Ft(Ee)),_n&&(bi(Ei,ri),ko.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",je),window.removeEventListener("paste",je),window.addEventListener("keydown",je),window.addEventListener("paste",je)),window.Monaco=Gt,ai&&$n.onDidBlurEditorWidget(()=>{ai($n.getValue())}),$i&&$n.onDidFocusEditorText(()=>{$i($n.getValue())}),_n)try{$n.onDidPaste(mr=>{const wr=$n.getSelection(),an=Ct.current.pastePos||{},wo=new Gt.Range(an.startLineNumber||wr.endLineNumber,an.startColumn||wr.endColumn,an.endLineNumber||wr.endLineNumber,an.endColumn||wr.endColumn);$n.executeEdits("",[{range:mr.range,text:""}])})}catch(mr){}let Sr=Oe();return Bo&&typeof Bo=="string"&&new Ke(Bo,$n,Gt),$e(!0),()=>{const mr=Ct.current.instance;mr.dispose();const wr=mr.getModel();wr&&wr.dispose(),Ct.current.subscription&&Ct.current.subscription.dispose(),Sr.unobserve(ko.current)}}catch($n){}})},[]),(0,Dt.useEffect)(()=>{if(Ct.current.instance&&br)return document.addEventListener("keydown",Dn,!1),()=>{document.removeEventListener("keydown",Dn)}},[Gn,br]),(0,Dt.useEffect)(()=>{let un=Ct.current.instance;if(un&&br){let $n=Ft(Ee);Gt.editor.setModelLanguage(un.getModel(),$n)}},[Ee,br]),(0,Dt.useEffect)(()=>{Ct.current.instance&&br&&Gt.editor.setTheme(gn)},[gn,br]),(0,Dt.useEffect)(()=>{let un=Ct.current.instance;Zn.current=kn,un&&br&&(un.updateOptions(we({},kn)),setTimeout(()=>{un.getModel().updateOptions(we({},kn))},200))},[JSON.stringify(kn),br]),(0,Dt.useEffect)(()=>{let un=Ct.current.instance;un&&br&&un.layout()},[on,ve,br]);const[$t,pn]=(0,Dt.useState)(Ci(on)),[ei,Bi]=(0,Dt.useState)(Ci(ve)),_e=sn(we({},Ge),{width:$t,height:ei,position:"relative"});return Dt.createElement("div",{className:"my-monaco-editor",ref:ko,style:_e},xi&&Dt.createElement(Xt.CopyToClipboard,{text:Ae,onCopy:()=>tn.ZP.success("\u590D\u5236\u6210\u529F")},Dt.createElement(rn.Z,{title:"\u590D\u5236\u4EE3\u7801"},Dt.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},Dt.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Yt({width:pe="100%",height:Le="100%",original:on,modified:ve,language:Ae,options:Ee={}}){const Ge=(0,Dt.useRef)(),[kn,In]=(0,Dt.useState)(null);function gn(Si){let _n;return Ge.current&&(_n=new ee.Z(Ti=>{for(let Di of Ti)(Di.target.offsetHeight>0||Di.target.offsetWidth>0)&&Si.layout()}),_n.observe(Ge.current)),_n}(0,Dt.useEffect)(()=>(Ge.current&&Promise.all([Ot.e(8909),Ot.e(9404)]).then(Ot.bind(Ot,2550)).then(Si=>{Gt=Si;const _n=Gt.editor.createDiffEditor(Ge.current,sn(we({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},Ee),{wordWrap:!0}));In(_n);let Ti=gn(_n);return()=>{_n.dispose();const Di=_n.getModel();Di&&Di.dispose(),Ti.unobserve(Ge.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,Dt.useEffect)(()=>{kn&&kn.setModel({original:Gt.editor.createModel(on,Ae),modified:Gt.editor.createModel(ve,Ae)})},[on,ve,Ae,kn]);const ai=Ci(pe),xi=Ci(Le),Gn={width:ai,height:xi};return Dt.createElement("div",{className:"my-diff-editor",ref:Ge,style:Gn})}},58856:function(zn,oi,Ot){"use strict";Ot.d(oi,{Z:function(){return ee}});var Dt=Ot(59301);function ee(Pe,xe){const Se=(0,Dt.useRef)();(0,Dt.useEffect)(()=>{Se.current=Pe}),(0,Dt.useEffect)(()=>{function Wt(){Se.current()}if(xe!==null){let se=setInterval(Wt,xe);return()=>clearInterval(se)}},[xe])}},79834:function(zn,oi,Ot){"use strict";Ot.d(oi,{Q8:function(){return Xt},d0:function(){return Ue},w6:function(){return me}});var Dt=Ot(59301),ee=Ot(16326),Pe=Ot(82326),xe=Ot(6767),Se=Ot(62957),Wt=Ot(47889),se=Ot(77019),ze=Ot(5269),ye=Ot(25399),Nt=Ot(62673),We=Ot(99571),ie=Ot(61186),Ne=Ot.n(ie),bt=Ot(24065),nt=Ot(99064),et=Ot(89392),ct=Ot.n(et),lt=Ot(955),gt=Ot(24990),mt=Ot(89070),St=Ot(40731),Mt=Ot(46474),zt=Ot(38233),Ht=Ot(82438),qt=Ot(49692),jt=Ot(59301),Jt=Object.defineProperty,ge=Object.defineProperties,he=Object.getOwnPropertyDescriptors,Fe=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,Ke=Object.prototype.propertyIsEnumerable,Mn=(Je,An,we)=>An in Je?Jt(Je,An,{enumerable:!0,configurable:!0,writable:!0,value:we}):Je[An]=we,tn=(Je,An)=>{for(var we in An||(An={}))Re.call(An,we)&&Mn(Je,we,An[we]);if(Fe)for(var we of Fe(An))Ke.call(An,we)&&Mn(Je,we,An[we]);return Je},rn=(Je,An)=>ge(Je,he(An)),nn=(Je,An,we)=>new Promise((sn,ce)=>{var Nn=wt=>{try{It(we.next(wt))}catch(xt){ce(xt)}},Ci=wt=>{try{It(we.throw(wt))}catch(xt){ce(xt)}},It=wt=>wt.done?sn(wt.value):Promise.resolve(wt.value).then(Nn,Ci);It((we=we.apply(Je,An)).next())});function me(Je,An){const we=[];for(let sn=Je;sn<An;sn++)we.push(sn);return we}const Xt=(Je,An,we)=>{const sn=Je<Ne()().startOf("day"),ce=Je>Ne()(An).endOf("day"),Nn=Je<Ne()(we).startOf("day");return An?we?Ne()()<=Ne()(we)?Nn||ce:sn||ce:Je&&sn||ce:we&&Ne()()<=Ne()(we)?Nn:sn},Ue=(Je,An)=>{const we=parseInt(Ne()(Je).format("HH")),sn=parseInt(Ne()().format("HH")),ce=parseInt(Ne()().format("mm"));if(!Je)return{disabledHours:()=>me(0,sn),disabledMinutes:()=>me(0,ce)};if(An){const Nn=parseInt(Ne()(An).format("HH")),Ci=parseInt(Ne()(An).format("mm"));return Ne()(Je).isSame(Ne()(An),"day")?{disabledHours:()=>me(0,Nn),disabledMinutes:()=>we<=Nn?me(0,Ci):[]}:void 0}if(Ne()(Je).isSame(Ne()(),"day"))return{disabledHours:()=>me(0,sn),disabledMinutes:()=>Ne()(Je).isSame(Ne()(),"hour")&&we<=sn?me(0,ce):[]}},Pn=(Je,An)=>Je==null?void 0:Je.map(we=>{var sn;return(sn=An==null?void 0:An.find(ce=>ce.value===we))==null?void 0:sn.id}),{RangePicker:Yn}=ee.default,{Option:Be}=Pe.default,vn=({shixunHomeworks:Je,loading:An,dispatch:we,classroomList:sn,user:ce})=>{var Nn,Ci,It,wt,xt,Ft,Gt,kt,Yt;const pe=(0,mt.useParams)(),{workSetting:Le,workList:on,shixunWorkList:ve,headerInfo:Ae,changeData:Ee}=Je,[Ge,kn]=(0,Dt.useState)(!1),[In,gn]=(0,Dt.useState)(!1);let[ai,xi]=(0,Dt.useState)([]),[Gn,Si]=(0,Dt.useState)([]),[_n,Ti]=(0,Dt.useState)({unified_setting:!1,publish_time:"",end_time:"",allow_late:!1,unified_late:!0,late_time:"",late_penalty:0,penalty_type:St.Q.Percent,challenge_settings:[],work_efficiency:!1,shixun_evaluation:"",answer_open_evaluation:!1,answer_public:!1,score_open:!1,comment_public:!0,total_score:"",eff_score:0,action_analysis:!1,work_end_forbid_evaluate:!1});const[Di,$i]=(0,Dt.useState)({}),[Kr,Xi]=(0,Dt.useState)({});(0,Dt.useEffect)(()=>()=>{xi([])},[]),(0,Dt.useEffect)(()=>{kn(!(0,bt.GJ)())},[(0,bt.GJ)()]);const zr=()=>{we({type:"shixunHomeworks/getWorkSetting",payload:tn({},pe)})};(0,Dt.useEffect)(()=>{if(!(Le!=null&&Le.course_id))return;Object.keys(_n).map(function(bn){_n[bn]=Le[bn]}),(!_n.allow_late||!_n.unified_late)&&(_n.late_penalty=20,_n.penalty_type=St.Q.Percent),_n.unified_setting||(_n.unified_late=!1,_n.unified_anonymous_comment=!1,_n.unified_anonymous_appeal=!1),ai=JSON.parse(JSON.stringify(Le.group_settings.map(bn=>rn(tn({},bn),{group_name:[bn.group_name]})).filter(bn=>bn.publish_time!==null))),Gn=JSON.parse(JSON.stringify(Le.allow_late_settings.map(bn=>rn(tn({},bn),{group_name:[bn.group_name]})).filter(bn=>bn.late_time!==null))),Ti(tn({},_n));const Zn=(0,lt.QE)((ai==null?void 0:ai.length)>0?ai:[]);xi([...Zn]),(Gn==null?void 0:Gn.length)<=0?Si([{penalty_type:St.Q.Percent,late_penalty:20}]):Si([...Gn])},[Le]);const so=()=>nn(void 0,null,function*(){var Zn,bn;if(((Zn=ce==null?void 0:ce.userInfo)==null?void 0:Zn.user_status)===2){(0,Mt.Rd)();return}const Pr=JSON.parse(JSON.stringify(_n));if(Pr.challenge_settings.filter(Zi=>!Zi.hide),Pr.categoryId=pe.categoryId,(bn=Pr.challenge_settings)!=null&&bn.every(Zi=>!Zi.checked)){xe.ZP.warning("\u5173\u5361\u4E0D\u80FD\u5168\u90E8\u8BBE\u7F6E\u4E3A\u53EF\u4E0D\u505A");return}if(console.log(ai),!_n.unified_setting)ai=ai==null?void 0:ai.map(Zi=>{var _r;if(!Zi.publish_time||!Zi.end_time)throw xe.ZP.error("\u8BF7\u628A\u53D1\u5E03\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u53D1\u5E03\u65F6\u95F4\u586B\u5199\u5B8C\u6574");if(!Zi.group_name)throw xe.ZP.error("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0"),new String("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0");return Zi.group_name=typeof(Zi==null?void 0:Zi.group_name)=="string"?[Zi==null?void 0:Zi.group_name]:Zi==null?void 0:Zi.group_name,Zi.group_id=(_r=Le.group_settings)==null?void 0:_r.filter(ho=>{var br;return(br=Zi==null?void 0:Zi.group_name)==null?void 0:br.includes(ho.group_name)}).map(ho=>ho.group_id||ho.id).toString().split(","),Zi});else if(!_n.publish_time||!_n.end_time)throw xe.ZP.error("\u53D1\u5E03\u622A\u6B62\u65F6\u95F4\u4E0D\u80FD\u4E3A\u7A7A"),new String("\u53D1\u5E03\u622A\u6B62\u65F6\u95F4\u4E0D\u80FD\u4E3A\u7A7A");if(Pr.group_settings=ai,_n.allow_late)if(_n.unified_late){if(_n.late_penalty===null||_n.late_penalty===void 0||_n.late_penalty<0||_n.late_penalty>100)throw xe.ZP.error("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100"),new String("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100");if(!_n.late_time)throw xe.ZP.error("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574")}else Gn=Gn==null?void 0:Gn.map(Zi=>{var _r,ho;if(Zi.late_penalty===null||Zi.late_penalty===void 0||Zi.late_penalty<0||Zi.late_penalty>100)throw xe.ZP.error("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100"),new String("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100");if(!Zi.late_time)throw xe.ZP.error("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574");if(!Zi.group_name)throw xe.ZP.error("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0"),new String("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0");return Zi.group_name=typeof(Zi==null?void 0:Zi.group_name)=="string"?[Zi==null?void 0:Zi.group_name]:Zi==null?void 0:Zi.group_name,Zi.group_id=(ho=(_r=Zi==null?void 0:Zi.group_name)==null?void 0:_r.map(br=>{var $e,Oe;let Me=(Oe=($e=Le.group_settings)==null?void 0:$e.filter(Pi=>(Pi==null?void 0:Pi.group_name)===br))==null?void 0:Oe[0];return Me==null?void 0:Me.group_id}))==null?void 0:ho.toString().split(","),Zi}),Pr.allow_late_settings=Gn;let Er=yield(0,qt.Tr)({homework_common_ids:[parseInt(pe.categoryId)],course_id:pe.coursesId,type:"homework_common"});(Er==null?void 0:Er.student_count)===0?po(Pr):(Xi(Pr),$i(Er))}),po=Zn=>{var bn;if(Zn.total_score===null){xe.ZP.warning("\u603B\u5206\u503C\u4E0D\u80FD\u4E3A\u7A7A");return}if(Zn!=null&&Zn.work_efficiency&&Zn.eff_score===null){xe.ZP.warning("\u6548\u7387\u5206\u4E0D\u80FD\u4E3A\u7A7A");return}const Pr=Zn.challenge_settings.reduce((_r,ho)=>_r+Number(ho.challenge_score),0);if((Pr==null?void 0:Pr.toFixed(10))!==((bn=Zn.total_score-Zn.eff_score)==null?void 0:bn.toFixed(10))){xe.ZP.warning(`\u6548\u7387\u5206\u52A0\u5173\u5361\u4EFB\u52A1\u603B\u5206\u5FC5\u987B\u7B49\u4E8E\u603B\u5206\u503C\uFF1A${Zn.total_score}\u5206`);return}const Er={shixun_evaluation:Zn.shixun_evaluation,challenge_settings:Zn.challenge_settings};let Zi=()=>{var _r;const ho=()=>nn(void 0,null,function*(){gn(!0),(yield(0,nt.ZP)(`/api/homework_commons/${pe.categoryId}/publish_setting.json`,{method:"post",body:tn({},Zn)})).status===0&&(xe.ZP.success("\u66F4\u65B0\u6210\u529F"),zr(),we({type:"shixunHomeworks/getShixunWorkHeadInfo",payload:tn({},pe)})),gn(!1)});!(0,et.isEqual)(Ee,Er)&&!((_r=Ae==null?void 0:Ae.homework_status)!=null&&_r.includes("\u672A\u53D1\u5E03"))?Se.default.confirm({title:"\u66F4\u65B0\u6210\u7EE9",content:"\u60A8\u6539\u52A8\u4E86\u672C\u6B21\u4F5C\u4E1A\u7684\u5173\u5361\u5F97\u5206\u8BBE\u7F6E\uFF0C\u8FD9\u53EF\u80FD\u5BFC\u81F4\u5DF2\u5B8C\u6210\u4F5C\u4E1A\u7684\u5B66\u751F\u7684\u6210\u7EE9\u4EA7\u751F\u9519\u8BEF\u3002\u70B9\u51FB\u201C\u786E\u5B9A\u201D\u6309\u94AE\u5C06\u4FDD\u5B58\u6700\u65B0\u8BBE\u7F6E\u5E76\u6309\u6700\u65B0\u8BBE\u7F6E\u66F4\u65B0\u5168\u73ED\u6210\u7EE9\u3002",okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:ho}):ho()};Le!=null&&Le.high_resources_consume&&!(Le!=null&&Le.high_resources_consume_permission)?we({type:"classroomList/setActionTabs",payload:{key:"\u6388\u6743\u4F7F\u7528",id:pe.coursesId,type:"shixun",type_id:pe.categoryId,name:Le.homework_name,fn:()=>{Zi()}}}):Zi()},Jr=(Zn,bn,Pr="group_id")=>{var Er;return bn?bn.find(Zi=>Zi[Pr]===Zn):(Er=Le==null?void 0:Le.group_settings)==null?void 0:Er.find(Zi=>Zi.group_id[0]===Zn)},Do=(Le==null?void 0:Le.allow_late)||(Le==null?void 0:Le.anonymous_comment),Bo=Zn=>{var bn,Pr;const Er=Jr(Zn,Le==null?void 0:Le.allow_late_settings,"id"),Zi=Jr(Zn,Le==null?void 0:Le.anonymous_comment_settings),_r=Jr(Zn);return(Le==null?void 0:Le.allow_late)&&Er&&Ne()(Er==null?void 0:Er.late_time)<=Ne()()||(Le==null?void 0:Le.anonymous_comment)&&Zi&&(Zi==null?void 0:Zi.evaluation_start)!==null||((Pr=(Ne()(_r==null?void 0:_r.end_time)<=Ne()()&&((bn=Le==null?void 0:Le.allow_late_settings)==null?void 0:bn.filter(ho=>ho.group_id.includes(Zn))))[0])==null?void 0:Pr.late_time)!=null},Ko=(0,Dt.useMemo)(()=>(Le==null?void 0:Le.allow_late)||(Le==null?void 0:Le.all_group_late),[Le,Ae]),bo=Le==null?void 0:Le.anonymous_comment,ko=Zn=>{if(!Zn)return!1;const bn=Jr(Zn,Le==null?void 0:Le.anonymous_comment_settings);return(Le==null?void 0:Le.anonymous_comment)&&bn&&(bn==null?void 0:bn.evaluation_start)!==null},Ct=(Zn,bn)=>{var Pr,Er,Zi,_r,ho;Zn!=null&&Zn.group_id||(Zn.group_id=Pn(Zn==null?void 0:Zn.group_name,Le==null?void 0:Le.group_settings)),we({type:"classroomList/setActionTabs",payload:{key:"\u5206\u73ED\u53D1\u5E03-\u53D1\u5E03\u89C4\u5219\u62C6\u5206",data:Zn,index:bn,rangePickerDisabled:(Er=(Pr=Zn==null?void 0:Zn.group_id)==null?void 0:Pr[0])!=null&&Er.publish_time?Ge||(Ne()()<=Ne()((_r=Jr((Zi=Zn==null?void 0:Zn.group_id)==null?void 0:Zi[0]))==null?void 0:_r.publish_time)?!1:[!0,Bo((ho=Zn==null?void 0:Zn.group_id)==null?void 0:ho[0])]):!1,disabledDate:Le==null?void 0:Le.course_end_date}})};return jt.createElement("section",{className:gt.Z.form},jt.createElement("div",{className:gt.Z.title},"\u4F5C\u4E1A\u53D1\u5E03",jt.createElement("span",{className:"c-grey-666 font14",style:{fontWeight:400}},"\uFF08\u4F5C\u4E1A\u4E00\u65E6\u53D1\u5E03\u540E\u4E0D\u53EF\u53D8\u66F4\u8BD5\u9898\u53D1\u5E03\u6A21\u5F0F\uFF09")),jt.createElement("div",null,jt.createElement("div",{style:{background:"#F6F7F9",padding:"13px 30px",display:"flex",alignItems:"center"}},jt.createElement(Wt.ZP.Group,{disabled:Ge||!((Nn=Ae==null?void 0:Ae.homework_status)!=null&&Nn.includes("\u672A\u53D1\u5E03"))||(0,bt.Rm)()&&!((Ci=sn.AssistantObject.practice)!=null&&Ci.can_publish),value:_n.unified_setting,onChange:Zn=>{var bn;if(!((bn=Ae==null?void 0:Ae.homework_status)!=null&&bn.includes("\u672A\u53D1\u5E03"))){xe.ZP.error("\u5DF2\u53D1\u5E03\uFF0C\u4E0D\u80FD\u518D\u4FEE\u6539\u7EDF\u4E00\u8BBE\u7F6E");return}if(_n.unified_setting=!_n.unified_setting,_n.unified_setting||(_n.unified_late=!1,Si([{late_penalty:5}])),Ti(Object.assign({},_n)),_n.unified_setting===!1&&ai==""){xi(ai.concat({}));return}_n.unified_setting&&(xi([]),Si([{late_penalty:5}]))}},jt.createElement(Wt.ZP,{value:!0,disabled:Ge||!(Le!=null&&Le.manage_all_group),style:{marginRight:"50px"}},"\u7EDF\u4E00\u53D1\u5E03"),jt.createElement(Wt.ZP,{disabled:Ge||!((It=Le==null?void 0:Le.group_settings)!=null&&It.length),value:!1},"\u5206\u73ED\u53D1\u5E03")),((wt=Le==null?void 0:Le.group_settings)==null?void 0:wt.length)===0&&jt.createElement("div",{style:{color:"rgba(0, 0, 0, 0.25)",height:"22px"}},"\uFF08\u672C\u8BFE\u5802\u65E0\u5206\u73ED\uFF0C\u4EC5\u652F\u6301\u9009\u62E9\u201C\u7EDF\u4E00\u53D1\u5E03\u201C\uFF09")),_n.unified_setting&&jt.createElement("div",{style:{display:"flex",color:"#666666",background:"#F6F7F9",padding:"5px 30px",height:"50px",marginTop:"1px"}},jt.createElement(se.Z,{align:"middle"},jt.createElement(ze.Z,{style:{marginLeft:"23px"}},"\u53D1\u5E03\u65F6\u95F4"),jt.createElement(ze.Z,{className:"ml10"},jt.createElement(ee.default,{size:"large",disabled:Ge||!((xt=Ae==null?void 0:Ae.homework_status)!=null&&xt.includes("\u672A\u53D1\u5E03")||(Ft=Ae==null?void 0:Ae.homework_status)!=null&&Ft.includes("\u672A\u5F00\u59CB"))||(0,bt.Rm)()&&!((Gt=sn.AssistantObject.practice)!=null&&Gt.can_publish),style:{width:170},placeholder:"\u8BF7\u9009\u62E9\u53D1\u5E03\u65F6\u95F4",showTime:{format:"HH:mm"},allowClear:!1,format:"YYYY-MM-DD HH:mm",disabledDate:Zn=>Xt(Zn,Le==null?void 0:Le.course_end_date),disabledTime:Zn=>Ue(Zn),value:_n.publish_time?Ne()(_n.publish_time):"",onChange:(Zn,bn)=>{_n.publish_time=bn,(_n.end_time==""||!_n.end_time)&&_n.unified_setting&&(_n.end_time=Ne()(Zn).add(7,"days").format("YYYY-MM-DD HH:mm:ss")),Ti(Object.assign({},_n))}}))),jt.createElement(se.Z,{align:"middle",className:"pl30"},jt.createElement(ze.Z,null,"\u622A\u6B62\u65F6\u95F4"),jt.createElement(ze.Z,{className:"ml10"},jt.createElement(ee.default,{size:"large",style:{width:170},allowClear:!1,placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4",showTime:{format:"HH:mm",defaultValue:Ne()((0,lt.U6)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:(Le==null?void 0:Le.allow_late)&&(Le==null?void 0:Le.homework_status.includes("\u5DF2\u622A\u6B62"))||Ge||(Le==null?void 0:Le.allow_late)&&Ne()()>=Ne()(Le==null?void 0:Le.end_time)||(0,bt.Rm)()&&!((kt=sn.AssistantObject.practice)!=null&&kt.can_publish),disabledDate:Zn=>Xt(Zn,Le==null?void 0:Le.course_end_date,_n.publish_time),disabledTime:Zn=>Ue(Zn,_n.publish_time),value:_n.end_time?Ne()(_n.end_time):"",onChange:(Zn,bn)=>{_n.end_time=bn,Ti(Object.assign({},_n))}})))),!_n.unified_setting&&(ai==null?void 0:ai.length)>0&&jt.createElement(se.Z,{style:{display:"flex",color:"#666666",background:"#F6F7F9",padding:"5px 30px",marginTop:"1px"}},ai&&ai.map(function(Zn,bn){var Pr,Er,Zi,_r,ho,br,$e;return jt.createElement(ze.Z,{span:24,key:bn},jt.createElement(se.Z,{gutter:[8,16],style:{display:"flex",alignItems:"center",marginBottom:bn==(ai==null?void 0:ai.length)-1?"0px":"10px"}},jt.createElement("div",{style:{minWidth:85,marginRight:"15px",textAlign:"right"}},"\u53D1\u5E03\u89C4\u5219",bn+1),jt.createElement(Pe.default,{disabled:Ge||((Pr=Ae==null?void 0:Ae.homework_status)!=null&&Pr.includes("\u672A\u53D1\u5E03")&&Zn.id||Ne()()<Ne()(Zn==null?void 0:Zn.publish_time)?!1:!!(Zn!=null&&Zn.publish_time))||(0,bt.Rm)()&&!((Er=sn.AssistantObject.practice)!=null&&Er.can_publish),mode:"multiple",className:gt.Z.multiple_select,style:{width:"250px"},value:Zn.group_name,placeholder:"\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0",onChange:Oe=>{var Me;if((0,bt.Rm)()&&!((Me=sn.AssistantObject.practice)!=null&&Me.can_publish)){xe.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}ai[bn].group_name=Oe,ai[bn].group_id=Zn.group_id;const Pi=(0,et.flattenDeep)(ai.map(rr=>rr.group_name)),Vi=Gn.map(rr=>{let Dn=(rr==null?void 0:rr.group_name)||[];return rn(tn({},rr),{group_name:(0,et.remove)(Dn,pi=>Pi.includes(pi))})});Si(Vi),xi(ai.slice())},maxTagCount:4,maxTagPlaceholder:Oe=>jt.createElement("div",{style:{cursor:"pointer"},onClick:()=>Ct(Zn,bn)},"+",Oe==null?void 0:Oe.length)},Le.group_settings&&Le.group_settings.map(function(Oe){if(!ai.map(Pi=>Pi.group_name).flat().includes(Oe.group_name))return jt.createElement(Be,{value:Oe.group_name,key:Oe.id},Oe.group_name)})),jt.createElement("div",{className:"ml20"},jt.createElement(Yn,{size:"large",ranges:{\u6B64\u523B:[Zn.publish_time?Ne()(Zn.publish_time):Ne()(),Ne()()]},allowClear:!1,disabled:Ge||(Ne()()<=Ne()((_r=Jr((Zi=Zn==null?void 0:Zn.group_id)==null?void 0:Zi[0]))==null?void 0:_r.publish_time)?!1:[!0,Bo((ho=Zn==null?void 0:Zn.group_id)==null?void 0:ho[0])]),style:{width:605},placeholder:["\u53D1\u5E03\u65F6\u95F4\uFF08\u5B66\u751F\u6536\u5230\u4F5C\u4E1A\u65F6\u95F4\uFF09","\u622A\u6B62\u65F6\u95F4\uFF08\u5B66\u751F\u201C\u6309\u65F6\u201D\u63D0\u4EA4\u4F5C\u54C1\u65F6\u95F4\u622A\u70B9\uFF09"],disabledDate:Oe=>Xt(Oe,Le==null?void 0:Le.course_end_date),disabledTime:Oe=>Ue(Oe),showTime:{showNow:!0,format:"HH:mm",defaultValue:[Ne()((0,lt.U6)(),"HH:mm"),Ne()((0,lt.U6)(),"HH:mm")]},format:"YYYY-MM-DD HH:mm",value:[Zn.publish_time?Ne()(Zn.publish_time):void 0,Zn.end_time?Ne()(Zn.end_time):void 0],onChange:(Oe,Me)=>{var Pi;if((0,bt.Rm)()&&!((Pi=sn.AssistantObject.practice)!=null&&Pi.can_publish)){xe.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}ai[bn].publish_time=Me[0],!Zn.end_time&&Me[0]?ai[bn].end_time=Ne()(Me[0]).add(7,"days"):ai[bn].end_time=Me[1],xi([...ai])},onCalendarChange:(Oe,Me,Pi)=>{if(Me!=null&&Me[0]&&!Me[1]){const Vi=Ne()(Me[0]).add(7,"days");ai[bn].publish_time=Me[0],ai[bn].end_time=Vi,xi([...ai])}}})),!Ge&&jt.createElement("div",{style:{display:"flex",width:"50px"}},((br=Zn==null?void 0:Zn.group_id)==null?void 0:br.length)>1&&jt.createElement(ye.Z,{title:"\u89C4\u5219\u62C6\u5206"},jt.createElement("i",{className:"iconfont icon-chaifen ml10",style:{cursor:"pointer",color:"#3061d0"},onClick:()=>Ct(Zn,bn)})),ai.length<(($e=Le==null?void 0:Le.group_settings)==null?void 0:$e.length)&&jt.createElement("i",{className:"iconfont icon-zengjia1 ml10 mr10",style:{cursor:"pointer",color:"#00B187"},onClick:()=>{var Oe;if((0,bt.Rm)()&&!((Oe=sn.AssistantObject.practice)!=null&&Oe.can_publish)){xe.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}xi(ai.concat({}))}}),((Zn==null?void 0:Zn.publish_time)&&Ne()()<Ne()(Zn==null?void 0:Zn.publish_time)||!(Zn!=null&&Zn.publish_time))&&bn!=0&&jt.createElement("i",{className:"iconfont icon-shanjian1",style:{cursor:"pointer",color:"#E30000"},onClick:()=>{const Oe=(0,et.cloneDeep)(Gn);Oe.forEach((Me,Pi)=>{Me.group_name&&(Me.group_name=Me.group_name.filter(Vi=>{var rr;return!((rr=ai[bn].group_name)!=null&&rr.includes(Vi))}))}),ai=ai.filter((Me,Pi)=>bn!==Pi),Si(Oe),xi(ai.slice()),setTimeout(()=>xi(ai.slice()),10)}}))))}))),jt.createElement(se.Z,null,jt.createElement(ze.Z,null,jt.createElement("div",{className:gt.Z.title,style:{marginTop:"30px"}},"\u8865\u4EA4\u8BBE\u7F6E",jt.createElement("span",{className:"c-grey-666 font14",style:{fontWeight:400}},"\uFF08\u53EF\u5BF9\u5728\u4F5C\u4E1A\u53D1\u5E03\u65F6\u95F4\u8303\u56F4\u5185\u672A\u5B8C\u6210\u4F5C\u4E1A\u7684\u5B66\u751F\uFF0C\u5EF6\u957F\u65F6\u95F4\u8FDB\u884C\u8865\u4EA4\uFF09"))),jt.createElement(ze.Z,{span:24,style:{background:"#F6F7F9",padding:"13px 30px",display:"flex",alignItems:"center"}},jt.createElement(Nt.default,{checked:_n.allow_late,disabled:Ge||Ko,onChange:Zn=>{var bn;if((0,bt.Rm)()&&!((bn=sn.AssistantObject.practice)!=null&&bn.can_late)){xe.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}Zn.target.checked&&Se.default.warning({title:"\u5F00\u542F\u8865\u4EA4\u63D0\u793A",centered:!0,width:480,content:jt.createElement("div",{style:{padding:10,background:"#f5f6f9"}},jt.createElement("div",null,"1.\u5F00\u542F\u8865\u4EA4\u540E\u4E0D\u53EF\u5173\u95ED\uFF0C\u8865\u4EA4\u65B9\u5F0F\u63D0\u4EA4\u4FDD\u5B58\u540E\u4E0D\u53EF\u4FEE\u6539\uFF1B"),jt.createElement("div",null,"2.\u8865\u4EA4\u622A\u6B62\u65F6\u95F4\u5FC5\u987B\u665A\u4E8E\u4F5C\u4E1A\u622A\u6B62\u65F6\u95F4\uFF1B"),jt.createElement("div",null,"3.\u73ED\u7EA7\u9636\u6BB5\u8FDB\u5165\u201C\u8865\u4EA4\u4E2D\u201D\u5219\u4E0D\u53EF\u53D8\u66F4\u4F5C\u4E1A\u622A\u6B62\u65F6\u95F4\u3002"))}),_n.allow_late=!_n.allow_late,Gn==""&&Si([{late_penalty:5}]),Ti(Object.assign({},_n))}},jt.createElement("strong",null,"\u5F00\u542F\u8865\u4EA4")))),(_n==null?void 0:_n.allow_late)&&jt.createElement("div",{style:{background:"#F6F7F9",padding:"10px 30px",marginTop:"1px",color:"#666666"}},jt.createElement("div",{style:{display:"flex"}},jt.createElement("div",{style:{width:"110px",textAlign:"right"}},"\u8865\u4EA4\u65B9\u5F0F"),jt.createElement(Wt.ZP.Group,{style:{marginLeft:"20px"},disabled:Ge||(Le==null?void 0:Le.anonymous_comment)||(Le==null?void 0:Le.allow_late),value:_n.unified_late,onChange:Zn=>{var bn;if((0,bt.Rm)()&&!((bn=sn.AssistantObject.practice)!=null&&bn.can_late)){xe.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}_n.unified_late=Zn.target.value,Gn==""&&!Zn.target.value&&Si([{penalty_type:St.Q.Percent,late_penalty:20}]),Ti(tn({},_n))}},(_n==null?void 0:_n.unified_setting)&&jt.createElement(Wt.ZP,{value:!0,disabled:!(Le!=null&&Le.manage_all_group),style:{marginRight:"50px"}},"\u7EDF\u4E00\u8865\u4EA4"),((Yt=Le==null?void 0:Le.group_settings)==null?void 0:Yt.length)>0&&jt.createElement(Wt.ZP,{value:!1},"\u5206\u73ED\u8865\u4EA4"))),_n!=null&&_n.unified_late?jt.createElement(jt.Fragment,null,jt.createElement(se.Z,{align:"middle",style:{marginTop:"10px"}},jt.createElement(ze.Z,{style:{width:"110px",textAlign:"right"}},"\u8865\u4EA4\u6263\u5206"),jt.createElement(ze.Z,{className:"ml20"},jt.createElement(St.Z,{disabled:Ge||bo,value:{type:_n.penalty_type,inputValue:_n.late_penalty},onChange:Zn=>{var bn;if((0,bt.Rm)()&&!((bn=sn.AssistantObject.practice)!=null&&bn.can_late)){xe.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}Ti(rn(tn({},_n),{late_penalty:Zn.inputValue,penalty_type:Zn.type}))}})),jt.createElement(ze.Z,{flex:"1",className:"ml5"},jt.createElement("span",{className:"c-grey-c ml10"},_n.penalty_type===St.Q.Number?"(\u8865\u4EA4\u65F6\u6309\u7167\u5B66\u751F\u603B\u6210\u7EE9\u6263\u5206)":"(\u5B66\u751F\u6700\u7EC8\u5F97\u5206=\u8865\u4EA4\u524D\u5F97\u5206+\u8865\u4EA4\u9636\u6BB5\u589E\u52A0\u7684\u5206\u503C*\uFF08100%-\u767E\u5206\u6BD4%\uFF09)"))),jt.createElement(se.Z,{align:"middle",style:{marginTop:"15px"}},jt.createElement(ze.Z,{style:{width:"110px",textAlign:"right"}},"\u8865\u4EA4\u622A\u6B62\u65F6\u95F4"),jt.createElement(ze.Z,{className:"ml20"},jt.createElement(ee.default,{size:"large",allowClear:!1,style:{width:170},placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4",showTime:{format:"HH:mm",defaultValue:Ne()((0,lt.U6)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:Ge||bo,value:_n.late_time?Ne()(_n.late_time):"",disabledDate:Zn=>Xt(Zn,Le==null?void 0:Le.course_end_date),onChange:(Zn,bn)=>{var Pr;if((0,bt.Rm)()&&!((Pr=sn.AssistantObject.practice)!=null&&Pr.can_late)){xe.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}_n.late_time=bn,Ti(Object.assign({},_n))}})))):Gn.map(function(Zn,bn){var Pr;return jt.createElement(ze.Z,{span:24,key:bn},jt.createElement(se.Z,{style:{display:"flex",alignItems:"center",marginTop:"10px"}},jt.createElement("div",{style:{width:"85px",marginLeft:"27px",textAlign:"right"}},"\u8865\u4EA4\u89C4\u5219",bn+1),jt.createElement(Pe.default,{disabled:Ge||!((Pr=Ae==null?void 0:Ae.homework_status)!=null&&Pr.includes("\u672A\u53D1\u5E03"))&&Zn.id||(Le==null?void 0:Le.anonymous_comment),mode:"multiple",className:gt.Z.multiple_select,style:{width:"212px",marginLeft:"18px"},value:typeof Zn.group_name=="string"?[Zn.group_name]:Zn.group_name,placeholder:"\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0",onChange:Er=>{var Zi;if((0,bt.Rm)()&&!((Zi=sn.AssistantObject.practice)!=null&&Zi.can_late)){xe.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}Gn[bn].group_name=Er,Gn[bn].group_id=Zn.group_id,Si(Gn.slice())}},Le.group_settings&&Le.group_settings.map(function(Er){const Zi=Gn.map(ho=>ho.group_name).flat(),_r=ai.map(ho=>ho.group_name).flat();if(_n!=null&&_n.unified_setting){if(!Zi.includes(Er.group_name))return jt.createElement(Be,{value:Er.group_name,key:Er.id},Er.group_name)}else if(_r.includes(Er.group_name)&&!Zi.includes(Er.group_name))return jt.createElement(Be,{value:Er.group_name,key:Er.id},Er.group_name)})),jt.createElement("div",{className:"ml20 mr10"},"\u8865\u4EA4\u6263\u5206"),jt.createElement(St.Z,{disabled:Ge||ko(Zn.id),value:{type:Zn.penalty_type,inputValue:Zn.late_penalty},onChange:Er=>{var Zi;if((0,bt.Rm)()&&!((Zi=sn.AssistantObject.practice)!=null&&Zi.can_late)){xe.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}Gn[bn].late_penalty=Er.inputValue,Gn[bn].penalty_type=Er.type,Si([...Gn])}}),jt.createElement("div",{className:"ml20 mr10"},"\u8865\u4EA4\u622A\u6B62\u65F6\u95F4"),jt.createElement(ee.default,{size:"large",disabled:Ge||ko(Zn.id),style:{width:225},showTime:{format:"HH:mm",defaultValue:Ne()((0,lt.U6)(),"HH:mm")},placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4",disabledDate:Er=>Xt(Er,Le==null?void 0:Le.course_end_date),format:"YYYY-MM-DD HH:mm",value:Zn!=null&&Zn.late_time?Ne()(Zn.late_time):void 0,onChange:(Er,Zi)=>{var _r;if((0,bt.Rm)()&&!((_r=sn.AssistantObject.practice)!=null&&_r.can_late)){xe.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}Gn[bn].late_time=Zi,Si([...Gn])}}),!Ge&&jt.createElement("div",{style:{display:"flex",width:"50px"}},jt.createElement("i",{className:"iconfont icon-zengjia1 ml10 mr10",style:{cursor:"pointer",color:"#00B187"},onClick:()=>{var Er;if((0,bt.Rm)()&&!((Er=sn.AssistantObject.practice)!=null&&Er.can_late)){xe.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}Si(Gn.concat({penalty_type:St.Q.Percent,late_penalty:20}))}}),bn>0&&!Zn.id&&jt.createElement("i",{className:"iconfont icon-shanjian1",style:{cursor:"pointer",color:"#E30000"},onClick:()=>{var Er;if((0,bt.Rm)()&&!((Er=sn.AssistantObject.practice)!=null&&Er.can_late)){xe.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}Gn=Gn.filter((Zi,_r)=>bn!==_r),Si(Gn.slice()),setTimeout(()=>Si(Gn.slice()),10)}}))))})),!Ge&&jt.createElement(jt.Fragment,null,jt.createElement(We.ZP,{type:"primary",size:"large",loading:In,style:{width:"138px",marginTop:"30px"},onClick:()=>so()},"\u4FDD\u5B58")),jt.createElement(zt.Z,{onConfirm:(Zn,bn)=>{ai.splice(Zn,0,...bn),ai.splice(Zn+bn.length,1);const Pr=(0,lt.QE)([...ai]);xi([...Pr])}}),jt.createElement(Ht.Z,{resdata:Di,type:"shixun",okloading:In,oktext:(Di==null?void 0:Di.can_copy_num)===0?"\u786E\u5B9A":"\u4E00\u952E\u590D\u5236\u5E76\u66FF\u6362",onok:Zn=>nn(void 0,null,function*(){gn(!0);let bn=yield(0,nt.ZP)(`/api/courses/${pe.coursesId}/batch_copy_shixuns.json`,{method:"post",body:{type:"homework_common",ids:[parseInt(pe.categoryId)]}});gn(!1),(bn==null?void 0:bn.status)===0&&po(Kr)})}))};oi.ZP=(0,mt.connect)(({shixunHomeworks:Je,classroomList:An,loading:we,user:sn})=>({shixunHomeworks:Je,classroomList:An,loading:we.effects,user:sn}))(vn)},82693:function(zn,oi,Ot){"use strict";var Dt=Ot(59301),ee=Ot(14566),Pe=Ot(28284),xe=Ot(62957),Se=Ot(6767),Wt=Ot(54172),se=Ot(89070),ze=Ot(3294),ye=Ot(1370),Nt=Ot(99064),We=Ot(61186),ie=Ot.n(We),Ne=Ot(955),bt=Ot(59301),nt=Object.defineProperty,et=Object.getOwnPropertySymbols,ct=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable,gt=(Ht,qt,jt)=>qt in Ht?nt(Ht,qt,{enumerable:!0,configurable:!0,writable:!0,value:jt}):Ht[qt]=jt,mt=(Ht,qt)=>{for(var jt in qt||(qt={}))ct.call(qt,jt)&>(Ht,jt,qt[jt]);if(et)for(var jt of et(qt))lt.call(qt,jt)&>(Ht,jt,qt[jt]);return Ht},St=(Ht,qt,jt)=>new Promise((Jt,ge)=>{var he=Ke=>{try{Re(jt.next(Ke))}catch(Mn){ge(Mn)}},Fe=Ke=>{try{Re(jt.throw(Ke))}catch(Mn){ge(Mn)}},Re=Ke=>Ke.done?Jt(Ke.value):Promise.resolve(Ke.value).then(he,Fe);Re((jt=jt.apply(Ht,qt)).next())});const{Dragger:Mt}=ee.default,zt=({classroomList:Ht,dispatch:qt,onOk:jt})=>{const Jt=(0,se.useParams)(),[ge]=Pe.default.useForm(),[he,Fe]=(0,Dt.useState)(),[Re,Ke]=(0,Dt.useState)(!1),Mn={height:100,onRemove:()=>{Fe("")},accept:".xls,.xlsx",multiple:!1,maxCount:1,beforeUpload:tn=>St(void 0,null,function*(){return Fe(tn),!1})};return(0,Dt.useEffect)(()=>{ge.setFieldsValue({publish_time:ie()(ie()(new Date).add(0,"days").format("YYYY-MM-DD HH:mm")),end_time:ie()(ie()(new Date((0,Ne.qd)("/"))).add(7,"days").format("YYYY-MM-DD HH:mm"))})},[]),bt.createElement(xe.default,{centered:!0,title:"\u8865\u5145\u6210\u7EE9",open:Ht.actionTabs.key==="\u8865\u5145\u6210\u7EE9",okText:"\u786E\u5B9A",width:750,destroyOnClose:!0,cancelText:"\u53D6\u6D88",okButtonProps:{loading:Re},onOk:()=>St(void 0,null,function*(){ge.submit()}),onCancel:()=>{ge.resetFields(),qt({type:"classroomList/setActionTabs",payload:{}})}},bt.createElement(Pe.default,{form:ge,onFinish:tn=>St(void 0,null,function*(){var rn,nn,me;if(!(he!=null&&he.size)){Se.ZP.info("\u8BF7\u4E0A\u4F20\u6587\u4EF6");return}Ke(!0);let Xt=new FormData;Xt.append("type",Ht.actionTabs.type),Xt.append("file",he);let Ue;window.location.href.indexOf("exercise")>-1?Ue=`/api/exercises/${Ht.actionTabs.id}/supplement_score.json`:Ue=`/api/homework_commons/${Ht.actionTabs.id}/supplement_score.json`;let Pn=yield(0,Nt.ZP)(Ue,{method:"post",body:Xt},!0);Ke(!1),(Pn==null?void 0:Pn.status)===0&&(jt(),ge.resetFields(),qt({type:"classroomList/setActionTabs",payload:{}}),((nn=(rn=Pn==null?void 0:Pn.data)==null?void 0:rn.fail)==null?void 0:nn.length)>0&&xe.default.confirm({title:"\u5BFC\u5165\u5931\u8D25",closable:!0,icon:null,width:610,content:bt.createElement(Wt.default,{pagination:!1,dataSource:(me=Pn==null?void 0:Pn.data)==null?void 0:me.fail,scroll:{y:400},columns:[{title:"\u59D3\u540D",align:"left",dataIndex:"name"},{title:"\u5B66\u53F7/\u624B\u673A\u53F7/\u90AE\u7BB1",align:"left",dataIndex:"student_id"},{title:"\u5BFC\u5165\u5931\u8D25\u539F\u56E0",align:"left",dataIndex:"message"}]}),okText:"\u4E0B\u8F7D\u5BFC\u5165\u5931\u8D25\u6587\u4EF6",cancelText:"\u53D6\u6D88",onOk:()=>{(0,Ne.FH)("",ze.Z.API_SERVER+`/api/courses/get_external_score_fail_data.xlsx?type=${Ht.actionTabs.type}`)}}))})},bt.createElement(Pe.default.Item,{label:"\u4F5C\u4E1A\u540D\u79F0",labelCol:{span:3},name:"name"},Ht.actionTabs.name),bt.createElement(Pe.default.Item,{style:{marginBottom:0},label:bt.createElement("div",null,bt.createElement("span",{style:{color:"#ff4d4f",marginRight:5,fontFamily:"SimSun,sans-serif"}},"*"),bt.createElement("span",null,"\u5BFC\u5165\u6587\u4EF6")),labelCol:{span:3},rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u4E1A\u540D\u79F0"}]},bt.createElement("div",null,bt.createElement("a",{download:"\u6A21\u7248.xlsx",className:ye.Z.downloadbutton,href:ze.Z.API_SERVER+`/api/courses/down_external_score_template.json?type=${Ht.actionTabs.type}`},"\u4E0B\u8F7D\u6A21\u7248\u8868\u683C"),bt.createElement("span",{style:{marginLeft:10,color:"#999999"}},"\uFF08\u6839\u636E\u63D0\u793A\u4FE1\u606F\u5B8C\u5584\u8868\u683C\u5185\u5BB9\uFF09")),bt.createElement(Pe.default.Item,{style:{marginBottom:0}},bt.createElement(Mt,mt({},Mn),bt.createElement("a",{className:ye.Z.downloadbutton,style:{width:96}},"\u9009\u62E9\u6587\u4EF6"),bt.createElement("br",null),bt.createElement("span",{style:{color:"#999999"}},"\u4E0B\u8F7D\u6A21\u677F\u5E76\u5B8C\u5584\u4FE1\u606F\u540E\uFF0C\u53EF\u5C06\u6587\u4EF6\u62D6\u66F3\u81F3\u6B64\u5904\u4E0A\u4F20\u3002\u652F\u6301\u683C\u5F0F\uFF1A.xls\u3001.xlsx"))))))};oi.Z=(0,se.connect)(({classroomList:Ht})=>({classroomList:Ht}))(zt)},59437:function(zn,oi,Ot){"use strict";Ot.d(oi,{Z:function(){return Nt}});var Dt=Ot(59301),ee=Ot(37568),Pe=Ot(62673),xe=Ot(77019),Se={leftdiv:"leftdiv___aBzsX",listClass:"listClass___bxIEW",spantitle:"spantitle___v_Vc4",rightdiv:"rightdiv___xWu4M"},Wt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAbVJREFUOE+Nk79rFUEUhb+zE4OFwUD+CyGKKQQbSaMikQQ7C1tBBIsUQaJvl2Fn/cWDpAiIYJsi7YOIaCUWFoKKRhG0sbEzEImFGnev7G6yyXsxeU5159yZb87l3hG9q2WLiBO79FIwXpLp0s6cwITnQCMWrGDM43jdBckZQ0wTMdrong2R2Bxm0/98sZ8ozdcOEm5hjOC41u9Olc9ZQKySclOVkNhljCmCzjeAJM/4FbW5p+8k5tlggTtarfKxLSM6pHq4BTiL0SboaAOIi284jeP1nti+ApMEvdoEvEPMkOpJDZi1IwzwgqDh/wSsYZwk08ca4O0Qua3zW8OV5crmHg6u22EGbQ2nIbx+1IC6rrK+cYJW9gXEVrbxGUEj5bltQGJvgBapHu0LSGwCyEh1vBsQWwd4TNCDPg6uAOcImuoFlL1dJ9WNPg5uYwwRVM3MzhJmKIpjZK6e9bj4jNNpvL4QFx9wuoDXJ1r5IlH0llTtXgcXwa4SolObnYnwKnbFcfEcdJ+gpW6AtzFynuIop/Fn053u4CA5yzjO4FV9tu0Syl2S38WiSWBgD8AfoEPQ7Fb+LwIiyhxWwe2KAAAAAElFTkSuQmCC",se=Ot(8797),ze=(We,ie,Ne)=>new Promise((bt,nt)=>{var et=gt=>{try{lt(Ne.next(gt))}catch(mt){nt(mt)}},ct=gt=>{try{lt(Ne.throw(gt))}catch(mt){nt(mt)}},lt=gt=>gt.done?bt(gt.value):Promise.resolve(gt.value).then(et,ct);lt((Ne=Ne.apply(We,ie)).next())}),Nt=({data:We,value:ie=[],handleChangePage:Ne,className:bt="",setSelectedRowKeys:nt,selectedRowKeys:et,onChange:ct=()=>{}})=>{const[lt,gt]=(0,Dt.useState)([]),[mt,St]=(0,Dt.useState)([]),[Mt,zt]=(0,Dt.useState)([]);let[Ht,qt]=(0,Dt.useState)(1),[jt,Jt]=(0,Dt.useState)();return(0,Dt.useEffect)(()=>{gt(We),St([]),zt([])},[We]),(0,Dt.useEffect)(()=>{nt&&(St(et),zt(et))},[et]),Dt.createElement("div",{className:`flex justify-between w-full ${bt}`},Dt.createElement("div",{className:Se.leftdiv},Dt.createElement(ee.default.Search,{size:"middle",style:{marginBottom:"10rem"},onChange:ge=>ze(void 0,null,function*(){gt(We.filter(he=>{var Fe;return(Fe=he==null?void 0:he.name)==null?void 0:Fe.includes(ge.target.value)}))}),placeholder:"\u53EF\u8F93\u5165\u73ED\u7EA7\u540D\u79F0\u67E5\u8BE2"}),lt.length===0&&Dt.createElement(se.Z,{styles:{margin:"70rem auto"},customText:"\u6682\u65E0\u5206\u73ED"}),Dt.createElement("div",{style:{height:"85%",overflow:"auto",overflowX:"hidden"}},Dt.createElement(Pe.default.Group,{value:mt.map(ge=>`${ge.id}`),onChange:ge=>{nt(lt.filter(he=>ge.includes(`${he.id}`)))},style:{marginTop:"10px",flexDirection:"column"}},lt.map((ge,he)=>Dt.createElement(xe.Z,{key:ge.id,style:{marginTop:"10rem",lineHeight:"24rem",display:"flex",width:"200rem"}},Dt.createElement(Pe.default,{style:{display:"flex",height:"24px",alignItems:"center"},disabled:ge.is_published,value:`${ge.id}`},Dt.createElement("div",{className:Se.listClass},Dt.createElement("span",{className:Se.spantitle,style:{width:ge.is_published?"108px":"170px"}},ge.name),ge.is_published&&Dt.createElement("span",{style:{width:"52px",height:"24px",background:"#B8B8B8",borderRadius:"13px",color:"white",lineHeight:"24px",textAlign:"center",display:"inline-block"}},"\u5DF2\u53D1\u5E03")))))))),Dt.createElement("div",{className:Se.rightdiv},Dt.createElement(ee.default.Search,{onChange:ge=>{zt(mt.filter(he=>he.name.includes(ge.target.value)))},size:"middle",placeholder:"\u53EF\u8F93\u5165\u73ED\u7EA7\u540D\u79F0\u67E5\u8BE2"}),Mt.length===0&&Dt.createElement(se.Z,{imgStyles:{width:"200rem"},styles:{margin:"70rem auto"},customText:"\u6682\u672A\u9009\u62E9\u5206\u73ED"}),Mt.length>0&&Dt.createElement("div",{style:{marginTop:"10px",height:"85%",overflow:"hidden",position:"relative"}},Dt.createElement("div",{style:{overflowX:"hidden",overflowY:"scroll",position:"absolute",left:0,top:0,right:-17,bottom:0}},Mt.map((ge,he)=>Dt.createElement("div",{className:"flex justify-between item-center",style:{marginTop:"10rem"},key:ge.id},Dt.createElement("div",{className:"multi_ellipsis1 flex-1 minW-0",style:{margin:"0 5rem"}},ge.name),Dt.createElement("img",{src:Wt,className:"current",style:{height:"16rem",marginRight:"17rem"},onClick:()=>{nt(mt.filter(Fe=>`${Fe.id}`!=`${ge.id}`))}})))))))}},38233:function(zn,oi,Ot){"use strict";Ot.d(oi,{Z:function(){return ct}});var Dt=Ot(59301),ee=Ot(89070),Pe=Ot(16326),xe=Ot(62957),Se=Ot(37568),Wt=Ot(6767),se=Ot(77019),ze=Ot(5269),ye={title_tooltip:"title_tooltip___LLdrn",multiple_select:"multiple_select___kDXUm",modal_con:"modal_con___ERnkW"},Nt=Ot(61186),We=Ot.n(Nt),ie=Ot(955),Ne=Ot(8797),bt=Ot(59301);const{RangePicker:nt}=Pe.default,et=({dispatch:lt,classroomList:gt,onConfirm:mt})=>{const[St,Mt]=(0,Dt.useState)([]),[zt,Ht]=(0,Dt.useState)([]),[qt,jt]=(0,Dt.useState)(""),[Jt,ge]=(0,Dt.useState)([!1,!1]);(0,Dt.useEffect)(()=>{var Re,Ke,Mn,tn;if(gt.actionTabs.key==="\u5206\u73ED\u53D1\u5E03-\u53D1\u5E03\u89C4\u5219\u62C6\u5206"){console.log((Re=gt.actionTabs)==null?void 0:Re.rangePickerDisabled),(Ke=gt.actionTabs)!=null&&Ke.rangePickerDisabled?ge((Mn=gt.actionTabs)==null?void 0:Mn.rangePickerDisabled):ge([!1,!1]);let rn=gt.actionTabs.data,nn=(tn=rn==null?void 0:rn.group_name)==null?void 0:tn.map((me,Xt)=>{var Ue;return{group_id:rn==null?void 0:rn.group_id[Xt],group_name:rn==null?void 0:rn.group_name[Xt],is_admin:rn==null?void 0:rn.is_admin,end_time:rn==null?void 0:rn.end_time,publish_time:Array.isArray(rn==null?void 0:rn.publish_time)?(Ue=rn==null?void 0:rn.publish_time)==null?void 0:Ue[0]:rn==null?void 0:rn.publish_time}});nn&&(Mt([...nn]),Ht([...nn]))}},[gt.actionTabs]);const he=()=>{lt({type:"classroomList/setActionTabs",payload:{}}),jt("")},Fe=Re=>{if(Re){const Ke=zt==null?void 0:zt.filter(Mn=>{var tn,rn;return(rn=(tn=Mn==null?void 0:Mn.group_name)==null?void 0:tn.toLowerCase())==null?void 0:rn.includes(Re==null?void 0:Re.toLowerCase())});Mt(Ke)}else Mt(zt)};return bt.createElement(xe.default,{width:980,title:bt.createElement("div",{style:{fontWeight:"bold",display:"flex"}},bt.createElement("div",null,"\u5206\u73ED\u53D1\u5E03-\u53D1\u5E03\u89C4\u5219\u62C6\u5206",bt.createElement("span",{className:ye.title_tooltip},"\uFF08\u5F53\u5206\u73ED\u53D1\u5E03\u65F6\u95F4\u548C\u622A\u6B62\u65F6\u95F4\u4E0D\u76F8\u540C\u65F6\u5019\uFF0C\u73ED\u7EA7\u81EA\u52A8\u62C6\u5206\u51FA\u53BB\u65B0\u8D77\u89C4\u5219\uFF09")),bt.createElement(Se.default.Search,{allowClear:!0,placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u8FDB\u884C\u641C\u7D22",style:{width:220,marginLeft:"60px"},value:qt,onChange:Re=>{jt(Re.target.value.trim()),Fe(Re.target.value.trim())}})),centered:!0,maskClosable:!1,open:gt.actionTabs.key==="\u5206\u73ED\u53D1\u5E03-\u53D1\u5E03\u89C4\u5219\u62C6\u5206",onCancel:()=>he(),onOk:()=>{var Re;if(zt.some(Mn=>!Mn.end_time||!Mn.publish_time)){Wt.ZP.warning("\u8BF7\u5C06\u5217\u8868\u6570\u636E\u4E2D\u7684\u53D1\u5E03\u65F6\u95F4\u548C\u622A\u6B62\u65F6\u95F4\u8865\u5145\u5B8C\u6574\uFF01");return}mt((Re=gt.actionTabs)==null?void 0:Re.index,zt),he()}},bt.createElement("div",{className:ye.modal_con},bt.createElement(se.Z,{style:{display:"flex",color:"#666666",padding:"5px",marginTop:"1px"}},(St==null?void 0:St.length)>0?St.map(function(Re,Ke){return bt.createElement(ze.Z,{span:24,key:Ke},bt.createElement(se.Z,{gutter:[8,16],style:{display:"flex",alignItems:"center",marginBottom:Ke==(St==null?void 0:St.length)-1?"0px":"10px"}},bt.createElement("div",{className:ye.multiple_select,title:Re==null?void 0:Re.group_name},Re==null?void 0:Re.group_name),bt.createElement("div",{className:"ml20"},bt.createElement(nt,{size:"large",allowClear:!1,disabled:Jt,style:{width:600},placeholder:["\u53D1\u5E03\u65F6\u95F4\uFF08\u5B66\u751F\u6536\u5230\u4F5C\u4E1A\u65F6\u95F4\uFF09","\u622A\u6B62\u65F6\u95F4\uFF08\u5B66\u751F\u201C\u6309\u65F6\u201D\u63D0\u4EA4\u4F5C\u54C1\u65F6\u95F4\u622A\u70B9\uFF09"],disabledDate:Mn=>{var tn;return(0,ie.Q8)(Mn,(tn=gt.actionTabs)==null?void 0:tn.disabledDate)},disabledTime:Mn=>(0,ie.d0)(Mn),showTime:{showNow:!0,format:"HH:mm",defaultValue:[We()((0,ie.U6)(),"HH:mm"),We()((0,ie.U6)(),"HH:mm")]},format:"YYYY-MM-DD HH:mm",value:(Re==null?void 0:Re.publish_time)&&[We()(Re==null?void 0:Re.publish_time),Re!=null&&Re.end_time?We()(Re==null?void 0:Re.end_time):void 0],onChange:(Mn,tn)=>{St[Ke].publish_time=tn[0],St[Ke].end_time=tn[1],Mt([...St]),zt.forEach(rn=>{rn.group_id===(Re==null?void 0:Re.group_id)&&(rn.publish_time=tn[0],rn.end_time=tn[1])}),Ht([...zt])},onCalendarChange:(Mn,tn,rn)=>{if(tn!=null&&tn[0]&&!tn[1]){const nn=We()(tn[0]).add(7,"days");St[Ke].publish_time=tn[0],St[Ke].end_time=nn,Mt([...St]),zt.forEach(me=>{me.group_id===(Re==null?void 0:Re.group_id)&&(me.publish_time=tn[0],me.end_time=nn)}),Ht([...zt])}}})),Jt[0]?bt.createElement("i",{className:"iconfont icon-shanjian1 ml15",style:{color:"#E30000",opacity:"0.2",cursor:"not-allowed"}}):bt.createElement("i",{className:"iconfont icon-shanjian1 ml15",style:{cursor:"pointer",color:"#E30000"},onClick:()=>{St.splice(Ke,1),Mt([...St]),zt.forEach((Mn,tn)=>{Mn.group_id===(Re==null?void 0:Re.group_id)&&zt.splice(tn,1)}),Ht([...zt])}})))}):bt.createElement(Ne.Z,null))))};var ct=(0,ee.connect)(({classroomList:lt})=>({classroomList:lt}))(et)},24768:function(zn,oi,Ot){"use strict";Ot.d(oi,{AL:function(){return St},Iy:function(){return We},Qv:function(){return bt},ez:function(){return mt},jb:function(){return ie}});var Dt=Ot(32834),ee=Ot.n(Dt),Pe=Ot(11690),xe=Ot.n(Pe);let Se=1;function Wt(jt,Jt){const ge=jt.match(/^(\s+)(?:```)/);if(ge===null)return Jt;const he=ge[1];return Jt.split(`
|
|
`).map(Fe=>{const Re=Fe.match(/^\s+/);if(Re===null)return Fe;const[Ke]=Re;return Ke.length>=he.length?Fe.slice(he.length):Fe}).join(`
|
|
`)}let se=[],ze=["<ul>"];const ye=new(ee()).Renderer,Nt=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function We(){se.length=0,ze=["<ul>"]}const ie={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function Ne(jt,Jt,ge,he){if(Jt>=jt.length||jt[Jt].level<=ge)return Jt;var Fe=jt[Jt];he.push("<li><a href='#"+Se+Fe.anchor+"'>"+Fe.text+"</a>"),Jt++;var Re=[];return Jt=Ne(jt,Jt,Fe.level,Re),Re.length>0&&(he.push("<ul>"),Re.forEach(function(Ke){he.push(Ke)}),he.push("</ul>")),he.push("</li>"),Jt=Ne(jt,Jt,ge,he),Jt}function bt(){return Ne(se,0,0,ze),ze.push("</ul>"),ze.join("")}const nt={heading(jt){const Jt=Nt.exec(jt);if(Se+=1,Jt)return{type:"heading",raw:Jt[0],depth:Jt[1].length,text:Jt[2]}},fences(jt){const Jt=this.rules.block.fences.exec(jt);if(Jt){const ge=Jt[0];let he=Wt(ge,Jt[3]||"");const Fe=Jt[2]?Jt[2].trim():Jt[2];if(["latex","katex","math"].indexOf(Fe)>=0){const Re=lt(),Ke=he;he=Re,gt[Re]={type:"block",expression:Ke}}return{type:"code",raw:ge,lang:Fe,text:he}}}},et=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ct=0;const lt=()=>`__special_katext_id_${ct++}__`;let gt={};function mt(){return gt}function St(){ct=0,gt={}}function Mt(jt){return jt=jt.replace(et,(Jt,ge)=>{const he=lt();return gt[he]={type:"inline",expression:ge},he}),jt}const zt=ye.listitem;ye.listitem=function(jt){return zt(Mt(jt))};const Ht=ye.paragraph;ye.paragraph=function(jt){return Ht(Mt(jt))};const qt=ye.tablecell;ye.tablecell=function(jt,Jt){return qt(Mt(jt),Jt)},ye.code=function(jt,Jt,ge){const he=(Jt||"").match(/\S*/)[0];return he?["latex","katex","math"].indexOf(he)>=0?`<p class='editormd-tex'>${jt}</p>`:`<pre class="prettyprint linenums"><code class="language-${Jt}">${ge?jt:(0,Pe.escape)(jt,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(ge?jt:(0,Pe.escape)(jt,!0))+"</code></pre>"},ye.heading=function(jt,Jt,ge){let he=this.options.headerPrefix+ge.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return se.push({anchor:he,level:Jt,text:jt}),"<h"+Jt+' id="'+Se+he+'">'+jt+"</h"+Jt+">"},ee().setOptions({silent:!0,gfm:!0,pedantic:!1}),ee().use({tokenizer:nt,renderer:ye}),oi.ZP=ee()},46474:function(zn,oi,Ot){"use strict";Ot.d(oi,{rX:function(){return Mt},pW:function(){return zt},gy:function(){return Ht},xY:function(){return St},O5:function(){return mt},hs:function(){return et},tJ:function(){return bt},o1:function(){return nt},Rd:function(){return gt}});var Dt=Ot(89070),ee=Ot(62957),Pe=Ot(37285),xe=Ot(6767),Se=Ot(24065),Wt=Ot(955),se=Ot(87169),ze=Ot(25510),ye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAIAAAAP3aGbAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAABcRAAAXEQHKJvM/AAAouElEQVR42u3de5gU1Z038HOqqu89PQPMhQHkNqCiCCK5qMRojIkXRNFERDTGNRvik5hN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beSKs1u3YnHqRT5whAUAZCCwAIAMBBYAkIHAAgAyEFgAQAYCCwDIMFutYefOnRUVFVa3ctWqVStXrjT4ZtsqK+RE5Ql7K1BpvAtHmdhWI8S2QhcWDWswG1gVFRVVVVVWtCxbOBy2ehMA4H44JQQAMhBYAEAGAgsAyEBgAQAZCCwAIMOSSShM3tFsaWkp+J1HZx+RN75O23pkRWEGk5wdEWJFN0023mTdEWfH9xjvZl5whAUAZCCwAIAMBBYAkIHAAgAyEFgAQAYCCwDIsGRYg7NIP99vRd+tKDlg2zutYLxJzk7/Ydv+dOEcKwPBERYAkIHAAgAyEFgAQAYCCwDIQGABABkILAAgowiHNYzk4QJWPEzvwm7mZEVlBZP1Epwd65CTbSMYLBq5giMsACADgQUAZCCwAIAMBBYAkIHAAgAyEFgAQIYlwxpaWlrMLG5yBgrbSvfbVnKASsED25j8iE2u0/jiJsc6uLBWhLPrZBYFVsHnvAEAYDglBABCEFgAQAYCCwDIQGABABlmL7qvWrUqHA5b3cotW7bYszsAwM24FXeIbUPl0XPbahsY76ZtU3W48+64ma0bZ9tnZFtdB9tKoQwEp4QAQAYCCwDIQGABABkILAAgA4EFAGQgsACAjDyGNQAAOAtHWABABgILAMhAYAEAGQgsACADgQUAZCCwAIAMBBYAkIHAAgAyEFgAQAYCCwDIQGABABkILAAgA4EFAGQgsACAjP8Prqme11Be/zoAAAAASUVORK5CYII=",Nt=Ot.p+"static/newqrcode.a8740efb.png",We=Ot(32637),ie=Ot(59301),Ne=(qt,jt,Jt)=>new Promise((ge,he)=>{var Fe=Mn=>{try{Ke(Jt.next(Mn))}catch(tn){he(tn)}},Re=Mn=>{try{Ke(Jt.throw(Mn))}catch(tn){he(tn)}},Ke=Mn=>Mn.done?ge(Mn.value):Promise.resolve(Mn.value).then(Fe,Re);Ke((Jt=Jt.apply(qt,jt)).next())});const bt=(qt,jt=!1,Jt=!1,ge="",he=!1)=>!!(nt(qt)&&ct(qt,jt,Jt,ge,he)),nt=qt=>(0,Se.bg)()?!0:(qt({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1),et=qt=>{var jt,Jt,ge;const{user:he}=(0,Dt.getDvaApp)()._store.getState();(0,Se.bg)()&&!((Jt=(jt=he==null?void 0:he.userInfo)==null?void 0:jt.course)!=null&&Jt.course_public)&&!((ge=he==null?void 0:he.userInfo)!=null&&ge.profile_completed)&&qt({type:"user/showUpdateProfilePanel",payload:{showUpdateProfilePanel:!0,showClosable:!0,backurl:"/account/profile/edit",isCurrentPage:!0}})},ct=(qt,jt=!1,Jt=!0,ge="",he=!1)=>{var Fe;const{user:Re}=(0,Dt.getDvaApp)()._store.getState();return(Fe=Re.userInfo)!=null&&Fe.profile_completed?!0:(Jt?qt({type:"user/showUpdateProfilePanel",payload:{showUpdateProfilePanel:!0,showClosable:!0,backurl:ge,isCurrentPage:he}}):ee.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,Wt.xg)("/account/profile/edit"),lt()}}),!1)},lt=()=>{ee.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=()=>{ee.default.warning({title:"\u63D0\u793A",icon:null,width:400,content:ie.createElement("div",{style:{textAlign:"center"}},ie.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"),ie.createElement("img",{style:{border:"1px solid #D8E3E9",width:190,height:180},src:We}),ie.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 qt;const{user:jt}=(0,Dt.getDvaApp)()._store.getState();return(qt=jt.userInfo)!=null&&qt.professional_certification?!0:(ee.default.confirm({title:"\u63D0\u793A",centered:!0,content:ie.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,Wt.xg)("/account/certification")}}),!1)},St=()=>(0,Se.V9)()?!0:(ee.default.warning({centered:!0,width:530,title:"\u63D0\u793A",content:ie.createElement("div",{className:"tc",style:{marginLeft:-38}},ie.createElement("p",null,"\u626B\u7801\u52A0\u5934\u6B4C\u52A9\u6559\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650"),ie.createElement("img",{src:Nt,width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1),Mt=(qt,jt)=>qt?!0:(ee.default.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:ie.createElement("div",null,ie.createElement("p",null,jt||"\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"),ie.createElement("div",{style:{marginLeft:"110px"}},ie.createElement("img",{src:ye,width:200}),ie.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:()=>{(0,Wt.xg)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1),zt=qt=>{ee.default.info({title:"\u8054\u7CFB\u5E73\u53F0\u8FD0\u8425",icon:null,width:615,centered:!0,content:ie.createElement("div",null,ie.createElement("div",null,ie.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"),ie.createElement(Pe.Z,null),ie.createElement("p",{style:{color:"#666666",fontSize:12}}," ",ie.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 ",ie.createElement("a",null,qt),"\u5929\u3002"),ie.createElement("p",{style:{color:"#666666",fontSize:12}}," ",ie.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")),ie.createElement("div",{style:{textAlign:"center",marginTop:30}},ie.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:ze,alt:"\u4E8C\u7EF4\u7801",width:160})))})},Ht=(qt,jt="")=>{const{shixunsDetail:{detail:Jt}}=(0,Dt.getDvaApp)()._store.getState();if((Jt==null?void 0:Jt.public)===2||(Jt==null?void 0:Jt.public)===1||(Jt==null?void 0:Jt.shixun_status)===3){let ge="";return(Jt==null?void 0:Jt.public)===2&&(ge="\u5DF2\u516C\u5F00"),(Jt==null?void 0:Jt.public)===1&&(ge="\u5F85\u5BA1\u6838"),(Jt==null?void 0:Jt.shixun_status)===3&&(ge="\u5DF2\u5173\u95ED"),ee.default.info({centered:!0,icon:ie.createElement(se.Z,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:ie.createElement("div",{className:"tc",style:{marginLeft:-38}},ie.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},ie.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",ge,"\uFF0C",jt,"\u3002"),ie.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),ie.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:ze,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0}return(Jt==null?void 0:Jt.shixun_status)===2?(ee.default.confirm({centered:!0,icon:ie.createElement(se.Z,null),title:"\u63D0\u793A",content:ie.createElement("div",null,ie.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",jt,"\u3002"),ie.createElement("br",null),ie.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:()=>{ee.default.confirm({width:440,centered:!0,icon:ie.createElement(se.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:()=>Ne(void 0,null,function*(){(yield qt({type:"shixunsDetail/cancelRelease",payload:{id:Jt==null?void 0:Jt.identifier}})).status!==401&&(xe.ZP.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),qt({type:"shixunsDetail/getShixunsDetail",payload:{id:Jt==null?void 0:Jt.identifier}}),qt({type:"practiceSetting/getCommonData",payload:{id:Jt==null?void 0:Jt.identifier}}))})})}}),!0):!1}},99498:function(zn,oi,Ot){(function(Dt){Dt(Ot(89780))})(function(Dt){Dt.defineOption("placeholder","",function(ze,ye,Nt){var We=Nt&&Nt!=Dt.Init;if(ye&&!We)ze.on("blur",Se),ze.on("change",Wt),ze.on("swapDoc",Wt),Dt.on(ze.getInputField(),"compositionupdate",ze.state.placeholderCompose=function(){xe(ze)}),Wt(ze);else if(!ye&&We){ze.off("blur",Se),ze.off("change",Wt),ze.off("swapDoc",Wt),Dt.off(ze.getInputField(),"compositionupdate",ze.state.placeholderCompose),ee(ze);var ie=ze.getWrapperElement();ie.className=ie.className.replace(" CodeMirror-empty","")}ye&&!ze.hasFocus()&&Se(ze)});function ee(ze){ze.state.placeholder&&(ze.state.placeholder.parentNode.removeChild(ze.state.placeholder),ze.state.placeholder=null)}function Pe(ze){ee(ze);var ye=ze.state.placeholder=document.createElement("pre");ye.style.cssText="height: 0; overflow: visible",ye.style.direction=ze.getOption("direction"),ye.className="CodeMirror-placeholder CodeMirror-line-like";var Nt=ze.getOption("placeholder");typeof Nt=="string"&&(Nt=document.createTextNode(Nt)),ye.appendChild(Nt),ze.display.lineSpace.insertBefore(ye,ze.display.lineSpace.firstChild)}function xe(ze){setTimeout(function(){var ye=!1,Nt=ze.getInputField();Nt.nodeName=="TEXTAREA"?ye=!Nt.value:ze.lineCount()==1&&(ye=!/[^\u200b]/.test(Nt.querySelector(".CodeMirror-line").textContent)),ye?Pe(ze):ee(ze)},20)}function Se(ze){se(ze)&&Pe(ze)}function Wt(ze){var ye=ze.getWrapperElement(),Nt=se(ze);ye.className=ye.className.replace(" CodeMirror-empty","")+(Nt?" CodeMirror-empty":""),Nt?Pe(ze):ee(ze)}function se(ze){return ze.lineCount()===1&&ze.getLine(0)===""}})},25717:function(zn,oi,Ot){(function(Dt){Dt(Ot(89780))})(function(Dt){var ee={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Pe=Dt.Pos;Dt.defineOption("autoCloseBrackets",!1,function(nt,et,ct){ct&&ct!=Dt.Init&&(nt.removeKeyMap(Se),nt.state.closeBrackets=null),et&&(Wt(xe(et,"pairs")),nt.state.closeBrackets=et,nt.addKeyMap(Se))});function xe(nt,et){return et=="pairs"&&typeof nt=="string"?nt:typeof nt=="object"&&nt[et]!=null?nt[et]:ee[et]}var Se={Backspace:ye,Enter:Nt};function Wt(nt){for(var et=0;et<nt.length;et++){var ct=nt.charAt(et),lt="'"+ct+"'";Se[lt]||(Se[lt]=se(ct))}}Wt(ee.pairs+"`");function se(nt){return function(et){return ie(et,nt)}}function ze(nt){var et=nt.state.closeBrackets;if(!et||et.override)return et;var ct=nt.getModeAt(nt.getCursor());return ct.closeBrackets||et}function ye(nt){var et=ze(nt);if(!et||nt.getOption("disableInput"))return Dt.Pass;for(var ct=xe(et,"pairs"),lt=nt.listSelections(),gt=0;gt<lt.length;gt++){if(!lt[gt].empty())return Dt.Pass;var mt=Ne(nt,lt[gt].head);if(!mt||ct.indexOf(mt)%2!=0)return Dt.Pass}for(var gt=lt.length-1;gt>=0;gt--){var St=lt[gt].head;nt.replaceRange("",Pe(St.line,St.ch-1),Pe(St.line,St.ch+1),"+delete")}}function Nt(nt){var et=ze(nt),ct=et&&xe(et,"explode");if(!ct||nt.getOption("disableInput"))return Dt.Pass;for(var lt=nt.listSelections(),gt=0;gt<lt.length;gt++){if(!lt[gt].empty())return Dt.Pass;var mt=Ne(nt,lt[gt].head);if(!mt||ct.indexOf(mt)%2!=0)return Dt.Pass}nt.operation(function(){var St=nt.lineSeparator()||`
|
|
`;nt.replaceSelection(St+St,null),nt.execCommand("goCharLeft"),lt=nt.listSelections();for(var Mt=0;Mt<lt.length;Mt++){var zt=lt[Mt].head.line;nt.indentLine(zt,null,!0),nt.indentLine(zt+1,null,!0)}})}function We(nt){var et=Dt.cmpPos(nt.anchor,nt.head)>0;return{anchor:new Pe(nt.anchor.line,nt.anchor.ch+(et?-1:1)),head:new Pe(nt.head.line,nt.head.ch+(et?1:-1))}}function ie(nt,et){var ct=ze(nt);if(!ct||nt.getOption("disableInput"))return Dt.Pass;var lt=xe(ct,"pairs"),gt=lt.indexOf(et);if(gt==-1)return Dt.Pass;for(var mt=xe(ct,"closeBefore"),St=xe(ct,"triples"),Mt=lt.charAt(gt+1)==et,zt=nt.listSelections(),Ht=gt%2==0,qt,jt=0;jt<zt.length;jt++){var Jt=zt[jt],ge=Jt.head,he,Fe=nt.getRange(ge,Pe(ge.line,ge.ch+1));if(Ht&&!Jt.empty())he="surround";else if((Mt||!Ht)&&Fe==et)Mt&&bt(nt,ge)?he="both":St.indexOf(et)>=0&&nt.getRange(ge,Pe(ge.line,ge.ch+3))==et+et+et?he="skipThree":he="skip";else if(Mt&&ge.ch>1&&St.indexOf(et)>=0&&nt.getRange(Pe(ge.line,ge.ch-2),ge)==et+et){if(ge.ch>2&&/\bstring/.test(nt.getTokenTypeAt(Pe(ge.line,ge.ch-2))))return Dt.Pass;he="addFour"}else if(Mt){var Re=ge.ch==0?" ":nt.getRange(Pe(ge.line,ge.ch-1),ge);if(!Dt.isWordChar(Fe)&&Re!=et&&!Dt.isWordChar(Re))he="both";else return Dt.Pass}else if(Ht&&(Fe.length===0||/\s/.test(Fe)||mt.indexOf(Fe)>-1))he="both";else return Dt.Pass;if(!qt)qt=he;else if(qt!=he)return Dt.Pass}var Ke=gt%2?lt.charAt(gt-1):et,Mn=gt%2?et:lt.charAt(gt+1);nt.operation(function(){if(qt=="skip")nt.execCommand("goCharRight");else if(qt=="skipThree")for(var tn=0;tn<3;tn++)nt.execCommand("goCharRight");else if(qt=="surround"){for(var rn=nt.getSelections(),tn=0;tn<rn.length;tn++)rn[tn]=Ke+rn[tn]+Mn;nt.replaceSelections(rn,"around"),rn=nt.listSelections().slice();for(var tn=0;tn<rn.length;tn++)rn[tn]=We(rn[tn]);nt.setSelections(rn)}else qt=="both"?(nt.replaceSelection(Ke+Mn,null),nt.triggerElectric(Ke+Mn),nt.execCommand("goCharLeft")):qt=="addFour"&&(nt.replaceSelection(Ke+Ke+Ke+Ke,"before"),nt.execCommand("goCharRight"))})}function Ne(nt,et){var ct=nt.getRange(Pe(et.line,et.ch-1),Pe(et.line,et.ch+1));return ct.length==2?ct:null}function bt(nt,et){var ct=nt.getTokenAt(Pe(et.line,et.ch+1));return/\bstring/.test(ct.type)&&ct.start==et.ch&&(et.ch==0||!/\bstring/.test(nt.getTokenTypeAt(et)))}})},6313:function(zn,oi,Ot){(function(Dt){Dt(Ot(89780),Ot(32855))})(function(Dt){Dt.defineOption("autoCloseTags",!1,function(ye,Nt,We){if(We!=Dt.Init&&We&&ye.removeKeyMap("autoCloseTags"),!!Nt){var ie={name:"autoCloseTags"};(typeof Nt!="object"||Nt.whenClosing!==!1)&&(ie["'/'"]=function(Ne){return Wt(Ne)}),(typeof Nt!="object"||Nt.whenOpening!==!1)&&(ie["'>'"]=function(Ne){return xe(Ne)}),ye.addKeyMap(ie)}});var ee=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Pe=["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 xe(ye){if(ye.getOption("disableInput"))return Dt.Pass;for(var Nt=ye.listSelections(),We=[],ie=ye.getOption("autoCloseTags"),Ne=0;Ne<Nt.length;Ne++){if(!Nt[Ne].empty())return Dt.Pass;var bt=Nt[Ne].head,nt=ye.getTokenAt(bt),et=Dt.innerMode(ye.getMode(),nt.state),ct=et.state,lt=et.mode.xmlCurrentTag&&et.mode.xmlCurrentTag(ct),gt=lt&<.name;if(!gt)return Dt.Pass;var mt=et.mode.configuration=="html",St=typeof ie=="object"&&ie.dontCloseTags||mt&&ee,Mt=typeof ie=="object"&&ie.indentTags||mt&&Pe;nt.end>bt.ch&&(gt=gt.slice(0,gt.length-nt.end+bt.ch));var zt=gt.toLowerCase();if(!gt||nt.type=="string"&&(nt.end!=bt.ch||!/[\"\']/.test(nt.string.charAt(nt.string.length-1))||nt.string.length==1)||nt.type=="tag"&<.close||nt.string.indexOf("/")==bt.ch-nt.start-1||St&&se(St,zt)>-1||ze(ye,et.mode.xmlCurrentContext&&et.mode.xmlCurrentContext(ct)||[],gt,bt,!0))return Dt.Pass;var Ht=typeof ie=="object"&&ie.emptyTags;if(Ht&&se(Ht,gt)>-1){We[Ne]={text:"/>",newPos:Dt.Pos(bt.line,bt.ch+2)};continue}var qt=Mt&&se(Mt,zt)>-1;We[Ne]={indent:qt,text:">"+(qt?`
|
|
|
|
`:"")+"</"+gt+">",newPos:qt?Dt.Pos(bt.line+1,0):Dt.Pos(bt.line,bt.ch+1)}}for(var jt=typeof ie=="object"&&ie.dontIndentOnAutoClose,Ne=Nt.length-1;Ne>=0;Ne--){var Jt=We[Ne];ye.replaceRange(Jt.text,Nt[Ne].head,Nt[Ne].anchor,"+insert");var ge=ye.listSelections().slice(0);ge[Ne]={head:Jt.newPos,anchor:Jt.newPos},ye.setSelections(ge),!jt&&Jt.indent&&(ye.indentLine(Jt.newPos.line,null,!0),ye.indentLine(Jt.newPos.line+1,null,!0))}}function Se(ye,Nt){for(var We=ye.listSelections(),ie=[],Ne=Nt?"/":"</",bt=ye.getOption("autoCloseTags"),nt=typeof bt=="object"&&bt.dontIndentOnSlash,et=0;et<We.length;et++){if(!We[et].empty())return Dt.Pass;var ct=We[et].head,lt=ye.getTokenAt(ct),gt=Dt.innerMode(ye.getMode(),lt.state),mt=gt.state;if(Nt&&(lt.type=="string"||lt.string.charAt(0)!="<"||lt.start!=ct.ch-1))return Dt.Pass;var St,Mt=gt.mode.name!="xml"&&ye.getMode().name=="htmlmixed";if(Mt&>.mode.name=="javascript")St=Ne+"script";else if(Mt&>.mode.name=="css")St=Ne+"style";else{var zt=gt.mode.xmlCurrentContext&>.mode.xmlCurrentContext(mt);if(!zt||zt.length&&ze(ye,zt,zt[zt.length-1],ct))return Dt.Pass;St=Ne+zt[zt.length-1]}ye.getLine(ct.line).charAt(lt.end)!=">"&&(St+=">"),ie[et]=St}if(ye.replaceSelections(ie),We=ye.listSelections(),!nt)for(var et=0;et<We.length;et++)(et==We.length-1||We[et].head.line<We[et+1].head.line)&&ye.indentLine(We[et].head.line)}function Wt(ye){return ye.getOption("disableInput")?Dt.Pass:Se(ye,!0)}Dt.commands.closeTag=function(ye){return Se(ye)};function se(ye,Nt){if(ye.indexOf)return ye.indexOf(Nt);for(var We=0,ie=ye.length;We<ie;++We)if(ye[We]==Nt)return We;return-1}function ze(ye,Nt,We,ie,Ne){if(!Dt.scanForClosingTag)return!1;var bt=Math.min(ye.lastLine()+1,ie.line+500),nt=Dt.scanForClosingTag(ye,ie,null,bt);if(!nt||nt.tag!=We)return!1;for(var et=Ne?1:0,ct=Nt.length-1;ct>=0&&Nt[ct]==We;ct--)++et;ie=nt.to;for(var ct=1;ct<et;ct++){var lt=Dt.scanForClosingTag(ye,ie,null,bt);if(!lt||lt.tag!=We)return!1;ie=lt.to}return!0}})},32855:function(zn,oi,Ot){(function(Dt){Dt(Ot(89780))})(function(Dt){"use strict";var ee=Dt.Pos;function Pe(ct,lt){return ct.line-lt.line||ct.ch-lt.ch}var xe="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Se=xe+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Wt=new RegExp("<(/?)(["+xe+"]["+Se+"]*)","g");function se(ct,lt,gt,mt){this.line=lt,this.ch=gt,this.cm=ct,this.text=ct.getLine(lt),this.min=mt?Math.max(mt.from,ct.firstLine()):ct.firstLine(),this.max=mt?Math.min(mt.to-1,ct.lastLine()):ct.lastLine()}function ze(ct,lt){var gt=ct.cm.getTokenTypeAt(ee(ct.line,lt));return gt&&/\btag\b/.test(gt)}function ye(ct){if(!(ct.line>=ct.max))return ct.ch=0,ct.text=ct.cm.getLine(++ct.line),!0}function Nt(ct){if(!(ct.line<=ct.min))return ct.text=ct.cm.getLine(--ct.line),ct.ch=ct.text.length,!0}function We(ct){for(;;){var lt=ct.text.indexOf(">",ct.ch);if(lt==-1){if(ye(ct))continue;return}if(!ze(ct,lt+1)){ct.ch=lt+1;continue}var gt=ct.text.lastIndexOf("/",lt),mt=gt>-1&&!/\S/.test(ct.text.slice(gt+1,lt));return ct.ch=lt+1,mt?"selfClose":"regular"}}function ie(ct){for(;;){var lt=ct.ch?ct.text.lastIndexOf("<",ct.ch-1):-1;if(lt==-1){if(Nt(ct))continue;return}if(!ze(ct,lt+1)){ct.ch=lt;continue}Wt.lastIndex=lt,ct.ch=lt;var gt=Wt.exec(ct.text);if(gt&>.index==lt)return gt}}function Ne(ct){for(;;){Wt.lastIndex=ct.ch;var lt=Wt.exec(ct.text);if(!lt){if(ye(ct))continue;return}if(!ze(ct,lt.index+1)){ct.ch=lt.index+1;continue}return ct.ch=lt.index+lt[0].length,lt}}function bt(ct){for(;;){var lt=ct.ch?ct.text.lastIndexOf(">",ct.ch-1):-1;if(lt==-1){if(Nt(ct))continue;return}if(!ze(ct,lt+1)){ct.ch=lt;continue}var gt=ct.text.lastIndexOf("/",lt),mt=gt>-1&&!/\S/.test(ct.text.slice(gt+1,lt));return ct.ch=lt+1,mt?"selfClose":"regular"}}function nt(ct,lt){for(var gt=[];;){var mt=Ne(ct),St,Mt=ct.line,zt=ct.ch-(mt?mt[0].length:0);if(!mt||!(St=We(ct)))return;if(St!="selfClose")if(mt[1]){for(var Ht=gt.length-1;Ht>=0;--Ht)if(gt[Ht]==mt[2]){gt.length=Ht;break}if(Ht<0&&(!lt||lt==mt[2]))return{tag:mt[2],from:ee(Mt,zt),to:ee(ct.line,ct.ch)}}else gt.push(mt[2])}}function et(ct,lt){for(var gt=[];;){var mt=bt(ct);if(!mt)return;if(mt=="selfClose"){ie(ct);continue}var St=ct.line,Mt=ct.ch,zt=ie(ct);if(!zt)return;if(zt[1])gt.push(zt[2]);else{for(var Ht=gt.length-1;Ht>=0;--Ht)if(gt[Ht]==zt[2]){gt.length=Ht;break}if(Ht<0&&(!lt||lt==zt[2]))return{tag:zt[2],from:ee(ct.line,ct.ch),to:ee(St,Mt)}}}}Dt.registerHelper("fold","xml",function(ct,lt){for(var gt=new se(ct,lt.line,0);;){var mt=Ne(gt);if(!mt||gt.line!=lt.line)return;var St=We(gt);if(!St)return;if(!mt[1]&&St!="selfClose"){var Mt=ee(gt.line,gt.ch),zt=nt(gt,mt[2]);return zt&&Pe(zt.from,Mt)>0?{from:Mt,to:zt.from}:null}}}),Dt.findMatchingTag=function(ct,lt,gt){var mt=new se(ct,lt.line,lt.ch,gt);if(!(mt.text.indexOf(">")==-1&&mt.text.indexOf("<")==-1)){var St=We(mt),Mt=St&&ee(mt.line,mt.ch),zt=St&&ie(mt);if(!(!St||!zt||Pe(mt,lt)>0)){var Ht={from:ee(mt.line,mt.ch),to:Mt,tag:zt[2]};return St=="selfClose"?{open:Ht,close:null,at:"open"}:zt[1]?{open:et(mt,zt[2]),close:Ht,at:"close"}:(mt=new se(ct,Mt.line,Mt.ch,gt),{open:Ht,close:nt(mt,zt[2]),at:"open"})}}},Dt.findEnclosingTag=function(ct,lt,gt,mt){for(var St=new se(ct,lt.line,lt.ch,gt);;){var Mt=et(St,mt);if(!Mt)break;var zt=new se(ct,lt.line,lt.ch,gt),Ht=nt(zt,Mt.tag);if(Ht)return{open:Mt,close:Ht}}},Dt.scanForClosingTag=function(ct,lt,gt,mt){var St=new se(ct,lt.line,lt.ch,mt?{from:0,to:mt}:null);return nt(St,gt)}})},89780:function(zn){(function(oi,Ot){zn.exports=Ot()})(this,function(){"use strict";var oi=navigator.userAgent,Ot=navigator.platform,Dt=/gecko\/\d/i.test(oi),ee=/MSIE \d/.test(oi),Pe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(oi),xe=/Edge\/(\d+)/.exec(oi),Se=ee||Pe||xe,Wt=Se&&(ee?document.documentMode||6:+(xe||Pe)[1]),se=!xe&&/WebKit\//.test(oi),ze=se&&/Qt\/\d+\.\d+/.test(oi),ye=!xe&&/Chrome\//.test(oi),Nt=/Opera\//.test(oi),We=/Apple Computer/.test(navigator.vendor),ie=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(oi),Ne=/PhantomJS/.test(oi),bt=!xe&&/AppleWebKit/.test(oi)&&/Mobile\/\w+/.test(oi),nt=/Android/.test(oi),et=bt||nt||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(oi),ct=bt||/Mac/.test(Ot),lt=/\bCrOS\b/.test(oi),gt=/win/i.test(Ot),mt=Nt&&oi.match(/Version\/(\d*\.\d*)/);mt&&(mt=Number(mt[1])),mt&&mt>=15&&(Nt=!1,se=!0);var St=ct&&(ze||Nt&&(mt==null||mt<12.11)),Mt=Dt||Se&&Wt>=9;function zt(it){return new RegExp("(^|\\s)"+it+"(?:$|\\s)\\s*")}var Ht=function(it,at){var dt=it.className,ht=zt(at).exec(dt);if(ht){var pt=dt.slice(ht.index+ht[0].length);it.className=dt.slice(0,ht.index)+(pt?ht[1]+pt:"")}};function qt(it){for(var at=it.childNodes.length;at>0;--at)it.removeChild(it.firstChild);return it}function jt(it,at){return qt(it).appendChild(at)}function Jt(it,at,dt,ht){var pt=document.createElement(it);if(dt&&(pt.className=dt),ht&&(pt.style.cssText=ht),typeof at=="string")pt.appendChild(document.createTextNode(at));else if(at)for(var Lt=0;Lt<at.length;++Lt)pt.appendChild(at[Lt]);return pt}function ge(it,at,dt,ht){var pt=Jt(it,at,dt,ht);return pt.setAttribute("role","presentation"),pt}var he;document.createRange?he=function(it,at,dt,ht){var pt=document.createRange();return pt.setEnd(ht||it,dt),pt.setStart(it,at),pt}:he=function(it,at,dt){var ht=document.body.createTextRange();try{ht.moveToElementText(it.parentNode)}catch(pt){return ht}return ht.collapse(!0),ht.moveEnd("character",dt),ht.moveStart("character",at),ht};function Fe(it,at){if(at.nodeType==3&&(at=at.parentNode),it.contains)return it.contains(at);do if(at.nodeType==11&&(at=at.host),at==it)return!0;while(at=at.parentNode)}function Re(){var it;try{it=document.activeElement}catch(at){it=document.body||null}for(;it&&it.shadowRoot&&it.shadowRoot.activeElement;)it=it.shadowRoot.activeElement;return it}function Ke(it,at){var dt=it.className;zt(at).test(dt)||(it.className+=(dt?" ":"")+at)}function Mn(it,at){for(var dt=it.split(" "),ht=0;ht<dt.length;ht++)dt[ht]&&!zt(dt[ht]).test(at)&&(at+=" "+dt[ht]);return at}var tn=function(it){it.select()};bt?tn=function(it){it.selectionStart=0,it.selectionEnd=it.value.length}:Se&&(tn=function(it){try{it.select()}catch(at){}});function rn(it){var at=Array.prototype.slice.call(arguments,1);return function(){return it.apply(null,at)}}function nn(it,at,dt){at||(at={});for(var ht in it)it.hasOwnProperty(ht)&&(dt!==!1||!at.hasOwnProperty(ht))&&(at[ht]=it[ht]);return at}function me(it,at,dt,ht,pt){at==null&&(at=it.search(/[^\s\u00a0]/),at==-1&&(at=it.length));for(var Lt=ht||0,Bt=pt||0;;){var Kt=it.indexOf(" ",Lt);if(Kt<0||Kt>=at)return Bt+(at-Lt);Bt+=Kt-Lt,Bt+=dt-Bt%dt,Lt=Kt+1}}var Xt=function(){this.id=null,this.f=null,this.time=0,this.handler=rn(this.onTimeout,this)};Xt.prototype.onTimeout=function(it){it.id=0,it.time<=+new Date?it.f():setTimeout(it.handler,it.time-+new Date)},Xt.prototype.set=function(it,at){this.f=at;var dt=+new Date+it;(!this.id||dt<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,it),this.time=dt)};function Ue(it,at){for(var dt=0;dt<it.length;++dt)if(it[dt]==at)return dt;return-1}var Pn=50,Yn={toString:function(){return"CodeMirror.Pass"}},Be={scroll:!1},vn={origin:"*mouse"},Je={origin:"+move"};function An(it,at,dt){for(var ht=0,pt=0;;){var Lt=it.indexOf(" ",ht);Lt==-1&&(Lt=it.length);var Bt=Lt-ht;if(Lt==it.length||pt+Bt>=at)return ht+Math.min(Bt,at-pt);if(pt+=Lt-ht,pt+=dt-pt%dt,ht=Lt+1,pt>=at)return ht}}var we=[""];function sn(it){for(;we.length<=it;)we.push(ce(we)+" ");return we[it]}function ce(it){return it[it.length-1]}function Nn(it,at){for(var dt=[],ht=0;ht<it.length;ht++)dt[ht]=at(it[ht],ht);return dt}function Ci(it,at,dt){for(var ht=0,pt=dt(at);ht<it.length&&dt(it[ht])<=pt;)ht++;it.splice(ht,0,at)}function It(){}function wt(it,at){var dt;return Object.create?dt=Object.create(it):(It.prototype=it,dt=new It),at&&nn(at,dt),dt}var xt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ft(it){return/\w/.test(it)||it>"\x80"&&(it.toUpperCase()!=it.toLowerCase()||xt.test(it))}function Gt(it,at){return at?at.source.indexOf("\\w")>-1&&Ft(it)?!0:at.test(it):Ft(it)}function kt(it){for(var at in it)if(it.hasOwnProperty(at)&&it[at])return!1;return!0}var Yt=/[\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 pe(it){return it.charCodeAt(0)>=768&&Yt.test(it)}function Le(it,at,dt){for(;(dt<0?at>0:at<it.length)&&pe(it.charAt(at));)at+=dt;return at}function on(it,at,dt){for(var ht=at>dt?-1:1;;){if(at==dt)return at;var pt=(at+dt)/2,Lt=ht<0?Math.ceil(pt):Math.floor(pt);if(Lt==at)return it(Lt)?at:dt;it(Lt)?dt=Lt:at=Lt+ht}}function ve(it,at,dt,ht){if(!it)return ht(at,dt,"ltr",0);for(var pt=!1,Lt=0;Lt<it.length;++Lt){var Bt=it[Lt];(Bt.from<dt&&Bt.to>at||at==dt&&Bt.to==at)&&(ht(Math.max(Bt.from,at),Math.min(Bt.to,dt),Bt.level==1?"rtl":"ltr",Lt),pt=!0)}pt||ht(at,dt,"ltr")}var Ae=null;function Ee(it,at,dt){var ht;Ae=null;for(var pt=0;pt<it.length;++pt){var Lt=it[pt];if(Lt.from<at&&Lt.to>at)return pt;Lt.to==at&&(Lt.from!=Lt.to&&dt=="before"?ht=pt:Ae=pt),Lt.from==at&&(Lt.from!=Lt.to&&dt!="before"?ht=pt:Ae=pt)}return ht!=null?ht:Ae}var Ge=function(){var it="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",at="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function dt(ne){return ne<=247?it.charAt(ne):1424<=ne&&ne<=1524?"R":1536<=ne&&ne<=1785?at.charAt(ne-1536):1774<=ne&&ne<=2220?"r":8192<=ne&&ne<=8203?"w":ne==8204?"b":"L"}var ht=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,pt=/[stwN]/,Lt=/[LRr]/,Bt=/[Lb1n]/,Kt=/[1n]/;function Zt(ne,Ie,de){this.level=ne,this.from=Ie,this.to=de}return function(ne,Ie){var de=Ie=="ltr"?"L":"R";if(ne.length==0||Ie=="ltr"&&!ht.test(ne))return!1;for(var fn=ne.length,en=[],gi=0;gi<fn;++gi)en.push(dt(ne.charCodeAt(gi)));for(var ki=0,ji=de;ki<fn;++ki){var or=en[ki];or=="m"?en[ki]=ji:ji=or}for(var Fr=0,vr=de;Fr<fn;++Fr){var jr=en[Fr];jr=="1"&&vr=="r"?en[Fr]="n":Lt.test(jr)&&(vr=jr,jr=="r"&&(en[Fr]="R"))}for(var fo=1,pr=en[0];fo<fn-1;++fo){var Zo=en[fo];Zo=="+"&&pr=="1"&&en[fo+1]=="1"?en[fo]="1":Zo==","&&pr==en[fo+1]&&(pr=="1"||pr=="n")&&(en[fo]=pr),pr=Zo}for(var Da=0;Da<fn;++Da){var ms=en[Da];if(ms==",")en[Da]="N";else if(ms=="%"){var Za=void 0;for(Za=Da+1;Za<fn&&en[Za]=="%";++Za);for(var sl=Da&&en[Da-1]=="!"||Za<fn&&en[Za]=="1"?"1":"N",Vs=Da;Vs<Za;++Vs)en[Vs]=sl;Da=Za-1}}for(var cs=0,xl=de;cs<fn;++cs){var Bs=en[cs];xl=="L"&&Bs=="1"?en[cs]="L":Lt.test(Bs)&&(xl=Bs)}for(var fs=0;fs<fn;++fs)if(pt.test(en[fs])){var ha=void 0;for(ha=fs+1;ha<fn&&pt.test(en[ha]);++ha);for(var Ya=(fs?en[fs-1]:de)=="L",ws=(ha<fn?en[ha]:de)=="L",Os=Ya==ws?Ya?"L":"R":de,ou=fs;ou<ha;++ou)en[ou]=Os;fs=ha-1}for(var Va=[],Xl,$a=0;$a<fn;)if(Bt.test(en[$a])){var Nc=$a;for(++$a;$a<fn&&Bt.test(en[$a]);++$a);Va.push(new Zt(0,Nc,$a))}else{var Ol=$a,Pl=Va.length,ll=Ie=="rtl"?1:0;for(++$a;$a<fn&&en[$a]!="L";++$a);for(var Ma=Ol;Ma<$a;)if(Kt.test(en[Ma])){Ol<Ma&&(Va.splice(Pl,0,new Zt(1,Ol,Ma)),Pl+=ll);var Cs=Ma;for(++Ma;Ma<$a&&Kt.test(en[Ma]);++Ma);Va.splice(Pl,0,new Zt(2,Cs,Ma)),Pl+=ll,Ol=Ma}else++Ma;Ol<$a&&Va.splice(Pl,0,new Zt(1,Ol,$a))}return Ie=="ltr"&&(Va[0].level==1&&(Xl=ne.match(/^\s+/))&&(Va[0].from=Xl[0].length,Va.unshift(new Zt(0,0,Xl[0].length))),ce(Va).level==1&&(Xl=ne.match(/\s+$/))&&(ce(Va).to-=Xl[0].length,Va.push(new Zt(0,fn-Xl[0].length,fn)))),Ie=="rtl"?Va.reverse():Va}}();function kn(it,at){var dt=it.order;return dt==null&&(dt=it.order=Ge(it.text,at)),dt}var In=[],gn=function(it,at,dt){if(it.addEventListener)it.addEventListener(at,dt,!1);else if(it.attachEvent)it.attachEvent("on"+at,dt);else{var ht=it._handlers||(it._handlers={});ht[at]=(ht[at]||In).concat(dt)}};function ai(it,at){return it._handlers&&it._handlers[at]||In}function xi(it,at,dt){if(it.removeEventListener)it.removeEventListener(at,dt,!1);else if(it.detachEvent)it.detachEvent("on"+at,dt);else{var ht=it._handlers,pt=ht&&ht[at];if(pt){var Lt=Ue(pt,dt);Lt>-1&&(ht[at]=pt.slice(0,Lt).concat(pt.slice(Lt+1)))}}}function Gn(it,at){var dt=ai(it,at);if(dt.length)for(var ht=Array.prototype.slice.call(arguments,2),pt=0;pt<dt.length;++pt)dt[pt].apply(null,ht)}function Si(it,at,dt){return typeof at=="string"&&(at={type:at,preventDefault:function(){this.defaultPrevented=!0}}),Gn(it,dt||at.type,it,at),Xi(at)||at.codemirrorIgnore}function _n(it){var at=it._handlers&&it._handlers.cursorActivity;if(at)for(var dt=it.curOp.cursorActivityHandlers||(it.curOp.cursorActivityHandlers=[]),ht=0;ht<at.length;++ht)Ue(dt,at[ht])==-1&&dt.push(at[ht])}function Ti(it,at){return ai(it,at).length>0}function Di(it){it.prototype.on=function(at,dt){gn(this,at,dt)},it.prototype.off=function(at,dt){xi(this,at,dt)}}function $i(it){it.preventDefault?it.preventDefault():it.returnValue=!1}function Kr(it){it.stopPropagation?it.stopPropagation():it.cancelBubble=!0}function Xi(it){return it.defaultPrevented!=null?it.defaultPrevented:it.returnValue==!1}function zr(it){$i(it),Kr(it)}function so(it){return it.target||it.srcElement}function po(it){var at=it.which;return at==null&&(it.button&1?at=1:it.button&2?at=3:it.button&4&&(at=2)),ct&&it.ctrlKey&&at==1&&(at=3),at}var Jr=function(){if(Se&&Wt<9)return!1;var it=Jt("div");return"draggable"in it||"dragDrop"in it}(),Do;function Bo(it){if(Do==null){var at=Jt("span","\u200B");jt(it,Jt("span",[at,document.createTextNode("x")])),it.firstChild.offsetHeight!=0&&(Do=at.offsetWidth<=1&&at.offsetHeight>2&&!(Se&&Wt<8))}var dt=Do?Jt("span","\u200B"):Jt("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return dt.setAttribute("cm-text",""),dt}var Ko;function bo(it){if(Ko!=null)return Ko;var at=jt(it,document.createTextNode("A\u062EA")),dt=he(at,0,1).getBoundingClientRect(),ht=he(at,1,2).getBoundingClientRect();return qt(it),!dt||dt.left==dt.right?!1:Ko=ht.right-dt.right<3}var ko=`
|
|
|
|
b`.split(/\n/).length!=3?function(it){for(var at=0,dt=[],ht=it.length;at<=ht;){var pt=it.indexOf(`
|
|
`,at);pt==-1&&(pt=it.length);var Lt=it.slice(at,it.charAt(pt-1)=="\r"?pt-1:pt),Bt=Lt.indexOf("\r");Bt!=-1?(dt.push(Lt.slice(0,Bt)),at+=Bt+1):(dt.push(Lt),at=pt+1)}return dt}:function(it){return it.split(/\r\n?|\n/)},Ct=window.getSelection?function(it){try{return it.selectionStart!=it.selectionEnd}catch(at){return!1}}:function(it){var at;try{at=it.ownerDocument.selection.createRange()}catch(dt){}return!at||at.parentElement()!=it?!1:at.compareEndPoints("StartToEnd",at)!=0},Zn=function(){var it=Jt("div");return"oncopy"in it?!0:(it.setAttribute("oncopy","return;"),typeof it.oncopy=="function")}(),bn=null;function Pr(it){if(bn!=null)return bn;var at=jt(it,Jt("span","x")),dt=at.getBoundingClientRect(),ht=he(at,0,1).getBoundingClientRect();return bn=Math.abs(dt.left-ht.left)>1}var Er={},Zi={};function _r(it,at){arguments.length>2&&(at.dependencies=Array.prototype.slice.call(arguments,2)),Er[it]=at}function ho(it,at){Zi[it]=at}function br(it){if(typeof it=="string"&&Zi.hasOwnProperty(it))it=Zi[it];else if(it&&typeof it.name=="string"&&Zi.hasOwnProperty(it.name)){var at=Zi[it.name];typeof at=="string"&&(at={name:at}),it=wt(at,it),it.name=at.name}else{if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(it))return br("application/xml");if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(it))return br("application/json")}return typeof it=="string"?{name:it}:it||{name:"null"}}function $e(it,at){at=br(at);var dt=Er[at.name];if(!dt)return $e(it,"text/plain");var ht=dt(it,at);if(Oe.hasOwnProperty(at.name)){var pt=Oe[at.name];for(var Lt in pt)pt.hasOwnProperty(Lt)&&(ht.hasOwnProperty(Lt)&&(ht["_"+Lt]=ht[Lt]),ht[Lt]=pt[Lt])}if(ht.name=at.name,at.helperType&&(ht.helperType=at.helperType),at.modeProps)for(var Bt in at.modeProps)ht[Bt]=at.modeProps[Bt];return ht}var Oe={};function Me(it,at){var dt=Oe.hasOwnProperty(it)?Oe[it]:Oe[it]={};nn(at,dt)}function Pi(it,at){if(at===!0)return at;if(it.copyState)return it.copyState(at);var dt={};for(var ht in at){var pt=at[ht];pt instanceof Array&&(pt=pt.concat([])),dt[ht]=pt}return dt}function Vi(it,at){for(var dt;it.innerMode&&(dt=it.innerMode(at),!(!dt||dt.mode==it));)at=dt.state,it=dt.mode;return dt||{mode:it,state:at}}function rr(it,at,dt){return it.startState?it.startState(at,dt):!0}var Dn=function(it,at,dt){this.pos=this.start=0,this.string=it,this.tabSize=at||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=dt};Dn.prototype.eol=function(){return this.pos>=this.string.length},Dn.prototype.sol=function(){return this.pos==this.lineStart},Dn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Dn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Dn.prototype.eat=function(it){var at=this.string.charAt(this.pos),dt;if(typeof it=="string"?dt=at==it:dt=at&&(it.test?it.test(at):it(at)),dt)return++this.pos,at},Dn.prototype.eatWhile=function(it){for(var at=this.pos;this.eat(it););return this.pos>at},Dn.prototype.eatSpace=function(){for(var it=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>it},Dn.prototype.skipToEnd=function(){this.pos=this.string.length},Dn.prototype.skipTo=function(it){var at=this.string.indexOf(it,this.pos);if(at>-1)return this.pos=at,!0},Dn.prototype.backUp=function(it){this.pos-=it},Dn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=me(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?me(this.string,this.lineStart,this.tabSize):0)},Dn.prototype.indentation=function(){return me(this.string,null,this.tabSize)-(this.lineStart?me(this.string,this.lineStart,this.tabSize):0)},Dn.prototype.match=function(it,at,dt){if(typeof it=="string"){var ht=function(Bt){return dt?Bt.toLowerCase():Bt},pt=this.string.substr(this.pos,it.length);if(ht(pt)==ht(it))return at!==!1&&(this.pos+=it.length),!0}else{var Lt=this.string.slice(this.pos).match(it);return Lt&&Lt.index>0?null:(Lt&&at!==!1&&(this.pos+=Lt[0].length),Lt)}},Dn.prototype.current=function(){return this.string.slice(this.start,this.pos)},Dn.prototype.hideFirstChars=function(it,at){this.lineStart+=it;try{return at()}finally{this.lineStart-=it}},Dn.prototype.lookAhead=function(it){var at=this.lineOracle;return at&&at.lookAhead(it)},Dn.prototype.baseToken=function(){var it=this.lineOracle;return it&&it.baseToken(this.pos)};function pi(it,at){if(at-=it.first,at<0||at>=it.size)throw new Error("There is no line "+(at+it.first)+" in the document.");for(var dt=it;!dt.lines;)for(var ht=0;;++ht){var pt=dt.children[ht],Lt=pt.chunkSize();if(at<Lt){dt=pt;break}at-=Lt}return dt.lines[at]}function Ze(it,at,dt){var ht=[],pt=at.line;return it.iter(at.line,dt.line+1,function(Lt){var Bt=Lt.text;pt==dt.line&&(Bt=Bt.slice(0,dt.ch)),pt==at.line&&(Bt=Bt.slice(at.ch)),ht.push(Bt),++pt}),ht}function je(it,at,dt){var ht=[];return it.iter(at,dt,function(pt){ht.push(pt.text)}),ht}function mi(it,at){var dt=at-it.height;if(dt)for(var ht=it;ht;ht=ht.parent)ht.height+=dt}function $t(it){if(it.parent==null)return null;for(var at=it.parent,dt=Ue(at.lines,it),ht=at.parent;ht;at=ht,ht=ht.parent)for(var pt=0;ht.children[pt]!=at;++pt)dt+=ht.children[pt].chunkSize();return dt+at.first}function pn(it,at){var dt=it.first;t:do{for(var ht=0;ht<it.children.length;++ht){var pt=it.children[ht],Lt=pt.height;if(at<Lt){it=pt;continue t}at-=Lt,dt+=pt.chunkSize()}return dt}while(!it.lines);for(var Bt=0;Bt<it.lines.length;++Bt){var Kt=it.lines[Bt],Zt=Kt.height;if(at<Zt)break;at-=Zt}return dt+Bt}function ei(it,at){return at>=it.first&&at<it.first+it.size}function Bi(it,at){return String(it.lineNumberFormatter(at+it.firstLineNumber))}function _e(it,at,dt){if(dt===void 0&&(dt=null),!(this instanceof _e))return new _e(it,at,dt);this.line=it,this.ch=at,this.sticky=dt}function un(it,at){return it.line-at.line||it.ch-at.ch}function $n(it,at){return it.sticky==at.sticky&&un(it,at)==0}function vi(it){return _e(it.line,it.ch)}function Oi(it,at){return un(it,at)<0?at:it}function Ei(it,at){return un(it,at)<0?it:at}function ri(it,at){return Math.max(it.first,Math.min(at,it.first+it.size-1))}function bi(it,at){if(at.line<it.first)return _e(it.first,0);var dt=it.first+it.size-1;return at.line>dt?_e(dt,pi(it,dt).text.length):Sr(at,pi(it,at.line).text.length)}function Sr(it,at){var dt=it.ch;return dt==null||dt>at?_e(it.line,at):dt<0?_e(it.line,0):it}function mr(it,at){for(var dt=[],ht=0;ht<at.length;ht++)dt[ht]=bi(it,at[ht]);return dt}var wr=function(it,at){this.state=it,this.lookAhead=at},an=function(it,at,dt,ht){this.state=at,this.doc=it,this.line=dt,this.maxLookAhead=ht||0,this.baseTokens=null,this.baseTokenPos=1};an.prototype.lookAhead=function(it){var at=this.doc.getLine(this.line+it);return at!=null&&it>this.maxLookAhead&&(this.maxLookAhead=it),at},an.prototype.baseToken=function(it){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=it;)this.baseTokenPos+=2;var at=this.baseTokens[this.baseTokenPos+1];return{type:at&&at.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-it}},an.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},an.fromSaved=function(it,at,dt){return at instanceof wr?new an(it,Pi(it.mode,at.state),dt,at.lookAhead):new an(it,Pi(it.mode,at),dt)},an.prototype.save=function(it){var at=it!==!1?Pi(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new wr(at,this.maxLookAhead):at};function wo(it,at,dt,ht){var pt=[it.state.modeGen],Lt={};Or(it,at.text,it.doc.mode,dt,function(ne,Ie){return pt.push(ne,Ie)},Lt,ht);for(var Bt=dt.state,Kt=function(ne){dt.baseTokens=pt;var Ie=it.state.overlays[ne],de=1,fn=0;dt.state=!0,Or(it,at.text,Ie.mode,dt,function(en,gi){for(var ki=de;fn<en;){var ji=pt[de];ji>en&&pt.splice(de,1,en,pt[de+1],ji),de+=2,fn=Math.min(en,ji)}if(gi)if(Ie.opaque)pt.splice(ki,de-ki,en,"overlay "+gi),de=ki+2;else for(;ki<de;ki+=2){var or=pt[ki+1];pt[ki+1]=(or?or+" ":"")+"overlay "+gi}},Lt),dt.state=Bt,dt.baseTokens=null,dt.baseTokenPos=1},Zt=0;Zt<it.state.overlays.length;++Zt)Kt(Zt);return{styles:pt,classes:Lt.bgClass||Lt.textClass?Lt:null}}function Ar(it,at,dt){if(!at.styles||at.styles[0]!=it.state.modeGen){var ht=mo(it,$t(at)),pt=at.text.length>it.options.maxHighlightLength&&Pi(it.doc.mode,ht.state),Lt=wo(it,at,ht);pt&&(ht.state=pt),at.stateAfter=ht.save(!pt),at.styles=Lt.styles,Lt.classes?at.styleClasses=Lt.classes:at.styleClasses&&(at.styleClasses=null),dt===it.doc.highlightFrontier&&(it.doc.modeFrontier=Math.max(it.doc.modeFrontier,++it.doc.highlightFrontier))}return at.styles}function mo(it,at,dt){var ht=it.doc,pt=it.display;if(!ht.mode.startState)return new an(ht,!0,at);var Lt=Lr(it,at,dt),Bt=Lt>ht.first&&pi(ht,Lt-1).stateAfter,Kt=Bt?an.fromSaved(ht,Bt,Lt):new an(ht,rr(ht.mode),Lt);return ht.iter(Lt,at,function(Zt){Ve(it,Zt.text,Kt);var ne=Kt.line;Zt.stateAfter=ne==at-1||ne%5==0||ne>=pt.viewFrom&&ne<pt.viewTo?Kt.save():null,Kt.nextLine()}),dt&&(ht.modeFrontier=Kt.line),Kt}function Ve(it,at,dt,ht){var pt=it.doc.mode,Lt=new Dn(at,it.options.tabSize,dt);for(Lt.start=Lt.pos=ht||0,at==""&&ni(pt,dt.state);!Lt.eol();)Ni(pt,Lt,dt.state),Lt.start=Lt.pos}function ni(it,at){if(it.blankLine)return it.blankLine(at);if(it.innerMode){var dt=Vi(it,at);if(dt.mode.blankLine)return dt.mode.blankLine(dt.state)}}function Ni(it,at,dt,ht){for(var pt=0;pt<10;pt++){ht&&(ht[0]=Vi(it,dt).mode);var Lt=it.token(at,dt);if(at.pos>at.start)return Lt}throw new Error("Mode "+it.name+" failed to advance stream.")}var Hi=function(it,at,dt){this.start=it.start,this.end=it.pos,this.string=it.current(),this.type=at||null,this.state=dt};function Ii(it,at,dt,ht){var pt=it.doc,Lt=pt.mode,Bt;at=bi(pt,at);var Kt=pi(pt,at.line),Zt=mo(it,at.line,dt),ne=new Dn(Kt.text,it.options.tabSize,Zt),Ie;for(ht&&(Ie=[]);(ht||ne.pos<at.ch)&&!ne.eol();)ne.start=ne.pos,Bt=Ni(Lt,ne,Zt.state),ht&&Ie.push(new Hi(ne,Bt,Pi(pt.mode,Zt.state)));return ht?Ie:new Hi(ne,Bt,Zt.state)}function Qi(it,at){if(it)for(;;){var dt=it.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!dt)break;it=it.slice(0,dt.index)+it.slice(dt.index+dt[0].length);var ht=dt[1]?"bgClass":"textClass";at[ht]==null?at[ht]=dt[2]:new RegExp("(?:^|\\s)"+dt[2]+"(?:$|\\s)").test(at[ht])||(at[ht]+=" "+dt[2])}return it}function Or(it,at,dt,ht,pt,Lt,Bt){var Kt=dt.flattenSpans;Kt==null&&(Kt=it.options.flattenSpans);var Zt=0,ne=null,Ie=new Dn(at,it.options.tabSize,ht),de,fn=it.options.addModeClass&&[null];for(at==""&&Qi(ni(dt,ht.state),Lt);!Ie.eol();){if(Ie.pos>it.options.maxHighlightLength?(Kt=!1,Bt&&Ve(it,at,ht,Ie.pos),Ie.pos=at.length,de=null):de=Qi(Ni(dt,Ie,ht.state,fn),Lt),fn){var en=fn[0].name;en&&(de="m-"+(de?en+" "+de:en))}if(!Kt||ne!=de){for(;Zt<Ie.start;)Zt=Math.min(Ie.start,Zt+5e3),pt(Zt,ne);ne=de}Ie.start=Ie.pos}for(;Zt<Ie.pos;){var gi=Math.min(Ie.pos,Zt+5e3);pt(gi,ne),Zt=gi}}function Lr(it,at,dt){for(var ht,pt,Lt=it.doc,Bt=dt?-1:at-(it.doc.mode.innerMode?1e3:100),Kt=at;Kt>Bt;--Kt){if(Kt<=Lt.first)return Lt.first;var Zt=pi(Lt,Kt-1),ne=Zt.stateAfter;if(ne&&(!dt||Kt+(ne instanceof wr?ne.lookAhead:0)<=Lt.modeFrontier))return Kt;var Ie=me(Zt.text,null,it.options.tabSize);(pt==null||ht>Ie)&&(pt=Kt-1,ht=Ie)}return pt}function Nr(it,at){if(it.modeFrontier=Math.min(it.modeFrontier,at),!(it.highlightFrontier<at-10)){for(var dt=it.first,ht=at-1;ht>dt;ht--){var pt=pi(it,ht).stateAfter;if(pt&&(!(pt instanceof wr)||ht+pt.lookAhead<at)){dt=ht+1;break}}it.highlightFrontier=Math.min(it.highlightFrontier,dt)}}var Rr=!1,dn=!1;function $r(){Rr=!0}function cn(){dn=!0}function Ri(it,at,dt){this.marker=it,this.from=at,this.to=dt}function _i(it,at){if(it)for(var dt=0;dt<it.length;++dt){var ht=it[dt];if(ht.marker==at)return ht}}function xr(it,at){for(var dt,ht=0;ht<it.length;++ht)it[ht]!=at&&(dt||(dt=[])).push(it[ht]);return dt}function zo(it,at){it.markedSpans=it.markedSpans?it.markedSpans.concat([at]):[at],at.marker.attachLine(it)}function Mo(it,at,dt){var ht;if(it)for(var pt=0;pt<it.length;++pt){var Lt=it[pt],Bt=Lt.marker,Kt=Lt.from==null||(Bt.inclusiveLeft?Lt.from<=at:Lt.from<at);if(Kt||Lt.from==at&&Bt.type=="bookmark"&&(!dt||!Lt.marker.insertLeft)){var Zt=Lt.to==null||(Bt.inclusiveRight?Lt.to>=at:Lt.to>at);(ht||(ht=[])).push(new Ri(Bt,Lt.from,Zt?null:Lt.to))}}return ht}function qr(it,at,dt){var ht;if(it)for(var pt=0;pt<it.length;++pt){var Lt=it[pt],Bt=Lt.marker,Kt=Lt.to==null||(Bt.inclusiveRight?Lt.to>=at:Lt.to>at);if(Kt||Lt.from==at&&Bt.type=="bookmark"&&(!dt||Lt.marker.insertLeft)){var Zt=Lt.from==null||(Bt.inclusiveLeft?Lt.from<=at:Lt.from<at);(ht||(ht=[])).push(new Ri(Bt,Zt?null:Lt.from-at,Lt.to==null?null:Lt.to-at))}}return ht}function vo(it,at){if(at.full)return null;var dt=ei(it,at.from.line)&&pi(it,at.from.line).markedSpans,ht=ei(it,at.to.line)&&pi(it,at.to.line).markedSpans;if(!dt&&!ht)return null;var pt=at.from.ch,Lt=at.to.ch,Bt=un(at.from,at.to)==0,Kt=Mo(dt,pt,Bt),Zt=qr(ht,Lt,Bt),ne=at.text.length==1,Ie=ce(at.text).length+(ne?pt:0);if(Kt)for(var de=0;de<Kt.length;++de){var fn=Kt[de];if(fn.to==null){var en=_i(Zt,fn.marker);en?ne&&(fn.to=en.to==null?null:en.to+Ie):fn.to=pt}}if(Zt)for(var gi=0;gi<Zt.length;++gi){var ki=Zt[gi];if(ki.to!=null&&(ki.to+=Ie),ki.from==null){var ji=_i(Kt,ki.marker);ji||(ki.from=Ie,ne&&(Kt||(Kt=[])).push(ki))}else ki.from+=Ie,ne&&(Kt||(Kt=[])).push(ki)}Kt&&(Kt=Te(Kt)),Zt&&Zt!=Kt&&(Zt=Te(Zt));var or=[Kt];if(!ne){var Fr=at.text.length-2,vr;if(Fr>0&&Kt)for(var jr=0;jr<Kt.length;++jr)Kt[jr].to==null&&(vr||(vr=[])).push(new Ri(Kt[jr].marker,null,null));for(var fo=0;fo<Fr;++fo)or.push(vr);or.push(Zt)}return or}function Te(it){for(var at=0;at<it.length;++at){var dt=it[at];dt.from!=null&&dt.from==dt.to&&dt.marker.clearWhenEmpty!==!1&&it.splice(at--,1)}return it.length?it:null}function hn(it,at,dt){var ht=null;if(it.iter(at.line,dt.line+1,function(en){if(en.markedSpans)for(var gi=0;gi<en.markedSpans.length;++gi){var ki=en.markedSpans[gi].marker;ki.readOnly&&(!ht||Ue(ht,ki)==-1)&&(ht||(ht=[])).push(ki)}}),!ht)return null;for(var pt=[{from:at,to:dt}],Lt=0;Lt<ht.length;++Lt)for(var Bt=ht[Lt],Kt=Bt.find(0),Zt=0;Zt<pt.length;++Zt){var ne=pt[Zt];if(!(un(ne.to,Kt.from)<0||un(ne.from,Kt.to)>0)){var Ie=[Zt,1],de=un(ne.from,Kt.from),fn=un(ne.to,Kt.to);(de<0||!Bt.inclusiveLeft&&!de)&&Ie.push({from:ne.from,to:Kt.from}),(fn>0||!Bt.inclusiveRight&&!fn)&&Ie.push({from:Kt.to,to:ne.to}),pt.splice.apply(pt,Ie),Zt+=Ie.length-3}}return pt}function be(it){var at=it.markedSpans;if(at){for(var dt=0;dt<at.length;++dt)at[dt].marker.detachLine(it);it.markedSpans=null}}function Tt(it,at){if(at){for(var dt=0;dt<at.length;++dt)at[dt].marker.attachLine(it);it.markedSpans=at}}function Wn(it){return it.inclusiveLeft?-1:0}function Fn(it){return it.inclusiveRight?1:0}function Xn(it,at){var dt=it.lines.length-at.lines.length;if(dt!=0)return dt;var ht=it.find(),pt=at.find(),Lt=un(ht.from,pt.from)||Wn(it)-Wn(at);if(Lt)return-Lt;var Bt=un(ht.to,pt.to)||Fn(it)-Fn(at);return Bt||at.id-it.id}function si(it,at){var dt=dn&&it.markedSpans,ht;if(dt)for(var pt=void 0,Lt=0;Lt<dt.length;++Lt)pt=dt[Lt],pt.marker.collapsed&&(at?pt.from:pt.to)==null&&(!ht||Xn(ht,pt.marker)<0)&&(ht=pt.marker);return ht}function wi(it){return si(it,!0)}function yn(it){return si(it,!1)}function Vn(it,at){var dt=dn&&it.markedSpans,ht;if(dt)for(var pt=0;pt<dt.length;++pt){var Lt=dt[pt];Lt.marker.collapsed&&(Lt.from==null||Lt.from<at)&&(Lt.to==null||Lt.to>at)&&(!ht||Xn(ht,Lt.marker)<0)&&(ht=Lt.marker)}return ht}function Kn(it,at,dt,ht,pt){var Lt=pi(it,at),Bt=dn&&Lt.markedSpans;if(Bt)for(var Kt=0;Kt<Bt.length;++Kt){var Zt=Bt[Kt];if(Zt.marker.collapsed){var ne=Zt.marker.find(0),Ie=un(ne.from,dt)||Wn(Zt.marker)-Wn(pt),de=un(ne.to,ht)||Fn(Zt.marker)-Fn(pt);if(!(Ie>=0&&de<=0||Ie<=0&&de>=0)&&(Ie<=0&&(Zt.marker.inclusiveRight&&pt.inclusiveLeft?un(ne.to,dt)>=0:un(ne.to,dt)>0)||Ie>=0&&(Zt.marker.inclusiveRight&&pt.inclusiveLeft?un(ne.from,ht)<=0:un(ne.from,ht)<0)))return!0}}}function Jn(it){for(var at;at=wi(it);)it=at.find(-1,!0).line;return it}function Qn(it){for(var at;at=yn(it);)it=at.find(1,!0).line;return it}function Gi(it){for(var at,dt;at=yn(it);)it=at.find(1,!0).line,(dt||(dt=[])).push(it);return dt}function At(it,at){var dt=pi(it,at),ht=Jn(dt);return dt==ht?at:$t(ht)}function re(it,at){if(at>it.lastLine())return at;var dt=pi(it,at),ht;if(!Ut(it,dt))return at;for(;ht=yn(dt);)dt=ht.find(1,!0).line;return $t(dt)+1}function Ut(it,at){var dt=dn&&at.markedSpans;if(dt){for(var ht=void 0,pt=0;pt<dt.length;++pt)if(ht=dt[pt],!!ht.marker.collapsed){if(ht.from==null)return!0;if(!ht.marker.widgetNode&&ht.from==0&&ht.marker.inclusiveLeft&&oe(it,at,ht))return!0}}}function oe(it,at,dt){if(dt.to==null){var ht=dt.marker.find(1,!0);return oe(it,ht.line,_i(ht.line.markedSpans,dt.marker))}if(dt.marker.inclusiveRight&&dt.to==at.text.length)return!0;for(var pt=void 0,Lt=0;Lt<at.markedSpans.length;++Lt)if(pt=at.markedSpans[Lt],pt.marker.collapsed&&!pt.marker.widgetNode&&pt.from==dt.to&&(pt.to==null||pt.to!=dt.from)&&(pt.marker.inclusiveLeft||dt.marker.inclusiveRight)&&oe(it,at,pt))return!0}function fe(it){it=Jn(it);for(var at=0,dt=it.parent,ht=0;ht<dt.lines.length;++ht){var pt=dt.lines[ht];if(pt==it)break;at+=pt.height}for(var Lt=dt.parent;Lt;dt=Lt,Lt=dt.parent)for(var Bt=0;Bt<Lt.children.length;++Bt){var Kt=Lt.children[Bt];if(Kt==dt)break;at+=Kt.height}return at}function De(it){if(it.height==0)return 0;for(var at=it.text.length,dt,ht=it;dt=wi(ht);){var pt=dt.find(0,!0);ht=pt.from.line,at+=pt.from.ch-pt.to.ch}for(ht=it;dt=yn(ht);){var Lt=dt.find(0,!0);at-=ht.text.length-Lt.from.ch,ht=Lt.to.line,at+=ht.text.length-Lt.to.ch}return at}function He(it){var at=it.display,dt=it.doc;at.maxLine=pi(dt,dt.first),at.maxLineLength=De(at.maxLine),at.maxLineChanged=!0,dt.iter(function(ht){var pt=De(ht);pt>at.maxLineLength&&(at.maxLineLength=pt,at.maxLine=ht)})}var Ye=function(it,at,dt){this.text=it,Tt(this,at),this.height=dt?dt(this):1};Ye.prototype.lineNo=function(){return $t(this)},Di(Ye);function Sn(it,at,dt,ht){it.text=at,it.stateAfter&&(it.stateAfter=null),it.styles&&(it.styles=null),it.order!=null&&(it.order=null),be(it),Tt(it,dt);var pt=ht?ht(it):1;pt!=it.height&&mi(it,pt)}function xn(it){it.parent=null,be(it)}var Qe={},jn={};function hi(it,at){if(!it||/^\s*$/.test(it))return null;var dt=at.addModeClass?jn:Qe;return dt[it]||(dt[it]=it.replace(/\S+/g,"cm-$&"))}function ae(it,at){var dt=ge("span",null,null,se?"padding-right: .1px":null),ht={pre:ge("pre",[dt],"CodeMirror-line"),content:dt,col:0,pos:0,cm:it,trailingSpace:!1,splitSpaces:it.getOption("lineWrapping")};at.measure={};for(var pt=0;pt<=(at.rest?at.rest.length:0);pt++){var Lt=pt?at.rest[pt-1]:at.line,Bt=void 0;ht.pos=0,ht.addToken=Tn,bo(it.display.measure)&&(Bt=kn(Lt,it.doc.direction))&&(ht.addToken=Bn(ht.addToken,Bt)),ht.map=[];var Kt=at!=it.display.externalMeasured&&$t(Lt);di(Lt,ht,Ar(it,Lt,Kt)),Lt.styleClasses&&(Lt.styleClasses.bgClass&&(ht.bgClass=Mn(Lt.styleClasses.bgClass,ht.bgClass||"")),Lt.styleClasses.textClass&&(ht.textClass=Mn(Lt.styleClasses.textClass,ht.textClass||""))),ht.map.length==0&&ht.map.push(0,0,ht.content.appendChild(Bo(it.display.measure))),pt==0?(at.measure.map=ht.map,at.measure.cache={}):((at.measure.maps||(at.measure.maps=[])).push(ht.map),(at.measure.caches||(at.measure.caches=[])).push({}))}if(se){var Zt=ht.content.lastChild;(/\bcm-tab\b/.test(Zt.className)||Zt.querySelector&&Zt.querySelector(".cm-tab"))&&(ht.content.className="cm-tab-wrap-hack")}return Gn(it,"renderLine",it,at.line,ht.pre),ht.pre.className&&(ht.textClass=Mn(ht.pre.className,ht.textClass||"")),ht}function En(it){var at=Jt("span","\u2022","cm-invalidchar");return at.title="\\u"+it.charCodeAt(0).toString(16),at.setAttribute("aria-label",at.title),at}function Tn(it,at,dt,ht,pt,Lt,Bt){if(at){var Kt=it.splitSpaces?wn(at,it.trailingSpace):at,Zt=it.cm.state.specialChars,ne=!1,Ie;if(!Zt.test(at))it.col+=at.length,Ie=document.createTextNode(Kt),it.map.push(it.pos,it.pos+at.length,Ie),Se&&Wt<9&&(ne=!0),it.pos+=at.length;else{Ie=document.createDocumentFragment();for(var de=0;;){Zt.lastIndex=de;var fn=Zt.exec(at),en=fn?fn.index-de:at.length-de;if(en){var gi=document.createTextNode(Kt.slice(de,de+en));Se&&Wt<9?Ie.appendChild(Jt("span",[gi])):Ie.appendChild(gi),it.map.push(it.pos,it.pos+en,gi),it.col+=en,it.pos+=en}if(!fn)break;de+=en+1;var ki=void 0;if(fn[0]==" "){var ji=it.cm.options.tabSize,or=ji-it.col%ji;ki=Ie.appendChild(Jt("span",sn(or),"cm-tab")),ki.setAttribute("role","presentation"),ki.setAttribute("cm-text"," "),it.col+=or}else fn[0]=="\r"||fn[0]==`
|
|
`?(ki=Ie.appendChild(Jt("span",fn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ki.setAttribute("cm-text",fn[0]),it.col+=1):(ki=it.cm.options.specialCharPlaceholder(fn[0]),ki.setAttribute("cm-text",fn[0]),Se&&Wt<9?Ie.appendChild(Jt("span",[ki])):Ie.appendChild(ki),it.col+=1);it.map.push(it.pos,it.pos+1,ki),it.pos++}}if(it.trailingSpace=Kt.charCodeAt(at.length-1)==32,dt||ht||pt||ne||Lt||Bt){var Fr=dt||"";ht&&(Fr+=ht),pt&&(Fr+=pt);var vr=Jt("span",[Ie],Fr,Lt);if(Bt)for(var jr in Bt)Bt.hasOwnProperty(jr)&&jr!="style"&&jr!="class"&&vr.setAttribute(jr,Bt[jr]);return it.content.appendChild(vr)}it.content.appendChild(Ie)}}function wn(it,at){if(it.length>1&&!/ /.test(it))return it;for(var dt=at,ht="",pt=0;pt<it.length;pt++){var Lt=it.charAt(pt);Lt==" "&&dt&&(pt==it.length-1||it.charCodeAt(pt+1)==32)&&(Lt="\xA0"),ht+=Lt,dt=Lt==" "}return ht}function Bn(it,at){return function(dt,ht,pt,Lt,Bt,Kt,Zt){pt=pt?pt+" cm-force-border":"cm-force-border";for(var ne=dt.pos,Ie=ne+ht.length;;){for(var de=void 0,fn=0;fn<at.length&&(de=at[fn],!(de.to>ne&&de.from<=ne));fn++);if(de.to>=Ie)return it(dt,ht,pt,Lt,Bt,Kt,Zt);it(dt,ht.slice(0,de.to-ne),pt,Lt,null,Kt,Zt),Lt=null,ht=ht.slice(de.to-ne),ne=de.to}}}function Rn(it,at,dt,ht){var pt=!ht&&dt.widgetNode;pt&&it.map.push(it.pos,it.pos+at,pt),!ht&&it.cm.display.input.needsContentAttribute&&(pt||(pt=it.content.appendChild(document.createElement("span"))),pt.setAttribute("cm-marker",dt.id)),pt&&(it.cm.display.input.setUneditable(pt),it.content.appendChild(pt)),it.pos+=at,it.trailingSpace=!1}function di(it,at,dt){var ht=it.markedSpans,pt=it.text,Lt=0;if(!ht){for(var Bt=1;Bt<dt.length;Bt+=2)at.addToken(at,pt.slice(Lt,Lt=dt[Bt]),hi(dt[Bt+1],at.cm.options));return}for(var Kt=pt.length,Zt=0,ne=1,Ie="",de,fn,en=0,gi,ki,ji,or,Fr;;){if(en==Zt){gi=ki=ji=fn="",Fr=null,or=null,en=1/0;for(var vr=[],jr=void 0,fo=0;fo<ht.length;++fo){var pr=ht[fo],Zo=pr.marker;if(Zo.type=="bookmark"&&pr.from==Zt&&Zo.widgetNode)vr.push(Zo);else if(pr.from<=Zt&&(pr.to==null||pr.to>Zt||Zo.collapsed&&pr.to==Zt&&pr.from==Zt)){if(pr.to!=null&&pr.to!=Zt&&en>pr.to&&(en=pr.to,ki=""),Zo.className&&(gi+=" "+Zo.className),Zo.css&&(fn=(fn?fn+";":"")+Zo.css),Zo.startStyle&&pr.from==Zt&&(ji+=" "+Zo.startStyle),Zo.endStyle&&pr.to==en&&(jr||(jr=[])).push(Zo.endStyle,pr.to),Zo.title&&((Fr||(Fr={})).title=Zo.title),Zo.attributes)for(var Da in Zo.attributes)(Fr||(Fr={}))[Da]=Zo.attributes[Da];Zo.collapsed&&(!or||Xn(or.marker,Zo)<0)&&(or=pr)}else pr.from>Zt&&en>pr.from&&(en=pr.from)}if(jr)for(var ms=0;ms<jr.length;ms+=2)jr[ms+1]==en&&(ki+=" "+jr[ms]);if(!or||or.from==Zt)for(var Za=0;Za<vr.length;++Za)Rn(at,0,vr[Za]);if(or&&(or.from||0)==Zt){if(Rn(at,(or.to==null?Kt+1:or.to)-Zt,or.marker,or.from==null),or.to==null)return;or.to==Zt&&(or=!1)}}if(Zt>=Kt)break;for(var sl=Math.min(Kt,en);;){if(Ie){var Vs=Zt+Ie.length;if(!or){var cs=Vs>sl?Ie.slice(0,sl-Zt):Ie;at.addToken(at,cs,de?de+gi:gi,ji,Zt+cs.length==en?ki:"",fn,Fr)}if(Vs>=sl){Ie=Ie.slice(sl-Zt),Zt=sl;break}Zt=Vs,ji=""}Ie=pt.slice(Lt,Lt=dt[ne++]),de=hi(dt[ne++],at.cm.options)}}}function qn(it,at,dt){this.line=at,this.rest=Gi(at),this.size=this.rest?$t(ce(this.rest))-dt+1:1,this.node=this.text=null,this.hidden=Ut(it,at)}function ui(it,at,dt){for(var ht=[],pt,Lt=at;Lt<dt;Lt=pt){var Bt=new qn(it.doc,pi(it.doc,Lt),Lt);pt=Lt+Bt.size,ht.push(Bt)}return ht}var ci=null;function zi(it){ci?ci.ops.push(it):it.ownsGroup=ci={ops:[it],delayedCallbacks:[]}}function lr(it){var at=it.delayedCallbacks,dt=0;do{for(;dt<at.length;dt++)at[dt].call(null);for(var ht=0;ht<it.ops.length;ht++){var pt=it.ops[ht];if(pt.cursorActivityHandlers)for(;pt.cursorActivityCalled<pt.cursorActivityHandlers.length;)pt.cursorActivityHandlers[pt.cursorActivityCalled++].call(null,pt.cm)}}while(dt<at.length)}function cr(it,at){var dt=it.ownsGroup;if(dt)try{lr(dt)}finally{ci=null,at(dt)}}var yr=null;function ii(it,at){var dt=ai(it,at);if(dt.length){var ht=Array.prototype.slice.call(arguments,2),pt;ci?pt=ci.delayedCallbacks:yr?pt=yr:(pt=yr=[],setTimeout(Ji,0));for(var Lt=function(Kt){pt.push(function(){return dt[Kt].apply(null,ht)})},Bt=0;Bt<dt.length;++Bt)Lt(Bt)}}function Ji(){var it=yr;yr=null;for(var at=0;at<it.length;++at)it[at]()}function qi(it,at,dt,ht){for(var pt=0;pt<at.changes.length;pt++){var Lt=at.changes[pt];Lt=="text"?Xe(it,at):Lt=="gutter"?Wi(it,at,dt,ht):Lt=="class"?Li(it,at):Lt=="widget"&&ar(it,at,ht)}at.changes=null}function ur(it){return it.node==it.text&&(it.node=Jt("div",null,null,"position: relative"),it.text.parentNode&&it.text.parentNode.replaceChild(it.node,it.text),it.node.appendChild(it.text),Se&&Wt<8&&(it.node.style.zIndex=2)),it.node}function Mi(it,at){var dt=at.bgClass?at.bgClass+" "+(at.line.bgClass||""):at.line.bgClass;if(dt&&(dt+=" CodeMirror-linebackground"),at.background)dt?at.background.className=dt:(at.background.parentNode.removeChild(at.background),at.background=null);else if(dt){var ht=ur(at);at.background=ht.insertBefore(Jt("div",null,dt),ht.firstChild),it.display.input.setUneditable(at.background)}}function Ai(it,at){var dt=it.display.externalMeasured;return dt&&dt.line==at.line?(it.display.externalMeasured=null,at.measure=dt.measure,dt.built):ae(it,at)}function Xe(it,at){var dt=at.text.className,ht=Ai(it,at);at.text==at.node&&(at.node=ht.pre),at.text.parentNode.replaceChild(ht.pre,at.text),at.text=ht.pre,ht.bgClass!=at.bgClass||ht.textClass!=at.textClass?(at.bgClass=ht.bgClass,at.textClass=ht.textClass,Li(it,at)):dt&&(at.text.className=dt)}function Li(it,at){Mi(it,at),at.line.wrapClass?ur(at).className=at.line.wrapClass:at.node!=at.text&&(at.node.className="");var dt=at.textClass?at.textClass+" "+(at.line.textClass||""):at.line.textClass;at.text.className=dt||""}function Wi(it,at,dt,ht){if(at.gutter&&(at.node.removeChild(at.gutter),at.gutter=null),at.gutterBackground&&(at.node.removeChild(at.gutterBackground),at.gutterBackground=null),at.line.gutterClass){var pt=ur(at);at.gutterBackground=Jt("div",null,"CodeMirror-gutter-background "+at.line.gutterClass,"left: "+(it.options.fixedGutter?ht.fixedPos:-ht.gutterTotalWidth)+"px; width: "+ht.gutterTotalWidth+"px"),it.display.input.setUneditable(at.gutterBackground),pt.insertBefore(at.gutterBackground,at.text)}var Lt=at.line.gutterMarkers;if(it.options.lineNumbers||Lt){var Bt=ur(at),Kt=at.gutter=Jt("div",null,"CodeMirror-gutter-wrapper","left: "+(it.options.fixedGutter?ht.fixedPos:-ht.gutterTotalWidth)+"px");if(it.display.input.setUneditable(Kt),Bt.insertBefore(Kt,at.text),at.line.gutterClass&&(Kt.className+=" "+at.line.gutterClass),it.options.lineNumbers&&(!Lt||!Lt["CodeMirror-linenumbers"])&&(at.lineNumber=Kt.appendChild(Jt("div",Bi(it.options,dt),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+ht.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+it.display.lineNumInnerWidth+"px"))),Lt)for(var Zt=0;Zt<it.display.gutterSpecs.length;++Zt){var ne=it.display.gutterSpecs[Zt].className,Ie=Lt.hasOwnProperty(ne)&&Lt[ne];Ie&&Kt.appendChild(Jt("div",[Ie],"CodeMirror-gutter-elt","left: "+ht.gutterLeft[ne]+"px; width: "+ht.gutterWidth[ne]+"px"))}}}function ar(it,at,dt){at.alignable&&(at.alignable=null);for(var ht=zt("CodeMirror-linewidget"),pt=at.node.firstChild,Lt=void 0;pt;pt=Lt)Lt=pt.nextSibling,ht.test(pt.className)&&at.node.removeChild(pt);Yi(it,at,dt)}function fr(it,at,dt,ht){var pt=Ai(it,at);return at.text=at.node=pt.pre,pt.bgClass&&(at.bgClass=pt.bgClass),pt.textClass&&(at.textClass=pt.textClass),Li(it,at),Wi(it,at,dt,ht),Yi(it,at,ht),at.node}function Yi(it,at,dt){if(fi(it,at.line,at,dt,!0),at.rest)for(var ht=0;ht<at.rest.length;ht++)fi(it,at.rest[ht],at,dt,!1)}function fi(it,at,dt,ht,pt){if(at.widgets)for(var Lt=ur(dt),Bt=0,Kt=at.widgets;Bt<Kt.length;++Bt){var Zt=Kt[Bt],ne=Jt("div",[Zt.node],"CodeMirror-linewidget"+(Zt.className?" "+Zt.className:""));Zt.handleMouseEvents||ne.setAttribute("cm-ignore-events","true"),nr(Zt,ne,dt,ht),it.display.input.setUneditable(ne),pt&&Zt.above?Lt.insertBefore(ne,dt.gutter||dt.text):Lt.appendChild(ne),ii(Zt,"redraw")}}function nr(it,at,dt,ht){if(it.noHScroll){(dt.alignable||(dt.alignable=[])).push(at);var pt=ht.wrapperWidth;at.style.left=ht.fixedPos+"px",it.coverGutter||(pt-=ht.gutterTotalWidth,at.style.paddingLeft=ht.gutterTotalWidth+"px"),at.style.width=pt+"px"}it.coverGutter&&(at.style.zIndex=5,at.style.position="relative",it.noHScroll||(at.style.marginLeft=-ht.gutterTotalWidth+"px"))}function Tr(it){if(it.height!=null)return it.height;var at=it.doc.cm;if(!at)return 0;if(!Fe(document.body,it.node)){var dt="position: relative;";it.coverGutter&&(dt+="margin-left: -"+at.display.gutters.offsetWidth+"px;"),it.noHScroll&&(dt+="width: "+at.display.wrapper.clientWidth+"px;"),jt(at.display.measure,Jt("div",[it.node],null,dt))}return it.height=it.node.parentNode.offsetHeight}function Dr(it,at){for(var dt=so(at);dt!=it.wrapper;dt=dt.parentNode)if(!dt||dt.nodeType==1&&dt.getAttribute("cm-ignore-events")=="true"||dt.parentNode==it.sizer&&dt!=it.mover)return!0}function hr(it){return it.lineSpace.offsetTop}function Yr(it){return it.mover.offsetHeight-it.lineSpace.offsetHeight}function Wr(it){if(it.cachedPaddingH)return it.cachedPaddingH;var at=jt(it.measure,Jt("pre","x","CodeMirror-line-like")),dt=window.getComputedStyle?window.getComputedStyle(at):at.currentStyle,ht={left:parseInt(dt.paddingLeft),right:parseInt(dt.paddingRight)};return!isNaN(ht.left)&&!isNaN(ht.right)&&(it.cachedPaddingH=ht),ht}function Cr(it){return Pn-it.display.nativeBarWidth}function to(it){return it.display.scroller.clientWidth-Cr(it)-it.display.barWidth}function yo(it){return it.display.scroller.clientHeight-Cr(it)-it.display.barHeight}function qo(it,at,dt){var ht=it.options.lineWrapping,pt=ht&&to(it);if(!at.measure.heights||ht&&at.measure.width!=pt){var Lt=at.measure.heights=[];if(ht){at.measure.width=pt;for(var Bt=at.text.firstChild.getClientRects(),Kt=0;Kt<Bt.length-1;Kt++){var Zt=Bt[Kt],ne=Bt[Kt+1];Math.abs(Zt.bottom-ne.bottom)>2&&Lt.push((Zt.bottom+ne.top)/2-dt.top)}}Lt.push(dt.bottom-dt.top)}}function Hr(it,at,dt){if(it.line==at)return{map:it.measure.map,cache:it.measure.cache};for(var ht=0;ht<it.rest.length;ht++)if(it.rest[ht]==at)return{map:it.measure.maps[ht],cache:it.measure.caches[ht]};for(var pt=0;pt<it.rest.length;pt++)if($t(it.rest[pt])>dt)return{map:it.measure.maps[pt],cache:it.measure.caches[pt],before:!0}}function ta(it,at){at=Jn(at);var dt=$t(at),ht=it.display.externalMeasured=new qn(it.doc,at,dt);ht.lineN=dt;var pt=ht.built=ae(it,ht);return ht.text=pt.pre,jt(it.display.lineMeasure,pt.pre),ht}function So(it,at,dt,ht){return Yo(it,Lo(it,at),dt,ht)}function ca(it,at){if(at>=it.display.viewFrom&&at<it.display.viewTo)return it.display.view[_a(it,at)];var dt=it.display.externalMeasured;if(dt&&at>=dt.lineN&&at<dt.lineN+dt.size)return dt}function Lo(it,at){var dt=$t(at),ht=ca(it,dt);ht&&!ht.text?ht=null:ht&&ht.changes&&(qi(it,ht,dt,ts(it)),it.curOp.forceUpdate=!0),ht||(ht=ta(it,at));var pt=Hr(ht,at,dt);return{line:at,view:ht,rect:null,map:pt.map,cache:pt.cache,before:pt.before,hasHeights:!1}}function Yo(it,at,dt,ht,pt){at.before&&(dt=-1);var Lt=dt+(ht||""),Bt;return at.cache.hasOwnProperty(Lt)?Bt=at.cache[Lt]:(at.rect||(at.rect=at.view.text.getBoundingClientRect()),at.hasHeights||(qo(it,at.view,at.rect),at.hasHeights=!0),Bt=xo(it,at,dt,ht),Bt.bogus||(at.cache[Lt]=Bt)),{left:Bt.left,right:Bt.right,top:pt?Bt.rtop:Bt.top,bottom:pt?Bt.rbottom:Bt.bottom}}var ea={left:0,right:0,top:0,bottom:0};function Qo(it,at,dt){for(var ht,pt,Lt,Bt,Kt,Zt,ne=0;ne<it.length;ne+=3)if(Kt=it[ne],Zt=it[ne+1],at<Kt?(pt=0,Lt=1,Bt="left"):at<Zt?(pt=at-Kt,Lt=pt+1):(ne==it.length-3||at==Zt&&it[ne+3]>at)&&(Lt=Zt-Kt,pt=Lt-1,at>=Zt&&(Bt="right")),pt!=null){if(ht=it[ne+2],Kt==Zt&&dt==(ht.insertLeft?"left":"right")&&(Bt=dt),dt=="left"&&pt==0)for(;ne&&it[ne-2]==it[ne-3]&&it[ne-1].insertLeft;)ht=it[(ne-=3)+2],Bt="left";if(dt=="right"&&pt==Zt-Kt)for(;ne<it.length-3&&it[ne+3]==it[ne+4]&&!it[ne+5].insertLeft;)ht=it[(ne+=3)+2],Bt="right";break}return{node:ht,start:pt,end:Lt,collapse:Bt,coverStart:Kt,coverEnd:Zt}}function Oo(it,at){var dt=ea;if(at=="left")for(var ht=0;ht<it.length&&(dt=it[ht]).left==dt.right;ht++);else for(var pt=it.length-1;pt>=0&&(dt=it[pt]).left==dt.right;pt--);return dt}function xo(it,at,dt,ht){var pt=Qo(at.map,dt,ht),Lt=pt.node,Bt=pt.start,Kt=pt.end,Zt=pt.collapse,ne;if(Lt.nodeType==3){for(var Ie=0;Ie<4;Ie++){for(;Bt&&pe(at.line.text.charAt(pt.coverStart+Bt));)--Bt;for(;pt.coverStart+Kt<pt.coverEnd&&pe(at.line.text.charAt(pt.coverStart+Kt));)++Kt;if(Se&&Wt<9&&Bt==0&&Kt==pt.coverEnd-pt.coverStart?ne=Lt.parentNode.getBoundingClientRect():ne=Oo(he(Lt,Bt,Kt).getClientRects(),ht),ne.left||ne.right||Bt==0)break;Kt=Bt,Bt=Bt-1,Zt="right"}Se&&Wt<11&&(ne=oa(it.display.measure,ne))}else{Bt>0&&(Zt=ht="right");var de;it.options.lineWrapping&&(de=Lt.getClientRects()).length>1?ne=de[ht=="right"?de.length-1:0]:ne=Lt.getBoundingClientRect()}if(Se&&Wt<9&&!Bt&&(!ne||!ne.left&&!ne.right)){var fn=Lt.parentNode.getClientRects()[0];fn?ne={left:fn.left,right:fn.left+ss(it.display),top:fn.top,bottom:fn.bottom}:ne=ea}for(var en=ne.top-at.rect.top,gi=ne.bottom-at.rect.top,ki=(en+gi)/2,ji=at.view.measure.heights,or=0;or<ji.length-1&&!(ki<ji[or]);or++);var Fr=or?ji[or-1]:0,vr=ji[or],jr={left:(Zt=="right"?ne.right:ne.left)-at.rect.left,right:(Zt=="left"?ne.left:ne.right)-at.rect.left,top:Fr,bottom:vr};return!ne.left&&!ne.right&&(jr.bogus=!0),it.options.singleCursorHeightPerLine||(jr.rtop=en,jr.rbottom=gi),jr}function oa(it,at){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Pr(it))return at;var dt=screen.logicalXDPI/screen.deviceXDPI,ht=screen.logicalYDPI/screen.deviceYDPI;return{left:at.left*dt,right:at.right*dt,top:at.top*ht,bottom:at.bottom*ht}}function Ca(it){if(it.measure&&(it.measure.cache={},it.measure.heights=null,it.rest))for(var at=0;at<it.rest.length;at++)it.measure.caches[at]={}}function Wo(it){it.display.externalMeasure=null,qt(it.display.lineMeasure);for(var at=0;at<it.display.view.length;at++)Ca(it.display.view[at])}function Ia(it){Wo(it),it.display.cachedCharWidth=it.display.cachedTextHeight=it.display.cachedPaddingH=null,it.options.lineWrapping||(it.display.maxLineChanged=!0),it.display.lineNumChars=null}function Co(){return ye&&nt?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function lo(){return ye&&nt?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function eo(it){var at=0;if(it.widgets)for(var dt=0;dt<it.widgets.length;++dt)it.widgets[dt].above&&(at+=Tr(it.widgets[dt]));return at}function Uo(it,at,dt,ht,pt){if(!pt){var Lt=eo(at);dt.top+=Lt,dt.bottom+=Lt}if(ht=="line")return dt;ht||(ht="local");var Bt=fe(at);if(ht=="local"?Bt+=hr(it.display):Bt-=it.display.viewOffset,ht=="page"||ht=="window"){var Kt=it.display.lineSpace.getBoundingClientRect();Bt+=Kt.top+(ht=="window"?0:lo());var Zt=Kt.left+(ht=="window"?0:Co());dt.left+=Zt,dt.right+=Zt}return dt.top+=Bt,dt.bottom+=Bt,dt}function gr(it,at,dt){if(dt=="div")return at;var ht=at.left,pt=at.top;if(dt=="page")ht-=Co(),pt-=lo();else if(dt=="local"||!dt){var Lt=it.display.sizer.getBoundingClientRect();ht+=Lt.left,pt+=Lt.top}var Bt=it.display.lineSpace.getBoundingClientRect();return{left:ht-Bt.left,top:pt-Bt.top}}function Vr(it,at,dt,ht,pt){return ht||(ht=pi(it.doc,at.line)),Uo(it,ht,So(it,ht,at.ch,pt),dt)}function Ki(it,at,dt,ht,pt,Lt){ht=ht||pi(it.doc,at.line),pt||(pt=Lo(it,ht));function Bt(gi,ki){var ji=Yo(it,pt,gi,ki?"right":"left",Lt);return ki?ji.left=ji.right:ji.right=ji.left,Uo(it,ht,ji,dt)}var Kt=kn(ht,it.doc.direction),Zt=at.ch,ne=at.sticky;if(Zt>=ht.text.length?(Zt=ht.text.length,ne="before"):Zt<=0&&(Zt=0,ne="after"),!Kt)return Bt(ne=="before"?Zt-1:Zt,ne=="before");function Ie(gi,ki,ji){var or=Kt[ki],Fr=or.level==1;return Bt(ji?gi-1:gi,Fr!=ji)}var de=Ee(Kt,Zt,ne),fn=Ae,en=Ie(Zt,de,ne=="before");return fn!=null&&(en.other=Ie(Zt,fn,ne!="before")),en}function sr(it,at){var dt=0;at=bi(it.doc,at),it.options.lineWrapping||(dt=ss(it.display)*at.ch);var ht=pi(it.doc,at.line),pt=fe(ht)+hr(it.display);return{left:dt,right:dt,top:pt,bottom:pt+ht.height}}function Xr(it,at,dt,ht,pt){var Lt=_e(it,at,dt);return Lt.xRel=pt,ht&&(Lt.outside=ht),Lt}function tr(it,at,dt){var ht=it.doc;if(dt+=it.display.viewOffset,dt<0)return Xr(ht.first,0,null,-1,-1);var pt=pn(ht,dt),Lt=ht.first+ht.size-1;if(pt>Lt)return Xr(ht.first+ht.size-1,pi(ht,Lt).text.length,null,1,1);at<0&&(at=0);for(var Bt=pi(ht,pt);;){var Kt=ln(it,Bt,pt,at,dt),Zt=Vn(Bt,Kt.ch+(Kt.xRel>0||Kt.outside>0?1:0));if(!Zt)return Kt;var ne=Zt.find(1);if(ne.line==pt)return ne;Bt=pi(ht,pt=ne.line)}}function Un(it,at,dt,ht){ht-=eo(at);var pt=at.text.length,Lt=on(function(Bt){return Yo(it,dt,Bt-1).bottom<=ht},pt,0);return pt=on(function(Bt){return Yo(it,dt,Bt).top>ht},Lt,pt),{begin:Lt,end:pt}}function ia(it,at,dt,ht){dt||(dt=Lo(it,at));var pt=Uo(it,at,Yo(it,dt,ht),"line").top;return Un(it,at,dt,pt)}function le(it,at,dt,ht){return it.bottom<=dt?!1:it.top>dt?!0:(ht?it.left:it.right)>at}function ln(it,at,dt,ht,pt){pt-=fe(at);var Lt=Lo(it,at),Bt=eo(at),Kt=0,Zt=at.text.length,ne=!0,Ie=kn(at,it.doc.direction);if(Ie){var de=(it.options.lineWrapping?Qa:Ja)(it,at,dt,Lt,Ie,ht,pt);ne=de.level!=1,Kt=ne?de.from:de.to-1,Zt=ne?de.to:de.from-1}var fn=null,en=null,gi=on(function(fo){var pr=Yo(it,Lt,fo);return pr.top+=Bt,pr.bottom+=Bt,le(pr,ht,pt,!1)?(pr.top<=pt&&pr.left<=ht&&(fn=fo,en=pr),!0):!1},Kt,Zt),ki,ji,or=!1;if(en){var Fr=ht-en.left<en.right-ht,vr=Fr==ne;gi=fn+(vr?0:1),ji=vr?"after":"before",ki=Fr?en.left:en.right}else{!ne&&(gi==Zt||gi==Kt)&&gi++,ji=gi==0?"after":gi==at.text.length?"before":Yo(it,Lt,gi-(ne?1:0)).bottom+Bt<=pt==ne?"after":"before";var jr=Ki(it,_e(dt,gi,ji),"line",at,Lt);ki=jr.left,or=pt<jr.top?-1:pt>=jr.bottom?1:0}return gi=Le(at.text,gi,1),Xr(dt,gi,ji,or,ht-ki)}function Ja(it,at,dt,ht,pt,Lt,Bt){var Kt=on(function(de){var fn=pt[de],en=fn.level!=1;return le(Ki(it,_e(dt,en?fn.to:fn.from,en?"before":"after"),"line",at,ht),Lt,Bt,!0)},0,pt.length-1),Zt=pt[Kt];if(Kt>0){var ne=Zt.level!=1,Ie=Ki(it,_e(dt,ne?Zt.from:Zt.to,ne?"after":"before"),"line",at,ht);le(Ie,Lt,Bt,!0)&&Ie.top>Bt&&(Zt=pt[Kt-1])}return Zt}function Qa(it,at,dt,ht,pt,Lt,Bt){var Kt=Un(it,at,ht,Bt),Zt=Kt.begin,ne=Kt.end;/\s/.test(at.text.charAt(ne-1))&&ne--;for(var Ie=null,de=null,fn=0;fn<pt.length;fn++){var en=pt[fn];if(!(en.from>=ne||en.to<=Zt)){var gi=en.level!=1,ki=Yo(it,ht,gi?Math.min(ne,en.to)-1:Math.max(Zt,en.from)).right,ji=ki<Lt?Lt-ki+1e9:ki-Lt;(!Ie||de>ji)&&(Ie=en,de=ji)}}return Ie||(Ie=pt[pt.length-1]),Ie.from<Zt&&(Ie={from:Zt,to:Ie.to,level:Ie.level}),Ie.to>ne&&(Ie={from:Ie.from,to:ne,level:Ie.level}),Ie}var pa;function Na(it){if(it.cachedTextHeight!=null)return it.cachedTextHeight;if(pa==null){pa=Jt("pre",null,"CodeMirror-line-like");for(var at=0;at<49;++at)pa.appendChild(document.createTextNode("x")),pa.appendChild(Jt("br"));pa.appendChild(document.createTextNode("x"))}jt(it.measure,pa);var dt=pa.offsetHeight/50;return dt>3&&(it.cachedTextHeight=dt),qt(it.measure),dt||1}function ss(it){if(it.cachedCharWidth!=null)return it.cachedCharWidth;var at=Jt("span","xxxxxxxxxx"),dt=Jt("pre",[at],"CodeMirror-line-like");jt(it.measure,dt);var ht=at.getBoundingClientRect(),pt=(ht.right-ht.left)/10;return pt>2&&(it.cachedCharWidth=pt),pt||10}function ts(it){for(var at=it.display,dt={},ht={},pt=at.gutters.clientLeft,Lt=at.gutters.firstChild,Bt=0;Lt;Lt=Lt.nextSibling,++Bt){var Kt=it.display.gutterSpecs[Bt].className;dt[Kt]=Lt.offsetLeft+Lt.clientLeft+pt,ht[Kt]=Lt.clientWidth}return{fixedPos:Ws(at),gutterTotalWidth:at.gutters.offsetWidth,gutterLeft:dt,gutterWidth:ht,wrapperWidth:at.wrapper.clientWidth}}function Ws(it){return it.scroller.getBoundingClientRect().left-it.sizer.getBoundingClientRect().left}function aa(it){var at=Na(it.display),dt=it.options.lineWrapping,ht=dt&&Math.max(5,it.display.scroller.clientWidth/ss(it.display)-3);return function(pt){if(Ut(it.doc,pt))return 0;var Lt=0;if(pt.widgets)for(var Bt=0;Bt<pt.widgets.length;Bt++)pt.widgets[Bt].height&&(Lt+=pt.widgets[Bt].height);return dt?Lt+(Math.ceil(pt.text.length/ht)||1)*at:Lt+at}}function Mr(it){var at=it.doc,dt=aa(it);at.iter(function(ht){var pt=dt(ht);pt!=ht.height&&mi(ht,pt)})}function Wa(it,at,dt,ht){var pt=it.display;if(!dt&&so(at).getAttribute("cm-not-content")=="true")return null;var Lt,Bt,Kt=pt.lineSpace.getBoundingClientRect();try{Lt=at.clientX-Kt.left,Bt=at.clientY-Kt.top}catch(de){return null}var Zt=tr(it,Lt,Bt),ne;if(ht&&Zt.xRel>0&&(ne=pi(it.doc,Zt.line).text).length==Zt.ch){var Ie=me(ne,ne.length,it.options.tabSize)-ne.length;Zt=_e(Zt.line,Math.max(0,Math.round((Lt-Wr(it.display).left)/ss(it.display))-Ie))}return Zt}function _a(it,at){if(at>=it.display.viewTo||(at-=it.display.viewFrom,at<0))return null;for(var dt=it.display.view,ht=0;ht<dt.length;ht++)if(at-=dt[ht].size,at<0)return ht}function sa(it,at,dt,ht){at==null&&(at=it.doc.first),dt==null&&(dt=it.doc.first+it.doc.size),ht||(ht=0);var pt=it.display;if(ht&&dt<pt.viewTo&&(pt.updateLineNumbers==null||pt.updateLineNumbers>at)&&(pt.updateLineNumbers=at),it.curOp.viewChanged=!0,at>=pt.viewTo)dn&&At(it.doc,at)<pt.viewTo&&fa(it);else if(dt<=pt.viewFrom)dn&&re(it.doc,dt+ht)>pt.viewFrom?fa(it):(pt.viewFrom+=ht,pt.viewTo+=ht);else if(at<=pt.viewFrom&&dt>=pt.viewTo)fa(it);else if(at<=pt.viewFrom){var Lt=ls(it,dt,dt+ht,1);Lt?(pt.view=pt.view.slice(Lt.index),pt.viewFrom=Lt.lineN,pt.viewTo+=ht):fa(it)}else if(dt>=pt.viewTo){var Bt=ls(it,at,at,-1);Bt?(pt.view=pt.view.slice(0,Bt.index),pt.viewTo=Bt.lineN):fa(it)}else{var Kt=ls(it,at,at,-1),Zt=ls(it,dt,dt+ht,1);Kt&&Zt?(pt.view=pt.view.slice(0,Kt.index).concat(ui(it,Kt.lineN,Zt.lineN)).concat(pt.view.slice(Zt.index)),pt.viewTo+=ht):fa(it)}var ne=pt.externalMeasured;ne&&(dt<ne.lineN?ne.lineN+=ht:at<ne.lineN+ne.size&&(pt.externalMeasured=null))}function no(it,at,dt){it.curOp.viewChanged=!0;var ht=it.display,pt=it.display.externalMeasured;if(pt&&at>=pt.lineN&&at<pt.lineN+pt.size&&(ht.externalMeasured=null),!(at<ht.viewFrom||at>=ht.viewTo)){var Lt=ht.view[_a(it,at)];if(Lt.node!=null){var Bt=Lt.changes||(Lt.changes=[]);Ue(Bt,dt)==-1&&Bt.push(dt)}}}function fa(it){it.display.viewFrom=it.display.viewTo=it.doc.first,it.display.view=[],it.display.viewOffset=0}function ls(it,at,dt,ht){var pt=_a(it,at),Lt,Bt=it.display.view;if(!dn||dt==it.doc.first+it.doc.size)return{index:pt,lineN:dt};for(var Kt=it.display.viewFrom,Zt=0;Zt<pt;Zt++)Kt+=Bt[Zt].size;if(Kt!=at){if(ht>0){if(pt==Bt.length-1)return null;Lt=Kt+Bt[pt].size-at,pt++}else Lt=Kt-at;at+=Lt,dt+=Lt}for(;At(it.doc,dt)!=dt;){if(pt==(ht<0?0:Bt.length-1))return null;dt+=ht*Bt[pt-(ht<0?1:0)].size,pt+=ht}return{index:pt,lineN:dt}}function ra(it,at,dt){var ht=it.display,pt=ht.view;pt.length==0||at>=ht.viewTo||dt<=ht.viewFrom?(ht.view=ui(it,at,dt),ht.viewFrom=at):(ht.viewFrom>at?ht.view=ui(it,at,ht.viewFrom).concat(ht.view):ht.viewFrom<at&&(ht.view=ht.view.slice(_a(it,at))),ht.viewFrom=at,ht.viewTo<dt?ht.view=ht.view.concat(ui(it,ht.viewTo,dt)):ht.viewTo>dt&&(ht.view=ht.view.slice(0,_a(it,dt)))),ht.viewTo=dt}function us(it){for(var at=it.display.view,dt=0,ht=0;ht<at.length;ht++){var pt=at[ht];!pt.hidden&&(!pt.node||pt.changes)&&++dt}return dt}function Ta(it){it.display.input.showSelection(it.display.input.prepareSelection())}function Fl(it,at){at===void 0&&(at=!0);for(var dt=it.doc,ht={},pt=ht.cursors=document.createDocumentFragment(),Lt=ht.selection=document.createDocumentFragment(),Bt=0;Bt<dt.sel.ranges.length;Bt++)if(!(!at&&Bt==dt.sel.primIndex)){var Kt=dt.sel.ranges[Bt];if(!(Kt.from().line>=it.display.viewTo||Kt.to().line<it.display.viewFrom)){var Zt=Kt.empty();(Zt||it.options.showCursorWhenSelecting)&&Io(it,Kt.head,pt),Zt||Eo(it,Kt,Lt)}}return ht}function Io(it,at,dt){var ht=Ki(it,at,"div",null,null,!it.options.singleCursorHeightPerLine),pt=dt.appendChild(Jt("div","\xA0","CodeMirror-cursor"));if(pt.style.left=ht.left+"px",pt.style.top=ht.top+"px",pt.style.height=Math.max(0,ht.bottom-ht.top)*it.options.cursorHeight+"px",ht.other){var Lt=dt.appendChild(Jt("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Lt.style.display="",Lt.style.left=ht.other.left+"px",Lt.style.top=ht.other.top+"px",Lt.style.height=(ht.other.bottom-ht.other.top)*.85+"px"}}function La(it,at){return it.top-at.top||it.left-at.left}function Eo(it,at,dt){var ht=it.display,pt=it.doc,Lt=document.createDocumentFragment(),Bt=Wr(it.display),Kt=Bt.left,Zt=Math.max(ht.sizerWidth,to(it)-ht.sizer.offsetLeft)-Bt.right,ne=pt.direction=="ltr";function Ie(vr,jr,fo,pr){jr<0&&(jr=0),jr=Math.round(jr),pr=Math.round(pr),Lt.appendChild(Jt("div",null,"CodeMirror-selected","position: absolute; left: "+vr+`px;
|
|
top: `+jr+"px; width: "+(fo==null?Zt-vr:fo)+`px;
|
|
height: `+(pr-jr)+"px"))}function de(vr,jr,fo){var pr=pi(pt,vr),Zo=pr.text.length,Da,ms;function Za(cs,xl){return Vr(it,_e(vr,cs),"div",pr,xl)}function sl(cs,xl,Bs){var fs=ia(it,pr,null,cs),ha=xl=="ltr"==(Bs=="after")?"left":"right",Ya=Bs=="after"?fs.begin:fs.end-(/\s/.test(pr.text.charAt(fs.end-1))?2:1);return Za(Ya,ha)[ha]}var Vs=kn(pr,pt.direction);return ve(Vs,jr||0,fo==null?Zo:fo,function(cs,xl,Bs,fs){var ha=Bs=="ltr",Ya=Za(cs,ha?"left":"right"),ws=Za(xl-1,ha?"right":"left"),Os=jr==null&&cs==0,ou=fo==null&&xl==Zo,Va=fs==0,Xl=!Vs||fs==Vs.length-1;if(ws.top-Ya.top<=3){var $a=(ne?Os:ou)&&Va,Nc=(ne?ou:Os)&&Xl,Ol=$a?Kt:(ha?Ya:ws).left,Pl=Nc?Zt:(ha?ws:Ya).right;Ie(Ol,Ya.top,Pl-Ol,Ya.bottom)}else{var ll,Ma,Cs,Ou;ha?(ll=ne&&Os&&Va?Kt:Ya.left,Ma=ne?Zt:sl(cs,Bs,"before"),Cs=ne?Kt:sl(xl,Bs,"after"),Ou=ne&&ou&&Xl?Zt:ws.right):(ll=ne?sl(cs,Bs,"before"):Kt,Ma=!ne&&Os&&Va?Zt:Ya.right,Cs=!ne&&ou&&Xl?Kt:ws.left,Ou=ne?sl(xl,Bs,"after"):Zt),Ie(ll,Ya.top,Ma-ll,Ya.bottom),Ya.bottom<ws.top&&Ie(Kt,Ya.bottom,null,ws.top),Ie(Cs,ws.top,Ou-Cs,ws.bottom)}(!Da||La(Ya,Da)<0)&&(Da=Ya),La(ws,Da)<0&&(Da=ws),(!ms||La(Ya,ms)<0)&&(ms=Ya),La(ws,ms)<0&&(ms=ws)}),{start:Da,end:ms}}var fn=at.from(),en=at.to();if(fn.line==en.line)de(fn.line,fn.ch,en.ch);else{var gi=pi(pt,fn.line),ki=pi(pt,en.line),ji=Jn(gi)==Jn(ki),or=de(fn.line,fn.ch,ji?gi.text.length+1:null).end,Fr=de(en.line,ji?0:null,en.ch).start;ji&&(or.top<Fr.top-2?(Ie(or.right,or.top,null,or.bottom),Ie(Kt,Fr.top,Fr.left,Fr.bottom)):Ie(or.right,or.top,Fr.left-or.right,or.bottom)),or.bottom<Fr.top&&Ie(Kt,or.bottom,null,Fr.top)}dt.appendChild(Lt)}function Xo(it){if(it.state.focused){var at=it.display;clearInterval(at.blinker);var dt=!0;at.cursorDiv.style.visibility="",it.options.cursorBlinkRate>0?at.blinker=setInterval(function(){it.hasFocus()||fl(it),at.cursorDiv.style.visibility=(dt=!dt)?"":"hidden"},it.options.cursorBlinkRate):it.options.cursorBlinkRate<0&&(at.cursorDiv.style.visibility="hidden")}}function ua(it){it.state.focused||(it.display.input.focus(),Vo(it))}function ga(it){it.state.delayingBlurEvent=!0,setTimeout(function(){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1,fl(it))},100)}function Vo(it,at){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1),it.options.readOnly!="nocursor"&&(it.state.focused||(Gn(it,"focus",it,at),it.state.focused=!0,Ke(it.display.wrapper,"CodeMirror-focused"),!it.curOp&&it.display.selForContextMenu!=it.doc.sel&&(it.display.input.reset(),se&&setTimeout(function(){return it.display.input.reset(!0)},20)),it.display.input.receivedFocus()),Xo(it))}function fl(it,at){it.state.delayingBlurEvent||(it.state.focused&&(Gn(it,"blur",it,at),it.state.focused=!1,Ht(it.display.wrapper,"CodeMirror-focused")),clearInterval(it.display.blinker),setTimeout(function(){it.state.focused||(it.display.shift=!1)},150))}function Br(it){for(var at=it.display,dt=at.lineDiv.offsetTop,ht=0;ht<at.view.length;ht++){var pt=at.view[ht],Lt=it.options.lineWrapping,Bt=void 0,Kt=0;if(!pt.hidden){if(Se&&Wt<8){var Zt=pt.node.offsetTop+pt.node.offsetHeight;Bt=Zt-dt,dt=Zt}else{var ne=pt.node.getBoundingClientRect();Bt=ne.bottom-ne.top,!Lt&&pt.text.firstChild&&(Kt=pt.text.firstChild.getBoundingClientRect().right-ne.left-1)}var Ie=pt.line.height-Bt;if((Ie>.005||Ie<-.005)&&(mi(pt.line,Bt),pu(pt.line),pt.rest))for(var de=0;de<pt.rest.length;de++)pu(pt.rest[de]);if(Kt>it.display.sizerWidth){var fn=Math.ceil(Kt/ss(it.display));fn>it.display.maxLineLength&&(it.display.maxLineLength=fn,it.display.maxLine=pt.line,it.display.maxLineChanged=!0)}}}}function pu(it){if(it.widgets)for(var at=0;at<it.widgets.length;++at){var dt=it.widgets[at],ht=dt.node.parentNode;ht&&(dt.height=ht.offsetHeight)}}function uo(it,at,dt){var ht=dt&&dt.top!=null?Math.max(0,dt.top):it.scroller.scrollTop;ht=Math.floor(ht-hr(it));var pt=dt&&dt.bottom!=null?dt.bottom:ht+it.wrapper.clientHeight,Lt=pn(at,ht),Bt=pn(at,pt);if(dt&&dt.ensure){var Kt=dt.ensure.from.line,Zt=dt.ensure.to.line;Kt<Lt?(Lt=Kt,Bt=pn(at,fe(pi(at,Kt))+it.wrapper.clientHeight)):Math.min(Zt,at.lastLine())>=Bt&&(Lt=pn(at,fe(pi(at,Zt))-it.wrapper.clientHeight),Bt=Zt)}return{from:Lt,to:Math.max(Bt,Lt+1)}}function Zl(it,at){if(!Si(it,"scrollCursorIntoView")){var dt=it.display,ht=dt.sizer.getBoundingClientRect(),pt=null;if(at.top+ht.top<0?pt=!0:at.bottom+ht.top>(window.innerHeight||document.documentElement.clientHeight)&&(pt=!1),pt!=null&&!Ne){var Lt=Jt("div","\u200B",null,`position: absolute;
|
|
top: `+(at.top-dt.viewOffset-hr(it.display))+`px;
|
|
height: `+(at.bottom-at.top+Cr(it)+dt.barHeight)+`px;
|
|
left: `+at.left+"px; width: "+Math.max(2,at.right-at.left)+"px;");it.display.lineSpace.appendChild(Lt),Lt.scrollIntoView(pt),it.display.lineSpace.removeChild(Lt)}}}function Qs(it,at,dt,ht){ht==null&&(ht=0);var pt;!it.options.lineWrapping&&at==dt&&(at=at.ch?_e(at.line,at.sticky=="before"?at.ch-1:at.ch,"after"):at,dt=at.sticky=="before"?_e(at.line,at.ch+1,"before"):at);for(var Lt=0;Lt<5;Lt++){var Bt=!1,Kt=Ki(it,at),Zt=!dt||dt==at?Kt:Ki(it,dt);pt={left:Math.min(Kt.left,Zt.left),top:Math.min(Kt.top,Zt.top)-ht,right:Math.max(Kt.left,Zt.left),bottom:Math.max(Kt.bottom,Zt.bottom)+ht};var ne=mu(it,pt),Ie=it.doc.scrollTop,de=it.doc.scrollLeft;if(ne.scrollTop!=null&&(gl(it,ne.scrollTop),Math.abs(it.doc.scrollTop-Ie)>1&&(Bt=!0)),ne.scrollLeft!=null&&(pl(it,ne.scrollLeft),Math.abs(it.doc.scrollLeft-de)>1&&(Bt=!0)),!Bt)break}return pt}function bl(it,at){var dt=mu(it,at);dt.scrollTop!=null&&gl(it,dt.scrollTop),dt.scrollLeft!=null&&pl(it,dt.scrollLeft)}function mu(it,at){var dt=it.display,ht=Na(it.display);at.top<0&&(at.top=0);var pt=it.curOp&&it.curOp.scrollTop!=null?it.curOp.scrollTop:dt.scroller.scrollTop,Lt=yo(it),Bt={};at.bottom-at.top>Lt&&(at.bottom=at.top+Lt);var Kt=it.doc.height+Yr(dt),Zt=at.top<ht,ne=at.bottom>Kt-ht;if(at.top<pt)Bt.scrollTop=Zt?0:at.top;else if(at.bottom>pt+Lt){var Ie=Math.min(at.top,(ne?Kt:at.bottom)-Lt);Ie!=pt&&(Bt.scrollTop=Ie)}var de=it.options.fixedGutter?0:dt.gutters.offsetWidth,fn=it.curOp&&it.curOp.scrollLeft!=null?it.curOp.scrollLeft:dt.scroller.scrollLeft-de,en=to(it)-dt.gutters.offsetWidth,gi=at.right-at.left>en;return gi&&(at.right=at.left+en),at.left<10?Bt.scrollLeft=0:at.left<fn?Bt.scrollLeft=Math.max(0,at.left+de-(gi?0:10)):at.right>en+fn-3&&(Bt.scrollLeft=at.right+(gi?0:10)-en),Bt}function vu(it,at){at!=null&&(Gs(it),it.curOp.scrollTop=(it.curOp.scrollTop==null?it.doc.scrollTop:it.curOp.scrollTop)+at)}function Hs(it){Gs(it);var at=it.getCursor();it.curOp.scrollToPos={from:at,to:at,margin:it.options.cursorScrollMargin}}function Vl(it,at,dt){(at!=null||dt!=null)&&Gs(it),at!=null&&(it.curOp.scrollLeft=at),dt!=null&&(it.curOp.scrollTop=dt)}function Ho(it,at){Gs(it),it.curOp.scrollToPos=at}function Gs(it){var at=it.curOp.scrollToPos;if(at){it.curOp.scrollToPos=null;var dt=sr(it,at.from),ht=sr(it,at.to);yu(it,dt,ht,at.margin)}}function yu(it,at,dt,ht){var pt=mu(it,{left:Math.min(at.left,dt.left),top:Math.min(at.top,dt.top)-ht,right:Math.max(at.right,dt.right),bottom:Math.max(at.bottom,dt.bottom)+ht});Vl(it,pt.scrollLeft,pt.scrollTop)}function gl(it,at){Math.abs(it.doc.scrollTop-at)<2||(Dt||fh(it,{top:at}),bu(it,at,!0),Dt&&fh(it),es(it,100))}function bu(it,at,dt){at=Math.max(0,Math.min(it.display.scroller.scrollHeight-it.display.scroller.clientHeight,at)),!(it.display.scroller.scrollTop==at&&!dt)&&(it.doc.scrollTop=at,it.display.scrollbars.setScrollTop(at),it.display.scroller.scrollTop!=at&&(it.display.scroller.scrollTop=at))}function pl(it,at,dt,ht){at=Math.max(0,Math.min(at,it.display.scroller.scrollWidth-it.display.scroller.clientWidth)),!((dt?at==it.doc.scrollLeft:Math.abs(it.doc.scrollLeft-at)<2)&&!ht)&&(it.doc.scrollLeft=at,nf(it),it.display.scroller.scrollLeft!=at&&(it.display.scroller.scrollLeft=at),it.display.scrollbars.setScrollLeft(at))}function Po(it){var at=it.display,dt=at.gutters.offsetWidth,ht=Math.round(it.doc.height+Yr(it.display));return{clientHeight:at.scroller.clientHeight,viewHeight:at.wrapper.clientHeight,scrollWidth:at.scroller.scrollWidth,clientWidth:at.scroller.clientWidth,viewWidth:at.wrapper.clientWidth,barLeft:it.options.fixedGutter?dt:0,docHeight:ht,scrollHeight:ht+Cr(it)+at.barHeight,nativeBarWidth:at.nativeBarWidth,gutterWidth:dt}}var jo=function(it,at,dt){this.cm=dt;var ht=this.vert=Jt("div",[Jt("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),pt=this.horiz=Jt("div",[Jt("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");ht.tabIndex=pt.tabIndex=-1,it(ht),it(pt),gn(ht,"scroll",function(){ht.clientHeight&&at(ht.scrollTop,"vertical")}),gn(pt,"scroll",function(){pt.clientWidth&&at(pt.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Se&&Wt<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};jo.prototype.update=function(it){var at=it.scrollWidth>it.clientWidth+1,dt=it.scrollHeight>it.clientHeight+1,ht=it.nativeBarWidth;if(dt){this.vert.style.display="block",this.vert.style.bottom=at?ht+"px":"0";var pt=it.viewHeight-(at?ht: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(at){this.horiz.style.display="block",this.horiz.style.right=dt?ht+"px":"0",this.horiz.style.left=it.barLeft+"px";var Lt=it.viewWidth-it.barLeft-(dt?ht:0);this.horiz.firstChild.style.width=Math.max(0,it.scrollWidth-it.clientWidth+Lt)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&it.clientHeight>0&&(ht==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:dt?ht:0,bottom:at?ht:0}},jo.prototype.setScrollLeft=function(it){this.horiz.scrollLeft!=it&&(this.horiz.scrollLeft=it),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},jo.prototype.setScrollTop=function(it){this.vert.scrollTop!=it&&(this.vert.scrollTop=it),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},jo.prototype.zeroWidthHack=function(){var it=ct&&!ie?"12px":"18px";this.horiz.style.height=this.vert.style.width=it,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Xt,this.disableVert=new Xt},jo.prototype.enableZeroWidthBar=function(it,at,dt){it.style.pointerEvents="auto";function ht(){var pt=it.getBoundingClientRect(),Lt=dt=="vert"?document.elementFromPoint(pt.right-1,(pt.top+pt.bottom)/2):document.elementFromPoint((pt.right+pt.left)/2,pt.bottom-1);Lt!=it?it.style.pointerEvents="none":at.set(1e3,ht)}at.set(1e3,ht)},jo.prototype.clear=function(){var it=this.horiz.parentNode;it.removeChild(this.horiz),it.removeChild(this.vert)};var wa=function(){};wa.prototype.update=function(){return{bottom:0,right:0}},wa.prototype.setScrollLeft=function(){},wa.prototype.setScrollTop=function(){},wa.prototype.clear=function(){};function qa(it,at){at||(at=Po(it));var dt=it.display.barWidth,ht=it.display.barHeight;Ka(it,at);for(var pt=0;pt<4&&dt!=it.display.barWidth||ht!=it.display.barHeight;pt++)dt!=it.display.barWidth&&it.options.lineWrapping&&Br(it),Ka(it,Po(it)),dt=it.display.barWidth,ht=it.display.barHeight}function Ka(it,at){var dt=it.display,ht=dt.scrollbars.update(at);dt.sizer.style.paddingRight=(dt.barWidth=ht.right)+"px",dt.sizer.style.paddingBottom=(dt.barHeight=ht.bottom)+"px",dt.heightForcer.style.borderBottom=ht.bottom+"px solid transparent",ht.right&&ht.bottom?(dt.scrollbarFiller.style.display="block",dt.scrollbarFiller.style.height=ht.bottom+"px",dt.scrollbarFiller.style.width=ht.right+"px"):dt.scrollbarFiller.style.display="",ht.bottom&&it.options.coverGutterNextToScrollbar&&it.options.fixedGutter?(dt.gutterFiller.style.display="block",dt.gutterFiller.style.height=ht.bottom+"px",dt.gutterFiller.style.width=at.gutterWidth+"px"):dt.gutterFiller.style.display=""}var Nl={native:jo,null:wa};function ml(it){it.display.scrollbars&&(it.display.scrollbars.clear(),it.display.scrollbars.addClass&&Ht(it.display.wrapper,it.display.scrollbars.addClass)),it.display.scrollbars=new Nl[it.options.scrollbarStyle](function(at){it.display.wrapper.insertBefore(at,it.display.scrollbarFiller),gn(at,"mousedown",function(){it.state.focused&&setTimeout(function(){return it.display.input.focus()},0)}),at.setAttribute("cm-not-content","true")},function(at,dt){dt=="horizontal"?pl(it,at):gl(it,at)},it),it.display.scrollbars.addClass&&Ke(it.display.wrapper,it.display.scrollbars.addClass)}var Ao=0;function io(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:++Ao},zi(it.curOp)}function Ha(it){var at=it.curOp;at&&cr(at,function(dt){for(var ht=0;ht<dt.ops.length;ht++)dt.ops[ht].cm.curOp=null;iu(dt)})}function iu(it){for(var at=it.ops,dt=0;dt<at.length;dt++)Fd(at[dt]);for(var ht=0;ht<at.length;ht++)hg(at[ht]);for(var pt=0;pt<at.length;pt++)tf(at[pt]);for(var Lt=0;Lt<at.length;Lt++)Ra(at[Lt]);for(var Bt=0;Bt<at.length;Bt++)Ju(at[Bt])}function Fd(it){var at=it.cm,dt=at.display;Hp(at),it.updateMaxLine&&He(at),it.mustUpdate=it.viewChanged||it.forceUpdate||it.scrollTop!=null||it.scrollToPos&&(it.scrollToPos.from.line<dt.viewFrom||it.scrollToPos.to.line>=dt.viewTo)||dt.maxLineChanged&&at.options.lineWrapping,it.update=it.mustUpdate&&new Yh(at,it.mustUpdate&&{top:it.scrollTop,ensure:it.scrollToPos},it.forceUpdate)}function hg(it){it.updatedDisplay=it.mustUpdate&&ef(it.cm,it.update)}function tf(it){var at=it.cm,dt=at.display;it.updatedDisplay&&Br(at),it.barMeasure=Po(at),dt.maxLineChanged&&!at.options.lineWrapping&&(it.adjustWidthTo=So(at,dt.maxLine,dt.maxLine.text.length).left+3,at.display.sizerWidth=it.adjustWidthTo,it.barMeasure.scrollWidth=Math.max(dt.scroller.clientWidth,dt.sizer.offsetLeft+it.adjustWidthTo+Cr(at)+at.display.barWidth),it.maxScrollLeft=Math.max(0,dt.sizer.offsetLeft+it.adjustWidthTo-to(at))),(it.updatedDisplay||it.selectionChanged)&&(it.preparedSelection=dt.input.prepareSelection())}function Ra(it){var at=it.cm;it.adjustWidthTo!=null&&(at.display.sizer.style.minWidth=it.adjustWidthTo+"px",it.maxScrollLeft<at.doc.scrollLeft&&pl(at,Math.min(at.display.scroller.scrollLeft,it.maxScrollLeft),!0),at.display.maxLineChanged=!1);var dt=it.focus&&it.focus==Re();it.preparedSelection&&at.display.input.showSelection(it.preparedSelection,dt),(it.updatedDisplay||it.startHeight!=at.doc.height)&&qa(at,it.barMeasure),it.updatedDisplay&&ph(at,it.barMeasure),it.selectionChanged&&Xo(at),at.state.focused&&it.updateInput&&at.display.input.reset(it.typing),dt&&ua(it.cm)}function Ju(it){var at=it.cm,dt=at.display,ht=at.doc;if(it.updatedDisplay&&va(at,it.update),dt.wheelStartX!=null&&(it.scrollTop!=null||it.scrollLeft!=null||it.scrollToPos)&&(dt.wheelStartX=dt.wheelStartY=null),it.scrollTop!=null&&bu(at,it.scrollTop,it.forceScroll),it.scrollLeft!=null&&pl(at,it.scrollLeft,!0,!0),it.scrollToPos){var pt=Qs(at,bi(ht,it.scrollToPos.from),bi(ht,it.scrollToPos.to),it.scrollToPos.margin);Zl(at,pt)}var Lt=it.maybeHiddenMarkers,Bt=it.maybeUnhiddenMarkers;if(Lt)for(var Kt=0;Kt<Lt.length;++Kt)Lt[Kt].lines.length||Gn(Lt[Kt],"hide");if(Bt)for(var Zt=0;Zt<Bt.length;++Zt)Bt[Zt].lines.length&&Gn(Bt[Zt],"unhide");dt.wrapper.offsetHeight&&(ht.scrollTop=at.display.scroller.scrollTop),it.changeObjs&&Gn(at,"changes",at,it.changeObjs),it.update&&it.update.finish()}function Gr(it,at){if(it.curOp)return at();io(it);try{return at()}finally{Ha(it)}}function Qr(it,at){return function(){if(it.curOp)return at.apply(it,arguments);io(it);try{return at.apply(it,arguments)}finally{Ha(it)}}}function co(it){return function(){if(this.curOp)return it.apply(this,arguments);io(this);try{return it.apply(this,arguments)}finally{Ha(this)}}}function $o(it){return function(){var at=this.cm;if(!at||at.curOp)return it.apply(this,arguments);io(at);try{return it.apply(this,arguments)}finally{Ha(at)}}}function es(it,at){it.doc.highlightFrontier<it.display.viewTo&&it.state.highlight.set(at,rn(hs,it))}function hs(it){var at=it.doc;if(!(at.highlightFrontier>=it.display.viewTo)){var dt=+new Date+it.options.workTime,ht=mo(it,at.highlightFrontier),pt=[];at.iter(ht.line,Math.min(at.first+at.size,it.display.viewTo+500),function(Lt){if(ht.line>=it.display.viewFrom){var Bt=Lt.styles,Kt=Lt.text.length>it.options.maxHighlightLength?Pi(at.mode,ht.state):null,Zt=wo(it,Lt,ht,!0);Kt&&(ht.state=Kt),Lt.styles=Zt.styles;var ne=Lt.styleClasses,Ie=Zt.classes;Ie?Lt.styleClasses=Ie:ne&&(Lt.styleClasses=null);for(var de=!Bt||Bt.length!=Lt.styles.length||ne!=Ie&&(!ne||!Ie||ne.bgClass!=Ie.bgClass||ne.textClass!=Ie.textClass),fn=0;!de&&fn<Bt.length;++fn)de=Bt[fn]!=Lt.styles[fn];de&&pt.push(ht.line),Lt.stateAfter=ht.save(),ht.nextLine()}else Lt.text.length<=it.options.maxHighlightLength&&Ve(it,Lt.text,ht),Lt.stateAfter=ht.line%5==0?ht.save():null,ht.nextLine();if(+new Date>dt)return es(it,it.options.workDelay),!0}),at.highlightFrontier=ht.line,at.modeFrontier=Math.max(at.modeFrontier,ht.line),pt.length&&Gr(it,function(){for(var Lt=0;Lt<pt.length;Lt++)no(it,pt[Lt],"text")})}}var Yh=function(it,at,dt){var ht=it.display;this.viewport=at,this.visible=uo(ht,it.doc,at),this.editorIsHidden=!ht.wrapper.offsetWidth,this.wrapperHeight=ht.wrapper.clientHeight,this.wrapperWidth=ht.wrapper.clientWidth,this.oldDisplayWidth=to(it),this.force=dt,this.dims=ts(it),this.events=[]};Yh.prototype.signal=function(it,at){Ti(it,at)&&this.events.push(arguments)},Yh.prototype.finish=function(){for(var it=0;it<this.events.length;it++)Gn.apply(null,this.events[it])};function Hp(it){var at=it.display;!at.scrollbarsClipped&&at.scroller.offsetWidth&&(at.nativeBarWidth=at.scroller.offsetWidth-at.scroller.clientWidth,at.heightForcer.style.height=Cr(it)+"px",at.sizer.style.marginBottom=-at.nativeBarWidth+"px",at.sizer.style.borderRightWidth=Cr(it)+"px",at.scrollbarsClipped=!0)}function Gp(it){if(it.hasFocus())return null;var at=Re();if(!at||!Fe(it.display.lineDiv,at))return null;var dt={activeElt:at};if(window.getSelection){var ht=window.getSelection();ht.anchorNode&&ht.extend&&Fe(it.display.lineDiv,ht.anchorNode)&&(dt.anchorNode=ht.anchorNode,dt.anchorOffset=ht.anchorOffset,dt.focusNode=ht.focusNode,dt.focusOffset=ht.focusOffset)}return dt}function ol(it){if(!(!it||!it.activeElt||it.activeElt==Re())&&(it.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(it.activeElt.nodeName)&&it.anchorNode&&Fe(document.body,it.anchorNode)&&Fe(document.body,it.focusNode))){var at=window.getSelection(),dt=document.createRange();dt.setEnd(it.anchorNode,it.anchorOffset),dt.collapse(!1),at.removeAllRanges(),at.addRange(dt),at.extend(it.focusNode,it.focusOffset)}}function ef(it,at){var dt=it.display,ht=it.doc;if(at.editorIsHidden)return fa(it),!1;if(!at.force&&at.visible.from>=dt.viewFrom&&at.visible.to<=dt.viewTo&&(dt.updateLineNumbers==null||dt.updateLineNumbers>=dt.viewTo)&&dt.renderedView==dt.view&&us(it)==0)return!1;as(it)&&(fa(it),at.dims=ts(it));var pt=ht.first+ht.size,Lt=Math.max(at.visible.from-it.options.viewportMargin,ht.first),Bt=Math.min(pt,at.visible.to+it.options.viewportMargin);dt.viewFrom<Lt&&Lt-dt.viewFrom<20&&(Lt=Math.max(ht.first,dt.viewFrom)),dt.viewTo>Bt&&dt.viewTo-Bt<20&&(Bt=Math.min(pt,dt.viewTo)),dn&&(Lt=At(it.doc,Lt),Bt=re(it.doc,Bt));var Kt=Lt!=dt.viewFrom||Bt!=dt.viewTo||dt.lastWrapHeight!=at.wrapperHeight||dt.lastWrapWidth!=at.wrapperWidth;ra(it,Lt,Bt),dt.viewOffset=fe(pi(it.doc,dt.viewFrom)),it.display.mover.style.top=dt.viewOffset+"px";var Zt=us(it);if(!Kt&&Zt==0&&!at.force&&dt.renderedView==dt.view&&(dt.updateLineNumbers==null||dt.updateLineNumbers>=dt.viewTo))return!1;var ne=Gp(it);return Zt>4&&(dt.lineDiv.style.display="none"),dg(it,dt.updateLineNumbers,at.dims),Zt>4&&(dt.lineDiv.style.display=""),dt.renderedView=dt.view,ol(ne),qt(dt.cursorDiv),qt(dt.selectionDiv),dt.gutters.style.height=dt.sizer.style.minHeight=0,Kt&&(dt.lastWrapHeight=at.wrapperHeight,dt.lastWrapWidth=at.wrapperWidth,es(it,400)),dt.updateLineNumbers=null,!0}function va(it,at){for(var dt=at.viewport,ht=!0;;ht=!1){if(!ht||!it.options.lineWrapping||at.oldDisplayWidth==to(it)){if(dt&&dt.top!=null&&(dt={top:Math.min(it.doc.height+Yr(it.display)-yo(it),dt.top)}),at.visible=uo(it.display,it.doc,dt),at.visible.from>=it.display.viewFrom&&at.visible.to<=it.display.viewTo)break}else ht&&(at.visible=uo(it.display,it.doc,dt));if(!ef(it,at))break;Br(it);var pt=Po(it);Ta(it),qa(it,pt),ph(it,pt),at.force=!1}at.signal(it,"update",it),(it.display.viewFrom!=it.display.reportedViewFrom||it.display.viewTo!=it.display.reportedViewTo)&&(at.signal(it,"viewportChange",it,it.display.viewFrom,it.display.viewTo),it.display.reportedViewFrom=it.display.viewFrom,it.display.reportedViewTo=it.display.viewTo)}function fh(it,at){var dt=new Yh(it,at);if(ef(it,dt)){Br(it),va(it,dt);var ht=Po(it);Ta(it),qa(it,ht),ph(it,ht),dt.finish()}}function dg(it,at,dt){var ht=it.display,pt=it.options.lineNumbers,Lt=ht.lineDiv,Bt=Lt.firstChild;function Kt(gi){var ki=gi.nextSibling;return se&&ct&&it.display.currentWheelTarget==gi?gi.style.display="none":gi.parentNode.removeChild(gi),ki}for(var Zt=ht.view,ne=ht.viewFrom,Ie=0;Ie<Zt.length;Ie++){var de=Zt[Ie];if(!de.hidden)if(!de.node||de.node.parentNode!=Lt){var fn=fr(it,de,ne,dt);Lt.insertBefore(fn,Bt)}else{for(;Bt!=de.node;)Bt=Kt(Bt);var en=pt&&at!=null&&at<=ne&&de.lineNumber;de.changes&&(Ue(de.changes,"gutter")>-1&&(en=!1),qi(it,de,ne,dt)),en&&(qt(de.lineNumber),de.lineNumber.appendChild(document.createTextNode(Bi(it.options,ne)))),Bt=de.node.nextSibling}ne+=de.size}for(;Bt;)Bt=Kt(Bt)}function gh(it){var at=it.gutters.offsetWidth;it.sizer.style.marginLeft=at+"px"}function ph(it,at){it.display.sizer.style.minHeight=at.docHeight+"px",it.display.heightForcer.style.top=at.docHeight+"px",it.display.gutters.style.height=at.docHeight+it.display.barHeight+Cr(it)+"px"}function nf(it){var at=it.display,dt=at.view;if(!(!at.alignWidgets&&(!at.gutters.firstChild||!it.options.fixedGutter))){for(var ht=Ws(at)-at.scroller.scrollLeft+it.doc.scrollLeft,pt=at.gutters.offsetWidth,Lt=ht+"px",Bt=0;Bt<dt.length;Bt++)if(!dt[Bt].hidden){it.options.fixedGutter&&(dt[Bt].gutter&&(dt[Bt].gutter.style.left=Lt),dt[Bt].gutterBackground&&(dt[Bt].gutterBackground.style.left=Lt));var Kt=dt[Bt].alignable;if(Kt)for(var Zt=0;Zt<Kt.length;Zt++)Kt[Zt].style.left=Lt}it.options.fixedGutter&&(at.gutters.style.left=ht+pt+"px")}}function as(it){if(!it.options.lineNumbers)return!1;var at=it.doc,dt=Bi(it.options,at.first+at.size-1),ht=it.display;if(dt.length!=ht.lineNumChars){var pt=ht.measure.appendChild(Jt("div",[Jt("div",dt)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Lt=pt.firstChild.offsetWidth,Bt=pt.offsetWidth-Lt;return ht.lineGutter.style.width="",ht.lineNumInnerWidth=Math.max(Lt,ht.lineGutter.offsetWidth-Bt)+1,ht.lineNumWidth=ht.lineNumInnerWidth+Bt,ht.lineNumChars=ht.lineNumInnerWidth?dt.length:-1,ht.lineGutter.style.width=ht.lineNumWidth+"px",gh(it.display),!0}return!1}function xs(it,at){for(var dt=[],ht=!1,pt=0;pt<it.length;pt++){var Lt=it[pt],Bt=null;if(typeof Lt!="string"&&(Bt=Lt.style,Lt=Lt.className),Lt=="CodeMirror-linenumbers")if(at)ht=!0;else continue;dt.push({className:Lt,style:Bt})}return at&&!ht&&dt.push({className:"CodeMirror-linenumbers",style:null}),dt}function Uh(it){var at=it.gutters,dt=it.gutterSpecs;qt(at),it.lineGutter=null;for(var ht=0;ht<dt.length;++ht){var pt=dt[ht],Lt=pt.className,Bt=pt.style,Kt=at.appendChild(Jt("div",null,"CodeMirror-gutter "+Lt));Bt&&(Kt.style.cssText=Bt),Lt=="CodeMirror-linenumbers"&&(it.lineGutter=Kt,Kt.style.width=(it.lineNumWidth||1)+"px")}at.style.display=dt.length?"":"none",gh(it)}function Tl(it){Uh(it.display),sa(it),nf(it)}function mh(it,at,dt,ht){var pt=this;this.input=dt,pt.scrollbarFiller=Jt("div",null,"CodeMirror-scrollbar-filler"),pt.scrollbarFiller.setAttribute("cm-not-content","true"),pt.gutterFiller=Jt("div",null,"CodeMirror-gutter-filler"),pt.gutterFiller.setAttribute("cm-not-content","true"),pt.lineDiv=ge("div",null,"CodeMirror-code"),pt.selectionDiv=Jt("div",null,null,"position: relative; z-index: 1"),pt.cursorDiv=Jt("div",null,"CodeMirror-cursors"),pt.measure=Jt("div",null,"CodeMirror-measure"),pt.lineMeasure=Jt("div",null,"CodeMirror-measure"),pt.lineSpace=ge("div",[pt.measure,pt.lineMeasure,pt.selectionDiv,pt.cursorDiv,pt.lineDiv],null,"position: relative; outline: none");var Lt=ge("div",[pt.lineSpace],"CodeMirror-lines");pt.mover=Jt("div",[Lt],null,"position: relative"),pt.sizer=Jt("div",[pt.mover],"CodeMirror-sizer"),pt.sizerWidth=null,pt.heightForcer=Jt("div",null,null,"position: absolute; height: "+Pn+"px; width: 1px;"),pt.gutters=Jt("div",null,"CodeMirror-gutters"),pt.lineGutter=null,pt.scroller=Jt("div",[pt.sizer,pt.heightForcer,pt.gutters],"CodeMirror-scroll"),pt.scroller.setAttribute("tabIndex","-1"),pt.wrapper=Jt("div",[pt.scrollbarFiller,pt.gutterFiller,pt.scroller],"CodeMirror"),Se&&Wt<8&&(pt.gutters.style.zIndex=-1,pt.scroller.style.paddingRight=0),!se&&!(Dt&&et)&&(pt.scroller.draggable=!0),it&&(it.appendChild?it.appendChild(pt.wrapper):it(pt.wrapper)),pt.viewFrom=pt.viewTo=at.first,pt.reportedViewFrom=pt.reportedViewTo=at.first,pt.view=[],pt.renderedView=null,pt.externalMeasured=null,pt.viewOffset=0,pt.lastWrapHeight=pt.lastWrapWidth=0,pt.updateLineNumbers=null,pt.nativeBarWidth=pt.barHeight=pt.barWidth=0,pt.scrollbarsClipped=!1,pt.lineNumWidth=pt.lineNumInnerWidth=pt.lineNumChars=null,pt.alignWidgets=!1,pt.cachedCharWidth=pt.cachedTextHeight=pt.cachedPaddingH=null,pt.maxLine=null,pt.maxLineLength=0,pt.maxLineChanged=!1,pt.wheelDX=pt.wheelDY=pt.wheelStartX=pt.wheelStartY=null,pt.shift=!1,pt.selForContextMenu=null,pt.activeTouch=null,pt.gutterSpecs=xs(ht.gutters,ht.lineNumbers),Uh(pt),dt.init(pt)}var vl=0,ns=null;Se?ns=-.53:Dt?ns=15:ye?ns=-.7:We&&(ns=-1/3);function Su(it){var at=it.wheelDeltaX,dt=it.wheelDeltaY;return at==null&&it.detail&&it.axis==it.HORIZONTAL_AXIS&&(at=it.detail),dt==null&&it.detail&&it.axis==it.VERTICAL_AXIS?dt=it.detail:dt==null&&(dt=it.wheelDelta),{x:at,y:dt}}function Dl(it){var at=Su(it);return at.x*=ns,at.y*=ns,at}function Ps(it,at){var dt=Su(at),ht=dt.x,pt=dt.y,Lt=it.display,Bt=Lt.scroller,Kt=Bt.scrollWidth>Bt.clientWidth,Zt=Bt.scrollHeight>Bt.clientHeight;if(ht&&Kt||pt&&Zt){if(pt&&ct&&se){t:for(var ne=at.target,Ie=Lt.view;ne!=Bt;ne=ne.parentNode)for(var de=0;de<Ie.length;de++)if(Ie[de].node==ne){it.display.currentWheelTarget=ne;break t}}if(ht&&!Dt&&!Nt&&ns!=null){pt&&Zt&&gl(it,Math.max(0,Bt.scrollTop+pt*ns)),pl(it,Math.max(0,Bt.scrollLeft+ht*ns)),(!pt||pt&&Zt)&&$i(at),Lt.wheelStartX=null;return}if(pt&&ns!=null){var fn=pt*ns,en=it.doc.scrollTop,gi=en+Lt.wrapper.clientHeight;fn<0?en=Math.max(0,en+fn-50):gi=Math.min(it.doc.height,gi+fn+50),fh(it,{top:en,bottom:gi})}vl<20&&(Lt.wheelStartX==null?(Lt.wheelStartX=Bt.scrollLeft,Lt.wheelStartY=Bt.scrollTop,Lt.wheelDX=ht,Lt.wheelDY=pt,setTimeout(function(){if(Lt.wheelStartX!=null){var ki=Bt.scrollLeft-Lt.wheelStartX,ji=Bt.scrollTop-Lt.wheelStartY,or=ji&&Lt.wheelDY&&ji/Lt.wheelDY||ki&&Lt.wheelDX&&ki/Lt.wheelDX;Lt.wheelStartX=Lt.wheelStartY=null,or&&(ns=(ns*vl+or)/(vl+1),++vl)}},200)):(Lt.wheelDX+=ht,Lt.wheelDY+=pt))}}var Kl=function(it,at){this.ranges=it,this.primIndex=at};Kl.prototype.primary=function(){return this.ranges[this.primIndex]},Kl.prototype.equals=function(it){if(it==this)return!0;if(it.primIndex!=this.primIndex||it.ranges.length!=this.ranges.length)return!1;for(var at=0;at<this.ranges.length;at++){var dt=this.ranges[at],ht=it.ranges[at];if(!$n(dt.anchor,ht.anchor)||!$n(dt.head,ht.head))return!1}return!0},Kl.prototype.deepCopy=function(){for(var it=[],at=0;at<this.ranges.length;at++)it[at]=new ya(vi(this.ranges[at].anchor),vi(this.ranges[at].head));return new Kl(it,this.primIndex)},Kl.prototype.somethingSelected=function(){for(var it=0;it<this.ranges.length;it++)if(!this.ranges[it].empty())return!0;return!1},Kl.prototype.contains=function(it,at){at||(at=it);for(var dt=0;dt<this.ranges.length;dt++){var ht=this.ranges[dt];if(un(at,ht.from())>=0&&un(it,ht.to())<=0)return dt}return-1};var ya=function(it,at){this.anchor=it,this.head=at};ya.prototype.from=function(){return Ei(this.anchor,this.head)},ya.prototype.to=function(){return Oi(this.anchor,this.head)},ya.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function ru(it,at,dt){var ht=it&&it.options.selectionsMayTouch,pt=at[dt];at.sort(function(fn,en){return un(fn.from(),en.from())}),dt=Ue(at,pt);for(var Lt=1;Lt<at.length;Lt++){var Bt=at[Lt],Kt=at[Lt-1],Zt=un(Kt.to(),Bt.from());if(ht&&!Bt.empty()?Zt>0:Zt>=0){var ne=Ei(Kt.from(),Bt.from()),Ie=Oi(Kt.to(),Bt.to()),de=Kt.empty()?Bt.from()==Bt.head:Kt.from()==Kt.head;Lt<=dt&&--dt,at.splice(--Lt,2,new ya(de?Ie:ne,de?ne:Ie))}}return new Kl(at,dt)}function Qu(it,at){return new Kl([new ya(it,at||it)],0)}function vh(it){return it.text?_e(it.from.line+it.text.length-1,ce(it.text).length+(it.text.length==1?it.from.ch:0)):it.to}function Xh(it,at){if(un(it,at.from)<0)return it;if(un(it,at.to)<=0)return vh(at);var dt=it.line+at.text.length-(at.to.line-at.from.line)-1,ht=it.ch;return it.line==at.to.line&&(ht+=vh(at).ch-at.to.ch),_e(dt,ht)}function hc(it,at){for(var dt=[],ht=0;ht<it.sel.ranges.length;ht++){var pt=it.sel.ranges[ht];dt.push(new ya(Xh(pt.anchor,at),Xh(pt.head,at)))}return ru(it.cm,dt,it.sel.primIndex)}function bd(it,at,dt){return it.line==at.line?_e(dt.line,it.ch-at.ch+dt.ch):_e(dt.line+(it.line-at.line),it.ch)}function dc(it,at,dt){for(var ht=[],pt=_e(it.first,0),Lt=pt,Bt=0;Bt<at.length;Bt++){var Kt=at[Bt],Zt=bd(Kt.from,pt,Lt),ne=bd(vh(Kt),pt,Lt);if(pt=Kt.to,Lt=ne,dt=="around"){var Ie=it.sel.ranges[Bt],de=un(Ie.head,Ie.anchor)<0;ht[Bt]=new ya(de?ne:Zt,de?Zt:ne)}else ht[Bt]=new ya(Zt,Zt)}return new Kl(ht,it.sel.primIndex)}function Go(it){it.doc.mode=$e(it.options,it.doc.modeOption),cc(it)}function cc(it){it.doc.iter(function(at){at.stateAfter&&(at.stateAfter=null),at.styles&&(at.styles=null)}),it.doc.modeFrontier=it.doc.highlightFrontier=it.doc.first,es(it,100),it.state.modeGen++,it.curOp&&sa(it)}function cg(it,at){return at.from.ch==0&&at.to.ch==0&&ce(at.text)==""&&(!it.cm||it.cm.options.wholeLineUpdateBefore)}function rf(it,at,dt,ht){function pt(Fr){return dt?dt[Fr]:null}function Lt(Fr,vr,jr){Sn(Fr,vr,jr,ht),ii(Fr,"change",Fr,at)}function Bt(Fr,vr){for(var jr=[],fo=Fr;fo<vr;++fo)jr.push(new Ye(ne[fo],pt(fo),ht));return jr}var Kt=at.from,Zt=at.to,ne=at.text,Ie=pi(it,Kt.line),de=pi(it,Zt.line),fn=ce(ne),en=pt(ne.length-1),gi=Zt.line-Kt.line;if(at.full)it.insert(0,Bt(0,ne.length)),it.remove(ne.length,it.size-ne.length);else if(cg(it,at)){var ki=Bt(0,ne.length-1);Lt(de,de.text,en),gi&&it.remove(Kt.line,gi),ki.length&&it.insert(Kt.line,ki)}else if(Ie==de)if(ne.length==1)Lt(Ie,Ie.text.slice(0,Kt.ch)+fn+Ie.text.slice(Zt.ch),en);else{var ji=Bt(1,ne.length-1);ji.push(new Ye(fn+Ie.text.slice(Zt.ch),en,ht)),Lt(Ie,Ie.text.slice(0,Kt.ch)+ne[0],pt(0)),it.insert(Kt.line+1,ji)}else if(ne.length==1)Lt(Ie,Ie.text.slice(0,Kt.ch)+ne[0]+de.text.slice(Zt.ch),pt(0)),it.remove(Kt.line+1,gi);else{Lt(Ie,Ie.text.slice(0,Kt.ch)+ne[0],pt(0)),Lt(de,fn+de.text.slice(Zt.ch),en);var or=Bt(1,ne.length-1);gi>1&&it.remove(Kt.line+1,gi-1),it.insert(Kt.line+1,or)}ii(it,"change",it,at)}function xu(it,at,dt){function ht(pt,Lt,Bt){if(pt.linked)for(var Kt=0;Kt<pt.linked.length;++Kt){var Zt=pt.linked[Kt];if(Zt.doc!=Lt){var ne=Bt&&Zt.sharedHist;dt&&!ne||(at(Zt.doc,ne),ht(Zt.doc,pt,ne))}}}ht(it,null,!0)}function of(it,at){if(at.cm)throw new Error("This document is already in use.");it.doc=at,at.cm=it,Mr(it),Go(it),fc(it),it.options.lineWrapping||He(it),it.options.mode=at.modeOption,sa(it)}function fc(it){(it.doc.direction=="rtl"?Ke:Ht)(it.display.lineDiv,"CodeMirror-rtl")}function $0(it){Gr(it,function(){fc(it),sa(it)})}function Nd(it){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=it||1}function af(it,at){var dt={from:vi(at.from),to:vh(at),text:Ze(it,at.from,at.to)};return yh(it,dt,at.from.line,at.to.line+1),xu(it,function(ht){return yh(ht,dt,at.from.line,at.to.line+1)},!0),dt}function Td(it){for(;it.length;){var at=ce(it);if(at.ranges)it.pop();else break}}function gc(it,at){if(at)return Td(it.done),ce(it.done);if(it.done.length&&!ce(it.done).ranges)return ce(it.done);if(it.done.length>1&&!it.done[it.done.length-2].ranges)return it.done.pop(),ce(it.done)}function pc(it,at,dt,ht){var pt=it.history;pt.undone.length=0;var Lt=+new Date,Bt,Kt;if((pt.lastOp==ht||pt.lastOrigin==at.origin&&at.origin&&(at.origin.charAt(0)=="+"&&pt.lastModTime>Lt-(it.cm?it.cm.options.historyEventDelay:500)||at.origin.charAt(0)=="*"))&&(Bt=gc(pt,pt.lastOp==ht)))Kt=ce(Bt.changes),un(at.from,at.to)==0&&un(at.from,Kt.to)==0?Kt.to=vh(at):Bt.changes.push(af(it,at));else{var Zt=ce(pt.done);for((!Zt||!Zt.ranges)&&Dd(it.sel,pt.done),Bt={changes:[af(it,at)],generation:pt.generation},pt.done.push(Bt);pt.done.length>pt.undoDepth;)pt.done.shift(),pt.done[0].ranges||pt.done.shift()}pt.done.push(dt),pt.generation=++pt.maxGeneration,pt.lastModTime=pt.lastSelTime=Lt,pt.lastOp=pt.lastSelOp=ht,pt.lastOrigin=pt.lastSelOrigin=at.origin,Kt||Gn(it,"historyAdded")}function fg(it,at,dt,ht){var pt=at.charAt(0);return pt=="*"||pt=="+"&&dt.ranges.length==ht.ranges.length&&dt.somethingSelected()==ht.somethingSelected()&&new Date-it.history.lastSelTime<=(it.cm?it.cm.options.historyEventDelay:500)}function mc(it,at,dt,ht){var pt=it.history,Lt=ht&&ht.origin;dt==pt.lastSelOp||Lt&&pt.lastSelOrigin==Lt&&(pt.lastModTime==pt.lastSelTime&&pt.lastOrigin==Lt||fg(it,Lt,ce(pt.done),at))?pt.done[pt.done.length-1]=at:Dd(at,pt.done),pt.lastSelTime=+new Date,pt.lastSelOrigin=Lt,pt.lastSelOp=dt,ht&&ht.clearRedo!==!1&&Td(pt.undone)}function Dd(it,at){var dt=ce(at);dt&&dt.ranges&&dt.equals(it)||at.push(it)}function yh(it,at,dt,ht){var pt=at["spans_"+it.id],Lt=0;it.iter(Math.max(it.first,dt),Math.min(it.first+it.size,ht),function(Bt){Bt.markedSpans&&((pt||(pt=at["spans_"+it.id]={}))[Lt]=Bt.markedSpans),++Lt})}function _s(it){if(!it)return null;for(var at,dt=0;dt<it.length;++dt)it[dt].marker.explicitlyCleared?at||(at=it.slice(0,dt)):at&&at.push(it[dt]);return at?at.length?at:null:it}function Nu(it,at){var dt=at["spans_"+it.id];if(!dt)return null;for(var ht=[],pt=0;pt<at.text.length;++pt)ht.push(_s(dt[pt]));return ht}function sf(it,at){var dt=Nu(it,at),ht=vo(it,at);if(!dt)return ht;if(!ht)return dt;for(var pt=0;pt<dt.length;++pt){var Lt=dt[pt],Bt=ht[pt];if(Lt&&Bt)t:for(var Kt=0;Kt<Bt.length;++Kt){for(var Zt=Bt[Kt],ne=0;ne<Lt.length;++ne)if(Lt[ne].marker==Zt.marker)continue t;Lt.push(Zt)}else Bt&&(dt[pt]=Bt)}return dt}function _u(it,at,dt){for(var ht=[],pt=0;pt<it.length;++pt){var Lt=it[pt];if(Lt.ranges){ht.push(dt?Kl.prototype.deepCopy.call(Lt):Lt);continue}var Bt=Lt.changes,Kt=[];ht.push({changes:Kt});for(var Zt=0;Zt<Bt.length;++Zt){var ne=Bt[Zt],Ie=void 0;if(Kt.push({from:ne.from,to:ne.to,text:ne.text}),at)for(var de in ne)(Ie=de.match(/^spans_(\d+)$/))&&Ue(at,Number(Ie[1]))>-1&&(ce(Kt)[de]=ne[de],delete ne[de])}}return ht}function lf(it,at,dt,ht){if(ht){var pt=it.anchor;if(dt){var Lt=un(at,pt)<0;Lt!=un(dt,pt)<0?(pt=at,at=dt):Lt!=un(at,dt)<0&&(at=dt)}return new ya(pt,at)}else return new ya(dt||at,at)}function uf(it,at,dt,ht,pt){pt==null&&(pt=it.cm&&(it.cm.display.shift||it.extend)),Zs(it,new Kl([lf(it.sel.primary(),at,dt,pt)],0),ht)}function Zp(it,at,dt){for(var ht=[],pt=it.cm&&(it.cm.display.shift||it.extend),Lt=0;Lt<it.sel.ranges.length;Lt++)ht[Lt]=lf(it.sel.ranges[Lt],at[Lt],null,pt);var Bt=ru(it.cm,ht,it.sel.primIndex);Zs(it,Bt,dt)}function Sh(it,at,dt,ht){var pt=it.sel.ranges.slice(0);pt[at]=dt,Zs(it,ru(it.cm,pt,it.sel.primIndex),ht)}function Jh(it,at,dt,ht){Zs(it,Qu(at,dt),ht)}function Vp(it,at,dt){var ht={ranges:at.ranges,update:function(pt){this.ranges=[];for(var Lt=0;Lt<pt.length;Lt++)this.ranges[Lt]=new ya(bi(it,pt[Lt].anchor),bi(it,pt[Lt].head))},origin:dt&&dt.origin};return Gn(it,"beforeSelectionChange",it,ht),it.cm&&Gn(it.cm,"beforeSelectionChange",it.cm,ht),ht.ranges!=at.ranges?ru(it.cm,ht.ranges,ht.ranges.length-1):at}function hf(it,at,dt){var ht=it.history.done,pt=ce(ht);pt&&pt.ranges?(ht[ht.length-1]=at,Qh(it,at,dt)):Zs(it,at,dt)}function Zs(it,at,dt){Qh(it,at,dt),mc(it,it.sel,it.cm?it.cm.curOp.id:NaN,dt)}function Qh(it,at,dt){(Ti(it,"beforeSelectionChange")||it.cm&&Ti(it.cm,"beforeSelectionChange"))&&(at=Vp(it,at,dt));var ht=dt&&dt.bias||(un(at.primary().head,it.sel.primary().head)<0?-1:1);gg(it,yc(it,at,ht,!0)),!(dt&&dt.scroll===!1)&&it.cm&&Hs(it.cm)}function gg(it,at){at.equals(it.sel)||(it.sel=at,it.cm&&(it.cm.curOp.updateInput=1,it.cm.curOp.selectionChanged=!0,_n(it.cm)),ii(it,"cursorActivity",it))}function vc(it){gg(it,yc(it,it.sel,null,!1))}function yc(it,at,dt,ht){for(var pt,Lt=0;Lt<at.ranges.length;Lt++){var Bt=at.ranges[Lt],Kt=at.ranges.length==it.sel.ranges.length&&it.sel.ranges[Lt],Zt=Sc(it,Bt.anchor,Kt&&Kt.anchor,dt,ht),ne=Sc(it,Bt.head,Kt&&Kt.head,dt,ht);(pt||Zt!=Bt.anchor||ne!=Bt.head)&&(pt||(pt=at.ranges.slice(0,Lt)),pt[Lt]=new ya(Zt,ne))}return pt?ru(it.cm,pt,at.primIndex):at}function qu(it,at,dt,ht,pt){var Lt=pi(it,at.line);if(Lt.markedSpans)for(var Bt=0;Bt<Lt.markedSpans.length;++Bt){var Kt=Lt.markedSpans[Bt],Zt=Kt.marker,ne="selectLeft"in Zt?!Zt.selectLeft:Zt.inclusiveLeft,Ie="selectRight"in Zt?!Zt.selectRight:Zt.inclusiveRight;if((Kt.from==null||(ne?Kt.from<=at.ch:Kt.from<at.ch))&&(Kt.to==null||(Ie?Kt.to>=at.ch:Kt.to>at.ch))){if(pt&&(Gn(Zt,"beforeCursorEnter"),Zt.explicitlyCleared))if(Lt.markedSpans){--Bt;continue}else break;if(!Zt.atomic)continue;if(dt){var de=Zt.find(ht<0?1:-1),fn=void 0;if((ht<0?Ie:ne)&&(de=pg(it,de,-ht,de&&de.line==at.line?Lt:null)),de&&de.line==at.line&&(fn=un(de,dt))&&(ht<0?fn<0:fn>0))return qu(it,de,at,ht,pt)}var en=Zt.find(ht<0?-1:1);return(ht<0?ne:Ie)&&(en=pg(it,en,ht,en.line==at.line?Lt:null)),en?qu(it,en,at,ht,pt):null}}return at}function Sc(it,at,dt,ht,pt){var Lt=ht||1,Bt=qu(it,at,dt,Lt,pt)||!pt&&qu(it,at,dt,Lt,!0)||qu(it,at,dt,-Lt,pt)||!pt&&qu(it,at,dt,-Lt,!0);return Bt||(it.cantEdit=!0,_e(it.first,0))}function pg(it,at,dt,ht){return dt<0&&at.ch==0?at.line>it.first?bi(it,_e(at.line-1)):null:dt>0&&at.ch==(ht||pi(it,at.line)).text.length?at.line<it.first+it.size-1?_e(at.line+1,0):null:new _e(at.line,at.ch+dt)}function is(it){it.setSelection(_e(it.firstLine(),0),_e(it.lastLine()),Be)}function xc(it,at,dt){var ht={canceled:!1,from:at.from,to:at.to,text:at.text,origin:at.origin,cancel:function(){return ht.canceled=!0}};return dt&&(ht.update=function(pt,Lt,Bt,Kt){pt&&(ht.from=bi(it,pt)),Lt&&(ht.to=bi(it,Lt)),Bt&&(ht.text=Bt),Kt!==void 0&&(ht.origin=Kt)}),Gn(it,"beforeChange",it,ht),it.cm&&Gn(it.cm,"beforeChange",it.cm,ht),ht.canceled?(it.cm&&(it.cm.curOp.updateInput=2),null):{from:ht.from,to:ht.to,text:ht.text,origin:ht.origin}}function xh(it,at,dt){if(it.cm){if(!it.cm.curOp)return Qr(it.cm,xh)(it,at,dt);if(it.cm.state.suppressEdits)return}if(!((Ti(it,"beforeChange")||it.cm&&Ti(it.cm,"beforeChange"))&&(at=xc(it,at,!0),!at))){var ht=Rr&&!dt&&hn(it,at.from,at.to);if(ht)for(var pt=ht.length-1;pt>=0;--pt)_h(it,{from:ht[pt].from,to:ht[pt].to,text:pt?[""]:at.text,origin:at.origin});else _h(it,at)}}function _h(it,at){if(!(at.text.length==1&&at.text[0]==""&&un(at.from,at.to)==0)){var dt=hc(it,at);pc(it,at,dt,it.cm?it.cm.curOp.id:NaN),Bd(it,at,dt,vo(it,at));var ht=[];xu(it,function(pt,Lt){!Lt&&Ue(ht,pt.history)==-1&&(vg(pt.history,at),ht.push(pt.history)),Bd(pt,at,null,vo(pt,at))})}}function Pc(it,at,dt){var ht=it.cm&&it.cm.state.suppressEdits;if(!(ht&&!dt)){for(var pt=it.history,Lt,Bt=it.sel,Kt=at=="undo"?pt.done:pt.undone,Zt=at=="undo"?pt.undone:pt.done,ne=0;ne<Kt.length&&(Lt=Kt[ne],!(dt?Lt.ranges&&!Lt.equals(it.sel):!Lt.ranges));ne++);if(ne!=Kt.length){for(pt.lastOrigin=pt.lastSelOrigin=null;;)if(Lt=Kt.pop(),Lt.ranges){if(Dd(Lt,Zt),dt&&!Lt.equals(it.sel)){Zs(it,Lt,{clearRedo:!1});return}Bt=Lt}else if(ht){Kt.push(Lt);return}else break;var Ie=[];Dd(Bt,Zt),Zt.push({changes:Ie,generation:pt.generation}),pt.generation=Lt.generation||++pt.maxGeneration;for(var de=Ti(it,"beforeChange")||it.cm&&Ti(it.cm,"beforeChange"),fn=function(ki){var ji=Lt.changes[ki];if(ji.origin=at,de&&!xc(it,ji,!1))return Kt.length=0,{};Ie.push(af(it,ji));var or=ki?hc(it,ji):ce(Kt);Bd(it,ji,or,sf(it,ji)),!ki&&it.cm&&it.cm.scrollIntoView({from:ji.from,to:vh(ji)});var Fr=[];xu(it,function(vr,jr){!jr&&Ue(Fr,vr.history)==-1&&(vg(vr.history,ji),Fr.push(vr.history)),Bd(vr,ji,null,sf(vr,ji))})},en=Lt.changes.length-1;en>=0;--en){var gi=fn(en);if(gi)return gi.v}}}}function mg(it,at){if(at!=0&&(it.first+=at,it.sel=new Kl(Nn(it.sel.ranges,function(pt){return new ya(_e(pt.anchor.line+at,pt.anchor.ch),_e(pt.head.line+at,pt.head.ch))}),it.sel.primIndex),it.cm)){sa(it.cm,it.first,it.first-at,at);for(var dt=it.cm.display,ht=dt.viewFrom;ht<dt.viewTo;ht++)no(it.cm,ht,"gutter")}}function Bd(it,at,dt,ht){if(it.cm&&!it.cm.curOp)return Qr(it.cm,Bd)(it,at,dt,ht);if(at.to.line<it.first){mg(it,at.text.length-1-(at.to.line-at.from.line));return}if(!(at.from.line>it.lastLine())){if(at.from.line<it.first){var pt=at.text.length-1-(it.first-at.from.line);mg(it,pt),at={from:_e(it.first,0),to:_e(at.to.line+pt,at.to.ch),text:[ce(at.text)],origin:at.origin}}var Lt=it.lastLine();at.to.line>Lt&&(at={from:at.from,to:_e(Lt,pi(it,Lt).text.length),text:[at.text[0]],origin:at.origin}),at.removed=Ze(it,at.from,at.to),dt||(dt=hc(it,at)),it.cm?Kp(it.cm,at,ht):rf(it,at,ht),Qh(it,dt,Be),it.cantEdit&&Sc(it,_e(it.firstLine(),0))&&(it.cantEdit=!1)}}function Kp(it,at,dt){var ht=it.doc,pt=it.display,Lt=at.from,Bt=at.to,Kt=!1,Zt=Lt.line;it.options.lineWrapping||(Zt=$t(Jn(pi(ht,Lt.line))),ht.iter(Zt,Bt.line+1,function(en){if(en==pt.maxLine)return Kt=!0,!0})),ht.sel.contains(at.from,at.to)>-1&&_n(it),rf(ht,at,dt,aa(it)),it.options.lineWrapping||(ht.iter(Zt,Lt.line+at.text.length,function(en){var gi=De(en);gi>pt.maxLineLength&&(pt.maxLine=en,pt.maxLineLength=gi,pt.maxLineChanged=!0,Kt=!1)}),Kt&&(it.curOp.updateMaxLine=!0)),Nr(ht,Lt.line),es(it,400);var ne=at.text.length-(Bt.line-Lt.line)-1;at.full?sa(it):Lt.line==Bt.line&&at.text.length==1&&!cg(it.doc,at)?no(it,Lt.line,"text"):sa(it,Lt.line,Bt.line+1,ne);var Ie=Ti(it,"changes"),de=Ti(it,"change");if(de||Ie){var fn={from:Lt,to:Bt,text:at.text,removed:at.removed,origin:at.origin};de&&ii(it,"change",it,fn),Ie&&(it.curOp.changeObjs||(it.curOp.changeObjs=[])).push(fn)}it.display.selForContextMenu=null}function qh(it,at,dt,ht,pt){var Lt;ht||(ht=dt),un(ht,dt)<0&&(Lt=[ht,dt],dt=Lt[0],ht=Lt[1]),typeof at=="string"&&(at=it.splitLines(at)),xh(it,{from:dt,to:ht,text:at,origin:pt})}function Yl(it,at,dt,ht){dt<it.line?it.line+=ht:at<it.line&&(it.line=at,it.ch=0)}function Yp(it,at,dt,ht){for(var pt=0;pt<it.length;++pt){var Lt=it[pt],Bt=!0;if(Lt.ranges){Lt.copied||(Lt=it[pt]=Lt.deepCopy(),Lt.copied=!0);for(var Kt=0;Kt<Lt.ranges.length;Kt++)Yl(Lt.ranges[Kt].anchor,at,dt,ht),Yl(Lt.ranges[Kt].head,at,dt,ht);continue}for(var Zt=0;Zt<Lt.changes.length;++Zt){var ne=Lt.changes[Zt];if(dt<ne.from.line)ne.from=_e(ne.from.line+ht,ne.from.ch),ne.to=_e(ne.to.line+ht,ne.to.ch);else if(at<=ne.to.line){Bt=!1;break}}Bt||(it.splice(0,pt+1),pt=0)}}function vg(it,at){var dt=at.from.line,ht=at.to.line,pt=at.text.length-(ht-dt)-1;Yp(it.done,dt,ht,pt),Yp(it.undone,dt,ht,pt)}function $h(it,at,dt,ht){var pt=at,Lt=at;return typeof at=="number"?Lt=pi(it,ri(it,at)):pt=$t(at),pt==null?null:(ht(Lt,pt)&&it.cm&&no(it.cm,pt,dt),Lt)}function Od(it){this.lines=it,this.parent=null;for(var at=0,dt=0;dt<it.length;++dt)it[dt].parent=this,at+=it[dt].height;this.height=at}Od.prototype={chunkSize:function(){return this.lines.length},removeInner:function(it,at){for(var dt=it,ht=it+at;dt<ht;++dt){var pt=this.lines[dt];this.height-=pt.height,xn(pt),ii(pt,"delete")}this.lines.splice(it,at)},collapse:function(it){it.push.apply(it,this.lines)},insertInner:function(it,at,dt){this.height+=dt,this.lines=this.lines.slice(0,it).concat(at).concat(this.lines.slice(it));for(var ht=0;ht<at.length;++ht)at[ht].parent=this},iterN:function(it,at,dt){for(var ht=it+at;it<ht;++it)if(dt(this.lines[it]))return!0}};function Ga(it){this.children=it;for(var at=0,dt=0,ht=0;ht<it.length;++ht){var pt=it[ht];at+=pt.chunkSize(),dt+=pt.height,pt.parent=this}this.size=at,this.height=dt,this.parent=null}Ga.prototype={chunkSize:function(){return this.size},removeInner:function(it,at){this.size-=at;for(var dt=0;dt<this.children.length;++dt){var ht=this.children[dt],pt=ht.chunkSize();if(it<pt){var Lt=Math.min(at,pt-it),Bt=ht.height;if(ht.removeInner(it,Lt),this.height-=Bt-ht.height,pt==Lt&&(this.children.splice(dt--,1),ht.parent=null),(at-=Lt)==0)break;it=0}else it-=pt}if(this.size-at<25&&(this.children.length>1||!(this.children[0]instanceof Od))){var Kt=[];this.collapse(Kt),this.children=[new Od(Kt)],this.children[0].parent=this}},collapse:function(it){for(var at=0;at<this.children.length;++at)this.children[at].collapse(it)},insertInner:function(it,at,dt){this.size+=at.length,this.height+=dt;for(var ht=0;ht<this.children.length;++ht){var pt=this.children[ht],Lt=pt.chunkSize();if(it<=Lt){if(pt.insertInner(it,at,dt),pt.lines&&pt.lines.length>50){for(var Bt=pt.lines.length%25+25,Kt=Bt;Kt<pt.lines.length;){var Zt=new Od(pt.lines.slice(Kt,Kt+=25));pt.height-=Zt.height,this.children.splice(++ht,0,Zt),Zt.parent=this}pt.lines=pt.lines.slice(0,Bt),this.maybeSpill()}break}it-=Lt}},maybeSpill:function(){if(!(this.children.length<=10)){var it=this;do{var at=it.children.splice(it.children.length-5,5),dt=new Ga(at);if(it.parent){it.size-=dt.size,it.height-=dt.height;var pt=Ue(it.parent.children,it);it.parent.children.splice(pt+1,0,dt)}else{var ht=new Ga(it.children);ht.parent=it,it.children=[ht,dt],it=ht}dt.parent=it.parent}while(it.children.length>10);it.parent.maybeSpill()}},iterN:function(it,at,dt){for(var ht=0;ht<this.children.length;++ht){var pt=this.children[ht],Lt=pt.chunkSize();if(it<Lt){var Bt=Math.min(at,Lt-it);if(pt.iterN(it,Bt,dt))return!0;if((at-=Bt)==0)break;it=0}else it-=Lt}}};var $u=function(it,at,dt){if(dt)for(var ht in dt)dt.hasOwnProperty(ht)&&(this[ht]=dt[ht]);this.doc=it,this.node=at};$u.prototype.clear=function(){var it=this.doc.cm,at=this.line.widgets,dt=this.line,ht=$t(dt);if(!(ht==null||!at)){for(var pt=0;pt<at.length;++pt)at[pt]==this&&at.splice(pt--,1);at.length||(dt.widgets=null);var Lt=Tr(this);mi(dt,Math.max(0,dt.height-Lt)),it&&(Gr(it,function(){Up(it,dt,-Lt),no(it,ht,"widget")}),ii(it,"lineWidgetCleared",it,this,ht))}},$u.prototype.changed=function(){var it=this,at=this.height,dt=this.doc.cm,ht=this.line;this.height=null;var pt=Tr(this)-at;pt&&(Ut(this.doc,ht)||mi(ht,ht.height+pt),dt&&Gr(dt,function(){dt.curOp.forceUpdate=!0,Up(dt,ht,pt),ii(dt,"lineWidgetChanged",dt,it,$t(ht))}))},Di($u);function Up(it,at,dt){fe(at)<(it.curOp&&it.curOp.scrollTop||it.doc.scrollTop)&&vu(it,dt)}function df(it,at,dt,ht){var pt=new $u(it,dt,ht),Lt=it.cm;return Lt&&pt.noHScroll&&(Lt.display.alignWidgets=!0),$h(it,at,"widget",function(Bt){var Kt=Bt.widgets||(Bt.widgets=[]);if(pt.insertAt==null?Kt.push(pt):Kt.splice(Math.min(Kt.length-1,Math.max(0,pt.insertAt)),0,pt),pt.line=Bt,Lt&&!Ut(it,Bt)){var Zt=fe(Bt)<it.scrollTop;mi(Bt,Bt.height+Tr(pt)),Zt&&vu(Lt,pt.height),Lt.curOp.forceUpdate=!0}return!0}),Lt&&ii(Lt,"lineWidgetAdded",Lt,pt,typeof at=="number"?at:$t(at)),pt}var Xp=0,ke=function(it,at){this.lines=[],this.type=at,this.doc=it,this.id=++Xp};ke.prototype.clear=function(){if(!this.explicitlyCleared){var it=this.doc.cm,at=it&&!it.curOp;if(at&&io(it),Ti(this,"clear")){var dt=this.find();dt&&ii(this,"clear",dt.from,dt.to)}for(var ht=null,pt=null,Lt=0;Lt<this.lines.length;++Lt){var Bt=this.lines[Lt],Kt=_i(Bt.markedSpans,this);it&&!this.collapsed?no(it,$t(Bt),"text"):it&&(Kt.to!=null&&(pt=$t(Bt)),Kt.from!=null&&(ht=$t(Bt))),Bt.markedSpans=xr(Bt.markedSpans,Kt),Kt.from==null&&this.collapsed&&!Ut(this.doc,Bt)&&it&&mi(Bt,Na(it.display))}if(it&&this.collapsed&&!it.options.lineWrapping)for(var Zt=0;Zt<this.lines.length;++Zt){var ne=Jn(this.lines[Zt]),Ie=De(ne);Ie>it.display.maxLineLength&&(it.display.maxLine=ne,it.display.maxLineLength=Ie,it.display.maxLineChanged=!0)}ht!=null&&it&&this.collapsed&&sa(it,ht,pt+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,it&&vc(it.doc)),it&&ii(it,"markerCleared",it,this,ht,pt),at&&Ha(it),this.parent&&this.parent.clear()}},ke.prototype.find=function(it,at){it==null&&this.type=="bookmark"&&(it=1);for(var dt,ht,pt=0;pt<this.lines.length;++pt){var Lt=this.lines[pt],Bt=_i(Lt.markedSpans,this);if(Bt.from!=null&&(dt=_e(at?Lt:$t(Lt),Bt.from),it==-1))return dt;if(Bt.to!=null&&(ht=_e(at?Lt:$t(Lt),Bt.to),it==1))return ht}return dt&&{from:dt,to:ht}},ke.prototype.changed=function(){var it=this,at=this.find(-1,!0),dt=this,ht=this.doc.cm;!at||!ht||Gr(ht,function(){var pt=at.line,Lt=$t(at.line),Bt=ca(ht,Lt);if(Bt&&(Ca(Bt),ht.curOp.selectionChanged=ht.curOp.forceUpdate=!0),ht.curOp.updateMaxLine=!0,!Ut(dt.doc,pt)&&dt.height!=null){var Kt=dt.height;dt.height=null;var Zt=Tr(dt)-Kt;Zt&&mi(pt,pt.height+Zt)}ii(ht,"markerChanged",ht,it)})},ke.prototype.attachLine=function(it){if(!this.lines.length&&this.doc.cm){var at=this.doc.cm.curOp;(!at.maybeHiddenMarkers||Ue(at.maybeHiddenMarkers,this)==-1)&&(at.maybeUnhiddenMarkers||(at.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(it)},ke.prototype.detachLine=function(it){if(this.lines.splice(Ue(this.lines,it),1),!this.lines.length&&this.doc.cm){var at=this.doc.cm.curOp;(at.maybeHiddenMarkers||(at.maybeHiddenMarkers=[])).push(this)}},Di(ke);function td(it,at,dt,ht,pt){if(ht&&ht.shared)return Jp(it,at,dt,ht,pt);if(it.cm&&!it.cm.curOp)return Qr(it.cm,td)(it,at,dt,ht,pt);var Lt=new ke(it,pt),Bt=un(at,dt);if(ht&&nn(ht,Lt,!1),Bt>0||Bt==0&&Lt.clearWhenEmpty!==!1)return Lt;if(Lt.replacedWith&&(Lt.collapsed=!0,Lt.widgetNode=ge("span",[Lt.replacedWith],"CodeMirror-widget"),ht.handleMouseEvents||Lt.widgetNode.setAttribute("cm-ignore-events","true"),ht.insertLeft&&(Lt.widgetNode.insertLeft=!0)),Lt.collapsed){if(Kn(it,at.line,at,dt,Lt)||at.line!=dt.line&&Kn(it,dt.line,at,dt,Lt))throw new Error("Inserting collapsed marker partially overlapping an existing one");cn()}Lt.addToHistory&&pc(it,{from:at,to:dt,origin:"markText"},it.sel,NaN);var Kt=at.line,Zt=it.cm,ne;if(it.iter(Kt,dt.line+1,function(de){Zt&&Lt.collapsed&&!Zt.options.lineWrapping&&Jn(de)==Zt.display.maxLine&&(ne=!0),Lt.collapsed&&Kt!=at.line&&mi(de,0),zo(de,new Ri(Lt,Kt==at.line?at.ch:null,Kt==dt.line?dt.ch:null)),++Kt}),Lt.collapsed&&it.iter(at.line,dt.line+1,function(de){Ut(it,de)&&mi(de,0)}),Lt.clearOnEnter&&gn(Lt,"beforeCursorEnter",function(){return Lt.clear()}),Lt.readOnly&&($r(),(it.history.done.length||it.history.undone.length)&&it.clearHistory()),Lt.collapsed&&(Lt.id=++Xp,Lt.atomic=!0),Zt){if(ne&&(Zt.curOp.updateMaxLine=!0),Lt.collapsed)sa(Zt,at.line,dt.line+1);else if(Lt.className||Lt.startStyle||Lt.endStyle||Lt.css||Lt.attributes||Lt.title)for(var Ie=at.line;Ie<=dt.line;Ie++)no(Zt,Ie,"text");Lt.atomic&&vc(Zt.doc),ii(Zt,"markerAdded",Zt,Lt)}return Lt}var Tu=function(it,at){this.markers=it,this.primary=at;for(var dt=0;dt<it.length;++dt)it[dt].parent=this};Tu.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var it=0;it<this.markers.length;++it)this.markers[it].clear();ii(this,"clear")}},Tu.prototype.find=function(it,at){return this.primary.find(it,at)},Di(Tu);function Jp(it,at,dt,ht,pt){ht=nn(ht),ht.shared=!1;var Lt=[td(it,at,dt,ht,pt)],Bt=Lt[0],Kt=ht.widgetNode;return xu(it,function(Zt){Kt&&(ht.widgetNode=Kt.cloneNode(!0)),Lt.push(td(Zt,bi(Zt,at),bi(Zt,dt),ht,pt));for(var ne=0;ne<Zt.linked.length;++ne)if(Zt.linked[ne].isParent)return;Bt=ce(Lt)}),new Tu(Lt,Bt)}function yg(it){return it.findMarks(_e(it.first,0),it.clipPos(_e(it.lastLine())),function(at){return at.parent})}function Qp(it,at){for(var dt=0;dt<at.length;dt++){var ht=at[dt],pt=ht.find(),Lt=it.clipPos(pt.from),Bt=it.clipPos(pt.to);if(un(Lt,Bt)){var Kt=td(it,Lt,Bt,ht.primary,ht.primary.type);ht.markers.push(Kt),Kt.parent=ht}}}function Sg(it){for(var at=function(ht){var pt=it[ht],Lt=[pt.primary.doc];xu(pt.primary.doc,function(Zt){return Lt.push(Zt)});for(var Bt=0;Bt<pt.markers.length;Bt++){var Kt=pt.markers[Bt];Ue(Lt,Kt.doc)==-1&&(Kt.parent=null,pt.markers.splice(Bt--,1))}},dt=0;dt<it.length;dt++)at(dt)}var tv=0,Ds=function(it,at,dt,ht,pt){if(!(this instanceof Ds))return new Ds(it,at,dt,ht,pt);dt==null&&(dt=0),Ga.call(this,[new Od([new Ye("",null)])]),this.first=dt,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=dt;var Lt=_e(dt,0);this.sel=Qu(Lt),this.history=new Nd(null),this.id=++tv,this.modeOption=at,this.lineSep=ht,this.direction=pt=="rtl"?"rtl":"ltr",this.extend=!1,typeof it=="string"&&(it=this.splitLines(it)),rf(this,{from:Lt,to:Lt,text:it}),Zs(this,Qu(Lt),Be)};Ds.prototype=wt(Ga.prototype,{constructor:Ds,iter:function(it,at,dt){dt?this.iterN(it-this.first,at-it,dt):this.iterN(this.first,this.first+this.size,it)},insert:function(it,at){for(var dt=0,ht=0;ht<at.length;++ht)dt+=at[ht].height;this.insertInner(it-this.first,at,dt)},remove:function(it,at){this.removeInner(it-this.first,at)},getValue:function(it){var at=je(this,this.first,this.first+this.size);return it===!1?at:at.join(it||this.lineSeparator())},setValue:$o(function(it){var at=_e(this.first,0),dt=this.first+this.size-1;xh(this,{from:at,to:_e(dt,pi(this,dt).text.length),text:this.splitLines(it),origin:"setValue",full:!0},!0),this.cm&&Vl(this.cm,0,0),Zs(this,Qu(at),Be)}),replaceRange:function(it,at,dt,ht){at=bi(this,at),dt=dt?bi(this,dt):at,qh(this,it,at,dt,ht)},getRange:function(it,at,dt){var ht=Ze(this,bi(this,it),bi(this,at));return dt===!1?ht:ht.join(dt||this.lineSeparator())},getLine:function(it){var at=this.getLineHandle(it);return at&&at.text},getLineHandle:function(it){if(ei(this,it))return pi(this,it)},getLineNumber:function(it){return $t(it)},getLineHandleVisualStart:function(it){return typeof it=="number"&&(it=pi(this,it)),Jn(it)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(it){return bi(this,it)},getCursor:function(it){var at=this.sel.primary(),dt;return it==null||it=="head"?dt=at.head:it=="anchor"?dt=at.anchor:it=="end"||it=="to"||it===!1?dt=at.to():dt=at.from(),dt},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:$o(function(it,at,dt){Jh(this,bi(this,typeof it=="number"?_e(it,at||0):it),null,dt)}),setSelection:$o(function(it,at,dt){Jh(this,bi(this,it),bi(this,at||it),dt)}),extendSelection:$o(function(it,at,dt){uf(this,bi(this,it),at&&bi(this,at),dt)}),extendSelections:$o(function(it,at){Zp(this,mr(this,it),at)}),extendSelectionsBy:$o(function(it,at){var dt=Nn(this.sel.ranges,it);Zp(this,mr(this,dt),at)}),setSelections:$o(function(it,at,dt){if(it.length){for(var ht=[],pt=0;pt<it.length;pt++)ht[pt]=new ya(bi(this,it[pt].anchor),bi(this,it[pt].head));at==null&&(at=Math.min(it.length-1,this.sel.primIndex)),Zs(this,ru(this.cm,ht,at),dt)}}),addSelection:$o(function(it,at,dt){var ht=this.sel.ranges.slice(0);ht.push(new ya(bi(this,it),bi(this,at||it))),Zs(this,ru(this.cm,ht,ht.length-1),dt)}),getSelection:function(it){for(var at=this.sel.ranges,dt,ht=0;ht<at.length;ht++){var pt=Ze(this,at[ht].from(),at[ht].to());dt=dt?dt.concat(pt):pt}return it===!1?dt:dt.join(it||this.lineSeparator())},getSelections:function(it){for(var at=[],dt=this.sel.ranges,ht=0;ht<dt.length;ht++){var pt=Ze(this,dt[ht].from(),dt[ht].to());it!==!1&&(pt=pt.join(it||this.lineSeparator())),at[ht]=pt}return at},replaceSelection:function(it,at,dt){for(var ht=[],pt=0;pt<this.sel.ranges.length;pt++)ht[pt]=it;this.replaceSelections(ht,at,dt||"+input")},replaceSelections:$o(function(it,at,dt){for(var ht=[],pt=this.sel,Lt=0;Lt<pt.ranges.length;Lt++){var Bt=pt.ranges[Lt];ht[Lt]={from:Bt.from(),to:Bt.to(),text:this.splitLines(it[Lt]),origin:dt}}for(var Kt=at&&at!="end"&&dc(this,ht,at),Zt=ht.length-1;Zt>=0;Zt--)xh(this,ht[Zt]);Kt?hf(this,Kt):this.cm&&Hs(this.cm)}),undo:$o(function(){Pc(this,"undo")}),redo:$o(function(){Pc(this,"redo")}),undoSelection:$o(function(){Pc(this,"undo",!0)}),redoSelection:$o(function(){Pc(this,"redo",!0)}),setExtending:function(it){this.extend=it},getExtending:function(){return this.extend},historySize:function(){for(var it=this.history,at=0,dt=0,ht=0;ht<it.done.length;ht++)it.done[ht].ranges||++at;for(var pt=0;pt<it.undone.length;pt++)it.undone[pt].ranges||++dt;return{undo:at,redo:dt}},clearHistory:function(){var it=this;this.history=new Nd(this.history.maxGeneration),xu(this,function(at){return at.history=it.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(it){return it&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(it){return this.history.generation==(it||this.cleanGeneration)},getHistory:function(){return{done:_u(this.history.done),undone:_u(this.history.undone)}},setHistory:function(it){var at=this.history=new Nd(this.history.maxGeneration);at.done=_u(it.done.slice(0),null,!0),at.undone=_u(it.undone.slice(0),null,!0)},setGutterMarker:$o(function(it,at,dt){return $h(this,it,"gutter",function(ht){var pt=ht.gutterMarkers||(ht.gutterMarkers={});return pt[at]=dt,!dt&&kt(pt)&&(ht.gutterMarkers=null),!0})}),clearGutter:$o(function(it){var at=this;this.iter(function(dt){dt.gutterMarkers&&dt.gutterMarkers[it]&&$h(at,dt,"gutter",function(){return dt.gutterMarkers[it]=null,kt(dt.gutterMarkers)&&(dt.gutterMarkers=null),!0})})}),lineInfo:function(it){var at;if(typeof it=="number"){if(!ei(this,it)||(at=it,it=pi(this,it),!it))return null}else if(at=$t(it),at==null)return null;return{line:at,handle:it,text:it.text,gutterMarkers:it.gutterMarkers,textClass:it.textClass,bgClass:it.bgClass,wrapClass:it.wrapClass,widgets:it.widgets}},addLineClass:$o(function(it,at,dt){return $h(this,it,at=="gutter"?"gutter":"class",function(ht){var pt=at=="text"?"textClass":at=="background"?"bgClass":at=="gutter"?"gutterClass":"wrapClass";if(!ht[pt])ht[pt]=dt;else{if(zt(dt).test(ht[pt]))return!1;ht[pt]+=" "+dt}return!0})}),removeLineClass:$o(function(it,at,dt){return $h(this,it,at=="gutter"?"gutter":"class",function(ht){var pt=at=="text"?"textClass":at=="background"?"bgClass":at=="gutter"?"gutterClass":"wrapClass",Lt=ht[pt];if(Lt)if(dt==null)ht[pt]=null;else{var Bt=Lt.match(zt(dt));if(!Bt)return!1;var Kt=Bt.index+Bt[0].length;ht[pt]=Lt.slice(0,Bt.index)+(!Bt.index||Kt==Lt.length?"":" ")+Lt.slice(Kt)||null}else return!1;return!0})}),addLineWidget:$o(function(it,at,dt){return df(this,it,at,dt)}),removeLineWidget:function(it){it.clear()},markText:function(it,at,dt){return td(this,bi(this,it),bi(this,at),dt,dt&&dt.type||"range")},setBookmark:function(it,at){var dt={replacedWith:at&&(at.nodeType==null?at.widget:at),insertLeft:at&&at.insertLeft,clearWhenEmpty:!1,shared:at&&at.shared,handleMouseEvents:at&&at.handleMouseEvents};return it=bi(this,it),td(this,it,it,dt,"bookmark")},findMarksAt:function(it){it=bi(this,it);var at=[],dt=pi(this,it.line).markedSpans;if(dt)for(var ht=0;ht<dt.length;++ht){var pt=dt[ht];(pt.from==null||pt.from<=it.ch)&&(pt.to==null||pt.to>=it.ch)&&at.push(pt.marker.parent||pt.marker)}return at},findMarks:function(it,at,dt){it=bi(this,it),at=bi(this,at);var ht=[],pt=it.line;return this.iter(it.line,at.line+1,function(Lt){var Bt=Lt.markedSpans;if(Bt)for(var Kt=0;Kt<Bt.length;Kt++){var Zt=Bt[Kt];!(Zt.to!=null&&pt==it.line&&it.ch>=Zt.to||Zt.from==null&&pt!=it.line||Zt.from!=null&&pt==at.line&&Zt.from>=at.ch)&&(!dt||dt(Zt.marker))&&ht.push(Zt.marker.parent||Zt.marker)}++pt}),ht},getAllMarks:function(){var it=[];return this.iter(function(at){var dt=at.markedSpans;if(dt)for(var ht=0;ht<dt.length;++ht)dt[ht].from!=null&&it.push(dt[ht].marker)}),it},posFromIndex:function(it){var at,dt=this.first,ht=this.lineSeparator().length;return this.iter(function(pt){var Lt=pt.text.length+ht;if(Lt>it)return at=it,!0;it-=Lt,++dt}),bi(this,_e(dt,at))},indexFromPos:function(it){it=bi(this,it);var at=it.ch;if(it.line<this.first||it.ch<0)return 0;var dt=this.lineSeparator().length;return this.iter(this.first,it.line,function(ht){at+=ht.text.length+dt}),at},copy:function(it){var at=new Ds(je(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return at.scrollTop=this.scrollTop,at.scrollLeft=this.scrollLeft,at.sel=this.sel,at.extend=!1,it&&(at.history.undoDepth=this.history.undoDepth,at.setHistory(this.getHistory())),at},linkedDoc:function(it){it||(it={});var at=this.first,dt=this.first+this.size;it.from!=null&&it.from>at&&(at=it.from),it.to!=null&&it.to<dt&&(dt=it.to);var ht=new Ds(je(this,at,dt),it.mode||this.modeOption,at,this.lineSep,this.direction);return it.sharedHist&&(ht.history=this.history),(this.linked||(this.linked=[])).push({doc:ht,sharedHist:it.sharedHist}),ht.linked=[{doc:this,isParent:!0,sharedHist:it.sharedHist}],Qp(ht,yg(this)),ht},unlinkDoc:function(it){if(it instanceof la&&(it=it.doc),this.linked)for(var at=0;at<this.linked.length;++at){var dt=this.linked[at];if(dt.doc==it){this.linked.splice(at,1),it.unlinkDoc(this),Sg(yg(this));break}}if(it.history==this.history){var ht=[it.id];xu(it,function(pt){return ht.push(pt.id)},!0),it.history=new Nd(null),it.history.done=_u(this.history.done,ht),it.history.undone=_u(this.history.undone,ht)}},iterLinkedDocs:function(it){xu(this,it)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(it){return this.lineSep?it.split(this.lineSep):ko(it)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:$o(function(it){it!="rtl"&&(it="ltr"),it!=this.direction&&(this.direction=it,this.iter(function(at){return at.order=null}),this.cm&&$0(this.cm))})}),Ds.prototype.eachLine=Ds.prototype.iter;var wc=0;function xg(it){var at=this;if($p(at),!(Si(at,it)||Dr(at.display,it))){$i(it),Se&&(wc=+new Date);var dt=Wa(at,it,!0),ht=it.dataTransfer.files;if(!(!dt||at.isReadOnly()))if(ht&&ht.length&&window.FileReader&&window.File)for(var pt=ht.length,Lt=Array(pt),Bt=0,Kt=function(){++Bt==pt&&Qr(at,function(){dt=bi(at.doc,dt);var en={from:dt,to:dt,text:at.doc.splitLines(Lt.filter(function(gi){return gi!=null}).join(at.doc.lineSeparator())),origin:"paste"};xh(at.doc,en),hf(at.doc,Qu(bi(at.doc,dt),bi(at.doc,vh(en))))})()},Zt=function(en,gi){if(at.options.allowDropFileTypes&&Ue(at.options.allowDropFileTypes,en.type)==-1){Kt();return}var ki=new FileReader;ki.onerror=function(){return Kt()},ki.onload=function(){var ji=ki.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ji)){Kt();return}Lt[gi]=ji,Kt()},ki.readAsText(en)},ne=0;ne<ht.length;ne++)Zt(ht[ne],ne);else{if(at.state.draggingText&&at.doc.sel.contains(dt)>-1){at.state.draggingText(it),setTimeout(function(){return at.display.input.focus()},20);return}try{var Ie=it.dataTransfer.getData("Text");if(Ie){var de;if(at.state.draggingText&&!at.state.draggingText.copy&&(de=at.listSelections()),Qh(at.doc,Qu(dt,dt)),de)for(var fn=0;fn<de.length;++fn)qh(at.doc,"",de[fn].anchor,de[fn].head,"drag");at.replaceSelection(Ie,"around","paste"),at.display.input.focus()}}catch(en){}}}}function _p(it,at){if(Se&&(!it.state.draggingText||+new Date-wc<100)){zr(at);return}if(!(Si(it,at)||Dr(it.display,at))&&(at.dataTransfer.setData("Text",it.getSelection()),at.dataTransfer.effectAllowed="copyMove",at.dataTransfer.setDragImage&&!We)){var dt=Jt("img",null,null,"position: fixed; left: 0; top: 0;");dt.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Nt&&(dt.width=dt.height=1,it.display.wrapper.appendChild(dt),dt._top=dt.offsetTop),at.dataTransfer.setDragImage(dt,0,0),Nt&&dt.parentNode.removeChild(dt)}}function qp(it,at){var dt=Wa(it,at);if(dt){var ht=document.createDocumentFragment();Io(it,dt,ht),it.display.dragCursor||(it.display.dragCursor=Jt("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),it.display.lineSpace.insertBefore(it.display.dragCursor,it.display.cursorDiv)),jt(it.display.dragCursor,ht)}}function $p(it){it.display.dragCursor&&(it.display.lineSpace.removeChild(it.display.dragCursor),it.display.dragCursor=null)}function tm(it){if(document.getElementsByClassName){for(var at=document.getElementsByClassName("CodeMirror"),dt=[],ht=0;ht<at.length;ht++){var pt=at[ht].CodeMirror;pt&&dt.push(pt)}dt.length&&dt[0].operation(function(){for(var Lt=0;Lt<dt.length;Lt++)it(dt[Lt])})}}var Pg=!1;function Bl(){Pg||(Id(),Pg=!0)}function Id(){var it;gn(window,"resize",function(){it==null&&(it=setTimeout(function(){it=null,tm(wg)},100))}),gn(window,"blur",function(){return tm(fl)})}function wg(it){var at=it.display;at.cachedCharWidth=at.cachedTextHeight=at.cachedPaddingH=null,at.scrollbarsClipped=!1,it.setSize()}for(var Du={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Cc=0;Cc<10;Cc++)Du[Cc+48]=Du[Cc+96]=String(Cc);for(var cf=65;cf<=90;cf++)Du[cf]=String.fromCharCode(cf);for(var Lc=1;Lc<=12;Lc++)Du[Lc+111]=Du[Lc+63235]="F"+Lc;var yl={};yl.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},yl.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},yl.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},yl.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},yl.default=ct?yl.macDefault:yl.pcDefault;function Cg(it){var at=it.split(/-(?!$)/);it=at[at.length-1];for(var dt,ht,pt,Lt,Bt=0;Bt<at.length-1;Bt++){var Kt=at[Bt];if(/^(cmd|meta|m)$/i.test(Kt))Lt=!0;else if(/^a(lt)?$/i.test(Kt))dt=!0;else if(/^(c|ctrl|control)$/i.test(Kt))ht=!0;else if(/^s(hift)?$/i.test(Kt))pt=!0;else throw new Error("Unrecognized modifier name: "+Kt)}return dt&&(it="Alt-"+it),ht&&(it="Ctrl-"+it),Lt&&(it="Cmd-"+it),pt&&(it="Shift-"+it),it}function Lg(it){var at={};for(var dt in it)if(it.hasOwnProperty(dt)){var ht=it[dt];if(/^(name|fallthrough|(de|at)tach)$/.test(dt))continue;if(ht=="..."){delete it[dt];continue}for(var pt=Nn(dt.split(" "),Cg),Lt=0;Lt<pt.length;Lt++){var Bt=void 0,Kt=void 0;Lt==pt.length-1?(Kt=pt.join(" "),Bt=ht):(Kt=pt.slice(0,Lt+1).join(" "),Bt="...");var Zt=at[Kt];if(!Zt)at[Kt]=Bt;else if(Zt!=Bt)throw new Error("Inconsistent bindings for "+Kt)}delete it[dt]}for(var ne in at)it[ne]=at[ne];return it}function Ul(it,at,dt,ht){at=ed(at);var pt=at.call?at.call(it,ht):at[it];if(pt===!1)return"nothing";if(pt==="...")return"multi";if(pt!=null&&dt(pt))return"handled";if(at.fallthrough){if(Object.prototype.toString.call(at.fallthrough)!="[object Array]")return Ul(it,at.fallthrough,dt,ht);for(var Lt=0;Lt<at.fallthrough.length;Lt++){var Bt=Ul(it,at.fallthrough[Lt],dt,ht);if(Bt)return Bt}}}function Rd(it){var at=typeof it=="string"?it:Du[it.keyCode];return at=="Ctrl"||at=="Alt"||at=="Shift"||at=="Mod"}function kg(it,at,dt){var ht=it;return at.altKey&&ht!="Alt"&&(it="Alt-"+it),(St?at.metaKey:at.ctrlKey)&&ht!="Ctrl"&&(it="Ctrl-"+it),(St?at.ctrlKey:at.metaKey)&&ht!="Mod"&&(it="Cmd-"+it),!dt&&at.shiftKey&&ht!="Shift"&&(it="Shift-"+it),it}function em(it,at){if(Nt&&it.keyCode==34&&it.char)return!1;var dt=Du[it.keyCode];return dt==null||it.altGraphKey?!1:(it.keyCode==3&&it.code&&(dt=it.code),kg(dt,it,at))}function ed(it){return typeof it=="string"?yl[it]:it}function Sl(it,at){for(var dt=it.doc.sel.ranges,ht=[],pt=0;pt<dt.length;pt++){for(var Lt=at(dt[pt]);ht.length&&un(Lt.from,ce(ht).to)<=0;){var Bt=ht.pop();if(un(Bt.from,Lt.from)<0){Lt.from=Bt.from;break}}ht.push(Lt)}Gr(it,function(){for(var Kt=ht.length-1;Kt>=0;Kt--)qh(it.doc,"",ht[Kt].from,ht[Kt].to,"+delete");Hs(it)})}function Mg(it,at,dt){var ht=Le(it.text,at+dt,dt);return ht<0||ht>it.text.length?null:ht}function rs(it,at,dt){var ht=Mg(it,at.ch,dt);return ht==null?null:new _e(at.line,ht,dt<0?"after":"before")}function kc(it,at,dt,ht,pt){if(it){at.doc.direction=="rtl"&&(pt=-pt);var Lt=kn(dt,at.doc.direction);if(Lt){var Bt=pt<0?ce(Lt):Lt[0],Kt=pt<0==(Bt.level==1),Zt=Kt?"after":"before",ne;if(Bt.level>0||at.doc.direction=="rtl"){var Ie=Lo(at,dt);ne=pt<0?dt.text.length-1:0;var de=Yo(at,Ie,ne).top;ne=on(function(fn){return Yo(at,Ie,fn).top==de},pt<0==(Bt.level==1)?Bt.from:Bt.to-1,ne),Zt=="before"&&(ne=Mg(dt,ne,1))}else ne=pt<0?Bt.to:Bt.from;return new _e(ht,ne,Zt)}}return new _e(ht,pt<0?dt.text.length:0,pt<0?"before":"after")}function ff(it,at,dt,ht){var pt=kn(at,it.doc.direction);if(!pt)return rs(at,dt,ht);dt.ch>=at.text.length?(dt.ch=at.text.length,dt.sticky="before"):dt.ch<=0&&(dt.ch=0,dt.sticky="after");var Lt=Ee(pt,dt.ch,dt.sticky),Bt=pt[Lt];if(it.doc.direction=="ltr"&&Bt.level%2==0&&(ht>0?Bt.to>dt.ch:Bt.from<dt.ch))return rs(at,dt,ht);var Kt=function(or,Fr){return Mg(at,or instanceof _e?or.ch:or,Fr)},Zt,ne=function(or){return it.options.lineWrapping?(Zt=Zt||Lo(it,at),ia(it,at,Zt,or)):{begin:0,end:at.text.length}},Ie=ne(dt.sticky=="before"?Kt(dt,-1):dt.ch);if(it.doc.direction=="rtl"||Bt.level==1){var de=Bt.level==1==ht<0,fn=Kt(dt,de?1:-1);if(fn!=null&&(de?fn<=Bt.to&&fn<=Ie.end:fn>=Bt.from&&fn>=Ie.begin)){var en=de?"before":"after";return new _e(dt.line,fn,en)}}var gi=function(or,Fr,vr){for(var jr=function(Da,ms){return ms?new _e(dt.line,Kt(Da,1),"before"):new _e(dt.line,Da,"after")};or>=0&&or<pt.length;or+=Fr){var fo=pt[or],pr=Fr>0==(fo.level!=1),Zo=pr?vr.begin:Kt(vr.end,-1);if(fo.from<=Zo&&Zo<fo.to||(Zo=pr?fo.from:Kt(fo.to,-1),vr.begin<=Zo&&Zo<vr.end))return jr(Zo,pr)}},ki=gi(Lt+ht,ht,Ie);if(ki)return ki;var ji=ht>0?Ie.end:Kt(Ie.begin,-1);return ji!=null&&!(ht>0&&ji==at.text.length)&&(ki=gi(ht>0?0:pt.length-1,ht,ne(ji)),ki)?ki:null}var Ph={selectAll:is,singleSelection:function(it){return it.setSelection(it.getCursor("anchor"),it.getCursor("head"),Be)},killLine:function(it){return Sl(it,function(at){if(at.empty()){var dt=pi(it.doc,at.head.line).text.length;return at.head.ch==dt&&at.head.line<it.lastLine()?{from:at.head,to:_e(at.head.line+1,0)}:{from:at.head,to:_e(at.head.line,dt)}}else return{from:at.from(),to:at.to()}})},deleteLine:function(it){return Sl(it,function(at){return{from:_e(at.from().line,0),to:bi(it.doc,_e(at.to().line+1,0))}})},delLineLeft:function(it){return Sl(it,function(at){return{from:_e(at.from().line,0),to:at.from()}})},delWrappedLineLeft:function(it){return Sl(it,function(at){var dt=it.charCoords(at.head,"div").top+5,ht=it.coordsChar({left:0,top:dt},"div");return{from:ht,to:at.from()}})},delWrappedLineRight:function(it){return Sl(it,function(at){var dt=it.charCoords(at.head,"div").top+5,ht=it.coordsChar({left:it.display.lineDiv.offsetWidth+100,top:dt},"div");return{from:at.from(),to:ht}})},undo:function(it){return it.undo()},redo:function(it){return it.redo()},undoSelection:function(it){return it.undoSelection()},redoSelection:function(it){return it.redoSelection()},goDocStart:function(it){return it.extendSelection(_e(it.firstLine(),0))},goDocEnd:function(it){return it.extendSelection(_e(it.lastLine()))},goLineStart:function(it){return it.extendSelectionsBy(function(at){return zd(it,at.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(it){return it.extendSelectionsBy(function(at){return Eg(it,at.head)},{origin:"+move",bias:1})},goLineEnd:function(it){return it.extendSelectionsBy(function(at){return jd(it,at.head.line)},{origin:"+move",bias:-1})},goLineRight:function(it){return it.extendSelectionsBy(function(at){var dt=it.cursorCoords(at.head,"div").top+5;return it.coordsChar({left:it.display.lineDiv.offsetWidth+100,top:dt},"div")},Je)},goLineLeft:function(it){return it.extendSelectionsBy(function(at){var dt=it.cursorCoords(at.head,"div").top+5;return it.coordsChar({left:0,top:dt},"div")},Je)},goLineLeftSmart:function(it){return it.extendSelectionsBy(function(at){var dt=it.cursorCoords(at.head,"div").top+5,ht=it.coordsChar({left:0,top:dt},"div");return ht.ch<it.getLine(ht.line).search(/\S/)?Eg(it,at.head):ht},Je)},goLineUp:function(it){return it.moveV(-1,"line")},goLineDown:function(it){return it.moveV(1,"line")},goPageUp:function(it){return it.moveV(-1,"page")},goPageDown:function(it){return it.moveV(1,"page")},goCharLeft:function(it){return it.moveH(-1,"char")},goCharRight:function(it){return it.moveH(1,"char")},goColumnLeft:function(it){return it.moveH(-1,"column")},goColumnRight:function(it){return it.moveH(1,"column")},goWordLeft:function(it){return it.moveH(-1,"word")},goGroupRight:function(it){return it.moveH(1,"group")},goGroupLeft:function(it){return it.moveH(-1,"group")},goWordRight:function(it){return it.moveH(1,"word")},delCharBefore:function(it){return it.deleteH(-1,"codepoint")},delCharAfter:function(it){return it.deleteH(1,"char")},delWordBefore:function(it){return it.deleteH(-1,"word")},delWordAfter:function(it){return it.deleteH(1,"word")},delGroupBefore:function(it){return it.deleteH(-1,"group")},delGroupAfter:function(it){return it.deleteH(1,"group")},indentAuto:function(it){return it.indentSelection("smart")},indentMore:function(it){return it.indentSelection("add")},indentLess:function(it){return it.indentSelection("subtract")},insertTab:function(it){return it.replaceSelection(" ")},insertSoftTab:function(it){for(var at=[],dt=it.listSelections(),ht=it.options.tabSize,pt=0;pt<dt.length;pt++){var Lt=dt[pt].from(),Bt=me(it.getLine(Lt.line),Lt.ch,ht);at.push(sn(ht-Bt%ht))}it.replaceSelections(at)},defaultTab:function(it){it.somethingSelected()?it.indentSelection("add"):it.execCommand("insertTab")},transposeChars:function(it){return Gr(it,function(){for(var at=it.listSelections(),dt=[],ht=0;ht<at.length;ht++)if(at[ht].empty()){var pt=at[ht].head,Lt=pi(it.doc,pt.line).text;if(Lt){if(pt.ch==Lt.length&&(pt=new _e(pt.line,pt.ch-1)),pt.ch>0)pt=new _e(pt.line,pt.ch+1),it.replaceRange(Lt.charAt(pt.ch-1)+Lt.charAt(pt.ch-2),_e(pt.line,pt.ch-2),pt,"+transpose");else if(pt.line>it.doc.first){var Bt=pi(it.doc,pt.line-1).text;Bt&&(pt=new _e(pt.line,1),it.replaceRange(Lt.charAt(0)+it.doc.lineSeparator()+Bt.charAt(Bt.length-1),_e(pt.line-1,Bt.length-1),pt,"+transpose"))}}dt.push(new ya(pt,pt))}it.setSelections(dt)})},newlineAndIndent:function(it){return Gr(it,function(){for(var at=it.listSelections(),dt=at.length-1;dt>=0;dt--)it.replaceRange(it.doc.lineSeparator(),at[dt].anchor,at[dt].head,"+input");at=it.listSelections();for(var ht=0;ht<at.length;ht++)it.indentLine(at[ht].from().line,null,!0);Hs(it)})},openLine:function(it){return it.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(it){return it.toggleOverwrite()}};function zd(it,at){var dt=pi(it.doc,at),ht=Jn(dt);return ht!=dt&&(at=$t(ht)),kc(!0,it,ht,at,1)}function jd(it,at){var dt=pi(it.doc,at),ht=Qn(dt);return ht!=dt&&(at=$t(ht)),kc(!0,it,dt,at,-1)}function Eg(it,at){var dt=zd(it,at.line),ht=pi(it.doc,dt.line),pt=kn(ht,it.doc.direction);if(!pt||pt[0].level==0){var Lt=Math.max(dt.ch,ht.text.search(/\S/)),Bt=at.line==dt.line&&at.ch<=Lt&&at.ch;return _e(dt.line,Bt?0:Lt,dt.sticky)}return dt}function Wd(it,at,dt){if(typeof at=="string"&&(at=Ph[at],!at))return!1;it.display.input.ensurePolled();var ht=it.display.shift,pt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),dt&&(it.display.shift=!1),pt=at(it)!=Yn}finally{it.display.shift=ht,it.state.suppressEdits=!1}return pt}function Ag(it,at,dt){for(var ht=0;ht<it.state.keyMaps.length;ht++){var pt=Ul(at,it.state.keyMaps[ht],dt,it);if(pt)return pt}return it.options.extraKeys&&Ul(at,it.options.extraKeys,dt,it)||Ul(at,it.options.keyMap,dt,it)}var Bu=new Xt;function nd(it,at,dt,ht){var pt=it.state.keySeq;if(pt){if(Rd(at))return"handled";if(/\'$/.test(at)?it.state.keySeq=null:Bu.set(50,function(){it.state.keySeq==pt&&(it.state.keySeq=null,it.display.input.reset())}),gf(it,pt+" "+at,dt,ht))return!0}return gf(it,at,dt,ht)}function gf(it,at,dt,ht){var pt=Ag(it,at,ht);return pt=="multi"&&(it.state.keySeq=at),pt=="handled"&&ii(it,"keyHandled",it,at,dt),(pt=="handled"||pt=="multi")&&($i(dt),Xo(it)),!!pt}function pf(it,at){var dt=em(at,!0);return dt?at.shiftKey&&!it.state.keySeq?nd(it,"Shift-"+dt,at,function(ht){return Wd(it,ht,!0)})||nd(it,dt,at,function(ht){if(typeof ht=="string"?/^go[A-Z]/.test(ht):ht.motion)return Wd(it,ht)}):nd(it,dt,at,function(ht){return Wd(it,ht)}):!1}function mf(it,at,dt){return nd(it,"'"+dt+"'",at,function(ht){return Wd(it,ht,!0)})}var id=null;function Fg(it){var at=this;if(!(it.target&&it.target!=at.display.input.getField())&&(at.curOp.focus=Re(),!Si(at,it))){Se&&Wt<11&&it.keyCode==27&&(it.returnValue=!1);var dt=it.keyCode;at.display.shift=dt==16||it.shiftKey;var ht=pf(at,it);Nt&&(id=ht?dt:null,!ht&&dt==88&&!Zn&&(ct?it.metaKey:it.ctrlKey)&&at.replaceSelection("",null,"cut")),Dt&&!ct&&!ht&&dt==46&&it.shiftKey&&!it.ctrlKey&&document.execCommand&&document.execCommand("cut"),dt==18&&!/\bCodeMirror-crosshair\b/.test(at.display.lineDiv.className)&&bg(at)}}function bg(it){var at=it.display.lineDiv;Ke(at,"CodeMirror-crosshair");function dt(ht){(ht.keyCode==18||!ht.altKey)&&(Ht(at,"CodeMirror-crosshair"),xi(document,"keyup",dt),xi(document,"mouseover",dt))}gn(document,"keyup",dt),gn(document,"mouseover",dt)}function Ng(it){it.keyCode==16&&(this.doc.sel.shift=!1),Si(this,it)}function Pu(it){var at=this;if(!(it.target&&it.target!=at.display.input.getField())&&!(Dr(at.display,it)||Si(at,it)||it.ctrlKey&&!it.altKey||ct&&it.metaKey)){var dt=it.keyCode,ht=it.charCode;if(Nt&&dt==id){id=null,$i(it);return}if(!(Nt&&(!it.which||it.which<10)&&pf(at,it))){var pt=String.fromCharCode(ht==null?dt:ht);pt!="\b"&&(mf(at,it,pt)||at.display.input.onKeyPress(it))}}}var nm=400,Tg=function(it,at,dt){this.time=it,this.pos=at,this.button=dt};Tg.prototype.compare=function(it,at,dt){return this.time+nm>it&&un(at,this.pos)==0&&dt==this.button};var Hd,rd;function Dg(it,at){var dt=+new Date;return rd&&rd.compare(dt,it,at)?(Hd=rd=null,"triple"):Hd&&Hd.compare(dt,it,at)?(rd=new Tg(dt,it,at),Hd=null,"double"):(Hd=new Tg(dt,it,at),rd=null,"single")}function wu(it){var at=this,dt=at.display;if(!(Si(at,it)||dt.activeTouch&&dt.input.supportsTouch())){if(dt.input.ensurePolled(),dt.shift=it.shiftKey,Dr(dt,it)){se||(dt.scroller.draggable=!1,setTimeout(function(){return dt.scroller.draggable=!0},100));return}if(!Sf(at,it)){var ht=Wa(at,it),pt=po(it),Lt=ht?Dg(ht,pt):"single";window.focus(),pt==1&&at.state.selectingText&&at.state.selectingText(it),!(ht&&Bg(at,pt,ht,Lt,it))&&(pt==1?ht?im(at,ht,Lt,it):so(it)==dt.scroller&&$i(it):pt==2?(ht&&uf(at.doc,ht),setTimeout(function(){return dt.input.focus()},20)):pt==3&&(Mt?at.display.input.onContextMenu(it):ga(at)))}}}function Bg(it,at,dt,ht,pt){var Lt="Click";return ht=="double"?Lt="Double"+Lt:ht=="triple"&&(Lt="Triple"+Lt),Lt=(at==1?"Left":at==2?"Middle":"Right")+Lt,nd(it,kg(Lt,pt),pt,function(Bt){if(typeof Bt=="string"&&(Bt=Ph[Bt]),!Bt)return!1;var Kt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),Kt=Bt(it,dt)!=Yn}finally{it.state.suppressEdits=!1}return Kt})}function vf(it,at,dt){var ht=it.getOption("configureMouse"),pt=ht?ht(it,at,dt):{};if(pt.unit==null){var Lt=lt?dt.shiftKey&&dt.metaKey:dt.altKey;pt.unit=Lt?"rectangle":at=="single"?"char":at=="double"?"word":"line"}return(pt.extend==null||it.doc.extend)&&(pt.extend=it.doc.extend||dt.shiftKey),pt.addNew==null&&(pt.addNew=ct?dt.metaKey:dt.ctrlKey),pt.moveOnDrag==null&&(pt.moveOnDrag=!(ct?dt.altKey:dt.ctrlKey)),pt}function im(it,at,dt,ht){Se?setTimeout(rn(ua,it),0):it.curOp.focus=Re();var pt=vf(it,dt,ht),Lt=it.doc.sel,Bt;it.options.dragDrop&&Jr&&!it.isReadOnly()&&dt=="single"&&(Bt=Lt.contains(at))>-1&&(un((Bt=Lt.ranges[Bt]).from(),at)<0||at.xRel>0)&&(un(Bt.to(),at)>0||at.xRel<0)?Og(it,ht,at,pt):ev(it,ht,at,pt)}function Og(it,at,dt,ht){var pt=it.display,Lt=!1,Bt=Qr(it,function(ne){se&&(pt.scroller.draggable=!1),it.state.draggingText=!1,xi(pt.wrapper.ownerDocument,"mouseup",Bt),xi(pt.wrapper.ownerDocument,"mousemove",Kt),xi(pt.scroller,"dragstart",Zt),xi(pt.scroller,"drop",Bt),Lt||($i(ne),ht.addNew||uf(it.doc,dt,null,null,ht.extend),se&&!We||Se&&Wt==9?setTimeout(function(){pt.wrapper.ownerDocument.body.focus({preventScroll:!0}),pt.input.focus()},20):pt.input.focus())}),Kt=function(ne){Lt=Lt||Math.abs(at.clientX-ne.clientX)+Math.abs(at.clientY-ne.clientY)>=10},Zt=function(){return Lt=!0};se&&(pt.scroller.draggable=!0),it.state.draggingText=Bt,Bt.copy=!ht.moveOnDrag,pt.scroller.dragDrop&&pt.scroller.dragDrop(),gn(pt.wrapper.ownerDocument,"mouseup",Bt),gn(pt.wrapper.ownerDocument,"mousemove",Kt),gn(pt.scroller,"dragstart",Zt),gn(pt.scroller,"drop",Bt),ga(it),setTimeout(function(){return pt.input.focus()},20)}function Ig(it,at,dt){if(dt=="char")return new ya(at,at);if(dt=="word")return it.findWordAt(at);if(dt=="line")return new ya(_e(at.line,0),bi(it.doc,_e(at.line+1,0)));var ht=dt(it,at);return new ya(ht.from,ht.to)}function ev(it,at,dt,ht){var pt=it.display,Lt=it.doc;$i(at);var Bt,Kt,Zt=Lt.sel,ne=Zt.ranges;if(ht.addNew&&!ht.extend?(Kt=Lt.sel.contains(dt),Kt>-1?Bt=ne[Kt]:Bt=new ya(dt,dt)):(Bt=Lt.sel.primary(),Kt=Lt.sel.primIndex),ht.unit=="rectangle")ht.addNew||(Bt=new ya(dt,dt)),dt=Wa(it,at,!0,!0),Kt=-1;else{var Ie=Ig(it,dt,ht.unit);ht.extend?Bt=lf(Bt,Ie.anchor,Ie.head,ht.extend):Bt=Ie}ht.addNew?Kt==-1?(Kt=ne.length,Zs(Lt,ru(it,ne.concat([Bt]),Kt),{scroll:!1,origin:"*mouse"})):ne.length>1&&ne[Kt].empty()&&ht.unit=="char"&&!ht.extend?(Zs(Lt,ru(it,ne.slice(0,Kt).concat(ne.slice(Kt+1)),0),{scroll:!1,origin:"*mouse"}),Zt=Lt.sel):Sh(Lt,Kt,Bt,vn):(Kt=0,Zs(Lt,new Kl([Bt],0),vn),Zt=Lt.sel);var de=dt;function fn(vr){if(un(de,vr)!=0)if(de=vr,ht.unit=="rectangle"){for(var jr=[],fo=it.options.tabSize,pr=me(pi(Lt,dt.line).text,dt.ch,fo),Zo=me(pi(Lt,vr.line).text,vr.ch,fo),Da=Math.min(pr,Zo),ms=Math.max(pr,Zo),Za=Math.min(dt.line,vr.line),sl=Math.min(it.lastLine(),Math.max(dt.line,vr.line));Za<=sl;Za++){var Vs=pi(Lt,Za).text,cs=An(Vs,Da,fo);Da==ms?jr.push(new ya(_e(Za,cs),_e(Za,cs))):Vs.length>cs&&jr.push(new ya(_e(Za,cs),_e(Za,An(Vs,ms,fo))))}jr.length||jr.push(new ya(dt,dt)),Zs(Lt,ru(it,Zt.ranges.slice(0,Kt).concat(jr),Kt),{origin:"*mouse",scroll:!1}),it.scrollIntoView(vr)}else{var xl=Bt,Bs=Ig(it,vr,ht.unit),fs=xl.anchor,ha;un(Bs.anchor,fs)>0?(ha=Bs.head,fs=Ei(xl.from(),Bs.anchor)):(ha=Bs.anchor,fs=Oi(xl.to(),Bs.head));var Ya=Zt.ranges.slice(0);Ya[Kt]=rm(it,new ya(bi(Lt,fs),ha)),Zs(Lt,ru(it,Ya,Kt),vn)}}var en=pt.wrapper.getBoundingClientRect(),gi=0;function ki(vr){var jr=++gi,fo=Wa(it,vr,!0,ht.unit=="rectangle");if(fo)if(un(fo,de)!=0){it.curOp.focus=Re(),fn(fo);var pr=uo(pt,Lt);(fo.line>=pr.to||fo.line<pr.from)&&setTimeout(Qr(it,function(){gi==jr&&ki(vr)}),150)}else{var Zo=vr.clientY<en.top?-20:vr.clientY>en.bottom?20:0;Zo&&setTimeout(Qr(it,function(){gi==jr&&(pt.scroller.scrollTop+=Zo,ki(vr))}),50)}}function ji(vr){it.state.selectingText=!1,gi=1/0,vr&&($i(vr),pt.input.focus()),xi(pt.wrapper.ownerDocument,"mousemove",or),xi(pt.wrapper.ownerDocument,"mouseup",Fr),Lt.history.lastSelOrigin=null}var or=Qr(it,function(vr){vr.buttons===0||!po(vr)?ji(vr):ki(vr)}),Fr=Qr(it,ji);it.state.selectingText=Fr,gn(pt.wrapper.ownerDocument,"mousemove",or),gn(pt.wrapper.ownerDocument,"mouseup",Fr)}function rm(it,at){var dt=at.anchor,ht=at.head,pt=pi(it.doc,dt.line);if(un(dt,ht)==0&&dt.sticky==ht.sticky)return at;var Lt=kn(pt);if(!Lt)return at;var Bt=Ee(Lt,dt.ch,dt.sticky),Kt=Lt[Bt];if(Kt.from!=dt.ch&&Kt.to!=dt.ch)return at;var Zt=Bt+(Kt.from==dt.ch==(Kt.level!=1)?0:1);if(Zt==0||Zt==Lt.length)return at;var ne;if(ht.line!=dt.line)ne=(ht.line-dt.line)*(it.doc.direction=="ltr"?1:-1)>0;else{var Ie=Ee(Lt,ht.ch,ht.sticky),de=Ie-Bt||(ht.ch-dt.ch)*(Kt.level==1?-1:1);Ie==Zt-1||Ie==Zt?ne=de<0:ne=de>0}var fn=Lt[Zt+(ne?-1:0)],en=ne==(fn.level==1),gi=en?fn.from:fn.to,ki=en?"after":"before";return dt.ch==gi&&dt.sticky==ki?at:new ya(new _e(dt.line,gi,ki),ht)}function yf(it,at,dt,ht){var pt,Lt;if(at.touches)pt=at.touches[0].clientX,Lt=at.touches[0].clientY;else try{pt=at.clientX,Lt=at.clientY}catch(fn){return!1}if(pt>=Math.floor(it.display.gutters.getBoundingClientRect().right))return!1;ht&&$i(at);var Bt=it.display,Kt=Bt.lineDiv.getBoundingClientRect();if(Lt>Kt.bottom||!Ti(it,dt))return Xi(at);Lt-=Kt.top-Bt.viewOffset;for(var Zt=0;Zt<it.display.gutterSpecs.length;++Zt){var ne=Bt.gutters.childNodes[Zt];if(ne&&ne.getBoundingClientRect().right>=pt){var Ie=pn(it.doc,Lt),de=it.display.gutterSpecs[Zt];return Gn(it,dt,it,Ie,de.className,at),Xi(at)}}}function Sf(it,at){return yf(it,at,"gutterClick",!0)}function xf(it,at){Dr(it.display,at)||om(it,at)||Si(it,at,"contextmenu")||Mt||it.display.input.onContextMenu(at)}function om(it,at){return Ti(it,"gutterContextMenu")?yf(it,at,"gutterContextMenu",!1):!1}function Pf(it){it.display.wrapper.className=it.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+it.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ia(it)}var wh={toString:function(){return"CodeMirror.Init"}},Rg={},Mc={};function am(it){var at=it.optionHandlers;function dt(ht,pt,Lt,Bt){it.defaults[ht]=pt,Lt&&(at[ht]=Bt?function(Kt,Zt,ne){ne!=wh&&Lt(Kt,Zt,ne)}:Lt)}it.defineOption=dt,it.Init=wh,dt("value","",function(ht,pt){return ht.setValue(pt)},!0),dt("mode",null,function(ht,pt){ht.doc.modeOption=pt,Go(ht)},!0),dt("indentUnit",2,Go,!0),dt("indentWithTabs",!1),dt("smartIndent",!0),dt("tabSize",4,function(ht){cc(ht),Ia(ht),sa(ht)},!0),dt("lineSeparator",null,function(ht,pt){if(ht.doc.lineSep=pt,!!pt){var Lt=[],Bt=ht.doc.first;ht.doc.iter(function(Zt){for(var ne=0;;){var Ie=Zt.text.indexOf(pt,ne);if(Ie==-1)break;ne=Ie+pt.length,Lt.push(_e(Bt,Ie))}Bt++});for(var Kt=Lt.length-1;Kt>=0;Kt--)qh(ht.doc,pt,Lt[Kt],_e(Lt[Kt].line,Lt[Kt].ch+pt.length))}}),dt("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(ht,pt,Lt){ht.state.specialChars=new RegExp(pt.source+(pt.test(" ")?"":"| "),"g"),Lt!=wh&&ht.refresh()}),dt("specialCharPlaceholder",En,function(ht){return ht.refresh()},!0),dt("electricChars",!0),dt("inputStyle",et?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),dt("spellcheck",!1,function(ht,pt){return ht.getInputField().spellcheck=pt},!0),dt("autocorrect",!1,function(ht,pt){return ht.getInputField().autocorrect=pt},!0),dt("autocapitalize",!1,function(ht,pt){return ht.getInputField().autocapitalize=pt},!0),dt("rtlMoveVisually",!gt),dt("wholeLineUpdateBefore",!0),dt("theme","default",function(ht){Pf(ht),Tl(ht)},!0),dt("keyMap","default",function(ht,pt,Lt){var Bt=ed(pt),Kt=Lt!=wh&&ed(Lt);Kt&&Kt.detach&&Kt.detach(ht,Bt),Bt.attach&&Bt.attach(ht,Kt||null)}),dt("extraKeys",null),dt("configureMouse",null),dt("lineWrapping",!1,sm,!0),dt("gutters",[],function(ht,pt){ht.display.gutterSpecs=xs(pt,ht.options.lineNumbers),Tl(ht)},!0),dt("fixedGutter",!0,function(ht,pt){ht.display.gutters.style.left=pt?Ws(ht.display)+"px":"0",ht.refresh()},!0),dt("coverGutterNextToScrollbar",!1,function(ht){return qa(ht)},!0),dt("scrollbarStyle","native",function(ht){ml(ht),qa(ht),ht.display.scrollbars.setScrollTop(ht.doc.scrollTop),ht.display.scrollbars.setScrollLeft(ht.doc.scrollLeft)},!0),dt("lineNumbers",!1,function(ht,pt){ht.display.gutterSpecs=xs(ht.options.gutters,pt),Tl(ht)},!0),dt("firstLineNumber",1,Tl,!0),dt("lineNumberFormatter",function(ht){return ht},Tl,!0),dt("showCursorWhenSelecting",!1,Ta,!0),dt("resetSelectionOnContextMenu",!0),dt("lineWiseCopyCut",!0),dt("pasteLinesPerSelection",!0),dt("selectionsMayTouch",!1),dt("readOnly",!1,function(ht,pt){pt=="nocursor"&&(fl(ht),ht.display.input.blur()),ht.display.input.readOnlyChanged(pt)}),dt("screenReaderLabel",null,function(ht,pt){pt=pt===""?null:pt,ht.display.input.screenReaderLabelChanged(pt)}),dt("disableInput",!1,function(ht,pt){pt||ht.display.input.reset()},!0),dt("dragDrop",!0,wf),dt("allowDropFileTypes",null),dt("cursorBlinkRate",530),dt("cursorScrollMargin",0),dt("cursorHeight",1,Ta,!0),dt("singleCursorHeightPerLine",!0,Ta,!0),dt("workTime",100),dt("workDelay",100),dt("flattenSpans",!0,cc,!0),dt("addModeClass",!1,cc,!0),dt("pollInterval",100),dt("undoDepth",200,function(ht,pt){return ht.doc.history.undoDepth=pt}),dt("historyEventDelay",1250),dt("viewportMargin",10,function(ht){return ht.refresh()},!0),dt("maxHighlightLength",1e4,cc,!0),dt("moveInputWithCursor",!0,function(ht,pt){pt||ht.display.input.resetPosition()}),dt("tabindex",null,function(ht,pt){return ht.display.input.getField().tabIndex=pt||""}),dt("autofocus",null),dt("direction","ltr",function(ht,pt){return ht.doc.setDirection(pt)},!0),dt("phrases",null)}function wf(it,at,dt){var ht=dt&&dt!=wh;if(!at!=!ht){var pt=it.display.dragFunctions,Lt=at?gn:xi;Lt(it.display.scroller,"dragstart",pt.start),Lt(it.display.scroller,"dragenter",pt.enter),Lt(it.display.scroller,"dragover",pt.over),Lt(it.display.scroller,"dragleave",pt.leave),Lt(it.display.scroller,"drop",pt.drop)}}function sm(it){it.options.lineWrapping?(Ke(it.display.wrapper,"CodeMirror-wrap"),it.display.sizer.style.minWidth="",it.display.sizerWidth=null):(Ht(it.display.wrapper,"CodeMirror-wrap"),He(it)),Mr(it),sa(it),Ia(it),setTimeout(function(){return qa(it)},100)}function la(it,at){var dt=this;if(!(this instanceof la))return new la(it,at);this.options=at=at?nn(at):{},nn(Rg,at,!1);var ht=at.value;typeof ht=="string"?ht=new Ds(ht,at.mode,null,at.lineSeparator,at.direction):at.mode&&(ht.modeOption=at.mode),this.doc=ht;var pt=new la.inputStyles[at.inputStyle](this),Lt=this.display=new mh(it,ht,pt,at);Lt.wrapper.CodeMirror=this,Pf(this),at.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ml(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 Xt,keySeq:null,specialChars:null},at.autofocus&&!et&&Lt.input.focus(),Se&&Wt<11&&setTimeout(function(){return dt.display.input.reset(!0)},20),Gd(this),Bl(),io(this),this.curOp.forceUpdate=!0,of(this,ht),at.autofocus&&!et||this.hasFocus()?setTimeout(function(){dt.hasFocus()&&!dt.state.focused&&Vo(dt)},20):fl(this);for(var Bt in Mc)Mc.hasOwnProperty(Bt)&&Mc[Bt](this,at[Bt],wh);as(this),at.finishInit&&at.finishInit(this);for(var Kt=0;Kt<od.length;++Kt)od[Kt](this);Ha(this),se&&at.lineWrapping&&getComputedStyle(Lt.lineDiv).textRendering=="optimizelegibility"&&(Lt.lineDiv.style.textRendering="auto")}la.defaults=Rg,la.optionHandlers=Mc;function Gd(it){var at=it.display;gn(at.scroller,"mousedown",Qr(it,wu)),Se&&Wt<11?gn(at.scroller,"dblclick",Qr(it,function(Zt){if(!Si(it,Zt)){var ne=Wa(it,Zt);if(!(!ne||Sf(it,Zt)||Dr(it.display,Zt))){$i(Zt);var Ie=it.findWordAt(ne);uf(it.doc,Ie.anchor,Ie.head)}}})):gn(at.scroller,"dblclick",function(Zt){return Si(it,Zt)||$i(Zt)}),gn(at.scroller,"contextmenu",function(Zt){return xf(it,Zt)}),gn(at.input.getField(),"contextmenu",function(Zt){at.scroller.contains(Zt.target)||xf(it,Zt)});var dt,ht={end:0};function pt(){at.activeTouch&&(dt=setTimeout(function(){return at.activeTouch=null},1e3),ht=at.activeTouch,ht.end=+new Date)}function Lt(Zt){if(Zt.touches.length!=1)return!1;var ne=Zt.touches[0];return ne.radiusX<=1&&ne.radiusY<=1}function Bt(Zt,ne){if(ne.left==null)return!0;var Ie=ne.left-Zt.left,de=ne.top-Zt.top;return Ie*Ie+de*de>20*20}gn(at.scroller,"touchstart",function(Zt){if(!Si(it,Zt)&&!Lt(Zt)&&!Sf(it,Zt)){at.input.ensurePolled(),clearTimeout(dt);var ne=+new Date;at.activeTouch={start:ne,moved:!1,prev:ne-ht.end<=300?ht:null},Zt.touches.length==1&&(at.activeTouch.left=Zt.touches[0].pageX,at.activeTouch.top=Zt.touches[0].pageY)}}),gn(at.scroller,"touchmove",function(){at.activeTouch&&(at.activeTouch.moved=!0)}),gn(at.scroller,"touchend",function(Zt){var ne=at.activeTouch;if(ne&&!Dr(at,Zt)&&ne.left!=null&&!ne.moved&&new Date-ne.start<300){var Ie=it.coordsChar(at.activeTouch,"page"),de;!ne.prev||Bt(ne,ne.prev)?de=new ya(Ie,Ie):!ne.prev.prev||Bt(ne,ne.prev.prev)?de=it.findWordAt(Ie):de=new ya(_e(Ie.line,0),bi(it.doc,_e(Ie.line+1,0))),it.setSelection(de.anchor,de.head),it.focus(),$i(Zt)}pt()}),gn(at.scroller,"touchcancel",pt),gn(at.scroller,"scroll",function(){at.scroller.clientHeight&&(gl(it,at.scroller.scrollTop),pl(it,at.scroller.scrollLeft,!0),Gn(it,"scroll",it))}),gn(at.scroller,"mousewheel",function(Zt){return Ps(it,Zt)}),gn(at.scroller,"DOMMouseScroll",function(Zt){return Ps(it,Zt)}),gn(at.wrapper,"scroll",function(){return at.wrapper.scrollTop=at.wrapper.scrollLeft=0}),at.dragFunctions={enter:function(Zt){Si(it,Zt)||zr(Zt)},over:function(Zt){Si(it,Zt)||(qp(it,Zt),zr(Zt))},start:function(Zt){return _p(it,Zt)},drop:Qr(it,xg),leave:function(Zt){Si(it,Zt)||$p(it)}};var Kt=at.input.getField();gn(Kt,"keyup",function(Zt){return Ng.call(it,Zt)}),gn(Kt,"keydown",Qr(it,Fg)),gn(Kt,"keypress",Qr(it,Pu)),gn(Kt,"focus",function(Zt){return Vo(it,Zt)}),gn(Kt,"blur",function(Zt){return fl(it,Zt)})}var od=[];la.defineInitHook=function(it){return od.push(it)};function ps(it,at,dt,ht){var pt=it.doc,Lt;dt==null&&(dt="add"),dt=="smart"&&(pt.mode.indent?Lt=mo(it,at).state:dt="prev");var Bt=it.options.tabSize,Kt=pi(pt,at),Zt=me(Kt.text,null,Bt);Kt.stateAfter&&(Kt.stateAfter=null);var ne=Kt.text.match(/^\s*/)[0],Ie;if(!ht&&!/\S/.test(Kt.text))Ie=0,dt="not";else if(dt=="smart"&&(Ie=pt.mode.indent(Lt,Kt.text.slice(ne.length),Kt.text),Ie==Yn||Ie>150)){if(!ht)return;dt="prev"}dt=="prev"?at>pt.first?Ie=me(pi(pt,at-1).text,null,Bt):Ie=0:dt=="add"?Ie=Zt+it.options.indentUnit:dt=="subtract"?Ie=Zt-it.options.indentUnit:typeof dt=="number"&&(Ie=Zt+dt),Ie=Math.max(0,Ie);var de="",fn=0;if(it.options.indentWithTabs)for(var en=Math.floor(Ie/Bt);en;--en)fn+=Bt,de+=" ";if(fn<Ie&&(de+=sn(Ie-fn)),de!=ne)return qh(pt,de,_e(at,0),_e(at,ne.length),"+input"),Kt.stateAfter=null,!0;for(var gi=0;gi<pt.sel.ranges.length;gi++){var ki=pt.sel.ranges[gi];if(ki.head.line==at&&ki.head.ch<ne.length){var ji=_e(at,ne.length);Sh(pt,gi,new ya(ji,ji));break}}}var al=null;function ad(it){al=it}function Ec(it,at,dt,ht,pt){var Lt=it.doc;it.display.shift=!1,ht||(ht=Lt.sel);var Bt=+new Date-200,Kt=pt=="paste"||it.state.pasteIncoming>Bt,Zt=ko(at),ne=null;if(Kt&&ht.ranges.length>1)if(al&&al.text.join(`
|
|
`)==at){if(ht.ranges.length%al.text.length==0){ne=[];for(var Ie=0;Ie<al.text.length;Ie++)ne.push(Lt.splitLines(al.text[Ie]))}}else Zt.length==ht.ranges.length&&it.options.pasteLinesPerSelection&&(ne=Nn(Zt,function(or){return[or]}));for(var de=it.curOp.updateInput,fn=ht.ranges.length-1;fn>=0;fn--){var en=ht.ranges[fn],gi=en.from(),ki=en.to();en.empty()&&(dt&&dt>0?gi=_e(gi.line,gi.ch-dt):it.state.overwrite&&!Kt?ki=_e(ki.line,Math.min(pi(Lt,ki.line).text.length,ki.ch+ce(Zt).length)):Kt&&al&&al.lineWise&&al.text.join(`
|
|
`)==Zt.join(`
|
|
`)&&(gi=ki=_e(gi.line,0)));var ji={from:gi,to:ki,text:ne?ne[fn%ne.length]:Zt,origin:pt||(Kt?"paste":it.state.cutIncoming>Bt?"cut":"+input")};xh(it.doc,ji),ii(it,"inputRead",it,ji)}at&&!Kt&&jg(it,at),Hs(it),it.curOp.updateInput<2&&(it.curOp.updateInput=de),it.curOp.typing=!0,it.state.pasteIncoming=it.state.cutIncoming=-1}function zg(it,at){var dt=it.clipboardData&&it.clipboardData.getData("Text");if(dt)return it.preventDefault(),!at.isReadOnly()&&!at.options.disableInput&&Gr(at,function(){return Ec(at,dt,0,null,"paste")}),!0}function jg(it,at){if(!(!it.options.electricChars||!it.options.smartIndent))for(var dt=it.doc.sel,ht=dt.ranges.length-1;ht>=0;ht--){var pt=dt.ranges[ht];if(!(pt.head.ch>100||ht&&dt.ranges[ht-1].head.line==pt.head.line)){var Lt=it.getModeAt(pt.head),Bt=!1;if(Lt.electricChars){for(var Kt=0;Kt<Lt.electricChars.length;Kt++)if(at.indexOf(Lt.electricChars.charAt(Kt))>-1){Bt=ps(it,pt.head.line,"smart");break}}else Lt.electricInput&&Lt.electricInput.test(pi(it.doc,pt.head.line).text.slice(0,pt.head.ch))&&(Bt=ps(it,pt.head.line,"smart"));Bt&&ii(it,"electricInput",it,pt.head.line)}}}function Wg(it){for(var at=[],dt=[],ht=0;ht<it.doc.sel.ranges.length;ht++){var pt=it.doc.sel.ranges[ht].head.line,Lt={anchor:_e(pt,0),head:_e(pt+1,0)};dt.push(Lt),at.push(it.getRange(Lt.anchor,Lt.head))}return{text:at,ranges:dt}}function Hg(it,at,dt,ht){it.setAttribute("autocorrect",dt?"":"off"),it.setAttribute("autocapitalize",ht?"":"off"),it.setAttribute("spellcheck",!!at)}function Gg(){var it=Jt("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),at=Jt("div",[it],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return se?it.style.width="1000px":it.setAttribute("wrap","off"),bt&&(it.style.border="1px solid black"),Hg(it),at}function Ch(it){var at=it.optionHandlers,dt=it.helpers={};it.prototype={constructor:it,focus:function(){window.focus(),this.display.input.focus()},setOption:function(ht,pt){var Lt=this.options,Bt=Lt[ht];Lt[ht]==pt&&ht!="mode"||(Lt[ht]=pt,at.hasOwnProperty(ht)&&Qr(this,at[ht])(this,pt,Bt),Gn(this,"optionChange",this,ht))},getOption:function(ht){return this.options[ht]},getDoc:function(){return this.doc},addKeyMap:function(ht,pt){this.state.keyMaps[pt?"push":"unshift"](ed(ht))},removeKeyMap:function(ht){for(var pt=this.state.keyMaps,Lt=0;Lt<pt.length;++Lt)if(pt[Lt]==ht||pt[Lt].name==ht)return pt.splice(Lt,1),!0},addOverlay:co(function(ht,pt){var Lt=ht.token?ht:it.getMode(this.options,ht);if(Lt.startState)throw new Error("Overlays may not be stateful.");Ci(this.state.overlays,{mode:Lt,modeSpec:ht,opaque:pt&&pt.opaque,priority:pt&&pt.priority||0},function(Bt){return Bt.priority}),this.state.modeGen++,sa(this)}),removeOverlay:co(function(ht){for(var pt=this.state.overlays,Lt=0;Lt<pt.length;++Lt){var Bt=pt[Lt].modeSpec;if(Bt==ht||typeof ht=="string"&&Bt.name==ht){pt.splice(Lt,1),this.state.modeGen++,sa(this);return}}}),indentLine:co(function(ht,pt,Lt){typeof pt!="string"&&typeof pt!="number"&&(pt==null?pt=this.options.smartIndent?"smart":"prev":pt=pt?"add":"subtract"),ei(this.doc,ht)&&ps(this,ht,pt,Lt)}),indentSelection:co(function(ht){for(var pt=this.doc.sel.ranges,Lt=-1,Bt=0;Bt<pt.length;Bt++){var Kt=pt[Bt];if(Kt.empty())Kt.head.line>Lt&&(ps(this,Kt.head.line,ht,!0),Lt=Kt.head.line,Bt==this.doc.sel.primIndex&&Hs(this));else{var Zt=Kt.from(),ne=Kt.to(),Ie=Math.max(Lt,Zt.line);Lt=Math.min(this.lastLine(),ne.line-(ne.ch?0:1))+1;for(var de=Ie;de<Lt;++de)ps(this,de,ht);var fn=this.doc.sel.ranges;Zt.ch==0&&pt.length==fn.length&&fn[Bt].from().ch>0&&Sh(this.doc,Bt,new ya(Zt,fn[Bt].to()),Be)}}}),getTokenAt:function(ht,pt){return Ii(this,ht,pt)},getLineTokens:function(ht,pt){return Ii(this,_e(ht),pt,!0)},getTokenTypeAt:function(ht){ht=bi(this.doc,ht);var pt=Ar(this,pi(this.doc,ht.line)),Lt=0,Bt=(pt.length-1)/2,Kt=ht.ch,Zt;if(Kt==0)Zt=pt[2];else for(;;){var ne=Lt+Bt>>1;if((ne?pt[ne*2-1]:0)>=Kt)Bt=ne;else if(pt[ne*2+1]<Kt)Lt=ne+1;else{Zt=pt[ne*2+2];break}}var Ie=Zt?Zt.indexOf("overlay "):-1;return Ie<0?Zt:Ie==0?null:Zt.slice(0,Ie-1)},getModeAt:function(ht){var pt=this.doc.mode;return pt.innerMode?it.innerMode(pt,this.getTokenAt(ht).state).mode:pt},getHelper:function(ht,pt){return this.getHelpers(ht,pt)[0]},getHelpers:function(ht,pt){var Lt=[];if(!dt.hasOwnProperty(pt))return Lt;var Bt=dt[pt],Kt=this.getModeAt(ht);if(typeof Kt[pt]=="string")Bt[Kt[pt]]&&Lt.push(Bt[Kt[pt]]);else if(Kt[pt])for(var Zt=0;Zt<Kt[pt].length;Zt++){var ne=Bt[Kt[pt][Zt]];ne&&Lt.push(ne)}else Kt.helperType&&Bt[Kt.helperType]?Lt.push(Bt[Kt.helperType]):Bt[Kt.name]&&Lt.push(Bt[Kt.name]);for(var Ie=0;Ie<Bt._global.length;Ie++){var de=Bt._global[Ie];de.pred(Kt,this)&&Ue(Lt,de.val)==-1&&Lt.push(de.val)}return Lt},getStateAfter:function(ht,pt){var Lt=this.doc;return ht=ri(Lt,ht==null?Lt.first+Lt.size-1:ht),mo(this,ht+1,pt).state},cursorCoords:function(ht,pt){var Lt,Bt=this.doc.sel.primary();return ht==null?Lt=Bt.head:typeof ht=="object"?Lt=bi(this.doc,ht):Lt=ht?Bt.from():Bt.to(),Ki(this,Lt,pt||"page")},charCoords:function(ht,pt){return Vr(this,bi(this.doc,ht),pt||"page")},coordsChar:function(ht,pt){return ht=gr(this,ht,pt||"page"),tr(this,ht.left,ht.top)},lineAtHeight:function(ht,pt){return ht=gr(this,{top:ht,left:0},pt||"page").top,pn(this.doc,ht+this.display.viewOffset)},heightAtLine:function(ht,pt,Lt){var Bt=!1,Kt;if(typeof ht=="number"){var Zt=this.doc.first+this.doc.size-1;ht<this.doc.first?ht=this.doc.first:ht>Zt&&(ht=Zt,Bt=!0),Kt=pi(this.doc,ht)}else Kt=ht;return Uo(this,Kt,{top:0,left:0},pt||"page",Lt||Bt).top+(Bt?this.doc.height-fe(Kt):0)},defaultTextHeight:function(){return Na(this.display)},defaultCharWidth:function(){return ss(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(ht,pt,Lt,Bt,Kt){var Zt=this.display;ht=Ki(this,bi(this.doc,ht));var ne=ht.bottom,Ie=ht.left;if(pt.style.position="absolute",pt.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(pt),Zt.sizer.appendChild(pt),Bt=="over")ne=ht.top;else if(Bt=="above"||Bt=="near"){var de=Math.max(Zt.wrapper.clientHeight,this.doc.height),fn=Math.max(Zt.sizer.clientWidth,Zt.lineSpace.clientWidth);(Bt=="above"||ht.bottom+pt.offsetHeight>de)&&ht.top>pt.offsetHeight?ne=ht.top-pt.offsetHeight:ht.bottom+pt.offsetHeight<=de&&(ne=ht.bottom),Ie+pt.offsetWidth>fn&&(Ie=fn-pt.offsetWidth)}pt.style.top=ne+"px",pt.style.left=pt.style.right="",Kt=="right"?(Ie=Zt.sizer.clientWidth-pt.offsetWidth,pt.style.right="0px"):(Kt=="left"?Ie=0:Kt=="middle"&&(Ie=(Zt.sizer.clientWidth-pt.offsetWidth)/2),pt.style.left=Ie+"px"),Lt&&bl(this,{left:Ie,top:ne,right:Ie+pt.offsetWidth,bottom:ne+pt.offsetHeight})},triggerOnKeyDown:co(Fg),triggerOnKeyPress:co(Pu),triggerOnKeyUp:Ng,triggerOnMouseDown:co(wu),execCommand:function(ht){if(Ph.hasOwnProperty(ht))return Ph[ht].call(null,this)},triggerElectric:co(function(ht){jg(this,ht)}),findPosH:function(ht,pt,Lt,Bt){var Kt=1;pt<0&&(Kt=-1,pt=-pt);for(var Zt=bi(this.doc,ht),ne=0;ne<pt&&(Zt=Ac(this.doc,Zt,Kt,Lt,Bt),!Zt.hitSide);++ne);return Zt},moveH:co(function(ht,pt){var Lt=this;this.extendSelectionsBy(function(Bt){return Lt.display.shift||Lt.doc.extend||Bt.empty()?Ac(Lt.doc,Bt.head,ht,pt,Lt.options.rtlMoveVisually):ht<0?Bt.from():Bt.to()},Je)}),deleteH:co(function(ht,pt){var Lt=this.doc.sel,Bt=this.doc;Lt.somethingSelected()?Bt.replaceSelection("",null,"+delete"):Sl(this,function(Kt){var Zt=Ac(Bt,Kt.head,ht,pt,!1);return ht<0?{from:Zt,to:Kt.head}:{from:Kt.head,to:Zt}})}),findPosV:function(ht,pt,Lt,Bt){var Kt=1,Zt=Bt;pt<0&&(Kt=-1,pt=-pt);for(var ne=bi(this.doc,ht),Ie=0;Ie<pt;++Ie){var de=Ki(this,ne,"div");if(Zt==null?Zt=de.left:de.left=Zt,ne=Lh(this,de,Kt,Lt),ne.hitSide)break}return ne},moveV:co(function(ht,pt){var Lt=this,Bt=this.doc,Kt=[],Zt=!this.display.shift&&!Bt.extend&&Bt.sel.somethingSelected();if(Bt.extendSelectionsBy(function(Ie){if(Zt)return ht<0?Ie.from():Ie.to();var de=Ki(Lt,Ie.head,"div");Ie.goalColumn!=null&&(de.left=Ie.goalColumn),Kt.push(de.left);var fn=Lh(Lt,de,ht,pt);return pt=="page"&&Ie==Bt.sel.primary()&&vu(Lt,Vr(Lt,fn,"div").top-de.top),fn},Je),Kt.length)for(var ne=0;ne<Bt.sel.ranges.length;ne++)Bt.sel.ranges[ne].goalColumn=Kt[ne]}),findWordAt:function(ht){var pt=this.doc,Lt=pi(pt,ht.line).text,Bt=ht.ch,Kt=ht.ch;if(Lt){var Zt=this.getHelper(ht,"wordChars");(ht.sticky=="before"||Kt==Lt.length)&&Bt?--Bt:++Kt;for(var ne=Lt.charAt(Bt),Ie=Gt(ne,Zt)?function(de){return Gt(de,Zt)}:/\s/.test(ne)?function(de){return/\s/.test(de)}:function(de){return!/\s/.test(de)&&!Gt(de)};Bt>0&&Ie(Lt.charAt(Bt-1));)--Bt;for(;Kt<Lt.length&&Ie(Lt.charAt(Kt));)++Kt}return new ya(_e(ht.line,Bt),_e(ht.line,Kt))},toggleOverwrite:function(ht){ht!=null&&ht==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ke(this.display.cursorDiv,"CodeMirror-overwrite"):Ht(this.display.cursorDiv,"CodeMirror-overwrite"),Gn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Re()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:co(function(ht,pt){Vl(this,ht,pt)}),getScrollInfo:function(){var ht=this.display.scroller;return{left:ht.scrollLeft,top:ht.scrollTop,height:ht.scrollHeight-Cr(this)-this.display.barHeight,width:ht.scrollWidth-Cr(this)-this.display.barWidth,clientHeight:yo(this),clientWidth:to(this)}},scrollIntoView:co(function(ht,pt){ht==null?(ht={from:this.doc.sel.primary().head,to:null},pt==null&&(pt=this.options.cursorScrollMargin)):typeof ht=="number"?ht={from:_e(ht,0),to:null}:ht.from==null&&(ht={from:ht,to:null}),ht.to||(ht.to=ht.from),ht.margin=pt||0,ht.from.line!=null?Ho(this,ht):yu(this,ht.from,ht.to,ht.margin)}),setSize:co(function(ht,pt){var Lt=this,Bt=function(Zt){return typeof Zt=="number"||/^\d+$/.test(String(Zt))?Zt+"px":Zt};ht!=null&&(this.display.wrapper.style.width=Bt(ht)),pt!=null&&(this.display.wrapper.style.height=Bt(pt)),this.options.lineWrapping&&Wo(this);var Kt=this.display.viewFrom;this.doc.iter(Kt,this.display.viewTo,function(Zt){if(Zt.widgets){for(var ne=0;ne<Zt.widgets.length;ne++)if(Zt.widgets[ne].noHScroll){no(Lt,Kt,"widget");break}}++Kt}),this.curOp.forceUpdate=!0,Gn(this,"refresh",this)}),operation:function(ht){return Gr(this,ht)},startOperation:function(){return io(this)},endOperation:function(){return Ha(this)},refresh:co(function(){var ht=this.display.cachedTextHeight;sa(this),this.curOp.forceUpdate=!0,Ia(this),Vl(this,this.doc.scrollLeft,this.doc.scrollTop),gh(this.display),(ht==null||Math.abs(ht-Na(this.display))>.5||this.options.lineWrapping)&&Mr(this),Gn(this,"refresh",this)}),swapDoc:co(function(ht){var pt=this.doc;return pt.cm=null,this.state.selectingText&&this.state.selectingText(),of(this,ht),Ia(this),this.display.input.reset(),Vl(this,ht.scrollLeft,ht.scrollTop),this.curOp.forceScroll=!0,ii(this,"swapDoc",this,pt),pt}),phrase:function(ht){var pt=this.options.phrases;return pt&&Object.prototype.hasOwnProperty.call(pt,ht)?pt[ht]:ht},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}},Di(it),it.registerHelper=function(ht,pt,Lt){dt.hasOwnProperty(ht)||(dt[ht]=it[ht]={_global:[]}),dt[ht][pt]=Lt},it.registerGlobalHelper=function(ht,pt,Lt,Bt){it.registerHelper(ht,pt,Bt),dt[ht]._global.push({pred:Lt,val:Bt})}}function Ac(it,at,dt,ht,pt){var Lt=at,Bt=dt,Kt=pi(it,at.line),Zt=pt&&it.direction=="rtl"?-dt:dt;function ne(){var Fr=at.line+Zt;return Fr<it.first||Fr>=it.first+it.size?!1:(at=new _e(Fr,at.ch,at.sticky),Kt=pi(it,Fr))}function Ie(Fr){var vr;if(ht=="codepoint"){var jr=Kt.text.charCodeAt(at.ch+(ht>0?0:-1));isNaN(jr)?vr=null:vr=new _e(at.line,Math.max(0,Math.min(Kt.text.length,at.ch+dt*(jr>=55296&&jr<56320?2:1))),-dt)}else pt?vr=ff(it.cm,Kt,at,dt):vr=rs(Kt,at,dt);if(vr==null)if(!Fr&&ne())at=kc(pt,it.cm,Kt,at.line,Zt);else return!1;else at=vr;return!0}if(ht=="char"||ht=="codepoint")Ie();else if(ht=="column")Ie(!0);else if(ht=="word"||ht=="group")for(var de=null,fn=ht=="group",en=it.cm&&it.cm.getHelper(at,"wordChars"),gi=!0;!(dt<0&&!Ie(!gi));gi=!1){var ki=Kt.text.charAt(at.ch)||`
|
|
`,ji=Gt(ki,en)?"w":fn&&ki==`
|
|
`?"n":!fn||/\s/.test(ki)?null:"p";if(fn&&!gi&&!ji&&(ji="s"),de&&de!=ji){dt<0&&(dt=1,Ie(),at.sticky="after");break}if(ji&&(de=ji),dt>0&&!Ie(!gi))break}var or=Sc(it,at,Lt,Bt,!0);return $n(Lt,or)&&(or.hitSide=!0),or}function Lh(it,at,dt,ht){var pt=it.doc,Lt=at.left,Bt;if(ht=="page"){var Kt=Math.min(it.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Zt=Math.max(Kt-.5*Na(it.display),3);Bt=(dt>0?at.bottom:at.top)+dt*Zt}else ht=="line"&&(Bt=dt>0?at.bottom+3:at.top-3);for(var ne;ne=tr(it,Lt,Bt),!!ne.outside;){if(dt<0?Bt<=0:Bt>=pt.height){ne.hitSide=!0;break}Bt+=dt*5}return ne}var ka=function(it){this.cm=it,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Xt,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ka.prototype.init=function(it){var at=this,dt=this,ht=dt.cm,pt=dt.div=it.lineDiv;Hg(pt,ht.options.spellcheck,ht.options.autocorrect,ht.options.autocapitalize);function Lt(Kt){for(var Zt=Kt.target;Zt;Zt=Zt.parentNode){if(Zt==pt)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Zt.className))break}return!1}gn(pt,"paste",function(Kt){!Lt(Kt)||Si(ht,Kt)||zg(Kt,ht)||Wt<=11&&setTimeout(Qr(ht,function(){return at.updateFromDOM()}),20)}),gn(pt,"compositionstart",function(Kt){at.composing={data:Kt.data,done:!1}}),gn(pt,"compositionupdate",function(Kt){at.composing||(at.composing={data:Kt.data,done:!1})}),gn(pt,"compositionend",function(Kt){at.composing&&(Kt.data!=at.composing.data&&at.readFromDOMSoon(),at.composing.done=!0)}),gn(pt,"touchstart",function(){return dt.forceCompositionEnd()}),gn(pt,"input",function(){at.composing||at.readFromDOMSoon()});function Bt(Kt){if(!(!Lt(Kt)||Si(ht,Kt))){if(ht.somethingSelected())ad({lineWise:!1,text:ht.getSelections()}),Kt.type=="cut"&&ht.replaceSelection("",null,"cut");else if(ht.options.lineWiseCopyCut){var Zt=Wg(ht);ad({lineWise:!0,text:Zt.text}),Kt.type=="cut"&&ht.operation(function(){ht.setSelections(Zt.ranges,0,Be),ht.replaceSelection("",null,"cut")})}else return;if(Kt.clipboardData){Kt.clipboardData.clearData();var ne=al.text.join(`
|
|
`);if(Kt.clipboardData.setData("Text",ne),Kt.clipboardData.getData("Text")==ne){Kt.preventDefault();return}}var Ie=Gg(),de=Ie.firstChild;ht.display.lineSpace.insertBefore(Ie,ht.display.lineSpace.firstChild),de.value=al.text.join(`
|
|
`);var fn=document.activeElement;tn(de),setTimeout(function(){ht.display.lineSpace.removeChild(Ie),fn.focus(),fn==pt&&dt.showPrimarySelection()},50)}}gn(pt,"copy",Bt),gn(pt,"cut",Bt)},ka.prototype.screenReaderLabelChanged=function(it){it?this.div.setAttribute("aria-label",it):this.div.removeAttribute("aria-label")},ka.prototype.prepareSelection=function(){var it=Fl(this.cm,!1);return it.focus=document.activeElement==this.div,it},ka.prototype.showSelection=function(it,at){!it||!this.cm.display.view.length||((it.focus||at)&&this.showPrimarySelection(),this.showMultipleSelections(it))},ka.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ka.prototype.showPrimarySelection=function(){var it=this.getSelection(),at=this.cm,dt=at.doc.sel.primary(),ht=dt.from(),pt=dt.to();if(at.display.viewTo==at.display.viewFrom||ht.line>=at.display.viewTo||pt.line<at.display.viewFrom){it.removeAllRanges();return}var Lt=Fc(at,it.anchorNode,it.anchorOffset),Bt=Fc(at,it.focusNode,it.focusOffset);if(!(Lt&&!Lt.bad&&Bt&&!Bt.bad&&un(Ei(Lt,Bt),ht)==0&&un(Oi(Lt,Bt),pt)==0)){var Kt=at.display.view,Zt=ht.line>=at.display.viewFrom&&Cf(at,ht)||{node:Kt[0].measure.map[2],offset:0},ne=pt.line<at.display.viewTo&&Cf(at,pt);if(!ne){var Ie=Kt[Kt.length-1].measure,de=Ie.maps?Ie.maps[Ie.maps.length-1]:Ie.map;ne={node:de[de.length-1],offset:de[de.length-2]-de[de.length-3]}}if(!Zt||!ne){it.removeAllRanges();return}var fn=it.rangeCount&&it.getRangeAt(0),en;try{en=he(Zt.node,Zt.offset,ne.offset,ne.node)}catch(gi){}en&&(!Dt&&at.state.focused?(it.collapse(Zt.node,Zt.offset),en.collapsed||(it.removeAllRanges(),it.addRange(en))):(it.removeAllRanges(),it.addRange(en)),fn&&it.anchorNode==null?it.addRange(fn):Dt&&this.startGracePeriod()),this.rememberSelection()}},ka.prototype.startGracePeriod=function(){var it=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){it.gracePeriod=!1,it.selectionChanged()&&it.cm.operation(function(){return it.cm.curOp.selectionChanged=!0})},20)},ka.prototype.showMultipleSelections=function(it){jt(this.cm.display.cursorDiv,it.cursors),jt(this.cm.display.selectionDiv,it.selection)},ka.prototype.rememberSelection=function(){var it=this.getSelection();this.lastAnchorNode=it.anchorNode,this.lastAnchorOffset=it.anchorOffset,this.lastFocusNode=it.focusNode,this.lastFocusOffset=it.focusOffset},ka.prototype.selectionInEditor=function(){var it=this.getSelection();if(!it.rangeCount)return!1;var at=it.getRangeAt(0).commonAncestorContainer;return Fe(this.div,at)},ka.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},ka.prototype.blur=function(){this.div.blur()},ka.prototype.getField=function(){return this.div},ka.prototype.supportsTouch=function(){return!0},ka.prototype.receivedFocus=function(){var it=this;this.selectionInEditor()?this.pollSelection():Gr(this.cm,function(){return it.cm.curOp.selectionChanged=!0});function at(){it.cm.state.focused&&(it.pollSelection(),it.polling.set(it.cm.options.pollInterval,at))}this.polling.set(this.cm.options.pollInterval,at)},ka.prototype.selectionChanged=function(){var it=this.getSelection();return it.anchorNode!=this.lastAnchorNode||it.anchorOffset!=this.lastAnchorOffset||it.focusNode!=this.lastFocusNode||it.focusOffset!=this.lastFocusOffset},ka.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var it=this.getSelection(),at=this.cm;if(nt&&ye&&this.cm.display.gutterSpecs.length&&Zg(it.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var dt=Fc(at,it.anchorNode,it.anchorOffset),ht=Fc(at,it.focusNode,it.focusOffset);dt&&ht&&Gr(at,function(){Zs(at.doc,Qu(dt,ht),Be),(dt.bad||ht.bad)&&(at.curOp.selectionChanged=!0)})}}},ka.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var it=this.cm,at=it.display,dt=it.doc.sel.primary(),ht=dt.from(),pt=dt.to();if(ht.ch==0&&ht.line>it.firstLine()&&(ht=_e(ht.line-1,pi(it.doc,ht.line-1).length)),pt.ch==pi(it.doc,pt.line).text.length&&pt.line<it.lastLine()&&(pt=_e(pt.line+1,0)),ht.line<at.viewFrom||pt.line>at.viewTo-1)return!1;var Lt,Bt,Kt;ht.line==at.viewFrom||(Lt=_a(it,ht.line))==0?(Bt=$t(at.view[0].line),Kt=at.view[0].node):(Bt=$t(at.view[Lt].line),Kt=at.view[Lt-1].node.nextSibling);var Zt=_a(it,pt.line),ne,Ie;if(Zt==at.view.length-1?(ne=at.viewTo-1,Ie=at.lineDiv.lastChild):(ne=$t(at.view[Zt+1].line)-1,Ie=at.view[Zt+1].node.previousSibling),!Kt)return!1;for(var de=it.doc.splitLines(Vd(it,Kt,Ie,Bt,ne)),fn=Ze(it.doc,_e(Bt,0),_e(ne,pi(it.doc,ne).text.length));de.length>1&&fn.length>1;)if(ce(de)==ce(fn))de.pop(),fn.pop(),ne--;else if(de[0]==fn[0])de.shift(),fn.shift(),Bt++;else break;for(var en=0,gi=0,ki=de[0],ji=fn[0],or=Math.min(ki.length,ji.length);en<or&&ki.charCodeAt(en)==ji.charCodeAt(en);)++en;for(var Fr=ce(de),vr=ce(fn),jr=Math.min(Fr.length-(de.length==1?en:0),vr.length-(fn.length==1?en:0));gi<jr&&Fr.charCodeAt(Fr.length-gi-1)==vr.charCodeAt(vr.length-gi-1);)++gi;if(de.length==1&&fn.length==1&&Bt==ht.line)for(;en&&en>ht.ch&&Fr.charCodeAt(Fr.length-gi-1)==vr.charCodeAt(vr.length-gi-1);)en--,gi++;de[de.length-1]=Fr.slice(0,Fr.length-gi).replace(/^\u200b+/,""),de[0]=de[0].slice(en).replace(/\u200b+$/,"");var fo=_e(Bt,en),pr=_e(ne,fn.length?ce(fn).length-gi:0);if(de.length>1||de[0]||un(fo,pr))return qh(it.doc,de,fo,pr,"+input"),!0},ka.prototype.ensurePolled=function(){this.forceCompositionEnd()},ka.prototype.reset=function(){this.forceCompositionEnd()},ka.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ka.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))},ka.prototype.updateFromDOM=function(){var it=this;(this.cm.isReadOnly()||!this.pollContent())&&Gr(this.cm,function(){return sa(it.cm)})},ka.prototype.setUneditable=function(it){it.contentEditable="false"},ka.prototype.onKeyPress=function(it){it.charCode==0||this.composing||(it.preventDefault(),this.cm.isReadOnly()||Qr(this.cm,Ec)(this.cm,String.fromCharCode(it.charCode==null?it.keyCode:it.charCode),0))},ka.prototype.readOnlyChanged=function(it){this.div.contentEditable=String(it!="nocursor")},ka.prototype.onContextMenu=function(){},ka.prototype.resetPosition=function(){},ka.prototype.needsContentAttribute=!0;function Cf(it,at){var dt=ca(it,at.line);if(!dt||dt.hidden)return null;var ht=pi(it.doc,at.line),pt=Hr(dt,ht,at.line),Lt=kn(ht,it.doc.direction),Bt="left";if(Lt){var Kt=Ee(Lt,at.ch);Bt=Kt%2?"right":"left"}var Zt=Qo(pt.map,at.ch,Bt);return Zt.offset=Zt.collapse=="right"?Zt.end:Zt.start,Zt}function Zg(it){for(var at=it;at;at=at.parentNode)if(/CodeMirror-gutter-wrapper/.test(at.className))return!0;return!1}function Zd(it,at){return at&&(it.bad=!0),it}function Vd(it,at,dt,ht,pt){var Lt="",Bt=!1,Kt=it.doc.lineSeparator(),Zt=!1;function ne(en){return function(gi){return gi.id==en}}function Ie(){Bt&&(Lt+=Kt,Zt&&(Lt+=Kt),Bt=Zt=!1)}function de(en){en&&(Ie(),Lt+=en)}function fn(en){if(en.nodeType==1){var gi=en.getAttribute("cm-text");if(gi){de(gi);return}var ki=en.getAttribute("cm-marker"),ji;if(ki){var or=it.findMarks(_e(ht,0),_e(pt+1,0),ne(+ki));or.length&&(ji=or[0].find(0))&&de(Ze(it.doc,ji.from,ji.to).join(Kt));return}if(en.getAttribute("contenteditable")=="false")return;var Fr=/^(pre|div|p|li|table|br)$/i.test(en.nodeName);if(!/^br$/i.test(en.nodeName)&&en.textContent.length==0)return;Fr&&Ie();for(var vr=0;vr<en.childNodes.length;vr++)fn(en.childNodes[vr]);/^(pre|p)$/i.test(en.nodeName)&&(Zt=!0),Fr&&(Bt=!0)}else en.nodeType==3&&de(en.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;fn(at),at!=dt;)at=at.nextSibling,Zt=!1;return Lt}function Fc(it,at,dt){var ht;if(at==it.display.lineDiv){if(ht=it.display.lineDiv.childNodes[dt],!ht)return Zd(it.clipPos(_e(it.display.viewTo-1)),!0);at=null,dt=0}else for(ht=at;;ht=ht.parentNode){if(!ht||ht==it.display.lineDiv)return null;if(ht.parentNode&&ht.parentNode==it.display.lineDiv)break}for(var pt=0;pt<it.display.view.length;pt++){var Lt=it.display.view[pt];if(Lt.node==ht)return lm(Lt,at,dt)}}function lm(it,at,dt){var ht=it.text.firstChild,pt=!1;if(!at||!Fe(ht,at))return Zd(_e($t(it.line),0),!0);if(at==ht&&(pt=!0,at=ht.childNodes[dt],dt=0,!at)){var Lt=it.rest?ce(it.rest):it.line;return Zd(_e($t(Lt),Lt.text.length),pt)}var Bt=at.nodeType==3?at:null,Kt=at;for(!Bt&&at.childNodes.length==1&&at.firstChild.nodeType==3&&(Bt=at.firstChild,dt&&(dt=Bt.nodeValue.length));Kt.parentNode!=ht;)Kt=Kt.parentNode;var Zt=it.measure,ne=Zt.maps;function Ie(ji,or,Fr){for(var vr=-1;vr<(ne?ne.length:0);vr++)for(var jr=vr<0?Zt.map:ne[vr],fo=0;fo<jr.length;fo+=3){var pr=jr[fo+2];if(pr==ji||pr==or){var Zo=$t(vr<0?it.line:it.rest[vr]),Da=jr[fo]+Fr;return(Fr<0||pr!=ji)&&(Da=jr[fo+(Fr?1:0)]),_e(Zo,Da)}}}var de=Ie(Bt,Kt,dt);if(de)return Zd(de,pt);for(var fn=Kt.nextSibling,en=Bt?Bt.nodeValue.length-dt:0;fn;fn=fn.nextSibling){if(de=Ie(fn,fn.firstChild,0),de)return Zd(_e(de.line,de.ch-en),pt);en+=fn.textContent.length}for(var gi=Kt.previousSibling,ki=dt;gi;gi=gi.previousSibling){if(de=Ie(gi,gi.firstChild,-1),de)return Zd(_e(de.line,de.ch+ki),pt);ki+=gi.textContent.length}}var ds=function(it){this.cm=it,this.prevInput="",this.pollingFast=!1,this.polling=new Xt,this.hasSelection=!1,this.composing=null};ds.prototype.init=function(it){var at=this,dt=this,ht=this.cm;this.createField(it);var pt=this.textarea;it.wrapper.insertBefore(this.wrapper,it.wrapper.firstChild),bt&&(pt.style.width="0px"),gn(pt,"input",function(){Se&&Wt>=9&&at.hasSelection&&(at.hasSelection=null),dt.poll()}),gn(pt,"paste",function(Bt){Si(ht,Bt)||zg(Bt,ht)||(ht.state.pasteIncoming=+new Date,dt.fastPoll())});function Lt(Bt){if(!Si(ht,Bt)){if(ht.somethingSelected())ad({lineWise:!1,text:ht.getSelections()});else if(ht.options.lineWiseCopyCut){var Kt=Wg(ht);ad({lineWise:!0,text:Kt.text}),Bt.type=="cut"?ht.setSelections(Kt.ranges,null,Be):(dt.prevInput="",pt.value=Kt.text.join(`
|
|
`),tn(pt))}else return;Bt.type=="cut"&&(ht.state.cutIncoming=+new Date)}}gn(pt,"cut",Lt),gn(pt,"copy",Lt),gn(it.scroller,"paste",function(Bt){if(!(Dr(it,Bt)||Si(ht,Bt))){if(!pt.dispatchEvent){ht.state.pasteIncoming=+new Date,dt.focus();return}var Kt=new Event("paste");Kt.clipboardData=Bt.clipboardData,pt.dispatchEvent(Kt)}}),gn(it.lineSpace,"selectstart",function(Bt){Dr(it,Bt)||$i(Bt)}),gn(pt,"compositionstart",function(){var Bt=ht.getCursor("from");dt.composing&&dt.composing.range.clear(),dt.composing={start:Bt,range:ht.markText(Bt,ht.getCursor("to"),{className:"CodeMirror-composing"})}}),gn(pt,"compositionend",function(){dt.composing&&(dt.poll(),dt.composing.range.clear(),dt.composing=null)})},ds.prototype.createField=function(it){this.wrapper=Gg(),this.textarea=this.wrapper.firstChild},ds.prototype.screenReaderLabelChanged=function(it){it?this.textarea.setAttribute("aria-label",it):this.textarea.removeAttribute("aria-label")},ds.prototype.prepareSelection=function(){var it=this.cm,at=it.display,dt=it.doc,ht=Fl(it);if(it.options.moveInputWithCursor){var pt=Ki(it,dt.sel.primary().head,"div"),Lt=at.wrapper.getBoundingClientRect(),Bt=at.lineDiv.getBoundingClientRect();ht.teTop=Math.max(0,Math.min(at.wrapper.clientHeight-10,pt.top+Bt.top-Lt.top)),ht.teLeft=Math.max(0,Math.min(at.wrapper.clientWidth-10,pt.left+Bt.left-Lt.left))}return ht},ds.prototype.showSelection=function(it){var at=this.cm,dt=at.display;jt(dt.cursorDiv,it.cursors),jt(dt.selectionDiv,it.selection),it.teTop!=null&&(this.wrapper.style.top=it.teTop+"px",this.wrapper.style.left=it.teLeft+"px")},ds.prototype.reset=function(it){if(!(this.contextMenuPending||this.composing)){var at=this.cm;if(at.somethingSelected()){this.prevInput="";var dt=at.getSelection();this.textarea.value=dt,at.state.focused&&tn(this.textarea),Se&&Wt>=9&&(this.hasSelection=dt)}else it||(this.prevInput=this.textarea.value="",Se&&Wt>=9&&(this.hasSelection=null))}},ds.prototype.getField=function(){return this.textarea},ds.prototype.supportsTouch=function(){return!1},ds.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!et||Re()!=this.textarea))try{this.textarea.focus()}catch(it){}},ds.prototype.blur=function(){this.textarea.blur()},ds.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ds.prototype.receivedFocus=function(){this.slowPoll()},ds.prototype.slowPoll=function(){var it=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){it.poll(),it.cm.state.focused&&it.slowPoll()})},ds.prototype.fastPoll=function(){var it=!1,at=this;at.pollingFast=!0;function dt(){var ht=at.poll();!ht&&!it?(it=!0,at.polling.set(60,dt)):(at.pollingFast=!1,at.slowPoll())}at.polling.set(20,dt)},ds.prototype.poll=function(){var it=this,at=this.cm,dt=this.textarea,ht=this.prevInput;if(this.contextMenuPending||!at.state.focused||Ct(dt)&&!ht&&!this.composing||at.isReadOnly()||at.options.disableInput||at.state.keySeq)return!1;var pt=dt.value;if(pt==ht&&!at.somethingSelected())return!1;if(Se&&Wt>=9&&this.hasSelection===pt||ct&&/[\uf700-\uf7ff]/.test(pt))return at.display.input.reset(),!1;if(at.doc.sel==at.display.selForContextMenu){var Lt=pt.charCodeAt(0);if(Lt==8203&&!ht&&(ht="\u200B"),Lt==8666)return this.reset(),this.cm.execCommand("undo")}for(var Bt=0,Kt=Math.min(ht.length,pt.length);Bt<Kt&&ht.charCodeAt(Bt)==pt.charCodeAt(Bt);)++Bt;return Gr(at,function(){Ec(at,pt.slice(Bt),ht.length-Bt,null,it.composing?"*compose":null),pt.length>1e3||pt.indexOf(`
|
|
`)>-1?dt.value=it.prevInput="":it.prevInput=pt,it.composing&&(it.composing.range.clear(),it.composing.range=at.markText(it.composing.start,at.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ds.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ds.prototype.onKeyPress=function(){Se&&Wt>=9&&(this.hasSelection=null),this.fastPoll()},ds.prototype.onContextMenu=function(it){var at=this,dt=at.cm,ht=dt.display,pt=at.textarea;at.contextMenuPending&&at.contextMenuPending();var Lt=Wa(dt,it),Bt=ht.scroller.scrollTop;if(!Lt||Nt)return;var Kt=dt.options.resetSelectionOnContextMenu;Kt&&dt.doc.sel.contains(Lt)==-1&&Qr(dt,Zs)(dt.doc,Qu(Lt),Be);var Zt=pt.style.cssText,ne=at.wrapper.style.cssText,Ie=at.wrapper.offsetParent.getBoundingClientRect();at.wrapper.style.cssText="position: static",pt.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(it.clientY-Ie.top-5)+"px; left: "+(it.clientX-Ie.left-5)+`px;
|
|
z-index: 1000; background: `+(Se?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var de;se&&(de=window.scrollY),ht.input.focus(),se&&window.scrollTo(null,de),ht.input.reset(),dt.somethingSelected()||(pt.value=at.prevInput=" "),at.contextMenuPending=en,ht.selForContextMenu=dt.doc.sel,clearTimeout(ht.detectingSelectAll);function fn(){if(pt.selectionStart!=null){var ki=dt.somethingSelected(),ji="\u200B"+(ki?pt.value:"");pt.value="\u21DA",pt.value=ji,at.prevInput=ki?"":"\u200B",pt.selectionStart=1,pt.selectionEnd=ji.length,ht.selForContextMenu=dt.doc.sel}}function en(){if(at.contextMenuPending==en&&(at.contextMenuPending=!1,at.wrapper.style.cssText=ne,pt.style.cssText=Zt,Se&&Wt<9&&ht.scrollbars.setScrollTop(ht.scroller.scrollTop=Bt),pt.selectionStart!=null)){(!Se||Se&&Wt<9)&&fn();var ki=0,ji=function(){ht.selForContextMenu==dt.doc.sel&&pt.selectionStart==0&&pt.selectionEnd>0&&at.prevInput=="\u200B"?Qr(dt,is)(dt):ki++<10?ht.detectingSelectAll=setTimeout(ji,500):(ht.selForContextMenu=null,ht.input.reset())};ht.detectingSelectAll=setTimeout(ji,200)}}if(Se&&Wt>=9&&fn(),Mt){zr(it);var gi=function(){xi(window,"mouseup",gi),setTimeout(en,20)};gn(window,"mouseup",gi)}else setTimeout(en,50)},ds.prototype.readOnlyChanged=function(it){it||this.reset(),this.textarea.disabled=it=="nocursor",this.textarea.readOnly=!!it},ds.prototype.setUneditable=function(){},ds.prototype.needsContentAttribute=!1;function um(it,at){if(at=at?nn(at):{},at.value=it.value,!at.tabindex&&it.tabIndex&&(at.tabindex=it.tabIndex),!at.placeholder&&it.placeholder&&(at.placeholder=it.placeholder),at.autofocus==null){var dt=Re();at.autofocus=dt==it||it.getAttribute("autofocus")!=null&&dt==document.body}function ht(){it.value=Kt.getValue()}var pt;if(it.form&&(gn(it.form,"submit",ht),!at.leaveSubmitMethodAlone)){var Lt=it.form;pt=Lt.submit;try{var Bt=Lt.submit=function(){ht(),Lt.submit=pt,Lt.submit(),Lt.submit=Bt}}catch(Zt){}}at.finishInit=function(Zt){Zt.save=ht,Zt.getTextArea=function(){return it},Zt.toTextArea=function(){Zt.toTextArea=isNaN,ht(),it.parentNode.removeChild(Zt.getWrapperElement()),it.style.display="",it.form&&(xi(it.form,"submit",ht),!at.leaveSubmitMethodAlone&&typeof it.form.submit=="function"&&(it.form.submit=pt))}},it.style.display="none";var Kt=la(function(Zt){return it.parentNode.insertBefore(Zt,it.nextSibling)},at);return Kt}function Kd(it){it.off=xi,it.on=gn,it.wheelEventPixels=Dl,it.Doc=Ds,it.splitLines=ko,it.countColumn=me,it.findColumn=An,it.isWordChar=Ft,it.Pass=Yn,it.signal=Gn,it.Line=Ye,it.changeEnd=vh,it.scrollbarModel=Nl,it.Pos=_e,it.cmpPos=un,it.modes=Er,it.mimeModes=Zi,it.resolveMode=br,it.getMode=$e,it.modeExtensions=Oe,it.extendMode=Me,it.copyState=Pi,it.startState=rr,it.innerMode=Vi,it.commands=Ph,it.keyMap=yl,it.keyName=em,it.isModifierKey=Rd,it.lookupKey=Ul,it.normalizeKeyMap=Lg,it.StringStream=Dn,it.SharedTextMarker=Tu,it.TextMarker=ke,it.LineWidget=$u,it.e_preventDefault=$i,it.e_stopPropagation=Kr,it.e_stop=zr,it.addClass=Ke,it.contains=Fe,it.rmClass=Ht,it.keyNames=Du}am(la),Ch(la);var th="iter insert remove copy getEditor constructor".split(" ");for(var bc in Ds.prototype)Ds.prototype.hasOwnProperty(bc)&&Ue(th,bc)<0&&(la.prototype[bc]=function(it){return function(){return it.apply(this.doc,arguments)}}(Ds.prototype[bc]));return Di(Ds),la.inputStyles={textarea:ds,contenteditable:ka},la.defineMode=function(it){!la.defaults.mode&&it!="null"&&(la.defaults.mode=it),_r.apply(this,arguments)},la.defineMIME=ho,la.defineMode("null",function(){return{token:function(it){return it.skipToEnd()}}}),la.defineMIME("text/plain","null"),la.defineExtension=function(it,at){la.prototype[it]=at},la.defineDocExtension=function(it,at){Ds.prototype[it]=at},la.fromTextArea=um,Kd(la),la.version="5.58.2",la})},25419:function(zn,oi,Ot){(function(Dt){Dt(Ot(89780),Ot(15525),Ot(98101))})(function(Dt){"use strict";Dt.defineMode("markdown",function(ee,Pe){var xe=Dt.getMode(ee,"text/html"),Se=xe.name=="null";function Wt(me){if(Dt.findModeByName){var Xt=Dt.findModeByName(me);Xt&&(me=Xt.mime||Xt.mimes[0])}var Ue=Dt.getMode(ee,me);return Ue.name=="null"?null:Ue}Pe.highlightFormatting===void 0&&(Pe.highlightFormatting=!1),Pe.maxBlockquoteDepth===void 0&&(Pe.maxBlockquoteDepth=0),Pe.taskLists===void 0&&(Pe.taskLists=!1),Pe.strikethrough===void 0&&(Pe.strikethrough=!1),Pe.emoji===void 0&&(Pe.emoji=!1),Pe.fencedCodeBlockHighlighting===void 0&&(Pe.fencedCodeBlockHighlighting=!0),Pe.fencedCodeBlockDefaultMode===void 0&&(Pe.fencedCodeBlockDefaultMode="text/plain"),Pe.xml===void 0&&(Pe.xml=!0),Pe.tokenTypeOverrides===void 0&&(Pe.tokenTypeOverrides={});var se={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 ze in se)se.hasOwnProperty(ze)&&Pe.tokenTypeOverrides[ze]&&(se[ze]=Pe.tokenTypeOverrides[ze]);var ye=/^([*\-_])(?:\s*\1){2,}\s*$/,Nt=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,We=/^\[(x| )\](?=\s)/i,ie=Pe.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,Ne=/^ {0,3}(?:\={1,}|-{2,})\s*$/,bt=/^[^#!\[\]*_\\<>` "'(~:]+/,nt=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,et=/^\s*\[[^\]]+?\]:.*$/,ct=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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(me,Xt,Ue){return Xt.f=Xt.inline=Ue,Ue(me,Xt)}function mt(me,Xt,Ue){return Xt.f=Xt.block=Ue,Ue(me,Xt)}function St(me){return!me||!/\S/.test(me.string)}function Mt(me){if(me.linkTitle=!1,me.linkHref=!1,me.linkText=!1,me.em=!1,me.strong=!1,me.strikethrough=!1,me.quote=0,me.indentedCode=!1,me.f==Ht){var Xt=Se;if(!Xt){var Ue=Dt.innerMode(xe,me.htmlState);Xt=Ue.mode.name=="xml"&&Ue.state.tagStart===null&&!Ue.state.context&&Ue.state.tokenize.isInText}Xt&&(me.f=ge,me.block=zt,me.htmlState=null)}return me.trailingSpace=0,me.trailingSpaceNewLine=!1,me.prevLine=me.thisLine,me.thisLine={stream:null},null}function zt(me,Xt){var Ue=me.column()===Xt.indentation,Pn=St(Xt.prevLine.stream),Yn=Xt.indentedCode,Be=Xt.prevLine.hr,vn=Xt.list!==!1,Je=(Xt.listStack[Xt.listStack.length-1]||0)+3;Xt.indentedCode=!1;var An=Xt.indentation;if(Xt.indentationDiff===null&&(Xt.indentationDiff=Xt.indentation,vn)){for(Xt.list=null;An<Xt.listStack[Xt.listStack.length-1];)Xt.listStack.pop(),Xt.listStack.length?Xt.indentation=Xt.listStack[Xt.listStack.length-1]:Xt.list=!1;Xt.list!==!1&&(Xt.indentationDiff=An-Xt.listStack[Xt.listStack.length-1])}var we=!Pn&&!Be&&!Xt.prevLine.header&&(!vn||!Yn)&&!Xt.prevLine.fencedCodeEnd,sn=(Xt.list===!1||Be||Pn)&&Xt.indentation<=Je&&me.match(ye),ce=null;if(Xt.indentationDiff>=4&&(Yn||Xt.prevLine.fencedCodeEnd||Xt.prevLine.header||Pn))return me.skipToEnd(),Xt.indentedCode=!0,se.code;if(me.eatSpace())return null;if(Ue&&Xt.indentation<=Je&&(ce=me.match(ie))&&ce[1].length<=6)return Xt.quote=0,Xt.header=ce[1].length,Xt.thisLine.header=!0,Pe.highlightFormatting&&(Xt.formatting="header"),Xt.f=Xt.inline,jt(Xt);if(Xt.indentation<=Je&&me.eat(">"))return Xt.quote=Ue?1:Xt.quote+1,Pe.highlightFormatting&&(Xt.formatting="quote"),me.eatSpace(),jt(Xt);if(!sn&&!Xt.setext&&Ue&&Xt.indentation<=Je&&(ce=me.match(Nt))){var Nn=ce[1]?"ol":"ul";return Xt.indentation=An+me.current().length,Xt.list=!0,Xt.quote=0,Xt.listStack.push(Xt.indentation),Xt.em=!1,Xt.strong=!1,Xt.code=!1,Xt.strikethrough=!1,Pe.taskLists&&me.match(We,!1)&&(Xt.taskList=!0),Xt.f=Xt.inline,Pe.highlightFormatting&&(Xt.formatting=["list","list-"+Nn]),jt(Xt)}else{if(Ue&&Xt.indentation<=Je&&(ce=me.match(nt,!0)))return Xt.quote=0,Xt.fencedEndRE=new RegExp(ce[1]+"+ *$"),Xt.localMode=Pe.fencedCodeBlockHighlighting&&Wt(ce[2]||Pe.fencedCodeBlockDefaultMode),Xt.localMode&&(Xt.localState=Dt.startState(Xt.localMode)),Xt.f=Xt.block=qt,Pe.highlightFormatting&&(Xt.formatting="code-block"),Xt.code=-1,jt(Xt);if(Xt.setext||(!we||!vn)&&!Xt.quote&&Xt.list===!1&&!Xt.code&&!sn&&!et.test(me.string)&&(ce=me.lookAhead(1))&&(ce=ce.match(Ne)))return Xt.setext?(Xt.header=Xt.setext,Xt.setext=0,me.skipToEnd(),Pe.highlightFormatting&&(Xt.formatting="header")):(Xt.header=ce[0].charAt(0)=="="?1:2,Xt.setext=Xt.header),Xt.thisLine.header=!0,Xt.f=Xt.inline,jt(Xt);if(sn)return me.skipToEnd(),Xt.hr=!0,Xt.thisLine.hr=!0,se.hr;if(me.peek()==="[")return gt(me,Xt,Mn)}return gt(me,Xt,Xt.inline)}function Ht(me,Xt){var Ue=xe.token(me,Xt.htmlState);if(!Se){var Pn=Dt.innerMode(xe,Xt.htmlState);(Pn.mode.name=="xml"&&Pn.state.tagStart===null&&!Pn.state.context&&Pn.state.tokenize.isInText||Xt.md_inside&&me.current().indexOf(">")>-1)&&(Xt.f=ge,Xt.block=zt,Xt.htmlState=null)}return Ue}function qt(me,Xt){var Ue=Xt.listStack[Xt.listStack.length-1]||0,Pn=Xt.indentation<Ue,Yn=Ue+3;if(Xt.fencedEndRE&&Xt.indentation<=Yn&&(Pn||me.match(Xt.fencedEndRE))){Pe.highlightFormatting&&(Xt.formatting="code-block");var Be;return Pn||(Be=jt(Xt)),Xt.localMode=Xt.localState=null,Xt.block=zt,Xt.f=ge,Xt.fencedEndRE=null,Xt.code=0,Xt.thisLine.fencedCodeEnd=!0,Pn?mt(me,Xt,Xt.block):Be}else return Xt.localMode?Xt.localMode.token(me,Xt.localState):(me.skipToEnd(),se.code)}function jt(me){var Xt=[];if(me.formatting){Xt.push(se.formatting),typeof me.formatting=="string"&&(me.formatting=[me.formatting]);for(var Ue=0;Ue<me.formatting.length;Ue++)Xt.push(se.formatting+"-"+me.formatting[Ue]),me.formatting[Ue]==="header"&&Xt.push(se.formatting+"-"+me.formatting[Ue]+"-"+me.header),me.formatting[Ue]==="quote"&&(!Pe.maxBlockquoteDepth||Pe.maxBlockquoteDepth>=me.quote?Xt.push(se.formatting+"-"+me.formatting[Ue]+"-"+me.quote):Xt.push("error"))}if(me.taskOpen)return Xt.push("meta"),Xt.length?Xt.join(" "):null;if(me.taskClosed)return Xt.push("property"),Xt.length?Xt.join(" "):null;if(me.linkHref?Xt.push(se.linkHref,"url"):(me.strong&&Xt.push(se.strong),me.em&&Xt.push(se.em),me.strikethrough&&Xt.push(se.strikethrough),me.emoji&&Xt.push(se.emoji),me.linkText&&Xt.push(se.linkText),me.code&&Xt.push(se.code),me.image&&Xt.push(se.image),me.imageAltText&&Xt.push(se.imageAltText,"link"),me.imageMarker&&Xt.push(se.imageMarker)),me.header&&Xt.push(se.header,se.header+"-"+me.header),me.quote&&(Xt.push(se.quote),!Pe.maxBlockquoteDepth||Pe.maxBlockquoteDepth>=me.quote?Xt.push(se.quote+"-"+me.quote):Xt.push(se.quote+"-"+Pe.maxBlockquoteDepth)),me.list!==!1){var Pn=(me.listStack.length-1)%3;Pn?Pn===1?Xt.push(se.list2):Xt.push(se.list3):Xt.push(se.list1)}return me.trailingSpaceNewLine?Xt.push("trailing-space-new-line"):me.trailingSpace&&Xt.push("trailing-space-"+(me.trailingSpace%2?"a":"b")),Xt.length?Xt.join(" "):null}function Jt(me,Xt){if(me.match(bt,!0))return jt(Xt)}function ge(me,Xt){var Ue=Xt.text(me,Xt);if(typeof Ue!="undefined")return Ue;if(Xt.list)return Xt.list=null,jt(Xt);if(Xt.taskList){var Pn=me.match(We,!0)[1]===" ";return Pn?Xt.taskOpen=!0:Xt.taskClosed=!0,Pe.highlightFormatting&&(Xt.formatting="task"),Xt.taskList=!1,jt(Xt)}if(Xt.taskOpen=!1,Xt.taskClosed=!1,Xt.header&&me.match(/^#+$/,!0))return Pe.highlightFormatting&&(Xt.formatting="header"),jt(Xt);var Yn=me.next();if(Xt.linkTitle){Xt.linkTitle=!1;var Be=Yn;Yn==="("&&(Be=")"),Be=(Be+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var vn="^\\s*(?:[^"+Be+"\\\\]+|\\\\\\\\|\\\\.)"+Be;if(me.match(new RegExp(vn),!0))return se.linkHref}if(Yn==="`"){var Je=Xt.formatting;Pe.highlightFormatting&&(Xt.formatting="code"),me.eatWhile("`");var An=me.current().length;if(Xt.code==0&&(!Xt.quote||An==1))return Xt.code=An,jt(Xt);if(An==Xt.code){var we=jt(Xt);return Xt.code=0,we}else return Xt.formatting=Je,jt(Xt)}else if(Xt.code)return jt(Xt);if(Yn==="\\"&&(me.next(),Pe.highlightFormatting)){var sn=jt(Xt),ce=se.formatting+"-escape";return sn?sn+" "+ce:ce}if(Yn==="!"&&me.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Xt.imageMarker=!0,Xt.image=!0,Pe.highlightFormatting&&(Xt.formatting="image"),jt(Xt);if(Yn==="["&&Xt.imageMarker&&me.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Xt.imageMarker=!1,Xt.imageAltText=!0,Pe.highlightFormatting&&(Xt.formatting="image"),jt(Xt);if(Yn==="]"&&Xt.imageAltText){Pe.highlightFormatting&&(Xt.formatting="image");var sn=jt(Xt);return Xt.imageAltText=!1,Xt.image=!1,Xt.inline=Xt.f=Fe,sn}if(Yn==="["&&!Xt.image)return Xt.linkText&&me.match(/^.*?\]/)||(Xt.linkText=!0,Pe.highlightFormatting&&(Xt.formatting="link")),jt(Xt);if(Yn==="]"&&Xt.linkText){Pe.highlightFormatting&&(Xt.formatting="link");var sn=jt(Xt);return Xt.linkText=!1,Xt.inline=Xt.f=me.match(/\(.*?\)| ?\[.*?\]/,!1)?Fe:ge,sn}if(Yn==="<"&&me.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Xt.f=Xt.inline=he,Pe.highlightFormatting&&(Xt.formatting="link");var sn=jt(Xt);return sn?sn+=" ":sn="",sn+se.linkInline}if(Yn==="<"&&me.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Xt.f=Xt.inline=he,Pe.highlightFormatting&&(Xt.formatting="link");var sn=jt(Xt);return sn?sn+=" ":sn="",sn+se.linkEmail}if(Pe.xml&&Yn==="<"&&me.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Nn=me.string.indexOf(">",me.pos);if(Nn!=-1){var Ci=me.string.substring(me.start,Nn);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Ci)&&(Xt.md_inside=!0)}return me.backUp(1),Xt.htmlState=Dt.startState(xe),mt(me,Xt,Ht)}if(Pe.xml&&Yn==="<"&&me.match(/^\/\w*?>/))return Xt.md_inside=!1,"tag";if(Yn==="*"||Yn==="_"){for(var It=1,wt=me.pos==1?" ":me.string.charAt(me.pos-2);It<3&&me.eat(Yn);)It++;var xt=me.peek()||" ",Ft=!/\s/.test(xt)&&(!ct.test(xt)||/\s/.test(wt)||ct.test(wt)),Gt=!/\s/.test(wt)&&(!ct.test(wt)||/\s/.test(xt)||ct.test(xt)),kt=null,Yt=null;if(It%2&&(!Xt.em&&Ft&&(Yn==="*"||!Gt||ct.test(wt))?kt=!0:Xt.em==Yn&&Gt&&(Yn==="*"||!Ft||ct.test(xt))&&(kt=!1)),It>1&&(!Xt.strong&&Ft&&(Yn==="*"||!Gt||ct.test(wt))?Yt=!0:Xt.strong==Yn&&Gt&&(Yn==="*"||!Ft||ct.test(xt))&&(Yt=!1)),Yt!=null||kt!=null){Pe.highlightFormatting&&(Xt.formatting=kt==null?"strong":Yt==null?"em":"strong em"),kt===!0&&(Xt.em=Yn),Yt===!0&&(Xt.strong=Yn);var we=jt(Xt);return kt===!1&&(Xt.em=!1),Yt===!1&&(Xt.strong=!1),we}}else if(Yn===" "&&(me.eat("*")||me.eat("_"))){if(me.peek()===" ")return jt(Xt);me.backUp(1)}if(Pe.strikethrough){if(Yn==="~"&&me.eatWhile(Yn)){if(Xt.strikethrough){Pe.highlightFormatting&&(Xt.formatting="strikethrough");var we=jt(Xt);return Xt.strikethrough=!1,we}else if(me.match(/^[^\s]/,!1))return Xt.strikethrough=!0,Pe.highlightFormatting&&(Xt.formatting="strikethrough"),jt(Xt)}else if(Yn===" "&&me.match(/^~~/,!0)){if(me.peek()===" ")return jt(Xt);me.backUp(2)}}if(Pe.emoji&&Yn===":"&&me.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Xt.emoji=!0,Pe.highlightFormatting&&(Xt.formatting="emoji");var pe=jt(Xt);return Xt.emoji=!1,pe}return Yn===" "&&(me.match(/^ +$/,!1)?Xt.trailingSpace++:Xt.trailingSpace&&(Xt.trailingSpaceNewLine=!0)),jt(Xt)}function he(me,Xt){var Ue=me.next();if(Ue===">"){Xt.f=Xt.inline=ge,Pe.highlightFormatting&&(Xt.formatting="link");var Pn=jt(Xt);return Pn?Pn+=" ":Pn="",Pn+se.linkInline}return me.match(/^[^>]+/,!0),se.linkInline}function Fe(me,Xt){if(me.eatSpace())return null;var Ue=me.next();return Ue==="("||Ue==="["?(Xt.f=Xt.inline=Ke(Ue==="("?")":"]"),Pe.highlightFormatting&&(Xt.formatting="link-string"),Xt.linkHref=!0,jt(Xt)):"error"}var Re={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ke(me){return function(Xt,Ue){var Pn=Xt.next();if(Pn===me){Ue.f=Ue.inline=ge,Pe.highlightFormatting&&(Ue.formatting="link-string");var Yn=jt(Ue);return Ue.linkHref=!1,Yn}return Xt.match(Re[me]),Ue.linkHref=!0,jt(Ue)}}function Mn(me,Xt){return me.match(/^([^\]\\]|\\.)*\]:/,!1)?(Xt.f=tn,me.next(),Pe.highlightFormatting&&(Xt.formatting="link"),Xt.linkText=!0,jt(Xt)):gt(me,Xt,ge)}function tn(me,Xt){if(me.match(/^\]:/,!0)){Xt.f=Xt.inline=rn,Pe.highlightFormatting&&(Xt.formatting="link");var Ue=jt(Xt);return Xt.linkText=!1,Ue}return me.match(/^([^\]\\]|\\.)+/,!0),se.linkText}function rn(me,Xt){return me.eatSpace()?null:(me.match(/^[^\s]+/,!0),me.peek()===void 0?Xt.linkTitle=!0:me.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Xt.f=Xt.inline=ge,se.linkHref+" url")}var nn={startState:function(){return{f:zt,prevLine:{stream:null},thisLine:{stream:null},block:zt,htmlState:null,indentation:0,inline:ge,text:Jt,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(me){return{f:me.f,prevLine:me.prevLine,thisLine:me.thisLine,block:me.block,htmlState:me.htmlState&&Dt.copyState(xe,me.htmlState),indentation:me.indentation,localMode:me.localMode,localState:me.localMode?Dt.copyState(me.localMode,me.localState):null,inline:me.inline,text:me.text,formatting:!1,linkText:me.linkText,linkTitle:me.linkTitle,linkHref:me.linkHref,code:me.code,em:me.em,strong:me.strong,strikethrough:me.strikethrough,emoji:me.emoji,header:me.header,setext:me.setext,hr:me.hr,taskList:me.taskList,list:me.list,listStack:me.listStack.slice(0),quote:me.quote,indentedCode:me.indentedCode,trailingSpace:me.trailingSpace,trailingSpaceNewLine:me.trailingSpaceNewLine,md_inside:me.md_inside,fencedEndRE:me.fencedEndRE}},token:function(me,Xt){if(Xt.formatting=!1,me!=Xt.thisLine.stream){if(Xt.header=0,Xt.hr=!1,me.match(/^\s*$/,!0))return Mt(Xt),null;if(Xt.prevLine=Xt.thisLine,Xt.thisLine={stream:me},Xt.taskList=!1,Xt.trailingSpace=0,Xt.trailingSpaceNewLine=!1,!Xt.localState&&(Xt.f=Xt.block,Xt.f!=Ht)){var Ue=me.match(/^\s*/,!0)[0].replace(/\t/g,lt).length;if(Xt.indentation=Ue,Xt.indentationDiff=null,Ue>0)return null}}return Xt.f(me,Xt)},innerMode:function(me){return me.block==Ht?{state:me.htmlState,mode:xe}:me.localState?{state:me.localState,mode:me.localMode}:{state:me,mode:nn}},indent:function(me,Xt,Ue){return me.block==Ht&&xe.indent?xe.indent(me.htmlState,Xt,Ue):me.localState&&me.localMode.indent?me.localMode.indent(me.localState,Xt,Ue):Dt.Pass},blankLine:Mt,getType:jt,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return nn},"xml"),Dt.defineMIME("text/markdown","markdown"),Dt.defineMIME("text/x-markdown","markdown")})},98101:function(zn,oi,Ot){(function(Dt){Dt(Ot(89780))})(function(Dt){"use strict";Dt.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 ee=0;ee<Dt.modeInfo.length;ee++){var Pe=Dt.modeInfo[ee];Pe.mimes&&(Pe.mime=Pe.mimes[0])}Dt.findModeByMIME=function(xe){xe=xe.toLowerCase();for(var Se=0;Se<Dt.modeInfo.length;Se++){var Wt=Dt.modeInfo[Se];if(Wt.mime==xe)return Wt;if(Wt.mimes){for(var se=0;se<Wt.mimes.length;se++)if(Wt.mimes[se]==xe)return Wt}}if(/\+xml$/.test(xe))return Dt.findModeByMIME("application/xml");if(/\+json$/.test(xe))return Dt.findModeByMIME("application/json")},Dt.findModeByExtension=function(xe){xe=xe.toLowerCase();for(var Se=0;Se<Dt.modeInfo.length;Se++){var Wt=Dt.modeInfo[Se];if(Wt.ext){for(var se=0;se<Wt.ext.length;se++)if(Wt.ext[se]==xe)return Wt}}},Dt.findModeByFileName=function(xe){for(var Se=0;Se<Dt.modeInfo.length;Se++){var Wt=Dt.modeInfo[Se];if(Wt.file&&Wt.file.test(xe))return Wt}var se=xe.lastIndexOf("."),ze=se>-1&&xe.substring(se+1,xe.length);if(ze)return Dt.findModeByExtension(ze)},Dt.findModeByName=function(xe){xe=xe.toLowerCase();for(var Se=0;Se<Dt.modeInfo.length;Se++){var Wt=Dt.modeInfo[Se];if(Wt.name.toLowerCase()==xe)return Wt;if(Wt.alias){for(var se=0;se<Wt.alias.length;se++)if(Wt.alias[se].toLowerCase()==xe)return Wt}}}})},67549:function(zn,oi,Ot){(function(Dt){Dt(Ot(89780))})(function(Dt){"use strict";Dt.defineMode("stex",function(ee,Pe){"use strict";function xe(bt,nt){bt.cmdState.push(nt)}function Se(bt){return bt.cmdState.length>0?bt.cmdState[bt.cmdState.length-1]:null}function Wt(bt){var nt=bt.cmdState.pop();nt&&nt.closeBracket()}function se(bt){for(var nt=bt.cmdState,et=nt.length-1;et>=0;et--){var ct=nt[et];if(ct.name!="DEFAULT")return ct}return{styleIdentifier:function(){return null}}}function ze(bt,nt,et){return function(){this.name=bt,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 ye={};ye.importmodule=ze("importmodule","tag",["string","builtin"]),ye.documentclass=ze("documentclass","tag",["","atom"]),ye.usepackage=ze("usepackage","tag",["atom"]),ye.begin=ze("begin","tag",["atom"]),ye.end=ze("end","tag",["atom"]),ye.label=ze("label","tag",["atom"]),ye.ref=ze("ref","tag",["atom"]),ye.eqref=ze("eqref","tag",["atom"]),ye.cite=ze("cite","tag",["atom"]),ye.bibitem=ze("bibitem","tag",["atom"]),ye.Bibitem=ze("Bibitem","tag",["atom"]),ye.RBibitem=ze("RBibitem","tag",["atom"]),ye.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Nt(bt,nt){bt.f=nt}function We(bt,nt){var et;if(bt.match(/^\\[a-zA-Z@]+/)){var ct=bt.current().slice(1);return et=ye.hasOwnProperty(ct)?ye[ct]:ye.DEFAULT,et=new et,xe(nt,et),Nt(nt,Ne),et.style}if(bt.match(/^\\[$&%#{}_]/)||bt.match(/^\\[,;!\/\\]/))return"tag";if(bt.match("\\["))return Nt(nt,function(gt,mt){return ie(gt,mt,"\\]")}),"keyword";if(bt.match("\\("))return Nt(nt,function(gt,mt){return ie(gt,mt,"\\)")}),"keyword";if(bt.match("$$"))return Nt(nt,function(gt,mt){return ie(gt,mt,"$$")}),"keyword";if(bt.match("$"))return Nt(nt,function(gt,mt){return ie(gt,mt,"$")}),"keyword";var lt=bt.next();if(lt=="%")return bt.skipToEnd(),"comment";if(lt=="}"||lt=="]"){if(et=Se(nt),et)et.closeBracket(lt),Nt(nt,Ne);else return"error";return"bracket"}else return lt=="{"||lt=="["?(et=ye.DEFAULT,et=new et,xe(nt,et),"bracket"):/\d/.test(lt)?(bt.eatWhile(/[\w.%]/),"atom"):(bt.eatWhile(/[\w\-_]/),et=se(nt),et.name=="begin"&&(et.argument=bt.current()),et.styleIdentifier())}function ie(bt,nt,et){if(bt.eatSpace())return null;if(et&&bt.match(et))return Nt(nt,We),"keyword";if(bt.match(/^\\[a-zA-Z@]+/))return"tag";if(bt.match(/^[a-zA-Z]+/))return"variable-2";if(bt.match(/^\\[$&%#{}_]/)||bt.match(/^\\[,;!\/]/)||bt.match(/^[\^_&]/))return"tag";if(bt.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(bt.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ct=bt.next();return ct=="{"||ct=="}"||ct=="["||ct=="]"||ct=="("||ct==")"?"bracket":ct=="%"?(bt.skipToEnd(),"comment"):"error"}function Ne(bt,nt){var et=bt.peek(),ct;return et=="{"||et=="["?(ct=Se(nt),ct.openBracket(et),bt.eat(et),Nt(nt,We),"bracket"):/[ \t\r]/.test(et)?(bt.eat(et),null):(Nt(nt,We),Wt(nt),We(bt,nt))}return{startState:function(){var bt=Pe.inMathMode?function(nt,et){return ie(nt,et)}:We;return{cmdState:[],f:bt}},copyState:function(bt){return{cmdState:bt.cmdState.slice(),f:bt.f}},token:function(bt,nt){return nt.f(bt,nt)},blankLine:function(bt){bt.f=We,bt.cmdState.length=0},lineComment:"%"}}),Dt.defineMIME("text/x-stex","stex"),Dt.defineMIME("text/x-latex","stex")})},15525:function(zn,oi,Ot){(function(Dt){Dt(Ot(89780))})(function(Dt){"use strict";var ee={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},Pe={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};Dt.defineMode("xml",function(xe,Se){var Wt=xe.indentUnit,se={},ze=Se.htmlMode?ee:Pe;for(var ye in ze)se[ye]=ze[ye];for(var ye in Se)se[ye]=Se[ye];var Nt,We;function ie(he,Fe){function Re(tn){return Fe.tokenize=tn,tn(he,Fe)}var Ke=he.next();if(Ke=="<")return he.eat("!")?he.eat("[")?he.match("CDATA[")?Re(nt("atom","]]>")):null:he.match("--")?Re(nt("comment","-->")):he.match("DOCTYPE",!0,!0)?(he.eatWhile(/[\w\._\-]/),Re(et(1))):null:he.eat("?")?(he.eatWhile(/[\w\._\-]/),Fe.tokenize=nt("meta","?>"),"meta"):(Nt=he.eat("/")?"closeTag":"openTag",Fe.tokenize=Ne,"tag bracket");if(Ke=="&"){var Mn;return he.eat("#")?he.eat("x")?Mn=he.eatWhile(/[a-fA-F\d]/)&&he.eat(";"):Mn=he.eatWhile(/[\d]/)&&he.eat(";"):Mn=he.eatWhile(/[\w\.\-:]/)&&he.eat(";"),Mn?"atom":"error"}else return he.eatWhile(/[^&<]/),null}ie.isInText=!0;function Ne(he,Fe){var Re=he.next();if(Re==">"||Re=="/"&&he.eat(">"))return Fe.tokenize=ie,Nt=Re==">"?"endTag":"selfcloseTag","tag bracket";if(Re=="=")return Nt="equals",null;if(Re=="<"){Fe.tokenize=ie,Fe.state=mt,Fe.tagName=Fe.tagStart=null;var Ke=Fe.tokenize(he,Fe);return Ke?Ke+" tag error":"tag error"}else return/[\'\"]/.test(Re)?(Fe.tokenize=bt(Re),Fe.stringStartCol=he.column(),Fe.tokenize(he,Fe)):(he.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function bt(he){var Fe=function(Re,Ke){for(;!Re.eol();)if(Re.next()==he){Ke.tokenize=Ne;break}return"string"};return Fe.isInAttribute=!0,Fe}function nt(he,Fe){return function(Re,Ke){for(;!Re.eol();){if(Re.match(Fe)){Ke.tokenize=ie;break}Re.next()}return he}}function et(he){return function(Fe,Re){for(var Ke;(Ke=Fe.next())!=null;){if(Ke=="<")return Re.tokenize=et(he+1),Re.tokenize(Fe,Re);if(Ke==">")if(he==1){Re.tokenize=ie;break}else return Re.tokenize=et(he-1),Re.tokenize(Fe,Re)}return"meta"}}function ct(he,Fe,Re){this.prev=he.context,this.tagName=Fe,this.indent=he.indented,this.startOfLine=Re,(se.doNotIndent.hasOwnProperty(Fe)||he.context&&he.context.noIndent)&&(this.noIndent=!0)}function lt(he){he.context&&(he.context=he.context.prev)}function gt(he,Fe){for(var Re;;){if(!he.context||(Re=he.context.tagName,!se.contextGrabbers.hasOwnProperty(Re)||!se.contextGrabbers[Re].hasOwnProperty(Fe)))return;lt(he)}}function mt(he,Fe,Re){return he=="openTag"?(Re.tagStart=Fe.column(),St):he=="closeTag"?Mt:mt}function St(he,Fe,Re){return he=="word"?(Re.tagName=Fe.current(),We="tag",qt):se.allowMissingTagName&&he=="endTag"?(We="tag bracket",qt(he,Fe,Re)):(We="error",St)}function Mt(he,Fe,Re){if(he=="word"){var Ke=Fe.current();return Re.context&&Re.context.tagName!=Ke&&se.implicitlyClosed.hasOwnProperty(Re.context.tagName)&<(Re),Re.context&&Re.context.tagName==Ke||se.matchClosing===!1?(We="tag",zt):(We="tag error",Ht)}else return se.allowMissingTagName&&he=="endTag"?(We="tag bracket",zt(he,Fe,Re)):(We="error",Ht)}function zt(he,Fe,Re){return he!="endTag"?(We="error",zt):(lt(Re),mt)}function Ht(he,Fe,Re){return We="error",zt(he,Fe,Re)}function qt(he,Fe,Re){if(he=="word")return We="attribute",jt;if(he=="endTag"||he=="selfcloseTag"){var Ke=Re.tagName,Mn=Re.tagStart;return Re.tagName=Re.tagStart=null,he=="selfcloseTag"||se.autoSelfClosers.hasOwnProperty(Ke)?gt(Re,Ke):(gt(Re,Ke),Re.context=new ct(Re,Ke,Mn==Re.indented)),mt}return We="error",qt}function jt(he,Fe,Re){return he=="equals"?Jt:(se.allowMissing||(We="error"),qt(he,Fe,Re))}function Jt(he,Fe,Re){return he=="string"?ge:he=="word"&&se.allowUnquoted?(We="string",qt):(We="error",qt(he,Fe,Re))}function ge(he,Fe,Re){return he=="string"?ge:qt(he,Fe,Re)}return{startState:function(he){var Fe={tokenize:ie,state:mt,indented:he||0,tagName:null,tagStart:null,context:null};return he!=null&&(Fe.baseIndent=he),Fe},token:function(he,Fe){if(!Fe.tagName&&he.sol()&&(Fe.indented=he.indentation()),he.eatSpace())return null;Nt=null;var Re=Fe.tokenize(he,Fe);return(Re||Nt)&&Re!="comment"&&(We=null,Fe.state=Fe.state(Nt||Re,he,Fe),We&&(Re=We=="error"?Re+" error":We)),Re},indent:function(he,Fe,Re){var Ke=he.context;if(he.tokenize.isInAttribute)return he.tagStart==he.indented?he.stringStartCol+1:he.indented+Wt;if(Ke&&Ke.noIndent)return Dt.Pass;if(he.tokenize!=Ne&&he.tokenize!=ie)return Re?Re.match(/^(\s*)/)[0].length:0;if(he.tagName)return se.multilineTagIndentPastTag!==!1?he.tagStart+he.tagName.length+2:he.tagStart+Wt*(se.multilineTagIndentFactor||1);if(se.alignCDATA&&/<!\[CDATA\[/.test(Fe))return 0;var Mn=Fe&&/^<(\/)?([\w_:\.-]*)/.exec(Fe);if(Mn&&Mn[1])for(;Ke;)if(Ke.tagName==Mn[2]){Ke=Ke.prev;break}else if(se.implicitlyClosed.hasOwnProperty(Ke.tagName))Ke=Ke.prev;else break;else if(Mn)for(;Ke;){var tn=se.contextGrabbers[Ke.tagName];if(tn&&tn.hasOwnProperty(Mn[2]))Ke=Ke.prev;else break}for(;Ke&&Ke.prev&&!Ke.startOfLine;)Ke=Ke.prev;return Ke?Ke.indent+Wt:he.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:se.htmlMode?"html":"xml",helperType:se.htmlMode?"html":"xml",skipAttribute:function(he){he.state==Jt&&(he.state=qt)},xmlCurrentTag:function(he){return he.tagName?{name:he.tagName,close:he.type=="closeTag"}:null},xmlCurrentContext:function(he){for(var Fe=[],Re=he.context;Re;Re=Re.prev)Re.tagName&&Fe.push(Re.tagName);return Fe.reverse()}}}),Dt.defineMIME("text/xml","xml"),Dt.defineMIME("application/xml","xml"),Dt.mimeModes.hasOwnProperty("text/html")||Dt.defineMIME("text/html",{name:"xml",htmlMode:!0})})},12378:function(zn,oi,Ot){"use strict";Ot.d(oi,{$u:function(){return ye},BD:function(){return It},E9:function(){return ze},FF:function(){return Do},FJ:function(){return mt},Hn:function(){return gt},KX:function(){return Mt},NB:function(){return ve},S0:function(){return ce},UL:function(){return Nt},Vk:function(){return lt},Vm:function(){return Ee},YI:function(){return Nn},ZA:function(){return Pe},Zt:function(){return We},al:function(){return kt},bn:function(){return Gt},bx:function(){return wt},g2:function(){return Ci},h1:function(){return Jt},hD:function(){return Di},l4:function(){return Wt},rU:function(){return Ae},s_:function(){return xt},uz:function(){return on},z6:function(){return ie}}),zn=Ot.hmd(zn),function(){var Ct;function Zn(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function bn(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:Zn(a)}}function Pr(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var Er=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},Zi;if(typeof Object.setPrototypeOf=="function")Zi=Object.setPrototypeOf;else{var _r;t:{var ho={a:!0},br={};try{br.__proto__=ho,_r=br.a;break t}catch(a){}_r=!1}Zi=_r?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var $e=Zi;function Oe(a,y){if(a.prototype=Er(y.prototype),a.prototype.constructor=a,$e)$e(a,y);else for(var x in y)if(x!="prototype")if(Object.defineProperties){var E=Object.getOwnPropertyDescriptor(y,x);E&&Object.defineProperty(a,x,E)}else a[x]=y[x];a.QA=y.prototype}var Me=typeof Ot.g!="undefined"&&Ot.g!=null?Ot.g:self,Pi=typeof Object.assign=="function"?Object.assign:function(a,y){for(var x=1;x<arguments.length;x++){var E=arguments[x];if(E)for(var b in E)Object.prototype.hasOwnProperty.call(E,b)&&(a[b]=E[b])}return a},Vi=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function rr(a,y){if(y){var x=Me;a=a.split(".");for(var E=0;E<a.length-1;E++){var b=a[E];b in x||(x[b]={}),x=x[b]}a=a[a.length-1],E=x[a],y=y(E),y!=E&&y!=null&&Vi(x,a,{writable:!0,value:y})}}rr("Object.assign",function(a){return a||Pi}),rr("Array.prototype.fill",function(a){return a||function(y,x,E){var b=this.length||0;for(0>x&&(x=Math.max(0,b+x)),(E==null||E>b)&&(E=b),E=Number(E),0>E&&(E=Math.max(0,b+E)),x=Number(x||0);x<E;x++)this[x]=y;return this}});var Dn=typeof globalThis=="object"&&globalThis||typeof Ot.g=="object"&&Ot.g.global===Ot.g&&Ot.g||typeof self=="object"&&self.self===self&&self||{};Dn.requestAnimationFrame===void 0&&(Dn.setImmediate===void 0?Dn.requestAnimationFrame=function(a){Dn.setTimeout(a,0)}:Dn.requestAnimationFrame=Dn.setImmediate);function pi(){}function Ze(a,y){var x=-1;return function(){var E=this,b=arguments;x!==-1&&Dn.clearTimeout(x),x=je(function(){x=-1,a.apply(E,b)},y)}}function je(a,y){return Dn.setTimeout(a,y)}function mi(a){return Dn.document.createElement(a)}function $t(a){throw Error(a)}function pn(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),$t(a)}function ei(a,y,x,E){x=x===null?"*":typeof x=="string"?x:typeof x=="function"&&typeof x.className=="string"?x.className:"",E!==void 0&&(x+="."+E),$t(x+" is not in the range "+y+": "+a)}function Bi(a){Dn.console&&Dn.console.log(a)}function _e(a){return typeof a=="object"&&a!==null}function un(a){return Array.isArray(a)||Dn.NodeList&&a instanceof Dn.NodeList||Dn.HTMLCollection&&a instanceof Dn.HTMLCollection}function $n(a){return Array.prototype.slice.call(a)}function vi(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):$t("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function Oi(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):$t("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Ei(){var a=mo.pop();return a===void 0?[]:a}function ri(a){a.length=0,mo.push(a)}function bi(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(_e(a)&&a.constructor)return bi(a.constructor);return typeof a}function Sr(a){var y=a;return _e(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 mr(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 wr(a,y,x){Object.defineProperty(uo.prototype,a,{get:y,set:x})}function an(a){for(var y=[],x=0;256>x;x++)y["0123456789abcdef".charAt(x>>4)+"0123456789abcdef".charAt(x&15)]=String.fromCharCode(x);a.length%2&&(a="0"+a),x=[];for(var E=0,b=0;b<a.length;b+=2)x[E++]=y[a.substr(b,2)];for(a=x.join(""),a=a===""?"0":a,y=[],x=0;256>x;x++)y[x]=x;for(x=E=0;256>x;x++)E=(E+y[x]+119)%256,b=y[x],y[x]=y[E],y[E]=b;E=x=0;for(var z="",tt=0;tt<a.length;tt++)x=(x+1)%256,E=(E+y[x])%256,b=y[x],y[x]=y[E],y[E]=b,z+=String.fromCharCode(a.charCodeAt(tt)^y[(y[x]+y[E])%256]);return z.indexOf("GoJS 2.1 evaluation")>-1||z.indexOf("\xA9 1998-2021 Northwoods Software")>-1||z.indexOf("Not for distribution or production use")>-1||z.indexOf("gojs.net")>-1?"":z}var wo=Dn.navigator!==void 0&&0<Dn.navigator.userAgent.indexOf("Trident/7"),Ar=Dn.navigator!==void 0&&Dn.navigator.platform!==void 0&&Dn.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,mo=[];Object.freeze([]),pi.className="Util",pi.Dx="32ab5ff3b26f42dc0ed90f21472913b5",pi.adym="gojs.net",pi.vfo="28e645fdb266",pi.className="Util";function Ve(a,y,x){Ri(this),this.j=a,this.xa=y,this.o=x}Ve.prototype.toString=function(){return"EnumValue."+this.xa};function ni(a,y){return y==null||y===""?null:a[y]}Me.Object.defineProperties(Ve.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),Ve.className="EnumValue";function Ni(){this.ew=[]}Ni.prototype.toString=function(){return this.ew.join("")},Ni.prototype.add=function(a){a!==""&&this.ew.push(a)},Ni.className="StringBuilder";function Hi(){}Hi.className="PropertyCollection";var Ii={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){Dn.console&&Dn.console.log(a)},HA:function(a,y,x,E){a.strokeStyle="red",a.fillStyle="red",a.font="8px sans-serif",a.beginPath(),a.moveTo(-10,0),a.lineTo(10,0),a.moveTo(0,-10),a.lineTo(0,10),a.stroke(),a.setTransform(1,0,0,1,0,0),a.scale(x,x),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.lineWidth=2,a.beginPath(),a.moveTo(E.left,E.top+20),a.lineTo(E.left,E.top),a.lineTo(E.left+20,E.top),a.moveTo(E.right,E.bottom-20),a.lineTo(E.right,E.bottom),a.lineTo(E.right-20,E.bottom),a.stroke(),a.fillText("DB: "+Math.round(E.x)+", "+Math.round(E.y)+", "+Math.round(E.width)+", "+Math.round(E.height),E.left,E.top-5)},DA:function(a){var y={},x;for(x in a){if(y.x=x,y.x!=="licenseKey"){var E=a[y.x];if(E.prototype!==void 0){y.Zl=Object.getOwnPropertyNames(E.prototype);for(var b={Tj:0};b.Tj<y.Zl.length;b={Tj:b.Tj},b.Tj++){var z=Object.getOwnPropertyDescriptor(E.prototype,y.Zl[b.Tj]);z.get!==void 0&&z.set===void 0&&Object.defineProperty(E.prototype,y.Zl[b.Tj],{set:function(tt,rt){return function(){throw Error("Property "+tt.Zl[rt.Tj]+" of "+tt.x+" is read-only.")}}(y,b)})}}}y={Zl:y.Zl,x:y.x}}}};function Qi(){}Qi.prototype.reset=function(){},Qi.prototype.next=function(){return!1},Qi.prototype.Ad=function(){return!1},Qi.prototype.first=function(){return null},Qi.prototype.any=function(){return!1},Qi.prototype.all=function(){return!0},Qi.prototype.each=function(){return this},Qi.prototype.map=function(){return this},Qi.prototype.filter=function(){return this},Qi.prototype.de=function(){},Qi.prototype.toString=function(){return"EmptyIterator"},Me.Object.defineProperties(Qi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Qi.prototype.first=Qi.prototype.first,Qi.prototype.hasNext=Qi.prototype.Ad,Qi.prototype.next=Qi.prototype.next,Qi.prototype.reset=Qi.prototype.reset;var Or=null;Qi.className="EmptyIterator",Or=new Qi;function Lr(a){this.key=-1,this.value=a}Lr.prototype.reset=function(){this.key=-1},Lr.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},Lr.prototype.Ad=function(){return this.next()},Lr.prototype.first=function(){return this.key=0,this.value},Lr.prototype.any=function(a){return this.key=-1,a(this.value)},Lr.prototype.all=function(a){return this.key=-1,a(this.value)},Lr.prototype.each=function(a){return this.key=-1,a(this.value),this},Lr.prototype.map=function(a){return new Lr(a(this.value))},Lr.prototype.filter=function(a){return a(this.value)?new Lr(this.value):Or},Lr.prototype.de=function(){this.value=null},Lr.prototype.toString=function(){return"SingletonIterator("+this.value+")"},Me.Object.defineProperties(Lr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),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="SingletonIterator";function Nr(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}Nr.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},Nr.prototype.next=function(){var a=this.Bb;if(a.Ja!==this.qa&&0>this.key)return!1;a=a.s;var y=a.length,x=++this.Za,E=this.qf;if(E!==null)for(;x<y;){var b=a[x];if(E(b))return this.key=this.Za=x,this.value=b,!0;x++}else{if(x<y)return this.key=x,this.value=a[x],!0;this.de()}return!1},Nr.prototype.Ad=function(){return this.next()},Nr.prototype.first=function(){var a=this.Bb;this.qa=a.Ja,this.Za=0,a=a.s;var y=a.length,x=this.qf;if(x!==null){for(var E=0;E<y;){var b=a[E];if(x(b))return this.key=this.Za=E,this.value=b;E++}return null}return 0<y?(a=a[0],this.key=0,this.value=a):null},Nr.prototype.any=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];if((E===null||E(z))&&a(z))return!0}return!1},Nr.prototype.all=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];if((E===null||E(z))&&!a(z))return!1}return!0},Nr.prototype.each=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];(E===null||E(z))&&a(z)}return this},Nr.prototype.map=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var E=y.length,b=this.qf,z=0;z<E;z++){var tt=y[z];(b===null||b(tt))&&x.push(a(tt))}return a=new dn,a.s=x,a.xb(),a.iterator},Nr.prototype.filter=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var E=y.length,b=this.qf,z=0;z<E;z++){var tt=y[z];(b===null||b(tt))&&a(tt)&&x.push(tt)}return a=new dn,a.s=x,a.xb(),a.iterator},Nr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},Nr.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},Me.Object.defineProperties(Nr.prototype,{iterator:{get:function(){return this}},predicate:{get:function(){return this.qf},set:function(a){this.qf=a}},count:{get:function(){var a=this.qf;if(a!==null){for(var y=0,x=this.Bb.s,E=x.length,b=0;b<E;b++)a(x[b])&&y++;return y}return this.Bb.s.length}}}),Nr.prototype.first=Nr.prototype.first,Nr.prototype.hasNext=Nr.prototype.Ad,Nr.prototype.next=Nr.prototype.next,Nr.prototype.reset=Nr.prototype.reset,Nr.className="ListIterator";function Rr(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}Rr.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},Rr.prototype.next=function(){var a=this.Bb;if(a.Ja!==this.qa&&0>this.key)return!1;var y=--this.Za;return 0<=y?(this.key=y,this.value=a.s[y],!0):(this.de(),!1)},Rr.prototype.Ad=function(){return this.next()},Rr.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},Rr.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},Rr.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},Rr.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},Rr.prototype.map=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var E=y.length;for(this.Za=E,--E;0<=E;E--)x.push(a(y[E]));return a=new dn,a.s=x,a.xb(),a.iterator},Rr.prototype.filter=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var E=y.length;for(this.Za=E,--E;0<=E;E--){var b=y[E];a(b)&&x.push(b)}return a=new dn,a.s=x,a.xb(),a.iterator},Rr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},Rr.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Me.Object.defineProperties(Rr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),Rr.prototype.first=Rr.prototype.first,Rr.prototype.hasNext=Rr.prototype.Ad,Rr.prototype.next=Rr.prototype.next,Rr.prototype.reset=Rr.prototype.reset,Rr.className="ListIteratorBackwards";function dn(a){Ri(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&$t("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ct=dn.prototype,Ct.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return this._isFrozen=!1,this},Ct.toString=function(){return"List()#"+xr(this)},Ct.add=function(a){return a===null?this:(this._isFrozen&&pn(this,a),this.s.push(a),this.xb(),this)},Ct.push=function(a){this.add(a)},Ct.addAll=function(a){if(a===null)return this;this._isFrozen&&pn(this);var y=this.s;if(un(a))for(var x=a.length,E=0;E<x;E++)y.push(a[E]);else for(a=a.iterator;a.next();)y.push(a.value);return this.xb(),this},Ct.clear=function(){this._isFrozen&&pn(this),this.s.length=0,this.xb()},Ct.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},Ct.has=function(a){return this.contains(a)},Ct.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},Ct.M=function(a){var y=this.s;return(0>a||a>=y.length)&&ei(a,"0 <= i < length",dn,"elt:i"),y[a]},Ct.get=function(a){return this.M(a)},Ct.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&ei(a,"0 <= i < length",dn,"setElt:i"),this._isFrozen&&pn(this,a),x[a]=y},Ct.set=function(a,y){this.cd(a,y)},Ct.first=function(){var a=this.s;return a.length===0?null:a[0]},Ct.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},Ct.pop=function(){this._isFrozen&&pn(this);var a=this.s;return 0<a.length?a.pop():null},dn.prototype.any=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)if(a(y[E]))return!0;return!1},dn.prototype.all=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)if(!a(y[E]))return!1;return!0},dn.prototype.each=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)a(y[E]);return this},dn.prototype.map=function(a){for(var y=new dn,x=[],E=this.s,b=E.length,z=0;z<b;z++)x.push(a(E[z]));return y.s=x,y.xb(),y},dn.prototype.filter=function(a){for(var y=new dn,x=[],E=this.s,b=E.length,z=0;z<b;z++){var tt=E[z];a(tt)&&x.push(tt)}return y.s=x,y.xb(),y},Ct=dn.prototype,Ct.Gb=function(a,y){0>a&&ei(a,">= 0",dn,"insertAt:i"),this._isFrozen&&pn(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},Ct.remove=function(a){if(a===null)return!1;this._isFrozen&&pn(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)},Ct.delete=function(a){return this.remove(a)},Ct.mb=function(a){var y=this.s;(0>a||a>=y.length)&&ei(a,"0 <= i < length",dn,"removeAt:i"),this._isFrozen&&pn(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},Ct.removeRange=function(a,y){var x=this.s,E=x.length;if(0>a)a=0;else if(a>=E)return this;if(0>y)return this;if(y>=E&&(y=E-1),a>y)return this;this._isFrozen&&pn(this);for(var b=a,z=y+1;z<E;)x[b++]=x[z++];return x.length=E-(y-a+1),this.xb(),this},dn.prototype.copy=function(){var a=new dn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},Ct=dn.prototype,Ct.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),E=0;E<y;E++)x[E]=a[E];return x},Ct.Iv=function(){for(var a=new cn,y=this.s,x=this.count,E=0;E<x;E++)a.add(y[E]);return a},Ct.sort=function(a){return this._isFrozen&&pn(this),this.s.sort(a),this.xb(),this},Ct.zi=function(a,y,x){var E=this.s,b=E.length;y===void 0&&(y=0),x===void 0&&(x=b),this._isFrozen&&pn(this);var z=x-y;if(1>=z)return this;if((0>y||y>=b-1)&&ei(y,"0 <= from < length",dn,"sortRange:from"),z===2)return x=E[y],b=E[y+1],0<a(x,b)&&(E[y]=b,E[y+1]=x,this.xb()),this;if(y===0)if(x>=b)E.sort(a);else for(y=E.slice(0,x),y.sort(a),a=0;a<x;a++)E[a]=y[a];else if(x>=b)for(x=E.slice(y),x.sort(a),a=y;a<b;a++)E[a]=x[a-y];else for(b=E.slice(y,x),b.sort(a),a=y;a<x;a++)E[a]=b[a-y];return this.xb(),this},Ct.reverse=function(){return this._isFrozen&&pn(this),this.s.reverse(),this.xb(),this},Me.Object.defineProperties(dn.prototype,{_dataArray:{get:function(){return this.s}},count:{get:function(){return this.s.length}},size:{get:function(){return this.s.length}},length:{get:function(){return this.s.length}},iterator:{get:function(){if(0>=this.s.length)return Or;var a=this.Sa;return a!==null?(a.reset(),a):new Nr(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return Or;var a=this.Hg;return a!==null?(a.reset(),a):new Rr(this)}}}),dn.prototype.reverse=dn.prototype.reverse,dn.prototype.sortRange=dn.prototype.zi,dn.prototype.sort=dn.prototype.sort,dn.prototype.toSet=dn.prototype.Iv,dn.prototype.toArray=dn.prototype.Fa,dn.prototype.removeRange=dn.prototype.removeRange,dn.prototype.removeAt=dn.prototype.mb,dn.prototype.delete=dn.prototype.delete,dn.prototype.remove=dn.prototype.remove,dn.prototype.insertAt=dn.prototype.Gb,dn.prototype.pop=dn.prototype.pop,dn.prototype.last=dn.prototype.jc,dn.prototype.first=dn.prototype.first,dn.prototype.set=dn.prototype.set,dn.prototype.setElt=dn.prototype.cd,dn.prototype.get=dn.prototype.get,dn.prototype.elt=dn.prototype.M,dn.prototype.indexOf=dn.prototype.indexOf,dn.prototype.has=dn.prototype.has,dn.prototype.contains=dn.prototype.contains,dn.prototype.clear=dn.prototype.clear,dn.prototype.addAll=dn.prototype.addAll,dn.prototype.push=dn.prototype.push,dn.prototype.add=dn.prototype.add,dn.prototype.thaw=dn.prototype.ka,dn.prototype.freeze=dn.prototype.freeze,dn.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 dn;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 dn;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),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"},Me.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 cn(a){Ri(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&$t("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ct=cn.prototype,Ct.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return this._isFrozen=!1,this},Ct.toString=function(){return"Set()#"+xr(this)},Ct.add=function(a){if(a===null)return this;this._isFrozen&&pn(this,a);var y=a;return _e(a)&&(y=_i(a)),this.Tb[y]===void 0&&(this.Sb++,a=new Te(a,a),this.Tb[y]=a,y=this.kf,y===null?this.ea=a:(a.ll=y,y.va=a),this.kf=a,this.xb()),this},Ct.addAll=function(a){if(a===null)return this;if(this._isFrozen&&pn(this),un(a))for(var y=a.length,x=0;x<y;x++)this.add(a[x]);else for(a=a.iterator;a.next();)this.add(a.value);return this},Ct.contains=function(a){if(a===null)return!1;var y=a;return _e(a)&&(y=xr(a),y===void 0)?!1:this.Tb[y]!==void 0},Ct.has=function(a){return this.contains(a)},Ct.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},Ct.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},Ct.first=function(){var a=this.ea;return a===null?null:a.value},cn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},cn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},cn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},cn.prototype.map=function(a){for(var y=new cn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},cn.prototype.filter=function(a){for(var y=new cn,x=this.ea;x!==null;){var E=x.value;a(E)&&y.add(E),x=x.va}return y},Ct=cn.prototype,Ct.remove=function(a){if(a===null)return!1;this._isFrozen&&pn(this,a);var y=a;if(_e(a)&&(y=xr(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,E=a.ll;return x!==null&&(x.ll=E),E!==null&&(E.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=E),delete this.Tb[y],this.Sb--,this.xb(),!0},Ct.delete=function(a){return this.remove(a)},Ct.hp=function(a){if(a===null)return this;if(this._isFrozen&&pn(this),un(a))for(var y=a.length,x=0;x<y;x++)this.remove(a[x]);else for(a=a.iterator;a.next();)this.remove(a.value);return this},Ct.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&pn(this);var y=new cn;y.addAll(a),a=[];for(var x=this.iterator;x.next();){var E=x.value;y.contains(E)||a.push(E)}return this.hp(a),this},Ct.clear=function(){this._isFrozen&&pn(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},cn.prototype.copy=function(){var a=new cn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},cn.prototype.Fa=function(){var a=Array(this.Sb),y=this.Tb,x=0,E;for(E in y)a[x]=y[E].value,x++;return a},cn.prototype.Hv=function(){var a=new dn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function Ri(a){a.__gohashid=zo++}function _i(a){var y=a.__gohashid;return y===void 0&&(y=zo++,a.__gohashid=y),y}function xr(a){return a.__gohashid}Me.Object.defineProperties(cn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return Or;var a=this.Sa;return a!==null?(a.reset(),a):new $r(this)}}}),cn.prototype.toList=cn.prototype.Hv,cn.prototype.toArray=cn.prototype.Fa,cn.prototype.clear=cn.prototype.clear,cn.prototype.retainAll=cn.prototype.pA,cn.prototype.removeAll=cn.prototype.hp,cn.prototype.delete=cn.prototype.delete,cn.prototype.remove=cn.prototype.remove,cn.prototype.first=cn.prototype.first,cn.prototype.containsAny=cn.prototype.Ty,cn.prototype.containsAll=cn.prototype.Sy,cn.prototype.has=cn.prototype.has,cn.prototype.contains=cn.prototype.contains,cn.prototype.addAll=cn.prototype.addAll,cn.prototype.add=cn.prototype.add,cn.prototype.thaw=cn.prototype.ka,cn.prototype.freeze=cn.prototype.freeze;var zo=1;cn.className="Set",cn.uniqueHash=Ri,cn.hashIdUnique=_i,cn.hashId=xr;function Mo(a){this.ma=a,this.qa=a.Ja,this.sa=null}Mo.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},Mo.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)},Mo.prototype.Ad=function(){return this.next()},Mo.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},Mo.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},Mo.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},Mo.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},Mo.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new dn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},Mo.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new dn;for(y=y.ea;y!==null;){var E=y.key;a(E)&&x.add(E),y=y.va}return x.iterator},Mo.prototype.de=function(){this.value=this.key=null,this.qa=-1},Mo.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Me.Object.defineProperties(Mo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),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="MapKeySetIterator";function qr(a){cn.call(this),Ri(this),this._isFrozen=!0,this.ma=a}Oe(qr,cn),Ct=qr.prototype,Ct.freeze=function(){return this},Ct.ka=function(){return this},Ct.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Ct.add=function(){$t("This Set is read-only: "+this.toString())},Ct.contains=function(a){return this.ma.contains(a)},Ct.has=function(a){return this.contains(a)},Ct.remove=function(){$t("This Set is read-only: "+this.toString())},Ct.delete=function(a){return this.remove(a)},Ct.clear=function(){$t("This Set is read-only: "+this.toString())},Ct.first=function(){var a=this.ma.ea;return a!==null?a.key:null},qr.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},qr.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},qr.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},qr.prototype.map=function(a){for(var y=new cn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},qr.prototype.filter=function(a){for(var y=new cn,x=this.ma.ea;x!==null;){var E=x.key;a(E)&&y.add(E),x=x.va}return y},qr.prototype.copy=function(){return new qr(this.ma)},qr.prototype.Iv=function(){var a=new cn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},qr.prototype.Fa=function(){var a=this.ma.Tb,y=Array(this.ma.Sb),x=0,E;for(E in a)y[x]=a[E].key,x++;return y},qr.prototype.Hv=function(){var a=new dn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Me.Object.defineProperties(qr.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?Or:new Mo(this.ma)}}}),qr.prototype.toList=qr.prototype.Hv,qr.prototype.toArray=qr.prototype.Fa,qr.prototype.toSet=qr.prototype.Iv,qr.prototype.first=qr.prototype.first,qr.prototype.clear=qr.prototype.clear,qr.prototype.delete=qr.prototype.delete,qr.prototype.remove=qr.prototype.remove,qr.prototype.has=qr.prototype.has,qr.prototype.contains=qr.prototype.contains,qr.prototype.add=qr.prototype.add,qr.prototype.thaw=qr.prototype.ka,qr.prototype.freeze=qr.prototype.freeze,qr.className="MapKeySet";function vo(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}vo.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},vo.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)},vo.prototype.Ad=function(){return this.next()},vo.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},vo.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},vo.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},vo.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},vo.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new dn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},vo.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new dn;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},vo.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},vo.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Me.Object.defineProperties(vo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),vo.prototype.first=vo.prototype.first,vo.prototype.hasNext=vo.prototype.Ad,vo.prototype.next=vo.prototype.next,vo.prototype.reset=vo.prototype.reset,vo.className="MapValueSetIterator";function Te(a,y){this.key=a,this.value=y,this.ll=this.va=null}Te.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},Te.className="KeyValuePair";function hn(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}hn.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},hn.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)},hn.prototype.Ad=function(){return this.next()},hn.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},hn.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},hn.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},hn.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},hn.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new dn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},hn.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new dn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},hn.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},hn.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Me.Object.defineProperties(hn.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),hn.prototype.first=hn.prototype.first,hn.prototype.hasNext=hn.prototype.Ad,hn.prototype.next=hn.prototype.next,hn.prototype.reset=hn.prototype.reset,hn.className="MapIterator";function be(a){Ri(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"&&$t("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ct=be.prototype,Ct.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return this._isFrozen=!1,this},Ct.toString=function(){return"Map()#"+xr(this)},Ct.add=function(a,y){this._isFrozen&&pn(this,a);var x=a;_e(a)&&(x=_i(a));var E=this.Tb[x];return E===void 0?(this.Sb++,a=new Te(a,y),this.Tb[x]=a,x=this.kf,x===null?this.ea=a:(a.ll=x,x.va=a),this.kf=a,this.xb()):E.value=y,this},Ct.set=function(a,y){return this.add(a,y)},Ct.addAll=function(a){if(a===null)return this;if(un(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];this.add(E.key,E.value)}else if(a instanceof be)for(a=a.iterator;a.next();)this.add(a.key,a.value);else for(a=a.iterator;a.next();)y=a.value,this.add(y.key,y.value);return this},Ct.first=function(){return this.ea},be.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},be.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},be.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},be.prototype.map=function(a){for(var y=new be,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},be.prototype.filter=function(a){for(var y=new be,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},Ct=be.prototype,Ct.contains=function(a){var y=a;return _e(a)&&(y=xr(a),y===void 0)?!1:this.Tb[y]!==void 0},Ct.has=function(a){return this.contains(a)},Ct.I=function(a){var y=a;return _e(a)&&(y=xr(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},Ct.get=function(a){return this.I(a)},Ct.remove=function(a){if(a===null)return!1;this._isFrozen&&pn(this,a);var y=a;if(_e(a)&&(y=xr(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,E=a.ll;return x!==null&&(x.ll=E),E!==null&&(E.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=E),delete this.Tb[y],this.Sb--,this.xb(),!0},Ct.delete=function(a){return this.remove(a)},Ct.clear=function(){this._isFrozen&&pn(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.jf!==null&&this.jf.reset(),this.kf=this.ea=null,this.xb()},be.prototype.copy=function(){var a=new be,y=this.Tb,x;for(x in y){var E=y[x];a.add(E.key,E.value)}return a},be.prototype.Fa=function(){var a=this.Tb,y=Array(this.Sb),x=0,E;for(E in a){var b=a[E];y[x]=new Te(b.key,b.value),x++}return y},be.prototype.Lf=function(){return new qr(this)},Me.Object.defineProperties(be.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return Or;var a=this.Sa;return a!==null?(a.reset(),a):new hn(this)}},iteratorKeys:{get:function(){return 0>=this.count?Or:new Mo(this)}},iteratorValues:{get:function(){if(0>=this.count)return Or;var a=this.jf;return a!==null?(a.reset(),a):new vo(this)}}}),be.prototype.toKeySet=be.prototype.Lf,be.prototype.toArray=be.prototype.Fa,be.prototype.clear=be.prototype.clear,be.prototype.delete=be.prototype.delete,be.prototype.remove=be.prototype.remove,be.prototype.get=be.prototype.get,be.prototype.getValue=be.prototype.I,be.prototype.has=be.prototype.has,be.prototype.contains=be.prototype.contains,be.prototype.first=be.prototype.first,be.prototype.addAll=be.prototype.addAll,be.prototype.set=be.prototype.set,be.prototype.add=be.prototype.add,be.prototype.thaw=be.prototype.ka,be.prototype.freeze=be.prototype.freeze,be.className="Map";function Tt(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):$t("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Wn,Fn,Xn,si,wi;Tt.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},Tt.prototype.h=function(a,y){return this.x=a,this.y=y,this},Tt.prototype.sg=function(a,y){return this.x=a,this.y=y,this},Tt.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},Tt.prototype.copy=function(){var a=new Tt;return a.x=this.x,a.y=this.y,a},Ct=Tt.prototype,Ct.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ct.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return Object.isFrozen(this)&&$t("cannot thaw constant: "+this),this._isFrozen=!1,this};function yn(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;return(E=a[y++])&&(b=parseFloat(E)),new Tt(x,b)}return new Tt}function Vn(a){return a.x.toString()+" "+a.y.toString()}Ct.toString=function(){return"Point("+this.x+","+this.y+")"},Ct.D=function(a){return a instanceof Tt?this.x===a.x&&this.y===a.y:!1},Ct.hi=function(a,y){return this.x===a&&this.y===y},Ct.Xa=function(a){return le.B(this.x,a.x)&&le.B(this.y,a.y)},Ct.add=function(a){return this.x+=a.x,this.y+=a.y,this},Ct.re=function(a){return this.x-=a.x,this.y-=a.y,this},Ct.offset=function(a,y){return this.x+=a,this.y+=y,this},Tt.prototype.rotate=function(a){if(a===0)return this;var y=this.x,x=this.y;if(y===0&&x===0)return this;if(360<=a?a-=360:0>a&&(a+=360),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));return this.x=a*y-E*x,this.y=E*y+a*x,this},Ct=Tt.prototype,Ct.scale=function(a,y){return this.x*=a,this.y*=y,this},Ct.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},Ct.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},Ct.normalize=function(){var a=this.x,y=this.y,x=Math.sqrt(a*a+y*y);return 0<x&&(this.x=a/x,this.y=y/x),this},Ct.ab=function(a){return Kn(a.x-this.x,a.y-this.y)},Ct.direction=function(a,y){return Kn(a-this.x,y-this.y)};function Kn(a,y){if(a===0)return 0<y?90:0>y?270:0;if(y===0)return 0<a?0:180;if(isNaN(a)||isNaN(y))return 0;var x=180*Math.atan(Math.abs(y/a))/Math.PI;return 0>a?x=0>y?x+180:180-x:0>y&&(x=360-x),x}Ct.Ry=function(a,y){return le.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Ct.fA=function(a,y,x,E){return le.qh(a,y,x,E,this.x,this.y,this),this},Ct.gA=function(a,y){return le.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Ct.uA=function(a,y,x,E){return le.No(this.x,this.y,a,y,x,E,this),this},Ct.vA=function(a,y){return le.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},Ct.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},Ct.yi=function(a,y,x,E,b){return this.x=a+b.x*x+b.offsetX,this.y=y+b.y*E+b.offsetY,this},Ct.transform=function(a){return a.Ga(this),this};function Jn(a,y){return y.Cd(a),a}function Qn(a,y,x,E,b,z){var tt=b-x,rt=z-E,ot=tt*tt+rt*rt;x-=a,E-=y;var st=-x*tt-E*rt;return 0>=st||st>=ot?(tt=b-a,rt=z-y,Math.min(x*x+E*E,tt*tt+rt*rt)):(a=tt*E-rt*x,a*a/ot)}function Gi(a,y,x,E){return a=x-a,y=E-y,a*a+y*y}function At(a,y,x,E){return a=x-a,y=E-y,a===0?0<y?90:0>y?270:0:y===0?0<a?0:180:isNaN(a)||isNaN(y)?0:(E=180*Math.atan(Math.abs(y/a))/Math.PI,0>a?E=0>y?E+180:180-E:0>y&&(E=360-E),E)}Ct.w=function(){return isFinite(this.x)&&isFinite(this.y)},Tt.alloc=function(){var a=re.pop();return a===void 0?new Tt:a},Tt.allocAt=function(a,y){var x=re.pop();return x===void 0?new Tt(a,y):(x.x=a,x.y=y,x)},Tt.free=function(a){re.push(a)},Tt.prototype.isReal=Tt.prototype.w,Tt.prototype.setSpot=Tt.prototype.yi,Tt.prototype.setRectSpot=Tt.prototype.xi,Tt.prototype.snapToGridPoint=Tt.prototype.vA,Tt.prototype.snapToGrid=Tt.prototype.uA,Tt.prototype.projectOntoLineSegmentPoint=Tt.prototype.gA,Tt.prototype.projectOntoLineSegment=Tt.prototype.fA,Tt.intersectingLineSegments=function(a,y,x,E,b,z,tt,rt){return le.Rl(a,y,x,E,b,z,tt,rt)},Tt.prototype.compareWithLineSegmentPoint=Tt.prototype.Ry,Tt.compareWithLineSegment=function(a,y,x,E,b,z){return le.Fl(a,y,x,E,b,z)},Tt.prototype.direction=Tt.prototype.direction,Tt.prototype.directionPoint=Tt.prototype.ab,Tt.prototype.normalize=Tt.prototype.normalize,Tt.prototype.distanceSquared=Tt.prototype.zd,Tt.prototype.distanceSquaredPoint=Tt.prototype.Bf,Tt.prototype.scale=Tt.prototype.scale,Tt.prototype.rotate=Tt.prototype.rotate,Tt.prototype.offset=Tt.prototype.offset,Tt.prototype.subtract=Tt.prototype.re,Tt.prototype.add=Tt.prototype.add,Tt.prototype.equalsApprox=Tt.prototype.Xa,Tt.prototype.equalTo=Tt.prototype.hi,Tt.prototype.equals=Tt.prototype.D,Tt.prototype.set=Tt.prototype.set,Tt.prototype.setTo=Tt.prototype.sg;var re=[];Tt.className="Point",Tt.parse=yn,Tt.stringify=Vn,Tt.distanceLineSegmentSquared=Qn,Tt.distanceSquared=Gi,Tt.direction=At,Tt.Origin=Wn=new Tt(0,0).ja(),Tt.InfiniteTopLeft=Fn=new Tt(-1/0,-1/0).ja(),Tt.InfiniteBottomRight=Xn=new Tt(1/0,1/0).ja(),Tt.SixPoint=si=new Tt(6,6).ja(),Tt.NoPoint=wi=new Tt(NaN,NaN).ja(),Tt.parse=yn,Tt.stringify=Vn,Tt.distanceLineSegmentSquared=Qn,Tt.distanceSquared=Gi,Tt.direction=At;function Ut(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):$t("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var oe,fe,De,He,Ye,Sn,xn;Ut.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},Ut.prototype.h=function(a,y){return this.width=a,this.height=y,this},Ut.prototype.sg=function(a,y){return this.width=a,this.height=y,this},Ut.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},Ut.prototype.copy=function(){var a=new Ut;return a.width=this.width,a.height=this.height,a},Ct=Ut.prototype,Ct.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ct.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return Object.isFrozen(this)&&$t("cannot thaw constant: "+this),this._isFrozen=!1,this};function Qe(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;return(E=a[y++])&&(b=parseFloat(E)),new Ut(x,b)}return new Ut}function jn(a){return a.width.toString()+" "+a.height.toString()}Ct.toString=function(){return"Size("+this.width+","+this.height+")"},Ct.D=function(a){return a instanceof Ut?this.width===a.width&&this.height===a.height:!1},Ct.hi=function(a,y){return this.width===a&&this.height===y},Ct.Xa=function(a){return le.B(this.width,a.width)&&le.B(this.height,a.height)},Ct.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},Ct.w=function(){return isFinite(this.width)&&isFinite(this.height)},Ut.alloc=function(){var a=hi.pop();return a===void 0?new Ut:a},Ut.free=function(a){hi.push(a)},Ut.prototype.isReal=Ut.prototype.w,Ut.prototype.inflate=Ut.prototype.Bc,Ut.prototype.equalsApprox=Ut.prototype.Xa,Ut.prototype.equalTo=Ut.prototype.hi,Ut.prototype.equals=Ut.prototype.D,Ut.prototype.set=Ut.prototype.set,Ut.prototype.setTo=Ut.prototype.sg;var hi=[];Ut.className="Size",Ut.parse=Qe,Ut.stringify=jn,Ut.ZeroSize=oe=new Ut(0,0).ja(),Ut.OneSize=fe=new Ut(1,1).ja(),Ut.SixSize=De=new Ut(6,6).ja(),Ut.EightSize=He=new Ut(8,8).ja(),Ut.TenSize=Ye=new Ut(10,10).ja(),Ut.InfiniteSize=Sn=new Ut(1/0,1/0).ja(),Ut.NoSize=xn=new Ut(NaN,NaN).ja(),Ut.parse=Qe,Ut.stringify=jn;function ae(a,y,x,E){a===void 0?this.height=this.width=this.y=this.x=0:typeof a=="number"&&typeof y=="number"&&typeof x=="number"&&(0<=x||isNaN(x))&&typeof E=="number"&&(0<=E||isNaN(E))?(this.x=a,this.y=y,this.width=x,this.height=E):a instanceof Tt?(x=a.x,a=a.y,y instanceof Tt?(E=y.x,y=y.y,this.x=Math.min(x,E),this.y=Math.min(a,y),this.width=Math.abs(x-E),this.height=Math.abs(a-y)):y instanceof Ut?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):$t("Incorrect second argument supplied to Rect constructor "+y)):$t("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Ct=ae.prototype,Ct.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Ct.h=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this};function En(a,y,x){a.width=y,a.height=x}Ct.sg=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this},Ct.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Ct.dd=function(a){return this.x=a.x,this.y=a.y,this},Ct.tA=function(a){return this.width=a.width,this.height=a.height,this},ae.prototype.copy=function(){var a=new ae;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Ct=ae.prototype,Ct.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ct.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return Object.isFrozen(this)&&$t("cannot thaw constant: "+this),this._isFrozen=!1,this};function Tn(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;(E=a[y++])&&(b=parseFloat(E));for(var z=0;a[y]==="";)y++;(E=a[y++])&&(z=parseFloat(E));for(var tt=0;a[y]==="";)y++;return(E=a[y++])&&(tt=parseFloat(E)),new ae(x,b,z,tt)}return new ae}function wn(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}Ct.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},Ct.D=function(a){return a instanceof ae?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},Ct.hi=function(a,y,x,E){return this.x===a&&this.y===y&&this.width===x&&this.height===E},Ct.Xa=function(a){return le.B(this.x,a.x)&&le.B(this.y,a.y)&&le.B(this.width,a.width)&&le.B(this.height,a.height)};function Bn(a,y){return le.$(a.x,y.x)&&le.$(a.y,y.y)&&le.$(a.width,y.width)&&le.$(a.height,y.height)}Ct.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},Ct.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},Ct.contains=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),this.x<=a&&a+x<=this.x+this.width&&this.y<=y&&y+E<=this.y+this.height},Ct.offset=function(a,y){return this.x+=a,this.y+=y,this},Ct.Bc=function(a,y){return Rn(this,y,a,y,a)},Ct.Co=function(a){return Rn(this,a.top,a.right,a.bottom,a.left)},Ct.Fv=function(a){return Rn(this,-a.top,-a.right,-a.bottom,-a.left)},Ct.Hz=function(a,y,x,E){return Rn(this,a,y,x,E)};function Rn(a,y,x,E,b){var z=a.width;return x+b<=-z?(a.x+=z/2,a.width=0):(a.x-=b,a.width+=x+b),x=a.height,y+E<=-x?(a.y+=x/2,a.height=0):(a.y-=y,a.height+=y+E),a}Ct.Ex=function(a){return di(this,a.x,a.y,a.width,a.height)},Ct.Uu=function(a,y,x,E){return di(this,a,y,x,E)};function di(a,y,x,E,b){var z=Math.max(a.x,y),tt=Math.max(a.y,x);return y=Math.min(a.x+a.width,y+E),x=Math.min(a.y+a.height,x+b),a.x=z,a.y=tt,a.width=Math.max(0,y-z),a.height=Math.max(0,x-tt),a}Ct.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},Ct.Vu=function(a,y,x,E){var b=this.width,z=this.x;return b!==1/0&&x!==1/0&&(b+=z,x+=a,isNaN(x)||isNaN(b)||z>x||a>b)?!1:(a=this.height,x=this.y,!(a!==1/0&&E!==1/0&&(a+=x,E+=y,isNaN(E)||isNaN(a)||x>E||y>a)))};function qn(a,y){var x=a.width,E=a.x,b=y.x-10;return E>y.width+10+10+b||b>x+E?!1:(x=a.height,a=a.y,E=y.y-10,!(a>y.height+10+10+E||E>x+a))}Ct.Ye=function(a){return ui(this,a.x,a.y,0,0)},Ct.ed=function(a){return ui(this,a.x,a.y,a.width,a.height)},Ct.Kv=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),ui(this,a,y,x,E)};function ui(a,y,x,E,b){var z=Math.min(a.x,y),tt=Math.min(a.y,x);return y=Math.max(a.x+a.width,y+E),x=Math.max(a.y+a.height,x+b),a.x=z,a.y=tt,a.width=y-z,a.height=x-tt,a}Ct.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 ci(a,y,x,E,b,z,tt,rt){return tt===void 0&&(tt=0),rt===void 0&&(rt=0),a<=b&&b+tt<=a+x&&y<=z&&z+rt<=y+E}function zi(a,y,x,E,b,z,tt,rt){return a>tt+b||b>x+a?!1:!(y>rt+z||z>E+y)}Ct.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Ct.Mz=function(){return this.width===0&&this.height===0},ae.alloc=function(){var a=yr.pop();return a===void 0?new ae:a},ae.allocAt=function(a,y,x,E){var b=yr.pop();return b===void 0?new ae(a,y,x,E):b.h(a,y,x,E)},ae.free=function(a){yr.push(a)},Me.Object.defineProperties(ae.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 Tt(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new Ut(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new Tt(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}}}),ae.prototype.isEmpty=ae.prototype.Mz,ae.prototype.isReal=ae.prototype.w,ae.intersectsLineSegment=function(a,y,x,E,b,z,tt,rt){return le.Fx(a,y,x,E,b,z,tt,rt)},ae.prototype.setSpot=ae.prototype.yi,ae.prototype.union=ae.prototype.Kv,ae.prototype.unionRect=ae.prototype.ed,ae.prototype.unionPoint=ae.prototype.Ye,ae.prototype.intersects=ae.prototype.Vu,ae.prototype.intersectsRect=ae.prototype.Yc,ae.prototype.intersect=ae.prototype.Uu,ae.prototype.intersectRect=ae.prototype.Ex,ae.prototype.grow=ae.prototype.Hz,ae.prototype.subtractMargin=ae.prototype.Fv,ae.prototype.addMargin=ae.prototype.Co,ae.prototype.inflate=ae.prototype.Bc,ae.prototype.offset=ae.prototype.offset,ae.prototype.contains=ae.prototype.contains,ae.prototype.containsRect=ae.prototype.Re,ae.prototype.containsPoint=ae.prototype.ca,ae.prototype.equalsApprox=ae.prototype.Xa,ae.prototype.equalTo=ae.prototype.hi,ae.prototype.equals=ae.prototype.D,ae.prototype.setSize=ae.prototype.tA,ae.prototype.setPoint=ae.prototype.dd,ae.prototype.set=ae.prototype.set,ae.prototype.setTo=ae.prototype.sg;var lr=null,cr=null,yr=[];ae.className="Rect",ae.parse=Tn,ae.stringify=wn,ae.contains=ci,ae.intersects=zi,ae.ZeroRect=lr=new ae(0,0,0,0).ja(),ae.NoRect=cr=new ae(NaN,NaN,NaN,NaN).ja(),ae.parse=Tn,ae.stringify=wn,ae.contains=ci,ae.intersects=zi;function ii(a,y,x,E){a===void 0?this.left=this.bottom=this.right=this.top=0:y===void 0?this.left=this.bottom=this.right=this.top=a:x===void 0?(this.top=a,this.right=y,this.bottom=a,this.left=y):E!==void 0?(this.top=a,this.right=y,this.bottom=x,this.left=E):$t("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}ii.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},ii.prototype.sg=function(a,y,x,E){return this.top=a,this.right=y,this.bottom=x,this.left=E,this},ii.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},ii.prototype.copy=function(){var a=new ii;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Ct=ii.prototype,Ct.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ct.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return Object.isFrozen(this)&&$t("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ji(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=NaN;a[y]==="";)y++;var E=a[y++];if(E&&(x=parseFloat(E)),isNaN(x))return new ii;for(var b=NaN;a[y]==="";)y++;if((E=a[y++])&&(b=parseFloat(E)),isNaN(b))return new ii(x);for(var z=NaN;a[y]==="";)y++;if((E=a[y++])&&(z=parseFloat(E)),isNaN(z))return new ii(x,b);for(var tt=NaN;a[y]==="";)y++;return(E=a[y++])&&(tt=parseFloat(E)),isNaN(tt)?new ii(x,b):new ii(x,b,z,tt)}return new ii}function qi(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}Ct.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},Ct.D=function(a){return a instanceof ii?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},Ct.hi=function(a,y,x,E){return this.top===a&&this.right===y&&this.bottom===x&&this.left===E},Ct.Xa=function(a){return le.B(this.top,a.top)&&le.B(this.right,a.right)&&le.B(this.bottom,a.bottom)&&le.B(this.left,a.left)},Ct.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},ii.alloc=function(){var a=Ai.pop();return a===void 0?new ii:a},ii.free=function(a){Ai.push(a)},ii.prototype.isReal=ii.prototype.w,ii.prototype.equalsApprox=ii.prototype.Xa,ii.prototype.equalTo=ii.prototype.hi,ii.prototype.equals=ii.prototype.D,ii.prototype.set=ii.prototype.set,ii.prototype.setTo=ii.prototype.sg;var ur=null,Mi=null,Ai=[];ii.className="Margin",ii.parse=Ji,ii.stringify=qi,ii.ZeroMargin=ur=new ii(0,0,0,0).ja(),ii.TwoMargin=Mi=new ii(2,2,2,2).ja(),ii.parse=Ji,ii.stringify=qi;function Xe(a,y,x,E){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),E===void 0&&(E=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=E),this._isFrozen=!1}var Li,Wi,ar,fr,Yi,fi,nr,Tr,Dr,hr,Yr,Wr,Cr,to,yo,qo,Hr,ta,So,ca,Lo,Yo,ea,Qo,Oo,xo,oa,Ca,Wo,Ia,Co,lo,eo,Uo,gr,Vr;Xe.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Xe.prototype.sg=function(a,y,x,E){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=E,this},Xe.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Xe.prototype.copy=function(){var a=new Xe;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Ct=Xe.prototype,Ct.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ct.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return Object.isFrozen(this)&&$t("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ki(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function sr(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return Li;if(a==="TopLeft")return Wi;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return ar;if(a==="TopRight")return fr;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Yi;if(a==="Center")return fi;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return nr;if(a==="BottomLeft")return Tr;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return Dr;if(a==="BottomRight")return hr;if(a==="TopSide")return Yr;if(a==="LeftSide")return Wr;if(a==="RightSide")return Cr;if(a==="BottomSide")return to;if(a==="TopBottomSides")return yo;if(a==="LeftRightSides")return qo;if(a==="TopLeftSides")return Hr;if(a==="TopRightSides")return ta;if(a==="BottomLeftSides")return So;if(a==="BottomRightSides")return ca;if(a==="NotTopSide")return Lo;if(a==="NotLeftSide")return Yo;if(a==="NotRightSide")return ea;if(a==="NotBottomSide")return Qo;if(a==="AllSides")return Oo;if(a==="Default")return xo;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E!==void 0&&0<E.length&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;E=a[y++],E!==void 0&&0<E.length&&(b=parseFloat(E));for(var z=0;a[y]==="";)y++;E=a[y++],E!==void 0&&0<E.length&&(z=parseFloat(E));for(var tt=0;a[y]==="";)y++;return E=a[y++],E!==void 0&&0<E.length&&(tt=parseFloat(E)),new Xe(x,b,z,tt)}return new Xe}function Xr(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}Ct.toString=function(){return this.sb()?this.offsetX===0&&this.offsetY===0?"Spot("+this.x+","+this.y+")":"Spot("+this.x+","+this.y+","+this.offsetX+","+this.offsetY+")":this.D(Li)?"None":this.D(Wi)?"TopLeft":this.D(ar)?"Top":this.D(fr)?"TopRight":this.D(Yi)?"Left":this.D(fi)?"Center":this.D(nr)?"Right":this.D(Tr)?"BottomLeft":this.D(Dr)?"Bottom":this.D(hr)?"BottomRight":this.D(Yr)?"TopSide":this.D(Wr)?"LeftSide":this.D(Cr)?"RightSide":this.D(to)?"BottomSide":this.D(yo)?"TopBottomSides":this.D(qo)?"LeftRightSides":this.D(Hr)?"TopLeftSides":this.D(ta)?"TopRightSides":this.D(So)?"BottomLeftSides":this.D(ca)?"BottomRightSides":this.D(Lo)?"NotTopSide":this.D(Yo)?"NotLeftSide":this.D(ea)?"NotRightSide":this.D(Qo)?"NotBottomSide":this.D(Oo)?"AllSides":this.D(xo)?"Default":"None"},Ct.D=function(a){return a instanceof Xe?(this.x===a.x||isNaN(this.x)&&isNaN(a.x))&&(this.y===a.y||isNaN(this.y)&&isNaN(a.y))&&this.offsetX===a.offsetX&&this.offsetY===a.offsetY:!1},Ct.gv=function(){return new Xe(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},Ct.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(oa))a=Wr;else if(a.D(Ca))a=Cr;else if(a.D(Wo))a=Yr;else if(a.D(Ia))a=to;else return!1;return a=a.offsetY,(this.offsetY&a)===a},Ct.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},Ct.Mc=function(){return isNaN(this.x)||isNaN(this.y)},Ct.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},Ct.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},Ct.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},Xe.alloc=function(){var a=tr.pop();return a===void 0?new Xe:a},Xe.free=function(a){tr.push(a)},Xe.prototype.isDefault=Xe.prototype.Xb,Xe.prototype.isNone=Xe.prototype.ys,Xe.prototype.isSide=Xe.prototype.$c,Xe.prototype.isNoSpot=Xe.prototype.Mc,Xe.prototype.isSpot=Xe.prototype.sb,Xe.prototype.includesSide=Xe.prototype.Hf,Xe.prototype.opposite=Xe.prototype.gv,Xe.prototype.equals=Xe.prototype.D,Xe.prototype.set=Xe.prototype.set,Xe.prototype.setTo=Xe.prototype.sg;var tr=[];Xe.className="Spot",Xe.parse=sr,Xe.stringify=Xr,Xe.None=Li=Ki(new Xe(0,0,0,0),0).ja(),Xe.Default=xo=Ki(new Xe(0,0,-1,0),-1).ja(),Xe.TopLeft=Wi=new Xe(0,0,0,0).ja(),Xe.TopCenter=ar=new Xe(.5,0,0,0).ja(),Xe.TopRight=fr=new Xe(1,0,0,0).ja(),Xe.LeftCenter=Yi=new Xe(0,.5,0,0).ja(),Xe.Center=fi=new Xe(.5,.5,0,0).ja(),Xe.RightCenter=nr=new Xe(1,.5,0,0).ja(),Xe.BottomLeft=Tr=new Xe(0,1,0,0).ja(),Xe.BottomCenter=Dr=new Xe(.5,1,0,0).ja(),Xe.BottomRight=hr=new Xe(1,1,0,0).ja(),Xe.MiddleTop=Co=ar,Xe.MiddleLeft=lo=Yi,Xe.MiddleRight=eo=nr,Xe.MiddleBottom=Uo=Dr,Xe.Top=Wo=ar,Xe.Left=oa=Yi,Xe.Right=Ca=nr,Xe.Bottom=Ia=Dr,Xe.TopSide=Yr=Ki(new Xe(0,0,1,1),1).ja(),Xe.LeftSide=Wr=Ki(new Xe(0,0,1,2),1).ja(),Xe.RightSide=Cr=Ki(new Xe(0,0,1,4),1).ja(),Xe.BottomSide=to=Ki(new Xe(0,0,1,8),1).ja(),Xe.TopBottomSides=yo=Ki(new Xe(0,0,1,9),1).ja(),Xe.LeftRightSides=qo=Ki(new Xe(0,0,1,6),1).ja(),Xe.TopLeftSides=Hr=Ki(new Xe(0,0,1,3),1).ja(),Xe.TopRightSides=ta=Ki(new Xe(0,0,1,5),1).ja(),Xe.BottomLeftSides=So=Ki(new Xe(0,0,1,10),1).ja(),Xe.BottomRightSides=ca=Ki(new Xe(0,0,1,12),1).ja(),Xe.NotTopSide=Lo=Ki(new Xe(0,0,1,14),1).ja(),Xe.NotLeftSide=Yo=Ki(new Xe(0,0,1,13),1).ja(),Xe.NotRightSide=ea=Ki(new Xe(0,0,1,11),1).ja(),Xe.NotBottomSide=Qo=Ki(new Xe(0,0,1,7),1).ja(),Xe.AllSides=Oo=Ki(new Xe(0,0,1,15),1).ja(),gr=new Xe(.156,.156).ja(),Vr=new Xe(.844,.844).ja(),Xe.parse=sr,Xe.stringify=Xr;function Un(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}Un.prototype.set=function(a){return this.m11=a.m11,this.m12=a.m12,this.m21=a.m21,this.m22=a.m22,this.dx=a.dx,this.dy=a.dy,this},Un.prototype.setTransform=function(a,y,x,E,b,z){return this.m11=a,this.m12=y,this.m21=x,this.m22=E,this.dx=b,this.dy=z,this},Un.prototype.copy=function(){var a=new Un;return a.m11=this.m11,a.m12=this.m12,a.m21=this.m21,a.m22=this.m22,a.dx=this.dx,a.dy=this.dy,a},Un.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},Un.prototype.D=function(a){return this.m11===a.m11&&this.m12===a.m12&&this.m21===a.m21&&this.m22===a.m22&&this.dx===a.dx&&this.dy===a.dy},Un.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},Un.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},Un.prototype.multiply=function(a){var y=this.m11*a.m11+this.m21*a.m12,x=this.m12*a.m11+this.m22*a.m12,E=this.m11*a.m21+this.m21*a.m22,b=this.m12*a.m21+this.m22*a.m22;return this.dx=this.m11*a.dx+this.m21*a.dy+this.dx,this.dy=this.m12*a.dx+this.m22*a.dy+this.dy,this.m11=y,this.m12=x,this.m21=E,this.m22=b,this},Un.prototype.bv=function(a){var y=1/(a.m11*a.m22-a.m12*a.m21),x=a.m22*y,E=-a.m12*y,b=-a.m21*y,z=a.m11*y,tt=y*(a.m21*a.dy-a.m22*a.dx);return a=y*(a.m12*a.dx-a.m11*a.dy),y=this.m11*x+this.m21*E,x=this.m12*x+this.m22*E,E=this.m11*b+this.m21*z,b=this.m12*b+this.m22*z,this.dx=this.m11*tt+this.m21*a+this.dx,this.dy=this.m12*tt+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=E,this.m22=b,this},Un.prototype.Vj=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),y=-this.m12*a,x=-this.m21*a,E=this.m11*a,b=a*(this.m21*this.dy-this.m22*this.dx),z=a*(this.m12*this.dx-this.m11*this.dy);return this.m11=this.m22*a,this.m12=y,this.m21=x,this.m22=E,this.dx=b,this.dy=z,this},Un.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a===0)return this;if(this.translate(y,x),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));var b=this.m12*a+this.m22*E,z=this.m11*-E+this.m21*a,tt=this.m12*-E+this.m22*a;return this.m11=this.m11*a+this.m21*E,this.m12=b,this.m21=z,this.m22=tt,this.translate(-y,-x),this},Ct=Un.prototype,Ct.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},Ct.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},Ct.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)},Ct.Cd=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=a.x,E=a.y;return a.h(x*this.m22*y+E*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+E*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Ct.Eu=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=1.25*a.x,E=1.2*a.y;return a.h(x*this.m22*y+E*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+E*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Ct.pp=function(a){var y=a.x,x=a.y,E=y+a.width,b=x+a.height,z=this.m11,tt=this.m12,rt=this.m21,ot=this.m22,st=this.dx,ut=this.dy,ft=y*z+x*rt+st,vt=y*tt+x*ot+ut,yt=E*z+x*rt+st,Pt=E*tt+x*ot+ut;return x=y*z+b*rt+st,y=y*tt+b*ot+ut,z=E*z+b*rt+st,E=E*tt+b*ot+ut,b=Math.min(ft,yt),ft=Math.max(ft,yt),yt=Math.min(vt,Pt),vt=Math.max(vt,Pt),b=Math.min(b,x),ft=Math.max(ft,x),yt=Math.min(yt,y),vt=Math.max(vt,y),b=Math.min(b,z),ft=Math.max(ft,z),yt=Math.min(yt,E),vt=Math.max(vt,E),a.h(b,yt,ft-b,vt-yt),a},Un.alloc=function(){var a=ia.pop();return a===void 0?new Un:a},Un.free=function(a){ia.push(a)},Un.prototype.transformRect=Un.prototype.pp,Un.prototype.transformPoint=Un.prototype.Ga,Un.prototype.scale=Un.prototype.scale,Un.prototype.translate=Un.prototype.translate,Un.prototype.rotate=Un.prototype.rotate,Un.prototype.invert=Un.prototype.Vj,Un.prototype.multiplyInverted=Un.prototype.bv,Un.prototype.multiply=Un.prototype.multiply,Un.prototype.reset=Un.prototype.reset,Un.prototype.isIdentity=Un.prototype.ws,Un.prototype.equals=Un.prototype.D,Un.prototype.setTransform=Un.prototype.setTransform,Un.prototype.set=Un.prototype.set;var ia=[];Un.className="Transform",Un.xF="54a702f3e53909c447824c6706603faf4c";var le={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=le.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);le.Uv=y}return 1>a?(x=1/a,2e3>=x?1/y[x|0]:Math.sqrt(a)):2e3>=a?y[a|0]:Math.sqrt(a)},B:function(a,y){return a-=y,.5>a&&-.5<a},$:function(a,y){return a-=y,5e-8>a&&-5e-8<a},Yb:function(a,y,x,E,b,z,tt){if(0>=b&&(b=1e-6),a<x)var rt=a,ot=x;else rt=x,ot=a;if(y<E)var st=y,ut=E;else st=E,ut=y;if(a===x)return st<=tt&&tt<=ut&&a-b<=z&&z<=a+b;if(y===E)return rt<=z&&z<=ot&&y-b<=tt&&tt<=y+b;if(ot+=b,rt-=b,rt<=z&&z<=ot&&(ut+=b,st-=b,st<=tt&&tt<=ut))if(ot-rt>ut-st)if(a-x>b||x-a>b){if(z=(E-y)/(x-a)*(z-a)+y,z-b<=tt&&tt<=z+b)return!0}else return!0;else if(y-E>b||E-y>b){if(tt=(x-a)/(E-y)*(tt-y)+a,tt-b<=z&&z<=tt+b)return!0}else return!0;return!1},cs:function(a,y,x,E,b,z,tt,rt,ot,st,ut,ft){if(le.Yb(a,y,tt,rt,ft,x,E)&&le.Yb(a,y,tt,rt,ft,b,z))return le.Yb(a,y,tt,rt,ft,st,ut);var vt=(a+x)/2,yt=(y+E)/2,Pt=(x+b)/2,Et=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(vt+Pt)/2,x=(yt+Et)/2,Pt=(Pt+b)/2,Et=(Et+z)/2;var Vt=(E+Pt)/2,Rt=(x+Et)/2;return le.cs(a,y,vt,yt,E,x,Vt,Rt,ot,st,ut,ft)||le.cs(Vt,Rt,Pt,Et,b,z,tt,rt,ot,st,ut,ft)},ax:function(a,y,x,E,b,z,tt,rt,ot){var st=(x+b)/2,ut=(E+z)/2;return ot.h((((a+x)/2+st)/2+(st+(b+tt)/2)/2)/2,(((y+E)/2+ut)/2+(ut+(z+rt)/2)/2)/2),ot},My:function(a,y,x,E,b,z,tt,rt){var ot=(x+b)/2,st=(E+z)/2;return At(((a+x)/2+ot)/2,((y+E)/2+st)/2,(ot+(b+tt)/2)/2,(st+(z+rt)/2)/2)},Dl:function(a,y,x,E,b,z,tt,rt,ot,st){if(le.Yb(a,y,tt,rt,ot,x,E)&&le.Yb(a,y,tt,rt,ot,b,z))ui(st,a,y,0,0),ui(st,tt,rt,0,0);else{var ut=(a+x)/2,ft=(y+E)/2,vt=(x+b)/2,yt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(ut+vt)/2,x=(ft+yt)/2,vt=(vt+b)/2,yt=(yt+z)/2;var Pt=(E+vt)/2,Et=(x+yt)/2;le.Dl(a,y,ut,ft,E,x,Pt,Et,ot,st),le.Dl(Pt,Et,vt,yt,b,z,tt,rt,ot,st)}return st},Qe:function(a,y,x,E,b,z,tt,rt,ot,st){if(le.Yb(a,y,tt,rt,ot,x,E)&&le.Yb(a,y,tt,rt,ot,b,z))st.length===0&&(st.push(a),st.push(y)),st.push(tt),st.push(rt);else{var ut=(a+x)/2,ft=(y+E)/2,vt=(x+b)/2,yt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(ut+vt)/2,x=(ft+yt)/2,vt=(vt+b)/2,yt=(yt+z)/2;var Pt=(E+vt)/2,Et=(x+yt)/2;le.Qe(a,y,ut,ft,E,x,Pt,Et,ot,st),le.Qe(Pt,Et,vt,yt,b,z,tt,rt,ot,st)}return st},jv:function(a,y,x,E,b,z,tt,rt,ot,st){if(le.Yb(a,y,b,z,st,x,E))return le.Yb(a,y,b,z,st,rt,ot);var ut=(a+x)/2,ft=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var vt=(ut+x)/2,yt=(ft+E)/2;return le.jv(a,y,ut,ft,vt,yt,tt,rt,ot,st)||le.jv(vt,yt,x,E,b,z,tt,rt,ot,st)},OA:function(a,y,x,E,b,z,tt){return tt.h(((a+x)/2+(x+b)/2)/2,((y+E)/2+(E+z)/2)/2),tt},iv:function(a,y,x,E,b,z,tt,rt){if(le.Yb(a,y,b,z,tt,x,E))ui(rt,a,y,0,0),ui(rt,b,z,0,0);else{var ot=(a+x)/2,st=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ut=(ot+x)/2,ft=(st+E)/2;le.iv(a,y,ot,st,ut,ft,tt,rt),le.iv(ut,ft,x,E,b,z,tt,rt)}return rt},ep:function(a,y,x,E,b,z,tt,rt){if(le.Yb(a,y,b,z,tt,x,E))rt.length===0&&(rt.push(a),rt.push(y)),rt.push(b),rt.push(z);else{var ot=(a+x)/2,st=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ut=(ot+x)/2,ft=(st+E)/2;le.ep(a,y,ot,st,ut,ft,tt,rt),le.ep(ut,ft,x,E,b,z,tt,rt)}return rt},Eo:function(a,y,x,E,b,z,tt,rt,ot,st,ut,ft,vt,yt){if(le.Yb(a,y,tt,rt,vt,x,E)&&le.Yb(a,y,tt,rt,vt,b,z))return!le.Rl(a,y,tt,rt,ot,st,ut,ft)||(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/2,E=(Pt+Vt)/2,x=(Et+Rt)/2,Vt=(Vt+b)/2,Rt=(Rt+z)/2;var Qt=(E+Vt)/2,_t=(x+Rt)/2;yt+=le.Fo(a,y,Pt,Et,E,x,Qt,_t,ot,st,ut,ft,vt),yt+=le.Fo(Qt,_t,Vt,Rt,b,z,tt,rt,ot,st,ut,ft,vt)}return yt},qh:function(a,y,x,E,b,z,tt){return le.$(a,x)?(y<E?(x=y,y=E):x=E,z<x?(tt.h(a,x),!1):z>y?(tt.h(a,y),!1):(tt.h(a,z),!0)):le.$(y,E)?(a<x?(E=a,a=x):E=x,b<E?(tt.h(E,y),!1):b>a?(tt.h(a,y),!1):(tt.h(b,y),!0)):(b=((a-b)*(a-x)+(y-z)*(y-E))/((x-a)*(x-a)+(E-y)*(E-y)),-5e-6>b?(tt.h(a,y),!1):1.000005<b?(tt.h(x,E),!1):(tt.h(a+b*(x-a),y+b*(E-y)),!0))},Ve:function(a,y,x,E,b,z,tt,rt,ot){return le.B(a,x)&&le.B(y,E)?(ot.h(a,y),!1):le.$(b,tt)?le.$(a,x)?(le.qh(a,y,x,E,b,z,ot),!1):le.qh(a,y,x,E,b,(E-y)/(x-a)*(b-a)+y,ot):(rt=(rt-z)/(tt-b),le.$(a,x)?(x=rt*(a-b)+z,y<E?(b=y,y=E):b=E,x<b?(ot.h(a,b),!1):x>y?(ot.h(a,y),!1):(ot.h(a,x),!0)):(tt=(E-y)/(x-a),le.$(rt,tt)?(le.qh(a,y,x,E,b,z,ot),!1):(b=(tt*a-rt*b+z-y)/(tt-rt),le.$(tt,0)?(a<x?(E=a,a=x):E=x,b<E?(ot.h(E,y),!1):b>a?(ot.h(a,y),!1):(ot.h(b,y),!0)):le.qh(a,y,x,E,b,tt*(b-a)+y,ot))))},MA:function(a,y,x,E,b){return le.Ve(x.x,x.y,E.x,E.y,a.x,a.y,y.x,y.y,b)},KA:function(a,y,x,E,b,z,tt,rt,ot,st){function ut(Vt,Rt){var Qt=(Vt-a)*(Vt-a)+(Rt-y)*(Rt-y);Qt<ft&&(ft=Qt,ot.h(Vt,Rt))}var ft=1/0;ut(ot.x,ot.y);var vt=0,yt=0,Pt=0,Et=0;if(b<tt?(vt=b,yt=tt):(vt=tt,yt=b),z<rt?(Pt=b,Et=tt):(Pt=tt,Et=b),vt=(yt-vt)/2+st,st=(Et-Pt)/2+st,b=(b+tt)/2,z=(z+rt)/2,vt===0||st===0)return ot;if(.5>(x>a?x-a:a-x)){if(vt=1-(x-b)*(x-b)/(vt*vt),0>vt)return ot;vt=Math.sqrt(vt),E=-st*vt+z,ut(x,st*vt+z),ut(x,E)}else{if(x=(E-y)/(x-a),E=1/(vt*vt)+x*x/(st*st),rt=2*x*(y-x*a)/(st*st)-2*x*z/(st*st)-2*b/(vt*vt),vt=rt*rt-4*E*(2*x*a*z/(st*st)-2*y*z/(st*st)+z*z/(st*st)+b*b/(vt*vt)-1+(y-x*a)*(y-x*a)/(st*st)),0>vt)return ot;vt=Math.sqrt(vt),st=(-rt+vt)/(2*E),ut(st,x*st-x*a+y),vt=(-rt-vt)/(2*E),ut(vt,x*vt-x*a+y)}return ot},Ff:function(a,y,x,E,b,z,tt,rt,ot){var st=1e21,ut=a,ft=y;if(le.Ve(a,y,a,E,b,z,tt,rt,ot)){var vt=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z);vt<st&&(st=vt,ut=ot.x,ft=ot.y)}return le.Ve(x,y,x,E,b,z,tt,rt,ot)&&(vt=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z),vt<st&&(st=vt,ut=ot.x,ft=ot.y)),le.Ve(a,y,x,y,b,z,tt,rt,ot)&&(y=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z),y<st&&(st=y,ut=ot.x,ft=ot.y)),le.Ve(a,E,x,E,b,z,tt,rt,ot)&&(a=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z),a<st&&(st=a,ut=ot.x,ft=ot.y)),ot.h(ut,ft),1e21>st},us:function(a,y,x){return le.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,E,b,z,tt,rt){var ot=a+x,st=y+E;return b===tt?(z<rt?(tt=z,z=rt):tt=rt,a<=b&&b<=ot&&tt<=st&&z>=y):z===rt?(b<tt?(rt=b,b=tt):rt=tt,y<=z&&z<=st&&rt<=ot&&b>=a):!!(ci(a,y,x,E,b,z)||ci(a,y,x,E,tt,rt)||le.Rl(a,y,ot,y,b,z,tt,rt)||le.Rl(ot,y,ot,st,b,z,tt,rt)||le.Rl(ot,st,a,st,b,z,tt,rt)||le.Rl(a,st,a,y,b,z,tt,rt))},Rl:function(a,y,x,E,b,z,tt,rt){return a===x&&y===E&&b===tt&&z===rt?a===b&&y===z:0>=le.Fl(a,y,x,E,b,z)*le.Fl(a,y,x,E,tt,rt)&&0>=le.Fl(b,z,tt,rt,a,y)*le.Fl(b,z,tt,rt,x,E)},Fl:function(a,y,x,E,b,z){return x-=a,E-=y,a=b-a,y=z-y,z=a*E-y*x,z===0&&(z=a*x+y*E,0<z&&(z=(a-x)*x+(y-E)*E,0>z&&(z=0))),z},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,E,b,z){var tt=Math.PI;z||(E*=tt/180,b*=tt/180);var rt=E>b?-1:1;z=[];var ot=tt/2,st=E;if(E=Math.min(2*tt,Math.abs(b-E)),1e-5>E)return ot=st+rt*Math.min(E,ot),rt=a+x*Math.cos(st),st=y+x*Math.sin(st),a+=x*Math.cos(ot),y+=x*Math.sin(ot),x=(rt+a)/2,ot=(st+y)/2,z.push([rt,st,x,ot,x,ot,a,y]),z;for(;1e-5<E;)b=st+rt*Math.min(E,ot),z.push(le.Vy(x,st,b,a,y)),E-=Math.abs(b-st),st=b;return z},Vy:function(a,y,x,E,b){var z=(x-y)/2,tt=a*Math.cos(z),rt=a*Math.sin(z),ot=-rt,st=tt*tt+ot*ot,ut=st+tt*tt+ot*rt;return st=4/3*(Math.sqrt(2*st*ut)-ut)/(tt*rt-ot*tt),rt=tt-st*ot,tt=ot+st*tt,ot=-tt,st=z+y,z=Math.cos(st),st=Math.sin(st),[E+a*Math.cos(y),b+a*Math.sin(y),E+rt*z-tt*st,b+rt*st+tt*z,E+rt*z-ot*st,b+rt*st+ot*z,E+a*Math.cos(x),b+a*Math.sin(x)]},No:function(a,y,x,E,b,z,tt){x=Math.floor((a-x)/b)*b+x,E=Math.floor((y-E)/z)*z+E;var rt=x;return x+b-a<b/2&&(rt=x+b),a=E,E+z-y<z/2&&(a=E+z),tt.h(rt,a),tt},vx:function(a,y){var x=Math.max(a,y);a=Math.min(a,y);var E;do y=x%a,x=E=a,a=y;while(0<y);return E},$y:function(a,y,x,E){var b=0>x,z=0>E;if(a<y)var tt=1,rt=0;else tt=0,rt=1;var ot=tt===0?a:y,st=tt===0?x:E;return(tt===0?b:z)&&(st=-st),tt=rt,x=tt===0?x:E,(tt===0?b:z)&&(x=-x),le.az(ot,tt===0?a:y,st,x,0,0)},az:function(a,y,x,E,b,z){if(0<E)if(0<x){b=a*a,z=y*y,a*=x;var tt=y*E,rt=-z+tt,ot=-z+Math.sqrt(a*a+tt*tt);y=rt;for(var st=0;9999999999>st&&(y=.5*(rt+ot),!(y===rt||y===ot));++st){var ut=a/(y+b),ft=tt/(y+z);if(ut=ut*ut+ft*ft-1,0<ut)rt=y;else if(0>ut)ot=y;else break}x=b*x/(y+b)-x,E=z*E/(y+z)-E,x=Math.sqrt(x*x+E*E)}else x=Math.abs(E-y);else E=a*a-y*y,z=a*x,z<E?(E=z/E,z=y*Math.sqrt(Math.abs(1-E*E)),x=a*E-x,x=Math.sqrt(x*x+z*z)):x=Math.abs(x-a);return x},Ze:new Hi,um:new Hi,Mf:new Hi,Nf:0,vm:100};le.za=le.AA;function ln(a){Ri(this),this.l=2,a===void 0&&(a=ln.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===ln.o?this.ee=new dn:(ln.V===null&&(ln.V=new dn().freeze()),this.ee=ln.V),this.aq=this.ee.Ja,this.Ip=new ae().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Wi,this.gg=hr,this.Rk=this.Sk=NaN,this.Uf=fn}ln.prototype.copy=function(){var a=new ln;if(a.l=this.l&-2,a.na=this.na,a.od=this.od,a.pd=this.pd,a.Dc=this.Dc,a.Ec=this.Ec,this.na===ln.o){for(var y=this.ee.s,x=a.ee,E=0;E<y.length;E++)x.add(y[E].copy());a.ee=x}else a.ee=this.ee;return a.aq=this.aq,a.Ip.assign(this.Ip),a.tk=this.tk,a.ym=this.ym,a.zm=this.zm,a.fg=this.fg.J(),a.gg=this.gg.J(),a.Sk=this.Sk,a.Rk=this.Rk,a.Uf=this.Uf,a},ln.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},ln.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==ln.o)return this;var a=this.figures;a.freeze(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].freeze();return this},ln.prototype.ka=function(){if(Object.isFrozen(this)&&$t("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==ln.o)return this;var a=this.figures;a.ka(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].ka();return this},ln.prototype.Xa=function(a){if(!(a instanceof ln))return!1;if(this.type!==a.type)return this.type===ln.j&&a.type===ln.o?Ja(this,a):a.type===ln.j&&this.type===ln.o?Ja(a,this):!1;if(this.type===ln.o){var y=this.figures.s;a=a.figures.s;var x=y.length;if(x!==a.length)return!1;for(var E=0;E<x;E++)if(!y[E].Xa(a[E]))return!1;return!0}return le.B(this.startX,a.startX)&&le.B(this.startY,a.startY)&&le.B(this.endX,a.endX)&&le.B(this.endY,a.endY)};function Ja(a,y){return a.type!==ln.j||y.type!==ln.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&le.B(a.startX,y.startX)&&le.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===no&&le.B(a.endX,y.endX)&&le.B(a.endY,y.endY))))}ln.ia=function(a){return a.toString()},ln.prototype.qb=function(a){a.classType===ln&&(this.type=a)},ln.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case ln.j:return 0>a?"M"+this.startX.toString()+" "+this.startY.toString()+"L"+this.endX.toString()+" "+this.endY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a)+"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);case ln.u:var y=new ae(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 ln.F:if(y=new ae(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 ln.o:y="",x=this.figures.s;for(var E=x.length,b=0;b<E;b++){var z=x[b];0<b&&(y+=" x "),z.isFilled&&(y+="F "),y+=z.toString(a)}return y;default:return this.type.toString()}},ln.nb=function(a){a=a.split(/[Xx]/);for(var y=a.length,x="",E=0;E<y;E++){var b=a[E];x=b.match(/[Ff]/)!==null?E===0?x+b:x+("X"+(b[0]===" "?"":" ")+b):x+((E===0?"":"X ")+"F"+(b[0]===" "?"":" ")+b)}return x},ln.parse=function(a,y){function x(){return Et>=te-1?!0:st[Et+1].match(ue)!==null}function E(){return Et++,st[Et]}function b(er){var Ui=parseFloat(E()),Ur=parseFloat(E());Vt===Vt.toLowerCase()&&(Ui=_t.x+Ui,Ur=_t.y+Ur),er.h(Ui,Ur)}function z(){return b(_t),_t}function tt(){return b(Qt),Qt}function rt(){var er=Rt.toLowerCase();return er!=="c"&&er!=="s"&&er!=="q"&&er!=="t"?_t:new Tt(2*_t.x-Qt.x,2*_t.y-Qt.y)}y===void 0&&(y=!1);var ot=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(ot,"$1 $2"),a=a.replace(ot,"$1 $2"),a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^s])/gm,"$1 $2"),a=a.replace(/([^s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2"),a=a.replace(/([0-9])([+\-])/gm,"$1 $2"),a=a.replace(/[\s\r\t\n]+/gm," "),a=a.replace(/^\s+|\s+$/g,"");var st=a.split(" ");for(a=0;a<st.length;a++){var ut=st[a];if(ut.match(/(\.[0-9]*)(\.)/gm)!==null){ot=Ei();for(var ft="",vt=!1,yt=0;yt<ut.length;yt++){var Pt=ut[yt];Pt!=="."||vt?Pt==="."?(ot.push(ft),ft="."):ft+=Pt:(vt=!0,ft+=Pt)}for(ot.push(ft),st.splice(a,1),ut=0;ut<ot.length;ut++)st.splice(a+ut,0,ot[ut]);a+=ot.length-1,ri(ot)}}var Et=-1,Vt="",Rt="";ot=new Tt(0,0);var Qt=new Tt(0,0),_t=new Tt(0,0),te=st.length;a=bS(null),vt=ft=ut=!1,yt=!0,Pt=null;for(var ue=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(Et>=te-1);)if(Rt=Vt,Vt=E(),Vt!=="")switch(Vt.toUpperCase()){case"X":yt=!0,ft=ut=!1;break;case"M":for(Pt=z(),a.mc===null||yt===!0?(Rf(a,Pt.x,Pt.y,ut,!ft,vt),yt=!1):a.moveTo(Pt.x,Pt.y),ot.assign(_t);!x();)Pt=z(),a.lineTo(Pt.x,Pt.y);break;case"L":for(;!x();)Pt=z(),a.lineTo(Pt.x,Pt.y);break;case"H":for(;!x();)_t=new Tt((Vt===Vt.toLowerCase()?_t.x:0)+parseFloat(E()),_t.y),a.lineTo(_t.x,_t.y);break;case"V":for(;!x();)_t=new Tt(_t.x,(Vt===Vt.toLowerCase()?_t.y:0)+parseFloat(E())),a.lineTo(_t.x,_t.y);break;case"C":for(;!x();){Pt=new Tt,b(Pt);var Ce=tt(),On=z();Ah(a,Pt.x,Pt.y,Ce.x,Ce.y,On.x,On.y)}break;case"S":for(;!x();)Pt=rt(),Ce=tt(),On=z(),Ah(a,Pt.x,Pt.y,Ce.x,Ce.y,On.x,On.y);break;case"Q":for(;!x();)Pt=tt(),Ce=z(),jm(a,Pt.x,Pt.y,Ce.x,Ce.y);break;case"T":for(;!x();)Qt=Pt=rt(),Ce=z(),jm(a,Pt.x,Pt.y,Ce.x,Ce.y);break;case"B":for(;!x();){Pt=parseFloat(E()),Ce=parseFloat(E()),On=parseFloat(E());var li=parseFloat(E()),ti=parseFloat(E()),Cn=ti,qe=!1;x()||(Cn=parseFloat(E()),x()||(qe=parseFloat(E())!==0)),Vt===Vt.toLowerCase()&&(On+=_t.x,li+=_t.y),a.arcTo(Pt,Ce,On,li,ti,Cn,qe)}break;case"A":for(;!x();)Pt=Math.abs(parseFloat(E())),Ce=Math.abs(parseFloat(E())),On=parseFloat(E()),ti=li=!1,qe=Cn=0,Cn=E(),Cn.length===1?(li=!!parseFloat(Cn),ti=!!parseFloat(E()),Cn=parseFloat(E())):Cn.length===2?(li=!!parseFloat(Cn[0]),ti=!!parseFloat(Cn[1]),Cn=parseFloat(E())):(li=!!parseFloat(Cn[0]),ti=!!parseFloat(Cn[1]),Cn=parseFloat(Cn.slice(2))),qe=parseFloat(E()),Vt===Vt.toLowerCase()&&(Cn=_t.x+Cn,qe=_t.y+qe),_t.h(Cn,qe),wx(a,Pt,Ce,On,li,ti,Cn,qe);break;case"Z":Px(a),_t.assign(ot);break;case"F":for(Pt="",Ce=1;st[Et+Ce];)if(st[Et+Ce]==="0")vt=!0,Ce++;else if(st[Et+Ce].match(/[Uu]/)!==null)Ce++;else if(st[Et+Ce].match(ue)===null)Ce++;else{Pt=st[Et+Ce];break}Pt.match(/[Mm]/)?ut=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Pt="",Ce=1;st[Et+Ce];)if(st[Et+Ce].match(/[Ff]/)!==null)Ce++;else if(st[Et+Ce].match(ue)===null)Ce++;else{Pt=st[Et+Ce];break}Pt.match(/[Mm]/)?ft=!0:a.mc.isShadowed=!1}if(ot=a.os,Wm=a,y)for(y=ot.figures.iterator;y.next();)y.value.isFilled=!0;return ot},ln.Ha=function(a,y){for(var x=a.length,E=Tt.alloc(),b=0;b<x;b++){var z=a[b];E.x=z[0],E.y=z[1],y.Ga(E),z[0]=E.x,z[1]=E.y,E.x=z[2],E.y=z[3],y.Ga(E),z[2]=E.x,z[3]=E.y,E.x=z[4],E.y=z[5],y.Ga(E),z[4]=E.x,z[5]=E.y,E.x=z[6],E.y=z[7],y.Ga(E),z[6]=E.x,z[7]=E.y}Tt.free(E)},ln.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===ln.o){if(this.aq!==this.figures.Ja)return!0;for(var a=this.figures.s,y=a.length,x=0;x<y;x++)if(a[x].Zu())return!0}return!1},ln.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===ln.o){this.aq=this.figures.Ja;for(var a=this.figures.s,y=a.length,x=0;x<y;x++){var E=a[x];E._isInvalidBounds=!1;var b=E.segments;E.sr=b.Ja,E=b.s,b=E.length;for(var z=0;z<b;z++){var tt=E[z];tt._isInvalidBounds=!1,tt.ae=null}}}a=this.Ip,a.ka(),isNaN(this.Sk)||isNaN(this.Rk)?a.h(0,0,0,0):a.h(0,0,this.Sk,this.Rk),Qa(this,a,!1),ui(a,0,0,0,0),a.freeze()},ln.prototype.ix=function(){var a=new ae;return Qa(this,a,!0),a};function Qa(a,y,x){switch(a.type){case ln.j:case ln.u:case ln.F:x?y.h(a.od,a.pd,0,0):ui(y,a.od,a.pd,0,0),ui(y,a.Dc,a.Ec,0,0);break;case ln.o:var E=a.figures;a=E.s,E=E.length;for(var b=0;b<E;b++){var z=a[b];x&&b===0?y.h(z.startX,z.startY,0,0):ui(y,z.startX,z.startY,0,0);for(var tt=z.segments.s,rt=tt.length,ot=z.startX,st=z.startY,ut=0;ut<rt;ut++){var ft=tt[ut];switch(ft.type){case no:case sa:ot=ft.endX,st=ft.endY,ui(y,ot,st,0,0);break;case fa:le.Dl(ot,st,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.5,y),ot=ft.endX,st=ft.endY;break;case ls:le.iv(ot,st,ft.point1X,ft.point1Y,ft.endX,ft.endY,.5,y),ot=ft.endX,st=ft.endY;break;case ra:case us:var vt=ft.type===ra?Wa(ft,z):_a(ft,z,ot,st),yt=vt.length;if(yt===0){ot=ft.type===ra?ft.centerX:ft.endX,st=ft.type===ra?ft.centerY:ft.endY,ui(y,ot,st,0,0);break}ft=null;for(var Pt=0;Pt<yt;Pt++)ft=vt[Pt],le.Dl(ft[0],ft[1],ft[2],ft[3],ft[4],ft[5],ft[6],ft[7],.5,y);ft!==null&&(ot=ft[6],st=ft[7]);break;default:$t("Unknown Segment type: "+ft.type)}}}break;default:$t("Unknown Geometry type: "+a.type)}}ln.prototype.normalize=function(){this._isFrozen&&pn(this);var a=this.ix();return this.offset(-a.x,-a.y),new Tt(-a.x,-a.y)},ln.prototype.offset=function(a,y){return this._isFrozen&&pn(this),this.transform(1,0,0,1,a,y),this},ln.prototype.scale=function(a,y){return this._isFrozen&&pn(this),this.transform(a,0,0,y,0,0),this},ln.prototype.rotate=function(a,y,x){this._isFrozen&&pn(this),y===void 0&&(y=0),x===void 0&&(x=0);var E=Un.alloc();return E.reset(),E.rotate(a,y,x),this.transform(E.m11,E.m12,E.m21,E.m22,E.dx,E.dy),Un.free(E),this},Ct=ln.prototype,Ct.transform=function(a,y,x,E,b,z){switch(this.type){case ln.j:case ln.u:case ln.F:var tt=this.od,rt=this.pd;this.od=tt*a+rt*x+b,this.pd=tt*y+rt*E+z,tt=this.Dc,rt=this.Ec,this.Dc=tt*a+rt*x+b,this.Ec=tt*y+rt*E+z;break;case ln.o:for(var ot=this.figures.s,st=ot.length,ut=0;ut<st;ut++){var ft=ot[ut];tt=ft.startX,rt=ft.startY,ft.startX=tt*a+rt*x+b,ft.startY=tt*y+rt*E+z,ft=ft.segments.s;for(var vt=ft.length,yt=0;yt<vt;yt++){var Pt=ft[yt];switch(Pt.type){case no:case sa:tt=Pt.endX,rt=Pt.endY,Pt.endX=tt*a+rt*x+b,Pt.endY=tt*y+rt*E+z;break;case fa:tt=Pt.point1X,rt=Pt.point1Y,Pt.point1X=tt*a+rt*x+b,Pt.point1Y=tt*y+rt*E+z,tt=Pt.point2X,rt=Pt.point2Y,Pt.point2X=tt*a+rt*x+b,Pt.point2Y=tt*y+rt*E+z,tt=Pt.endX,rt=Pt.endY,Pt.endX=tt*a+rt*x+b,Pt.endY=tt*y+rt*E+z;break;case ls:tt=Pt.point1X,rt=Pt.point1Y,Pt.point1X=tt*a+rt*x+b,Pt.point1Y=tt*y+rt*E+z,tt=Pt.endX,rt=Pt.endY,Pt.endX=tt*a+rt*x+b,Pt.endY=tt*y+rt*E+z;break;case ra:tt=Pt.centerX,rt=Pt.centerY,Pt.centerX=tt*a+rt*x+b,Pt.centerY=tt*y+rt*E+z,y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),Pt.startAngle+=tt),0>a&&(Pt.startAngle=180-Pt.startAngle,Pt.sweepAngle=-Pt.sweepAngle),0>E&&(Pt.startAngle=-Pt.startAngle,Pt.sweepAngle=-Pt.sweepAngle),Pt.radiusX*=Math.sqrt(a*a+x*x),Pt.radiusY!==void 0&&(Pt.radiusY*=Math.sqrt(y*y+E*E));break;case us:if(tt=Pt.endX,rt=Pt.endY,Pt.endX=tt*a+rt*x+b,Pt.endY=tt*y+rt*E+z,Pt.radiusX===0||Pt.radiusY===0)break;y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),Pt.xAxisRotation+=tt),0>a&&(Pt.xAxisRotation=180-Pt.xAxisRotation,Pt.isClockwiseArc=!Pt.isClockwiseArc),0>E&&(Pt.xAxisRotation=-Pt.xAxisRotation,Pt.isClockwiseArc=!Pt.isClockwiseArc),Pt.radiusX*=Math.sqrt(a*a+x*x),Pt.radiusY*=Math.sqrt(y*y+E*E);break;default:$t("Unknown Segment type: "+Pt.type)}}}}return this._isInvalidBounds=!0,this},Ct.ca=function(a,y){y===void 0&&(y=0);var x=this.od,E=this.pd,b=this.Dc,z=this.Ec;switch(this.type){case ln.j:return le.Yb(x,E,b,z,y,a.x,a.y);case ln.u:var tt=ae.allocAt(Math.min(x,b)-y,Math.min(E,z)-y,Math.abs(b-x)+2*y,Math.abs(z-E)+2*y);return a=tt.ca(a),ae.free(tt),a;case ln.F:tt=Math.min(x,b)-y;var rt=Math.min(E,z)-y;return x=(Math.abs(b-x)+2*y)/2,y=(Math.abs(z-E)+2*y)/2,0>=x||0>=y?!1:(tt=a.x-(tt+x),rt=a.y-(rt+y),1>=tt*tt/(x*x)+rt*rt/(y*y));case ln.o:return pa(this,a,y,!0,!1);default:return!1}};function pa(a,y,x,E,b){var z=y.x;y=y.y;for(var tt=a.bounds.x-20,rt=0,ot,st,ut,ft,vt=a.figures.s,yt=vt.length,Pt=0;Pt<yt;Pt++){var Et=vt[Pt],Vt=!Et.isEvenOdd;if(Et.isFilled){if(E&&Et.ca(z,y,x))return!0;var Rt=Et.segments;ot=Et.startX,st=Et.startY;for(var Qt=ot,_t=st,te=Rt.s,ue=0;ue<=Rt.length;ue++){var Ce=void 0;if(ue!==Rt.length){Ce=te[ue];var On=Ce.type;a=Ce.endX,ft=Ce.endY}else On=no,a=Qt,ft=_t;switch(On){case sa:if(Qt=Na(z,y,tt,y,ot,st,Qt,_t),isNaN(Qt))return!0;rt+=Qt,Qt=a,_t=ft;break;case no:if(ot=Na(z,y,tt,y,ot,st,a,ft),isNaN(ot))return!0;rt+=ot;break;case fa:ut=le.Fo(ot,st,Ce.point1X,Ce.point1Y,Ce.point2X,Ce.point2Y,a,ft,tt,y,z,y,.5),rt+=ut;break;case ls:ut=le.Fo(ot,st,(ot+2*Ce.point1X)/3,(st+2*Ce.point1Y)/3,(2*Ce.point1X+a)/3,(2*Ce.point1Y+ft)/3,a,ft,tt,y,z,y,.5),rt+=ut;break;case ra:case us:On=Ce.type===ra?Wa(Ce,Et):_a(Ce,Et,ot,st);var li=On.length;if(li===0){if(ot=Na(z,y,tt,y,ot,st,Ce.type===ra?Ce.centerX:Ce.endX,Ce.type===ra?Ce.centerY:Ce.endY),isNaN(ot))return!0;rt+=ot;break}Ce=null;for(var ti=0;ti<li;ti++){if(Ce=On[ti],ti===0){if(ut=Na(z,y,tt,y,ot,st,Ce[0],Ce[1]),isNaN(ut))return!0;rt+=ut}ut=le.Fo(Ce[0],Ce[1],Ce[2],Ce[3],Ce[4],Ce[5],Ce[6],Ce[7],tt,y,z,y,.5),rt+=ut}Ce!==null&&(a=Ce[6],ft=Ce[7]);break;default:$t("Unknown Segment type: "+Ce.type)}ot=a,st=ft}if(Vt){if(rt!==0)return!0}else if(rt%2!==0)return!0;rt=0}else if(Et.ca(z,y,b?x:x+2))return!0}return!1}function Na(a,y,x,E,b,z,tt,rt){if(le.Yb(b,z,tt,rt,.05,a,y))return NaN;var ot=(a-x)*(z-rt);if(ot===0)return 0;var st=((a*E-y*x)*(b-tt)-(a-x)*(b*rt-z*tt))/ot;if(y=(a*E-y*x)*(z-rt)/ot,st>=a)return 0;if((b>tt?b-tt:tt-b)<(z>rt?z-rt:rt-z)){if(z<rt){if(y<z||y>rt)return 0}else if(y<rt||y>z)return 0}else if(b<tt){if(st<b||st>tt)return 0}else if(st<tt||st>b)return 0;return 0<ot?1:-1}function ss(a,y,x,E){a=a.figures.s;for(var b=a.length,z=0;z<b;z++)if(a[z].ca(y,x,E))return!0;return!1}Ct.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new Tt),this.type===ln.j)return y.h(this.startX+a*(this.endX-this.startX),this.startY+a*(this.endY-this.startY)),y;for(var x=this.flattenedSegments,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,tt=0,rt=0;rt<b;rt++){var ot=E[rt],st=ot.length;for(a=0;a<st;a++){var ut=ot[a];if(tt+ut>=z)return E=z-tt,E=ut===0?0:E/ut,x=x[rt],rt=x[2*a],b=x[2*a+1],y.h(rt+(x[2*a+2]-rt)*E,b+(x[2*a+3]-b)*E),y;tt+=ut}}return y},Ct.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===ln.j)return 180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI;for(var y=this.flattenedSegments,x=this.flattenedLengths,E=y.length,b=this.flattenedTotalLength*a,z=0,tt=0;tt<E;tt++){var rt=x[tt],ot=rt.length;for(a=0;a<ot;a++){var st=rt[a];if(z+st>=b)return b=y[tt],y=b[2*a],x=b[2*a+1],E=b[2*a+2],a=b[2*a+3],1>Math.abs(E-y)&&1>Math.abs(a-x)?0:1>Math.abs(E-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=E-y?0:180:180*Math.atan2(a-x,E-y)/Math.PI;z+=st}}return NaN},Ct.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===ln.j)return y[0]=this.startX+a*(this.endX-this.startX),y[1]=this.startY+a*(this.endY-this.startY),y[2]=180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI,y;for(var x=this.flattenedSegments,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,tt=0,rt=0;rt<b;rt++){var ot=E[rt],st=ot.length;for(a=0;a<st;a++){var ut=ot[a];if(tt+ut>=z)return E=z-tt,E=ut===0?0:E/ut,ut=x[rt],x=ut[2*a],rt=ut[2*a+1],b=ut[2*a+2],a=ut[2*a+3],y[0]=x+(b-x)*E,y[1]=rt+(a-rt)*E,y[2]=1>Math.abs(b-x)&&1>Math.abs(a-rt)?0:1>Math.abs(b-x)?0<=a-rt?90:270:1>Math.abs(a-rt)?0<=b-x?0:180:180*Math.atan2(a-rt,b-x)/Math.PI,y;tt+=ut}}return y},Ct.xx=function(a){if(this.type===ln.j){var y=this.startX,x=this.startY,E=this.endX,b=this.endY;if(y!==E||x!==b){var z=a.x;if(a=a.y,y===E){if(x<b){var tt=x;E=b}else tt=b,E=x;return a<=tt?tt===x?0:1:a>=E?E===x?0:1:Math.abs(a-x)/(E-tt)}if(x===b)return y<E?tt=y:(tt=E,E=y),z<=tt?tt===y?0:1:z>=E?E===y?0:1:Math.abs(z-y)/(E-tt);tt=(E-y)*(E-y)+(b-x)*(b-x);var rt=Tt.alloc();return le.qh(y,x,E,b,z,a,rt),a=rt.x,z=rt.y,Tt.free(rt),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/tt)}}else if(this.type===ln.u){tt=this.startX,rt=this.startY;var ot=this.endX;if(b=this.endY,tt!==ot||rt!==b){y=ot-tt,x=b-rt,z=2*y+2*x,E=a.x,a=a.y,E=Math.min(Math.max(E,tt),ot),a=Math.min(Math.max(a,rt),b),tt=Math.abs(E-tt),ot=Math.abs(E-ot),rt=Math.abs(a-rt),b=Math.abs(a-b);var st=Math.min(tt,ot,rt,b);if(st===rt)return E/z;if(st===ot)return(y+a)/z;if(st===b)return(2*y+x-E)/z;if(st===tt)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,E=Tt.alloc(),b=1/0,rt=tt=0,ot=y.length;for(var ut=st=0,ft=0;ft<ot;ft++)for(var vt=y[ft],yt=x[ft],Pt=vt.length,Et=0;Et<Pt;Et+=2){var Vt=vt[Et],Rt=vt[Et+1];if(Et!==0){le.qh(st,ut,Vt,Rt,a.x,a.y,E);var Qt=(E.x-a.x)*(E.x-a.x)+(E.y-a.y)*(E.y-a.y);Qt<b&&(b=Qt,tt=rt,tt+=Math.sqrt((E.x-st)*(E.x-st)+(E.y-ut)*(E.y-ut))),rt+=yt[(Et-2)/2]}st=Vt,ut=Rt}return Tt.free(E),a=tt/z,0>a?0:1<a?1:a}return 0};function ts(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],E=[],b=[];if(a.type===ln.j)E.push(a.startX),E.push(a.startY),E.push(a.endX),E.push(a.endY),y.push(E),b.push(Math.sqrt((a.startX-a.endX)*(a.startX-a.endX)+(a.startY-a.endY)*(a.startY-a.endY))),x.push(b);else if(a.type===ln.u)E.push(a.startX),E.push(a.startY),E.push(a.endX),E.push(a.startY),E.push(a.endX),E.push(a.endY),E.push(a.startX),E.push(a.endY),E.push(a.startX),E.push(a.startY),y.push(E),b.push(Math.abs(a.startX-a.endX)),b.push(Math.abs(a.startY-a.endY)),b.push(Math.abs(a.startX-a.endX)),b.push(Math.abs(a.startY-a.endY)),x.push(b);else if(a.type===ln.F){var z=new aa;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var tt=new Mr(ra);if(tt.startAngle=0,tt.sweepAngle=360,tt.centerX=(a.startX+a.endX)/2,tt.centerY=(a.startY+a.endY)/2,tt.radiusX=Math.abs(a.startX-a.endX)/2,tt.radiusY=Math.abs(a.startY-a.endY)/2,z.add(tt),a=Wa(tt,z),b=a.length,b===0)E.push(tt.centerX),E.push(tt.centerY);else{tt=z.startX,z=z.startY;for(var rt=0;rt<b;rt++){var ot=a[rt];le.Qe(tt,z,ot[2],ot[3],ot[4],ot[5],ot[6],ot[7],.5,E),tt=ot[6],z=ot[7]}}y.push(E),x.push(Ws(E))}else for(a=a.figures.iterator;a.next();){b=a.value,E=[],E.push(b.startX),E.push(b.startY),tt=b.startX,z=b.startY,rt=tt,ot=z;for(var st=b.segments.s,ut=st.length,ft=0;ft<ut;ft++){var vt=st[ft];switch(vt.type){case sa:4<=E.length&&(y.push(E),x.push(Ws(E))),E=[],E.push(vt.endX),E.push(vt.endY),tt=vt.endX,z=vt.endY,rt=tt,ot=z;break;case no:E.push(vt.endX),E.push(vt.endY),tt=vt.endX,z=vt.endY;break;case fa:le.Qe(tt,z,vt.point1X,vt.point1Y,vt.point2X,vt.point2Y,vt.endX,vt.endY,.5,E),tt=vt.endX,z=vt.endY;break;case ls:le.ep(tt,z,vt.point1X,vt.point1Y,vt.endX,vt.endY,.5,E),tt=vt.endX,z=vt.endY;break;case ra:var yt=Wa(vt,b),Pt=yt.length;if(Pt===0){E.push(vt.centerX),E.push(vt.centerY),tt=vt.centerX,z=vt.centerY;break}for(var Et=0;Et<Pt;Et++){var Vt=yt[Et];le.Qe(tt,z,Vt[2],Vt[3],Vt[4],Vt[5],Vt[6],Vt[7],.5,E),tt=Vt[6],z=Vt[7]}break;case us:if(yt=_a(vt,b,tt,z),Pt=yt.length,Et=vt.endX,Vt=vt.endY,Pt===0){E.push(Et),E.push(Vt),tt=Et,z=Vt;break}for(Et=0;Et<Pt;Et++)Vt=yt[Et],le.Qe(tt,z,Vt[2],Vt[3],Vt[4],Vt[5],Vt[6],Vt[7],.5,E),tt=Vt[6],z=Vt[7];break;default:$t("Segment not of valid type: "+vt.type)}vt.isClosed&&(E.push(rt),E.push(ot))}4<=E.length&&(y.push(E),x.push(Ws(E)))}}}function Ws(a){for(var y=[],x=0,E=0,b=a.length,z=0;z<b;z+=2){var tt=a[z],rt=a[z+1];z!==0&&y.push(Math.sqrt(Gi(x,E,tt,rt))),x=tt,E=rt}return y}Ct.add=function(a){return this.ee.add(a),this},Ct.pm=function(a,y,x,E,b,z,tt,rt){return this._isFrozen&&pn(this),this.fg=new Xe(a,y,b,z).freeze(),this.gg=new Xe(x,E,tt,rt).freeze(),this},Me.Object.defineProperties(ln.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},flattenedSegments:{get:function(){return ts(this),this.tk}},flattenedLengths:{get:function(){return ts(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===ln.j){a=Math.abs(this.endX-this.startX);var y=Math.abs(this.endY-this.startY);a=Math.sqrt(a*a+y*y)}else if(this.type===ln.u)a=2*Math.abs(this.endX-this.startX)+2*Math.abs(this.endY-this.startY);else{y=this.flattenedLengths;for(var x=y.length,E=a=0;E<x;E++)for(var b=y[E],z=b.length,tt=0;tt<z;tt++)a+=b[tt]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&pn(this,a),this.na=a,a===ln.o?this.ee=new dn:(ln.V===null&&(ln.V=new dn().freeze()),this.ee=ln.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&pn(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&pn(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&pn(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&pn(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&pn(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&pn(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&pn(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&pn(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),ln.prototype.setSpots=ln.prototype.pm,ln.prototype.add=ln.prototype.add,ln.prototype.getFractionForPoint=ln.prototype.xx,ln.prototype.getPointAndAngleAlongPath=ln.prototype.Qu,ln.prototype.getAngleAlongPath=ln.prototype.wx,ln.prototype.getPointAlongPath=ln.prototype.Pu,ln.prototype.containsPoint=ln.prototype.ca,ln.prototype.transform=ln.prototype.transform,ln.prototype.rotate=ln.prototype.rotate,ln.prototype.scale=ln.prototype.scale,ln.prototype.offset=ln.prototype.offset,ln.prototype.normalize=ln.prototype.normalize,ln.prototype.computeBoundsWithoutOrigin=ln.prototype.ix,ln.prototype.equalsApprox=ln.prototype.Xa,ln.className="Geometry",ln.j=new Ve(ln,"Line",0),ln.u=new Ve(ln,"Rectangle",1),ln.F=new Ve(ln,"Ellipse",2),ln.o=new Ve(ln,"Path",3),ln.V=null,ln.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",ln.className="Geometry",ln.stringify=ln.ia,ln.fillPath=ln.nb,ln.parse=ln.parse,ln.Line=ln.j,ln.Rectangle=ln.u,ln.Ellipse=ln.F,ln.Path=ln.o;function aa(a,y,x,E,b){Ri(this),x===void 0&&(x=!0),E===void 0&&(E=!0),b===void 0&&(b=!1),this.l=2|(x?4:0)|(E?8:0)|(b?16:0),a!==void 0?this.od=a:this.od=0,y!==void 0?this.pd=y:this.pd=0,this.pl=new dn,this.sr=this.pl.Ja,this.fw=null}aa.prototype.copy=function(){var a=new aa;a.l=this.l&-2,a.od=this.od,a.pd=this.pd;for(var y=this.pl.s,x=y.length,E=a.pl,b=0;b<x;b++){var z=y[b].copy();E.add(z)}return a.sr=this.sr,a.fw=this.fw,a},Ct=aa.prototype,Ct.Xa=function(a){if(!(a instanceof aa&&le.B(this.startX,a.startX)&&le.B(this.startY,a.startY)))return!1;var y=this.segments.s;a=a.segments.s;var x=y.length;if(x!==a.length)return!1;for(var E=0;E<x;E++)if(!y[E].Xa(a[E]))return!1;return!0},Ct.toString=function(a){a===void 0&&(a=-1);for(var y=0>a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a),x=this.segments.s,E=x.length,b=0;b<E;b++)y+=" "+x[b].toString(a);return y},Ct.freeze=function(){this._isFrozen=!0;var a=this.segments;a.freeze();var y=a.s;a=a.length;for(var x=0;x<a;x++)y[x].freeze();return this},Ct.ka=function(){this._isFrozen=!1;var a=this.segments;a.ka(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].ka();return this},Ct.Zu=function(){if(this._isInvalidBounds)return!0;var a=this.segments;if(this.sr!==a.Ja)return!0;a=a.s;for(var y=a.length,x=0;x<y;x++)if(a[x]._isInvalidBounds)return!0;return!1},Ct.add=function(a){return this.pl.add(a),this},Ct.ca=function(a,y,x){for(var E=this.startX,b=this.startY,z=E,tt=b,rt=this.segments.s,ot=rt.length,st=0;st<ot;st++){var ut=rt[st];switch(ut.type){case sa:z=ut.endX,tt=ut.endY,E=ut.endX,b=ut.endY;break;case no:if(le.Yb(E,b,ut.endX,ut.endY,x,a,y))return!0;E=ut.endX,b=ut.endY;break;case fa:if(le.cs(E,b,ut.point1X,ut.point1Y,ut.point2X,ut.point2Y,ut.endX,ut.endY,.5,a,y,x))return!0;E=ut.endX,b=ut.endY;break;case ls:if(le.jv(E,b,ut.point1X,ut.point1Y,ut.endX,ut.endY,.5,a,y,x))return!0;E=ut.endX,b=ut.endY;break;case ra:case us:var ft=ut.type===ra?Wa(ut,this):_a(ut,this,E,b),vt=ft.length,yt=ut.type===ra?ut.centerX:ut.endX,Pt=ut.type===ra?ut.centerY:ut.endY;if(vt===0){if(le.Yb(E,b,yt,Pt,x,a,y))return!0;E=yt,b=Pt;break}for(yt=null,Pt=0;Pt<vt;Pt++)if(yt=ft[Pt],Pt===0&&le.Yb(E,b,yt[0],yt[1],x,a,y)||le.cs(yt[0],yt[1],yt[2],yt[3],yt[4],yt[5],yt[6],yt[7],.5,a,y,x))return!0;yt!==null&&(E=yt[6],b=yt[7]);break;default:$t("Unknown Segment type: "+ut.type)}if(ut.isClosed&&(E!==z||b!==tt)&&le.Yb(E,b,z,tt,x,a,y))return!0}return!1},Me.Object.defineProperties(aa.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},isFilled:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&pn(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&pn(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&pn(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&pn(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&pn(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&pn(this,a),this.pl=a,this._isInvalidBounds=!0}}}),aa.prototype.add=aa.prototype.add,aa.prototype.equalsApprox=aa.prototype.Xa,aa.className="PathFigure";function Mr(a,y,x,E,b,z,tt,rt){Ri(this),a===void 0&&(a=no),this.na=a,this.l=2,y!==void 0?this.Dc=y:this.Dc=0,x!==void 0?this.Ec=x:this.Ec=0,E===void 0&&(E=0),b===void 0&&(b=0),z===void 0&&(z=0),tt===void 0&&(tt=0),a===us?(a=z%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(E,0),this.Pg=Math.max(b,0),typeof tt=="boolean"?tt&&(this.isLargeArc=!0):typeof tt=="number"&&tt&&(this.isLargeArc=!0),rt&&(this.isClockwiseArc=!0)):(this.Ne=E,this.Vh=b,a===ra&&(z=Math.max(z,0)),this.Wh=z,typeof tt=="number"?(a===ra&&(tt=Math.max(tt,0)),this.Pg=tt):this.Pg=0),this.ae=null}Mr.prototype.copy=function(){var a=new Mr;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},Ct=Mr.prototype,Ct.Xa=function(a){if(!(a instanceof Mr)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case sa:case no:return le.B(this.endX,a.endX)&&le.B(this.endY,a.endY);case fa:return le.B(this.endX,a.endX)&&le.B(this.endY,a.endY)&&le.B(this.point1X,a.point1X)&&le.B(this.point1Y,a.point1Y)&&le.B(this.point2X,a.point2X)&&le.B(this.point2Y,a.point2Y);case ls:return le.B(this.endX,a.endX)&&le.B(this.endY,a.endY)&&le.B(this.point1X,a.point1X)&&le.B(this.point1Y,a.point1Y);case ra:return le.B(this.startAngle,a.startAngle)&&le.B(this.sweepAngle,a.sweepAngle)&&le.B(this.centerX,a.centerX)&&le.B(this.centerY,a.centerY)&&le.B(this.radiusX,a.radiusX)&&le.B(this.radiusY,a.radiusY);case us:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&le.B(this.xAxisRotation,a.xAxisRotation)&&le.B(this.endX,a.endX)&&le.B(this.endY,a.endY)&&le.B(this.radiusX,a.radiusX)&&le.B(this.radiusY,a.radiusY);default:return!1}},Ct.qb=function(a){a.classType===Mr&&(this.type=a)},Ct.toString=function(a){switch(a===void 0&&(a=-1),this.type){case sa:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case no:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case fa: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 ls: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 ra: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 us: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":"")},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return this._isFrozen=!1,this},Ct.close=function(){return this.isClosed=!0,this};function Wa(a,y){if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;var x=a.radiusX,E=a.radiusY;if(E===void 0&&(E=x),x===0||E===0)return a.ae=[],a.ae;y=a.Ne;var b=a.Vh,z=le.jx(0,0,x<E?x:E,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==E){var tt=Un.alloc();tt.reset(),x<E?tt.scale(1,E/x):tt.scale(x/E,1),ln.Ha(z,tt),Un.free(tt)}for(x=z.length,E=0;E<x;E++)tt=z[E],tt[0]+=y,tt[1]+=b,tt[2]+=y,tt[3]+=b,tt[4]+=y,tt[5]+=b,tt[6]+=y,tt[7]+=b;return a.ae=z,a.ae}function _a(a,y,x,E){function b(Et,Vt,Rt,Qt){return(Et*Qt<Vt*Rt?-1:1)*Math.acos((Et*Rt+Vt*Qt)/(Math.sqrt(Et*Et+Vt*Vt)*Math.sqrt(Rt*Rt+Qt*Qt)))}if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;if(a.radiusX===0||a.radiusY===0)return a.ae=[],a.ae;y=a.Wh;var z=a.Pg;y===0&&(y=1e-4),z===0&&(z=1e-4);var tt=Math.PI/180*a.Ne,rt=a.isLargeArc,ot=a.isClockwiseArc,st=a.Dc,ut=a.Ec,ft=Math.cos(tt),vt=Math.sin(tt),yt=ft*(x-st)/2+vt*(E-ut)/2;tt=-vt*(x-st)/2+ft*(E-ut)/2;var Pt=yt*yt/(y*y)+tt*tt/(z*z);return 1<Pt&&(y*=Math.sqrt(Pt),z*=Math.sqrt(Pt)),Pt=(rt===ot?-1:1)*Math.sqrt((y*y*z*z-y*y*tt*tt-z*z*yt*yt)/(y*y*tt*tt+z*z*yt*yt)),isNaN(Pt)&&(Pt=0),rt=Pt*y*tt/z,Pt=Pt*-z*yt/y,isNaN(rt)&&(rt=0),isNaN(Pt)&&(Pt=0),x=(x+st)/2+ft*rt-vt*Pt,E=(E+ut)/2+vt*rt+ft*Pt,ut=b(1,0,(yt-rt)/y,(tt-Pt)/z),ft=(yt-rt)/y,st=(tt-Pt)/z,yt=(-yt-rt)/y,rt=(-tt-Pt)/z,tt=b(ft,st,yt,rt),yt=(ft*yt+st*rt)/(Math.sqrt(ft*ft+st*st)*Math.sqrt(yt*yt+rt*rt)),-1>=yt?tt=Math.PI:1<=yt&&(tt=0),!ot&&0<tt&&(tt-=2*Math.PI),ot&&0>tt&&(tt+=2*Math.PI),ot=y>z?1:y/z,yt=y>z?z/y:1,y=le.jx(0,0,y>z?y:z,ut,ut+tt,!0),z=Un.alloc(),z.reset(),z.translate(x,E),z.rotate(a.Ne,0,0),z.scale(ot,yt),ln.Ha(y,z),Un.free(z),a.ae=y,a.ae}Me.Object.defineProperties(Mr.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&&pn(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&pn(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&pn(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&pn(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&pn(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&pn(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&pn(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&pn(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&pn(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&ei(a,">= zero",Mr,"radiusX"),this._isFrozen&&pn(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&ei(a,">= zero",Mr,"radiusY"),this._isFrozen&&pn(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&pn(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&&pn(this,a),360<a&&(a=360),-360>a&&(a=-360),this.Ec=a,this._isInvalidBounds=!0}},isClockwiseArc:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&pn(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&&pn(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&&pn(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Mr.prototype.equalsApprox=Mr.prototype.Xa;var sa=new Ve(Mr,"Move",0),no=new Ve(Mr,"Line",1),fa=new Ve(Mr,"Bezier",2),ls=new Ve(Mr,"QuadraticBezier",3),ra=new Ve(Mr,"Arc",4),us=new Ve(Mr,"SvgArc",4);Mr.className="PathSegment",Mr.Move=sa,Mr.Line=no,Mr.Bezier=fa,Mr.QuadraticBezier=ls,Mr.Arc=ra,Mr.SvgArc=us;function Ta(){this.H=null,this.xu=new Tt(0,0).freeze(),this.mt=new Tt(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}Ta.prototype.copy=function(){var a=new Ta;return this.clone(a)},Ta.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},Ta.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},Ta.prototype.So=function(a,y){var x=this.diagram;return x===null||kg(x,a,y),y},Ta.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(kg(x,a,y),y.assign(x.Ps(y))),y},Me.Object.defineProperties(Ta.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}}}),Ta.prototype.getMultiTouchDocumentPoint=Ta.prototype.Bz,Ta.prototype.getMultiTouchViewPoint=Ta.prototype.So,Ta.className="InputEvent";function Fl(){this.H=null,this.xa="",this.ar=this.Lr=null}Fl.prototype.copy=function(){var a=new Fl;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},Fl.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},Me.Object.defineProperties(Fl.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}}}),Fl.className="DiagramEvent";function Io(){this.Fm=Eo,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Io.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Io.prototype.copy=function(){var a=new Io;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=_e(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=_e(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=_e(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=_e(y)&&typeof y.J=="function"?y.J():y,a},Io.prototype.qb=function(a){a.classType===Io&&(this.change=a)},Io.prototype.toString=function(){var a="";return a=this.change===La?a+"* ":this.change===Eo?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===La?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=Sr(this.object)),this.oldValue!==null&&(a+=" old: "+Sr(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+Sr(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},Io.prototype.I=function(a){return a?this.oldValue:this.newValue},Io.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Io.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Io.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Io.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Io.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},Me.Object.defineProperties(Io.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===La&&(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}}}),Io.prototype.redo=Io.prototype.redo,Io.prototype.canRedo=Io.prototype.canRedo,Io.prototype.undo=Io.prototype.undo,Io.prototype.canUndo=Io.prototype.canUndo,Io.prototype.getParam=Io.prototype.Dz,Io.prototype.getValue=Io.prototype.I,Io.prototype.clear=Io.prototype.clear;var La=new Ve(Io,"Transaction",-1),Eo=new Ve(Io,"Property",0),Xo=new Ve(Io,"Insert",1),ua=new Ve(Io,"Remove",2);Io.className="ChangedEvent",Io.Transaction=La,Io.Property=Eo,Io.Insert=Xo,Io.Remove=ua;function ga(){this.o=new dn().freeze(),this.xa="",this.j=!1}ga.prototype.toString=function(a){var y="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(a!==void 0&&0<a){a=this.changes.count;for(var x=0;x<a;x++){var E=this.changes.M(x);E!==null&&(y+=`
|
|
`+E.toString())}}return y},ga.prototype.clear=function(){var a=this.changes;a.ka();for(var y=a.count-1;0<=y;y--){var x=a.M(y);x!==null&&x.clear()}a.clear(),a.freeze()},ga.prototype.canUndo=function(){return this.isComplete},ga.prototype.undo=function(){if(this.canUndo())for(var a=this.changes.count-1;0<=a;a--){var y=this.changes.M(a);y!==null&&y.undo()}},ga.prototype.canRedo=function(){return this.isComplete},ga.prototype.redo=function(){if(this.canRedo())for(var a=this.changes.count,y=0;y<a;y++){var x=this.changes.M(y);x!==null&&x.redo()}},ga.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new be,x=0;x<a.count;x++){var E=a.M(x);if(E!==null&&E.change===Eo&&E.object){var b=y.get(E.object);b||(b=new be,y.set(E.object,b));var z=b.get(E.propertyName);z===null?b.set(E.propertyName,-1):(0<z&&a.cd(z,null),b.set(E.propertyName,x))}}for(x=y=0;x<a.count;x++)E=a.M(x),E!==null&&(x>y&&a.cd(y,E),y++);for(;a.length>y;)a.pop();a.freeze()}},Me.Object.defineProperties(ga.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}}}),ga.prototype.optimize=ga.prototype.ak,ga.prototype.redo=ga.prototype.redo,ga.prototype.canRedo=ga.prototype.canRedo,ga.prototype.undo=ga.prototype.undo,ga.prototype.canUndo=ga.prototype.canUndo,ga.prototype.clear=ga.prototype.clear,ga.className="Transaction";function Vo(){this.Pt=new cn,this.Jd=!1,this.u=new dn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new dn().freeze(),this.hl=new dn,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}Vo.prototype.toString=function(a){var y="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;y+="[";for(var x=this.nestedTransactionNames.count,E=0;E<x;E++)0<E&&(y+=" "),y+=this.nestedTransactionNames.M(E);if(y+="]",a!==void 0&&0<a)for(x=this.history.count,E=0;E<x;E++)y+=`
|
|
`+this.history.M(E).toString(a-1);return y},Vo.prototype.clear=function(){var a=this.history;a.ka();for(var y=a.count-1;0<=y;y--){var x=a.M(y);x!==null&&x.clear()}a.clear(),this.Ce=-1,a.freeze(),this.Fe=!1,this.Np=null,this.bi=0,this.Ie.ka(),this.Ie.clear(),this.Ie.freeze(),this.hl.clear(),this.Dt=this.rq=this.Gt=this.Ft=!1},Vo.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},Ct=Vo.prototype,Ct.Xw=function(a){this.Pt.add(a)},Ct.Rx=function(a){this.Pt.remove(a)},Ct.Ea=function(a){if(a===void 0&&(a=""),a===null&&(a=""),this.isUndoingRedoing)return!1;this.tt===!0&&(this.tt=!1,this.bi++,this.isInternalTransaction||this.Ob("StartingFirstTransaction",a,this.currentTransaction),0<this.bi&&this.bi--),this.isEnabled&&(this.Ie.ka(),this.Ie.add(a),this.Ie.freeze(),this.currentTransaction===null?this.hl.add(0):this.hl.add(this.currentTransaction.changes.count)),this.bi++;var y=this.transactionLevel===1;return y&&(this.isInternalTransaction||this.Ob("StartedTransaction",a,this.currentTransaction)),y},Ct.eb=function(a){return a===void 0&&(a=""),fl(this,!0,a)},Ct.Kf=function(){return fl(this,!1,"")};function fl(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&Bi("Ending transaction without having started a transaction: "+x);var E=a.transactionLevel===1,b=a.currentTransaction;E&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,b));var z=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var tt=a.Ie.count;0<tt&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(tt-1),a.Ie.freeze()),tt=a.hl.count,0<tt&&(z=a.hl.M(tt-1),a.hl.mb(tt-1))}if(E){if(y)a.rq=!1,b===null&&x!==""&&(b=a.currentTransaction),a.isEnabled&&b!==null&&(b.isComplete||(b.isComplete=!0,b.name=x),a.lx(),y=a.history,y.ka(),E=a.maxHistoryLength,0<=E&&(E===0?y.clear():y.count>=E&&(z=y.M(0),z!==null&&z.clear(),y.mb(0),a.Ce--)),E===0||y.count!==0&&y.get(y.count-1)===b||(y.add(b),a.Ce++),y.freeze()),a.isInternalTransaction||a.Ob("CommittedTransaction",x,b);else{a.Fe=!0;try{a.isEnabled&&b!==null&&(b.isComplete=!0,b.undo())}finally{a.isInternalTransaction||a.Ob("RolledBackTransaction",x,b),a.Fe=!1}b!==null&&b.clear()}return a.Np=null,a.isPendingClear&&a.clear(),a.isPendingClear=!1,a.isPendingUnmodified=!1,!0}if(a.isEnabled&&!y&&b!==null){for(a=z,x=b.changes,b=x.count-1;b>=a;b--)y=x.M(b),y!==null&&y.undo(),x.ka(),x.mb(b);x.freeze()}return!1}Ct.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()}},Vo.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},Vo.prototype.undo=function(){if(this.canUndo()){var a=this.transactionToUndo;try{this.Fe=!0,this.Ob("StartingUndo","Undo",a),this.Ce--,a.undo()}catch(y){Bi("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},Vo.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},Vo.prototype.redo=function(){if(this.canRedo()){var a=this.transactionToRedo;try{this.Fe=!0,this.Ob("StartingRedo","Redo",a),this.Ce++,a.redo()}catch(y){Bi("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},Vo.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var E=new Io;for(E.change=La,E.propertyName=a,E.object=x,E.oldValue=y,a=this.models;a.next();)y=a.value,E.model=y,y.ds(E)},Vo.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new ga);var x=a.copy();y=y.changes,y.ka(),y.add(x),y.freeze(),this.checksTransactionLevel&&0>=this.transactionLevel&&!this.tt&&(a=a.diagram,a!==null&&a.pi===!1||Bi("Change not within a transaction: "+x.toString()))}},Vo.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},Me.Object.defineProperties(Vo.prototype,{models:{get:function(){return this.Pt.iterator}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},transactionToUndo:{get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.M(this.historyIndex):null}},transactionToRedo:{get:function(){return this.historyIndex<this.history.count-1?this.history.M(this.historyIndex+1):null}},isUndoingRedoing:{get:function(){return this.Fe}},history:{get:function(){return this.u}},maxHistoryLength:{get:function(){return this.o},set:function(a){this.o=a}},historyIndex:{get:function(){return this.Ce}},currentTransaction:{get:function(){return this.Np}},transactionLevel:{get:function(){return this.bi}},isInTransaction:{get:function(){return 0<this.bi}},checksTransactionLevel:{get:function(){return this.j},set:function(a){this.j=a}},nestedTransactionNames:{get:function(){return this.Ie}},isPendingClear:{get:function(){return this.Ft},set:function(a){this.Ft=a}},isPendingUnmodified:{get:function(){return this.Gt},set:function(a){this.Gt=a}},isInternalTransaction:{get:function(){return this.Dt},set:function(a){this.Dt=a}},isJustDiscarded:{get:function(){return this.rq}}}),Vo.prototype.handleChanged=Vo.prototype.Tu,Vo.prototype.redo=Vo.prototype.redo,Vo.prototype.undo=Vo.prototype.undo,Vo.prototype.canUndo=Vo.prototype.canUndo,Vo.prototype.discardHistoryAfterIndex=Vo.prototype.lx,Vo.prototype.rollbackTransaction=Vo.prototype.Kf,Vo.prototype.commitTransaction=Vo.prototype.eb,Vo.prototype.startTransaction=Vo.prototype.Ea,Vo.prototype.removeModel=Vo.prototype.Rx,Vo.prototype.addModel=Vo.prototype.Xw,Vo.prototype.clear=Vo.prototype.clear,Vo.className="UndoManager";function Br(){Ri(this),this.H=Tu,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new Ta,this.Zr=-1}Br.prototype.toString=function(){return this.name!==""?this.name+" Tool":bi(this.constructor)},Br.prototype.updateAdornments=function(){},Br.prototype.canStart=function(){return this.isEnabled},Br.prototype.doStart=function(){},Br.prototype.doActivate=function(){this.isActive=!0},Br.prototype.doDeactivate=function(){this.isActive=!1},Br.prototype.doStop=function(){},Br.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},Br.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},Br.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},Br.prototype.doMouseMove=function(){},Br.prototype.doMouseUp=function(){this.stopTool()},Br.prototype.doMouseWheel=function(){},Br.prototype.canStartMultiTouch=function(){return!0},Br.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Tt.allocAt(NaN,NaN)),E=y.So(1,Tt.allocAt(NaN,NaN));if(x.w()&&E.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){a.Bw=a.scale;var b=E.x-x.x,z=E.y-x.y;a.Jw=Math.sqrt(b*b+z*z),y.bubbles=!1}Tt.free(x),Tt.free(E)},Br.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Tt.allocAt(NaN,NaN)),E=y.So(1,Tt.allocAt(NaN,NaN));if(x.w()&&E.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){var b=E.x-x.x,z=E.y-x.y;z=Math.sqrt(b*b+z*z)/a.Jw,b=new Tt((Math.min(E.x,x.x)+Math.max(E.x,x.x))/2,(Math.min(E.y,x.y)+Math.max(E.y,x.y))/2),z*=a.Bw;var tt=a.commandHandler;if(z!==a.scale&&tt.canResetZoom(z)){var rt=a.zoomPoint;a.zoomPoint=b,tt.resetZoom(z),a.zoomPoint=rt}y.bubbles=!1}Tt.free(x),Tt.free(E)},Br.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},Br.prototype.doKeyUp=function(){},Br.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},Br.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},Br.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(Ar?y.meta:y.control){for(a.R("ChangingSelection",a.selection),y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&(y.isSelected=!y.isSelected),a.R("ChangedSelection",a.selection)}else if(y.shift){if(!x.isSelected){for(a.R("ChangingSelection",a.selection),y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&(y.isSelected=!0),a.R("ChangedSelection",a.selection)}}else if(!x.isSelected){for(y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&a.select(y)}}else!y.left||(Ar?y.meta:y.control)||y.shift||a.clearSelection()}},Br.prototype.standardMouseClick=function(a,y){a===void 0&&(a=null),y===void 0&&(y=function(b){return!b.layer.isTemporary});var x=this.diagram,E=x.lastInput;return a=x.ic(E.documentPoint,a,y),E.targetObject=a,pu(a,E,x),E.handled};function pu(a,y,x){if(y.handled=!1,a===null||a.If()){var E=0;y.left?E=y.clickCount===1?1:y.clickCount===2?2:1:y.right&&y.clickCount===1&&(E=3);var b="ObjectSingleClicked";if(a!==null){switch(E){case 1:b="ObjectSingleClicked";break;case 2:b="ObjectDoubleClicked";break;case 3:b="ObjectContextClicked"}E!==0&&x.R(b,a)}else{switch(E){case 1:b="BackgroundSingleClicked";break;case 2:b="BackgroundDoubleClicked";break;case 3:b="BackgroundContextClicked"}E!==0&&x.R(b)}if(a!==null)for(;a!==null;){switch(x=null,E){case 1:x=a.click;break;case 2:x=a.doubleClick?a.doubleClick:a.click;break;case 3:x=a.contextClick}if(x!==null&&(x(y,a),y.handled))break;a=a.panel}else{switch(a=null,E){case 1:a=x.click;break;case 2:a=x.doubleClick?x.doubleClick:x.click;break;case 3:a=x.contextClick}a!==null&&a(y)}}}Br.prototype.standardMouseOver=function(){var a=this.diagram,y=a.lastInput;if(a.animationManager.zb!==!0){var x=a.skipsUndoManager;a.skipsUndoManager=!0;var E=a.viewportBounds.ca(y.documentPoint)?a.ic(y.documentPoint,null,null):null;!y.event||y.event.type!=="pointercancel"&&y.event.type!=="pointerout"||(E=null),y.targetObject=E;var b=!1;if(E!==a.Ck){var z=a.Ck,tt=z;for(a.Ck=E,this.doCurrentObjectChanged(z,E),y.handled=!1;z!==null;){var rt=z.mouseLeave;if(rt!==null&&(E===z||E!==null&&E.rg(z)||(rt(y,z,E),b=!0,y.handled)))break;z=z.panel}for(z=tt,y.handled=!1;E!==null&&(tt=E.mouseEnter,!(tt!==null&&(z===E||z!==null&&z.rg(E)||(tt(y,E,z),b=!0,y.handled))));)E=E.panel;E=a.Ck}if(E!==null){for(z=E,tt="";z!==null&&(tt=z.cursor,tt==="");)z=z.panel;for(a.currentCursor=tt,y.handled=!1,z=E;z!==null&&(E=z.mouseOver,!(E!==null&&(E(y,z),b=!0,y.handled)));)z=z.panel}else this.doUpdateCursor(null),E=a.mouseOver,E!==null&&(E(y),b=!0);b&&a.$b(),a.skipsUndoManager=x}},Br.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},Br.prototype.doCurrentObjectChanged=function(){},Br.prototype.standardMouseWheel=function(){var a=this.diagram,y=a.lastInput,x=y.delta;if(x!==0&&a.documentBounds.w()){var E=a.commandHandler,b=a.toolManager.mouseWheelBehavior;if(E!==null&&(b===bl&&!y.shift||b===Qs&&y.control))(0<x?E.canIncreaseZoom():E.canDecreaseZoom())&&(b=a.zoomPoint,a.zoomPoint=y.viewPoint,0<x?E.increaseZoom():E.decreaseZoom(),a.zoomPoint=b),y.bubbles=!1;else if(b===bl&&y.shift||b===Qs&&!y.control){E=a.position.copy();var z=y.event;b=z.deltaMode;var tt=z.deltaX;z=z.deltaY;var rt="pixel";if(tt===0&&z===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(rt,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(rt,0<x?"left":"right",Math.abs(x)));else{switch(b){case 0:rt="pixel";break;case 1:rt="line";break;case 2:rt="page"}tt!==0&&a.allowHorizontalScroll&&(tt*=a.scrollHorizontalLineChange/16,a.scroll(rt,0<tt?"right":"left",Math.abs(tt))),z!==0&&a.allowVerticalScroll&&(z*=a.scrollVerticalLineChange/16,a.scroll(rt,0<z?"down":"up",Math.abs(z)))}this.doWheelChange(a,E,y)}}},Br.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},Br.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,E=y.clone(this.yy);this.Zr=je(function(){x.doWaitAfter(E)},a)},Br.prototype.cancelWaitAfter=function(){this.Zr!==-1&&Dn.clearTimeout(this.Zr),this.Zr=-1},Br.prototype.doWaitAfter=function(){},Br.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof Zr);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},Br.prototype.isBeyondDragSize=function(a,y){var x=this.diagram;a===void 0&&(a=x.firstInput.viewPoint),y===void 0&&(y=x.lastInput.viewPoint);var E=x.toolManager.dragSize,b=E.width;return E=E.height,x.firstInput.isTouchEvent&&(b+=6,E+=6),Math.abs(y.x-a.x)>b||Math.abs(y.y-a.y)>E},Me.Object.defineProperties(Br.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof ke&&(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}}}),Br.prototype.startTransaction=Br.prototype.Ea,Br.className="Tool";function uo(){Br.call(this),this.name="ToolManager",this.hb=new dn,this.ob=new dn,this.Hb=new dn,this.F=this.V=850,this.o=new Ut(2,2).ja(),this.Ha=5e3,this.ia=Qs,this.u=vu,this.Mp=this.j=null,this.zj=-1}Oe(uo,Br),uo.prototype.initializeStandardTools=function(){},uo.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof Zr&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},uo.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===Hs&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===Vl){y.bubbles=!0;return}if(this.gestureBehavior===Hs)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var x=this.mouseDownTools.length,E=0;E<x;E++){var b=this.mouseDownTools.M(E);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseDown());return}}a.lastInput.button===1&&(this.mouseWheelBehavior===Qs?this.mouseWheelBehavior=bl:this.mouseWheelBehavior===bl&&(this.mouseWheelBehavior=Qs)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},uo.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===Vl){y.bubbles=!0;return}if(this.gestureBehavior===Hs)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomMove();return}}if(this.isActive)for(var x=this.mouseMoveTools.length,E=0;E<x;E++){var b=this.mouseMoveTools.M(E);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseMove());return}}Zl(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Zl(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}uo.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof Zr&&(y===a||y.rg(a))||this.hideToolTip()},uo.prototype.doWaitAfter=function(a){var y=this.diagram;y.ta!==null&&(this.doMouseHover(),this.isActive||this.doToolTip(),a.isTouchEvent&&!y.lastInput.handled&&(a=a.copy(),a.button=2,a.buttons=2,y.lastInput=a,y.qu=!0,y.doMouseUp()))},uo.prototype.doMouseHover=function(){var a=this.diagram,y=a.lastInput;y.targetObject===null&&(y.targetObject=a.ic(y.documentPoint,null,null));var x=y.targetObject;if(x!==null)for(y.handled=!1;x!==null&&(a=this.isActive?x.mouseHold:x.mouseHover,!(a!==null&&(a(y,x),y.handled)));)x=x.panel;else x=this.isActive?a.mouseHold:a.mouseHover,x!==null&&x(y)},uo.prototype.doToolTip=function(){var a=this.diagram,y=a.lastInput;if(y.targetObject===null&&(y.targetObject=a.ic(y.documentPoint,null,null)),y=y.targetObject,y!==null){if(a=this.currentToolTip,!(a instanceof Zr)||y!==a&&!y.rg(a)){for(;y!==null;){if(a=y.toolTip,a!==null){this.showToolTip(a,y);return}y=y.panel}this.hideToolTip()}}else y=a.toolTip,y!==null?this.showToolTip(y,null):this.hideToolTip()},uo.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof Zr){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category="ToolTip",a.placeholder!==null&&(a.placeholder.scale=x.scale);var E=a.diagram;E!==null&&E!==x&&E.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionToolTip(a,y)}else a instanceof Su&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(Dn.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var b=this;this.zj=je(function(){b.hideToolTip()},a)}},uo.prototype.positionToolTip=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),E=a.measuredBounds,b=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=E.width),x.x+E.width>b.right&&(x.x-=E.width+5/y.scale),x.x<b.x&&(x.x=b.x),x.y=x.y+20/y.scale+E.height>b.bottom?x.y-(E.height+5/y.scale):x.y+20/y.scale,x.y<b.y&&(x.y=b.y),a.position=x}},uo.prototype.hideToolTip=function(){this.zj!==-1&&(Dn.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof Zr?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Su&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},uo.prototype.doMouseUp=function(){this.cancelWaitAfter();var a=this.diagram;if(this.isActive)for(var y=this.mouseUpTools.length,x=0;x<y;x++){var E=this.mouseUpTools.M(x);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseUp());return}}a.doFocus(),this.doDeactivate()},uo.prototype.doMouseWheel=function(){this.standardMouseWheel()},uo.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},uo.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},uo.prototype.findTool=function(a){for(var y=this.mouseDownTools.length,x=0;x<y;x++){var E=this.mouseDownTools.M(x);if(E.name===a)return E}for(y=this.mouseMoveTools.length,x=0;x<y;x++)if(E=this.mouseMoveTools.M(x),E.name===a)return E;for(y=this.mouseUpTools.length,x=0;x<y;x++)if(E=this.mouseUpTools.M(x),E.name===a)return E;return null},uo.prototype.replaceTool=function(a,y){y!==null&&(y.diagram=this.diagram);for(var x=this.mouseDownTools.length,E=0;E<x;E++){var b=this.mouseDownTools.M(E);if(b.name===a)return y!==null?this.mouseDownTools.cd(E,y):this.mouseDownTools.mb(E),b}for(x=this.mouseMoveTools.length,E=0;E<x;E++)if(b=this.mouseMoveTools.M(E),b.name===a)return y!==null?this.mouseMoveTools.cd(E,y):this.mouseMoveTools.mb(E),b;for(x=this.mouseUpTools.length,E=0;E<x;E++)if(b=this.mouseUpTools.M(E),b.name===a)return y!==null?this.mouseUpTools.cd(E,y):this.mouseUpTools.mb(E),b;return null},uo.prototype.gb=function(a,y,x){y!==null&&(y.name=a,y.diagram=this.diagram),this.findTool(a)?this.replaceTool(a,y):y!==null&&x.add(y)},Me.Object.defineProperties(uo.prototype,{mouseWheelBehavior:{get:function(){return this.ia},set:function(a){this.ia=a}},gestureBehavior:{get:function(){return this.u},set:function(a){this.u=a}},currentToolTip:{get:function(){return this.j},set:function(a){this.j=a,this.Mp=a!==null&&a instanceof Zr?a.adornedPart:null}},mouseDownTools:{get:function(){return this.hb}},mouseMoveTools:{get:function(){return this.ob}},mouseUpTools:{get:function(){return this.Hb}},hoverDelay:{get:function(){return this.V},set:function(a){this.V=a}},holdDelay:{get:function(){return this.F},set:function(a){this.F=a}},dragSize:{get:function(){return this.o},set:function(a){this.o=a.J()}},toolTipDuration:{get:function(){return this.Ha},set:function(a){this.Ha=a}}}),uo.prototype.replaceStandardTool=uo.prototype.gb;var Qs=new Ve(uo,"WheelScroll",0),bl=new Ve(uo,"WheelZoom",1),mu=new Ve(uo,"WheelNone",2),vu=new Ve(uo,"GestureZoom",3),Hs=new Ve(uo,"GestureCancel",4),Vl=new Ve(uo,"GestureNone",5);uo.className="ToolManager",uo.WheelScroll=Qs,uo.WheelZoom=bl,uo.WheelNone=mu,uo.GestureZoom=vu,uo.GestureCancel=Hs,uo.GestureNone=Vl;function Ho(){Br.call(this),this.name="Dragging",this.u=this.Sw=this.ob=!0,this.o=this.Ha=this.V=this.Oe=null,this.Ym=this.Hb=!1,this.tl=new Tt(NaN,NaN),this.Fr=new Tt,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new cn().freeze(),this.ia=new at,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var Gs;Oe(Ho,Br),Ho.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly&&!a.allowDragOut||!a.allowMove&&!a.allowCopy&&!a.allowDragOut||!a.allowSelect)return!1;var y=a.lastInput;return!y.left||a.currentTool!==this&&(!this.isBeyondDragSize()||y.isTouchEvent&&y.timestamp-a.firstInput.timestamp<this.Ik)?!1:this.findDraggablePart()!==null},Ho.prototype.findDraggablePart=function(){var a=this.diagram;if(a=a.Ol(a.firstInput.documentPoint,!1),a===null)return null;for(;a!==null&&!a.canSelect();)a=a.containingGroup;return a!==null&&(a.canMove()||a.canCopy())?a:null},Ho.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.Ol(a.firstInput.documentPoint,!1);if(y!==null){for(;y!==null&&!y.canSelect();)y=y.containingGroup;this.currentPart=y,this.currentPart===null||this.currentPart.isSelected||(a.R("ChangingSelection",a.selection),y=a.lastInput,(Ar?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},Ho.prototype.doActivate=function(){var a=this.diagram;this.Bn=null,this.currentPart===null&&this.standardMouseSelect();var y=this.currentPart;y!==null&&(y.canMove()||y.canCopy())&&(a.Fu(!0),Ra=null,this.isActive=!0,this.tl.set(a.position),yu(this,a.selection),this.Cg.length=0,a.animationManager.Cc(),this.draggedParts=this.computeEffectiveCollection(a.selection,this.dragOptions),this.Sw=this.diagram.layout.isRealtime,this.diagram.layout.isRealtime=!1,a.Ns=!0,a.Gf("temporaryPixelRatio")===!0&&30<a.$w&&Ds(a),mf(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,Ra=this,Ju=this.diagram,this.doSimulatedDragOut()))};function yu(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof Ln?(a.draggedLink=y.first(),a.draggedLink.canRelinkFrom()&&a.draggedLink.canRelinkTo()&&a.draggedLink.Ej(),a.Oe=x.toolManager.findTool("Relinking"),a.Oe===null&&(a.Oe=new ol,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}Ho.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},Ho.prototype.Pd=function(a){return a===void 0?new th(Wn):this.isGridSnapEnabled?new th(new Tt(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new th(a.copy())},Ho.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),gl(this),id(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<Gs.count){for(var y=Gs,x=y.length,E=0;E<x;E++){var b=y.M(E);jo(b),Po(b),gl(b),b.diagram.ug()}y.clear()}jo(this),this.tl.h(NaN,NaN),Ju!==null&&(Ju.currentCursor=""),Ra=Ju=null,Po(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),wc(a,!0)},Ho.prototype.stopTransaction=function(){var a=this.diagram,y=Br.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function gl(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,Nl(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function bu(){var a=Ra;Po(a),qa(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}Ho.prototype.doCancel=function(){Po(this),qa(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},Ho.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},Ho.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function pl(a,y){if(a.copiedParts===null){var x=a.diagram;if((!y||!x.isReadOnly&&!x.isModelReadOnly)&&a.draggedParts!==null){var E=x.undoManager;for(E.isEnabled&&E.isInTransaction?E.currentTransaction!==null&&0<E.currentTransaction.changes.count&&(x.undoManager.Kf(),x.Ea("Drag")):qa(a),x.skipsUndoManager=!y,x.partManager.addsToTemporaryLayer=!y,a.startPoint=x.firstInput.documentPoint,y=a.copiesEffectiveCollection?a.draggedParts.Lf():x.selection,y=x.Kj(y,x,!0),x=new be,E=a.draggedParts.iterator;E.next();){var b=E.key;if(b.Zc()&&b.canCopy()){var z=y.I(b);z!==null&&(z.location=b.location,z.Va(),x.add(z,a.Pd(z.location)))}}for(y=y.iterator;y.next();)E=y.value,E instanceof Ln&&E.canCopy()&&x.add(E,a.Pd());a.copiedParts=x,yu(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Nh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function Po(a){var y=a.diagram;if(a.copiedParts!==null){if(y.Is(a.copiedParts.Lf(),!1),a.copiedParts=null,a.draggedParts!==null)for(var x=a.draggedParts.iterator;x.next();)x.key instanceof Ln&&(x.value.point=new Tt(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function jo(a){if(a.draggedLink!==null){if(a.dragsLink&&a.Oe!==null){var y=a.Oe;y.diagram.remove(y.temporaryFromNode),y.diagram.remove(y.temporaryToNode),a.Oe.originalLink=null}a.draggedLink=null,a.Oe=null}}function wa(a,y,x){var E=a.diagram,b=a.startPoint,z=Tt.alloc();z.assign(E.lastInput.documentPoint),a.moveParts(y,z.re(b),x),Tt.free(z),E.Gf("temporaryPixelRatio")===!0&&E.Yh===null&&30<E.$w&&(Ds(E),E.hk())}Ho.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var E=this.diagram;E!==null&&nd(E,a,y,this.dragOptions,x)};function qa(a){if(a.draggedParts!==null){for(var y=a.diagram,x=a.draggedParts.iterator;x.next();){var E=x.key;E.Zc()&&(E.location=x.value.point)}for(x=a.draggedParts.iterator;x.next();)if(E=x.key,E instanceof Ln&&E.suspendsRouting){var b=x.value.point;a.draggedParts.add(E,a.Pd()),Nh(E,-b.x,-b.y)}y.bd()}}function Ka(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),io(a,!1));var E=a.findDragOverObject(y),b=x.lastInput;b.targetObject=E,a.doUpdateCursor(E);var z=x.skipsUndoManager,tt=!1;try{if(x.skipsUndoManager=!0,tt=Nl(a,b,E),!a.isActive&&Ra===null)return;var rt=E!==null?E.part:null;if(rt===null||x.handlesDragDropForTopLevelParts&&rt.isTopLevel&&!(rt instanceof ir)){var ot=x.mouseDragOver;ot!==null&&(ot(b),tt=!0)}if(!a.isActive&&Ra===null||(a.doDragOver(y,E),!a.isActive&&Ra===null))return}finally{x.skipsUndoManager=z,tt&&x.bd()}a.Bn=E,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(b.viewPoint)}Ho.prototype.findDragOverObject=function(a){var y=this;return Du(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof Zr||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},Ho.prototype.doUpdateCursor=function(a){var y=this.diagram;(a===null||this.Bn!==a)&&(!this.diagram.currentTool.isActive||this.mayCopy()?y.currentCursor=this.copyCursor:this.mayMove()?y.currentCursor=this.moveCursor:this.mayDragOut()&&(y.currentCursor=this.nodropCursor))};function Nl(a,y,x){var E=!1,b=a.Cg.length,z=0<b?a.Cg[0]:null;if(x===z)return!1;y.handled=!1;for(var tt=0;tt<b;tt++){var rt=a.Cg[tt],ot=rt.mouseDragLeave;if(ot!==null&&(ot(y,rt,x),E=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&Ra===null||x===null)return E;for(y.handled=!1,b=x;b!==null;)a.Cg.push(b),b=ml(b);for(b=a.Cg.length,x=0;x<b&&(tt=a.Cg[x],rt=tt.mouseDragEnter,rt===null||(rt(y,tt,z),E=!0,!y.handled));x++);return E}function ml(a){var y=a.panel;return y!==null?y:a instanceof Fi&&!(a instanceof ir)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function Ao(a,y,x){var E=a.Oe;if(E===null)return null;var b=a.diagram.og(y,E.portGravity,function(st){return E.findValidLinkablePort(st,x)});a=Tt.alloc();var z=1/0,tt=null;for(b=b.iterator;b.next();){var rt=b.value;if(rt.part!==null){var ot=rt.ga(fi,a);ot=y.Bf(ot),ot<z&&(tt=rt,z=ot)}}return Tt.free(a),tt}function io(a,y){var x=a.draggedLink;if(x!==null&&!(2>x.pointsCount)){var E=a.diagram;if(!E.isReadOnly){var b=a.Oe;if(b!==null){var z=null,tt=null;x.fromNode===null&&(z=Ao(a,x.i(0),!1),z!==null&&(tt=z.part));var rt=null,ot=null;x.toNode===null&&(rt=Ao(a,x.i(x.pointsCount-1),!0),rt!==null&&(ot=rt.part)),b.isValidLink(tt,z,ot,rt)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=tt,z!==null&&(x.fromPortId=z.portId),x.toNode=ot,rt!==null&&(x.toPortId=rt.portId),x.fromPort!==E.Mx&&E.R("LinkRelinked",x,E.Mx),x.toPort!==E.Nx&&E.R("LinkRelinked",x,E.Nx)):ef(b,tt,z,ot,rt):ef(b,null,null,null,null)}}}}Ho.prototype.doDragOver=function(){};function Ha(a,y){var x=a.diagram;a.dragsLink&&io(a,!0),gl(a);var E=a.findDragOverObject(y),b=x.lastInput;if(b.targetObject=E,E!==null){b.handled=!1;for(var z=E;z!==null;){var tt=z.mouseDrop;if(tt!==null&&(tt(b,z),b.handled))break;iu(a,b,z),z=ml(z)}}else z=x.mouseDrop,z!==null&&z(b);if(a.isActive||Ra!==null){for(b=(a.copiedParts||a.draggedParts).iterator;b.next();)z=b.key,z instanceof Hn&&z.linksConnected.each(function(rt){rt.suspendsRouting=!1});if(a.doDropOnto(y,E),a.isActive||Ra!==null){for(a=ae.alloc(),y=x.selection.iterator;y.next();)E=y.value,E instanceof Hn&&Fd(x,E,a);ae.free(a)}}}function iu(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof ir||(x=a.mouseDrop,x!==null&&x(y))}function Fd(a,y,x){var E=!1;if(x=y.getAvoidableRect(x),a.viewportBounds.Re(x)&&(E=!0),a=a.Nu(x,function(b){return b.part},function(b){return b instanceof Ln},!0,function(b){return b instanceof Ln},E),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}Ho.prototype.doDropOnto=function(){},Ho.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()?(pl(this,!1),mf(a,this.copiedParts),wa(this,this.copiedParts,!1),id(a,this.copiedParts)):this.mayMove()?(Po(this),wa(this,this.draggedParts,!0)):this.mayDragOut()?(pl(this,!1),wa(this,this.copiedParts,!1)):Po(this),Ka(this,a.lastInput.documentPoint))}},Ho.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?(Po(this),pl(this,!0),mf(a,this.copiedParts),wa(this,this.copiedParts,!1),id(a,this.copiedParts),this.copiedParts!==null&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0}))):(y=!0,Po(this),this.mayMove()&&(wa(this,this.draggedParts,!0),Ka(this,a.lastInput.documentPoint))),this.Ym=!0,Ha(this,a.lastInput.documentPoint),this.isActive){var E=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&hg(this),a.Ya(),id(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",E)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},Ho.prototype.simulatedMouseMove=function(a,y,x){if(Ra===null)return!1;var E=Ra.diagram;x instanceof ke||(x=null);var b=Ju;return x!==b&&(b!==null&&b!==E&&(b.ug(),Ra.isDragOutStarted=!1,b=b.toolManager.findTool("Dragging"),b!==null&&b.doSimulatedDragLeave()),Ju=x,x!==null&&x!==E&&(bu(),b=x.toolManager.findTool("Dragging"),b!==null&&(Gs.contains(b)||Gs.add(b),b.doSimulatedDragEnter())),this.doUpdateCursor(null)),x===null||x===E||!x.allowDrop||x.isReadOnly||!x.allowInsert?!1:(E=x.toolManager.findTool("Dragging"),E!==null&&(a!==null&&(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)),x.lastInput.documentPoint=y,x.lastInput.viewPoint=x.op(y),x.lastInput.down=!1,x.lastInput.up=!1,E.doSimulatedDragOver()),!0)},Ho.prototype.simulatedMouseUp=function(a,y,x){if(Ra===null)return!1;var E=Ju,b=Ra.diagram;if(x===null)return Ra.doCancel(),!0;if(x!==E){var z=E.toolManager.findTool("Dragging");if(E!==null&&E!==b&&z!==null)return E.ug(),Ra.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;Ju=x,E=x.toolManager.findTool("Dragging"),E!==null&&(bu(),Gs.contains(E)||Gs.add(E),E.doSimulatedDragEnter())}return x!==this.diagram?(a!==null?(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)):y===null&&(y=new Tt),x.lastInput.documentPoint=y,x.lastInput.viewPoint=x.op(y),x.lastInput.down=!1,x.lastInput.up=!0,a=x.toolManager.findTool("Dragging"),a!==null&&a.doSimulatedDrop(),a=Ra,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function hg(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof Hn&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}Ho.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(Ar?!a.lastInput.alt:!a.lastInput.control))return!1;for(a=a.selection.iterator;a.next();)if(a.value.canCopy())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canCopy())},Ho.prototype.mayDragOut=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(!a.allowDragOut||!a.allowCopy||a.allowMove)return!1;for(a=a.selection.iterator;a.next();)if(a.value.canCopy())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canCopy())},Ho.prototype.mayMove=function(){var a=this.diagram;if(a.isReadOnly||!a.allowMove)return!1;for(a=a.selection.iterator;a.next();)if(a.value.canMove())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canMove())},Ho.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},Ho.prototype.Az=function(){return Ra},Ho.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=Ra;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},Ho.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),Sl(a),a.animationManager.Cc(),a=Ra,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},Ho.prototype.doSimulatedDragLeave=function(){var a=Ra;a!==null&&a.doSimulatedDragOut(),this.doCancel()},Ho.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=Ra;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;tf(this,y.draggedParts.Lf(),!1,a.firstInput),wa(this,this.copiedParts,!1),Ka(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},Ho.prototype.doSimulatedDrop=function(){var a=this.diagram,y=Ra;if(y!==null){var x=y.diagram;if(y.Ym=!0,Po(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),tf(this,y.draggedParts.Lf(),!0,a.lastInput),wa(this,this.copiedParts,!1);var E=new cn;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0,E.add(b)})),Ha(this,a.lastInput.documentPoint),a.Ya(),this.copiedParts!==null&&(this.transactionResult="ExternalCopy"),this.copiedParts=null,a.doFocus(),a.R("ExternalObjectsDropped",E,x),this.stopTransaction(),a.R("ChangedSelection",a.selection)}a.animationManager.Dm=!1};function tf(a,y,x,E){if(a.copiedParts===null){var b=a.diagram;if(!b.isReadOnly&&!b.isModelReadOnly){b.skipsUndoManager=!x,b.partManager.addsToTemporaryLayer=!x,a.startPoint=E.documentPoint,x=b.Kj(y,b,!0);var z=ae.alloc();b=E=1/0;for(var tt=-1/0,rt=-1/0,ot=y.iterator;ot.next();){var st=ot.value;if(st.isVisible()){var ut=st.location;st=ut.x,ut=ut.y,isNaN(st)||isNaN(ut)||(st<E&&(E=st),ut<b&&(b=ut),st>tt&&(tt=st),ut>rt&&(rt=ut))}}for(E===1/0?z.h(0,0,0,0):z.h(E,b,tt-E,rt-b),E=z.x+z.width/2,b=z.y+z.height/2,ae.free(z),z=a.Fr,tt=new be,rt=Tt.alloc(),ot=y.iterator;ot.next();)st=ot.value,st instanceof Ln&&st.canCopy()&&(ut=x.I(st),ut!==null&&(ut.points=st.points,Nh(ut,z.x-E,z.y-b),ut.suspendsRouting=!0,tt.add(ut,a.Pd())));for(y=y.iterator;y.next();)st=y.value,st.Zc()&&st.canCopy()&&(ot=x.I(st),ot!==null&&(st=st.location,rt.h(z.x-(E-st.x),z.y-(b-st.y)),ot.location=rt,ot.Va(),tt.add(ot,a.Pd(rt))));Tt.free(rt),a.copiedParts=tt,yu(a,tt.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Nh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}Ho.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},Ho.prototype.computeMove=function(a,y,x,E){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,E):new Tt},Me.Object.defineProperties(Ho.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}}}),Ho.prototype.getDraggingSource=Ho.prototype.Az;var Ra=null,Ju=null;Ho.className="DraggingTool",Gs=new dn,wr("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),uo.prototype.doCancel=function(){Ra!==null&&Ra.doCancel(),Br.prototype.doCancel.call(this)};function Gr(){Br.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Ln,y=new dr;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new dr,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new Hn,y=new dr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=fe,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Hn,y=new dr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=fe,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 be,this.Of=this.gj=this.Pf=null}Oe(Gr,Br),Gr.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},Gr.prototype.copyPortProperties=function(a,y,x,E,b){if(a!==null&&y!==null&&x!==null&&E!==null){var z=y.Df(),tt=Ut.alloc();tt.width=y.naturalBounds.width*z,tt.height=y.naturalBounds.height*z,E.desiredSize=tt,Ut.free(tt),b?(E.toSpot=y.toSpot,E.toEndSegmentLength=y.toEndSegmentLength):(E.fromSpot=y.fromSpot,E.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=fi,z=Tt.alloc(),x.location=y.ga(fi,z),Tt.free(z),E.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,E,b)}},Gr.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=fe,y.fromSpot=Li,y.toSpot=Li),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},Gr.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},Gr.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof Hn){var y=this.targetPort.part;this.isForwards?this.copyPortProperties(y,this.targetPort,this.temporaryToNode,this.temporaryToPort,!0):this.copyPortProperties(y,this.targetPort,this.temporaryFromNode,this.temporaryFromPort,!1)}else this.isForwards?this.setNoTargetPortProperties(this.temporaryToNode,this.temporaryToPort,!0):this.setNoTargetPortProperties(this.temporaryFromNode,this.temporaryFromPort,!1);(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},Gr.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof Hn))return null;for(;a!==null;){var E=y?a.toLinkable:a.fromLinkable;if(E===!0&&(a.portId!==null||a instanceof Hn)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(E===!1)break;a=a.panel}return null},Gr.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,E=this.portGravity;0>=E&&(E=.1);var b=this,z=y.og(x,E,function(ft){return b.findValidLinkablePort(ft,a)},null,!0);for(E=1/0,y=null,z=z.iterator;z.next();){var tt=z.value,rt=tt.part;if(rt instanceof Hn){var ot=tt.ga(fi,Tt.alloc()),st=x.x-ot.x,ut=x.y-ot.y;Tt.free(ot),ot=st*st+ut*ut,ot<E&&(st=this.validPortsCache.I(tt),st!==null?st&&(y=tt,E=ot):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,rt,tt)||!a&&this.isValidLink(rt,tt,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(tt,!0),y=tt,E=ot):this.validPortsCache.add(tt,!1))}}return y!==null&&(x=y.part,x instanceof Hn&&(x.layer===null||x.layer.allowLink))?y:null},Gr.prototype.isValidFrom=function(a,y){if(a===null||y===null)return this.isUnconnectedLinkValid;if(this.diagram.currentTool===this&&(a.layer!==null&&!a.layer.allowLink||y.fromLinkable!==!0))return!1;var x=y.fromMaxLinks;if(1/0>x){if(this.originalLink!==null&&a===this.originalFromNode&&y===this.originalFromPort)return!0;if(y=y.portId,y===null&&(y=""),a.Mo(y).count>=x)return!1}return!0},Gr.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},Gr.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},Gr.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof Hn))return!1;a=a.portId,a===null&&(a="");var E=y.part;if(!(E instanceof Hn))return!1;for(y=y.portId,y===null&&(y=""),y=E.Sd(y);y.next();)if(E=y.value,E.fromNode===x&&E.fromPortId===a)return!0;return!1},Gr.prototype.isValidLink=function(a,y,x,E){if(!this.isValidFrom(a,y)||!this.isValidTo(x,E)||!(y===null||E===null||(y.fromLinkableSelfNode&&E.toLinkableSelfNode||!this.isInSameNode(y,E))&&(y.fromLinkableDuplicates&&E.toLinkableDuplicates||!this.isLinked(y,E)))||this.originalLink!==null&&(a!==null&&this.isLabelDependentOnLink(a,this.originalLink)||x!==null&&this.isLabelDependentOnLink(x,this.originalLink))||a!==null&&x!==null&&(a.data===null&&x.data!==null||a.data!==null&&x.data===null)||!this.isValidCycle(a,x,this.originalLink))return!1;if(a!==null){var b=a.linkValidation;if(b!==null&&!b(a,y,x,E,this.originalLink))return!1}return x!==null&&(b=x.linkValidation,b!==null&&!b(a,y,x,E,this.originalLink))?!1:(b=this.linkValidation,b!==null?b(a,y,x,E,this.originalLink):!0)},Gr.prototype.isLabelDependentOnLink=function(a,y){if(a===null)return!1;var x=a.labeledLink;if(x===null)return!1;if(x===y)return!0;var E=new cn;return E.add(a),Qr(this,x,y,E)};function Qr(a,y,x,E){if(y===x)return!0;var b=y.fromNode;return b!==null&&b.isLinkLabel&&(E.add(b),Qr(a,b.labeledLink,x,E))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(E.add(y),Qr(a,y.labeledLink,x,E))))}Gr.prototype.isValidCycle=function(a,y,x){if(x===void 0&&(x=null),a===null||y===null)return this.isUnconnectedLinkValid;var E=this.diagram.validCycle;if(E!==Ec){if(E===Hg){if(E=x||this.temporaryLink,E!==null&&!E.isTreeLink)return!0;for(E=y.linksConnected;E.next();){var b=E.value;if(b!==x&&b.isTreeLink&&b.toNode===y)return!1}return!co(this,a,y,x,!0)}if(E===Gg){if(E=x||this.temporaryLink,E!==null&&!E.isTreeLink)return!0;for(E=a.linksConnected;E.next();)if(b=E.value,b!==x&&b.isTreeLink&&b.fromNode===a)return!1;return!co(this,a,y,x,!0)}if(E===zg)return a===y?a=!0:(E=new cn,E.add(y),a=$o(this,E,a,y,x)),!a;if(E===jg)return!co(this,a,y,x,!1);if(E===Wg)return a===y?a=!0:(E=new cn,E.add(y),a=es(this,E,a,y,x)),!a}return!0};function co(a,y,x,E,b){if(y===x)return!0;if(y===null||x===null)return!1;for(var z=y.linksConnected;z.next();){var tt=z.value;if(tt!==E&&(!b||tt.isTreeLink)&&tt.toNode===y&&(tt=tt.fromNode,tt!==y&&co(a,tt,x,E,b)))return!0}return!1}function $o(a,y,x,E,b){if(x===E)return!0;if(x===null||E===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var tt=z.value;if(tt!==b&&tt.toNode===x&&(tt=tt.fromNode,tt!==x&&$o(a,y,tt,E,b)))return!0}return!1}function es(a,y,x,E,b){if(x===E)return!0;if(x===null||E===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var tt=z.value;if(tt!==b){var rt=tt.fromNode;if(tt=tt.toNode,rt=rt===x?tt:rt,rt!==x&&es(a,y,rt,E,b))return!0}}return!1}Me.Object.defineProperties(Gr.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}}}),Gr.className="LinkingBaseTool";function hs(){Gr.call(this),this.name="Linking",this.V={},this.F=null,this.K=Yh,this.Xd=null}Oe(hs,Gr),hs.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},hs.prototype.findLinkablePort=function(){var a=this.diagram,y=this.startObject;if(y===null&&(y=a.ic(a.firstInput.documentPoint,null,null)),y===null||(a=y.part,!(a instanceof Hn)))return null;var x=this.direction;if(x===Yh||x===Hp){var E=this.findValidLinkablePort(y,!1);if(E!==null||this.startObject===a&&(E=a.port,this.findValidLinkablePort(E,!1)))return this.isForwards=!0,E}return(x===Yh||x===Gp)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},hs.prototype.doActivate=function(){var a=this.diagram,y=this.findLinkablePort();y===null?this.stopTool():(this.Ea(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.isForwards?(this.temporaryToNode!==null&&(this.temporaryToNode.location=a.lastInput.documentPoint),this.originalFromPort=y,y=this.originalFromPort.part,y instanceof Hn&&(this.originalFromNode=y),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode,this.temporaryFromPort,!1)):(this.temporaryFromNode!==null&&(this.temporaryFromNode.location=a.lastInput.documentPoint),this.originalToPort=y,y=this.originalToPort.part,y instanceof Hn&&(this.originalToNode=y),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0)),a.add(this.temporaryFromNode),this.temporaryFromNode&&this.temporaryFromNode.Va(),a.add(this.temporaryToNode),this.temporaryToNode&&this.temporaryToNode.Va(),this.temporaryLink!==null&&(this.temporaryFromNode!==null&&(this.temporaryLink.fromNode=this.temporaryFromNode),this.temporaryToNode!==null&&(this.temporaryLink.toNode=this.temporaryToNode),this.temporaryLink.isTreeLink=this.isNewTreeLink(),this.temporaryLink.bb(),a.add(this.temporaryLink)),this.isActive=!0)},hs.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()},hs.prototype.doStop=function(){Gr.prototype.doStop.call(this),this.startObject=null},hs.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,E=null,b=null,z=null;try{var tt=this.targetPort=this.findTargetPort(this.isForwards);if(tt!==null){var rt=tt.part;rt instanceof Hn&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),E=rt,b=tt):(y=rt,x=tt,this.originalToNode!==null&&(E=this.originalToNode,b=this.originalToPort)))}else this.isForwards?this.originalFromNode!==null&&this.isUnconnectedLinkValid&&(y=this.originalFromNode,x=this.originalFromPort):this.originalToNode!==null&&this.isUnconnectedLinkValid&&(E=this.originalToNode,b=this.originalToPort);y!==null||E!==null?(z=this.insertLink(y,x,E,b),z!==null?(tt===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),z.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",z)):this.doNoLink(y,x,E,b)):this.isForwards?this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),z&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},hs.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof Ln)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)},hs.prototype.insertLink=function(a,y,x,E){return this.diagram.partManager.insertLink(a,y,x,E)},hs.prototype.doNoLink=function(){},Me.Object.defineProperties(hs.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 Yh=new Ve(hs,"Either",0),Hp=new Ve(hs,"ForwardsOnly",0),Gp=new Ve(hs,"BackwardsOnly",0);hs.className="LinkingTool",hs.Either=Yh,hs.ForwardsOnly=Hp,hs.BackwardsOnly=Gp;function ol(){Gr.call(this),this.name="Relinking";var a=new dr;a.figure="Diamond",a.desiredSize=He,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new dr,a.figure="Diamond",a.desiredSize=He,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new ae}Oe(ol,Gr),ol.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Ln){var y="RelinkFrom",x=null;if(a.isSelected&&!this.diagram.isReadOnly){var E=a.selectionObject;E!==null&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null&&(x=this.makeAdornment(E,!1),a.bh(y,x)))}x===null&&a.Jf(y),y="RelinkTo",x=null,a.isSelected&&!this.diagram.isReadOnly&&(E=a.selectionObject,E!==null&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null?(x=this.makeAdornment(E,!0),a.bh(y,x)):x.v())),x===null&&a.Jf(y)}},ol.prototype.makeAdornment=function(a,y){var x=new Zr;return x.type=mn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},ol.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},ol.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 Zr&&x.adornedPart instanceof Ln))return;this.handle=y,this.isForwards=x===null||x.category==="RelinkTo",this.originalLink=x.adornedPart}this.Ea(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.originalFromPort=this.originalLink.fromPort,this.originalFromNode=this.originalLink.fromNode,this.originalToPort=this.originalLink.toPort,this.originalToNode=this.originalLink.toNode,this.Ew.set(this.originalLink.actualBounds),this.originalLink!==null&&0<this.originalLink.pointsCount&&(this.originalLink.fromNode===null&&(this.temporaryFromPort!==null&&(this.temporaryFromPort.desiredSize=oe),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=oe),this.temporaryToNode!==null&&(this.temporaryToNode.location=this.originalLink.i(this.originalLink.pointsCount-1)))),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode,this.temporaryFromPort,!1),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0),a.add(this.temporaryFromNode),a.add(this.temporaryToNode),this.temporaryLink!==null&&(this.temporaryFromNode!==null&&(this.temporaryLink.fromNode=this.temporaryFromNode),this.temporaryToNode!==null&&(this.temporaryLink.toNode=this.temporaryToNode),this.copyLinkProperties(this.originalLink,this.temporaryLink),this.temporaryLink.bb(),a.add(this.temporaryLink)),this.isActive=!0},ol.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===Wf||x===Th)&&(x=Ms),y.curve=x,y.curviness=a.curviness,y.isTreeLink=a.isTreeLink,y.points=a.points,y.routing=a.routing,y.smoothness=a.smoothness,y.fromSpot=a.fromSpot,y.fromEndSegmentLength=a.fromEndSegmentLength,y.fromShortLength=a.fromShortLength,y.toSpot=a.toSpot,y.toEndSegmentLength=a.toEndSegmentLength,y.toShortLength=a.toShortLength}},ol.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()},ol.prototype.doStop=function(){Gr.prototype.doStop.call(this),this.handle=null},ol.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;this.transactionResult=null;var y=this.originalFromNode,x=this.originalFromPort,E=this.originalToNode,b=this.originalToPort,z=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var tt=this.targetPort.part;tt instanceof Hn&&(this.isForwards?(E=tt,b=this.targetPort):(y=tt,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?b=E=null:x=y=null:z=null;z!==null?(this.reconnectLink(z,this.isForwards?E:y,this.isForwards?b:x,this.isForwards),this.targetPort===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint,z.bb()),this.transactionResult=this.name,a.R("LinkRelinked",z,this.isForwards?this.originalToPort:this.originalFromPort)):this.doNoRelink(this.originalLink,this.isForwards),this.originalLink.Xo(this.Ew)}finally{this.stopTool()}}},ol.prototype.reconnectLink=function(a,y,x,E){return x=x!==null&&x.portId!==null?x.portId:"",E?(a.toNode=y,a.toPortId=x):(a.fromNode=y,a.fromPortId=x),!0},ol.prototype.doNoRelink=function(){};function ef(a,y,x,E,b){y!==null?(a.copyPortProperties(y,x,a.temporaryFromNode,a.temporaryFromPort,!1),a.diagram.add(a.temporaryFromNode)):a.diagram.remove(a.temporaryFromNode),E!==null?(a.copyPortProperties(E,b,a.temporaryToNode,a.temporaryToPort,!0),a.diagram.add(a.temporaryToNode)):a.diagram.remove(a.temporaryToNode)}Me.Object.defineProperties(ol.prototype,{fromHandleArchetype:{get:function(){return this.V},set:function(a){this.V=a}},toHandleArchetype:{get:function(){return this.Xd},set:function(a){this.Xd=a}},handle:{get:function(){return this.F},set:function(a){if(a!==null&&!(a.part instanceof Zr))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),ol.className="RelinkingTool",wr("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),wr("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function va(){Br.call(this),this.name="LinkReshaping";var a=new dr;a.figure="Rectangle",a.desiredSize=De,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new dr,a.figure="Diamond",a.desiredSize=He,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new Tt,this.Yq=new dn}Oe(va,Br),va.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:dg},va.prototype.om=function(a,y){a.reshapingBehavior=y},va.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Ln){var y=null;if(a.isSelected&&!this.diagram.isReadOnly){var x=a.path;x!==null&&a.canReshape()&&a.actualBounds.w()&&a.isVisible()&&x.actualBounds.w()&&x.Ed()&&(y=a.Pj(this.name),y===null||y.Aw!==a.pointsCount||y.Uw!==a.resegmentable)&&(y=this.makeAdornment(x),y!==null&&(y.Aw=a.pointsCount,y.Uw=a.resegmentable,a.bh(this.name,y)))}y===null&&a.Jf(this.name)}},va.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,E=y.isOrthogonal,b=null;if(y.points!==null&&1<x){b=new Zr,b.type=mn.Link,x=y.firstPickIndex;var z=y.lastPickIndex,tt=E?1:0;if(y.resegmentable&&y.computeCurve()!==hl)for(var rt=x+tt;rt<z-tt;rt++){var ot=this.makeResegmentHandle(a,rt);ot!==null&&(ot.segmentIndex=rt,ot.segmentFraction=.5,ot.fromMaxLinks=999,b.add(ot))}for(tt=x+1;tt<z;tt++)if(rt=this.makeHandle(a,tt),rt!==null){if(rt.segmentIndex=tt,tt!==x)if(tt===x+1&&E){ot=y.i(x);var st=y.i(x+1);le.B(ot.x,st.x)&&le.B(ot.y,st.y)&&(st=y.i(x-1)),le.B(ot.x,st.x)?(this.om(rt,ph),rt.cursor="n-resize"):le.B(ot.y,st.y)&&(this.om(rt,gh),rt.cursor="w-resize")}else tt===z-1&&E?(ot=y.i(z-1),st=y.i(z),le.B(ot.x,st.x)&&le.B(ot.y,st.y)&&(ot=y.i(z+1)),le.B(ot.x,st.x)?(this.om(rt,ph),rt.cursor="n-resize"):le.B(ot.y,st.y)&&(this.om(rt,gh),rt.cursor="w-resize")):tt!==z&&(this.om(rt,nf),rt.cursor="move");b.add(rt)}b.adornedObject=a}return b},va.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},va.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},va.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowReshape&&a.lastInput.left?this.findToolHandleAt(a.firstInput.documentPoint,this.name)!==null:!1},va.prototype.doActivate=function(){var a=this.diagram;if(this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle!==null){var y=this.handle.part.adornedPart;if(y instanceof Ln){if(this.Ts=y,a.isMouseCaptured=!0,this.Ea(this.name),y.resegmentable&&this.handle.fromMaxLinks===999){var x=y.points.copy(),E=this.getResegmentingPoint();if(x.Gb(this.handle.segmentIndex+1,E),y.isOrthogonal&&x.Gb(this.handle.segmentIndex+1,E),y.points=x,y.Wb(),y.updateAdornments(),this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name),this.handle===null){this.doDeactivate();return}}this.Fw=y.i(this.handle.segmentIndex),this.Yq=y.points.copy(),this.isActive=!0}}},va.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},va.prototype.stopTransaction=function(){var a=this.diagram,y=Br.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},va.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},va.prototype.getResegmentingPoint=function(){return this.handle.ga(fi)},va.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},va.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.computeReshape(a.lastInput.documentPoint);if(this.reshape(y),y=this.adornedLink,y!==null&&y.resegmentable){var x=this.handle.segmentIndex,E=y.i(x-1),b=y.i(x),z=y.i(x+1);if(y.isOrthogonal){if(x>y.firstPickIndex+1&&x<y.lastPickIndex-1){var tt=y.i(x-2);if(Math.abs(E.x-b.x)<this.resegmentingDistance&&Math.abs(E.y-b.y)<this.resegmentingDistance&&(fh(this,tt,E,b,z,!0)||fh(this,tt,E,b,z,!1))){var rt=y.points.copy();fh(this,tt,E,b,z,!0)?(rt.cd(x-2,new Tt(tt.x,(z.y+tt.y)/2)),rt.cd(x+1,new Tt(z.x,(z.y+tt.y)/2))):(rt.cd(x-2,new Tt((z.x+tt.x)/2,tt.y)),rt.cd(x+1,new Tt((z.x+tt.x)/2,z.y))),rt.mb(x),rt.mb(x-1),y.points=rt,y.Wb()}else tt=y.i(x+2),Math.abs(b.x-z.x)<this.resegmentingDistance&&Math.abs(b.y-z.y)<this.resegmentingDistance&&(fh(this,E,b,z,tt,!0)||fh(this,E,b,z,tt,!1))&&(rt=y.points.copy(),fh(this,E,b,z,tt,!0)?(rt.cd(x-1,new Tt(E.x,(E.y+tt.y)/2)),rt.cd(x+2,new Tt(tt.x,(E.y+tt.y)/2))):(rt.cd(x-1,new Tt((E.x+tt.x)/2,E.y)),rt.cd(x+2,new Tt((E.x+tt.x)/2,tt.y))),rt.mb(x+1),rt.mb(x),y.points=rt,y.Wb())}}else tt=Tt.alloc(),le.qh(E.x,E.y,z.x,z.y,b.x,b.y,tt)&&tt.Bf(b)<this.resegmentingDistance*this.resegmentingDistance&&(E=y.points.copy(),E.mb(x),y.points=E,y.Wb()),Tt.free(tt)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function fh(a,y,x,E,b,z){return z?Math.abs(y.y-x.y)<a.resegmentingDistance&&Math.abs(x.y-E.y)<a.resegmentingDistance&&Math.abs(E.y-b.y)<a.resegmentingDistance:Math.abs(y.x-x.x)<a.resegmentingDistance&&Math.abs(x.x-E.x)<a.resegmentingDistance&&Math.abs(E.x-b.x)<a.resegmentingDistance}va.prototype.reshape=function(a){var y=this.adornedLink;y.uh();var x=this.handle.segmentIndex,E=this.Ru(this.handle);if(y.isOrthogonal)if(x===y.firstPickIndex+1)x=y.firstPickIndex+1,E===ph?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):E===gh&&(y.L(x,a.x,y.i(x-1).y),y.L(x+1,a.x,y.i(x+2).y));else if(x===y.lastPickIndex-1)x=y.lastPickIndex-1,E===ph?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):E===gh&&(y.L(x-1,a.x,y.i(x-2).y),y.L(x,a.x,y.i(x+1).y));else{E=x;var b=y.i(E),z=y.i(E-1),tt=y.i(E+1);le.B(z.x,b.x)&&le.B(b.y,tt.y)?(le.B(z.x,y.i(E-2).x)&&!le.B(z.y,y.i(E-2).y)?(y.m(E,a.x,z.y),x++,E++):y.L(E-1,a.x,z.y),le.B(tt.y,y.i(E+2).y)&&!le.B(tt.x,y.i(E+2).x)?y.m(E+1,tt.x,a.y):y.L(E+1,tt.x,a.y)):le.B(z.y,b.y)&&le.B(b.x,tt.x)?(le.B(z.y,y.i(E-2).y)&&!le.B(z.x,y.i(E-2).x)?(y.m(E,z.x,a.y),x++,E++):y.L(E-1,z.x,a.y),le.B(tt.x,y.i(E+2).x)&&!le.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):le.B(z.x,b.x)&&le.B(b.x,tt.x)?(le.B(z.x,y.i(E-2).x)&&!le.B(z.y,y.i(E-2).y)?(y.m(E,a.x,z.y),x++,E++):y.L(E-1,a.x,z.y),le.B(tt.x,y.i(E+2).x)&&!le.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):le.B(z.y,b.y)&&le.B(b.y,tt.y)&&(le.B(z.y,y.i(E-2).y)&&!le.B(z.x,y.i(E-2).x)?(y.m(E,z.x,a.y),x++,E++):y.L(E-1,z.x,a.y),le.B(tt.y,y.i(E+2).y)&&!le.B(tt.x,y.i(E+2).x)?y.m(E+1,tt.x,a.y):y.L(E+1,tt.x,a.y)),y.L(x,a.x,a.y)}else y.L(x,a.x,a.y),E=y.fromNode,b=y.fromPort,E!==null&&(z=E.findVisibleNode(),z!==null&&z!==E&&(E=z,b=E.port)),x===1&&y.computeSpot(!0,b).Mc()&&(z=b.ga(fi,Tt.alloc()),E=y.getLinkPointFromPoint(E,b,z,a,!0,Tt.alloc()),y.L(0,E.x,E.y),Tt.free(z),Tt.free(E)),E=y.toNode,b=y.toPort,E!==null&&(z=E.findVisibleNode(),z!==null&&z!==E&&(E=z,b=E.port)),x===y.pointsCount-2&&y.computeSpot(!1,b).Mc()&&(x=b.ga(fi,Tt.alloc()),a=y.getLinkPointFromPoint(E,b,x,a,!1,Tt.alloc()),y.L(y.pointsCount-1,a.x,a.y),Tt.free(x),Tt.free(a));y.zf()},va.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case nf:return a;case ph:return new Tt(y.i(x).x,a.y);case gh:return new Tt(a.x,y.i(x).y);default:case dg:return y.i(x)}},Me.Object.defineProperties(va.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},midHandleArchetype:{get:function(){return this.u},set:function(a){this.u=a}},handle:{get:function(){return this.j},set:function(a){if(a!==null&&!(a.part instanceof Zr))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedLink:{get:function(){return this.Ts}},resegmentingDistance:{get:function(){return this.F},set:function(a){this.F=a}},originalPoint:{get:function(){return this.Fw}},originalPoints:{get:function(){return this.Yq}}}),va.prototype.setReshapingBehavior=va.prototype.om,va.prototype.getReshapingBehavior=va.prototype.Ru;var dg=new Ve(va,"None",0),gh=new Ve(va,"Horizontal",1),ph=new Ve(va,"Vertical",2),nf=new Ve(va,"All",3);va.className="LinkReshapingTool",va.None=dg,va.Horizontal=gh,va.Vertical=ph,va.All=nf,wr("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function as(){Br.call(this),this.name="Resizing",this.o=new Ut(1,1).freeze(),this.j=new Ut(9999,9999).freeze(),this.yg=new Ut(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new dr;a.alignmentFocus=fi,a.figure="Rectangle",a.desiredSize=De,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new Tt,this.Dw=new Ut,this.Tn=new Tt,this.rt=new Ut(0,0),this.qt=new Ut(1/0,1/0),this.pt=new Ut(1,1)}Oe(as,Br),as.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Ln)){if(a.isSelected&&!this.diagram.isReadOnly){var y=a.resizeObject,x=a.Pj(this.name);if(y!==null&&a.canResize()&&a.actualBounds.w()&&a.isVisible()&&y.actualBounds.w()&&y.Ed()&&((x===null||x.adornedObject!==y)&&(x=this.makeAdornment(y)),x!==null)){y=y.li(),ud(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},as.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new Zr,y.type=mn.Spot,y.locationSpot=fi;var x=new ks;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,Wi)),y.add(this.makeHandle(a,fr)),y.add(this.makeHandle(a,hr)),y.add(this.makeHandle(a,Tr)),y.add(this.makeHandle(a,Co)),y.add(this.makeHandle(a,eo)),y.add(this.makeHandle(a,Uo)),y.add(this.makeHandle(a,lo))}else if(Rl(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},as.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},as.prototype.updateResizeHandles=function(a,y){if(a!==null){if(!a.alignment.Xb()&&(a.cursor==="pointer"||0<a.cursor.indexOf("resize")))t:{var x=a.alignment;if(x.Mc()&&(x=fi),0>=x.x)y=0>=x.y?y+225:1<=x.y?y+135:y+180;else if(1<=x.x)0>=x.y?y+=315:1<=x.y&&(y+=45);else if(0>=x.y)y+=270;else if(1<=x.y)y+=90;else break t;0>y?y+=360:360<=y&&(y-=360),a.cursor=22.5>y?"e-resize":67.5>y?"se-resize":112.5>y?"s-resize":157.5>y?"sw-resize":202.5>y?"w-resize":247.5>y?"nw-resize":292.5>y?"n-resize":337.5>y?"ne-resize":"e-resize"}else if(a instanceof mn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},as.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},as.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))},as.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},as.prototype.stopTransaction=function(){var a=this.diagram,y=Br.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},as.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},as.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,E=this.pt,b=this.adornedObject.qs(a.lastInput.documentPoint,Tt.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),a.bd(),Tt.free(b)}},as.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,E=this.pt,b=this.adornedObject.qs(a.lastInput.documentPoint,Tt.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),Tt.free(b),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},as.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 ir){var E=new dn;if(E.add(a),!this.dragsMembers&&a.placeholder===null){var b=new at;b.dragsMembers=!1}y.moveParts(E,this.oppositePoint.copy().re(x),!0,b)}else a.location=a.location.copy().re(x).add(this.oppositePoint);y.bd()}},as.prototype.computeResize=function(a,y,x,E,b,z){y.Mc()&&(y=fi);var tt=this.adornedObject.naturalBounds,rt=tt.x,ot=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=Tt.alloc(),le.No(a.x,a.y,rt,ot,b.width,b.height,vt),a=tt.copy(),0>=y.x?0>=y.y?(a.x=Math.max(vt.x,st-E.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-E.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,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width),a.x=st-a.width,a.y=ut-a.height)):1<=y.y?(a.x=Math.max(vt.x,st-E.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-ot,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width),a.x=st-a.width)):(a.x=Math.max(vt.x,st-E.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,E.height),x.height),a.width=a.height/ft,a.y=ot+.5*(ut-ot-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(vt.x-rt,E.width),x.width),a.y=Math.max(vt.y,ut-E.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,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width),a.y=ut-a.height)):1<=y.y?(a.width=Math.max(Math.min(vt.x-rt,E.width),x.width),a.height=Math.max(Math.min(vt.y-ot,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width))):(a.width=Math.max(Math.min(vt.x-rt,E.width),x.width),z||(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft,a.y=ot+.5*(ut-ot-a.height))):0>=y.y?(a.y=Math.max(vt.y,ut-E.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,E.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-ot,E.height),x.height),z||(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width,a.x=rt+.5*(st-rt-a.width))),Tt.free(vt),a},as.prototype.computeReshape=function(){var a=en;return this.adornedObject instanceof dr&&(a=Lv(this.adornedObject)),!(a===gi||this.diagram.lastInput.shift)},as.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},as.prototype.computeMaxSize=function(){var a=this.adornedObject.maxSize.copy(),y=this.maxSize;return!isNaN(y.width)&&y.width<a.width&&(a.width=y.width),!isNaN(y.height)&&y.height<a.height&&(a.height=y.height),a},as.prototype.computeCellSize=function(){var a=new Ut(NaN,NaN),y=this.adornedObject.part;return y!==null&&(y=y.resizeCellSize,!isNaN(y.width)&&0<y.width&&(a.width=y.width),!isNaN(y.height)&&0<y.height&&(a.height=y.height)),y=this.cellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height),y=this.diagram,(isNaN(a.width)||isNaN(a.height))&&y&&(y=y.grid,y!==null&&y.visible&&this.isGridSnapEnabled&&(y=y.gridCellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height))),(isNaN(a.width)||a.width===0||a.width===1/0)&&(a.width=1),(isNaN(a.height)||a.height===0||a.height===1/0)&&(a.height=1),a},Me.Object.defineProperties(as.prototype,{handleArchetype:{get:function(){return this.F},set:function(a){this.F=a}},handle:{get:function(){return this.u},set:function(a){if(a!==null&&!(a.part instanceof Zr))throw Error("new handle is not in an Adornment: "+a);this.u=a}},adornedObject:{get:function(){return this.ue},set:function(a){if(a!==null&&a.part instanceof Zr)throw Error("new handle must not be in an Adornment: "+a);this.ue=a}},minSize:{get:function(){return this.o},set:function(a){if(!this.o.D(a)){var y=a.width;isNaN(y)&&(y=0),a=a.height,isNaN(a)&&(a=0),this.o.h(y,a)}}},maxSize:{get:function(){return this.j},set:function(a){if(!this.j.D(a)){var y=a.width;isNaN(y)&&(y=1/0),a=a.height,isNaN(a)&&(a=1/0),this.j.h(y,a)}}},cellSize:{get:function(){return this.yg},set:function(a){this.yg.D(a)||this.yg.assign(a)}},isGridSnapEnabled:{get:function(){return this.V},set:function(a){this.V=a}},dragsMembers:{get:function(){return this.ia},set:function(a){this.ia=a}},oppositePoint:{get:function(){return this.Xq},set:function(a){this.Xq.D(a)||this.Xq.assign(a)}},originalDesiredSize:{get:function(){return this.Dw}},originalLocation:{get:function(){return this.Tn}}}),as.className="ResizingTool",wr("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function xs(){Br.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new Tt,this.ue=null;var a=new dr;a.figure="Ellipse",a.desiredSize=He,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new Tt(NaN,NaN),this.u=0,this.F=50}Oe(xs,Br),xs.prototype.updateAdornments=function(a){if(a!==null){if(a.ph()){var y=a.rotateObject;if(y===a||y===a.path||y.isPanelMain)return}if(a.isSelected&&!this.diagram.isReadOnly&&(y=a.rotateObject,y!==null&&a.canRotate()&&a.actualBounds.w()&&a.isVisible()&&y.actualBounds.w()&&y.Ed())){var x=a.Pj(this.name);if((x===null||x.adornedObject!==y)&&(x=this.makeAdornment(y)),x!==null){x.angle=y.li(),x.placeholder===null&&(x.location=this.computeAdornmentLocation(y)),a.bh(this.name,x);return}}a.Jf(this.name)}},xs.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new Zr,y.type=mn.Position,y.locationSpot=fi;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(Rl(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},xs.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowRotate&&a.lastInput.left?this.findToolHandleAt(a.firstInput.documentPoint,this.name)!==null:!1},xs.prototype.doActivate=function(){var a=this.diagram;if(this.adornedObject===null){if(this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle===null)return;this.adornedObject=this.handle.part.adornedObject}this.adornedObject!==null&&(a.isMouseCaptured=!0,a.delaysLayout=!0,this.Ea(this.name),this.Cw=this.adornedObject.angle,this.kr=this.computeRotationPoint(this.adornedObject),this.Tn=this.adornedObject.part.location.copy(),this.isActive=!0)},xs.prototype.computeRotationPoint=function(a){var y=a.part,x=y.locationObject;return y.rotationSpot.sb()?a.ga(y.rotationSpot):a===y||a===x?x.ga(y.locationSpot):a.ga(fi)},xs.prototype.computeAdornmentLocation=function(a){var y=this.rotationPoint;y.w()||(y=this.computeRotationPoint(a)),y=a.qs(y);var x=this.handleAngle;0>x?x+=360:360<=x&&(x-=360),x=Math.round(45*Math.round(x/45));var E=this.handleDistance;return x===0?y.x=a.naturalBounds.width+E:x===45?(y.x=a.naturalBounds.width+E,y.y=a.naturalBounds.height+E):x===90?y.y=a.naturalBounds.height+E:x===135?(y.x=-E,y.y=a.naturalBounds.height+E):x===180?y.x=-E:x===225?(y.x=-E,y.y=-E):x===270?y.y=-E:x===315&&(y.x=a.naturalBounds.width+E,y.y=-E),a.ga(y)},xs.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new Tt(NaN,NaN),this.isActive=a.isMouseCaptured=!1},xs.prototype.stopTransaction=function(){var a=this.diagram,y=Br.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},xs.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},xs.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},xs.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()},xs.prototype.rotate=function(a){var y=this.adornedObject;if(y!==null){y.angle=a,y=y.part,y.Va();var x=y.locationObject,E=y.rotateObject;(x===E||x.rg(E))&&(x=this.Tn.copy(),y.location=x.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint)),this.diagram.bd()}},xs.prototype.computeRotate=function(a){a=this.rotationPoint.ab(a)-this.handleAngle;var y=this.adornedObject.panel;y!==null&&(a-=y.li()),360<=a?a-=360:0>a&&(a+=360),y=Math.min(Math.abs(this.snapAngleMultiple),180);var x=Math.min(Math.abs(this.snapAngleEpsilon),y/2);return!this.diagram.lastInput.shift&&0<y&&0<x&&(a%y<x?a=Math.floor(a/y)*y:a%y>y-x&&(a=(Math.floor(a/y)+1)*y)),360<=a?a-=360:0>a&&(a+=360),a},Me.Object.defineProperties(xs.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 Zr))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 Zr)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}}}),xs.className="RotatingTool",wr("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function Uh(){Br.call(this),this.name="ClickSelecting"}Oe(Uh,Br),Uh.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},Uh.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},Uh.className="ClickSelectingTool";function Tl(){Br.call(this),this.name="Action",this.pk=null}Oe(Tl,Br),Tl.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,y=a.lastInput,x=a.ic(y.documentPoint,function(E){for(;E.panel!==null&&!E.isActionable;)E=E.panel;return E});return x!==null&&x.isActionable?(this.pk=x,a.Ck=a.ic(y.documentPoint,null,null),!0):!1},Tl.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()},Tl.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))}},Tl.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()},Tl.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())},Tl.prototype.doStop=function(){this.pk=null},Tl.className="ActionTool";function mh(){Br.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Tt(0,0)}Oe(mh,Br),mh.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)},mh.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},mh.prototype.insertPart=function(a){var y=this.diagram,x=this.archetypeNodeData;if(x===null)return null;var E=null;try{if(y.R("ChangingSelection",y.selection),this.Ea(this.name),x instanceof Fi)x.Zc()&&(Rl(x),E=x.copy(),E!==null&&y.add(E));else if(x!==null){var b=y.model.copyNodeData(x);_e(b)&&(y.model.xf(b),E=y.Lc(b))}if(E!==null){var z=Tt.allocAt(a.x,a.y);this.isGridSnapEnabled&&pf(this.diagram,E,a,z),E.location=z,y.allowSelect&&(y.clearSelection(!0),E.isSelected=!0),Tt.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",E)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return E},Me.Object.defineProperties(mh.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}}}),mh.className="ClickCreatingTool";function vl(){Br.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Fi;a.layerName="Tool",a.selectable=!1;var y=new dr;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Oe(vl,Br),vl.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(!a.allowSelect)return!1;var y=a.lastInput;return!(!y.left||a.currentTool!==this&&(!this.isBeyondDragSize()||y.timestamp-a.firstInput.timestamp<this.delay||a.Ol(y.documentPoint,!0)!==null))},vl.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},vl.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},vl.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive&&this.box!==null){var y=this.computeBoxBounds(),x=this.box.fb("SHAPE");x===null&&(x=this.box.Pb());var E=Ut.alloc().h(y.width,y.height);x.desiredSize=E,this.box.mm(y.x,y.y,!1),Ut.free(E),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},vl.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;a.remove(this.box);try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),this.selectInRect(this.computeBoxBounds()),a.R("ChangedSelection",a.selection)}finally{a.currentCursor=""}}this.stopTool()},vl.prototype.computeBoxBounds=function(){var a=this.diagram;return new ae(a.firstInput.documentPoint,a.lastInput.documentPoint)},vl.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),Ar?x.meta:x.control)if(x.shift)for(a=a.iterator;a.next();)y=a.value,y.isSelected&&(y.isSelected=!1);else for(a=a.iterator;a.next();)y=a.value,y.isSelected=!y.isSelected;else if(x.shift)for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0);else{for(x=new dn,y=y.selection.iterator;y.next();){var E=y.value;a.contains(E)||x.add(E)}for(y=x.iterator;y.next();)y.value.isSelected=!1;for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0)}},Me.Object.defineProperties(vl.prototype,{delay:{get:function(){return this.Ik},set:function(a){this.Ik=a}},isPartialInclusion:{get:function(){return this.o},set:function(a){this.o=a}},box:{get:function(){return this.j},set:function(a){this.j=a}}}),vl.className="DragSelectingTool";function ns(){Br.call(this),this.name="Panning",this.Xt=new Tt,this.xy=new Tt,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(Dn.document,"scroll",a.Kw,!1),a.stopTool()}}Oe(ns,Br),ns.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!(!a.allowHorizontalScroll&&!a.allowVerticalScroll||!a.lastInput.left||a.currentTool!==this&&!this.isBeyondDragSize())},ns.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(Dn.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},ns.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},ns.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},ns.prototype.doMouseMove=function(){this.move()},ns.prototype.doMouseUp=function(){this.move(),this.stopTool()},ns.prototype.move=function(){var a=this.diagram;if(this.isActive&&a)if(this.xg)a.lastInput.bubbles=!0;else{var y=a.position,x=a.firstInput.documentPoint,E=a.lastInput.documentPoint,b=y.x+x.x-E.x;x=y.y+x.y-E.y,a.allowHorizontalScroll||(b=y.x),a.allowVerticalScroll||(x=y.y),a.position=this.xy.h(b,x)}},Me.Object.defineProperties(ns.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),ns.className="PanningTool",wr("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),wr("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),wr("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),wr("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),wr("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Su(){this.F=this.u=this.j=this.o=null}Me.Object.defineProperties(Su.prototype,{mainElement:{get:function(){return this.u},set:function(a){this.u=a}},show:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},hide:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}},valueFunction:{get:function(){return this.F},set:function(a){this.F=a}}}),Su.className="HTMLInfo";function Dl(a,y,x){this.text=a,this.hx=y,this.visible=x}Dl.className="ContextMenuButtonInfo";function Ps(){Br.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new Tt,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}Oe(Ps,Br);function Kl(a){var y=new Su;y.show=function(b,z,tt){tt.showDefaultContextMenu()},y.hide=function(b,z){z.hideDefaultContextMenu()},Xh=y,a.tu=function(){a.stopTool()},y=mi("div");var x=mi("div");y.style.cssText="top: 0px;z-index:10002;position: fixed;display: none;text-align: center;left: 25%;width: 50%;background-color: #F5F5F5;padding: 16px;border: 16px solid #444;border-radius: 10px;margin-top: 10px",x.style.cssText="z-index:10001;position: fixed;display: none;top: 0;left: 0;width: 100%;height: 100%;background-color: black;opacity: 0.8;";var E=mi("style");Dn.document.getElementsByTagName("head")[0].appendChild(E),E.sheet.insertRule(".goCXul { list-style: none; }",0),E.sheet.insertRule(".goCXli {font:700 1.5em Helvetica, Arial, sans-serif;position: relative;min-width: 60px; }",0),E.sheet.insertRule(".goCXa {color: #444;display: inline-block;padding: 4px;text-decoration: none;margin: 2px;border: 1px solid gray;border-radius: 10px; }",0),E=a.diagram,E!==null&&(E.addEventListener(y,"contextmenu",ya,!1),E.addEventListener(y,"selectstart",ya,!1),E.addEventListener(x,"contextmenu",ya,!1)),y.className="goCXforeground",x.className="goCXbackground",Dn.document.body&&(Dn.document.body.appendChild(y),Dn.document.body.appendChild(x)),dc=y,bd=x,hc=!0}function ya(a){return a.preventDefault(),!1}Ps.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return this.isBeyondDragSize()||!a.lastInput.right||1<a.lastInput.clickCount?!1:!!(a.lastInput.isTouchEvent&&this.defaultTouchContextMenu!==null||this.findObjectWithContextMenu()!==null)},Ps.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},Ps.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},Ps.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,E=null;if(a instanceof ke||(a instanceof de?E=a:E=y.ic(x.documentPoint,null,function(b){return!b.layer.isTemporary})),E!==null){for(a=E;a!==null;){if(a.contextMenu!==null)return a;a=a.panel}if(y.lastInput.isTouchEvent&&this.defaultTouchContextMenu)return E.part}else if(y.contextMenu!==null)return y;return null},Ps.prototype.doActivate=function(){},Ps.prototype.doMouseDown=function(){if(Br.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof Zr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&ru(this)},Ps.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof Zr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}ru(this)};function ru(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var E=null;x instanceof Su||(E=y.ic(y.lastInput.documentPoint,null,null),E!==null&&E.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(E)}}else a.canStart()&&(Qu(a,!0),a.isActive||a.stopTool())}Ps.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function Qu(a,y,x){if(x===void 0&&(x=null),!a.Et&&(a.Et=!0,y&&a.standardMouseSelect(),y=a.standardMouseClick(),a.Et=!1,!y)){if(a.isActive=!0,y=Xh,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var E=x.contextMenu;E!==null?(a.currentObject=x instanceof de?x:null,a.showContextMenu(E,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof Zr&&!a.currentContextMenu.visible&&a.stopTool()}}Ps.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},Ps.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof Zr){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category=this.name,a.placeholder!==null&&(a.placeholder.scale=x.scale);var E=a.diagram;E!==null&&E!==x&&E.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionContextMenu(a,y)}else a instanceof Su&&a.show(y,x,this);this.currentContextMenu=a},Ps.prototype.positionContextMenu=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),E=a.measuredBounds,b=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=E.width),x.x+E.width>b.right&&(x.x-=E.width+5/y.scale),x.x<b.x&&(x.x=b.x),x.y+E.height>b.bottom&&(x.y-=E.height+5/y.scale),x.y<b.y&&(x.y=b.y),a.position=x}},Ps.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof Zr?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Su&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function vh(a){var y=new dn;return y.add(new Dl("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new Dl("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new Dl("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new Dl("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new Dl("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new Dl("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new Dl("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new Dl("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new Dl("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new Dl("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new Dl("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new Dl("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new Dl("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}Ps.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=vh(this)),dc.innerHTML="",bd.addEventListener("pointerdown",this.tu,!1);var y=this,x=mi("ul");x.className="goCXul",dc.appendChild(x),x.innerHTML="";for(var E=this.jt.iterator;E.next();){var b=E.value,z=b.visible;if(typeof b.hx=="function"&&(typeof z!="function"||z(a))){z=mi("li"),z.className="goCXli";var tt=mi("a");tt.className="goCXa",tt.href="#",tt.ky=b.hx,tt.addEventListener("pointerdown",function(rt){return this.ky(a),y.stopTool(),rt.preventDefault(),!1},!1),tt.textContent=b.text,z.appendChild(tt),x.appendChild(z)}}dc.style.display="block",bd.style.display="block"},Ps.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===Xh){dc.style.display="none",bd.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(bd,"pointerdown",this.tu,!1),this.currentContextMenu=null}},Me.Object.defineProperties(Ps.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof Zr?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return hc===!1&&Xh===null&&la&&Kl(this),Xh},set:function(a){a===null&&(hc=!0),Xh=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var Xh=null,hc=!1,bd=null,dc=null;Ps.className="ContextMenuTool",wr("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function Go(){Br.call(this),this.name="TextEditing",this.Zh=new No,this.ia=null,this.V=Nd,this.vj=null,this.qa=Td,this.u=1,this.F=!0,this.o=null,this.j=new Su,this.kt=null,cc(this,this.j)}Oe(Go,Br);function cc(a,y){if(la){var x=mi("textarea");a.kt=x,x.addEventListener("input",function(){if(a.textBlock!==null){var E=a.Lx(this.value);this.style.width=20+E.measuredBounds.width*this.wA+"px",this.rows=E.lineCount}},!1),x.addEventListener("keydown",function(E){if(!E.isComposing&&a.textBlock!==null){var b=E.key;b==="Enter"?(a.textBlock.isMultiline===!1&&E.preventDefault(),a.acceptText(fc)):b==="Tab"?(a.acceptText(of),E.preventDefault()):b==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Td){var E=a.kt;a.qa===gc&&(a.qa=pc),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Td){var E=a.kt;typeof E.focus=="function"&&E.focus(),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),y.valueFunction=function(){return x.value},y.mainElement=x,y.show=function(E,b,z){if(E instanceof No&&z instanceof Go)if(z.state===mc)x.style.border="3px solid red",x.focus();else{var tt=E.ga(fi),rt=b.position,ot=b.scale,st=E.Df()*ot;st<z.minimumEditorScale&&(st=z.minimumEditorScale);var ut=E.naturalBounds.width*st+6,ft=E.naturalBounds.height*st+2,vt=(tt.x-rt.x)*ot;tt=(tt.y-rt.y)*ot,rt=E.verticalAlignment,ot=(E.lineHeight+E.spacingAbove+E.spacingBelow)*E.lineCount*st,ft=rt.y*ft-rt.y*ot+rt.offsetY-(.5*ft-.5*ot)-ot/2,x.value=E.text,b.div.style.font=E.font,x.style.position="absolute",x.style.zIndex="100",x.style.font="inherit",x.style.fontSize=100*st+"%",x.style.lineHeight="normal",x.style.width=ut+"px",x.style.left=(vt-ut/2|0)-1+"px",x.style.top=(tt+ft|0)-1+"px",x.style.textAlign=E.textAlign,x.style.margin="0",x.style.padding="1px",x.style.border="0",x.style.outline="none",x.style.whiteSpace="pre-wrap",x.style.overflow="hidden",x.rows=E.lineCount,x.wA=st,x.className="goTXarea",b.div.appendChild(x),x.focus(),z.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(E){E.div.removeChild(x)}}}Go.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||yh&&yh!==this&&(yh.acceptText(xu),yh&&yh!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof No&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===Nd&&!y.isSelected||this.starting===af&&2>a.lastInput.clickCount)):!1},Go.prototype.doStart=function(){yh=this,this.textBlock!==null&&this.doActivate()},Go.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 No&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=gc;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var E=new ae(this.textBlock.ga(Wi),this.textBlock.ga(hr));a.tv(E),x.show(y,a,this),this.currentTextEditor=x}}}},Go.prototype.doCancel=function(){this.stopTool()},Go.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},Go.prototype.doMouseDown=function(){this.isActive&&this.acceptText(xu)},Go.prototype.acceptText=function(a){switch(a){case xu:this.qa===Dd?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===gc||this.qa===mc||this.qa===pc)&&(this.qa=fg,cg(this));break;case rf:case fc:case of:(fc!==a||this.textBlock.isMultiline!==!0)&&(this.qa===gc||this.qa===mc||this.qa===pc)&&(this.qa=fg,cg(this))}};function cg(a){var y=a.textBlock,x=a.diagram,E=a.currentTextEditor;if(y!==null&&E!==null){var b=y.text,z="";E.valueFunction!==null&&(z=E.valueFunction()),a.isValidText(y,b,z)?(a.Ea(a.name),a.qa=Dd,a.transactionResult=a.name,y.text=z,a.doSuccess(b,z),x!==null&&x.R("TextEdited",y,b),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=mc,a.doError(b,z))}}Go.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)},Go.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},Go.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Td,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},Go.prototype.doStop=function(){yh=null},Go.prototype.isValidText=function(a,y,x){var E=this.textValidation;return E!==null&&!E(a,y,x)?!1:(E=a.textValidation,!!(E===null||E(a,y,x)))},Go.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Me.Object.defineProperties(Go.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)}}}),Go.prototype.measureTemporaryTextBlock=Go.prototype.Lx;var rf=new Ve(Go,"LostFocus",0),xu=new Ve(Go,"MouseDown",1),of=new Ve(Go,"Tab",2),fc=new Ve(Go,"Enter",3),$0=new Ve(Go,"SingleClick",0),Nd=new Ve(Go,"SingleClickSelected",1),af=new Ve(Go,"DoubleClick",2),Td=new Ve(Go,"StateNone",0),gc=new Ve(Go,"StateActive",1),pc=new Ve(Go,"StateEditing",2),fg=new Ve(Go,"StateValidating",3),mc=new Ve(Go,"StateInvalid",4),Dd=new Ve(Go,"StateValidated",5),yh=null;Go.className="TextEditingTool",Go.LostFocus=rf,Go.MouseDown=xu,Go.Tab=of,Go.Enter=fc,Go.SingleClick=$0,Go.SingleClickSelected=Nd,Go.DoubleClick=af,Go.StateNone=Td,Go.StateActive=gc,Go.StateEditing=pc,Go.StateValidating=fg,Go.StateInvalid=mc,Go.StateValidated=Dd,wr("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function _s(a){yc||(gg(),yc=!0),this.H=Tu,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=qu,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new cn,this.ce=new is,this.ce.Yd=this,this.Ei=new cn,this.pu=new cn,this.Sr=new cn,this.pr=new cn,a&&Object.assign(this,a)}_s.prototype.Xe=function(a){this.H=a},_s.prototype.canStart=function(){return!0};function Nu(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),rs(a.H),a.zb=!0)}function sf(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,E=a.Zd.contains("Model");E&&(a.Ok=!0,a.Pk===qu?(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===pg&&y.vc.clear(),a.Qw=!!(a.Pk===Sc&&x.du.D(x.pa)),x.R("InitialAnimationStarting",a)),E&&!a.Gh||y.vc.count===0?(a.Zd.clear(),a.zb=!1,y.vc.clear(),xc(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,E=y.vc.get(x),x.autoScale!==ps&&E!==null&&(delete E.start.scale,delete E.end.scale),Dn.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Ds(x),xg(x),a.zb=!1,y.start(),y.bc&&(Sh(a),x.Ya(),mg(y,0),Sl(x,!0),Jh(a),x.R("AnimationStarting",a)))}))}}function _u(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function lf(a,y,x,E){a.isTicking||_u(a)||y instanceof Ln&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,E,!1)}Ct=_s.prototype,Ct.fv=function(a){return this.ce.fv(a)},Ct.Xu=function(a){return this.ce.Xu(a)};function uf(a,y){function x(){if(0<b.Sr.count&&(E.addAll(b.Sr),b.Sr.clear(),b.bc=!0),b.bc!==!1&&E.count!==0){b.pu.addAll(E);for(var z=b.pu.iterator;z.next();){var tt=z.value;if(tt.bc!==!1){t:if(0<tt.yl.count)var rt=!0;else{for(rt=tt.vc.iterator;rt.next();){var ot=rt.key;if(ot instanceof de&&ot.diagram!==null||ot instanceof ke){rt=!0;break t}}rt=!1}rt?Pc(tt,!1):tt.Xk=!0}}b.pu.clear(),b.bc!==!1&&(Sh(b),Sl(b.H),Jh(b)),Dn.requestAnimationFrame(x)}}var E=a.Ei,b=a;a.bc?a.Sr.add(y):(a.bc=!0,E.add(y),Dn.requestAnimationFrame(function(){x()}))}function Zp(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function Sh(a){if(!a.vq){var y=a.H;a.Ow=y.skipsUndoManager,a.cw=y.skipsModelSourceBindings,y.skipsUndoManager=!0,y.skipsModelSourceBindings=!0,a.vq=!0}}function Jh(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}Ct.Cc=function(a){var y=this.ce;if(this.zb===!0&&(this.Ok=this.zb=!1,this.Zd.clear(),0<y.vc.count&&this.H.$b()),this.bc){if(y.Ml(!0),y.vc.clear(),xc(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),xc(y,this.H)},Ct.Ml=function(a){a===this.defaultAnimation&&this.defaultAnimation.vc.clear(),this.Ei.remove(a),this.Ei.count===0&&(this.bc=!1,this.H.$b()),a===this.defaultAnimation&&(this.defaultAnimation.vc.clear(),this.H.R("AnimationFinished",this))},Ct.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),Zs(this,a))},Ct.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),xh(this.ce,y,"position",y.position,y.position),Zs(this,a))};function Vp(a,y,x){!a.zb||y.D(x)||_u(a)||(a.H.pi||(y=x.copy()),xh(a.ce,a.H,"position",y,x))}function hf(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function Zs(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function Qh(a,y,x,E,b){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var z=a[0],tt=a[1],rt=a[2];a=a[3];var ot=y[0],st=y[1],ut=y[2];return y=y[3],rt===0||rt===100?(z=ot,tt=st):(ut===0||ut===100)&&(ot=z,st=tt),180<Math.abs(ot-z)&&(ot>z?z+=360:ot+=360),z=b(x,z,ot-z,E)%360,tt=b(x,tt,st-tt,E),rt=b(x,rt,ut-rt,E),x=b(x,a,y-a,E),"hsla("+z+", "+tt+"%, "+rt+"%, "+x+")"}function gg(){function a(x,E,b,z,tt,rt){x.position=new Tt(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}var y=new be;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,E,b,z,tt,rt){tt<rt?x.mm(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt),!1):x.position=new Tt(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}),y.add("location",function(x,E,b,z,tt,rt){tt<rt?x.mm(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt),!0):x.location=new Tt(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}),y.add("position:placeholder",function(x,E,b,z,tt,rt){tt<rt?x.mm(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt),!1):x.position=new Tt(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}),y.add("position:nodeCollapse",function(x,E,b,z,tt,rt){var ot=x.actualBounds,st=b.actualBounds;b=st.x+st.width/2-ot.width/2,ot=st.y+st.height/2-ot.height/2,tt<rt?x.mm(z(tt,E.x,b-E.x,rt),z(tt,E.y,ot-E.y,rt),!1):x.position=new Tt(z(tt,E.x,b-E.x,rt),z(tt,E.y,ot-E.y,rt))}),y.add("desiredSize",function(x,E,b,z,tt,rt){x.desiredSize=new ae(z(tt,E.width,b.width-E.width,rt),z(tt,E.height,b.height-E.height,rt))}),y.add("width",function(x,E,b,z,tt,rt){x.width=z(tt,E,b-E,rt)}),y.add("height",function(x,E,b,z,tt,rt){x.height=z(tt,E,b-E,rt)}),y.add("fill",function(x,E,b,z,tt,rt){x.fill=Qh(E,b,tt,rt,z)}),y.add("stroke",function(x,E,b,z,tt,rt){x.stroke=Qh(E,b,tt,rt,z)}),y.add("strokeWidth",function(x,E,b,z,tt,rt){x.strokeWidth=z(tt,E,b-E,rt)}),y.add("strokeDashOffset",function(x,E,b,z,tt,rt){x.strokeDashOffset=z(tt,E,b-E,rt)}),y.add("background",function(x,E,b,z,tt,rt){x.background=Qh(E,b,tt,rt,z)}),y.add("areaBackground",function(x,E,b,z,tt,rt){x.areaBackground=Qh(E,b,tt,rt,z)}),y.add("opacity",function(x,E,b,z,tt,rt){x.opacity=z(tt,E,b-E,rt)}),y.add("scale",function(x,E,b,z,tt,rt){x.scale=z(tt,E,b-E,rt)}),y.add("angle",function(x,E,b,z,tt,rt){x.angle=z(tt,E,b-E,rt)}),vc=y}Me.Object.defineProperties(_s.prototype,{animationReasons:{get:function(){return this.Zd}},isEnabled:{get:function(){return this.Jd},set:function(a){(this.Jd=a)&&this.Ei.each(function(y){y.isAnimating||y.runCount!==1/0||y.start()})}},duration:{get:function(){return this.Dg},set:function(a){1>a&&ei(a,">= 1",_s,"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}}}),_s.prototype.stopAnimation=_s.prototype.Cc;var vc=null,yc=!1,qu=new Ve(_s,"Default",1),Sc=new Ve(_s,"AnimateLocations",2),pg=new Ve(_s,"None",3);_s.className="AnimationManager",_s.defineAnimationEffect=function(a,y){yc||(gg(),yc=!0),vc.add(a,y)},_s.Default=qu,_s.AnimateLocations=Sc,_s.None=pg;function is(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=Bd,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=Wn,this.vc=new be,this.Tt=new be,this.yl=new cn,this.Ut=new cn,this.dw=Ch,a&&Object.assign(this,a)}is.prototype.suspend=function(){this.Xk=!0},is.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,Pc(this,!0),Sh(this.Yd),Sl(this.H),Jh(this.Yd),this.H.redraw()};function xc(a,y){if(a.Tt.clear(),a.Wk=!1,a.au=0,a.Gd=NaN,0<a.yl.count&&a.yl.clear(),0<a.Ut.count&&a.Ut.clear(),y!==null)for(a=y.links;a.next();)a.value.Tg=null}Ct=is.prototype,Ct.start=function(){if(this.vc.count===0||this.bc)return this;for(var a=this.H,y=this.vc.iterator;y.next();){var x=y.key;a===null&&(x instanceof ke?a=x:x instanceof de&&(a=x.diagram))}if(a!==null)this.H=a,this.Yd=a.animationManager;else return this;return y=this.Yd,y.isEnabled===!1?this:(this.Gd=isNaN(this.Dg)?y.duration:this.Dg,this.Lp=this.ot,y.Ok&&y.Pk===qu&&this===y.defaultAnimation&&(this.Lp=Kp,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=Ac),Sh(y),this.yl.each(function(E){E.data=null,a.add(E)}),Jh(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,uf(y,this),this)},Ct.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},Ct.add=function(a,y,x,E,b){if(y==="position"&&x.Xa(E))return this;if(this.H===null&&(a instanceof ke?this.H=a:a instanceof de&&a.diagram!==null&&(this.H=a.diagram)),a instanceof Fi){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return xh(this,a,y,x,E,b),this};function xh(a,y,x,E,b,z){var tt=a.vc;if(y instanceof ke&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(nh(E),av(),E=[ul.j,ul.u,ul.o,ul.F],nh(b),av(),b=[ul.j,ul.u,ul.o,ul.F]),tt.contains(y)){var rt=tt.I(y),ot=rt.start,st=rt.end;ot[x]===void 0&&(ot[x]=_h(E)),st[x]=_h(b)}else ot={},st={},ot[x]=_h(E),st[x]=_h(b),rt=ot.position,y instanceof de&&rt instanceof Tt&&!rt.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&rt.assign(st.position),rt=new qh(ot,st,z),tt.add(y,rt);tt=ot[x],tt instanceof Tt&&!tt.w()&&tt.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof Fi?rt.Ku.location=_h(y.location):z&&(rt.Ku[x]=_h(E))}function _h(a){return a instanceof Tt||a instanceof Ut?a.copy():a}Ct.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},Ct.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function Pc(a,y){if(!a.Xk||y){var x=a.Yd;if(a.bc!==!1){var E=+new Date,b=E>a.cn?a.Gd:E-a.Qd;y&&(b=a.gw,b<a.Gd?(a.Qd=+new Date-b,a.cn=a.Qd+a.Gd):b=a.Gd),Sh(x),mg(a,b),Sl(a.H,!0),Jh(x),E>a.cn&&(a.ho&&!a.Wk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Wk=!0):a.Ml(!1))}}}function mg(a,y){for(var x=a.Gd,E=a.vc.iterator,b=a.Wk;E.next();){var z=E.key;if(!(z instanceof de&&z.diagram===null)){var tt=E.value,rt=b?tt.end:tt.start;tt=b?tt.start:tt.end;var ot=vc,st;for(st in tt)st==="position"&&(tt["position:placeholder"]||tt["position:nodeCollapse"])||ot.get(st)===null||ot.get(st)(z,rt[st],tt[st],a.Lp,y,x,a)}}}Ct.stop=function(){return this.bc?(this.Ml(!0),this):this},Ct.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,Sh(x);for(var E=this.vc,b=this.yl.iterator;b.next();)y.remove(b.value);for(b=this.Ut.iterator;b.next();)b.value.v();b=this.ho,E=E.iterator;for(var z=vc;E.next();){var tt=E.key,rt=E.value,ot=b?rt.end:rt.start,st=b?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,ot[ft],ut[ft]!==void 0?ut[ft]:rt.Hu?ot[ft]:st[ft],this.Lp,this.Gd,this.Gd,this)}rt.Hu&&ut.location!==void 0&&tt instanceof Fi&&(tt.location=ut.location),rt.nv&&tt instanceof Fi&&tt.Zb(!1)}if(y.As.clear(),wc(y,!1),y.Ya(),y.N(),Sl(y,!0),x.defaultAnimation===this){for(ft=x.pr.iterator;ft.next();)b=ft.value,b.Tg!==null&&(b.points=b.Tg,b.Tg=null);x.pr.clear()}Sl(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Jh(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),xc(this,null),x.Ml(this),y.$b())}},Ct.Cj=function(a,y){var x=y.actualBounds,E=null;if(y instanceof ir&&(E=y.placeholder),E!==null?(x=E.ga(Wi),E=E.padding,x.x+=E.left,x.y+=E.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new Tt(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof ir)for(a=a.memberParts;a.next();)E=a.value,E instanceof Hn&&this.Cj(E,y)},Ct.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof ir&&(x=y.placeholder),x!==null){var E=x.ga(Wi);x=x.padding,E.x+=x.left,E.y+=x.top,this.add(a,"position:placeholder",a.position,E,!0)}else this.add(a,"position:nodeCollapse",a.position,y,!0);if(this.add(a,"scale",a.scale,.01,!0),E=this.vc,E.contains(a)&&(E.I(a).nv=!0),a instanceof ir)for(a=a.memberParts;a.next();)E=a.value,E instanceof Hn&&this.Aj(E,y)}},Ct.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},Me.Object.defineProperties(is.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&ei(a,">= 1",is,"duration"),this.Dg=a}},reversible:{get:function(){return this.ho},set:function(a){this.ho=a}},runCount:{get:function(){return this.cu},set:function(a){0<a?this.cu=a:$t("Animation.runCount value must be a positive integer.")}},finished:{get:function(){return this.dn},set:function(a){this.dn!==a&&(this.dn=a)}},easing:{get:function(){return this.ot},set:function(a){this.ot=a}},isViewportUnconstrained:{get:function(){return this.j},set:function(a){this.j=a}},isAnimating:{get:function(){return this.bc}}}),is.prototype.getTemporaryState=is.prototype.Ez,is.prototype.stop=is.prototype.stop,is.prototype.add=is.prototype.add,is.prototype.addTemporaryPart=is.prototype.Iy;function Bd(a,y,x,E){return a/=E/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function Kp(a,y,x,E){return a===E?y+x:x*(-Math.pow(2,-10*a/E)+1)+y}is.className="Animation",is.EaseLinear=function(a,y,x,E){return x*a/E+y},is.EaseInOutQuad=Bd,is.EaseInQuad=function(a,y,x,E){return x*(a/=E)*a+y},is.EaseOutQuad=function(a,y,x,E){return-x*(a/=E)*(a-2)+y},is.EaseInExpo=function(a,y,x,E){return a===0?y:x*Math.pow(2,10*(a/E-1))+y},is.EaseOutExpo=Kp;function qh(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}qh.className="AnimationState";function Yl(a,y,x){this.xd=null,this.rf=a,this.so=x||vg,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=$h))}Yl.prototype.copy=function(){var a=new Yl(this.rf);a.so=this.so;var y=this.uk;if(y!==null){var x={};y.duration!==void 0&&(x.duration=y.duration),y.finished!==void 0&&(x.finished=y.finished),y.easing!==void 0&&(x.easing=y.easing),a.uk=x}return a};function Yp(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))}Me.Object.defineProperties(Yl.prototype,{propertyName:{get:function(){return this.rf},set:function(a){this.rf=a}},animationSettings:{get:function(){return this.uk},set:function(a){this.uk=a}},startCondition:{get:function(){return this.so},set:function(a){this.so=a}}});var vg=new Ve(Yl,"Default",1),$h=new Ve(Yl,"Immediate",2),Od=new Ve(Yl,"Bundled",3);Yl.className="AnimationTrigger",Yl.Default=vg,Yl.Immediate=$h,Yl.Bundled=Od;function Ga(a){Ri(this),this.H=null,this.Pa=new dn,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)}Ct=Ga.prototype,Ct.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,fs(x)}a.clear(),this.Zq.length=0},Ct.Xe=function(a){this.H=a},Ct.toString=function(a){a===void 0&&(a=0);var y='Layer "'+this.name+'"';if(0>=a)return y;for(var x=0,E=0,b=0,z=0,tt=0,rt=this.Pa.iterator;rt.next();){var ot=rt.value;ot instanceof ir?b++:ot instanceof Hn?E++:ot instanceof Ln?z++:ot instanceof Zr?tt++:x++}if(rt="",0<x&&(rt+=x+" Parts "),0<E&&(rt+=E+" Nodes "),0<b&&(rt+=b+" Groups "),0<z&&(rt+=z+" Links "),0<tt&&(rt+=tt+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,rt+=`
|
|
`+x.toString(),E=x.data,E!==null&&xr(E)&&(rt+=" #"+xr(E)),x instanceof Hn?rt+=" "+Sr(E):x instanceof Ln&&(rt+=" "+Sr(x.fromNode)+" "+Sr(x.toNode));return y+" "+this.Pa.count+": "+rt},Ct.ic=function(a,y,x){if(y===void 0&&(y=null),x===void 0&&(x=null),this.Uh===!1)return null;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var b=Tt.alloc(),z=this.Pa.s,tt=z.length;tt--;){var rt=z[tt];if((E!==!0||ud(rt)!==!1)&&rt.isVisible()&&(b.assign(a),Jn(b,rt.oe),rt=rt.ic(b,y,x),rt!==null&&(y!==null&&(rt=y(rt)),rt!==null&&(x===null||x(rt)))))return Tt.free(b),rt}return Tt.free(b),null},Ct.ji=function(a,y,x,E){if(y===void 0&&(y=null),x===void 0&&(x=null),E instanceof dn||E instanceof cn||(E=new cn),this.Uh===!1)return E;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var z=Tt.alloc(),tt=this.Pa.s,rt=tt.length;rt--;){var ot=tt[rt];if((b!==!0||ud(ot)!==!1)&&ot.isVisible()){z.assign(a),Jn(z,ot.oe);var st=ot;ot.ji(z,y,x,E)&&(y!==null&&(st=y(st)),st===null||x!==null&&!x(st)||E.add(st))}}return Tt.free(z),E},Ct.Cf=function(a,y,x,E,b){if(y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof dn||b instanceof cn||(b=new cn),this.Uh===!1)return b;var z=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(z=!0);for(var tt=this.Pa.s,rt=tt.length;rt--;){var ot=tt[rt];if((z!==!0||ud(ot)!==!1)&&ot.isVisible()){var st=ot;ot.Cf(a,y,x,E,b)&&(y!==null&&(st=y(st)),st===null||x!==null&&!x(st)||b.add(st))}}return b},Ct.Nu=function(a,y,x,E,b,z,tt){if(this.Uh===!1)return b;for(var rt=this.Pa.s,ot=rt.length;ot--;){var st=rt[ot];if((tt!==!0||ud(st)!==!1)&&z(st)&&st.isVisible()){var ut=st;st.Cf(a,y,x,E,b)&&(y!==null&&(ut=y(ut)),ut===null||x!==null&&!x(ut)||b.add(ut))}}return b},Ct.og=function(a,y,x,E,b,z){if(x===void 0&&(x=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof dn||b instanceof cn)&&(z=b),b=!0),z instanceof dn||z instanceof cn||(z=new cn),this.Uh===!1)return z;var tt=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(tt=!0);for(var rt=Tt.alloc(),ot=Tt.alloc(),st=this.Pa.s,ut=st.length;ut--;){var ft=st[ut];if((tt!==!0||ud(ft)!==!1)&&ft.isVisible()){rt.assign(a),Jn(rt,ft.oe),ot.h(a.x+y,a.y),Jn(ot,ft.oe);var vt=ft;ft.og(rt,ot,x,E,b,z)&&(x!==null&&(vt=x(vt)),vt===null||E!==null&&!E(vt)||z.add(vt))}}return Tt.free(rt),Tt.free(ot),z},Ct.Fd=function(a,y){if(this.visible){var x=this.Pa.s,E=x.length;if(E!==0){a=Ei();for(var b=Ei(),z=0;z<E;z++){var tt=x[z];if(tt.vw=z,tt instanceof Ln){if(tt.fd===!1)continue}else if(tt instanceof Zr&&tt.adornedPart!==null)continue;var rt=tt.actualBounds;tt.isVisible()&&qn(rt,y)?(tt.Fd(!0),a.push(tt)):(tt.Fd(!1),tt.adornments!==null&&0<tt.adornments.count&&b.push(tt))}for(y=0;y<a.length;y++)for(x=a[y],Ov(x),x=x.adornments;x.next();)E=x.value,E.measure(1/0,1/0),E.arrange(),E.Fd(!0);for(y=0;y<b.length;y++)Ov(b[y]);ri(a),ri(b)}}};function $u(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}Ct.gc=function(a,y,x){if(this.visible&&this.pb!==0&&(x===void 0&&(x=!0),x||!this.isTemporary)){x=this.Pa.s;var E=x.length;if(E!==0){if(a.isTemporary)for(var b=0;b<E;b++)x[b].Gj();b=$u(this,a);var z=this.Zq;z.length=0;for(var tt=y.scale,rt=ae.alloc(),ot=0;ot<E;ot++)this.Oj(a,x[ot],y,z,tt,rt,!0);if(ae.free(rt),a.isTemporary)for(y=0;y<E;y++)x[y].Gj();a.globalAlpha=b}}};function Up(a,y,x,E,b){if(a.visible&&a.pb!==0&&(b||!a.isTemporary)){b=a.Pa.s;var z=b.length;if(z!==0){var tt=$u(a,y),rt=a.Zq;rt.length=0;for(var ot=x.scale,st=ae.alloc(),ut=0;ut<z;ut++){var ft=b[ut];E.contains(ft)&&a.Oj(y,ft,x,rt,ot,st,!1)}ae.free(st),y.globalAlpha=tt}}}Ct.Oj=function(a,y,x,E,b,z,tt){if(tt&&!ud(y))a.Hs(y);else{if(E!==null&&y instanceof Ln&&(y.isOrthogonal&&E.push(y),y.fd===!1)){a.Hs(y);return}for(tt=!1,E=y.containingGroup;E!==null;)tt?E.tb!==null&&z.Ex(E.tb):E.tb!==null&&(tt=!0,z.assign(E.tb)),E=E.containingGroup;var rt=y.actualBounds;if(E=!1,tt&&y.isVisible()){if(!z.Yc(rt)){a.Hs(y);return}E=!z.Re(rt)}E&&(a.save(),a instanceof qs?a.bk=z.copy():(a.beginPath(),a.rect(z.x,z.y,z.width,z.height),a.clip())),rt.width*b>x.Oq||rt.height*b>x.Oq?y.gc(a,x):(b=y.actualBounds,z=y.naturalBounds,b.width===0||b.height===0||isNaN(b.x)||isNaN(b.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(ha(y,a,y.areaBackground,!0,!0,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.areaBackground===null&&y.background===null&&(ha(y,a,"rgba(0,0,0,0.3)",!0,!1,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.background!==null&&(a.transform(x.m11,x.m12,x.m21,x.m22,x.dx,x.dy),ha(y,a,y.background,!0,!1,z,b),a.fillRect(0,0,z.width/2,z.height/2),x.ws()||(y=1/(x.m11*x.m22-x.m12*x.m21),a.transform(x.m22*y,-x.m12*y,-x.m21*y,x.m11*y,y*(x.m21*x.dy-x.m22*x.dx),y*(x.m12*x.dx-x.m11*x.dy)))))),E&&(a.restore(),a.Vc(!0))}},Ct.g=function(a,y,x,E,b){var z=this.diagram;z!==null&&z.cb(Eo,a,this,y,x,E,b)},Ct.oi=function(a,y,x){var E=this.Pa;if(y.Ig=this,this===null&&fs(y),a>=E.count)a=E.count;else if(E.M(a)===y)return-1;return E.Gb(a,y),y.Vo(x),E=this.diagram,E!==null&&(x?E.N():E.oi(y)),df(this,a,y),a},Ct.pc=function(a,y,x){if(!x&&y.layer!==this&&y.layer!==null)return y.layer.pc(a,y,x);var E=this.Pa;if(0>a||a>=E.length){if(a=E.indexOf(y),0>a)return-1}else if(E.M(a)!==y&&(a=E.indexOf(y),0>a))return-1;return y.Wo(x),E.mb(a),E=this.diagram,E!==null&&(x?E.N():E.pc(y)),y.Ig=null,fs(y),a};function df(a,y,x){if(y=Xp(a,y,x),x instanceof ir&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var E=-1,b=a.Pa.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];if(rt===x&&(y=tt,0<=E)||0>E&&rt.containingGroup===x&&(E=tt,0<=y))break}!(0>E)&&E<y&&(b=a.Pa,b.mb(y),b.Gb(E,x))}y=x.containingGroup,y!==null&&df(a,-1,y)}x.svg!==null&&x.svg.remove()}function Xp(a,y,x){var E=x.zOrder;if(isNaN(E))return y;a=a.Pa;var b=a.count;if(1>=b)return y;if(0>y&&(y=a.indexOf(x)),0>y)return-1;for(var z=y-1,tt=NaN;0<=z&&(tt=a.M(z).zOrder,!!isNaN(tt));)z--;for(var rt=y+1,ot=NaN;rt<b&&(ot=a.M(rt).zOrder,!!isNaN(ot));)rt++;if(!isNaN(tt)&&tt>E)for(;;){if(z===-1||tt<=E){if(z++,z===y)break;return a.mb(y),a.Gb(z,x),z}for(tt=NaN;0<=--z&&(tt=a.M(z).zOrder,isNaN(tt)););}else if(!isNaN(ot)&&ot<E)for(;;){if(rt===b||ot>=E){if(rt--,rt===y)break;return a.mb(y),a.Gb(rt,x),rt}for(ot=NaN;++rt<b&&(ot=a.M(rt).zOrder,isNaN(ot)););}return y}Me.Object.defineProperties(Ga.prototype,{parts:{get:function(){return this.Pa.iterator}},partsBackwards:{get:function(){return this.Pa.iteratorBackwards}},diagram:{get:function(){return this.H}},name:{get:function(){return this.xa},set:function(a){var y=this.xa;if(y!==a){var x=this.diagram;if(x!==null)for(y===""&&$t("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&$t("Layer.name is already present in this diagram: "+a);for(this.xa=a,this.g("name",y,a),a=this.Pa.iterator;a.next();)a.value.layerName=this.xa}}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&ei(a,"0 <= value <= 1",Ga,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,a!==null&&a.N())}},isTemporary:{get:function(){return this.o},set:function(a){var y=this.o;y!==a&&((this.o=a)&&(this.isInDocumentBounds=!1),this.g("isTemporary",y,a))}},visible:{get:function(){return this.u},set:function(a){var y=this.u;if(y!==a){for(this.u=a,this.g("visible",y,a),y=this.Pa.iterator;y.next();)y.value.Zb(a);a=this.diagram,a!==null&&a.N()}}},pickable:{get:function(){return this.Uh},set:function(a){var y=this.Uh;y!==a&&(this.Uh=a,this.g("pickable",y,a))}},isInDocumentBounds:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a,this.diagram!==null&&this.diagram.Ya())}},allowCopy:{get:function(){return this.Fi},set:function(a){var y=this.Fi;y!==a&&(this.Fi=a,this.g("allowCopy",y,a))}},allowDelete:{get:function(){return this.Gi},set:function(a){var y=this.Gi;y!==a&&(this.Gi=a,this.g("allowDelete",y,a))}},allowTextEdit:{get:function(){return this.Pi},set:function(a){var y=this.Pi;y!==a&&(this.Pi=a,this.g("allowTextEdit",y,a))}},allowGroup:{get:function(){return this.Hi},set:function(a){var y=this.Hi;y!==a&&(this.Hi=a,this.g("allowGroup",y,a))}},allowUngroup:{get:function(){return this.Qi},set:function(a){var y=this.Qi;y!==a&&(this.Qi=a,this.g("allowUngroup",y,a))}},allowLink:{get:function(){return this.Ii},set:function(a){var y=this.Ii;y!==a&&(this.Ii=a,this.g("allowLink",y,a))}},allowRelink:{get:function(){return this.Ki},set:function(a){var y=this.Ki;y!==a&&(this.Ki=a,this.g("allowRelink",y,a))}},allowMove:{get:function(){return this.Ji},set:function(a){var y=this.Ji;y!==a&&(this.Ji=a,this.g("allowMove",y,a))}},allowReshape:{get:function(){return this.Li},set:function(a){var y=this.Li;y!==a&&(this.Li=a,this.g("allowReshape",y,a))}},allowResize:{get:function(){return this.Mi},set:function(a){var y=this.Mi;y!==a&&(this.Mi=a,this.g("allowResize",y,a))}},allowRotate:{get:function(){return this.Ni},set:function(a){var y=this.Ni;y!==a&&(this.Ni=a,this.g("allowRotate",y,a))}},allowSelect:{get:function(){return this.Oi},set:function(a){var y=this.Oi;y!==a&&(this.Oi=a,this.g("allowSelect",y,a))}}}),Ga.prototype.findObjectsNear=Ga.prototype.og,Ga.prototype.findObjectsIn=Ga.prototype.Cf,Ga.prototype.findObjectsAt=Ga.prototype.ji,Ga.prototype.findObjectAt=Ga.prototype.ic,Ga.className="Layer";function ke(a,y){if(lm||(ds(),lm=!0),Ri(this),Tu=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,la){var x=this,E=function(){x.removeEventListener(Dn.document,"DOMContentLoaded",E,!1),x.setRTL()};Dn.document.body!==null?this.setRTL():x.addEventListener(Dn.document,"DOMContentLoaded",E,!1)}this.ol=null,wf.add("Model",oo);var b=this;return this.Hb=function(z){var tt=b.partManager;if(z.model===tt.diagram.model&&tt.diagram.aa){tt.diagram.aa=!1;try{var rt=z.change;z.modelChange===""&&rt===Eo&&tt.updateDataBindings(z.object,z.propertyName)}finally{tt.diagram.aa=!0}}},this.Oc=function(z){b.partManager.doModelChanged(z)},this.hu=this.ku=null,Jp(this),this.model=hy(),this.Wg=!0,_p(this),this.layout=new _o,this.Wg=!1,this.ck=this.ek=this.fk=this.dk=this.ui=this.aA=this.$j=this.Ov=null,this.hk=function(){},this.preventDefault=null,this.rn=!1,this.Yf=new um,a!==void 0&&(typeof a=="string"||Dn.Element&&a instanceof Element?Sg(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var td,Tu;function Jp(a){a.Yd=new _s,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new dn,a.pj=new be,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new Tt(NaN,NaN).freeze(),a.du=new Tt(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new Tt(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new Un,a.zu=new Tt(NaN,NaN).freeze(),a.ut=new ae(NaN,NaN,NaN,NaN).freeze(),a.rj=new ii(0,0,0,0).freeze(),a.sj=Ch,a.nu=!1,a.Zt=null,a.fu=null,a.yh=ps,a.zk=xo,a.Fg=ps,a.pq=xo,a.yt=Wi,a.Bt=Wi,a.Fc=!0,a.pn=!1,a.De=new cn,a.Eh=new be,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new ii(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new Ta,a.bq.diagram=a,a.Qg=new Ta,a.Qg.diagram=a,a.cj=new Ta,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,ev(a),a.ai=new cn,a.Ht=!0,a.uu=Lh,a.pw=!1,a.wu=Ec,a.it="auto",a.Op="auto",a.zh=null,a.Fh=null,a.Bh=null,a.Qh=null,a.Oh=null,a.Nh=null,a.Qt=null,a.Lh=null,a.xt=!1,a.Mh=null,a.Ph=null,a.$h=null,a.Ch=null,a.Rt=!1,a.Yt={},a.oj=[null,null],a.Wg=!1,a.Iw=!1,a.ou=!1,a.lt=!1,a.rw=!0,a.ld=!1,a.$i=!1,a.Tw=!0,a.Ce=-2,a.Og=new be,a.Xn=new dn,a.Gg=!1,a.Jd=!0,a.Us=!0,a.Fi=!0,a.Gi=!0,a.Vs=!1,a.Ws=!0,a.Pi=!0,a.Hi=!0,a.Qi=!0,a.Ys=!0,a.Ii=!0,a.Ki=!0,a.Ji=!0,a.Li=!0,a.Mi=!0,a.Ni=!0,a.Oi=!0,a.Zs=!0,a.at=!0,a.qw=!1,a.Vk=!1,a.mn=!0,a.nn=!0,a.Xs=!0,a.$s=!0,a.iu=16,a.mu=16,a.qr=!1,a.gu=!1,a.lu=0,a.ju=0,a.yb=new ii(5).freeze(),a.Hw=new cn().freeze(),a.Nt=999999999,a.nw=new cn().freeze(),a.Zi=!0,a.Ee=!0,a.vd=!0,a.Be=!1,a.gf=!1,a.xh=!0,a.hf=!1,a.sy=new cn,a.ow=new cn,a.Xh=null,a.aw=new Ut(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new Tt,bounds:new ae,Py:new Ut,bA:new Ut,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new ae(NaN,NaN,NaN,NaN).freeze(),a.wo=new Ut(NaN,NaN).freeze(),a.Sp=new ae(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new be;var y=new Hn,x=new No;x.bind(new Sa("text","",Sr)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Hn,x=new No,x.stroke="brown",x.bind(new Sa("text","",Sr)),y.add(x),a.Lg.add("Comment",y),y=new Hn,y.selectable=!1,y.avoidable=!1,x=new dr,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new Ut(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new be,y=new ir,y.selectionObjectName="GROUPPANEL",y.type=mn.Vertical,x=new No,x.font="bold 12pt sans-serif",x.bind(new Sa("text","",Sr)),y.add(x),x=new mn(mn.Auto),x.name="GROUPPANEL";var E=new dr;E.figure="Rectangle",E.fill="rgba(128,128,128,0.2)",E.stroke="black",x.add(E),E=new ks,E.padding=new ii(5,5,5,5).ja(),x.add(E),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new be,y=new Ln,x=new dr,x.isPanelMain=!0,y.add(x),x=new dr,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new Ln,x=new dr,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new Zr,y.type=mn.Auto,x=new dr,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new ks,x.margin=new ii(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new Zr,y.type=mn.Link,x=new dr,x.isPanelMain=!0,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),a.Kt=y,a.fe=null,a.mq=!1,a.Ck=null,a.partManager=new oo,a.toolManager=new uo,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new at,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=Qp(),a.eq=null,a.fq=wi,a.Pw=!1,a.Mb=1,a.Yh=null,a.Oq=1,a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0,a.yq=1,a.tw=0,a.uw=new Tt,a.zy=500,a.wp=new Tt,a.wq=!1}ke.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Gd=null,od="",yg(this,!1),this.Xn.clear(),Of(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function yg(a,y){a.animationManager.Cc(!0),a.Hw=new cn().freeze(),a.nw=new cn().freeze();var x=a.skipsUndoManager,E=a.cc!==null&&a.cc!==void 0;E&&(a.skipsUndoManager=!0);var b=null;a.fe!==null&&(b=a.fe.part,b!==null&&a.remove(b));var z=[],tt=a.Wa.length;if(y){for(y=0;y<tt;y++)for(var rt=a.Wa.s[y].parts;rt.next();){var ot=rt.value;ot!==b&&ot.data===null&&z.push(ot)}for(y=0;y<z.length;y++)a.remove(z[y])}for(y=0;y<tt;y++)a.Wa.s[y].clear();return a.partManager.clear(),a.De.clear(),a.Eh.clear(),a.ai.clear(),a.Ck=null,a.Xn.clear(),Of(),a.Og.clear(),mo=[],b!==null&&(a.add(b),a.partManager.parts.remove(b)),E&&(a.skipsUndoManager=x),z}function Qp(){return null}ke.prototype.reset=function(){this.clear(),this.vb=!0,Jp(this),wu(this),this.Wg=!0,_p(this),this.layout=new _o,this.Wg=!1,this.model=hy(),this.model.undoManager=new Vo,this.vb=this.rn=!1,this.N()},ke.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=Dn.document.body);var y=mi("div");y.dir="rtl",y.style.cssText="font-size: 14px; width: 1px; height: 1px; position: absolute; top: -1000px; overflow: scroll;",y.textContent="A",a.appendChild(y);var x="reverse";0<y.scrollLeft?x="default":(y.scrollLeft=1,y.scrollLeft===0&&(x="negative")),a.removeChild(y),this.bu=x},ke.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=Dn.document.body);var y=0;if(la){var x=sm;y=td,x===null&&(x=sm=mi("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=td=mi("div"),y.style.position="absolute",y.style.visibility="hidden",y.style.width="200px",y.style.height="150px",y.style.boxSizing="content-box",y.appendChild(x)),y.style.overflow="hidden",a.appendChild(y);var E=x.offsetWidth;y.style.overflow="scroll",x=x.offsetWidth,E===x&&(x=y.clientWidth),a.removeChild(y),y=E-x,y!==0||Ar||(y=11)}this.Db=y,this.Gw=!0},ke.prototype.qb=function(a){a.classType===ke&&(this.autoScale=a)},ke.prototype.toString=function(a){a===void 0&&(a=0);var y="";if(this.div&&this.div.id&&(y=this.div.id),y='Diagram "'+y+'"',0>=a)return y;for(var x=this.Wa.iterator;x.next();)y+=`
|
|
`+x.value.toString(a-1);return y};function Sg(a,y){if(la){if(y!=null||$t("Diagram setup requires an argument DIV."),a.Ka!==null&&$t("Diagram has already completed setup."),typeof y=="string"?a.Ka=Dn.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:$t("No DIV or DIV id supplied: "+y),a.Ka===null&&$t("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&$t("Invalid div id; div already has a Diagram associated with it."),!a.ol&&Dn.ResizeObserver){var x=Ze(function(){a.$b()},250);a.ol=new Dn.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}Dn.getComputedStyle(a.Ka,null).position==="static"&&(a.Ka.style.position="relative"),y=5;var E="rgba(2"+y+"5, 255, 255, 0)";y--,a.Ka.style["-webkit-tap-highlight-color"]=E,a.Ka.innerHTML="",a.Ka.H=a,a.Ka.goDiagram=a,a.Ka.go=Dn.go;var b=new Il(a);if(b.style!==void 0&&(b.style.position="absolute",b.style.top="0px",b.style.left="0px",Dn.getComputedStyle(a.Ka,null).getPropertyValue("direction")==="rtl"&&(a.tn=!0),b.style.zIndex="2",b.style.userSelect="none",b.style.MozUserSelect="none",b.style.touchAction="none",b.style.letterSpacing="normal !important",b.style.wordSpacing="normal !important"),a.ta=b,a.ib=b.context,E=a.ib,a.Mb=a.computePixelRatio(),a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1),Eg(a,a.Aa,a.ya),a.Ka.insertBefore(b.Oa,a.Ka.firstChild),b=new Il(null),b.width=1,b.height=1,a.jw=b,a.oy=b.context,la){b=mi("div");var z=mi("div");b.style.position="absolute",b.style.overflow="auto",b.style.width=a.Aa+"px",b.style.height=a.ya+"px",b.style.zIndex="1",z.style.position="absolute",z.style.width="1px",z.style.height="1px",a.Ka.appendChild(b),b.appendChild(z),b.onscroll=$p,b.addEventListener("pointerdown",tm),b.H=a,b.uy=!0,b.vy=!0,a.ku=b,a.hu=z}a.hk=Ze(function(){a.Yh=null,a.N()},300),a.Ov=Ze(function(){xg(a)},250),a.preventDefault=function(tt){return tt.preventDefault(),!1},a.$j=function(tt){if(a.isEnabled){var rt=yl(a,tt,!0);rt.bubbles=!0;var ot=0,st=0;rt.delta=0,tt.deltaX!==void 0?(tt.deltaX!==0&&(ot=0<tt.deltaX?1:-1),tt.deltaY!==0&&(st=0<tt.deltaY?1:-1),rt.delta=Math.abs(tt.deltaX)>Math.abs(tt.deltaY)?-ot:-st):tt.wheelDeltaX!==void 0?(tt.wheelDeltaX!==0&&(ot=0<tt.wheelDeltaX?-1:1),tt.wheelDeltaY!==0&&(st=0<tt.wheelDeltaY?-1:1),rt.delta=Math.abs(tt.wheelDeltaX)>Math.abs(tt.wheelDeltaY)?-ot:-st):tt.wheelDelta!==void 0&&tt.wheelDelta!==0&&(rt.delta=0<tt.wheelDelta?1:-1),a.doMouseWheel(),Ul(rt,tt)}},a.aA=function(tt){a.isEnabled&&(a.Vk=!1,yl(a,tt,!0),tt=a.currentTool,tt.cancelWaitAfter(),tt.standardMouseOver())},a.ui=function(tt){if(a.isEnabled){a.Vk=!0;var rt=a.Yt;rt[tt.pointerId]===void 0&&(rt[tt.pointerId]=tt),rt=a.oj;var ot=!1;if(rt[0]===null||rt[0].pointerId!==tt.pointerId&&rt[0].pointerType===tt.pointerType)if(rt[1]!==null&&rt[1].pointerId===tt.pointerId)rt[1]=tt,ot=!0;else if(rt[0]===null)rt[0]=tt;else if(rt[1]===null)rt[1]=tt,ot=!0;else{tt.preventDefault();return}else rt[0]=tt;(rt=tt.pointerType==="touch"||tt.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var st=ot;ot=Lg(a,tt,!0,!1,!0,st),Rd(a,tt,ot),ot.targetDiagram=Cg(tt,tt.target),ot.targetObject=null,st||ot.clone(a.bq),st=a.uw,rt=rt?25:10,tt.timeStamp-a.tw<a.zy&&!(Math.abs(st.x-tt.screenX)>rt||Math.abs(st.y-tt.screenY)>rt)?a.yq++:a.yq=1,ot.clickCount=a.yq,a.tw=tt.timeStamp,a.uw.sg(tt.screenX,tt.screenY),a.doMouseDown(),tt.button===1?tt.preventDefault():Ul(ot,tt)}},a.dk=function(tt){if(a.isEnabled){a.Vk=!0;var rt=a.oj;if(rt[0]===null||rt[0].pointerId!==tt.pointerId&&rt[0].pointerType===tt.pointerType){if(rt[1]!==null&&rt[1].pointerId===tt.pointerId){rt[1]=tt;return}if(rt[0]===null)rt[0]=tt;else return}else rt[0]=tt;if(rt[0].pointerId===tt.pointerId){rt=Lg(a,tt,!1,!1,!1,rt[1]!==null);var ot=Dn.document.elementFromPoint(tt.clientX,tt.clientY)||null;ot!==null&&ot.shadowRoot!==void 0&&ot.shadowRoot!==null&&(ot=ot.shadowRoot.elementFromPoint(tt.clientX,tt.clientY));var st=a,ut=tt;ot&&ot.H&&(ut=tt,st=ot.H),rt.targetDiagram=st,Rd(a,ut,rt),rt.targetObject=null,a.doMouseMove(),Ul(rt,tt)}}},a.fk=function(tt){if(a.isEnabled){a.Vk=!0;var rt=tt.pointerType==="touch"||tt.pointerType==="pen",ot=a.Yt;if(rt&&a.qu)delete ot[tt.pointerId],tt.preventDefault();else if(ot=a.oj,ot[0]===null||ot[0].pointerId!==tt.pointerId&&ot[0].pointerType===tt.pointerType)ot[1]!==null&&ot[1].pointerId===tt.pointerId&&(ot[1]=null);else{ot[0]=null,ot=Lg(a,tt,!1,!0,!0,!1);var st=Dn.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 ke&&st.H!==a&&Rd(st.H,tt,ot),st===null&&(st=tt.target),Rd(a,tt,ot),ot.clickCount=a.yq,ot.targetDiagram=Cg(tt,st),ot.targetObject=null,a.doMouseUp(),Ul(ot,tt),rt&&(a.wq=!1)}}},a.ek=function(tt){if(a.isEnabled){a.Vk=!1;var rt=a.Yt;rt[tt.pointerId]&&delete rt[tt.pointerId],rt=a.oj,rt[0]!==null&&rt[0].pointerId===tt.pointerId&&(rt[0]=null),rt[1]!==null&&rt[1].pointerId===tt.pointerId&&(rt[1]=null),tt.pointerType!=="touch"&&tt.pointerType!=="pen"&&(tt=a.currentTool,tt.cancelWaitAfter(),tt.standardMouseOver())}},a.ck=function(tt){var rt=a.oj;rt[0]!==null&&rt[0].pointerId===tt.pointerId?(rt[0]=null,a.wq=!1):rt[1]!==null&&rt[1].pointerId===tt.pointerId&&(rt[1]=null)},a.Vp=E.Z["d"+bc[1]+bc[2]+"wI"+Vd.slice(1,5)]["b"+Tx.slice(1,y)](E.Z,Fc,y,y),E.Vc(!0),tv(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}ke.prototype.addEventListener=function(a,y,x,E){a.addEventListener(y,x,{capture:E,passive:!1})},ke.prototype.removeEventListener=function(a,y,x,E){a.removeEventListener(y,x,{capture:E})};function tv(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(Dn,"resize",a.Ov,!1)}function Ds(a){30<a.Sq&&(a.Yh=1)}function wc(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),Ii&&Ii.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}ke.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:Dn.devicePixelRatio||1},ke.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},ke.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},ke.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},ke.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},ke.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},ke.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},ke.prototype.doFocus=function(){this.focus()},ke.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=Dn.scrollX||Dn.pageXOffset,y=Dn.scrollY||Dn.pageYOffset;this.ta.focus(),Dn.scrollTo(a,y)}},ke.prototype.Oy=function(){this.H.R("GainedFocus")},ke.prototype.Ny=function(){this.H.R("LostFocus")};function xg(a){if(a.ta!==null){var y=a.Ka;if(y!==null&&y.clientWidth!==0&&y.clientHeight!==0){a.Gw||a.setScrollWidth();var x=a.gf?a.Db:0,E=a.Be?a.Db:0,b=a.Mb;a.Mb=a.computePixelRatio(),a.Mb!==b&&(a.pn=!0,a.$b()),(y.clientWidth!==a.Aa+x||y.clientHeight!==a.ya+E)&&(a.Ee=!0,a.Fc=!0,y=a.layout,y!==null&&y.isViewportSized&&a.autoScale===ps&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function _p(a){var y=new Ga;y.name="Background",a.Al(y),y=new Ga,y.name="",a.Al(y),y=new Ga,y.name="Foreground",a.Al(y),y=new Ga,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new Ga,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new Ga,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function qp(a){var y=new mn(mn.Grid);y.name="GRID";var x=new dr;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new dr,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new dr,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new dr,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new dr,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new dr,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Fi,x.add(y),x.layerName="Grid",x.zOrder=0,x.isInDocumentBounds=!1,x.isAnimated=!1,x.pickable=!1,x.locationObjectName="GRID",a.add(x),a.partManager.parts.remove(x),y.visible=!1,y}function $p(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):Wd(this.H)}function tm(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):Wd(this.H)}ke.prototype.kx=function(a){if(this.ta!==null){var y=this.ku,x=this.hu;this.qr=!0;var E=this.documentBounds,b=this.viewportBounds,z=this.rj,tt=E.x-z.left,rt=E.y-z.top,ot=E.width+z.left+z.right,st=E.height+z.top+z.bottom,ut=E.right+z.right;z=E.bottom+z.bottom;var ft=b.x;E=b.y;var vt=b.width,yt=b.height,Pt=b.right,Et=b.bottom;b=this.scale;var Vt=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Vt=Vt+a.scrollWidth-a.clientWidth;break;case"reverse":Vt=a.scrollWidth-Vt-a.clientWidth}var Rt=Vt;vt<ot||yt<st?(Vt=Tt.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==Rt&&(Vt.x=Rt/b+tt,this.ju=Rt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Vt.y=a.scrollTop/b+rt,this.lu=a.scrollTop),this.position=Vt,Tt.free(Vt),this.Ee=this.qr=!1):(Vt=Tt.alloc(),a.uy&&this.allowHorizontalScroll&&(tt<ft&&(this.position=Vt.h(Rt+tt,this.position.y)),ut>Pt&&(this.position=Vt.h(-(y.scrollWidth-this.Aa)+Rt-this.Aa/b+ut,this.position.y))),a.vy&&this.allowVerticalScroll&&(rt<E&&(this.position=Vt.h(this.position.x,a.scrollTop+rt)),z>Et&&(this.position=Vt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/b+z))),Tt.free(Vt),this.vd=!0,this.Ee=this.qr=!1,E=this.documentBounds,b=this.viewportBounds,ut=E.right,Pt=b.right,z=E.bottom,Et=b.bottom,tt=E.x,ft=b.x,rt=E.y,E=b.y,vt>=ot&&tt>=ft&&ut<=Pt&&(x.style.width="1px"),yt>=st&&rt>=E&&z<=Et&&(x.style.height="1px"))}},ke.prototype.computeBounds=function(a){return a===void 0&&(a=new ae),rs(this),Pg(this,a)};function Pg(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,E=a.Wa.s,b=E.length,z=0;z<b;z++){var tt=E[z];if(tt.visible&&tt.isInDocumentBounds){tt=tt.Pa.s;for(var rt=tt.length,ot=0;ot<rt;ot++){var st=tt[ot];st.isInDocumentBounds&&st.isVisible()&&(st=st.actualBounds,st.w()&&(x?(x=!1,y.assign(st)):y.ed(st)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}ke.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(un(a))for(var E=0;E<a.length;E++){var b=a[E];!y&&b instanceof Ln||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds))}else for(a=a.iterator;a.next();)E=a.value,!y&&E instanceof Ln||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds));return x===null?new ae(NaN,NaN,0,0):x};function Bl(a,y){if((y||a.hf)&&!a.vb&&a.ta!==null&&a.documentBounds.w()){if(a.vb=!0,y){var x=a.initialPosition;if(x.w()){a.vb=!1,a.position=x;return}x=Tt.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var E=a.viewportBounds;E=ae.allocAt(0,0,E.width,E.height);var b=Tt.alloc();b.xi(E,a.initialViewportSpot),b.h(x.x-b.x,x.y-b.y),a.position=b,ae.free(E),Tt.free(b),Tt.free(x)}x=a.yh,y&&a.Fg!==ps&&(x=a.Fg);var z=x!==ps?Id(a,x):a.scale;x=a.pa.x,E=a.pa.y,b=a.Aa/z;var tt=a.ya/z,rt=a.zk,ot=a.pq;y&&!rt.sb()&&(ot.sb()||ot.Xb())&&(rt=ot.Xb()?fi:ot),wg(a,a.documentBounds,b,tt,rt,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,le.B(z.x,x)&&le.B(z.y,E)&&le.B(z.width,b)&&le.B(z.height,tt)||a.onViewportBoundsChanged(new ae(x,E,b,tt),z,y,!1)}}function Id(a,y){var x=a.Pp;if(a.ta===null)return x;a.Va();var E=a.documentBounds;if(!E.w())return x;var b=E.width;E=E.height;var z=a.Aa+(a.gf?a.Db:0),tt=a.ya+(a.Be?a.Db:0),rt=z/b,ot=tt/E;return y===al?(y=Math.min(ot,rt),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===ad?(y=ot>rt?(tt-a.Db)/E:(z-a.Db)/b,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}ke.prototype.zoomToFit=function(){var a=this.sj;this.sj=Ch,this.scale=Id(this,al),a!==Ch&&(Bl(this,!1),wg(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},Ct=ke.prototype,Ct.BA=function(a,y){y===void 0&&(y=al);var x=a.width,E=a.height;if(!(x===0||E===0||isNaN(x)&&isNaN(E))){var b=1;if(y===al||y===ad)if(isNaN(x))b=this.viewportBounds.height*this.scale/E;else if(isNaN(E))b=this.viewportBounds.width*this.scale/x;else{b=this.Aa;var z=this.ya;b=y===ad?z/E>b/x?(z-(this.Be?this.Db:0))/E:(b-(this.gf?this.Db:0))/x:Math.min(z/E,b/x)}this.scale=b,this.position=new Tt(a.x,a.y)}},Ct.Jy=function(a,y){this.Va();var x=this.documentBounds,E=this.viewportBounds;this.position=new Tt(x.x+(a.x*x.width+a.offsetX)-(y.x*E.width-y.offsetX),x.y+(a.y*x.height+a.offsetY)-(y.y*E.height-y.offsetY))},Ct.zz=function(a){if(a instanceof de){this.eq=a;var y=Tt.alloc();this.fq=this.op(a.ga(Wi,y)),Tt.free(y)}else this.eq=null,this.fq=wi};function wg(a,y,x,E,b,z){var tt=Tt.allocAt(a.pa.x,a.pa.y),rt=tt.x,ot=tt.y;if(a.eq!==null){var st=Tt.alloc();st=a.eq.ga(Wi,st),rt=st.x-a.fq.x/a.scale,ot=st.y-a.fq.y/a.scale,b=Li,Tt.free(st)}(z||a.scrollMode===Ch)&&(b.sb()&&(x>y.width&&(rt=y.x+(b.x*y.width+b.offsetX)-(b.x*x-b.offsetX)),E>y.height&&(ot=y.y+(b.y*y.height+b.offsetY)-(b.y*E-b.offsetY))),b=a.rj,z=x-y.width,x<y.width+b.left+b.right?(rt=Math.min(rt+x/2,y.right+Math.max(z,b.right)-x/2),rt=Math.max(rt,y.left-Math.max(z,b.left)+x/2),rt-=x/2):rt>y.left?rt=y.left:rt<y.right-x&&(rt=y.right-x),x=E-y.height,E<y.height+b.top+b.bottom?(ot=Math.min(ot+E/2,y.bottom+Math.max(x,b.bottom)-E/2),ot=Math.max(ot,y.top-Math.max(x,b.top)+E/2),ot-=E/2):ot>y.top?ot=y.top:ot<y.bottom-E&&(ot=y.bottom-E)),tt.x=isFinite(rt)?rt:-a.yb.left,tt.y=isFinite(ot)?ot:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,tt),tt.x=y.x,tt.y=y.y),Vp(a.Yd,a.pa,tt),a.pa.h(tt.x,tt.y),wu(a),Tt.free(tt)}Ct.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=Du(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof Fi)return a}else if(a=Du(this,a,function(x){return x.part}),a instanceof Fi)return a;return null},Ct.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),rs(this);for(var E=this.Wa.iteratorBackwards;E.next();){var b=E.value;if(b.visible&&(b=b.ic(a,y,x),b!==null))return b}return null};function Du(a,y,x,E){for(x===void 0&&(x=null),E===void 0&&(E=null),rs(a),a=a.Wa.iteratorBackwards;a.next();){var b=a.value;if(b.visible&&!b.isTemporary&&(b=b.ic(y,x,E),b!==null))return b}return null}Ct.lz=function(a,y,x){return y===void 0&&(y=!0),Cc(this,a,function(E){return E.part},y?function(E){return E instanceof Fi&&E.canSelect()}:null,x)};function Cc(a,y,x,E,b){for(x===void 0&&(x=null),E===void 0&&(E=null),b instanceof dn||b instanceof cn||(b=new cn),rs(a),a=a.Wa.iteratorBackwards;a.next();){var z=a.value;z.visible&&!z.isTemporary&&z.ji(y,x,E,b)}return b}Ct.ji=function(a,y,x,E){y===void 0&&(y=null),x===void 0&&(x=null),E instanceof dn||E instanceof cn||(E=new cn),rs(this);for(var b=this.Wa.iteratorBackwards;b.next();){var z=b.value;z.visible&&z.ji(a,y,x,E)}return E},Ct.ux=function(a,y,x,E){return y===void 0&&(y=!1),x===void 0&&(x=!0),cf(this,a,function(b){return b instanceof Fi&&(!x||b.canSelect())},y,E)},Ct.Cf=function(a,y,x,E,b){y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof dn||b instanceof cn||(b=new cn),rs(this);for(var z=this.Wa.iteratorBackwards;z.next();){var tt=z.value;tt.visible&&tt.Cf(a,y,x,E,b)}return b},Ct.Nu=function(a,y,x,E,b,z){var tt=new cn;rs(this);for(var rt=this.Wa.iteratorBackwards;rt.next();){var ot=rt.value;ot.visible&&ot.Nu(a,y,x,E,tt,b,z)}return tt};function cf(a,y,x,E,b){var z=null;for(z===void 0&&(z=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof dn||b instanceof cn||(b=new cn),rs(a),a=a.Wa.iteratorBackwards;a.next();){var tt=a.value;tt.visible&&!tt.isTemporary&&tt.Cf(y,z,x,E,b)}return b}Ct.mz=function(a,y,x,E,b){return x===void 0&&(x=!0),E===void 0&&(E=!0),Lc(this,a,y,function(z){return z instanceof Fi&&(!E||z.canSelect())},x,b)},Ct.og=function(a,y,x,E,b,z){x===void 0&&(x=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof dn||b instanceof cn)&&(z=b),b=!0),z instanceof dn||z instanceof cn||(z=new cn),rs(this);for(var tt=this.Wa.iteratorBackwards;tt.next();){var rt=tt.value;rt.visible&&rt.og(a,y,x,E,b,z)}return z};function Lc(a,y,x,E,b,z){var tt=null;for(tt===void 0&&(tt=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof dn||b instanceof cn)&&(z=b),b=!0),z instanceof dn||z instanceof cn||(z=new cn),rs(a),a=a.Wa.iteratorBackwards;a.next();){var rt=a.value;rt.visible&&!rt.isTemporary&&rt.og(y,x,tt,E,b,z)}return z}ke.prototype.acceptEvent=function(a){return yl(this,a,a instanceof MouseEvent)};function yl(a,y,x){var E=a.Qg;return a.Qg=a.cj,a.cj=E,E.diagram=a,E.event=y,x?Rd(a,y,E):(E.viewPoint=a.Qg.viewPoint,E.documentPoint=a.Qg.documentPoint),a=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),E.modifiers=a,E.button=y.button,y.buttons!==void 0&&(E.buttons=y.buttons),Ar&&y.button===0&&y.ctrlKey&&(E.button=2),E.down=!1,E.up=!1,E.clickCount=1,E.delta=0,E.handled=!1,E.bubbles=!1,E.timestamp=y.timeStamp,E.isMultiTouch=!1,E.targetDiagram=Cg(y,y.target),E.targetObject=null,E}function Cg(a,y){return y===null?null:(y=y.H)?y:((y=a.path)||typeof a.composedPath!="function"||(y=a.composedPath()),y&&y[0]&&y[0].H?y[0].H:null)}function Lg(a,y,x,E,b,z){var tt=a.Qg;return a.Qg=a.cj,a.cj=tt,tt.diagram=a,tt.clickCount=1,a=tt.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),tt.modifiers=a,tt.event=y,tt.timestamp=y.timeStamp,tt.button=y.button,tt.buttons=y.buttons,Ar&&y.button===0&&y.ctrlKey&&(tt.button=2),tt.down=x,tt.up=E,tt.handled=!1,tt.bubbles=b,tt.isMultiTouch=z,tt}function Ul(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}ke.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=yl(y,a,!1);switch(x.key=String.fromCharCode(a.which),x.down=!0,a.which){case 8:x.key="Backspace";break;case 33:x.key="PageUp";break;case 34:x.key="PageDown";break;case 35:x.key="End";break;case 36:x.key="Home";break;case 37:x.key="Left";break;case 38:x.key="Up";break;case 39:x.key="Right";break;case 40:x.key="Down";break;case 45:x.key="Insert";break;case 46:x.key="Del";break;case 48:x.key="0";break;case 187:case 61:case 107:x.key="Add";break;case 189:case 173:case 109:x.key="Subtract";break;case 27:x.key="Esc"}return y.doKeyDown(),Ul(x,a)},ke.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=yl(y,a,!1);switch(x.key=String.fromCharCode(a.which),x.up=!0,a.which){case 8:x.key="Backspace";break;case 33:x.key="PageUp";break;case 34:x.key="PageDown";break;case 35:x.key="End";break;case 36:x.key="Home";break;case 37:x.key="Left";break;case 38:x.key="Up";break;case 39:x.key="Right";break;case 40:x.key="Down";break;case 45:x.key="Insert";break;case 46:x.key="Del"}return y.doKeyUp(),Ul(x,a)},ke.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=yl(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),Ul(x,a)},ke.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=yl(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),Ul(x,a)},ke.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new Tt(0,0);var x=y.getBoundingClientRect();return y=a.clientX-this.Aa/x.width*x.left,a=a.clientY-this.ya/x.height*x.top,this.Ab!==null?Jn(new Tt(y,a),this.Ab):new Tt(y,a)};function Rd(a,y,x){var E=a.ta,b=a.Aa,z=a.ya,tt=0,rt=0;E!==null&&(E=E.getBoundingClientRect(),tt=y.clientX-b/E.width*E.left,rt=y.clientY-z/E.height*E.top),x.viewPoint.h(tt,rt),a.Ab!==null?(y=Tt.allocAt(tt,rt),a.Ab.Cd(y),x.documentPoint.assign(y),Tt.free(y)):x.documentPoint.h(tt,rt)}function kg(a,y,x){if(a.oj[0]!==null){y=a.oj[y];var E=a.ta;E!==null&&(E=E.getBoundingClientRect(),x.h(y.clientX-a.Aa/E.width*E.left,y.clientY-a.ya/E.height*E.top))}}ke.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function em(a){a.ld||rs(a),a.Va()}ke.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},Ct=ke.prototype,Ct.Pz=function(){return this.kg},Ct.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,Sl(this),this.hf=!1,this.du=new Tt(NaN,NaN),y.isEnabled=x,this.ld=!0;var E=this;a!==null&&je(function(){E.ld=!1,Nu(y,"Model"),a(E)},1)},Ct.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;Dn.requestAnimationFrame(function(){y.kg&&y.bd()})}},Ct.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),Sl(this))};function ed(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||Wd(a)||(y&&rs(a),x&&Bl(a,!1))}function Sl(a,y){if(!a.ld&&(a.kg=!1,a.Ka!==null||a.wo.w())){a.ld=!0;var x=a.animationManager,E=a.Xn;if(!x.isAnimating&&E.length!==0){for(var b=E.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];Ma(rt,!1),rt.v()}E.clear()}E=a.ow,0<E.count&&(E.each(function(ot){ot.Nv()}),E.clear()),b=E=!1,x.defaultAnimation.isAnimating&&(b=!0,E=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||xg(a),ed(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(Pu(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),rs(a),z=!1,(!a.hf||a.xh)&&(a.hf?Og(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),Og(a,!1)),z=!0),a.Jk=!1,rs(a),a.ou||em(a),ed(a,!0,!1),tt=!1,z?(x=ae.alloc(),x.assign(a.viewportBounds),a.hf||(tt=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,Mg(a)),a.R("LayoutCompleted"),ed(a,!0,!1),ae.free(x)):x.Ok&&x.Qw&&(a.Fg!==ps?a.scale=Id(a,a.Fg):a.yh!==ps?a.scale=Id(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),Bl(a,!0)),z&&tt&&a.eb("Initial Layout"),rs(a),y||a.gc(a.ib),b&&(a.skipsUndoManager=E),a.ld=!1}}function Mg(a){if(a.Fg!==ps)a.scale=Id(a,a.Fg);else if(a.yh!==ps)a.scale=Id(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}Bl(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),Pu(a)}function rs(a){if(a.De.count!==0&&(a.ld||!a.animationManager.isTicking)){for(var y=0;23>y;y++){var x=a.De.iterator;if(x===null||a.De.count===0)break;a.De=new cn,a.Nv(x,a.De)}a.nodes.each(function(E){E instanceof ir&&E.U&65536&&(E.U=E.U^65536)})}}Ct.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof ir||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof ir&&x.isVisible()&&kc(this,x);for(a.reset();a.next();)x=a.value,x instanceof Ln&&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 Zr&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function kc(a,y){for(var x=Ei(),E=Ei(),b=y.memberParts;b.next();){var z=b.value;z.isVisible()&&(z instanceof ir?(ll(z)||Cs(z)||ld(z))&&kc(a,z):z instanceof Ln?z.fromNode===y||z.toNode===y?E.push(z):x.push(z):(z.measure(1/0,1/0),z.arrange()))}for(a=x.length,b=0;b<a;b++)z=x[b],z.measure(1/0,1/0),z.arrange();for(ri(x),y.measure(1/0,1/0),y.arrange(),a=E.length,y=0;y<a;y++)x=E[y],x.measure(1/0,1/0),x.arrange();ri(E)}Ct.Fd=function(a,y,x,E){if(this.vd||this.animationManager.isAnimating)for(var b=0;b<y;b++)a[b].Fd(x,E)},Ct.gc=function(a){if(this.Ka!==null){if(this.ta===null&&$t("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){jd(this);var x=this.Aa,E=this.ya;if(a.Gv.resize(x,E,x,E),x=this.Wa.s,E=x.length,this.Fd(x,E,this,this.viewportBounds),this.Fc||y.isAnimating){y=this.pa;var b=this.Ca,z=Math.round(y.x*b)/b,tt=Math.round(y.y*b)/b,rt=this.Ab;for(rt.reset(),b!==1&&rt.scale(b),y.x===0&&y.y===0||rt.translate(-z,-tt),a.ti=null,Xy(a,rt.m11,rt.m12,rt.m21,rt.m22,rt.dx,rt.dy),this.pb!==1&&(a.globalAlpha=this.pb),Ph(this,a),y=this.Mb,this.ta.context.setTransform(y,0,0,y,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya),y=0;y<E;y++)x[y].gc(a,this);a=!1,this.Yf?Kd(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(Un.prototype.Cd=Un.prototype.Eu),this.Fc=this.vd=!1}}}}else t:if(z=this.animationManager,!z.zb&&(!z.isAnimating||z.isTicking)&&(x=new Date,jd(this),this.Ka.style.opacity!=="0")){if(E=a!==this.ib,y=this.Wa.s,b=y.length,this.Fd(y,b,this,this.viewportBounds),E)a.Vc(!0),this.vd=!0;else if(!this.Fc&&!z.isAnimating)break t;z=this.Ab,z.reset(),tt=this.Mb,rt=this.pa;var ot=this.Ca,st=Math.round(rt.x*ot)/ot,ut=Math.round(rt.y*ot)/ot;for(ot!==1&&z.scale(ot),rt.x===0&&rt.y===0||z.translate(-st,-ut),a.setTransform(tt,0,0,tt,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),Ph(this,a),rt=0;rt<b;rt++)a.setTransform(tt,0,0,tt,0,0),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),a.yc(),y[rt].gc(a,this);if(y=!1,this.Yf?Kd(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(Un.prototype.Cd=Un.prototype.Eu),E?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,E=Ii&&Ii.nx,x=this.zw,E||this.Yh===null){for(x[this.Tq]=y,this.Tq=(this.Tq+1)%x.length,b=y=0;b<x.length;b++)y+=x[b];this.Sq=y/x.length}if(this.pb!==1&&(a.globalAlpha=1),E)for(a.setTransform(1,0,0,1,0,0),E=0;E<x.length;E++)a.fillText(x[E].toString(),20,150+ +(20*E))}}};function ff(a,y,x,E,b,z,tt,rt,ot,st){if(a.Ka!==null){a.ta===null&&$t("No canvas specified"),tt===void 0&&(tt=null),rt===void 0&&(rt=null),ot===void 0&&(ot=!1),st===void 0&&(st=!1),jd(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var ut=a.Ca;a.Ca=b;var ft=a.Wa.s,vt=ft.length;try{var yt=new ae(z.x,z.y,E.width/b,E.height/b),Pt=yt.copy();Pt.Co(x),Pu(a,Pt),rs(a),a.Fd(ft,vt,a,yt),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,E.width,E.height),rt!==null&&rt!==""&&(y.fillStyle=rt,y.ox(0,0,E.width,E.height));var Et=a.Mb;y.scale(Et,Et);var Vt=Un.alloc();Vt.reset(),Vt.translate(x.left,x.top),Vt.scale(b),z.x===0&&z.y===0||Vt.translate(-z.x,-z.y),y.setTransform(Vt.m11,Vt.m12,Vt.m21,Vt.m22,Vt.dx,Vt.dy),y.yc(),y instanceof qs&&Xy(y,Vt.m11,Vt.m12,Vt.m21,Vt.m22,Vt.dx,Vt.dy),Un.free(Vt),Ph(a,y),y.globalAlpha=a.pb;var Rt=a.Qj("Grid");if(tt){var Qt=new cn,_t=tt.iterator;for(_t.reset();_t.next();){var te=_t.value;te instanceof Fi&&(st||te.layer!==Rt)&&(te.Gj(),Qt.add(te))}for(st=0;st<vt;st++)Up(ft[st],y,a,Qt,ot);Qt.each(function(Ce){return Ce.Gj()})}else for(Qt=0;Qt<vt;Qt++){var ue=ft[Qt];ue===Rt?st&&ue.gc(y,a,!0):ue.gc(y,a,ot)}a.$i=!1,a.Yf&&Kd(a.Yf,a)&&a.Vp()}finally{a.Ca=ut,a.ib.Vc(!0),a.vd=!0,a.Fd(ft,vt,a,a.viewportBounds),Pu(a),a.ib instanceof qs&&(a.ib.Nj.PA(),a.redraw())}}}Ct.Gf=function(a){return this.Rg[a]},Ct.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},Ct.Tx=function(){this.Rg=new Hi,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(Ar||wo),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function Ph(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}Ct.Ql=function(a){return this.on[a]},Ct.sA=function(a,y){this.on[a]=y},Ct.Sx=function(){this.on=new Hi,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},Ct.set=function(a){return Object.assign(this,a),this},Ct.Du=function(a){return this.nm(a)},Ct.nm=function(a){return zd(this,a),this};function zd(a,y){var x=a instanceof mn,E=a instanceof ke,b;for(b in y){b===""&&$t("Setting properties requires non-empty property names");var z=a,tt=b;if(x||E){var rt=b.indexOf(".");if(0<rt){var ot=b.substring(0,rt);x?z=a.fb(ot):(z=a[ot],z==null&&(z=a.toolManager[ot])),_e(z)?tt=b.substr(rt+1):$t("Unable to find object named: "+ot+" in "+a.toString()+" when trying to set property: "+b)}}if(tt[0]!=="_"&&!mr(z,tt))if(E&&tt==="ModelChanged"){a.Yw(y[tt]);continue}else if(E&&tt==="Changed"){a.Pe(y[tt]);continue}else if(E&&mr(a.toolManager,tt))z=a.toolManager;else if(E&&rm(a,tt)){a.Bj(tt,y[tt]);continue}else if(a instanceof yi&&tt==="Changed"){a.Pe(y[tt]);continue}else $t('Trying to set undefined property "'+tt+'" on object: '+z.toString());z[tt]=y[b],tt[0]==="_"&&z instanceof de&&z.Vw(tt)}}Ct.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new be,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},Ct.N=function(a){if(a===void 0)this.Fc=!0,this.$b();else{var y=this.viewportBounds;a.w()&&y.Yc(a)&&(this.Fc=!0,this.$b())}this.R("InvalidateDraw")},ke.prototype.invalidateViewport=function(a,y){if(this.Fc!==!0)if(this.Fc=!0,this.nl==="svg")this.bd();else{var x=this.Gf("temporaryPixelRatio")===!0;if(this.Gf("viewportOptimizations")===!0&&this.scrollMode!==Ac&&this.rj.hi(0,0,0,0)&&y.width===a.width&&y.height===a.height){var E=this.scale,b=Math.max(a.y,y.y),z=Math.min(a.y+a.height,y.y+y.height);if(0<Math.max(0,Math.min(a.x+a.width,y.x+y.width)-Math.max(a.x,y.x))*E&&0<Math.max(0,z-b)*E){if(!(this.ld||(this.kg=!1,this.Ka===null||(this.ld=!0,this.documentBounds.w()||(E=ae.alloc(),Bg(this,this.computeBounds(E)),ae.free(E)),E=this.ta,E===null||E instanceof Cu)))){var tt=this.Mb;b=this.Aa*tt;var rt=this.ya*tt,ot=this.scale*tt;z=Math.round(Math.round(y.x*ot)-Math.round(a.x*ot)),y=Math.round(Math.round(y.y*ot)-Math.round(a.y*ot)),ot=this.jw,a=this.oy,ot.width!==b&&(ot.width=b),ot.height!==rt&&(ot.height=rt),a.clearRect(0,0,b,rt),ot=190*tt;var st=70*tt,ut=Math.max(z,0),ft=Math.max(y,0),vt=Math.floor(b-ut),yt=Math.floor(rt-ft);a.drawImage(E.Oa,ut,ft,vt,yt,0,0,vt,yt),Kd(this.Yf,this)&&a.clearRect(0,0,ot,st),E=Ei(),a=Ei(),yt=Math.abs(z),vt=Math.abs(y);var Pt=ut===0?0:b-yt;ut=Tt.allocAt(Pt,0),yt=Tt.allocAt(yt+Pt,rt),a.push(new ae(Math.min(ut.x,yt.x),Math.min(ut.y,yt.y),Math.abs(ut.x-yt.x),Math.abs(ut.y-yt.y)));var Et=this.Ab;if(Et.reset(),Et.scale(tt,tt),this.Ca!==1&&Et.scale(this.Ca),tt=this.pa,(tt.x!==0||tt.y!==0)&&isFinite(tt.x)&&isFinite(tt.y)&&Et.translate(-tt.x,-tt.y),Jn(ut,Et),Jn(yt,Et),E.push(new ae(Math.min(ut.x,yt.x),Math.min(ut.y,yt.y),Math.abs(ut.x-yt.x),Math.abs(ut.y-yt.y))),Pt=ft===0?0:rt-vt,ut.h(0,Pt),yt.h(b,vt+Pt),a.push(new ae(Math.min(ut.x,yt.x),Math.min(ut.y,yt.y),Math.abs(ut.x-yt.x),Math.abs(ut.y-yt.y))),Jn(ut,Et),Jn(yt,Et),E.push(new ae(Math.min(ut.x,yt.x),Math.min(ut.y,yt.y),Math.abs(ut.x-yt.x),Math.abs(ut.y-yt.y))),Kd(this.Yf,this)&&(b=0<z?0:-z,rt=0<y?0:-y,ut.h(b,rt),yt.h(ot+b,st+rt),a.push(new ae(Math.min(ut.x,yt.x),Math.min(ut.y,yt.y),Math.abs(ut.x-yt.x),Math.abs(ut.y-yt.y))),Jn(ut,Et),Jn(yt,Et),E.push(new ae(Math.min(ut.x,yt.x),Math.min(ut.y,yt.y),Math.abs(ut.x-yt.x),Math.abs(ut.y-yt.y)))),Tt.free(ut),Tt.free(yt),ed(this,!1,!0),this.Ka===null&&$t("No div specified"),this.ta===null&&$t("No canvas specified"),!this.animationManager.zb&&(b=this.ib,this.Fc)){for(jd(this),rt=this.Mb,b.setTransform(1,0,0,1,0,0),b.clearRect(0,0,this.Aa*rt,this.ya*rt),b.drawImage(this.jw.Oa,0<z?0:Math.round(-z),0<y?0:Math.round(-y)),z=this.pa,tt=this.Ca,ot=Math.round(z.x*tt)/tt,st=Math.round(z.y*tt)/tt,y=this.Ab,y.reset(),tt!==1&&y.scale(tt),z.x===0&&z.y===0||y.translate(-ot,-st),b.save(),b.beginPath(),z=a.length,tt=0;tt<z;tt++)ot=a[tt],ot.width!==0&&ot.height!==0&&b.rect(Math.floor(ot.x),Math.floor(ot.y),Math.ceil(ot.width),Math.ceil(ot.height));for(b.clip(),b.setTransform(rt,0,0,rt,0,0),b.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),b.yc(),y=this.Wa.s,z=y.length,this.Fd(y,z,this,this.viewportBounds),Ph(this,b),b.globalAlpha=this.pb,rt=0;rt<z;rt++)if(tt=y[rt],ot=E,tt.visible&&tt.pb!==0){st=$u(tt,b),ft=tt.Zq,ft.length=0,ut=this.scale,vt=ae.alloc(),yt=tt.Pa.s,Et=yt.length,Pt=ot.length;for(var Vt=0;Vt<Et;Vt++){var Rt=yt[Vt],Qt=qd(Rt,Rt.actualBounds);t:{for(var _t=2/ut,te=4/ut,ue=0;ue<Pt;ue++){var Ce=ot[ue];if(Ce.width!==0&&Ce.height!==0&&Qt.Vu(Ce.x-_t,Ce.y-_t,Ce.width+te,Ce.height+te)){Qt=!0;break t}}Qt=!1}Qt&&tt.Oj(b,Rt,this,ft,ut,vt,!0)}ae.free(vt),b.globalAlpha=st}b.restore(),b.Vc(!0),this.Yf&&Kd(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}ri(E),ri(a),this.ld=!1}}else this.bd();x&&(Ds(this),this.bd(),wc(this,!0))}else x?(Ds(this),this.bd(),wc(this,!0)):this.bd()}};function jd(a){a.pn!==!1&&(a.pn=!1,Eg(a,a.Aa,a.ya))}function Eg(a,y,x){wu(a);var E=a.Mb;a.ta.resize(y*E,x*E,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function Wd(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,E=a.ya,b=a.Ka,z=!1,tt=a.gf?a.Db:0,rt=a.Be?a.Db:0,ot=b.clientWidth||x+tt,st=b.clientHeight||E+rt,ut=a.viewportBounds;b=ut.x;var ft=ut.y,vt=ut.width,yt=ut.height;if((ot!==x+tt||st!==E+rt)&&(a.gf=!1,a.Be=!1,rt=tt=0,a.Aa=ot,a.ya=st,z=a.pn=!0,wu(a)),!a.hf||!a.viewportBounds.w())return!0;var Pt=a.ku,Et=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var Vt=a.documentBounds,Rt=0,Qt=0,_t=0,te=0,ue=ut.width,Ce=ut.height,On=a.rj;a.contentAlignment.sb()?(Vt.width>ue&&(Rt=On.left,Qt=On.right),Vt.height>Ce&&(_t=On.top,te=On.bottom)):(Rt=On.left,Qt=On.right,_t=On.top,te=On.bottom);var li=Vt.width+Rt+Qt,ti=Vt.height+_t+te;On=a.scale;var Cn=li>ot/On,qe=ti>st/On;if(!(z||a.gf||a.Be||Cn||qe))return!0;Rt=Vt.x-Rt,ot=ut.x,Qt=Vt.right+Qt,st=ut.right+tt,_t=Vt.y-_t;var er=ut.y;Vt=Vt.bottom+te,ut=ut.bottom+rt;var Ui="1px";if(te="1px",a.scrollMode===Ch&&(Cn||qe)&&(Cn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Cn=1,Rt+1<ot&&(Cn=Math.max((ot-Rt)*On+a.Aa,Cn)),Qt>st+1&&(Cn=Math.max((Qt-st)*On+a.Aa,Cn)),ue+tt+1<li&&(Cn=Math.max((li-ue)*On+a.Aa,Cn)),Ui=Cn.toString()+"px"),qe&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Cn=1,_t+1<er&&(Cn=Math.max((er-_t)*On+a.ya,Cn)),Vt>ut+1&&(Cn=Math.max((Vt-ut)*On+a.ya,Cn)),Ce+rt+1<ti&&(Cn=Math.max((ti-Ce)*On+a.ya,Cn)),te=Cn.toString()+"px")),Cn=Ui!=="1px",qe=te!=="1px",Cn&&qe||!Cn&&!qe||(qe&&(st-=a.Db),Cn&&(ut-=a.Db),li<ue+tt||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(tt=1,Rt+1<ot&&(tt=Math.max((ot-Rt)*On+a.Aa,tt)),Qt>st+1&&(tt=Math.max((Qt-st)*On+a.Aa,tt)),ue+1<li&&(tt=Math.max((li-ue)*On+a.Aa,tt)),Ui=tt.toString()+"px"),Cn=Ui!=="1px",tt=a.ya,Cn!==a.Be&&(tt=Cn?a.ya-a.Db:a.ya+a.Db),ti<Ce+rt||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(rt=1,_t+1<er&&(rt=Math.max((er-_t)*On+tt,rt)),Vt>ut+1&&(rt=Math.max((Vt-ut)*On+tt,rt)),Ce+1<ti&&(rt=Math.max((ti-Ce)*On+tt,rt)),te=rt.toString()+"px"),qe=te!=="1px"),a.qr&&Cn===a.Be&&qe===a.gf)return x===a.Aa&&E===a.ya||a.bd(),!1;if(Cn!==a.Be&&(Ui==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=Cn,Et.style.width=Ui,qe!==a.gf&&(te==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(rt=Tt.alloc(),qe?(y.style.left=a.Db+"px",a.position=rt.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=rt.h(a.pa.x-a.Db/a.scale,a.pa.y)),Tt.free(rt))),z&&wu(a),a.gf=qe,Et.style.height=te,a.gu=!0,z&&(a.pn=!0),y=Pt.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(ue+1<li?y=(a.position.x-Rt)*On:Rt+1<ot?y=Pt.scrollWidth-Pt.clientWidth:Qt>st+1&&(y=a.position.x*On)),a.tn)switch(a.bu){case"negative":y=-(Pt.scrollWidth-y-Pt.clientWidth);break;case"reverse":y=Pt.scrollWidth-y-Pt.clientWidth}return Pt.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Ce+1<ti?Pt.scrollTop=(a.position.y-_t)*On:_t+1<er?Pt.scrollTop=Pt.scrollHeight-Pt.clientHeight:Vt>ut+1&&(Pt.scrollTop=a.position.y*On)),ot=a.Aa,st=a.ya,Pt.style.width=ot+(a.gf?a.Db:0)+"px",Pt.style.height=st+(a.Be?a.Db:0)+"px",x!==ot||E!==st||a.animationManager.zb?(x=ae.allocAt(b,ft,vt,yt),a.onViewportBoundsChanged(x,a.viewportBounds,On,z),ae.free(x),!1):!0}Ct=ke.prototype,Ct.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&$t("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&&$t('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(Xo,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},Ct.oi=function(a){this.partManager.oi(a);var y=this;Jd(a,function(x){Hd(y,x)}),(a instanceof Zr||a instanceof ir&&a.placeholder!==null)&&a.v(),a.data!==null&&Jd(a,function(x){sy(y.partManager,x)}),Cs(a)!==!0&&ld(a)!==!0||this.De.add(a),RS(a,!0,this),jS(a)?(a.actualBounds.w()&&this.N(qd(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(qd(a,a.actualBounds)),this.$b()},Ct.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Jd(a,function(x){ly(y.partManager,x,y)}),this.De.remove(a),jS(a)?(a.actualBounds.w()&&this.N(qd(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(qd(a,a.actualBounds)),this.$b()},Ct.remove=function(a){Ag(this,a,!0)};function Ag(a,y,x){var E=y.layer;E!==null&&E.diagram===a&&(y.isSelected=!1,y.isHighlighted=!1,y.C(2),x&&y.Lj(),x=E.pc(-1,y,!1),0<=x&&a.cb(ua,"parts",E,y,null,x,null),a=y.layerChanged,a!==null&&a(y,E,null))}Ct.Is=function(a,y){if(y===void 0&&(y=!1),un(a))for(var x=a.length,E=0;E<x;E++){var b=a[E];y&&!b.canDelete()||this.remove(b)}else for(x=new cn,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},Ct.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},ke.prototype.moveParts=function(a,y,x,E){if(x===void 0&&(x=!1),E===void 0&&(E=gf(this)),this.toolManager!==null){var b=new be;if(a!==null)if(un(a))for(var z=0;z<a.length;z++)Bu(this,b,a[z],x,E);else for(a=a.iterator;a.next();)Bu(this,b,a.value,x,E);else{for(a=this.parts;a.next();)Bu(this,b,a.value,x,E);for(a=this.nodes;a.next();)Bu(this,b,a.value,x,E);for(a=this.links;a.next();)Bu(this,b,a.value,x,E)}nd(this,b,y,E,x)}};function Bu(a,y,x,E,b,z){if(!y.contains(x)&&(z===void 0&&(z=!1),!E||z||x.canMove()||x.canCopy()))if(b===void 0&&(b=gf(a)),x instanceof Hn){if(y.add(x,a.Pd(b,x,x.location)),x instanceof ir&&(x.placeholder!==null||b.dragsMembers))for(z=x.memberParts;z.next();)Bu(a,y,z.value,E,b,b.groupsAlwaysMove);for(z=x.linksConnected;z.next();){var tt=z.value;if(!y.contains(tt)){var rt=tt.fromNode,ot=tt.toNode;rt!==null&&y.contains(rt)&&ot!==null&&y.contains(ot)&&Bu(a,y,tt,E,b)}}if(b.dragsTree)for(x=x.Ou();x.next();)Bu(a,y,x.value,E,b)}else if(x instanceof Ln)for(y.add(x,a.Pd(b,x)),x=x.labelNodes;x.next();)Bu(a,y,x.value,E,b);else x instanceof Zr||y.add(x,a.Pd(b,x,x.location))}function nd(a,y,x,E,b){if(y!==null&&y.count!==0){var z=Tt.alloc(),tt=Tt.alloc();tt.assign(x),isNaN(tt.x)&&(tt.x=0),isNaN(tt.y)&&(tt.y=0),(x=a.Mr)||mf(a,y);for(var rt=Ei(),ot=Ei(),st=y.iterator,ut=Tt.alloc();st.next();){var ft=st.key,vt=st.value;if(ft.Zc()){var yt=Fg(a,ft,y);yt!==null?rt.push(new it(ft,vt,yt)):(!b||ft.canMove())&&(yt=vt.point,z.assign(yt),a.computeMove(ft,z.add(tt),E,ut),ft.location=ut,vt.shifted===void 0&&(vt.shifted=new Tt),vt.shifted.assign(ut.re(yt)))}else st.key instanceof Ln&&ot.push(st.sa)}for(Tt.free(ut),b=rt.length,st=0;st<b;st++)ft=rt[st],z.assign(ft.info.point),ft.Su.shifted===void 0&&(ft.Su.shifted=new Tt),ft.node.location=z.add(ft.Su.shifted);for(b=Tt.alloc(),st=Tt.alloc(),ft=ot.length,vt=0;vt<ft;vt++){var Pt=ot[vt];if(yt=Pt.key,yt instanceof Ln)if(yt.suspendsRouting){yt.Tg=null,ut=yt.fromNode;var Et=yt.toNode;if(a.draggedLink!==null&&E.dragsLink)if(Et=Pt.value.point,yt.dragComputation===null)y.add(yt,a.Pd(E,yt,tt)),Nh(yt,tt.x-Et.x,tt.y-Et.y);else{Pt=Tt.allocAt(0,0),(ut=yt.i(0))&&ut.w()&&Pt.assign(ut);var Vt=ut=Tt.alloc().assign(Pt).add(tt);E.isGridSnapEnabled&&(E.isGridSnapRealtime||a.lastInput.up)&&(Vt=Tt.alloc(),pf(a,yt,ut,Vt,E)),ut.assign(yt.dragComputation(yt,ut,Vt)).re(Pt),y.add(yt,a.Pd(E,yt,ut)),Nh(yt,ut.x-Et.x,ut.y-Et.y),Tt.free(Pt),Tt.free(ut),Vt!==ut&&Tt.free(Vt)}else ut!==null&&(b.assign(ut.location),Vt=y.I(ut),Vt!==null&&b.re(Vt.point)),Et!==null&&(st.assign(Et.location),Vt=y.I(Et),Vt!==null&&st.re(Vt.point)),ut!==null&&Et!==null?b.Xa(st)?(ut=Pt.value.point,Et=z,Et.assign(b),Et.re(ut),y.add(yt,a.Pd(E,yt,b)),Nh(yt,Et.x,Et.y)):(yt.suspendsRouting=!1,yt.bb()):(Pt=Pt.value.point,ut=ut!==null?b:Et!==null?st:tt,y.add(yt,a.Pd(E,yt,ut)),Nh(yt,ut.x-Pt.x,ut.y-Pt.y))}else(yt.fromNode===null||yt.toNode===null)&&(ut=Pt.value.point,y.add(yt,a.Pd(E,yt,tt)),Nh(yt,tt.x-ut.x,tt.y-ut.y))}Tt.free(z),Tt.free(tt),Tt.free(b),Tt.free(st),ri(rt),ri(ot),x||(rs(a),id(a,y))}}ke.prototype.computeMove=function(a,y,x,E){if(E===void 0&&(E=new Tt),E.assign(y),a===null)return E;var b=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(b=Tt.alloc(),pf(this,a,y,b,x)),x=a.dragComputation!==null?a.dragComputation(a,y,b):b;var tt=a.minLocation,rt=tt.x;isNaN(rt)&&(rt=z?Math.round(1e3*a.location.x)/1e3:a.location.x),tt=tt.y,isNaN(tt)&&(tt=z?Math.round(1e3*a.location.y)/1e3:a.location.y);var ot=a.maxLocation,st=ot.x;return isNaN(st)&&(st=z?Math.round(1e3*a.location.x)/1e3:a.location.x),ot=ot.y,isNaN(ot)&&(ot=z?Math.round(1e3*a.location.y)/1e3:a.location.y),E.h(Math.max(rt,Math.min(x.x,st)),Math.max(tt,Math.min(x.y,ot))),b!==y&&Tt.free(b),E};function gf(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function pf(a,y,x,E,b){if(b===void 0&&(b=gf(a)),E.assign(x),y!==null){var z=a.grid;y=b.gridSnapCellSize,a=y.width,y=y.height;var tt=b.gridSnapOrigin,rt=tt.x;if(tt=tt.y,b=b.gridSnapCellSpot,z!==null){var ot=z.gridCellSize;isNaN(a)&&(a=ot.width),isNaN(y)&&(y=ot.height),z=z.gridOrigin,isNaN(rt)&&(rt=z.x),isNaN(tt)&&(tt=z.y)}z=Tt.allocAt(0,0),z.yi(0,0,a,y,b),le.No(x.x,x.y,rt+z.x,tt+z.y,a,y,E),Tt.free(z)}}function mf(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof Ln&&(y.suspendsRouting=!0)}function id(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Ln&&(x.suspendsRouting=!1,Uv(x)&&x.bb())}a.Mr=!1}}function Fg(a,y,x){return y=y.containingGroup,y!==null&&(a=Fg(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}Ct=ke.prototype,Ct.Pd=function(a,y,x){if(x===void 0)return new th(Wn);var E=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(E=!1),E?new th(new Tt(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new th(x.copy())};function bg(a,y,x){if(y.diagram!==null&&y.diagram!==a&&$t("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&$t("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&$t("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&$t("Cannot move a Layer before or after itself: "+y)),y.diagram!==a){y=y.name,a=a.Wa,x=a.count;for(var E=0;E<x;E++)a.M(E).name===y&&$t("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}Ct.Al=function(a){bg(this,a,null),a.Xe(this);var y=this.Wa,x=y.count-1;if(!a.isTemporary)for(;0<=x&&y.M(x).isTemporary;)x--;return y.Gb(x+1,a),this.cc!==null&&this.cb(Xo,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},Ct.Ww=function(a,y){bg(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(ua,"layers",this,a,null,E,null));var b=x.count,z;for(z=0;z<b;z++)if(x.M(z)===y){x.Gb(z,a);break}return this.cc!==null&&this.cb(Xo,"layers",this,null,a,null,z),this.N(),0>E&&this.Ya(),this},Ct.Cy=function(a,y){bg(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(ua,"layers",this,a,null,E,null));var b=x.count,z;for(z=0;z<b;z++)if(x.M(z)===y){x.Gb(z+1,a);break}return this.cc!==null&&this.cb(Xo,"layers",this,null,a,null,z+1),this.N(),0>E&&this.Ya(),this},Ct.kA=function(a){if(a.diagram!==this&&$t("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram),a.name!==""){var y=this.Wa,x=y.indexOf(a);if(y.remove(a)){for(y=a.Pa.copy().iterator;y.next();){var E=y.value,b=E.layerName;b!==a.name?E.layerName=b:E.layerName=""}this.cc!==null&&this.cb(ua,"layers",this,a,null,x,null),this.N(),this.Ya()}}},Ct.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},Ct.Yw=function(a){return this.pf===null&&(this.pf=new dn),this.pf.add(a),this.model.Pe(a),this},Ct.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},Ct.Pe=function(a){return this.zg===null&&(this.zg=new dn),this.zg.add(a),this},Ct.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},Ct.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==La&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,E=0;E<x;E++)y.M(E)(a)},Ct.cb=function(a,y,x,E,b,z,tt){z===void 0&&(z=null),tt===void 0&&(tt=null);var rt=new Io;rt.diagram=this,rt.change=a,rt.propertyName=y,rt.object=x,rt.oldValue=E,rt.oldParam=z,rt.newValue=b,rt.newParam=tt,this.ds(rt)},Ct.g=function(a,y,x,E,b){this.cb(Eo,a,this,y,x,E,b)},ke.prototype.changeState=function(a,y){if(a!==null&&a.diagram===this){var x=this.skipsModelSourceBindings;try{this.skipsModelSourceBindings=!0;var E=a.change;if(E===Eo){var b=a.object;if(Jo(b,a.propertyName,a.I(y)),b instanceof de){var z=b.part;z!==null&&z.Wb()}this.isModified=!0}else if(E===Xo){var tt=a.object,rt=a.newParam,ot=a.newValue;if(tt instanceof mn)if(typeof rt=="number"&&ot instanceof de){y?tt.pc(rt):tt.Gb(rt,ot);var st=tt.part;st!==null&&st.Wb()}else typeof rt=="number"&&ot instanceof Ea&&(ot.isRow?hS(tt,rt,y?void 0:ot):dS(tt,rt,y?void 0:ot));else if(tt instanceof Ga){var ut=a.oldParam===!0;typeof rt=="number"&&ot instanceof Fi&&(y?(ot.isSelected=!1,ot.isHighlighted=!1,ot.Wb(),tt.pc(ut?rt:-1,ot,ut)):tt.oi(rt,ot,ut))}else tt instanceof ke?typeof rt=="number"&&ot instanceof Ga&&(y?this.Wa.mb(rt):(ot.Xe(this),this.Wa.Gb(rt,ot))):$t("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(E===ua){var ft=a.object,vt=a.oldParam,yt=a.oldValue;if(ft instanceof mn)typeof vt=="number"&&yt instanceof de?y?ft.Gb(vt,yt):ft.pc(vt):typeof vt=="number"&&yt instanceof Ea&&(yt.isRow?hS(ft,vt,y?yt:void 0):dS(ft,vt,y?yt:void 0));else if(ft instanceof Ga){var Pt=a.newParam===!0;typeof vt=="number"&&yt instanceof Fi&&(y?0>ft.Pa.indexOf(yt)&&ft.oi(vt,yt,Pt):(yt.isSelected=!1,yt.isHighlighted=!1,yt.Wb(),ft.pc(Pt?vt:-1,yt,Pt)))}else ft instanceof ke?typeof vt=="number"&&yt instanceof Ga&&(y?(yt.Xe(this),this.Wa.Gb(vt,yt)):this.Wa.mb(vt)):$t("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else E!==La&&$t("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},ke.prototype.Ea=function(a){return this.undoManager.Ea(a)},ke.prototype.eb=function(a){return this.undoManager.eb(a)},ke.prototype.Kf=function(){return this.undoManager.Kf()},ke.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var E=!1;try{a(this),E=!0}finally{E?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},ke.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},ke.prototype.rp=function(){this.partManager.rp()};function Ng(a,y,x){var E=a.animationManager;if(a.vb||a.ld)a.Ca=x,wu(a),a.N(),a.Ee=!0,E.zb&&(_u(E)||E.ce.add(E.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,wu(a);else{a.vb=!0;var b=a.viewportBounds.copy(),z=a.Aa,tt=a.ya,rt=a.zoomPoint.x,ot=a.zoomPoint.y,st=a.contentAlignment;isNaN(rt)&&(st.$c()?st.Hf(Wr)?rt=0:st.Hf(Cr)&&(rt=z-1):rt=st.sb()?st.x*(z-1):z/2),isNaN(ot)&&(st.$c()?st.Hf(Yr)?ot=0:st.Hf(to)&&(ot=tt-1):ot=st.sb()?st.y*(tt-1):tt/2),a.scaleComputation===null||a.animationManager.defaultAnimation.isAnimating||(x=a.scaleComputation(a,x)),x<a.minScale&&(x=a.minScale),x>a.maxScale&&(x=a.maxScale),z=Tt.allocAt(a.pa.x+rt/y-rt/x,a.pa.y+ot/y-ot/x),a.position=z,Tt.free(z),a.Ca=x,wu(a),a.vb=!1,a.onViewportBoundsChanged(b,a.viewportBounds,y,!1),Bl(a,!1),E.zb&&(_u(E)||E.ce.add(E.H,"scale",y,a.Ca))}}ke.prototype.onViewportBoundsChanged=function(a,y,x,E){if(!a.D(y)){E===void 0&&(E=!1),E||(this.Ee=!0),this.vd=!0;var b=this.layout;b===null||!b.isViewportSized||this.autoScale!==ps||a.width===y.width&&a.height===y.height||b.C(),b=this.currentTool,this.Vk===!0&&b instanceof uo&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Zl(b,this)),this.vb||this.invalidateViewport(a,y),Pu(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.canvasSize.width=Math.round(a.width*x),this.fc.canvasSize.height=Math.round(a.height*x),this.fc.newCanvasSize.width=this.Aa,this.fc.newCanvasSize.height=this.ya,this.fc.isScroll=E,this.R("ViewportBoundsChanged",this.fc,a),this.isVirtualized&&this.links.each(function(z){z.isAvoiding&&z.actualBounds.Yc(y)&&z.bb()})}};function Pu(a,y){var x=a.fe;if(x!==null&&x.visible){for(var E=Ut.alloc(),b=1,z=1,tt=x.O.s,rt=tt.length,ot=0;ot<rt;ot++){var st=tt[ot],ut=Math.abs(st.interval);2>ut||(pv(st.figure)?z=z*ut/le.vx(z,ut):b=b*ut/le.vx(b,ut))}if(tt=x.gridCellSize,E.h(z*tt.width,b*tt.height),y!==void 0)b=y.width,z=y.height,a=y.x,tt=y.y;else{if(y=ae.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){ae.free(y);return}b=y.width,z=y.height,a=y.x,tt=y.y,ae.free(y)}x.width=b+2*E.width,x.height=z+2*E.height,y=Tt.alloc(),le.No(a,tt,0,0,E.width,E.height,y),y.offset(-E.width,-E.height),Ut.free(E),x.part.location=y,Tt.free(y)}}ke.prototype.clearSelection=function(a){a===void 0&&(a=!1);var y=this.selection;if(y.count!==0){a||this.R("ChangingSelection",y);for(var x=y.Fa(),E=x.length,b=0;b<E;b++)x[b].isSelected=!1;y.ka(),y.clear(),y.freeze(),a||this.R("ChangedSelection",y)}},ke.prototype.select=function(a){a!==null&&a.diagram===this&&(!a.isSelected||1<this.selection.count)&&(this.R("ChangingSelection",this.selection),this.clearSelection(!0),a.isSelected=!0,this.R("ChangedSelection",this.selection))},ke.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),un(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];E instanceof Fi||$t("Diagram.selectCollection given something that is not a Part: "+E),E.isSelected=!0}else for(a=a.iterator;a.next();)y=a.value,y instanceof Fi||$t("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},ke.prototype.clearHighlighteds=function(){var a=this.highlighteds;if(0<a.count){for(var y=a.Fa(),x=y.length,E=0;E<x;E++)y[E].isHighlighted=!1;a.ka(),a.clear(),a.freeze()}},Ct=ke.prototype,Ct.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},Ct.Jz=function(a){a=new cn().addAll(a);for(var y=this.highlighteds.copy().hp(a).iterator;y.next();)y.value.isHighlighted=!1;for(a=a.iterator;a.next();)y=a.value,y instanceof Fi||$t("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},Ct.scroll=function(a,y,x){x===void 0&&(x=1);var E=y==="up"||y==="down",b=0,z=Tt.alloc();if(a==="pixel")b=x;else if(a==="line")b=x*(E?this.scrollVerticalLineChange:this.scrollHorizontalLineChange);else if(a==="page")a=E?this.viewportBounds.height:this.viewportBounds.width,a*=this.scale,a!==0&&(b=x*Math.max(a-(E?this.scrollVerticalLineChange:this.scrollHorizontalLineChange),0));else{if(a==="document"){b=this.documentBounds,x=this.viewportBounds,y==="up"?this.position=z.h(x.x,b.y):y==="left"?this.position=z.h(b.x,x.y):y==="down"?this.position=z.h(x.x,b.bottom-x.height):y==="right"&&(this.position=z.h(b.right-x.width,x.y)),Tt.free(z);return}$t("scrolling unit must be 'pixel', 'line', 'page', or 'document', not: "+a)}b/=this.scale,x=this.position,y==="up"?this.position=z.h(x.x,x.y-b):y==="down"?this.position=z.h(x.x,x.y+b):y==="left"?this.position=z.h(x.x-b,x.y):y==="right"?this.position=z.h(x.x+b,x.y):$t("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),Tt.free(z)},Ct.tv=function(a){var y=this.viewportBounds;y.Re(a)||(a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a)},Ct.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},Ct.op=function(a){var y=this.Ab;y.reset(),this.Ca!==1&&y.scale(this.Ca);var x=this.pa;return(x.x!==0||x.y!==0)&&isFinite(x.x)&&isFinite(x.y)&&y.translate(-x.x,-x.y),a.copy().transform(this.Ab)},Ct.zA=function(a){var y=this.Ab,x=a.x,E=a.y,b=x+a.width,z=E+a.height,tt=y.m11,rt=y.m12,ot=y.m21,st=y.m22,ut=y.dx,ft=y.dy,vt=x*tt+E*ot+ut;y=x*rt+E*st+ft;var yt=b*tt+E*ot+ut;return a=b*rt+E*st+ft,E=x*tt+z*ot+ut,x=x*rt+z*st+ft,tt=b*tt+z*ot+ut,b=b*rt+z*st+ft,z=Math.min(vt,yt),vt=Math.max(vt,yt),yt=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,E),vt=Math.max(vt,E),yt=Math.min(yt,x),y=Math.max(y,x),z=Math.min(z,tt),vt=Math.max(vt,tt),yt=Math.min(yt,b),y=Math.max(y,b),new ae(z,yt,vt-z,y-yt)},Ct.Ps=function(a){var y=this.Ab;y.reset(),this.Ca!==1&&y.scale(this.Ca);var x=this.pa;return(x.x!==0||x.y!==0)&&isFinite(x.x)&&isFinite(x.y)&&y.translate(-x.x,-x.y),Jn(a.copy(),this.Ab)};function nm(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function Tg(a){return a=wf.get(a),a!==null?new a:new oo}ke.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,E=a.propertyName;if(x===La&&E[0]==="S")if(E==="StartingFirstTransaction"){var b=this;a=this.toolManager,a.mouseDownTools.each(function(ot){return ot.diagram=b}),a.mouseMoveTools.each(function(ot){return ot.diagram=b}),a.mouseUpTools.each(function(ot){return ot.diagram=b}),this.ld||this.hf||(this.Jk=!0,this.fn&&(this.kg=!0))}else E==="StartingUndo"||E==="StartingRedo"?(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc(),this.R("ChangingSelection",this.selection)):E==="StartedTransaction"&&(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc());else if(this.aa){this.aa=!1;try{if(a.modelChange===""&&x===La){(E==="FinishedUndo"||E==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),rs(this));var z=this.animationManager;E==="RolledBackTransaction"&&z.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||sf(z),E==="CommittedTransaction"&&this.undoManager.isJustDiscarded&&(this.Ce=Math.min(this.Ce,this.undoManager.historyIndex-1)),E!=="CommittedTransaction"&&E!=="RolledBackTransaction"||!this.undoManager.isPendingUnmodified||setTimeout(function(){y.isModified=!1},1);var tt=a.isTransactionFinished;if(tt&&(nm(this),this.As.clear(),Zp(this.animationManager)),!this.Rt&&tt&&this.lastInput.targetDiagram){this.Rt=!0;var rt=this;je(function(){rt.currentTool.standardMouseOver(),rt.Rt=!1},10)}}}finally{this.aa=!0}}}};function Hd(a,y){y=y.O.s;for(var x=y.length,E=0;E<x;E++)rd(a,y[E])}function rd(a,y){if(y instanceof Rs){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof cn&&x.Bg.add(a);var E=y.Eg;if(E!==null&&E.sq===!0&&y.diagram!==null&&y.diagram.Xn.add(y),x.hn)if(x=x.getAttribute("src")||"",E=a.Og.I(x),E===null)E=[],E.push(y),a.Og.add(x,E);else{for(a=0;a<E.length;a++)if(E[a]===y)return;E.push(y)}}}}function Dg(a,y){if(y instanceof Rs){var x=y.element;if(x!==null&&x instanceof HTMLImageElement&&x.hn){var E=x.getAttribute("src")||"",b=a.Og.I(E);if(b!==null){for(var z=0;z<b.length;z++)if(b[z]===y){b.splice(z,1),b.length===0&&(a.Og.remove(E),x.Fq&&x.removeEventListener("load",x.Fq),x.Yp&&x.removeEventListener("error",x.Yp),delete x.Fq,delete x.Yp,x.Bg instanceof cn&&x.Bg.remove(a),Of(E));break}}}}}ke.prototype.Wd=function(){this.partManager.Wd()},ke.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},ke.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},ke.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},ke.prototype.Vb=function(a){return this.partManager.Vb(a)},ke.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},Ct=ke.prototype,Ct.Lc=function(a){return this.partManager.Lc(a)},Ct.ii=function(a){return this.partManager.ii(a)},Ct.Kc=function(a){return this.partManager.Kc(a)},Ct.ms=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];return this.partManager.ms.apply(this.partManager,y instanceof Array?y:Pr(bn(y)))},Ct.ls=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];return this.partManager.ls.apply(this.partManager,y instanceof Array?y:Pr(bn(y)))};function wu(a){var y=a.pa,x=a.Ca;a.Rw.h(y.x,y.y,Math.max(a.Aa,0)/x,Math.max(a.ya,0)/x),a.vd=!0}function Bg(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),Bl(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}Ct.Va=function(){if(this.Zi){var a=ae.alloc();Bg(this,this.computeBounds(a)),ae.free(a)}},Ct.rz=function(){for(var a=new cn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&a.add(x)}for(y=this.links;y.next();)x=y.value,x.isTopLevel&&a.add(x);return a.iterator},Ct.qz=function(){return this.ai.iterator},Ct.Uz=function(a){rs(this),a&&vf(this,!0),this.ld?Og(this,!1):(this.Jk=!0,Sl(this))};function vf(a,y){for(var x=a.ai.iterator;x.next();)im(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function im(a,y,x){if(y!==null){for(var E=y.gl.iterator;E.next();)im(a,E.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function Og(a,y){if(a.xh&&!a.lt){var x=a.aa;a.aa=!0;var E=a.undoManager.transactionLevel,b=a.layout,z=a.animationManager;try{E===0&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout")),1>=E&&!z.defaultAnimation.isAnimating&&!z.zb&&(y||Nu(z,"Layout")),a.xh=!1;for(var tt=a.ai.iterator;tt.next();)Ig(a,tt.value,y,E);b.isValidLayout||(!y||b.isRealtime||b.isRealtime===null||E===0?(b.doLayout(a),rs(a),b.isValidLayout=!0):a.xh=!0)}finally{y=a.undoManager.isInternalTransaction,E===0&&(a.eb("Layout"),a.undoManager.isInternalTransaction=!1),!y||E!==0&&E!==1||sf(z),a.aa=x}}}function Ig(a,y,x,E){if(y!==null){for(var b=y.gl.iterator;b.next();)Ig(a,b.value,x,E);b=y.layout,b===null||b.isValidLayout||(!x||b.isRealtime||E===0?(y.rh=!y.location.w(),b.doLayout(y),y.C(32),kc(a,y),b.isValidLayout=!0):a.xh=!0)}}Ct.yz=function(){for(var a=new dn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function ev(a){function y(b){var z=b.toLowerCase(),tt=new dn;x.add(b,tt),x.add(z,tt),E.add(b,b),E.add(z,b)}var x=new be,E=new be;y("InitialAnimationStarting"),y("AnimationStarting"),y("AnimationFinished"),y("BackgroundSingleClicked"),y("BackgroundDoubleClicked"),y("BackgroundContextClicked"),y("ClipboardChanged"),y("ClipboardPasted"),y("DocumentBoundsChanged"),y("ExternalObjectsDropped"),y("GainedFocus"),y("InitialLayoutCompleted"),y("LayoutCompleted"),y("LinkDrawn"),y("LinkRelinked"),y("LinkReshaped"),y("LostFocus"),y("Modified"),y("ObjectSingleClicked"),y("ObjectDoubleClicked"),y("ObjectContextClicked"),y("PartCreated"),y("PartResized"),y("PartRotated"),y("SelectionMoved"),y("SelectionCopied"),y("SelectionDeleting"),y("SelectionDeleted"),y("SelectionGrouped"),y("SelectionUngrouped"),y("ChangingSelection"),y("ChangedSelection"),y("SubGraphCollapsed"),y("SubGraphExpanded"),y("TextEdited"),y("TreeCollapsed"),y("TreeExpanded"),y("ViewportBoundsChanged"),y("InvalidateDraw"),a.iw=x,a.hw=E}function rm(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function yf(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;$t("Unknown DiagramEvent name: "+y)}Ct.Bj=function(a,y){return a=yf(this,a),a!==null&&a.add(y),this},Ct.am=function(a,y){a=yf(this,a),a!==null&&a.remove(y)},Ct.R=function(a,y,x){var E=yf(this,a),b=new Fl;if(b.diagram=this,a=rm(this,a),a!==null&&(b.name=a),y!==void 0&&(b.subject=y),x!==void 0&&(b.parameter=x),y=E.length,y===1)E.M(0)(b);else if(y!==0)for(E=E.Fa(),x=0;x<y;x++)(0,E[x])(b)};function Sf(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}Ct.Yj=function(a,y){return xf(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},ke.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?Pg(this,a):a.assign(this.documentBounds)};function xf(a,y,x,E){var b=a.Xh;if(b===null&&(a.Xh=b=new dp(a.avoidanceCellSize)),b.vs||b.group!==x||b.Yx!==E){if(b.Hx=Math.max(b.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.width)),b.Ix=Math.max(b.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.height)),x!==null&&(x=om(a,x)),x===null){y=ae.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),b.initialize(y);for(var z=a.nodes;z.next();){var tt=z.value,rt=tt.layer;rt!==null&&rt.visible&&!rt.isTemporary&&Pf(a,tt,E,y)}ae.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),b.initialize(y)),y=ae.alloc(),z=x.memberParts;z.next();)tt=z.value,tt instanceof Hn&&Pf(a,tt,E,y);ae.free(y)}b.group=x,b.Yx=E,b.vs=!1}else y&&r1(b);return b}function om(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?om(a,y.containingGroup):null}function Pf(a,y,x,E){if(y!==x&&y.isVisible()){if(y.avoidable&&!y.isLinkLabel){y=y.getAvoidableRect(E),a=a.Xh;var b=y.x,z=y.y;if(Hf(a,b,z))for(x=(z-a.Od)/a.sc|0,E=Math.min((b+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((z+y.height-a.Od)/a.sc|0,a.ei),b=(b-a.Nd)/a.rc|0;b<=E;b++)if(z=a.ac[b],z.fill)z.fill(Dh,x,y+1);else for(var tt=x;tt<=y;tt++)z[tt]=Dh}else if(y instanceof ir)for(y=y.memberParts;y.next();)b=y.value,b instanceof Hn&&Pf(a,b,x,E)}}function wh(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}ke.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():Rg(this)};function Rg(a){a.vk===-1&&(a.vk=je(function(){if(a.vk!==-1&&(a.ug(),a.lastInput.event!==null)){var y=a.computeAutoScrollPosition(a.wp);y.Xa(a.position)||(a.position=y,a.lastInput.documentPoint=a.Ps(a.wp),a.doMouseMove(),a.Zi=!0,y=ae.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Bg(a,y),ae.free(y),a.Fc=!0,a.bd(),Rg(a))}},a.vp))}ke.prototype.ug=function(){this.vk!==-1&&(Dn.clearTimeout(this.vk),this.vk=-1)},ke.prototype.computeAutoScrollPosition=function(a){var y=this.position,x=this.xp;if(0>=x.top&&0>=x.left&&0>=x.right&&0>=x.bottom)return y;var E=this.viewportBounds,b=this.scale;E=ae.allocAt(0,0,E.width*b,E.height*b);var z=Tt.allocAt(0,0);if(a.x>=E.x&&a.x<E.x+x.left&&this.allowHorizontalScroll){var tt=Math.max(this.scrollHorizontalLineChange,1);tt|=0,z.x-=tt,a.x<E.x+x.left/2&&(z.x-=tt),a.x<E.x+x.left/4&&(z.x-=4*tt)}else a.x<=E.x+E.width&&a.x>E.x+E.width-x.right&&this.allowHorizontalScroll&&(tt=Math.max(this.scrollHorizontalLineChange,1),tt|=0,z.x+=tt,a.x>E.x+E.width-x.right/2&&(z.x+=tt),a.x>E.x+E.width-x.right/4&&(z.x+=4*tt));return a.y>=E.y&&a.y<E.y+x.top&&this.allowVerticalScroll?(tt=Math.max(this.scrollVerticalLineChange,1),tt|=0,z.y-=tt,a.y<E.y+x.top/2&&(z.y-=tt),a.y<E.y+x.top/4&&(z.y-=4*tt)):a.y<=E.y+E.height&&a.y>E.y+E.height-x.bottom&&this.allowVerticalScroll&&(tt=Math.max(this.scrollVerticalLineChange,1),tt|=0,z.y+=tt,a.y>E.y+E.height-x.bottom/2&&(z.y+=tt),a.y>E.y+E.height-x.bottom/4&&(z.y+=4*tt)),z.Xa(Wn)||(y=new Tt(y.x+z.x/b,y.y+z.y/b)),ae.free(E),Tt.free(z),y},Ct=ke.prototype,Ct.Cs=function(){return null},Ct.av=function(){return null},Ct.bs=function(a,y){this.pj.add(a,y)},Ct.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof ir&&(y.$p=null)})};function Mc(a,y,x){function E(){var ut=+new Date;for(z=!0,tt.reset();tt.next();)if(!tt.value[0].al){z=!1;break}z||ut-st>ot?y(x,b,rt):Dn.requestAnimationFrame(E)}for(var b=x.callback,z=!0,tt=a.Og.iterator;tt.next();)if(!tt.value[0].al){z=!1;break}if(typeof b!="function"||z)return y(x,b,a);var rt=a,ot=x.callbackTimeout||300,st=+new Date;return Dn.requestAnimationFrame(function(){E()}),null}Ct.Wz=function(a){return la?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Ct.Jx=function(a){return a===void 0&&(a={}),Mc(this,this.Xz,a)},Ct.Xz=function(a,y,x){var E=am(x,a,"canvas",null);if(E===null)return null;x=E.Z.canvas;var b=null;if(x!==null)switch(b=a.returnType,b===void 0?b="string":b=b.toLowerCase(),b){case Vd+"data":b=E.getImageData(0,0,x.width,x.height);break;case Vd:E=(a.document||document).createElement("img"),E.src=x.toDataURL(a.type,a.details),b=E;break;case"blob":return typeof y!="function"&&$t('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.'),typeof x.toBlob=="function"?(x.toBlob(y,a.type,a.details),"toBlob"):(y(null),null);default:b=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(b),null):b};function am(a,y,x,E){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&$t("properties argument must be an Object.");var b=y.size||null,z=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(z="NaN");var tt=y.maxSize;y.maxSize===void 0&&(tt=x==="SVG"?new Ut(1/0,1/0):new Ut(2e3,2e3));var rt=y.position||null,ot=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,yt=y.elementFinished||null,Pt=y.showTemporary;Pt===void 0&&(Pt=!ft),y=y.showGrid,y===void 0&&(y=Pt),b!==null&&isNaN(b.width)&&isNaN(b.height)&&(b=null),typeof st=="number"?st=new ii(st):st instanceof ii||$t("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 Il(null,vt,void 0,!0);var Et=ft.context;if(!(b||z||ot||rt))return ft.width=a.Aa+Math.ceil(st.left+st.right),ft.height=a.ya+Math.ceil(st.top+st.bottom),x==="SVG"?E===null?null:(E.resize(ft.width,ft.height,ft.width,ft.height),E.ownerDocument=vt,E.hs=yt,ff(a,E.context,st,new Ut(ft.width,ft.height),a.Ca,a.pa,ot,ut,Pt,y),E.context):(a.Xm=!1,ff(a,Et,st,new Ut(ft.width,ft.height),a.Ca,a.pa,ot,ut,Pt,y),a.Xm=!0,ft.context);var Vt=a.Pp,Rt=a.documentBounds.copy();if(Rt.Fv(a.yb),Pt)for(var Qt=a.Wa.s,_t=Qt.length,te=0;te<_t;te++){var ue=Qt[te];if(ue.visible&&ue.isTemporary){ue=ue.Pa.s;for(var Ce=ue.length,On=0;On<Ce;On++){var li=ue[On];li.isInDocumentBounds&&li.isVisible()&&(li=li.actualBounds,li.w()&&Rt.ed(li))}}}if(Qt=new Tt(Rt.x,Rt.y),ot!==null){for(_t=new ae(0,0,0,0),te=!0,ue=ot.iterator,ue.reset();ue.next();)Ce=ue.value,Ce instanceof Fi&&(On=Ce.layer,On!==null&&!On.visible||On!==null&&!Pt&&On.isTemporary||!Ce.isVisible()||(Ce=Ce.actualBounds,Ce.w()&&(te?(te=!1,_t.assign(Ce)):_t.ed(Ce))));Rt.width=_t.width,Rt.height=_t.height,Qt.x=_t.x,Qt.y=_t.y}return rt!==null&&rt.w()&&(Qt=rt,z||(z=Vt)),_t=rt=0,st!==null&&(rt=st.left+st.right,_t=st.top+st.bottom),te=ue=0,b!==null&&(ue=b.width,te=b.height,isFinite(ue)&&(ue=Math.max(0,ue-rt)),isFinite(te)&&(te=Math.max(0,te-_t))),b!==null&&z!==null?(z==="NaN"&&(z=Vt),b.w()?(b=ue,Rt=te):isNaN(te)?(b=ue,Rt=Rt.height*z):(b=Rt.width*z,Rt=te)):b!==null?b.w()?(z=Math.min(ue/Rt.width,te/Rt.height),b=ue,Rt=te):isNaN(te)?(z=ue/Rt.width,b=ue,Rt=Rt.height*z):(z=te/Rt.height,b=Rt.width*z,Rt=te):z!==null?z==="NaN"&&tt.w()?(z=Math.min((tt.width-rt)/Rt.width,(tt.height-_t)/Rt.height),z>Vt?(z=Vt,b=Rt.width,Rt=Rt.height):(b=tt.width,Rt=tt.height)):(b=Rt.width*z,Rt=Rt.height*z):(z=Vt,b=Rt.width,Rt=Rt.height),st!==null?(b+=rt,Rt+=_t):st=new ii(0),tt!==null&&(Vt=tt.width,tt=tt.height,isNaN(Vt)&&(Vt=2e3),isNaN(tt)&&(tt=2e3),isFinite(Vt)&&(b=Math.min(b,Vt)),isFinite(tt)&&(Rt=Math.min(Rt,tt))),ft.width=Math.ceil(b),ft.height=Math.ceil(Rt),x==="SVG"?E===null?null:(E.resize(ft.width,ft.height,ft.width,ft.height),E.ownerDocument=vt,E.hs=yt,ff(a,E.context,st,new Ut(Math.ceil(b),Math.ceil(Rt)),z,Qt,ot,ut,Pt,y),E.context):(a.Xm=!1,ff(a,Et,st,new Ut(Math.ceil(b),Math.ceil(Rt)),z,Qt,ot,ut,Pt,y),a.Xm=!0,ft.context)}Me.Object.defineProperties(ke.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 Cu(this,Dn.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 Cu(this,Dn.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(Dn,"resize",this.Ov,!1),this.removeEventListener(Dn,"wheel",this.$j,!0),Tu===this&&(Tu=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Sg(this,a),this.hk())}}},$w:{get:function(){return this.Sq}},pi:{get:function(){return this.hf}},draggedLink:{get:function(){return this.nt},set:function(a){this.nt!==a&&(this.nt=a,a!==null&&(this.Vt=a.fromPort,this.Wt=a.toPort))}},Mx:{get:function(){return this.Vt},set:function(a){this.Vt=a}},Nx:{get:function(){return this.Wt},set:function(a){this.Wt=a}},animationManager:{get:function(){return this.Yd}},undoManager:{get:function(){return this.cc.undoManager}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a,this.cc.skipsUndoManager=a}},delaysLayout:{get:function(){return this.lt},set:function(a){this.lt=a}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&ei(a,"0 <= value <= 1",ke,"opacity"),this.pb=a,this.g("opacity",y,a),this.N())}},validCycle:{get:function(){return this.wu},set:function(a){var y=this.wu;y!==a&&(this.wu=a,this.g("validCycle",y,a))}},layers:{get:function(){return this.Wa.iterator}},isModelReadOnly:{get:function(){var a=this.cc;return a===null?!1:a.isReadOnly},set:function(a){var y=this.cc;y!==null&&(y.isReadOnly=a)}},isReadOnly:{get:function(){return this.Gg},set:function(a){var y=this.Gg;y!==a&&(this.Gg=a,this.g("isReadOnly",y,a))}},isEnabled:{get:function(){return this.Jd},set:function(a){var y=this.Jd;y!==a&&(this.Jd=a,this.g("isEnabled",y,a))}},allowClipboard:{get:function(){return this.Us},set:function(a){var y=this.Us;y!==a&&(this.Us=a,this.g("allowClipboard",y,a))}},allowCopy:{get:function(){return this.Fi},set:function(a){var y=this.Fi;y!==a&&(this.Fi=a,this.g("allowCopy",y,a))}},allowDelete:{get:function(){return this.Gi},set:function(a){var y=this.Gi;y!==a&&(this.Gi=a,this.g("allowDelete",y,a))}},allowDragOut:{get:function(){return this.Vs},set:function(a){var y=this.Vs;y!==a&&(this.Vs=a,this.g("allowDragOut",y,a))}},allowDrop:{get:function(){return this.Ws},set:function(a){var y=this.Ws;y!==a&&(this.Ws=a,this.g("allowDrop",y,a))}},allowTextEdit:{get:function(){return this.Pi},set:function(a){var y=this.Pi;y!==a&&(this.Pi=a,this.g("allowTextEdit",y,a))}},allowGroup:{get:function(){return this.Hi},set:function(a){var y=this.Hi;y!==a&&(this.Hi=a,this.g("allowGroup",y,a))}},allowUngroup:{get:function(){return this.Qi},set:function(a){var y=this.Qi;y!==a&&(this.Qi=a,this.g("allowUngroup",y,a))}},allowInsert:{get:function(){return this.Ys},set:function(a){var y=this.Ys;y!==a&&(this.Ys=a,this.g("allowInsert",y,a))}},allowLink:{get:function(){return this.Ii},set:function(a){var y=this.Ii;y!==a&&(this.Ii=a,this.g("allowLink",y,a))}},allowRelink:{get:function(){return this.Ki},set:function(a){var y=this.Ki;y!==a&&(this.Ki=a,this.g("allowRelink",y,a))}},allowMove:{get:function(){return this.Ji},set:function(a){var y=this.Ji;y!==a&&(this.Ji=a,this.g("allowMove",y,a))}},allowReshape:{get:function(){return this.Li},set:function(a){var y=this.Li;y!==a&&(this.Li=a,this.g("allowReshape",y,a))}},allowResize:{get:function(){return this.Mi},set:function(a){var y=this.Mi;y!==a&&(this.Mi=a,this.g("allowResize",y,a))}},allowRotate:{get:function(){return this.Ni},set:function(a){var y=this.Ni;y!==a&&(this.Ni=a,this.g("allowRotate",y,a))}},allowSelect:{get:function(){return this.Oi},set:function(a){var y=this.Oi;y!==a&&(this.Oi=a,this.g("allowSelect",y,a))}},allowUndo:{get:function(){return this.Zs},set:function(a){var y=this.Zs;y!==a&&(this.Zs=a,this.g("allowUndo",y,a))}},allowZoom:{get:function(){return this.at},set:function(a){var y=this.at;y!==a&&(this.at=a,this.g("allowZoom",y,a))}},hasVerticalScrollbar:{get:function(){return this.nn},set:function(a){var y=this.nn;y!==a&&(this.nn=a,this.Ee=!0,this.N(),this.g("hasVerticalScrollbar",y,a),Bl(this,!1))}},hasHorizontalScrollbar:{get:function(){return this.mn},set:function(a){var y=this.mn;y!==a&&(this.mn=a,this.Ee=!0,this.N(),this.g("hasHorizontalScrollbar",y,a),Bl(this,!1))}},allowHorizontalScroll:{get:function(){return this.Xs},set:function(a){var y=this.Xs;y!==a&&(this.Xs=a,this.g("allowHorizontalScroll",y,a),Bl(this,!1))}},allowVerticalScroll:{get:function(){return this.$s},set:function(a){var y=this.$s;y!==a&&(this.$s=a,this.g("allowVerticalScroll",y,a),Bl(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&ei(a,">= 0",ke,"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&&ei(a,">= 0",ke,"scrollVerticalLineChange"),this.mu=a,this.g("scrollVerticalLineChange",y,a))}},lastInput:{get:function(){return this.cj},set:function(a){this.cj=a}},previousInput:{get:function(){return this.Qg},set:function(a){this.Qg=a}},firstInput:{get:function(){return this.bq},set:function(a){this.bq=a}},currentCursor:{get:function(){return this.it},set:function(a){if(a===""&&(a=this.Op),this.it!==a){var y=this.ta,x=this.Ka;if(y!==null&&x!==null){this.it=a;var E=y.style.cursor;y.style.cursor=a,x.style.cursor=a,y.style.cursor===E&&(y.style.cursor="-webkit-"+a,x.style.cursor="-webkit-"+a,y.style.cursor===E&&(y.style.cursor="-moz-"+a,x.style.cursor="-moz-"+a,y.style.cursor===E&&(y.style.cursor=a,x.style.cursor=a)))}}}},defaultCursor:{get:function(){return this.Op},set:function(a){a===""&&(a="auto");var y=this.Op;y!==a&&(this.Op=a,this.g("defaultCursor",y,a))}},click:{get:function(){return this.zh},set:function(a){var y=this.zh;y!==a&&(this.zh=a,this.g("click",y,a))}},doubleClick:{get:function(){return this.Fh},set:function(a){var y=this.Fh;y!==a&&(this.Fh=a,this.g("doubleClick",y,a))}},contextClick:{get:function(){return this.Bh},set:function(a){var y=this.Bh;y!==a&&(this.Bh=a,this.g("contextClick",y,a))}},mouseOver:{get:function(){return this.Qh},set:function(a){var y=this.Qh;y!==a&&(this.Qh=a,this.g("mouseOver",y,a))}},mouseHover:{get:function(){return this.Oh},set:function(a){var y=this.Oh;y!==a&&(this.Oh=a,this.g("mouseHover",y,a))}},mouseHold:{get:function(){return this.Nh},set:function(a){var y=this.Nh;y!==a&&(this.Nh=a,this.g("mouseHold",y,a))}},mouseDragOver:{get:function(){return this.Qt},set:function(a){var y=this.Qt;y!==a&&(this.Qt=a,this.g("mouseDragOver",y,a))}},mouseDrop:{get:function(){return this.Lh},set:function(a){var y=this.Lh;y!==a&&(this.Lh=a,this.g("mouseDrop",y,a))}},handlesDragDropForTopLevelParts:{get:function(){return this.xt},set:function(a){var y=this.xt;y!==a&&(this.xt=a,this.g("handlesDragDropForTopLevelParts",y,a))}},mouseEnter:{get:function(){return this.Mh},set:function(a){var y=this.Mh;y!==a&&(this.Mh=a,this.g("mouseEnter",y,a))}},mouseLeave:{get:function(){return this.Ph},set:function(a){var y=this.Ph;y!==a&&(this.Ph=a,this.g("mouseLeave",y,a))}},toolTip:{get:function(){return this.$h},set:function(a){var y=this.$h;y!==a&&(this.$h=a,this.g("toolTip",y,a))}},contextMenu:{get:function(){return this.Ch},set:function(a){var y=this.Ch;y!==a&&(this.Ch=a,this.g("contextMenu",y,a))}},commandHandler:{get:function(){return this.nb},set:function(a){this.nb!==a&&(this.nb=a,a.Xe(this))}},toolManager:{get:function(){return this.te},set:function(a){this.te!==a&&(this.te=a,a.diagram=this)}},defaultTool:{get:function(){return this.ob},set:function(a){var y=this.ob;y!==a&&(this.ob=a,a.diagram=this,this.currentTool===y&&(this.currentTool=a))}},currentTool:{get:function(){return this.hb},set:function(a){var y=this.hb;y&&(y.isActive&&y.doDeactivate(),y.cancelWaitAfter(),y.doStop()),a===null&&(a=this.defaultTool),a!==null&&(this.hb=a,a.diagram=this,a.doStart())}},selection:{get:function(){return this.Hw}},maxSelectionCount:{get:function(){return this.Nt},set:function(a){var y=this.Nt;if(y!==a)if(0<=a&&!isNaN(a)){if(this.Nt=a,this.g("maxSelectionCount",y,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0<a)){this.R("ChangingSelection",this.selection),y=this.selection.Fa();for(var x=0;x<a;x++)y[x].isSelected=!1;this.R("ChangedSelection",this.selection)}}else ei(a,">= 0",ke,"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||nm(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&&$t("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=yg(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var E=this.vb;this.vb=!0,Nu(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=Tg(this.cc.type);for(var b=0;b<x.length;b++)this.add(x[b]);a.Pe(this.Hb),this.partManager.addAllModeledParts(),a.ik(this.Hb),a.Pe(this.Oc),this.pf!==null&&this.pf.each(function(z){return a.Pe(z)}),this.vb=E,this.Ya(),this.vb||this.N(),y&&a.undoManager.copyProperties(y.undoManager)}}},aa:{get:function(){return this.rw},set:function(a){this.rw=a}},As:{get:function(){return this.sy}},skipsModelSourceBindings:{get:function(){return this.Iw},set:function(a){this.Iw=a}},Ns:{get:function(){return this.ou},set:function(a){this.ou=a}},nodeTemplate:{get:function(){return this.Lg.I("")},set:function(a){var y=this.Lg.I("");y!==a&&(this.Lg.add("",a),this.g("nodeTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},nodeTemplateMap:{get:function(){return this.Lg},set:function(a){var y=this.Lg;y!==a&&(this.Lg=a,this.g("nodeTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplate:{get:function(){return this.Yi.I("")},set:function(a){var y=this.Yi.I("");y!==a&&(this.Yi.add("",a),this.g("groupTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplateMap:{get:function(){return this.Yi},set:function(a){var y=this.Yi;y!==a&&(this.Yi=a,this.g("groupTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplate:{get:function(){return this.Kh.I("")},set:function(a){var y=this.Kh.I("");y!==a&&(this.Kh.add("",a),this.g("linkTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplateMap:{get:function(){return this.Kh},set:function(a){var y=this.Kh;y!==a&&(this.Kh=a,this.g("linkTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},isMouseCaptured:{get:function(){return this.qw},set:function(a){var y=this.ta;y!==null&&(y=y.Oa,y instanceof SVGElement||(a?(this.lastInput.bubbles=!1,this.removeEventListener(y,"pointermove",this.dk,!1),this.removeEventListener(y,"pointerdown",this.ui,!1),this.removeEventListener(y,"pointerup",this.fk,!1),this.removeEventListener(y,"pointerout",this.ek,!1),this.removeEventListener(y,"pointercancel",this.ck,!1),this.addEventListener(Dn,"pointermove",this.dk,!0),this.addEventListener(Dn,"pointerdown",this.ui,!0),this.addEventListener(Dn,"pointerup",this.fk,!0),this.addEventListener(Dn,"pointerout",this.ek,!0),this.addEventListener(Dn,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(Dn,"wheel",this.$j,!0),this.addEventListener(Dn,"selectstart",this.preventDefault,!1)):(this.removeEventListener(Dn,"pointermove",this.dk,!0),this.removeEventListener(Dn,"pointerdown",this.ui,!0),this.removeEventListener(Dn,"pointerup",this.fk,!0),this.removeEventListener(Dn,"pointerout",this.ek,!0),this.removeEventListener(Dn,"pointercancel",this.ck,!0),this.addEventListener(y,"pointermove",this.dk,!1),this.addEventListener(y,"pointerdown",this.ui,!1),this.addEventListener(y,"pointerup",this.fk,!1),this.addEventListener(y,"pointerout",this.ek,!1),this.addEventListener(y,"pointercancel",this.ck,!1),this.removeEventListener(Dn,"wheel",this.$j,!0),this.removeEventListener(Dn,"selectstart",this.preventDefault,!1),this.addEventListener(y,"wheel",this.$j,!1)),this.qw=a))}},position:{get:function(){return this.pa},set:function(a){var y=Tt.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),Vp(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?wu(this):(this.vb=!0,a=this.scale,wg(this,this.Sp,this.Aa/a,this.ya/a,this.zk,!1),this.vb=!1),this.vb||this.onViewportBoundsChanged(x,this.viewportBounds,this.Ca,!1)}Tt.free(y)}},initialPosition:{get:function(){return this.zt},set:function(a){this.zt.D(a)||(this.zt=a.J())}},initialScale:{get:function(){return this.At},set:function(a){this.At!==a&&(this.At=a)}},grid:{get:function(){return this.fe===null&&(this.fe=qp(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=qp(this)),a.type!==mn.Grid&&$t("Diagram.grid must be a Panel of type Panel.Grid");var x=y.panel;x!==null&&x.remove(y),this.fe=a,a.name="GRID",x!==null&&x.add(a),Pu(this),this.N(),this.g("grid",y,a)}}},viewportBounds:{get:function(){return this.Rw}},viewSize:{get:function(){return this.wo},set:function(a){var y=this.viewSize;y.D(a)||(this.wo=a=a.J(),this.ya=this.Aa=0,a.w()?(this.Aa=a.width,this.ya=a.height):this.Ka!==null&&(this.Aa=this.Ka.clientWidth||1,this.ya=this.Ka.clientHeight||1),wu(this),this.Ya(),this.g("viewSize",y,a),this.redraw())}},fixedBounds:{get:function(){return this.ut},set:function(a){var y=this.ut;y.D(a)||(a.width!==-1/0&&a.height!==1/0&&a.height!==-1/0||$t("fixedBounds width/height must not be Infinity"),this.ut=a=a.J(),this.Ya(),this.g("fixedBounds",y,a))}},scrollMargin:{get:function(){return this.rj},set:function(a){typeof a=="number"&&(a=new ii(a));var y=this.rj;y.D(a)||(this.rj=a=a.J(),this.g("scrollMargin",y,a),this.hk())}},scrollMode:{get:function(){return this.sj},set:function(a){var y=this.sj;y!==a&&(this.sj=a,a===Ch&&Bl(this,!1),this.g("scrollMode",y,a),this.Ee=!0,this.N())}},scrollsPageOnFocus:{get:function(){return this.nu},set:function(a){var y=this.nu;y!==a&&(this.nu=a,this.g("scrollsPageOnFocus",y,a))}},positionComputation:{get:function(){return this.Zt},set:function(a){var y=this.Zt;y!==a&&(this.Zt=a,Bl(this,!1),this.g("positionComputation",y,a))}},scaleComputation:{get:function(){return this.fu},set:function(a){var y=this.fu;y!==a&&(this.fu=a,Ng(this,this.scale,this.scale),this.g("scaleComputation",y,a))}},documentBounds:{get:function(){return this.Sp}},isVirtualized:{get:function(){return this.It},set:function(a){var y=this.It;y!==a&&(this.It=a,this.g("isVirtualized",y,a))}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&Ng(this,y,a)}},defaultScale:{get:function(){return this.Pp},set:function(a){this.Pp=a}},autoScale:{get:function(){return this.yh},set:function(a){var y=this.yh;y!==a&&(this.yh=a,this.g("autoScale",y,a),a!==ps&&Bl(this,!1))}},initialAutoScale:{get:function(){return this.Fg},set:function(a){var y=this.Fg;y!==a&&(this.Fg=a,this.g("initialAutoScale",y,a))}},initialViewportSpot:{get:function(){return this.Bt},set:function(a){var y=this.Bt;y!==a&&(a.sb()||$t("initialViewportSpot must be a specific Spot: "+a),this.Bt=a,this.g("initialViewportSpot",y,a))}},initialDocumentSpot:{get:function(){return this.yt},set:function(a){var y=this.yt;y!==a&&(a.sb()||$t("initialViewportSpot must be a specific Spot: "+a),this.yt=a,this.g("initialDocumentSpot",y,a))}},minScale:{get:function(){return this.Ot},set:function(a){var y=this.Ot;y!==a&&(0<a?(this.Ot=a,this.g("minScale",y,a),a>this.scale&&(this.scale=a)):ei(a,"> 0",ke,"minScale"))}},maxScale:{get:function(){return this.Mt},set:function(a){var y=this.Mt;y!==a&&(0<a?(this.Mt=a,this.g("maxScale",y,a),a<this.scale&&(this.scale=a)):ei(a,"> 0",ke,"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),Bl(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 ii(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&&$t("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!==Lh&&a!==ka&&a!==Cf&&$t("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 Ut(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 ii(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Me.Object.defineProperties(ke,{licenseKey:{get:function(){return Zg.jc()},set:function(a){Zg.add(a.replace(/\s/g,""))}},version:{get:function(){return Zd}}}),ke.prototype.makeImageData=ke.prototype.Jx,ke.prototype.makeImage=ke.prototype.Wz,ke.prototype.cacheGroupExternalLinks=ke.prototype.Fu,ke.prototype.addRenderer=ke.prototype.bs,ke.prototype.makeSVG=ke.prototype.av,ke.prototype.makeSvg=ke.prototype.Cs,ke.prototype.stopAutoScroll=ke.prototype.ug,ke.prototype.doAutoScroll=ke.prototype.gs,ke.prototype.isUnoccupied=ke.prototype.Yj,ke.prototype.raiseDiagramEvent=ke.prototype.R,ke.prototype.removeDiagramListener=ke.prototype.am,ke.prototype.addDiagramListener=ke.prototype.Bj,ke.prototype.findTreeRoots=ke.prototype.yz,ke.prototype.layoutDiagram=ke.prototype.Uz,ke.prototype.findTopLevelGroups=ke.prototype.qz,ke.prototype.findTopLevelNodesAndLinks=ke.prototype.rz,ke.prototype.ensureBounds=ke.prototype.Va,ke.prototype.findLinksByExample=ke.prototype.ls,ke.prototype.findNodesByExample=ke.prototype.ms,ke.prototype.findLinkForData=ke.prototype.Kc,ke.prototype.findNodeForData=ke.prototype.ii,ke.prototype.findPartForData=ke.prototype.Lc,ke.prototype.findLinkForKey=ke.prototype.findLinkForKey,ke.prototype.findNodeForKey=ke.prototype.Vb,ke.prototype.findPartForKey=ke.prototype.findPartForKey,ke.prototype.rebuildParts=ke.prototype.Wd,ke.prototype.transformViewToDoc=ke.prototype.Ps,ke.prototype.transformRectDocToView=ke.prototype.zA,ke.prototype.transformDocToView=ke.prototype.op,ke.prototype.centerRect=ke.prototype.es,ke.prototype.scrollToRect=ke.prototype.tv,ke.prototype.scroll=ke.prototype.scroll,ke.prototype.highlightCollection=ke.prototype.Jz,ke.prototype.highlight=ke.prototype.Iz,ke.prototype.selectCollection=ke.prototype.rA,ke.prototype.select=ke.prototype.select,ke.prototype.updateAllRelationshipsFromData=ke.prototype.rp,ke.prototype.updateAllTargetBindings=ke.prototype.updateAllTargetBindings,ke.prototype.commit=ke.prototype.commit,ke.prototype.rollbackTransaction=ke.prototype.Kf,ke.prototype.commitTransaction=ke.prototype.eb,ke.prototype.startTransaction=ke.prototype.Ea,ke.prototype.raiseChanged=ke.prototype.g,ke.prototype.raiseChangedEvent=ke.prototype.cb,ke.prototype.removeChangedListener=ke.prototype.ik,ke.prototype.addChangedListener=ke.prototype.Pe,ke.prototype.removeModelChangedListener=ke.prototype.mA,ke.prototype.addModelChangedListener=ke.prototype.Yw,ke.prototype.findLayer=ke.prototype.Qj,ke.prototype.removeLayer=ke.prototype.kA,ke.prototype.addLayerAfter=ke.prototype.Cy,ke.prototype.addLayerBefore=ke.prototype.Ww,ke.prototype.addLayer=ke.prototype.Al,ke.prototype.moveParts=ke.prototype.moveParts,ke.prototype.copyParts=ke.prototype.Kj,ke.prototype.removeParts=ke.prototype.Is,ke.prototype.remove=ke.prototype.remove,ke.prototype.add=ke.prototype.add,ke.prototype.clearDelayedGeometries=ke.prototype.bx,ke.prototype.setProperties=ke.prototype.nm,ke.prototype.attach=ke.prototype.Du,ke.prototype.set=ke.prototype.set,ke.prototype.resetInputOptions=ke.prototype.Sx,ke.prototype.setInputOption=ke.prototype.sA,ke.prototype.getInputOption=ke.prototype.Ql,ke.prototype.resetRenderingHints=ke.prototype.Tx,ke.prototype.setRenderingHint=ke.prototype.Xx,ke.prototype.getRenderingHint=ke.prototype.Gf,ke.prototype.maybeUpdate=ke.prototype.bd,ke.prototype.requestUpdate=ke.prototype.$b,ke.prototype.delayInitialization=ke.prototype.Xy,ke.prototype.isUpdateRequested=ke.prototype.Pz,ke.prototype.invalidateDocumentBounds=ke.prototype.Ya,ke.prototype.findObjectsNear=ke.prototype.og,ke.prototype.findPartsNear=ke.prototype.mz,ke.prototype.findObjectsIn=ke.prototype.Cf,ke.prototype.findPartsIn=ke.prototype.ux,ke.prototype.findObjectsAt=ke.prototype.ji,ke.prototype.findPartsAt=ke.prototype.lz,ke.prototype.findObjectAt=ke.prototype.ic,ke.prototype.findPartAt=ke.prototype.Ol,ke.prototype.focusObject=ke.prototype.zz,ke.prototype.alignDocument=ke.prototype.Jy,ke.prototype.zoomToRect=ke.prototype.BA,ke.prototype.zoomToFit=ke.prototype.zoomToFit,ke.prototype.diagramScroll=ke.prototype.kx,ke.prototype.focus=ke.prototype.focus;var wf=new be,sm=null,la=Dn.document!==void 0,Gd=null,od="",ps=new Ve(ke,"None",0),al=new Ve(ke,"Uniform",1),ad=new Ve(ke,"UniformToFill",2),Ec=new Ve(ke,"CycleAll",10),zg=new Ve(ke,"CycleNotDirected",11),jg=new Ve(ke,"CycleNotDirectedFast",12),Wg=new Ve(ke,"CycleNotUndirected",13),Hg=new Ve(ke,"CycleDestinationTree",14),Gg=new Ve(ke,"CycleSourceTree",15),Ch=new Ve(ke,"DocumentScroll",1),Ac=new Ve(ke,"InfiniteScroll",2),Lh=new Ve(ke,"TreeParentCollapsed",21),ka=new Ve(ke,"AllParentsCollapsed",22),Cf=new Ve(ke,"AnyParentsCollapsed",23),Zg=new dn,Zd="2.3.10",Vd="image",Fc=null,lm=!1;function ds(){if(la){var a=Dn.document.createElement("canvas"),y=a.getContext("2d"),x=an("7ca11abfd022028846");y[x]=an("398c3597c01238");for(var E=["5da73c80a36455d7038e4972187c3cae51fd22",pi.Dx+"4ae6247590da4bb21c324ba3a84e385776",Un.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",le.za],b=1;5>b;b++)y[an("7ca11abfd7330390")](an(E[b-1]),10,15*b);for(y[x]=an("39f046ebb36e4b"),x=1;5>x;x++)y[an("7ca11abfd7330390")](an(E[x-1]),10,15*x);(E.length!==4||E[0][0]!=="5"||E[3][0]!=="7")&&(Un.prototype.Cd=Un.prototype.Eu),Fc=a}}ke.className="Diagram",ke.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=Dn.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof ke?y.H:null},ke.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},ke.useDOM=function(a){la=a?Dn.document!==void 0:!1},ke.isUsingDOM=function(){return la},ke.None=ps,ke.Uniform=al,ke.UniformToFill=ad,ke.CycleAll=Ec,ke.CycleNotDirected=zg,ke.CycleNotDirectedFast=jg,ke.CycleNotUndirected=Wg,ke.CycleDestinationTree=Hg,ke.CycleSourceTree=Gg,ke.DocumentScroll=Ch,ke.InfiniteScroll=Ac,ke.TreeParentCollapsed=Lh,ke.AllParentsCollapsed=ka,ke.AnyParentsCollapsed=Cf;function um(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Kd(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=Dn[an("76a715b2f73f148a")][an("72ba13b5")]||"";if(a.Rc=!0,la){var E=ke[an("76a115b6ed251eaf4692")];if(E)for(var b=Zg.iterator;b.next()&&(E=b.value,E=an(E).split(an("39e9")),!(6>E.length));){var z=an(E[1]).split(".");if(E[4]!=="7da71ca0")break;var tt=an(pi[an("6cae19")]).split(".");if(z[0]>tt[0]||z[0]===tt[0]&&z[1]>=tt[1]){var rt=Dn[an("74a900bae4370f8b51")][an("6fbb13a1c2311e8a57")].toLowerCase();if(tt=rt[an("73a612b6fb191d")](an("3aad1ab6e022098b4dc4")),z=an(E[2]),-1<tt&&(rt=rt[an("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<rt&&rt<tt),!a.Rc))break;for(tt=x[an("76ad18b4f73e")],rt=x[an("73a612b6fb191d")](an("35e7"))+2;rt<tt;rt++)y+=x[rt];if(tt=y[an("73a612b6fb191d")](z),0>tt&&z!==an("7da71ca0ad381e90")&&(tt=y[an("73a612b6fb191d")](an("76a715b2ef3e149757"))),0>tt&&(tt=y[an("73a612b6fb191d")](an("76a715b2ef3e149757"))),0>tt&&(tt=y[an("73a612b6fb191d")](an("2bfa41fdb3784bca12"))),0>tt&&(tt=x[an("73a612b6fb191d")](an("7baa19a6f76c1988428554"))),a.Rc=!(0<=tt&&tt<y[an("73a612b6fb191d")](an("35"))||y[an("73a612b6fb191d")](an("35"))===-1),!a.Rc||x[an("73a612b6fb191d")](an("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[an("73a612b6fb191d")](z)),!a.Rc)||(tt=Dn[an("76a715b2f73f148a")][an("69ad17a1e03e")],rt=tt[an("73a612b6fb191d")](an("7fb002b6ed25128b4da25b2e")),-1<rt&&(a.Rc=!(tt[an("73a612b6fb191d")](z)>rt),!a.Rc)))break;if(z[0]==="#"){tt=Dn.document.createElement("div");for(var ot=E[0].replace(/[A-Za-z]/g,"");4>ot.length;)ot+="9";if(rt=ot,ot=ot.substr(ot.length-4),E="",E+=["gsh","gsf"][parseInt(ot.substr(0,1),10)%2],E+=["Header","Background","Display","Feedback"][parseInt(ot.substr(0,1),10)%4],tt[an("79a417a0f0181a8946")]=E,Dn.document[an("78a712aa")]){Dn.document[an("78a712aa")][an("7bb806b6ed32388c4a875b")](tt),ot=Dn.getComputedStyle(tt).getPropertyValue(an("78a704b7e62456904c9b12701b6532a8"));var st=Dn.getComputedStyle(tt).getPropertyValue(an("75b817b0ea2202"));if(Dn.document[an("78a712aa")][an("68ad1bbcf533388c4a875b")](tt),ot){if(tt=Dn[an("77a902b0eb1b1e804a8a")],st==="0."+parseInt(rt,10)%100||ot.indexOf(parseInt(z[1]+z[2],16))!==-1&&ot.indexOf(parseInt(z[3]+z[4],16))!==-1){a.Rc=!1;break}else if(tt&&tt(an("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(E="."+E,z=0;z<document.styleSheets.length;z++){tt=document.styleSheets[z].rules||document.styleSheets[z].cssRules;for(var ut in tt)if(E===tt[ut].selectorText){a.Rc=!1;break t}}}}else a.Rc=null,a.Rc=!1}}}else{for(ut=x[an("76ad18b4f73e")],b=x[an("73a612b6fb191d")](an("35e7"))+2;b<ut;b++)y+=x[b];x=y[an("73a612b6fb191d")](an("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[an("73a612b6fb191d")](an("35")))}}}return 0<a.Rc&&a!==a.wy}um.className="DiagramHelper";function th(a){this.j=a===void 0?new Tt:a,this.o=new Tt}Me.Object.defineProperties(th.prototype,{point:{get:function(){return this.j},set:function(a){this.j=a}},shifted:{get:function(){return this.o},set:function(a){this.o=a}}});var bc="DraggingInfo";th.className="DraggingInfo";function it(a,y,x){this.node=a,this.info=y,this.Su=x}it.className="DraggingNodeInfoPair";function at(){this.reset()}at.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new Ut(NaN,NaN).freeze(),this.gridSnapCellSpot=Wi,this.gridSnapOrigin=new Tt(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},at.className="DraggingOptions";function dt(a,y){if(typeof a=="string"||Dn.Element&&a instanceof Element)var x=ke.call(this,a)||this;else x=ke.call(this)||this,y=a;return ht(x),y&&x.nm(y),x}Oe(dt,ke);function ht(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=ar,a.layout=new Ua}dt.prototype.reset=function(){ke.prototype.reset.call(this),ht(this)},dt.className="Palette";function pt(a,y){if(typeof a=="string"||Dn.Element&&a instanceof Element)var x=ke.call(this,a)||this;else x=ke.call(this)||this,y=a;var E=x;x.animationManager.isEnabled=!1,x.vb=!0,x.V=null,x.mn=!1,x.nn=!1,x.F=!0,x.u=!0,x.ia=0,x.o=!1,x.ql=null,x.Xx("drawShadows",!1),a=new Fi;var b=new dr;return b.stroke="magenta",b.strokeWidth=2,b.fill="transparent",b.name="BOXSHAPE",a.selectable=!0,a.selectionAdorned=!1,a.selectionObjectName="BOXSHAPE",a.locationObjectName="BOXSHAPE",a.resizeObjectName="BOXSHAPE",a.cursor="move",a.add(b),x.j=a,x.allowCopy=!1,x.allowDelete=!1,x.allowSelect=!0,x.autoScrollRegion=new ii(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new Kt,x.toolManager.mouseMoveTools),x.click=function(){var z=E.observed;if(z!==null){var tt=z.viewportBounds,rt=E.lastInput.documentPoint;z.position=new Tt(rt.x-tt.width/2,rt.y-tt.height/2)}},x.Pf=function(){E.Ya(),Bt(E)},x.Xd=function(){E.observed!==null&&(E.Ya(),E.N())},x.Ha=function(){1>E.updateDelay?E.N():E.o||(E.o=!0,setTimeout(function(){return E.redraw()},E.updateDelay))},x.Of=function(){E.observed!==null&&Bt(E)},x.autoScale=al,x.vb=!1,y&&Object.assign(x,y),x}Oe(pt,ke),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(jd(this),this.ql===null){var x=new Il(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),Lt(this)}finally{this.ta=a,this.ib=y}}}ke.prototype.redraw.call(this)},pt.prototype.gc=function(){if(this.Ka===null&&$t("No div specified"),this.ta===null&&$t("No canvas specified"),!(this.ta instanceof Cu)&&(Ov(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){jd(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?Lt(this):this.ql!==null&&(a.drawImage(this.ql.Oa,0,0),y=this.Ab,y.reset(),this.scale!==1&&y.scale(this.scale),this.position.x===0&&this.position.y===0||y.translate(-this.position.x,-this.position.y),a.scale(this.Mb,this.Mb),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.yc()),y=this.Wa.s;for(var x=y.length,E=0;E<x;E++)y[E].gc(a,this);this.Fc=this.vd=!1}}};function Lt(a){var y=a.observed;if(y!==null){var x=a.drawsTemporaryLayers,E=a.drawsGrid&&x,b=y.grid;E&&b!==null&&b.visible&&!isNaN(b.width)&&!isNaN(b.height)&&(b=ae.alloc().assign(a.viewportBounds).ed(y.viewportBounds),Pu(y,b),ae.free(b),rs(y));var z=a.Ab;z.reset(),a.scale!==1&&z.scale(a.scale),a.position.x===0&&a.position.y===0||z.translate(-a.position.x,-a.position.y),b=a.ib,b.scale(a.Mb,a.Mb),b.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),b.yc(),y=y.Wa.s,z=y.length;for(var tt=0;tt<z;tt++){var rt=y[tt],ot=a;if(rt.visible&&rt.opacity!==0){var st=rt.diagram.grid.part;if(!x&&rt.isTemporary)E&&st.layer===rt&&(rt=$u(rt,b),st.gc(b,ot),b.globalAlpha=rt);else{for(var ut=$u(rt,b),ft=ot.scale,vt=ae.alloc(),yt=rt.Pa.s,Pt=yt.length,Et=0;Et<Pt;Et++){var Vt=yt[Et];(E||Vt!==st)&&rt.Oj(b,Vt,ot,null,ft,vt,!1)}ae.free(vt),b.globalAlpha=ut}}}}}function Bt(a){var y=a.box;if(y!==null){var x=a.observed;if(x!==null){a.Fc=!0,x=x.viewportBounds;var E=y.selectionObject,b=Ut.alloc();b.h(x.width,x.height),E.desiredSize=b,Ut.free(b),a=2/a.scale,E instanceof dr&&(E.strokeWidth=a),y.location=new Tt(x.x-a/2,x.y-a/2),y.isSelected=!0}}}pt.prototype.computeBounds=function(){var a=this.observed;if(a===null)return lr;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},pt.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},pt.prototype.onViewportBoundsChanged=function(a,y,x,E){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),Bt(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.Oz=E,this.R("ViewportBoundsChanged",this.fc,a))},Me.Object.defineProperties(pt.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof pt&&$t("Overview.observed Diagram may not be an Overview itself: "+a),y!==a){if(y!==null&&(this.remove(this.box),y.am("ViewportBoundsChanged",this.Pf),y.am("DocumentBoundsChanged",this.Xd),y.am("InvalidateDraw",this.Ha),y.am("AnimationFinished",this.Of)),this.V=a,a!==null&&(a.Bj("ViewportBoundsChanged",this.Pf),a.Bj("DocumentBoundsChanged",this.Xd),a.Bj("InvalidateDraw",this.Ha),a.Bj("AnimationFinished",this.Of),this.add(this.box)),this.Ya(),a===null){this.ql=null;var x=this.ta,E=this.ib;x&&E&&(E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,x.width,x.height))}else this.Ha(null),Bt(this),this.N();this.g("observed",y,a)}}},box:{get:function(){return this.j},set:function(a){var y=this.j;y!==a&&(this.j=a,this.remove(y),this.add(this.j),Bt(this),this.g("box",y,a))}},drawsTemporaryLayers:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a,this.redraw())}},drawsGrid:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a,this.redraw())}},updateDelay:{get:function(){return this.ia},set:function(a){0>a&&(a=0),this.ia!==a&&(this.ia=a)}}}),pt.className="Overview";function Kt(){Ho.call(this),this.j=null}Oe(Kt,Ho),Kt.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||!a.allowMove||!a.allowSelect)return!1;var y=a.observed;if(y===null)return!1;var x=a.lastInput;return!x.left||a.currentTool!==this&&(!this.isBeyondDragSize()||x.isTouchEvent&&x.timestamp-a.firstInput.timestamp<this.delay)?!1:(this.findDraggablePart()===null&&(x=y.viewportBounds,this.j=new Tt(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new Tt(a.x-this.j.x,a.y-this.j.y)),!0)},Kt.prototype.doActivate=function(){this.j=null,Ho.prototype.doActivate.call(this)},Kt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Kt.prototype.moveParts=function(){var a=this.diagram,y=a.observed;if(y!==null){var x=a.box;if(x!==null){if(this.j===null){var E=a.firstInput.documentPoint;x=x.location,this.j=new Tt(E.x-x.x,E.y-x.y)}a=a.lastInput.documentPoint,y.position=new Tt(a.x-this.j.x,a.y-this.j.y)}}},Kt.className="OverviewDraggingTool";function Zt(){Ri(this),this.H=Tu,this.Ha=this.u=this.o=!0,this.F=this.V=this.nb=this.ia=!1,this.ij=this.j=null,this.Hb=1.05,this.Jt=NaN,this.sw=null,this.Au=NaN,this.yu=lr,this.hb=!0,this.cg=null,this.ob=200}Zt.prototype.toString=function(){return"CommandHandler"},Zt.prototype.Xe=function(a){this.H=a},Zt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=Ar?y.meta:y.control,E=y.shift,b=y.alt,z=y.key;!x||z!=="C"&&z!=="Insert"?x&&z==="X"||E&&z==="Del"?this.canCutSelection()&&this.cutSelection():x&&z==="V"||E&&z==="Insert"?this.canPasteSelection()&&this.pasteSelection():x&&z==="Y"||b&&E&&z==="Backspace"?this.canRedo()&&this.redo():x&&z==="Z"||b&&z==="Backspace"?this.canUndo()&&this.undo():z==="Del"||z==="Backspace"?this.canDeleteSelection()&&this.deleteSelection():x&&z==="A"?this.canSelectAll()&&this.selectAll():z==="Esc"?this.canStopCommand()&&this.stopCommand():z==="Up"?a.allowVerticalScroll&&(x?a.scroll("pixel","up"):a.scroll("line","up")):z==="Down"?a.allowVerticalScroll&&(x?a.scroll("pixel","down"):a.scroll("line","down")):z==="Left"?a.allowHorizontalScroll&&(x?a.scroll("pixel","left"):a.scroll("line","left")):z==="Right"?a.allowHorizontalScroll&&(x?a.scroll("pixel","right"):a.scroll("line","right")):z==="PageUp"?E&&a.allowHorizontalScroll?a.scroll("page","left"):a.allowVerticalScroll&&a.scroll("page","up"):z==="PageDown"?E&&a.allowHorizontalScroll?a.scroll("page","right"):a.allowVerticalScroll&&a.scroll("page","down"):z==="Home"?x&&a.allowVerticalScroll?a.scroll("document","up"):!x&&a.allowHorizontalScroll&&a.scroll("document","left"):z==="End"?x&&a.allowVerticalScroll?a.scroll("document","down"):!x&&a.allowHorizontalScroll&&a.scroll("document","right"):z===" "?this.canScrollToPart()&&this.scrollToPart():z==="Subtract"?this.canDecreaseZoom()&&this.decreaseZoom():z==="Add"?this.canIncreaseZoom()&&this.increaseZoom():x&&z==="0"?this.canResetZoom()&&this.resetZoom():E&&z==="Z"?this.canZoomToFit()&&this.zoomToFit():x&&!E&&z==="G"?this.canGroupSelection()&&this.groupSelection():x&&E&&z==="G"?this.canUngroupSelection()&&this.ungroupSelection():z==="F2"||y.event&&y.event.key==="F2"?this.canEditTextBlock()&&this.editTextBlock():z==="ContextMenu"||y.event&&y.event.key==="ContextMenu"?this.canShowContextMenu()&&this.showContextMenu():y.bubbles=!0:this.canCopySelection()&&this.copySelection()},Zt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},Zt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof uo&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},Zt.prototype.canStopCommand=function(){return!0},Zt.prototype.selectAll=function(){var a=this.diagram;a.N();try{a.currentCursor="wait",a.R("ChangingSelection",a.selection);for(var y=a.parts;y.next();)y.value.isSelected=!0;for(var x=a.nodes;x.next();)x.value.isSelected=!0;for(var E=a.links;E.next();)E.value.isSelected=!0}finally{a.R("ChangedSelection",a.selection),a.currentCursor=""}},Zt.prototype.canSelectAll=function(){return this.diagram.allowSelect},Zt.prototype.deleteSelection=function(){var a=this.diagram;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Delete"),a.R("SelectionDeleting",a.selection);for(var y=new cn,x=a.selection.iterator;x.next();)hd(y,x.value,!0,this.deletesTree?1/0:0,this.deletesConnectedLinks?null:!1,function(E){return E.canDelete()});a.Is(y,!0),a.R("SelectionDeleted",y)}finally{a.eb("Delete"),a.R("ChangedSelection",a.selection),a.currentCursor=""}},Zt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},Zt.prototype.copySelection=function(){var a=this.diagram,y=new cn;for(a=a.selection.iterator;a.next();)hd(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},Zt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},Zt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},Zt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},Zt.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)Gd=null,od="";else{x=y.model;var E=!1,b=!1,z=null;try{x.Tl()&&(E=x.Jj,x.Jj=this.copiesParentKey),x.Wj()&&(b=x.Ij,x.Ij=this.copiesGroupKey),z=y.Kj(a,null,!0)}finally{x.Tl()&&(x.Jj=E),x.Wj()&&(x.Ij=b),x=new dn,x.addAll(z),Gd=x,od=y.model.dataFormat}}y.R("ClipboardChanged",x)},Zt.prototype.pasteFromClipboard=function(){var a=new cn,y=Gd;if(y===null)return a;var x=this.diagram;if(od!==x.model.dataFormat)return a;var E=x.model,b=!1,z=!1,tt=null;try{E.Tl()&&(b=E.Jj,E.Jj=this.copiesParentKey),E.Wj()&&(z=E.Ij,E.Ij=this.copiesGroupKey),tt=x.Kj(y,x,!1)}finally{for(E.Tl()&&(E.Jj=b),E.Wj()&&(E.Ij=z),y=tt.iterator;y.next();)x=y.value,E=y.key,x.location.w()||(E.location.w()?x.location=E.location:!x.position.w()&&E.position.w()&&(x.position=E.position)),a.add(x)}return a},Zt.prototype.pasteSelection=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Paste");var x=this.pasteFromClipboard();0<x.count&&y.clearSelection(!0);for(var E=x.iterator;E.next();)E.value.isSelected=!0;if(a!==null){var b=y.computePartsBounds(y.selection);if(b.w()){var z=this.computeEffectiveCollection(y.selection,y.Wm);nd(y,z,new Tt(a.x-b.centerX,a.y-b.centerY),y.Wm,!1)}}y.R("ClipboardPasted",x)}finally{y.eb("Paste"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Zt.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||Gd===null||Gd.count===0||od!==a.model.dataFormat)},Zt.prototype.undo=function(){this.diagram.undoManager.undo()},Zt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},Zt.prototype.redo=function(){this.diagram.undoManager.redo()},Zt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},Zt.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===ps&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Zt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==ps?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Zt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===ps&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Zt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==ps?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Zt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},Zt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},Zt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,E=a.scale;Nu(y,"Zoom To Fit"),this.isZoomToFitRestoreEnabled&&E===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.sw,this.Au=NaN,this.yu=lr):(this.Jt=E,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),sf(y)},Zt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Zt.prototype.scrollToPart=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.Va(),a===null){try{this.cg!==null&&(this.cg.next()?a=this.cg.value:this.cg=null)}catch(ot){this.cg=null}a===null&&(0<y.highlighteds.count?this.cg=y.highlighteds.iterator:0<y.selection.count&&(this.cg=y.selection.iterator),this.cg!==null&&this.cg.next()&&(a=this.cg.value))}if(a!==null){var x=y.animationManager;Nu(x,"Scroll To Part");var E=this.scrollToPartPause;if(0<E){var b=ne(this,a,[a]);if(b.length===1)y.Ea(),y.es(a.actualBounds),y.eb("Scroll To Part");else{var z=function(){y.Ea();for(var ot=b.pop();0<b.length&&ot instanceof Hn&&ot.isTreeExpanded&&(!(ot instanceof ir)||ot.isSubGraphExpanded);)ot=b.pop();0<b.length?(ot instanceof Fi&&y.tv(ot.actualBounds),ot instanceof Hn&&!ot.isTreeExpanded&&(ot.isTreeExpanded=!0),ot instanceof ir&&!ot.isSubGraphExpanded&&(ot.isSubGraphExpanded=!0)):(ot instanceof Fi&&y.es(ot.actualBounds),y.am("LayoutCompleted",tt)),y.eb("Scroll To Part")},tt=function(){je(z,(x.isEnabled?x.duration:0)+E)};y.Bj("LayoutCompleted",tt),z()}}else{var rt=y.position.copy();y.es(a.actualBounds),rt.Xa(y.position)&&x.Cc()}}};function ne(a,y,x){if(y.isVisible())return x;if(y instanceof Zr)ne(a,y.adornedPart,x);else if(y instanceof Ln){var E=y.fromNode;E!==null&&ne(a,E,x),y=y.toNode,y!==null&&ne(a,y,x)}else y instanceof Hn&&(E=y.labeledLink,E!==null&&ne(a,E,x),E=y.pg(),E!==null&&(E.isTreeExpanded||E.wasTreeExpanded||x.push(E),ne(a,E,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),ne(a,y,x));return x}Zt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof Fi)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},Zt.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),Nu(y.animationManager,"Collapse Tree");var x=new dn;if(a!==null&&a.isTreeExpanded)a.collapseTree(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof Hn&&b.isTreeExpanded&&(b.collapseTree(),x.add(b))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},Zt.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Hn&&a.isTreeExpanded))return!1;if(0<a.Qo().count)return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Hn&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Zt.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),Nu(y.animationManager,"Expand Tree");var x=new dn;if(a!==null&&!a.isTreeExpanded)a.expandTree(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof Hn&&!b.isTreeExpanded&&(b.expandTree(),x.add(b))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},Zt.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Hn)||a.isTreeExpanded)return!1;if(0<a.Qo().count)return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Hn&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Zt.prototype.groupSelection=function(){var a=this.diagram,y=a.model;if(y.Xj()){var x=this.archetypeGroupData;if(x!==null){var E=null;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Group");for(var b=new dn,z=a.selection.iterator;z.next();){var tt=z.value;tt.Zc()&&tt.canGroup()&&b.add(tt)}for(var rt=new dn,ot=b.iterator;ot.next();){var st=ot.value;z=!1;for(var ut=b.iterator;ut.next();)if(st.Td(ut.value)){z=!0;break}z||rt.add(st)}if(0<rt.count){var ft=rt.first().containingGroup;if(ft!==null)for(;ft!==null;){b=!1;for(var vt=rt.iterator;vt.next();)if(!vt.value.Td(ft)){b=!0;break}if(b)ft=ft.containingGroup;else break}if(x instanceof ir)Rl(x),E=x.copy(),E!==null&&a.add(E);else if(y.Yu(x)){var yt=y.copyNodeData(x);_e(yt)&&(y.xf(yt),E=a.ii(yt))}if(E!==null){ft!==null&&this.isValidMember(ft,E)&&(E.containingGroup=ft);for(var Pt=rt.iterator;Pt.next();){var Et=Pt.value;this.isValidMember(E,Et)&&(Et.containingGroup=E)}a.clearSelection(!0),E.isSelected=!0}}a.R("SelectionGrouped",E)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},Zt.prototype.canGroupSelection=function(){var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowGroup||!a.model.Xj()||this.archetypeGroupData===null)return!1;for(a=a.selection.iterator;a.next();){var y=a.value;if(y.Zc()&&y.canGroup())return!0}return!1};function Ie(a){var y=Ei();for(a=a.iterator;a.next();){var x=a.value;x instanceof Ln||y.push(x)}a=new cn,x=y.length;for(var E=0;E<x;E++){for(var b=y[E],z=!0,tt=0;tt<x;tt++)if(b.Td(y[tt])){z=!1;break}z&&a.add(b)}return ri(y),a}Zt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Ln)return!1;if(a!==null){if(a===y||a.Td(y))return!1;var x=a.memberValidation;if(x!==null&&!x(a,y)||a.data===null&&y.data!==null||a.data!==null&&y.data===null)return!1}return x=this.memberValidation,x!==null?x(a,y):!0},Zt.prototype.ungroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.model;if(x.Xj())try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Ungroup");var E=new dn;if(a!==null)E.add(a);else for(var b=y.selection.iterator;b.next();){var z=b.value;z instanceof ir&&z.canUngroup()&&E.add(z)}var tt=new dn;if(0<E.count){y.clearSelection(!0);for(var rt=E.iterator;rt.next();){var ot=rt.value;ot.expandSubGraph();var st=ot.containingGroup,ut=st!==null&&st.data!==null?x.wa(st.data):void 0;tt.addAll(ot.memberParts);for(var ft=tt.iterator;ft.next();){var vt=ft.value;if(vt.isSelected=!0,!(vt instanceof Ln)){var yt=vt.data;yt!==null?x.mp(yt,ut):vt.containingGroup=st}}y.remove(ot)}}y.R("SelectionUngrouped",E,tt)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Zt.prototype.canUngroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly||y.isModelReadOnly||!y.allowDelete||!y.allowUngroup||!y.model.Xj())return!1;if(a!==null){if(!(a instanceof ir))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ir&&y.canUngroup())return!0;return!1},Zt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=Ie(a).iterator;a.next();){var E=a.value;E.containingGroup!==null&&(!y||this.isValidMember(null,E)?E.containingGroup=null:x=!1)}return x},Zt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),Nu(y.animationManager,"Collapse SubGraph");var x=new dn;if(a!==null&&a.isSubGraphExpanded)a.collapseSubGraph(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof ir&&b.isSubGraphExpanded&&(b.collapseSubGraph(),x.add(b))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},Zt.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof ir&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ir&&y.isSubGraphExpanded)return!0;return!1},Zt.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),Nu(y.animationManager,"Expand SubGraph");var x=new dn;if(a!==null&&!a.isSubGraphExpanded)a.expandSubGraph(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof ir&&!b.isSubGraphExpanded&&(b.expandSubGraph(),x.add(b))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},Zt.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof ir&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ir&&!y.isSubGraphExpanded)return!0;return!1},Zt.prototype.editTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.toolManager.findTool("TextEditing");if(x!==null){if(a===null){a=null;for(var E=y.selection.iterator;E.next();){var b=E.value;if(b.canEdit()){a=b;break}}if(a===null)return;a=a.Nl(function(z){return z instanceof No&&z.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},Zt.prototype.canEditTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly||y.isModelReadOnly||!y.allowTextEdit||y.toolManager.findTool("TextEditing")===null)return!1;if(a!==null){if(!(a instanceof No))return!1;if(a=a.part,a!==null&&a.canEdit())return!0}else for(y=y.selection.iterator;y.next();)if(a=y.value,a.canEdit()&&(a=a.Nl(function(x){return x instanceof No&&x.editable}),a!==null))return!0;return!1},Zt.prototype.showContextMenu=function(a){var y=this.diagram,x=y.toolManager.findTool("ContextMenu");if(x!==null&&(a===void 0&&(a=0<y.selection.count?y.selection.first():y),a=x.findObjectWithContextMenu(a),a!==null)){var E=y.lastInput,b=null;a instanceof de?b=a.ga(fi):y.viewportBounds.ca(E.documentPoint)||(b=y.viewportBounds,b=new Tt(b.x+b.width/2,b.y+b.height/2)),b!==null&&(E.viewPoint=y.op(b),E.documentPoint=b,E.left=!1,E.right=!0,E.up=!0),y.currentTool=x,Qu(x,!1,a)}},Zt.prototype.canShowContextMenu=function(a){var y=this.diagram,x=y.toolManager.findTool("ContextMenu");return x===null?!1:(a===void 0&&(a=0<y.selection.count?y.selection.first():y),x.findObjectWithContextMenu(a)!==null)},Zt.prototype.computeEffectiveCollection=function(a,y){var x=this.diagram,E=x.toolManager.findTool("Dragging"),b=x.currentTool===E;if(y===void 0&&(y=b?E.dragOptions:x.Wm),E=new be,a===null)return E;for(var z=a.iterator;z.next();)Bu(x,E,z.value,b,y);if(x.draggedLink!==null&&y.dragsLink)return E;for(z=a.iterator;z.next();)a=z.value,a instanceof Ln&&(y=a.fromNode,y===null||E.contains(y)?(y=a.toNode,y===null||E.contains(y)||E.remove(a)):E.remove(a));return E},Me.Object.defineProperties(Zt.prototype,{diagram:{get:function(){return this.H}},copiesClipboardData:{get:function(){return this.o},set:function(a){this.o=a}},copiesConnectedLinks:{get:function(){return this.u},set:function(a){this.u=a}},deletesConnectedLinks:{get:function(){return this.Ha},set:function(a){this.Ha=a}},copiesTree:{get:function(){return this.ia},set:function(a){this.ia=a}},deletesTree:{get:function(){return this.nb},set:function(a){this.nb=a}},copiesParentKey:{get:function(){return this.V},set:function(a){this.V=a}},copiesGroupKey:{get:function(){return this.F},set:function(a){this.F=a}},archetypeGroupData:{get:function(){return this.j},set:function(a){this.j=a}},memberValidation:{get:function(){return this.ij},set:function(a){this.ij=a}},defaultScale:{get:function(){return this.diagram.defaultScale},set:function(a){this.diagram.defaultScale=a}},zoomFactor:{get:function(){return this.Hb},set:function(a){1<a||$t("zoomFactor must be larger than 1.0, not: "+a),this.Hb=a}},isZoomToFitRestoreEnabled:{get:function(){return this.hb},set:function(a){this.hb=a}},scrollToPartPause:{get:function(){return this.ob},set:function(a){this.ob=a}}}),Zt.className="CommandHandler",Qp=function(){return new Zt};function de(){Ri(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new Tt(NaN,NaN).freeze(),this.jd=xn,this.Ab=new Un,this.wh=new Un,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=ur,this.uc=new ae(NaN,NaN,NaN,NaN).freeze(),this.Ib=new ae(NaN,NaN,NaN,NaN).freeze(),this.dc=new ae(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=xo,this.Ag=this.io=0,this.V=this.tb=this.Dh=this.A=this.Ua=null,this.Uc=!1,this.jo=this.Ng=null}var fn,en,gi,ki,ji,or,Fr,vr,jr,fo;de.prototype.cloneProtected=function(a){a.l=this.l|6144,a.pb=this.pb,a.bn=this.bn,a.Ma=this.Ma,a.pa.assign(this.pa),a.jd=this.jd.J(),this.Lb!==null?a.Lb=this.Lb.copy():a.Lb=null,a.Ca=this.Ca,a.Kb=this.Kb,a.Kg=this.Kg.J(),a.uc.assign(this.uc),a.Ib.assign(this.Ib),a.dc.assign(this.dc),a.Yn=this.Yn,this.ba!==null&&(a.ba=this.ba.copy()),a.Jb=this.Jb.J(),a.sk=this.sk.J(),a.io=this.io,a.Ag=this.Ag,this.Ua!==null&&(a.Ua=this.Ua.copy()),this.A!==null&&(a.A=this.A.nc?this.A:this.A.copy()),this.Dh!==null&&(a.Dh=$n(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},de.prototype.Vw=function(a){var y=this.Dh;if(un(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},de.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},de.prototype.clone=function(){var a=new this.constructor;if(this.cloneProtected(a),this.Dh!==null)for(var y=0;y<this.Dh.length;y++){var x=this.Dh[y];a[x]=this[x]}return a},de.prototype.copy=function(){return this.clone()},Ct=de.prototype,Ct.qb=function(a){a.classType===Ln?a.name.indexOf("Orient")===0?this.segmentOrientation=a:$t("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===de&&(this.stretch=a)},Ct.toString=function(){return bi(this.constructor)+"#"+xr(this)},Ct.th=function(){this.A!==null&&(this.A.nc=!0)};function pr(a){a.A===null?a.A=new Tc:a.A.nc&&(a.A=a.A.copy())}Ct.Xc=function(){if(this.ba===null){var a=new Vg;a.Xi=Li,a.yj=Li,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},Ct.cb=function(a,y,x,E,b,z,tt){var rt=this.part;if(rt!==null&&(rt.gk(a,y,x,E,b,z,tt),x===this&&a===Eo&&$a(this)&&Zo(this,rt,y),z=this.diagram,this.animationTriggers===null||z===null||!z.pi||z.undoManager.isUndoingRedoing||z.animationManager.Dm||(a=this.animationTriggers.get(y),a!==null&&z.animationManager.isEnabled&&!z.animationManager.isTicking&&(this.jo===null&&(this.jo=new be),tt=z.undoManager.transactionLevel===0,a.startCondition===$h?tt=!0:a.startCondition===Od&&(tt=!1),tt?(z=new is,Yp(a,z),tt=this.jo.get(a),tt!==null&&tt.stop(),this.jo.add(a,z),z.vu=this,z.Nw=a,z.add(this,y,E,b),z.start()):(Nu(z.animationManager,"Trigger"),z.animationManager.defaultAnimation.add(this,y,E,b)))),this instanceof mn&&x===rt&&(rt.l&16777216)!==0&&rt.data!==null))for(x=this.O.s,E=x.length,b=0;b<E;b++)rt=x[b],rt instanceof mn&&Jd(rt,function(ot){ot.data!==null&&ot.l&16777216&&ot.La(y)})};function Zo(a,y,x){var E=a.ih();if(E!==null)for(var b=a.localBindings.iterator;b.next();){var z=b.value,tt=null;if(z.sourceName!==null){if(tt=M1(z,E,a),tt===null)continue;z.sp(a,tt,x,null)}else if(z.isToModel){var rt=y.diagram;rt===null||rt.skipsModelSourceBindings||z.sp(a,rt.model.modelData,x,E)}else{if(rt=E.data,rt===null)continue;var ot=y.diagram;ot===null||ot.skipsModelSourceBindings||z.sp(a,rt,x,E)}tt===a&&(rt=E.ks(z.Ai),rt!==null&&z.Mv(rt,tt,x))}}Ct.ks=function(a){return this.bindingId===a?this:null},Ct.g=function(a,y,x){this.cb(Eo,a,this,y,x)},Ct.Ge=function(a,y,x,E){var b=this.uc;if(b.h(a,y,x,E),this.Ca!==1||this.Kb!==0){this.Lb===null&&(this.Lb=new Un);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),z.pp(b)}};function Da(a,y,x,E){return a.pickable===!1?!1:(E.multiply(a.transform),x?a.Yc(y,E):a.fh(y,E))}Ct.tx=function(a,y,x){if(this.pickable===!1)return!1;var E=this.naturalBounds;return y=a.Bf(y),x?Qn(a.x,a.y,0,0,0,E.height)<=y||Qn(a.x,a.y,0,E.height,E.width,E.height)<=y||Qn(a.x,a.y,E.width,E.height,E.width,0)<=y||Qn(a.x,a.y,E.width,0,0,0)<=y:a.zd(0,0)<=y&&a.zd(0,E.height)<=y&&a.zd(E.width,0)<=y&&a.zd(E.width,E.height)<=y},Ct.se=function(){return!0},Ct.ca=function(a){var y=Tt.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return Tt.free(y),!1;var E=this.diagram;if(E!==null&&E.wq){var b=E.Ql("extraTouchThreshold"),z=E.Ql("extraTouchArea"),tt=z/2,rt=this.naturalBounds;E=this.Df()*E.scale;var ot=1/E;if(rt.width*E<b&&rt.height*E<b)return a=ci(x.x-tt*ot,x.y-tt*ot,x.width+z*ot,x.height+z*ot,y.x,y.y),Tt.free(y),a}return b=!1,(this instanceof Zr||this instanceof dr?ci(x.x-5,x.y-5,x.width+10,x.height+10,y.x,y.y):x.ca(y))&&(this.tb&&!this.tb.ca(y)?b=!1:this.areaBackground!==null&&x.ca(y)||this.Ma!==null&&this.dc.ca(a)?b=!0:b=this.gh(a)),Tt.free(y),b},Ct.gh=function(a){var y=this.naturalBounds;return ci(0,0,y.width,y.height,a.x,a.y)},Ct.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=ae.allocAt(0,0,y.width,y.height);var x=this.transform,E=!1,b=Tt.allocAt(a.x,a.y);return y.ca(x.Cd(b))&&(b.h(a.x,a.bottom),y.ca(x.Cd(b))&&(b.h(a.right,a.bottom),y.ca(x.Cd(b))&&(b.h(a.right,a.y),y.ca(x.Cd(b))&&(E=!0)))),Tt.free(b),ae.free(y),E},Ct.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,E=!1,b=Tt.allocAt(0,0);return a.ca(y.Ga(b))&&(b.h(0,x.height),a.ca(y.Ga(b))&&(b.h(x.width,x.height),a.ca(y.Ga(b))&&(b.h(x.width,0),a.ca(y.Ga(b))&&(E=!0)))),Tt.free(b),E},Ct.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,E=Tt.allocAt(0,0),b=Tt.allocAt(0,x.height),z=Tt.allocAt(x.width,x.height),tt=Tt.allocAt(x.width,0),rt=!1;if(a.ca(y.Ga(E))||a.ca(y.Ga(b))||a.ca(y.Ga(z))||a.ca(y.Ga(tt)))rt=!0;else{x=ae.allocAt(0,0,x.width,x.height);var ot=Tt.allocAt(a.x,a.y);x.ca(y.Cd(ot))?rt=!0:(ot.h(a.x,a.bottom),x.ca(y.Cd(ot))?rt=!0:(ot.h(a.right,a.bottom),x.ca(y.Cd(ot))?rt=!0:(ot.h(a.right,a.y),x.ca(y.Cd(ot))&&(rt=!0)))),Tt.free(ot),ae.free(x),!rt&&(le.us(a,E,b)||le.us(a,b,z)||le.us(a,z,tt)||le.us(a,tt,E))&&(rt=!0)}return Tt.free(E),Tt.free(b),Tt.free(z),Tt.free(tt),rt},Ct.ga=function(a,y){if(y===void 0&&(y=new Tt),a instanceof Xe){var x=this.naturalBounds;y.h(a.x*x.width+a.offsetX,a.y*x.height+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},Ct.mi=function(a){a===void 0&&(a=new ae);var y=this.naturalBounds,x=this.oe,E=Tt.allocAt(0,0).transform(x);return a.h(E.x,E.y,0,0),E.h(y.width,0).transform(x),ui(a,E.x,E.y,0,0),E.h(y.width,y.height).transform(x),ui(a,E.x,E.y,0,0),E.h(0,y.height).transform(x),ui(a,E.x,E.y,0,0),Tt.free(E),a},Ct.li=function(){var a=this.oe;return a.m11===1&&a.m12===0?a=0:(a=180*Math.atan2(a.m12,a.m11)/Math.PI,0>a&&(a+=360)),a},Ct.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},Ct.qs=function(a,y){return y===void 0&&(y=new Tt),y.assign(a),this.oe.Cd(y),y},Ct.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Ct.Sj=function(a,y,x,E,b){var z=this.transform,tt=1/(z.m11*z.m22-z.m12*z.m21),rt=z.m22*tt,ot=-z.m12*tt,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,le.Ff(z.left,z.top,z.right,z.bottom,a,y,x,E,b)):(tt=a*rt+y*st+ft,a=a*ot+y*ut+vt,y=x*rt+E*st+ft,x=x*ot+E*ut+vt,b.h(0,0),E=this.naturalBounds,x=le.Ff(0,0,E.width,E.height,tt,a,y,x,b),b.transform(z),x)},de.prototype.measure=function(a,y,x,E){if(ll(this)!==!1){var b=this.Kg,z=b.right+b.left;b=b.top+b.bottom,a=Math.max(a-z,0),y=Math.max(y-b,0),x=Math.max((x||0)-z,0),E=Math.max((E||0)-b,0),z=this.angle,b=this.desiredSize;var tt=this.kq();z===90||z===270?(a=isFinite(b.height)?b.height+tt:a,y=isFinite(b.width)?b.width+tt:y):(a=isFinite(b.width)?b.width+tt:a,y=isFinite(b.height)?b.height+tt:y),b=x||0,tt=E||0;var rt=this instanceof mn;switch(Os(this,!0)){case en:tt=b=0,rt&&(y=a=1/0);break;case fn:isFinite(a)&&a>x&&(b=a),isFinite(y)&&y>E&&(tt=y);break;case ki:isFinite(a)&&a>x&&(b=a),tt=0,rt&&(y=1/0);break;case ji:isFinite(y)&&y>E&&(tt=y),b=0,rt&&(a=1/0)}rt=this.maxSize;var ot=this.minSize;b>rt.width&&ot.width<rt.width&&(b=rt.width),tt>rt.height&&ot.height<rt.height&&(tt=rt.height),x=Math.max(b,ot.width),E=Math.max(tt,ot.height),rt.width<x&&(x=Math.min(ot.width,x)),rt.height<E&&(E=Math.min(ot.height,E)),a=Math.min(rt.width,a),y=Math.min(rt.height,y),a=Math.max(x,a),y=Math.max(E,y),(z===90||z===270)&&(z=a,a=y,y=z,z=x,x=E,E=z),this.uc.ka(),this.Wl(a,y,x,E),this.uc.freeze(),this.uc.w()||$t("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Ma(this,!1)}},de.prototype.Wl=function(){},de.prototype.Dd=function(){return!1},de.prototype.arrange=function(a,y,x,E,b){this.Uk();var z=ae.alloc();z.assign(this.Ib),this.Ib.ka(),Cs(this)===!1?this.Ib.h(a,y,x,E):this.eh(a,y,x,E),this.Ib.freeze(),b===void 0?this.tb=null:this.tb=b,x=!1,b!==void 0?x=!0:(b=this.panel,b!==null&&Eh(b)&&(b=b.panel),b!==null&&(b=b.dc,E=this.measuredBounds,this.areaBackground!==null&&(E=this.Ib),x=y+E.height,E=a+E.width,x=!(0<=a+.05&&E<=b.width+.05&&0<=y+.05&&x<=b.height+.05),this instanceof No&&(a=this.naturalBounds,this.Lq>a.height||this.Cb>a.width))&&(x=!0)),this.l=x?this.l|256:this.l&-257,this.Ib.w()||$t("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),Ou(this,!1),ae.free(z)},Ct=de.prototype,Ct.eh=function(){};function ms(a,y,x,E,b){if(a.Ib.h(y,x,E,b),!a.desiredSize.w()){var z=a.uc;x=a.Kg,y=x.right+x.left;var tt=x.top+x.bottom;switch(x=z.width+y,z=z.height+tt,E+=y,b+=tt,y=Os(a,!0),x===E&&z===b&&(y=en),y){case en:(x>E||z>b)&&(Ma(a,!0),a.measure(x>E?E:x,z>b?b:z,0,0));break;case fn:Ma(a,!0),a.measure(E,b,0,0);break;case ki:Ma(a,!0),a.measure(E,z,0,0);break;case ji:Ma(a,!0),a.measure(x,b,0,0)}}}Ct.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||zv(x,!0),this.N(),Bn(a,y)||(x.oh(),this.Pn(x)))},Ct.Pn=function(a){this.portId!==null&&(zv(a,!0),a instanceof Hn&&ZS(a,this))},Ct.gc=function(a,y){if(!xl(this,a,y)&&this.visible){var x=this.opacity;if(x!==0){var E=1;x!==1&&(E=a.globalAlpha,a.globalAlpha=E*x);var b="";this.filter!==""&&(b=a.filter,a.filter=this.filter);var z=this instanceof mn&&Eh(this),tt=this.Ib;if(z){var rt=this.Ib,ot=this.dc,st=this.areaBackground,ut=this.Ma;st===null&&ut===null||a.yc(),st!==null&&(ha(this,a,st,!0,!0,ot,rt),st instanceof ro&&st.type===Cl?(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&&(ha(this,a,ut,!0,!1,ot,rt),ut instanceof ro&&ut.type===Cl?(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&&Ya(this),st=this.part,ot=!1;var ft=0;st&&y.Gf("drawShadows")&&(ot=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 yt=this.naturalBounds;vt=this.wh;var Pt=vt.m11,Et=vt.m21,Vt=vt.dx,Rt=vt.m12,Qt=vt.m22,_t=vt.dy,te,ue=te=0;vt=te*Pt+ue*Et+Vt;var Ce=te*Rt+ue*Qt+_t;te=yt.width+ft,ue=0;var On=te*Pt+ue*Et+Vt;te=te*Rt+ue*Qt+_t,ue=Math.min(vt,On);var li=Math.min(Ce,te),ti=Math.max(vt+0,On)-ue,Cn=Math.max(Ce+0,te)-li;vt=ue,Ce=li,te=yt.width+ft,ue=yt.height+ft,On=te*Pt+ue*Et+Vt,te=te*Rt+ue*Qt+_t,ue=Math.min(vt,On),li=Math.min(Ce,te),ti=Math.max(vt+ti,On)-ue,Cn=Math.max(Ce+Cn,te)-li,vt=ue,Ce=li,te=0,ue=yt.height+ft,On=te*Pt+ue*Et+Vt,te=te*Rt+ue*Qt+_t,ue=Math.min(vt,On),li=Math.min(Ce,te),ti=Math.max(vt+ti,On)-ue,Cn=Math.max(Ce+Cn,te)-li,vt=ue,Ce=li,ft=y.viewportBounds,yt=ft.x,Pt=ft.y,vt=!(vt>ft.width+yt||yt>ti+vt||Ce>ft.height+Pt||Pt>Cn+Ce)}if(vt){if(vt=(this.l&256)!==0,a.clipInsteadOfFill&&(vt=!1),this instanceof No&&(a.font=this.font),vt){if(Ce=rt.se()?rt.naturalBounds:rt.actualBounds,ti=Math.max(tt.x,Ce.x),Cn=Math.max(tt.y,Ce.y),ft=Math.min(tt.right,Ce.right)-ti,yt=Math.min(tt.bottom,Ce.bottom)-Cn,Pt=this.tb,Pt!==null&&(ti=Pt.x,Cn=Pt.y,ft=Pt.width,yt=Pt.height),ti>tt.width+tt.x||tt.x>Ce.width+Ce.x){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}a.save(),a.beginPath(),a.rect(ti,Cn,ft,yt),a.clip()}if(ut){if(!st.isVisible()){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}ot&&(Ce=st.shadowOffset,a.Ev(Ce.x*y.scale*this.scale*y.Mb,Ce.y*y.scale*this.scale*y.Mb,st.shadowBlur),eh(a),a.shadowColor=st.shadowColor)}ot&&this.shadowVisible===!0?eh(a):ot&&this.shadowVisible===!1&&Iu(a),st=this.naturalBounds,this.areaBackground!==null&&(a.yc(),sl(this,a,st,tt)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),ot&&Za(this,rt)&&this.shadowVisible===null&&Iu(a),this.Ma!==null&&(a.yc(),Vs(this,a,st,tt)),ot&&(this.Ma!==null||this.areaBackground!==null||Za(this,rt))?(Xl(this,!0),this.shadowVisible===null&&Iu(a)):Xl(this,!1),this.hh(a,y),ot&&this.l&512&&eh(a),ut&&ot&&Iu(a),vt&&(a.restore(),a.Vc(this instanceof mn)),z.ws()||(y=1/(z.m11*z.m22-z.m12*z.m21),a.transform(z.m22*y,-z.m12*y,-z.m21*y,z.m11*y,y*(z.m21*z.dy-z.m22*z.dx),y*(z.m12*z.dx-z.m11*z.dy)))}}x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b)}}};function Za(a,y){return y===null?!1:(Eh(y)&&(y=y.panel),(y.l&512)!==0||(y.type===mn.Auto||y.type===mn.Spot)&&y.Pb()!==a)}Ct.Dv=function(){};function sl(a,y,x,E){ha(a,y,a.areaBackground,!0,!0,x,E),a.areaBackground instanceof ro&&a.areaBackground.type===Cl?(y.beginPath(),y.rect(E.x,E.y,E.width,E.height),y.ng(a.areaBackground)):y.fillRect(E.x,E.y,E.width,E.height)}function Vs(a,y,x,E){var b=a.kq(),z=x.x,tt=x.y,rt=x.width+b,ot=x.height+b;ha(a,y,a.Ma,!0,!1,x,E),a.Ma instanceof ro&&a.Ma.type===Cl?(y.beginPath(),y.rect(z-b/2,tt-b/2,rt,ot),y.ng(a.Ma)):y.fillRect(z-b/2,tt-b/2,rt,ot)}function cs(a,y,x){for(var E=y.O.s,b=E.length,z=-1,tt=0;tt<b;tt++)if(E[tt]===a){z=tt;break}if(a=z,a!==-1)if(a===0)y.svg.gd?y.svg.gd.after(x):y.svg.Ma?y.svg.Ma.after(x):y.type===mn.Table?(y=y.svg.getElementsByClassName("gojs-ts"),y=y.length!==0?y[0]:null,y!==null&&y.after(x)):y.svg.prepend(x);else{for(;a!==0&&!y.M(a-1).Ed();)a--;a===0?y.svg.prepend(x):(a=y.M(a-1).svg,a!==null?a.after(x):y.svg.appendChild(x))}}function xl(a,y,x){if(!(y instanceof qs))return!1;if(!a.visible||a.opacity===0||a.Dd()&&!a.isVisible())return a.svg!==null&&a.svg.parentNode!==null&&a.svg.remove(),!0;var E=a.panel,b=a.nk(y);if(a.kk(y,x,b))return a.svg.parentElement!==null?(a.Dd()&&(y.ti=a.svg),!0):(a.Dd()?(y.ti!==null?y.ti.after(a.svg):y.Nj.prepend(a.svg),y.ti=a.svg):E&&cs(a,E,a.svg),!0);if(a.Dd()&&a.isShadowed){var z=a.shadowOffset;y.Ev(z.x*x.scale*a.scale*x.Mb,z.y*x.scale*a.scale*x.Mb,a.shadowBlur),eh(y),y.shadowColor=a.shadowColor}a instanceof No&&(y.font=a.font),y.yd=null;var tt=a.transform;z=a instanceof mn;var rt=a instanceof mn?Eh(a):!1;a.l&4096&&Ya(a);var ot=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,b&&(y.o=!0,z&&rt?(Kg(y,1,0,0,1,0,0),a.svg=y.ad):z?(Kg(y,tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy),a.svg=y.ad):Kg(y,1,0,0,1,0,0)),b=a.naturalBounds,a.areaBackground!==null){var st=tt.copy().Vj();y.rb.ha=[st.m11,st.m12,st.m21,st.m22,st.dx,st.dy],sl(a,y,b,ot),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return z||(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy]),a.background!==null&&(z?(rt&&(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy]),Vs(a,y,b,ot),rt&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy],Vs(a,y,b,ot)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),tt=y.yd,b=a.part,rt=!1,b&&x.Gf("drawShadows")&&(rt=b.isShadowed),y.clipInsteadOfFill&&(rt=!1),a.Dd()&&rt&&eh(y),rt&&a.shadowVisible===!0?eh(y):rt&&a.shadowVisible===!1&&Iu(y),b=a.panel,rt&&Za(a,b)&&a.shadowVisible===null&&Iu(y),y.Il&&(st=x.computePixelRatio(),st="drop-shadow("+y.shadowOffsetX/st+"px "+y.shadowOffsetY/st+"px "+y.shadowBlur/st/2+"px "+y.shadowColor+")",a.background!==null&&tt.Ma.setAttributeNS(null,"filter",st),a.areaBackground!==null&&tt.gd.setAttributeNS(null,"filter",st)),rt&&(a.Ma!==null||a.areaBackground!==null||Za(a,b))?(Xl(a,!0),a.shadowVisible===null&&Iu(y)):Xl(a,!1),b=rt,a.hh(y,x),z&&y.nh.pop(),y.o&&y.nh.pop(),tt=y.Gv.hs,rt=z?a.svg:y.yd,st=a.svg,!z&&st!==null&&rt!==st&&st.parentNode===a.panel.svg?(a.svg.replaceWith(rt),a.svg=rt,rt!==null&&a.$o(y,E,ot,rt),Bs(y,st),!0):(a.svg=rt,tt!==null&&rt===null&&(dm(y),y.nh.pop()),rt===null||(a.$o(y,E,ot,rt),y.Il&&(x=x.computePixelRatio(),a.Dv(rt,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),b&&a.l&512&&eh(y),a.Dd()&&Iu(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&rt.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&rt.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(rt):y.Nj.prepend(rt),y.ti=rt):E!==null&&cs(a,E,rt),tt!==null&&tt(a,rt)),!0)}Ct.$o=function(a,y,x,E){var b=(this.l&256)!==0;if(a.clipInsteadOfFill&&(b=!1),b){var z=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,z.x),b=Math.max(x.y,z.y);var tt=Math.min(x.right,z.right)-y;x=Math.min(x.bottom,z.bottom)-b,z=this.tb,z!==null&&(y=z.x,b=z.y,tt=z.width,x=z.height),z=E.getAttribute("clip-path");var rt=null;z!==null&&(rt=a.svg.getElementById(z.split("#")[1].slice(0,-1))),rt===null?(z="CLIP"+zo++,rt=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:b,width:tt,height:x}),this instanceof mn&&(b=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")")),rt.appendChild(y),a.svg.appendChild(rt),E.setAttributeNS(null,"clip-path","url(#"+z+")")):(a=rt.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",b.toString()),a.setAttribute("width",tt.toString()),a.setAttribute("height",x.toString()))}else E.removeAttributeNS(null,"clip-path"),Bs(a,E)};function Bs(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function fs(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=bn(y);for(var E=y.next();!E.done;E=y.next())E=x.getElementById(E.value.split("#")[1].slice(0,-1)),E!==null&&E.remove()}a.svg.remove()}}Ct.hh=function(){},Ct.lv=function(){this.Uc=!0},Ct.kk=function(a,y,x){if(this.Uc)return this.lv(),this.Uc=!1;if(y=this.svg,y===null)return!1;if(!this.visible)return y.remove(),!1;if(y.nodeName!=="g"&&x||y.nodeName==="g"&&!x)return!1;var E=this.transform,b=this instanceof mn?Eh(this):!1;if(!(this instanceof mn&&b))if(this instanceof Rs){var z=this.bt;a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy],z!==null&&Jy(a,z[0],z[1],z[2],z[3],z[4],z[5],z[6],z[7]),x?y.lastElementChild.setAttributeNS(null,"transform",Qy(a)):y.setAttributeNS(null,"transform",Qy(a))}else if(!x||this instanceof mn)y.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");else if(this instanceof dr){z=y.getElementsByTagName("path");for(var tt=0;tt<z.length;tt++)z[tt].setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")}else y.lastElementChild.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");return z=this.Dd()?this.opacity*a.globalAlpha:this.opacity,z===1?y.removeAttribute("opacity"):y.setAttributeNS(null,"opacity",z.toString()),a.rb.ha=[1,0,0,1,0,0],(this.areaBackground!==null||y.gd!==void 0)&&(z=y.gd,this.areaBackground===null?(y.gd.remove(),y.gd=void 0):(tt=E.copy().Vj(),a.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy],sl(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(tt=y.gd.getAttribute("filter"),tt!==null&&a.ad.setAttribute("filter",tt),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),z&&cm(a,z)),(this.background!==null||y.Ma!==void 0)&&(z=y.Ma,this.background===null?(cm(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((b||x&&!(this instanceof mn))&&(a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy]),Vs(this,a,this.naturalBounds,this.actualBounds),y.Ma?(cm(a,y.Ma),x=y.Ma.getAttribute("filter"),x!==null&&a.ad.setAttribute("filter",x),y.Ma.replaceWith(a.ad)):y.prepend(a.ad),y.Ma=a.ad),z&&cm(a,z)),this.$o(a,this.panel,this.actualBounds,y),!0},Ct.nk=function(a){if(this.background!==null||this.areaBackground!==null)return!0;var y=(this.l&256)!==0;return a.clipInsteadOfFill&&(y=!1),!!y};function ha(a,y,x,E,b,z,tt){if(x!==null){var rt=1,ot=1;if(typeof x=="string")E?y.fillStyle=x:y.strokeStyle=x;else if(x.type===Mh)E?y.fillStyle=x.color:y.strokeStyle=x.color;else{var st=a.kq();if(rt=z.width,ot=z.height,b?(rt=tt.width,ot=tt.height):E||(rt+=st,ot+=st),(z=y instanceof Xd)&&x.xe&&(x.type===bf||x.yk===rt&&x.ft===ot))var ut=x.xe;else{var ft=0,vt=0,yt=0,Pt=0,Et=0,Vt=0;if(Vt=Et=0,b?(Et=tt.x,Vt=tt.y):E||(Et-=st/2,Vt-=st/2),ft=x.start.x*rt+x.start.offsetX,vt=x.start.y*ot+x.start.offsetY,yt=x.end.x*rt+x.end.offsetX,Pt=x.end.y*ot+x.end.offsetY,ft+=Et,yt+=Et,vt+=Vt,Pt+=Vt,x.type===ih)ut=y.createLinearGradient(ft,vt,yt,Pt);else if(x.type===Cl)Vt=isNaN(x.endRadius)?Math.max(rt,ot)/2:x.endRadius,isNaN(x.startRadius)?(Et=0,Vt=Math.max(rt,ot)/2):Et=x.startRadius,ut=y.createRadialGradient(ft,vt,Et,yt,Pt,Vt);else if(x.type===bf)try{ut=y.createPattern(x.pattern,"repeat")}catch(Qt){ut=null}if(x.type!==bf&&(b=x.colorStops,b!==null))for(b=b.iterator;b.next();)ut.addColorStop(b.key,b.value);if(z&&(x.xe=ut,ut!==null&&(x.yk=rt,x.ft=ot),ut===null&&x.type===bf&&x.yk!==-1)){x.yk=-1;var Rt=a.diagram;Rt!==null&&x.yk===-1&&je(function(){Rt.redraw()},600)}}E?y.fillStyle=ut:y.strokeStyle=ut}}}Ct.rg=function(a){if(a instanceof mn)t:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break t}y=y.panel}a=!1}else a=!1;return a},Ct.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},Ct.If=function(){for(var a=this instanceof mn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function Ya(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){Ol(a,!1);return}if(y.translate(a.Ib.x-a.uc.x,a.Ib.y-a.uc.y),a.scale!==1||a.angle!==0){var x=a.naturalBounds;a.no(y,x.x,x.y,x.width,x.height)}Ol(a,!1),Pl(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,Pl(a,!1)):y.oe!==null&&(x=a.wh,x.reset(),y.se()?x.multiply(y.wh):y.panel!==null&&x.multiply(y.panel.wh),x.multiply(a.Ab),a.Kk=a.scale*y.Kk,Pl(a,!1)))}Ct.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Tt.alloc();z.yi(y,x,E,b,fi),a.rotate(this.Kb,z.x,z.y),Tt.free(z)}},Ct.v=function(a){if(!ll(this)){a===void 0&&(a=!1),Ma(this,!0),Ou(this,!0);var y=this.panel;y===null||a||y.v()}},Ct.Uj=function(){ll(this)||(Ma(this,!0),Ou(this,!0))};function ws(a){if(!Cs(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof Hn&&a.Bd(),y.$b())),Ou(a,!0)}}Ct.Uk=function(){!(this.l&2048)&&(Ol(this,!0),Pl(this,!0))},Ct.Wu=function(){Pl(this,!0)},Ct.N=function(){var a=this.part;a!==null&&a.N()};function Os(a,y){var x=a.stretch,E=a.panel;return E!==null&&E.type===mn.Table?ou(a,E.Fb(a.row),E.Eb(a.column),y):E!==null&&E.type===mn.Auto&&E.Pb()===a?Va(a,fn,y):x===or?E!==null?E.type===mn.Spot&&E.Pb()===a?Va(a,fn,y):(x=E.defaultStretch,x===or?Va(a,en,y):Va(a,x,y)):Va(a,en,y):Va(a,x,y)}function ou(a,y,x,E){var b=a.stretch;if(b!==or)return Va(a,b,E);var z=b=null;switch(y.stretch){case ji:z=!0;break;case fn:z=!0}switch(x.stretch){case ki:b=!0;break;case fn:b=!0}return y=a.panel.defaultStretch,b===null&&(b=y===ki||y===fn),z===null&&(z=y===ji||y===fn),b===!0&&z===!0?Va(a,fn,E):b===!0?Va(a,ki,E):z===!0?Va(a,ji,E):Va(a,en,E)}function Va(a,y,x){if(x)return y;if(y===en||(x=a.desiredSize,x.w()))return en;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===ki)return en;if(y===fn)return ji}else{if(y===ji)return en;if(y===fn)return ki}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===ji)return en;if(y===fn)return ki}else{if(y===ki)return en;if(y===fn)return ji}return y}function Xl(a,y){a.l=y?a.l|512:a.l&-513}function $a(a){return(a.l&1024)!==0}function Nc(a,y){a.l=y?a.l|1024:a.l&-1025}function Ol(a,y){a.l=y?a.l|2048:a.l&-2049}function Pl(a,y){a.l=y?a.l|4096:a.l&-4097}function ll(a){return(a.l&8192)!==0}function Ma(a,y){a.l=y?a.l|8192:a.l&-8193}function Cs(a){return(a.l&16384)!==0}function Ou(a,y){a.l=y?a.l|16384:a.l&-16385}Ct.Gj=function(){this.svg=null},Ct.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},Ct.Av=function(){},Ct.zv=function(a){return this.pa=a,ws(this),!0},Ct.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},Ct.kq=function(){return 0};function Yd(a){var y=a.part;if(y instanceof Hn&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||ZS(y,a)}}function Uy(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof mn?a instanceof Hn?a.Bd():a.qm(a,function(x){Yd(x)}):Yd(a))}Ct.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Sa(a,y,x,E):b=a,b.xd=this,a=this.ih(),a!==null&&cS(a)&&$t("Cannot add a Binding to a template that has already been copied: "+b),this.localBindings===null&&(this.localBindings=new dn),this.localBindings.add(b),this},Ct.set=function(a){return Object.assign(this,a),this},Ct.Du=function(a){return nv(this,a),this},Ct.apply=function(a){return a(this),this},Ct.nm=function(a){return zd(this,a),this},Ct.pz=function(){return this.ih()},Ct.ih=function(){for(var a=this instanceof mn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},Ct.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new be),this.animationTriggers.add(a.propertyName,a),this};function wl(a,y){for(var x=1;x<arguments.length;++x);x=arguments;var E=null,b=null;if(typeof a=="function")b=a;else if(typeof a=="string"){var z=Lf.I(a);typeof z=="function"?(x=$n(arguments),E=z(x),_e(E)||$t('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):b=Dn.go[a]}if(E===null&&(b!=null&&b.constructor||$t("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),E=new b),b=1,E instanceof ke&&1<x.length){z=E;var tt=x[1];(typeof tt=="string"||tt instanceof HTMLDivElement)&&(Sg(z,tt),b++)}for(;b<x.length;b++)z=x[b],z===void 0?$t("Undefined value at argument "+b+" for object being constructed by GraphObject.make: "+E):nv(E,z);return E}function nv(a,y){if(typeof y=="string")if(a instanceof No)a.text=y;else if(a instanceof dr)a.figure=y;else if(a instanceof Rs)a.source=y;else if(a instanceof mn)y=Jl.I(y),y!==null&&(a.type=y);else if(a instanceof ro){var x=ni(ro,y);x!==null?a.type=x:$t("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof ln?(y=ni(ln,y),y!==null&&(a.type=y)):a instanceof Mr&&(y=ni(Mr,y),y!==null&&(a.type=y));else if(y instanceof de)a instanceof mn||$t("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Ea){var E;y.isRow&&typeof a.getRowDefinition=="function"?E=a.getRowDefinition(y.index):y.isRow||typeof a.getColumnDefinition!="function"||(E=a.getColumnDefinition(y.index)),E instanceof Ea?Am(E,y):$t("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof Ve)typeof a.qb=="function"&&a.qb(y);else if(y instanceof Fa)a.type=y;else if(y instanceof Sa)a instanceof de||a instanceof Ea?a.bind(y):$t("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof Yl)a instanceof de?a.Jv(y):$t("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof aa)a instanceof ln&&a.type===ln.o?a.figures.add(y):$t("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof Mr)a instanceof aa?a.segments.add(y):$t("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof _o)a instanceof ke||a instanceof ir?a.layout=y:$t("A Layout can only be assigned to a Diagram or a Group, not to: "+a);else if(Array.isArray(y))for(x=0;x<y.length;x++)nv(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof ro){x=new Hi;for(var b in y)E=parseFloat(b),isNaN(E)?x[b]=y[b]:a.addColorStop(E,y[b]);zd(a,x)}else if(a instanceof Ea){y.row!==void 0?(b=y.row,(b==null||b===1/0||isNaN(b)||0>b)&&$t("Must specify non-negative integer row for RowColumnDefinition "+y+", not: "+b),a.isRow=!0,a.index=b):y.column!==void 0&&(b=y.column,(b==null||b===1/0||isNaN(b)||0>b)&&$t("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+b),a.isRow=!1,a.index=b),b=new Hi;for(x in y)x!=="row"&&x!=="column"&&(b[x]=y[x]);zd(a,b)}else zd(a,y);else $t('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function kh(a,y){Lf.add(a,y)}function hm(a,y,x){x===void 0&&(x=null);var E=a[1];if(typeof x=="function"?x(E):typeof E=="string")return a.splice(1,1),E;if(y===void 0)throw Error("no "+(typeof x=="function"?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return y}Me.Object.defineProperties(de.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new Tc),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 Tc),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 Tc),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(pr(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&&(pr(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Ms},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new sd),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===Ms&&(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 sd),this.Ua.u=a,this.v(),this.g("segmentIndex",y,a))}},segmentFraction:{get:function(){return this.Ua!==null?this.Ua.o:0},set:function(a){isNaN(a)||0>a?a=0:1<a&&(a=1);var y=this.segmentFraction;y!==a&&(this.Ua===null&&(this.Ua=new sd),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:Wn},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new sd),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:or},set:function(a){var y=this.stretch;y!==a&&(pr(this),this.A.hg=a,this.v(),this.g("stretch",y,a))}},name:{get:function(){return this.A!==null?this.A.xa:""},set:function(a){var y=this.name;y!==a&&(pr(this),this.A.xa=a,this.part!==null&&(this.part.Rh=null),this.g("name",y,a))}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&ei(a,"0 <= value <= 1",de,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(qd(y,y.actualBounds)))}},filter:{get:function(){return this.bn},set:function(a){var y=this.bn;y!==a&&(this.bn=a,this.Uc=!0,this.g("filter",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(qd(y,y.actualBounds)))}},visible:{get:function(){return(this.l&1)!==0},set:function(a){var y=(this.l&1)!==0;y!==a&&(this.l^=1,this.g("visible",y,a),y=this.panel,y!==null?y.v():this.Dd()&&this.Zb(a),this.N(),Uy(this))}},pickable:{get:function(){return(this.l&2)!==0},set:function(a){var y=(this.l&2)!==0;y!==a&&(this.l^=2,this.g("pickable",y,a))}},fromLinkableDuplicates:{get:function(){return(this.l&4)!==0},set:function(a){var y=(this.l&4)!==0;y!==a&&(this.l^=4,this.g("fromLinkableDuplicates",y,a))}},fromLinkableSelfNode:{get:function(){return(this.l&8)!==0},set:function(a){var y=(this.l&8)!==0;y!==a&&(this.l^=8,this.g("fromLinkableSelfNode",y,a))}},toLinkableDuplicates:{get:function(){return(this.l&16)!==0},set:function(a){var y=(this.l&16)!==0;y!==a&&(this.l^=16,this.g("toLinkableDuplicates",y,a))}},toLinkableSelfNode:{get:function(){return(this.l&32)!==0},set:function(a){var y=(this.l&32)!==0;y!==a&&(this.l^=32,this.g("toLinkableSelfNode",y,a))}},isPanelMain:{get:function(){return(this.l&64)!==0},set:function(a){var y=(this.l&64)!==0;y!==a&&(this.l^=64,this.v(),this.g("isPanelMain",y,a))}},isActionable:{get:function(){return(this.l&128)!==0},set:function(a){var y=(this.l&128)!==0;y!==a&&(this.l^=128,this.g("isActionable",y,a))}},areaBackground:{get:function(){return this.A!==null?this.A.gd:null},set:function(a){var y=this.areaBackground;y!==a&&(a!==null&&Bc(a,"GraphObject.areaBackground"),a instanceof ro&&a.freeze(),pr(this),this.A.gd=a,this.N(),this.g("areaBackground",y,a))}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&Bc(a,"GraphObject.background"),a instanceof ro&&a.freeze(),this.Ma=a,this.N(),this.g("background",y,a))}},part:{get:function(){if(this.Dd())return this;if(this.Ng!==null)return this.Ng;var a;for(a=this.panel;a;){if(a instanceof Fi)return this.Ng=a;a=a.panel}return null}},svg:{get:function(){return this.V},set:function(a){this.V=a}},panel:{get:function(){return this.Me}},layer:{get:function(){var a=this.part;return a!==null?a.layer:null}},diagram:{get:function(){var a=this.part;return a!==null?a.diagram:null}},position:{get:function(){return this.pa},set:function(a){var y=a.x,x=a.y,E=this.pa,b=E.x;E=E.y,(b===y||isNaN(b)&&isNaN(y))&&(E===x||isNaN(E)&&isNaN(x))?this.Av():(a=a.copy(),this.zv(a,b,E)&&this.g("position",new Tt(b,E),a))}},actualBounds:{get:function(){return this.Ib}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&(0>=a&&$t("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,Uy(this),this.v(),this.g("angle",y,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var y=a.width,x=a.height,E=this.jd,b=E.width,z=E.height;(b===y||isNaN(b)&&isNaN(y))&&(z===x||isNaN(z)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof dr&&this.qc(),this.g("desiredSize",E,a),$a(this)&&(a=this.part,a!==null&&(Zo(this,a,"width"),Zo(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 Ut(a,this.jd.height).freeze(),this.v(),this instanceof dr&&this.qc(),this.g("desiredSize",y,a),$a(this)&&(a=this.part,a!==null&&Zo(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 Ut(this.jd.width,a).freeze(),this.v(),this instanceof dr&&this.qc(),this.g("desiredSize",y,a),$a(this)&&(a=this.part,a!==null&&Zo(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:oe},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(),pr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:Sn},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(),pr(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 ii(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&&Ya(this),this.Ab}},oe:{get:function(){return this.l&4096&&Ya(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(pr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:en},set:function(a){this.reshapingBehavior!==a&&(pr(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()&&$t("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),ws(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&&ei(a,">= 0",de,"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&&ei(a,">= 1",de,"columnSpan"),pr(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&&ei(a,">= 0",de,"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&&ei(a,">= 1",de,"rowSpan"),pr(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&&(pr(this),this.A.Di=a,this.v(),this.g("spanAllocation",y,a))}},alignmentFocus:{get:function(){return this.sk},set:function(a){var y=this.sk;y.D(a)||(this.sk=a=a.J(),this.v(),this.g("alignmentFocus",y,a))}},portId:{get:function(){return this.Yn},set:function(a){var y=this.Yn;if(y!==a){var x=this.part;x===null||x instanceof Hn||$t("Cannot set portID on a Link: "+a),y!==null&&x!==null&&Gv(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,YS(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:Li},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Yd(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&ei(a,">= 0",de,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Yd(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),Yd(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&&ei(a,">= 0",de,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:Li},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Yd(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&ei(a,">= 0",de,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Yd(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),Yd(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&&ei(a,">= 0",de,"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&&(pr(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&&(pr(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&&(pr(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&&(pr(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&&(pr(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&&(pr(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&&(pr(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&&(pr(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&&(pr(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&&(pr(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&&(pr(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&&(pr(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&&(pr(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&&(pr(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&&(pr(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&&(pr(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&&(pr(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&&(pr(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),de.prototype.trigger=de.prototype.Jv,de.prototype.findBindingPanel=de.prototype.ih,de.prototype.findTemplateBinder=de.prototype.pz,de.prototype.setProperties=de.prototype.nm,de.prototype.apply=de.prototype.apply,de.prototype.attach=de.prototype.Du,de.prototype.set=de.prototype.set,de.prototype.isEnabledObject=de.prototype.If,de.prototype.isVisibleObject=de.prototype.Ed,de.prototype.isContainedBy=de.prototype.rg,de.prototype.getNearestIntersectionPoint=de.prototype.rs,de.prototype.getLocalPoint=de.prototype.qs,de.prototype.getDocumentScale=de.prototype.Df,de.prototype.getDocumentAngle=de.prototype.li,de.prototype.getDocumentBounds=de.prototype.mi,de.prototype.getDocumentPoint=de.prototype.ga,de.prototype.intersectsRect=de.prototype.Yc,de.prototype.containedInRect=de.prototype.fh,de.prototype.containsRect=de.prototype.Re,de.prototype.containsPoint=de.prototype.ca,de.prototype.raiseChanged=de.prototype.g,de.prototype.raiseChangedEvent=de.prototype.cb,de.prototype.addCopyProperty=de.prototype.Vw;var Lf=null;de.className="GraphObject",Lf=new be,kh("Button",function(){function a(x,E){return x.diagram.ic(x.documentPoint,function(b){for(;b.panel!==null&&!b.isActionable;)b=b.panel;return b},function(b){return b===E})!==null}var y=wl(mn,mn.Auto,{isActionable:!0,enabledChanged:function(x,E){if(x instanceof mn){var b=x.fb("ButtonBorder");b!==null&&(b.fill=E?x._buttonFillNormal:x._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD",_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},wl(dr,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Xe(0,0,2.76142374915397,2.761423749153969),spot2:new Xe(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));return y.mouseEnter=function(x,E){if(E.If()&&E instanceof mn&&(x=E.fb("ButtonBorder"),x instanceof dr)){var b=E._buttonFillOver;E._buttonFillNormal=x.fill,x.fill=b,b=E._buttonStrokeOver,E._buttonStrokeNormal=x.stroke,x.stroke=b}},y.mouseLeave=function(x,E){E.If()&&E instanceof mn&&(x=E.fb("ButtonBorder"),x instanceof dr&&(x.fill=E._buttonFillNormal,x.stroke=E._buttonStrokeNormal))},y.actionDown=function(x,E){if(E.If()&&E instanceof mn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof dr){x=x.diagram;var z=x.skipsUndoManager;x.skipsUndoManager=!0;var tt=E._buttonFillPressed;E._buttonFillOver=b.fill,b.fill=tt,tt=E._buttonStrokePressed,E._buttonStrokeOver=b.stroke,b.stroke=tt,x.skipsUndoManager=z}}},y.actionUp=function(x,E){if(E.If()&&E instanceof mn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof dr){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,E)?(b.fill=E._buttonFillOver,b.stroke=E._buttonStrokeOver):(b.fill=E._buttonFillNormal,b.stroke=E._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionCancel=function(x,E){if(E.If()&&E instanceof mn&&E._buttonFillPressed!==null){var b=E.fb("ButtonBorder");if(b instanceof dr){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,E)?(b.fill=E._buttonFillOver,b.stroke=E._buttonStrokeOver):(b.fill=E._buttonFillNormal,b.stroke=E._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionMove=function(x,E){if(E.If()&&E instanceof mn&&E._buttonFillPressed!==null){var b=x.diagram;if(b.firstInput.button===0&&(b.currentTool.standardMouseOver(),a(x,E)&&(x=E.fb("ButtonBorder"),x instanceof dr))){var z=b.skipsUndoManager;b.skipsUndoManager=!0;var tt=E._buttonFillPressed;x.fill!==tt&&(x.fill=tt),tt=E._buttonStrokePressed,x.stroke!==tt&&(x.stroke=tt),b.skipsUndoManager=z}}},y}),kh("TreeExpanderButton",function(){var a=wl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},wl(dr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:He},new Sa("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Sa("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof Zr&&(x=x.adornedPart),x instanceof Hn){var E=x.diagram;if(E!==null){if(E=E.commandHandler,x.isTreeExpanded){if(!E.canCollapseTree(x))return}else if(!E.canExpandTree(x))return;y.handled=!0,x.isTreeExpanded?E.collapseTree(x):E.expandTree(x)}}},a}),kh("SubGraphExpanderButton",function(){var a=wl("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},wl(dr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:He},new Sa("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 Zr&&(x=x.adornedPart),x instanceof ir){var E=x.diagram;if(E!==null){if(E=E.commandHandler,x.isSubGraphExpanded){if(!E.canCollapseSubGraph(x))return}else if(!E.canExpandSubGraph(x))return;y.handled=!0,x.isSubGraphExpanded?E.collapseSubGraph(x):E.expandSubGraph(x)}}},a}),kh("ToolTip",function(){return wl(Zr,mn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Tt(0,3),shadowBlur:5},wl(dr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Xe(0,0,4,6),spot2:new Xe(1,1,-4,-4)}))}),kh("ContextMenu",function(){return wl(Zr,mn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Tt(0,3),shadowBlur:5},new Sa("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),kh("ContextMenuButton",function(){var a=wl("Button");a.stretch=ki;var y=a.fb("ButtonBorder");return y instanceof dr&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new Xe(0,0,2,3),y.spot2=new Xe(1,1,-2,-2)),a}),kh("PanelExpanderButton",function(a){var y=hm(a,"COLLAPSIBLE"),x=wl("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},wl(dr,{name:"ButtonIcon",strokeWidth:2},new Sa("geometryString","visible",function(E){return E?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof dr&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(E,b){var z=b.diagram;if(z!==null&&!z.isReadOnly){var tt=b.ih();tt===null&&(tt=b.part),tt!==null&&(b=tt.fb(y),b!==null&&(E.handled=!0,z.Ea("Collapse/Expand Panel"),b.visible=!b.visible,z.eb("Collapse/Expand Panel")))}},x}),kh("CheckBoxButton",function(a){var y=hm(a);return a=wl("Button",{desiredSize:new Ut(14,14)},wl(dr,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:fn,geometryStretch:gi,visible:!1},y!==""?new Sa("visible",y).Kx():[])),a.click=function(x,E){if(E instanceof mn){var b=x.diagram;if(!(b===null||b.isReadOnly||y!==""&&b.model.isReadOnly)){x.handled=!0;var z=E.fb("ButtonIcon");b.Ea("checkbox"),z.visible=!z.visible,typeof E._doClick=="function"&&E._doClick(x,E),b.eb("checkbox")}}},a}),kh("CheckBox",function(a){a=hm(a),a=wl("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new ii(0,1,0,0)});var y=wl(mn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new ii(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}),de.None=en=new Ve(de,"None",0),de.Default=or=new Ve(de,"Default",0),de.Vertical=ji=new Ve(de,"Vertical",4),de.Horizontal=ki=new Ve(de,"Horizontal",5),de.Fill=fn=new Ve(de,"Fill",3),de.Uniform=gi=new Ve(de,"Uniform",1),de.UniformToFill=Fr=new Ve(de,"UniformToFill",2),de.FlipVertical=vr=new Ve(de,"FlipVertical",1),de.FlipHorizontal=jr=new Ve(de,"FlipHorizontal",2),de.FlipBoth=fo=new Ve(de,"FlipBoth",3),de.make=wl,de.getBuilders=function(){var a=new be,y;for(y in Lf)if(y!==y.toLowerCase()){var x=Lf.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},de.defineBuilder=kh,de.build=function(a,y,x){for(var E=[],b=2;b<arguments.length;++b)E[b-2]=arguments[b];if(b=Lf.I(a),typeof b=="function"&&(E=b([a].concat(E)),E instanceof de))return y&&E.set(y),E;$t('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},de.takeBuilderArgument=hm;function Tc(){this.nc=!1,this.xa="",this.zp=-1,this.nb=this.wm=this.te=null,this.j="",this.hb=this.Di=this.Hb=this.Ch=this.$h=this.F=this.Ha=this.ia=this.V=this.Lh=this.Xd=this.Of=this.Nh=this.Oh=this.Qh=this.Ph=this.Mh=this.Bh=this.Fh=this.zh=null,this.u=oe,this.o=Sn,this.hg=or,this.ob=this.Bi=1,this.Pf=en,this.Pc=this.Ci=this.gd=null,this.Oc="category"}Tc.prototype.copy=function(){var a=new Tc;return a.xa=this.xa,a.zp=this.zp,a.te=this.te,a.nb=this.nb,a.j=this.j,a.zh=this.zh,a.Fh=this.Fh,a.Bh=this.Bh,a.Mh=this.Mh,a.Ph=this.Ph,a.Qh=this.Qh,a.Oh=this.Oh,a.Nh=this.Nh,a.Of=this.Of,a.Xd=this.Xd,a.Lh=this.Lh,a.V=this.V,a.ia=this.ia,a.Ha=this.Ha,a.F=this.F,a.$h=this.$h,a.Ch=this.Ch,a.Hb=this.Hb,a.Di=this.Di,a.hb=this.hb,a.u=this.u.J(),a.o=this.o.J(),a.hg=this.hg,a.Bi=this.Bi,a.ob=this.ob,a.Pf=this.Pf,a.gd=this.gd,a.Ci=this.Ci,a.Pc=this.Pc,a.Oc=this.Oc,a};function sd(){this.u=-1/0,this.o=0,this.F=Wn,this.rr=Ms,this.j=this.V="None"}sd.prototype.copy=function(){var a=new sd;return a.u=this.u,a.o=this.o,a.F=this.F.J(),a.rr=this.rr,a.V=this.V,a.j=this.j,a},sd.className="LinkElementSettings";function Vg(){this.yj=this.Xi=xo,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}Vg.prototype.copy=function(){var a=new Vg;return a.Xi=this.Xi.J(),a.yj=this.yj.J(),a.Vi=this.Vi,a.wj=this.wj,a.Wi=this.Wi,a.xj=this.xj,a.hq=this.hq,a.Tr=this.Tr,a.iq=this.iq,a.Ur=this.Ur,a},Vg.className="LinkSettings";function Ud(){this.ha=[1,0,0,1,0,0]}Ud.prototype.copy=function(){var a=new Ud;return a.ha[0]=this.ha[0],a.ha[1]=this.ha[1],a.ha[2]=this.ha[2],a.ha[3]=this.ha[3],a.ha[4]=this.ha[4],a.ha[5]=this.ha[5],a},Ud.prototype.translate=function(a,y){this.ha[4]+=this.ha[0]*a+this.ha[2]*y,this.ha[5]+=this.ha[1]*a+this.ha[3]*y},Ud.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},Ud.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a!==0){if(this.translate(y,x),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));var b=this.ha[1]*a+this.ha[3]*E,z=this.ha[0]*-E+this.ha[2]*a,tt=this.ha[1]*-E+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*E,this.ha[1]=b,this.ha[2]=z,this.ha[3]=tt,this.translate(-y,-x)}},Ud.className="STransform";function Dc(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Dc.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Dc.className="SGradient";function Cu(a,y,x){this.ownerDocument=a=y===void 0?Dn.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 qs(this,x)}Cu.prototype.resize=function(a,y,x,E){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=E+"px",this.Oa.setAttributeNS(null,"width",x+"px"),this.Oa.setAttributeNS(null,"height",E+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+x+" "+E),this.context.ww.firstElementChild.setAttributeNS(null,"width",x+"px"),this.context.ww.firstElementChild.setAttributeNS(null,"height",E+"px"),!0):!1},Cu.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),_e(y))for(var E in y)a.setAttributeNS(E==="href"?"http://www.w3.org/1999/xlink":"",E,y[E]);return x!==void 0&&(a.textContent=x),a},Cu.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Cu.prototype.focus=function(){this.Oa.focus()},Cu.prototype.mx=function(){this.ownerDocument=null},Me.Object.defineProperties(Cu.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}}}),Cu.className="SVGSurface";function qs(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 Ud,this.j=dm(this),this.Nj=dm(this,"gojs-diagram"),this.Hl=this.ti=null;var x=zo++,E=this.Ud("clipPath",{id:"mainClip"+x});E.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height})),this.ww=E,this.svg.appendChild(this.j),this.j.appendChild(this.Nj),this.svg.appendChild(E),this.j.setAttributeNS(null,"clip-path","url(#mainClip"+x+")"),this.eA={},this.isTemporary=!!y,this.filter="",this.bk=null}function Xy(a,y,x,E,b,z,tt){a.Nj===void 0?Kg(a,y,x,E,b,z,tt):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+E+", "+b+", "+z+", "+tt+")")}Ct=qs.prototype,Ct.arc=function(a,y,x,E,b,z,tt,rt){var ot=2*Math.PI,st=ot-1e-6,ut=x*Math.cos(E),ft=x*Math.sin(E),vt=a+ut,yt=y+ft,Pt=z?0:1;E=z?E-b:b-E,(1e-6<Math.abs(tt-vt)||1e-6<Math.abs(rt-yt))&&this.path.push(["L",vt,+yt]),0>E&&(E=E%ot+ot),E>st?(this.path.push(["A",x,x,0,1,Pt,a-ut,y-ft]),this.path.push(["A",x,x,0,1,Pt,vt,yt])):1e-6<E&&this.path.push(["A",x,x,0,+(E>=Math.PI),Pt,a+x*Math.cos(b),y+x*Math.sin(b)])},Ct.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},Ct.Se=function(a){this.addPath(this.path,this.rb,a||0)},Ct.bezierCurveTo=function(a,y,x,E,b,z){this.path.push(["C",a,y,x,E,b,z])},Ct.clearRect=function(){},Ct.clip=function(){this.Yl.clipPath=!0},Ct.closePath=function(){this.path.push(["z"])},Ct.createLinearGradient=function(a,y,x,E){var b=new Dc("linear");return b.x1=a,b.y1=y,b.x2=x,b.y2=E,b},Ct.createPattern=function(a){var y="";a instanceof HTMLCanvasElement&&(y=a.toDataURL()),a instanceof HTMLImageElement&&(y=a.getAttribute("src"));var x=this.eA;if(x[y])return"url(#"+x[y]+")";var E="PATTERN"+zo++,b={x:0,y:0,width:a.width,height:a.height,href:y};return a=this.Ud("pattern",{width:a.width,height:a.height,id:E,patternUnits:"userSpaceOnUse"}),a.appendChild(this.Ud(Vd,b)),this.svg.appendChild(a),x[y]=E,"url(#"+E+")"},Ct.createRadialGradient=function(a,y,x,E,b,z){var tt=new Dc("radial");return tt.x1=a,tt.y1=y,tt.r1=x,tt.x2=E,tt.y2=b,tt.r2=z,tt};function Jy(a,y,x,E,b,z,tt,rt,ot){E=rt/E,b=ot/b,z===0&&tt===0||a.rb.translate(z,tt),E===1&&b===1||a.rb.scale(E,b),y===0&&x===0||a.rb.translate(-y,-x)}Ct.drawImage=function(a,y,x,E,b,z,tt,rt,ot){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,E===void 0&&(z=y,tt=x,rt=E=ut,ot=b=a),E=E||0,b=b||0,rt=rt||0,ot=ot||0,Jy(this,y,x,E,b,z||0,tt||0,rt,ot),z={x:0,y:0,width:ut||E,height:a||b,href:st},le.$(E,rt)&&le.$(b,ot)?st.toLowerCase().indexOf(".svg")===-1&&st.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||E!==ut||b!==a)&&(E+=y,b+=x,z["clip-path"]="path('M "+y+","+x+" L "+E+" "+x+" L "+E+" "+b+" L "+y+" "+b+" z')"),kf(this,Vd,z,this.rb),this.addElement(Vd,z)},Ct.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),iv(this,this.Yl)},Ct.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},Ct.fillRect=function(a,y,x,E){a=[a,y,x,E],a={x:a[0],y:a[1],width:a[2],height:a[3]},kf(this,"fill",a,this.rb),this.addElement("rect",a)},Ct.ox=function(a,y,x,E){a={x:a,y,width:x,height:E},kf(this,"fill",a,this.rb),iv(this,a),this.svg.prepend(this.Ud("rect",a))},Ct.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},kf(this,"fill",y,this.rb),this.addElement("text",y,a[0])},Ct.lineTo=function(a,y){this.path.push(["L",a,y])},Ct.moveTo=function(a,y){this.path.push(["M",a,y])},Ct.quadraticCurveTo=function(a,y,x,E){this.path.push(["Q",a,y,x,E])},Ct.rect=function(a,y,x,E){this.path.push(["M",a,y],["L",a+x,y],["L",a+x,y+E],["L",a,y+E],["z"])},Ct.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},Ct.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,lineDashOffset:this.lineDashOffset,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign,bk:this.bk});for(var a=[],y=0;y<this.path.length;y++)a.push(this.path[y]);this.stack.push(a),this.stack.push(this.rb.copy())},Ct.setTransform=function(a,y,x,E,b,z){a===1&&y===0&&x===0&&E===1&&b===0&&z===0||Kg(this,a,y,x,E,b,z)};function Qy(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}Ct.scale=function(a,y){this.rb.scale(a,y)},Ct.translate=function(a,y){this.rb.translate(a,y)},Ct.transform=function(){},Ct.yc=function(){},Ct.stroke=function(){qy(this,this.Yl)},Ct.jk=function(){this.clipInsteadOfFill||this.stroke()},Ct.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},Ct.addElement=function(a,y,x){return a=this.Ud(a,y,x),this.yd!==null?this.yd.appendChild(a):this.yd=a,this.ad=a};function kf(a,y,x,E){y==="fill"?iv(a,x):y==="stroke"&&qy(a,x),E!==null&&(a=E.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function iv(a,y){a.fillStyle instanceof Dc?y.fill=rv(a,a.fillStyle,!0):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.fill="rgb("+a[1]+","+a[2]+","+a[3]+")",y["fill-opacity"]=a[4]):y.fill=a.fillStyle}function _y(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof Dc?y.setAttributeNS(null,"fill",rv(a,a.fillStyle,!0)):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.setAttributeNS(null,x,"rgb("+a[1]+","+a[2]+","+a[3]+")"),y.setAttributeNS(null,x+"-opacity",a[4])):y.setAttributeNS(null,x,a.fillStyle)}function qy(a,y){if(a.strokeStyle instanceof Dc)y.stroke=rv(a,a.strokeStyle,!1);else if(/^rgba\(/.test(a.strokeStyle)){var x=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.strokeStyle);y.stroke="rgb("+x[1]+","+x[2]+","+x[3]+")",y["stroke-opacity"]=x[4]}else y.stroke=a.strokeStyle;y["stroke-width"]=a.lineWidth,y["stroke-linecap"]=a.lineCap,y["stroke-linejoin"]=a.lineJoin,y["stroke-miterlimit"]=a.miterLimit,a.Ct&&(y["stroke-dasharray"]=a.Yg.toString(),y["stroke-dashoffset"]=a.uj)}function rv(a,y,x){var E="";if(E=a.Hl!==null?a.Hl.getAttribute(x?"fill":"stroke"):null,E!==null&&E.indexOf("GRAD")!==-1?(E=E.split("#")[1].slice(0,-1),x=a.svg.getElementById(E),x!==null&&x.remove()):E="GRAD"+zo++,y.type==="linear")x=a.Ud("linearGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,id:E,gradientUnits:"userSpaceOnUse"});else if(y.type==="radial")x=a.Ud("radialGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,r1:y.r1,r2:y.r2,id:E});else throw Error("invalid gradient");var b=y.gx;y=b.length;for(var z=[],tt=0;tt<y;tt++){var rt=b[tt],ot=rt.color;rt={offset:rt.offset,"stop-color":ot},/^rgba\(/.test(ot)&&(ot=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(ot),rt["stop-color"]="rgb("+ot[1]+","+ot[2]+","+ot[3]+")",rt["stop-opacity"]=ot[4]),z.push(rt)}for(z.sort(function(st,ut){return st.offset>ut.offset?1:-1}),b=0;b<y;b++)x.appendChild(a.Ud("stop",z[b]));return a.svg.appendChild(x),"url(#"+E+")"}Ct.addPath=function(a,y,x){for(var E=[],b=0;b<a.length;b++){var z=$n(a[b]),tt=[z.shift()];if(tt[0]==="A")tt.push(z.shift()+","+z.shift(),z.shift(),z.shift()+","+z.shift(),z.shift()+","+z.shift());else for(;z.length;)tt.push(z.shift()+","+z.shift());E.push(tt.join(" "))}if(E=E.join(" "),a=this.Yl,a.clipPath)0<this.nh.length&&this.nh[this.nh.length-1].setAttributeNS(null,"clip-path",'path("'+E+'")');else if(a.d=E,kf(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var rt in a)rt!=="transform"&&y.setAttributeNS(null,rt,a[rt]);else{rt=y.getElementsByTagName("path");for(var ot in a)ot!=="transform"&&rt[x].setAttributeNS(null,ot,a[ot])}else this.addElement("path",a)};function Kg(a,y,x,E,b,z,tt){var rt=new Ud;rt.ha=[y,x,E,b,z,tt],y={},kf(a,"g",y,rt),rt=a.addElement("g",y),a.nh.push(rt)}function dm(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}Ct.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function Iu(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function eh(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}Ct.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},Ct.fs=function(){this.Ct=!1},Ct.Vc=function(){},Ct.Wx=function(){},qs.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},qs.prototype.getImageData=function(){return null},qs.prototype.measureText=function(){return null};function cm(a,y){y=y.getAttribute("fill"),y!==null&&(y=y.split("#"),y.length!==1&&(y=a.svg.getElementById(y[1].slice(0,-1)),y!==null&&a.svg.innerHTML.match(new RegExp(y.id,"g")).length===1&&y.remove()))}qs.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},qs.className="SVGContext",ke.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Cu(this,Dn.document));var y=new Cu(this,Dn.document,!0);a===void 0&&(a=new Hi);var x=this;return Mc(this,function(E,b){return E=am(x,E,"SVG",y),E=E!==null?E.svg:null,typeof b=="function"?(b(E),null):E},a)},ke.prototype.makeSvg=ke.prototype.Cs,ke.prototype.av=function(a){return this.Cs(a)},ke.prototype.makeSVG=ke.prototype.av;function Il(a,y,x,E){this.ownerDocument=y=y===void 0?Dn.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new Xd(y,x,E),y.H=a}Il.prototype.resize=function(a,y,x,E){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=E+"px",!0):!1},Il.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},Il.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Il.prototype.focus=function(){this.Oa.focus()},Il.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},Me.Object.defineProperties(Il.prototype,{width:{get:function(){return this.Oa.width},set:function(a){this.Oa.width=a}},height:{get:function(){return this.Oa.height},set:function(a){this.Oa.height=a}},style:{get:function(){return this.Oa.style}}}),Il.className="CanvasSurface";function Xd(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&$t("Browser does not support HTML Canvas Element"),this.ct=this.et=this.dt="",this.Hm=!1,this.Vg=this.Br=this.Ar=0,this.Il=!1,this.El=new Un,this.isTemporary=!!x}Ct=Xd.prototype,Ct.Wx=function(a){this.Z.imageSmoothingEnabled=a},Ct.arc=function(a,y,x,E,b,z){this.Z.arc(a,y,x,E,b,z)},Ct.beginPath=function(){this.Z.beginPath()},Ct.Se=function(){},Ct.bezierCurveTo=function(a,y,x,E,b,z){this.Z.bezierCurveTo(a,y,x,E,b,z)},Ct.clearRect=function(a,y,x,E){this.yc(),this.Z.clearRect(a,y,x,E)},Ct.clip=function(){this.Z.clip()},Ct.closePath=function(){this.Z.closePath()},Ct.createLinearGradient=function(a,y,x,E){return this.Z.createLinearGradient(a,y,x,E)},Ct.createPattern=function(a,y){return this.Z.createPattern(a,y)},Ct.createRadialGradient=function(a,y,x,E,b,z){return this.Z.createRadialGradient(a,y,x,E,b,z)},Ct.drawImage=function(a,y,x,E,b,z,tt,rt,ot){E===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,E,b,z,tt,rt,ot)},Ct.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},Ct.fillRect=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Ct.ox=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Ct.fillText=function(a,y,x){this.Z.fillText(a,y,x)},Ct.getImageData=function(a,y,x,E){return this.Z.getImageData(a,y,x,E)},Ct.lineTo=function(a,y){this.Z.lineTo(a,y)},Ct.measureText=function(a){return this.Z.measureText(a)},Ct.moveTo=function(a,y){this.Z.moveTo(a,y)},Ct.quadraticCurveTo=function(a,y,x,E){this.Z.quadraticCurveTo(a,y,x,E)},Ct.rect=function(a,y,x,E){this.Z.rect(a,y,x,E)},Ct.restore=function(){this.Z.restore()},Ct.save=function(){this.yc(),this.Z.save()},Xd.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},Ct=Xd.prototype,Ct.setTransform=function(a,y,x,E,b,z){this.El.setTransform(a,y,x,E,b,z)},Ct.scale=function(a,y){this.El.scale(a,y)},Ct.translate=function(a,y){this.El.translate(a,y)},Ct.stroke=function(){this.Z.stroke()},Ct.transform=function(a,y,x,E,b,z){if(a!==1||y!==0||x!==0||E!==1||b!==0||z!==0){var tt=this.El,rt=tt.m11*a+tt.m21*y;a=tt.m12*a+tt.m22*y,y=tt.m11*x+tt.m21*E,x=tt.m12*x+tt.m22*E,tt.dx=tt.m11*b+tt.m21*z+tt.dx,tt.dy=tt.m12*b+tt.m22*z+tt.dy,tt.m11=rt,tt.m12=a,tt.m21=y,tt.m22=x}},Ct.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},Ct.ng=function(a,y){if(a instanceof ro&&a.type===Cl){var x=a.yk;a=a.ft,a>x?(this.scale(x/a,1),this.translate((a-x)/2,0)):x>a&&(this.scale(1,a/x),this.translate(0,(x-a)/2)),this.Hm?this.clip():this.fill(y),a>x?(this.translate(-(a-x)/2,0),this.scale(1/(x/a),1)):x>a&&(this.translate(0,-(x-a)/2),this.scale(1,1/(a/x)))}else this.Hm?this.clip():this.fill(y)},Ct.jk=function(){this.Hm||this.stroke()},Ct.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},Ct.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},Ct.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(mx),a.lineDashOffset=0)},Ct.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},Ct.Hs=function(){},Me.Object.defineProperties(Xd.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([]);Xd.className="CanvasSurfaceContext";function Yg(){this.F=this.o=this.u=this.j=0}Yg.className="ColorNumbers";function ro(a,y){Ff||(hv(),Ff=!0),Ri(this),this._isFrozen=!1,a===void 0?(this.na=Mh,this.xk="black"):typeof a=="string"?(this.na=Mh,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===ih?(this.Qd=ar,this.Lk=Dr):this.Lk=a===Cl?this.Qd=fi:this.Qd=Li,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}ro.prototype.copy=function(){var a=new ro;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},Ct=ro.prototype,Ct.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Ct.ka=function(){return Object.isFrozen(this)&&$t("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Ct.qb=function(a){a.classType===ro&&(this.type=a)},Ct.toString=function(){var a="Brush(";if(this.type===Mh)a+=this.color;else if(a=this.type===ih?a+"Linear ":this.type===Cl?a+"Radial ":this.type===bf?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+")"},Ct.addColorStop=function(a,y){return this._isFrozen&&pn(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&ei(a,"0 <= loc <= 1",ro,"addColorStop:loc"),this.we===null&&(this.we=new be),this.we.add(a,y),this.na===Mh&&(this.type=ih),this.xe=null,this},Ct.Vz=function(a,y){if(this._isFrozen&&pn(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Nf:y,this.type===Mh)nh(this.color),this.color=Ef(a,y);else if((this.type===ih||this.type===Cl)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)nh(x.value),this.addColorStop(x.key,Ef(a,y));return this};function $y(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Nf:x,nh(a),Ef(y,x)}Ct.Wy=function(a,y){if(this._isFrozen&&pn(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Nf:y,this.type===Mh)nh(this.color),this.color=Ef(-a,y);else if((this.type===ih||this.type===Cl)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)nh(x.value),this.addColorStop(x.key,Ef(-a,y));return this};function tS(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Nf:x,nh(a),Ef(-y,x)}function ov(a,y,x){nh(a),a=Ro.j;var E=Ro.u,b=Ro.o,z=Ro.F;return nh(y),x===void 0&&(x=.5),"rgba("+Math.round((Ro.j-a)*x+a)+", "+Math.round((Ro.u-E)*x+E)+", "+Math.round((Ro.o-b)*x+b)+", "+Math.round((Ro.F-z)*x+z)+")"}Ct.Gx=function(){if(this.type===Mh)return Mf(this.color);if((this.type===ih||this.type===Cl)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Cl)return Mf(a.first().value);if(a.get(.5)!==null)return Mf(a.get(.5));if(a.count===2)return a=a.Fa(),Mf(ov(a[0].value,a[1].value));for(var y=a.iterator,x=-1,E=-1,b=1,z=1;y.next();){var tt=y.key,rt=Math.abs(.5-y.key);b>z&&rt<b?(x=tt,b=rt):z>=b&&rt<z&&(E=tt,z=rt)}return x>E&&(z=x,x=E,E=z,z=b),b=E-x,Mf(ov(a.get(x),a.get(E),1-z/b))}return!1};function Mf(a){return a?a instanceof ro?a.Gx():(nh(a),128>(299*Ro.j+587*Ro.u+114*Ro.o)/1e3):!1}function Ef(a,y){switch(y){case Nf:y=100*sv(Ro.j);var x=100*sv(Ro.u),E=100*sv(Ro.o);return Ls.j=.4124564*y+.3575761*x+.1804375*E,Ls.u=.2126729*y+.7151522*x+.072175*E,Ls.o=.0193339*y+.119192*x+.9503041*E,Ls.F=Ro.F,y=uv(Ls.j/Af[0]),x=uv(Ls.u/Af[1]),E=uv(Ls.o/Af[2]),Ru.j=116*x-16,Ru.u=500*(y-x),Ru.o=200*(x-E),Ru.F=Ls.F,Ru.j=Math.min(100,Math.max(0,Ru.j+100*a)),a=(Ru.j+16)/116,y=a-Ru.o/200,Ls.j=Af[0]*eS(Ru.u/500+a),Ls.u=Af[1]*(Ru.j>fm*dv?Math.pow(a,3):Ru.j/fm),Ls.o=Af[2]*eS(y),Ls.F=Ru.F,a=-.969266*Ls.j+1.8760108*Ls.u+.041556*Ls.o,y=.0556434*Ls.j+-.2040259*Ls.u+1.0572252*Ls.o,Ro.j=255*lv((3.2404542*Ls.j+-1.5371385*Ls.u+-.4985314*Ls.o)/100),Ro.u=255*lv(a/100),Ro.o=255*lv(y/100),Ro.F=Ls.F,Ro.j=Math.round(Ro.j),255<Ro.j?Ro.j=255:0>Ro.j&&(Ro.j=0),Ro.u=Math.round(Ro.u),255<Ro.u?Ro.u=255:0>Ro.u&&(Ro.u=0),Ro.o=Math.round(Ro.o),255<Ro.o?Ro.o=255:0>Ro.o&&(Ro.o=0),"rgba("+Ro.j+", "+Ro.u+", "+Ro.o+", "+Ro.F+")";case nS:return av(),ul.o=Math.min(100,Math.max(0,ul.o+100*a)),"hsla("+ul.j+", "+ul.u+"%, "+ul.o+"%, "+ul.F+")";default:$t("Unknown color space: "+y)}}function nh(a){Ff||(hv(),Ff=!0);var y=cv;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,Ro.j=a[0],Ro.u=a[1],Ro.o=a[2],Ro.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Ro.j=0,Ro.u=0,Ro.o=0,Ro.F=1)}}function av(){var a=Ro.j/255,y=Ro.u/255,x=Ro.o/255,E=Math.max(a,y,x),b=Math.min(a,y,x),z=E-b;if(b=(E+b)/2,z===0)var tt=a=0;else{switch(E){case a:tt=(y-x)/z%6;break;case y:tt=(x-a)/z+2;break;case x:tt=(a-y)/z+4}tt*=60,0>tt&&(tt+=360),a=z/(1-Math.abs(2*b-1))}ul.j=Math.round(tt),ul.u=Math.round(100*a),ul.o=Math.round(100*b),ul.F=Ro.F}function sv(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function lv(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function uv(a){return a>dv?Math.pow(a,1/3):(fm*a+16)/116}function eS(a){var y=a*a*a;return y>dv?y:(116*a-16)/fm}function Bc(a,y){typeof a!="string"&&(a instanceof ro||$t("Value for "+y+" must be a color string or a Brush, not "+a))}function hv(){cv=la?new Il(null,void 0,{willReadFrequently:!0}).context:null}Me.Object.defineProperties(ro.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&pn(this,a),this.na=a,this.start.Mc()&&(a===ih?this.start=ar:a===Cl&&(this.start=fi)),this.end.Mc()&&(a===ih?this.end=Dr:a===Cl&&(this.end=fi)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&pn(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&pn(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&pn(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&pn(this,a),0>a&&ei(a,">= zero",ro,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&pn(this,a),0>a&&ei(a,">= zero",ro,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&pn(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&pn(this,a),this.cr=a,this.xe=null}}}),ro.prototype.isDark=ro.prototype.Gx,ro.prototype.darkenBy=ro.prototype.Wy,ro.prototype.lightenBy=ro.prototype.Vz,ro.prototype.addColorStop=ro.prototype.addColorStop;var dv=216/24389,fm=24389/27,Af=[95.047,100,108.883],cv=null,Ro=new Yg,ul=new Yg,Ls=new Yg,Ru=new Yg,Ff=!1;ro.className="Brush";var Mh;ro.Solid=Mh=new Ve(ro,"Solid",0);var ih;ro.Linear=ih=new Ve(ro,"Linear",1);var Cl;ro.Radial=Cl=new Ve(ro,"Radial",2);var bf;ro.Pattern=bf=new Ve(ro,"Pattern",4);var Nf;ro.Lab=Nf=new Ve(ro,"Lab",5);var nS;ro.HSL=nS=new Ve(ro,"HSL",6),ro.randomColor=function(a,y){a===void 0&&(a=128),y===void 0&&(y=Math.max(a,255));var x=Math.abs(y-a);y=Math.floor(a+Math.random()*x).toString(16);var E=Math.floor(a+Math.random()*x).toString(16);return a=Math.floor(a+Math.random()*x).toString(16),2>y.length&&(y="0"+y),2>E.length&&(E="0"+E),2>a.length&&(a="0"+a),"#"+y+E+a},ro.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;Ff||(hv(),Ff=!0);var y=cv;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)},ro.lighten=function(a){return $y(a)},ro.lightenBy=$y,ro.darken=function(a){return tS(a)},ro.darkenBy=tS,ro.mix=ov,ro.isDark=Mf;function Fa(){this.xa="Base"}Fa.prototype.measure=function(){},Fa.prototype.Yz=function(a,y,x,E,b){a.measure(y,x,E,b)},Fa.prototype.arrange=function(){},Fa.prototype.Ly=function(a,y,x,E,b,z){a.arrange(y,x,E,b,z)},Fa.prototype.iA=function(a){a.Uj()},Fa.prototype.gc=function(){},Me.Object.defineProperties(Fa.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return mn}}}),Fa.prototype.remeasureObject=Fa.prototype.iA,Fa.prototype.arrangeElement=Fa.prototype.Ly,Fa.prototype.measureElement=Fa.prototype.Yz,Fa.className="PanelLayout";function gm(){this.xa="Base"}Oe(gm,Fa),gm.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length;a=rh(a);for(var ot=0;ot<rt;ot++){var st=E[ot];if(st.visible||st===a){var ut=st.margin,ft=ut.right+ut.left;ut=ut.top+ut.bottom,st.measure(y,x,z,tt);var vt=st.measuredBounds;ft=Math.max(vt.width+ft,0),ut=Math.max(vt.height+ut,0),vt=st.position.x;var yt=st.position.y;isFinite(vt)||(vt=0),isFinite(yt)||(yt=0),st instanceof dr&&st.isGeometryPositioned&&(st=st.strokeWidth/2,vt-=st,yt-=st),ui(b,vt,yt,ft,ut)}}},gm.prototype.arrange=function(a,y,x){var E=y.length,b=a.padding;for(a=x.x-b.left,x=x.y-b.top,b=0;b<E;b++){var z=y[b],tt=z.measuredBounds,rt=z.margin,ot=z.position.x,st=z.position.y;if(ot=isNaN(ot)?-a:ot-a,st=isNaN(st)?-x:st-x,z instanceof dr&&z.isGeometryPositioned){var ut=z.strokeWidth/2;ot-=ut,st-=ut}z.visible&&z.arrange(ot+rt.left,st+rt.top,tt.width,tt.height)}};function pm(){this.xa="Base"}Oe(pm,Fa),pm.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length;y=Ei(),z=rh(a);for(var ot=0;ot<rt;ot++){var st=E[ot];if(st.visible||st===z){var ut=Os(st,!1);if(ut!==en&&ut!==ki)y.push(st);else{st.measure(1/0,x,0,tt),ut=st.margin,st=st.measuredBounds;var ft=Math.max(st.height+ut.top+ut.bottom,0);b.width+=Math.max(st.width+ut.right+ut.left,0),b.height=Math.max(b.height,ft)}}}for(E=y.length,a.desiredSize.height?x=Math.min(a.desiredSize.height,a.maxSize.height):b.height!==0&&(x=Math.min(b.height,a.maxSize.height)),a=0;a<E;a++)ot=y[a],(ot.visible||ot===z)&&(ut=ot.margin,rt=ut.right+ut.left,ut=ut.top+ut.bottom,ot.measure(1/0,x,0,tt),ot=ot.measuredBounds,ut=Math.max(ot.height+ut,0),b.width+=Math.max(ot.width+rt,0),b.height=Math.max(b.height,ut));ri(y)},pm.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.top,tt=a.isOpposite,rt=tt?x.width:b.left,ot=0;ot<E;ot++){var st=z,ut=y[ot];if(ut.visible){var ft=ut.measuredBounds,vt=ut.margin,yt=vt.top+vt.bottom,Pt=z+b.bottom,Et=ft.height,Vt=Os(ut,!1);(isNaN(ut.desiredSize.height)&&Vt===fn||Vt===ji)&&(Et=Math.max(x.height-yt-Pt,0)),yt=Et+yt+Pt,Pt=ut.alignment,Pt.Xb()&&(Pt=a.defaultAlignment),Pt.sb()||(Pt=fi),tt&&(rt-=ft.width+vt.left+vt.right),ut.arrange(rt+Pt.offsetX+vt.left,st+Pt.offsetY+vt.top+(x.height*Pt.y-yt*Pt.y),ft.width,Et),tt||(rt+=ft.width+vt.left+vt.right)}}};function mm(){this.xa="Base"}Oe(mm,Fa),mm.prototype.measure=function(a,y,x,E,b,z){var tt=E.length;x=Ei();for(var rt=rh(a),ot=0;ot<tt;ot++){var st=E[ot];if(st.visible||st===rt){var ut=Os(st,!1);if(ut!==en&&ut!==ji)x.push(st);else{var ft=st.margin;ut=ft.right+ft.left,ft=ft.top+ft.bottom,st.measure(y,1/0,z,0),st=st.measuredBounds,En(b,Math.max(b.width,Math.max(st.width+ut,0)),b.height+Math.max(st.height+ft,0))}}}if(E=x.length,E!==0){for(a.desiredSize.width?y=Math.min(a.desiredSize.width,a.maxSize.width):b.width!==0&&(y=Math.min(b.width,a.maxSize.width)),a=0;a<E;a++)ot=x[a],(ot.visible||ot===rt)&&(st=ot.margin,tt=st.right+st.left,st=st.top+st.bottom,ot.measure(y,1/0,z,0),ot=ot.measuredBounds,st=Math.max(ot.height+st,0),b.width=Math.max(b.width,Math.max(ot.width+tt,0)),b.height+=st);ri(x)}},mm.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.left,tt=a.isOpposite,rt=tt?x.height:b.top,ot=0;ot<E;ot++){var st=z,ut=y[ot];if(ut.visible){var ft=ut.measuredBounds,vt=ut.margin,yt=vt.left+vt.right,Pt=z+b.right,Et=ft.width,Vt=Os(ut,!1);(isNaN(ut.desiredSize.width)&&Vt===fn||Vt===ki)&&(Et=Math.max(x.width-yt-Pt,0)),yt=Et+yt+Pt,Pt=ut.alignment,Pt.Xb()&&(Pt=a.defaultAlignment),Pt.sb()||(Pt=fi),tt&&(rt-=ft.height+vt.bottom+vt.top),ut.arrange(st+Pt.offsetX+vt.left+(x.width*Pt.x-yt*Pt.x),rt+Pt.offsetY+vt.top,Et,ft.height),tt||(rt+=ft.height+vt.bottom+vt.top)}}};function vm(){this.xa="Base"}Oe(vm,Fa),vm.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length,ot=a.Pb(),st=ot.margin,ut=st.right+st.left,ft=st.top+st.bottom;ot.measure(y,x,z,tt);var vt=ot.measuredBounds;z=vt.width,tt=vt.height;var yt=Math.max(z+ut,0),Pt=Math.max(tt+ft,0),Et=a.isClipping,Vt=ae.allocAt(-st.left,-st.top,yt,Pt),Rt=ae.allocAt(0,0,z,tt);fv(ot,Rt,!0),z=Rt.width,tt=Rt.height;for(var Qt=!0,_t=rh(a),te=0;te<rt;te++){var ue=E[te];vt=y;var Ce=x;if(ue!==ot&&(ue.visible||ue===_t)){st=ue.margin;var On=st.left,li=st.top;switch(yt=st.right+st.left,Pt=st.top+st.bottom,st=Os(ue,!1),st){case fn:vt=z,Ce=tt,li=On=Pt=yt=0;break;case ki:vt=z,On=yt=0;break;case ji:Ce=tt,li=Pt=0}ue.measure(vt,Ce,0,0),vt=ue.measuredBounds,yt=Math.max(vt.width+yt,0),Pt=Math.max(vt.height+Pt,0),st=ue.alignment,st.Xb()&&(st=a.defaultAlignment),st.sb()||(st=fi);var ti=ue.alignmentFocus;if(ti.Xb()&&(ti=fi),Ce=null,ue instanceof mn&&ue.$e!==""&&(Ce=ue.fb(ue.$e),Ce===ue&&(Ce=null)),On=Rt.x-On,li=Rt.y-li,Ce!==null){for(ue.arrange(0,0,vt.width,vt.height),vt=Ce.actualBounds,vt=Tt.allocAt(vt.x+(ti.x*vt.width-ti.offsetX),vt.y+(ti.y*vt.height-ti.offsetY)),Ce=Ce.panel;Ce!==ue;)Ce.transform.Ga(vt),Ce=Ce.panel;On+=st.x*z+st.offsetX-vt.x,li+=st.y*tt+st.offsetY-vt.y,Tt.free(vt)}else On+=st.x*z+st.offsetX-(ti.x*vt.width+ti.offsetX),li+=st.y*tt+st.offsetY-(ti.y*vt.height+ti.offsetY);Qt?(Qt=!1,b.h(On,li,yt,Pt)):ui(b,On,li,yt,Pt)}}switch(Qt?b.assign(Vt):Et?b.Uu(Rt.x,Rt.y,Rt.width,Rt.height):ui(b,Vt.x,Vt.y,Vt.width,Vt.height),ae.free(Vt),ae.free(Rt),st=ot.stretch,st===or&&(st=Os(ot,!1)),st){case en:return;case fn:if(!isFinite(y)&&!isFinite(x))return;break;case ki:if(!isFinite(y))return;break;case ji:if(!isFinite(x))return}for(vt=ot.measuredBounds,z=vt.width,tt=vt.height,yt=Math.max(z+ut,0),Pt=Math.max(tt+ft,0),st=ot.margin,Rt=ae.allocAt(-st.left,-st.top,yt,Pt),fv(ot,Rt,!0),z=Rt.width,tt=Rt.height,y=0;y<rt;y++)x=E[y],x===ot||!x.visible&&x!==_t||(st=x.margin,yt=st.right+st.left,Pt=st.top+st.bottom,vt=x.measuredBounds,yt=Math.max(vt.width+yt,0),Pt=Math.max(vt.height+Pt,0),ut=x.alignment,ut.Xb()&&(ut=a.defaultAlignment),ut.sb()||(ut=fi),x=x.alignmentFocus,x.Xb()&&(x=fi),Qt?(Qt=!1,b.h(ut.x*z+ut.offsetX-(x.x*vt.width+x.offsetX)-st.left,ut.y*tt+ut.offsetY-(x.y*vt.height+x.offsetY)-st.top,yt,Pt)):ui(b,ut.x*z+ut.offsetX-(x.x*vt.width+x.offsetX)-st.left,ut.y*tt+ut.offsetY-(x.y*vt.height+x.offsetY)-st.top,yt,Pt));Qt?b.assign(Vt):Et?b.Uu(Rt.x,Rt.y,Rt.width,Rt.height):ui(b,Vt.x,Vt.y,Vt.width,Vt.height),ae.free(Rt)},vm.prototype.arrange=function(a,y,x){var E=y.length,b=a.Pb(),z=b.measuredBounds,tt=z.width,rt=z.height,ot=a.padding;z=ot.left,ot=ot.top;var st=z-x.x,ut=ot-x.y;for(b.arrange(st,ut,tt,rt),tt=ae.allocAt(0,0,tt,rt),fv(b,tt,!1),rt=0;rt<E;rt++){var ft=y[rt];if(ft!==b){st=ft.measuredBounds;var vt=st.width,yt=st.height;ut=ft.alignment,ut.Xb()&&(ut=a.defaultAlignment),ut.sb()||(ut=fi);var Pt=ft.alignmentFocus;if(Pt.Xb()&&(Pt=fi),st=null,ft instanceof mn&&ft.$e!==""&&(st=ft.fb(ft.$e),st===ft&&(st=null)),st!==null){var Et=st.actualBounds;for(Pt=Tt.allocAt(Et.x+(Pt.x*Et.width-Pt.offsetX),Et.y+(Pt.y*Et.height-Pt.offsetY)),st=st.panel;st!==ft;)st.transform.Ga(Pt),st=st.panel;st=ut.x*tt.width+ut.offsetX-Pt.x,ut=ut.y*tt.height+ut.offsetY-Pt.y,Tt.free(Pt)}else st=ut.x*tt.width+ut.offsetX-(Pt.x*vt+Pt.offsetX),ut=ut.y*tt.height+ut.offsetY-(Pt.y*yt+Pt.offsetY);st+=tt.x-x.x,ut+=tt.y-x.y,ft.visible&&ft.arrange(z+st,ot+ut,vt,yt)}}ae.free(tt)};function fv(a,y,x){var E=null;if(a instanceof mn&&a.$e!==""&&(E=a.fb(a.$e),E===a&&(E=null)),E!==null)for(x&&a.arrange(0,0,y.width,y.height),y.assign(E.actualBounds),E=E.panel;E!==a;)E.transform.pp(y),E=E.panel}function ym(){this.xa="Base"}Oe(ym,Fa),ym.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length,ot=a.Pb(),st=ot.margin,ut=y,ft=x,vt=st.right+st.left,yt=st.top+st.bottom;ot.measure(y,x,z,tt),st=ot.measuredBounds;var Pt=0,Et=null;ot instanceof dr&&(Et=ot,Pt=Et.strokeWidth*Et.scale);var Vt=Math.max(st.width+vt,0);st=Math.max(st.height+yt,0);var Rt=vv(ot),Qt=Rt.x*Vt+Rt.offsetX;Rt=Rt.y*st+Rt.offsetY;var _t=yv(ot),te=_t.x*Vt+_t.offsetX;for(_t=_t.y*st+_t.offsetY,isFinite(y)&&(ut=Math.max(Math.abs(Qt-te)-Pt,0)),isFinite(x)&&(ft=Math.max(Math.abs(Rt-_t)-Pt,0)),Pt=Ut.alloc(),Pt.h(0,0),a=rh(a),_t=0;_t<rt;_t++)Rt=E[_t],Rt===ot||!Rt.visible&&Rt!==a||(st=Rt.margin,Vt=st.right+st.left,Qt=st.top+st.bottom,Rt.measure(ut,ft,0,0),st=Rt.measuredBounds,Vt=Math.max(st.width+Vt,0),st=Math.max(st.height+Qt,0),Pt.h(Math.max(Vt,Pt.width),Math.max(st,Pt.height)));if(rt===1)b.width=Vt,b.height=st,Ut.free(Pt);else{switch(Rt=vv(ot),_t=yv(ot),rt=E=0,_t.x!==Rt.x&&_t.y!==Rt.y&&(E=Pt.width/Math.abs(_t.x-Rt.x),rt=Pt.height/Math.abs(_t.y-Rt.y)),Ut.free(Pt),Pt=0,Et!==null&&(Pt=Et.strokeWidth*Et.scale,Lv(Et)===gi&&(E=rt=Math.max(E,rt))),E+=Math.abs(Rt.offsetX)+Math.abs(_t.offsetX)+Pt,rt+=Math.abs(Rt.offsetY)+Math.abs(_t.offsetY)+Pt,Et=ot.stretch,Et===or&&(Et=Os(ot,!1)),Et){case en:tt=z=0;break;case fn:isFinite(y)&&(E=y),isFinite(x)&&(rt=x);break;case ki:isFinite(y)&&(E=y),tt=0;break;case ji:z=0,isFinite(x)&&(rt=x)}ot.Uj(),ot.measure(E,rt,z,tt),b.width=ot.measuredBounds.width+vt,b.height=ot.measuredBounds.height+yt}},ym.prototype.arrange=function(a,y){var x=y.length,E=a.Pb(),b=E.measuredBounds,z=ae.alloc();z.h(0,0,1,1);var tt=E.margin,rt=tt.left;tt=tt.top;var ot=a.padding,st=ot.left;ot=ot.top,E.arrange(st+rt,ot+tt,b.width,b.height);var ut=vv(E),ft=yv(E),vt=ut.y*b.height+ut.offsetY,yt=ft.x*b.width+ft.offsetX;for(ft=ft.y*b.height+ft.offsetY,z.x=ut.x*b.width+ut.offsetX,z.y=vt,ui(z,yt,ft,0,0),z.x+=rt+st,z.y+=tt+ot,b=0;b<x;b++)rt=y[b],rt!==E&&(st=rt.measuredBounds,tt=rt.margin,ot=Math.max(st.width+tt.right+tt.left,0),ut=Math.max(st.height+tt.top+tt.bottom,0),vt=rt.alignment,vt.Xb()&&(vt=a.defaultAlignment),vt.sb()||(vt=fi),ot=z.width*vt.x+vt.offsetX-ot*vt.x+tt.left+z.x,tt=z.height*vt.y+vt.offsetY-ut*vt.y+tt.top+z.y,rt.visible&&(ci(z.x,z.y,z.width,z.height,ot,tt,st.width,st.height)?rt.arrange(ot,tt,st.width,st.height):rt.arrange(ot,tt,st.width,st.height,new ae(z.x,z.y,z.width,z.height))));ae.free(z)};function Sm(){this.xa="Base",this.name="Table"}Oe(Sm,Fa),Sm.prototype.measure=function(a,y,x,E,b){for(var z=E.length,tt=Ei(),rt=Ei(),ot=0;ot<z;ot++){var st=E[ot],ut=st instanceof mn?st:null;if(ut!==null&&Eh(ut)&&st.visible){rt.push(ut);for(var ft=ut.O.s,vt=ft.length,yt=0;yt<vt;yt++){var Pt=ft[yt];ut.type===mn.TableRow?Pt.row=st.row:ut.type===mn.TableColumn&&(Pt.column=st.column),tt.push(Pt)}}else tt.push(st)}z=tt.length,z===0&&(a.Fb(0),a.Eb(0));for(var Et=[],Vt=0;Vt<z;Vt++){var Rt=tt[Vt];Rt.visible&&(Ma(Rt,!0),Ou(Rt,!0),Et[Rt.row]||(Et[Rt.row]=[]),Et[Rt.row][Rt.column]||(Et[Rt.row][Rt.column]=[]),Et[Rt.row][Rt.column].push(Rt))}ri(tt);var Qt=Ei(),_t=Ei(),te=Ei(),ue={count:0},Ce={count:0},On=y,li=x,ti=a.rowDefs,Cn=a.colDefs,qe=null;z=ti.length;for(var er=0;er<z;er++)qe=ti[er],qe!==void 0&&(qe.actual=0);z=Cn.length;for(var Ui=0;Ui<z;Ui++)qe=Cn[Ui],qe!==void 0&&(qe.actual=0);for(var Ur=Et.length,Fo=0,Ba=0;Ba<Ur;Ba++)Et[Ba]&&(Fo=Math.max(Fo,Et[Ba].length));var ja=Math.min(a.topIndex,Ur-1),vs=Math.min(a.leftIndex,Fo-1),Oa=0;Ur=Et.length;for(var Rh=rh(a),xa=0;xa<Ur;xa++)if(Et[xa]){Fo=Et[xa].length;var hu=a.Fb(xa);hu.actual=0;for(var ys=hu.oc=0;ys<Fo;ys++)if(Et[xa][ys]){var zh=a.Eb(ys);Qt[ys]===void 0&&(zh.actual=0,zh.oc=0,Qt[ys]=!0);for(var cl=Et[xa][ys],Wl=cl.length,el=0;el<Wl;el++){var Ys=cl[el];if(Ys.visible||Ys===Rh){var Pd=1<Ys.rowSpan||1<Ys.columnSpan;Pd&&(xa<ja||ys<vs||_t.push(Ys));var du=Ys.margin,tg=du.right+du.left,nl=du.top+du.bottom,Ss=ou(Ys,hu,zh,!1),Dp=Ys.desiredSize,Yc=!isNaN(Dp.height),Mu=!isNaN(Dp.width)&&Yc;if(Pd||Ss===en||Mu||xa<ja||ys<vs||(ue[ys]!==void 0||Ss!==fn&&Ss!==ki||(ue[ys]=-1,ue.count++),Ce[xa]!==void 0||Ss!==fn&&Ss!==ji||(Ce[xa]=-1,Ce.count++),te.push(Ys)),Ys.measure(1/0,1/0,0,0),!(xa<ja||ys<vs)){var Us=Ys.measuredBounds,ic=Math.max(Us.width+tg,0),il=Math.max(Us.height+nl,0);if(Ys.rowSpan===1&&(Ss===en||Ss===ki)){qe=a.Fb(xa);var wd=qe.Wc();Oa=Math.max(il-qe.actual,0),Oa+wd>li&&(Oa=Math.max(li-wd,0));var G0=qe.oa===0;qe.oc=qe.oc+Oa,qe.actual=qe.oa+Oa,li=Math.max(li-(Oa+(G0?wd:0)),0)}if(Ys.columnSpan===1&&(Ss===en||Ss===ji)){qe=a.Eb(ys);var Bp=qe.Wc();Oa=Math.max(ic-qe.actual,0),Oa+Bp>On&&(Oa=Math.max(On-Bp,0));var Wy=qe.oa===0;qe.oc=qe.oc+Oa,qe.actual=qe.oa+Oa,On=Math.max(On-(Oa+(Wy?Bp:0)),0)}Pd&&Ys.Uj()}}}}}ri(Qt);var Yu=0,sh=0;z=a.columnCount;for(var Uc=0;Uc<z;Uc++){var Cd=Cn[Uc];Cd!==void 0&&(Yu+=isNaN(Cd.Hc)?Cd.oc:Cd.Hc,Cd.oc!==0&&(Yu+=Cd.Wc()))}z=a.rowCount;for(var eg=0;eg<z;eg++){var Ld=ti[eg];Ld!==void 0&&(sh+=isNaN(Ld.Hc)?Ld.oc:Ld.Hc,Ld.oc!==0&&(sh+=Ld.Wc()))}On=Math.max(y-Yu,0);var Uu=li=Math.max(x-sh,0),jh=On;z=te.length;for(var Xs=0;Xs<z;Xs++){var Eu=te[Xs],Z0=a.Fb(Eu.row),lh=a.Eb(Eu.column),ng=Eu.measuredBounds,cu=Eu.margin,rc=cu.right+cu.left,Au=cu.top+cu.bottom;ue[Eu.column]=lh.oc===0&&ue[Eu.column]!==void 0?Math.max(ng.width+rc,ue[Eu.column]):null,Ce[Eu.row]=Z0.oc===0&&Ce[Eu.row]!==void 0?Math.max(ng.height+Au,Ce[Eu.row]):null}var Xc=0,ig=0,eu;for(eu in Ce)eu!=="count"&&(Xc+=Ce[eu]);for(eu in ue)eu!=="count"&&(ig+=ue[eu]);for(var Xa=Ut.alloc(),Op=0;Op<z;Op++){var Ns=te[Op];if(Ns.visible||Ns===Rh){var Pa=a.Fb(Ns.row),Ts=a.Eb(Ns.column),uh=0;isFinite(Ts.width)?uh=Ts.width:(isFinite(On)&&ue[Ns.column]!==null?ig===0?uh=Ts.actual+On:uh=ue[Ns.column]/ig*jh:ue[Ns.column]!==null?uh=On:uh=Ts.actual||On,uh=Math.max(0,uh-Ts.Wc()));var Wh=0;switch(isFinite(Pa.height)?Wh=Pa.height:(isFinite(li)&&Ce[Ns.row]!==null?Xc===0?Wh=Pa.actual+li:Wh=Ce[Ns.row]/Xc*Uu:Ce[Ns.row]!==null?Wh=li:Wh=Pa.actual||li,Wh=Math.max(0,Wh-Pa.Wc())),Xa.h(Math.max(Ts.minimum,Math.min(uh,Ts.maximum)),Math.max(Pa.minimum,Math.min(Wh,Pa.maximum))),Ss=ou(Ns,Pa,Ts,!1),Ss){case ki:Xa.height=Math.max(Xa.height,Pa.actual+li);break;case ji:Xa.width=Math.max(Xa.width,Ts.actual+On)}var oc=Ns.margin,Hy=oc.right+oc.left,V0=oc.top+oc.bottom;Ns.Uj(),Ns.measure(Xa.width,Xa.height,Ts.minimum,Pa.minimum);var rg=Ns.measuredBounds,ac=Math.max(rg.width+Hy,0),Jc=Math.max(rg.height+V0,0);isFinite(On)&&(ac=Math.min(ac,Xa.width)),isFinite(li)&&(Jc=Math.min(Jc,Xa.height));var Js=0;Js=Pa.actual,Pa.actual=Math.max(Pa.actual,Jc),Pa.oc=Math.max(Pa.oc,Jc),Oa=Pa.actual-Js,li=Math.max(li-Oa,0),Ce[Ns.row]===null&&(Uu=Math.max(Uu-Oa,0)),Js=Ts.actual,Ts.actual=Math.max(Ts.actual,ac),Ts.oc=Math.max(Ts.oc,ac),Oa=Ts.actual-Js,On=Math.max(On-Oa,0),ue[Ns.column]===null&&(jh=Math.max(jh-Oa,0))}}ri(te);var hh=Ut.alloc(),fu=Ei(),Al=Ei();if(z=_t.length,z!==0){for(var kd=0;kd<Ur;kd++)if(Et[kd]){Fo=Et[kd].length;var og=a.Fb(kd);fu[kd]=og.actual;for(var Md=0;Md<Fo;Md++)if(Et[kd][Md]){var K0=a.Eb(Md);Al[Md]=K0.actual}}}for(var ag=0;ag<z;ag++){var da=_t[ag];if(da.visible||da===Rh){var nu=a.Fb(da.row),Hl=a.Eb(da.column);switch(Xa.h(Math.max(Hl.minimum,Math.min(y,Hl.maximum)),Math.max(nu.minimum,Math.min(x,nu.maximum))),Ss=ou(da,nu,Hl,!1),Ss){case fn:Al[Hl.index]!==0&&(Xa.width=Math.min(Xa.width,Al[Hl.index])),fu[nu.index]!==0&&(Xa.height=Math.min(Xa.height,fu[nu.index]));break;case ki:Al[Hl.index]!==0&&(Xa.width=Math.min(Xa.width,Al[Hl.index]));break;case ji:fu[nu.index]!==0&&(Xa.height=Math.min(Xa.height,fu[nu.index]))}isFinite(Hl.width)&&(Xa.width=Hl.width),isFinite(nu.height)&&(Xa.height=nu.height),hh.h(0,0);for(var Y0=Hl.minimum,rl=nu.minimum,Hh=1;Hh<da.rowSpan&&!(da.row+Hh>=a.rowCount);Hh++)qe=a.Fb(da.row+Hh),Oa=0,Oa=Ss===fn||Ss===ji?Math.max(qe.minimum,fu[da.row+Hh]===0?qe.maximum:Math.min(fu[da.row+Hh],qe.maximum)):Math.max(qe.minimum,isNaN(qe.Hc)?qe.maximum:Math.min(qe.Hc,qe.maximum)),hh.height+=Oa,rl+=qe.minimum;for(var Gl=1;Gl<da.columnSpan&&!(da.column+Gl>=a.columnCount);Gl++)qe=a.Eb(da.column+Gl),Oa=0,Oa=Ss===fn||Ss===ki?Math.max(qe.minimum,Al[da.column+Gl]===0?qe.maximum:Math.min(Al[da.column+Gl],qe.maximum)):Math.max(qe.minimum,isNaN(qe.Hc)?qe.maximum:Math.min(qe.Hc,qe.maximum)),hh.width+=Oa,Y0+=qe.minimum;Xa.width+=hh.width,Xa.height+=hh.height;var sg=da.margin,Ed=sg.right+sg.left,Ip=sg.top+sg.bottom;da.measure(Xa.width,Xa.height,Y0,rl);for(var lg=da.measuredBounds,Fu=Math.max(lg.width+Ed,0),sc=Math.max(lg.height+Ip,0),Ad=0,ug=0;ug<da.rowSpan&&!(da.row+ug>=a.rowCount);ug++)qe=a.Fb(da.row+ug),Ad+=qe.total||0;if(Ad<sc){var Gh=sc-Ad,Xu=sc-Ad;if(da.spanAllocation!==null)for(var Zh=da.spanAllocation,dh=0;dh<da.rowSpan&&!(0>=Gh)&&!(da.row+dh>=a.rowCount);dh++){qe=a.Fb(da.row+dh);var Vh=qe.oa||0,lc=Zh(da,qe,Xu);qe.actual=Math.min(qe.maximum,Vh+lc),qe.oa!==Vh&&(Gh-=qe.oa-Vh)}for(;0<Gh;){var gu=qe.oa||0;if(isNaN(qe.height)&&qe.maximum>gu&&(qe.actual=Math.min(qe.maximum,gu+Gh),qe.oa!==gu&&(Gh-=qe.oa-gu)),qe.index===0)break;qe=a.Fb(qe.index-1)}}for(var Qc=0,Kh=0;Kh<da.columnSpan&&!(da.column+Kh>=a.columnCount);Kh++)qe=a.Eb(da.column+Kh),Qc+=qe.total||0;if(Qc<Fu){var _c=Fu-Qc,Gy=Fu-Qc;if(da.spanAllocation!==null)for(var ch=da.spanAllocation,uc=0;uc<da.columnSpan&&!(0>=_c)&&!(da.column+uc>=a.columnCount);uc++){qe=a.Eb(da.column+uc);var Rp=qe.oa||0,Zy=ch(da,qe,Gy);qe.actual=Math.min(qe.maximum,Rp+Zy),qe.oa!==Rp&&(_c-=qe.oa-Rp)}for(;0<_c;){var U0=qe.oa||0;if(isNaN(qe.width)&&qe.maximum>U0&&(qe.actual=Math.min(qe.maximum,U0+_c),qe.oa!==U0&&(_c-=qe.oa-U0)),qe.index===0)break;qe=a.Eb(qe.index-1)}}}}ri(_t),Ut.free(hh),Ut.free(Xa),fu!==void 0&&ri(fu),Al!==void 0&&ri(Al);var qc=0,$c=0,X0=a.desiredSize,gx=a.maxSize;Ss=Os(a,!0);var zp=sh=Yu=0,jp=0;z=a.columnCount;for(var J0=0;J0<z;J0++)Cn[J0]!==void 0&&(qe=a.Eb(J0),isFinite(qe.width)?(zp+=qe.width,zp+=qe.Wc()):Fm(qe)===Qg?(zp+=qe.oa,zp+=qe.Wc()):qe.oa!==0&&(Yu+=qe.oa,Yu+=qe.Wc()));isFinite(X0.width)?qc=Math.min(X0.width,gx.width):qc=Ss!==en&&isFinite(y)?y:Yu,qc=Math.max(qc,a.minSize.width),qc=Math.max(qc-zp,0);for(var _x=Yu===0?1:Math.max(qc/Yu,1),Q0=0;Q0<z;Q0++)Cn[Q0]!==void 0&&(qe=a.Eb(Q0),isFinite(qe.width)||Fm(qe)===Qg||(qe.actual=qe.oa*_x),qe.position=b.width,qe.oa!==0&&(b.width+=qe.oa,b.width+=qe.Wc()));z=a.rowCount;for(var _0=0;_0<z;_0++)ti[_0]!==void 0&&(qe=a.Fb(_0),isFinite(qe.height)?(jp+=qe.height,jp+=qe.Wc()):Fm(qe)===Qg?(jp+=qe.oa,jp+=qe.Wc()):qe.oa!==0&&(sh+=qe.oa,sh+=qe.Wc()));isFinite(X0.height)?$c=Math.min(X0.height,gx.height):$c=Ss!==en&&isFinite(x)?x:sh,$c=Math.max($c,a.minSize.height),$c=Math.max($c-jp,0);for(var qx=sh===0?1:Math.max($c/sh,1),q0=0;q0<z;q0++)ti[q0]!==void 0&&(qe=a.Fb(q0),isFinite(qe.height)||Fm(qe)===Qg||(qe.actual=qe.oa*qx),qe.position=b.height,qe.oa!==0&&(b.height+=qe.oa,b.height+=qe.Wc()));z=rt.length;for(var Vy=0;Vy<z;Vy++){var Wp=rt[Vy],Ky=0,Yy=0;Wp.type===mn.TableRow?(Ky=b.width,qe=a.Fb(Wp.row),Yy=qe.actual):(qe=a.Eb(Wp.column),Ky=qe.actual,Yy=b.height),Wp.measuredBounds.h(0,0,Ky,Yy),Ma(Wp,!1)}ri(rt),a.inRowsCols=Et},Sm.prototype.arrange=function(a,y,x){var E=y.length,b=a.padding,z=b.left;b=b.top;var tt=a.inRowsCols;if(tt!==null){for(var rt,ot,st=tt.length,ut=0,ft=0;ft<st;ft++)tt[ft]&&(ut=Math.max(ut,tt[ft].length));ot=a.rowDefs,rt=a.colDefs;var vt=ft=0,yt=Math.min(a.topIndex,st-1);if(0<ot.length){for(;yt!==st&&(ot[yt]===void 0||ot[yt].oa===0);)yt++;yt=Math.max(Math.min(yt,st-1),0),ft=-ot[yt].position}var Pt=Math.min(a.leftIndex,ut-1);if(0<rt.length){for(;Pt!==ut&&(rt[Pt]===void 0||rt[Pt].oa===0);)Pt++;Pt=Math.max(Math.min(Pt,ut-1),0),vt=-rt[Pt].position}for(var Et=0,Vt=0;Et!==st&&ot[Et]===void 0;)Et++;for(;Vt!==st&&rt[Vt]===void 0;)Vt++;ut=a.part,a.Fb(Et),a.Eb(Vt);for(var Rt=0;Rt<y.length;Rt++){var Qt=y[Rt];if(Qt instanceof mn&&Qt.visible&&Eh(Qt)){if(Qt.type===mn.TableRow){rt=a.Fb(Qt.row);var _t=a.Eb(Vt)}else rt=a.Fb(Et),_t=a.Eb(Qt.column);ot=rt.position+ft+b,rt.oa!==0&&(ot+=rt.Io(Math.max(Et,yt))),rt=_t.position+vt+z,_t.oa!==0&&(rt+=_t.Io(Math.max(Vt,Pt))),_t=Qt.measuredBounds,Qt.Uk(),Qt.actualBounds.ka();var te=Qt.actualBounds,ue=ae.allocAt(te.x,te.y,te.width,te.height);te.x=Qt.type===mn.TableRow?z:rt,te.y=Qt.type===mn.TableColumn?b:ot,te.width=_t.width,te.height=_t.height,Qt.actualBounds.freeze(),Ou(Qt,!1),Bn(ue,te)||ut===null||(ut.oh(),Qt.Pn(ut)),ae.free(ue)}}for(Rt=Ut.alloc(),Qt=0;Qt<st;Qt++)if(tt[Qt]){for(ut=tt[Qt].length,_t=a.Fb(Qt),ot=_t.position+ft+b,_t.oa!==0&&(ot+=_t.Io(Math.max(Et,yt))),te=0;te<ut;te++)if(tt[Qt][te]){ue=a.Eb(te),rt=ue.position+vt+z,ue.oa!==0&&(rt+=ue.Io(Math.max(Vt,Pt)));for(var Ce=tt[Qt][te],On=Ce.length,li=0;li<On;li++){var ti=Ce[li],Cn=ti.measuredBounds;Rt.h(0,0);for(var qe=1;qe<ti.rowSpan&&!(Qt+qe>=a.rowCount);qe++){var er=a.Fb(Qt+qe);er.oa!==0&&(Rt.height+=er.total)}for(qe=1;qe<ti.columnSpan&&!(te+qe>=a.columnCount);qe++)er=a.Eb(te+qe),er.oa!==0&&(Rt.width+=er.total);var Ui=ue.oa+Rt.width,Ur=_t.oa+Rt.height;qe=rt,er=ot;var Fo=Ui,Ba=Ur,ja=rt,vs=ot,Oa=Ui,Rh=Ur;rt+Ui>x.width&&(Oa=Math.max(x.width-rt,0)),ot+Ur>x.height&&(Rh=Math.max(x.height-ot,0));var xa=ti.alignment;if(xa.Xb()){xa=a.defaultAlignment,xa.sb()||(xa=fi);var hu=xa.x,ys=xa.y,zh=xa.offsetX;xa=xa.offsetY;var cl=ue.alignment,Wl=_t.alignment;cl.sb()&&(hu=cl.x,zh=cl.offsetX),Wl.sb()&&(ys=Wl.y,xa=Wl.offsetY)}else hu=xa.x,ys=xa.y,zh=xa.offsetX,xa=xa.offsetY;(isNaN(hu)||isNaN(ys))&&(ys=hu=.5,xa=zh=0),cl=Cn.width,Wl=Cn.height;var el=ti.margin,Ys=el.left+el.right,Pd=el.top+el.bottom,du=ou(ti,_t,ue,!1);!isNaN(ti.desiredSize.width)||du!==fn&&du!==ki||(cl=Math.max(Ui-Ys,0)),!isNaN(ti.desiredSize.height)||du!==fn&&du!==ji||(Wl=Math.max(Ur-Pd,0)),Ui=ti.maxSize,Ur=ti.minSize,cl=Math.min(Ui.width,cl),Wl=Math.min(Ui.height,Wl),cl=Math.max(Ur.width,cl),Wl=Math.max(Ur.height,Wl),Ui=Wl+Pd,qe+=Fo*hu-(cl+Ys)*hu+zh+el.left,er+=Ba*ys-Ui*ys+xa+el.top,ti.visible&&(ci(ja,vs,Oa,Rh,qe,er,Cn.width,Cn.height)?ti.arrange(qe,er,cl,Wl):ti.arrange(qe,er,cl,Wl,new ae(ja,vs,Oa,Rh)))}}}for(Ut.free(Rt),a=0;a<E;a++)x=y[a],z=x instanceof mn?x:null,z!==null&&Eh(z)&&(z=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,z.width,z.height),x.naturalBounds.freeze())}};function xm(){this.xa="Base"}Oe(xm,Fa),xm.prototype.measure=function(){},xm.prototype.arrange=function(){};function Pm(){this.xa="Base"}Oe(Pm,Fa),Pm.prototype.measure=function(){},Pm.prototype.arrange=function(){};function wm(){this.xa="Base"}Oe(wm,Fa),wm.prototype.measure=function(a,y,x,E,b,z,tt){1<E.length&&$t("Viewbox Panel cannot contain more than one GraphObject."),E=E[0],E.Ca=1,E.Uj(),E.measure(1/0,1/0,z,tt);var rt=E.measuredBounds,ot=E.margin,st=ot.right+ot.left;if(ot=ot.top+ot.bottom,isFinite(y)||isFinite(x)){var ut=E.scale,ft=rt.width;rt=rt.height;var vt=Math.max(y-st,0),yt=Math.max(x-ot,0),Pt=1;a.viewboxStretch===gi?ft!==0&&rt!==0&&(Pt=Math.min(vt/ft,yt/rt)):ft!==0&&rt!==0&&(Pt=Math.max(vt/ft,yt/rt)),Pt===0&&(Pt=1e-4),E.Ca*=Pt,ut!==E.scale&&(Ma(E,!0),E.measure(1/0,1/0,z,tt))}rt=E.measuredBounds,b.width=isFinite(y)?y:Math.max(rt.width+st,0),b.height=isFinite(x)?x:Math.max(rt.height+ot,0)},wm.prototype.arrange=function(a,y,x){y=y[0];var E=y.measuredBounds,b=y.margin,z=Math.max(E.width+(b.right+b.left),0);b=Math.max(E.height+(b.top+b.bottom),0);var tt=y.alignment;tt.Xb()&&(tt=a.defaultAlignment),tt.sb()||(tt=fi),y.arrange(x.width*tt.x-z*tt.x+tt.offsetX,x.height*tt.y-b*tt.y+tt.offsetY,E.width,E.height)};function Ug(){this.xa="Base"}Oe(Ug,Fa),Ug.prototype.measure=function(){},Ug.prototype.arrange=function(){},Ug.prototype.gc=function(a,y,x){x=a.Df()*x.scale,0>=x&&(x=1);var E=a.gridCellSize,b=E.width;E=E.height;var z=a.naturalBounds,tt=a.actualBounds,rt=z.width,ot=z.height,st=Math.ceil(rt/b),ut=Math.ceil(ot/E),ft=a.gridOrigin,vt=ft.x;ft=ft.y,y.save(),y.beginPath(),y.rect(0,0,rt,ot),y.clip(),y.Se();for(var yt=[],Pt=a.O.s,Et=Pt.length,Vt=0;Vt<Et;Vt++){var Rt=Pt[Vt],Qt=[];if(yt.push(Qt),Rt.visible){var _t=Rt.interval;if(!(0>_t)){Rt=pv(Rt.figure);for(var te=0;te<Et;te++)if(te!==Vt){var ue=Pt[te];ue.visible&&pv(ue.figure)===Rt&&(ue=ue.interval,ue>_t&&Qt.push(ue))}}}}for(Pt=a.O.s,Et=Pt.length,Vt=0;Vt<Et;Vt++){var Ce=Pt[Vt];if(Ce.visible&&(Qt=Ce.interval||1,Rt=Math.abs(Qt),!(2>b*Rt*x))){if(_t=Ce.segmentIndex,(!isFinite(_t)||isNaN(_t))&&(_t=0),0>_t&&(_t=Rt-Math.min(-_t,Rt)),_t=Math.round(_t%Rt),Rt=Ce.opacity,te=1,Rt!==1){if(Rt===0)continue;te=y.globalAlpha,y.globalAlpha=te*Rt}ue=yt[Vt];var On=!1,li=Ce.strokeDashArray;if(li!==null&&(On=!0,y.js(li,Ce.strokeDashOffset)),Ce.figure==="LineV"&&Ce.stroke!==null&&0<Ce.strokeWidth){for(y.lineWidth=Ce.strokeWidth,ha(a,y,Ce.stroke,!1,!1,z,tt),y.beginPath(),li=Ce=Math.floor((vt-b)/b);li<=Ce+st;li++){var ti=li*b+vt;0<=ti&&ti<=rt&&Cm(li,Qt,_t,ue)&&(y.moveTo(ti,0),y.lineTo(ti,ot))}y.stroke(),y.Se()}else if(Ce.figure==="LineH"&&Ce.stroke!==null&&0<Ce.strokeWidth){for(y.lineWidth=Ce.strokeWidth,ha(a,y,Ce.stroke,!1,!1,z,tt),y.beginPath(),li=Ce=Math.floor((ft-E)/E);li<=Ce+ut;li++)ti=li*E+ft,0<=ti&&ti<=ot&&Cm(li,Qt,_t,ue)&&(y.moveTo(0,ti),y.lineTo(rt,ti));y.stroke(),y.Se()}else if(Ce.figure==="BarV"&&Ce.fill!==null)for(ha(a,y,Ce.fill,!0,!1,z,tt),Ce=Ce.width,isNaN(Ce)&&(Ce=b),ti=li=Math.floor((vt-b)/b);ti<=li+st;ti++){var Cn=ti*b+vt;0<=Cn+Ce&&Cn<=rt&&Cm(ti,Qt,_t,ue)&&y.fillRect(Cn,0,Ce,ot)}else if(Ce.figure==="BarH"&&Ce.fill!==null)for(ha(a,y,Ce.fill,!0,!1,z,tt),Ce=Ce.height,isNaN(Ce)&&(Ce=E),ti=li=Math.floor((ft-E)/E);ti<=li+ut;ti++)Cn=ti*E+ft,0<=Cn+Ce&&Cn<=ot&&Cm(ti,Qt,_t,ue)&&y.fillRect(0,Cn,rt,Ce);On&&y.fs(),Rt!==1&&(y.globalAlpha=te)}}y.restore(),y.Vc(!1)};function Cm(a,y,x,E){if(0>y)return a%y===x;if(a%y!==x)return!1;y=E.length;for(var b=0;b<y;b++)if(a%E[b]===x)return!1;return!0}function Lm(){this.xa="Base"}Oe(Lm,Fa),Lm.prototype.measure=function(a,y,x,E,b){var z=E.length;if(a instanceof Zr||a instanceof Ln){var tt=null,rt=null;if(a instanceof Ln&&(tt=a),a instanceof Zr&&(rt=a,tt=rt.adornedPart,a.j===null&&(a.j=[])),tt instanceof Ln){var ot=tt;if(z===0)En(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var st=a instanceof Zr?null:tt.path;y=tt.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var ut=ot.points,ft=tt.pointsCount;rt!==null?rt.Ul(!1):tt!==null&&tt.Ul(!1),rt=y.width;var vt=y.height,yt=a.j;if(yt.length=0,st!==null){iS(a,rt,vt,st);var Pt=st.measuredBounds;x.ed(Pt),yt.push(Pt)}Pt=Un.alloc();for(var Et=Tt.alloc(),Vt=Tt.alloc(),Rt=0;Rt<z;Rt++){var Qt=E[Rt];if(Qt!==st)if(Qt.isPanelMain&&Qt instanceof dr){iS(a,rt,vt,Qt);var _t=Qt.measuredBounds;x.ed(_t),yt.push(_t)}else if(2>ft)Qt.measure(1/0,1/0,0,0),_t=Qt.measuredBounds,x.ed(_t),yt.push(_t);else{var te=Qt.segmentIndex,ue=Qt.segmentFraction,Ce=Qt.alignmentFocus;Ce.Mc()&&(Ce=fi);var On=Qt.segmentOrientation,li=Qt.segmentOffset;if(isNaN(te)){var ti=ot.ua;_t=Ei(),ti.Qu(ue,_t);var Cn=Tt.allocAt(_t[0],_t[1]);if(Cn.add(ot.i(0)),ti.type===ln.j?Cn.offset(-ti.startX,-ti.startY):(ti=ti.figures.first(),ti!==null&&Cn.offset(-ti.startX,-ti.startY)),ti=_t[2],On!==Ms){var qe=ot.computeAngle(Qt,On,ti);Qt.Kb=qe}qe=Cn.x-y.x;var er=Cn.y-y.y;Tt.free(Cn),ri(_t)}else if(te<-ft||te>=ft)_t=Tt.alloc(),ot.vg(),ot.computeMidPoint(_t),ti=ot.midAngle,On!==Ms&&(qe=ot.computeAngle(Qt,On,ti),Qt.Kb=qe),qe=_t.x-y.x,er=_t.y-y.y,Tt.free(_t);else{if(qe=0,0<=te?(er=ut.M(te),_t=te<ft-1?ut.M(te+1):er):(qe=ft+te,er=ut.M(qe),_t=0<qe?ut.M(qe-1):er),er.Xa(_t)){0<=te?(ti=0<te?ut.M(te-1):er,qe=te<ft-2?ut.M(te+2):_t):(ti=qe<ft-1?ut.M(qe+1):er,qe=1<qe?ut.M(qe-2):_t),Cn=ti.Bf(er);var Ui=_t.Bf(qe);ti=Cn>Ui+10?0<=te?ti.ab(er):er.ab(ti):Ui>Cn+10?0<=te?_t.ab(qe):qe.ab(_t):0<=te?ti.ab(qe):qe.ab(ti)}else ti=0<=te?er.ab(_t):_t.ab(er);On!==Ms&&(qe=ot.computeAngle(Qt,On,ti),Qt.Kb=qe),qe=er.x+(_t.x-er.x)*ue-y.x,er=er.y+(_t.y-er.y)*ue-y.y}Qt.measure(1/0,1/0,0,0),_t=Qt.measuredBounds,Cn=Qt.naturalBounds;var Ur=0;Qt instanceof dr&&(Ur=Qt.strokeWidth),Ui=Cn.width+Ur;var Fo=Cn.height+Ur;Pt.reset(),Pt.translate(-_t.x,-_t.y),Pt.scale(Qt.scale,Qt.scale),Pt.rotate(On===Ms?Qt.angle:ti,Ui/2,Fo/2),On!==ap&&On!==lp||Pt.rotate(90,Ui/2,Fo/2),On!==sp&&On!==up||Pt.rotate(-90,Ui/2,Fo/2),On===t0&&(45<ti&&135>ti||225<ti&&315>ti)&&Pt.rotate(-ti,Ui/2,Fo/2),Cn=new ae(0,0,Ui,Fo),Et.xi(Cn,Ce),Pt.Ga(Et),Ce=-Et.x+Ur/2*Qt.scale,Qt=-Et.y+Ur/2*Qt.scale,Vt.assign(li),Ur=isNaN(li.x);var Ba=isNaN(li.y);if(Ur||Ba){Ui=Ui/2+3,Fo=Fo/2+3;var ja=45<=ti&&135>=ti,vs=225<=ti&&315>=ti;On===Ms&&(ja||vs)?(Vt.x=Ba?Ui:li.y,Vt.y=Ur?Fo:li.x,ja?0<=te||isNaN(te)&&.5>ue||!Ur||(Vt.y=-Fo):vs&&((0<=te||isNaN(te)&&.5>ue)&&Ur&&(Vt.y=-Fo),Ba&&(Vt.x=-Ui))):(Ur&&(Vt.x=0<=te||isNaN(te)&&.5>ue?Ui:-Ui),Ba&&(Vt.y=-Fo),Vt.rotate(ti))}else Vt.rotate(ti);qe+=Vt.x,er+=Vt.y,Cn.set(_t),Cn.h(qe+Ce,er+Qt,_t.width,_t.height),yt.push(Cn),x.ed(Cn)}}if(tt!==null)for(E=tt.labelNodes;E.next();)E.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),En(b,x.width||0,x.height||0),Un.free(Pt),Tt.free(Et),Tt.free(Vt)}}}},Lm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Zr||a instanceof Ln){var E=a,b=null;a instanceof Zr&&(b=a,E=b.adornedPart);var z=a instanceof Zr?null:E.path,tt=a.j;if(tt.length!==0){var rt=0;if(z!==null&&rt<tt.length){var ot=tt[rt];rt++,z.arrange(ot.x-a.jg.x,ot.y-a.jg.y,ot.width,ot.height)}for(ot=0;ot<x;ot++){var st=y[ot];if(st!==z&&rt<tt.length){var ut=tt[rt];rt++,st.arrange(ut.x-a.jg.x,ut.y-a.jg.y,ut.width,ut.height)}}}if(y=E.points,x=y.count,2<=x&&a instanceof Ln)for(z=a.labelNodes;z.next();){var ft=a;tt=z.value,rt=tt.segmentIndex,ot=tt.segmentFraction;var vt=tt.alignmentFocus;if(st=tt.segmentOrientation,ut=tt.segmentOffset,isNaN(rt)){var yt=ft.ua,Pt=Ei();yt.Qu(ot,Pt);var Et=Tt.allocAt(Pt[0],Pt[1]);Et.add(ft.i(0)),yt.type===ln.j||(yt=yt.figures.first()),Et.offset(-yt.startX,-yt.startY),yt=Pt[2],st!==Ms&&(ft=ft.computeAngle(tt,st,yt),tt.angle=ft),ft=Et.x;var Vt=Et.y;Tt.free(Et),ri(Pt)}else if(rt<-x||rt>=x)Pt=Tt.alloc(),yt=ft,Vt=Pt,yt.vg(),yt.computeMidPoint(Vt),yt=ft.midAngle,st!==Ms&&(ft=ft.computeAngle(tt,st,yt),tt.angle=ft),ft=Pt.x,Vt=Pt.y,Tt.free(Pt);else{if(Et=0,0<=rt?(Pt=y.s[rt],Vt=rt<x-1?y.s[rt+1]:Pt):(Et=x+rt,Pt=y.s[Et],Vt=0<Et?y.s[Et-1]:Pt),Pt.Xa(Vt)){0<=rt?(yt=0<rt?y.s[rt-1]:Pt,Et=rt<x-2?y.s[rt+2]:Vt):(yt=Et<x-1?y.s[Et+1]:Pt,Et=1<Et?y.s[Et-2]:Vt);var Rt=yt.Bf(Pt),Qt=Vt.Bf(Et);yt=Rt>Qt+10?0<=rt?yt.ab(Pt):Pt.ab(yt):Qt>Rt+10?0<=rt?Vt.ab(Et):Et.ab(Vt):0<=rt?yt.ab(Et):Et.ab(yt)}else yt=0<=rt?Pt.ab(Vt):Vt.ab(Pt);st!==Ms&&(ft=ft.computeAngle(tt,st,yt),tt.angle=ft),ft=Pt.x+(Vt.x-Pt.x)*ot,Vt=Pt.y+(Vt.y-Pt.y)*ot}if(vt.ys())tt.location=new Tt(ft,Vt);else{vt.Mc()&&(vt=fi),Pt=Un.alloc(),Pt.reset(),Pt.scale(tt.scale,tt.scale),Pt.rotate(tt.angle,0,0);var _t=tt.naturalBounds;Et=ae.allocAt(0,0,_t.width,_t.height),Rt=Tt.alloc(),Rt.xi(Et,vt),Pt.Ga(Rt),vt=-Rt.x,Qt=-Rt.y;var te=_t.width,ue=_t.height;_t=Tt.alloc(),_t.assign(ut);var Ce=isNaN(ut.x),On=isNaN(ut.y);if(Ce||On){te=te/2+3,ue=ue/2+3;var li=45<=yt&&135>=yt,ti=225<=yt&&315>=yt;st===Ms&&(li||ti)?(_t.x=On?te:ut.y,_t.y=Ce?ue:ut.x,li?0<=rt||isNaN(rt)&&.5>ot||!Ce||(_t.y=-ue):ti&&((0<=rt||isNaN(rt)&&.5>ot)&&Ce&&(_t.y=-ue),On&&(_t.x=-te))):(Ce&&(_t.x=0<=rt||isNaN(rt)&&.5>ot?te:-te),On&&(_t.y=-ue),_t.rotate(yt))}else _t.rotate(yt);ft+=_t.x,Vt+=_t.y,Pt.pp(Et),vt+=Et.x,Qt+=Et.y,rt=Tt.allocAt(ft+vt,Vt+Qt),tt.move(rt),Tt.free(rt),Tt.free(_t),Tt.free(Rt),ae.free(Et),Un.free(Pt)}}b!==null?b.Ul(!1):E.Ul(!1),E=TS(a),a.location.h(a.position.x+E.x,a.position.y+E.y),Tt.free(E)}};function iS(a,y,x,E){if(ll(E)!==!1){var b=E.strokeWidth;b===0&&a instanceof Zr&&a.type===mn.Link&&a.adornedObject instanceof dr&&(b=a.adornedObject.strokeWidth),b*=E.Ca,a instanceof Ln&&a.ua!==null?(a=a.geometry.bounds,E.Ge(a.x-b/2,a.y-b/2,a.width+b,a.height+b)):a instanceof Zr&&a.adornedPart.ua!==null?(a=a.adornedPart.ua.bounds,E.Ge(a.x-b/2,a.y-b/2,a.width+b,a.height+b)):E.Ge(-(b/2),-(b/2),y+b,x+b),b=E.desiredSize,b.w()||E.ua===null?E.dc.h(0,0,b.width,b.height):E.dc.assign(E.ua.bounds),Ma(E,!1)}}function Xg(){this.xa="Base"}Oe(Xg,Fa),Xg.prototype.measure=function(a,y,x,E,b,z,tt){var rt=a.Pb();a.graduatedBounds=[];var ot=rt.margin,st=ot.right+ot.left,ut=ot.top+ot.bottom;rt.measure(y,x,z,tt);var ft=rt.measuredBounds,vt=new ae(-ot.left,-ot.top,Math.max(ft.width+st,0),Math.max(ft.height+ut,0));a.graduatedBounds.push(vt),b.assign(vt);for(var yt=rt.geometry,Pt=rt.strokeWidth,Et=yt.flattenedSegments,Vt=yt.flattenedLengths,Rt=yt.flattenedTotalLength,Qt=Et.length,_t=0,te=0,ue=Ei(),Ce=0;Ce<Qt;Ce++){var On=Et[Ce],li=[];te=_t=0;for(var ti=On.length,Cn=0;Cn<ti;Cn+=2){var qe=On[Cn],er=On[Cn+1];if(Cn!==0){var Ui=180*Math.atan2(er-te,qe-_t)/Math.PI;0>Ui&&(Ui+=360),li.push(Ui)}_t=qe,te=er}ue.push(li)}if(a.graduatedIntervals===null){for(var Ur=[],Fo=a.O.s,Ba=Fo.length,ja=0;ja<Ba;ja++){var vs=Fo[ja],Oa=[];if(Ur.push(Oa),vs.visible){var Rh=vs.interval;if(!(0>Rh)){for(var xa=0;xa<Ba;xa++)if(xa!==ja){var hu=Fo[xa];if(hu.visible&&vs.constructor===hu.constructor){var ys=hu.interval;ys>Rh&&Oa.push(ys)}}}}}a.graduatedIntervals=Ur}var zh=a.graduatedIntervals,cl=a.O.s,Wl=cl.length,el=0,Ys=0,Pd=Rt;a.graduatedMarks=[];for(var du,tg=0;tg<Wl;tg++){var nl=cl[tg];if(du=[],nl.visible&&nl!==rt){var Ss=Math.abs(nl.interval),Dp=a.graduatedTickUnit;if(!(2>Dp*Ss*Rt/a.graduatedRange&&nl.graduatedSkip===null)){var Yc=Vt[0][0],Mu=0,Us=0;Ys=Rt*nl.graduatedStart-1e-4,Pd=Rt*nl.graduatedEnd+1e-4;var ic=Dp*Ss,il=a.graduatedTickBase;if(il<a.graduatedMin){var wd=(a.graduatedMin-il)/ic;wd=wd%1===0?wd:Math.floor(wd+1),il+=wd*ic}else il>a.graduatedMin+ic&&(il-=Math.floor((il-a.graduatedMin)/ic)*ic);for(var G0=zh[tg],Bp=il,Wy=1e-6*a.graduatedMax,Yu=1;il<=a.graduatedMax+Wy;Yu++){t:{for(var sh=G0.length,Uc=0;Uc<sh;Uc++){var Cd=(il-a.graduatedTickBase)%(G0[Uc]*a.graduatedTickUnit),eg=1e-6*a.graduatedTickUnit;if(Cd<eg&&Cd>-eg){var Ld=!1;break t}}Ld=!0}if(Ld&&(il>a.graduatedMax&&(il=a.graduatedMax),nl.graduatedSkip===null||nl instanceof No&&!nl.graduatedSkip(il,nl)||nl instanceof dr&&!nl.graduatedSkip(il,nl))&&(el=(il-a.graduatedMin)*Rt/a.graduatedRange,el>Rt&&(el=Rt),Ys<=el&&el<=Pd)){for(var Uu=ue[Mu][Us],jh=Vt[Mu][Us];Mu<Vt.length;){for(;el>Yc&&Us<Vt[Mu].length-1;)Us++,Uu=ue[Mu][Us],jh=Vt[Mu][Us],Yc+=jh;if(el<=Yc)break;Mu++,Us=0,Uu=ue[Mu][Us],jh=Vt[Mu][Us],Yc+=jh}var Xs=Et[Mu],Eu=Xs[2*Us],Z0=Xs[2*Us+1],lh=(el-(Yc-jh))/jh,ng=new Tt(Eu+(Xs[2*Us+2]-Eu)*lh+Pt/2-yt.bounds.x,Z0+(Xs[2*Us+3]-Z0)*lh+Pt/2-yt.bounds.y);ng.scale(rt.scale,rt.scale);t:{var cu=Uu,rc=ue[Mu];if(!(.5005>lh&&.4995<lh)){var Au=cu;if(.5>lh?0<Us?Au=rc[Us-1]:le.$(Xs[0],Xs[Xs.length-2])&&le.$(Xs[1],Xs[Xs.length-1])&&(Au=rc[rc.length-1]):.5<lh&&(Us+1<rc.length?Au=rc[Us+1]:le.$(Xs[0],Xs[Xs.length-2])&&le.$(Xs[1],Xs[Xs.length-1])&&(Au=rc[0])),cu!==Au){var Xc=Math.abs(cu-Au);if(180<Xc&&(cu<Au?cu+=360:Au+=360,Xc=Math.abs(cu-Au)),5e-4>lh||.9995<lh){Uu=(cu+Au)/2%360;break t}if(10>Xc){var ig=1-Math.abs(.5-lh);Uu=(cu*ig+Au*(1-ig))%360;break t}}}Uu=cu}if(nl instanceof No){var eu="";nl.graduatedFunction!==null?(eu=nl.graduatedFunction(il,nl),eu=eu!=null?eu.toString():""):eu=(+il.toFixed(2)).toString(),eu!==""&&du.push({$l:ng,angle:Uu,text:eu})}else du.push({$l:ng,angle:Uu})}il=Bp+Yu*ic}}}a.graduatedMarks.push(du)}ri(ue);var Xa=a.graduatedMarks;if(Xa!==null)for(var Op=E.length,Ns=0;Ns<Op;Ns++){var Pa=E[Ns],Ts=Xa[Ns];if(Pa.visible&&Pa!==rt&&Ts.length!==0){if(Pa instanceof dr){var uh=a,Wh=b,oc=Pa.alignmentFocus;oc.Mc()&&(oc=ar);var Hy=Pa.angle;Pa.Kb=0,Pa.measure(1/0,1/0,0,0),Pa.Kb=Hy;var V0=Pa.measuredBounds,rg=V0.width,ac=V0.height,Jc=ae.allocAt(0,0,rg,ac),Js=Tt.alloc();Js.xi(Jc,oc),ae.free(Jc);for(var hh=-Js.x,fu=-Js.y,Al=new ae,kd=Ts.length,og=0;og<kd;og++)for(var Md=Ts[og],K0=Md.$l.x,ag=Md.$l.y,da=Md.angle,nu=0;4>nu;nu++){switch(nu){case 0:Js.h(hh,fu);break;case 1:Js.h(hh+rg,fu);break;case 2:Js.h(hh,fu+ac);break;case 3:Js.h(hh+rg,fu+ac)}Js.rotate(da+Pa.angle),Js.offset(K0,ag),og===0&&nu===0?Al.h(Js.x,Js.y,0,0):Al.Ye(Js),Js.offset(-K0,-ag),Js.rotate(-da-Pa.angle)}Tt.free(Js),uh.graduatedBounds!==null&&uh.graduatedBounds.push(Al),ui(Wh,Al.x,Al.y,Al.width,Al.height)}else if(Pa instanceof No){var Hl=a,Y0=b;Hl.temporaryTextBlock===null&&(Hl.temporaryTextBlock=new No);var rl=Hl.temporaryTextBlock;yS(rl,Pa);var Hh=Pa.alignmentFocus;Hh.Mc()&&(Hh=ar);for(var Gl=Pa.segmentOrientation,sg=Pa.segmentOffset,Ed=new ae,Ip=0,lg=0,Fu=0,sc=0,Ad=0,ug=Ts.length,Gh=0;Gh<ug;Gh++){var Xu=Ts[Gh];Ip=Xu.$l.x,lg=Xu.$l.y,Fu=Xu.angle,Ad=sc=Pa.angle,Gl!==Ms&&(Ad=Gl===op||Gl===$m?Fu+Pa.angle:Fu,sc=Ln.computeAngle(Gl,Ad)),rl.Kb=sc,rl.text=Xu.text||"",rl.measure(1/0,1/0,0,0);var Zh=rl.measuredBounds,dh=rl.naturalBounds,Vh=dh.width,lc=dh.height,gu=Un.alloc();gu.reset(),gu.translate(-Zh.x,-Zh.y),gu.scale(rl.scale,rl.scale),gu.rotate(Ad,Vh/2,lc/2),Gl!==ap&&Gl!==lp||gu.rotate(90,Vh/2,lc/2),Gl!==sp&&Gl!==up||gu.rotate(-90,Vh/2,lc/2),Gl===t0&&(45<Fu&&135>Fu||225<Fu&&315>Fu)&&gu.rotate(-Fu,Vh/2,lc/2);var Qc=ae.allocAt(0,0,Vh,lc),Kh=Tt.alloc();Kh.xi(Qc,Hh),gu.Ga(Kh);var _c=-Kh.x,Gy=-Kh.y,ch=Tt.alloc();ch.assign(sg),isNaN(ch.x)&&(ch.x=Vh/2+3),isNaN(ch.y)&&(ch.y=-(lc/2+3)),ch.rotate(Fu),Ip+=ch.x+_c,lg+=ch.y+Gy;var uc=new ae(Ip,lg,Zh.width,Zh.height),Rp=new ae(Zh.x,Zh.y,Zh.width,Zh.height),Zy=new ae(dh.x,dh.y,dh.width,dh.height);Xu.Sz=sc,Xu.lineCount=rl.lineCount,Xu.lines=[rl.Cb,rl.Ih,rl.df,rl.Le,rl.Qc,rl.Qb,rl.ze],Xu.actualBounds=uc,Xu.measuredBounds=Rp,Xu.naturalBounds=Zy,Gh===0?Ed.assign(uc):Ed.ed(uc),Tt.free(ch),Tt.free(Kh),ae.free(Qc),Un.free(gu)}Hl.graduatedBounds!==null&&Hl.graduatedBounds.push(Ed),ui(Y0,Ed.x,Ed.y,Ed.width,Ed.height)}Ma(Pa,!1)}}},Xg.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var E=a.Pb(),b=a.graduatedMarks;if(b!==null){var z=a.graduatedBounds,tt=0,rt=z[tt];tt++,E!==null&&E.arrange(rt.x-x.x,rt.y-x.y,rt.width,rt.height);for(var ot=y.length,st=0;st<ot;st++){var ut=y[st];rt=b[st],ut.visible&&ut!==E&&rt.length!==0&&(rt=z[tt],tt++,ut.arrange(rt.x-x.x,rt.y-x.y,rt.width,rt.height))}a.graduatedBounds=null}}},Xg.prototype.gc=function(a,y,x){var E=x.$i;x.$i=!0;var b=a.naturalBounds,z=b.width,tt=b.height;b=y instanceof qs,y.save(),y.beginPath(),y.rect(-1,-1,z+1,tt+1),y.clip(),y.Se(),z=a.Pb(),z.gc(y,x),tt=a.Df()*x.scale,0>=tt&&(tt=1);for(var rt=z.actualBounds,ot=a.O.s,st=a.graduatedMarks,ut=ot.length,ft=0;ft<ut;ft++){var vt=ot[ft],yt=st[ft],Pt=yt.length;if(vt.visible&&vt!==z&&yt.length!==0){if(vt instanceof dr){if(!(2>a.graduatedTickUnit*vt.interval*z.geometry.flattenedTotalLength/a.graduatedRange*tt&&vt.graduatedSkip===null)){var Et=vt.measuredBounds,Vt=vt.strokeWidth*vt.scale,Rt=vt.alignmentFocus;Rt.Mc()&&(Rt=ar);for(var Qt=0;Qt<Pt;Qt++){var _t=yt[Qt].$l,te=yt[Qt].angle,ue=Rt,Ce=vt.Ab;Ce.reset(),Ce.translate(_t.x+rt.x,_t.y+rt.y),Ce.rotate(te+vt.angle,0,0),Ce.translate(-Et.width*ue.x+ue.offsetX+Vt/2,-Et.height*ue.y+ue.offsetY+Vt/2),Ce.scale(vt.scale,vt.scale),Ol(vt,!1),vt.wh.set(vt.Ab),vt.Kk=vt.scale,Pl(vt,!1),vt.gc(y,x),b&&(a.svg.appendChild(vt.svg),vt.svg=null),vt.Ab.reset()}}}else if(vt instanceof No)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new No),Et=a.temporaryTextBlock,yS(Et,vt),Vt=0;Vt<Pt;Vt++)Rt=yt[Vt],Rt.actualBounds&&Rt.measuredBounds&&Rt.naturalBounds&&(Et.ec=Rt.text||"",Et.Kb=Rt.Sz||0,Et.Gc=Rt.lineCount||0,Qt=Rt.lines,Qt!==void 0&&(Et.Cb=Qt[0],Et.Ih=Qt[1],Et.df=Qt[2],Et.Le=Qt[3],Et.Qc=Qt[4],Et.Qb=Qt[5],Et.ze=Qt[6]),Rt.naturalBounds&&(Et.dc=Rt.naturalBounds),Rt.actualBounds&&(Qt=Rt.actualBounds,Et.arrange(Qt.x,Qt.y,Qt.width,Qt.height)),Qt=Rt.actualBounds,Et.arrange(Qt.x,Qt.y,Qt.width,Qt.height),_t=Rt.measuredBounds,Rt=Rt.naturalBounds,te=Et.Ab,te.reset(),te.translate(Qt.x+rt.x,Qt.y+rt.y),te.translate(-_t.x,-_t.y),Et.no(te,Rt.x,Rt.y,Rt.width,Rt.height),Ol(Et,!1),Et.wh.set(Et.Ab),Et.Kk=Et.scale,Pl(Et,!1),Et.Ng=vt.part,Et.Me=vt.panel,Et.gc(y,x),Et.Me=null,Et.Ng=null,b&&(a.svg.appendChild(Et.svg),Et.svg=null))}}x.$i=E,y.restore(),y.Vc(!0)};function mn(a,y){if(de.call(this),this.na=null,a===void 0)this.na=mn.Position;else if(typeof a=="string"){var x=Jl.I(a);x!==null&&(this.na=x)}else a instanceof Fa?this.na=a:a&&(this.na=mn.Position,y=a);this.na===null&&$t("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===mn.Grid?1048576:0),this.O=new dn,this.yb=ur,this.Tm=xo,this.Uf=or,this.$g=null,this.$e="",this.jg=new ae(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=gi,this.jn=Ye,this.kn=Wn,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Oe(mn,de),mn.prototype.cloneProtected=function(a){de.prototype.cloneProtected.call(this,a),a.na=this.na,a.yb=this.yb.J(),a.Tm=this.Tm.J(),a.Uf=this.Uf,a.$e=this.$e,a.jg.assign(this.jg),this.T!==null&&(a.T=this.T.copy(a)),a.xo=this.xo,a.jn=this.jn.J(),a.kn=this.kn.J(),this.ra!==null&&(a.ra=this.ra.copy()),a.ub=this.ub,a.zn=this.zn,a.Hh=this.Hh},mn.prototype.Af=function(a){de.prototype.Af.call(this,a),a.O=this.O;for(var y=a.O.s,x=y.length,E=0;E<x;E++)y[E].Me=a;a.$g=null},mn.prototype.copy=function(){var a=de.prototype.copy.call(this);if(a!==null){for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E].copy();b.wi(a),b.Ng=null;var z=a.O,tt=z.count;if(z.Gb(tt,b),z=a.part,z!==null){z.Rh=null,b.portId!==null&&z instanceof Hn&&(z.Te=!0);var rt=a.diagram;rt!==null&&rt.undoManager.isUndoingRedoing||z.cb(Xo,"elements",a,null,b,null,tt)}}return a}return null},Ct=mn.prototype,Ct.toString=function(){return"Panel("+this.type.name+")#"+xr(this)},Ct.Pn=function(a){de.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,E=0;E<x;E++)y[E].Pn(a)},Ct.hh=function(a,y){if(this.na===mn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===mn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===mn.Table)if(a.yc(),a instanceof qs){var x=a.yd;a.yd=dm(a,"gojs-ts"),gv(this,a),a.nh.pop(),a.yd=x}else gv(this,a);(x=this.isClipping&&this.na===mn.Spot)&&a.save();for(var E=this.Pb(),b=this.O.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];x&&rt===E&&(a.clipInsteadOfFill=!0),rt.gc(a,y),x&&rt===E&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function gv(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,E=0<a.columnCount?a.colDefs:null;x!==null&&km(a,y,!0,x,!0),E!==null&&km(a,y,!1,E,!0),x!==null&&rS(a,y,!0,x),E!==null&&rS(a,y,!1,E),x!==null&&km(a,y,!0,x,!1),E!==null&&km(a,y,!1,E,!1)}function rS(a,y,x,E){for(var b=E.length,z=a.actualBounds,tt=a.naturalBounds,rt=!0,ot=0;ot<b;ot++){var st=E[ot];if(st!==void 0&&st.actual!==0)if(rt)rt=!1;else{if(x){if(st.position>tt.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){ha(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 km(a,y,x,E,b){for(var z=E.length,tt=a.actualBounds,rt=a.naturalBounds,ot=oS(a,!0),st=oS(a,!1),ut=0;ut<z;ut++){var ft=E[ut];if(ft!==void 0&&ft.background!==null&&ft.coversSeparators!==b&&ft.actual!==0){var vt=x?tt.height:tt.width;if(!(ft.position>vt)){var yt=ft.Wc(),Pt=ft.separatorStrokeWidth;isNaN(Pt)&&(Pt=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Et=ft.separatorStroke;Et===null&&(Et=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(Et===null||ft.index===(x?ot:st))&&(Pt=0),yt-=Pt,Pt=ft.position+Pt,yt+=ft.actual,Pt+yt>vt&&(yt=vt-Pt),0>=yt||(vt=a.yb,ha(a,y,ft.background,!0,!1,rt,tt),x?y.fillRect(vt.left,Pt+vt.top,tt.width-(vt.left+vt.right),yt):y.fillRect(Pt+vt.left,vt.top,yt,tt.height-(vt.top+vt.bottom)))}}}}function oS(a,y){for(var x=y?a.rowCount:a.columnCount,E=0;E<x;E++){var b=y?a.rowDefs[E]:a.colDefs[E];if(b!==void 0)return b.index}return 0}function pv(a){return a==="LineV"||a==="BarV"}Ct.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},Ct.kk=function(a,y,x){if(!de.prototype.kk.call(this,a,y,x))return!1;if(this.type===mn.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,gv(this,a),a.yd=null;else if(this.na===mn.Grid||this.na===mn.Graduated)return this.svg.innerHTML="",this.svg.remove(),!1;x=this.O.s;for(var E=x.length,b=0;b<E;b++)x[b].gc(a,y);return!0},Ct.nk=function(){return!0},Ct.$o=function(a,y,x,E){if(!this.isClipping)if(this.Dd()&&a.bk!==null){a=a.bk,y=this.O.s;for(var b=0,z=0,tt=0;tt<y.length;tt++)if(y[tt].Ed()){var rt=y[tt].actualBounds;b=tt===0?rt.x:Math.min(rt.x,b),z=tt===0?rt.y:Math.min(rt.y,z)}E.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-b)+","+(a.y-x.y-z)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else de.prototype.$o.call(this,a,y,x,E)},Ct.Sj=function(a,y,x,E,b){var z=this.se(),tt=this.transform,rt=1/(tt.m11*tt.m22-tt.m12*tt.m21),ot=tt.m22*rt,st=-tt.m12*rt,ut=-tt.m21*rt,ft=tt.m11*rt,vt=rt*(tt.m21*tt.dy-tt.m22*tt.dx),yt=rt*(tt.m12*tt.dx-tt.m11*tt.dy);if(this.areaBackground!==null)return tt=this.actualBounds,le.Ff(tt.left,tt.top,tt.right,tt.bottom,a,y,x,E,b);if(this.background!==null)return z=a*ot+y*ut+vt,rt=a*st+y*ft+yt,a=x*ot+E*ut+vt,ot=x*st+E*ft+yt,b.h(0,0),x=this.naturalBounds,z=le.Ff(0,0,x.width,x.height,z,rt,a,ot,b),b.transform(tt),z;z||(ot=1,ut=st=0,ft=1,yt=vt=0),rt=a*ot+y*ut+vt,a=a*st+y*ft+yt,ot=x*ot+E*ut+vt,x=x*st+E*ft+yt,b.h(ot,x),E=(ot-rt)*(ot-rt)+(x-a)*(x-a),st=!1,ft=this.O.s,yt=ft.length,ut=Tt.alloc(),vt=null,y=1/0;var Pt=null,Et=this.isClipping&&this.na===mn.Spot;Et&&(Pt=Tt.alloc(),vt=this.Pb(),(st=vt.Sj(rt,a,ot,x,Pt))&&(y=(rt-Pt.x)*(rt-Pt.x)+(a-Pt.y)*(a-Pt.y)));for(var Vt=0;Vt<yt;Vt++){var Rt=ft[Vt];Rt.visible&&Rt!==vt&&Rt.Sj(rt,a,ot,x,ut)&&(st=!0,Rt=(rt-ut.x)*(rt-ut.x)+(a-ut.y)*(a-ut.y),Rt<E&&(E=Rt,b.set(ut)))}return Et&&(y>E&&b.set(Pt),Tt.free(Pt)),Tt.free(ut),z&&b.transform(tt),st},Ct.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();de.prototype.Gj.call(this)},Ct.v=function(a){if(!ll(this)){de.prototype.v.call(this,a),a=null,(this.na===mn.Auto||this.na===mn.Link)&&(a=this.Pb());for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];if((b===a||b.isPanelMain)&&b.v(!0),!b.desiredSize.w()){var z=Os(b,!1);(b instanceof ks||b instanceof mn||b instanceof No||z!==en)&&b.v(!0)}}}},Ct.Uj=function(){if(!ll(this)){Ma(this,!0),Ou(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},Ct.Uk=function(){if(!(this.l&2048)){Ol(this,!0),Pl(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},Ct.Wu=function(){Pl(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},Ct.Wl=function(a,y,x,E){var b=this.jg;b.h(0,0,0,0);var z=this.desiredSize,tt=this.minSize;x===void 0&&(x=tt.width,E=tt.height),x=Math.max(x,tt.width),E=Math.max(E,tt.height);var rt=this.maxSize;isNaN(z.width)||(a=Math.min(z.width,rt.width)),isNaN(z.height)||(y=Math.min(z.height,rt.height)),a=Math.max(x,a),y=Math.max(E,y);var ot=this.yb;a=Math.max(a-ot.left-ot.right,0),y=Math.max(y-ot.top-ot.bottom,0);var st=this.O.s;st.length!==0&&this.na.measure(this,a,y,st,b,x,E),a=b.width+ot.left+ot.right,ot=b.height+ot.top+ot.bottom,isFinite(z.width)&&(a=z.width),isFinite(z.height)&&(ot=z.height),a=Math.min(rt.width,a),ot=Math.min(rt.height,ot),a=Math.max(tt.width,a),ot=Math.max(tt.height,ot),a=Math.max(x,a),ot=Math.max(E,ot),En(b,a,ot),En(this.naturalBounds,a,ot),this.Ge(0,0,a,ot)},Ct.Pb=function(){if(this.$g===null){var a=this.O.s,y=a.length;if(y===0)return null;for(var x=0;x<y;x++){var E=a[x];if(E.isPanelMain===!0)return this.$g=E}this.$g=a[0]}return this.$g};function rh(a){return a.part!==null?a.part.locationObject:null}Ct.eh=function(a,y,x,E){var b=this.O.s;if(this.actualBounds.h(a,y,x,E),b.length!==0){if(!this.desiredSize.w()){a=Os(this,!0);var z=this.measuredBounds;y=z.width,z=z.height;var tt=this.Kg,rt=tt.left+tt.right;switch(tt=tt.top+tt.bottom,y===x&&z===E&&(a=en),a){case en:(y>x||z>E)&&(this.v(),this.measure(y>x?x:y,z>E?E:z,0,0));break;case fn:this.v(!0),this.measure(x+rt,E+tt,0,0);break;case ki:this.v(!0),this.measure(x+rt,z+tt,0,0);break;case ji:this.v(!0),this.measure(y+rt,E+tt,0,0)}}this.na.arrange(this,b,this.jg)}},Ct.gh=function(a){var y=this.naturalBounds,x=rh(this);if(ci(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var E=y.length,b=Tt.allocAt(0,0);E--;){var z=y[E];if((z.visible||z===x)&&(Jn(b.set(a),z.transform),z.ca(b)))return Tt.free(b),!0}return Tt.free(b),!(this.Ma===null&&this.areaBackground===null)}return!1},Ct.ks=function(a){if(this.bindingId===a)return this;for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E].ks(a);if(b!==null)return b}return null},Ct.qm=function(a,y){if(y(this,a),a instanceof mn){a=a.O.s;for(var x=a.length,E=0;E<x;E++)this.qm(a[E],y)}};function Jd(a,y){aS(a,a,y)}function aS(a,y,x){x(y),y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=y[b];z instanceof mn&&aS(a,z,x)}}function vx(a,y){sS(a,a,y)}function sS(a,y,x){if(x(y),y instanceof mn){y=y.O.s;for(var E=y.length,b=0;b<E;b++)sS(a,y[b],x)}}Ct.Nl=function(a){return lS(this,this,a)};function lS(a,y,x){if(x(y))return y;if(y instanceof mn){y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=lS(a,y[b],x);if(z!==null)return z}}return null}Ct.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=Jg(this));for(var E=0;E<x;E++){var b=y[E];if(b instanceof mn){var z=b.fb(a);if(z!==null)return z}if(b.name===a)return b}return null};function uS(a){a=a.O.s;for(var y=a.length,x=0,E=0;E<y;E++){var b=a[E];b instanceof mn?x=Math.max(x,uS(b)):b instanceof dr&&(x=Math.max(x,b.ig/2*b.strokeMiterLimit*b.Df()))}return x}Ct.se=function(){return!(this.type===mn.TableRow||this.type===mn.TableColumn)};function Eh(a){return a.type===mn.TableRow||a.type===mn.TableColumn}Ct.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),Cs(this)))return null;var E=this.naturalBounds,b=1/this.Df(),z=this.se(),tt=z?a:Jn(Tt.allocAt(a.x,a.y),this.transform),rt=this.diagram,ot=10,st=5;if(rt!==null&&(ot=rt.Ql("extraTouchArea"),st=ot/2),ci(-(st*b),-(st*b),E.width+ot*b,E.height+ot*b,tt.x,tt.y)){if(!this.isAtomic){b=this.O.s;var ut=b.length;if(rt=Tt.alloc(),st=(ot=this.isClipping&&this.na===mn.Spot)?this.Pb():null,ot&&(st.se()?Jn(rt.set(a),st.transform):rt.set(a),!st.ca(rt)))return Tt.free(rt),z||Tt.free(tt),null;for(var ft=rh(this);ut--;){var vt=b[ut];if((vt.visible||vt===ft)&&(vt.se()?Jn(rt.set(a),vt.transform):rt.set(a),!ot||vt!==st)){var yt=null;if(vt instanceof mn?yt=vt.ic(rt,y,x):vt.pickable===!0&&vt.ca(rt)&&(yt=vt),yt!==null&&(y!==null&&(yt=y(yt)),yt!==null&&(x===null||x(yt))))return Tt.free(rt),z||Tt.free(tt),yt}}Tt.free(rt)}return this.background===null&&this.areaBackground===null?(z||Tt.free(tt),null):(a=ci(0,0,E.width,E.height,tt.x,tt.y)?this:null,z||Tt.free(tt),a)}return z||Tt.free(tt),null},Ct.ji=function(a,y,x,E){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var b=this.naturalBounds,z=this.se(),tt=z?a:Jn(Tt.allocAt(a.x,a.y),this.transform);if(b=ci(0,0,b.width,b.height,tt.x,tt.y),Eh(this)||b){if(!this.isAtomic){for(var rt=this.O.s,ot=rt.length,st=Tt.alloc(),ut=rh(this);ot--;){var ft=rt[ot];if(ft.visible||ft===ut){ft.se()?Jn(st.set(a),ft.transform):st.set(a);var vt=ft;ft=ft instanceof mn?ft:null,(ft!==null?ft.ji(st,y,x,E):vt.ca(st))&&vt.pickable!==!1&&(y!==null&&(vt=y(vt)),vt===null||x!==null&&!x(vt)||E.add(vt))}}Tt.free(st)}return z||Tt.free(tt),b&&(this.background!==null||this.areaBackground!==null)}return z||Tt.free(tt),!1},Ct.Cf=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var tt=z;if(z===void 0&&(tt=Un.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return mv(this,y,x,b),z===void 0&&Un.free(tt),!0;if(this.Yc(a,tt)){if(!this.isAtomic)for(var rt=rh(this),ot=this.O.s,st=ot.length;st--;){var ut=ot[st];if(ut.visible||ut===rt){var ft=ut.actualBounds,vt=this.naturalBounds;ft.x>vt.width||ft.y>vt.height||0>ft.x+ft.width||0>ft.y+ft.height||(ft=ut,ut=ut instanceof mn?ut:null,vt=Un.alloc(),vt.set(tt),(ut!==null?ut.Cf(a,y,x,E,b,vt):Da(ft,a,E,vt))&&(y!==null&&(ft=y(ft)),ft===null||x!==null&&!x(ft)||b.add(ft)),Un.free(vt))}}return z===void 0&&Un.free(tt),E}return z===void 0&&Un.free(tt),!1};function mv(a,y,x,E){for(var b=a.O.s,z=b.length;z--;){var tt=b[z];if(tt.visible){var rt=tt.actualBounds,ot=a.naturalBounds;rt.x>ot.width||rt.y>ot.height||0>rt.x+rt.width||0>rt.y+rt.height||(tt instanceof mn&&mv(tt,y,x,E),y!==null&&(tt=y(tt)),tt===null||x!==null&&!x(tt)||E.add(tt))}}}Ct.og=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;x===void 0&&(x=null),E===void 0&&(E=null);var tt=this.naturalBounds,rt=this.se(),ot=rt?a:Jn(Tt.allocAt(a.x,a.y),this.transform),st=rt?y:Jn(Tt.allocAt(y.x,y.y),this.transform),ut=ot.Bf(st),ft=0<ot.x&&ot.x<tt.width&&0<ot.y&&ot.y<tt.height||Qn(ot.x,ot.y,0,0,0,tt.height)<=ut||Qn(ot.x,ot.y,0,tt.height,tt.width,tt.height)<=ut||Qn(ot.x,ot.y,tt.width,tt.height,tt.width,0)<=ut||Qn(ot.x,ot.y,tt.width,0,0,0)<=ut;if(tt=ot.zd(0,0)<=ut&&ot.zd(0,tt.height)<=ut&&ot.zd(tt.width,0)<=ut&&ot.zd(tt.width,tt.height)<=ut,rt||(Tt.free(ot),Tt.free(st)),ft){if(!this.isAtomic){ot=Tt.alloc(),st=Tt.alloc(),ut=rh(this);for(var vt=this.O.s,yt=vt.length;yt--;){var Pt=vt[yt];if(Pt.visible||Pt===ut){var Et=Pt.actualBounds,Vt=this.naturalBounds;(!rt||!(Et.x>Vt.width||Et.y>Vt.height||0>Et.x+Et.width||0>Et.y+Et.height))&&(Pt.se()?(Et=Pt.transform,Jn(ot.set(a),Et),Jn(st.set(y),Et)):(ot.set(a),st.set(y)),Et=Pt,Pt=Pt instanceof mn?Pt:null,(Pt!==null?Pt.og(ot,st,x,E,b,z):Et.tx(ot,st,b))&&(x!==null&&(Et=x(Et)),Et===null||E!==null&&!E(Et)||z.add(Et)))}}Tt.free(ot),Tt.free(st)}return b?ft:tt}return!1};function vv(a){var y=null;return a instanceof dr&&(y=a.spot1,y===xo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Wi),y}function yv(a){var y=null;return a instanceof dr&&(y=a.spot2,y===xo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=hr),y}Ct.add=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];for(x=0;x<y.length;x++)this.Gb(this.O.count,y[x]);return this},Ct.M=function(a){return this.O.M(a)},Ct.Gb=function(a,y){y instanceof Fi&&$t("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&$t("Cannot make a Panel contain itself: "+this.toString()),$t("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&$t("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+y.toString()+", already contained by "+x.toString()+", cannot be shared by this Panel: "+this.toString()),this.na!==mn.Grid||y instanceof dr||$t("Can only add Shapes to a Grid Panel, not: "+y),this.na!==mn.Graduated||y instanceof dr||y instanceof No||$t("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+y),y.wi(this),y.Ng=null,this.itemArray!==null){var E=y.data;E!==null&&typeof E=="object"&&(this.ge===null&&(this.ge=new be),this.ge.add(E,y))}var b=this.O;if(E=-1,x===this){for(var z=-1,tt=this.O.s,rt=tt.length,ot=0;ot<rt;ot++)if(tt[ot]===y){z=ot;break}if(z!==-1){if(z===a||z+1>=b.count&&a>=b.count)return;b.mb(z),E=z}else $t("element "+y.toString()+" has panel "+x.toString()+" but is not contained by it.")}(0>a||a>b.count)&&(a=b.count),b.Gb(a,y),(a===0||y.isPanelMain)&&(this.$g=null),ll(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof mn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Em(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof Hn&&(x.Te=!0),x.Te&&x instanceof Hn&&(x.wc=null),b=this.diagram,b!==null&&b.undoManager.isUndoingRedoing||(E!==-1&&x.cb(ua,"elements",this,y,null,E,null),x.cb(Xo,"elements",this,null,y,null,a)))};function Sv(a,y){a.l=y?a.l|16777216:a.l&-16777217}Ct.remove=function(a){for(var y=this.O.s,x=y.length,E=-1,b=0;b<x;b++)if(y[b]===a){E=b;break}E!==-1&&this.pc(E,!0)},Ct.mb=function(a){0<=a&&this.pc(a,!0)},Ct.pc=function(a,y){var x=this.O,E=x.M(a);if(E.Ng=null,E.wi(null),this.ge!==null){var b=E.data;typeof b=="object"&&this.ge.remove(b)}x.mb(a),Ma(this,!1),this.v(),this.$g===E&&(this.$g=null),this.graduatedIntervals=null;var z=this.part;z!==null&&(z.Rh=null,z.ag=NaN,z.Wb(),z instanceof Hn&&(E instanceof mn?E.qm(E,function(tt,rt){Gv(z,rt,y)}):Gv(z,E,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||z.cb(ua,"elements",this,E,null,a,null))},Ct.Fb=function(a){0>a&&ei(a,">= 0",mn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Ea;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(Xo,"rowdefs",this,null,x,null,a)}return y[a]},Ct.oA=function(a){if(0>a&&ei(a,">= 0",mn,"removeRowDefinition:idx"),this.rowCount!==0){a=Math.round(a);var y=this.rowDefs,x=y[a];if(x){y[a]=void 0;for(var E=y.length-1;0<=E&&y[E--]===void 0;)y.length--;this.cb(ua,"rowdefs",this,x,null,a,null),this.v()}}};function hS(a,y,x){var E=a.rowDefs;if(!(0>y)){if(E[y]=x instanceof Ea?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}Ct.Eb=function(a){0>a&&ei(a,">= 0",mn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Ea;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(Xo,"coldefs",this,null,x,null,a)}return y[a]},Ct.jA=function(a){if(0>a&&ei(a,">= 0",mn,"removeColumnDefinition:idx"),this.columnCount!==0){a=Math.round(a);var y=this.colDefs,x=y[a];if(x){y[a]=void 0;for(var E=y.length-1;0<=E&&y[E--]===void 0;)y.length--;this.cb(ua,"coldefs",this,x,null,a,null),this.v()}}};function dS(a,y,x){var E=a.colDefs;if(!(0>y)){if(E[y]=x instanceof Ea?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}Ct.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&Am(y,a),this},Ct.Hy=function(a,y){return(a=this.Fb(a))&&Am(a,new Ea(y)),this},Ct.By=function(a,y){return(a=this.Eb(a))&&Am(a,new Ea(y)),this},Ct.nz=function(a){if(0>a||this.type!==mn.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,E=x.length,b=this.topIndex;b<E;b++){var z=x[b];if(z!==void 0&&(y+=z.total,a<y))break}return b},Ct.fz=function(a){if(0>a||this.type!==mn.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,E=x.length,b=this.leftIndex;b<E;b++){var z=x[b];if(z!==void 0&&(y+=z.total,a<y))break}return b},Ct.Fz=function(a,y){if(y===void 0&&(y=new Tt(NaN,NaN)),this.type!==mn.Graduated)return y.h(NaN,NaN),y;a=Math.min(Math.max(a,this.graduatedMin),this.graduatedMax);var x=this.Pb();return x.geometry.Pu((a-this.graduatedMin)/this.graduatedRange,y),x.transform.Ga(y)},Ct.Gz=function(a){if(this.type!==mn.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function cS(a){return a=a.allBindings,a!==null&&a._isFrozen}function Rl(a){var y=a.allBindings;if(y===null)a.data!==null&&$t("Template cannot have .data be non-null: "+a),a.allBindings=y=new dn;else if(y._isFrozen)return;var x=new dn;Sv(a,!1),a.qm(a,function(st,ut){ut.th();var ft=ut.localBindings;if(ft!==null)for(Nc(ut,!1),ft=ft.iterator;ft.next();){var vt=ft.value;vt.mode===vp&&Nc(ut,!0);var yt=vt.sourceName;yt!==null&&(yt==="/"&&Sv(st,!0),yt=M1(vt,st,ut),yt!==null&&(x.add(yt),yt.srcBindings===null&&(yt.srcBindings=new dn),yt.srcBindings.add(vt))),y.add(vt)}if(ut instanceof mn&&ut.type===mn.Table){if(0<ut.rowCount){for(st=ut.rowDefs,ft=st.length,vt=0;vt<ft;vt++)if(yt=st[vt],yt!==void 0&&yt.be!==null)for(var Pt=yt.be.iterator;Pt.next();){var Et=Pt.value;Et.xd=yt,Et.to=2,Et.wl=yt.index,y.add(Et)}}if(0<ut.columnCount){for(ut=ut.colDefs,st=ut.length,ft=0;ft<st;ft++)if(vt=ut[ft],vt!==void 0&&vt.be!==null)for(yt=vt.be.iterator;yt.next();)Pt=yt.value,Pt.xd=vt,Pt.to=1,Pt.wl=vt.index,y.add(Pt)}}});for(var E=x.iterator;E.next();){var b=E.value;if(b.srcBindings!==null){Nc(b,!0);for(var z=b.srcBindings.iterator;z.next();){var tt=z.value;b.localBindings===null&&(b.localBindings=new dn),b.localBindings.add(tt)}}b.srcBindings=null}for(E=y.iterator;E.next();)if(b=E.value,z=b.xd,z!==null){b.xd=null;var rt=b.targetProperty,ot=rt.indexOf(".");0<ot&&z instanceof mn&&(tt=rt.substring(0,ot),rt=rt.substr(ot+1),ot=z.fb(tt),ot!==null?(z=ot,b.targetProperty=rt):Bi('Warning: unable to find GraphObject named "'+tt+'" for Binding: '+b.toString())),z instanceof Ea?(tt=xr(z.panel),b.Ai=tt===void 0?-1:tt,z.panel.bindingId=b.Ai):z instanceof de?(tt=xr(z),b.Ai=tt===void 0?-1:tt,z.bindingId=b.Ai):$t("Unknown type of binding target: "+z)}y.freeze(),a instanceof Fi&&a.Zc()&&a.Va()}Ct.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return vx(y,function(x){x instanceof mn&&(x.allBindings=null,x.ub=null);var E=x.localBindings;E!==null&&(x.localBindings=null,E.each(function(b){x.bind(b.copy())})),E=x.animationTriggers,E!==null&&(x.animationTriggers=null,E.each(function(b){x.Jv(b.value.copy())}))}),a&&Rl(y),y},Ct.La=function(a){var y=this.allBindings;if(y!==null)for(a===void 0&&(a=""),y=y.iterator;y.next();){var x=y.value,E=x.sourceProperty;if((a===""||E===""||E===a)&&(E=x.targetProperty,x.converter!==null||E!=="")){E=this.data;var b=x.sourceName;if(b!==null){if(b==="")E=this;else if(b==="/")E=this;else if(b===".")E=this;else if(b==="..")E=this;else if(E=this.fb(b),E===null)continue}else if(x.isToModel)if(E=this.diagram,E!==null)E=E.model.modelData;else continue;var z=this,tt=x.Ai;if(tt!==-1){if(z=this.ks(tt),z===null)continue}else x.xd!==null&&(z=x.xd);if(b==="/"?E=z.part:b==="."?E=z:b===".."&&(E=z.panel),b=x.to,b!==0){if(!(z instanceof mn))continue;b===1?z=z.Eb(x.wl):b===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,E)}}},Ct.sx=function(a){return a==null||this.ge===null?null:this.ge.I(a)};function yx(a,y){a=a.O.s;for(var x=a.length,E=y.length,b=0,z=null;b<x&&(z=a[b],!(z instanceof mn&&z.data!==null));)b++,z=a[b];if(x-b!==E)return!0;if(z===null)return 0<E;for(var tt=0;b<x&&tt<E;){if(z=a[b],!(z instanceof mn)||z.data!==y[tt])return!0;b++,tt++}return!1}function Jg(a){if(a.type===mn.Spot||a.type===mn.Auto)return Math.min(a.O.length,1);if(a.type===mn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var E=a.M(x);if(!(E instanceof dr&&E.isPanelMain))break}return x}return a.type===mn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof mn&&Eh(a))?1:0}Ct.mv=function(){for(var a=Jg(this);this.O.length>a;)this.pc(this.O.length-1,!1);fS(this,this.itemArray)};function fS(a,y){var x=Jg(a);if(y===null||y.length===0)for(;a.O.length>x;)a.pc(a.O.length-1,!1);else if(a.O.length<=x){x=y.length;for(var E=0;E<x;E++)Mm(a,y[E],E,!0)}else{E=x;for(var b=0;b<y.length;b++,E++){var z=y[b],tt=E<a.O.length?a.O.M(E):null;if(tt instanceof mn){if(tt.data!==z){var rt=Pv(a,tt.data),ot=Pv(a,z),st=ot!==rt;st||(rt=wv(a,rt),st=wv(a,ot)!==rt),st?(a.pc(E,!1),Mm(a,z,b,!1)):tt.data=z}}else Mm(a,z,b,!1)}for(;E<a.O.length;)a.pc(E,!1);a.$g=null,xv(a,x,0),ll(a)||a.v(),a.graduatedIntervals=null,a.If()||Em(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof Hn&&(y.Te=!0),y.Te&&y instanceof Hn&&(y.wc=null))}}function Mm(a,y,x,E){if(!(y==null||0>x)){var b=Pv(a,y);if(b=wv(a,b),b!==null){if(Rl(b),b=b.copy(),b.l&16777216){var z=a.ih();z!==null&&Sv(z,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new be),a.ge.add(y,b)),z=x+Jg(a),a.Gb(z,b),E&&(b.ub=y,xv(a,z,x),b.ub=null),b.data=y}}}function xv(a,y,x){for(a=a.O;y<a.length;){var E=a.M(y);if(E instanceof mn){var b=y,z=x;E.type===mn.TableRow?E.row=b:E.type===mn.TableColumn&&(E.column=b),E.itemIndex=z}y++,x++}}function Pv(a,y){if(y===null)return"";if(a=a.itemCategoryProperty,typeof a=="function")a=a(y);else if(typeof a=="string"&&typeof y=="object"){if(a==="")return"";a=ma(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;$t("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function wv(a,y){var x=a.itemTemplateMap,E=null;return x!==null&&(E=x.I(y)),E===null&&(x!==null&&(E=x.I("")),E===null&&(gS||(gS=!0,Bi('No item template Panel found for category "'+y+'" on '+a),Bi(" Using default item template."),a=new mn,y=new No,y.bind(new Sa("text","",Sr)),a.add(y),pS=a),E=pS)),E}function Em(a,y,x){var E=y.enabledChanged;if(E!==null&&E(y,x),y instanceof mn){y=y.O.s,E=y.length;for(var b=0;b<E;b++){var z=y[b];x&&z instanceof mn&&!z.isEnabled||Em(a,z,x)}}}function Lu(a,y){y.name=a,Jl.add(a,y)}Me.Object.defineProperties(mn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===mn.Grid,this.v(),this.g("type",y,a))}},elements:{get:function(){return this.O.iterator}},naturalBounds:{get:function(){return this.dc}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"?(0>a&&ei(a,">= 0",mn,"padding"),a=new ii(a)):(0>a.left&&ei(a.left,">= 0",mn,"padding:value.left"),0>a.right&&ei(a.right,">= 0",mn,"padding:value.right"),0>a.top&&ei(a.top,">= 0",mn,"padding:value.top"),0>a.bottom&&ei(a.bottom,">= 0",mn,"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:ur},set:function(a){typeof a=="number"&&(a=new ii(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new Ll),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 ro)&&(a instanceof ro&&a.freeze(),this.T===null&&(this.T=new Ll),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 Ll),this.T.Ha=a,this.v(),this.g("defaultRowSeparatorStrokeWidth",y,a))}},defaultRowSeparatorDashArray:{get:function(){return this.T!==null?this.T.V:null},set:function(a){var y=this.defaultRowSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||$t("defaultRowSeparatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.T===null&&(this.T=new Ll),this.T.V=a,this.N(),this.g("defaultRowSeparatorDashArray",y,a)}}},defaultColumnSeparatorStroke:{get:function(){return this.T!==null?this.T.u:null},set:function(a){var y=this.defaultColumnSeparatorStroke;y!==a&&(a===null||typeof a=="string"||a instanceof ro)&&(a instanceof ro&&a.freeze(),this.T===null&&(this.T=new Ll),this.T.u=a,this.N(),this.g("defaultColumnSeparatorStroke",y,a))}},defaultColumnSeparatorStrokeWidth:{get:function(){return this.T!==null?this.T.F:1},set:function(a){var y=this.defaultColumnSeparatorStrokeWidth;y!==a&&isFinite(a)&&0<=a&&(this.T===null&&(this.T=new Ll),this.T.F=a,this.v(),this.g("defaultColumnSeparatorStrokeWidth",y,a))}},defaultColumnSeparatorDashArray:{get:function(){return this.T!==null?this.T.o:null},set:function(a){var y=this.defaultColumnSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||$t("defaultColumnSeparatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.T===null&&(this.T=new Ll),this.T.o=a,this.N(),this.g("defaultColumnSeparatorDashArray",y,a)}}},inRowsCols:{get:function(){return this.T!==null?this.T.nb:null},set:function(a){this.T===null&&(this.T=new Ll),this.T.nb=a}},viewboxStretch:{get:function(){return this.xo},set:function(a){var y=this.xo;y!==a&&(this.xo=a,this.v(),this.g("viewboxStretch",y,a))}},gridCellSize:{get:function(){return this.jn},set:function(a){var y=this.jn;if(!y.D(a)){a.w()&&a.width!==0&&a.height!==0||$t("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Pu(x),this.N(),this.g("gridCellSize",y,a)}}},gridOrigin:{get:function(){return this.kn},set:function(a){var y=this.kn;if(!y.D(a)){a.w()||$t("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Pu(x),this.N(),this.g("gridOrigin",y,a)}}},graduatedMin:{get:function(){return this.ra!==null?this.ra.lq:0},set:function(a){var y=this.graduatedMin;y!==a&&(this.ra===null&&(this.ra=new oh),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),$a(this)&&(a=this.part,a!==null&&Zo(this,a,"graduatedRange")))}},graduatedMax:{get:function(){return this.ra!==null?this.ra.F:100},set:function(a){var y=this.graduatedMax;y!==a&&(this.ra===null&&(this.ra=new oh),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),$a(this)&&(a=this.part,a!==null&&Zo(this,a,"graduatedRange")))}},graduatedRange:{get:function(){return this.graduatedMax-this.graduatedMin}},graduatedTickUnit:{get:function(){return this.ra!==null?this.ra.ia:10},set:function(a){var y=this.graduatedTickUnit;y!==a&&0<a&&(this.ra===null&&(this.ra=new oh),this.ra.ia=a,this.v(),this.g("graduatedTickUnit",y,a))}},graduatedTickBase:{get:function(){return this.ra!==null?this.ra.V:0},set:function(a){var y=this.graduatedTickBase;y!==a&&(this.ra===null&&(this.ra=new oh),this.ra.V=a,this.v(),this.g("graduatedTickBase",y,a))}},graduatedMarks:{get:function(){return this.ra!==null?this.ra.u:null},set:function(a){this.ra!==null?this.ra.u=a:a!==null&&(this.ra=new oh,this.ra.u=a)}},graduatedBounds:{get:function(){return this.ra!==null?this.ra.j:null},set:function(a){this.ra!==null?this.ra.j=a:a!==null&&(this.ra=new oh,this.ra.j=a)}},graduatedIntervals:{get:function(){return this.ra!==null?this.ra.o:null},set:function(a){this.ra!==null?this.ra.o=a:a!==null&&(this.ra=new oh,this.ra.o=a)}},temporaryTextBlock:{get:function(){return this.ra!==null?this.ra.Zh:null},set:function(a){this.ra!==null?this.ra.Zh=a:a!==null&&(this.ra=new oh,this.ra.Zh=a)}},panelLayoutState:{get:function(){return this.F},set:function(a){this.F=a}},Te:{get:function(){return(this.l&8388608)!==0},set:function(a){(this.l&8388608)!==0!==a&&(this.l^=8388608)}},rowDefs:{get:function(){return this.T===null&&(this.T=new Ll),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new Ll),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:bm},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new Ll),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:bm},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new Ll),this.T.j=a,this.v(),this.g("columnSizing",y,a))}},topIndex:{get:function(){return this.T!==null?this.T.Hb:0},set:function(a){var y=this.topIndex;y!==a&&((!isFinite(a)||0>a)&&$t("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Ll),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)&&$t("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Ll),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 Fi&&!(this instanceof Zr);Rl(this),this.ub=a;var E=this.diagram;E!==null&&(x?(x=E.partManager,this instanceof Ln?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Fi&&(y!==null&&x.cf.remove(y),a!==null&&x.cf.add(a,this))):(x=this.panel,x!==null&&x.ge!==null&&(y!==null&&x.ge.remove(y),a!==null&&x.ge.add(a,this)))),this.g("data",y,a),E!==null&&E.undoManager.isUndoingRedoing||a!==null&&this.La()}}},itemIndex:{get:function(){return this.zn},set:function(a){var y=this.zn;y!==a&&(this.zn=a,this.g("itemIndex",y,a))}},allBindings:{get:function(){return this.A!==null?this.A.nb:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new Tc),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 be}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Fi||a.isPanelMain)&&$t("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(););pr(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&&(pr(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 ir&&(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&&Em(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))}}}),Me.Object.defineProperties(mn,{Position:{get:function(){return Jl.I("Position")}},Horizontal:{get:function(){return Jl.I("Horizontal")}},Vertical:{get:function(){return Jl.I("Vertical")}},Spot:{get:function(){return Jl.I("Spot")}},Auto:{get:function(){return Jl.I("Auto")}},Table:{get:function(){return Jl.I("Table")}},Viewbox:{get:function(){return Jl.I("Viewbox")}},TableRow:{get:function(){return Jl.I("TableRow")}},TableColumn:{get:function(){return Jl.I("TableColumn")}},Link:{get:function(){return Jl.I("Link")}},Grid:{get:function(){return Jl.I("Grid")}},Graduated:{get:function(){return Jl.I("Graduated")}}}),mn.prototype.rebuildItemElements=mn.prototype.mv,mn.prototype.findItemPanelForData=mn.prototype.sx,mn.prototype.updateTargetBindings=mn.prototype.La,mn.prototype.copyTemplate=mn.prototype.Uy,mn.prototype.graduatedValueForPoint=mn.prototype.Gz,mn.prototype.graduatedPointForValue=mn.prototype.Fz,mn.prototype.findColumnForLocalX=mn.prototype.fz,mn.prototype.findRowForLocalY=mn.prototype.nz,mn.prototype.addColumnDefinition=mn.prototype.By,mn.prototype.addRowDefinition=mn.prototype.Hy,mn.prototype.addRowColumnDefinition=mn.prototype.Gy,mn.prototype.removeColumnDefinition=mn.prototype.jA,mn.prototype.getColumnDefinition=mn.prototype.Eb,mn.prototype.removeRowDefinition=mn.prototype.oA,mn.prototype.getRowDefinition=mn.prototype.Fb,mn.prototype.removeAt=mn.prototype.mb,mn.prototype.remove=mn.prototype.remove,mn.prototype.insertAt=mn.prototype.Gb,mn.prototype.elt=mn.prototype.M,mn.prototype.add=mn.prototype.add,mn.prototype.findObject=mn.prototype.fb,mn.prototype.findInVisualTree=mn.prototype.Nl,mn.prototype.walkVisualTreeFrom=mn.prototype.qm,mn.prototype.findMainElement=mn.prototype.Pb;var gS=!1,pS=null,Jl=new be;mn.className="Panel",mn.definePanelLayout=Lu,Lu("Position",new gm),Lu("Vertical",new mm),Lu("Auto",new ym),Lu("Link",new Lm);function oh(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}oh.prototype.copy=function(){var a=new oh;return a.lq=this.lq,a.F=this.F,a.ia=this.ia,a.V=this.V,a.u=this.u,a.j=this.j,a.o=this.o,a.Zh=this.Zh,a},oh.className="GradPanelSettings";function Ll(){this.Pc=[],this.Oc=[],this.j=this.ob=bm,this.hb=this.Hb=0,this.Qp=ur,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}Ll.prototype.copy=function(a){for(var y=new Ll,x=this.Pc,E=x.length,b=y.Pc,z=0;z<E;z++)if(x[z]!==void 0){var tt=x[z].copy();tt.wi(a),b[z]=tt}for(x=this.Oc,E=x.length,b=y.Oc,z=0;z<E;z++)x[z]!==void 0&&(tt=x[z].copy(),tt.wi(a),b[z]=tt);return y.ob=this.ob,y.j=this.j,y.Hb=this.Hb,y.hb=this.hb,y.Qp=this.Qp.J(),y.Ha=this.Ha,y.ia=this.ia,y.V=this.V,y.F=this.F,y.u=this.u,y.o=this.o,y.nb=this.nb,y},Ll.className="TablePanelSettings";function Ea(a){Ri(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=xo,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Cv,this.hg=or,this.lo=this.dg=null,this.mo=NaN,this.Ma=this.tj=null,this.Pm=!1,a&&(Object.assign(this,a),a.column!==void 0?(this.isRow=!1,this.index=a.column):a.row!==void 0&&(this.isRow=!0,this.index=a.row))}Ea.prototype.copy=function(){var a=new Ea;return a.uq=this.uq,a.Za=this.Za,a.Hc=this.Hc,a.jj=this.jj,a.hj=this.hj,a.Jb=this.Jb,a.oa=this.oa,a.oc=this.oc,a.pa=this.pa,a.hg=this.hg,a.oo=this.oo,this.dg===null?a.dg=null:a.dg=this.dg.J(),a.lo=this.lo,a.mo=this.mo,a.tj=null,this.tj!==null&&(a.separatorDashArray=$n(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function Am(a,y){y.isRow?a.height=y.height:a.width=y.width,a.minimum=y.minimum,a.maximum=y.maximum,a.alignment=y.alignment,a.stretch=y.stretch,a.sizing=y.sizing,a.dg=y.separatorPadding===null?null:y.separatorPadding.J(),a.separatorStroke=y.separatorStroke,a.separatorStrokeWidth=y.separatorStrokeWidth,a.tj=null,y.separatorDashArray&&(a.tj=$n(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}Ct=Ea.prototype,Ct.qb=function(a){a.classType===Ea&&(this.sizing=a)},Ct.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+xr(this)},Ct.wi=function(a){this.Me=a},Ct.Io=function(a){var y=0,x=this.Me;if(this.index!==a&&(a=this.separatorStroke,a===null&&x!==null&&(a=this.isRow?x.defaultRowSeparatorStroke:x.defaultColumnSeparatorStroke),a!==null&&(y=this.separatorStrokeWidth,isNaN(y)&&(x!==null?y=this.isRow?x.defaultRowSeparatorStrokeWidth:x.defaultColumnSeparatorStrokeWidth:y=0))),a=this.dg,a===null)if(x!==null)a=x.defaultSeparatorPadding;else return y;return y+(this.isRow?a.top:a.left)},Ct.Wc=function(){var a=0,y=this.Me,x=0,E=this.isRow;if(y!==null&&y.type===mn.Table)for(var b=E?y.rowDefs.length:y.colDefs.length,z=0;z<b;z++){var tt=E?y.rowDefs[z]:y.colDefs[z];if(tt!==void 0&&tt.oa!==0){x=tt.index;break}}if(this.index!==x&&(x=this.separatorStroke,x===null&&y!==null&&(x=E?y.defaultRowSeparatorStroke:y.defaultColumnSeparatorStroke),x!==null&&(a=this.separatorStrokeWidth,isNaN(a)&&(y!==null?a=E?y.defaultRowSeparatorStrokeWidth:y.defaultColumnSeparatorStrokeWidth:a=0))),E=this.dg,E===null)if(y!==null)E=y.defaultSeparatorPadding;else return a;return a+(this.isRow?E.top+E.bottom:E.left+E.right)},Ct.Ob=function(a,y,x){var E=this.Me;if(E!==null&&(E.cb(Eo,a,this,y,x,void 0,void 0),this.be!==null&&(y=E.diagram,y!==null&&!y.skipsModelSourceBindings&&(E=E.ih(),E!==null&&(y=E.data,y!==null)))))for(x=this.be.iterator;x.next();)x.value.sp(this,y,a,E)};function Fm(a){if(a.sizing===Cv){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}Ct.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Sa(a,y,x,E):b=a,b.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&cS(y)&&$t("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+b+" on "+a)),this.be===null&&(this.be=new dn),this.be.add(b),this},Me.Object.defineProperties(Ea.prototype,{panel:{get:function(){return this.Me}},isRow:{get:function(){return this.uq},set:function(a){this.uq=a}},index:{get:function(){return this.Za},set:function(a){this.Za=a}},height:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&ei(a,">= 0",Ea,"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&&ei(a,">= 0",Ea,"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))&&ei(a,">= 0",Ea,"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&&ei(a,">= 0",Ea,"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 ii(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&&Bc(a,"RowColumnDefinition.separatorStroke"),a instanceof ro&&a.freeze(),this.lo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStroke",y,a))}},separatorStrokeWidth:{get:function(){return this.mo},set:function(a){var y=this.mo;y!==a&&(this.mo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStrokeWidth",y,a))}},separatorDashArray:{get:function(){return this.tj},set:function(a){var y=this.tj;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||$t("separatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.tj=a,this.panel!==null&&this.panel.N(),this.Ob("separatorDashArray",y,a)}}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&Bc(a,"RowColumnDefinition.background"),a instanceof ro&&a.freeze(),this.Ma=a,this.panel!==null&&this.panel.N(),this.Ob("background",y,a))}},coversSeparators:{get:function(){return this.Pm},set:function(a){var y=this.Pm;y!==a&&(this.Pm=a,this.panel!==null&&this.panel.N(),this.Ob("coversSeparators",y,a))}},sizing:{get:function(){return this.oo},set:function(a){var y=this.oo;y!==a&&(this.oo=a,this.panel!==null&&this.panel.v(),this.Ob("sizing",y,a))}},actual:{get:function(){return this.oa},set:function(a){this.oa=isNaN(this.Hc)?Math.max(Math.min(this.hj,a),this.jj):Math.max(Math.min(this.hj,this.Hc),this.jj)}},measured:{get:function(){return this.oc},set:function(a){this.oc=a}},total:{get:function(){return this.oa+this.Wc()}},position:{get:function(){return this.pa},set:function(a){this.pa=a}}}),Ea.prototype.computeEffectiveSpacing=Ea.prototype.Wc,Ea.prototype.computeEffectiveSpacingTop=Ea.prototype.Io;var Cv=new Ve(Ea,"Default",0),Qg=new Ve(Ea,"None",1),bm=new Ve(Ea,"ProportionalExtra",2);Ea.className="RowColumnDefinition",Ea.Default=Cv,Ea.None=Qg,Ea.ProportionalExtra=bm;function dr(a,y){de.call(this),this.Rd=this.ua=null,this.an="None",this.xc=this.Ui="black",this.ig=1,this.Na=this.Yg=null,this.Vn=this.Un=NaN,this.fa=null,typeof a=="string"?this.figure=a:a&&Object.assign(this,a),y&&Object.assign(this,y)}Oe(dr,de),dr.prototype.cloneProtected=function(a){de.prototype.cloneProtected.call(this,a),a.ua=this.ua,a.Rd=this.Rd,a.an=this.an,a.Ui=this.Ui,a.xc=this.xc,a.ig=this.ig,this.Yg!==null&&(a.Yg=$n(this.Yg)),this.Na!==null&&(a.Na=this.Na.nc?this.Na:this.Na.copy()),a.Un=this.Un,a.Vn=this.Vn,this.fa!==null&&(a.fa=this.fa.copy())};function Qd(a){a.Na===null?a.Na=new Mv:a.Na.nc&&(a.Na=a.Na.copy())}Ct=dr.prototype,Ct.th=function(){de.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},Ct.qb=function(a){a===en||a===gi||a===Fr||a===or?this.geometryStretch=a:de.prototype.qb.call(this,a)},Ct.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+xr(this)};function Tf(a,y,x,E){var b=x.length;if(!(4>b)){var z=E.measuredBounds,tt=Math.max(1,z.width);z=z.height;for(var rt=x[0],ot=x[1],st,ut,ft,vt,yt,Pt,Et=0,Vt=Ei(),Rt=2;Rt<b;Rt+=2)st=x[Rt],ut=x[Rt+1],ft=st-rt,rt=ut-ot,ft===0&&(ft=.001),vt=rt/ft,yt=Math.atan2(rt,ft),Pt=Math.sqrt(ft*ft+rt*rt),Vt.push([ft,yt,vt,Pt]),Et+=Pt,rt=st,ot=ut;rt=x[0],ot=x[1],ft=E.measuredBounds.width,E instanceof dr&&(ft-=E.strokeWidth),1>ft&&(ft=1),b=x=ft,st=tt/2,ut=st!==0,Rt=0,Pt=Vt[Rt],ft=Pt[0],yt=Pt[1],vt=Pt[2],Pt=Pt[3];for(var Qt=0;.1<=Et;){if(Qt===0&&(ut?(b=x,b-=st,Et-=st,ut=!1):b=x,b===0&&(b=1)),b>Et){ri(Vt);return}b>Pt?(Qt=b-Pt,b=Pt):Qt=0;var _t=Math.sqrt(b*b/(1+vt*vt));if(0>ft&&(_t=-_t),rt+=_t,ot+=vt*_t,a.translate(rt,ot),a.rotate(yt),a.translate(-(tt/2),-(z/2)),Qt===0&&E.hh(a,y),a.translate(tt/2,z/2),a.rotate(-yt),a.translate(-rt,-ot),Et-=b,Pt-=b,Qt!==0){if(Rt++,Rt===Vt.length){ri(Vt);return}Pt=Vt[Rt],ft=Pt[0],yt=Pt[1],vt=Pt[2],Pt=Pt[3],b=Qt}}ri(Vt)}}Ct.hh=function(a,y){var x=this.xc,E=this.Ui;if(x!==null||E!==null){var b=this.ua;if(b!==null){a.yc();var z=this.actualBounds,tt=this.naturalBounds;E!==null&&ha(this,a,E,!0,!1,tt,z);var rt=this.part,ot=this.ig;if(x===null||ot!==0||rt===null||!this.isPanelMain&&rt.Pb()!==this||(ot=rt.type===mn.Link&&rt instanceof Zr&&rt.category==="Selection"&&rt.adornedObject instanceof dr&&rt.adornedPart.Pb()===rt.adornedObject?rt.adornedObject.strokeWidth:0),ot===0&&(x=null),x!==null&&ot!==0&&(ha(this,a,x,!1,!1,tt,z),a.lineWidth=ot,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),z=!1,rt&&y.Gf("drawShadows")&&(z=rt.isShadowed),a.Il===!1&&(z=!1),rt=!0,x===null||E!==null&&E!=="transparent"||(rt=!1),tt=!1,ot=this.strokeDashArray,ot!==null&&(tt=!0,a.js(ot,this.strokeDashOffset)),b.type===ln.j)a.beginPath(),a.moveTo(b.startX,b.startY),a.lineTo(b.endX,b.endY),x!==null&&a.jk(),a.Se();else if(b.type===ln.u){var st=b.startX;ot=b.startY;var ut=b.endX,ft=b.endY;b=Math.min(st,ut);var vt=Math.min(ot,ft);st=Math.abs(ut-st),ot=Math.abs(ft-ot),a.beginPath(),a.rect(b,vt,st,ot),E!==null&&a.ng(E),x!==null&&(rt&&z&&Iu(a),a.jk(),rt&&z&&eh(a)),a.Se()}else if(b.type===ln.F)st=b.startX,ot=b.startY,ut=b.endX,ft=b.endY,b=Math.abs(ut-st)/2,vt=Math.abs(ft-ot)/2,st=Math.min(st,ut)+b,ot=Math.min(ot,ft)+vt,a.beginPath(),a.moveTo(st,ot-vt),a.bezierCurveTo(st+le.wg*b,ot-vt,st+b,ot-le.wg*vt,st+b,ot),a.bezierCurveTo(st+b,ot+le.wg*vt,st+le.wg*b,ot+vt,st,ot+vt),a.bezierCurveTo(st-le.wg*b,ot+vt,st-b,ot+le.wg*vt,st-b,ot),a.bezierCurveTo(st-b,ot-le.wg*vt,st-le.wg*b,ot-vt,st,ot-vt),a.closePath(),E!==null&&a.ng(E),x!==null&&(rt&&z&&Iu(a),a.jk(),rt&&z&&eh(a)),a.Se();else if(b.type===ln.o)for(b=b.figures,ot=b.length,vt=0;vt<ot;vt++){st=b.s[vt],a.beginPath(),a.moveTo(st.startX,st.startY),ut=st.segments.s,ft=ut.length;for(var yt=null,Pt=0;Pt<ft;Pt++){var Et=ut[Pt];switch(Et.type){case sa:a.moveTo(Et.endX,Et.endY);break;case no:a.lineTo(Et.endX,Et.endY);break;case fa:a.bezierCurveTo(Et.point1X,Et.point1Y,Et.point2X,Et.point2Y,Et.endX,Et.endY);break;case ls:a.quadraticCurveTo(Et.point1X,Et.point1Y,Et.endX,Et.endY);break;case ra:if(Et.radiusX===Et.radiusY){var Vt=Math.PI/180;a.arc(Et.point1X,Et.point1Y,Et.radiusX,Et.startAngle*Vt,(Et.startAngle+Et.sweepAngle)*Vt,0>Et.sweepAngle,yt!==null?yt.endX:st.startX,yt!==null?yt.endY:st.startY)}else if(yt=Wa(Et,st),Vt=yt.length,Vt===0)a.lineTo(Et.centerX,Et.centerY);else for(var Rt=0;Rt<Vt;Rt++){var Qt=yt[Rt];Rt===0&&a.lineTo(Qt[0],Qt[1]),a.bezierCurveTo(Qt[2],Qt[3],Qt[4],Qt[5],Qt[6],Qt[7])}break;case us:if(Rt=Vt=0,yt!==null&&yt.type===ra){if(yt=Wa(yt,st),Qt=yt.length,Qt===0){a.lineTo(Et.endX,Et.endY);break}yt=yt[Qt-1]||null,yt!==null&&(Vt=yt[6],Rt=yt[7])}else Vt=yt!==null?yt.endX:st.startX,Rt=yt!==null?yt.endY:st.startY;if(yt=_a(Et,st,Vt,Rt),Vt=yt.length,Vt===0){a.lineTo(Et.endX,Et.endY);break}for(Rt=0;Rt<Vt;Rt++)Qt=yt[Rt],a.bezierCurveTo(Qt[2],Qt[3],Qt[4],Qt[5],Qt[6],Qt[7]);break;default:$t("Segment not of valid type: "+Et.type)}Et.isClosed&&a.closePath(),yt=Et}ut=st.isFilled,z?st.isShadowed?(ut===!0&&E!=="transparent"&&E!==null&&a.ng(E,st.isEvenOdd),x!==null&&(ut&&rt&&Iu(a),a.jk(),ut&&rt&&eh(a))):(Iu(a),ut&&E!=="transparent"&&E!==null&&a.ng(E,st.isEvenOdd),x!==null&&a.jk(),eh(a)):(ut&&E!==null&&a.ng(E,st.isEvenOdd),x!==null&&a.jk()),a.Se(vt)}if(tt&&a.fs(),this.pathPattern!==null){if(x=this.pathPattern,x.measure(1/0,1/0),E=x.measuredBounds,x.arrange(0,0,E.width,E.height),z=this.geometry,a.save(),a.beginPath(),E=Ei(),z.type===ln.j)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.endY),Tf(a,y,E,x);else if(z.type===ln.o)for(z=z.figures.iterator;z.next();){for(rt=z.value,E.length=0,E.push(rt.startX),E.push(rt.startY),tt=rt.startX,b=rt.startY,ot=tt,vt=b,st=rt.segments.s,ut=st.length,ft=0;ft<ut;ft++){switch(Pt=st[ft],Pt.type){case sa:Tf(a,y,E,x),E.length=0,E.push(Pt.endX),E.push(Pt.endY),tt=Pt.endX,b=Pt.endY,ot=tt,vt=b;break;case no:E.push(Pt.endX),E.push(Pt.endY),tt=Pt.endX,b=Pt.endY;break;case fa:le.Qe(tt,b,Pt.point1X,Pt.point1Y,Pt.point2X,Pt.point2Y,Pt.endX,Pt.endY,.5,E),tt=Pt.endX,b=Pt.endY;break;case ls:le.ep(tt,b,Pt.point1X,Pt.point1Y,Pt.endX,Pt.endY,.5,E),tt=Pt.endX,b=Pt.endY;break;case ra:if(Et=Wa(Pt,rt),yt=Et.length,yt===0){E.push(Pt.centerX),E.push(Pt.centerY),tt=Pt.centerX,b=Pt.centerY;break}for(Vt=0;Vt<yt;Vt++)Rt=Et[Vt],le.Qe(tt,b,Rt[2],Rt[3],Rt[4],Rt[5],Rt[6],Rt[7],.5,E),tt=Rt[6],b=Rt[7];break;case us:if(Et=_a(Pt,rt,tt,b),yt=Et.length,yt===0){E.push(Pt.endX),E.push(Pt.endY),tt=Pt.endX,b=Pt.endY;break}for(Vt=0;Vt<yt;Vt++)Rt=Et[Vt],le.Qe(tt,b,Rt[2],Rt[3],Rt[4],Rt[5],Rt[6],Rt[7],.5,E),tt=Rt[6],b=Rt[7];break;default:$t("Segment not of valid type: "+Pt.type)}Pt.isClosed&&(E.push(ot),E.push(vt),Tf(a,y,E,x))}Tf(a,y,E,x)}else if(z.type===ln.u)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.startY),E.push(z.endX),E.push(z.endY),E.push(z.startX),E.push(z.endY),E.push(z.startX),E.push(z.startY),Tf(a,y,E,x);else if(z.type===ln.F){if(b=new aa,b.startX=z.endX,b.startY=(z.startY+z.endY)/2,tt=new Mr(ra),tt.startAngle=0,tt.sweepAngle=360,tt.centerX=(z.startX+z.endX)/2,tt.centerY=(z.startY+z.endY)/2,tt.radiusX=Math.abs(z.startX-z.endX)/2,tt.radiusY=Math.abs(z.startY-z.endY)/2,b.add(tt),z=Wa(tt,b),rt=z.length,rt===0)E.push(tt.centerX),E.push(tt.centerY);else for(tt=b.startX,b=b.startY,ot=0;ot<rt;ot++)vt=z[ot],le.Qe(tt,b,vt[2],vt[3],vt[4],vt[5],vt[6],vt[7],.5,E),tt=vt[6],b=vt[7];Tf(a,y,E,x)}ri(E),a.restore(),a.Vc(!1)}}}},Ct.kk=function(a,y,x){return!de.prototype.kk.call(this,a,y,x)||this.xc===null&&this.Ui===null||this.ua===null||this.pathPattern!==null||this.geometry.figures.length!==this.svg.getElementsByTagName("path").length?!1:(a.Hl=this.svg,this.hh(a,y),a.Hl=null,!0)},Ct.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:de.prototype.nk.call(this,a)},Ct.Dv=function(a,y){if(a.nodeName!=="g")a.setAttributeNS(null,"filter",y);else{a=a.getElementsByTagName("path");for(var x=0;x<a.length;x++)a[x].setAttributeNS(null,"filter",y)}},Ct.ga=function(a,y){if(y===void 0&&(y=new Tt),a instanceof Xe){a.Mc()&&$t("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var x=this.naturalBounds,E=this.strokeWidth;y.h(a.x*(x.width+E)-E/2+x.x+a.offsetX,a.y*(x.height+E)-E/2+x.y+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},Ct.mi=function(a){a===void 0&&(a=new ae);var y=this.naturalBounds,x=this.oe;y=ae.allocAt(y.x,y.y,y.width,y.height);var E=this.strokeWidth;return y.Bc(E/2,E/2),E=Tt.allocAt(y.x,y.y).transform(x),a.h(E.x,E.y,0,0),E.h(y.right,y.y).transform(x),ui(a,E.x,E.y,0,0),E.h(y.right,y.bottom).transform(x),ui(a,E.x,E.y,0,0),E.h(y.x,y.bottom).transform(x),ui(a,E.x,E.y,0,0),ae.free(y),Tt.free(E),a},Ct.gh=function(a,y){var x=this.geometry;if(x===null||this.fill===null&&this.stroke===null)return!1;var E=x.bounds,b=this.strokeWidth/2;x.type!==ln.j||y||(b+=2);var z=ae.alloc();if(z.assign(E),z.Bc(b+2,b+2),!z.ca(a))return ae.free(z),!1;if(E=b+1e-4,x.type===ln.j)return this.stroke===null||(E=(x.endX-x.startX)*(a.x-x.startX)+(x.endY-x.startY)*(a.y-x.startY),0>(x.startX-x.endX)*(a.x-x.endX)+(x.startY-x.endY)*(a.y-x.endY)||0>E)?!1:(ae.free(z),le.Yb(x.startX,x.startY,x.endX,x.endY,b,a.x,a.y));if(x.type===ln.u){y=x.startX;var tt=x.startY,rt=x.endX;if(x=x.endY,z.x=Math.min(y,rt),z.y=Math.min(tt,x),z.width=Math.abs(rt-y),z.height=Math.abs(x-tt),this.fill===null){if(z.Bc(-E,-E),z.ca(a))return ae.free(z),!1;z.Bc(E,E)}return this.stroke!==null&&z.Bc(b,b),a=z.ca(a),ae.free(z),a}if(x.type===ln.F){tt=x.startX,b=x.startY,rt=x.endX;var ot=x.endY;if(x=Math.min(tt,rt),y=Math.min(b,ot),tt=Math.abs(rt-tt)/2,b=Math.abs(ot-b)/2,x=a.x-(x+tt),y=a.y-(y+b),this.fill===null){if(tt-=E,b-=E,0>=tt||0>=b||1>=x*x/(tt*tt)+y*y/(b*b))return ae.free(z),!1;tt+=E,b+=E}return this.stroke!==null&&(tt+=E,b+=E),ae.free(z),0>=tt||0>=b?!1:1>=x*x/(tt*tt)+y*y/(b*b)}if(x.type===ln.o)return ae.free(z),this.fill===null?ss(x,a.x,a.y,b):pa(x,a,b,1<this.strokeWidth,y);$t("Unknown Geometry type: "+x.type)},Ct.Wl=function(a,y,x,E){var b=this.desiredSize,z=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var tt=this.geometry.bounds;else{var rt=this.figure,ot=kv[rt];if(ot===void 0){var st=le.Ze[rt];typeof st=="string"&&(st=le.Ze[st]),typeof st=="function"?(ot=st(null,100,100),kv[rt]=ot):$t("Unsupported Figure: "+rt)}tt=ot.bounds}rt=tt.width,ot=tt.height,st=tt.width;var ut=tt.height;switch(Os(this,!0)){case en:E=x=0;break;case fn:st=Math.max(a-z,0),ut=Math.max(y-z,0);break;case ki:st=Math.max(a-z,0),E=0;break;case ji:x=0,ut=Math.max(y-z,0)}isFinite(b.width)&&(st=b.width),isFinite(b.height)&&(ut=b.height);var ft=this.maxSize,vt=this.minSize;switch(x=Math.max(x-z,vt.width),E=Math.max(E-z,vt.height),st=Math.min(ft.width,st),ut=Math.min(ft.height,ut),st=isFinite(st)?Math.max(x,st):Math.max(rt,x),ut=isFinite(ut)?Math.max(E,ut):Math.max(ot,E),x=Lv(this),x){case en:break;case fn:rt=st,ot=ut;break;case gi:x=Math.min(st/rt,ut/ot),isFinite(x)||(x=1),rt*=x,ot*=x;break;default:$t(x+" is not a valid geometryStretch.")}this.Rd!==null?(rt===0&&(rt=.001),ot===0&&(ot=.001),x=this.Rd!==null?this.Rd:this.ua,tt=x.bounds,E=rt/tt.width,tt=ot/tt.height,isFinite(E)||(E=1),isFinite(tt)||(tt=1),this.ua=E===1&&tt===1?x:x.copy().scale(E,tt)):this.ua!==null&&le.$(this.ua.Sk,a-z)&&le.$(this.ua.Rk,y-z)||(this.ua=dr.makeGeometry(this,rt,ot)),tt=this.ua.bounds,a===1/0||y===1/0?this.Ge(tt.x-z/2,tt.y-z/2,a===0&&rt===0?0:tt.width+z,y===0&&ot===0?0:tt.height+z):this.Ge(-(z/2),-(z/2),st+z,ut+z),b.w()?(st=b.width,ut=b.height,st=Math.min(ft.width,st),ut=Math.min(ft.height,ut),st=Math.max(vt.width,st),ut=Math.max(vt.height,ut),this.dc.h(0,0,st,ut)):this.dc.assign(tt)};function Lv(a){var y=a.geometryStretch;return a.Rd!==null?y===or?fn:y:y===or?kv[a.figure].defaultStretch:y}Ct.eh=function(a,y,x,E){ms(this,a,y,x,E)},Ct.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Ct.Sj=function(a,y,x,E,b){var z=this.transform,tt=1/(z.m11*z.m22-z.m12*z.m21),rt=z.m22*tt,ot=-z.m12*tt,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);z=a*rt+y*st+ft,tt=a*ot+y*ut+vt,rt=x*rt+E*st+ft,ot=x*ot+E*ut+vt,ft=this.ig/2,st=this.ua,st===null&&(this.measure(1/0,1/0),st=this.ua);var yt=st.bounds;if(ut=!1,st.type===ln.j)if(1.5>=this.strokeWidth)ut=le.Ve(st.startX,st.startY,st.endX,st.endY,z,tt,rt,ot,b);else{if(st.startX===st.endX?(E=ft,ut=0):(y=(st.endY-st.startY)/(st.endX-st.startX),ut=ft/Math.sqrt(1+y*y),E=ut*y),y=Ei(),a=new Tt,le.Ve(st.startX+E,st.startY+ut,st.endX+E,st.endY+ut,z,tt,rt,ot,a)&&y.push(a),a=new Tt,le.Ve(st.startX-E,st.startY-ut,st.endX-E,st.endY-ut,z,tt,rt,ot,a)&&y.push(a),a=new Tt,le.Ve(st.startX+E,st.startY+ut,st.startX-E,st.startY-ut,z,tt,rt,ot,a)&&y.push(a),a=new Tt,le.Ve(st.endX+E,st.endY+ut,st.endX-E,st.endY-ut,z,tt,rt,ot,a)&&y.push(a),rt=y.length,rt===0)return ri(y),!1;for(ut=!0,ot=1/0,E=0;E<rt;E++)a=y[E],x=(a.x-z)*(a.x-z)+(a.y-tt)*(a.y-tt),x<ot&&(ot=x,b.x=a.x,b.y=a.y);ri(y)}else if(st.type===ln.u)ut=le.Ff(yt.x-ft,yt.y-ft,yt.x+yt.width+ft,yt.y+yt.height+ft,z,tt,rt,ot,b);else if(st.type===ln.F){y=ae.allocAt(yt.x,yt.y,yt.width,yt.height).Bc(ft,ft);t:if(y.width===0)ut=le.Ve(y.x,y.y,y.x,y.y+y.height,z,tt,rt,ot,b);else if(y.height===0)ut=le.Ve(y.x,y.y,y.x+y.width,y.y,z,tt,rt,ot,b);else{if(a=y.width/2,st=y.height/2,E=y.x+a,ut=y.y+st,x=9999,z!==rt&&(x=(tt-ot)/(z-rt)),9999>Math.abs(x)){if(ot=tt-ut-x*(z-E),0>a*a*x*x+st*st-ot*ot){b.x=NaN,b.y=NaN,ut=!1;break t}ft=Math.sqrt(a*a*x*x+st*st-ot*ot),rt=(-(a*a*x*ot)+a*st*ft)/(st*st+a*a*x*x)+E,a=(-(a*a*x*ot)-a*st*ft)/(st*st+a*a*x*x)+E,st=x*(rt-E)+ot+ut,ot=x*(a-E)+ot+ut,Math.abs((z-rt)*(z-rt))+Math.abs((tt-st)*(tt-st))<Math.abs((z-a)*(z-a))+Math.abs((tt-ot)*(tt-ot))?(b.x=rt,b.y=st):(b.x=a,b.y=ot)}else{if(rt=st*st,ot=z-E,rt-=rt/(a*a)*ot*ot,0>rt){b.x=NaN,b.y=NaN,ut=!1;break t}ot=Math.sqrt(rt),rt=ut+ot,ot=ut-ot,Math.abs(rt-tt)<Math.abs(ot-tt)?(b.x=z,b.y=rt):(b.x=z,b.y=ot)}ut=!0}ae.free(y)}else if(st.type===ln.o){vt=Tt.alloc();var Pt=rt-z,Et=ot-tt,Vt=Pt*Pt+Et*Et,Rt=z,Qt=tt;if(0<Vt&&yt.contains(Rt,Qt)&&(vt.x=Rt,vt.y=Qt,this.ca(vt)))for(Pt!==0&&.5>Math.abs(Pt)?(Et*=.5/Pt,Pt=.5):Et!==0&&.5>Math.abs(Et)&&(Pt*=.5/Et,Et=.5),Rt-=Pt,Qt-=Et;yt.contains(Rt,Qt);)Rt-=Pt,Qt-=Et;for(b.x=rt,b.y=ot,Et=0;Et<st.figures.count;Et++){var _t=st.figures.s[Et],te=_t.isFilled?Rt:z,ue=_t.isFilled?Qt:tt,Ce=_t.segments;yt=_t.startX,Pt=_t.startY;for(var On=yt,li=Pt,ti=0;ti<Ce.count;ti++){var Cn=Ce.s[ti],qe=Cn.type,er=Cn.endX,Ui=Cn.endY,Ur=!1;switch(qe){case sa:On=er,li=Ui;break;case no:Ur=Tm(yt,Pt,er,Ui,te,ue,rt,ot,vt);break;case fa:Ur=le.Eo(yt,Pt,Cn.point1X,Cn.point1Y,Cn.point2X,Cn.point2Y,er,Ui,te,ue,rt,ot,.6,vt);break;case ls:Ur=le.Eo(yt,Pt,yt+2/3*(Cn.point1X-yt),Pt+2/3*(Cn.point1Y-Pt),er+2/3*(Cn.point1X-er),Ui+2/3*(Cn.point1Y-Ui),er,Ui,te,ue,rt,ot,.6,vt);break;case ra:case us:qe=Cn.type===ra?Wa(Cn,_t):_a(Cn,_t,yt,Pt);var Fo=qe.length;if(Fo===0){Ur=Tm(yt,Pt,Cn.type===ra?Cn.centerX:Cn.endX,Cn.type===ra?Cn.centerY:Cn.endY,te,ue,rt,ot,vt);break}for(Ui=null,er=0;er<Fo;er++){if(Ui=qe[er],er===0&&Tm(yt,Pt,Ui[0],Ui[1],te,ue,rt,ot,vt)){var Ba=Nm(te,ue,vt,Vt,b);Ba<Vt&&(Vt=Ba,ut=!0)}le.Eo(Ui[0],Ui[1],Ui[2],Ui[3],Ui[4],Ui[5],Ui[6],Ui[7],te,ue,rt,ot,.6,vt)&&(Ba=Nm(te,ue,vt,Vt,b),Ba<Vt&&(Vt=Ba,ut=!0))}er=Ui[6],Ui=Ui[7];break;default:$t("Unknown Segment type: "+qe)}yt=er,Pt=Ui,Ur&&(Ur=Nm(te,ue,vt,Vt,b),Ur<Vt&&(Vt=Ur,ut=!0)),Cn.isClosed&&(er=On,Ui=li,Tm(yt,Pt,er,Ui,te,ue,rt,ot,vt)&&(Cn=Nm(te,ue,vt,Vt,b),Cn<Vt&&(Vt=Cn,ut=!0)))}}z=x-a,tt=E-y,rt=Math.sqrt(z*z+tt*tt),rt!==0&&(z/=rt,tt/=rt),b.x-=z*ft,b.y-=tt*ft,Tt.free(vt)}else $t("Unknown Geometry type: "+st.type);return ut?(this.transform.Ga(b),!0):!1};function Nm(a,y,x,E,b){return a=x.x-a,y=x.y-y,y=a*a+y*y,y<E?(b.x=x.x,b.y=x.y,y):E}function Tm(a,y,x,E,b,z,tt,rt,ot){if(le.$(a,x)&&le.$(y,E)||le.$(b,tt)&&le.$(z,rt))return!1;var st=!1,ut=(b-tt)*(y-E)-(z-rt)*(a-x);return ut===0?!1:(ot.x=((b*rt-z*tt)*(a-x)-(b-tt)*(a*E-y*x))/ut,ot.y=((b*rt-z*tt)*(y-E)-(z-rt)*(a*E-y*x))/ut,(a>x?a-x:x-a)<(y>E?y-E:E-y)?(a=y<E?y:E,y=y<E?E:y,(ot.y>a||le.$(ot.y,a))&&(ot.y<y||le.$(ot.y,y))&&(st=!0)):(y=a<x?a:x,a=a<x?x:a,(ot.x>y||le.$(ot.x,y))&&(ot.x<a||le.$(ot.x,a))&&(st=!0)),st)}Ct.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.ua;x===null&&(this.measure(1/0,1/0),x=this.ua),x=x.bounds;var E=this.strokeWidth/2,b=!1,z=Tt.alloc();return z.h(x.x-E,x.y-E),a.ca(y.Ga(z))&&(z.h(x.x-E,x.bottom+E),a.ca(y.Ga(z))&&(z.h(x.right+E,x.bottom+E),a.ca(y.Ga(z))&&(z.h(x.right+E,x.y-E),a.ca(y.Ga(z))&&(b=!0)))),Tt.free(z),b},Ct.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=Un.alloc();x.set(y),x.Vj();var E=a.left,b=a.right,z=a.top;a=a.bottom;var tt=Tt.alloc();if(tt.h(E,z),x.Ga(tt),this.gh(tt,!0)||(tt.h(b,z),x.Ga(tt),this.gh(tt,!0))||(tt.h(E,a),x.Ga(tt),this.gh(tt,!0))||(tt.h(b,a),x.Ga(tt),this.gh(tt,!0)))return Tt.free(tt),!0;var rt=Tt.alloc(),ot=Tt.alloc();return x.set(y),x.bv(this.transform),x.Vj(),rt.x=b,rt.y=z,rt.transform(x),tt.x=E,tt.y=z,tt.transform(x),y=!1,_d(this,tt,rt,ot)?y=!0:(tt.x=b,tt.y=a,tt.transform(x),_d(this,tt,rt,ot)?y=!0:(rt.x=E,rt.y=a,rt.transform(x),_d(this,tt,rt,ot)?y=!0:(tt.x=E,tt.y=z,tt.transform(x),_d(this,tt,rt,ot)&&(y=!0)))),Tt.free(tt),Un.free(x),Tt.free(rt),Tt.free(ot),y};function _d(a,y,x,E){if(!a.rs(y,x,E))return!1;a=y.x,y=y.y;var b=x.x,z=x.y;return x=E.x,E=E.y,a===b?(y<z?(a=y,y=z):a=z,E>=a&&E<=y):(a<b?(E=a,a=b):E=b,x>=E&&x<=a)}Ct.tx=function(a,y,x){function E(Vt,Rt){for(var Qt=Vt.length,_t=0;_t<Qt;_t+=2)if(Rt.zd(Vt[_t],Vt[_t+1])>b)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var b=a.Bf(y),z=b;if(1.5<this.strokeWidth&&(b=this.strokeWidth/2+Math.sqrt(b),b*=b),y=this.ua,y===null&&(this.measure(1/0,1/0),y=this.ua,y===null))return!1;if(!x){var tt=y.bounds,rt=tt.x,ot=tt.y,st=tt.x+tt.width;if(tt=tt.y+tt.height,Gi(a.x,a.y,rt,ot)<=b&&Gi(a.x,a.y,st,ot)<=b&&Gi(a.x,a.y,rt,tt)<=b&&Gi(a.x,a.y,st,tt)<=b)return!0}if(rt=y.startX,ot=y.startY,st=y.endX,tt=y.endY,y.type===ln.j){if(x=(rt-st)*(a.x-st)+(ot-tt)*(a.y-tt),Qn(a.x,a.y,rt,ot,st,tt)<=(0<=(st-rt)*(a.x-rt)+(tt-ot)*(a.y-ot)&&0<=x?b:z))return!0}else{if(y.type===ln.u)return y=!1,x&&(y=Qn(a.x,a.y,rt,ot,rt,tt)<=b||Qn(a.x,a.y,rt,ot,st,ot)<=b||Qn(a.x,a.y,st,ot,st,tt)<=b||Qn(a.x,a.y,rt,tt,st,tt)<=b),y;if(y.type===ln.F){y=a.x-(rt+st)/2,z=a.y-(ot+tt)/2;var ut=Math.abs(st-rt)/2,ft=Math.abs(tt-ot)/2;if(ut===0||ft===0)return Qn(a.x,a.y,rt,ot,st,tt)<=b;if(x){if(a=le.$y(ut,ft,y,z),a*a<=b)return!0}else return!(Gi(y,z,-ut,0)>=b||Gi(y,z,0,-ft)>=b||Gi(y,z,0,ft)>=b||Gi(y,z,ut,0)>=b)}else if(y.type===ln.o){if(st=y.bounds,z=st.x,rt=st.y,ot=st.x+st.width,st=st.y+st.height,a.x>ot&&a.x<z&&a.y>st&&a.y<rt&&Qn(a.x,a.y,z,rt,z,st)>b&&Qn(a.x,a.y,z,rt,ot,rt)>b&&Qn(a.x,a.y,ot,st,z,st)>b&&Qn(a.x,a.y,ot,st,ot,rt)>b)return!1;if(z=Math.sqrt(b),x){if(this.fill===null?ss(y,a.x,a.y,z):pa(y,a,z,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(z=x.s[y],tt=z.startX,ut=z.startY,a.zd(tt,ut)>b)return!1;for(rt=z.segments.s,ot=rt.length,st=0;st<ot;st++)switch(ft=rt[st],ft.type){case sa:case no:if(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b)return!1;break;case fa:var vt=Ei();if(le.Qe(tt,ut,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.8,vt),tt=E(vt,a),ri(vt),tt||(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b))return!1;break;case ls:if(vt=Ei(),le.ep(tt,ut,ft.point1X,ft.point1Y,ft.endX,ft.endY,.8,vt),tt=E(vt,a),ri(vt),tt||(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b))return!1;break;case ra:case us:vt=ft.type===ra?Wa(ft,z):_a(ft,z,tt,ut);var yt=vt.length;if(yt===0){if(tt=ft.type===ra?ft.centerX:ft.endX,ut=ft.type===ra?ft.centerY:ft.endY,a.zd(tt,ut)>b)return!1;break}ft=null;for(var Pt=Ei(),Et=0;Et<yt;Et++)if(ft=vt[Et],Pt.length=0,le.Qe(ft[0],ft[1],ft[2],ft[3],ft[4],ft[5],ft[6],ft[7],.8,Pt),E(Pt,a))return ri(Pt),!1;ri(Pt),ft!==null&&(tt=ft[6],ut=ft[7]);break;default:$t("Unknown Segment type: "+ft.type)}}return!0}}}return!1},Ct.qc=function(){this.ua=null},Ct.kq=function(){return this.ig};function mS(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=op,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=eo):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new Xe(1-eo.x,eo.y)))}dr.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var E=zu[a.toArrow];else a.fromArrow!=="None"?E=zu[a.fromArrow]:(E=le.Ze[a.figure],typeof E=="string"&&(E=le.Ze[E]),E===void 0&&$t("Unknown Shape.figure: "+a.figure),E=E(a,y,x),E.Sk=y,E.Rk=x);if(E===null){var b=le.Ze.Rectangle;typeof b=="function"&&(E=b(a,y,x))}return E};function vS(a){var y=zu[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=zu[x],y===void 0){var E=null,b;for(b in le.um)if(b.toLowerCase()===x){E=b;break}if(E!==null)return a=ln.parse(le.um[E],!1),zu[E]=a,x!==E&&(zu[x]=E),E}}return typeof y=="string"?y:y instanceof ln?a:null}Me.Object.defineProperties(dr.prototype,{geometry:{get:function(){return this.ua!==null?this.ua:this.Rd},set:function(a){var y=this.ua,x=this.Rd;if(y!==a){a!==null?this.Rd=this.ua=a.freeze():this.Rd=this.ua=null;var E=this.part;E!==null&&(E.ag=NaN),this.v(),this.g("geometry",y||x,a),$a(this)&&(a=this.part,a!==null&&Zo(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=ln.parse(a);var y=a.normalize();this.geometry=a,this.position=a=Tt.allocAt(-y.x,-y.y),Tt.free(a)}},isGeometryPositioned:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.v(),this.g("isGeometryPositioned",y,a))}},fill:{get:function(){return this.Ui},set:function(a){var y=this.Ui;y!==a&&(a!==null&&Bc(a,"Shape.fill"),a instanceof ro&&a.freeze(),this.Ui=a,this.N(),this.g("fill",y,a))}},stroke:{get:function(){return this.xc},set:function(a){var y=this.xc;y!==a&&(a!==null&&Bc(a,"Shape.stroke"),a instanceof ro&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},strokeWidth:{get:function(){return this.ig},set:function(a){var y=this.ig;if(y!==a)if(0<=a){this.ig=a,this.v();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeWidth",y,a)}else ei(a,"value >= 0",dr,"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"?ei(a,'"butt", "round", or "square"',dr,"strokeCap"):(Qd(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"?ei(a,'"miter", "bevel", or "round"',dr,"strokeJoin"):(Qd(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){Qd(this),this.Na.Jr=a,this.N();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeMiterLimit",y,a)}}},strokeDashArray:{get:function(){return this.Yg},set:function(a){var y=this.Yg;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];0<=z&&isFinite(z)||$t("strokeDashArray:value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.Yg=a,this.N(),this.g("strokeDashArray",y,a)}}},strokeDashOffset:{get:function(){return this.Na!==null?this.Na.uj:0},set:function(a){var y=this.strokeDashOffset;y!==a&&0<=a&&(Qd(this),this.Na.uj=a,this.N(),this.g("strokeDashOffset",y,a))}},figure:{get:function(){return this.an},set:function(a){var y=this.an;if(y!==a){var x=le.Ze[a];typeof x=="function"?x=a:(x=le.Ze[a.toLowerCase()])||$t("Unknown Shape.figure: "+a),y!==x&&(a=this.part,a!==null&&(a.ag=NaN),this.an=x,this.Rd=null,this.qc(),this.v(),this.g("figure",y,x))}}},toArrow:{get:function(){return this.Ua!==null?this.Ua.V:"None"},set:function(a){var y=this.toArrow;if(a===!0?a="Standard":a===!1&&(a=""),y!==a){var x=vS(a);x===null?$t("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new sd),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),mS(this),this.g("toArrow",y,x))}}},fromArrow:{get:function(){return this.Ua!==null?this.Ua.j:"None"},set:function(a){var y=this.fromArrow;if(a===!0?a="Standard":a===!1&&(a=""),y!==a){var x=vS(a);x===null?$t("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new sd),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),mS(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:xo},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),Qd(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:xo},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),Qd(this),this.Na.gg=a,this.v(),this.g("spot2",y,a))}},parameter1:{get:function(){return this.Un},set:function(a){var y=this.Un;y!==a&&(this.Un=a,this.qc(),this.v(),this.g("parameter1",y,a))}},parameter2:{get:function(){return this.Vn},set:function(a){var y=this.Vn;y!==a&&(this.Vn=a,this.qc(),this.v(),this.g("parameter2",y,a))}},naturalBounds:{get:function(){return this.dc}},pathPattern:{get:function(){return this.Na!==null?this.Na.br:null},set:function(a){var y=this.pathPattern;y!==a&&(Qd(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:or},set:function(a){var y=this.geometryStretch;y!==a&&(Qd(this),this.Na.jq=a,this.v(),this.g("geometryStretch",y,a))}},interval:{get:function(){return this.fa!==null?this.fa.Tk:1},set:function(a){var y=this.interval;if(a=Math.round(a),y!==a&&a!==0&&isFinite(a)){this.fa===null&&(this.fa=new ju),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&Pu(x),this.v(),x=this.panel,x!==null&&(x.graduatedIntervals=null),this.g("interval",y,a)}}},graduatedStart:{get:function(){return this.fa!==null?this.fa.u:0},set:function(a){var y=this.graduatedStart;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new ju),this.fa.u=a,this.v(),this.g("graduatedStart",y,a))}},graduatedEnd:{get:function(){return this.fa!==null?this.fa.j:1},set:function(a){var y=this.graduatedEnd;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new ju),this.fa.j=a,this.v(),this.g("graduatedEnd",y,a))}},graduatedSkip:{get:function(){return this.fa!==null?this.fa.o:null},set:function(a){var y=this.graduatedSkip;y!==a&&(this.fa===null&&(this.fa=new ju),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),dr.prototype.intersectsRect=dr.prototype.Yc,dr.prototype.containedInRect=dr.prototype.fh,dr.prototype.getNearestIntersectionPoint=dr.prototype.rs,dr.prototype.getDocumentBounds=dr.prototype.mi,dr.prototype.getDocumentPoint=dr.prototype.ga;var zu=new Hi,kv=new Hi;dr.className="Shape",dr.getFigureGenerators=function(){var a=new be,y;for(y in le.Ze)y!==y.toLowerCase()&&a.add(y,le.Ze[y]);return a.freeze(),a},dr.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),E=le.Ze;E[a]=y,E[x]=a},dr.getArrowheadGeometries=function(){var a=new be;for(E in le.um)if(zu[E]===void 0){var y=ln.parse(le.um[E],!1);zu[E]=y,y=E.toLowerCase(),y!==E&&(zu[y]=E)}for(var x in zu)if(x!==x.toLowerCase()){var E=zu[x];E instanceof ln&&a.add(x,E)}return a.freeze(),a},dr.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=ln.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||$t("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var E=zu;E[a]=x,E[y]=a};function Mv(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=or,this.gg=this.fg=xo}Mv.prototype.copy=function(){var a=new Mv;return a.Hr=this.Hr,a.Ir=this.Ir,a.Jr=this.Jr,a.uj=this.uj,a.br=this.br,a.jq=this.jq,a.fg=this.fg.J(),a.gg=this.gg.J(),a};function No(a,y){return de.call(this),Rm||(Is=la?new Il(null).context:null,Rm=!0),this.l|=2097152,this.ec="",this.xc="black",this.Ae="13px sans-serif",this.Lq=this.Cb=this.Gc=0,this.da=this.fa=this.Gm=null,this.Ih=0,this.df=null,this.Le=0,this.ze=this.Qb=this.Qc=null,typeof a=="string"?this.text=a:a&&Object.assign(this,a),y&&Object.assign(this,y),this}Oe(No,de),No.prototype.cloneProtected=function(a){de.prototype.cloneProtected.call(this,a),a.ec=this.ec,a.xc=this.xc,a.Ae=this.Ae,a.Gc=this.Gc,a.Cb=this.Cb,a.Lq=this.Lq,a.Gm=this.Gm,this.fa!==null&&(a.fa=this.fa.copy()),this.da!==null&&(a.da=this.da.nc?this.da:this.da.copy()),a.Ih=this.Ih,a.df=this.df,a.Le=this.Le,a.Qc=this.Qc,a.Qb=this.Qb,a.ze=this.ze};function ku(a){a.da===null?a.da=new Dv:a.da.nc&&(a.da=a.da.copy())}Ct=No.prototype,Ct.th=function(){de.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function yS(a,y){a.l=y.l|6144,a.pb=y.opacity,a.Ma=y.background,a.areaBackground=y.areaBackground,a.jd=y.desiredSize.J(),a.minSize=y.minSize.J(),a.maxSize=y.maxSize.J(),y.Lb!==null?a.Lb=y.Lb.copy():a.Lb=null,a.Ca=y.scale,a.Kb=y.angle,a.stretch=y.stretch,a.Kg=y.margin.J(),a.Jb=y.alignment.J(),a.sk=y.alignmentFocus.J(),a.segmentFraction=y.segmentFraction,a.segmentOffset=y.segmentOffset.J(),a.segmentOrientation=y.segmentOrientation,y.tb!==null&&(a.tb=y.tb.copy()),a.shadowVisible=y.shadowVisible,a.ec=y.ec,a.xc=y.xc,a.Ae=y.Ae,a.fa!==null&&(a.fa=y.fa.copy()),y.da!==null&&(a.da=y.da.nc?y.da:y.da.copy()),a.Ih=y.Ih}Ct.qb=function(a){a.classType===No?this.wrap=a:de.prototype.qb.call(this,a)},Ct.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},Ct.v=function(){de.prototype.v.call(this)},Ct.hh=function(a,y){if(this.xc!==null&&this.ec.length!==0&&this.Ae!==null){var x=this.naturalBounds,E=this.actualBounds,b=x.width,z=x.height,tt=qg(this),rt=a.textAlign=this.textAlign,ot=y.tn;rt==="start"?rt=ot?"right":"left":rt==="end"&&(rt=ot?"left":"right"),ot=this.isUnderline;var st=this.isStrikethrough;ha(this,a,this.xc,!0,!1,x,E),(ot||st)&&ha(this,a,this.xc,!1,!1,x,E),E=0,x=!1;var ut=this.oe,ft=ut.dx-(tt*ut.m21+ut.dx);ut=ut.dy-(tt*ut.m22+ut.dy);var vt=y.scale;switch(8>(ft*ft+ut*ut)*vt*vt&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof qs&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,ft=this.spacingBelow,this.flip){case jr:a.translate(b,0),a.scale(-1,1);break;case vr:a.translate(0,z),a.scale(1,-1);break;case fo:a.translate(b,z),a.scale(-1,-1)}if(a.yc(),ut=this.Gc,vt=(y+tt+ft)*ut,z>vt&&(E=this.verticalAlignment,E=E.y*z-E.y*vt+E.offsetY),ut===1&&this.ze!==null)ft=this.Cb,ft>b&&(ft=b),this.Oj(this.ze,a,0,E+y,b,tt,ft,x,rt,ot,st);else if(this.Qc!==null&&this.Qb!==null)for(vt=0;vt<ut;vt++){var yt=this.Qc[vt];yt>b&&(yt=b),E+=y,this.Oj(this.Qb[vt],a,0,E,b,tt,yt,x,rt,ot,st),E+=tt+ft}switch(this.flip){case jr:a.scale(-1,1),a.translate(-b,0);break;case vr:a.scale(1,-1),a.translate(0,-z);break;case fo:a.scale(-1,-1),a.translate(-b,-z)}}},Ct.Oj=function(a,y,x,E,b,z,tt,rt,ot,st,ut){var ft=0;if(rt)ot==="left"?ft=0:ot==="right"?ft=b-tt:ot==="center"&&(ft=(b-tt)/2),y.fillRect(x+ft,E+.25*z,tt,1);else{if(ot==="left"?ft=0:ot==="right"?ft=b:ot==="center"&&(ft=b/2),b=Dm!==null?Dm(this,z):.75*z,y.fillText(a,x+ft,E+b),a=z/20|0,a===0&&(a=1),ot==="right"?ft-=tt:ot==="center"&&(ft-=tt/2),st){rt=Bm!==null?Bm(this,z):.8*z,ot=x+ft,st=E+rt,b=x+ft+tt,rt=E+rt;var vt=a;y.beginPath(),y.lineWidth=vt,y.moveTo(ot,st),y.lineTo(b,rt),y.stroke(),y.Se(),y instanceof qs&&y.ad.classList.add("gojs-td")}ut&&(ut=E+z-z/2.2|0,a%2!==0&&(ut+=.5),E=x+ft,z=ut,x=x+ft+tt,tt=ut,ft=a,y.beginPath(),y.lineWidth=ft,y.moveTo(E,z),y.lineTo(x,tt),y.stroke(),y.Se(),y instanceof qs&&y.ad.classList.add("gojs-td"))}},Ct.kk=function(a,y,x){if(!de.prototype.kk.call(this,a,y,x))return!1;if(ha(this,a,this.xc,!0,!1,this.naturalBounds,this.actualBounds),x){if(this.svg.getElementsByTagName("text").length===0)return!0;for(y=this.svg.getElementsByClassName("gojs-td"),x=0;x<y.length;x++)_y(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,_y(a,y,!0);return!0},Ct.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:de.prototype.nk.call(this,a)},Ct.Dv=function(a,y){if(a.nodeName!=="g")a.setAttributeNS(null,"filter",y);else{a=a.getElementsByTagName("text");for(var x=0;x<a.length;x++)a[x].setAttributeNS(null,"filter",y)}},Ct.Wl=function(a,y,x,E){var b=this.Gc;this.Ih=a,this.l&=-16777217;var z=this.Ae;Is!==null&&kS!==z&&(kS=Is.font=z),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var tt;if(isNaN(this.desiredSize.width)){if(z=this.ec.replace(/\r\n/g,`
|
|
`).replace(/\r/g,`
|
|
`),z.length===0)z=8;else if(this.isMultiline){for(var rt=tt=0,ot=!1;!ot;){var st=z.indexOf(`
|
|
`,rt);st===-1&&(st=z.length,ot=!0),rt=z.substr(rt,st-rt),this.formatting===$g&&(rt=rt.trim()),tt=Math.max(tt,Ql(rt)),rt=st+1}z=tt}else tt=z.indexOf(`
|
|
`,0),0<=tt&&(z=z.substr(0,tt)),z=Ql(z);z=Math.min(z,a/this.scale)}else z=this.desiredSize.width;if(this.panel!==null&&(z=Math.min(z,this.panel.maxSize.width)),tt=xS(this,z),isNaN(this.desiredSize.height)?tt=Math.min(tt,y/this.scale):tt=this.desiredSize.height,ot=tt,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===Om&&(y=this.Ae,y=this.overflow===Om?SS(y):0,st=this.spacingAbove+this.spacingBelow,st=Math.max(0,qg(this)+st),ot=Math.min(this.maxLines-1,Math.max(Math.floor(ot/st+.01)-1,0)),!(ot+1>=this.Qb.length))){for(this.l|=16777216,st=this.Qb[ot],y=Math.max(1,a-y);Ql(st)>y&&1<st.length;)st=st.substr(0,st.length-1);st+=tp,y=Ql(st),this.Qb[ot]=st,this.Qb=this.Qb.slice(0,ot+1),this.Qc[ot]=y,this.Qc=this.Qc.slice(0,ot+1),this.Le=this.Qb.length,this.Cb=Math.max(this.Cb,y),this.Gc=this.Le,this.Gc===1&&(this.ze=this.Qb[0])}(this.wrap===PS||isNaN(this.desiredSize.width))&&(z=isNaN(a)?this.Cb:Math.min(a,this.Cb)),z=Math.max(x,z),tt=Math.max(E,tt),En(this.dc,z,tt),this.Ge(0,0,z,tt),this.svg!==null&&b!==this.Gc&&(this.Uc=!0)},Ct.eh=function(a,y,x,E){ms(this,a,y,x,E)};function _g(a,y,x){a.ze===null?(a.ze=y,a.Cb=x):((a.Qb===null||a.Qc===null)&&(a.Qb=[],a.Qc=[],a.Qb.push(a.ze),a.Qc.push(a.Cb)),a.Qb.push(y),a.Qc.push(x),a.Qb.length>a.maxLines&&(a.l|=16777216))}function Ev(a,y,x,E){var b=a.formatting===$g;b&&(y=y.trim());var z=0,tt=a.Ae,rt=a.spacingAbove+a.spacingBelow;rt=Math.max(0,qg(a)+rt);var ot=a.overflow===Om?SS(tt):0;if(a.Gc>=a.maxLines)E!==null&&E.h(0,rt);else if(tt=y,a.wrap===Av){a.Le=1;var st=Ql(y);if(ot===0||st<=x)a.Cb=Math.max(a.Cb,st),_g(a,y,a.Cb),E!==null&&E.h(st,rt);else{for(z=Df(a,tt),tt=tt.substr(z.length),y=Df(a,tt),st=Ql(z+y);0<y.length&&st<=x;)z+=y,tt=tt.substr(y.length),y=Df(a,tt),st=z+y,b&&(st=st.trim()),st=Ql(st);for(b&&(y=y.trim()),z+=y,x=Math.max(1,x-ot);Ql(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=tp;var ut=Ql(z);a.Cb=ut,_g(a,z,ut),E!==null&&E.h(ut,rt)}}else{for(ot=0,tt.length===0&&(ot=1,_g(a,tt,0));0<tt.length;){for(y=Df(a,tt),tt=tt.substr(y.length);Ql(y)>x;){var ft=1;for(st=Ql(y.substr(0,ft)),ut=0;st<=x;)ft++,ut=st,st=Ql(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),_g(a,y.substr(0,ft),vt),ot++,y=y.substr(ft),a.Gc+ot>a.maxLines)break}for(ut=Df(a,tt),st=Ql(y+ut);0<ut.length&&st<=x;)y+=ut,tt=tt.substr(ut.length),ut=Df(a,tt),st=y+ut,b&&(st=st.trim()),st=Ql(st);if(b&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),ut.length===0?(ft=st,z=Math.max(z,st)):(ft=ut=Ql(y),z=Math.max(z,ut)),_g(a,y,ft),ot++,a.Gc+ot>a.maxLines))break}a.Le=Math.min(a.maxLines,ot),a.Cb=Math.max(a.Cb,z),E!==null&&E.h(a.Cb,rt*a.Le)}}function Df(a,y){if(a.wrap===wS)return y.substr(0,1);for(var x=y.length,E=0,b=Sx;E<x&&!b.test(y.charAt(E));)E++;for(a.formatting===CS&&(x=Math.min(x,E+1));E<x&&b.test(y.charAt(E));)E++;return E>=y.length?y:y.substr(0,E)}function Ql(a){return Is===null?8*a.length:Is.measureText(a).width}function qg(a){if(a.df!==null)return a.df;var y=a.Ae;if(Is===null){var x=16;return a.df=x}return Nv[y]!==void 0&&5e3>LS?x=Nv[y]:(x=1.3*Is.measureText("M").width,Nv[y]=x,LS++),a.df=x}function SS(a){if(Is===null)return 6;if(Im[a]!==void 0&&5e3>Tv)var y=Im[a];else y=Is.measureText(tp).width,Im[a]=y,Tv++;return y}function xS(a,y){var x=a.ec.replace(/\r\n/g,`
|
|
`).replace(/\r/g,`
|
|
`),E=a.spacingAbove+a.spacingBelow;if(E=Math.max(0,qg(a)+E),x.length===0)return a.Cb=0,a.Gc=1,E;if(!a.isMultiline){var b=x.indexOf(`
|
|
`,0);0<=b&&(x=x.substr(0,b))}b=0;for(var z=a.Gc=0,tt,rt=!1;!rt;){if(tt=x.indexOf(`
|
|
`,z),tt===-1&&(tt=x.length,rt=!0),z<=tt){if(z=x.substr(z,tt-z),a.wrap!==Av){a.Le=0;var ot=Ut.alloc();Ev(a,z,y,ot),b+=ot.height,Ut.free(ot),a.Gc+=a.Le}else Ev(a,z,y,null),b+=E,a.Gc++;a.Gc===a.maxLines&&(rt=!0)}z=tt+1}return a.Lq=b}Me.Object.defineProperties(No.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"||(ku(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:en},set:function(a){var y=this.flip;y!==a&&(ku(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:Wo},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),ku(this),this.da.Yr=a,ws(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=Ut.alloc();Ev(this,this.ec,999999,a);var y=a.width;Ut.free(a),a=xS(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),En(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:Fv},set:function(a){var y=this.wrap;y!==a&&(ku(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:bv},set:function(a){var y=this.overflow;y!==a&&(ku(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&&Bc(a,"TextBlock.stroke"),a instanceof ro&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return qg(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&&(ku(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&&(ku(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 ju),this.fa.Tk=a,this.v();var x=this.panel;x!==null&&(x.graduatedIntervals=null),this.g("interval",y,a)}}},graduatedStart:{get:function(){return this.fa!==null?this.fa.u:0},set:function(a){var y=this.graduatedStart;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new ju),this.fa.u=a,this.v(),this.g("graduatedStart",y,a))}},graduatedEnd:{get:function(){return this.fa!==null?this.fa.j:1},set:function(a){var y=this.graduatedEnd;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new ju),this.fa.j=a,this.v(),this.g("graduatedEnd",y,a))}},graduatedFunction:{get:function(){return this.fa!==null?this.fa.F:null},set:function(a){var y=this.graduatedFunction;y!==a&&(this.fa===null&&(this.fa=new ju),this.fa.F=a,this.v(),this.g("graduatedFunction",y,a))}},graduatedSkip:{get:function(){return this.fa!==null?this.fa.o:null},set:function(a){var y=this.graduatedSkip;y!==a&&(this.fa===null&&(this.fa=new ju),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}},textValidation:{get:function(){return this.da!==null?this.da.vj:null},set:function(a){var y=this.textValidation;y!==a&&(ku(this),this.da.vj=a,this.g("textValidation",y,a))}},textEdited:{get:function(){return this.da!==null?this.da.Pr:null},set:function(a){var y=this.textEdited;y!==a&&(ku(this),this.da.Pr=a,this.g("textEdited",y,a))}},spacingAbove:{get:function(){return this.da!==null?this.da.Dr:0},set:function(a){var y=this.spacingAbove;y!==a&&(ku(this),this.da.Dr=a,this.v(),this.g("spacingAbove",y,a))}},spacingBelow:{get:function(){return this.da!==null?this.da.Er:0},set:function(a){var y=this.spacingBelow;y!==a&&(ku(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:$g},set:function(a){var y=this.formatting;y!==a&&(ku(this),this.da.gq=a,this.v(),this.g("formatting",y,a))}},maxLines:{get:function(){return this.da!==null?this.da.Jq:1/0},set:function(a){var y=this.maxLines;y!==a&&(a=Math.floor(a),0>=a&&ei(a,"> 0",No,"maxLines"),ku(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 Dm=null,Bm=null,Av=new Ve(No,"None",0),PS=new Ve(No,"WrapFit",1),Fv=new Ve(No,"WrapDesiredSize",2),wS=new Ve(No,"WrapBreakAll",3),bv=new Ve(No,"OverflowClip",0),Om=new Ve(No,"OverflowEllipsis",1),$g=new Ve(No,"FormatTrim",0),CS=new Ve(No,"FormatNone",0),Sx=/[ \u200b\u00ad]/,Nv=new Hi,LS=0,Im=new Hi,Tv=0,tp="...",kS="",Is=null,Rm=!1;No.className="TextBlock";function Dv(){this.nc=!1,this.Hd=null,this.Xf=en,this.gq=$g,this.Jq=1/0,this.$q=bv,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=Wo,this.$r=Fv}Dv.prototype.copy=function(){var a=new Dv;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},No.getEllipsis=function(){return tp},No.setEllipsis=function(a){tp=a,Im=new Hi,Tv=0},No.getBaseline=function(){return Dm},No.setBaseline=function(a){Dm=a},No.getUnderline=function(){return Bm},No.setUnderline=function(a){Bm=a},No.isValidFont=function(a){if(Rm||(Is=la?new Il(null).context:null,Rm=!0),Is===null)return!0;var y=Is.font;if(a===y||a==="10px sans-serif")return!0;Is.font="10px sans-serif",Is.font=a;var x=Is.font;if(x!=="10px sans-serif")return Is.font=y,!0;Is.font="19px serif";var E=Is.font;return Is.font=a,x=Is.font,Is.font=y,x!==E},No.FormatNone=CS,No.FormatTrim=$g,No.None=Av,No.OverflowClip=bv,No.OverflowEllipsis=Om,No.WrapBreakAll=wS,No.WrapDesiredSize=Fv,No.WrapFit=PS;function ju(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}ju.prototype.copy=function(){var a=new ju;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},ju.className="GradElementSettings";function Rs(a,y){de.call(this),this.Eg=null,this.qo="",this.Xg=cr,this.Nk=fn,this.Zg=this.Hd=null,this.Mk=fi,this.Xf=en,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 Bf;Oe(Rs,de),Rs.prototype.cloneProtected=function(a){de.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},Rs.prototype.qb=function(a){a===en||a===gi||a===Fr?this.imageStretch=a:de.prototype.qb.call(this,a)},Rs.prototype.toString=function(){return"Picture("+this.source+")#"+xr(this)};function Of(a){a===void 0&&(a=""),a!==""?Bf[a]&&(delete Bf[a],zm--):(Bf=new Hi,zm=0)}function MS(a,y){y.qy||(y.Fq=function(x){y.sq=!0,y.ln=!1;var E=y.Bg.copy();if(E!=null){for(E=E.iterator;E.next();){var b=E.value;b.N();var z=y.getAttribute("src")||"",tt=b.Og.I(z);if(tt!==null)for(var rt=tt.length,ot=0;ot<rt;ot++)z=tt[ot],b.Xn.add(z),z.Uc=!0,b.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),z.Zg!==null&&z.Zg(z,x))}y.Bg.clear()}a.desiredSize.w()||(Ma(a,!1),a.v())},y.Yp=function(x){y.ln=x;var E=y.Bg.copy();if(E!=null){for(E=E.iterator;E.next();){var b=E.value,z=y.getAttribute("src")||"",tt=b.Og.I(z);if(tt!==null){b=tt.length,z=Ei();for(var rt=0;rt<b;rt++)z.push(tt[rt]);if(y.hn)for(rt=0;rt<b;rt++)tt=z[rt],tt.Hd!==null&&tt.Hd(tt,x);ri(z)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}Rs.prototype.hA=function(){if(this.source!==""){Of(this.source);var a=this.source;this.source="",this.source=a}},Rs.prototype.redraw=function(){this.N(),this.Uc=!0},Rs.prototype.hh=function(a,y){var x=this.Eg;if(x!==null){var E=x.getAttribute("src");if(!(x instanceof HTMLImageElement&&(E===null||E==="")||x.ln instanceof Event&&a instanceof Xd)){var b=a instanceof qs;E=this.naturalBounds;var z=0,tt=0,rt=this.qn,ot=rt?+x.width:x.naturalWidth;if(rt=rt?+x.height:x.naturalHeight,ot===void 0&&x.videoWidth&&(ot=x.videoWidth),rt===void 0&&x.videoHeight&&(rt=x.videoHeight),ot=ot||E.width,rt=rt||E.height,ot!==0&&rt!==0){var st=ot,ut=rt;this.sourceRect.w()&&(z=this.Xg.x,tt=this.Xg.y,ot=this.Xg.width,rt=this.Xg.height);var ft=ot,vt=rt,yt=this.Nk,Pt=this.Mk;switch(yt){case en:if(this.sourceRect.w())break;ft>=E.width&&(z=z+Pt.offsetX+(ft*Pt.x-E.width*Pt.x)),vt>=E.height&&(tt=tt+Pt.offsetY+(vt*Pt.y-E.height*Pt.y)),ot=Math.min(E.width,ft),rt=Math.min(E.height,vt);break;case fn:ft=E.width,vt=E.height;break;case gi:case Fr:yt===gi?(yt=Math.min(E.height/vt,E.width/ft),ft*=yt,vt*=yt):yt===Fr&&(yt=Math.max(E.height/vt,E.width/ft),ft*=yt,vt*=yt,ft>=E.width&&(z=(z+Pt.offsetX+(ft*Pt.x-E.width*Pt.x)/ft)*ot),vt>=E.height&&(tt=(tt+Pt.offsetY+(vt*Pt.y-E.height*Pt.y)/vt)*rt),ot*=1/(ft/E.width),rt*=1/(vt/E.height),ft=E.width,vt=E.height)}yt=this.Df()*y.scale;var Et=ft*yt*vt*yt,Vt=ot*rt/Et,Rt=x.__goCache;yt=null;var Qt=xx;if(!b){if(x.sq&&Rt!==void 0&&4<Et&&Vt>Qt*Qt)for(Rt.gi===null&&(AS(Rt,4,st,ut,x),AS(Rt,16,st,ut,x)),b=Rt.gi,st=b.length,ut=0;ut<st&&b[ut].ratio*b[ut].ratio<Vt;ut++)yt=b[ut];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{b=new Il(null).context;try{b.drawImage(this.Eg,0,0)}catch(_t){this.en=!1}try{b.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(_t){this.vl=!0}}if(this.vl)return}}switch(b=ft<E.width?Pt.offsetX+(E.width*Pt.x-ft*Pt.x):0,Pt=vt<E.height?Pt.offsetY+(E.height*Pt.y-vt*Pt.y):0,this.flip){case jr:a.translate(Math.min(E.width,ft),0),a.scale(-1,1);break;case vr:a.translate(0,Math.min(E.height,vt)),a.scale(1,-1);break;case fo:a.translate(Math.min(E.width,ft),Math.min(E.height,vt)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&Rt!==void 0&&yt!==null&&yt.ratio!==1){a.save(),y=yt.ratio;try{a.drawImage(yt.source,z/y,tt/y,Math.min(yt.source.width,ot/y),Math.min(yt.source.height,rt/y),b,Pt,Math.min(E.width,ft),Math.min(E.height,vt)),a instanceof qs&&(this.bt=[z/y,tt/y,Math.min(yt.source.width,ot/y),Math.min(yt.source.height,rt/y),b,Pt,Math.min(E.width,ft),Math.min(E.height,vt)])}catch(_t){this.en=!1}a.restore()}else try{a.drawImage(x,z,tt,ot,rt,b,Pt,Math.min(E.width,ft),Math.min(E.height,vt)),a instanceof qs&&(this.bt=[z,tt,ot,rt,b,Pt,Math.min(E.width,ft),Math.min(E.height,vt)])}catch(_t){this.en=!1}switch(this.flip){case jr:a.scale(-1,1),a.translate(-Math.min(E.width,ft),0);break;case vr:a.scale(1,-1),a.translate(0,-Math.min(E.height,vt));break;case fo:a.scale(-1,-1),a.translate(-Math.min(E.width,ft),-Math.min(E.height,vt))}}}}},Rs.prototype.Wl=function(a,y,x,E){var b=this.desiredSize,z=Os(this,!0),tt=this.Eg,rt=this.qn,ot=0,st=0;(rt||!this.al&&tt&&tt.complete)&&(this.al=!0),tt===null?(isFinite(b.width)||(a=0),isFinite(b.height)||(y=0)):(ot=rt?+tt.width:tt.naturalWidth,st=rt?+tt.height:tt.naturalHeight),isFinite(b.width)||z===fn||z===ki?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:tt!==null&&(a=ot)),x=0):tt!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:ot),isFinite(b.height)||z===fn||z===ji?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:tt!==null&&(y=st)),E=0):tt!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:st),isFinite(b.width)&&(a=b.width),isFinite(b.height)&&(y=b.height),b=this.maxSize,z=this.minSize,x=Math.max(x||0,z.width),E=Math.max(E||0,z.height),a=Math.min(b.width,a),y=Math.min(b.height,y),a=Math.max(x,a),y=Math.max(E,y),tt===null||tt.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),En(this.dc,a,y),this.Ge(0,0,a,y)},Rs.prototype.eh=function(a,y,x,E){ms(this,a,y,x,E)},Me.Object.defineProperties(Rs.prototype,{element:{get:function(){return this.Eg},set:function(a){var y=this.Eg;if(this.Uc=!0,y!==a){this.qn=a instanceof HTMLCanvasElement;var x=a instanceof HTMLImageElement;a===null||x||a instanceof HTMLVideoElement||this.qn||$t("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var E=this.diagram;E!==null&&Dg(E,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new cn),E!==null&&x&&rd(E,this),a!==null&&(this.qn||a.complete===!0?(a.hn&&(a.ln instanceof Event&&this.Hd!==null?this.Hd(this,a.ln):a.sq===!0&&!a.ln&&this.Zg!==null&&a.eu&&this.Zg(this,a.eu)),a.sq=!0,this.desiredSize.w()||(Ma(this,!1),this.v())):x&&MS(this,a)),this.g("element",y,a),this.N()}}},source:{get:function(){return this.qo},set:function(a){var y=this.qo;if(y!==a){this.Uc=!0,this.qo=a;var x=Bf;if(la){var E=null;if(x[a]!==void 0)E=x[a];else if(a!==""){30<zm&&(Of(),x=Bf),E=mi("img"),E.hn=!0,MS(this,E);var b=this.rl;b!==null&&(E.crossOrigin=b(this)),E.src=a,x[a]=E,zm++}this.element=E,E!==null&&E.__goCache===void 0&&(E.__goCache=new ES),this.v(),this.N()}this.g("source",y,a)}}},sourceCrossOrigin:{get:function(){return this.rl},set:function(a){if(this.rl!==a&&(this.rl=a,this.element!==null)){var y=this.element.getAttribute("src");a===null&&typeof y=="string"?this.element.crossOrigin=null:a!==null&&(this.element.crossOrigin=a(this)),this.element.src=y}}},sourceRect:{get:function(){return this.Xg},set:function(a){var y=this.Xg;y.D(a)||(this.Xg=a=a.J(),this.N(),this.g("sourceRect",y,a))}},imageStretch:{get:function(){return this.Nk},set:function(a){var y=this.Nk;y!==a&&(this.Nk=a,this.N(),this.g("imageStretch",y,a))}},flip:{get:function(){return this.Xf},set:function(a){var y=this.Xf;y!==a&&(this.Xf=a,this.N(),this.g("flip",y,a))}},imageAlignment:{get:function(){return this.Mk},set:function(a){var y=this.Mk;y.D(a)||(this.Mk=a=a.J(),this.N(),this.g("imageAlignment",y,a))}},errorFunction:{get:function(){return this.Hd},set:function(a){var y=this.Hd;y!==a&&(this.Hd=a,this.g("errorFunction",y,a))}},successFunction:{get:function(){return this.Zg},set:function(a){var y=this.Zg;y!==a&&(this.Zg=a,this.g("successFunction",y,a))}},naturalBounds:{get:function(){return this.dc}}}),Rs.prototype.redraw=Rs.prototype.redraw,Rs.prototype.reloadSource=Rs.prototype.hA;var zm=0,xx=4;Rs.className="Picture",Bf=new Hi,Rs.clearCache=Of;function ES(){this.gi=null}function AS(a,y,x,E,b){a.gi===null&&(a.gi=[]);var z=new Il(null),tt=z.context,rt=1/y;z.width=x/y,z.height=E/y,z.width!==0&&z.height!==0&&(y=new FS(z.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],b=x.source,x=x.ratio),tt.setTransform(rt*x,0,0,rt*x,0,0),tt.yc(),tt.drawImage(b,0,0),a.gi.push(y))}ES.className="PictureCacheArray";function FS(a,y){this.source=a,this.ratio=y}FS.className="PictureCacheInstance";function If(){this.os=new ln,this.mc=null}If.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new ln,this.mc=null};function Rf(a,y,x,E,b,z){a.mc=new aa,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=E,a.mc.isEvenOdd=z||!1,a.os.figures.add(a.mc),b!==void 0&&(a.mc.isShadowed=b)}function Px(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}If.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var E=new Mr(sa);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)},If.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var E=new Mr(no);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)};function Ah(a,y,x,E,b,z,tt){var rt;rt===void 0&&(rt=!1);var ot=new Mr(fa);ot.point1X=y,ot.point1Y=x,ot.point2X=E,ot.point2Y=b,ot.endX=z,ot.endY=tt,rt&&ot.close(),a.mc.segments.add(ot)}function jm(a,y,x,E,b){var z;z===void 0&&(z=!1);var tt=new Mr(ls);tt.point1X=y,tt.point1Y=x,tt.endX=E,tt.endY=b,z&&tt.close(),a.mc.segments.add(tt)}If.prototype.arcTo=function(a,y,x,E,b,z,tt){z===void 0&&(z=0),tt===void 0&&(tt=!1);var rt=new Mr(ra);rt.startAngle=a,rt.sweepAngle=y,rt.centerX=x,rt.centerY=E,rt.radiusX=b,rt.radiusY=z!==0?z:b,tt&&rt.close(),this.mc.segments.add(rt)};function wx(a,y,x,E,b,z,tt,rt){var ot;ot===void 0&&(ot=!1),y=new Mr(us,tt,rt,y,x,E,b,z),ot&&y.close(),a.mc.segments.add(y)}function bS(a){var y=Wm;return y!==null?(Wm=null,y.reset(a),y):(y=new If,y.reset(a),y)}var Wm=null;If.className="StreamGeometryContext";function gs(a,y){var x=a.toLowerCase(),E=le.Ze;E[a]=y,E[x]=a}gs("Rectangle",function(a,y,x){a="r"+y+","+x;var E=le.Mf[a];return E!==void 0||(E=new ln(ln.u),E.endX=y,E.endY=x,le.Nf<le.vm&&(le.Mf[a]=E,le.Nf++)),E}),gs("Square",function(a,y,x){a="s"+y+","+x;var E=le.Mf[a];return E!==void 0||(E=new ln(ln.u),E.endX=y,E.endY=x,E.defaultStretch=gi,le.Nf<le.vm&&(le.Mf[a]=E,le.Nf++)),E}),gs("RoundedRectangle",function(a,y,x){a=a?a.parameter1:NaN,(isNaN(a)||0>a)&&(a=5),a=Math.min(a,y/3),a=Math.min(a,x/3);var E="rr"+y+","+x+","+a,b=le.Mf[E];if(b!==void 0)return b;var z=a*le.wg;return b=new ln().add(new aa(a,0,!0).add(new Mr(no,y-a,0)).add(new Mr(fa,y,a,y-z,0,y,z)).add(new Mr(no,y,x-a)).add(new Mr(fa,y-a,x,y,x-z,y-z,x)).add(new Mr(no,a,x)).add(new Mr(fa,0,x-a,z,x,0,x-z)).add(new Mr(no,0,a)).add(new Mr(fa,a,0,0,z,z,0).close())),1<z&&(b.spot1=new Xe(0,0,z,z),b.spot2=new Xe(1,1,-z,-z)),le.Nf<le.vm&&(le.Mf[E]=b,le.Nf++),b}),gs("Border","RoundedRectangle"),gs("Ellipse",function(a,y,x){a="e"+y+","+x;var E=le.Mf[a];return E!==void 0||(E=new ln(ln.F),E.endX=y,E.endY=x,E.spot1=gr,E.spot2=Vr,le.Nf<le.vm&&(le.Mf[a]=E,le.Nf++)),E}),gs("Circle",function(a,y,x){a="c"+y+","+x;var E=le.Mf[a];return E!==void 0||(E=new ln(ln.F),E.endX=y,E.endY=x,E.spot1=gr,E.spot2=Vr,E.defaultStretch=gi,le.Nf<le.vm&&(le.Mf[a]=E,le.Nf++)),E}),gs("TriangleRight",function(a,y,x){return new ln().add(new aa(0,0).add(new Mr(no,y,.5*x)).add(new Mr(no,0,x).close())).pm(0,.25,.5,.75)}),gs("TriangleDown",function(a,y,x){return new ln().add(new aa(0,0).add(new Mr(no,y,0)).add(new Mr(no,.5*y,x).close())).pm(.25,0,.75,.5)}),gs("TriangleLeft",function(a,y,x){return new ln().add(new aa(y,x).add(new Mr(no,0,.5*x)).add(new Mr(no,y,0).close())).pm(.5,.25,1,.75)}),gs("TriangleUp",function(a,y,x){return new ln().add(new aa(y,x).add(new Mr(no,0,x)).add(new Mr(no,.5*y,0).close())).pm(.25,.5,.75,1)}),gs("Triangle","TriangleUp"),gs("Diamond",function(a,y,x){return new ln().add(new aa(.5*y,0).add(new Mr(no,0,.5*x)).add(new Mr(no,.5*y,x)).add(new Mr(no,y,.5*x).close())).pm(.25,.25,.75,.75)}),gs("LineH",function(a,y,x){return a=new ln(ln.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),gs("LineV",function(a,y,x){return a=new ln(ln.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),gs("None","Rectangle"),gs("BarH","Rectangle"),gs("BarV","Rectangle"),gs("MinusLine","LineH"),gs("PlusLine",function(a,y,x){return new ln().add(new aa(0,x/2,!1).add(new Mr(no,y,x/2)).add(new Mr(sa,y/2,0)).add(new Mr(no,y/2,x)))}),gs("XLine",function(a,y,x){return new ln().add(new aa(0,x,!1).add(new Mr(no,y,0)).add(new Mr(sa,0,0)).add(new Mr(no,y,x)))}),gs("LineRight",function(a,y,x){return new ln().add(new aa(.25*y,0,!1).add(new Mr(no,.75*y,.5*x)).add(new Mr(no,.25*y,x)))}),gs("LineDown",function(a,y,x){return new ln().add(new aa(0,.25*x,!1).add(new Mr(no,.5*y,.75*x)).add(new Mr(no,y,.25*x)))}),gs("LineLeft",function(a,y,x){return new ln().add(new aa(.75*y,0,!1).add(new Mr(no,.25*y,.5*x)).add(new Mr(no,.75*y,x)))}),gs("LineUp",function(a,y,x){return new ln().add(new aa(0,.75*x,!1).add(new Mr(no,.5*y,.25*x)).add(new Mr(no,y,.75*x)))}),le.um={"":"",Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z",Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z",Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z",BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",OpenTriangle:"m 0,0 l 8,4 -8,4",BackwardOpenTriangle:"m 8,0 l -8,4 8,4",OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8",BackwardOpenTriangleLine:"m 8,0 l -8,4 8,4 m -8.5,0 l 0,-8",OpenTriangleTop:"m 0,0 l 8,4 m 0,4",BackwardOpenTriangleTop:"m 8,0 l -8,4 m 0,4",OpenTriangleBottom:"m 0,8 l 8,-4",BackwardOpenTriangleBottom:"m 0,4 l 8,4",HalfTriangleTop:"F1 m 0,0 l 0,4 8,0 z m 0,8",BackwardHalfTriangleTop:"F1 m 8,0 l 0,4 -8,0 z m 0,8",HalfTriangleBottom:"F1 m 0,4 l 0,4 8,-4 z",BackwardHalfTriangleBottom:"F1 m 8,4 l 0,4 -8,-4 z",ForwardSemiCircle:"m 4,0 b 270 180 0 4 4",BackwardSemiCircle:"m 4,8 b 90 180 0 -4 4",Feather:"m 0,0 l 3,4 -3,4",BackwardFeather:"m 3,0 l -3,4 3,4",DoubleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardDoubleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4",TripleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardTripleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4 m 3,-8 l -3,4 3,4",ForwardSlash:"m 0,8 l 5,-8",BackSlash:"m 0,0 l 5,8",DoubleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8",DoubleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8",TripleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8 m -2,8 l 4,-8",TripleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8 m -2,-8 l 4,8",Fork:"m 0,4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4",LineFork:"m 0,0 l 0,8 m 0,-4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardLineFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4 m 8,-8 l 0,8",CircleFork:"F1 m 6,4 b 0 360 -3 0 3 z m 0,0 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 6,0 b 0 360 -3 0 3",CircleLineFork:"F1 m 6,4 b 0 360 -3 0 3 z m 1,-4 l 0,8 m 0,-4 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleLineFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 0,-4 l 0,8 m 7,-4 b 0 360 -3 0 3",Circle:"F1 m 8,4 b 0 360 -4 0 4 z",Block:"F1 m 0,0 l 0,8 8,0 0,-8 z",StretchedDiamond:"F1 m 0,3 l 5,-3 5,3 -5,3 -5,-3 z",Diamond:"F1 m 0,4 l 4,-4 4,4 -4,4 -4,-4 z",Chevron:"F1 m 0,0 l 5,0 3,4 -3,4 -5,0 3,-4 -3,-4 z",StretchedChevron:"F1 m 0,0 l 8,0 3,4 -3,4 -8,0 3,-4 -3,-4 z",NormalArrow:"F1 m 0,2 l 4,0 0,-2 4,4 -4,4 0,-2 -4,0 z",X:"m 0,0 l 8,8 m 0,-8 l -8,8",TailedNormalArrow:"F1 m 0,0 l 2,0 1,2 3,0 0,-2 2,4 -2,4 0,-2 -3,0 -1,2 -2,0 1,-4 -1,-4 z",DoubleTriangle:"F1 m 0,0 l 4,4 -4,4 0,-8 z m 4,0 l 4,4 -4,4 0,-8 z",BigEndArrow:"F1 m 0,0 l 5,2 0,-2 3,4 -3,4 0,-2 -5,2 0,-8 z",ConcaveTailArrow:"F1 m 0,2 h 4 v -2 l 4,4 -4,4 v -2 h -4 l 2,-2 -2,-2 z",RoundedTriangle:"F1 m 0,1 a 1,1 0 0 1 1,-1 l 7,3 a 0.5,1 0 0 1 0,2 l -7,3 a 1,1 0 0 1 -1,-1 l 0,-6 z",SimpleArrow:"F1 m 1,2 l -1,-2 2,0 1,2 -1,2 -2,0 1,-2 5,0 0,-2 2,2 -2,2 0,-2 z",AccelerationArrow:"F1 m 0,0 l 0,8 0.2,0 0,-8 -0.2,0 z m 2,0 l 0,8 1,0 0,-8 -1,0 z m 3,0 l 2,0 2,4 -2,4 -2,0 0,-8 z",BoxArrow:"F1 m 0,0 l 4,0 0,2 2,0 0,-2 2,4 -2,4 0,-2 -2,0 0,2 -4,0 0,-8 z",TriangleLine:"F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8",CircleEndedArrow:"F1 m 10,4 l -2,-3 0,2 -2,0 0,2 2,0 0,2 2,-3 z m -4,0 b 0 360 -3 0 3 z",DynamicWidthArrow:"F1 m 0,3 l 2,0 2,-1 2,-2 2,4 -2,4 -2,-2 -2,-1 -2,0 0,-2 z",EquilibriumArrow:"m 0,3 l 8,0 -3,-3 m 3,5 l -8,0 3,3",FastForward:"F1 m 0,0 l 3.5,4 0,-4 3.5,4 0,-4 1,0 0,8 -1,0 0,-4 -3.5,4 0,-4 -3.5,4 0,-8 z",Kite:"F1 m 0,4 l 2,-4 6,4 -6,4 -2,-4 z",HalfArrowTop:"F1 m 0,0 l 4,4 4,0 -8,-4 z m 0,8",HalfArrowBottom:"F1 m 0,8 l 4,-4 4,0 -8,4 z",OpposingDirectionDoubleArrow:"F1 m 0,4 l 2,-4 0,2 4,0 0,-2 2,4 -2,4 0,-2 -4,0 0,2 -2,-4 z",PartialDoubleTriangle:"F1 m 0,0 4,3 0,-3 4,4 -4,4 0,-3 -4,3 0,-8 z",LineCircle:"F1 m 0,0 l 0,8 m 7 -4 b 0 360 -3 0 3 z",DoubleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",TripleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",CircleLine:"F1 m 6 4 b 0 360 -3 0 3 z m 1,-4 l 0,8",DiamondCircle:"F1 m 8,4 l -4,4 -4,-4 4,-4 4,4 m 8,0 b 0 360 -4 0 4 z",PlusCircle:"F1 m 8,4 b 0 360 -4 0 4 l -8 0 z m -4 -4 l 0 8",OpenRightTriangleTop:"m 8,0 l 0,4 -8,0 m 0,4",OpenRightTriangleBottom:"m 8,8 l 0,-4 -8,0",Line:"m 0,0 l 0,8",DoubleLine:"m 0,0 l 0,8 m 2,0 l 0,-8",TripleLine:"m 0,0 l 0,8 m 2,0 l 0,-8 m 2,0 l 0,8",PentagonArrow:"F1 m 8,4 l -4,-4 -4,0 0,8 4,0 4,-4 z"};function Bv(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=xn,this.ir=null,this.jr="",this.lr=xo,this.Gq="",this.Hq=Wi,this.Pq=Fn,this.Kq=Xn,this.Up=null,this.Cq=127,this.zr=si,this.yr="gray",this.Vg=4}Bv.prototype.copy=function(){var a=new Bv;return a.zq=this.zq,a.Kp=this.Kp,a.tr=this.tr,a.vr=this.vr,a.ur=this.ur,a.oq=this.oq,a.fr=this.fr,a.hr=this.hr,a.gr=this.gr.J(),a.ir=this.ir,a.jr=this.jr,a.lr=this.lr.J(),a.Gq=this.Gq,a.Hq=this.Hq.J(),a.Pq=this.Pq.J(),a.Kq=this.Kq.J(),a.Up=this.Up,a.Cq=this.Cq,a.zr=this.zr.J(),a.yr=this.yr,a.Vg=this.Vg,a};function Fi(a,y){a===void 0||a instanceof Fa||typeof a=="string"?mn.call(this,a):(mn.call(this),a&&(y=a)),this.G=2408959,this.Tf="",this.P=null,this.Jg="",this.Qf=this.Ug=null,this.ec="",this.Ah=this.Ig=null,this.ke=new Tt(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new ae,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Oe(Fi,mn),Fi.prototype.cloneProtected=function(a){mn.prototype.cloneProtected.call(this,a),a.G=this.G&-4097|49152,a.Tf=this.Tf,this.P!==null&&(a.P=this.P.nc?this.P:this.P.copy()),a.Jg=this.Jg,a.Qf=null,a.ec=this.ec,a.ke.assign(this.ke),a.Ao=this.Ao},Ct=Fi.prototype,Ct.Af=function(a){mn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},Ct.toString=function(){var a=bi(this.constructor)+"#"+xr(this);return this.data!==null&&(a+="("+Sr(this.data)+")"),a};function zs(a){a.P===null?a.P=new Bv:a.P.nc&&(a.P=a.P.copy())}Ct.th=function(){mn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},Ct.gk=function(a,y,x,E,b,z,tt){var rt=this.diagram;rt!==null&&(a===Xo&&y==="elements"?b instanceof mn?Jd(b,function(ot){sy(rt.partManager,ot),Hd(rt,ot)}):rd(rt,b):a===ua&&y==="elements"&&(b instanceof mn?Jd(b,function(ot){ly(rt.partManager,ot,rt)}):Dg(rt,b)),rt.cb(a,y,x,E,b,z,tt))},Ct.La=function(a){if(mn.prototype.La.call(this,a),this.data!==null){for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];b instanceof mn&&Jd(b,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},Fi.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},Fi.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},Fi.prototype.bh=function(a,y){if(y!==null){var x=null,E=this.Qf;if(E!==null&&(x=E.I(a)),x!==y){if(x!==null){var b=x.diagram;b!==null&&b.remove(x)}E===null&&(this.Qf=E=new be),y.Tf!==a&&(y.category=a),E.add(a,y),a=this.diagram,a!==null&&(a.add(y),a=y.adornedObject,a!==null&&(a=a.ih(),a!==null&&(y.data=a.data)))}}},Fi.prototype.Jf=function(a){var y=this.Qf;if(y!==null){var x=y.I(a);if(x!==null){var E=x.diagram;E!==null&&E.remove(x)}y.remove(a),y.count===0&&(this.Qf=null)}},Fi.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=Ei();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);ri(y)}},Fi.prototype.updateAdornments=function(){var a=this.diagram;if(a!==null){for(var y=this.adornments;y.next();){var x=y.value;x.v(),x.placeholder&&x.placeholder.v()}t:{if(this.isSelected&&this.selectionAdorned&&(y=this.selectionObject,y!==null&&this.actualBounds.w()&&this.isVisible()&&y.Ed()&&y.actualBounds.w())){if(x=this.Pj("Selection"),x===null){if(x=this.selectionAdornmentTemplate,x===null&&(x=this.ph()?a.linkSelectionAdornmentTemplate:this instanceof ir?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof Zr))break t;Rl(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=mn.Link),x.adornedObject=y)}if(x!==null){x.type===mn.Link&&x.v(),this.bh("Selection",x);break t}}this.Jf("Selection")}for(Cx(this,a),y=this.adornments;y.next();)y.value.La()}},Fi.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function Ov(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function Cx(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function Hm(a){if(ld(a)===!1){Rv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function NS(a){if(a.G|=2097152,ld(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||BS(a,y,x),x=a.Ib;var E=ae.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(E,x),ae.free(E),Rv(a,!1)}}Fi.prototype.Ge=function(a,y,x,E){var b=this.uc;b.h(a,y,x,E),this.Lb===null&&(this.Lb=new Un);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),this.Lb=z,z.ws()||z.pp(b)},Fi.prototype.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=fi;this.locationSpot.sb()&&(z=this.locationSpot);var tt=Tt.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,tt.yi(x.x,x.y,x.width,x.height,z),y.Lb!==null&&y.Lb.Ga(tt),tt.offset(-y.measuredBounds.x,-y.measuredBounds.y),z=y.panel;z!==null&&z!==this;)z.Lb!==null&&z.Lb.Ga(tt),tt.offset(-z.measuredBounds.x,-z.measuredBounds.y),z=z.panel;else tt.yi(y,x,E,b,z);a.rotate(this.Kb,tt.x,tt.y),Tt.free(tt)}},Fi.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Fi.prototype.moveTo=function(a,y,x){a=Tt.allocAt(a,y),this.move(a,x),Tt.free(a)},Fi.prototype.isVisible=function(){if(!this.visible)return!1;var a=this.layer;if(a!==null){if(!a.visible)return!1;if(a=a.diagram,a!==null&&a.animationManager.fv(this))return!0}return a=this.containingGroup,!!(a===null||a.isSubGraphExpanded&&a.isVisible())},Fi.prototype.Zb=function(a){var y=this.diagram;a?(this.C(4),this.Wb(),y!==null&&y.De.add(this)):(this.C(8),this.Ej()),this.oh(),y!==null&&(y.Ya(),y.N())},Fi.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new be),y.I(a)!==null)return y.I(a);var x=mn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function Fh(a,y,x,E){E===void 0&&(E=new Tt),x=x.Mc()?fi:x;var b=y.naturalBounds;if(E.h(b.width*x.x+x.offsetX,b.height*x.y+x.offsetY),y===null||y===a)return E;for(y.transform.Ga(E),y=y.panel;y!==null&&y!==a;)y.transform.Ga(E),y=y.panel;return a.Lb!==null&&a.Lb.Ga(E),E.offset(-a.uc.x,-a.uc.y),E}Fi.prototype.mi=function(a){return a===void 0&&(a=new ae),a.assign(this.actualBounds)},Fi.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function TS(a){var y=Tt.alloc(),x=a.locationObject,E=x.naturalBounds,b=x instanceof dr?x.strokeWidth:0;if(y.yi(0,0,E.width+b,E.height+b,a.locationSpot),x!==a)for(y.offset(-b/2,-b/2),x.transform.Ga(y),x=x.panel;x!==null&&x!==a;)x.transform.Ga(y),x=x.panel;return a.Lb!==null&&a.Lb.Ga(y),y.offset(-a.uc.x,-a.uc.y),y}function qd(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=uS(a));var E=a.ag,b=2*E;if(!a.isShadowed)return x.h(y.x-1-E,y.y-1-E,y.width+2+b,y.height+2+b),x;E=y.x,b=y.y;var z=y.width;y=y.height;var tt=a.shadowBlur;return a=a.shadowOffset,z+=tt,y+=tt,E-=tt/2,b-=tt/2,0<a.x?z+=a.x:(E+=a.x,z-=a.x),0<a.y?y+=a.y:(b+=a.y,y-=a.y),x.h(E-1,b-1,z+2,y+2),x}Fi.prototype.arrange=function(){if(Cs(this)===!1)NS(this);else{Ou(this,!1);var a=this.Ib,y=ae.alloc();y.assign(a);var x=ud(this);this.eh(0,0,this.uc.width,this.uc.height);var E=this.position;BS(this,E,this.location),a.ka(),a.x=E.x,a.y=E.y,a.freeze(),this.Xl(y,a),y.D(a)?this.Fd(x):!this.Zc()||le.B(y.width,a.width)&&le.B(y.height,a.height)||0<=this.vw&&this.C(16),ae.free(y),Rv(this,!1)}},Ct=Fi.prototype,Ct.Xl=function(a,y){var x=this.diagram;if(x!==null){var E=!1;if(x.Zi===!1&&a.w()){var b=ae.alloc();b.assign(x.documentBounds),b.Fv(x.padding),a.x>b.x&&a.y>b.y&&a.right<b.right&&a.bottom<b.bottom&&y.x>b.x&&y.y>b.y&&y.right<b.right&&y.bottom<b.bottom&&(E=!0),ae.free(b)}!(this.G&65536)&&a.D(y)||RS(this,E,x),x.N(),!a.w()&&!y.w()||Bn(a,y)||(this instanceof Hn&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},Ct.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var E=this.diagram;return E!==null&&DS(this,E,a,y,x),this.pa=a,this.G&=-2097153,!this.ke.w()||E!==null&&!E.animationManager.isTicking&&E.undoManager.isUndoingRedoing||(E=this.ke,this.ke=new Tt(E.x+(a.x-y),E.y+(a.y-x)),this.g("location",E,this.ke.copy())),ld(this)===!1&&Cs(this)===!1&&(Hm(this),NS(this)),!0};function DS(a,y,x,E,b){y===null||a instanceof Zr||(y=y.animationManager,y.zb&&lf(y,a,new Tt(E,b),x))}Ct.mm=function(a,y,x){var E=this.ke,b=this.pa;if(x){if(E.x===a&&E.y===y)return;ld(this)||Cs(this)?b.h(NaN,NaN):b.h(b.x+a-E.x,b.y+y-E.y),E.h(a,y)}else{if(b.x===a&&b.y===y)return;E.h(E.x+a-b.x,E.y+y-b.y),b.h(a,y)}Hm(this)},Ct.Av=function(){this.G&=-2097153,Hm(this)};function BS(a,y,x){var E=TS(a),b=a.diagram,z=x.w(),tt=y.w();z&&tt?a.G&2097152?OS(a,y,x,b,E):IS(a,y,x,b,E):z?OS(a,y,x,b,E):tt&&IS(a,y,x,b,E),a.G|=2097152,Tt.free(E),a.Uk()}function OS(a,y,x,E,b){var z=y.x,tt=y.y;y.h(x.x-b.x,x.y-b.y),E!==null&&(x=E.animationManager,(E=x.defaultAnimation.isAnimating)||!x.zb||a instanceof Zr||lf(x,a,new Tt(z,tt),y),E||y.x===z&&y.y===tt||a.g("position",new Tt(z,tt),y.copy()))}function IS(a,y,x,E,b){var z=x.copy();x.h(y.x+b.x,y.y+b.y),x.D(z)||E===null||a.g("location",z,x.copy())}function RS(a,y,x){zv(a,!1),a instanceof Hn&&wh(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var E=x.viewportBounds;E.w()?ud(a)?(qn(y,E)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(E)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}Ct.si=function(){return!0},Ct.Zc=function(){return!0},Ct.ph=function(){return!1},Ct.Dd=function(){return!0};function Iv(a,y,x,E){y.constructor===a.constructor||WS||(WS=!0,Bi('Should not change the class of the Part when changing category from "'+x+'" to "'+E+'"'),Bi(" Old class: "+bi(a.constructor)+", new class: "+bi(y.constructor)+", part: "+a.toString())),a.Ej();var b=a.data;x=a.layerName;var z=a.isSelected,tt=a.isHighlighted,rt=!0,ot=!0,st=!1;a instanceof Hn&&(rt=a.isTreeLeaf,ot=a.isTreeExpanded,st=a.wasTreeExpanded),y.Af(a),y.cloneProtected(a),a.Tf=E,a.svg!==null&&(a.svg.remove(),a.svg=null,a.Uc=!0),a.v(),a.N(),y=a.diagram,E=!0,y!==null&&(E=y.skipsUndoManager,y.skipsUndoManager=!0),a.ub=b,a.G=z?a.G|4096:a.G&-4097,a.G=tt?a.G|524288:a.G&-524289,a instanceof Hn&&(a.U=rt?a.U|4:a.U&-5,a.U=ot?a.U|1:a.U&-2,a.U=st?a.U|2:a.U&-3),b!==null&&a.La(),b=a.layerName,b!==x&&(a.Jg=x,a.layerName=b),y!==null&&(y.skipsUndoManager=E),a.Zc()&&a.C(64)}Fi.prototype.canCopy=function(){if(!this.copyable)return!1;var a=this.layer;return a===null?!0:a.allowCopy?(a=a.diagram,a===null?!0:!!a.allowCopy):!1},Fi.prototype.canDelete=function(){if(!this.deletable)return!1;var a=this.layer;return a===null?!0:a.allowDelete?(a=a.diagram,a===null?!0:!!a.allowDelete):!1},Fi.prototype.canEdit=function(){if(!this.textEditable)return!1;var a=this.layer;return a===null?!0:a.allowTextEdit?(a=a.diagram,a===null?!0:!!a.allowTextEdit):!1},Fi.prototype.canGroup=function(){if(!this.groupable)return!1;var a=this.layer;return a===null?!0:a.allowGroup?(a=a.diagram,a===null?!0:!!a.allowGroup):!1},Fi.prototype.canMove=function(){if(!this.movable)return!1;var a=this.layer;return a===null?!0:a.allowMove?(a=a.diagram,a===null?!0:!!a.allowMove):!1},Fi.prototype.canReshape=function(){if(!this.reshapable)return!1;var a=this.layer;return a===null?!0:a.allowReshape?(a=a.diagram,a===null?!0:!!a.allowReshape):!1},Fi.prototype.canResize=function(){if(!this.resizable)return!1;var a=this.layer;return a===null?!0:a.allowResize?(a=a.diagram,a===null?!0:!!a.allowResize):!1},Fi.prototype.canRotate=function(){if(!this.rotatable)return!1;var a=this.layer;return a===null?!0:a.allowRotate?(a=a.diagram,a===null?!0:!!a.allowRotate):!1},Fi.prototype.canSelect=function(){if(!this.selectable)return!1;var a=this.layer;return a===null?!0:a.allowSelect?(a=a.diagram,a===null?!0:!!a.allowSelect):!1};function ld(a){return(a.G&32768)!==0}function Rv(a,y){a.G=y?a.G|32768:a.G&-32769}function zv(a,y){a.G=y?a.G|65536:a.G&-65537}function ud(a){return(a.G&131072)!==0}Ct=Fi.prototype,Ct.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function Gm(a,y){a.G=y?a.G|1048576:a.G&-1048577}Ct.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},Ct.N=function(){var a=this.diagram;a!==null&&!Cs(this)&&!ld(this)&&this.isVisible()&&this.Ib.w()&&a.N(qd(this,this.Ib))},Ct.v=function(){mn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Hn&&this.labeledLink!==null&&ws(this.labeledLink),a.$b(!0))},Ct.Vo=function(a){a||(a=this.Ah,a!==null&&Vv(a,this))},Ct.Wo=function(a){a||(a=this.Ah,a!==null&&Kv(a,this))},Ct.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},Ct.oz=function(){return jv(this,this)};function jv(a,y){var x=y.containingGroup;return x!==null?1+jv(a,x):y instanceof Hn&&(y=y.labeledLink,y!==null)?jv(a,y):0}Ct.sz=function(){return zS(this,this)};function zS(a,y){var x=y.containingGroup;return x!==null||y instanceof Hn&&(x=y.labeledLink,x!==null)?zS(a,x):y}Ct.Td=function(a){return a instanceof ir?Wv(this,this,a):!1};function Wv(a,y,x){if(y===x||x===null)return!1;var E=y.containingGroup;return E===null||E!==x&&!Wv(a,E,x)?y instanceof Hn&&(y=y.labeledLink,y!==null)?Wv(a,y,x):!1:!0}Ct.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof ir&&Gm(y,!0),y instanceof Hn){var x=y.labeledLink;x!==null&&(y=x)}y=y.containingGroup}for(x=null,y=a;y!==null;){if(y.G&1048576){x=y;break}y instanceof Hn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof ir&&Gm(y,!1),y instanceof Hn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},Fi.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof Hn&&this.isLinkLabel)},Fi.prototype.C=function(a){if(a===void 0&&(a=16777215),this.isLayoutPositioned&&a&this.layoutConditions){var y=this.layer;y!==null&&y.isTemporary||this instanceof Hn&&this.isLinkLabel?y=!1:(y=this.diagram,y=!(y!==null&&y.undoManager.isUndoingRedoing))}else y=!1;if(y)if(y=this.Ah,y!==null){var x=y.layout;x!==null?x.C():y.C(a)}else a=this.diagram,a!==null&&(a=a.layout,a!==null&&a.C())};function jS(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function hd(a,y,x,E,b,z){if(z===void 0&&(z=null),!(a.contains(y)||z!==null&&!z(y)||y instanceof Zr)){if(a.add(y),y instanceof Hn){if(x&&y instanceof ir)for(var tt=y.memberParts;tt.next();)hd(a,tt.value,x,E,b,z);if(b!==!1)for(tt=y.linksConnected;tt.next();){var rt=tt.value;if(!a.contains(rt)){var ot=rt.fromNode,st=rt.toNode;ot=ot===null||a.contains(ot),st=st===null||a.contains(st),(b?ot&&st:ot||st)&&hd(a,rt,x,E,b,z)}}if(1<E)for(y=y.Ou();y.next();)hd(a,y.value,x,E-1,b,z)}else if(y instanceof Ln)for(y=y.labelNodes;y.next();)hd(a,y.value,x,E,b,z)}}Me.Object.defineProperties(Fi.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?Or:this.Qf.iteratorValues}},layer:{get:function(){return this.Ig}},diagram:{get:function(){var a=this.Ig;return a==null?null:a.diagram}},layerName:{get:function(){return this.Jg},set:function(a){var y=this.Jg;if(y!==a){var x=this.diagram;if((x===null||x.Qj(a)!==null&&!x.partManager.addsToTemporaryLayer)&&(this.Jg=a,x!==null&&x.Ya(),this.g("layerName",y,a),y=this.layer,y!==null&&y.name!==a&&(x=y.diagram,x!==null&&(a=x.Qj(a),a!==null&&a!==y)))){var E=y.pc(-1,this,!0);if(0<=E&&x.cb(ua,"parts",y,this,null,E,!0),E=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=E&&x.cb(Xo,"parts",a,null,this,!0,E),E=this.layerChanged,E!==null){var b=x.aa;x.aa=!0,E(this,y,a),x.aa=b}}}}},layerChanged:{get:function(){return this.P!==null?this.P.zq:null},set:function(a){var y=this.layerChanged;y!==a&&(zs(this),this.P.zq=a,this.g("layerChanged",y,a))}},zOrder:{get:function(){return this.Ao},set:function(a){var y=this.Ao;if(y!==a){this.Ao=a;var x=this.layer;x!==null&&df(x,-1,this),this.g("zOrder",y,a),a=this.diagram,a!==null&&a.N()}}},locationObject:{get:function(){if(this.nf===null){var a=this.locationObjectName;a!==""?(a=this.fb(a),a!==null?this.nf=a:this.nf=this):this instanceof Zr?this.type!==mn.Link&&this.placeholder!==null?this.nf=this.placeholder:this.nf=this:this.nf=this}return this.nf.visible?this.nf:this}},minLocation:{get:function(){return this.P!==null?this.P.Pq:Fn},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),zs(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:Xn},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),zs(this),this.P.Kq=a,this.g("maxLocation",y,a))}},locationObjectName:{get:function(){return this.P!==null?this.P.Gq:""},set:function(a){var y=this.locationObjectName;y!==a&&(zs(this),this.P.Gq=a,this.nf=null,this.v(),this.g("locationObjectName",y,a))}},locationSpot:{get:function(){return this.P!==null?this.P.Hq:Wi},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),zs(this),this.P.Hq=a,this.v(),this.g("locationSpot",y,a))}},location:{get:function(){return this.ke},set:function(a){var y=a.x,x=a.y,E=this.ke;if(!(E.x===y||isNaN(E.x)&&isNaN(y))||!(E.y===x||isNaN(E.y)&&isNaN(x))){if(a=a.copy(),y=a,this.ph())y=!1;else{if(this.ke=y,this.G|=2097152,Cs(this)===!1&&(Hm(this),x=this.pa,x.w())){var b=this.diagram;if(b===null||b.animationManager.isTicking||!b.undoManager.isUndoingRedoing){var z=x.copy();x.h(x.x+(y.x-E.x),x.y+(y.y-E.y)),DS(this,b,x,z.x,z.y),this.g("position",z,x.copy())}}y=!0}y&&this.g("location",E,a.copy())}}},category:{get:function(){return this.Tf},set:function(a){var y=this.Tf;if(y!==a){this.svg!==null&&(this.svg.remove(),this.Uc=!0);var x=this.diagram,E=this.data,b=null;if(x!==null&&E!==null&&!(this instanceof Zr)){var z=x.model.undoManager;z.isEnabled&&!z.isUndoingRedoing&&(b=this.clone(),b.O.addAll(this.O))}this.Tf=a,this.g("category",y,a),x===null||E===null||this instanceof Zr?this instanceof Zr&&(b=this.adornedPart,b!==null&&(a=b.Qf,a!==null&&a.remove(y),b.bh(this.category,this))):(z=x.model,z.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(E,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&(Rl(x),x=x.copy(),x!==null&&Iv(this,x,y,a))):(z!==null&&z.jm(E,a),x=d1(x.partManager,E,a),x!==null&&(Rl(x),x=x.copy(),x===null||x instanceof Ln||(E=this.location.copy(),Iv(this,x,y,a),this.location.w()||(this.location=E)))),b!==null&&(y=this.clone(),y.O.addAll(this.O),this.g("self",b,y))))}}},self:{get:function(){return this},set:function(a){Iv(this,a,this.category,a.category)}},copyable:{get:function(){return(this.G&1)!==0},set:function(a){var y=(this.G&1)!==0;y!==a&&(this.G^=1,this.g("copyable",y,a))}},deletable:{get:function(){return(this.G&2)!==0},set:function(a){var y=(this.G&2)!==0;y!==a&&(this.G^=2,this.g("deletable",y,a))}},textEditable:{get:function(){return(this.G&4)!==0},set:function(a){var y=(this.G&4)!==0;y!==a&&(this.G^=4,this.g("textEditable",y,a),this.Wb())}},groupable:{get:function(){return(this.G&8)!==0},set:function(a){var y=(this.G&8)!==0;y!==a&&(this.G^=8,this.g("groupable",y,a))}},movable:{get:function(){return(this.G&16)!==0},set:function(a){var y=(this.G&16)!==0;y!==a&&(this.G^=16,this.g("movable",y,a))}},selectionAdorned:{get:function(){return(this.G&32)!==0},set:function(a){var y=(this.G&32)!==0;y!==a&&(this.G^=32,this.g("selectionAdorned",y,a),this.Wb())}},isInDocumentBounds:{get:function(){return(this.G&64)!==0},set:function(a){var y=(this.G&64)!==0;if(y!==a){this.G^=64;var x=this.diagram;x!==null&&x.Ya(),this.g("isInDocumentBounds",y,a)}}},isLayoutPositioned:{get:function(){return(this.G&128)!==0},set:function(a){var y=(this.G&128)!==0;y!==a&&(this.G^=128,this.g("isLayoutPositioned",y,a),this.C(a?4:8))}},selectable:{get:function(){return(this.G&256)!==0},set:function(a){var y=(this.G&256)!==0;y!==a&&(this.G^=256,this.g("selectable",y,a),this.Wb())}},reshapable:{get:function(){return(this.G&512)!==0},set:function(a){var y=(this.G&512)!==0;y!==a&&(this.G^=512,this.g("reshapable",y,a),this.Wb())}},resizable:{get:function(){return(this.G&1024)!==0},set:function(a){var y=(this.G&1024)!==0;y!==a&&(this.G^=1024,this.g("resizable",y,a),this.Wb())}},rotatable:{get:function(){return(this.G&2048)!==0},set:function(a){var y=(this.G&2048)!==0;y!==a&&(this.G^=2048,this.g("rotatable",y,a),this.Wb())}},isSelected:{get:function(){return(this.G&4096)!==0},set:function(a){var y=(this.G&4096)!==0;if(y!==a){var x=this.diagram;if(!a||this.canSelect()&&!(x!==null&&x.selection.count>=x.maxSelectionCount)){this.G^=4096;var E=!1;if(x!==null){E=x.skipsUndoManager,x.skipsUndoManager=!0;var b=x.selection;b.ka(),a?b.add(this):b.remove(this),b.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=E)}}}},isHighlighted:{get:function(){return(this.G&524288)!==0},set:function(a){var y=(this.G&524288)!==0;if(y!==a){this.G^=524288;var x=this.diagram;x!==null&&(x=x.highlighteds,x.ka(),a?x.add(this):x.remove(this),x.freeze()),this.g("isHighlighted",y,a),this.N(),a=this.highlightedChanged,a!==null&&a(this)}}},isShadowed:{get:function(){return(this.G&8192)!==0},set:function(a){var y=(this.G&8192)!==0;y!==a&&(this.G^=8192,this.Uc=!0,this.g("isShadowed",y,a),this.N())}},isAnimated:{get:function(){return(this.G&262144)!==0},set:function(a){var y=(this.G&262144)!==0;y!==a&&(this.G^=262144,this.g("isAnimated",y,a))}},highlightedChanged:{get:function(){return this.P!==null?this.P.oq:null},set:function(a){var y=this.highlightedChanged;y!==a&&(zs(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&&(zs(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&&(zs(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 Ln?(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&&(zs(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&&(zs(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&&(zs(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:xn},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),zs(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&&(zs(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&&(zs(this),this.P.jr=a,this.g("rotateObjectName",y,a))}},rotateObject:{get:function(){var a=this.rotateObjectName;return a!==""&&(a=this.fb(a),a!==null)?a:this}},rotationSpot:{get:function(){return this.P!==null?this.P.lr:xo},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),zs(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&&$t("Cannot make a Group a member of itself: "+this.toString()),$t("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?Kv(y,this):this instanceof ir&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Vv(a,this):this instanceof ir&&x!==null&&x.ai.add(this),this.C(1),x!==null&&x.aa){var E=this.data,b=x.model;if(E!==null&&b.Xj()){var z=b.wa(a!==null?a.data:null);b.mp(E,z)}}if(E=this.containingGroupChanged,E!==null&&(b=!0,x!==null&&(b=x.aa,x.aa=!0),E(this,y,a),x!==null&&(x.aa=b)),this instanceof ir){for(x=new cn,hd(x,this,!0,0,!0),x=x.iterator;x.next();)if(E=x.value,E instanceof Hn)for(E=E.linksConnected;E.next();)zf(E.value)}if(this instanceof Hn){for(x=this.linksConnected;x.next();)zf(x.value);x=this.labeledLink,x!==null&&zf(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&df(y,-1,a))}}else $t("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&&(zs(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof Hn&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(zs(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&&(zs(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:si},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),zs(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&&(zs(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&&(zs(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),Fi.prototype.invalidateLayout=Fi.prototype.C,Fi.prototype.findCommonContainingGroup=Fi.prototype.px,Fi.prototype.isMemberOf=Fi.prototype.Td,Fi.prototype.findTopLevelPart=Fi.prototype.sz,Fi.prototype.findSubGraphLevel=Fi.prototype.oz,Fi.prototype.ensureBounds=Fi.prototype.Va,Fi.prototype.getDocumentBounds=Fi.prototype.mi,Fi.prototype.findObject=Fi.prototype.fb,Fi.prototype.moveTo=Fi.prototype.moveTo,Fi.prototype.invalidateAdornments=Fi.prototype.Wb,Fi.prototype.clearAdornments=Fi.prototype.Ej,Fi.prototype.removeAdornment=Fi.prototype.Jf,Fi.prototype.addAdornment=Fi.prototype.bh,Fi.prototype.findAdornment=Fi.prototype.Pj,Fi.prototype.updateTargetBindings=Fi.prototype.La;var WS=!1;Fi.className="Part",Fi.LayoutNone=0,Fi.LayoutAdded=1,Fi.LayoutRemoved=2,Fi.LayoutShown=4,Fi.LayoutHidden=8,Fi.LayoutNodeSized=16,Fi.LayoutGroupLayout=32,Fi.LayoutNodeReplaced=64,Fi.LayoutStandard=127,Fi.LayoutAll=16777215;function Zr(a,y){a===void 0||a instanceof Fa||typeof a=="string"?Fi.call(this,a):(Fi.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)}Oe(Zr,Fi),Zr.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},Zr.prototype.updateRelationshipsFromData=function(){},Zr.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Ln&&y instanceof dr){y=x.path,x.Ul(a),a=y.geometry,x=this.O.s,y=x.length;for(var E=0;E<y;E++){var b=x[E];b.isPanelMain&&b instanceof dr&&(b.ua=a)}}},Zr.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!Cs(a))},Zr.prototype.Zc=function(){return!1},Zr.prototype.gk=function(a,y,x,E,b,z,tt){if(a===Xo&&y==="elements"){if(b instanceof ks)this.$a===null&&(this.$a=b);else if(b instanceof mn){var rt=b.Nl(function(ot){return ot instanceof ks});rt instanceof ks&&this.$a===null&&(this.$a=rt)}}else a===ua&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof mn&&this.$a.rg(E)&&(this.$a=null));Fi.prototype.gk.call(this,a,y,x,E,b,z,tt)},Zr.prototype.updateAdornments=function(){},Zr.prototype.Lj=function(){},Me.Object.defineProperties(Zr.prototype,{placeholder:{get:function(){return this.$a}},adornedObject:{get:function(){return this.ue},set:function(a){var y=this.adornedPart,x=null;a!==null&&(x=a.part),y===null||a!==null&&y===x||y.Jf(this.category),this.ue=a,x!==null&&x.bh(this.category,this)}},adornedPart:{get:function(){var a=this.ue;return a!==null?a.part:null}},containingGroup:{get:function(){return null}}}),Zr.className="Adornment";function Hv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=Mi,this.er=Km,this.Kr=this.ij=this.Nq=this.Mq=null}Hv.prototype.copy=function(){var a=new Hv;return a.Dq=this.Dq,a.Eq=this.Eq,a.gj=this.gj,a.Vr=this.Vr,a.yp=this.yp.J(),a.er=this.er,a.Mq=this.Mq,a.Nq=this.Nq,a.ij=this.ij,a.Kr=this.Kr,a};function Hn(a,y){a===void 0||a instanceof Fa||typeof a=="string"?Fi.call(this,a):(Fi.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new dn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Oe(Hn,Fi),Hn.prototype.cloneProtected=function(a){Fi.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},Ct=Hn.prototype,Ct.Af=function(a){Fi.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function bh(a){a.Ba===null?a.Ba=new Hv:a.Ba.nc&&(a.Ba=a.Ba.copy())}Ct.th=function(){Fi.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function HS(a,y){y!==null&&(a.af===null&&(a.af=new cn),a.af.add(y))}function GS(a,y,x,E){if(y===null||a.af===null)return null;for(var b=a.af.iterator;b.next();){var z=b.value;if(z.Ds===a&&z.cv===y&&z.Ox===x&&z.Px===E||z.Ds===y&&z.cv===a&&z.Ox===E&&z.Px===x)return z}return null}Ct.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=GS(this,a,y,x),a!==null&&a.Sl()},Ct.gk=function(a,y,x,E,b,z,tt){a===Xo&&y==="elements"?this.wc=null:a===ua&&y==="elements"&&(this.wc=null),Fi.prototype.gk.call(this,a,y,x,E,b,z,tt)},Ct.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||($s(x.fromPort),$s(x.toPort),x.bb())}};function ZS(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&($s(x.fromPort),$s(x.toPort),x.bb())}}function $s(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||$s(y.port)}}Ct.si=function(){return!0},Hn.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},Hn.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},Hn.prototype.isVisible=function(){if(!Fi.prototype.isVisible.call(this))return!1;var a=!0,y=Lh,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===Lh){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===ka){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(E){return!E.isTreeExpanded}))return!1}else if(y===Cf&&(a=a?this.Oo():this.Po(),0<a.count&&a.any(function(E){return!E.isTreeExpanded})))return!1;return a=this.labeledLink,a!==null?a.isVisible():!0},Hn.prototype.Zb=function(a){Fi.prototype.Zb.call(this,a);for(var y=this.linksConnected;y.next();){var x=y.value;if(a&&this.containingGroup!==null){var E=x.To(this);E===null||E.Td(this.containingGroup)||x.bb()}x.Zb(a)}},Hn.prototype.qx=function(){var a=new cn,y=new cn;return VS(this,this,a,y),y.iterator};function VS(a,y,x,E){if(y!==null&&!x.has(y)){x.add(y);var b=!0,z=a.diagram;z!==null&&(b=z.isTreePathToChildren),y.linksConnected.each(function(tt){tt.isTreeLink?(b?tt.fromNode===y:tt.toNode===y)&&VS(a,b?tt.toNode:tt.fromNode,x,E):E.add(tt)})}}Hn.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new Nr(this.jb),x=this;return y.predicate=function(E){return E.fromNode===x&&E.fromPortId===a||E.toNode===x&&E.toPortId===a},y},Ct=Hn.prototype,Ct.Mo=function(a){a===void 0&&(a=null);var y=new Nr(this.jb),x=this;return y.predicate=function(E){return E.fromNode!==x?!1:a===null?!0:E.fromPortId===a},y},Ct.Sd=function(a){a===void 0&&(a=null);var y=new Nr(this.jb),x=this;return y.predicate=function(E){return E.toNode!==x?!1:a===null?!0:E.toPortId===a},y},Ct.Mu=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.fromNode===this?(a===null||b.fromPortId===a)&&(b=b.toNode,y!==null?y.add(b):x!==null&&x!==b?(y=new cn,y.add(x),y.add(b)):x=b):b.toNode!==this||a!==null&&b.toPortId!==a||(b=b.fromNode,y!==null?y.add(b):x!==null&&x!==b?(y=new cn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Lr(x):Or},Ct.Po=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.fromNode!==this||a!==null&&b.fromPortId!==a||(b=b.toNode,y!==null?y.add(b):x!==null&&x!==b?(y=new cn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Lr(x):Or},Ct.Oo=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.toNode!==this||a!==null&&b.toPortId!==a||(b=b.fromNode,y!==null?y.add(b):x!==null&&x!==b?(y=new cn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Lr(x):Or},Ct.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new Nr(this.jb),b=this;return E.predicate=function(z){return!((z.fromNode!==b||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)&&(z.fromNode!==a||z.toNode!==b||x!==null&&z.fromPortId!==x||y!==null&&z.toPortId!==y))},E},Ct.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new Nr(this.jb),b=this;return E.predicate=function(z){return!(z.fromNode!==b||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)},E};function Zm(a,y,x){$s(x);var E=a.jb.contains(y);if(E||a.jb.add(y),!E||y.fromNode===y.toNode){var b=a.linkConnected;if(b!==null){var z=!0,tt=a.diagram;tt!==null&&(z=tt.aa,tt.aa=!0),b(a,y,x),tt!==null&&(tt.aa=z)}}!E&&y.isTreeLink&&(x=y.fromNode,y=y.toNode,x!==null&&y!==null&&x!==y&&(E=!0,a=a.diagram,a!==null&&(E=a.isTreePathToChildren),b=E?y:x,z=E?x:y,b.ci||(b.ci=z),!z.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(E?x===z&&(z.isTreeLeaf=!1):y===z&&(z.isTreeLeaf=!1))))}function Vm(a,y,x){$s(x);var E=a.jb.remove(y),b=null;if(E||y.toNode===y.fromNode){var z=a.linkDisconnected;if(b=a.diagram,z!==null){var tt=!0;b!==null&&(tt=b.aa,b.aa=!0),z(a,y,x),b!==null&&(b.aa=tt)}}E&&y.isTreeLink&&(x=!0,b!==null&&(x=b.isTreePathToChildren),a=x?y.toNode:y.fromNode,y=x?y.fromNode:y.toNode,a!==null&&(a.ci=!1),y===null||y.isTreeLeaf||(y.jb.count===0?(y.ci=null,b!==null&&b.undoManager.isUndoingRedoing||(y.isTreeLeaf=!0)):ep(y)))}function ep(a){if(a.ci=!1,a.jb.count!==0){var y=!0,x=a.diagram;if(x===null||!x.undoManager.isUndoingRedoing){for(x!==null&&(y=x.isTreePathToChildren),x=a.jb.iterator;x.next();){var E=x.value;if(E.isTreeLink){if(y){if(E.fromNode===a){a.isTreeLeaf=!1;return}}else if(E.toNode===a){a.isTreeLeaf=!1;return}}}a.isTreeLeaf=!0}}}Hn.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},Ct=Hn.prototype,Ct.Vo=function(a){Fi.prototype.Vo.call(this,a),a||(ep(this),a=this.Yk,a!==null&&$S(a,this))},Ct.Wo=function(a){Fi.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},Ct.Lj=function(){if(0<this.jb.count){var a=this.diagram;if(a!==null)for(var y=a.commandHandler!==null?a.commandHandler.deletesConnectedLinks:!0,x=this.jb.copy().iterator;x.next();){var E=x.value;y?a.remove(E):(E.fromNode===this&&(E.fromNode=null),E.toNode===this&&(E.toNode=null))}}this.labeledLink=null,Fi.prototype.Lj.call(this)},Ct.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;KS(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function KS(a){a.wc===null?a.wc=new be:a.wc.clear(),a.qm(a,function(y,x){YS(y,x)}),a.wc.count===0&&a.wc.add("",a)}function YS(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function Gv(a,y,x){var E=y.portId;if(E!==null&&(a.wc!==null&&a.wc.remove(E),y=a.diagram,y!==null&&x)){for(x=null,a=a.findLinksConnected(E);a.next();)E=a.value,x===null&&(x=Ei()),x.push(E);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);ri(x)}}}Ct.Nz=function(a){if(a===null||a===this)return!1;var y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this,y)for(;x!==a;){y=null;for(var E=x.jb.iterator;E.next();){var b=E.value;if(b.isTreeLink&&(y=b.fromNode,y!==x&&y!==this))break}if(y===this||y===null||y===x)return!1;x=y}else for(;x!==a;){for(y=null,E=x.jb.iterator;E.next()&&(b=E.value,!b.isTreeLink||(y=b.toNode,y===x||y===this)););if(y===this||y===null||y===x)return!1;x=y}return!0},Ct.xz=function(){var a=!0,y=this.diagram;if(y!==null&&(a=y.isTreePathToChildren),y=this,a)for(;;){a=null;for(var x=y.jb.iterator;x.next();){var E=x.value;if(E.isTreeLink&&(a=E.fromNode,a!==y&&a!==this))break}if(a===this)return this;if(a===null||a===y)return y;y=a}else for(;;){for(a=null,x=y.jb.iterator;x.next()&&(E=x.value,!E.isTreeLink||(a=E.toNode,a===y||a===this)););if(a===this)return this;if(a===null||a===y)return y;y=a}},Ct.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)Gm(y,!0),y=y.pg();var x=null;for(y=a;y!==null;){if(y.G&1048576){x=y;break}y=y.pg()}for(y=this;y!==null;)Gm(y,!1),y=y.pg();return x},Ct.kh=function(){var a=!0,y=this.diagram;if(y!==null&&(a=y.isTreePathToChildren),y=this.jb.iterator,a){for(;y.next();)if(a=y.value,a.isTreeLink&&a.fromNode!==this)return a}else for(;y.next();)if(a=y.value,a.isTreeLink&&a.toNode!==this)return a;return null},Ct.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof Hn)return a;a=this.diagram,a=a!==null?a.isTreePathToChildren:!0;for(var y=this.jb.iterator;y.next();){var x=y.value;if(x.isTreeLink&&(x=a?x.fromNode:x.toNode,x!==this))return this.ci=x}return this.ci=null},Ct.vz=function(){function a(x,E){E.add(x);var b=x.kh();b!==null&&(E.add(b),x=x.pg(),x!==null&&a(x,E))}var y=new cn;return a(this,y),y},Ct.uz=function(){return US(this,this)};function US(a,y){return y=y.pg(),y===null?0:1+US(a,y)}Ct.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new Nr(this.jb);var x=this;return y.predicate=a?function(E){return!!(E.isTreeLink&&E.fromNode===x)}:function(E){return!!(E.isTreeLink&&E.toNode===x)},y},Ct.Ou=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren);var x=y=null,E=this.jb.iterator;if(a)for(;E.next();)a=E.value,a.isTreeLink&&a.fromNode===this&&(a=a.toNode,y!==null?y.add(a):x!==null&&x!==a?(y=new dn,y.add(x),y.add(a)):x=a);else for(;E.next();)a=E.value,a.isTreeLink&&a.toNode===this&&(a=a.fromNode,y!==null?y.add(a):x!==null&&x!==a?(y=new dn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new Lr(x):Or},Ct.wz=function(a){a===void 0&&(a=1/0);var y=new cn;return hd(y,this,!1,a,!0),y},Hn.prototype.collapseTree=function(a){a===void 0&&(a=1),1>a&&(a=1);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new cn;x.add(this),XS(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Lh),y.Ue=!1}};function XS(a,y,x,E,b,z,tt){if(1<E)for(var rt=x?a.Mo():a.Sd();rt.next();){var ot=rt.value;ot.isTreeLink&&(ot=ot.To(a),ot===null||ot===a||y.contains(ot)||(y.add(ot),XS(ot,y,x,E-1,b,z,tt)))}else JS(a,y,x,b,z,tt)}function JS(a,y,x,E,b,z){for(var tt=b===a?!0:a.isTreeExpanded,rt=x?a.Mo():a.Sd(),ot={};rt.next();){var st=rt.value;if(st.isTreeLink&&(st=st.To(a),st!==null&&st!==a)){var ut=y.contains(st);if(ut||y.add(st),tt){var ft=x?st.Oo():st.Po();ot.uv=a,ft.all(function(vt){return function(yt){return yt===vt.uv||!yt.isTreeExpanded}}(ot))&&E.Aj(st,b),st.oh(),st.Zb(!1)}st.isTreeExpanded&&(st.wasTreeExpanded=st.isTreeExpanded,ut||JS(st,y,x,E,b,z))}ot={uv:ot.uv}}a.isTreeExpanded=!1}Hn.prototype.expandTree=function(a){a===void 0&&(a=2),2>a&&(a=2);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new cn;x.add(this),QS(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Lh),y.Ue=!1}};function QS(a,y,x,E,b,z,tt){for(var rt=z===a?!1:a.isTreeExpanded,ot=x?a.Mo():a.Sd(),st={};ot.next();){var ut=ot.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(yt){return yt===vt.vv||!yt.isTreeExpanded}}(st))&&b.Cj(ut,z)}(2<E||ut.wasTreeExpanded)&&(ut.wasTreeExpanded=!1,QS(ut,y,x,E-1,b,z,tt))}st={vv:st.vv}}a.isTreeExpanded=!0}Me.Object.defineProperties(Hn.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:Km},set:function(a){var y=this.portSpreading;y!==a&&(bh(this),this.Ba.er=a,this.g("portSpreading",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.Bd())}},avoidable:{get:function(){return(this.U&8)!==0},set:function(a){var y=(this.U&8)!==0;if(y!==a){this.U^=8;var x=this.diagram;x!==null&&wh(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:Mi},set:function(a){typeof a=="number"&&(a=new ii(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),bh(this),this.Ba.yp=a;var x=this.diagram;x!==null&&wh(x,this),this.g("avoidableMargin",y,a)}}},linksConnected:{get:function(){return this.jb.iterator}},linkConnected:{get:function(){return this.Ba!==null?this.Ba.Dq:null},set:function(a){var y=this.linkConnected;y!==a&&(bh(this),this.Ba.Dq=a,this.g("linkConnected",y,a))}},linkDisconnected:{get:function(){return this.Ba!==null?this.Ba.Eq:null},set:function(a){var y=this.linkDisconnected;y!==a&&(bh(this),this.Ba.Eq=a,this.g("linkDisconnected",y,a))}},linkValidation:{get:function(){return this.Ba!==null?this.Ba.gj:null},set:function(a){var y=this.linkValidation;y!==a&&(bh(this),this.Ba.gj=a,this.g("linkValidation",y,a))}},isLinkLabel:{get:function(){return this.Yk!==null}},labeledLink:{get:function(){return this.Yk},set:function(a){var y=this.Yk;if(y!==a){var x=this.diagram,E=this.data;if(y!==null){if(y.wd!==null&&(y.wd.remove(this),y.v()),x!==null&&E!==null&&!x.undoManager.isUndoingRedoing){var b=y.data,z=x.model;if(b!==null&&z.ri()){var tt=z.wa(E);tt!==void 0&&z.Qx(b,tt)}}this.containingGroup=null}this.Yk=a,a!==null&&($S(a,this),x===null||E===null||x.undoManager.isUndoingRedoing||(b=a.data,x=x.model,b!==null&&x.ri()&&(E=x.wa(E),E!==void 0&&x.Bu(b,E))),this.containingGroup=a.containingGroup),ws(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&KS(this),this.wc.iteratorValues}},isTreeExpanded:{get:function(){return(this.U&1)!==0},set:function(a){var y=(this.U&1)!==0;if(y!==a){this.U^=1;var x=this.diagram;if(this.g("isTreeExpanded",y,a),y=this.treeExpandedChanged,y!==null){var E=!0;x!==null&&(E=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=E)}x!==null&&x.undoManager.isUndoingRedoing?this.Zb(a):a?this.expandTree():this.collapseTree()}}},wasTreeExpanded:{get:function(){return(this.U&2)!==0},set:function(a){var y=(this.U&2)!==0;y!==a&&(this.U^=2,this.g("wasTreeExpanded",y,a))}},treeExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Vr:null},set:function(a){var y=this.treeExpandedChanged;y!==a&&(bh(this),this.Ba.Vr=a,this.g("treeExpandedChanged",y,a))}},isTreeLeaf:{get:function(){return(this.U&4)!==0},set:function(a){var y=(this.U&4)!==0;y!==a&&(this.U^=4,this.g("isTreeLeaf",y,a))}}}),Hn.prototype.expandTree=Hn.prototype.expandTree,Hn.prototype.collapseTree=Hn.prototype.collapseTree,Hn.prototype.findTreeParts=Hn.prototype.wz,Hn.prototype.findTreeChildrenNodes=Hn.prototype.Ou,Hn.prototype.findTreeChildrenLinks=Hn.prototype.Qo,Hn.prototype.findTreeLevel=Hn.prototype.uz,Hn.prototype.findTreeParentChain=Hn.prototype.vz,Hn.prototype.findTreeParentNode=Hn.prototype.pg,Hn.prototype.findTreeParentLink=Hn.prototype.kh,Hn.prototype.findCommonTreeParent=Hn.prototype.gz,Hn.prototype.findTreeRoot=Hn.prototype.xz,Hn.prototype.isInTreeOf=Hn.prototype.Nz,Hn.prototype.findPort=Hn.prototype.ns,Hn.prototype.findLinksTo=Hn.prototype.kz,Hn.prototype.findLinksBetween=Hn.prototype.jz,Hn.prototype.findNodesInto=Hn.prototype.Oo,Hn.prototype.findNodesOutOf=Hn.prototype.Po,Hn.prototype.findNodesConnected=Hn.prototype.Mu,Hn.prototype.findLinksInto=Hn.prototype.Sd,Hn.prototype.findLinksOutOf=Hn.prototype.Mo,Hn.prototype.findExternalTreeLinksConnected=Hn.prototype.qx,Hn.prototype.invalidateConnectedLinks=Hn.prototype.Bd,Hn.prototype.invalidateLinkBundle=Hn.prototype.Lz;var Lx=new Ve(Hn,"SpreadingNone",10),Km=new Ve(Hn,"SpreadingEvenly",11),Zv=new Ve(Hn,"SpreadingPacked",12);Hn.className="Node",Hn.SpreadingNone=Lx,Hn.SpreadingEvenly=Km,Hn.SpreadingPacked=Zv;function ir(a,y){a===void 0||a instanceof Fa||typeof a=="string"?Hn.call(this,a):(Hn.call(this),a&&(y=a)),this.U|=4608,this.Gn=new cn,this.$a=null,this.Sc=new _o,this.Sc.group=this,this.gl=new cn,this.tb=this.$p=null,y&&Object.assign(this,y)}Oe(ir,Hn),ir.prototype.cloneProtected=function(a){Hn.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof ks});y instanceof ks?a.$a=y:a.$a=null,this.Sc!==null?(a.Sc=this.Sc.copy(),a.Sc.group=a):(a.Sc!==null&&(a.Sc.group=null),a.Sc=null),this.tb!==null&&(a.tb=this.tb.copy())},Ct=ir.prototype,Ct.Af=function(a){Hn.prototype.Af.call(this,a);var y=a.Rj();for(a=a.memberParts;a.next();){var x=a.value;if(x.v(),x.C(8),x.Ej(),x instanceof Hn)x.Bd(y);else if(x instanceof Ln)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},Ct.gk=function(a,y,x,E,b,z,tt){if(a===Xo&&y==="elements"){if(b instanceof ks)this.$a===null?this.$a=b:this.$a!==b&&$t("Cannot insert a second Placeholder into the visual tree of a Group.");else if(b instanceof mn){var rt=b.Nl(function(ot){return ot instanceof ks});rt instanceof ks&&(this.$a===null?this.$a=rt:this.$a!==rt&&$t("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===ua&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof mn&&this.$a.rg(E)&&(this.$a=null));Hn.prototype.gk.call(this,a,y,x,E,b,z,tt)},Ct.Xl=function(a,y){Hn.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==mn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof mn&&(a=a.Pb()),this.tb===null&&(this.tb=new ae),a.mi(this.tb),a instanceof dr&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},Ct.eh=function(a,y,x,E){this.nf=this.$a,Hn.prototype.eh.call(this,a,y,x,E)},Ct.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Ln||y.Va()}),Hn.prototype.Va.call(this)},Ct.si=function(){if(!Hn.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof Hn){if(y.isVisible()&&Cs(y))return!1}else if(y instanceof Ln&&y.isVisible()&&Cs(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function Vv(a,y){if(a.Gn.add(y)){y instanceof ir&&a.gl.add(y);var x=a.memberAdded;if(x!==null){var E=!0,b=a.diagram;b!==null&&(E=b.aa,b.aa=!0),x(a,y),b!==null&&(b.aa=E)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!1)}y instanceof Ln&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function Kv(a,y){if(a.Gn.remove(y)){y instanceof ir&&a.gl.remove(y);var x=a.memberRemoved;if(x!==null){var E=!0,b=a.diagram;b!==null&&(E=b.aa,b.aa=!0),x(a,y),b!==null&&(b.aa=E)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!0)}y instanceof Ln&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}Ct.Lj=function(){if(0<this.Gn.count){var a=this.diagram;if(a!==null)for(var y=this.Gn.copy().iterator;y.next();)a.remove(y.value)}Hn.prototype.Lj.call(this)},ir.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=Ie(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},ir.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var E=!0;for(a=Ie(a).iterator;a.next();){var b=a.value;!y||x.isValidMember(this,b)?b.containingGroup=this:E=!1}return E},ir.prototype.canUngroup=function(){if(!this.ungroupable)return!1;var a=this.layer;return a===null||!a.allowUngroup?!1:(a=a.diagram,!!(a===null||a.allowUngroup))},Ct=ir.prototype,Ct.Bd=function(a){var y=(this.U&65536)!==0;if(Hn.prototype.Bd.call(this,a),!y)for(!(this.U&65536)&&(this.U=this.U^65536),y=this.Lu();y.next();){var x=y.value;if(a===void 0||!a.contains(x)){var E=x.fromNode;E!==null&&E!==this&&E.Td(this)&&!E.isVisible()?($s(x.fromPort),$s(x.toPort),x.bb()):(E=x.toNode,E!==null&&E!==this&&E.Td(this)&&!E.isVisible()&&($s(x.fromPort),$s(x.toPort),x.bb()))}}},Ct.Lu=function(){var a=this.diagram!==null&&this.diagram.Pw;if(a&&this.$p!==null)return this.$p.iterator;var y=this.Rj();y.add(this);for(var x=new cn,E=y.iterator;E.next();){var b=E.value;if(b instanceof Hn)for(b=b.linksConnected;b.next();){var z=b.value;y.contains(z)||x.add(z)}}return a&&(this.$p=x),x.iterator},Ct.iz=function(){var a=this.Rj();a.add(this);for(var y=new cn,x=a.iterator;x.next();){var E=x.value;if(E instanceof Hn)for(E=E.linksConnected;E.next();){var b=E.value,z=b.fromNode;z===null||a.contains(z)&&z!==this||y.add(z),b=b.toNode,b===null||a.contains(b)&&b!==this||y.add(b)}}return y.iterator},Ct.hz=function(){function a(x,E){x!==null&&(E.add(x),a(x.containingGroup,E))}var y=new cn;return a(this,y),y},Ct.Rj=function(){var a=new cn;return hd(a,this,!0,0,!0),a.remove(this),a},Ct.Zb=function(a){Hn.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},ir.prototype.collapseSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();_S(this,y,a,this),a.Ue=!1}};function _S(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!1),z instanceof ir&&z.isSubGraphExpanded&&(z.wasSubGraphExpanded=z.isSubGraphExpanded,_S(z,y,x,E)),z instanceof Hn)z.Bd(y),x.Aj(z,E);else if(z instanceof Ln)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}ir.prototype.expandSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();qS(this,y,a,this),a.Ue=!1}};function qS(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!0),z instanceof ir&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,qS(z,y,x,E)),z instanceof Hn)z.Bd(y),x.Cj(z,E);else if(z instanceof Ln)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}ir.prototype.move=function(a,y){y===void 0&&(y=!1);var x=y?this.location:this.position,E=x.x;x=x.y;var b=a.x,z=a.y;if(!(E===b||isNaN(E)&&isNaN(b))||!(x===z||isNaN(x)&&isNaN(z))){for(E=b-(isNaN(E)?0:E),x=z-(isNaN(x)?0:x),z=Tt.alloc(),Hn.prototype.move.call(this,a,y),a=new cn,y=this.Rj().iterator;y.next();)b=y.value,b instanceof Ln&&(b.suspendsRouting&&a.add(b),b.fd||b.fromNode!==this&&b.toNode!==this)&&(b.suspendsRouting=!0);for(y.reset();y.next();)if(b=y.value,!(b.ph()||b instanceof Hn&&b.isLinkLabel)){var tt=b.position,rt=b.location;tt.w()?(z.x=tt.x+E,z.y=tt.y+x,b.position=z):rt.w()&&(z.x=rt.x+E,z.y=rt.y+x,b.location=z)}for(y.reset();y.next();)b=y.value,b instanceof Ln&&(b.suspendsRouting=a.contains(b),b.fd||b.fromNode!==this&&b.toNode!==this)&&(tt=b.position,z.x=tt.x+E,z.y=tt.y+x,z.w()?b.move(z):b.bb(),Uv(b)&&b.bb());Tt.free(z)}},Me.Object.defineProperties(ir.prototype,{placeholder:{get:function(){return this.$a}},computesBoundsAfterDrag:{get:function(){return(this.U&2048)!==0},set:function(a){var y=(this.U&2048)!==0;y!==a&&(this.U^=2048,this.g("computesBoundsAfterDrag",y,a))}},computesBoundsIncludingLinks:{get:function(){return(this.U&4096)!==0},set:function(a){var y=(this.U&4096)!==0;y!==a&&(this.U^=4096,this.g("computesBoundsIncludingLinks",y,a))}},computesBoundsIncludingLocation:{get:function(){return(this.U&8192)!==0},set:function(a){var y=(this.U&8192)!==0;y!==a&&(this.U^=8192,this.g("computesBoundsIncludingLocation",y,a))}},handlesDragDropForMembers:{get:function(){return(this.U&16384)!==0},set:function(a){var y=(this.U&16384)!==0;y!==a&&(this.U^=16384,this.g("handlesDragDropForMembers",y,a))}},memberParts:{get:function(){return this.Gn.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;if(y!==a){a!==null&&a.diagram!==null&&a.diagram.layout===a&&$t("A layout cannot be both the Diagram.layout and a Group.layout: "+a),y!==null&&(y.diagram=null,y.group=null),this.Sc=a;var x=this.diagram;a!==null&&(a.diagram=x,a.group=this),x!==null&&(x.xh=!0),this.g("layout",y,a),x!==null&&x.$b()}}},memberAdded:{get:function(){return this.Ba!==null?this.Ba.Mq:null},set:function(a){var y=this.memberAdded;y!==a&&(bh(this),this.Ba.Mq=a,this.g("memberAdded",y,a))}},memberRemoved:{get:function(){return this.Ba!==null?this.Ba.Nq:null},set:function(a){var y=this.memberRemoved;y!==a&&(bh(this),this.Ba.Nq=a,this.g("memberRemoved",y,a))}},memberValidation:{get:function(){return this.Ba!==null?this.Ba.ij:null},set:function(a){var y=this.memberValidation;y!==a&&(bh(this),this.Ba.ij=a,this.g("memberValidation",y,a))}},ungroupable:{get:function(){return(this.U&256)!==0},set:function(a){var y=(this.U&256)!==0;y!==a&&(this.U^=256,this.g("ungroupable",y,a))}},isSubGraphExpanded:{get:function(){return(this.U&512)!==0},set:function(a){var y=(this.U&512)!==0;if(y!==a){this.U^=512;var x=this.diagram;if(this.g("isSubGraphExpanded",y,a),y=this.subGraphExpandedChanged,y!==null){var E=!0;x!==null&&(E=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=E)}x!==null&&x.undoManager.isUndoingRedoing?(this.$a!==null&&this.$a.v(),this.memberParts.each(function(b){b.updateAdornments()})):a?this.expandSubGraph():this.collapseSubGraph()}}},wasSubGraphExpanded:{get:function(){return(this.U&1024)!==0},set:function(a){var y=(this.U&1024)!==0;y!==a&&(this.U^=1024,this.g("wasSubGraphExpanded",y,a))}},subGraphExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Kr:null},set:function(a){var y=this.subGraphExpandedChanged;y!==a&&(bh(this),this.Ba.Kr=a,this.g("subGraphExpandedChanged",y,a))}},rh:{get:function(){return(this.U&32768)!==0},set:function(a){(this.U&32768)!==0!==a&&(this.U^=32768)}}}),ir.prototype.expandSubGraph=ir.prototype.expandSubGraph,ir.prototype.collapseSubGraph=ir.prototype.collapseSubGraph,ir.prototype.findSubGraphParts=ir.prototype.Rj,ir.prototype.findContainingGroupChain=ir.prototype.hz,ir.prototype.findExternalNodesConnected=ir.prototype.iz,ir.prototype.findExternalLinksConnected=ir.prototype.Lu,ir.prototype.ensureBounds=ir.prototype.Va,ir.className="Group";function ks(a){de.call(this),this.yb=ur,this.ko=new ae(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Oe(ks,de),ks.prototype.cloneProtected=function(a){de.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},ks.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return ci(0,0,y.width,y.height,a.x,a.y)},ks.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof ir||a instanceof Zr)||$t("Placeholder is not inside a Group or Adornment."),a instanceof ir){var y=this.computeBorder(this.ko),x=this.minSize,E=this.dc;for(En(E,(isFinite(x.width)?Math.max(x.width,y.width):y.width)||0,(isFinite(x.height)?Math.max(x.height,y.height):y.height)||0),this.Ge(0,0,E.width,E.height),E=a.memberParts,x=!1;E.next();)if(E.value.isVisible()){x=!0;break}E=a.diagram,!x||E===null||E.animationManager.Xu(a)||isNaN(y.x)||isNaN(y.y)||(x=Tt.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),Tt.free(x))}else{y=this.dc,x=this.yb,E=x.left+x.right;var b=x.top+x.bottom,z=a.adornedObject;a.angle=z.li();var tt=0;z instanceof dr&&(tt=z.strokeWidth);var rt=z.Df(),ot=z.naturalBounds,st=(ot.width+tt)*rt;tt=(ot.height+tt)*rt,a.type!==mn.Link&&(rt=z.ga(a.category==="Selection"?Wi:a.locationSpot,Tt.alloc()),a.location=rt,Tt.free(rt)),isNaN(st)||isNaN(tt)?(a=z.ga(Wi,Tt.alloc()),st=ae.allocAt(a.x,a.y,0,0),st.Ye(z.ga(hr,a)),st.Ye(z.ga(fr,a)),st.Ye(z.ga(Tr,a)),En(y,st.width+E||0,st.height+b||0),this.Ge(-x.left,-x.top,y.width,y.height),Tt.free(a),ae.free(st)):(En(y,st+E||0,tt+b||0),this.Ge(-x.left,-x.top,y.width,y.height))}},ks.prototype.eh=function(a,y,x,E){this.actualBounds.h(a,y,x,E)},ks.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,E=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof ir&&!y.layer.isTemporary&&y.computesBoundsAfterDrag&&this.ko.w()){var b=x.toolManager.findTool("Dragging");if(b===x.currentTool&&(x=b.computeBorder(y,this.ko,a),x!==null))return x}x=ae.alloc(),b=this.computeMemberBounds(x);var z=this.yb;return y instanceof ir&&!y.isSubGraphExpanded?a.h(b.x-z.left,b.y-z.top,0,0):a.h(b.x-z.left,b.y-z.top,Math.max(b.width+z.left+z.right,0),Math.max(b.height+z.top+z.bottom,0)),ae.free(x),E&&y instanceof ir&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},ks.prototype.computeMemberBounds=function(a){if(!(this.part instanceof ir))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,E=1/0,b=-1/0,z=-1/0,tt=y.memberParts;tt.next();){var rt=tt.value;if(rt.isVisible()){if(rt instanceof Ln&&(!y.computesBoundsIncludingLinks||ll(rt)||rt.fromNode===y||rt.toNode===y))continue;rt=rt.actualBounds,rt.left<x&&(x=rt.left),rt.top<E&&(E=rt.top),rt.right>b&&(b=rt.right),rt.bottom>z&&(z=rt.bottom)}}return isFinite(x)&&isFinite(E)?a.h(x,E,b-x,z-E):(y=y.location,a.h(y.x,y.y,0,0)),a},Me.Object.defineProperties(ks.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new ii(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),ks.className="Placeholder";function Ln(a){Fi.call(this,mn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Ms,this.Om=0,this.Qm=Ms,this.Rm=NaN,this.qj=Qv,this.po=.5,this.wd=null,this.Nb=new dn().freeze(),this.Tg=this.Mg=null,this.ml=new ae,this.ua=new ln,this.u=this.o=this.Sf=this.Wf=null,this.su=new Tt,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Oe(Ln,Fi),Ln.prototype.cloneProtected=function(a){Fi.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())},Ct=Ln.prototype,Ct.Af=function(a){Fi.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&&$s(y),a=a.toPort,a!==null&&$s(a)},Ct.qb=function(a){a.classType===Ln?(a.value&2)===2?this.routing=a:a===hl||a===Th||a===Wf?this.curve=a:a===rp||a===_m||a===qm?this.adjusting=a:a!==Qv&&a!==Ms&&$t("Unknown Link enum value for a Link property: "+a):Fi.prototype.qb.call(this,a)},Ct.Xc=function(){this.ba===null&&(this.ba=new Vg)},Ct.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),Cs(a)||ld(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),Cs(a)||ld(a)))},Ct.zv=function(){return!1},Ct.Av=function(){},Ct.Zc=function(){return!1},Ln.prototype.computeAngle=function(a,y,x){return Ln.computeAngle(y,x)},Ln.computeAngle=function(a,y){switch(a){default:case Ms:a=0;break;case op:a=y;break;case ap:a=y+90;break;case sp:a=y-90;break;case _v:a=y+180;break;case $m:a=le.bp(y),90<a&&270>a&&(a-=180);break;case lp:a=le.bp(y+90),90<a&&270>a&&(a-=180);break;case up:a=le.bp(y-90),90<a&&270>a&&(a-=180);break;case t0:if(a=le.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return le.bp(a)};function zf(a){var y=a.fromNode,x=a.toNode,E=null;if(y!==null?E=x!==null?y.px(x):y.containingGroup:x!==null?E=x.containingGroup:E=null,y=E,x=a.Ah,x!==y){x!==null&&Kv(x,a),a.Ah=y,y!==null&&Vv(y,a);var b=a.containingGroupChanged;if(b!==null){var z=!0,tt=a.diagram;tt!==null&&(z=tt.aa,tt.aa=!0),b(a,x,y),tt!==null&&(tt.aa=z)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=E}Ct=Ln.prototype,Ct.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Fi.prototype.oh.call(this)},Ct.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},Ct.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function $S(a,y){a.wd===null&&(a.wd=new cn),a.wd.add(y),a.v()}Ct.Vo=function(a){if(Fi.prototype.Vo.call(this,a),$d(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Zm(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||Zm(x,this,E)}np(this)}},Ct.Wo=function(a){if(Fi.prototype.Wo.call(this,a),$d(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Vm(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||Vm(x,this,E)}ip(this)}},Ct.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))},Ln.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Ln.prototype.move=function(a,y){var x=y?this.location:this.position,E=x.x;isNaN(E)&&(E=0);var b=x.y;for(isNaN(b)&&(b=0),E=a.x-E,b=a.y-b,y===!0?Fi.prototype.move.call(this,a,!1):(a=Tt.allocAt(x.x+E,x.y+b),Fi.prototype.move.call(this,a,!1),Tt.free(a)),Nh(this,E,b),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+E,x.y+b)},Ln.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},Ln.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},Ln.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(wi),a;if(y===1)return a.assign(this.i(0)),a;if(y===2){var x=this.i(0),E=this.i(1);return a.h((x.x+E.x)/2,(x.y+E.y)/2),a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===hl))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()===hl){if(y===3){x=this.i(0),E=this.i(1);var b=this.i(2);return le.ax(x.x,x.y,E.x,E.y,E.x,E.y,b.x,b.y,a),a}if(E=(y-1)/3|0,x=3*(E/2|0),E%2===1){E=this.i(x),b=this.i(x+1);var z=this.i(x+2);x=this.i(x+3),le.ax(E.x,E.y,b.x,b.y,z.x,z.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var tt=this.flattenedLengths;for(x=this.flattenedTotalLength,b=z=E=0;E<x/2&&z<y&&(b=tt[z],!(E+b>x/2));)E+=b,z++;return y=this.i(z),z=this.i(z+1),1>Math.abs(y.x-z.x)?y.y>z.y?a.h(y.x,y.y-(x/2-E)):a.h(y.x,y.y+(x/2-E)):1>Math.abs(y.y-z.y)?y.x>z.x?a.h(y.x-(x/2-E),y.y):a.h(y.x+(x/2-E),y.y):(x=(x/2-E)/b,a.h(y.x+x*(z.x-y.x),y.y+x*(z.y-y.y))),a},Ln.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()===hl))return this.ua.wx(.5);if(this.computeCurve()===hl&&4<=a){var y=(a-1)/3|0,x=3*(y/2|0);if(y%2===1){x=Math.floor(x),a=this.i(x),y=this.i(x+1);var E=this.i(x+2);return x=this.i(x+3),le.My(a.x,a.y,y.x,y.y,E.x,E.y,x.x,x.y)}if(0<x&&x+1<a)return this.i(x-1).ab(this.i(x+1))}y=this.flattenedLengths,E=this.flattenedTotalLength;var b=0;x=0;for(var z;b<E/2&&x<a&&(z=y[x],!(b+z>E/2));)b+=z,x++;if(y=this.i(x),E=this.i(x+1),1>Math.abs(y.x-E.x)&&1>Math.abs(y.y-E.y)){if(0<x&&x+2<a)return this.i(x-1).ab(this.i(x+2))}else{if(1>Math.abs(y.x-E.x))return y.y>E.y?270:90;if(1>Math.abs(y.y-E.y))return y.x>E.x?180:0}return y.ab(E)},Ct=Ln.prototype,Ct.i=function(a){return this.Nb.s[a]},Ct.dd=function(a,y){this.Nb.cd(a,y)},Ct.L=function(a,y,x){this.Nb.cd(a,new Tt(y,x))},Ct.Kz=function(a,y){this.Nb.Gb(a,y)},Ct.m=function(a,y,x){this.Nb.Gb(a,new Tt(y,x))},Ct.ne=function(a){this.Nb.add(a)},Ct.yf=function(a,y){this.Nb.add(new Tt(a,y))},Ct.pv=function(a){this.Nb.mb(a)},Ct.Fj=function(){this.Nb.clear()};function Nh(a,y,x){if(y!==0||x!==0)if(a.pointsCount===0)a.defaultFromPoint&&a.defaultFromPoint.offset(y,x),a.defaultToPoint&&a.defaultToPoint.offset(y,x);else{for(var E=a.fd,b=new dn,z=a.Nb.iterator;z.next();){var tt=z.value;b.add(new Tt(tt.x+y,tt.y+x).freeze())}b.freeze(),z=a.Nb,a.Nb=b,tt=a.diagram,isNaN(y)||isNaN(x)||tt!==null&&tt.animationManager.zb?a.v():(a.ke.h(a.ke.x+y,a.ke.y+x),a.pa.h(a.pa.x+y,a.pa.y+x),ws(a)),E?Ym(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),tt!==null&&tt.animationManager.zb&&hf(tt.animationManager,a,b),a.g("points",z,b)}}Ct.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},Ct.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,E=1/0,b=a.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];x=Math.min(rt.x,x),E=Math.min(rt.y,E)}rt=tt=1/0;for(var ot=y.s,st=ot.length,ut=0;ut<st;ut++){var ft=ot[ut];tt=Math.min(ft.x,tt),rt=Math.min(ft.y,rt),ft.freeze()}if(y.freeze(),st===z){for(z=0;z<st;z++)if(ut=b[z],ft=ot[z],ut.x-x!==ft.x-tt||ut.y-E!==ft.y-rt){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&hf(x.animationManager,this,y),Ym(this),this.g("points",a,y)}},Ct.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function Ym(a){a.Nb.count===0?a.fd=!1:(a.fd=!0,a.cq=null,a.vt=NaN,a.defaultFromPoint=a.i(0),a.defaultToPoint=a.i(a.pointsCount-1),Qm(a,!1))}Ct.bb=function(){if(!this.suspendsRouting){var a=this.diagram;if(a){if(a.As.contains(this)||a.undoManager.isUndoingRedoing||(a=a.animationManager,a.isTicking&&!a.isAnimating))return;this.Tg===null||a.isTicking||(this.Tg=null)}a=this.path,a!==null&&(this.fd=!1,this.v(),a.v())}},Ct.vg=function(){if(!this.fd&&!this.computingPoints){var a=!0;try{this.computingPoints=!0,this.uh(),a=this.computePoints()}catch(y){this.computingPoints=!1,this.rv()}finally{this.computingPoints=!1,a?this.zf():this.rv()}}},Ln.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Rc||(Rc=new Hn,Rc.desiredSize=oe,Rc.Va()),this.defaultFromPoint&&(Rc.location=this.defaultFromPoint,Rc.Va(),y=a=Rc)):y=this.fromPort,y!==null&&!a.isVisible()){var x=a.findVisibleNode();x!==null&&x!==a?(a=x,y=x.port):a=x}if(this.Lw=a,a===null||!a.location.w())return!1;for(;!(y===null||y.actualBounds.w()&&y.Ed());)y=y.panel;if(y===null)return!1;var E=this.toNode,b=null;if(E===null?(zc||(zc=new Hn,zc.desiredSize=oe,zc.Va()),this.defaultToPoint&&(zc.location=this.defaultToPoint,zc.Va(),b=E=zc)):b=this.toPort,b===null||E.isVisible()||(x=E.findVisibleNode(),x!==null&&x!==E?(E=x,b=x.port):E=x),this.Mw=E,E===null||!E.location.w())return!1;for(;!(b===null||b.actualBounds.w()&&b.Ed());)b=b.panel;if(b===null)return!1;var z=this.pointsCount,tt=this.computeSpot(!0,y);x=this.computeSpot(!1,b);var rt=jf(tt),ot=jf(x),st=y===b&&y!==null,ut=this.isOrthogonal,ft=this.curve===hl;this.Wf=st&&!ut?ft=!0:!1;var vt=this.computeAdjusting()===Ms||st;if(!ut&&!st&&rt&&ot){if(rt=!1,!vt&&3<=z&&(vt=this.getLinkPoint(a,y,tt,!0,!1,E,b),ot=this.getLinkPoint(E,b,x,!1,!1,a,y),rt=this.adjustPoints(0,vt,z-1,ot))&&(vt=this.getLinkPoint(a,y,tt,!0,!1,E,b),ot=this.getLinkPoint(E,b,x,!1,!1,a,y),this.adjustPoints(0,vt,z-1,ot)),!rt)if(this.Fj(),ft){z=this.getLinkPoint(a,y,tt,!0,!1,E,b),vt=this.getLinkPoint(E,b,x,!1,!1,a,y),rt=vt.x-z.x,ot=vt.y-z.y,st=this.computeCurviness(),ft=ut=0;var yt=z.x+rt/3,Pt=z.y+ot/3,Et=yt,Vt=Pt;le.B(ot,0)?Vt=0<rt?Vt-st:Vt+st:(ut=-rt/ot,ft=Math.sqrt(st*st/(ut*ut+1)),0>st&&(ft=-ft),Et=(0>ot?-1:1)*ft+yt,Vt=ut*(Et-yt)+Pt),yt=z.x+2*rt/3,Pt=z.y+2*ot/3;var Rt=yt,Qt=Pt;le.B(ot,0)?Qt=0<rt?Qt-st:Qt+st:(Rt=(0>ot?-1:1)*ft+yt,Qt=ut*(Rt-yt)+Pt),this.Fj(),this.ne(z),this.yf(Et,Vt),this.yf(Rt,Qt),this.ne(vt),this.dd(0,this.getLinkPoint(a,y,tt,!0,!1,E,b)),this.dd(3,this.getLinkPoint(E,b,x,!1,!1,a,y))}else z=E,vt=b,E=this.getLinkPoint(a,y,tt,!0,!1,z,vt),b=this.getLinkPoint(z,vt,x,!1,!1,a,y),this.hasCurviness()?(vt=b.x-E.x,x=b.y-E.y,tt=this.computeCurviness(),a=E.x+vt/2,y=E.y+x/2,z=a,rt=y,le.B(x,0)?rt=0<vt?rt-tt:rt+tt:(vt=-vt/x,z=Math.sqrt(tt*tt/(vt*vt+1)),0>tt&&(z=-z),z=(0>x?-1:1)*z+a,rt=vt*(z-a)+y),this.ne(E),this.yf(z,rt),this.ne(b)):(this.ne(E),this.ne(b),rt=ae.alloc(),y.mi(rt),ot=rt.ca(b),vt.mi(rt),st=rt.ca(E),(ot||st)&&(tt=y.ga(Xm(tt),new Tt),this.dd(0,this.getLinkPointFromPoint(a,y,tt,b,!0,tt)),x=vt.ga(Xm(x),new Tt),this.dd(1,this.getLinkPointFromPoint(z,vt,x,E,!1,x))),ae.free(rt))}else{ft=this.isAvoiding,vt&&(ut&&ft||st)&&this.Fj();var _t=st?this.computeCurviness():0;ft=this.getLinkPoint(a,y,tt,!0,ut,E,b),yt=Et=Pt=0,(ut||!rt||st)&&(Vt=this.computeEndSegmentLength(a,y,tt,!0),yt=this.getLinkDirection(a,y,ft,tt,!0,ut,E,b),st&&(rt||tt.D(x)||!ut&&tt.x+x.x===1&&tt.y+x.y===1)&&(yt-=ut?90:30,0>_t&&(yt-=180)),0>yt?yt+=360:360<=yt&&(yt-=360),st&&(Vt+=Math.abs(_t)*(ut?1:2)),yt===0?Pt=Vt:yt===90?Et=Vt:yt===180?Pt=-Vt:yt===270?Et=-Vt:(Pt=Vt*Math.cos(yt*Math.PI/180),Et=Vt*Math.sin(yt*Math.PI/180)),tt.Mc()&&st&&(Vt=y.ga(fi,Tt.alloc()),Rt=Tt.allocAt(Vt.x+1e3*Pt,Vt.y+1e3*Et),this.getLinkPointFromPoint(a,y,Vt,Rt,!0,ft),Tt.free(Vt),Tt.free(Rt))),Vt=this.getLinkPoint(E,b,x,!1,ut,a,y);var te=Qt=Rt=0;if(ut||!ot||st){var ue=this.computeEndSegmentLength(E,b,x,!1);te=this.getLinkDirection(E,b,Vt,x,!1,ut,a,y),st&&(ot||tt.D(x)||!ut&&tt.x+x.x===1&&tt.y+x.y===1)&&(te+=ut?0:30,0>_t&&(te+=180)),0>te?te+=360:360<=te&&(te-=360),st&&(ue+=Math.abs(_t)*(ut?1:2)),te===0?Rt=ue:te===90?Qt=ue:te===180?Rt=-ue:te===270?Qt=-ue:(Rt=ue*Math.cos(te*Math.PI/180),Qt=ue*Math.sin(te*Math.PI/180)),x.Mc()&&st&&(x=b.ga(fi,Tt.alloc()),tt=Tt.allocAt(x.x+1e3*Rt,x.y+1e3*Qt),this.getLinkPointFromPoint(E,b,x,tt,!1,Vt),Tt.free(x),Tt.free(tt))}x=ft,(ut||!rt||st)&&(x=new Tt(ft.x+Pt,ft.y+Et)),tt=Vt,(ut||!ot||st)&&(tt=new Tt(Vt.x+Rt,Vt.y+Qt)),!vt&&!ut&&rt&&3<z&&this.adjustPoints(0,ft,z-2,tt)?this.dd(z-1,Vt):!vt&&!ut&&ot&&3<z&&this.adjustPoints(1,x,z-1,Vt)?this.dd(0,ft):!vt&&(ut?6<=z:4<z)&&this.adjustPoints(1,x,z-2,tt)?(this.dd(0,ft),this.dd(z-1,Vt)):(this.Fj(),this.ne(ft),(ut||!rt||st)&&this.ne(x),ut&&this.addOrthoPoints(x,yt,tt,te,a,E),(ut||!ot||st)&&this.ne(tt),this.ne(Vt))}return!0};function Yv(a,y){return Math.abs(y.x-a.x)>Math.abs(y.y-a.y)?(y.x>=a.x?y.x=a.x+9e9:y.x=a.x-9e9,y.y=a.y):(y.y>=a.y?y.y=a.y+9e9:y.y=a.y-9e9,y.x=a.x),y}Ln.prototype.getLinkPointFromPoint=function(a,y,x,E,b,z){if(z===void 0&&(z=new Tt),a===null||y===null)return z.assign(x),z;if(a.isVisible()||(b=a.findVisibleNode(),b!==null&&b!==a&&(y=b.port)),a=null,b=y.panel,b===null||b.se()||(b=b.panel),b===null){b=E.x,E=E.y;var tt=x.x;x=x.y}else{a=b.oe,b=1/(a.m11*a.m22-a.m12*a.m21),tt=a.m22*b;var rt=-a.m12*b,ot=-a.m21*b,st=a.m11*b,ut=b*(a.m21*a.dy-a.m22*a.dx),ft=b*(a.m12*a.dx-a.m11*a.dy);b=E.x*tt+E.y*ot+ut,E=E.x*rt+E.y*st+ft,tt=x.x*tt+x.y*ot+ut,x=x.x*rt+x.y*st+ft}return y.Sj(b,E,tt,x,z),a!==null&&z.transform(a),z};function Um(a,y){var x=y.Zn;return x===null&&(x=new jc,x.port=y,x.node=y.part,y.Zn=x),s1(x,a)}Ln.prototype.getLinkPoint=function(a,y,x,E,b,z,tt,rt){if(rt===void 0&&(rt=new Tt),x.sb()&&!jf(x))return y.ga(x,rt),rt;if(x.$c()){var ot=Um(this,y);if(ot!==null){if(rt.assign(ot.Zo),b&&this.routing===e1){var st=Um(this,tt);if(st!==null&&ot.Gl<st.Gl){ot=Tt.alloc(),st=Tt.alloc();var ut=new ae(y.ga(Wi,ot),y.ga(hr,st)),ft=this.computeSpot(!E,tt);a=this.getLinkPoint(z,tt,ft,!E,b,a,y,st),(x.Hf(Wr)||x.Hf(Cr))&&a.y>=ut.y&&a.y<=ut.y+ut.height?rt.y=a.y:(x.Hf(Yr)||x.Hf(to))&&a.x>=ut.x&&a.x<=ut.x+ut.width&&(rt.x=a.x),Tt.free(ot),Tt.free(st)}}return rt}}return x=y.ga(Xm(x),Tt.alloc()),this.pointsCount>(b?6:2)?(tt=E?this.i(1):this.i(this.pointsCount-2),b&&(tt=Yv(x,tt.copy()))):(ot=this.computeSpot(!E,tt),z=Tt.alloc(),tt=tt.ga(Xm(ot),z),b&&(tt=Yv(x,tt)),Tt.free(z)),this.getLinkPointFromPoint(a,y,x,tt,E,rt),Tt.free(x),rt},Ln.prototype.getLinkDirection=function(a,y,x,E,b,z,tt,rt){t:if(E.sb())var ot=E.x>E.y?E.x>1-E.y?0:E.x<1-E.y?270:315:E.x<E.y?E.x>1-E.y?90:E.x<1-E.y?180:135:.5>E.x?225:.5<E.x?45:0;else{if(E.$c()&&(ot=Um(this,y),ot!==null))switch(ot.Nc){case 1:ot=270;break t;case 2:ot=180;break t;default:case 4:ot=0;break t;case 8:ot=90;break t}ot=y.ga(fi,Tt.alloc()),this.pointsCount>(z?6:2)?(rt=b?this.i(1):this.i(this.pointsCount-2),rt=z?Yv(ot,rt.copy()):x):(x=Tt.alloc(),rt=rt.ga(fi,x),Tt.free(x)),x=Math.abs(rt.x-ot.x)>Math.abs(rt.y-ot.y)?rt.x>=ot.x?0:180:rt.y>=ot.y?90:270,Tt.free(ot),ot=x}return E.Mc()&&tt.Td(a)&&(ot+=180,360<=ot&&(ot-=360)),jf(E)||(a=y.li(),a===0)||(45<=a&&135>a?ot+=90:135<=a&&225>a?ot+=180:225<=a&&315>a&&(ot+=270),360<=ot&&(ot-=360)),ot},Ln.prototype.computeEndSegmentLength=function(a,y,x,E){return y!==null&&x.$c()&&(a=Um(this,y),a!==null)?a.Ju:(a=E?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=E?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},Ln.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=fi:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===xo?Li:y)):(a=y||this.toPort,a===null?a=fi:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===xo?Li:y)),a};function jf(a){return a===Li||a.x===.5&&a.y===.5}function Xm(a){return a.x===.5&&a.y===.5?a:fi}Ln.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Ms&&4<this.pointsCount?this.computeMidPoint(new Tt):(a=y.Zn,a=a!==null?s1(a,this):null,a!==null?a.Zo:y.ga(fi))},Ln.prototype.computeShortLength=function(a){if(a){if(a=this.fromShortLength,isNaN(a)){var y=this.fromPort;y!==null&&(a=y.fromShortLength)}return isNaN(a)?0:a}return a=this.toShortLength,isNaN(a)&&(y=this.toPort,y!==null&&(a=y.toShortLength)),isNaN(a)?0:a},Ln.prototype.Cf=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var tt=z;if(z===void 0&&(tt=Un.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return mv(this,y,x,b),z===void 0&&Un.free(tt),!0;if(this.Yc(a,tt)){var rt=!1;if(!this.isAtomic)for(var ot=this.O.s,st=ot.length;st--;){var ut=ot[st];if(ut.visible||ut===this.locationObject){var ft=ut.actualBounds,vt=this.naturalBounds;if(!(ft.x>vt.width||ft.y>vt.height||0>ft.x+ft.width||0>ft.y+ft.height)){if(ft=Un.alloc(),ft.set(tt),ut instanceof mn)rt=ut.Cf(a,y,x,E,b,ft);else if(this.path===ut){if(ut instanceof dr)if(rt=a,vt=E,ut.pickable===!1)rt=!1;else if(ft.multiply(ut.transform),vt)t:{var yt=rt,Pt=ft;if(ut.fh(yt,Pt))rt=!0;else{if(Pt===void 0&&(Pt=ut.transform,yt.Re(ut.actualBounds))){rt=!0;break t}rt=yt.left,vt=yt.right;var Et=yt.top;yt=yt.bottom;var Vt=Tt.alloc(),Rt=Tt.alloc(),Qt=Tt.alloc(),_t=Un.alloc();_t.set(Pt),_t.bv(ut.transform),_t.Vj(),Rt.x=vt,Rt.y=Et,Rt.transform(_t),Vt.x=rt,Vt.y=Et,Vt.transform(_t),Pt=!1,_d(ut,Vt,Rt,Qt)?Pt=!0:(Vt.x=vt,Vt.y=yt,Vt.transform(_t),_d(ut,Vt,Rt,Qt)?Pt=!0:(Rt.x=rt,Rt.y=yt,Rt.transform(_t),_d(ut,Vt,Rt,Qt)?Pt=!0:(Vt.x=rt,Vt.y=Et,Vt.transform(_t),_d(ut,Vt,Rt,Qt)&&(Pt=!0)))),Un.free(_t),Tt.free(Vt),Tt.free(Rt),Tt.free(Qt),rt=Pt}}else rt=ut.fh(rt,ft)}else rt=Da(ut,a,E,ft);rt&&(vt=ut,y!==null&&(vt=y(ut)),vt&&(x===null||x(vt))&&b.add(vt)),Un.free(ft)}}}return z===void 0&&Un.free(tt),rt||this.background!==null||this.areaBackground!==null}return z===void 0&&Un.free(tt),!1},Ln.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?hl:this.curve},Ln.prototype.computeCorner=function(){if(this.curve===hl)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Ln.prototype.findMidLabel=function(){for(var a=this.path,y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];if(b!==a&&!b.isPanelMain&&(b.segmentIndex===-1/0||isNaN(b.segmentIndex)))return b}for(a=this.labelNodes;a.next();)if(y=a.value,y.segmentIndex===-1/0||isNaN(y.segmentIndex))return y;return null},Ln.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=i1;a=Math.max(a,this.computeThickness());var y=this.fromPort,x=this.toPort;if(y!==null&&x!==null){var E=this.findMidLabel();if(E!==null){var b=E.naturalBounds,z=E.margin,tt=isNaN(b.width)?30:b.width*E.scale+z.left+z.right;b=isNaN(b.height)?14:b.height*E.scale+z.top+z.bottom,E=E.segmentOrientation,E===op||E===$m||E===_v?a=Math.max(a,b):E===sp||E===up||E===ap||E===lp?a=Math.max(a,tt):(y=y.ga(fi).ab(x.ga(fi))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*tt)+Math.abs(Math.cos(y)*b)+1)),this.curve===hl&&(a*=1.333)}}return a},Ln.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Ms&&x.bb()}},Ln.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=n1;var y=this.Sf;if(y!==null){for(var x=Ei(),E=0,b=y.links,z=0;z<b.length;z++){var tt=b[z].computeSpacing();x.push(tt),E+=tt}for(E=-E/2,z=0;z<b.length;z++){if(b[z]===this){a=E+x[z]/2;break}E+=x[z]}y.Ds===this.fromNode&&(a=-a),ri(x)}}return a},Ln.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Ln.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Ln.prototype.adjustPoints=function(a,y,x,E){var b=this.computeAdjusting();if(this.isOrthogonal){if(b===_m)return!1;b===qm&&(b=rp)}switch(b){case _m:var z=this.i(a),tt=this.i(x);if(!z.Xa(y)||!tt.Xa(E)){b=z.x,z=z.y;var rt=tt.x-b,ot=tt.y-z,st=Math.sqrt(rt*rt+ot*ot);if(!le.$(st,0)){if(le.$(rt,0))var ut=0>ot?-Math.PI/2:Math.PI/2;else ut=Math.atan(ot/Math.abs(rt)),0>rt&&(ut=Math.PI-ut);tt=y.x;var ft=y.y;rt=E.x-tt;var vt=E.y-ft;for(ot=Math.sqrt(rt*rt+vt*vt),le.$(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=ot/st,ut=vt-ut,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),rt=y.x-b,ot=y.y-z,y=Math.sqrt(rt*rt+ot*ot),le.$(y,0)||(le.$(rt,0)?ot=0>ot?-Math.PI/2:Math.PI/2:(ot=Math.atan(ot/Math.abs(rt)),0>rt&&(ot=Math.PI-ot)),rt=ot+ut,y*=st,this.L(a,tt+y*Math.cos(rt),ft+y*Math.sin(rt)));this.dd(x,E)}}return!0;case qm:if(z=this.i(a),ft=this.i(x),!z.Xa(y)||!ft.Xa(E)){b=z.x,z=z.y,tt=ft.x,ft=ft.y,st=(tt-b)*(tt-b)+(ft-z)*(ft-z),rt=y.x,ut=y.y,ot=E.x,vt=E.y;var yt=1;if(ot-rt!==0){var Pt=(vt-ut)/(ot-rt);yt=Math.sqrt(1+1/(Pt*Pt))}else Pt=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var Et=y.x,Vt=y.y,Rt=.5;st!==0&&(Rt=((b-Et)*(b-tt)+(z-Vt)*(z-ft))/st);var Qt=b+Rt*(tt-b),_t=z+Rt*(ft-z);y=Math.sqrt((Et-Qt)*(Et-Qt)+(Vt-_t)*(Vt-_t)),Vt<Pt*(Et-Qt)+_t&&(y=-y),0<Pt&&(y=-y),Et=rt+Rt*(ot-rt),Rt=ut+Rt*(vt-ut),Pt!==0?(y=Et+y/yt,this.L(a,y,Rt-(y-Et)/Pt)):this.L(a,Et,Rt+y)}this.dd(x,E)}return!0;case rp:t:{if(this.isOrthogonal&&(b=this.i(a),z=this.i(a+1),tt=this.i(a+2),rt=z.x,ut=z.y,ft=rt,st=ut,le.B(b.y,z.y)?le.B(z.x,tt.x)?ut=y.y:le.B(z.y,tt.y)&&(rt=y.x):le.B(b.x,z.x)&&(le.B(z.y,tt.y)?rt=y.x:le.B(z.x,tt.x)&&(ut=y.y)),this.L(a+1,rt,ut),b=this.i(x),z=this.i(x-1),tt=this.i(x-2),rt=z.x,ut=z.y,ot=rt,vt=ut,le.B(b.y,z.y)?le.B(z.x,tt.x)?ut=E.y:le.B(z.y,tt.y)&&(rt=E.x):le.B(b.x,z.x)&&(le.B(z.y,tt.y)?rt=E.x:le.B(z.x,tt.x)&&(ut=E.y)),this.L(x-1,rt,ut),Uv(this))){this.L(a+1,ft,st),this.L(x-1,ot,vt),x=!1;break t}this.dd(a,y),this.dd(x,E),x=!0}return x;default:return!1}},Ln.prototype.addOrthoPoints=function(a,y,x,E,b,z){0>y?y+=360:360<=y&&(y-=360),0>E?E+=360:360<=E&&(E-=360);var tt=E;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,E=315<=E||45>E?0:45<=E&&135>E?90:135<=E&&225>E?180:270;var rt=b.actualBounds.copy(),ot=z.actualBounds.copy();if(rt.w()&&ot.w()){rt.Bc(hp,hp),ot.Bc(hp,hp),rt.Ye(a),ot.Ye(x);var st=Tt.alloc(),ut=Tt.alloc();y===0?x.x>a.x||E===270&&x.y<a.y&&ot.right>a.x||E===90&&x.y>a.y&&ot.right>a.x?(st.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),E===180?(st.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ut.x=st.x,ut.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(st.x=a.x<ot.left?this.computeMidOrthoPosition(a.x,a.y,ot.left,x.y,!1):a.x<ot.right&&(E===270&&a.y<ot.top||E===90&&a.y>ot.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ot.right,ut.x=st.x,ut.y=x.y):E===0&&a.x<ot.left&&a.y>ot.top&&a.y<ot.bottom&&(st.x=a.x,st.y=a.y<x.y?Math.min(x.y,ot.top):Math.max(x.y,ot.bottom),ut.y=st.y)):(st.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),(E===180||E===90&&x.y<rt.top||E===270&&x.y>rt.bottom)&&(E===180&&(ot.ca(a)||rt.ca(x))?st.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===180||E===90)?st.y=this.computeMidOrthoPosition(a.x,rt.top,x.x,Math.max(x.y,ot.bottom),!0):x.y>a.y&&(E===180||E===270)&&(st.y=this.computeMidOrthoPosition(a.x,rt.bottom,x.x,Math.min(x.y,ot.top),!0)),ut.x=x.x,ut.y=st.y),st.y>rt.top&&st.y<rt.bottom&&(x.x>=rt.left&&x.x<=a.x||a.x<=ot.right&&a.x>=x.x?(E===90||E===270)&&(st.h(Math.max((a.x+x.x)/2,a.x),a.y),ut.h(st.x,x.y)):(st.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===0?rt.top:Math.min(rt.top,ot.top)):Math.max(x.y,E===0?rt.bottom:Math.max(rt.bottom,ot.bottom)),ut.x=x.x,ut.y=st.y))):y===180?x.x<a.x||E===270&&x.y<a.y&&ot.left<a.x||E===90&&x.y>a.y&&ot.left<a.x?(st.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),E===0?(st.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ut.x=st.x,ut.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(st.x=a.x>ot.right?this.computeMidOrthoPosition(a.x,a.y,ot.right,x.y,!1):a.x>ot.left&&(E===270&&a.y<ot.top||E===90&&a.y>ot.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ot.left,ut.x=st.x,ut.y=x.y):E===180&&a.x>ot.right&&a.y>ot.top&&a.y<ot.bottom&&(st.x=a.x,st.y=a.y<x.y?Math.min(x.y,ot.top):Math.max(x.y,ot.bottom),ut.y=st.y)):(st.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),(E===0||E===90&&x.y<rt.top||E===270&&x.y>rt.bottom)&&(E===0&&(ot.ca(a)||rt.ca(x))?st.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===0||E===90)?st.y=this.computeMidOrthoPosition(a.x,rt.top,x.x,Math.max(x.y,ot.bottom),!0):x.y>a.y&&(E===0||E===270)&&(st.y=this.computeMidOrthoPosition(a.x,rt.bottom,x.x,Math.min(x.y,ot.top),!0)),ut.x=x.x,ut.y=st.y),st.y>rt.top&&st.y<rt.bottom&&(x.x<=rt.right&&x.x>=a.x||a.x>=ot.left&&a.x<=x.x?(E===90||E===270)&&(st.h(Math.min((a.x+x.x)/2,a.x),a.y),ut.h(st.x,x.y)):(st.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===180?rt.top:Math.min(rt.top,ot.top)):Math.max(x.y,E===180?rt.bottom:Math.max(rt.bottom,ot.bottom)),ut.x=x.x,ut.y=st.y))):y===90?x.y>a.y||E===180&&x.x<a.x&&ot.bottom>a.y||E===0&&x.x>a.x&&ot.bottom>a.y?(st.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),E===270?(st.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ut.x=x.x,ut.y=st.y):E===180&&x.x<a.x||E===0&&x.x>a.x?(st.y=a.y<ot.top?this.computeMidOrthoPosition(a.x,a.y,x.x,ot.top,!0):a.y<ot.bottom&&(E===180&&a.x<ot.left||E===0&&a.x>ot.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ot.bottom,ut.x=x.x,ut.y=st.y):E===90&&a.y<ot.top&&a.x>ot.left&&a.x<ot.right&&(st.x=a.x<x.x?Math.min(x.x,ot.left):Math.max(x.x,ot.right),st.y=a.y,ut.x=st.x)):(st.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),(E===270||E===0&&x.x<rt.left||E===180&&x.x>rt.right)&&(E===270&&(ot.ca(a)||rt.ca(x))?st.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===270||E===0)?st.x=this.computeMidOrthoPosition(rt.left,a.y,Math.max(x.x,ot.right),x.y,!1):x.x>a.x&&(E===270||E===180)&&(st.x=this.computeMidOrthoPosition(rt.right,a.y,Math.min(x.x,ot.left),x.y,!1)),ut.x=st.x,ut.y=x.y),st.x>rt.left&&st.x<rt.right&&(x.y>=rt.top&&x.y<=a.y||a.y<=ot.bottom&&a.y>=x.y?(E===0||E===180)&&(st.h(a.x,Math.max((a.y+x.y)/2,a.y)),ut.h(x.x,st.y)):(st.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===90?rt.left:Math.min(rt.left,ot.left)):Math.max(x.x,E===90?rt.right:Math.max(rt.right,ot.right)),ut.x=st.x,ut.y=x.y))):x.y<a.y||E===180&&x.x<a.x&&ot.top<a.y||E===0&&x.x>a.x&&ot.top<a.y?(st.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),E===90?(st.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ut.x=x.x,ut.y=st.y):E===180&&x.x<a.x||E===0&&x.x>=a.x?(st.y=a.y>ot.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,ot.bottom,!0):a.y>ot.top&&(E===180&&a.x<ot.left||E===0&&a.x>ot.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ot.top,ut.x=x.x,ut.y=st.y):E===270&&a.y>ot.bottom&&a.x>ot.left&&a.x<ot.right&&(st.x=a.x<x.x?Math.min(x.x,ot.left):Math.max(x.x,ot.right),st.y=a.y,ut.x=st.x)):(st.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),(E===90||E===0&&x.x<rt.left||E===180&&x.x>rt.right)&&(E===90&&(ot.ca(a)||rt.ca(x))?st.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===90||E===0)?st.x=this.computeMidOrthoPosition(rt.left,a.y,Math.max(x.x,ot.right),x.y,!1):x.x>a.x&&(E===90||E===180)&&(st.x=this.computeMidOrthoPosition(rt.right,a.y,Math.min(x.x,ot.left),x.y,!1)),ut.x=st.x,ut.y=x.y),st.x>rt.left&&st.x<rt.right&&(x.y<=rt.bottom&&x.y>=a.y||a.y>=ot.top&&a.y<=x.y?(E===0||E===180)&&(st.h(a.x,Math.min((a.y+x.y)/2,a.y)),ut.h(x.x,st.y)):(st.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===270?rt.left:Math.min(rt.left,ot.left)):Math.max(x.x,E===270?rt.right:Math.max(rt.right,ot.right)),ut.x=st.x,ut.y=x.y)));var ft=x;if(this.isAvoiding){var vt=this.diagram;if(vt===null||b===z||this.layer.isTemporary||!Sf(vt)||rt.ca(ft)&&!z.Td(b)||ot.ca(a)&&!b.Td(z))y=!1;else{var yt=xf(vt,!0,this.containingGroup,null);if(this.segmentIndex!==17&&yt.Yj(Math.min(a.x,st.x),Math.min(a.y,st.y),Math.abs(a.x-st.x),Math.abs(a.y-st.y))&&yt.Yj(Math.min(st.x,ut.x),Math.min(st.y,ut.y),Math.abs(st.x-ut.x),Math.abs(st.y-ut.y))&&yt.Yj(Math.min(ut.x,ft.x),Math.min(ut.y,ft.y),Math.abs(ut.x-ft.x),Math.abs(ut.y-ft.y)))y=!1;else{b=a,z=ft;var Pt=x=null;if(vt.isVirtualized){vt=yt.bounds.copy(),vt.Bc(-yt.Ho,-yt.Go);var Et=Tt.alloc();Hf(yt,a.x,a.y)||(le.Ff(vt.x,vt.y,vt.x+vt.width,vt.y+vt.height,a.x,a.y,st.x,st.y,Et)?(x=a=Et.copy(),y=Et.ab(st)):le.Ff(vt.x,vt.y,vt.x+vt.width,vt.y+vt.height,st.x,st.y,ut.x,ut.y,Et)?(x=a=Et.copy(),y=Et.ab(ut)):le.Ff(vt.x,vt.y,vt.x+vt.width,vt.y+vt.height,ut.x,ut.y,ft.x,ft.y,Et)&&(x=a=Et.copy(),y=Et.ab(ft))),Hf(yt,ft.x,ft.y)||(le.Ff(vt.x,vt.y,vt.x+vt.width,vt.y+vt.height,ft.x,ft.y,ut.x,ut.y,Et)?(Pt=ft=Et.copy(),E=ut.ab(Et)):le.Ff(vt.x,vt.y,vt.x+vt.width,vt.y+vt.height,ut.x,ut.y,st.x,st.y,Et)?(Pt=ft=Et.copy(),E=st.ab(Et)):le.Ff(vt.x,vt.y,vt.x+vt.width,vt.y+vt.height,st.x,st.y,a.x,a.y,Et)&&(Pt=ft=Et.copy(),E=a.ab(Et))),Tt.free(Et)}rt=rt.copy().ed(ot),rt.Bc(yt.Ho*yt.Os,yt.Go*yt.Os),o1(yt,a,y,ft,E,rt,!0),ot=Wu(yt,ft.x,ft.y),!yt.abort&&ot>=Gf&&(r1(yt),rt.Bc(yt.Ho*yt.Hx,yt.Go*yt.Ix),o1(yt,a,y,ft,E,rt,!1),ot=Wu(yt,ft.x,ft.y)),!yt.abort&&ot<Gf&&Wu(yt,ft.x,ft.y)!==Dh?(Xv(this,yt,ft.x,ft.y,E,!0,tt),rt=this.i(2),4>this.pointsCount?(y===0||y===180?(rt.x=a.x,rt.y=ft.y):(rt.x=ft.x,rt.y=a.y),this.L(2,rt.x,rt.y),this.m(3,rt.x,rt.y)):(tt=this.i(3),y===0||y===180?le.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)):le.B(rt.y,tt.y)?(Math.abs(a.y-rt.y)<=yt.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)&&(le.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)):le.B(rt.x,tt.x)?(Math.abs(a.x-rt.x)<=yt.Ho/2&&(this.L(2,a.x,rt.y),this.L(3,a.x,tt.y)),this.m(2,a.x,rt.y)):this.L(2,rt.x,a.y))),x!==null&&(a=this.i(1),tt=this.i(2),a.x!==tt.x&&a.y!==tt.y?y===0||y===180?this.m(2,a.x,tt.y):this.m(2,tt.x,a.y):y===0||y===180?this.m(2,b.x,x.y):this.m(2,x.x,b.y)),Pt!==null&&(E===0||E===180?this.yf(z.x,Pt.y):this.yf(Pt.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(st.copy()),this.ne(ut.copy())),Tt.free(st),Tt.free(ut)}},Ln.prototype.computeMidOrthoPosition=function(a,y,x,E,b){var z=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(z=this.computeCurviness()),b?(y+E)/2+z:(a+x)/2+z};function Uv(a){if(a.diagram===null||!a.isAvoiding||!Sf(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=xf(a.diagram,!0,a.containingGroup,null);for(var E=1;E<x-2;E++){var b=y[E],z=y[E+1];if(!a.Yj(Math.min(b.x,z.x),Math.min(b.y,z.y),Math.abs(b.x-z.x),Math.abs(b.y-z.y)))return!0}return!1}function Xv(a,y,x,E,b,z,tt){var rt=y.Ho,ot=y.Go,st=Wu(y,x,E),ut=x,ft=E;for(b===0?ut+=rt:b===90?ft+=ot:b===180?ut-=rt:ft-=ot,b!==tt&&st>tc&&Wu(y,ut,ft)!==st-1&&(Wu(y,x-rt,E)===st-1?(b=180,ut=x-rt,ft=E):Wu(y,x+rt,E)===st-1?(b=0,ut=x+rt,ft=E):Wu(y,x,E-ot)===st-1?(b=270,ut=x,ft=E-ot):Wu(y,x,E+ot)===st-1&&(b=90,ut=x,ft=E+ot));st>tc&&Wu(y,ut,ft)===st-1;)x=ut,E=ft,b===0?ut+=rt:b===90?ft+=ot:b===180?ut-=rt:ft-=ot,--st;z?st>tc&&(b===180||b===0?x=Math.floor(x/rt)*rt+rt/2:(b===90||b===270)&&(E=Math.floor(E/ot)*ot+ot/2)):(x=Math.floor(x/rt)*rt+rt/2,E=Math.floor(E/ot)*ot+ot/2),st>tc&&(z=b,tt=x,ut=E,b===0?(z=90,ut+=ot):b===90?(z=180,tt-=rt):b===180?(z=270,ut-=ot):b===270&&(z=0,tt+=rt),Wu(y,tt,ut)===st-1?Xv(a,y,tt,ut,z,!1,z):(tt=x,ut=E,b===0?(z=270,ut-=ot):b===90?(z=0,tt+=rt):b===180?(z=90,ut+=ot):b===270&&(z=180,tt-=rt),Wu(y,tt,ut)===st-1&&Xv(a,y,tt,ut,z,!1,z))),a.yf(x,E)}Ln.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),E=this.i(1),b=Qn(y,a,x.x,x.y,E.x,E.y),z=0,tt=1;tt<this.pointsCount-1;tt++){x=this.i(tt+1);var rt=Qn(y,a,E.x,E.y,x.x,x.y);E=x,rt<b&&(z=tt,b=rt)}return z},Ln.prototype.qc=function(){this.lk=!1,this.v()},Ln.prototype.Ul=function(a){if(!(!a&&(this.fd===!1||(a=this.Pb(),this.lk&&(a===null||a.geometry!==null))))&&(2>this.pointsCount?this.lk=!0:this.ua=this.makeGeometry(),a=this.path,a!==null)){a.ua=this.ua;for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];b!==a&&b.isPanelMain&&b instanceof dr&&(b.ua=this.ua)}}},Ln.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,E=this.diagram;E!==null&&$d(this)&&E.Eh.contains(this)&&(this.ml.width!==0||this.ml.height!==0)&&(E.animationManager.isAnimating||E.currentTool!==E.toolManager)&&(x=!0);var b=this.i(0).copy(),z=b.copy();E=this.Nb.s;var tt=this.computeCurve();if(tt===hl&&3<=y&&!le.$(this.smoothness,0))if(y===3){var rt=this.i(1);E=Math.min(b.x,rt.x);var ot=Math.min(b.y,rt.y);rt=this.i(2),E=Math.min(E,rt.x),ot=Math.min(ot,rt.y)}else{if(this.isOrthogonal)for(ot=0;ot<y;ot++)rt=E[ot],z.x=Math.min(rt.x,z.x),z.y=Math.min(rt.y,z.y);else for(E=3;E<y;E+=3)E+3>=y&&(E=y-1),ot=this.i(E),z.x=Math.min(ot.x,z.x),z.y=Math.min(ot.y,z.y);E=z.x,ot=z.y}else{for(ot=0;ot<y;ot++)rt=E[ot],z.x=Math.min(rt.x,z.x),z.y=Math.min(rt.y,z.y);E=z.x,ot=z.y}if(E-=this.su.x,ot-=this.su.y,b.x-=E,b.y-=ot,y!==2||$d(this)){if(a.type=ln.o,rt=bS(a),this.computeShortLength(!0)!==0&&(b=Oc(this,b,!0,z)),Rf(rt,b.x,b.y,!1),tt===hl&&3<=y&&!le.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-E,x=x.y-ot,b=this.i(2).copy(),b.x-=E,b.y-=ot,this.computeShortLength(!1)!==0&&(b=Oc(this,b,!1,z)),Ah(rt,y,x,y,x,b.x,b.y);else if(this.isOrthogonal){y=Tt.allocAt(E,ot),x=Tt.alloc(),x.assign(this.i(1)),z=Tt.allocAt(E,ot),b=Tt.allocAt(E,ot),tt=this.i(0);for(var st,ut=this.smoothness/3,ft=1;ft<this.pointsCount-1;ft++){st=this.i(ft);var vt=tt,yt=st,Pt=this.i(Jv(this,st,ft,!1));if((!le.$(vt.x,yt.x)||!le.$(yt.x,Pt.x))&&(!le.$(vt.y,yt.y)||!le.$(yt.y,Pt.y))){var Et=ut;isNaN(Et)&&(Et=this.smoothness/3);var Vt=vt.x;vt=vt.y;var Rt=yt.x;yt=yt.y;var Qt=Pt.x;Pt=Pt.y;var _t=Et*Jm(Vt,vt,Rt,yt);Et*=Jm(Rt,yt,Qt,Pt),le.$(vt,yt)&&le.$(Rt,Qt)&&(Rt>Vt?Pt>yt?(z.x=Rt-_t,z.y=yt-_t,b.x=Rt+Et,b.y=yt+Et):(z.x=Rt-_t,z.y=yt+_t,b.x=Rt+Et,b.y=yt-Et):Pt>yt?(z.x=Rt+_t,z.y=yt-_t,b.x=Rt-Et,b.y=yt+Et):(z.x=Rt+_t,z.y=yt+_t,b.x=Rt-Et,b.y=yt-Et)),le.$(Vt,Rt)&&le.$(yt,Pt)&&(yt>vt?(Qt>Rt?(z.x=Rt-_t,z.y=yt-_t,b.x=Rt+Et):(z.x=Rt+_t,z.y=yt-_t,b.x=Rt-Et),b.y=yt+Et):(Qt>Rt?(z.x=Rt-_t,z.y=yt+_t,b.x=Rt+Et):(z.x=Rt+_t,z.y=yt+_t,b.x=Rt-Et),b.y=yt-Et)),(le.$(Vt,Rt)&&le.$(Rt,Qt)||le.$(vt,yt)&&le.$(yt,Pt))&&(Vt=.5*(Vt+Qt),vt=.5*(vt+Pt),z.x=Vt,z.y=vt,b.x=Vt,b.y=vt),(ft===1||ft===2&&le.$(tt.x,this.i(0).x)&&le.$(tt.y,this.i(0).y))&&(x.x=.5*(tt.x+st.x),x.y=.5*(tt.y+st.y)),Ah(rt,x.x-E,x.y-ot,z.x-E,z.y-ot,st.x-E,st.y-ot),y.set(z),x.set(b),tt=st}}st=tt.x,tt=tt.y,ut=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ut=Oc(this,ut.copy(),!1,Wn)),st=.5*(st+ut.x),tt=.5*(tt+ut.y),Ah(rt,b.x-E,b.y-ot,st-E,tt-ot,ut.x-E,ut.y-ot),Tt.free(y),Tt.free(x),Tt.free(z),Tt.free(b)}else for(x=3;x<y;x+=3)z=this.i(x-2),x+3>=y&&(x=y-1),b=this.i(x-1),tt=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(tt=Oc(this,tt.copy(),!1,Wn)),Ah(rt,z.x-E,z.y-ot,b.x-E,b.y-ot,tt.x-E,tt.y-ot);else{for(z=Tt.alloc(),z.assign(this.i(0)),b=Tt.alloc(),b.assign(z),tt=this.computeCorner(),ft=1,st=0;ft<y;){if(ft=Jv(this,z,ft,1<ft),ut=this.i(ft),ft>=y-1){if(!z.D(ut))this.computeShortLength(!1)!==0&&(ut=Oc(this,ut.copy(),!1,Wn)),Ic(this,rt,-E,-ot,z,ut,x);else if(st===0)for(ft=1;ft<y;)b.assign(z),ut=this.i(ft++),Ic(this,rt,-E,-ot,z,ut,x),z.assign(ut);break}if(st=Jv(this,ut,ft+1,ft<y-3),ft=-E,Vt=-ot,vt=ut,Rt=this.i(st),Et=x,le.B(z.y,vt.y)&&le.B(vt.x,Rt.x))if(Pt=Math.min(tt,Math.abs(vt.x-b.x)/2),Pt=_t=Math.min(Pt,Math.abs(Rt.y-vt.y)/2),le.B(Pt,0))Ic(this,rt,ft,Vt,z,vt,Et),z.assign(vt);else{var te=vt.x,ue=vt.y;yt=te,Qt=ue,vt.x>z.x?te=vt.x-Pt:te=vt.x+Pt,Rt.y>vt.y?Qt=vt.y+_t:Qt=vt.y-_t,Rt=Tt.allocAt(te,ue),Ic(this,rt,ft,Vt,z,Rt,Et),Tt.free(Rt),jm(rt,vt.x+ft,vt.y+Vt,yt+ft,Qt+Vt),z.h(yt,Qt)}else le.B(z.x,vt.x)&&le.B(vt.y,Rt.y)?(Pt=Math.min(tt,Math.abs(vt.y-b.y)/2),Pt=_t=Math.min(Pt,Math.abs(Rt.x-vt.x)/2),le.B(_t,0)?(Ic(this,rt,ft,Vt,z,vt,Et),z.assign(vt)):(te=vt.x,ue=vt.y,yt=te,Qt=ue,vt.y>z.y?ue=vt.y-Pt:ue=vt.y+Pt,Rt.x>vt.x?yt=vt.x+_t:yt=vt.x-_t,Rt=Tt.allocAt(te,ue),Ic(this,rt,ft,Vt,z,Rt,Et),Tt.free(Rt),jm(rt,vt.x+ft,vt.y+Vt,yt+ft,Qt+Vt),z.h(yt,Qt))):(Ic(this,rt,ft,Vt,z,vt,Et),z.assign(vt));b.assign(ut),ft=st}Tt.free(z)}Wm=rt}else rt=this.i(1).copy(),rt.x-=E,rt.y-=ot,this.computeShortLength(!0)!==0&&(b=Oc(this,b,!0,z)),this.computeShortLength(!1)!==0&&(rt=Oc(this,rt,!1,z)),a.type=ln.j,a.startX=b.x,a.startY=b.y,a.endX=rt.x,a.endY=rt.y;return this.lk=!0,a};function Jm(a,y,x,E){return a=x-a,isNaN(a)||a===1/0||a===-1/0?NaN:(0>a&&(a=-a),y=E-y,isNaN(y)||y===1/0||y===-1/0?NaN:(0>y&&(y=-y),le.$(a,0)?y:le.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Oc(a,y,x,E){var b=a.pointsCount;if(2>b)return y;if(x){var z=a.i(1);if(x=z.x-E.x,z=z.y-E.y,E=Jm(y.x,y.y,x,z),E===0)return y;b=b===2?.5*E:E,a=a.computeShortLength(!0),a>b&&(a=b),b=a*(z-y.y)/E,y.x+=a*(x-y.x)/E,y.y+=b}else{if(z=a.i(b-2),x=z.x-E.x,z=z.y-E.y,E=Jm(y.x,y.y,x,z),E===0)return y;b=b===2?.5*E:E,a=a.computeShortLength(!1),a>b&&(a=b),b=a*(y.y-z)/E,y.x-=a*(y.x-x)/E,y.y-=b}return y}function Jv(a,y,x,E){for(var b=a.pointsCount,z=y;le.$(y.x,z.x)&&le.$(y.y,z.y);){if(x>=b)return b-1;z=a.i(x++)}if(!le.$(y.x,z.x)&&!le.$(y.y,z.y))return x-1;for(var tt=z;le.$(y.x,z.x)&&le.$(z.x,tt.x)&&(!E||(y.y>=z.y?z.y>=tt.y:z.y<=tt.y))||le.$(y.y,z.y)&&le.$(z.y,tt.y)&&(!E||(y.x>=z.x?z.x>=tt.x:z.x<=tt.x));){if(x>=b)return b-1;tt=a.i(x++)}return x-2}Ln.prototype.computeJumpLength=function(){return 10};function Ic(a,y,x,E,b,z,tt){if(!tt&&$d(a)){tt=a.computeJumpLength();var rt=tt/2,ot=[],st=0;if(a.isVisible()&&(st=kx(a,b,z,ot)),0<st){if(le.B(b.y,z.y))if(b.x<z.x)for(var ut=0;ut<st;){var ft=Math.max(b.x,Math.min(ot[ut++]-rt,z.x-tt));y.lineTo(ft+x,z.y+E);for(var vt=ft+x,yt=Math.min(ft+tt,z.x);ut<st&&(ft=ot[ut],ft<yt+tt);)ut++,yt=Math.min(ft+rt,z.x);ft=z.y-tt+E,yt+=x;var Pt=z.y+E;a.curve===Th?Rf(y,yt,Pt,!1):Ah(y,vt,ft,yt,ft,yt,Pt)}else for(--st;0<=st;){for(ut=Math.min(b.x,Math.max(ot[st--]+rt,z.x+tt)),y.lineTo(ut+x,z.y+E),vt=ut+x,ft=Math.max(ut-tt,z.x);0<=st&&(ut=ot[st],ut>ft-tt);)st--,ft=Math.max(ut-rt,z.x);ut=z.y-tt+E,ft+=x,yt=z.y+E,a.curve===Th?Rf(y,ft,yt,!1):Ah(y,vt,ut,ft,ut,ft,yt)}else if(le.B(b.x,z.x))if(b.y<z.y)for(ut=0;ut<st;){for(ft=Math.max(b.y,Math.min(ot[ut++]-rt,z.y-tt)),y.lineTo(z.x+x,ft+E),vt=ft+E,ft=Math.min(ft+tt,z.y);ut<st&&(yt=ot[ut],yt<ft+tt);)ut++,ft=Math.min(yt+rt,z.y);yt=z.x-tt+x,Pt=z.x+x,ft+=E,a.curve===Th?Rf(y,Pt,ft,!1):Ah(y,yt,vt,yt,ft,Pt,ft)}else for(--st;0<=st;){for(ut=Math.min(b.y,Math.max(ot[st--]+rt,z.y+tt)),y.lineTo(z.x+x,ut+E),vt=ut+E,ut=Math.max(ut-tt,z.y);0<=st&&(ft=ot[st],ft>ut-tt);)st--,ut=Math.max(ft-rt,z.y);ft=z.x-tt+x,yt=z.x+x,ut+=E,a.curve===Th?Rf(y,yt,ut,!1):Ah(y,ft,vt,ft,ut,yt,ut)}}}y.lineTo(z.x+x,z.y+E)}function kx(a,y,x,E){var b=a.diagram;if(b===null||y.D(x))return 0;for(b=b.layers;b.next();){var z=b.value;if(z!==null&&z.visible){z=z.Pa.s;for(var tt=z.length,rt=0;rt<tt;rt++){var ot=z[rt];if(ot instanceof Ln){if(ot===a)return 0<E.length&&E.sort(function(ut,ft){return ut-ft}),E.length;if(ot.isVisible()&&$d(ot)){var st=ot.routeBounds;st.w()&&a.routeBounds.Yc(st)&&!a.usesSamePort(ot)&&(st=ot.path,st!==null&&st.Ed()&&Mx(y,x,E,ot))}}}}}return 0<E.length&&E.sort(function(ut,ft){return ut-ft}),E.length}function Mx(a,y,x,E){for(var b=le.B(a.y,y.y),z=E.pointsCount,tt=E.i(0),rt=Tt.alloc(),ot=1;ot<z;ot++){var st=E.i(ot);if(ot<z-1){var ut=E.i(ot+1);if(tt.y===st.y&&st.y===ut.y){if(st.x>tt.x&&ut.x>=st.x||st.x<tt.x&&ut.x<=st.x)continue}else if(tt.x===st.x&&st.x===ut.x&&(st.y>tt.y&&ut.y>=st.y||st.y<tt.y&&ut.y<=st.y))continue}t:{ut=a.x;var ft=a.y,vt=y.x,yt=y.y,Pt=tt.x;tt=tt.y;var Et=st.x,Vt=st.y;if(le.B(ut,vt)){if(!le.B(ft,yt)&&le.B(tt,Vt)&&Math.min(ft,yt)<tt&&Math.max(ft,yt)>tt&&Math.min(Pt,Et)<ut&&Math.max(Pt,Et)>ut&&!le.B(Pt,Et)){rt.x=ut,rt.y=tt,ut=!0;break t}}else if(le.B(ft,yt)&&le.B(Pt,Et)&&Math.min(ut,vt)<Pt&&Math.max(ut,vt)>Pt&&Math.min(tt,Vt)<ft&&Math.max(tt,Vt)>ft&&!le.B(tt,Vt)){rt.x=Pt,rt.y=ft,ut=!0;break t}rt.x=0,rt.y=0,ut=!1}ut&&(b?x.push(rt.x):x.push(rt.y)),tt=st}Tt.free(rt)}function $d(a){return a=a.curve,a===Wf||a===Th}function Qm(a,y){(y||$d(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()))}Ln.prototype.Xo=function(a){var y=this.layer;if(y!==null&&y.visible&&!y.isTemporary){var x=y.diagram;if(x!==null&&!x.animationManager.isTicking){var E=!1;for(x=x.layers;x.next();){var b=x.value;if(b.visible){if(b===y){E=!0;var z=!1;b=b.Pa.s;for(var tt=b.length,rt=0;rt<tt;rt++){var ot=b[rt];ot instanceof Ln&&(ot===this?z=!0:z&&t1(this,ot,a))}}else if(E)for(z=b.Pa.s,b=z.length,tt=0;tt<b;tt++)rt=z[tt],rt instanceof Ln&&t1(this,rt,a)}}}}};function t1(a,y,x){if(y!==null&&y.lk&&y.fd&&$d(y)){var E=y.routeBounds;E.w()&&(a.routeBounds.Yc(E)||x.Yc(E))&&(a.usesSamePort(y)||y.qc())}}Ln.prototype.usesSamePort=function(a){var y=this.pointsCount,x=a.pointsCount;if(0<y&&0<x){var E=this.i(0),b=a.i(0);if(E.Xa(b)||(y=this.i(y-1),a=a.i(x-1),y.Xa(a)||E.Xa(a)||y.Xa(b)))return!0}else if(this.fromNode===a.fromNode||this.toNode===a.toNode||this.fromNode===a.toNode||this.toNode===a.fromNode)return!0;return!1},Ln.prototype.isVisible=function(){if(!Fi.prototype.isVisible.call(this))return!1;var a=this.containingGroup,y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this.fromNode,x!==null){if(this.isTreeLink&&y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(var E=x;E!==null;){if(E.labeledLink===this)return!0;E=E.containingGroup}if(x=x.findVisibleNode(),x===null||x===a)return!1}if(x=this.toNode,x!==null){if(this.isTreeLink&&!y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(y=x;y!==null;){if(y.labeledLink===this)return!0;y=y.containingGroup}if(y=x.findVisibleNode(),y===null||y===a)return!1}return!0},Ln.prototype.Zb=function(a){if(Fi.prototype.Zb.call(this,a),a&&Qm(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},Ln.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?rp:this.qk};function np(a){var y=a.ef;if(y!==null){var x=a.uf;if(x!==null&&isNaN(a.curviness)){for(var E=a.ff,b=a.vf,z=a=null,tt=y.jb.s,rt=tt.length,ot=0;ot<rt;ot++){var st=tt[ot];(st.ef===y&&st.ff===E&&st.uf===x&&st.vf===b||st.ef===x&&st.ff===b&&st.uf===y&&st.vf===E)&&(z===null?z=st:(a===null&&(a=[],a.push(z)),a.push(st)))}if(a!==null){for(z=GS(y,x,E,b),z===null&&(z=new e0(y,E,x,b),HS(y,z),HS(x,z)),z.links=a,y=0;y<a.length;y++)a[y].Sf=z;z.Sl()}}}}function ip(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(Oi(y.links,a),y.Sl()))}Ln.prototype.ph=function(){return!0},Me.Object.defineProperties(Ln.prototype,{fromNode:{get:function(){return this.ef},set:function(a){var y=this.ef;if(y!==a){var x=this.fromPort;y!==null&&(this.uf!==y&&Vm(y,this,x),ip(this),this.C(2)),this.ef=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var E=this.diagram;E!==null&&E.aa&&E.partManager.setFromNodeForLink(this,a,y);var b=this.fromPort,z=this.fromPortChanged;if(z!==null){var tt=!0;E!==null&&(tt=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=tt)}a!==null&&(this.uf!==a&&Zm(a,this,b),np(this),this.C(1)),this.g("fromNode",y,a),zf(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&$s(x),ip(this),this.ff=a;var E=this.fromPort;E!==null&&$s(E);var b=this.diagram;if(b!==null){var z=this.data,tt=b.model;z!==null&&tt.ri()&&tt.xv(z,a)}x!==E&&(this.Wf=null,this.bb(),z=this.fromPortChanged,z!==null&&(tt=!0,b!==null&&(tt=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=tt))),np(this),this.g("fromPortId",y,a)}}},fromPort:{get:function(){var a=this.ef;return a===null?null:a.ns(this.ff)}},fromPortChanged:{get:function(){return this.gn},set:function(a){var y=this.gn;y!==a&&(this.gn=a,this.g("fromPortChanged",y,a))}},toNode:{get:function(){return this.uf},set:function(a){var y=this.uf;if(y!==a){var x=this.toPort;y!==null&&(this.ef!==y&&Vm(y,this,x),ip(this),this.C(2)),this.uf=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var E=this.diagram;E!==null&&E.aa&&E.partManager.setToNodeForLink(this,a,y);var b=this.toPort,z=this.toPortChanged;if(z!==null){var tt=!0;E!==null&&(tt=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=tt)}a!==null&&(this.ef!==a&&Zm(a,this,b),np(this),this.C(1)),this.g("toNode",y,a),zf(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&$s(x),ip(this),this.vf=a;var E=this.toPort;E!==null&&$s(E);var b=this.diagram;if(b!==null){var z=this.data,tt=b.model;z!==null&&tt.ri()&&tt.Cv(z,a)}x!==E&&(this.Wf=null,this.bb(),z=this.toPortChanged,z!==null&&(tt=!0,b!==null&&(tt=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=tt))),np(this),this.g("toPortId",y,a)}}},toPort:{get:function(){var a=this.uf;return a===null?null:a.ns(this.vf)}},toPortChanged:{get:function(){return this.uo},set:function(a){var y=this.uo;y!==a&&(this.uo=a,this.g("toPortChanged",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:xo},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),(y.$c()||a.$c())&&this.fromNode!==null&&$s(this.fromPort),this.bb())}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:NaN},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&ei(a,">= 0",Ln,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),this.bb())}},fromShortLength:{get:function(){return this.ba!==null?this.ba.Wi:NaN},set:function(a){var y=this.fromShortLength;y!==a&&(this.Xc(),this.ba.Wi=a,this.qc(),this.g("fromShortLength",y,a))}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:xo},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),(y.$c()||a.$c())&&this.toNode!==null&&$s(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&&ei(a,">= 0",Ln,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),this.bb())}},toShortLength:{get:function(){return this.ba!==null?this.ba.xj:NaN},set:function(a){var y=this.toShortLength;y!==a&&(this.Xc(),this.ba.xj=a,this.qc(),this.g("toShortLength",y,a))}},isLabeledLink:{get:function(){return this.wd===null?!1:0<this.wd.count}},labelNodes:{get:function(){return this.wd===null?Or:this.wd.iterator}},relinkableFrom:{get:function(){return(this.Qa&1)!==0},set:function(a){var y=(this.Qa&1)!==0;y!==a&&(this.Qa^=1,this.g("relinkableFrom",y,a),this.Wb())}},relinkableTo:{get:function(){return(this.Qa&2)!==0},set:function(a){var y=(this.Qa&2)!==0;y!==a&&(this.Qa^=2,this.g("relinkableTo",y,a),this.Wb())}},resegmentable:{get:function(){return(this.Qa&4)!==0},set:function(a){var y=(this.Qa&4)!==0;y!==a&&(this.Qa^=4,this.g("resegmentable",y,a),this.Wb())}},isTreeLink:{get:function(){return(this.Qa&8)!==0},set:function(a){var y=(this.Qa&8)!==0;y!==a&&(this.Qa^=8,this.g("isTreeLink",y,a),this.fromNode!==null&&ep(this.fromNode),this.toNode!==null&&ep(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof dr?a:null}},routeBounds:{get:function(){this.vg();var a=this.ml,y=1/0,x=1/0,E=this.pointsCount;if(E===0)a.h(NaN,NaN,0,0);else{if(E===1)E=this.i(0),y=Math.min(E.x,y),x=Math.min(E.y,x),a.h(E.x,E.y,0,0);else if(E===2){E=this.i(0);var b=this.i(1);y=Math.min(E.x,b.x),x=Math.min(E.y,b.y),a.h(E.x,E.y,0,0),a.Ye(b)}else if(this.computeCurve()===hl&&3<=E&&!this.isOrthogonal)if(b=this.i(0),y=b.x,x=b.y,a.h(y,x,0,0),E===3){E=this.i(1),y=Math.min(E.x,y),x=Math.min(E.y,x);var z=this.i(2);y=Math.min(z.x,y),x=Math.min(z.y,x),le.Dl(b.x,b.y,E.x,E.y,E.x,E.y,z.x,z.y,.5,a)}else for(z=3;z<E;z+=3){var tt=this.i(z-2);z+3>=E&&(z=E-1);var rt=this.i(z-1),ot=this.i(z);le.Dl(b.x,b.y,tt.x,tt.y,rt.x,rt.y,ot.x,ot.y,.5,a),y=Math.min(ot.x,y),x=Math.min(ot.y,x),b=ot}else for(b=this.i(0),z=this.i(1),y=Math.min(b.x,z.x),x=Math.min(b.y,z.y),a.h(b.x,b.y,0,0),a.Ye(z),b=2;b<E;b++)z=this.i(b),y=Math.min(z.x,y),x=Math.min(z.y,x),a.Ye(z);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new Tt)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||Ym(this);for(var a=this.cq=[],y=this.pointsCount,x=0;x<y-1;x++){var E=this.i(x),b=this.i(x+1);le.$(E.x,b.x)?(E=b.y-E.y,0>E&&(E=-E)):le.$(E.y,b.y)?(E=b.x-E.x,0>E&&(E=-E)):E=Math.sqrt(E.Bf(b)),a.push(E)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,E=a=0;E<x;E++)a+=y[E];this.vt=a}return a}},points:{get:function(){return this.Nb},set:function(a){var y=this.Nb;if(y!==a){var x=null;if(Array.isArray(a)){var E=a.length%2===0;if(E){for(var b=0;b<a.length;b++)if(typeof a[b]!="number"||isNaN(a[b])){E=!1;break}}if(E)for(x=new dn,E=0;E<a.length/2;E++)b=new Tt(a[2*E],a[2*E+1]).freeze(),x.add(b);else{for(E=!0,b=0;b<a.length;b++){var z=a[b];if(!_e(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){E=!1;break}}if(E)for(x=new dn,E=0;E<a.length;E++)b=a[E],x.add(new Tt(b.x,b.y).freeze())}}else if(a instanceof dn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else $t("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),Ym(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&hf(a.animationManager,this,x)),this.g("points",y,x)}}},pointsCount:{get:function(){return this.Nb.count}},fd:{get:function(){return(this.Qa&16)!==0},set:function(a){(this.Qa&16)!==0!==a&&(this.Qa^=16)}},suspendsRouting:{get:function(){return(this.Qa&32)!==0},set:function(a){(this.Qa&32)!==0!==a&&(this.Qa^=32)}},computingPoints:{get:function(){return(this.Qa&64)!==0},set:function(a){(this.Qa&64)!==0!==a&&(this.Qa^=64)}},defaultFromPoint:{get:function(){return this.o},set:function(a){this.o=a.copy()}},defaultToPoint:{get:function(){return this.u},set:function(a){this.u=a.copy()}},isOrthogonal:{get:function(){return(this.qj.value&2)===2}},isAvoiding:{get:function(){return(this.qj.value&4)===4}},lk:{get:function(){return(this.Qa&128)!==0},set:function(a){(this.Qa&128)!==0!==a&&(this.Qa^=128)}},geometry:{get:function(){if(!this.lk){if(this.vg(),2>this.pointsCount)return this.lk=!0,this.ua;this.ua=this.makeGeometry()}return this.ua}},firstPickIndex:{get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!jf(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!jf(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(),Qm(this,y===Th||y===Wf||a===Th||a===Wf),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(),Qm(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)}}}),Ln.prototype.invalidateOtherJumpOvers=Ln.prototype.Xo,Ln.prototype.findClosestSegment=Ln.prototype.ez,Ln.prototype.updateRoute=Ln.prototype.vg,Ln.prototype.invalidateRoute=Ln.prototype.bb,Ln.prototype.rollbackRoute=Ln.prototype.rv,Ln.prototype.commitRoute=Ln.prototype.zf,Ln.prototype.startRoute=Ln.prototype.uh,Ln.prototype.clearPoints=Ln.prototype.Fj,Ln.prototype.removePoint=Ln.prototype.pv,Ln.prototype.addPointAt=Ln.prototype.yf,Ln.prototype.addPoint=Ln.prototype.ne,Ln.prototype.insertPointAt=Ln.prototype.m,Ln.prototype.insertPoint=Ln.prototype.Kz,Ln.prototype.setPointAt=Ln.prototype.L,Ln.prototype.setPoint=Ln.prototype.dd,Ln.prototype.getPoint=Ln.prototype.i,Ln.prototype.getOtherPort=Ln.prototype.Cz,Ln.prototype.getOtherNode=Ln.prototype.To;var Rc=null,zc=null,Qv=new Ve(Ln,"Normal",1),Ex=new Ve(Ln,"Orthogonal",2),Ax=new Ve(Ln,"AvoidsNodes",6),e1=new Ve(Ln,"AvoidsNodesStraight",7),Ms=new Ve(Ln,"None",0),hl=new Ve(Ln,"Bezier",9),Th=new Ve(Ln,"JumpGap",10),Wf=new Ve(Ln,"JumpOver",11),rp=new Ve(Ln,"End",17),_m=new Ve(Ln,"Scale",18),qm=new Ve(Ln,"Stretch",19),op=new Ve(Ln,"OrientAlong",21),ap=new Ve(Ln,"OrientPlus90",22),sp=new Ve(Ln,"OrientMinus90",23),_v=new Ve(Ln,"OrientOpposite",24),$m=new Ve(Ln,"OrientUpright",25),lp=new Ve(Ln,"OrientPlus90Upright",26),up=new Ve(Ln,"OrientMinus90Upright",27),t0=new Ve(Ln,"OrientUpright45",28),n1=16,i1=14,hp=8;Ln.className="Link",Ln.Normal=Qv,Ln.Orthogonal=Ex,Ln.AvoidsNodes=Ax,Ln.AvoidsNodesStraight=e1,Ln.None=Ms,Ln.Bezier=hl,Ln.JumpGap=Th,Ln.JumpOver=Wf,Ln.End=rp,Ln.Scale=_m,Ln.Stretch=qm,Ln.OrientAlong=op,Ln.OrientPlus90=ap,Ln.OrientMinus90=sp,Ln.OrientOpposite=_v,Ln.OrientUpright=$m,Ln.OrientPlus90Upright=lp,Ln.OrientMinus90Upright=up,Ln.OrientUpright45=t0,Ln.EndSegmentStep=8,Ln.CurvinessStart=n1,Ln.SpacingMin=i1,Ln.OrthoShortCut=hp;function e0(a,y,x,E){Ri(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=E,this.links=[]}e0.prototype.Sl=function(){if(!this.qq){var a=this.links;0<a.length&&(a=a[0].diagram,a!==null&&(a.ow.add(this),this.Fe=a.undoManager.isUndoingRedoing))}this.qq=!0},e0.prototype.Nv=function(){if(this.qq){this.qq=!1;var a=this.links;if(0<a.length){var y=a[0],x=y.diagram;x=x===null||x.pi&&!this.Fe,this.Fe=!1,y.arrangeBundledLinks(a,x),a.length===1&&(y.Sf=null,a.length=0)}a.length===0&&(a=this.Ds,this!==null&&a.af!==null&&a.af.remove(this),a=this.cv,this!==null&&a.af!==null&&a.af.remove(this))}},e0.className="LinkBundle";function dp(a){Ri(this),this.Yx=this.group=null,this.vs=!0,this.abort=!1,this.Od=this.Nd=1,this.Fn=this.En=-1,this.rc=a.width,this.sc=a.height,this.ac=null,this.ei=this.di=0,this.Os=11,this.Ix=this.Hx=22}dp.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,E=a.y+a.height;if(this.Nd=Math.floor((a.x-this.rc)/this.rc)*this.rc,this.Od=Math.floor((y-this.sc)/this.sc)*this.sc,this.En=Math.ceil((x+2*this.rc)/this.rc)*this.rc,this.Fn=Math.ceil((E+2*this.sc)/this.sc)*this.sc,a=1+(Math.ceil((this.En-this.Nd)/this.rc)|0),y=1+(Math.ceil((this.Fn-this.Od)/this.sc)|0),this.ac===null||this.di<a-1||this.ei<y-1){for(x=[],E=0;E<=a;E++)x[E]=new Uint32Array(y);this.ac=x,this.di=a-1,this.ei=y-1}if(a=qv,this.ac!==null)for(y=0;y<=this.di;y++)if(x=this.ac[y],x.fill)x.fill(a);else for(E=0;E<=this.ei;E++)x[E]=a}};function Hf(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function Wu(a,y,x){return Hf(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):qv}function r1(a){if(a.ac!==null)for(var y=0;y<=a.di;y++)for(var x=a.ac[y],E=0;E<=a.ei;E++)x[E]>=tc&&(x[E]=qv)}dp.prototype.Yj=function(a,y,x,E){if(a>this.En||a+x<this.Nd||y>this.Fn||y+E<this.Od)return!0;a=(a-this.Nd)/this.rc|0,y=(y-this.Od)/this.sc|0,x=Math.max(0,x)/this.rc+1|0;var b=Math.max(0,E)/this.sc+1|0;if(0>a&&(x+=a,a=0),0>y&&(b+=y,y=0),0>x||0>b)return!0;for(E=Math.min(a+x-1,this.di)|0,x=Math.min(y+b-1,this.ei)|0;a<=E;a++){b=this.ac[a];for(var z=y;z<=x;z++)if(b[z]===Dh)return!1}return!0};function Hu(a,y,x,E,b,z,tt,rt,ot){if(!(y<z||y>tt||x<rt||x>ot)){var st=y|0,ut=x|0,ft=a.ac[st][ut];if(ft>=tc&&ft<Gf)for(b?ut+=E:st+=E,ft+=1;z<=st&&st<=tt&&rt<=ut&&ut<=ot&&!(ft>=a.ac[st][ut]);)a.ac[st][ut]=ft,ft+=1,b?ut+=E:st+=E;if(st=b?ut:st,b)if(0<E)for(x+=E;x<st;x+=E)Hu(a,y,x,1,!b,z,tt,rt,ot),Hu(a,y,x,-1,!b,z,tt,rt,ot);else for(x+=E;x>st;x+=E)Hu(a,y,x,1,!b,z,tt,rt,ot),Hu(a,y,x,-1,!b,z,tt,rt,ot);else if(0<E)for(y+=E;y<st;y+=E)Hu(a,y,x,1,!b,z,tt,rt,ot),Hu(a,y,x,-1,!b,z,tt,rt,ot);else for(y+=E;y>st;y+=E)Hu(a,y,x,1,!b,z,tt,rt,ot),Hu(a,y,x,-1,!b,z,tt,rt,ot)}}function n0(a,y,x,E,b,z,tt,rt,ot){y|=0,x|=0;var st=Dh,ut=tc;for(a.ac[y][x]=ut;st===Dh&&y>z&&y<tt&&x>rt&&x<ot;)ut+=1,a.ac[y][x]=ut,b?x+=E:y+=E,st=a.ac[y][x]}function i0(a,y,x,E,b,z,tt,rt,ot){y|=0,x|=0;var st=Dh,ut=Gf;for(a.ac[y][x]=ut;st===Dh&&y>z&&y<tt&&x>rt&&x<ot;)a.ac[y][x]=ut,b?x+=E:y+=E,st=a.ac[y][x]}function o1(a,y,x,E,b,z,tt){if(a.ac!==null){a.abort=!1;var rt=y.x,ot=y.y;if(Hf(a,rt,ot)){rt-=a.Nd,rt/=a.rc,ot-=a.Od,ot/=a.sc;var st=E.x,ut=E.y;if(Hf(a,st,ut))if(st-=a.Nd,st/=a.rc,ut-=a.Od,ut/=a.sc,1>=Math.abs(rt-st)&&1>=Math.abs(ot-ut))a.abort=!0;else{var ft=z.x;E=z.y,y=z.x+z.width;var vt=z.y+z.height;ft-=a.Nd,ft/=a.rc,E-=a.Od,E/=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,E|0)),vt=Math.min(a.ei,Math.max(0,vt|0)),E=a.ac,rt|=0,ot|=0,st|=0,ut|=0;var yt=x===0||x===90?1:-1;if(x=x===90||x===270,E[rt][ot]===Dh?(n0(a,rt,ot,yt,x,z,y,ft,vt),n0(a,rt,ot,1,!x,z,y,ft,vt),n0(a,rt,ot,-1,!x,z,y,ft,vt)):n0(a,rt,ot,yt,x,rt,ot,rt,ot),E[st][ut]===Dh?(i0(a,st,ut,b===0||b===90?1:-1,b===90||b===270,z,y,ft,vt),i0(a,st,ut,1,!(b===90||b===270),z,y,ft,vt),i0(a,st,ut,-1,!(b===90||b===270),z,y,ft,vt)):i0(a,st,ut,yt,x,st,ut,st,ut),x=Ei(),tt&&a1(a,st,ut,b,rt,ot,x))for((x[0]!==st||x[1]!==ut)&&(x.unshift(ut),x.unshift(st)),(x[x.length-2]!==rt||x[x.length-1]!==ot)&&(x.push(rt),x.push(ot)),a=tc,b=x[x.length-2],tt=x[x.length-1],E[b][tt]=a++,z=x.length-4;0<=z;z-=2)for(b=x[z+2],tt=x[z+3],y=x[z],st=x[z+1];y>b?b++:y<b?b--:st>tt?tt++:st<tt&&tt--,E[b][tt]=a++,b!==y||tt!==st;);else Hu(a,rt,ot,1,!1,z,y,ft,vt),Hu(a,rt,ot,-1,!1,z,y,ft,vt),Hu(a,rt,ot,1,!0,z,y,ft,vt),Hu(a,rt,ot,-1,!0,z,y,ft,vt);ri(x)}}}}function a1(a,y,x,E,b,z,tt){for(var rt=a.ac,ot=y,st=x;;){if(ot===b&&st===z)return!0;var ut=ot,ft=st;if(E===0)if(ut<b)ut++;else break;else if(E===90)if(ft<z)ft++;else break;else if(E===180)if(ut>b)ut--;else break;else if(ft>z)ft--;else break;var vt=rt[ut][ft];if(vt===0||vt===$v)break;ot=ut,st=ft}for(;;){if(ut=E,ft=ot,vt=st,E===0?vt<z?(ut=90,vt++):vt>z&&(ut=270,vt--):E===90?ft<b?(ut=0,ft++):ft>b&&(ut=180,ft--):E===180?vt<z?(ut=90,vt++):vt>z&&(ut=270,vt--):ft<b?(ut=0,ft++):ft>b&&(ut=180,ft--),ft=rt[ft][vt],ut!==E&&ft!==0&&ft!==$v){if(tt.push(ot),tt.push(st),a1(a,ot,st,ut,b,z,tt))return!0;tt.pop(),tt.pop()}if(rt[ot][st]=$v,E===0){if(ot===y)return!1;ot--}else if(E===90){if(st===x)return!1;st--}else if(E===180){if(ot===y)return!1;ot++}else{if(st===x)return!1;st++}}}Me.Object.defineProperties(dp.prototype,{bounds:{get:function(){return new ae(this.Nd,this.Od,this.En-this.Nd,this.Fn-this.Od)}},Ho:{get:function(){return this.rc},set:function(a){0<a&&a!==this.rc&&(this.rc=a,this.initialize(this.bounds))}},Go:{get:function(){return this.sc},set:function(a){0<a&&a!==this.sc&&(this.sc=a,this.initialize(this.bounds))}}});var Dh=0,tc=1,Gf=999999,qv=Gf+1,$v=Gf+2;dp.className="PositionArray";function jc(){Ri(this),this.port=this.node=null,this.pe=[],this.ap=!1}jc.prototype.toString=function(){for(var a=this.pe,y=this.node.toString()+" "+a.length.toString()+":",x=0;x<a.length;x++){var E=a[x];E!==null&&(y+=`
|
|
`+E.toString())}return y};function Fx(a,y,x,E){switch(y=y.offsetY,y){case 8:return 90;case 2:return 180;case 1:return 270;case 4:return 0}switch(y){case 9:return 180<x?270:90;case 6:return 90<x&&270>=x?180:0}switch(a=180*Math.atan2(a.height,a.width)/Math.PI,y){case 3:return x>a&&x<=180+a?180:270;case 5:return x>180-a&&x<=360-a?270:0;case 12:return x>a&&x<=180+a?90:0;case 10:return x>180-a&&x<=360-a?180:90;case 7:return 90<x&&x<=180+a?180:x>180+a&&x<=360-a?270:0;case 13:return 180<x&&x<=360-a?270:x>a&&180>=x?90:0;case 14:return x>a&&x<=180-a?90:x>180-a&&270>=x?180:0;case 11:return x>180-a&&x<=180+a?180:x>180+a?270:90}return E&&y!==15&&(x-=15,0>x&&(x+=360)),x>a&&x<180-a?90:x>=180-a&&x<=180+a?180:x>180+a&&x<360-a?270:0}jc.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 E=null,b=a.node,z=b instanceof ir?b:null;if(z===null||z.isSubGraphExpanded)var tt=b.isTreeExpanded?b.findLinksConnected(a.port.portId):b.qx();else{if(!z.actualBounds.w()){a.ap=x;break t}E=z,tt=E.Lu()}z=a.pe.length=0;var rt=a.port.ga(Wi,Tt.alloc()),ot=a.port.ga(hr,Tt.alloc());for(b=ae.allocAt(rt.x,rt.y,0,0),b.Ye(ot),Tt.free(rt),Tt.free(ot),rt=Tt.allocAt(b.x+b.width/2,b.y+b.height/2),ot=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(E),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 yt=vt.findVisibleNode();yt!==null&&yt!==vt&&(vt=yt,ut=vt.port),ut=st.computeOtherPoint(vt,ut),vt=rt.ab(ut),vt-=ot,0>vt?vt+=360:360<=vt&&(vt-=360),ft=Fx(b,ft,vt,st.isOrthogonal),ft===0?(ft=4,180<vt&&(vt-=360)):ft===90?(ft=8,270<vt&&(vt-=360)):ft===180?ft=2:(ft=1,90>vt&&(vt+=360)),yt=a.pe[z],yt===void 0?(yt=new ty(st,vt,ft),a.pe[z]=yt):(yt.link=st,yt.angle=vt,yt.Nc=ft),yt.hv.set(ut),z++}}}}for(Tt.free(rt),a.pe.sort(jc.prototype.j),ot=a.pe.length,E=-1,z=rt=0;z<ot;z++)tt=a.pe[z],tt!==void 0&&(tt.Nc!==E&&(E=tt.Nc,rt=0),tt.Uo=rt,rt++);for(E=-1,rt=0,z=ot-1;0<=z;z--)ot=a.pe[z],ot!==void 0&&(ot.Nc!==E&&(E=ot.Nc,rt=ot.Uo+1),ot.Gl=rt);if(z=a.pe,ft=a.port,E=a.node.portSpreading,rt=Tt.alloc(),ot=Tt.alloc(),tt=Tt.alloc(),st=Tt.alloc(),ft.ga(Wi,rt),ft.ga(fr,ot),ft.ga(hr,tt),ft.ga(Tr,st),yt=vt=ut=ft=0,E===Zv)for(var Pt=0;Pt<z.length;Pt++){var Et=z[Pt];if(Et!==null){var Vt=Et.link.computeThickness();switch(Et.Nc){case 8:vt+=Vt;break;case 2:yt+=Vt;break;case 1:ft+=Vt;break;default:case 4:ut+=Vt}}}var Rt=Pt=0,Qt=1,_t=Et=0;for(Vt=0;Vt<z.length;Vt++){var te=z[Vt];if(te!==null){if(Pt!==te.Nc){switch(Pt=te.Nc,Pt){case 8:var ue=tt;Rt=st;break;case 2:ue=st,Rt=rt;break;case 1:ue=rt,Rt=ot;break;default:case 4:ue=ot,Rt=tt}switch(Et=Rt.x-ue.x,_t=Rt.y-ue.y,Pt){case 8:vt>Math.abs(Et)?(Qt=Math.abs(Et)/vt,vt=Math.abs(Et)):Qt=1;break;case 2:yt>Math.abs(_t)?(Qt=Math.abs(_t)/yt,yt=Math.abs(_t)):Qt=1;break;case 1:ft>Math.abs(Et)?(Qt=Math.abs(Et)/ft,ft=Math.abs(Et)):Qt=1;break;default:case 4:ut>Math.abs(_t)?(Qt=Math.abs(_t)/ut,ut=Math.abs(_t)):Qt=1}Rt=0}var Ce=te.Zo;if(E===Zv){switch(te=te.link.computeThickness(),te*=Qt,Ce.set(ue),Pt){case 8:Ce.x=ue.x+Et/2+vt/2-Rt-te/2;break;case 2:Ce.y=ue.y+_t/2+yt/2-Rt-te/2;break;case 1:Ce.x=ue.x+Et/2-ft/2+Rt+te/2;break;default:case 4:Ce.y=ue.y+_t/2-ut/2+Rt+te/2}Rt+=te}else{var On=.5;E===Km&&(On=(te.Uo+1)/(te.Gl+1)),Ce.x=ue.x+Et*On,Ce.y=ue.y+_t*On}}}for(Tt.free(rt),Tt.free(ot),Tt.free(tt),Tt.free(st),ue=a.pe,z=0;z<ue.length;z++)E=ue[z],E!==null&&(E.Ju=a.computeEndSegmentLength(E));a.ap=x,ae.free(b)}x=a.pe}for(a=0;a<x.length;a++)if(b=x[a],b!==null&&b.link===y)return b;return null}jc.prototype.j=function(a,y){return a===y?0:a===null?-1:y===null?1:a.Nc<y.Nc?-1:a.Nc>y.Nc?1:a.angle<y.angle?-1:a.angle>y.angle?1:0},jc.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,Li,y.fromPort===this.port),E=a.Uo;if(0>E)return x;var b=a.Gl;if(1>=b||!y.isOrthogonal)return x;y=a.hv;var z=a.Zo;return(a.Nc===2||a.Nc===8)&&(E=b-1-E),((a=a.Nc===2||a.Nc===4)?y.y<z.y:y.x<z.x)?x+8*E:(a?y.y===z.y:y.x===z.x)?x:x+8*(b-1-E)},jc.className="Knot";function ty(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new Tt,this.Gl=this.Uo=0,this.Zo=new Tt,this.Ju=0}ty.prototype.toString=function(){return this.link.toString()+" "+this.angle.toString()+" "+this.Nc.toString()+":"+this.Uo.toString()+"/"+this.Gl.toString()+" "+this.Zo.toString()+" "+this.Ju.toString()+" "+this.hv.toString()},ty.className="LinkInfo";function _o(a){Ri(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new Tt(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}_o.prototype.cloneProtected=function(a){a.sn=this.sn,a.Gh=this.Gh,a.yn=this.yn,a.Am.assign(this.Am),a.vn=this.vn,a.un=this.un,a.Em=this.Em,a.xn=!0},_o.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},_o.prototype.qb=function(){},_o.prototype.toString=function(){var a=bi(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},_o.prototype.C=function(){if(this.isValidLayout){var a=this.diagram;if(a!==null&&!a.undoManager.isUndoingRedoing){var y=a.animationManager;!y.isTicking&&(y.defaultAnimation.isAnimating&&y.Cc(),this.isOngoing&&a.pi||this.isInitial&&!a.pi)&&(this.isValidLayout=!1,a.$b())}}},_o.prototype.createNetwork=function(){return new To(this)},_o.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof ke?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof ir?y.lg(a.memberParts):y.lg(a.iterator),y},_o.prototype.updateParts=function(){this.isValidLayout=!0;var a=this.diagram;if(a===null&&this.network!==null)for(var y=this.network.vertexes.iterator;y.next();){var x=y.value.node;if(x!==null&&(a=x.diagram,a!==null))break}try{a!==null&&a.Ea("Layout"),this.commitLayout()}finally{a!==null&&a.eb("Layout")}},_o.prototype.commitLayout=function(){if(this.network!==null){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();if(this.isRouting)for(a=this.network.edges.iterator;a.next();)a.value.commit()}},_o.prototype.doLayout=function(a){var y=new cn;a instanceof ke?(dd(this,y,a.nodes,!0,this.rh,!0,!1,!0),dd(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof ir?dd(this,y,a.memberParts,!1,this.rh,!0,!1,!0):y.addAll(a.iterator),0<y.count&&(a=this.diagram,a!==null&&a.Ea("Layout"),this.doMinimalNoNetworkLayout(y),a!==null&&a.eb("Layout")),this.isValidLayout=!0},_o.prototype.doMinimalNoNetworkLayout=function(a){var y=Math.ceil(Math.sqrt(a.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var x=this.arrangementOrigin.x,E=x,b=this.arrangementOrigin.y,z=0,tt=0;for(a=a.iterator;a.next();){var rt=a.value;cp(rt);var ot=rt.measuredBounds,st=ot.width;ot=ot.height,rt.moveTo(E,b),rt instanceof ir&&(rt.rh=!1),E+=Math.max(st,50)+20,tt=Math.max(tt,Math.max(ot,50)),z>=y-1?(z=0,E=x,b+=tt+20,tt=0):z++}},_o.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var y=this.arrangementOrigin.x,x=y,E=this.arrangementOrigin.y,b=0,z=0,tt=this.network.vertexes.iterator;tt.next();){var rt=tt.value.node;if(!(rt===null||rt instanceof Ln)&&(cp(rt),this.rh(rt))){var ot=rt.measuredBounds,st=ot.width;ot=ot.height,rt.moveTo(x,E),rt instanceof ir&&(rt.rh=!1),x+=Math.max(st,50)+20,z=Math.max(z,Math.max(ot,50)),b>=a-1?(b=0,x=y,E+=z+20,z=0):b++}}},_o.prototype.rh=function(a){return!!(!a.location.w()||a instanceof ir&&a.rh)};function dd(a,y,x,E,b,z,tt,rt){for(x=x.iterator;x.next();){var ot=x.value;E&&!ot.isTopLevel||b!==null&&!b(ot)||!ot.canLayout()||(z&&ot instanceof Hn?ot.isLinkLabel||(ot instanceof ir&&ot.layout===null?dd(a,y,ot.memberParts,!1,b,z,tt,rt):(cp(ot),y.add(ot))):tt&&ot instanceof Ln?y.add(ot):!rt||!ot.Zc()||ot instanceof Hn||(cp(ot),y.add(ot)))}}function cp(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}_o.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new ae),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},_o.prototype.ex=function(a){var y=new cn;return a instanceof ke?(dd(this,y,a.nodes,!0,null,!0,!0,!0),dd(this,y,a.links,!0,null,!0,!0,!0),dd(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof ir?dd(this,y,a.memberParts,!1,null,!0,!0,!0):dd(this,y,a.iterator,!1,null,!0,!0,!0),y},_o.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(Wi),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},Me.Object.defineProperties(_o.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())}}}),_o.prototype.collectParts=_o.prototype.ex,_o.prototype.getLayoutBounds=_o.prototype.ni,_o.prototype.invalidateLayout=_o.prototype.C,_o.className="Layout";function To(a){Ri(this),this.Sc=a,this.wf=new cn,this.ye=new cn,this.Es=new be,this.zs=new be}To.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 cn,this.ye=new cn,this.Es=new be,this.zs=new be},To.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutNetwork"+(this.layout!==null?"("+this.layout.toString()+")":"");if(0>=a)return y;if(y+=" vertexes: "+this.wf.count+" edges: "+this.ye.count,1<a){for(var x=this.wf.iterator;x.next();)y+=`
|
|
`+x.value.toString(a-1);for(x=this.ye.iterator;x.next();)y+=`
|
|
`+x.value.toString(a-1)}return y},To.prototype.createVertex=function(){return new ba(this)},To.prototype.createEdge=function(){return new tl(this)},To.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(tt){if(tt instanceof Hn)return!tt.isLinkLabel;if(tt instanceof Ln){var rt=tt.fromNode;return rt===null||rt.isLinkLabel?!1:(tt=tt.toNode,!(tt===null||tt.isLinkLabel))}return!1}),a=a.iterator;a.next();){var E=a.value;if(E instanceof Hn&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)){if(E instanceof ir&&E.layout===null)this.lg(E.memberParts,!1);else if(this.ki(E)===null){var b=this.createVertex();b.node=E,this.dh(b)}}}for(a.reset();a.next();)if(E=a.value,E instanceof Ln&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)&&this.Lo(E)===null){var z=E.fromNode;b=E.toNode,z!==null&&b!==null&&z!==b&&(z=this.findGroupVertex(z),b=this.findGroupVertex(b),z!==null&&b!==null&&this.Zj(z,b,E))}}},To.prototype.findGroupVertex=function(a){if(a===null)return null;var y=a.findVisibleNode();if(y===null)return null;if(a=this.ki(y),a!==null)return a;for(y=y.containingGroup;y!==null;){if(a=this.ki(y),a!==null)return a;y=y.containingGroup}return null},Ct=To.prototype,Ct.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},Ct.Bl=function(a){if(a===null)return null;var y=this.ki(a);return y===null&&(y=this.createVertex(),y.node=a,this.dh(y)),y},Ct.Iu=function(a){if(a!==null&&l1(this,a)){for(var y=a.tg,x=y.count-1;0<=x;x--){var E=y.M(x);this.Mj(E)}for(y=a.mg,a=y.count-1;0<=a;a--)x=y.M(a),this.Mj(x)}};function l1(a,y){if(y===null)return!1;var x=a.wf.remove(y);return x&&(y=y.node,y!==null&&a.Es.remove(y)),x}Ct.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},Ct.ki=function(a){return a===null?null:this.Es.I(a)},Ct.Bo=function(a){if(a!==null){ey(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function ey(a,y){if(y!==null){a.ye.add(y);var x=y.link;x!==null&&a.Lo(x)===null&&a.zs.add(x,y),y.network=a}}Ct.Dy=function(a){if(a===null)return null;var y=a.fromNode,x=a.toNode,E=this.Lo(a);return E===null?(E=this.createEdge(),E.link=a,y!==null&&(E.fromVertex=this.Bl(y)),x!==null&&(E.toVertex=this.Bl(x)),this.Bo(E)):(y!==null?E.fromVertex=this.Bl(y):E.fromVertex=null,x!==null?E.toVertex=this.Bl(x):E.toVertex=null),E},Ct.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),ny(this,a)}};function ny(a,y){y!==null&&a.ye.remove(y)&&(y=y.link,y!==null&&a.zs.remove(y))}Ct.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},Ct.Lo=function(a){return a===null?null:this.zs.I(a)},Ct.Zj=function(a,y,x){if(a===null||y===null)return null;if(a.network===this&&y.network===this){var E=this.createEdge();return E.link=x,E.fromVertex=a,E.toVertex=y,this.Bo(E),E}return null},Ct.gm=function(a){if(a!==null){var y=a.fromVertex,x=a.toVertex;y!==null&&x!==null&&(y.Jl(a),x.Kl(a),a.gm(),y.Cl(a),x.zl(a))}},Ct.Ko=function(){for(var a=Ei(),y=this.ye.iterator;y.next();){var x=y.value;x.fromVertex===x.toVertex&&a.push(x)}for(y=a.length,x=0;x<y;x++)this.Mj(a[x]);ri(a)},To.prototype.deleteArtificialVertexes=function(){for(var a=Ei(),y=this.wf.iterator;y.next();){var x=y.value;x.node===null&&x.data===null&&a.push(x)}for(x=a.length,y=0;y<x;y++)this.Iu(a[y]);for(y=Ei(),x=this.ye.iterator;x.next();){var E=x.value;E.link===null&&E.data===null&&y.push(E)}for(x=y.length,E=0;E<x;E++)this.Mj(y[E]);ri(a),ri(y)};function bx(a){for(var y=Ei(),x=a.ye.iterator;x.next();){var E=x.value;E.fromVertex!==null&&E.toVertex!==null||y.push(E)}for(x=y.length,E=0;E<x;E++)a.Mj(y[E]);ri(y)}To.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),bx(this),this.Ko()),a=new dn;for(var y=!0;y;){y=!1;for(var x=this.wf.iterator;x.next();){var E=x.value;if(0<E.tg.count||0<E.mg.count){y=this.layout.createNetwork(),a.add(y),iy(this,y,E),y=!0;break}}}return a.sort(function(b,z){return b===null||z===null||b===z?0:z.vertexes.count-b.vertexes.count}),a};function iy(a,y,x){if(x!==null&&x.network!==y){l1(a,x),y.dh(x);for(var E=x.sourceEdges;E.next();){var b=E.value;b.network!==y&&(ny(a,b),ey(y,b),iy(a,y,b.fromVertex))}for(E=x.destinationEdges;E.next();)x=E.value,x.network!==y&&(ny(a,x),ey(y,x),iy(a,y,x.toVertex))}}To.prototype.dz=function(){for(var a=new cn,y=this.wf.iterator;y.next();)a.add(y.value.node);for(y=this.ye.iterator;y.next();)a.add(y.value.link);return a},Me.Object.defineProperties(To.prototype,{layout:{get:function(){return this.Sc},set:function(a){a!==null&&(this.Sc=a)}},vertexes:{get:function(){return this.wf}},edges:{get:function(){return this.ye}}}),To.prototype.findAllParts=To.prototype.dz,To.prototype.splitIntoSubNetworks=To.prototype.Zx,To.prototype.deleteSelfEdges=To.prototype.Ko,To.prototype.reverseEdge=To.prototype.gm,To.prototype.linkVertexes=To.prototype.Zj,To.prototype.findEdge=To.prototype.Lo,To.prototype.deleteLink=To.prototype.Yy,To.prototype.deleteEdge=To.prototype.Mj,To.prototype.addLink=To.prototype.Dy,To.prototype.addEdge=To.prototype.Bo,To.prototype.findVertex=To.prototype.ki,To.prototype.deleteNode=To.prototype.Zy,To.prototype.deleteVertex=To.prototype.Iu,To.prototype.addNode=To.prototype.Bl,To.prototype.addVertex=To.prototype.dh,To.prototype.addParts=To.prototype.lg,To.className="LayoutNetwork";function ba(a){Ri(this),this.ob=a,this.j=new ae(0,0,10,10).freeze(),this.o=new Tt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new dn,this.mg=new dn}ba.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new dn,this.mg=new dn},ba.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+xr(this);if(0<a&&(y+=this.node!==null?"("+this.node.toString()+")":"",1<a)){a="";for(var x=!0,E=this.tg.iterator;E.next();){var b=E.value;x?x=!1:a+=",",a+=b.toString(0)}for(b="",x=!0,E=this.mg.iterator;E.next();){var z=E.value;x?x=!1:b+=",",b+=z.toString(0)}y+=" sources: "+a+" destinations: "+b}return y},ba.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;_e(x)?(x.x=y.x,x.y=y.y,x.width=y.width,x.height=y.height):a.bounds=y.copy()}else if(a=this.node,a!==null){if(y=this.bounds,!(a instanceof ir)){x=ae.alloc(),a.Va();var E=this.network.layout.ni(a,x),b=a.locationObject.ga(fi);if(E.w()&&b.w()){a.moveTo(y.x+this.focusX-(b.x-E.x),y.y+this.focusY-(b.y-E.y)),ae.free(x);return}ae.free(x)}a.moveTo(y.x,y.y)}},ba.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},ba.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},ba.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},ba.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function ry(a,y){return a=a.Sh,y=y.Sh,a?y?(a=a.text,y=y.text,a<y?-1:a>y?1:0):1:y!==null?-1:0}Me.Object.defineProperties(ba.prototype,{sourceEdgesArrayAccess:{get:function(){return this.tg._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.mg._dataArray}},data:{get:function(){return this.ub},set:function(a){if(this.ub=a,a!==null&&a.bounds){var y=a.bounds;a=y.x;var x=y.y,E=y.width;y=y.height,this.o.h(E/2,y/2),this.j.h(a,x,E,y)}}},node:{get:function(){return this.Sh},set:function(a){if(this.Sh!==a){this.Sh=a,a.Va();var y=this.network.layout,x=ae.alloc(),E=y.ni(a,x);y=E.x;var b=E.y,z=E.width;if(E=E.height,isNaN(y)&&(y=0),isNaN(b)&&(b=0),this.j.h(y,b,z,E),ae.free(x),!(a instanceof ir)&&(a=a.locationObject.ga(fi),a.w())){this.o.h(a.x-y,a.y-b);return}this.o.h(z/2,E/2)}}},bounds:{get:function(){return this.j},set:function(a){this.j.D(a)||this.j.assign(a)}},focus:{get:function(){return this.o},set:function(a){this.o.D(a)||this.o.assign(a)}},centerX:{get:function(){return this.j.x+this.o.x},set:function(a){var y=this.j;y.x+this.o.x!==a&&(y.ka(),y.x=a-this.o.x,y.freeze())}},centerY:{get:function(){return this.j.y+this.o.y},set:function(a){var y=this.j;y.y+this.o.y!==a&&(y.ka(),y.y=a-this.o.y,y.freeze())}},focusX:{get:function(){return this.o.x},set:function(a){var y=this.o;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},focusY:{get:function(){return this.o.y},set:function(a){var y=this.o;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},x:{get:function(){return this.j.x},set:function(a){var y=this.j;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},y:{get:function(){return this.j.y},set:function(a){var y=this.j;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},width:{get:function(){return this.j.width},set:function(a){var y=this.j;y.width!==a&&(y.ka(),y.width=a,y.freeze())}},height:{get:function(){return this.j.height},set:function(a){var y=this.j;y.height!==a&&(y.ka(),y.height=a,y.freeze())}},network:{get:function(){return this.ob},set:function(a){this.ob=a}},sourceVertexes:{get:function(){for(var a=new cn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new cn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new cn,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 dn,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}}}),ba.prototype.deleteDestinationEdge=ba.prototype.Jl,ba.prototype.addDestinationEdge=ba.prototype.zl,ba.prototype.deleteSourceEdge=ba.prototype.Kl,ba.prototype.addSourceEdge=ba.prototype.Cl,ba.className="LayoutVertex",ba.standardComparer=ry,ba.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.Sh;var x=y.Sh;if(a!==null){if(x!==null){for(y=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),a=x.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),x=0;x<y.length;x++)if(a[x]!==""&&a[x]!==void 0){var E=parseFloat(y[x]),b=parseFloat(a[x]);if(isNaN(E))if(isNaN(b)){if(y[x].localeCompare(a[x])!==0)return y[x].localeCompare(a[x])}else return 1;else{if(isNaN(b))return-1;if(E-b!==0)return E-b}}else if(y[x]!=="")return 1;return a[x]!==""&&a[x]!==void 0?-1:0}return 1}return x!==null?-1:0}return 1}return y!==null?-1:0};function tl(a){Ri(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}tl.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},tl.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+xr(this);return 0<a&&(y+=this.$k!==null?"("+this.$k.toString()+")":"",1<a&&(y+=" "+(this.kd?this.kd.toString():"null")+" --> "+(this.qd?this.qd.toString():"null"))),y},tl.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},tl.prototype.commit=function(){},tl.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},Me.Object.defineProperties(tl.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)}}}),tl.prototype.getOtherVertex=tl.prototype.Ax,tl.className="LayoutEdge";function Ua(a){_o.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new Ut(NaN,NaN).freeze(),this.tf=new Ut(10,10).freeze(),this.Jb=fp,this.Rb=o0,this.nd=gp,this.hd=u1,a&&Object.assign(this,a)}Oe(Ua,_o),Ua.prototype.cloneProtected=function(a){_o.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},Ua.prototype.qb=function(a){a.classType===Ua?a===gp||a===s0||a===oy||a===a0?this.sorting=a:a===o0||a===au?this.arrangement=a:a===fp||a===r0?this.alignment=a:$t("Unknown enum value: "+a):_o.prototype.qb.call(this,a)},Ua.prototype.doLayout=function(a){this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var y=this.ex(a);a=this.diagram;for(var x=y.copy().iterator;x.next();){var E=x.value;if(!E.ph()||E.fromNode===null&&E.toNode===null){if(E.Va(),E instanceof ir)for(E=E.memberParts;E.next();)y.remove(E.value)}else y.remove(E)}var b=y.Fa();if(b.length!==0){switch(this.sorting){case a0:b.reverse();break;case gp:b.sort(this.comparer);break;case s0:b.sort(this.comparer),b.reverse()}var z=this.wrappingColumn;isNaN(z)&&(z=0);var tt=this.wrappingWidth;switch(isNaN(tt)&&a!==null?(y=a.padding,tt=Math.max(a.viewportBounds.width-y.left-y.right,0)):tt=Math.max(this.wrappingWidth,0),0>=z&&0>=tt&&(z=1),y=this.spacing.width,isFinite(y)||(y=0),x=this.spacing.height,isFinite(x)||(x=0),a!==null&&a.Ea("Layout"),E=[],this.alignment){case r0:var rt=y,ot=x,st=ae.alloc(),ut=Math.max(this.cellSize.width,1);if(!isFinite(ut))for(var ft=ut=0;ft<b.length;ft++){var vt=this.ni(b[ft],st);ut=Math.max(ut,vt.width)}if(ut=Math.max(ut+rt,1),ft=Math.max(this.cellSize.height,1),!isFinite(ft))for(vt=ft=0;vt<b.length;vt++){var yt=this.ni(b[vt],st);ft=Math.max(ft,yt.height)}ft=Math.max(ft+ot,1),vt=this.arrangement;for(var Pt=yt=this.arrangementOrigin.x,Et=this.arrangementOrigin.y,Vt=0,Rt=0,Qt=0;Qt<b.length;Qt++){var _t=b[Qt],te=this.ni(_t,st),ue=Math.ceil((te.width+rt)/ut)*ut,Ce=Math.ceil((te.height+ot)/ft)*ft;switch(vt){case au:var On=Math.abs(Pt-te.width);break;default:On=Pt+te.width}switch((0<z&&Vt>z-1||0<tt&&0<Vt&&On-yt>tt)&&(E.push(new ae(0,Et,tt+rt,Rt)),Vt=0,Pt=yt,Et+=Rt,Rt=0),Rt=Math.max(Rt,Ce),vt){case au:te=-te.width;break;default:te=0}switch(_t.moveTo(Pt+te,Et),vt){case au:Pt-=ue;break;default:Pt+=ue}Vt++}E.push(new ae(0,Et,tt+rt,Rt)),ae.free(st);break;case fp:for(ot=tt,ut=z,ft=y,vt=x,tt=ae.alloc(),yt=Math.max(this.cellSize.width,1),z=Et=st=0,rt=Tt.alloc(),Pt=0;Pt<b.length;Pt++)Rt=b[Pt],Vt=this.ni(Rt,tt),Rt=Fh(Rt,Rt.locationObject,Rt.locationSpot,rt),st=Math.max(st,Rt.x),Et=Math.max(Et,Vt.width-Rt.x),z=Math.max(z,Rt.y);switch(Pt=this.arrangement,Pt){case au:st+=ft;break;default:Et+=ft}yt=isFinite(yt)?Math.max(yt+ft,1):Math.max(st+Et,1);var li=Rt=this.arrangementOrigin.x;for(Qt=this.arrangementOrigin.y,Et=0,ot>=st&&(ot-=st),st=_t=0,ue=Math.max(this.cellSize.height,1),te=z=0,Ce=!0,Vt=Tt.alloc(),On=0;On<b.length;On++){var ti=b[On],Cn=this.ni(ti,tt),qe=Fh(ti,ti.locationObject,ti.locationSpot,rt);if(0<Et)switch(Pt){case au:li=(li-Rt-(Cn.width-qe.x))/yt,li=le.$(Math.round(li),li)?Math.round(li):Math.floor(li),li=li*yt+Rt;break;default:li=(li-Rt+qe.x)/yt,li=le.$(Math.round(li),li)?Math.round(li):Math.ceil(li),li=li*yt+Rt}else switch(Pt){case au:_t=li+qe.x+Cn.width;break;default:_t=li-qe.x}switch(Pt){case au:var er=-(li+qe.x)+_t;break;default:er=li+Cn.width-qe.x-_t}if(0<ut&&Et>ut-1||0<ot&&0<Et&&er>ot){for(E.push(new ae(0,Ce?Qt-z:Qt,ot+ft,te+z+vt)),li=0;li<Et&&On!==Et;li++){er=b[On-Et+li];var Ui=Fh(er,er.locationObject,er.locationSpot,Vt);er.moveTo(er.position.x,er.position.y+z-Ui.y)}te+=vt,Qt=Ce?Qt+te:Qt+(te+z),Et=te=z=0,li=Rt,Ce=!1}switch(li===Rt&&(st=Pt===au?Math.max(st,Cn.width-qe.x):Math.min(st,-qe.x)),z=Math.max(z,qe.y),te=Math.max(te,Cn.height-qe.y),isFinite(ue)&&(te=Math.max(te,Math.max(Cn.height,ue)-qe.y)),Ce?ti.moveTo(li-qe.x,Qt-qe.y):ti.moveTo(li-qe.x,Qt),Pt){case au:li-=qe.x+ft;break;default:li+=Cn.width-qe.x+ft}Et++}if(E.push(new ae(0,Qt,ot+ft,(Ce?te:te+z)+vt)),b.length!==Et)for(ot=0;ot<Et;ot++)ut=b[b.length-Et+ot],ft=Fh(ut,ut.locationObject,ut.locationSpot,rt),ut.moveTo(ut.position.x,ut.position.y+z-ft.y);if(Tt.free(rt),Tt.free(Vt),Pt===au)for(b=0;b<E.length;b++)z=E[b],z.width+=st,z.x-=st;else for(b=0;b<E.length;b++)z=E[b],z.x>st&&(z.width+=z.x-st,z.x=st);ae.free(tt)}for(rt=z=tt=b=0;rt<E.length;rt++)ot=E[rt],b=Math.min(b,ot.x),tt=Math.min(tt,ot.y),z=Math.max(z,ot.x+ot.width);this.arrangement===au?this.commitLayers(E,new Tt(b+y/2-(z+b),tt-x/2)):this.commitLayers(E,new Tt(b-y/2,tt-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},Ua.prototype.commitLayers=function(){};function u1(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}Me.Object.defineProperties(Ua.prototype,{wrappingWidth:{get:function(){return this.zo},set:function(a){this.zo!==a&&(0<a||isNaN(a))&&(this.zo=a,this.isViewportSized=isNaN(a),this.C())}},wrappingColumn:{get:function(){return this.yo},set:function(a){this.yo!==a&&(0<a||isNaN(a))&&(this.yo=a,this.C())}},cellSize:{get:function(){return this.yg},set:function(a){this.yg.D(a)||(this.yg.assign(a),this.C())}},spacing:{get:function(){return this.tf},set:function(a){this.tf.D(a)||(this.tf.assign(a),this.C())}},alignment:{get:function(){return this.Jb},set:function(a){this.Jb===a||a!==fp&&a!==r0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==o0&&a!==au||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==oy&&a!==a0&&a!==gp&&a!==s0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var r0=new Ve(Ua,"Position",0),fp=new Ve(Ua,"Location",1),o0=new Ve(Ua,"LeftToRight",2),au=new Ve(Ua,"RightToLeft",3),oy=new Ve(Ua,"Forward",4),a0=new Ve(Ua,"Reverse",5),gp=new Ve(Ua,"Ascending",6),s0=new Ve(Ua,"Descending",7);Ua.className="GridLayout",Ua.standardComparer=u1,Ua.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),y=y.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);for(var x=0;x<a.length;x++)if(y[x]!==""&&y[x]!==void 0){var E=parseFloat(a[x]),b=parseFloat(y[x]);if(isNaN(E))if(isNaN(b)){if(a[x].localeCompare(y[x])!==0)return a[x].localeCompare(y[x])}else return 1;else{if(isNaN(b))return-1;if(E-b!==0)return E-b}}else if(a[x]!=="")return 1;return y[x]!==""&&y[x]!==void 0?-1:0}return 1}return y!==null?-1:0},Ua.Position=r0,Ua.Location=fp,Ua.LeftToRight=o0,Ua.RightToLeft=au,Ua.Forward=oy,Ua.Reverse=a0,Ua.Ascending=gp,Ua.Descending=s0;function oo(){this.On=new cn,this.Dn=new cn,this.Pa=new cn,this.cf=new be,this.bf=new be,this.aj=new be,this.H=null,this.tp=!1}Ct=oo.prototype,Ct.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},Ct.Xe=function(a){this.H=a},Ct.oi=function(a){if(a instanceof Hn){if(this.On.add(a),a instanceof ir){var y=a.containingGroup;y===null?this.H.ai.add(a):y.gl.add(a),y=a.layout,y!==null&&(y.diagram=this.H)}}else a instanceof Ln?this.Dn.add(a):a instanceof Zr||this.Pa.add(a);y=a.data,y===null||a instanceof Zr||(a instanceof Ln?this.bf.add(y,a):this.cf.add(y,a))},Ct.pc=function(a){if(a.Ej(),a instanceof Hn){if(this.On.remove(a),a instanceof ir){var y=a.containingGroup;y===null?this.H.ai.remove(a):y.gl.remove(a),y=a.layout,y!==null&&(y.diagram=null)}}else a instanceof Ln?this.Dn.remove(a):a instanceof Zr||this.Pa.remove(a);y=a.data,y===null||a instanceof Zr||(a instanceof Ln?this.bf.remove(y):this.cf.remove(y))},Ct.Wd=function(){var a=this.H;if(a!==null){for(var y=a.nodeTemplateMap.iterator;y.next();){var x=y.value,E=y.key;(!x.Zc()||x instanceof ir)&&$t('Invalid node template in Diagram.nodeTemplateMap: template for "'+E+'" must be a Node or a simple Part, not a Group or Link: '+x)}for(y=a.groupTemplateMap.iterator;y.next();)x=y.value,E=y.key,x instanceof ir||$t('Invalid group template in Diagram.groupTemplateMap: template for "'+E+'" must be a Group, not a normal Node or Link: '+x);for(y=a.linkTemplateMap.iterator;y.next();)x=y.value,E=y.key,x instanceof Ln||$t('Invalid link template in Diagram.linkTemplateMap: template for "'+E+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Ei(),x=a.selection.iterator;x.next();)(E=x.value.data)&&y.push(E);for(x=Ei(),a=a.highlighteds.iterator;a.next();)(E=a.value.data)&&x.push(E);for(a=Ei(),E=this.nodes.iterator;E.next();){var b=E.value;b.data!==null&&(a.push(b.data),a.push(b.location))}for(E=this.links.iterator;E.next();)b=E.value,b.data!==null&&(a.push(b.data),a.push(b.location));for(E=this.parts.iterator;E.next();)b=E.value,b.data!==null&&(a.push(b.data),a.push(b.location));for(this.removeAllModeledParts(),this.addAllModeledParts(),E=0;E<y.length;E++)b=this.Lc(y[E]),b!==null&&(b.isSelected=!0);for(E=0;E<x.length;E++)b=this.Lc(x[E]),b!==null&&(b.isHighlighted=!0);for(E=0;E<a.length;E+=2)b=this.Lc(a[E]),b!==null&&(b.location=a[E+1]);ri(y),ri(x),ri(a)}},oo.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},oo.prototype.addModeledParts=function(a,y){var x=this,E=this.diagram.model;a.forEach(function(b){E.lb(b)&&h1(x,b,!1)}),a.forEach(function(b){E.lb(b)&&x.resolveReferencesForData(b)}),y!==!1&&vf(this.diagram,!1)};function h1(a,y,x){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.cf.contains(y)){x===void 0&&(x=!0);t:{if(y!=null&&!a.H.undoManager.isUndoingRedoing&&!a.cf.contains(y)){var E=a.Ro(y),b=d1(a,y,E);if(b!==null&&(Rl(b),b=b.copy(),b!==null)){var z=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,b.Tf=E,b.ub=y,a.tp&&(b.Jg="Tool"),a.diagram.add(b),b.ub=null,b.data=y,a.diagram.skipsModelSourceBindings=z,E=b;break t}}E=null}E!==null&&x&&a.resolveReferencesForData(y)}}oo.prototype.insertLink=function(){return null},oo.prototype.resolveReferencesForData=function(){},oo.prototype.Ro=function(a){return this.H.model.Ro(a)};function d1(a,y,x){a=a.H;var E=a.model;return E.Xj()&&E.Yu(y)?(y=a.groupTemplateMap.I(x),y===null&&(y=a.groupTemplateMap.I(""),y===null&&(g1||(g1=!0,Bi('No Group template found for category "'+x+'"'),Bi(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(f1||(f1=!0,Bi('No Node template found for category "'+x+'"'),Bi(" Using default node template")),y=a.ny))),y}oo.prototype.getLinkCategoryForData=function(){return""},oo.prototype.setLinkCategoryForData=function(){},oo.prototype.setFromNodeForLink=function(){},oo.prototype.setToNodeForLink=function(){},oo.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(p1||(p1=!0,Bi('No Link template found for category "'+a+'"'),Bi(" Using default link template")),x=y.my)),x},oo.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},oo.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},oo.prototype.ip=function(a){a=this.Lc(a),a!==null&&(Ag(this.diagram,a,!1),this.unresolveReferencesForPart(a))},oo.prototype.unresolveReferencesForPart=function(){},oo.prototype.removeDataForLink=function(){},oo.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},oo.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof Hn?a:null)},oo.prototype.findLinkForKey=function(){return null},Ct=oo.prototype,Ct.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},Ct.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof Hn?a:null)},Ct.Kc=function(a){return a===null?null:this.bf.I(a)},Ct.ms=function(a){for(var y=0;y<arguments.length;++y);y=new cn;for(var x=this.On.iterator;x.next();){var E=x.value,b=E.data;if(b!==null)for(var z=0;z<arguments.length;z++){var tt=arguments[z];if(_e(tt)&&ay(this,b,tt)){y.add(E);break}}}return y.iterator},Ct.ls=function(a){for(var y=0;y<arguments.length;++y);y=new cn;for(var x=this.Dn.iterator;x.next();){var E=x.value,b=E.data;if(b!==null)for(var z=0;z<arguments.length;z++){var tt=arguments[z];if(_e(tt)&&ay(this,b,tt)){y.add(E);break}}}return y.iterator};function ay(a,y,x){for(var E in x){var b=y[E],z=x[E];if(un(z)){if(!un(b)||b.length<z.length)return!1;for(var tt=0;tt<b.length;tt++){var rt=z[tt];if(rt!==void 0&&!c1(a,b[tt],rt))return!1}}else if(!c1(a,b,z))return!1}return!0}function c1(a,y,x){if(typeof x=="function"){if(!x(y))return!1}else if(x instanceof RegExp){if(!y||!x.test(y.toString()))return!1}else if(_e(y)&&_e(x)){if(!ay(a,y,x))return!1}else if(y!==x)return!1;return!0}oo.prototype.doModelChanged=function(a){if(this.H){var y=this.H;if(a.model===y.model){var x=a.change;if(y.doModelChanged(a),y.aa){y.aa=!1;try{var E=a.modelChange;if(E!=="")if(x===Eo){if(E==="nodeCategory"){var b=this.Lc(a.object),z=a.newValue;b!==null&&typeof z=="string"&&(b.category=z)}else E==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===Xo){var tt=a.newValue;E==="nodeDataArray"&&_e(tt)&&h1(this,tt),y.isModified=!0}else if(x===ua){var rt=a.oldValue;E==="nodeDataArray"&&_e(rt)&&this.ip(rt),y.isModified=!0}else x===La&&(E==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):E==="ModelDisplaced"&&this.Wd());else if(x===Eo){var ot=a.propertyName,st=a.object;st===y.model?(ot==="nodeKeyProperty"||ot==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(st,ot),y.isModified=!0}else if(x===Xo||x===ua){var ut=a.change===Xo,ft=ut?a.newParam:a.oldParam,vt=ut?a.newValue:a.oldValue,yt=this.aj.I(a.object);if(Array.isArray(yt))for(a=0;a<yt.length;a++){var Pt=yt[a];if(ut)Mm(Pt,vt,ft,!0);else if(!(0>ft)){var Et=ft+Jg(Pt);Pt.pc(Et,!0),xv(Pt,Et,ft)}}y.isModified=!0}}finally{y.aa=!0}}}}},oo.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)},oo.prototype.rp=function(){for(var a=this.H.model,y=new cn,x=a.nodeDataArray,E=0;E<x.length;E++)y.add(x[E]);var b=[];for(this.nodes.each(function(tt){tt.data===null||y.contains(tt.data)||b.push(tt.data)}),this.parts.each(function(tt){tt.data===null||y.contains(tt.data)||b.push(tt.data)}),b.forEach(function(tt){L1(a,tt,!1)}),E=0;E<x.length;E++){var z=x[E];this.Lc(z)===null&&C1(a,z,!1)}for(this.refreshDataBoundLinks(),x=this.parts.iterator;x.next();)x.value.updateRelationshipsFromData();for(x=this.nodes.iterator;x.next();)x.value.updateRelationshipsFromData();for(x=this.links.iterator;x.next();)x.value.updateRelationshipsFromData()},oo.prototype.refreshDataBoundLinks=function(){},oo.prototype.updateRelationshipsFromData=function(){},oo.prototype.updateDataBindings=function(a,y){if(typeof y=="string"){var x=this.Lc(a);if(x!==null)x.La(y);else{x=null;for(var E=this.aj.iterator;E.next();){for(var b=E.value,z=0;z<b.length;z++){var tt=b[z].sx(a);tt!==null&&(x===null&&(x=Ei()),x.push(tt))}if(x!==null)break}if(x!==null){for(E=0;E<x.length;E++)x[E].La(y);ri(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function sy(a,y){var x=y.Hh;if(un(x)){var E=a.aj.I(x);if(E===null)E=[],E.push(y),a.aj.add(x,E);else{for(a=0;a<E.length;a++)if(E[a]===y)return;E.push(y)}}}function ly(a,y,x){Jd(y,function(tt){tt=tt.O.s;for(var rt=tt.length,ot=0;ot<rt;ot++)Dg(x,tt[ot])});var E=y.Hh;if(un(E)){var b=a.aj.I(E);if(b!==null){for(var z=0;z<b.length;z++)if(b[z]===y){b.splice(z,1),b.length===0&&a.aj.remove(E);break}}}}oo.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var E=new be;if(un(a))for(var b=0;b<a.length;b++)l0(this,a[b],y,E,x);else for(a=a.iterator;a.next();)l0(this,a.value,y,E,x);if(y!==null){x=y.model,a=y.toolManager.findTool("Dragging"),a=a!==null?a.dragOptions.dragsLink:y.Wm.dragsLink,b=new cn;for(var z=new be,tt=E.iterator;tt.next();){var rt=tt.value;if(rt instanceof Ln)a||rt.fromNode!==null&&rt.toNode!==null||b.add(rt);else if(rt instanceof Hn&&rt.data!==null&&x.Tl()){var ot=rt;rt=tt.key;var st=rt.pg();st!==null&&(st=E.I(st),st!==null?(x.qe(ot.data,x.wa(st.data)),ot=y.Kc(ot.data),rt=rt.kh(),rt!==null&&ot!==null&&z.add(rt,ot)):x.qe(ot.data,void 0))}}if(0<b.count&&y.Is(b,!1),0<z.count)for(x=z.iterator;x.next();)E.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var ut=new be;E.each(function(ft){ft.key.data!==null&&ut.add(ft.key.data,ft.value.data)}),x(ut,y,this.H.model)}for(y=E.iterator;y.next();)y.value.La();return E};function l0(a,y,x,E,b){if(y===null||b&&!y.canCopy())return null;if(E.contains(y))return E.I(y);var z=a.copyPartData(y,x);if(!(z instanceof Fi))return null;if(z.isSelected=!1,z.isHighlighted=!1,E.add(y,z),y instanceof Hn){for(var tt=y.linksConnected;tt.next();){var rt=tt.value;if(rt.fromNode===y){var ot=E.I(rt);ot!==null&&(ot.fromNode=z)}rt.toNode===y&&(rt=E.I(rt),rt!==null&&(rt.toNode=z))}if(y instanceof ir&&z instanceof ir)for(y=y.memberParts;y.next();)tt=l0(a,y.value,x,E,b),tt instanceof Ln||tt===null||(tt.containingGroup=z)}else if(y instanceof Ln&&z instanceof Ln)for(tt=y.fromNode,tt!==null&&(tt=E.I(tt),tt!==null&&(z.fromNode=tt)),tt=y.toNode,tt!==null&&(tt=E.I(tt),tt!==null&&(z.toNode=tt)),y=y.labelNodes;y.next();)tt=l0(a,y.value,x,E,b),tt!==null&&tt instanceof Hn&&(tt.labeledLink=z);return z}oo.prototype.copyPartData=function(a,y){var x=null,E=a.data;if(E!==null&&y!==null){var b=y.model;a instanceof Ln||(E=b.copyNodeData(E),_e(E)&&(b.xf(E),x=y.Lc(E)))}else Rl(a),x=a.copy(),x!==null&&(b=this.H,y!==null?y.add(x):E!==null&&b!==null&&b.commandHandler!==null&&b.commandHandler.copiesClipboardData&&(y=b.model,b=null,x instanceof Ln||(b=y.copyNodeData(E)),_e(b)&&(x.data=b)));return x},Me.Object.defineProperties(oo.prototype,{nodes:{get:function(){return this.On}},links:{get:function(){return this.Dn}},parts:{get:function(){return this.Pa}},diagram:{get:function(){return this.H}},addsToTemporaryLayer:{get:function(){return this.tp},set:function(a){this.tp=a}}}),oo.prototype.updateAllRelationshipsFromData=oo.prototype.rp,oo.prototype.findLinksByExample=oo.prototype.ls,oo.prototype.findNodesByExample=oo.prototype.ms,oo.prototype.findLinkForData=oo.prototype.Kc,oo.prototype.findNodeForData=oo.prototype.ii,oo.prototype.findPartForData=oo.prototype.Lc,oo.prototype.findNodeForKey=oo.prototype.Vb,oo.prototype.removeModeledPart=oo.prototype.ip,oo.prototype.removeModeledParts=oo.prototype.Gs,oo.prototype.rebuildParts=oo.prototype.Wd;var f1=!1,g1=!1,p1=!1;oo.className="PartManager";function za(a){oo.apply(this,arguments)}Oe(za,oo),za.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),m1(this,a.linkDataArray)},za.prototype.addModeledParts=function(a){for(oo.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)zf(a.value);vf(this.diagram,!1)};function m1(a,y){y.forEach(function(x){v1(a,x)}),vf(a.diagram,!1)}function v1(a,y){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.bf.contains(y)){var x=a.getLinkCategoryForData(y),E=a.findLinkTemplateForCategory(x);if(E!==null){Rl(E);var b=E.copy();if(b!==null){E=a.diagram.skipsModelSourceBindings,a.diagram.skipsModelSourceBindings=!0,b.Tf=x,b.ub=y,x=a.diagram.model;var z=c0(x,y,!0);z!==""&&(b.fromPortId=z),z=dl(x,y,!0),z!==void 0&&(z=a.Vb(z),z instanceof Hn&&(b.fromNode=z)),z=c0(x,y,!1),z!==""&&(b.toPortId=z),z=dl(x,y,!1),z!==void 0&&(z=a.Vb(z),z instanceof Hn&&(b.toNode=z)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(tt){tt=a.Vb(tt),tt!==null&&(tt.labeledLink=b)}),a.tp&&(b.Jg="Tool"),a.diagram.add(b),b.ub=null,b.data=y,a.diagram.skipsModelSourceBindings=E}}}}za.prototype.removeAllModeledParts=function(){var a=this.diagram.model;y1(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function y1(a,y){y.forEach(function(x){a.ip(x)})}za.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},za.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},za.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},za.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},za.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},za.prototype.findPartForKey=function(a){var y=oo.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},za.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},za.prototype.doModelChanged=function(a){var y=this;if(oo.prototype.doModelChanged.call(this,a),this.diagram){var x=this.diagram;if(a.model===x.model){var E=a.change;if(x.aa){x.aa=!1;try{var b=a.modelChange;if(b!==""){if(E===Eo){if(b==="linkFromKey"){var z=this.Kc(a.object);if(z!==null){var tt=this.Vb(a.newValue);z.fromNode=tt}}else if(b==="linkToKey"){var rt=this.Kc(a.object);if(rt!==null){var ot=this.Vb(a.newValue);rt.toNode=ot}}else if(b==="linkFromPortId"){var st=this.Kc(a.object);if(st!==null){var ut=a.newValue;typeof ut=="string"&&(st.fromPortId=ut)}}else if(b==="linkToPortId"){var ft=this.Kc(a.object);if(ft!==null){var vt=a.newValue;typeof vt=="string"&&(ft.toPortId=vt)}}else if(b==="nodeGroupKey"){var yt=this.Lc(a.object);if(yt!==null){var Pt=a.newValue;if(Pt!==void 0){var Et=this.Vb(Pt);Et instanceof ir?yt.containingGroup=Et:yt.containingGroup=null}else yt.containingGroup=null}}else if(b==="linkLabelKeys"){var Vt=this.Kc(a.object);if(Vt!==null){var Rt=a.oldValue,Qt=a.newValue;Array.isArray(Rt)&&Rt.forEach(function(qe){0<=Qt.indexOf(qe)||(qe=y.Vb(qe),qe!==null&&(qe.labeledLink=null))}),Array.isArray(Qt)&&Qt.forEach(function(qe){qe=y.Vb(qe),qe!==null&&(qe.labeledLink=Vt)})}}else if(b==="linkCategory"){var _t=this.Kc(a.object),te=a.newValue;_t!==null&&typeof te=="string"&&(_t.category=te)}else b==="linkDataArray"&&(y1(this,a.oldValue),m1(this,a.newValue));x.isModified=!0}else if(E===Xo){var ue=a.newValue;if(b==="linkDataArray"&&typeof ue=="object"&&ue!==null)v1(this,ue);else if(b==="linkLabelKeys"&&fd(ue)){var Ce=this.Kc(a.object),On=this.Vb(ue);Ce!==null&&On!==null&&(On.labeledLink=Ce)}x.isModified=!0}else if(E===ua){var li=a.oldValue;if(b==="linkDataArray"&&typeof li=="object"&&li!==null)this.ip(li);else if(b==="linkLabelKeys"&&fd(li)){var ti=this.Vb(li);ti!==null&&(ti.labeledLink=null)}x.isModified=!0}}else if(E===Eo){var Cn=a.propertyName;a.object!==x.model||Cn!=="linkFromKeyProperty"&&Cn!=="linkToKeyProperty"&&Cn!=="linkFromPortIdProperty"&&Cn!=="linkToPortIdProperty"&&Cn!=="linkLabelKeysProperty"&&Cn!=="nodeIsGroupProperty"&&Cn!=="nodeGroupKeyProperty"&&Cn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},za.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new cn,E=y.linkDataArray;E.forEach(function(z){x.add(z)});var b=[];this.links.each(function(z){z.data===null||x.contains(z.data)||b.push(z.data)}),b.forEach(function(z){b1(y,z,!1)}),E.forEach(function(z){a.Kc(z)===null&&F1(y,z,!1)})},za.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;if(a instanceof Ln){var b=dl(E,y,!0);if(b=x.Vb(b),a.fromNode=b,b=dl(E,y,!1),b=x.Vb(b),a.toNode=b,y=E.Ef(y),0<y.length||0<a.labelNodes.count){if(y.length===1&&a.labelNodes.count===1){b=y[0];var z=a.labelNodes.first();if(E.wa(z.data)===b)return}b=new cn().addAll(y);var tt=new cn;a.labelNodes.each(function(rt){rt.data!==null&&(rt=E.wa(rt.data),rt!==void 0&&tt.add(rt))}),y=tt.copy(),y.hp(b),b=b.copy(),b.hp(tt),(0<y.count||0<b.count)&&(y.each(function(rt){rt=x.Vb(rt),rt!==null&&rt.labeledLink===a&&(rt.labeledLink=null)}),b.each(function(rt){rt=x.Vb(rt),rt!==null&&rt.labeledLink!==a&&(rt.labeledLink=a)}))}}else!(a instanceof Zr)&&(y=E.lh(y),y=x.findPartForKey(y),y===null||y instanceof ir)&&(a.containingGroup=y)}}},za.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=pp(y,x),b=this.Lc(a);if(E!==null&&b!==null){E=E.iterator;for(var z={};E.next();){var tt=E.value;y.lb(tt)?b instanceof ir&&y.lh(tt)===x&&(tt=this.Lc(tt),tt!==null&&(tt.containingGroup=b)):(z.link=this.Kc(tt),z.link!==null&&b instanceof Hn&&(dl(y,tt,!0)===x&&(z.link.fromNode=b),dl(y,tt,!1)===x&&(z.link.toNode=b),tt=y.Ef(tt),Array.isArray(tt)&&tt.some(function(rt){return function(ot){return ot===x?(b.labeledLink=rt.link,!0):!1}}(z)))),z={link:z.link}}lu(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof ir&&(b.containingGroup=a))}},za.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Hn){var x=y.wa(a.data);if(x!==void 0){for(var E=a.linksConnected;E.next();)su(y,x,E.value.data);if(a.isLinkLabel&&(E=a.labeledLink,E!==null&&su(y,x,E.data)),a instanceof ir)for(a=a.memberParts;a.next();)E=a.value.data,y.lb(E)&&su(y,x,E)}}},za.prototype.copyPartData=function(a,y){var x=oo.prototype.copyPartData.call(this,a,y);if(a instanceof Ln)if(a=a.data,a!==null&&y!==null){var E=y.model;a=E.Jo(a),typeof a=="object"&&a!==null&&(E.fi(a),x=y.Kc(a))}else x!==null&&(y=this.diagram,a!==null&&y!==null&&y.commandHandler!==null&&y.commandHandler.copiesClipboardData&&(y=y.model.Jo(a),typeof y=="object"&&y!==null&&(x.data=y)));return x},za.prototype.insertLink=function(a,y,x,E){var b=this.diagram,z=b.model,tt=b.toolManager.findTool("Linking"),rt="";if(a!==null&&(y===null&&(y=a),rt=y.portId,rt===null&&(rt="")),y="",x!==null&&(E===null&&(E=x),y=E.portId,y===null&&(y="")),E=tt.archetypeLinkData,E instanceof Ln){if(Rl(E),z=E.copy(),z!==null)return z.fromNode=a,z.fromPortId=rt,z.toNode=x,z.toPortId=y,b.add(z),a=tt.archetypeLabelNodeData,a instanceof Hn&&(Rl(a),a=a.copy(),a!==null&&(a.labeledLink=z,b.add(a))),z}else if(E!==null&&(E=z.Jo(E),typeof E=="object"&&E!==null))return a!==null&&Vf(z,E,z.wa(a.data),!0),Kf(z,E,rt,!0),x!==null&&Vf(z,E,z.wa(x.data),!1),Kf(z,E,y,!1),z.fi(E),a=tt.archetypeLabelNodeData,a===null||a instanceof Hn||(a=z.copyNodeData(a),typeof a=="object"&&a!==null&&(z.xf(a),a=z.wa(a),a!==void 0&&z.Bu(E,a))),b.Kc(E);return null},za.prototype.findLinkForKey=za.prototype.findLinkForKey,za.prototype.findPartForKey=za.prototype.findPartForKey,za.prototype.removeAllModeledParts=za.prototype.removeAllModeledParts,za.prototype.addModeledParts=za.prototype.addModeledParts,za.prototype.addAllModeledParts=za.prototype.addAllModeledParts,za.className="GraphLinksPartManager";function kl(){oo.apply(this,arguments),this.Sg=null}Oe(kl,oo);function u0(a,y,x){if(y!==null&&x!==null&&x.kh()===null){var E=a.diagram.toolManager.findTool("Linking"),b=y,z=x;if(a.diagram.isTreePathToChildren||(b=x,z=y),(E===null||!co(E,b,z,null,!0))&&(y=a.getLinkCategoryForData(x.data),E=a.findLinkTemplateForCategory(y),E!==null&&(Rl(E),E=E.copy(),E!==null))){var tt=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,E.Tf=y,E.ub=x.data,E.fromNode=b,E.toNode=z,a.diagram.add(E),E.ub=null,E.data=x.data,a.diagram.skipsModelSourceBindings=tt}}}kl.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},kl.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},kl.prototype.setFromNodeForLink=function(a,y,x){var E=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren)E.qe(a.data,E.wa(y));else{var b=this.Sg;this.Sg=a,x!==null&&E.qe(x.data,void 0),E.qe(y,E.wa(a.toNode!==null?a.toNode.data:null)),this.Sg=b}},kl.prototype.setToNodeForLink=function(a,y,x){var E=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren){var b=this.Sg;this.Sg=a,x!==null&&E.qe(x.data,void 0),E.qe(y,E.wa(a.fromNode!==null?a.fromNode.data:null)),this.Sg=b}else E.qe(a.data,E.wa(y))},kl.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},kl.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},kl.prototype.doModelChanged=function(a){if(oo.prototype.doModelChanged.call(this,a),this.diagram){var y=this.diagram;if(a.model===y.model){var x=a.change;if(y.aa){y.aa=!1;try{var E=a.modelChange;if(E!==""){if(x===Eo){if(E==="nodeParentKey"){var b=a.object,z=this.Vb(a.newValue),tt=this.ii(b);if(this.Sg!==null)z!==null&&(this.Sg.data=b,this.Sg.category=this.getLinkCategoryForData(b));else if(tt!==null){var rt=tt.kh();rt!==null?z===null?y.remove(rt):y.isTreePathToChildren?rt.fromNode=z:rt.toNode=z:u0(this,z,tt)}}else if(E==="parentLinkCategory"){var ot=this.ii(a.object),st=a.newValue;if(ot!==null&&typeof st=="string"){var ut=ot.kh();ut!==null&&(ut.category=st)}}y.isModified=!0}}else if(x===Eo){var ft=a.propertyName;a.object===y.model&&ft==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},kl.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;a instanceof Hn&&(y=E.mh(y),y=x.Vb(y),E=a.pg(),y!==E&&(E=a.kh(),y!==null?E!==null?x.isTreePathToChildren?E.fromNode=y:E.toNode=y:u0(this,y,a):E!==null&&Ag(x,E,!1)))}}},kl.prototype.updateDataBindings=function(a,y){oo.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},kl.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=pp(y,x),b=this.Lc(a);if(E!==null&&b!==null){for(E=E.iterator;E.next();){var z=E.value;y.lb(z)&&b instanceof Hn&&y.mh(z)===x&&u0(this,b,this.ii(z))}lu(y,x)}a=y.mh(a),a!==void 0&&b instanceof Hn&&(a=this.Vb(a),u0(this,a,b))}},kl.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Hn){var x=y.wa(a.data),E=this.Kc(a.data);if(E!==null){E.isSelected=!1,E.isHighlighted=!1;var b=E.layer;if(b!==null){var z=b.pc(-1,E,!1);0<=z&&this.diagram.cb(ua,"parts",b,E,null,z,null),z=E.layerChanged,z!==null&&z(E,b,null)}}for(E=this.diagram.isTreePathToChildren,a=a.linksConnected;a.next();)b=a.value,b=(E?b.toNode:b.fromNode).data,y.lb(b)&&su(y,x,b)}},kl.prototype.insertLink=function(a,y,x){y=this.diagram.model;var E=a,b=x;return this.diagram.isTreePathToChildren||(E=x,b=a),E!==null&&b!==null?(y.qe(b.data,y.wa(E.data)),b.kh()):null},kl.prototype.findLinkForKey=kl.prototype.findLinkForKey,kl.className="TreePartManager";function yi(a,y){this.kl=new cn,this.il=new cn,this.Wv=`,
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
"removedNodeKeys": `,this.vh=null,Ri(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new be,this.Th="key",this.Bk=this.bl=null,this.Jm=this.Km=!1,this.Mm=!0,this.xm=null,this.lj="category",this.Vf=new be,this.Lt=new dn,this.Wg=!1,this.o=null,this.undoManager=new Vo,a!==void 0&&(un(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}yi.prototype.cloneProtected=function(a){a.xa=this.xa,a.Sm=this.Sm,a.Gg=this.Gg,a.Th=this.Th,a.bl=this.bl,a.Bk=this.Bk,a.Km=this.Km,a.Jm=this.Jm,a.Mm=this.Mm,a.xm=this.xm,a.lj=this.lj},yi.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},yi.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},yi.prototype.toString=function(a){if(a===void 0&&(a=0),1<a)return this.np();var y=(this.name!==""?this.name:"")+" Model";if(0<a){y+=`
|
|
node data:`,a=this.nodeDataArray;for(var x=a.length,E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+Sr(b)}}return y},yi.prototype.xA=function(a){a.change!==La&&$t("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof ga?(x1(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},yi.prototype.Qv=function(a,y){var x=this,E=!1,b=new cn,z=new cn,tt=new cn,rt=this.vh;a.changes.each(function(ft){ft.model===x&&(ft.modelChange==="nodeDataArray"?ft.change===Xo?b.add(ft.newValue):ft.change===ua&&tt.add(ft.oldValue):x.lb(ft.object)?z.add(ft.object):ft.change!==Eo||x.modelData!==ft.object&&ft.propertyName!=="modelData"?ft.object!==null&&(rt&&rt.contains(ft.object)?rt.get(ft.object).each(function(vt){x.lb(vt)&&z.add(vt)}):ft.object instanceof yi||x.ri()&&x.Jc(ft.object)||P1(x,ft.object).each(function(vt){z.add(vt)})):E=!0)});var ot=this.il;ot.clear(),b.each(function(ft){ot.add(x.wa(ft)),y||z.add(ft)});var st=this.kl;st.clear(),tt.each(function(ft){st.add(x.wa(ft)),y&&z.add(ft)}),a=x.cloneDeep(z.Fa());var ut=null;return E&&(ut===null&&(ut={}),ut.modelData=this.cloneDeep(this.modelData)),0<ot.count&&(ut===null&&(ut={}),y?ut.removedNodeKeys=ot.Fa():ut.insertedNodeKeys=ot.Fa()),0<a.length&&(ut===null&&(ut={}),ut.modifiedNodeData=a),0<st.count&&(ut===null&&(ut={}),y?ut.insertedNodeKeys=st.Fa():ut.removedNodeKeys=st.Fa()),st.clear(),ot.clear(),ut},yi.prototype.cloneDeep=function(a){return Zf(this,a,!0)};function Zf(a,y,x,E,b,z){function tt(ft,vt){rt?(ft.__gohashid===void 0&&z.push(ft),E.set(ft,vt)):(ft=zo++,E.set(ft,vt),b.set(ft,y))}if(!_e(y))return y;z||(z=[]);var rt=Object.isExtensible(y);if(E||(E=new be),rt){var ot=E.get(y);if(ot)return ot}else for(b||(b=new be),ot=b.iterator;ot.next();){var st=ot.key;if(ot.value===y&&(st=E.get(st)))return st}if(Array.isArray(y)){ot=[],tt(y,ot);for(var ut=0;ut<y.length;ut++)ot.push(Zf(a,y[ut],!1,E,b,z))}else if(y instanceof Tt||y instanceof Ut||y instanceof ae||y instanceof ii||y instanceof Xe)ot=y.copy(),tt(y,ot);else{if(y instanceof ro||y instanceof ln||y instanceof Ve)return y;if(y instanceof dn)ot=new dn().addAll(Zf(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof cn)ot=new cn().addAll(Zf(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof be)ot=new be().addAll(Zf(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof Date)ot=new Date(y.getTime()),tt(y,ot);else if(y instanceof RegExp)ot=new RegExp(y),tt(y,ot),ot.lastIndex=y.lastIndex;else if(typeof y.copy=="function")ot=y.copy(),tt(y,ot);else for(ut in ot={},tt(y,ot),y)ut!=="__gohashid"&&(ot[ut]=Zf(a,y[ut],!1,E,b,z))}return x&&z.forEach(function(ft){delete ft.__gohashid}),ot}Ct=yi.prototype,Ct.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},Ct.rm=function(){var a="";return this.name!==""&&(a+=`,
|
|
"name": `+this.quote(this.name)),this.dataFormat!==""&&(a+=`,
|
|
"dataFormat": `+this.quote(this.dataFormat)),this.isReadOnly&&(a+=`,
|
|
"isReadOnly": `+this.isReadOnly),this.nodeKeyProperty!=="key"&&typeof this.nodeKeyProperty=="string"&&(a+=`,
|
|
"nodeKeyProperty": `+this.quote(this.nodeKeyProperty)),this.copiesArrays&&(a+=`,
|
|
"copiesArrays": true`),this.copiesArrayObjects&&(a+=`,
|
|
"copiesArrayObjects": true`),this.copiesKey||(a+=`,
|
|
"copiesKey": false`),this.nodeCategoryProperty!=="category"&&typeof this.nodeCategoryProperty=="string"&&(a+=`,
|
|
"nodeCategoryProperty": `+this.quote(this.nodeCategoryProperty)),a},Ct.gp=function(a){a.name&&(this.name=a.name),a.dataFormat&&(this.dataFormat=a.dataFormat),a.isReadOnly&&(this.isReadOnly=!0),a.nodeKeyProperty&&(this.nodeKeyProperty=a.nodeKeyProperty),a.copiesArrays&&(this.copiesArrays=!0),a.copiesArrayObjects&&(this.copiesArrayObjects=!0),a.copiesKey===!1&&(this.copiesKey=!1),a.nodeCategoryProperty&&(this.nodeCategoryProperty=a.nodeCategoryProperty)};function S1(a,y){y=y.modelData,_e(y)&&(a.dm(y),a.modelData=y)}Ct.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!w1(x,a[x])){y=!0;break}return a="",y&&(a=`,
|
|
"modelData": `+uy(this,this.modelData)),a+`,
|
|
"nodeDataArray": `+cd(this,this.nodeDataArray,!0)},Ct.kv=function(a){S1(this,a),a=a.nodeDataArray,un(a)&&(this.dm(a),this.nodeDataArray=a)};function x1(a,y){function x(b,z){if((z=z.part)&&(z=z.data,b!==z)){var tt=E.get(b);tt===null?(tt=new cn,tt.add(z),E.add(b,tt)):tt.add(z)}}var E=a.vh;E===null&&(E=new be,y.changes.each(function(b){if(b.diagram!==null){var z=b.change;z===Eo?(b=b.object.panel)&&(z=b.data)&&x(z,b):(z===Xo||z===ua)&&(b=b.object,(z=b.itemArray)&&x(z,b))}}),a.vh=E)}function P1(a,y){for(var x=new cn,E=0;E<a.nodeDataArray.length;E++){var b=a.nodeDataArray[E];h0(a,y,b,b,x)}return x}function h0(a,y,x,E,b){if(Array.isArray(x))for(var z=0;z<x.length;z++){var tt=x[z];if(tt===y)return b.add(E),!0;if(h0(a,y,tt,E,b))return!0}else if(_e(x)&&Object.getPrototypeOf(x)===Object.prototype)for(z in x){if(tt=x[z],tt===y)return b.add(E),!0;if(h0(a,y,tt,E,b))return!0}return!1}Ct.Pv=function(a,y){var x=this,E=!1,b=new cn,z=new cn,tt=new cn,rt=this.vh;a.changes.each(function(ut){ut.model===x&&(ut.modelChange==="nodeDataArray"?ut.change===Xo?b.add(ut.newValue):ut.change===ua&&tt.add(ut.oldValue):x.lb(ut.object)?z.add(ut.object):ut.change!==Eo||x.modelData!==ut.object&&ut.propertyName!=="modelData"?ut.object!==null&&(rt&&rt.contains(ut.object)?rt.get(ut.object).each(function(ft){x.lb(ft)&&z.add(ft)}):ut.object instanceof yi||x.ri()&&x.Jc(ut.object)||P1(x,ut.object).each(function(ft){z.add(ft)})):E=!0)});var ot=this.il;ot.clear(),b.each(function(ut){ot.add(x.wa(ut)),y||z.add(ut)});var st=this.kl;return st.clear(),tt.each(function(ut){st.add(x.wa(ut)),y&&z.add(ut)}),a="",E&&(a+=`,
|
|
"modelData": `+uy(this,this.modelData)),0<ot.count&&(a+=(y?this.Yv:this.Wv)+cd(this,ot.Fa(),!0)),0<z.count&&(a+=this.jy+cd(this,z.Fa(),!0)),0<st.count&&(a+=(y?this.Wv:this.Yv)+cd(this,st.Fa(),!0)),st.clear(),ot.clear(),a},Ct.fp=function(a){(a.name!==void 0&&a.name!==this.name||a.dataFormat!==void 0&&a.dataFormat!==this.dataFormat||a.isReadOnly!==void 0&&a.isReadOnly!==this.isReadOnly||a.nodeKeyProperty!==void 0&&a.nodeKeyProperty!==this.nodeKeyProperty||a.copiesArrays!==void 0&&a.copiesArrays!==this.copiesArrays||a.copiesArrayObjects!==void 0&&a.copiesArrayObjects!==this.copiesArrayObjects||a.copiesKey!==void 0&&a.copiesKey!==this.copiesKey||a.nodeCategoryProperty!==void 0&&a.nodeCategoryProperty!==this.nodeCategoryProperty)&&$t("applyIncrementalJson cannot change Model properties"),S1(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,E=new be;if(Array.isArray(x))for(var b=0;b<x.length;b++){var z=x[b],tt=this.wa(z);tt!=null&&E.set(tt,z)}if(Array.isArray(y))for(b=y.length,z=0;z<b;z++){tt=y[z];var rt=this.hc(tt);rt===null&&(rt=(rt=E.get(tt))?rt:this.copyNodeData({}),this.km(rt,tt),this.xf(rt))}if(Array.isArray(x)){for(y=x.length,E=0;E<y;E++)if(b=x[E],z=this.wa(b),z=this.hc(z),z!==null){for(var ot in b)ot==="__gohashid"||ot===this.nodeKeyProperty||this.Wj()&&ot===this.nodeIsGroupProperty||this.setDataProperty(z,ot,b[ot]);this.lm(b,z)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,ot=0;ot<x;ot++)y=this.hc(a[ot]),y!==null&&this.cm(y)},Ct.$x=function(a,y){a.change!==La&&$t("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof ga?(y===void 0&&(y=mp(this,this)),x1(this,x),a=this.Pv(x,a.propertyName==="FinishedUndo"),this.vh=null,y==="2"?'{ "incremental": 2'+a+"}":'{ "class": '+this.quote(y)+', "incremental": 1'+this.rm()+a+"}"):'{ "incremental": 0 }'},Ct.yA=function(a,y){return this.$x(a,y)},Ct.np=function(a){return a===void 0&&(a=mp(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},Ct.toJSON=function(a){return this.np(a)},Ct.Zw=function(a){var y=null;if(typeof a=="string")try{y=Dn.JSON.parse(a)}catch(E){}else typeof a=="object"?y=a:$t("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&$t("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},Ct.Ky=function(a){return this.Zw(a)},yi.constructGraphLinksModel=function(){return new yi},Ct=yi.prototype,Ct.dm=function(a){if(un(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];if(_e(E)){var b=x;E=this.dm(E),Array.isArray(a)?a[b]=E:$t("Cannot replace an object in an HTMLCollection or NodeList at "+b)}}else if(_e(a)){for(y in a)if(x=a[y],_e(x)&&(x=this.dm(x),a[y]=x,y==="points"&&Array.isArray(x))){for(b=x.length%2===0,E=0;E<x.length;E++)if(typeof x[E]!="number"){b=!1;break}if(b){for(b=new dn,E=0;E<x.length/2;E++)b.add(new Tt(x[2*E],x[2*E+1]));b.freeze(),a[y]=b}}return Nx(a)}return a},Ct.sm=function(a){return a===void 0?"undefined":a===null?"null":a===!0?"true":a===!1?"false":typeof a=="string"?this.quote(a):typeof a=="number"?a===1/0?"9e9999":a===-1/0?"-9e9999":isNaN(a)?'{"class":"NaN"}':a.toString():a instanceof Date?'{"class":"Date", "value":"'+a.toJSON()+'"}':a instanceof Number?this.sm(a.valueOf()):un(a)?cd(this,a):_e(a)?uy(this,a):typeof a=="function"?"null":a.toString()};function cd(a,y,x){x===void 0&&(x=!1);var E=y.length;if(0>=E)return"[]";var b=new Ni;b.add("["),x&&1<E&&b.add(`
|
|
`);for(var z=0;z<E;z++){var tt=y[z];tt!==void 0&&(0<z&&(b.add(","),x&&b.add(`
|
|
`)),b.add(a.sm(tt)))}return x&&1<E&&b.add(`
|
|
`),b.add("]"),b.toString()}function w1(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function Es(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function uy(a,y){var x=y;if(x instanceof Tt)y={class:"go.Point",x:Es(x.x),y:Es(x.y)};else if(x instanceof Ut)y={class:"go.Size",width:Es(x.width),height:Es(x.height)};else if(x instanceof ae)y={class:"go.Rect",x:Es(x.x),y:Es(x.y),width:Es(x.width),height:Es(x.height)};else if(x instanceof ii)y={class:"go.Margin",top:Es(x.top),right:Es(x.right),bottom:Es(x.bottom),left:Es(x.left)};else if(x instanceof Xe)x.sb()?y={class:"go.Spot",x:Es(x.x),y:Es(x.y),offsetX:Es(x.offsetX),offsetY:Es(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof ro){if(y={class:"go.Brush",type:x.type.name},x.type===Mh?y.color=x.color:(x.type===ih||x.type===Cl)&&(y.start=x.start,y.end=x.end,x.type===Cl&&(x.startRadius!==0&&(y.startRadius=Es(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=Es(x.endRadius)))),x.colorStops!==null){var E={};for(x=x.colorStops.iterator;x.next();)E[x.key]=x.value;y.colorStops=E}}else x instanceof ln?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=Es(x.startX)),x.startY!==0&&(y.startY=Es(x.startY)),x.endX!==0&&(y.endX=Es(x.endX)),x.endY!==0&&(y.endY=Es(x.endY)),x.spot1.D(Wi)||(y.spot1=x.spot1),x.spot2.D(hr)||(y.spot2=x.spot2),x.type===ln.o&&(y.path=ln.ia(x))):x instanceof Ve&&(y={class:"go.EnumValue",classType:mp(a,x.classType),name:x.name});E="{",x=!0;for(var b in y){var z=ma(y,b);if(!w1(b,z))if(x?x=!1:E+=",",E+=a.quote(b)+":",b==="points"&&z instanceof dn){var tt="[";for(z=z.iterator;z.next();){var rt=z.value;1<tt.length&&(tt+=","),tt+=a.sm(rt.x),tt+=",",tt+=a.sm(rt.y)}tt+="]",E+=tt}else E+=a.sm(z)}return E+"}"}function As(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function Nx(a){if(typeof a!="object")return a;var y=a.class||"";if(y==="NaN")return NaN;if(y==="Date")return new Date(a.value);if(y.indexOf("go.")!==0)return a;y=y.substr(3);var x=a;if(y==="Point")x=new Tt(As(a.x),As(a.y));else if(y==="Size")x=new Ut(As(a.width),As(a.height));else if(y==="Rect")x=new ae(As(a.x),As(a.y),As(a.width),As(a.height));else if(y==="Margin")x=new ii(As(a.top),As(a.right),As(a.bottom),As(a.left));else if(y==="Spot")typeof a.enum=="string"?x=sr(a.enum):x=new Xe(As(a.x),As(a.y),As(a.offsetX),As(a.offsetY));else if(y==="Brush"){if(x=new ro,x.type=ni(ro,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof Xe&&(x.start=a.start),a.end instanceof Xe&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=As(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=As(a.endRadius)),a=a.colorStops,_e(a))for(var E in a)x.addColorStop(parseFloat(E),a[E])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=ln.parse(a.path):x=new ln,x.type=ni(ln,a.type),typeof a.startX=="number"&&(x.startX=As(a.startX)),typeof a.startY=="number"&&(x.startY=As(a.startY)),typeof a.endX=="number"&&(x.endX=As(a.endX)),typeof a.endY=="number"&&(x.endY=As(a.endY)),a.spot1 instanceof Xe&&(x.spot1=a.spot1),a.spot2 instanceof Xe&&(x.spot2=a.spot2)):y==="EnumValue"&&(E=a.classType,E.indexOf("go.")===0&&(E=E.substr(3)),E=dy(E),typeof E=="function"&&(x=ni(E,a.name)));return x}Ct.Pe=function(a){return this.Lt.add(a),this},Ct.ik=function(a){this.Lt.remove(a)},Ct.ds=function(a){this.skipsUndoManager||this.undoManager.Tu(a);for(var y=this.Lt,x=y.length,E=0;E<x;E++)y.M(E)(a)},Ct.cb=function(a,y,x,E,b,z,tt){Aa(this,"",a,y,x,E,b,z,tt)},Ct.g=function(a,y,x,E,b){Aa(this,"",Eo,a,this,y,x,E,b)},Ct.Fs=function(a,y,x,E,b,z){Aa(this,"",Eo,y,a,x,E,b,z)};function Aa(a,y,x,E,b,z,tt,rt,ot){rt===void 0&&(rt=null),ot===void 0&&(ot=null);var st=new Io;st.model=a,st.change=x,st.modelChange=y,st.propertyName=E,st.object=b,st.oldValue=z,st.oldParam=rt,st.newValue=tt,st.newParam=ot,a.ds(st)}yi.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===Eo){var x=a.object,E=a.propertyName,b=a.I(y);E===this.nodeKeyProperty&&this.lb(x)&&(y=a.I(!y),y!==void 0&&this.kb.remove(y),b!==void 0&&this.kb.add(b,x)),Jo(x,E,b)}else a.change===Xo?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,_e(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]===a&&Oi(this.Tc,x),E!==void 0&&this.kb.remove(E)):(this.Tc[x]!==a&&vi(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)))):a.modelChange===""?((E=a.object)&&!un(E)&&a.propertyName&&(E=ma(a.object,a.propertyName)),un(E)&&typeof x=="number"&&(a=a.newValue,y?Oi(E,x):vi(E,x,a))):$t("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===ua?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,_e(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]!==a&&vi(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)):(this.Tc[x]===a&&Oi(this.Tc,x),E!==void 0&&this.kb.remove(E)))):a.modelChange===""?((E=a.object)&&!un(E)&&a.propertyName&&(E=ma(a.object,a.propertyName)),un(E)&&typeof x=="number"&&(a=a.oldValue,y?vi(E,x,a):Oi(E,x))):$t("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==La&&$t("unknown ChangedEvent: "+a.toString())},yi.prototype.Ea=function(a){return this.undoManager.Ea(a)},yi.prototype.eb=function(a){return this.undoManager.eb(a)},yi.prototype.Kf=function(){return this.undoManager.Kf()},yi.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var E=!1;try{a(this),E=!0}finally{E?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},Ct=yi.prototype,Ct.La=function(a,y){y===void 0&&(y=""),Aa(this,"SourceChanged",La,y,a,null,null)},Ct.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=ma(a,y),y!==void 0)){if(fd(y))return y;$t("Key value for node data "+a+" is not a number or a string: "+y)}}},Ct.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var E=ma(a,x);E!==y&&this.hc(y)===null&&(Jo(a,x,y),E!==void 0&&this.kb.remove(E),this.kb.add(y,a),Aa(this,"nodeKey",Eo,x,a,E,y),typeof x=="string"&&this.La(a,x),this.jp(E,y))}else Jo(a,x,y)}};function fd(a){return typeof a=="number"||typeof a=="string"}Ct.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},Ct.hc=function(a){return a===null&&$t("Model.findNodeDataForKey:key must not be null"),a!==void 0&&fd(a)?this.kb.I(a):null},Ct.$u=function(a){if(a!==null){var y=this.Th;if(y!==""){var x=this.wa(a);if(x===void 0||this.kb.contains(x)){var E=this.bl;if(E!==null&&(x=E(this,a),x!=null&&!this.kb.contains(x))){Jo(a,y,x);return}if(typeof x=="string"){for(E=2;this.kb.contains(x+E);)E++;Jo(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;Jo(a,y,x)}}}}},Ct.xf=function(a){a!==null&&(_i(a),this.lb(a)||C1(this,a,!0))};function C1(a,y,x){var E=a.wa(y);(E===void 0||a.kb.I(E)!==y)&&(a.$u(y),E=a.wa(y),E===void 0&&$t("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(E,y),E=null,x&&(E=a.Tc.length,vi(a.Tc,E,y)),Aa(a,"nodeDataArray",Xo,"nodeDataArray",a,null,y,null,E),a.fm(y),a.em(y))}Ct.Fy=function(a){if(un(a))for(var y=a.length,x=0;x<y;x++)this.xf(a[x]);else for(a=a.iterator;a.next();)this.xf(a.value)},Ct.cm=function(a){a!==null&&L1(this,a,!0)};function L1(a,y,x){var E=a.wa(y);if(E!==void 0&&a.kb.remove(E),E=null,x){t:if(x=a.Tc,Array.isArray(x))E=x.indexOf(y);else{E=x.length;for(var b=0;b<E;b++)if(x[b]===y){E=b;break t}E=-1}if(0>E)return;Oi(a.Tc,E)}Aa(a,"nodeDataArray",ua,"nodeDataArray",a,y,null,E,null),a.qp(y)}Ct.nA=function(a){if(un(a))for(var y=a.length,x=0;x<y;x++)this.cm(a[x]);else for(a=a.iterator;a.next();)this.cm(a.value)},Ct.$z=function(a){if(a!==this.nodeDataArray&&un(a)){var y=this.kl;y.clear(),y.addAll(this.kb.iteratorKeys);var x=this.il;x.clear();for(var E=a.length,b=0;b<E;b++){var z=a[b],tt=this.wa(z);if(tt!==void 0){x.add(tt);var rt=this.hc(tt);rt!==z&&(rt!==null?(this.Do(rt,z),this.lm(z,rt)):(z=this.cloneDeep(z),this.km(z,tt),this.xf(z)))}else tt=this.cloneDeep(z),this.xf(tt),x.add(this.wa(tt))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.hc(E))&&this.cm(E);y.clear(),x.clear()}},Ct.jp=function(a,y){y!==void 0&&(a=pp(this,a),a instanceof cn&&this.Vf.add(y,a))},Ct.Lv=function(){},Ct.fm=function(){},Ct.em=function(){},Ct.qp=function(){};function su(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E===null&&(E=new cn,a.Vf.add(y,E)),E.add(x)}}function lu(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E instanceof cn&&(x==null?a.Vf.remove(y):(E.remove(x),E.count===0&&a.Vf.remove(y)))}}function pp(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof cn?a:null)}Ct.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},yi.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):d0(this,a,!0),_e(a)&&Ri(a),a};function d0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var E=[];for(x=0;x<y.length;x++){var b=d0(a,y[x],a.copiesArrayObjects);E.push(b)}return Ri(E),E}if(x&&_e(y)){x=(x=y.constructor)?new x:{},b=a.copiesKey||typeof a.nodeKeyProperty!="string"?null:a.nodeKeyProperty;for(E in y)if(E==="__gohashid")x.__gohashid=void 0;else if(E===b)x[b]=void 0;else{var z=ma(y,E),tt=mp(a,z);tt==="GraphObject"||tt==="Diagram"||tt==="Layer"||tt==="RowColumnDefinition"||tt==="AnimationManager"||tt==="Tool"||tt==="CommandHandler"||tt==="Layout"||tt==="InputEvent"||tt==="DiagramEvent"||z instanceof yi||z instanceof Vo||z instanceof ga||z instanceof Io||(z=d0(a,z,!1)),Jo(x,E,z)}return Ri(x),x}return y instanceof Tt||y instanceof Ut||y instanceof ae||y instanceof Xe||y instanceof ii?y.copy():y}yi.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}}else!k1&&a instanceof de&&(k1=!0,Bi('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Bi(" Is that really your intent?"));var E=ma(a,y);E!==x&&(Jo(a,y,x),this.Fs(a,y,E,x))},Ct=yi.prototype,Ct.set=function(a,y,x){this.setDataProperty(a,y,x)},Ct.Do=function(a,y){if(y){var x=this.lb(a),E;for(E in y)E==="__gohashid"||x&&E===this.nodeKeyProperty||this.setDataProperty(a,E,y[E])}},Ct.Ay=function(a,y){this.ts(a,-1,y)},Ct.ts=function(a,y,x){0>y&&(y=a.length),vi(a,y,x),Aa(this,"",Xo,"",a,null,x,null,y)},Ct.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&$t("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];Oi(a,y),Aa(this,"",ua,"",a,x,null,y,null)},Ct.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=ma(a,y),y===void 0))return"";if(typeof y=="string")return y;$t("getCategoryForNodeData found a non-string category for "+a+": "+y)},Ct.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var E=ma(a,x);E===void 0&&(E=""),E!==y&&(Jo(a,x,y),Aa(this,"nodeCategory",Eo,x,a,E,y))}else Jo(a,x,y)}},Ct.lm=function(a,y){this.jm(y,this.Ro(a))},Ct.Tl=function(){return!1},Ct.Wj=function(){return!1},Ct.ri=function(){return!1},Ct.xs=function(){return!1},Ct.Xj=function(){return!1};function hy(){return new yi}function mp(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 mp(a,y.constructor);return typeof y}function dy(a){return _l[a]?_l[a]:Dn.go!==void 0&&Dn.go[a]?Dn.go[a]:null}function ma(a,y){if(!a||!y)return null;try{if(typeof y=="function")var x=y(a);else typeof a.getAttribute=="function"?(x=a.getAttribute(y),x===null&&(x=void 0)):x=a[y]}catch(E){}return x}function Jo(a,y,x){if(a&&y)try{typeof y=="function"?y(a,x):typeof a.setAttribute=="function"?a.setAttribute(y,x):a[y]=x}catch(E){}}Me.Object.defineProperties(yi.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===""&&$t("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&$t("Cannot set Model.nodeKeyProperty when there is existing node data"),this.Th=a,this.g("nodeKeyProperty",y,a))}},makeUniqueKeyFunction:{get:function(){return this.bl},set:function(a){var y=this.bl;y!==a&&(this.bl=a,this.g("makeUniqueKeyFunction",y,a))}},nodeDataArray:{get:function(){return this.Tc},set:function(a){var y=this.Tc;if(y!==a){this.kb.clear(),this.Lv();for(var x=a.length,E=0;E<x;E++){var b=a[E];_e(b)||$t("Model.nodeDataArray must only contain Objects, not: "+b),_i(b)}for(this.Tc=a,E=new dn,b=0;b<x;b++){var z=a[b],tt=this.wa(z);tt===void 0||this.kb.I(tt)!==null?E.add(z):this.kb.add(tt,z)}for(E=E.iterator;E.next();)b=E.value,this.$u(b),z=this.wa(b),z!==void 0&&this.kb.add(z,b);for(Aa(this,"nodeDataArray",Eo,"nodeDataArray",this,y,a),y=0;y<x;y++)E=a[y],this.fm(E),this.em(E);Array.isArray(a)||(this.isReadOnly=!0)}}},copyNodeDataFunction:{get:function(){return this.Bk},set:function(a){var y=this.Bk;y!==a&&(this.Bk=a,this.g("copyNodeDataFunction",y,a))}},copiesArrays:{get:function(){return this.Km},set:function(a){var y=this.Km;y!==a&&(this.Km=a,this.g("copiesArrays",y,a))}},copiesArrayObjects:{get:function(){return this.Jm},set:function(a){var y=this.Jm;y!==a&&(this.Jm=a,this.g("copiesArrayObjects",y,a))}},copiesKey:{get:function(){return this.Mm},set:function(a){var y=this.Mm;y!==a&&(this.Mm=a,this.g("copiesKey",y,a))}},afterCopyFunction:{get:function(){return this.xm},set:function(a){var y=this.xm;y!==a&&(this.xm=a,this.g("afterCopyFunction",y,a))}},nodeCategoryProperty:{get:function(){return this.lj},set:function(a){var y=this.lj;y!==a&&(this.lj=a,this.g("nodeCategoryProperty",y,a))}},type:{get:function(){return"Model"}}}),yi.prototype.setCategoryForNodeData=yi.prototype.jm,yi.prototype.getCategoryForNodeData=yi.prototype.Ro,yi.prototype.removeArrayItem=yi.prototype.ov,yi.prototype.insertArrayItem=yi.prototype.ts,yi.prototype.addArrayItem=yi.prototype.Ay,yi.prototype.assignAllDataProperties=yi.prototype.Do,yi.prototype.set=yi.prototype.set,yi.prototype.clearUnresolvedReferences=yi.prototype.Qy,yi.prototype.mergeNodeDataArray=yi.prototype.$z,yi.prototype.removeNodeDataCollection=yi.prototype.nA,yi.prototype.removeNodeData=yi.prototype.cm,yi.prototype.addNodeDataCollection=yi.prototype.Fy,yi.prototype.addNodeData=yi.prototype.xf,yi.prototype.makeNodeDataKeyUnique=yi.prototype.$u,yi.prototype.findNodeDataForKey=yi.prototype.hc,yi.prototype.containsNodeData=yi.prototype.lb,yi.prototype.setKeyForNodeData=yi.prototype.km,yi.prototype.getKeyForNodeData=yi.prototype.wa,yi.prototype.updateTargetBindings=yi.prototype.La,yi.prototype.commit=yi.prototype.commit,yi.prototype.rollbackTransaction=yi.prototype.Kf,yi.prototype.commitTransaction=yi.prototype.eb,yi.prototype.startTransaction=yi.prototype.Ea,yi.prototype.raiseDataChanged=yi.prototype.Fs,yi.prototype.raiseChanged=yi.prototype.g,yi.prototype.raiseChangedEvent=yi.prototype.cb,yi.prototype.removeChangedListener=yi.prototype.ik,yi.prototype.addChangedListener=yi.prototype.Pe,yi.prototype.writeJsonValue=yi.prototype.sm,yi.prototype.replaceJsonObjects=yi.prototype.dm,yi.prototype.applyIncrementalJSON=yi.prototype.Ky,yi.prototype.applyIncrementalJson=yi.prototype.Zw,yi.prototype.toJSON=yi.prototype.toJSON,yi.prototype.toJson=yi.prototype.np,yi.prototype.toIncrementalJSON=yi.prototype.yA,yi.prototype.toIncrementalJson=yi.prototype.$x,yi.prototype.toIncrementalData=yi.prototype.xA,yi.prototype.clear=yi.prototype.clear;var k1=!1,_l={};yi.className="Model",yi.fromJSON=yi.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=Dn.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:$t("Unable to construct a Model from: "+a);if(y===null){a=null;var E=x.class;if(typeof E=="string")try{var b=null;E.indexOf("go.")===0?(E=E.substr(3),b=dy(E)):(b=dy(E),b===null&&(b=Dn[E])),typeof b=="function"&&(a=new b)}catch(z){}a===null||a instanceof yi?y=a:$t("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=yi.constructGraphLinksModel()),y.gp(x),y.kv(x),y},yi.safePropertyValue=ma,yi.safePropertySet=Jo,_l.Brush=ro,_l.ChangedEvent=Io,_l.Geometry=ln,_l.Margin=ii,_l.Panel=mn,_l.Point=Tt,_l.Rect=ae,_l.Size=Ut,_l.Spot=Xe,_l.Transaction=ga,_l.UndoManager=Vo;function Sa(a,y,x,E){Ri(this),this._isFrozen=!1,a===void 0&&(a=""),y===void 0&&(y=a),x===void 0&&(x=null),this.j=-1,this.xd=null,this.xl=a,this.wl=this.to=0,this.Cr=null,this.wn=!1,this.sl=y,this.Im=x,E===void 0?(this.el=E1,this.wk=null):(this.el=vp,this.wk=E),this.st=new cn}Sa.prototype.copy=function(){var a=new Sa;return a.xl=this.xl,a.to=this.to,a.wl=this.wl,a.Cr=this.Cr,a.wn=this.wn,a.sl=this.sl,a.Im=this.Im,a.el=this.el,a.wk=this.wk,a},Ct=Sa.prototype,Ct.qb=function(a){a.classType===Sa&&(this.mode=a)},Ct.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return this._isFrozen=!1,this},Ct.Kx=function(a){return a===void 0&&(a=null),this.mode=vp,this.backConverter=a,this},Ct.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},Ct.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function M1(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}Ct.Mv=function(a,y,x){var E=this.sl;if(x===void 0||E===""||E===x){x=this.xl;var b=this.Im;if(b===null&&x==="")Bi("Binding error: target property is the empty string: "+this.toString());else{var z=y;if(E!==""&&(z=ma(y,E)),z!==void 0)if(b===null)x!==""&&Jo(a,x,z);else try{if(x!==""){var tt=b(z,a);Jo(a,x,tt)}else b(z,a)}catch(rt){}}}},Ct.sp=function(a,y,x,E){if(this.el===vp){var b=this.xl;if(x===void 0||b===x){x=this.sl;var z=this.wk,tt=a;if(b!==""&&(tt=ma(a,b)),tt!==void 0&&!this.st.contains(a))try{this.st.add(a);var rt=E!==null?E.diagram:null,ot=rt!==null?rt.model:null;if(z===null){if(x!=="")ot!==null?ot.setDataProperty(y,x,tt):Jo(y,x,tt);else if(ot!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var st=E.itemIndex,ut=E.panel.itemArray;ot.ov(ut,st),ot.ts(ut,st,tt)}}else try{if(x!==""){var ft=z(tt,y,ot);ot!==null?ot.setDataProperty(y,x,ft):Jo(y,x,ft)}else{var vt=z(tt,y,ot);if(vt!==void 0&&ot!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var yt=E.itemIndex,Pt=E.panel.itemArray;ot.ov(Pt,yt),ot.ts(Pt,yt,vt)}}}catch(Et){}}finally{this.st.remove(a)}}}},Me.Object.defineProperties(Sa.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&pn(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&pn(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&pn(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&pn(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&pn(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&pn(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&pn(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&pn(this),this.el=a}}}),Sa.prototype.updateSource=Sa.prototype.sp,Sa.prototype.updateTarget=Sa.prototype.Mv,Sa.prototype.ofModel=Sa.prototype.dA,Sa.prototype.ofObject=Sa.prototype.cp,Sa.prototype.makeTwoWay=Sa.prototype.Kx;var Tx="Binding",E1=new Ve(Sa,"OneWay",1),vp=new Ve(Sa,"TwoWay",2);Sa.className="Binding",Sa.parseEnum=function(a,y){return function(x){return x=ni(a,x),x===null?y:x}},Sa.toString=Sr,Sa.OneWay=E1,Sa.TwoWay=vp;function Ir(a,y,x){yi.call(this),this.Vv=`,
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
"removedLinkKeys": `,this.md=[],this.$f=new cn,this.wb=new be,this.Jh="",this.Ri=this.Ak=this.cl=null,this.lf="from",this.mf="to",this.fj=this.ej="",this.dj="category",this.je="",this.jl="isGroup",this.Je="group",this.Lm=!1,y!==void 0&&(this.linkDataArray=y),a!==void 0&&(un(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Oe(Ir,yi),Ir.constructGraphLinksModel=yi.constructGraphLinksModel,Ir.prototype.cloneProtected=function(a){yi.prototype.cloneProtected.call(this,a),a.Jh=this.Jh,a.cl=this.cl,a.Ak=this.Ak,a.lf=this.lf,a.mf=this.mf,a.ej=this.ej,a.fj=this.fj,a.dj=this.dj,a.je=this.je,a.jl=this.jl,a.Je=this.Je,a.Lm=this.Lm},Ct=Ir.prototype,Ct.clear=function(){yi.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},Ct.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" GraphLinksModel";if(0<a){y+=`
|
|
node data:`,a=this.nodeDataArray;var x=a.length,E;for(E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+Sr(b)}for(y+=`
|
|
link data:`,a=this.linkDataArray,x=a.length,E=0;E<x;E++)b=a[E],y+=" "+dl(this,b,!0)+"-->"+dl(this,b,!1)}return y},Ct.Qv=function(a,y){this.linkKeyProperty===""&&$t("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=yi.prototype.Qv.call(this,a,y),E=this,b=new cn,z=new cn,tt=new cn,rt=this.vh;a.changes.each(function(ut){ut.model===E&&(ut.modelChange==="linkDataArray"?ut.change===Xo?b.add(ut.newValue):ut.change===ua&&tt.add(ut.oldValue):E.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){E.Jc(ft)&&z.add(ft)}):ut.object instanceof yi||E.lb(ut.object)||A1(E,ut.object).each(function(ft){z.add(ft)})))});var ot=this.il;ot.clear(),b.each(function(ut){ot.add(E.Ac(ut)),y||z.add(ut)});var st=this.kl;return st.clear(),tt.each(function(ut){st.add(E.Ac(ut)),y&&z.add(ut)}),a=E.cloneDeep(z.Fa()),0<ot.count&&(x===null&&(x={}),y?x.removedLinkKeys=ot.Fa():x.insertedLinkKeys=ot.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<st.count&&(x===null&&(x={}),y?x.insertedLinkKeys=st.Fa():x.removedLinkKeys=st.Fa()),st.clear(),ot.clear(),x},Ct.rm=function(){var a=yi.prototype.rm.call(this),y="";return this.linkCategoryProperty!=="category"&&typeof this.linkCategoryProperty=="string"&&(y+=`,
|
|
"linkCategoryProperty": `+this.quote(this.linkCategoryProperty)),this.linkKeyProperty!==""&&typeof this.linkKeyProperty=="string"&&(y+=`,
|
|
"linkKeyProperty": `+this.quote(this.linkKeyProperty)),this.linkFromKeyProperty!=="from"&&typeof this.linkFromKeyProperty=="string"&&(y+=`,
|
|
"linkFromKeyProperty": `+this.quote(this.linkFromKeyProperty)),this.linkToKeyProperty!=="to"&&typeof this.linkToKeyProperty=="string"&&(y+=`,
|
|
"linkToKeyProperty": `+this.quote(this.linkToKeyProperty)),this.linkFromPortIdProperty!==""&&typeof this.linkFromPortIdProperty=="string"&&(y+=`,
|
|
"linkFromPortIdProperty": `+this.quote(this.linkFromPortIdProperty)),this.linkToPortIdProperty!==""&&typeof this.linkToPortIdProperty=="string"&&(y+=`,
|
|
"linkToPortIdProperty": `+this.quote(this.linkToPortIdProperty)),this.linkLabelKeysProperty!==""&&typeof this.linkLabelKeysProperty=="string"&&(y+=`,
|
|
"linkLabelKeysProperty": `+this.quote(this.linkLabelKeysProperty)),this.nodeIsGroupProperty!=="isGroup"&&typeof this.nodeIsGroupProperty=="string"&&(y+=`,
|
|
"nodeIsGroupProperty": `+this.quote(this.nodeIsGroupProperty)),this.nodeGroupKeyProperty!=="group"&&typeof this.nodeGroupKeyProperty=="string"&&(y+=`,
|
|
"nodeGroupKeyProperty": `+this.quote(this.nodeGroupKeyProperty)),a+y},Ct.gp=function(a){yi.prototype.gp.call(this,a),a.linkKeyProperty&&(this.linkKeyProperty=a.linkKeyProperty),a.linkFromKeyProperty&&(this.linkFromKeyProperty=a.linkFromKeyProperty),a.linkToKeyProperty&&(this.linkToKeyProperty=a.linkToKeyProperty),a.linkFromPortIdProperty&&(this.linkFromPortIdProperty=a.linkFromPortIdProperty),a.linkToPortIdProperty&&(this.linkToPortIdProperty=a.linkToPortIdProperty),a.linkCategoryProperty&&(this.linkCategoryProperty=a.linkCategoryProperty),a.linkLabelKeysProperty&&(this.linkLabelKeysProperty=a.linkLabelKeysProperty),a.nodeIsGroupProperty&&(this.nodeIsGroupProperty=a.nodeIsGroupProperty),a.nodeGroupKeyProperty&&(this.nodeGroupKeyProperty=a.nodeGroupKeyProperty)},Ct.Rv=function(){var a=yi.prototype.Rv.call(this),y=`,
|
|
"linkDataArray": `+cd(this,this.linkDataArray,!0);return a+y},Ct.kv=function(a){yi.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function A1(a,y){for(var x=new cn,E=0;E<a.linkDataArray.length;E++){var b=a.linkDataArray[E];h0(a,y,b,b,x)}return x}Ct.Pv=function(a,y){this.linkKeyProperty===""&&$t("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=yi.prototype.Pv.call(this,a,y),E=this,b=new cn,z=new cn,tt=new cn,rt=this.vh;a.changes.each(function(ut){ut.model===E&&(ut.modelChange==="linkDataArray"?ut.change===Xo?b.add(ut.newValue):ut.change===ua&&tt.add(ut.oldValue):E.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){E.Jc(ft)&&z.add(ft)}):ut.object instanceof yi||E.lb(ut.object)||A1(E,ut.object).each(function(ft){z.add(ft)})))});var ot=this.il;ot.clear(),b.each(function(ut){ot.add(E.Ac(ut)),y||z.add(ut)});var st=this.kl;return st.clear(),tt.each(function(ut){st.add(E.Ac(ut)),y&&z.add(ut)}),a=x,0<ot.count&&(a+=(y?this.Xv:this.Vv)+cd(this,ot.Fa(),!0)),0<z.count&&(a+=this.iy+cd(this,z.Fa(),!0)),0<st.count&&(a+=(y?this.Vv:this.Xv)+cd(this,st.Fa(),!0)),st.clear(),ot.clear(),a},Ct.fp=function(a){(a.linkCategoryProperty!==void 0&&a.linkCategoryProperty!==this.linkCategoryProperty||a.linkKeyProperty!==void 0&&a.linkKeyProperty!==this.linkKeyProperty||a.linkFromKeyProperty!==void 0&&a.linkFromKeyProperty!==this.linkFromKeyProperty||a.linkToKeyProperty!==void 0&&a.linkToKeyProperty!==this.linkToKeyProperty||a.linkFromPortIdProperty!==void 0&&a.linkFromPortIdProperty!==this.linkFromPortIdProperty||a.linkToPortIdProperty!==void 0&&a.linkToPortIdProperty!==this.linkToPortIdProperty||a.linkLabelKeysProperty!==void 0&&a.linkLabelKeysProperty!==this.linkLabelKeysProperty||a.nodeIsGroupProperty!==void 0&&a.nodeIsGroupProperty!==this.nodeIsGroupProperty||a.nodeGroupKeyProperty!==void 0&&a.nodeGroupKeyProperty!==this.nodeGroupKeyProperty)&&$t("applyIncrementalJson cannot change Model properties"),yi.prototype.fp.call(this,a);var y=a.insertedLinkKeys;if(Array.isArray(y))for(var x=y.length,E=0;E<x;E++){var b=y[E],z=this.jh(b);z===null&&(z=this.Jo({}),this.Ks(z,b),this.fi(z))}if(y=a.modifiedLinkData,Array.isArray(y)){for(x=y.length,E=0;E<x;E++)if(b=y[E],z=this.Ac(b),z=this.jh(z),z!==null){for(var tt in b)tt!=="__gohashid"&&tt!==this.linkKeyProperty&&this.setDataProperty(z,tt,b[tt]);N1(this,b,z)}}if(a=a.removedLinkKeys,Array.isArray(a))for(tt=a.length,y=0;y<tt;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},Ir.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===Eo){var x=a.object,E=a.propertyName;if(E===this.linkKeyProperty&&this.Jc(x)){var b=a.I(y);y=a.I(!y),y!==void 0&&this.wb.remove(y),b!==void 0&&this.wb.add(b,x),Jo(x,E,b);return}}else if(a.change===Xo){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,_e(a)&&typeof x=="number"&&(E=this.Ac(a),y?(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),E!==void 0&&this.wb.remove(E)):(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),E!==void 0&&this.wb.add(E,a)));return}if(a.modelChange==="linkLabelKeys"){E=this.Ef(a.object),Array.isArray(E)&&typeof x=="number"&&(y?(x=E.indexOf(a.newValue),0<=x&&E.splice(x,1)):0>E.indexOf(a.newValue)&&E.splice(x,0,a.newValue));return}}else if(a.change===ua){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,_e(a)&&typeof x=="number"&&(E=this.Ac(a),y?(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),E!==void 0&&this.wb.add(E,a)):(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),E!==void 0&&this.wb.remove(E)));return}if(a.modelChange==="linkLabelKeys"){E=this.Ef(a.object),Array.isArray(E)&&typeof x=="number"&&(y?0>E.indexOf(a.newValue)&&E.splice(x,0,a.newValue):(x=E.indexOf(a.newValue),0<=x&&E.splice(x,1)));return}}yi.prototype.changeState.call(this,a,y)}},Ct=Ir.prototype,Ct.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),Jo(x,this.nodeKeyProperty,a),this.xf(x))}return a}},Ct.yx=function(a){return dl(this,a,!0)},Ct.wv=function(a,y){Vf(this,a,y,!0)},Ct.Bx=function(a){return dl(this,a,!1)},Ct.Bv=function(a,y){Vf(this,a,y,!1)};function dl(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=ma(y,a),a!==void 0))){if(fd(a))return a;$t((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function Vf(a,y,x,E){if(x===null&&(x=void 0),y!==null){var b=E?a.lf:a.mf;if(b!=="")if(x=a.Vl(x),a.Jc(y)){var z=ma(y,b);z!==x&&(lu(a,z,y),Jo(y,b,x),a.hc(x)===null&&su(a,x,y),Aa(a,E?"linkFromKey":"linkToKey",Eo,b,y,z,x),typeof b=="string"&&a.La(y,b))}else Jo(y,b,x)}}Ct.zx=function(a){return c0(this,a,!0)},Ct.xv=function(a,y){Kf(this,a,y,!0)},Ct.Cx=function(a){return c0(this,a,!1)},Ct.Cv=function(a,y){Kf(this,a,y,!1)};function c0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=ma(y,a),y===void 0?"":y)}function Kf(a,y,x,E){if(y!==null){var b=E?a.ej:a.fj;if(b!=="")if(a.Jc(y)){var z=ma(y,b);z===void 0&&(z=""),z!==x&&(Jo(y,b,x),Aa(a,E?"linkFromPortId":"linkToPortId",Eo,b,y,z,x),typeof b=="string"&&a.La(y,b))}else Jo(y,b,x)}}Ct.Ef=function(a){if(a===null)return f0;var y=this.je;return y===""?f0:(a=ma(a,y),a===void 0?f0:a)},Ct.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var E=ma(a,x);if(E===void 0&&(E=f0),E!==y){if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)lu(this,E[z],a);for(Jo(a,x,y),b=y.length,z=0;z<b;z++){var tt=y[z];this.hc(tt)===null&&su(this,tt,a)}Aa(this,"linkLabelKeys",Eo,x,a,E,y),typeof x=="string"&&this.La(a,x)}}else Jo(a,x,y)}},Ct.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=ma(a,x);if(E===void 0)x=[],x.push(y),this.Ls(a,x);else if(Array.isArray(E)){var b=E.indexOf(y);0<=b||(b=E.length,E.push(y),this.Jc(a)&&(this.hc(y)===null&&su(this,y,a),Aa(this,"linkLabelKeys",Xo,x,a,null,y,null,b)))}else $t(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},Ct.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=ma(a,x);if(Array.isArray(E)){var b=E.indexOf(y);0>b||(E.splice(b,1),this.Jc(a)&&(lu(this,y,a),Aa(this,"linkLabelKeys",ua,x,a,y,null,b,null)))}else E!==void 0&&$t(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Ct.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=ma(a,y),y!==void 0)){if(fd(y))return y;$t("Key value for link data "+a+" is not a number or a string: "+y)}}},Ct.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var E=ma(a,x);E!==y&&this.jh(y)===null&&(Jo(a,x,y),E!==void 0&&this.wb.remove(E),this.wb.add(y,a),Aa(this,"linkKey",Eo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Jo(a,x,y)}},Ct.jh=function(a){return a===null&&$t("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&fd(a)?this.wb.I(a):null},Ct.Bs=function(a){if(a!==null){var y=this.Jh;if(y!==""){var x=this.Ac(a);if(x===void 0||this.wb.contains(x)){var E=this.cl;if(E!==null&&(x=E(this,a),x!=null&&!this.wb.contains(x))){Jo(a,y,x);return}if(typeof x=="string"){for(E=2;this.wb.contains(x+E);)E++;Jo(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;Jo(a,y,x)}}}}},Ct.Jc=function(a){return a===null?!1:this.$f.contains(a)},Ct.fi=function(a){a!==null&&(_i(a),this.Jc(a)||F1(this,a,!0))};function F1(a,y,x){if(a.linkKeyProperty!==""){var E=a.Ac(y);if(E!==void 0&&a.wb.I(E)===y)return;a.Bs(y),E=a.Ac(y),E===void 0&&$t("GraphLinksModel.makeLinkDataKeyUnique failed on "+y+". Data not added to model."),a.wb.add(E,y)}a.$f.add(y),E=null,x&&(E=a.md.length,a.md.splice(E,0,y)),Aa(a,"linkDataArray",Xo,"linkDataArray",a,null,y,null,E),cy(a,y)}Ct.Ey=function(a){if(Array.isArray(a))for(var y=a.length,x=0;x<y;x++)this.fi(a[x]);else for(a=a.iterator;a.next();)this.fi(a.value)},Ct.bm=function(a){a!==null&&b1(this,a,!0)};function b1(a,y,x){a.$f.remove(y);var E=a.Ac(y);if(E!==void 0&&a.wb.remove(E),E=null,x){if(E=a.md.indexOf(y),0>E)return;a.md.splice(E,1)}if(Aa(a,"linkDataArray",ua,"linkDataArray",a,y,null,E,null),x=dl(a,y,!0),lu(a,x,y),x=dl(a,y,!1),lu(a,x,y),E=a.Ef(y),Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],lu(a,x,y)}Ct.lA=function(a){if(Array.isArray(a))for(var y=a.length,x=0;x<y;x++)this.bm(a[x]);else for(a=a.iterator;a.next();)this.bm(a.value)},Ct.Zz=function(a){if(this.linkKeyProperty===""&&$t("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&un(a)){var y=this.kl;y.clear(),y.addAll(this.wb.iteratorKeys);var x=this.il;x.clear();for(var E=a.length,b=0;b<E;b++){var z=a[b],tt=this.Ac(z);if(tt!==void 0){x.add(tt);var rt=this.jh(tt);rt!==z&&(rt!==null?(this.Do(rt,z),N1(this,z,rt)):(z=this.cloneDeep(z),this.Ks(z,tt),this.fi(z)))}else tt=this.cloneDeep(z),this.fi(tt),x.add(this.Ac(tt))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.jh(E))&&this.bm(E);y.clear(),x.clear()}};function cy(a,y){var x=dl(a,y,!0);x=a.Vl(x),a.hc(x)===null&&su(a,x,y),x=dl(a,y,!1),x=a.Vl(x),a.hc(x)===null&&su(a,x,y);var E=a.Ef(y);if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],a.hc(x)===null&&su(a,x,y)}Ct.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):d0(this,a,!0),_e(a)&&(Ri(a),this.lf!==""&&Jo(a,this.lf,void 0),this.mf!==""&&Jo(a,this.mf,void 0),this.je!==""&&Jo(a,this.je,[])),a},Ct.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!ma(a,y)},Ct.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=ma(a,y),y!==void 0)){if(fd(y))return y;$t("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},Ct.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var E=ma(a,x);E!==y&&(lu(this,E,a),Jo(a,x,y),this.hc(y)===null&&su(this,y,a),Aa(this,"nodeGroupKey",Eo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Jo(a,x,y)}},Ir.prototype.copyNodeData=function(a){return a===null?null:(a=yi.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||ma(a,this.Je)===void 0||Jo(a,this.Je,void 0),a)},Ir.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}if(y===this.nodeGroupKeyProperty){this.mp(a,x);return}}else if(this.Jc(a)){if(y===this.linkFromKeyProperty){Vf(this,a,x,!0);return}if(y===this.linkToKeyProperty){Vf(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Kf(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Kf(this,a,x,!1);return}if(y===this.linkKeyProperty){this.Ks(a,x);return}if(y===this.linkCategoryProperty){this.lp(a,x);return}if(y===this.linkLabelKeysProperty){this.Ls(a,x);return}}var E=ma(a,y);E!==x&&(Jo(a,y,x),this.Fs(a,y,E,x))},Ct=Ir.prototype,Ct.Do=function(a,y){if(y){var x=this.lb(a),E=this.Jc(a),b;for(b in y)b==="__gohashid"||x&&b===this.nodeKeyProperty||x&&b===this.nodeIsGroupProperty&&ma(a,b)===y[b]||E&&b===this.linkKeyProperty||this.setDataProperty(a,b,y[b])}},Ct.jp=function(a,y){yi.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y);for(x=this.$f.iterator;x.next();){var E=x.value,b=a,z=y;if(dl(this,E,!0)===b){var tt=this.lf;Jo(E,tt,z),Aa(this,"linkFromKey",Eo,tt,E,b,z),typeof tt=="string"&&this.La(E,tt)}if(dl(this,E,!1)===b&&(tt=this.mf,Jo(E,tt,z),Aa(this,"linkToKey",Eo,tt,E,b,z),typeof tt=="string"&&this.La(E,tt)),tt=this.Ef(E),Array.isArray(tt))for(var rt=tt.length,ot=this.je,st=0;st<rt;st++)tt[st]===b&&(tt[st]=z,Aa(this,"linkLabelKeys",Xo,ot,E,b,z,st,st))}},Ct.qv=function(a,y,x){if(this.lh(a)===y){var E=this.Je;Jo(a,E,x),Aa(this,"nodeGroupKey",Eo,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Ct.Lv=function(){yi.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)cy(this,a[x])},Ct.fm=function(a){yi.prototype.fm.call(this,a),a=this.wa(a);var y=pp(this,a);if(y!==null){var x=Ei();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)){if(this.lh(E)===a){var b=this.Je;Aa(this,"nodeGroupKey",Eo,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}else if(dl(this,E,!0)===a&&(b=this.lf,Aa(this,"linkFromKey",Eo,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),dl(this,E,!1)===a&&(b=this.mf,Aa(this,"linkToKey",Eo,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),b=this.Ef(E),Array.isArray(b))for(var z=b.length,tt=this.je,rt=0;rt<z;rt++)b[rt]===a&&(Aa(this,"linkLabelKeys",Xo,tt,E,a,a,rt,rt),x.push(E))}for(y=0;y<x.length;y++)lu(this,a,x[y]);ri(x)}},Ct.em=function(a){yi.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&su(this,y,a)},Ct.qp=function(a){yi.prototype.qp.call(this,a);var y=this.lh(a);lu(this,y,a)},Ct.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=ma(a,y),y===void 0))return"";if(typeof y=="string")return y;$t("getCategoryForLinkData found a non-string category for "+a+": "+y)},Ir.prototype.getLinkCategoryForData=function(a){return this.ps(a)},Ir.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var E=ma(a,x);E===void 0&&(E=""),E!==y&&(Jo(a,x,y),Aa(this,"linkCategory",Eo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Jo(a,x,y)}},Ir.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},Ct=Ir.prototype,Ct.lm=function(a,y){yi.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function N1(a,y,x){a.lp(x,a.ps(y)),a.wv(x,a.yx(y)),a.Bv(x,a.Bx(y)),a.Ls(x,a.Ef(y)),a.xv(x,a.zx(y)),a.Cv(x,a.Cx(y))}Ct.Wj=function(){return!0},Ct.ri=function(){return!0},Ct.xs=function(){return!0},Ct.Xj=function(){return!0},Me.Object.defineProperties(Ir.prototype,{archetypeNodeData:{get:function(){return this.Ri},set:function(a){var y=this.Ri;y!==a&&(this.Ri=a,this.g("archetypeNodeData",y,a))}},linkFromKeyProperty:{get:function(){return this.lf},set:function(a){var y=this.lf;y!==a&&(this.lf=a,this.g("linkFromKeyProperty",y,a))}},linkToKeyProperty:{get:function(){return this.mf},set:function(a){var y=this.mf;y!==a&&(this.mf=a,this.g("linkToKeyProperty",y,a))}},linkFromPortIdProperty:{get:function(){return this.ej},set:function(a){var y=this.ej;y!==a&&(this.ej=a,this.g("linkFromPortIdProperty",y,a))}},linkToPortIdProperty:{get:function(){return this.fj},set:function(a){var y=this.fj;y!==a&&(this.fj=a,this.g("linkToPortIdProperty",y,a))}},linkLabelKeysProperty:{get:function(){return this.je},set:function(a){var y=this.je;y!==a&&(this.je=a,this.g("linkLabelKeysProperty",y,a))}},linkDataArray:{get:function(){return this.md},set:function(a){var y=this.md;if(y!==a){this.wb.clear();for(var x=a.length,E=0;E<x;E++){var b=a[E];_e(b)||$t("GraphLinksModel.linkDataArray must only contain Objects, not: "+b),_i(b)}if(this.md=a,this.linkKeyProperty!==""){for(E=new dn,b=0;b<x;b++){var z=a[b],tt=this.Ac(z);tt===void 0||this.wb.I(tt)!==null?E.add(z):this.wb.add(tt,z)}for(E=E.iterator;E.next();)b=E.value,this.Bs(b),z=this.Ac(b),z!==void 0&&this.wb.add(z,b)}for(E=new cn,b=0;b<x;b++)E.add(a[b]);for(this.$f=E,Aa(this,"linkDataArray",Eo,"linkDataArray",this,y,a),y=0;y<x;y++)cy(this,a[y])}}},linkKeyProperty:{get:function(){return this.Jh},set:function(a){var y=this.Jh;if(y!==a){this.Jh=a,this.wb.clear();for(var x=this.linkDataArray.length,E=0;E<x;E++){var b=this.linkDataArray[E],z=this.Ac(b);z===void 0&&(this.Bs(b),z=this.Ac(b)),z!==void 0&&this.wb.add(z,b)}this.g("linkKeyProperty",y,a)}}},makeUniqueLinkKeyFunction:{get:function(){return this.cl},set:function(a){var y=this.cl;y!==a&&(this.cl=a,this.g("makeUniqueLinkKeyFunction",y,a))}},copyLinkDataFunction:{get:function(){return this.Ak},set:function(a){var y=this.Ak;y!==a&&(this.Ak=a,this.g("copyLinkDataFunction",y,a))}},nodeIsGroupProperty:{get:function(){return this.jl},set:function(a){var y=this.jl;y!==a&&(this.jl=a,this.g("nodeIsGroupProperty",y,a))}},nodeGroupKeyProperty:{get:function(){return this.Je},set:function(a){var y=this.Je;y!==a&&(this.Je=a,this.g("nodeGroupKeyProperty",y,a))}},Ij:{get:function(){return this.Lm},set:function(a){this.Lm!==a&&(this.Lm=a)}},linkCategoryProperty:{get:function(){return this.dj},set:function(a){var y=this.dj;y!==a&&(this.dj=a,this.g("linkCategoryProperty",y,a))}},type:{get:function(){return"GraphLinksModel"}}}),Ir.prototype.setCategoryForLinkData=Ir.prototype.lp,Ir.prototype.getCategoryForLinkData=Ir.prototype.ps,Ir.prototype.assignAllDataProperties=Ir.prototype.Do,Ir.prototype.setGroupKeyForNodeData=Ir.prototype.mp,Ir.prototype.getGroupKeyForNodeData=Ir.prototype.lh,Ir.prototype.isGroupForNodeData=Ir.prototype.Yu,Ir.prototype.copyLinkData=Ir.prototype.Jo,Ir.prototype.mergeLinkDataArray=Ir.prototype.Zz,Ir.prototype.removeLinkDataCollection=Ir.prototype.lA,Ir.prototype.removeLinkData=Ir.prototype.bm,Ir.prototype.addLinkDataCollection=Ir.prototype.Ey,Ir.prototype.addLinkData=Ir.prototype.fi,Ir.prototype.containsLinkData=Ir.prototype.Jc,Ir.prototype.makeLinkDataKeyUnique=Ir.prototype.Bs,Ir.prototype.findLinkDataForKey=Ir.prototype.jh,Ir.prototype.setKeyForLinkData=Ir.prototype.Ks,Ir.prototype.getKeyForLinkData=Ir.prototype.Ac,Ir.prototype.removeLabelKeyForLinkData=Ir.prototype.Qx,Ir.prototype.addLabelKeyForLinkData=Ir.prototype.Bu,Ir.prototype.setLabelKeysForLinkData=Ir.prototype.Ls,Ir.prototype.getLabelKeysForLinkData=Ir.prototype.Ef,Ir.prototype.setToPortIdForLinkData=Ir.prototype.Cv,Ir.prototype.getToPortIdForLinkData=Ir.prototype.Cx,Ir.prototype.setFromPortIdForLinkData=Ir.prototype.xv,Ir.prototype.getFromPortIdForLinkData=Ir.prototype.zx,Ir.prototype.setToKeyForLinkData=Ir.prototype.Bv,Ir.prototype.getToKeyForLinkData=Ir.prototype.Bx,Ir.prototype.setFromKeyForLinkData=Ir.prototype.wv,Ir.prototype.getFromKeyForLinkData=Ir.prototype.yx,Ir.prototype.clear=Ir.prototype.clear;var f0=Object.freeze([]);Ir.className="GraphLinksModel",_l.GraphLinksModel=Ir,yi.constructGraphLinksModel=yi.constructGraphLinksModel=function(){return new Ir},yi.initDiagramModel=hy=function(){return new Ir};function Fs(a,y){yi.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(un(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Oe(Fs,yi),Fs.constructGraphLinksModel=yi.constructGraphLinksModel,Fs.prototype.cloneProtected=function(a){yi.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},Ct=Fs.prototype,Ct.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" TreeModel";if(0<a){y+=`
|
|
node data:`,a=this.nodeDataArray;for(var x=a.length,E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+Sr(b)}}return y},Ct.rm=function(){var a=yi.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
|
|
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},Ct.gp=function(a){yi.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Ct.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&$t("applyIncrementalJson cannot change Model properties"),yi.prototype.fp.call(this,a)},Ct.Vl=function(a){return a},Ct.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=ma(a,y),y!==void 0)){if(fd(y))return y;$t("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},Ct.qe=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Ke;if(x!=="")if(y=this.Vl(y),this.lb(a)){var E=ma(a,x);E!==y&&(lu(this,E,a),Jo(a,x,y),this.hc(y)===null&&su(this,y,a),Aa(this,"nodeParentKey",Eo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Jo(a,x,y)}},Ct.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=ma(a,y),y===void 0)?"":typeof y=="string"?y:($t("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},Fs.prototype.getLinkCategoryForData=function(a){return this.ss(a)},Fs.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var E=ma(a,x);E===void 0&&(E=""),E!==y&&(Jo(a,x,y),Aa(this,"parentLinkCategory",Eo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Jo(a,x,y)}},Fs.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},Fs.prototype.copyNodeData=function(a){return a===null?null:(a=yi.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||ma(a,this.Ke)===void 0||Jo(a,this.Ke,void 0),a)},Fs.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}if(y===this.nodeParentKeyProperty){this.qe(a,x);return}}var E=ma(a,y);E!==x&&(Jo(a,y,x),this.Fs(a,y,E,x))},Ct=Fs.prototype,Ct.jp=function(a,y){yi.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},Ct.qv=function(a,y,x){if(this.mh(a)===y){var E=this.Ke;Jo(a,E,x),Aa(this,"nodeParentKey",Eo,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Ct.fm=function(a){yi.prototype.fm.call(this,a),a=this.wa(a);var y=pp(this,a);if(y!==null){var x=Ei();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)&&this.mh(E)===a){var b=this.Ke;Aa(this,"nodeParentKey",Eo,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}for(y=0;y<x.length;y++)lu(this,a,x[y]);ri(x)}},Ct.em=function(a){yi.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&su(this,y,a)},Ct.qp=function(a){yi.prototype.qp.call(this,a);var y=this.mh(a);lu(this,y,a)},Ct.lm=function(a,y){yi.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},Ct.Tl=function(){return!0},Ct.xs=function(){return!0},Me.Object.defineProperties(Fs.prototype,{nodeParentKeyProperty:{get:function(){return this.Ke},set:function(a){var y=this.Ke;y!==a&&(this.Ke=a,this.g("nodeParentKeyProperty",y,a))}},Jj:{get:function(){return this.Nm},set:function(a){this.Nm!==a&&(this.Nm=a)}},parentLinkCategoryProperty:{get:function(){return this.nj},set:function(a){var y=this.nj;y!==a&&(this.nj=a,this.g("parentLinkCategoryProperty",y,a))}},linkCategoryProperty:{get:function(){return this.parentLinkCategoryProperty},set:function(a){this.parentLinkCategoryProperty=a}},type:{get:function(){return"TreeModel"}}}),Fs.prototype.setParentLinkCategoryForNodeData=Fs.prototype.Ms,Fs.prototype.getParentLinkCategoryForNodeData=Fs.prototype.ss,Fs.prototype.setParentKeyForNodeData=Fs.prototype.qe,Fs.prototype.getParentKeyForNodeData=Fs.prototype.mh,Fs.className="TreeModel",_l.TreeModel=Fs;function na(a){_o.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=ql,this.Ti=0,this.Zv=new Tt,this.Jp=this.me=0,this.Xr=new Pp,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=ql,this.K=bs,this.nd=Uf,this.hd=ry,this.tf=6,this.Nn=x0,a&&Object.assign(this,a)}Oe(na,_o),na.prototype.cloneProtected=function(a){_o.prototype.cloneProtected.call(this,a),a.eo=this.eo,a.Cm=this.Cm,a.ro=this.ro,a.ul=this.ul,a.Rb=this.Rb,a.K=this.K,a.nd=this.nd,a.hd=this.hd,a.tf=this.tf,a.Nn=this.Nn},na.prototype.qb=function(a){a.classType===na?a===y0||a===S0||a===m0||a===v0||a===Uf?this.sorting=a:a===ec||a===Yf||a===bs||a===pd?this.direction=a:a===Bh||a===gd||a===ql||a===$l?this.arrangement=a:(a===Wc||a===x0)&&(this.nodeDiameterFormula=a):_o.prototype.qb.call(this,a)},na.prototype.createNetwork=function(){return new Xf(this)},na.prototype.doLayout=function(a){if(this.network===null&&(this.network=this.makeNetwork(a)),this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin),a=this.network.vertexes,1>=a.count)a.count===1&&(a=a.first(),a.centerX=0,a.centerY=0);else{var y=new dn;y.addAll(a.iterator),a=new dn;var x=new dn,E=this.sort(y),b,z,tt=this.Jp,rt=this.arrangement,ot=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)||360<vt||1>vt)&&(vt=360),y=this.spacing,isFinite(y)||(y=NaN),rt===$l&&ot===Wc?rt=ql:rt===$l&&ot!==Wc&&(rt=this.arrangement),(this.direction===ec||this.direction===Yf)&&this.sorting!==Uf){for(ot=0;!(ot>=E.length)&&(a.add(E.M(ot)),!(ot+1>=E.length));ot+=2)x.add(E.M(ot+1));this.direction===ec?(this.arrangement===$l&&a.reverse(),E=new dn,E.addAll(a),E.addAll(x)):(this.arrangement===$l&&x.reverse(),E=new dn,E.addAll(x),E.addAll(a))}ot=E.length;for(var yt=z=b=0;yt<E.length;yt++){var Pt=ft+vt*z*(this.direction===bs?1:-1)/ot,Et=E.M(yt).diameter;isNaN(Et)&&(Et=md(E.M(yt),Pt)),360>vt&&(yt===0||yt===E.length-1)&&(Et/=2),b+=Et,z++}if(isNaN(st)||rt===$l){if(isNaN(y)&&(y=6),rt!==ql&&rt!==$l){for(z=-1/0,tt=0;tt<ot;tt++)yt=E.M(tt),b=E.M(tt===ot-1?0:tt+1),isNaN(yt.diameter)&&md(yt,0),isNaN(b.diameter)&&md(b,0),z=Math.max(z,(yt.diameter+b.diameter)/2);tt=z+y,rt===Bh?st=(z+y)/(2*Math.PI/ot):st=g0(this,tt*(360<=vt?ot:ot-1),ut,ft*Math.PI/180,vt*Math.PI/180)}else st=g0(this,b+(360<=vt?ot:ot-1)*(rt!==$l?y:1.6*y),ut,ft*Math.PI/180,vt*Math.PI/180);z=st*ut}else if(z=st*ut,yt=fy(this,st,z,ft*Math.PI/180,vt*Math.PI/180),isNaN(y))(rt===ql||rt===$l)&&(y=(yt-b)/(360<=vt?ot:ot-1));else if(rt===ql||rt===$l)yt=(yt-b)/(360<=vt?ot:ot-1),yt<y?(st=g0(this,b+y*(360<=vt?ot:ot-1),ut,ft*Math.PI/180,vt*Math.PI/180),z=st*ut):y=yt;else{for(tt=-1/0,b=0;b<ot;b++)Pt=E.M(b),Et=E.M(b===ot-1?0:b+1),isNaN(Pt.diameter)&&md(Pt,0),isNaN(Et.diameter)&&md(Et,0),tt=Math.max(tt,(Pt.diameter+Et.diameter)/2);tt+=y,b=g0(this,tt*(360<=vt?ot:ot-1),ut,ft*Math.PI/180,vt*Math.PI/180),b>st?(st=b,z=st*ut):tt=yt/(360<=vt?ot:ot-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=E,E=this.kw,rt=this.lc,st=this.lw,ut=this.Wp,ft=this.Ti,vt=this.me,ot=this.Jp,this.direction!==ec&&this.direction!==Yf||E!==$l)if(this.direction===ec||this.direction===Yf){switch(tt=0,E){case gd:tt=180*p0(this,rt,vt,st,ot)/Math.PI;break;case ql:ot=y=0,tt=a.first(),tt!==null&&(y=md(tt,Math.PI/2)),tt=x.first(),tt!==null&&(ot=md(tt,Math.PI/2)),tt=180*p0(this,rt,vt,st,ft+(y+ot)/2)/Math.PI;break;case Bh:tt=ut/y.length}if(this.direction===ec){switch(E){case gd:xp(this,a,st,pd);break;case ql:Sp(this,a,st,pd);break;case Bh:yp(this,a,ut/2,st,pd)}switch(E){case gd:xp(this,x,st+tt,bs);break;case ql:Sp(this,x,st+tt,bs);break;case Bh:yp(this,x,ut/2,st+tt,bs)}}else{switch(E){case gd:xp(this,x,st,pd);break;case ql:Sp(this,x,st,pd);break;case Bh:yp(this,x,ut/2,st,pd)}switch(E){case gd:xp(this,a,st+tt,bs);break;case ql:Sp(this,a,st+tt,bs);break;case Bh:yp(this,a,ut/2,st+tt,bs)}}}else switch(E){case gd:xp(this,y,st,this.direction);break;case ql:Sp(this,y,st,this.direction);break;case Bh:yp(this,y,ut,st,this.direction);break;case $l:T1(this,y,ut,st,this.direction)}else T1(this,y,ut,st-ut/2,bs)}this.updateParts(),this.network=null,this.isValidLayout=!0};function yp(a,y,x,E,b){var z=a.Wp,tt=a.lc;a=a.me,E=E*Math.PI/180,x=x*Math.PI/180;for(var rt=y.length,ot=0;ot<rt;ot++){var st=E+(b===bs?ot*x/(360<=z?rt:rt-1):-(ot*x)/rt),ut=y.M(ot),ft=tt*Math.tan(st)/a;ft=Math.sqrt((tt*tt+a*a*ft*ft)/(1+ft*ft)),ut.centerX=ft*Math.cos(st),ut.centerY=ft*Math.sin(st),ut.actualAngle=180*st/Math.PI}}function Sp(a,y,x,E){var b=a.lc,z=a.me,tt=a.Ti;x=x*Math.PI/180;for(var rt=y.length,ot=0;ot<rt;ot++){var st=y.M(ot),ut=y.M(ot===rt-1?0:ot+1),ft=z*Math.sin(x);st.centerX=b*Math.cos(x),st.centerY=ft,st.actualAngle=180*x/Math.PI,isNaN(st.diameter)&&md(st,0),isNaN(ut.diameter)&&md(ut,0),st=p0(a,b,z,E===bs?x:-x,(st.diameter+ut.diameter)/2+tt),x+=E===bs?st:-st}}function xp(a,y,x,E){var b=a.lc,z=a.me,tt=a.Jp;x=x*Math.PI/180;for(var rt=y.length,ot=0;ot<rt;ot++){var st=y.M(ot);st.centerX=b*Math.cos(x),st.centerY=z*Math.sin(x),st.actualAngle=180*x/Math.PI,st=p0(a,b,z,E===bs?x:-x,tt),x+=E===bs?st:-st}}function T1(a,y,x,E,b){var z=a.Wp;if(a.mj=0,a.Xr=new Pp,360>x){for(z=E+(b===bs?z:-z);0>z;)z+=360;z%=360,180<z&&(z-=360),z*=Math.PI/180,a.gt=z,B1(a,y,x,E,b)}else D1(a,y,x,E,b);a.Xr.commit(y)}function D1(a,y,x,E,b){var z=a.lc,tt=a.Ti,rt=a.Zm,ot=z*Math.cos(E*Math.PI/180),st=a.me*Math.sin(E*Math.PI/180),ut=y.Fa();if(ut.length===3)ut[0].centerX=z,ut[0].centerY=0,ut[1].centerX=ut[0].centerX-ut[0].width/2-ut[1].width/2-tt,ut[1].y=ut[0].y,ut[2].centerX=(ut[0].centerX+ut[1].centerX)/2,ut[2].y=ut[0].y-ut[2].height-tt;else if(ut.length===4)ut[0].centerX=z,ut[0].centerY=0,ut[2].centerX=-ut[0].centerX,ut[2].centerY=ut[0].centerY,ut[1].centerX=0,ut[1].y=Math.min(ut[0].y,ut[2].y)-ut[1].height-tt,ut[3].centerX=0,ut[3].y=Math.max(ut[0].y+ut[0].height+tt,ut[2].y+ut[2].height+tt);else{z=Tt.alloc();for(var ft=0;ft<ut.length&&(ut[ft].centerX=ot,ut[ft].centerY=st,!(ft>=ut.length-1));ft++)O1(a,ot,st,ut,ft,b,z)||I1(a,ot,st,ut,ft,b,z),ot=z.x,st=z.y;if(Tt.free(z),a.mj++,!(23<a.mj)){ot=ut[0].centerX,st=ut[0].centerY,z=ut[ut.length-1].centerX,ft=ut[ut.length-1].centerY;var vt=Math.abs(ot-z)-((ut[0].width+ut[ut.length-1].width)/2+tt),yt=Math.abs(st-ft)-((ut[0].height+ut[ut.length-1].height)/2+tt);tt=0,1>Math.abs(yt)?Math.abs(ot-z)<(ut[0].width+ut[ut.length-1].width)/2&&(tt=0):tt=0<yt?yt:1>Math.abs(vt)?0:vt,ot=Math.abs(z)>Math.abs(ft)?0<z!=st>ft:0<ft!=ot<z,(ot=b===bs?ot:!ot)&&(tt=-Math.abs(tt),tt=Math.min(tt,-ut[ut.length-1].width),tt=Math.min(tt,-ut[ut.length-1].height)),a.Xr.compare(tt,ut),1<Math.abs(tt)&&(a.lc=8>a.mj?a.lc-tt/(2*Math.PI):5>ut.length&&10<tt?a.lc/2:a.lc-(0<tt?1.7:-2.3),a.me=a.lc*rt,D1(a,y,x,E,b))}}}function B1(a,y,x,E,b){for(var z=a.lc,tt=a.me,rt=a.Zm,ot=z*Math.cos(E*Math.PI/180),st=tt*Math.sin(E*Math.PI/180),ut=Tt.alloc(),ft=y.Fa(),vt=0;vt<ft.length&&(ft[vt].centerX=ot,ft[vt].centerY=st,!(vt>=ft.length-1));vt++)O1(a,ot,st,ft,vt,b,ut)||I1(a,ot,st,ft,vt,b,ut),ot=ut.x,st=ut.y;if(Tt.free(ut),a.mj++,!(23<a.mj)){if(ot=Math.atan2(st,ot),ot=b===bs?a.gt-ot:ot-a.gt,ot=Math.abs(ot)<Math.abs(ot-2*Math.PI)?ot:ot-2*Math.PI,z=ot*(z+tt)/2,tt=a.Xr,Math.abs(z)<Math.abs(tt.Pl))for(tt.Pl=z,tt.mk=[],tt.tm=[],ot=0;ot<ft.length;ot++)tt.mk[ot]=ft[ot].bounds.x,tt.tm[ot]=ft[ot].bounds.y;1<Math.abs(z)&&(a.lc=8>a.mj?a.lc-z/(2*Math.PI):a.lc-(0<z?1.7:-2.3),a.me=a.lc*rt,B1(a,y,x,E,b))}}function O1(a,y,x,E,b,z,tt){var rt=a.lc,ot=a.me,st=0;a=(E[b].width+E[b+1].width)/2+a.Ti;var ut=!1;if(0<=x!=(z===bs)){if(z=y+a,z>rt){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)))*ot,0>x!==ut&&(st=-st),Math.abs(x-st)>(E[b].height+E[b+1].height)/2?(tt.x=z,tt.y=st,!1):(tt.x=z,tt.y=st,!0)}function I1(a,y,x,E,b,z,tt){var rt=a.lc,ot=a.me,st=0;if(a=(E[b].height+E[b+1].height)/2+a.Ti,E=!1,0<=y!=(z===bs)){if(z=x-a,z<-ot){if(z=x+a,z>ot){tt.x=st,tt.y=z;return}E=!0}}else if(z=x+a,z>ot){if(z=x-a,z<-ot){tt.x=st,tt.y=z;return}E=!0}st=Math.sqrt(1-Math.min(1,z*z/(ot*ot)))*rt,0>y!==E&&(st=-st),tt.x=st,tt.y=z}na.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},na.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 Tt(0,0):(x.x=this.arrangementOrigin.x+this.lc,x.y=this.arrangementOrigin.y+this.me);for(var E=this.network.vertexes.iterator;E.next();){var b=E.value;b.x+=x.x,b.y+=x.y,b.commit()}a&&(this.group.Va(),a=this.group.position.copy(),x=this.group.location.copy(),y=y.re(x.re(a)),this.group.move(y),this.Zv=y.re(a))},na.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function fy(a,y,x,E,b){var z=a.ty;if(.001>Math.abs(a.Zm-1))return E!==void 0&&b!==void 0?b*y:2*Math.PI*y;a=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x;for(var tt=0,rt=E!==void 0&&b!==void 0?b/(z+1):Math.PI/(2*(z+1)),ot=0,st=0;st<=z;st++){E!==void 0&&b!==void 0?ot=E+st*b/z:ot=st*Math.PI/(2*z);var ut=Math.sin(ot);tt+=Math.sqrt(1-a*a*ut*ut)*rt}return E!==void 0&&b!==void 0?(y>x?y:x)*tt:4*(y>x?y:x)*tt}function g0(a,y,x,E,b){return y/(E!==void 0&&b!==void 0?fy(a,1,x,E,b):fy(a,1,x))}function p0(a,y,x,E,b){if(.001>Math.abs(a.Zm-1))return b/y;var z=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,tt=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(E+=Math.PI/2);for(var rt=0;;rt++){var ot=Math.sin(E+rt*a);if(tt+=(y>x?y:x)*Math.sqrt(1-z*z*ot*ot)*a,tt>=b)return rt*a}}na.prototype.sort=function(a){switch(this.sorting){case m0:break;case v0:a.reverse();break;case y0:a.sort(this.comparer);break;case S0:a.sort(this.comparer),a.reverse();break;case Uf:return this.ak(Dx(a));default:$t("Invalid sorting type.")}return a};function Dx(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new dn;for(var E=0;E<a.length;E++){var b=-1,z=-1;if(E===0)for(var tt=0;tt<a.length;tt++){var rt=a.M(tt).edgesCount;rt>b&&(b=rt,z=tt)}else for(tt=0;tt<a.length;tt++)rt=y[tt],rt>b&&(b=rt,z=tt);for(x.add(a.M(z)),y[z]=-1,z=a.M(z),tt=z.sourceEdges;tt.next();)b=a.indexOf(tt.value.fromVertex),0>b||0<=y[b]&&y[b]++;for(z=z.destinationEdges;z.next();)b=a.indexOf(z.value.toVertex),0>b||0<=y[b]&&y[b]++}return x}na.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var E=a.M(x);y[x]=[];for(var b,z=E.destinationEdges;z.next();)b=a.indexOf(z.value.toVertex),b!==x&&0>y[x].indexOf(b)&&y[x].push(b);for(E=E.sourceEdges;E.next();)b=a.indexOf(E.value.fromVertex),b!==x&&0>y[x].indexOf(b)&&y[x].push(b)}for(z=[],x=0;x<y.length;x++)z[x]=0;x=[];var tt=[],rt=[];E=[],b=new dn;for(var ot=0,st=0;st<y.length;st++){var ut=y[st].length;if(ut===1)E.push(st);else if(ut===0)b.add(a.M(st));else{if(ot===0)x.push(st);else{for(var ft=ut=1/0,vt=-1,yt=[],Pt=0;Pt<x.length;Pt++)0>y[x[Pt]].indexOf(x[Pt===x.length-1?0:Pt+1])&&yt.push(Pt===x.length-1?0:Pt+1);if(yt.length===0)for(Pt=0;Pt<x.length;Pt++)yt.push(Pt);for(Pt=0;Pt<yt.length;Pt++){for(var Et=yt[Pt],Vt=y[st],Rt=0,Qt=0;Qt<tt.length;Qt++){var _t=z[tt[Qt]],te=z[rt[Qt]];if(_t<te){var ue=_t;_t=te}else ue=te;if(ue<Et&&Et<=_t)for(te=0;te<Vt.length;te++){var Ce=Vt[te];0>x.indexOf(Ce)||ue<z[Ce]&&z[Ce]<_t||ue===z[Ce]||_t===z[Ce]||Rt++}else for(te=0;te<Vt.length;te++)Ce=Vt[te],0>x.indexOf(Ce)||ue<z[Ce]&&z[Ce]<_t&&ue!==z[Ce]&&_t!==z[Ce]&&Rt++}for(Vt=Rt,Qt=Rt=0;Qt<y[st].length;Qt++)ue=x.indexOf(y[st][Qt]),0<=ue&&(ue=Math.abs(Et-(ue>=Et?ue+1:ue)),Rt+=ue<x.length+1-ue?ue:x.length+1-ue);for(Qt=0;Qt<tt.length;Qt++)ue=z[tt[Qt]],_t=z[rt[Qt]],ue>=Et&&ue++,_t>=Et&&_t++,ue>_t&&(te=_t,_t=ue,ue=te),_t-ue<(x.length+2)/2==(ue<Et&&Et<=_t)&&Rt++;(Vt<ut||Vt===ut&&Rt<ft)&&(ut=Vt,ft=Rt,vt=Et)}for(x.splice(vt,0,st),ut=0;ut<x.length;ut++)z[x[ut]]=ut;for(ut=0;ut<y[st].length;ut++)ft=y[st][ut],0<=x.indexOf(ft)&&(tt.push(st),rt.push(ft))}ot++}}for(tt=x.length;;){for(z=!0,rt=0;rt<E.length;rt++)if(ot=E[rt],st=y[ot][0],ut=x.indexOf(st),0<=ut){for(vt=ft=0;vt<y[st].length;vt++)yt=x.indexOf(y[st][vt]),0>yt||yt===ut||(Pt=yt>ut?yt-ut:ut-yt,ft+=yt<ut!=Pt>tt-Pt?1:-1);x.splice(0>ft?ut:ut+1,0,ot),E.splice(rt,1),rt--}else z=!1;if(z)break;x.push(E[0]),E.splice(0,1)}for(y=0;y<x.length;y++)b.add(a.M(x[y]));return b},Me.Object.defineProperties(na.prototype,{radius:{get:function(){return this.eo},set:function(a){this.eo!==a&&(0<a||isNaN(a))&&(this.eo=a,this.C())}},aspectRatio:{get:function(){return this.Cm},set:function(a){this.Cm!==a&&0<a&&(this.Cm=a,this.C())}},startAngle:{get:function(){return this.ro},set:function(a){this.ro!==a&&(this.ro=a,this.C())}},sweepAngle:{get:function(){return this.ul},set:function(a){this.ul!==a&&(0<a&&360>=a?this.ul=a:this.ul=360,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==$l&&a!==ql&&a!==gd&&a!==Bh||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==bs&&a!==pd&&a!==ec&&a!==Yf||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==m0&&a!==v0&&a!==y0&&!S0&&a!==Uf||(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!==x0&&a!==Wc||(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 ql=new Ve(na,"ConstantSpacing",0),gd=new Ve(na,"ConstantDistance",1),Bh=new Ve(na,"ConstantAngle",2),$l=new Ve(na,"Packed",3),bs=new Ve(na,"Clockwise",4),pd=new Ve(na,"Counterclockwise",5),ec=new Ve(na,"BidirectionalLeft",6),Yf=new Ve(na,"BidirectionalRight",7),m0=new Ve(na,"Forwards",8),v0=new Ve(na,"Reverse",9),y0=new Ve(na,"Ascending",10),S0=new Ve(na,"Descending",11),Uf=new Ve(na,"Optimized",12),x0=new Ve(na,"Pythagorean",13),Wc=new Ve(na,"Circular",14);na.className="CircularLayout",na.ConstantSpacing=ql,na.ConstantDistance=gd,na.ConstantAngle=Bh,na.Packed=$l,na.Clockwise=bs,na.Counterclockwise=pd,na.BidirectionalLeft=ec,na.BidirectionalRight=Yf,na.Forwards=m0,na.Reverse=v0,na.Ascending=y0,na.Descending=S0,na.Optimized=Uf,na.Pythagorean=x0,na.Circular=Wc;function Pp(){this.Pl=-1/0,this.tm=this.mk=null}Pp.prototype.compare=function(a,y){if(0<a&&0>this.Pl||Math.abs(a)<Math.abs(this.Pl)&&!(0>a&&0<this.Pl))for(this.Pl=a,this.mk=[],this.tm=[],a=0;a<y.length;a++)this.mk[a]=y[a].bounds.x,this.tm[a]=y[a].bounds.y},Pp.prototype.commit=function(a){if(this.mk!==null&&this.tm!==null)for(var y=0;y<this.mk.length;y++){var x=a.M(y);x.x=this.mk[y],x.y=this.tm[y]}},Pp.className="VertexArrangement";function Xf(a){To.call(this,a)}Oe(Xf,To),Xf.prototype.createVertex=function(){return new wp(this)},Xf.prototype.createEdge=function(){return new P0(this)},Xf.className="CircularNetwork";function wp(a){ba.call(this,a),this.u=this.Si=NaN}Oe(wp,ba);function md(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===$l)if(x.nodeDiameterFormula===Wc)a.Si=Math.max(a.width,a.height);else{if(x=Math.abs(Math.sin(y)),y=Math.abs(Math.cos(y)),x===0)return a.width;if(y===0)return a.height;a.Si=Math.min(a.height/x,a.width/y)}else a.Si=x.nodeDiameterFormula===Wc?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}Me.Object.defineProperties(wp.prototype,{diameter:{get:function(){return this.Si},set:function(a){this.Si!==a&&(this.Si=a)}},actualAngle:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}}}),wp.className="CircularVertex";function P0(a){tl.call(this,a)}Oe(P0,tl),P0.className="CircularEdge";function os(a){_o.call(this),this.ah=null,this.An=0,this.$d=new Ut(100,100).freeze(),this.Bm=!1,this.sf=!0,this.td=!1,this.dl=100,this.$m=1,this.Zf=1e3,this.In=10,this.fo=Math,this.Hk=.05,this.Gk=50,this.Ek=150,this.Fk=0,this.Vm=10,this.Um=5,a&&Object.assign(this,a)}Oe(os,_o),os.prototype.cloneProtected=function(a){_o.prototype.cloneProtected.call(this,a),a.$d.assign(this.$d),a.Bm=this.Bm,a.sf=this.sf,a.td=this.td,a.dl=this.dl,a.$m=this.$m,a.Zf=this.Zf,a.In=this.In,a.fo=this.fo,a.Hk=this.Hk,a.Gk=this.Gk,a.Ek=this.Ek,a.Fk=this.Fk,a.Vm=this.Vm,a.Um=this.Um},os.prototype.createNetwork=function(){return new Hc(this)},os.prototype.doLayout=function(a){if(this.network===null&&(this.network=this.makeNetwork(a)),a=this.maxIterations,0<this.network.vertexes.count){this.network.Ko();for(var y=this.network.vertexes.iterator;y.next();){var x=y.value;x.charge=this.electricalCharge(x),x.mass=this.gravitationalMass(x)}for(y=this.network.edges.iterator;y.next();)x=y.value,x.stiffness=this.springStiffness(x),x.length=this.springLength(x);if(this.Cu(),this.An=0,this.needsClusterLayout()){y=this.network,x=y.Zx();for(var E=x.iterator;E.next();){this.network=E.value;for(var b=this.network.vertexes.iterator;b.next();){var z=b.value;z.Vd=z.vertexes.count,z.sh=1,z.Hj=null,z.We=null}R1(this,0,a)}this.network=y;var tt=E=x.iterator;E=this.arrangementSpacing;var rt=tt.count,ot=!0;z=b=0;for(var st=Ei(),ut=0;ut<rt+y.vertexes.count+2;ut++)st[ut]=null;rt=0,tt.reset();for(var ft=ae.alloc();tt.next();)if(ut=tt.value,this.computeBounds(ut,ft),ot)ot=!1,b=ft.x+ft.width/2,z=ft.y+ft.height/2,st[0]=new Tt(ft.x+ft.width+E.width,ft.y),st[1]=new Tt(ft.x,ft.y+ft.height+E.height),rt=2;else{var vt=z1(st,rt,b,z,ft.width,ft.height,E),yt=st[vt],Pt=new Tt(yt.x+ft.width+E.width,yt.y),Et=new Tt(yt.x,yt.y+ft.height+E.height);for(vt+1<rt&&st.splice(vt+1,0,null),st[vt]=Pt,st[vt+1]=Et,rt++,vt=yt.x-ft.x,yt=yt.y-ft.y,ut=ut.vertexes.iterator;ut.next();)Pt=ut.value,Pt.centerX+=vt,Pt.centerY+=yt}for(ae.free(ft),ut=y.vertexes.iterator;ut.next();)tt=ut.value,vt=tt.bounds,2>rt?(b=vt.x+vt.width/2,z=vt.y+vt.height/2,st[0]=new Tt(vt.x+vt.width+E.width,vt.y),st[1]=new Tt(vt.x,vt.y+vt.height+E.height),rt=2):(ot=z1(st,rt,b,z,vt.width,vt.height,E),ft=st[ot],yt=new Tt(ft.x+vt.width+E.width,ft.y),vt=new Tt(ft.x,ft.y+vt.height+E.height),ot+1<rt&&st.splice(ot+1,0,null),st[ot]=yt,st[ot+1]=vt,rt++,tt.centerX=ft.x+tt.width/2,tt.centerY=ft.y+tt.height/2);for(ri(st),E=x.iterator;E.next();){for(x=E.value,b=x.vertexes.iterator;b.next();)y.dh(b.value);for(x=x.edges.iterator;x.next();)y.Bo(x.value)}}W1(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},os.prototype.needsClusterLayout=function(){if(3>this.network.vertexes.count)return!1;for(var a=0,y=0,x=this.network.vertexes.first().bounds,E=this.network.vertexes.iterator;E.next();){if(E.value.bounds.Yc(x)&&(a++,2<a))return!0;if(10<y)break;y++}return!1},os.prototype.computeBounds=function(a,y){var x=!0;for(a=a.vertexes.iterator;a.next();){var E=a.value;x?(x=!1,y.set(E.bounds)):y.ed(E.bounds)}return y};function R1(a,y,x){if(Bx(a,y)){var E=a.Zf;a.Zf*=1+1/(y+1);var b=Ox(a,y),z=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=z,R1(a,y+1,x),W1(a,z),Ix(a,b),y=b.vertexes.Fa(),y.sort(function(tt,rt){return tt===null||rt===null||tt===rt?0:rt.Vd-tt.Vd}),x=0;x<y.length;x++)Rx(a,y[x]);a.Zf=E}}function Bx(a,y){if(10<y||3>a.network.vertexes.count)return!1;for(a.ah=a.network.vertexes.Fa(),a=a.ah,a.sort(function(x,E){return x===null||E===null||x===E?0:E.Vd-x.Vd}),y=a.length-1;0<=y&&1>=a[y].Vd;)y--;return 1<a.length-y}function Ox(a,y){for(var x=a.network,E=new Hc(a),b=0;b<a.ah.length;b++){var z=a.ah[b];if(1<z.Vd){E.dh(z);var tt=new H1;tt.Rs=z.Vd,tt.Ss=z.width,tt.Qs=z.height,tt.Sv=z.focus.x,tt.Tv=z.focus.y,z.We===null&&(z.We=new dn),z.We.add(tt),z.sv=z.We.count-1}else break}for(z=x.edges.iterator;z.next();){var rt=z.value;b=rt.fromVertex,tt=rt.toVertex,b.network===E&&tt.network===E?E.Bo(rt):b.network===E?(rt=b.Hj,rt===null&&(rt=new dn,b.Hj=rt),rt.add(tt),b.Vd--,b.sh+=tt.sh):tt.network===E&&(rt=tt.Hj,rt===null&&(rt=new dn,tt.Hj=rt),rt.add(b),tt.Vd--,tt.sh+=b.sh)}for(b=E.edges.iterator;b.next();)z=b.value,z.length*=Math.max(1,le.sqrt((z.fromVertex.sh+z.toVertex.sh)/(4*y+1)));for(y=E.vertexes.iterator;y.next();){b=y.value;var ot=b.Hj;if(ot!==null&&0<ot.count&&(tt=b.We.M(b.We.count-1).Rs-b.Vd,!(0>=tt))){for(var st=rt=0,ut=ot.count-tt;ut<ot.count;ut++){var ft=ot.M(ut),vt=null;for(z=ft.edges.iterator;z.next();){var yt=z.value;if(yt.Ax(ft)===b){vt=yt;break}}vt!==null&&(st+=vt.length,rt+=ft.width*ft.height)}z=b.centerX,ot=b.centerY,ut=b.width,ft=b.height,vt=b.focus,yt=ut*ft,1>yt&&(yt=1),rt=le.sqrt((rt+yt+st*st*4/(tt*tt))/yt),tt=(rt-1)*ut/2,rt=(rt-1)*ft/2,b.bounds=new ae(z-vt.x-tt,ot-vt.y-rt,ut+2*tt,ft+2*rt),b.focus=new Tt(vt.x+tt,vt.y+rt)}}return a.network=E,x}function Ix(a,y){for(var x=a.network.vertexes.iterator;x.next();){var E=x.value;if(E.network=y,E.We!==null){var b=E.We.M(E.sv);E.Vd=b.Rs;var z=b.Sv,tt=b.Tv;E.bounds=new ae(E.centerX-z,E.centerY-tt,b.Ss,b.Qs),E.focus=new Tt(z,tt),E.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function Rx(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var E=y.centerX,b=y.centerY,z=y.width,tt=y.height;y.We!==null&&0<y.We.count&&(tt=y.We.M(0),z=tt.Ss,tt=tt.Qs),z=le.sqrt(z*z+tt*tt)/2;for(var rt=!1,ot=tt=0,st=0,ut=y.vertexes.iterator;ut.next();){var ft=ut.value;1>=ft.Vd?ot++:(rt=!0,st++,tt+=Math.atan2(y.centerY-ft.centerY,y.centerX-ft.centerX))}if(ot!==0){for(0<st&&(tt/=st),st=y=0,y=rt?2*Math.PI/(ot+1):2*Math.PI/ot,ot%2===0&&(st=y/2),1<x.count&&x.sort(function(yt,Pt){return yt===null||Pt===null||yt===Pt?0:Pt.width*Pt.height-yt.width*yt.height}),rt=ot%2===0?0:1,x=x.iterator;x.next();)if(ot=x.value,!(1<ot.Vd||a.isFixed(ot))){for(ut=null,ft=ot.edges.iterator;ft.next();){ut=ft.value;break}ft=ot.width;var vt=ot.height;ft=le.sqrt(ft*ft+vt*vt)/2,ut=z+ut.length+ft,ft=tt+(y*(rt/2>>1)+st)*(rt%2===0?1:-1),ot.centerX=E+ut*Math.cos(ft),ot.centerY=b+ut*Math.sin(ft),rt++}}}}function z1(a,y,x,E,b,z,tt){var rt=9e19,ot=-1,st=0;t:for(;st<y;st++){var ut=a[st],ft=ut.x-x,vt=ut.y-E;if(ft=ft*ft+vt*vt,ft<rt){for(vt=st-1;0<=vt;vt--)if(a[vt].y>ut.y&&a[vt].x-ut.x<b+tt.width)continue t;for(vt=st+1;vt<y;vt++)if(a[vt].x>ut.x&&a[vt].y-ut.y<z+tt.height)continue t;ot=st,rt=ft}}return ot}os.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},os.prototype.addComments=function(a){var y=a.node;if(y!==null)for(y=y.Mu();y.next();){var x=y.value;if(x.category==="Comment"&&x.isVisible()){var E=this.network.ki(x);E===null&&(E=this.network.Bl(x)),E.charge=this.defaultCommentElectricalCharge,x=null;for(var b=E.destinationEdges;b.next();){var z=b.value;if(z.toVertex===a){x=z;break}}if(x===null){for(b=E.sourceEdges;b.next();)if(z=b.value,z.fromVertex===a){x=z;break}}x===null&&(x=this.network.Zj(a,E,null)),x.length=this.defaultCommentSpringLength}}};function j1(a,y){var x=a.bounds,E=x.x;a=x.y;var b=x.width;x=x.height;var z=y.bounds,tt=z.x;y=z.y;var rt=z.width;return z=z.height,E+b<tt?a>y+z?(x=E+b-tt,a=a-y-z,le.sqrt(x*x+a*a)):a+x<y?(E=E+b-tt,a=a+x-y,le.sqrt(E*E+a*a)):tt-(E+b):E>tt+rt?a>y+z?(x=E-tt-rt,a=a-y-z,le.sqrt(x*x+a*a)):a+x<y?(E=E-tt-rt,a=a+x-y,le.sqrt(E*E+a*a)):E-(tt+rt):a>y+z?a-(y+z):a+x<y?y-(a+x):.1}function W1(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,zx(a)););a.ah=null}function zx(a){a.ah===null&&(a.ah=a.network.vertexes.Fa());var y=a.ah;if(0>=y.length)return!1;var x=y[0];x.forceX=0,x.forceY=0;for(var E=x.centerX,b=E,z=x=x.centerY,tt=1;tt<y.length;tt++){var rt=y[tt];rt.forceX=0,rt.forceY=0;var ot=rt.centerX;rt=rt.centerY,E=Math.min(E,ot),b=Math.max(b,ot),x=Math.min(x,rt),z=Math.max(z,rt)}(b=b-E>z-x)?y.sort(function(Et,Vt){return Et===null||Vt===null||Et===Vt?0:Et.centerX-Vt.centerX}):y.sort(function(Et,Vt){return Et===null||Vt===null||Et===Vt?0:Et.centerY-Vt.centerY}),x=a.Zf;var st=E=rt=0;for(z=0;z<y.length;z++){tt=y[z],E=tt.bounds,rt=tt.focus,ot=E.x+rt.x;var ut=E.y+rt.y;E=tt.charge*a.electricalFieldX(ot,ut),st=tt.charge*a.electricalFieldY(ot,ut),E+=tt.mass*a.gravitationalFieldX(ot,ut),st+=tt.mass*a.gravitationalFieldY(ot,ut),tt.forceX+=E,tt.forceY+=st;for(var ft=z+1;ft<y.length;ft++){var vt=y[ft];if(vt!==tt){E=vt.bounds,rt=vt.focus,st=E.x+rt.x;var yt=E.y+rt.y;if(ot-st>x||st-ot>x){if(b)break}else if(ut-yt>x||yt-ut>x){if(!b)break}else{var Pt=j1(tt,vt);1>Pt?(E=a.randomNumberGenerator,E===null&&(a.randomNumberGenerator=E=new w0),Pt=E.random(),rt=E.random(),ot>st?(E=Math.abs(vt.bounds.right-tt.bounds.x),E=(1+E)*Pt):ot<st?(E=Math.abs(vt.bounds.x-tt.bounds.right),E=-(1+E)*Pt):(E=Math.max(vt.width,tt.width),E=(1+E)*Pt-E/2),ut>yt?(st=Math.abs(vt.bounds.bottom-tt.bounds.y),st=(1+st)*rt):ot<st?(st=Math.abs(vt.bounds.y-tt.bounds.bottom),st=-(1+st)*rt):(st=Math.max(vt.height,tt.height),st=(1+st)*rt-st/2)):(rt=-(tt.charge*vt.charge)/(Pt*Pt),E=(st-ot)/Pt*rt,st=(yt-ut)/Pt*rt),tt.forceX+=E,tt.forceY+=st,vt.forceX-=E,vt.forceY-=st}}}}for(b=a.network.edges.iterator;b.next();)rt=b.value,x=rt.fromVertex,z=rt.toVertex,tt=x.bounds,ot=x.focus,E=tt.x+ot.x,tt=tt.y+ot.y,ut=z.bounds,ft=z.focus,ot=ut.x+ft.x,ut=ut.y+ft.y,ft=j1(x,z),1>ft?(ft=a.randomNumberGenerator,ft===null&&(a.randomNumberGenerator=ft=new w0),rt=ft.random(),ft=ft.random(),E=(E>ot?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),E=(ot-E)/ft*rt,st=(ut-tt)/ft*rt),x.forceX+=E,x.forceY+=st,z.forceX-=E,z.forceY-=st;for(b=E=0;b<y.length;b++)x=y[b],a.isFixed(x)?a.moveFixedVertex(x):E=Math.max(E,a.moveVertex(x)||0);return E>a.epsilonDistance*a.epsilonDistance}os.prototype.moveVertex=function(a){var y=a.forceX,x=a.forceY,E=this.moveLimit;return y<-E?y=-E:y>E&&(y=E),x<-E?x=-E:x>E&&(x=E),a.centerX+=y,a.centerY+=x,y*y+x*x},os.prototype.moveFixedVertex=function(){},os.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},os.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=xo,y.toSpot=xo)}},os.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=ae.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,ae.free(x)}x=ae.alloc();for(var E=this.network.vertexes.iterator;E.next();){var b=E.value;(a!==0||y!==0)&&(x.assign(b.bounds),x.x+=a,x.y+=y,b.bounds=x),b.commit()}ae.free(x)},os.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},os.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},os.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},os.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},os.prototype.electricalFieldX=function(){return 0},os.prototype.electricalFieldY=function(){return 0},os.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},os.prototype.gravitationalFieldX=function(){return 0},os.prototype.gravitationalFieldY=function(){return 0},os.prototype.isFixed=function(a){return a.isFixed},Me.Object.defineProperties(os.prototype,{currentIteration:{get:function(){return this.An}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},arrangesToOrigin:{get:function(){return this.Bm},set:function(a){this.Bm!==a&&(this.Bm=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},comments:{get:function(){return this.td},set:function(a){this.td!==a&&(this.td=a,this.C())}},maxIterations:{get:function(){return this.dl},set:function(a){this.dl!==a&&0<=a&&(this.dl=a,this.C())}},epsilonDistance:{get:function(){return this.$m},set:function(a){this.$m!==a&&0<a&&(this.$m=a,this.C())}},infinityDistance:{get:function(){return this.Zf},set:function(a){this.Zf!==a&&1<a&&(this.Zf=a,this.C())}},moveLimit:{get:function(){return this.In},set:function(a){this.In!==a&&1<a&&(this.In=a,this.C())}},randomNumberGenerator:{get:function(){return this.fo},set:function(a){this.fo!==a&&(a!==null&&typeof a.random!="function"&&$t('ForceDirectedLayout.randomNumberGenerator must have a "random()" function on it: '+a),this.fo=a)}},defaultSpringStiffness:{get:function(){return this.Hk},set:function(a){this.Hk!==a&&(this.Hk=a,this.C())}},defaultSpringLength:{get:function(){return this.Gk},set:function(a){this.Gk!==a&&(this.Gk=a,this.C())}},defaultElectricalCharge:{get:function(){return this.Ek},set:function(a){this.Ek!==a&&(this.Ek=a,this.C())}},defaultGravitationalMass:{get:function(){return this.Fk},set:function(a){this.Fk!==a&&(this.Fk=a,this.C())}},defaultCommentSpringLength:{get:function(){return this.Vm},set:function(a){this.Vm!==a&&(this.Vm=a,this.C())}},defaultCommentElectricalCharge:{get:function(){return this.Um},set:function(a){this.Um!==a&&(this.Um=a,this.C())}}}),os.className="ForceDirectedLayout";function H1(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}H1.className="ForceDirectedSubnet";function Hc(a){To.call(this,a)}Oe(Hc,To),Hc.prototype.createVertex=function(){return new Cp(this)},Hc.prototype.createEdge=function(){return new Lp(this)},Hc.className="ForceDirectedNetwork";function Cp(a){ba.call(this,a),this.ia=!1,this.Ha=this.u=NaN,this.sh=this.Vd=this.V=this.F=0,this.We=this.Hj=null,this.sv=0}Oe(Cp,ba),Me.Object.defineProperties(Cp.prototype,{isFixed:{get:function(){return this.ia},set:function(a){this.ia!==a&&(this.ia=a)}},charge:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},mass:{get:function(){return this.Ha},set:function(a){this.Ha!==a&&(this.Ha=a)}},forceX:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}},forceY:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}}}),Cp.className="ForceDirectedVertex";function Lp(a){tl.call(this,a),this.j=this.o=NaN}Oe(Lp,tl),Me.Object.defineProperties(Lp.prototype,{stiffness:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},length:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}}}),Lp.className="ForceDirectedEdge";function w0(){var a=0;a===void 0&&(a=42),this.seed=a,this.ay=48271,this.ey=2147483647,this.Q=44488.07041494893,this.gy=3399,this.by=1/2147483647,this.random()}w0.prototype.random=function(){var a=this.seed%this.Q*this.ay-this.seed/this.Q*this.gy;return 0<a?this.seed=a:this.seed=a+this.ey,this.seed*this.by},w0.className="RandomNumberGenerator";function ao(a){_o.call(this),this.kc=this.ie=25,this.K=0,this.Dk=E0,this.Zk=A0,this.Qk=F0,this.bj=4,this.rk=b0,this.bg=15,this.sf=!0,this.Cn=4,this.Ra=this.Iq=this.Ia=-1,this.Md=this.Hn=0,this.Ta=this.Kd=this.Ld=this.he=this.tc=null,this.Kn=0,this.Jn=this.kj=null,this.le=0,this.fl=null,this.Rf=new Tt,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Oe(ao,_o),ao.prototype.cloneProtected=function(a){_o.prototype.cloneProtected.call(this,a),a.ie=this.ie,a.kc=this.kc,a.K=this.K,a.Dk=this.Dk,a.Zk=this.Zk,a.Qk=this.Qk,a.bj=this.bj,a.rk=this.rk,a.bg=this.bg,a.sf=this.sf,a.Cn=this.Cn,a.ve=this.ve},ao.prototype.qb=function(a){a.classType===ao?a.name.indexOf("Aggressive")===0?this.aggressiveOption=a:a.name.indexOf("Cycle")===0?this.cycleRemoveOption=a:a.name.indexOf("Init")===0?this.initializeOption=a:a.name.indexOf("Layer")===0?this.layeringOption=a:$t("Unknown enum value: "+a):_o.prototype.qb.call(this,a)},ao.prototype.createNetwork=function(){return new Qf(this)},ao.prototype.doLayout=function(a){for(this.network===null&&(this.network=this.makeNetwork(a)),this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin),this.Iq=-1,this.Md=this.Hn=0,this.fl=this.Jn=this.kj=null,a=0;a<this.He.length;a++)this.He[a]=null;if(0<this.network.vertexes.count){for(this.network.Ko(),this.cycleRemoveOption!==Mp&&this.removeCycles(),a=this.network.vertexes.iterator;a.next();)a.value.layer=-1;for(this.Ia=-1,this.assignLayers(),a.reset();a.next();)this.Ia=Math.max(this.Ia,a.value.layer);this.cycleRemoveOption===Mp&&this.removeCycles(),a=this.network;for(var y=[],x=a.edges.iterator;x.next();){var E=x.value;E.valid=!1,y.push(E)}for(x=0;x<y.length;x++){E=y[x];var b=E.fromVertex,z=E.toVertex;if(!(E.valid||(b.node===null&&b.data===null||z.node===null&&z.data===null)&&b.layer===z.layer)){var tt=0,rt=0,ot=0,st=0;if(E.link!==null){if(rt=E.link,rt===null)continue;var ut=b.node;if(tt=z.node,ut===null||tt===null)continue;var ft=rt.fromNode;ot=rt.toNode;for(var vt=rt.fromPort;vt!==null&&!vt.Ed();)vt=vt.panel;for(rt=rt.toPort;rt!==null&&!rt.Ed();)rt=rt.panel;if(E.rev){st=ft;var yt=vt;ft=ot,vt=rt,ot=st,rt=yt}var Pt=b.focus;st=z.focus;var Et=E.rev?z.bounds:b.bounds;yt=Tt.alloc(),ut!==ft?Et.w()&&ft.isVisible()?ft.actualBounds.w()?(Fh(ft,vt,fi,yt),yt.x+=ft.actualBounds.x-Et.x,yt.y+=ft.actualBounds.y-Et.y):(Fh(ft,vt,fi,yt),yt.w()||yt.assign(Pt)):yt.assign(Pt):Et.w()?(Fh(ft,vt,fi,yt),yt.w()||yt.assign(Pt)):yt.assign(Pt),ft=E.rev?b.bounds:z.bounds,ut=Tt.alloc(),tt!==ot?ft.w()&&ot.isVisible()?ot.actualBounds.w()?(Fh(ot,rt,fi,ut),ut.x+=ot.actualBounds.x-ft.x,ut.y+=ot.actualBounds.y-ft.y):(Fh(ot,rt,fi,ut),ut.w()||ut.assign(st)):ut.assign(st):ft.w()?(Fh(ot,rt,fi,ut),ut.w()||ut.assign(st)):ut.assign(st),this.K===90||this.K===270?(tt=Math.round((yt.x-Pt.x)/this.kc),ot=yt.x,rt=Math.round((ut.x-st.x)/this.kc),st=ut.x):(tt=Math.round((yt.y-Pt.y)/this.kc),ot=yt.y,rt=Math.round((ut.y-st.y)/this.kc),st=ut.y),Tt.free(yt),Tt.free(ut),E.portFromColOffset=tt,E.portFromPos=ot,E.portToColOffset=rt,E.portToPos=st}else E.portFromColOffset=0,E.portFromPos=0,E.portToColOffset=0,E.portToPos=0;if(yt=b.layer,ut=z.layer,ft=0,Et=E.link,Et!==null){var Vt=Et.fromPort,Rt=Et.toPort;if(Vt!==null&&Rt!==null){var Qt=Et.fromNode;if(vt=Et.toNode,Qt!==null&&vt!==null){var _t=M0(this,!0),te=M0(this,!1),ue=this.setsPortSpots?_t:Et.computeSpot(!0,Vt);Pt=this.setsPortSpots?te:Et.computeSpot(!1,Rt);var Ce=Et.isOrthogonal;ue.$c()&&ue.Hf(te)&&Pt.$c()&&Pt.Hf(_t)?ft=0:(_t=Et.getLinkPoint(Qt,Vt,ue,!0,Ce,vt,Rt,Tt.alloc()),te=Et.getLinkDirection(Qt,Vt,_t,ue,!0,Ce,vt,Rt),Tt.free(_t),ue.ys()||te!==Q1(this,E,!0)?this.setsPortSpots&&Qt!==null&&Qt.ports.count===1&&E.rev&&(ft+=1):ft+=1,ue=Et.getLinkPoint(vt,Rt,Pt,!1,Ce,Qt,Vt,Tt.alloc()),Et=Et.getLinkDirection(vt,Rt,ue,Pt,!1,Ce,Qt,Vt),Tt.free(ue),Pt.ys()||Et!==Q1(this,E,!1)?this.setsPortSpots&&vt!==null&&vt.ports.count===1&&E.rev&&(ft+=2):ft+=2)}}}if(vt=ft,ft=vt===1||vt===3,(vt=vt===2||vt===3)&&(Pt=a.createVertex(),Pt.node=null,Pt.Dj=1,Pt.layer=yt,Pt.near=b,a.dh(Pt),b=a.Zj(b,Pt,E.link),b.valid=!1,b.rev=E.rev,b.portFromColOffset=tt,b.portToColOffset=0,b.portFromPos=ot,b.portToPos=0,b=Pt),Et=1,ft&&Et--,yt-ut>Et&&0<yt){for(E.valid=!1,Pt=a.createVertex(),Pt.node=null,Pt.Dj=2,Pt.layer=yt-1,a.dh(Pt),b=a.Zj(b,Pt,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=vt?0:tt,b.portToColOffset=0,b.portFromPos=vt?0:ot,b.portToPos=0,b=Pt,yt--;yt-ut>Et&&0<yt;)Pt=a.createVertex(),Pt.node=null,Pt.Dj=3,Pt.layer=yt-1,a.dh(Pt),b=a.Zj(b,Pt,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=0,b.portFromPos=0,b.portToPos=0,b=Pt,yt--;b=a.Zj(Pt,z,E.link),b.valid=!ft,ft&&(Pt.near=z),b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=rt,b.portFromPos=0,b.portToPos=st}else E.valid=!0}}for(a=this.tc=[],y=0;y<=this.Ia;y++)a[y]=0;for(y=this.network.vertexes.iterator;y.next();)y.value.index=-1;for(this.initializeIndices(),this.Iq=-1,x=this.Md=this.Hn=0;x<=this.Ia;x++)a[x]>a[this.Md]&&(this.Iq=a[x]-1,this.Md=x),a[x]<a[this.Hn]&&(this.Hn=x);for(this.fl=[],x=0;x<a.length;x++)this.fl[x]=[];for(y.reset();y.next();)a=y.value,this.fl[a.layer][a.index]=a;for(this.Ra=-1,a=0;a<=this.Ia;a++){for(y=vd(this,a),x=0,E=this.tc[a],z=0;z<E;z++)b=y[z],x+=this.nodeMinColumnSpace(b,!0),b.column=x,x+=1,x+=this.nodeMinColumnSpace(b,!1);this.Ra=Math.max(this.Ra,x-1),yd(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},ao.prototype.linkMinLength=function(){return 1};function gy(a){var y=a.fromVertex.node||a.fromVertex.data;return a=a.toVertex.node||a.toVertex.data,y===null&&a===null?8:y===null||a===null?4:1}ao.prototype.nodeMinLayerSpace=function(a,y){return a.node===null&&a.data===null?0:this.K===90||this.K===270?y?a.focus.y+10:a.bounds.height-a.focus.y+10:y?a.focus.x+10:a.bounds.width-a.focus.x+10},ao.prototype.nodeMinColumnSpace=function(a,y){if(a.node===null&&a.data===null)return 0;var x=y?a.ev:a.dv;return x!==null?x:(x=this.K,x===90||x===270?y?a.ev=a.focus.x/this.kc+1|0:a.dv=(a.bounds.width-a.focus.x)/this.kc+1|0:y?a.ev=a.focus.y/this.kc+1|0:a.dv=(a.bounds.height-a.focus.y)/this.kc+1|0)};function js(a){a.kj===null&&(a.kj=[]);for(var y=0,x=a.network.vertexes.iterator;x.next();){var E=x.value;a.kj[y]=E.layer,y++,a.kj[y]=E.column,y++,a.kj[y]=E.index,y++}return a.kj}function Ml(a,y){var x=0;for(a=a.network.vertexes.iterator;a.next();){var E=a.value;E.layer=y[x],x++,E.column=y[x],x++,E.index=y[x],x++}}function G1(a,y,x){var E=vd(a,y),b=a.tc[y];(a.Jn===null||a.Jn.length<b*b)&&(a.Jn=[]);for(var z=a.Jn,tt=0;tt<b;tt++){var rt=0,ot=E[tt],st=ot.near;if(st!==null&&st.layer===ot.layer)if(ot=st.index,ot>tt)for(var ut=tt+1;ut<ot;ut++){var ft=E[ut];ft.near===st&&ft.Dj===st.Dj||rt++}else for(ut=tt-1;ut>ot;ut--)ft=E[ut],ft.near===st&&ft.Dj===st.Dj||rt++;var vt;if(0<=x)for(ot=E[tt].sourceEdgesArrayAccess,st=0;st<ot.length;st++){var yt=ot[st];if(yt.valid&&yt.fromVertex.layer!==y)for(ft=yt.fromVertex.index,ut=yt.portToPos,yt=yt.portFromPos,vt=st+1;vt<ot.length;vt++){var Pt=ot[vt];if(Pt.valid&&Pt.fromVertex.layer!==y){var Et=Pt.fromVertex.index,Vt=Pt.portToPos;Pt=Pt.portFromPos,ut<Vt&&(ft>Et||ft===Et&&yt>Pt)&&rt++,Vt<ut&&(Et>ft||Et===ft&&Pt>yt)&&rt++}}}if(0>=x){for(ot=E[tt].destinationEdgesArrayAccess,st=0;st<ot.length;st++)if(yt=ot[st],yt.valid&&yt.toVertex.layer!==y)for(ft=yt.toVertex.index,ut=yt.portToPos,yt=yt.portFromPos,vt=st+1;vt<ot.length;vt++)Pt=ot[vt],Pt.valid&&Pt.toVertex.layer!==y&&(Et=Pt.toVertex.index,Vt=Pt.portToPos,Pt=Pt.portFromPos,yt<Pt&&(ft>Et||ft===Et&&ut>Vt)&&rt++,Pt<yt&&(Et>ft||Et===ft&&Vt>ut)&&rt++)}for(z[tt*b+tt]=rt,ot=tt+1;ot<b;ot++){var Rt=0,Qt=0;if(0<=x){rt=E[tt].sourceEdgesArrayAccess;var _t=E[ot].sourceEdgesArrayAccess;for(st=0;st<rt.length;st++)if(yt=rt[st],yt.valid&&yt.fromVertex.layer!==y)for(ft=yt.fromVertex.index,yt=yt.portFromPos,vt=0;vt<_t.length;vt++)Pt=_t[vt],Pt.valid&&Pt.fromVertex.layer!==y&&(Et=Pt.fromVertex.index,Pt=Pt.portFromPos,(ft<Et||ft===Et&&yt<Pt)&&Qt++,(Et<ft||Et===ft&&Pt<yt)&&Rt++)}if(0>=x){for(rt=E[tt].destinationEdgesArrayAccess,_t=E[ot].destinationEdgesArrayAccess,st=0;st<rt.length;st++)if(yt=rt[st],yt.valid&&yt.toVertex.layer!==y)for(ft=yt.toVertex.index,ut=yt.portToPos,vt=0;vt<_t.length;vt++)Pt=_t[vt],Pt.valid&&Pt.toVertex.layer!==y&&(Et=Pt.toVertex.index,Vt=Pt.portToPos,(ft<Et||ft===Et&&ut<Vt)&&Qt++,(Et<ft||Et===ft&&Vt<ut)&&Rt++)}z[tt*b+ot]=Rt,z[ot*b+tt]=Qt}}return yd(a,y,E),z}ao.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=G1(this,y,1),E=this.tc[y],b=0;b<E;b++)for(var z=b;z<E;z++)a+=x[b*E+z];return a};function C0(a){for(var y=0,x=0;x<=a.Ia;x++){for(var E=a,b=x,z=vd(E,b),tt=E.tc[b],rt=0,ot=0;ot<tt;ot++){var st=z[ot].destinationEdgesArrayAccess;if(st!==null)for(var ut=0;ut<st.length;ut++){var ft=st[ut];if(ft.valid&&ft.toVertex.layer!==b){var vt=ft.fromVertex.column+ft.portFromColOffset,yt=ft.toVertex.column+ft.portToColOffset;rt+=(Math.abs(vt-yt)+1)*gy(ft)}}}yd(E,b,z),y+=rt}return y}ao.prototype.normalize=function(){var a=1/0;this.Ra=-1;for(var y=this.network.vertexes.iterator;y.next();){var x=y.value;a=Math.min(a,x.column-this.nodeMinColumnSpace(x,!0)),this.Ra=Math.max(this.Ra,x.column+this.nodeMinColumnSpace(x,!1))}for(y.reset();y.next();)y.value.column-=a;this.Ra-=a};function py(a,y,x){for(var E=vd(a,y),b=a.tc[y],z=[],tt=0;tt<b;tt++){var rt=E[tt],ot=null;0>=x&&(ot=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++),ot!==null)for(vt=0;vt<ot.length;vt++){rt=ot[vt];var yt=rt.fromVertex;rt.valid&&!rt.rev&&yt.layer!==y&&(ut+=yt.column,ft++)}if(st!==null)for(ot=0;ot<st.length;ot++)rt=st[ot],vt=rt.toVertex,rt.valid&&!rt.rev&&vt.layer!==y&&(ut+=vt.column,ft++);z[tt]=ft===0?-1:ut/ft}return yd(a,y,E),z}function Z1(a,y,x){for(var E=vd(a,y),b=a.tc[y],z=[],tt=0;tt<b;tt++){var rt=E[tt],ot=null;0>=x&&(ot=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,ot!==null)for(vt=0;vt<ot.length;vt++){rt=ot[vt];var yt=rt.fromVertex;rt.valid&&!rt.rev&&yt.layer!==y&&(ft[ut]=yt.column+rt.portFromColOffset,ut++)}if(st!==null)for(ot=0;ot<st.length;ot++)rt=st[ot],vt=rt.toVertex,rt.valid&&!rt.rev&&vt.layer!==y&&(ft[ut]=vt.column+rt.portToColOffset,ut++);ut===0?z[tt]=-1:(ft.sort(function(Pt,Et){return Pt-Et}),st=ut>>1,z[tt]=ut&1?ft[st]:ft[st-1]+ft[st]>>1)}return yd(a,y,E),z}function kp(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var tt=y.destinationEdges;tt.next();){var rt=tt.value,ot=rt.toVertex,st=y.layer-ot.layer;rt=a.linkMinLength(rt),st===rt&&kp(a,ot,x,E,b,z)}if(z)for(tt=y.sourceEdges;tt.next();)rt=tt.value,ot=rt.fromVertex,st=ot.layer-y.layer,rt=a.linkMinLength(rt),st===rt&&kp(a,ot,x,E,b,z)}}function my(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var tt=y.destinationEdges;tt.next();)my(a,tt.value.toVertex,x,E,b,z);if(z)for(y=y.sourceEdges;y.next();)my(a,y.value.fromVertex,x,E,b,z)}}ao.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,E=[];E.length=x+1;for(var b=a.vertexes.iterator;b.next();)b.value.valid=!0;for(;jx(a)!==null;){for(b=V1(a);b!==null;)E[x]=b,x--,b.valid=!1,b=V1(a);for(b=K1(a);b!==null;)E[y]=b,y++,b.valid=!1,b=K1(a);b=null;for(var z=0,tt=this.network.vertexes.iterator;tt.next();){var rt=tt.value;if(rt.valid){for(var ot=0,st=rt.destinationEdges;st.next();)st.value.toVertex.valid&&ot++;st=0;for(var ut=rt.sourceEdges;ut.next();)ut.value.fromVertex.valid&&st++;(b===null||z<ot-st)&&(b=rt,z=ot-st)}}b!==null&&(E[y]=b,y++,b.valid=!1)}for(y=0;y<a.vertexes.count;y++)E[y].index=y;for(E=a.edges.iterator;E.next();)y=E.value,y.fromVertex.index>y.toVertex.index&&(a.gm(y),y.rev=!0);break;case E0:for(E=this.network.vertexes.iterator;E.next();)a=E.value,a.Ll=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;for(this.Kn=0,E.reset();E.next();)y=E.value,y.sourceEdges.count===0&&vy(this,y);for(E.reset();E.next();)y=E.value,y.Ll===-1&&vy(this,y);for(a.reset();a.next();)E=a.value,E.forest||(y=E.fromVertex,x=y.finish,b=E.toVertex,z=b.finish,b.Ll<y.Ll&&x<z&&(this.network.gm(E),E.rev=!0));break;case Mp:for(a=this.network,y=a.vertexes.iterator,E=1/0;y.next();)E=Math.min(E,y.value.layer);if(1/0>E){if(0>E)for(y.reset();y.next();)y.value.layer-=E;for(E=[],y.reset();y.next();)x=y.value,b=E[x.layer],b===void 0?E[x.layer]=[x]:b.push(x);for(x=y=0;x<E.length;x++)if(b=E[x],!b||b.length===0)y++;else if(0<x)for(z=0;z<b.length;z++)b[z].layer-=y;for(E=a.edges.iterator;E.next();)y=E.value,y.fromVertex.layer<y.toVertex.layer&&(a.gm(y),y.rev=!0)}}};function jx(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function V1(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,E=y.destinationEdges;E.next();)if(E.value.toVertex.valid){x=!1;break}if(x)return y}}return null}function K1(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,E=y.sourceEdges;E.next();)if(E.value.fromVertex.valid){x=!1;break}if(x)return y}}return null}function vy(a,y){y.Ll=a.Kn,a.Kn++;for(var x=y.destinationEdges;x.next();){var E=x.value,b=E.toVertex;b.Ll===-1&&(E.forest=!0,vy(a,b))}y.finish=a.Kn,a.Kn++}ao.prototype.assignLayers=function(){switch(this.Zk){case xy:Y1(this);break;case Py:for(var a,y=this.network.vertexes.iterator;y.next();)a=X1(this,y.value),this.Ia=Math.max(a,this.Ia);for(y.reset();y.next();)a=y.value,a.layer=this.Ia-a.layer;break;default:case A0:for(Y1(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&J1(this,a);for(a=1/0,y.reset();y.next();)a=Math.min(a,y.value.layer);for(this.Ia=-1,y.reset();y.next();){var x=y.value;x.layer-=a,this.Ia=Math.max(this.Ia,x.layer)}}};function Y1(a){for(var y=a.network.vertexes.iterator;y.next();){var x=U1(a,y.value);a.Ia=Math.max(x,a.Ia)}}function U1(a,y){var x=0;if(y.layer===-1){for(var E=y.destinationEdges;E.next();){var b=E.value,z=b.toVertex;b=a.linkMinLength(b),x=Math.max(x,U1(a,z)+b)}y.layer=x}else x=y.layer;return x}function X1(a,y){var x=0;if(y.layer===-1){for(var E=y.sourceEdges;E.next();){var b=E.value,z=b.fromVertex;b=a.linkMinLength(b),x=Math.max(x,X1(a,z)+b)}y.layer=x}else x=y.layer;return x}function J1(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)J1(a,x.value.toVertex);for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(var E=y.sourceEdgesArrayAccess,b=E.length,z=0;z<b;z++){var tt=E[z],rt=tt.fromVertex,ot=tt.toVertex;tt=a.linkMinLength(tt),rt.layer-ot.layer>tt&&kp(a,rt,0,-1,!0,!1)}for(kp(a,y,1,-1,!0,!0);y.component!==0;){for(z=0,E=1/0,rt=0,ot=null,tt=a.network.vertexes.iterator;tt.next();){var st=tt.value;if(st.component===1){var ut=0,ft=!1,vt=st.sourceEdgesArrayAccess;b=vt.length;for(var yt=0;yt<b;yt++){var Pt=vt[yt],Et=Pt.fromVertex;ut+=1,Et.component!==1&&(z+=1,Et=Et.layer-st.layer,Pt=a.linkMinLength(Pt),E=Math.min(E,Et-Pt))}for(vt=st.destinationEdgesArrayAccess,b=vt.length,yt=0;yt<b;yt++)Pt=vt[yt].toVertex,--ut,Pt.component!==1?--z:ft=!0;(ot===null||ut<rt)&&!ft&&(ot=st,rt=ut)}}if(0<z){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer+=E);y.component=0}else ot.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(kp(a,y,1,-1,!0,!1);y.component!==0;){for(E=0,b=1/0,z=0,rt=null,ot=a.network.vertexes.iterator;ot.next();)if(tt=ot.value,tt.component===1){for(st=0,ut=!1,vt=tt.sourceEdgesArrayAccess,ft=vt.length,yt=0;yt<ft;yt++)Pt=vt[yt].fromVertex,st+=1,Pt.component!==1?E+=1:ut=!0;for(vt=tt.destinationEdgesArrayAccess,ft=vt.length,yt=0;yt<ft;yt++)Pt=vt[yt],Et=Pt.toVertex,--st,Et.component!==1&&(--E,Et=tt.layer-Et.layer,Pt=a.linkMinLength(Pt),b=Math.min(b,Et-Pt));(rt===null||st>z)&&!ut&&(rt=tt,z=st)}if(0>E){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer-=b);y.component=0}else rt.component=0}}}function 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}ao.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 F0: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&&_1(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&&q1(this,x)}};function _1(a,y){var x=y.layer;for(y.index=a.tc[x],a.tc[x]++,y=y.destinationEdgesArrayAccess,x=!0;x;){x=!1;for(var E=0;E<y.length-1;E++){var b=y[E],z=y[E+1];b.portFromColOffset>z.portFromColOffset&&(x=!0,y[E]=z,y[E+1]=b)}}for(x=0;x<y.length;x++)E=y[x],E.valid&&(E=E.toVertex,E.index===-1&&_1(a,E))}function q1(a,y){var x=y.layer;y.index=a.tc[x],a.tc[x]++,y=y.sourceEdgesArrayAccess;for(var E=!0;E;)for(E=!1,x=0;x<y.length-1;x++){var b=y[x],z=y[x+1];b.portToColOffset>z.portToColOffset&&(E=!0,y[x]=z,y[x+1]=b)}for(x=0;x<y.length;x++)E=y[x],E.valid&&(E=E.fromVertex,E.index===-1&&q1(a,E))}ao.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=js(this),x,E;for(x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)L0(this,E,1),zl(this,E,1);var b=this.countCrossings();for(b<a&&(a=b,y=js(this)),E=this.Ia;0<=E;E--)L0(this,E,-1),zl(this,E,-1);b=this.countCrossings(),b<a&&(a=b,y=js(this))}for(Ml(this,y),x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)L0(this,E,0),zl(this,E,0);for(b=this.countCrossings(),b<a&&(a=b,y=js(this)),E=this.Ia;0<=E;E--)L0(this,E,0),zl(this,E,0);b=this.countCrossings(),b<a&&(a=b,y=js(this))}Ml(this,y);var z,tt,rt;switch(this.rk){case Ly:break;case ky:for(rt=a+1;(E=this.countCrossings())<rt;)for(rt=E,x=this.Ia;0<=x;x--)for(tt=0;tt<=x;tt++){for(z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=zl(this,E,-1)||z;for(b=this.countCrossings(),b>=a?Ml(this,y):(a=b,y=js(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=zl(this,E,1)||z;for(b=this.countCrossings(),b>=a?Ml(this,y):(a=b,y=js(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=zl(this,E,1)||z;for(b>=a?Ml(this,y):(a=b,y=js(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=zl(this,E,-1)||z;for(b>=a?Ml(this,y):(a=b,y=js(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=zl(this,E,0)||z;for(b>=a?Ml(this,y):(a=b,y=js(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=zl(this,E,0)||z;b>=a?Ml(this,y):(a=b,y=js(this))}break;default:case b0:for(x=this.Ia,tt=0,rt=a+1;(E=this.countCrossings())<rt;){for(rt=E,z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=zl(this,E,-1)||z;for(b=this.countCrossings(),b>=a?Ml(this,y):(a=b,y=js(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=zl(this,E,1)||z;for(b=this.countCrossings(),b>=a?Ml(this,y):(a=b,y=js(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=zl(this,E,1)||z;for(b>=a?Ml(this,y):(a=b,y=js(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=zl(this,E,-1)||z;for(b>=a?Ml(this,y):(a=b,y=js(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=zl(this,E,0)||z;for(b>=a?Ml(this,y):(a=b,y=js(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=zl(this,E,0)||z;b>=a?Ml(this,y):(a=b,y=js(this))}}Ml(this,y)};function L0(a,y,x){var E=vd(a,y),b=a.tc[y],z=Z1(a,y,x),tt=py(a,y,x);for(x=0;x<b;x++)tt[x]===-1&&(tt[x]=E[x].column),z[x]===-1&&(z[x]=E[x].column);for(var rt=!0,ot;rt;)for(rt=!1,x=0;x<b-1;x++)(z[x+1]<z[x]||z[x+1]===z[x]&&tt[x+1]<tt[x])&&(rt=!0,ot=z[x],z[x]=z[x+1],z[x+1]=ot,ot=tt[x],tt[x]=tt[x+1],tt[x+1]=ot,ot=E[x],E[x]=E[x+1],E[x+1]=ot);for(x=z=0;x<b;x++)ot=E[x],ot.index=x,z+=a.nodeMinColumnSpace(ot,!0),ot.column=z,z+=1,z+=a.nodeMinColumnSpace(ot,!1);yd(a,y,E)}function zl(a,y,x){var E=vd(a,y),b=a.tc[y];x=G1(a,y,x);var z,tt=[];for(z=0;z<b;z++)tt[z]=-1;var rt=[];for(z=0;z<b;z++)rt[z]=-1;for(var ot=!1,st=!0;st;)for(st=!1,z=0;z<b-1;z++){var ut=x[E[z].index*b+E[z+1].index],ft=x[E[z+1].index*b+E[z].index],vt=0,yt=0,Pt=E[z].column,Et=E[z+1].column,Vt=a.nodeMinColumnSpace(E[z],!0),Rt=a.nodeMinColumnSpace(E[z],!1),Qt=a.nodeMinColumnSpace(E[z+1],!0),_t=a.nodeMinColumnSpace(E[z+1],!1);Vt=Pt-Vt+Qt,Rt=Et-Rt+_t;var te=E[z].sourceEdges.iterator;for(te.reset();te.next();)if(Qt=te.value,_t=Qt.fromVertex,Qt.valid&&_t.layer===y){for(Qt=0;E[Qt]!==_t;)Qt++;Qt<z&&(vt+=2*(z-Qt),yt+=2*(z+1-Qt)),Qt===z+1&&(vt+=1),Qt>z+1&&(vt+=4*(Qt-z),yt+=4*(Qt-(z+1)))}for(te=E[z].destinationEdges.iterator,te.reset();te.next();)if(Qt=te.value,_t=Qt.toVertex,Qt.valid&&_t.layer===y){for(Qt=0;E[Qt]!==_t;)Qt++;Qt===z+1&&(yt+=1)}for(te=E[z+1].sourceEdges.iterator,te.reset();te.next();)if(Qt=te.value,_t=Qt.fromVertex,Qt.valid&&_t.layer===y){for(Qt=0;E[Qt]!==_t;)Qt++;Qt<z&&(vt+=2*(z+1-Qt),yt+=2*(z-Qt)),Qt===z&&(yt+=1),Qt>z+1&&(vt+=4*(Qt-(z+1)),yt+=4*(Qt-z))}for(te=E[z+1].destinationEdges.iterator,te.reset();te.next();)if(Qt=te.value,_t=Qt.toVertex,Qt.valid&&_t.layer===y){for(Qt=0;E[Qt]!==_t;)Qt++;Qt===z&&(vt+=1)}Qt=_t=0,te=tt[E[z].index];var ue=rt[E[z].index],Ce=tt[E[z+1].index],On=rt[E[z+1].index];te!==-1&&(_t+=Math.abs(te-Pt),Qt+=Math.abs(te-Rt)),ue!==-1&&(_t+=Math.abs(ue-Pt),Qt+=Math.abs(ue-Rt)),Ce!==-1&&(_t+=Math.abs(Ce-Et),Qt+=Math.abs(Ce-Vt)),On!==-1&&(_t+=Math.abs(On-Et),Qt+=Math.abs(On-Vt)),(yt<vt-.5||yt===vt&&ft<ut-.5||yt===vt&&ft===ut&&Qt<_t-.5)&&(st=ot=!0,E[z].column=Rt,E[z+1].column=Vt,ut=E[z],E[z]=E[z+1],E[z+1]=ut)}for(z=0;z<b;z++)E[z].index=z;return yd(a,y,E),ot}ao.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&Ux)!==0;if(1e3<this.network.edges.count&&y&&(a=!1),a){var x=[];for(y=0;y<=this.Ia;y++)x[y]=0;for(var E,b=this.network.vertexes.iterator;b.next();){var z=b.value;y=z.layer,E=z.column,z=this.nodeMinColumnSpace(z,!1),x[y]=Math.max(x[y],E+z)}for(b.reset();b.next();)z=b.value,y=z.layer,E=z.column,z.column=(8*(this.Ra-x[y])>>1)+8*E;this.Ra*=8}if(this.bg&2)for(x=!0;x;){for(x=!1,y=this.Md+1;y<=this.Ia;y++)x=Jf(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Jf(this,y,-1)||x;x=Jf(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=Jf(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Jf(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Jf(this,y,0)||x}}else Zx(this)};function Jf(a,y,x){for(var E=!1;Wx(a,y,x);)E=!0;return E}function Wx(a,y,x){var E,b=vd(a,y),z=a.tc[y],tt=py(a,y,-1);if(0<x)for(E=0;E<z;E++)tt[E]=-1;var rt=py(a,y,1);if(0>x)for(E=0;E<z;E++)rt[E]=-1;for(var ot=!1,st=!0;st;)for(st=!1,E=0;E<z;E++){var ut=b[E].column,ft=a.nodeMinColumnSpace(b[E],!0),vt=a.nodeMinColumnSpace(b[E],!1),yt=0;0>E-1||ut-b[E-1].column-1>ft+a.nodeMinColumnSpace(b[E-1],!1)?yt=ut-1:yt=ut,ft=E+1>=z||b[E+1].column-ut-1>vt+a.nodeMinColumnSpace(b[E+1],!0)?ut+1:ut;var Pt=vt=0,Et=0;if(0>=x)for(var Vt=b[E].sourceEdges.iterator;Vt.next();){var Rt=Vt.value,Qt=Rt.fromVertex;if(Rt.valid&&Qt.layer!==y){var _t=gy(Rt),te=Rt.portFromColOffset;Rt=Rt.portToColOffset,Qt=Qt.column,vt+=(Math.abs(ut+Rt-(Qt+te))+1)*_t,Pt+=(Math.abs(yt+Rt-(Qt+te))+1)*_t,Et+=(Math.abs(ft+Rt-(Qt+te))+1)*_t}}if(0<=x)for(Vt=b[E].destinationEdges.iterator;Vt.next();)Rt=Vt.value,Qt=Rt.toVertex,Rt.valid&&Qt.layer!==y&&(_t=gy(Rt),te=Rt.portFromColOffset,Rt=Rt.portToColOffset,Qt=Qt.column,vt+=(Math.abs(ut+te-(Qt+Rt))+1)*_t,Pt+=(Math.abs(yt+te-(Qt+Rt))+1)*_t,Et+=(Math.abs(ft+te-(Qt+Rt))+1)*_t);Rt=te=_t=0,Vt=tt[b[E].index],Qt=rt[b[E].index],Vt!==-1&&(_t+=Math.abs(Vt-ut),te+=Math.abs(Vt-yt),Rt+=Math.abs(Vt-ft)),Qt!==-1&&(_t+=Math.abs(Qt-ut),te+=Math.abs(Qt-yt),Rt+=Math.abs(Qt-ft)),Pt<vt||Pt===vt&&te<_t?(st=ot=!0,b[E].column=yt):(Et<vt||Et===vt&&Rt<_t)&&(st=ot=!0,b[E].column=ft)}return yd(a,y,b),a.normalize(),ot}function yy(a,y,x){var E=vd(a,y),b=a.tc[y],z=Z1(a,y,x),tt=[];for(x=0;x<b;x++)tt[x]=z[x];for(z=!0;z;)for(z=!1,x=0;x<b;x++){var rt=E[x].column,ot=a.nodeMinColumnSpace(E[x],!0),st=a.nodeMinColumnSpace(E[x],!1),ut=0;if(tt[x]===-1)if(x===0&&x===b-1)ut=rt;else if(x===0){var ft=E[x+1].column;ft-rt===st+a.nodeMinColumnSpace(E[x+1],!0)?ut=rt-1:ut=rt}else x===b-1?(ft=E[x-1].column,ut=rt-ft===ot+a.nodeMinColumnSpace(E[x-1],!1)?rt+1:rt):(ft=E[x-1].column,ot=ft+a.nodeMinColumnSpace(E[x-1],!1)+ot+1,ft=E[x+1].column,st=ft-a.nodeMinColumnSpace(E[x+1],!0)-st-1,ut=(ot+st)/2|0);else x===0&&x===b-1?ut=tt[x]:x===0?(ft=E[x+1].column,st=ft-a.nodeMinColumnSpace(E[x+1],!0)-st-1,ut=Math.min(tt[x],st)):x===b-1?(ft=E[x-1].column,ot=ft+a.nodeMinColumnSpace(E[x-1],!1)+ot+1,ut=Math.max(tt[x],ot)):(ft=E[x-1].column,ot=ft+a.nodeMinColumnSpace(E[x-1],!1)+ot+1,ft=E[x+1].column,st=ft-a.nodeMinColumnSpace(E[x+1],!0)-st-1,ot<tt[x]&&tt[x]<st?ut=tt[x]:ot>=tt[x]?ut=ot:st<=tt[x]&&(ut=st));ut!==rt&&(z=!0,E[x].column=ut)}yd(a,y,E),a.normalize()}function Hx(a,y){for(var x=!0,E=a.network.vertexes.iterator;E.next();){var b=E.value,z=a.nodeMinColumnSpace(b,!0),tt=a.nodeMinColumnSpace(b,!1);if(b.column-z<=y&&b.column+tt>=y){x=!1;break}}if(a=!1,x)for(E.reset();E.next();)x=E.value,x.column>y&&(--x.column,a=!0);return a}function Gx(a,y){var x=y+1,E,b=[],z=[];for(E=0;E<=a.Ia;E++)b[E]=!1,z[E]=!1;for(var tt=a.network.vertexes.iterator;tt.next();){E=tt.value;var rt=E.column-a.nodeMinColumnSpace(E,!0),ot=E.column+a.nodeMinColumnSpace(E,!1);rt<=y&&ot>=y&&(b[E.layer]=!0),rt<=x&&ot>=x&&(z[E.layer]=!0)}for(rt=!0,x=!1,E=0;E<=a.Ia;E++)rt=rt&&!(b[E]&&z[E]);if(rt)for(tt.reset();tt.next();)a=tt.value,a.column>y&&(--a.column,x=!0);return x}function $1(a,y){for(var x=0;x<=a.Ra;x++)for(;Hx(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Gx(a,x););a.normalize();var E;if(0<y)for(x=0;x<=a.Ra;x++){var b=js(a),z=C0(a);for(E=z+1;z<E;){E=z,tx(a,x,1);var tt=C0(a);tt>z?Ml(a,b):tt<z&&(z=tt,b=js(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(b=js(a),z=C0(a),E=z+1;z<E;)E=z,tx(a,x,-1),tt=C0(a),tt>z?Ml(a,b):tt<z&&(z=tt,b=js(a));a.normalize()}function tx(a,y,x){a.le=0;for(var E=a.network.vertexes.iterator;E.next();)E.value.component=-1;if(0<x)for(E.reset();E.next();){var b=E.value;b.column-a.nodeMinColumnSpace(b,!0)<=y&&(b.component=a.le)}if(0>x)for(E.reset();E.next();)b=E.value,b.column+a.nodeMinColumnSpace(b,!1)>=y&&(b.component=a.le);for(a.le++,E.reset();E.next();)y=E.value,y.component===-1&&(my(a,y,a.le,-1,!0,!0),a.le++);var z;for(y=[],z=0;z<a.le*a.le;z++)y[z]=!1;for(b=[],z=0;z<(a.Ia+1)*(a.Ra+1);z++)b[z]=-1;for(E.reset();E.next();){z=E.value;for(var tt=z.layer,rt=Math.max(0,z.column-a.nodeMinColumnSpace(z,!0)),ot=Math.min(a.Ra,z.column+a.nodeMinColumnSpace(z,!1));rt<=ot;rt++)b[tt*(a.Ra+1)+rt]=z.component}for(z=0;z<=a.Ia;z++){if(0<x)for(tt=0;tt<a.Ra;tt++)b[z*(a.Ra+1)+tt]!==-1&&b[z*(a.Ra+1)+tt+1]!==-1&&b[z*(a.Ra+1)+tt]!==b[z*(a.Ra+1)+tt+1]&&(y[b[z*(a.Ra+1)+tt]*a.le+b[z*(a.Ra+1)+tt+1]]=!0);if(0>x)for(tt=a.Ra;0<tt;tt--)b[z*(a.Ra+1)+tt]!==-1&&b[z*(a.Ra+1)+tt-1]!==-1&&b[z*(a.Ra+1)+tt]!==b[z*(a.Ra+1)+tt-1]&&(y[b[z*(a.Ra+1)+tt]*a.le+b[z*(a.Ra+1)+tt-1]]=!0)}for(b=[],z=0;z<a.le;z++)b[z]=!0;for(tt=[],tt.push(0);tt.length!==0;)if(ot=tt[tt.length-1],tt.pop(),b[ot])for(b[ot]=!1,z=0;z<a.le;z++)y[ot*a.le+z]&&tt.splice(0,0,z);if(0<x)for(E.reset();E.next();)a=E.value,b[a.component]&&--a.column;if(0>x)for(E.reset();E.next();)x=E.value,b[x.component]&&(x.column+=1)}function Zx(a){for(var y=Ei(),x=a.fl.length,E=0;E<=x;E++)y[E]=[];for(E=a.network.vertexes.iterator;E.next();){var b=E.value;y[x-b.layer][b.index]=b}x=new cn,Vx(y,x);var z=null,tt=null,rt=null,ot=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=k0(a,y,!0,!1)),y.reverse(),ft&&(a.verticalAlignment(y,x,!1),rt=k0(a,y,!1,!1)),E=bn(y),b=E.next();!b.done;b=E.next())b.value.reverse();vt&&(a.verticalAlignment(y,x,!1),ot=k0(a,y,!1,!0)),y.reverse(),ut&&(a.verticalAlignment(y,x,!0),tt=k0(a,y,!0,!0)),ri(y),a.u(z,tt,rt,ot),a.network.vertexes.each(function(yt){var Pt=Ei();st&&Pt.push(z.get(yt)),ut&&Pt.push(tt.get(yt)),ft&&Pt.push(rt.get(yt)),vt&&Pt.push(ot.get(yt)),Pt.sort(function(Vt,Rt){return Vt-Rt});var Et=Pt.length;Et=(Pt[Math.floor((Et-1)/2)]+Pt[Math.ceil((Et-1)/2)])/2,ri(Pt),yt.zc=Et})}function Vx(a,y){for(var x=a.length,E=1;E<x-1;E++)for(var b=0,z=0,tt=a[E],rt=a[E+1],ot=0;z<rt.length;ot++){var st=rt[ot];t:{if(st.node===null){var ut=My(st);if(0<ut.length){ut=ut[0].node===null;break t}}ut=!1}var ft=ut;if(ot===rt.length-1||ft){for(ut=tt.length-1,ft&&(ut=My(st)[0].index);z<=ot;){if(st=rt[z],!st.bo){ft=[];for(var vt=bn(st.sourceEdgesArrayAccess),yt=vt.next();!yt.done;yt=vt.next())yt=yt.value,yt.valid&&ft.push(yt);st.bo=ft}for(st=bn(st.bo),ft=st.next();!ft.done;ft=st.next())ft=ft.value,vt=ft.fromVertex.index,(vt<b||vt>ut)&&y.add(ft);z++}b=ut}}}ao.prototype.verticalAlignment=function(a,y,x){Kx(a),a=bn(a);for(var E=a.next();!E.done;E=a.next()){var b=-1;E=bn(E.value);for(var z=E.next();!z.done;z=E.next()){z=z.value;var tt=x?My(z):Xx(z),rt=tt.length;if(0<rt){tt.sort(function(ft,vt){return ft.vi-vt.vi});var ot=(rt-1)/2;for(rt=Math.floor(ot),ot=Math.ceil(ot);rt<=ot;rt++)if(z.align===z){var st=tt[rt],ut=void 0;ut=x?N0(st,z):N0(z,st),!y.contains(ut)&&b<st.vi&&(st.align=z,z.root=st.root,z.align=st.root,b=st.vi)}}}}};function Kx(a){for(var y=0;y<a.length;y++)for(var x=a[y],E=0;E<x.length;E++){var b=x[E];b.root=b,b.align=b,b.Tz=y,b.vi=E}}function k0(a,y,x,E){for(var b=a.K===90||a.K===270,z=bn(y),tt=z.next();!tt.done;tt=z.next()){var rt=bn(tt.value);for(tt=rt.next();!tt.done;tt=rt.next())tt=tt.value,tt.sd=tt,tt.shift=1/0,tt.zc=NaN,tt.qg=0}for(tt=a.K===90||a.K===270,z=bn(y),rt=z.next();!rt.done;rt=z.next()){rt=bn(rt.value);for(var ot=rt.next();!ot.done;ot=rt.next())if(ot=ot.value,ot.root===ot){for(var st=0,ut=ot;ut.align!==ot;){var ft=ut.align,vt=tt?ut.width:ut.height,yt=tt?ft.width:ft.height;if(x){var Pt=N0(ut,ft),Et=Pt.portFromPos,Vt=Pt.portToPos;Pt.link!==null&&(ut.node&&ut.node!==Pt.link.fromNode&&(Et=tt?ut.focusX:ut.focusY),ft.node&&ft.node!==Pt.link.toNode&&(Vt=tt?ft.focusX:ft.focusY))}else Pt=N0(ft,ut),Et=Pt.portToPos,Vt=Pt.portFromPos,Pt.link!==null&&(ut.node&&ut.node!==Pt.link.toNode&&(Et=tt?ut.focusX:ut.focusY),ft.node&&ft.node!==Pt.link.fromNode&&(Vt=tt?ft.focusX:ft.focusY));vt=E?ut.qg+(vt-Et)-(yt-Vt):ut.qg+Et-Vt,ft.qg=vt,st=Math.min(st,vt),ut=ut.align}ut=ot;do ut.qg=ut.qg-st,ut=ut.align;while(ut!==ot)}}for(x=bn(y),tt=x.next();!tt.done;tt=x.next())for(z=bn(tt.value),tt=z.next();!tt.done;tt=z.next())tt=tt.value,tt.root===tt&&ex(a,tt,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(tt=y[x][0],tt.sd===tt)){tt.sd.shift===1/0&&(tt.sd.shift=0),tt=x,rt=0;do{for(z=y[tt][rt];z.align!==z.root;)z=z.align,tt++,0<z.vi&&(rt=nx(z,y),rt.sd.shift=Math.min(rt.sd.shift,z.sd.shift+z.zc+z.qg-(rt.zc+rt.qg+(b?rt.width:rt.height)+a.columnSpacing)));rt=z.vi+1}while(tt<y.length&&rt<y[tt].length&&z.sd===y[tt][rt].sd)}for(a=new be,y=bn(y),tt=y.next();!tt.done;tt=y.next())for(x=bn(tt.value),tt=x.next();!tt.done;tt=x.next())tt=tt.value,tt.zc=tt.zc+tt.sd.shift+tt.qg,z=b?tt.width:tt.height,a.add(tt,E?-tt.zc-z:tt.zc);return a}function ex(a,y,x){if(isNaN(y.zc)){y.zc=0;var E=y;do{if(0<E.vi){var b=nx(E,x),z=b.root;ex(a,z,x),y.sd===y&&(y.sd=z.sd);var tt=a.K===90||a.K===270?b.width:b.height;y.sd===z.sd&&(y.zc=Math.max(y.zc,z.zc+b.qg+tt-E.qg+a.columnSpacing))}E=E.align}while(E!==y);for(;E.align!==y;)E=E.align,E.zc=y.zc,E.sd=y.sd}}function nx(a,y){var x=a.Tz;return a=a.vi,1>a&&$t("Could not determine previous vertex in layer"),y[x][a-1]}ao.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var E=Ei(),b=Ei(),z=1/0,tt=0;4>tt;tt++)if(y[tt]){var rt=Yx(this,y[tt],E,b,tt);rt<z&&(x=tt,z=rt)}for(z={},tt=0;4>tt;z={delta:z.delta},tt++)y[tt]&&(z.delta=tt===0||tt===2?E[x]-E[tt]:b[x]-b[tt],z.delta!==0&&y[tt].each(function(ot){return function(st){st.value+=ot.delta}}(z)));ri(E),ri(b)};function Yx(a,y,x,E,b){if(!y||y.count===0)return x[b]=0,E[b]=0,1/0;var z=1/0,tt=-1/0;return y.each(function(rt){var ot=rt.key;rt=rt.value,ot=a.K===90||a.K===270?ot.width:ot.height,rt<z&&(z=rt),rt+ot>tt&&(tt=rt+ot)}),x[b]=z,E[b]=tt,tt-z}ao.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=M0(this,!0),y=M0(this,!1),x=this.network.edges.iterator;x.next();){var E=x.value.link;E!==null&&(E.fromSpot=a,E.toSpot=y)}this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()};function M0(a,y){return a.K===270?y?Co:Uo:a.K===90?y?Uo:Co:a.K===180?y?lo:eo:y?eo:lo}ao.prototype.commitNodes=function(){this.he=[],this.Ld=[],this.Kd=[],this.Ta=[];for(var a=0;a<=this.Ia;a++)this.he[a]=0,this.Ld[a]=0,this.Kd[a]=0,this.Ta[a]=0;for(a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;this.he[x]=Math.max(this.he[x],this.nodeMinLayerSpace(y,!0)),this.Ld[x]=Math.max(this.Ld[x],this.nodeMinLayerSpace(y,!1))}y=0,x=this.ie;for(var E=0;E<=this.Ia;E++){var b=x;0>=this.he[E]+this.Ld[E]&&(b=0),0<E&&(y+=b/2),this.K===90||this.K===0?(y+=this.Ld[E],this.Kd[E]=y,y+=this.he[E]):(y+=this.he[E],this.Kd[E]=y,y+=this.Ld[E]),E<this.Ia&&(y+=b/2),this.Ta[E]=y}for(x=y,y=this.arrangementOrigin,E=0;E<=this.Ia;E++)this.K===270?this.Kd[E]=y.y+this.Kd[E]:this.K===90?(this.Kd[E]=y.y+x-this.Kd[E],this.Ta[E]=x-this.Ta[E]):this.K===180?this.Kd[E]=y.x+this.Kd[E]:(this.Kd[E]=y.x+x-this.Kd[E],this.Ta[E]=x-this.Ta[E]);x=this.ve!==0,a.reset(),E=this.K===270||this.K===90;for(var z=1/0,tt=b=1/0,rt=-1/0;a.next();){var ot=a.value,st=ot.layer,ut=ot.column|0;E?(tt=y.x+this.kc*ut,st=this.Kd[st]):(tt=this.Kd[st],st=y.y+this.kc*ut),ot.centerX=tt,ot.centerY=st,x&&isFinite(ot.zc)&&(E?ot.node?ot.x=y.x+ot.zc:ot.centerX=y.x+ot.zc:ot.node?ot.y=y.y+ot.zc:ot.centerY=y.y+ot.zc),z=Math.min(ot.x,z),b=Math.min(ot.y,b),E?(tt=z,rt=Math.max(rt,ot.bounds.right)):(tt=b,rt=Math.max(rt,ot.bounds.bottom))}for(this.xw=rt-tt,z=y.x-z,y=y.y-b,this.Rf=new Tt(x&&E?0:z,x&&!E?0:y),a.reset();a.next();)x=a.value,x.x+=z,x.y+=y,x.commit()},ao.prototype.Gu=function(){for(var a=0,y=this.ie,x=0;x<=this.Ia;x++)a+=this.he[x],a+=this.Ld[x];a+=this.Ia*y,y=[],x=this.ve!==0?this.xw:this.kc*this.Ra;for(var E=this.maxLayer;0<=E;E--)this.K===270?E===0?y.push(new ae(0,0,x,Math.abs(this.Ta[0]))):y.push(new ae(0,this.Ta[E-1],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===90?E===0?y.push(new ae(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new ae(0,this.Ta[E],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===180?E===0?y.push(new ae(0,0,Math.abs(this.Ta[0]),x)):y.push(new ae(this.Ta[E-1],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x)):E===0?y.push(new ae(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new ae(this.Ta[E],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x));this.commitLayers(y,this.Rf)},ao.prototype.commitLayers=function(){},ao.prototype.commitLinks=function(){for(var a=this.network.edges.iterator,y;a.next();)y=a.value.link,y!==null&&(y.uh(),y.Fj(),y.zf());for(a.reset();a.next();)y=a.value.link,y!==null&&y.vg();for(a.reset();a.next();){var x=a.value;if(y=x.link,y!==null){y.uh();var E=y,b=E.fromNode,z=E.toNode,tt=E.fromPort,rt=E.toPort;if(b!==null){var ot=b.findVisibleNode();ot!==null&&ot!==b&&(b=ot,tt=ot.port)}z!==null&&(ot=z.findVisibleNode(),ot!==null&&ot!==z&&(z=ot,rt=ot.port));var st=y.computeSpot(!0,tt);ot=y.computeSpot(!1,rt);var ut=x.fromVertex,ft=x.toVertex;if(x.valid)y.curve===hl&&y.pointsCount===4&&(ut.column===ft.column&&this.alignOption===0?(x=y.getLinkPoint(b,tt,st,!0,!1,z,rt),rt=y.getLinkPoint(z,rt,ot,!1,!1,b,tt),x.w()||x.set(b.actualBounds.center),rt.w()||rt.set(z.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+rt.x)/3,(2*x.y+rt.y)/3),y.yf((x.x+2*rt.x)/3,(x.y+2*rt.y)/3),y.yf(rt.x,rt.y)):(x=E=!1,tt!==null&&st===Li&&(E=!0),rt!==null&&ot===Li&&(x=!0),(E||x)&&(ot=null,E&&(ot=y.getLinkPointFromPoint(b,tt,tt.ga(fi),y.i(3),!0),ot.w()||ot.set(b.actualBounds.center),y.L(0,ot.x,ot.y)),b=null,x&&(b=y.getLinkPointFromPoint(z,rt,rt.ga(fi),y.i(0),!1),b.w()||b.set(z.actualBounds.center),y.L(3,b.x,b.y)),ot&&(z=y.i(2),y.L(1,(2*ot.x+z.x)/3,(2*ot.y+z.y)/3)),b&&(z=y.i(1),y.L(2,(2*b.x+z.x)/3,(2*b.y+z.y)/3))))),y.zf();else if(ut.layer===ft.layer)y.zf();else{var vt=!1,yt=!1,Pt=this.ie,Et=y.firstPickIndex+1;if(y.isOrthogonal){yt=!0;var Vt=y.pointsCount;4<Vt&&y.points.removeRange(2,Vt-3)}else if(y.curve===hl)vt=!0,Vt=y.pointsCount,4<Vt&&y.points.removeRange(2,Vt-3),Vt===4&&(Et=2);else{Vt=y.pointsCount;var Rt=st===Li,Qt=ot===Li;2<Vt&&Rt&&Qt?y.points.removeRange(1,Vt-2):3<Vt&&Rt&&!Qt?y.points.removeRange(1,Vt-3):3<Vt&&!Rt&&Qt?y.points.removeRange(2,Vt-2):4<Vt&&!Rt&&!Qt&&y.points.removeRange(2,Vt-3)}if(x.rev){for(;ft!==null&&ut!==ft;){var _t=Vt=null;for(Rt=ft.sourceEdges.iterator;Rt.next()&&(Qt=Rt.value,Qt.link!==x.link||(Vt=Qt.fromVertex,_t=Qt.toVertex,Vt.node!==null)););if(Vt===null)break;if(Vt!==ut){Rt=y.i(Et-1).x,Qt=y.i(Et-1).y;var te=Vt.centerX,ue=Vt.centerY;if(yt)this.K===180||this.K===0?Et===y.firstPickIndex+1?(y.m(Et++,Rt,Qt),y.m(Et++,Rt,ue)):(_t!==null?_t.centerY:Qt)!==ue&&(_t=this.Ta[Vt.layer-1]+this.Rf.x,y.m(Et++,_t,Qt),y.m(Et++,_t,ue)):Et===y.firstPickIndex+1?(y.m(Et++,Rt,Qt),y.m(Et++,te,Qt)):(_t!==null?_t.centerX:Rt)!==te&&(_t=this.Ta[Vt.layer-1]+this.Rf.y,y.m(Et++,Rt,_t),y.m(Et++,te,_t));else if(Et===y.firstPickIndex+1){_t=Math.max(10,this.he[ft.layer]);var Ce=Math.max(10,this.Ld[ft.layer]);if(vt)this.K===180?te<=ft.bounds.x?(ft=ft.bounds.x,y.m(Et++,ft-_t,ue),y.m(Et++,ft,ue),y.m(Et++,ft+Ce,ue)):(y.m(Et++,te-_t,ue),y.m(Et++,te,ue),y.m(Et++,te+Ce,ue)):this.K===90?ue>=ft.bounds.bottom?(ft=ft.bounds.y+ft.bounds.height,y.m(Et++,te,ft+Ce),y.m(Et++,te,ft),y.m(Et++,te,ft-_t)):(y.m(Et++,te,ue+Ce),y.m(Et++,te,ue),y.m(Et++,te,ue-_t)):this.K===270?ue<=ft.bounds.y?(ft=ft.bounds.y,y.m(Et++,te,ft-_t),y.m(Et++,te,ft),y.m(Et++,te,ft+Ce)):(y.m(Et++,te,ue-_t),y.m(Et++,te,ue),y.m(Et++,te,ue+Ce)):this.K===0&&(te>=ft.bounds.right?(ft=ft.bounds.x+ft.bounds.width,y.m(Et++,ft+Ce,ue),y.m(Et++,ft,ue),y.m(Et++,ft-_t,ue)):(y.m(Et++,te+Ce,ue),y.m(Et++,te,ue),y.m(Et++,te-_t,ue)));else{y.m(Et++,Rt,Qt);var On=0;this.K===180||this.K===0?((this.K===180?te>=ft.bounds.right:te<=ft.bounds.x)&&(On=(this.K===0?-_t:Ce)/2),y.m(Et++,Rt+On,ue)):((this.K===270?ue>=ft.bounds.bottom:ue<=ft.bounds.y)&&(On=(this.K===90?-_t:Ce)/2),y.m(Et++,te,Qt+On)),y.m(Et++,te,ue)}}else _t=Math.max(10,this.he[Vt.layer]),Ce=Math.max(10,this.Ld[Vt.layer]),vt?this.K===180?(y.m(Et++,te-_t-Pt,ue),y.m(Et++,Math.min(te-_t+Pt/2,te),ue),y.m(Et++,te,ue),y.m(Et++,te,ue),y.m(Et++,Math.max(te+Ce-Pt/2,te),ue),y.m(Et++,te+Ce+Pt,ue)):this.K===90?(y.m(Et++,te,ue+Ce+Pt),y.m(Et++,te,Math.max(ue+Ce-Pt/2,ue)),y.m(Et++,te,ue),y.m(Et++,te,ue),y.m(Et++,te,Math.min(ue-_t+Pt/2,ue)),y.m(Et++,te,ue-_t-Pt)):this.K===270?(y.m(Et++,te,ue-_t-Pt),y.m(Et++,te,Math.min(ue-_t+Pt/2,ue)),y.m(Et++,te,ue),y.m(Et++,te,ue),y.m(Et++,te,Math.max(ue+Ce-Pt/2,ue)),y.m(Et++,te,ue+Ce+Pt)):(y.m(Et++,te+Ce+Pt,ue),y.m(Et++,Math.max(te+Ce-Pt/2,te),ue),y.m(Et++,te,ue),y.m(Et++,te,ue),y.m(Et++,Math.min(te-_t+Pt/2,te),ue),y.m(Et++,te-_t-Pt,ue)):y.m(Et++,te,ue)}ft=Vt}(rt===null||st!==Li||yt)&&(Rt=y.i(Et-1).x,Qt=y.i(Et-1).y,te=y.i(Et).x,ue=y.i(Et).y,yt?(Pt=this.Ld[ut.layer],this.K===180||this.K===0?(yt=Qt,yt>=ut.bounds.y&&yt<=ut.bounds.bottom&&(this.K===180?te>=ut.bounds.x:te<=ut.bounds.right)&&(ft=ut.centerX+(this.K===180?-Pt:Pt),yt<ut.bounds.y+ut.bounds.height/2?yt=ut.bounds.y-this.kc/2:yt=ut.bounds.bottom+this.kc/2,y.m(Et++,ft,Qt),y.m(Et++,ft,yt)),y.m(Et++,te,yt)):(yt=Rt,yt>=ut.bounds.x&&yt<=ut.bounds.right&&(this.K===270?ue>=ut.bounds.y:ue<=ut.bounds.bottom)&&(ft=ut.centerY+(this.K===270?-Pt:Pt),yt<ut.bounds.x+ut.bounds.width/2?yt=ut.bounds.x-this.kc/2:yt=ut.bounds.right+this.kc/2,y.m(Et++,Rt,ft),y.m(Et++,yt,ft)),y.m(Et++,yt,ue)),y.m(Et++,te,ue)):vt?(_t=Math.max(10,this.he[ut.layer]),Ce=Math.max(10,this.Ld[ut.layer]),this.K===180&&te>=ut.bounds.x?(ft=ut.bounds.x+ut.bounds.width,y.L(Et-2,ft,Qt),y.L(Et-1,ft+Ce,Qt)):this.K===90&&ue<=ut.bounds.bottom?(ft=ut.bounds.y,y.L(Et-2,Rt,ft),y.L(Et-1,Rt,ft-_t)):this.K===270&&ue>=ut.bounds.y?(ft=ut.bounds.y+ut.bounds.height,y.L(Et-2,Rt,ft),y.L(Et-1,Rt,ft+Ce)):this.K===0&&te<=ut.bounds.right&&(ft=ut.bounds.x,y.L(Et-2,ft,Qt),y.L(Et-1,ft-_t,Qt))):(_t=Math.max(10,this.he[ut.layer]),Ce=Math.max(10,this.Ld[ut.layer]),yt=0,this.K===180||this.K===0?((this.K===180?te<=ut.bounds.x:te>=ut.bounds.right)&&(yt=(this.K===0?Ce:-_t)/2),y.m(Et++,te+yt,Qt)):((this.K===270?ue<=ut.bounds.y:ue>=ut.bounds.bottom)&&(yt=(this.K===90?Ce:-_t)/2),y.m(Et++,Rt,ue+yt)),y.m(Et++,te,ue)))}else{for(;ut!==null&&ut!==ft;){for(_t=Vt=null,ut=ut.destinationEdges.iterator;ut.next()&&(Rt=ut.value,Rt.link!==x.link||(Vt=Rt.toVertex,_t=Rt.fromVertex,_t.node!==null&&(_t=null),Vt.node!==null)););if(Vt===null)break;Vt!==ft&&(Rt=y.i(Et-1).x,Qt=y.i(Et-1).y,te=Vt.centerX,ue=Vt.centerY,yt?this.K===180||this.K===0?(_t!==null?_t.centerY:Qt)!==ue&&(_t=this.Ta[Vt.layer]+this.Rf.x,Et===y.firstPickIndex+1&&(_t=this.K===0?Math.max(_t,Rt):Math.min(_t,Rt)),y.m(Et++,_t,Qt),y.m(Et++,_t,ue)):(_t!==null?_t.centerX:Rt)!==te&&(_t=this.Ta[Vt.layer]+this.Rf.y,Et===y.firstPickIndex+1&&(_t=this.K===90?Math.max(_t,Qt):Math.min(_t,Qt)),y.m(Et++,Rt,_t),y.m(Et++,te,_t)):(_t=Math.max(10,this.he[Vt.layer]),Ce=Math.max(10,this.Ld[Vt.layer]),vt?this.K===180?(y.m(Et++,te+Ce+Pt,ue),y.m(Et++,Math.max(te+Ce-Pt/2,te),ue),y.m(Et++,te,ue),y.m(Et++,te,ue),y.m(Et++,Math.min(te-_t+Pt/2,te),ue),y.m(Et++,te-_t-Pt,ue)):this.K===90?(y.m(Et++,te,ue-_t-Pt),y.m(Et++,te,Math.min(ue-_t+Pt/2,ue)),y.m(Et++,te,ue),y.m(Et++,te,ue),y.m(Et++,te,Math.max(ue+Ce-Pt/2,ue)),y.m(Et++,te,ue+Ce+Pt)):this.K===270?(y.m(Et++,te,ue+Ce+Pt),y.m(Et++,te,Math.max(ue+Ce-Pt/2,ue)),y.m(Et++,te,ue),y.m(Et++,te,ue),y.m(Et++,te,Math.min(ue-_t+Pt/2,ue)),y.m(Et++,te,ue-_t-Pt)):(y.m(Et++,te-_t-Pt,ue),y.m(Et++,Math.min(te-_t+Pt/2,te),ue),y.m(Et++,te,ue),y.m(Et++,te,ue),y.m(Et++,Math.max(te+Ce-Pt/2,te),ue),y.m(Et++,te+Ce+Pt,ue)):this.K===180?(y.m(Et++,te+Ce,ue),y.m(Et++,te-_t,ue)):this.K===90?(y.m(Et++,te,ue-_t),y.m(Et++,te,ue+Ce)):this.K===270?(y.m(Et++,te,ue+Ce),y.m(Et++,te,ue-_t)):(y.m(Et++,te-_t,ue),y.m(Et++,te+Ce,ue)))),ut=Vt}yt&&(Rt=y.i(Et-1).x,Qt=y.i(Et-1).y,te=y.i(Et).x,ue=y.i(Et).y,this.K===180||this.K===0?Qt!==ue&&(_t=this.K===0?Math.min(Math.max((te+Rt)/2,this.Ta[ft.layer]+this.Rf.x),te):Math.max(Math.min((te+Rt)/2,this.Ta[ft.layer]+this.Rf.x),te),y.m(Et++,_t,Qt),y.m(Et++,_t,ue)):Rt!==te&&(_t=this.K===90?Math.min(Math.max((ue+Qt)/2,this.Ta[ft.layer]+this.Rf.y),ue):Math.max(Math.min((ue+Qt)/2,this.Ta[ft.layer]+this.Rf.y),ue),y.m(Et++,Rt,_t),y.m(Et++,te,_t)))}E!==null&&vt&&4<=y.pointsCount&&(tt!==null&&(tt=st===Li?y.getLinkPointFromPoint(b,tt,tt.ga(fi),y.i(3),!0):y.i(0),st===Li&&(st=y.i(2),E=y.i(3),this.direction===90||this.direction===270?(y.L(1,(tt.x+st.x)/2,st.y),y.L(2,E.x,(st.y+E.y)/2)):(y.L(1,st.x,(tt.y+st.y)/2),y.L(2,(st.x+E.x)/2,E.y))),tt.w()||tt.set(b.actualBounds.center),y.L(0,tt.x,tt.y)),rt!==null&&(b=ot===Li?y.getLinkPointFromPoint(z,rt,rt.ga(fi),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),ot===Li&&(rt=y.i(y.pointsCount-3),ot=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(b.x+rt.x)/2,rt.y),y.L(y.pointsCount-2,ot.x,(rt.y+ot.y)/2)):(y.L(y.pointsCount-2,rt.x,(b.y+rt.y)/2),y.L(y.pointsCount-3,(rt.x+ot.x)/2,ot.y))),b.w()||b.set(z.actualBounds.center),y.L(y.pointsCount-1,b.x,b.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},ao.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new dn,y=this.network.edges.iterator;y.next();){var x=y.value.link;x!==null&&x.isOrthogonal&&!a.contains(x)&&a.add(x)}if(0<a.count)if(this.K===90||this.K===270){for(y=0,x=[],a=a.iterator;a.next();){var E=a.value;if(E!==null&&E.isOrthogonal)for(var b=2;b<E.pointsCount-3;b++){var z=E.i(b),tt=E.i(b+1);if(this.B(z.y,tt.y)&&!this.B(z.x,tt.x)){var rt=new Sd;rt.layer=Math.floor(z.y/2);var ot=E.i(0),st=E.i(E.pointsCount-1);if(rt.first=ot.x*ot.x+ot.y,rt.jc=st.x*st.x+st.y,rt.rd=Math.min(z.x,tt.x),rt.Ic=Math.max(z.x,tt.x),rt.index=b,rt.link=E,b+2<E.pointsCount){ot=E.i(b-1),st=E.i(b+2);var ut=0;ot.y<z.y?ut=st.y<z.y?3:z.x<tt.x?2:1:ot.y>z.y&&(ut=st.y>z.y?0:tt.x<z.x?2:1),rt.j=ut}x.push(rt)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,E=a+1;E<x.length&&x[E].layer===z;)E++;if(1<E-a)for(z=a;z<E;){for(tt=x[z].Ic,b=a+1;b<E&&x[b].rd<tt;)tt=Math.max(tt,x[b].Ic),b++;if(tt=b-z,1<tt){for(this.zi(x,this.Js,z,z+tt),ut=1,rt=x[z].jc,ot=z;ot<b;ot++)st=x[ot],st.jc!==rt&&(ut++,rt=st.jc);this.zi(x,this.Ux,z,z+tt);var ft=1;for(rt=x[z].first,ot=z;ot<b;ot++)st=x[ot],st.first!==rt&&(ft++,rt=st.first);for(ot=!0,st=ft,ut<ft?(ot=!1,st=ut,rt=x[z].jc,this.zi(x,this.Js,z,z+tt)):rt=x[z].first,ut=0,ft=z;ft<b;ft++){var vt=x[ft];(ot?vt.first:vt.jc)!==rt&&(ut++,rt=ot?vt.first:vt.jc);var yt=vt.link;z=yt.i(vt.index),tt=yt.i(vt.index+1);var Pt=this.linkSpacing*(ut-(st-1)/2);y++,yt.uh(),yt.L(vt.index,z.x,z.y+Pt),yt.L(vt.index+1,tt.x,tt.y+Pt),yt.zf()}}z=b}a=E}}else{for(y=0,x=[],a=a.iterator;a.next();)if(E=a.value,E!==null&&E.isOrthogonal)for(b=2;b<E.pointsCount-3;b++)z=E.i(b),tt=E.i(b+1),this.B(z.x,tt.x)&&!this.B(z.y,tt.y)&&(rt=new Sd,rt.layer=Math.floor(z.x/2),ot=E.i(0),st=E.i(E.pointsCount-1),rt.first=ot.x+ot.y*ot.y,rt.jc=st.x+st.y*st.y,rt.rd=Math.min(z.y,tt.y),rt.Ic=Math.max(z.y,tt.y),rt.index=b,rt.link=E,b+2<E.pointsCount&&(ot=E.i(b-1),st=E.i(b+2),ut=0,ot.x<z.x?ut=st.x<z.x?3:z.y<tt.y?2:1:ot.x>z.x&&(ut=st.x>z.x?0:tt.y<z.y?2:1),rt.j=ut),x.push(rt));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,E=a+1;E<x.length&&x[E].layer===z;)E++;if(1<E-a)for(z=a;z<E;){for(tt=x[z].Ic,b=a+1;b<E&&x[b].rd<tt;)tt=Math.max(tt,x[b].Ic),b++;if(tt=b-z,1<tt){for(this.zi(x,this.Js,z,z+tt),ut=1,rt=x[z].jc,ot=z;ot<b;ot++)st=x[ot],st.jc!==rt&&(ut++,rt=st.jc);for(this.zi(x,this.Ux,z,z+tt),ft=1,rt=x[z].first,ot=z;ot<b;ot++)st=x[ot],st.first!==rt&&(ft++,rt=st.first);for(ot=!0,st=ft,ut<ft?(ot=!1,st=ut,rt=x[z].jc,this.zi(x,this.Js,z,z+tt)):rt=x[z].first,ut=0,ft=z;ft<b;ft++)vt=x[ft],(ot?vt.first:vt.jc)!==rt&&(ut++,rt=ot?vt.first:vt.jc),yt=vt.link,z=yt.i(vt.index),tt=yt.i(vt.index+1),Pt=this.linkSpacing*(ut-(st-1)/2),y++,yt.uh(),yt.L(vt.index,z.x+Pt,z.y),yt.L(vt.index+1,tt.x+Pt,tt.y),yt.zf()}z=b}a=E}}}},Ct=ao.prototype,Ct.Vx=function(a,y){return a instanceof Sd&&y instanceof Sd&&a!==y?a.layer<y.layer?-1:a.layer>y.layer?1:a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},Ct.Ux=function(a,y){return a instanceof Sd&&y instanceof Sd&&a!==y?a.first<y.first?-1:a.first>y.first||a.j<y.j?1:a.j>y.j||a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},Ct.Js=function(a,y){return a instanceof Sd&&y instanceof Sd&&a!==y?a.jc<y.jc?-1:a.jc>y.jc||a.j<y.j?1:a.j>y.j||a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},Ct.B=function(a,y){return a-=y,-1<a&&1>a},Ct.zi=function(a,y,x,E){var b=a.length,z=E-x;if(!(1>=z))if((0>x||x>=b-1)&&$t("not in range 0 <= from < length: "+x),z===2)E=a[x],b=a[x+1],0<y(E,b)&&(a[x]=b,a[x+1]=E);else if(x===0)if(E>=b)a.sort(y);else for(x=a.slice(0,E),x.sort(y),y=0;y<E;y++)a[y]=x[y];else if(E>=b)for(E=a.slice(x),E.sort(y),y=x;y<b;y++)a[y]=E[y-x];else for(b=a.slice(x,E),b.sort(y),y=x;y<E;y++)a[y]=b[y-x]};function vd(a,y){var x=a.tc[y];if(x>=a.He.length){for(var E=[],b=0;b<a.He.length;b++)E[b]=a.He[b];a.He=E}for(a.He[x]===void 0||a.He[x]===null?E=[]:(E=a.He[x],a.He[x]=null),a=a.fl[y],y=0;y<a.length;y++)x=a[y],E[x.index]=x;return E}function yd(a,y,x){a.He[a.tc[y]]=x}Me.Object.defineProperties(ao.prototype,{layerSpacing:{get:function(){return this.ie},set:function(a){this.ie!==a&&0<=a&&(this.ie=a,this.C())}},columnSpacing:{get:function(){return this.kc},set:function(a){this.kc!==a&&0<a&&(this.kc=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K!==a&&(a===0||a===90||a===180||a===270?(this.K=a,this.C()):$t("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==Sy&&a!==E0&&a!==Mp||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==A0&&a!==xy&&a!==Py||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==F0&&a!==wy&&a!==Cy||(this.Qk=a,this.C())}},iterations:{get:function(){return this.bj},set:function(a){this.bj!==a&&0<=a&&(this.bj=a,this.C())}},aggressiveOption:{get:function(){return this.rk},set:function(a){this.rk===a||a!==Ly&&a!==b0&&a!==ky||(this.rk=a,this.C())}},packOption:{get:function(){return this.bg},set:function(a){this.bg!==a&&0<=a&&8>a&&(this.bg=a,this.C())}},alignOption:{get:function(){return this.ve},set:function(a){this.ve!==a&&0<=a&&16>a&&(this.ve=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},linkSpacing:{get:function(){return this.Cn},set:function(a){this.Cn!==a&&0<=a&&(this.Cn=a,this.C())}},maxLayer:{get:function(){return this.Ia}},maxIndex:{get:function(){return this.Iq}},maxColumn:{get:function(){return this.Ra}},minIndexLayer:{get:function(){return this.Hn}},maxIndexLayer:{get:function(){return this.Md}}});var E0=new Ve(ao,"CycleDepthFirst",0),Sy=new Ve(ao,"CycleGreedy",1),Mp=new Ve(ao,"CycleFromLayers",2),A0=new Ve(ao,"LayerOptimalLinkLength",0),xy=new Ve(ao,"LayerLongestPathSink",1),Py=new Ve(ao,"LayerLongestPathSource",2),F0=new Ve(ao,"InitDepthFirstOut",0),wy=new Ve(ao,"InitDepthFirstIn",1),Cy=new Ve(ao,"InitNaive",2),Ly=new Ve(ao,"AggressiveNone",0),b0=new Ve(ao,"AggressiveLess",1),ky=new Ve(ao,"AggressiveMore",2),Ux=8;ao.className="LayeredDigraphLayout",ao.CycleDepthFirst=E0,ao.CycleGreedy=Sy,ao.CycleFromLayers=Mp,ao.LayerOptimalLinkLength=A0,ao.LayerLongestPathSink=xy,ao.LayerLongestPathSource=Py,ao.InitDepthFirstOut=F0,ao.InitDepthFirstIn=wy,ao.InitNaive=Cy,ao.AggressiveNone=Ly,ao.AggressiveLess=b0,ao.AggressiveMore=ky,ao.PackNone=0,ao.PackExpand=1,ao.PackStraighten=2,ao.PackMedian=4,ao.PackAll=15,ao.AlignNone=0,ao.AlignUpperLeft=1,ao.AlignUpperRight=2,ao.AlignLowerLeft=4,ao.AlignLowerRight=8,ao.AlignAll=15;function Sd(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}Sd.className="SegInfo";function Qf(a){To.call(this,a)}Oe(Qf,To),Qf.prototype.createVertex=function(){return new El(this)},Qf.prototype.createEdge=function(){return new Ep(this)},Qf.className="LayeredDigraphNetwork";function El(a){ba.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}Oe(El,ba);function ix(a,y){return a.index-y.index}function N0(a,y){if(!a.$n){for(var x=[],E=bn(a.destinationEdgesArrayAccess),b=E.next();!b.done;b=E.next())b=b.value,b.valid&&x.push(b);a.$n=x}for(a=bn(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;$t("Unable to find destination edge to given vertex")}function My(a){if(!a.co){for(var y=[],x=bn(a.sourceEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.fromVertex);y.sort(ix),a.co=y}return a.co}function Xx(a){if(!a.ao){for(var y=[],x=bn(a.destinationEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.toVertex);y.sort(ix),a.ao=y}return a.ao}El.prototype.Cl=function(a){ba.prototype.Cl.call(this,a),this.bo=this.co=null},El.prototype.Kl=function(a){ba.prototype.Kl.call(this,a),this.bo=this.co=null},El.prototype.zl=function(a){ba.prototype.zl.call(this,a),this.$n=this.ao=null},El.prototype.Jl=function(a){ba.prototype.Jl.call(this,a),this.$n=this.ao=null},Me.Object.defineProperties(El.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)}}}),El.prototype.deleteDestinationEdge=El.prototype.Jl,El.prototype.addDestinationEdge=El.prototype.zl,El.prototype.deleteSourceEdge=El.prototype.Kl,El.prototype.addSourceEdge=El.prototype.Cl,El.className="LayeredDigraphVertex";function Ep(a){tl.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Oe(Ep,tl),Me.Object.defineProperties(Ep.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)}}}),Ep.className="LayeredDigraphEdge";function kr(a){_o.call(this),this.Ub=new cn,this.Wn=O0,this.ud=Gu,this.vo=R0,this.Bq=Ry,this.$v=[],this.td=!0,this.Rb=z0,this.$d=new Ut(10,10).freeze();var y=new Kc(this);this.W=new jl(y),this.Y=new jl(y),this.ru=[],a&&Object.assign(this,a)}Oe(kr,_o),kr.prototype.cloneProtected=function(a){_o.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)},kr.prototype.qb=function(a){a.classType===kr?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:$t("Unknown enum value: "+a):_o.prototype.qb.call(this,a)},kr.prototype.createNetwork=function(){return new Kc(this)},kr.prototype.makeNetwork=function(a){function y(E){if(E instanceof Hn)return!E.isLinkLabel&&E.category!=="Comment";if(E instanceof Ln){var b=E.fromNode;return b===null||b.isLinkLabel||b.category==="Comment"?!1:(E=E.toNode,!(E===null||E.isLinkLabel||E.category==="Comment"))}return!1}var x=this.createNetwork();return a instanceof ke?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof ir?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},kr.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==j0&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof ke&&(y=a),this.path===O0&&y!==null?this.ud=y.isTreePathToChildren?Gu:Zc:this.ud=this.path===O0?Gu:this.path,0<this.network.vertexes.count){for(this.network.Ko(),a=this.network.vertexes.iterator;a.next();)y=a.value,y.initialized=!1,y.level=0,y.parent=null,y.children=[];if(0<this.Ub.count){for(a=new cn,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof Hn?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof jl&&a.add(x)}this.Ub=a}for(this.Ub.count===0&&this.findRoots(),a=this.Ub.copy().iterator;a.next();)y=a.value,y.initialized||(y.initialized=!0,Ey(this,y));for(y=this.network.vertexes,a=null;a=Jx(y),0<a.count;)y=rx(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,Ey(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof jl&&ax(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof jl&&sx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof jl&&lx(this,y);if(this.Cu(),this.layerStyle===W0){for(a=[],y=this.network.vertexes.iterator;y.next();){x=y.value;var E=x.parent;E===null&&(E=x),E=E.angle===0||E.angle===180;var b=a[x.level];b===void 0&&(b=0),a[x.level]=Math.max(b,E?x.width:x.height)}for(y=0;y<a.length;y++)a[y]===void 0&&(a[y]=0);for(this.$v=a,y=this.network.vertexes.iterator;y.next();)x=y.value,E=x.parent,E===null&&(E=x),E.angle===0||E.angle===180?(E.angle===180&&(x.focusX+=a[x.level]-x.width),x.width=a[x.level]):(E.angle===270&&(x.focusY+=a[x.level]-x.height),x.height=a[x.level])}else if(this.layerStyle===zy)for(a=this.network.vertexes.iterator;a.next();){for(y=a.value,x=y.angle===0||y.angle===180,E=-1,b=0;b<y.children.length;b++){var z=y.children[b];E=Math.max(E,x?z.width:z.height)}if(0<=E)for(b=0;b<y.children.length;b++)z=y.children[b],x?(y.angle===180&&(z.focusX+=E-z.width),z.width=E):(y.angle===270&&(z.focusY+=E-z.height),z.height=E)}for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof jl&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new cn,this.isValidLayout=!0};function Jx(a){var y=new cn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}kr.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case Gu:x.sourceEdges.count===0&&this.Ub.add(x);break;case Zc:x.destinationEdges.count===0&&this.Ub.add(x);break;default:$t("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=rx(this,a),a!==null&&this.Ub.add(a))};function rx(a,y){var x=999999,E=null;for(y=y.iterator;y.next();){var b=y.value;switch(a.ud){case Gu:b.sourceEdges.count<x&&(x=b.sourceEdges.count,E=b);break;case Zc:b.destinationEdges.count<x&&(x=b.destinationEdges.count,E=b);break;default:$t("Unhandled path value "+a.ud.toString())}}return E}function Ey(a,y){if(y!==null){switch(a.ud){case Gu:if(0<y.destinationEdges.count){for(var x=new dn,E=y.destinationVertexes;E.next();){var b=E.value;ox(a,y,b)&&x.add(b)}0<x.count&&(y.children=x.Fa())}break;case Zc:if(0<y.sourceEdges.count){for(x=new dn,E=y.sourceVertexes;E.next();)b=E.value,ox(a,y,b)&&x.add(b);0<x.count&&(y.children=x.Fa())}break;default:$t("Unhandled path value"+a.ud.toString())}for(x=y.children,E=x.length,b=0;b<E;b++){var z=x[b];z.initialized=!0,z.level=y.level+1,z.parent=y,a.Ub.remove(z)}for(y=0;y<E;y++)Ey(a,x[y])}}function ox(a,y,x){if(x.initialized){if(y===null)var E=!1;else{for(E=y.parent;E!==null&&E!==x;)E=E.parent;E=E===x}if(E||x.level>y.level)return!1;a.removeChild(x.parent,x)}return!0}kr.prototype.removeChild=function(a,y){if(a!==null&&y!==null){for(var x=a.children,E=0,b=0;b<x.length;b++)x[b]===y&&E++;if(0<E){E=Array(x.length-E);for(var z=b=0;z<x.length;z++)x[z]!==y&&(E[b++]=x[z]);a.children=E}}};function ax(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===Ku&&a.sortTreeVertexChildren(y);for(var x=0,E=y.childrenCount,b=0,z=y.children,tt=z.length,rt=0;rt<tt;rt++){var ot=z[rt];ax(a,ot),x+=ot.descendantCount+1,E=Math.max(E,ot.maxChildrenCount),b=Math.max(b,ot.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=E,y.maxGenerationCount=0<E?b+1:0}}function Qx(a,y){switch(a.vo){default:case R0:return y.parent!==null?y.parent:a.W;case Oy:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case By:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Dy:var x=!0;if(y.childrenCount===0)x=!1;else for(var E=y.children,b=E.length,z=0;z<b;z++)if(0<E[z].childrenCount){x=!1;break}return x&&y.parent!==null?a.Y:y.parent!==null?y.parent:a.W}}kr.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Qx(this,a)),a.parent!==null&&a.parent.alignment===Ku){for(var y=a.angle,x=a.parent.children,E=0;E<x.length&&a!==x[E];)E++;E%2===0?E!==x.length-1&&(y=y===90?180:y===180?270:y===270?180:270):y=y===90?0:y===180?90:y===270?0:90,a.angle=y}a.initialized=!0};function sx(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,E=0;E<x;E++)sx(a,y[E])}}kr.prototype.assignTreeVertexValues=function(){};function lx(a,y){if(y!==null){y.alignment!==Ku&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,E=0;E<x;E++)lx(a,y[E])}}kr.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case _f:break;case Fp:a.children.reverse();break;case bp:a.children.sort(a.comparer);break;case Np:a.children.sort(a.comparer),a.children.reverse();break;default:$t("Unhandled sorting value "+a.sorting.toString())}},kr.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},kr.prototype.addComments=function(a){var y=a.angle,x=a.parent,E=0,b=!1;x!==null&&(E=x.angle,b=x.alignment,b=xd(b)),y=y===90||y===270,E=E===90||E===270,x=a.childrenCount===0;var z=0,tt=0,rt=0,ot=a.commentSpacing;if(a.node!==null)for(var st=a.node.Mu();st.next();){var ut=st.value;ut.category==="Comment"&&ut.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(ut),ut.Va(),ut=ut.measuredBounds,y&&!x||!b&&!E&&x||b&&E&&x?(z=Math.max(z,ut.width),tt+=ut.height+Math.abs(rt)):(z+=ut.width+Math.abs(rt),tt=Math.max(tt,ut.height)),rt=ot)}a.comments!==null&&(y&&!x||!b&&!E&&x||b&&E&&x?(z+=Math.abs(a.commentMargin),tt=Math.max(0,tt-a.height)):(tt+=Math.abs(a.commentMargin),z=Math.max(0,z-a.width)),b=ae.allocAt(0,0,a.bounds.width+z,a.bounds.height+tt),a.bounds=b,ae.free(b))};function xd(a){return a===Oh||a===Ku||a===Ih||a===ah}function Ap(a){return a===Oh||a===Ku}function Ay(a){var y=a.parent;if(y!==null){var x=y.alignment;if(xd(x)){if(Ap(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===Ih)return!0}}return!1}kr.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,E=a.angle,b=0,z=!1;x!==null&&(b=x.angle,z=x.alignment,z=xd(z)),E=E===90||E===270,x=b===90||b===270;for(var tt=a.childrenCount===0,rt=Ay(a),ot=0,st=a.comments,ut=st.length,ft=Tt.alloc(),vt=0;vt<ut;vt++){var yt=st[vt],Pt=yt.measuredBounds;if(E&&!tt||!z&&!x&&tt||z&&x&&tt){if(135<b&&!z||x&&rt)if(0<=a.commentMargin)for(ft.h(a.bounds.x-a.commentMargin-Pt.width,a.bounds.y+ot),yt.move(ft),yt=yt.Sd();yt.next();){var Et=yt.value;Et.fromSpot=lo,Et.toSpot=eo}else for(ft.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+ot),yt.move(ft),yt=yt.Sd();yt.next();)Et=yt.value,Et.fromSpot=eo,Et.toSpot=lo;else if(0<=a.commentMargin)for(ft.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+ot),yt.move(ft),yt=yt.Sd();yt.next();)Et=yt.value,Et.fromSpot=eo,Et.toSpot=lo;else for(ft.h(a.bounds.x+a.commentMargin-Pt.width,a.bounds.y+ot),yt.move(ft),yt=yt.Sd();yt.next();)Et=yt.value,Et.fromSpot=lo,Et.toSpot=eo;ot=0<=a.commentSpacing?ot+(Pt.height+a.commentSpacing):ot+(a.commentSpacing-Pt.height)}else{if(135<b&&!z||!x&&rt)if(0<=a.commentMargin)for(ft.h(a.bounds.x+ot,a.bounds.y-a.commentMargin-Pt.height),yt.move(ft),yt=yt.Sd();yt.next();)Et=yt.value,Et.fromSpot=Co,Et.toSpot=Uo;else for(ft.h(a.bounds.x+ot,a.bounds.y+2*a.focus.y-a.commentMargin),yt.move(ft),yt=yt.Sd();yt.next();)Et=yt.value,Et.fromSpot=Uo,Et.toSpot=Co;else if(0<=a.commentMargin)for(ft.h(a.bounds.x+ot,a.bounds.y+2*a.focus.y+a.commentMargin),yt.move(ft),yt=yt.Sd();yt.next();)Et=yt.value,Et.fromSpot=Uo,Et.toSpot=Co;else for(ft.h(a.bounds.x+ot,a.bounds.y+a.commentMargin-Pt.height),yt.move(ft),yt=yt.Sd();yt.next();)Et=yt.value,Et.fromSpot=Co,Et.toSpot=Uo;ot=0<=a.commentSpacing?ot+(Pt.width+a.commentSpacing):ot+(a.commentSpacing-Pt.width)}}if(Tt.free(ft),y=ot-a.commentSpacing-(E?y.height:y.width),this.ud===Gu)for(a=a.destinationEdges;a.next();)b=a.value.link,b===null||b.isAvoiding||(b.fromEndSegmentLength=0<y?y:NaN);else for(a=a.sourceEdges;a.next();)b=a.value.link,b===null||b.isAvoiding||(b.toEndSegmentLength=0<y?y:NaN)}},kr.prototype.layoutTree=function(a){if(a!==null){for(var y=a.children,x=y.length,E=0;E<x;E++)this.layoutTree(y[E]);switch(a.compaction){case I0:ux(this,a);break;case Tp:if(a.alignment===Ku)ux(this,a);else if(a.childrenCount===0)E=a.parent,x=!1,y=0,E!==null&&(y=E.angle,x=E.alignment,x=xd(x)),E=Ay(a),a.S.h(0,0),a.Da.h(a.width,a.height),a.parent===null||a.comments===null||(y!==180&&y!==270||x)&&!E?a.la.h(0,0):y===180&&!x||(y===90||y===270)&&E?a.la.h(a.width-2*a.focus.x,0):a.la.h(0,a.height-2*a.focus.y),a.Yo=null,a.kp=null;else{var b=tu(a);y=b===90||b===270;var z=0,tt=a.children,rt=tt.length;for(x=0;x<rt;x++)E=tt[x],z=Math.max(z,y?E.Da.width:E.Da.height);var ot=a.alignment;E=ot===Zu;var st=ot===Vu,ut=xd(ot),ft=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var vt=a.nodeSpacing,yt=this.computeNodeIndent(a),Pt=a.rowSpacing,Et=0;(E||st||a.hm||a.im&&a.maxGenerationCount===1)&&(Et=Math.max(0,a.rowIndent)),E=a.width;var Vt=a.height,Rt=0,Qt=0,_t=0,te=null,ue=null,Ce=0,On=0,li=0,ti=0,Cn=0,qe=0,er=0,Ui=0;if(ut&&!Ap(ot)&&135<b&&tt.reverse(),Ap(ot))if(1<rt)for(var Ur=0;Ur<rt;Ur++)Ur%2===0&&Ur!==rt-1&&(Ui=Math.max(Ui,y?tt[Ur].Da.width:tt[Ur].Da.height));else rt===1&&(Ui=y?tt[0].Da.width:tt[0].Da.height);if(ut){switch(ot){case Oh:Qt=135>b?hx(this,a,tt,Ui,Rt,Qt):dx(this,a,tt,Ui,Rt,Qt),Ui=Qt.x,Rt=Qt.width,Qt=Qt.height;break;case Ih:for(te=0;te<rt;te++)ue=tt[te],ft=ue.Da,_t=qe===0?0:Pt,y?(ue.S.h(z-ft.width,ti+_t),Rt=Math.max(Rt,ft.width),Qt=Math.max(Qt,ti+_t+ft.height),ti+=_t+ft.height):(ue.S.h(li+_t,z-ft.height),Rt=Math.max(Rt,li+_t+ft.width),Qt=Math.max(Qt,ft.height),li+=_t+ft.width),qe++;break;case ah:for(te=0;te<rt;te++)ue=tt[te],z=ue.Da,ft=qe===0?0:Pt,y?(ue.S.h(vt/2+a.focus.x,ti+ft),Rt=Math.max(Rt,z.width),Qt=Math.max(Qt,ti+ft+z.height),ti+=ft+z.height):(ue.S.h(li+ft,vt/2+a.focus.y),Rt=Math.max(Rt,li+ft+z.width),Qt=Math.max(Qt,z.height),li+=ft+z.width),qe++}te=Ks(this,2),ue=Ks(this,2),y?(te[0].h(0,0),te[1].h(0,Qt),ue[0].h(Rt,0)):(te[0].h(0,0),te[1].h(Rt,0),ue[0].h(0,Qt)),ue[1].h(Rt,Qt)}else for(Ur=0;Ur<rt;Ur++){var Fo=tt[Ur],Ba=Fo.Da;if(y){0<ft&&0<qe&&li+vt+Ba.width>ft&&(li<z&&nc(a,ot,z-li,0,er,Ur-1),Cn++,qe=0,er=Ur,_t=Qt,li=0,ti=135<b?-Qt-Pt:Qt+Pt),D0(this,Fo,0,ti);var ja=0;if(qe===0)te=Fo.Yo,ue=Fo.kp,Ce=Ba.width,On=Ba.height,(te===null||ue===null||b!==tu(Fo))&&(te=Ks(this,2),ue=Ks(this,2),te[0].h(0,0),te[1].h(0,On),ue[0].h(Ce,0),ue[1].h(Ce,On));else{var vs=Ei();On=cx(this,a,Fo,te,ue,Ce,On,vs),ja=On.x,te=vs[0],ue=vs[1],Ce=On.width,On=On.height,ri(vs),li<Ba.width&&0>ja&&(Gc(a,-ja,0,er,Ur-1),B0(te,-ja,0),B0(ue,-ja,0),ja=0)}Fo.S.h(ja,ti),Rt=Math.max(Rt,Ce),Qt=Math.max(Qt,_t+(Cn===0?0:Pt)+Ba.height),li=Ce}else 0<ft&&0<qe&&ti+vt+Ba.height>ft&&(ti<z&&nc(a,ot,0,z-ti,er,Ur-1),Cn++,qe=0,er=Ur,_t=Rt,ti=0,li=135<b?-Rt-Pt:Rt+Pt),D0(this,Fo,li,0),ja=0,qe===0?(te=Fo.Yo,ue=Fo.kp,Ce=Ba.width,On=Ba.height,(te===null||ue===null||b!==tu(Fo))&&(te=Ks(this,2),ue=Ks(this,2),te[0].h(0,0),te[1].h(Ce,0),ue[0].h(0,On),ue[1].h(Ce,On))):(vs=Ei(),On=cx(this,a,Fo,te,ue,Ce,On,vs),ja=On.x,te=vs[0],ue=vs[1],Ce=On.width,On=On.height,ri(vs),ti<Ba.height&&0>ja&&(Gc(a,0,-ja,er,Ur-1),B0(te,0,-ja),B0(ue,0,-ja),ja=0)),Fo.S.h(li,ja),Qt=Math.max(Qt,On),Rt=Math.max(Rt,_t+(Cn===0?0:Pt)+Ba.width),ti=On;qe++}switch(0<Cn&&(y?(Qt+=Math.max(0,x),li<Rt&&nc(a,ot,Rt-li,0,er,rt-1),0<Et&&(st||Gc(a,Et,0,0,rt-1),Rt+=Et)):(Rt+=Math.max(0,x),ti<Qt&&nc(a,ot,0,Qt-ti,er,rt-1),0<Et&&(st||Gc(a,0,Et,0,rt-1),Qt+=Et))),Et=st=0,ot){case qf:y?st+=Rt/2-a.focus.x-yt/2:Et+=Qt/2-a.focus.y-yt/2;break;case Vc:0<Cn?y?st+=Rt/2-a.focus.x-yt/2:Et+=Qt/2-a.focus.y-yt/2:y?(Ui=tt[0].S.x+tt[0].la.x,st+=Ui+(tt[rt-1].S.x+tt[rt-1].la.x+2*tt[rt-1].focus.x-Ui)/2-a.focus.x-yt/2):(Ui=tt[0].S.y+tt[0].la.y,Et+=Ui+(tt[rt-1].S.y+tt[rt-1].la.y+2*tt[rt-1].focus.y-Ui)/2-a.focus.y-yt/2);break;case Zu:y?(st-=yt,Rt+=yt):(Et-=yt,Qt+=yt);break;case Vu:y?(st+=Rt-a.width+yt,Rt+=yt):(Et+=Qt-a.height+yt,Qt+=yt);break;case Oh:y?1<rt?st+=Ui+vt/2-a.focus.x:st+=tt[0].focus.x-a.focus.x+tt[0].la.x:1<rt?Et+=Ui+vt/2-a.focus.y:Et+=tt[0].focus.y-a.focus.y+tt[0].la.y;break;case Ih:y?st+=Rt+vt/2-a.focus.x:Et+=Qt+vt/2-a.focus.y;break;case ah:break;default:Qt=this.customAlignment(a,st,Et,Rt,Qt),st=Qt[0],Et=Qt[1],Rt=Qt[2],Qt=Qt[3]}for(yt=0;yt<rt;yt++)Ui=tt[yt],y?Ui.S.h(Ui.S.x+Ui.la.x-st,Ui.S.y+(135<b?(ut?-Qt:-Ui.Da.height)+Ui.la.y-x:Vt+x+Ui.la.y)):Ui.S.h(Ui.S.x+(135<b?(ut?-Rt:-Ui.Da.width)+Ui.la.x-x:E+x+Ui.la.x),Ui.S.y+Ui.la.y-Et);if(rt=tt=0,ut?y?(Rt=Fy(a,Rt,st),0>st&&(st=0),135<b&&(Et+=Qt+x),Qt+=Vt+x,ot===ah&&(tt+=vt/2+a.focus.x),rt+=Vt+x):(135<b&&(st+=Rt+x),Rt+=E+x,Qt=by(a,Qt,Et),0>Et&&(Et=0),ot===ah&&(rt+=vt/2+a.focus.y),tt+=E+x):y?(a.comments===null?E>Rt&&(Rt=Ny(ot,E-Rt,0),tt=Rt.x,rt=Rt.y,Rt=E,st=0):Rt=Fy(a,Rt,st),0>st&&(tt-=st,st=0),135<b&&(Et+=Qt+x),Qt=Math.max(Math.max(Qt,Vt),Qt+Vt+x),rt+=Vt+x):(135<b&&(st+=Rt+x),Rt=Math.max(Math.max(Rt,E),Rt+E+x),a.comments===null?Vt>Qt&&(Qt=Ny(ot,0,Vt-Qt),tt=Qt.x,rt=Qt.y,Qt=Vt,Et=0):Qt=by(a,Qt,Et),0>Et&&(rt-=Et,Et=0),tt+=E+x),0<Cn)b=Ks(this,4),Cn=Ks(this,4),y?(b[2].h(0,Vt+x),b[3].h(b[2].x,Qt),Cn[2].h(Rt,b[2].y),Cn[3].h(Cn[2].x,b[3].y)):(b[2].h(E+x,0),b[3].h(Rt,b[2].y),Cn[2].h(b[2].x,Qt),Cn[3].h(b[3].x,Cn[2].y));else{for(b=Ks(this,te.length+2),Cn=Ks(this,ue.length+2),ot=0;ot<te.length;ot++)ut=te[ot],b[ot+2].h(ut.x+tt,ut.y+rt);for(ot=0;ot<ue.length;ot++)ut=ue[ot],Cn[ot+2].h(ut.x+tt,ut.y+rt)}y?(b[0].h(st,0),b[1].h(b[0].x,Vt),b[2].y<b[1].y&&(b[2].x>b[0].x?b[2].assign(b[1]):b[1].assign(b[2])),b[3].y<b[2].y&&(b[3].x>b[0].x?b[3].assign(b[2]):b[2].assign(b[3])),Cn[0].h(st+E,0),Cn[1].h(Cn[0].x,Vt),Cn[2].y<Cn[1].y&&(Cn[2].x<Cn[0].x?Cn[2].assign(Cn[1]):Cn[1].assign(Cn[2])),Cn[3].y<Cn[2].y&&(Cn[3].x<Cn[0].x?Cn[3].assign(Cn[2]):Cn[2].assign(Cn[3])),b[2].y-=x/2,Cn[2].y-=x/2):(b[0].h(0,Et),b[1].h(E,b[0].y),b[2].x<b[1].x&&(b[2].y>b[0].y?b[2].assign(b[1]):b[1].assign(b[2])),b[3].x<b[2].x&&(b[3].y>b[0].y?b[3].assign(b[2]):b[2].assign(b[3])),Cn[0].h(0,Et+Vt),Cn[1].h(E,Cn[0].y),Cn[2].x<Cn[1].x&&(Cn[2].y<Cn[0].y?Cn[2].assign(Cn[1]):Cn[1].assign(Cn[2])),Cn[3].x<Cn[2].x&&(Cn[3].y<Cn[0].y?Cn[3].assign(Cn[2]):Cn[2].assign(Cn[3])),b[2].x-=x/2,Cn[2].x-=x/2),uu(this,te),uu(this,ue),a.Yo=b,a.kp=Cn,a.la.h(st,Et),a.Da.h(Rt,Qt)}break;default:$t("Unhandled compaction value "+a.compaction.toString())}}};function ux(a,y){if(y.childrenCount===0){var x=!1,E=0;y.parent!==null&&(E=y.parent.angle,x=y.parent.alignment,x=xd(x));var b=Ay(y);y.S.h(0,0),y.Da.h(y.width,y.height),y.parent===null||y.comments===null||(E!==180&&E!==270||x)&&!b?y.la.h(0,0):E===180&&!x||(E===90||E===270)&&b?y.la.h(y.width-2*y.focus.x,0):y.la.h(0,y.height-2*y.focus.y)}else{E=tu(y),x=E===90||E===270;var z=0;b=y.children;for(var tt=b.length,rt=0;rt<tt;rt++){var ot=b[rt];z=Math.max(z,x?ot.Da.width:ot.Da.height)}var st=y.alignment,ut=st===Zu,ft=st===Vu;rt=xd(st);var vt=Math.max(0,y.breadthLimit);ot=a.computeLayerSpacing(y);var yt=y.nodeSpacing,Pt=a.computeNodeIndent(y),Et=ut||ft?0:Pt/2,Vt=y.rowSpacing,Rt=0;(ut||ft||y.hm||y.im&&y.maxGenerationCount===1)&&(Rt=Math.max(0,y.rowIndent)),ut=y.width;var Qt=y.height,_t=0,te=0,ue=0,Ce=0,On=0,li=0,ti=0,Cn=0,qe=0,er=0;if(rt&&!Ap(st)&&135<E&&b.reverse(),Ap(st))if(1<tt)for(var Ui=0;Ui<tt;Ui++){var Ur=b[Ui],Fo=Ur.Da;Ui%2===0&&Ui!==tt-1?qe=Math.max(qe,(x?Fo.width:Fo.height)+a.computeBusNodeSpacing(Ur)-yt):Ui%2!==0&&(er=Math.max(er,(x?Fo.width:Fo.height)+a.computeBusNodeSpacing(Ur)-yt))}else tt===1&&(qe=x?b[0].Da.width:b[0].Da.height);if(rt)switch(st){case Oh:case Ku:te=135>E?hx(a,y,b,qe,_t,te):dx(a,y,b,qe,_t,te),qe=te.x,_t=te.width,te=te.height;break;case Ih:for(vt=0;vt<tt;vt++)Et=b[vt],ue=Et.Da,er=ti===0?0:Vt,x?(Et.S.h(z-ue.width,On+er),_t=Math.max(_t,ue.width),te=Math.max(te,On+er+ue.height),On+=er+ue.height):(Et.S.h(Ce+er,z-ue.height),_t=Math.max(_t,Ce+er+ue.width),te=Math.max(te,ue.height),Ce+=er+ue.width),ti++;break;case ah:for(z=0;z<tt;z++)vt=b[z],Et=vt.Da,ue=ti===0?0:Vt,x?(vt.S.h(yt/2+y.focus.x,On+ue),_t=Math.max(_t,Et.width),te=Math.max(te,On+ue+Et.height),On+=ue+Et.height):(vt.S.h(Ce+ue,yt/2+y.focus.y),_t=Math.max(_t,Ce+ue+Et.width),te=Math.max(te,Et.height),Ce+=ue+Et.width),ti++}else for(er=0;er<tt;er++)Ui=b[er],Ur=Ui.Da,x?(0<vt&&0<ti&&Ce+yt+Ur.width>vt&&(Ce<z&&nc(y,st,z-Ce,0,Cn,er-1),li++,ti=0,Cn=er,ue=te,Ce=0,On=135<E?-te-Vt:te+Vt),Fo=ti===0?Et:yt,D0(a,Ui,0,On),Ui.S.h(Ce+Fo,On),_t=Math.max(_t,Ce+Fo+Ur.width),te=Math.max(te,ue+(li===0?0:Vt)+Ur.height),Ce+=Fo+Ur.width):(0<vt&&0<ti&&On+yt+Ur.height>vt&&(On<z&&nc(y,st,0,z-On,Cn,er-1),li++,ti=0,Cn=er,ue=_t,On=0,Ce=135<E?-_t-Vt:_t+Vt),Fo=ti===0?Et:yt,D0(a,Ui,Ce,0),Ui.S.h(Ce,On+Fo),te=Math.max(te,On+Fo+Ur.height),_t=Math.max(_t,ue+(li===0?0:Vt)+Ur.width),On+=Fo+Ur.height),ti++;switch(0<li&&(x?(te+=Math.max(0,ot),Ce<_t&&nc(y,st,_t-Ce,0,Cn,tt-1),0<Rt&&(ft||Gc(y,Rt,0,0,tt-1),_t+=Rt)):(_t+=Math.max(0,ot),On<te&&nc(y,st,0,te-On,Cn,tt-1),0<Rt&&(ft||Gc(y,0,Rt,0,tt-1),te+=Rt))),Rt=ft=0,st){case qf:x?ft+=_t/2-y.focus.x-Pt/2:Rt+=te/2-y.focus.y-Pt/2;break;case Vc:0<li?x?ft+=_t/2-y.focus.x-Pt/2:Rt+=te/2-y.focus.y-Pt/2:x?(a=b[0].S.x+b[0].la.x,ft+=a+(b[tt-1].S.x+b[tt-1].la.x+2*b[tt-1].focus.x-a)/2-y.focus.x-Pt/2):(a=b[0].S.y+b[0].la.y,Rt+=a+(b[tt-1].S.y+b[tt-1].la.y+2*b[tt-1].focus.y-a)/2-y.focus.y-Pt/2);break;case Zu:x?(ft-=Pt,_t+=Pt):(Rt-=Pt,te+=Pt);break;case Vu:x?(ft+=_t-y.width+Pt,_t+=Pt):(Rt+=te-y.height+Pt,te+=Pt);break;case Oh:case Ku:x?1<tt?ft+=qe+yt/2-y.focus.x:ft+=b[0].focus.x-y.focus.x+b[0].la.x:1<tt?Rt+=qe+yt/2-y.focus.y:Rt+=b[0].focus.y-y.focus.y+b[0].la.y;break;case Ih:x?ft+=_t+yt/2-y.focus.x:Rt+=te+yt/2-y.focus.y;break;case ah:break;default:a=a.customAlignment(y,ft,Rt,_t,te),ft=a[0],Rt=a[1],_t=a[2],te=a[3]}for(a=0;a<tt;a++)Pt=b[a],x?Pt.S.h(Pt.S.x+Pt.la.x-ft,Pt.S.y+(135<E?(rt?-te:-Pt.Da.height)+Pt.la.y-ot:Qt+ot+Pt.la.y)):Pt.S.h(Pt.S.x+(135<E?(rt?-_t:-Pt.Da.width)+Pt.la.x-ot:ut+ot+Pt.la.x),Pt.S.y+Pt.la.y-Rt);x?(_t=Fy(y,_t,ft),0>ft&&(ft=0),135<E&&(Rt+=te+ot),te=Math.max(Math.max(te,Qt),te+Qt+ot)):(135<E&&(ft+=_t+ot),_t=Math.max(Math.max(_t,ut),_t+ut+ot),te=by(y,te,Rt),0>Rt&&(Rt=0)),y.la.h(ft,Rt),y.Da.h(_t,te)}}kr.prototype.customAlignment=function(a,y,x,E,b){return[y,x,E,b]};function hx(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new ae(E,0,b,z);if(tt===1)return y=x[0],b=y.Da.width,z=y.Da.height,new ae(E,0,b,z);for(var rt=y.nodeSpacing,ot=y.rowSpacing,st=tu(y)===90,ut=0,ft=0,vt=0,yt=0;yt<tt;yt++)if(!(yt%2!==0||1<tt&&yt===tt-1)){var Pt=x[yt],Et=Pt.Da,Vt=ut===0?0:ot;if(st){var Rt=a.computeBusNodeSpacing(Pt)-rt;Pt.S.h(E-(Et.width+Rt),vt+Vt),b=Math.max(b,Et.width+Rt),z=Math.max(z,vt+Vt+Et.height),vt+=Vt+Et.height}else Rt=a.computeBusNodeSpacing(Pt)-rt,Pt.S.h(ft+Vt,E-(Et.height+Rt)),z=Math.max(z,Et.height+Rt),b=Math.max(b,ft+Vt+Et.width),ft+=Vt+Et.width;ut++}for(ut=0,Pt=ft,yt=vt,st?(ft=E+rt,vt=0):(ft=0,vt=E+rt),Et=0;Et<tt;Et++)if(Et%2!==0){Vt=x[Et],Rt=Vt.Da;var Qt=ut===0?0:ot;if(st){var _t=a.computeBusNodeSpacing(Vt)-rt;Vt.S.h(ft+_t,vt+Qt),b=Math.max(b,ft+Rt.width+_t),z=Math.max(z,vt+Qt+Rt.height),vt+=Qt+Rt.height}else _t=a.computeBusNodeSpacing(Vt)-rt,Vt.S.h(ft+Qt,vt+_t),b=Math.max(b,ft+Qt+Rt.width),z=Math.max(z,vt+Rt.height+_t),ft+=Qt+Rt.width;ut++}return 1<tt&&tt%2===1&&(x=x[tt-1],tt=x.Da,a=a.computeBusLastRowSpacing(x,st?Math.max(Math.abs(yt),Math.abs(vt)):Math.max(Math.abs(Pt),Math.abs(ft))),st?(x.S.h(E+rt/2-x.focus.x-x.la.x,z+a),st=E+rt/2-x.focus.x-x.la.x,b=Math.max(b,st+tt.width),0>st&&(b-=st),z=Math.max(z,Math.max(yt,vt)+a+tt.height),0>x.S.x&&(E=T0(y,x.S.x,!1,E,rt))):(x.S.h(b+a,E+rt/2-x.focus.y-x.la.y),b=Math.max(b,Math.max(Pt,ft)+a+tt.width),vt=E+rt/2-x.focus.y-x.la.y,z=Math.max(z,vt+tt.height),0>vt&&(z-=vt),0>x.S.y&&(E=T0(y,x.S.y,!0,E,rt)))),new ae(E,0,b,z)}function dx(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new ae(E,0,b,z);if(tt===1)return x=x[0],b=x.Da.width,z=x.Da.height,new ae(E,0,b,z);for(var rt=y.nodeSpacing,ot=y.rowSpacing,st=tu(y)===270,ut=0,ft=0,vt=0,yt=0;yt<tt;yt++)if(!(yt%2!==0||1<tt&&yt===tt-1)){var Pt=x[yt],Et=Pt.Da,Vt=ut===0?0:ot;if(st){var Rt=a.computeBusNodeSpacing(Pt)-rt;vt-=Vt+Et.height,Pt.S.h(E-(Et.width+Rt),vt),b=Math.max(b,Et.width+Rt),z=Math.max(z,Math.abs(vt))}else Rt=a.computeBusNodeSpacing(Pt)-rt,ft-=Vt+Et.width,Pt.S.h(ft,E-(Et.height+Rt)),z=Math.max(z,Et.height+Rt),b=Math.max(b,Math.abs(ft));ut++}for(ut=0,Pt=ft,yt=vt,st?(ft=E+rt,vt=0):(ft=0,vt=E+rt),Et=0;Et<tt;Et++)if(Et%2!==0){Vt=x[Et],Rt=Vt.Da;var Qt=ut===0?0:ot;if(st){var _t=a.computeBusNodeSpacing(Vt)-rt;vt-=Qt+Rt.height,Vt.S.h(ft+_t,vt),b=Math.max(b,ft+Rt.width+_t),z=Math.max(z,Math.abs(vt))}else _t=a.computeBusNodeSpacing(Vt)-rt,ft-=Qt+Rt.width,Vt.S.h(ft,vt+_t),z=Math.max(z,vt+Rt.height+_t),b=Math.max(b,Math.abs(ft));ut++}for(1<tt&&tt%2===1&&(ot=x[tt-1],ut=ot.Da,a=a.computeBusLastRowSpacing(ot,st?Math.max(Math.abs(yt),Math.abs(vt)):Math.max(Math.abs(Pt),Math.abs(ft))),st?(ot.S.h(E+rt/2-ot.focus.x-ot.la.x,-z-ut.height-a),ft=E+rt/2-ot.focus.x-ot.la.x,b=Math.max(b,ft+ut.width),0>ft&&(b-=ft),z=Math.max(z,Math.abs(Math.min(yt,vt))+a+ut.height),0>ot.S.x&&(E=T0(y,ot.S.x,!1,E,rt))):(ot.S.h(-b-ut.width-a,E+rt/2-ot.focus.y-ot.la.y),b=Math.max(b,Math.abs(Math.min(Pt,ft))+a+ut.width),vt=E+rt/2-ot.focus.y-ot.la.y,z=Math.max(z,vt+ut.height),0>vt&&(z-=vt),0>ot.S.y&&(E=T0(y,ot.S.y,!0,E,rt)))),y=0;y<tt;y++)rt=x[y],st?rt.S.h(rt.S.x,rt.S.y+z):rt.S.h(rt.S.x+b,rt.S.y);return new ae(E,0,b,z)}kr.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},kr.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function T0(a,y,x,E,b){a=a.children;for(var z=a.length,tt=0;tt<z;tt++)x?a[tt].S.h(a[tt].S.x,a[tt].S.y-y):a[tt].S.h(a[tt].S.x-y,a[tt].S.y);return y=a[z-1],Math.max(E,x?y.la.y+y.focus.y-b/2:y.la.x+y.focus.x-b/2)}function Fy(a,y,x){switch(a.alignment){case Vc:case qf:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case Zu:return a.width>y?a.width:y;case Vu:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case Oh:case Ku:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case Ih:return a.width-a.focus.x+a.nodeSpacing/2+y;case ah:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function by(a,y,x){switch(a.alignment){case Vc:case qf:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case Zu:return a.height>y?a.height:y;case Vu:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case Oh:case Ku:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case Ih:return a.height-a.focus.y+a.nodeSpacing/2+y;case ah:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Ny(a,y,x){switch(a){case qf:y/=2,x/=2;break;case Vc:y/=2,x/=2;break;case Zu:x=y=0;break;case Vu:break;default:$t("Unhandled alignment value "+a.toString())}return new Tt(y,x)}function nc(a,y,x,E,b,z){y=Ny(y,x,E),Gc(a,y.x,y.y,b,z)}function Gc(a,y,x,E,b){if(y!==0||x!==0)for(a=a.children;E<=b;E++){var z=a[E].S;z.x+=y,z.y+=x}}function D0(a,y,x,E){var b=y.parent;switch(a.ud){case Gu:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===b&&y.relativePoint.h(x,E);break;case Zc:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===b&&y.relativePoint.h(x,E);break;default:$t("Unhandled path value "+a.ud.toString())}}function B0(a,y,x){for(var E=0;E<a.length;E++){var b=a[E];b.x+=y,b.y+=x}}function cx(a,y,x,E,b,z,tt,rt){var ot=tu(y),st=ot===90||ot===270,ut=y.nodeSpacing;y=E;var ft=b;E=z;var vt=tt,yt=x.Yo,Pt=x.kp;tt=x.Da;var Et=st?Math.max(vt,tt.height):Math.max(E,tt.width);if((yt===null||ot!==tu(x))&&(yt=Ks(a,2),Pt=Ks(a,2),st?(yt[0].h(0,0),yt[1].h(0,tt.height),Pt[0].h(tt.width,0),Pt[1].h(Pt[0].x,yt[1].y)):(yt[0].h(0,0),yt[1].h(tt.width,0),Pt[0].h(0,tt.height),Pt[1].h(yt[1].x,Pt[0].y))),st){if(vt=9999999,!(ft===null||2>ft.length||yt===null||2>yt.length))for(b=x=0;x<ft.length&&b<yt.length;){z=ft[x];var Vt=yt[b];ot=Vt.x,st=Vt.y,ot+=E;var Rt=z;x+1<ft.length&&(Rt=ft[x+1]);var Qt=Vt;Vt=Qt.x,Qt=Qt.y,b+1<yt.length&&(Qt=yt[b+1],Vt=Qt.x,Qt=Qt.y,Vt+=E);var _t=vt;z.y===st?_t=ot-z.x:z.y>st&&z.y<Qt?_t=ot+(z.y-st)/(Qt-st)*(Vt-ot)-z.x:st>z.y&&st<Rt.y&&(_t=ot-(z.x+(st-z.y)/(Rt.y-z.y)*(Rt.x-z.x))),_t<vt&&(vt=_t),Rt.y<=z.y?x++:Qt<=st?b++:(Rt.y<=Qt&&x++,Qt<=Rt.y&&b++)}if(vt=E-vt,vt+=ut,x=yt,b=vt,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ut=Ks(a,y.length+x.length),E=z=ot=0;z<x.length&&x[z].y<y[0].y;)st=x[z++],ut[E++].h(st.x+b,st.y);for(;ot<y.length;)st=y[ot++],ut[E++].h(st.x,st.y);for(ot=y[y.length-1].y;z<x.length&&x[z].y<=ot;)z++;for(;z<x.length&&x[z].y>ot;)st=x[z++],ut[E++].h(st.x+b,st.y);for(x=Ks(a,E),ot=0;ot<E;ot++)x[ot].assign(ut[ot]);uu(a,ut),E=x}if(z=Pt,ot=vt,ft===null||2>ft.length||z===null||2>z.length)b=null;else{for(ut=Ks(a,ft.length+z.length),b=st=x=0;x<ft.length&&ft[x].y<z[0].y;)Rt=ft[x++],ut[b++].h(Rt.x,Rt.y);for(;st<z.length;)Rt=z[st++],ut[b++].h(Rt.x+ot,Rt.y);for(z=z[z.length-1].y;x<ft.length&&ft[x].y<=z;)x++;for(;x<ft.length&&ft[x].y>z;)ot=ft[x++],ut[b++].h(ot.x,ot.y);for(z=Ks(a,b),x=0;x<b;x++)z[x].assign(ut[x]);uu(a,ut),b=z}return z=Math.max(0,vt)+tt.width,tt=Et,uu(a,y),uu(a,yt),uu(a,ft),uu(a,Pt),rt[0]=E,rt[1]=b,new ae(vt,0,z,tt)}if(E=9999999,!(ft===null||2>ft.length||yt===null||2>yt.length))for(b=x=0;x<ft.length&&b<yt.length;)z=ft[x],Vt=yt[b],ot=Vt.x,st=Vt.y,st+=vt,Rt=z,x+1<ft.length&&(Rt=ft[x+1]),Qt=Vt,Vt=Qt.x,Qt=Qt.y,b+1<yt.length&&(Qt=yt[b+1],Vt=Qt.x,Qt=Qt.y,Qt+=vt),_t=E,z.x===ot?_t=st-z.y:z.x>ot&&z.x<Vt?_t=st+(z.x-ot)/(Vt-ot)*(Qt-st)-z.y:ot>z.x&&ot<Rt.x&&(_t=st-(z.y+(ot-z.x)/(Rt.x-z.x)*(Rt.y-z.y))),_t<E&&(E=_t),Rt.x<=z.x?x++:Vt<=ot?b++:(Rt.x<=Vt&&x++,Vt<=Rt.x&&b++);if(vt-=E,vt+=ut,x=yt,b=vt,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ut=Ks(a,y.length+x.length),E=z=ot=0;z<x.length&&x[z].x<y[0].x;)st=x[z++],ut[E++].h(st.x,st.y+b);for(;ot<y.length;)st=y[ot++],ut[E++].h(st.x,st.y);for(ot=y[y.length-1].x;z<x.length&&x[z].x<=ot;)z++;for(;z<x.length&&x[z].x>ot;)st=x[z++],ut[E++].h(st.x,st.y+b);for(x=Ks(a,E),ot=0;ot<E;ot++)x[ot].assign(ut[ot]);uu(a,ut),E=x}if(z=Pt,ot=vt,ft===null||2>ft.length||z===null||2>z.length)b=null;else{for(ut=Ks(a,ft.length+z.length),b=st=x=0;x<ft.length&&ft[x].x<z[0].x;)Rt=ft[x++],ut[b++].h(Rt.x,Rt.y);for(;st<z.length;)Rt=z[st++],ut[b++].h(Rt.x,Rt.y+ot);for(z=z[z.length-1].x;x<ft.length&&ft[x].x<=z;)x++;for(;x<ft.length&&ft[x].x>z;)ot=ft[x++],ut[b++].h(ot.x,ot.y);for(z=Ks(a,b),x=0;x<b;x++)z[x].assign(ut[x]);uu(a,ut),b=z}return z=Et,tt=Math.max(0,vt)+tt.height,uu(a,y),uu(a,yt),uu(a,ft),uu(a,Pt),rt[0]=E,rt[1]=b,new ae(vt,0,z,tt)}function Ks(a,y){if(a=a.ru[y],a!==void 0&&(a=a.pop(),a!==void 0))return a;a=[];for(var x=0;x<y;x++)a[x]=new Tt;return a}function uu(a,y){var x=y.length,E=a.ru[x];E===void 0&&(E=[],a.ru[x]=E),E.push(y)}kr.prototype.arrangeTrees=function(){if(this.Rb===j0)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof jl){var x=y.node;if(x!==null){var E=x.position;x=E.x,E=E.y,isFinite(x)||(x=0),isFinite(E)||(E=0),Ty(this,y,x,E)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof jl&&a.push(x);switch(this.sorting){case _f:break;case Fp:a.reverse();break;case bp:a.sort(this.comparer);break;case Np:a.sort(this.comparer),a.reverse();break;default:$t("Unhandled sorting value "+this.sorting.toString())}for(x=this.arrangementOrigin,y=x.x,x=x.y,E=0;E<a.length;E++){var b=a[E];switch(Ty(this,b,y+b.la.x,x+b.la.y),this.Rb){case z0:x+=b.Da.height+this.$d.height;break;case Iy:y+=b.Da.width+this.$d.width;break;default:$t("Unhandled arrangement value "+this.Rb.toString())}}}};function Ty(a,y,x,E){if(y!==null){y.x=x,y.y=E,y=y.children;for(var b=y.length,z=0;z<b;z++){var tt=y[z];Ty(a,tt,x+tt.S.x,E+tt.S.y)}}}kr.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},kr.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},kr.prototype.Gu=function(){if(this.layerStyle===W0){for(var a=this.$v,y=[],x=null,E=this.network.vertexes.iterator;E.next();){var b=E.value;x===null?x=b.bounds.copy():x.ed(b.bounds);var z=y[b.level];z===void 0?z=this.computeLayerSpacing(b):z=Math.max(z,this.computeLayerSpacing(b)),y[b.level]=z}for(E=0;E<y.length;E++)y[E]===void 0&&(y[E]=0);if(this.angle===90||this.angle===270?(x.Bc(this.nodeSpacing/2,this.layerSpacing),E=new Tt(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),E=new Tt(-this.layerSpacing/2,-this.nodeSpacing/2)),b=[],x=this.angle===90||this.angle===270?x.width:x.height,z=0,this.angle===180||this.angle===270)for(var tt=0;tt<a.length;tt++)z+=a[tt]+y[tt];for(tt=0;tt<a.length;tt++){var rt=a[tt]+y[tt];this.angle===270?(z-=rt,b.push(new ae(0,z,x,rt))):this.angle===90?(b.push(new ae(0,z,x,rt)),z+=rt):this.angle===180?(z-=rt,b.push(new ae(z,0,rt,x))):(b.push(new ae(z,0,rt,x)),z+=rt)}this.commitLayers(b,E)}},kr.prototype.commitLayers=function(){},kr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},kr.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof jl&&fx(this,y)}};function fx(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,E=0;E<x;E++)fx(a,y[E])}}kr.prototype.setPortSpots=function(a){var y=a.alignment;if(xd(y)){var x=this.ud===Gu,E=tu(a);switch(E){case 0:var b=eo;break;case 90:b=Uo;break;case 180:b=lo;break;default:b=Co}var z=a.children,tt=z.length;switch(y){case Oh:case Ku:for(y=0;y<tt;y++){var rt=z[y];if(rt=(x?rt.sourceEdges:rt.destinationEdges).first(),rt!==null&&(rt=rt.link,rt!==null)){var ot=E===90||E===270?lo:Co;if(tt===1||y===tt-1&&tt%2===1)switch(E){case 0:ot=lo;break;case 90:ot=Co;break;case 180:ot=eo;break;default:ot=Uo}else y%2===0&&(ot=E===90||E===270?eo:Uo);x?(a.setsPortSpot&&(rt.fromSpot=b),a.setsChildPortSpot&&(rt.toSpot=ot)):(a.setsPortSpot&&(rt.fromSpot=ot),a.setsChildPortSpot&&(rt.toSpot=b))}}break;case Ih:for(E=E===90||E===270?eo:Uo,z=x?a.destinationEdges:a.sourceEdges;z.next();)tt=z.value.link,tt!==null&&(x?(a.setsPortSpot&&(tt.fromSpot=b),a.setsChildPortSpot&&(tt.toSpot=E)):(a.setsPortSpot&&(tt.fromSpot=E),a.setsChildPortSpot&&(tt.toSpot=b)));break;case ah:for(E=E===90||E===270?lo:Co,z=x?a.destinationEdges:a.sourceEdges;z.next();)tt=z.value.link,tt!==null&&(x?(a.setsPortSpot&&(tt.fromSpot=b),a.setsChildPortSpot&&(tt.toSpot=E)):(a.setsPortSpot&&(tt.fromSpot=E),a.setsChildPortSpot&&(tt.toSpot=b)))}}else if(x=tu(a),this.ud===Gu){for(b=a.destinationEdges;b.next();)if(E=b.value.link,E!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:E.fromSpot=eo;break;case 90:E.fromSpot=Uo;break;case 180:E.fromSpot=lo;break;default:E.fromSpot=Co}else E.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.toSpot=lo;break;case 90:E.toSpot=Co;break;case 180:E.toSpot=eo;break;default:E.toSpot=Uo}else E.toSpot=a.childPortSpot}}else for(b=a.sourceEdges;b.next();)if(E=b.value.link,E!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:E.toSpot=eo;break;case 90:E.toSpot=Uo;break;case 180:E.toSpot=lo;break;default:E.toSpot=Co}else E.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.fromSpot=lo;break;case 90:E.fromSpot=Co;break;case 180:E.fromSpot=eo;break;default:E.fromSpot=Uo}else E.fromSpot=a.childPortSpot}};function tu(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}kr.prototype.computeLayerSpacing=function(a){var y=tu(a);y=y===90||y===270;var x=a.layerSpacing;if(0<a.layerSpacingParentOverlap){var E=Math.min(1,a.layerSpacingParentOverlap);x-=y?a.height*E:a.width*E}return x<(y?-a.height:-a.width)&&(x=y?-a.height:-a.width),x},kr.prototype.computeNodeIndent=function(a){var y=tu(a),x=a.nodeIndent;if(0<a.nodeIndentPastParent){var E=Math.min(1,a.nodeIndentPastParent);x+=y===90||y===270?a.width*E:a.height*E}return x=Math.max(0,x)},Me.Object.defineProperties(kr.prototype,{roots:{get:function(){return this.Ub},set:function(a){this.Ub!==a&&(this.Ub=a,this.C())}},path:{get:function(){return this.Wn},set:function(a){this.Wn!==a&&(this.Wn=a,this.C())}},treeStyle:{get:function(){return this.vo},set:function(a){this.Rb===a||a!==R0&&a!==By&&a!==Dy&&a!==Oy||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==Ry&&a!==zy&&a!==W0||(this.Bq=a,this.C())}},comments:{get:function(){return this.td},set:function(a){this.td!==a&&(this.td=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==z0&&a!==Iy&&a!==j0||(this.Rb=a,this.C())}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},rootDefaults:{get:function(){return this.W},set:function(a){this.W!==a&&(this.W=a,this.C())}},alternateDefaults:{get:function(){return this.Y},set:function(a){this.Y!==a&&(this.Y=a,this.C())}},sorting:{get:function(){return this.W.sorting},set:function(a){this.W.sorting===a||a!==_f&&a!==Fp&&a!==bp&&!Np||(this.W.sorting=a,this.C())}},comparer:{get:function(){return this.W.comparer},set:function(a){this.W.comparer!==a&&(this.W.comparer=a,this.C())}},angle:{get:function(){return this.W.angle},set:function(a){this.W.angle!==a&&(a===0||a===90||a===180||a===270?(this.W.angle=a,this.C()):$t("TreeLayout.angle must be 0, 90, 180, or 270"))}},alignment:{get:function(){return this.W.alignment},set:function(a){this.W.alignment!==a&&(this.W.alignment=a,this.C())}},nodeIndent:{get:function(){return this.W.nodeIndent},set:function(a){this.W.nodeIndent!==a&&0<=a&&(this.W.nodeIndent=a,this.C())}},nodeIndentPastParent:{get:function(){return this.W.nodeIndentPastParent},set:function(a){this.W.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.W.nodeIndentPastParent=a,this.C())}},nodeSpacing:{get:function(){return this.W.nodeSpacing},set:function(a){this.W.nodeSpacing!==a&&(this.W.nodeSpacing=a,this.C())}},layerSpacing:{get:function(){return this.W.layerSpacing},set:function(a){this.W.layerSpacing!==a&&(this.W.layerSpacing=a,this.C())}},layerSpacingParentOverlap:{get:function(){return this.W.layerSpacingParentOverlap},set:function(a){this.W.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.W.layerSpacingParentOverlap=a,this.C())}},compaction:{get:function(){return this.W.compaction},set:function(a){this.W.compaction===a||a!==I0&&a!==Tp||(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!==_f&&a!==Fp&&a!==bp&&!Np||(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!==I0&&a!==Tp||(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 O0=new Ve(kr,"PathDefault",-1),Gu=new Ve(kr,"PathDestination",0),Zc=new Ve(kr,"PathSource",1),_f=new Ve(kr,"SortingForwards",10),Fp=new Ve(kr,"SortingReverse",11),bp=new Ve(kr,"SortingAscending",12),Np=new Ve(kr,"SortingDescending",13),qf=new Ve(kr,"AlignmentCenterSubtrees",20),Vc=new Ve(kr,"AlignmentCenterChildren",21),Zu=new Ve(kr,"AlignmentStart",22),Vu=new Ve(kr,"AlignmentEnd",23),Oh=new Ve(kr,"AlignmentBus",24),Ku=new Ve(kr,"AlignmentBusBranching",25),Ih=new Ve(kr,"AlignmentTopLeftBus",26),ah=new Ve(kr,"AlignmentBottomRightBus",27),I0=new Ve(kr,"CompactionNone",30),Tp=new Ve(kr,"CompactionBlock",31),R0=new Ve(kr,"StyleLayered",40),Dy=new Ve(kr,"StyleLastParents",41),By=new Ve(kr,"StyleAlternating",42),Oy=new Ve(kr,"StyleRootOnly",43),z0=new Ve(kr,"ArrangementVertical",50),Iy=new Ve(kr,"ArrangementHorizontal",51),j0=new Ve(kr,"ArrangementFixedRoots",52),Ry=new Ve(kr,"LayerIndividual",60),zy=new Ve(kr,"LayerSiblings",61),W0=new Ve(kr,"LayerUniform",62);kr.className="TreeLayout",kr.PathDefault=O0,kr.PathDestination=Gu,kr.PathSource=Zc,kr.SortingForwards=_f,kr.SortingReverse=Fp,kr.SortingAscending=bp,kr.SortingDescending=Np,kr.AlignmentCenterSubtrees=qf,kr.AlignmentCenterChildren=Vc,kr.AlignmentStart=Zu,kr.AlignmentEnd=Vu,kr.AlignmentBus=Oh,kr.AlignmentBusBranching=Ku,kr.AlignmentTopLeftBus=Ih,kr.AlignmentBottomRightBus=ah,kr.CompactionNone=I0,kr.CompactionBlock=Tp,kr.StyleLayered=R0,kr.StyleLastParents=Dy,kr.StyleAlternating=By,kr.StyleRootOnly=Oy,kr.ArrangementVertical=z0,kr.ArrangementHorizontal=Iy,kr.ArrangementFixedRoots=j0,kr.LayerIndividual=Ry,kr.LayerSiblings=zy,kr.LayerUniform=W0;function Kc(a){To.call(this,a)}Oe(Kc,To),Kc.prototype.createVertex=function(){return new jl(this)},Kc.prototype.createEdge=function(){return new $f(this)},Kc.className="TreeNetwork";function jl(a){ba.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 Tt(0,0),this.Da=new Ut(0,0),this.la=new Tt(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=_f,this.hd=ry,this.Kb=0,this.Jb=Vc,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Tp,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=xo,this.wr=!0,this.Dp=xo}Oe(jl,ba),jl.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)},Me.Object.defineProperties(jl.prototype,{initialized:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}},parent:{get:function(){return this.hb},set:function(a){this.hb!==a&&(this.hb=a)}},children:{get:function(){return this.u},set:function(a){if(this.u!==a){if(a!==null)for(var y=a.length,x=0;x<y;x++);this.u=a}}},level:{get:function(){return this.ia},set:function(a){this.ia!==a&&(this.ia=a)}},descendantCount:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}},maxChildrenCount:{get:function(){return this.Ha},set:function(a){this.Ha!==a&&(this.Ha=a)}},maxGenerationCount:{get:function(){return this.nb},set:function(a){this.nb!==a&&(this.nb=a)}},comments:{get:function(){return this.td},set:function(a){if(this.td!==a){if(a!==null)for(var y=a.length,x=0;x<y;x++);this.td=a}}},sorting:{get:function(){return this.nd},set:function(a){this.nd!==a&&(this.nd=a)}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a)}},angle:{get:function(){return this.Kb},set:function(a){this.Kb!==a&&(this.Kb=a)}},alignment:{get:function(){return this.Jb},set:function(a){this.Jb!==a&&(this.Jb=a)}},nodeIndent:{get:function(){return this.Uq},set:function(a){this.Uq!==a&&(this.Uq=a)}},nodeIndentPastParent:{get:function(){return this.Vq},set:function(a){this.Vq!==a&&(this.Vq=a)}},nodeSpacing:{get:function(){return this.Wq},set:function(a){this.Wq!==a&&(this.Wq=a)}},layerSpacing:{get:function(){return this.ie},set:function(a){this.ie!==a&&(this.ie=a)}},layerSpacingParentOverlap:{get:function(){return this.Aq},set:function(a){this.Aq!==a&&(this.Aq=a)}},compaction:{get:function(){return this.Hp},set:function(a){this.Hp!==a&&(this.Hp=a)}},breadthLimit:{get:function(){return this.Ap},set:function(a){this.Ap!==a&&(this.Ap=a)}},rowSpacing:{get:function(){return this.nr},set:function(a){this.nr!==a&&(this.nr=a)}},rowIndent:{get:function(){return this.mr},set:function(a){this.mr!==a&&(this.mr=a)}},commentSpacing:{get:function(){return this.Gp},set:function(a){this.Gp!==a&&(this.Gp=a)}},commentMargin:{get:function(){return this.Fp},set:function(a){this.Fp!==a&&(this.Fp=a)}},setsPortSpot:{get:function(){return this.xr},set:function(a){this.xr!==a&&(this.xr=a)}},portSpot:{get:function(){return this.dr},set:function(a){this.dr.D(a)||(this.dr=a)}},setsChildPortSpot:{get:function(){return this.wr},set:function(a){this.wr!==a&&(this.wr=a)}},childPortSpot:{get:function(){return this.Dp},set:function(a){this.Dp.D(a)||(this.Dp=a)}},childrenCount:{get:function(){return this.children.length}},relativePosition:{get:function(){return this.S},set:function(a){this.S.set(a)}},subtreeSize:{get:function(){return this.Da},set:function(a){this.Da.set(a)}},subtreeOffset:{get:function(){return this.la},set:function(a){this.la.set(a)}}}),jl.className="TreeVertex";function $f(a){tl.call(this,a),this.$t=new Tt(0,0)}Oe($f,tl),$f.prototype.commit=function(){var a=this.link;if(a!==null&&!a.isAvoiding){var y=this.network.layout,x=null,E=null;switch(y.ud){case Gu:x=this.fromVertex,E=this.toVertex;break;case Zc:x=this.toVertex,E=this.fromVertex;break;default:$t("Unhandled path value "+y.ud.toString())}if(x!==null&&E!==null){var b=this.$t;if(b.x!==0||b.y!==0||x.qA){E=x.bounds;var z=tu(x),tt=y.computeLayerSpacing(x),rt=x.rowSpacing;a.vg();var ot=a.curve===hl,st=a.isOrthogonal,ut;if(a.uh(),st||ot){for(ut=2;4<a.pointsCount;)a.pv(2);var ft=a.i(1),vt=a.i(2)}else{for(ut=1;3<a.pointsCount;)a.pv(1);ft=a.i(0),vt=a.i(a.pointsCount-1)}var yt=a.i(a.pointsCount-1);z===0?(x.alignment===Vu?(z=E.bottom+b.y,b.y===0&&ft.y>yt.y+x.rowIndent&&(z=Math.min(z,Math.max(ft.y,z-y.computeNodeIndent(x))))):x.alignment===Zu?(z=E.top+b.y,b.y===0&&ft.y<yt.y-x.rowIndent&&(z=Math.max(z,Math.min(ft.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.top-x.la.y+b.y:E.y+E.height/2+b.y,ot?(a.m(ut,ft.x,z),ut++,a.m(ut,E.right+tt,z),ut++,a.m(ut,E.right+tt+(b.x-rt)/3,z),ut++,a.m(ut,E.right+tt+2*(b.x-rt)/3,z),ut++,a.m(ut,E.right+tt+(b.x-rt),z),ut++,a.m(ut,vt.x,z)):(st&&(a.m(ut,E.right+tt/2,ft.y),ut++),a.m(ut,E.right+tt/2,z),ut++,a.m(ut,E.right+tt+b.x-(st?rt/2:rt),z),ut++,st&&a.m(ut,a.i(ut-1).x,vt.y))):z===90?(x.alignment===Vu?(z=E.right+b.x,b.x===0&&ft.x>yt.x+x.rowIndent&&(z=Math.min(z,Math.max(ft.x,z-y.computeNodeIndent(x))))):x.alignment===Zu?(z=E.left+b.x,b.x===0&&ft.x<yt.x-x.rowIndent&&(z=Math.max(z,Math.min(ft.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.left-x.la.x+b.x:E.x+E.width/2+b.x,ot?(a.m(ut,z,ft.y),ut++,a.m(ut,z,E.bottom+tt),ut++,a.m(ut,z,E.bottom+tt+(b.y-rt)/3),ut++,a.m(ut,z,E.bottom+tt+2*(b.y-rt)/3),ut++,a.m(ut,z,E.bottom+tt+(b.y-rt)),ut++,a.m(ut,z,vt.y)):(st&&(a.m(ut,ft.x,E.bottom+tt/2),ut++),a.m(ut,z,E.bottom+tt/2),ut++,a.m(ut,z,E.bottom+tt+b.y-(st?rt/2:rt)),ut++,st&&a.m(ut,vt.x,a.i(ut-1).y))):z===180?(x.alignment===Vu?(z=E.bottom+b.y,b.y===0&&ft.y>yt.y+x.rowIndent&&(z=Math.min(z,Math.max(ft.y,z-y.computeNodeIndent(x))))):x.alignment===Zu?(z=E.top+b.y,b.y===0&&ft.y<yt.y-x.rowIndent&&(z=Math.max(z,Math.min(ft.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.top-x.la.y+b.y:E.y+E.height/2+b.y,ot?(a.m(ut,ft.x,z),ut++,a.m(ut,E.left-tt,z),ut++,a.m(ut,E.left-tt+(b.x+rt)/3,z),ut++,a.m(ut,E.left-tt+2*(b.x+rt)/3,z),ut++,a.m(ut,E.left-tt+(b.x+rt),z),ut++,a.m(ut,vt.x,z)):(st&&(a.m(ut,E.left-tt/2,ft.y),ut++),a.m(ut,E.left-tt/2,z),ut++,a.m(ut,E.left-tt+b.x+(st?rt/2:rt),z),ut++,st&&a.m(ut,a.i(ut-1).x,vt.y))):z===270?(x.alignment===Vu?(z=E.right+b.x,b.x===0&&ft.x>yt.x+x.rowIndent&&(z=Math.min(z,Math.max(ft.x,z-y.computeNodeIndent(x))))):x.alignment===Zu?(z=E.left+b.x,b.x===0&&ft.x<yt.x-x.rowIndent&&(z=Math.max(z,Math.min(ft.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.left-x.la.x+b.x:E.x+E.width/2+b.x,ot?(a.m(ut,z,ft.y),ut++,a.m(ut,z,E.top-tt),ut++,a.m(ut,z,E.top-tt+(b.y+rt)/3),ut++,a.m(ut,z,E.top-tt+2*(b.y+rt)/3),ut++,a.m(ut,z,E.top-tt+(b.y+rt)),ut++,a.m(ut,z,vt.y)):(st&&(a.m(ut,ft.x,E.top-tt/2),ut++),a.m(ut,z,E.top-tt/2),ut++,a.m(ut,z,E.top-tt+b.y+(st?rt/2:rt)),ut++,st&&a.m(ut,vt.x,a.i(ut-1).y))):$t("Invalid angle "+z),a.zf()}else b=E,a=this.link,E=this.network.layout,y=tu(x),y!==tu(b)&&(tt=E.computeLayerSpacing(x),rt=x.bounds,x=b.bounds,y===0&&x.left-rt.right<tt+1||y===90&&x.top-rt.bottom<tt+1||y===180&&rt.left-x.right<tt+1||y===270&&rt.top-x.bottom<tt+1||(a.vg(),x=a.curve===hl,b=a.isOrthogonal,E=xd(this.fromVertex.alignment),a.uh(),y===0?(y=rt.right+tt/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y-20,a.i(1).y),a.m(2,y-20,x),a.m(3,y,x),a.m(4,y+20,x),a.L(5,a.i(5).x,x)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===90?(y=rt.bottom+tt/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y-20),a.m(2,x,y-20),a.m(3,x,y),a.m(4,x,y+20),a.L(5,x,a.i(5).y)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)):y===180?(y=rt.left-tt/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y+20,a.i(1).y),a.m(2,y+20,x),a.m(3,y,x),a.m(4,y-20,x),a.L(5,a.i(5).x,x)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===270&&(y=rt.top-tt/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y+20),a.m(2,x,y+20),a.m(3,x,y),a.m(4,x,y-20),a.L(5,x,a.i(5).y)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)),a.zf()))}}},Me.Object.defineProperties($f.prototype,{fromVertex:{get:function(){return this.kd},set:function(a){this.kd!==a&&(this.kd=a)}},toVertex:{get:function(){return this.qd},set:function(a){this.qd!==a&&(this.qd=a)}},relativePoint:{get:function(){return this.$t},set:function(a){this.$t.set(a)}}}),$f.className="TreeEdge",uo.prototype.initializeStandardTools=function(){this.gb("Action",new Tl,this.mouseDownTools),this.gb("Relinking",new ol,this.mouseDownTools),this.gb("LinkReshaping",new va,this.mouseDownTools),this.gb("Rotating",new xs,this.mouseDownTools),this.gb("Resizing",new as,this.mouseDownTools),this.gb("Linking",new hs,this.mouseMoveTools),this.gb("Dragging",new Ho,this.mouseMoveTools),this.gb("DragSelecting",new vl,this.mouseMoveTools),this.gb("Panning",new ns,this.mouseMoveTools),this.gb("ContextMenu",new Ps,this.mouseUpTools),this.gb("TextEditing",new Go,this.mouseUpTools),this.gb("ClickCreating",new mh,this.mouseUpTools),this.gb("ClickSelecting",new Uh,this.mouseUpTools)},Lu("Horizontal",new pm),Lu("Spot",new vm),Lu("Table",new Sm),Lu("Viewbox",new wm),Lu("TableRow",new xm),Lu("TableColumn",new Pm),Lu("Graduated",new Xg),Lu("Grid",new Ug),wf.add("GraphLinksModel",za),wf.add("TreeModel",kl);var H0=Dn.go,jy={get licenseKey(){return ke.licenseKey},set licenseKey(a){ke.licenseKey=a},get version(){return ke.version},Group:ir,EnumValue:Ve,List:dn,Set:cn,Map:be,Point:Tt,Size:Ut,Rect:ae,Margin:ii,Spot:Xe,Geometry:ln,PathFigure:aa,PathSegment:Mr,InputEvent:Ta,DiagramEvent:Fl,ChangedEvent:Io,Model:yi,GraphLinksModel:Ir,TreeModel:Fs,Binding:Sa,Transaction:ga,UndoManager:Vo,CommandHandler:Zt,Tool:Br,DraggingTool:Ho,DraggingInfo:th,DraggingOptions:at,LinkingBaseTool:Gr,LinkingTool:hs,RelinkingTool:ol,LinkReshapingTool:va,ResizingTool:as,RotatingTool:xs,ClickSelectingTool:Uh,ActionTool:Tl,ClickCreatingTool:mh,HTMLInfo:Su,ContextMenuTool:Ps,DragSelectingTool:vl,PanningTool:ns,TextEditingTool:Go,ToolManager:uo,Animation:is,AnimationManager:_s,AnimationTrigger:Yl,Layer:Ga,Diagram:ke,Palette:dt,Overview:pt,Brush:ro,GraphObject:de,Panel:mn,RowColumnDefinition:Ea,Shape:dr,TextBlock:No,Picture:Rs,Part:Fi,Adornment:Zr,Node:Hn,Link:Ln,Placeholder:ks,Layout:_o,LayoutNetwork:To,LayoutVertex:ba,LayoutEdge:tl,GridLayout:Ua,PanelLayout:Fa,CircularLayout:na,CircularNetwork:Xf,CircularVertex:wp,CircularEdge:P0,ForceDirectedLayout:os,ForceDirectedNetwork:Hc,ForceDirectedVertex:Cp,ForceDirectedEdge:Lp,LayeredDigraphLayout:ao,LayeredDigraphNetwork:Qf,LayeredDigraphVertex:El,LayeredDigraphEdge:Ep,TreeLayout:kr,TreeNetwork:Kc,TreeVertex:jl,TreeEdge:$f};typeof H0=="object"&&H0.version&&Bi("WARNING: a `go` object on the root object is already defined. "+("Debug"in H0?"debug ":"")+"version: "+H0.version+", replaced with version: "+jy.version),ke.prototype.go=jy,Dn.go=jy,typeof zn.exports=="object"&&(zn.exports=typeof Ot.g!="undefined"?Ot.g.go:self.go)}();var Dt=typeof Ot.g!="undefined"?Ot.g.go:self.go;const ee=typeof Ot.g!="undefined"?Ot.g.go:self.go,Pe=ee.Group,xe=ee.EnumValue,Se=ee.List,Wt=ee.Set,se=ee.Map,ze=ee.Point,ye=ee.Size,Nt=ee.Rect,We=ee.Margin,ie=ee.Spot,Ne=ee.Geometry,bt=ee.PathFigure,nt=ee.PathSegment,et=ee.InputEvent,ct=ee.DiagramEvent,lt=ee.ChangedEvent,gt=ee.Model,mt=ee.GraphLinksModel,St=ee.TreeModel,Mt=ee.Binding,zt=ee.Transaction,Ht=ee.UndoManager,qt=ee.CommandHandler,jt=ee.Tool,Jt=ee.DraggingTool,ge=ee.DraggingInfo,he=ee.LinkingBaseTool,Fe=ee.LinkingTool,Re=ee.RelinkingTool,Ke=ee.LinkReshapingTool,Mn=ee.ResizingTool,tn=ee.RotatingTool,rn=ee.ClickSelectingTool,nn=ee.ActionTool,me=ee.ClickCreatingTool,Xt=ee.HTMLInfo,Ue=ee.ContextMenuTool,Pn=ee.DragSelectingTool,Yn=ee.PanningTool,Be=ee.TextEditingTool,vn=ee.ToolManager,Je=ee.Animation,An=ee.AnimationManager,we=ee.AnimationTrigger,sn=ee.Layer,ce=ee.Diagram,Nn=ee.Palette,Ci=ee.Overview,It=ee.Brush,wt=ee.GraphObject,xt=ee.Panel,Ft=ee.RowColumnDefinition,Gt=ee.Shape,kt=ee.TextBlock,Yt=ee.TextBlockMetrics,pe=ee.Picture,Le=ee.Part,on=ee.Adornment,ve=ee.Node,Ae=ee.Link,Ee=ee.Placeholder,Ge=ee.Layout,kn=ee.LayoutNetwork,In=ee.LayoutVertex,gn=ee.LayoutEdge,ai=ee.GridLayout,xi=ee.PanelLayout,Gn=ee.CircularLayout,Si=ee.CircularNetwork,_n=ee.CircularVertex,Ti=ee.CircularEdge,Di=ee.ForceDirectedLayout,$i=ee.ForceDirectedNetwork,Kr=ee.ForceDirectedVertex,Xi=ee.ForceDirectedEdge,zr=ee.LayeredDigraphLayout,so=ee.LayeredDigraphNetwork,po=ee.LayeredDigraphVertex,Jr=ee.LayeredDigraphEdge,Do=ee.TreeLayout,Bo=ee.TreeNetwork,Ko=ee.TreeVertex,bo=ee.TreeEdge,ko=ee.version},2859:function(zn,oi,Ot){"use strict";Ot.d(oi,{hP:function(){return Ci}});var Dt=function(It,wt){return(Dt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(xt,Ft){xt.__proto__=Ft}||function(xt,Ft){for(var Gt in Ft)Object.prototype.hasOwnProperty.call(Ft,Gt)&&(xt[Gt]=Ft[Gt])})(It,wt)};function ee(It,wt){function xt(){this.constructor=It}Dt(It,wt),It.prototype=wt===null?Object.create(wt):(xt.prototype=wt.prototype,new xt)}function Pe(It,wt,xt,Ft){return new(xt||(xt=Promise))(function(Gt,kt){function Yt(on){try{Le(Ft.next(on))}catch(ve){kt(ve)}}function pe(on){try{Le(Ft.throw(on))}catch(ve){kt(ve)}}function Le(on){var ve;on.done?Gt(on.value):(ve=on.value,ve instanceof xt?ve:new xt(function(Ae){Ae(ve)})).then(Yt,pe)}Le((Ft=Ft.apply(It,wt||[])).next())})}function xe(It,wt){var xt,Ft,Gt,kt,Yt={label:0,sent:function(){if(1&Gt[0])throw Gt[1];return Gt[1]},trys:[],ops:[]};return kt={next:pe(0),throw:pe(1),return:pe(2)},typeof Symbol=="function"&&(kt[Symbol.iterator]=function(){return this}),kt;function pe(Le){return function(on){return function(ve){if(xt)throw new TypeError("Generator is already executing.");for(;Yt;)try{if(xt=1,Ft&&(Gt=2&ve[0]?Ft.return:ve[0]?Ft.throw||((Gt=Ft.return)&&Gt.call(Ft),0):Ft.next)&&!(Gt=Gt.call(Ft,ve[1])).done)return Gt;switch(Ft=0,Gt&&(ve=[2&ve[0],Gt.value]),ve[0]){case 0:case 1:Gt=ve;break;case 4:return Yt.label++,{value:ve[1],done:!1};case 5:Yt.label++,Ft=ve[1],ve=[0];continue;case 7:ve=Yt.ops.pop(),Yt.trys.pop();continue;default:if(Gt=Yt.trys,!((Gt=Gt.length>0&&Gt[Gt.length-1])||ve[0]!==6&&ve[0]!==2)){Yt=0;continue}if(ve[0]===3&&(!Gt||ve[1]>Gt[0]&&ve[1]<Gt[3])){Yt.label=ve[1];break}if(ve[0]===6&&Yt.label<Gt[1]){Yt.label=Gt[1],Gt=ve;break}if(Gt&&Yt.label<Gt[2]){Yt.label=Gt[2],Yt.ops.push(ve);break}Gt[2]&&Yt.ops.pop(),Yt.trys.pop();continue}ve=wt.call(It,Yt)}catch(Ae){ve=[6,Ae],Ft=0}finally{xt=Gt=0}if(5&ve[0])throw ve[1];return{value:ve[0]?ve[1]:void 0,done:!0}}([Le,on])}}}function Se(){for(var It=0,wt=0,xt=arguments.length;wt<xt;wt++)It+=arguments[wt].length;var Ft=Array(It),Gt=0;for(wt=0;wt<xt;wt++)for(var kt=arguments[wt],Yt=0,pe=kt.length;Yt<pe;Yt++,Gt++)Ft[Gt]=kt[Yt];return Ft}var Wt=function(){function It(){}return It.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},It.setAttributes=function(wt,xt){for(var Ft=0,Gt=xt;Ft<Gt.length;Ft++){var kt=Gt[Ft],Yt=kt[0],pe=kt[1];wt.setAttribute(Yt,pe)}},It.createRect=function(wt,xt,Ft){var Gt=document.createElementNS("http://www.w3.org/2000/svg","rect");return Gt.setAttribute("width",wt.toString()),Gt.setAttribute("height",xt.toString()),Ft&&It.setAttributes(Gt,Ft),Gt},It.createLine=function(wt,xt,Ft,Gt,kt){var Yt=document.createElementNS("http://www.w3.org/2000/svg","line");return Yt.setAttribute("x1",wt.toString()),Yt.setAttribute("y1",xt.toString()),Yt.setAttribute("x2",Ft.toString()),Yt.setAttribute("y2",Gt.toString()),kt&&It.setAttributes(Yt,kt),Yt},It.createPolygon=function(wt,xt){var Ft=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Ft.setAttribute("points",wt),xt&&It.setAttributes(Ft,xt),Ft},It.createCircle=function(wt,xt){var Ft=document.createElementNS("http://www.w3.org/2000/svg","circle");return Ft.setAttribute("cx",(wt/2).toString()),Ft.setAttribute("cy",(wt/2).toString()),Ft.setAttribute("r",wt.toString()),xt&&It.setAttributes(Ft,xt),Ft},It.createEllipse=function(wt,xt,Ft){var Gt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Gt.setAttribute("cx",(wt/2).toString()),Gt.setAttribute("cy",(xt/2).toString()),Gt.setAttribute("rx",(wt/2).toString()),Gt.setAttribute("ry",(xt/2).toString()),Ft&&It.setAttributes(Gt,Ft),Gt},It.createGroup=function(wt){var xt=document.createElementNS("http://www.w3.org/2000/svg","g");return wt&&It.setAttributes(xt,wt),xt},It.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},It.createMarker=function(wt,xt,Ft,Gt,kt,Yt,pe){var Le=document.createElementNS("http://www.w3.org/2000/svg","marker");return It.setAttributes(Le,[["id",wt],["orient",xt],["markerWidth",Ft.toString()],["markerHeight",Gt.toString()],["refX",kt.toString()],["refY",Yt.toString()]]),Le.appendChild(pe),Le},It.createText=function(wt){var xt=document.createElementNS("http://www.w3.org/2000/svg","text");return xt.setAttribute("x","0"),xt.setAttribute("y","0"),wt&&It.setAttributes(xt,wt),xt},It.createTSpan=function(wt,xt){var Ft=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Ft.textContent=wt,xt&&It.setAttributes(Ft,xt),Ft},It.createImage=function(wt){var xt=document.createElementNS("http://www.w3.org/2000/svg","image");return wt&&It.setAttributes(xt,wt),xt},It.createPoint=function(wt,xt){var Ft=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Ft.x=wt,Ft.y=xt,Ft},It.createPath=function(wt,xt){var Ft=document.createElementNS("http://www.w3.org/2000/svg","path");return Ft.setAttribute("d",wt),xt&&It.setAttributes(Ft,xt),Ft},It}(),se=function(){function It(){}return It.addKey=function(wt){It.key=wt},Object.defineProperty(It,"isLicensed",{get:function(){return!!It.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(It.key)},enumerable:!1,configurable:!0}),It}(),ze=function(){function It(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return It.prototype.rasterize=function(wt,xt,Ft){var Gt=this;return new Promise(function(kt){var Yt=Ft!==void 0?Ft:document.createElement("canvas");wt===null&&(Gt.markersOnly=!0,Gt.naturalSize=!1);var pe=document.createElementNS("http://www.w3.org/2000/svg","svg");pe.setAttribute("xmlns","http://www.w3.org/2000/svg"),pe.setAttribute("width",xt.width.baseVal.valueAsString),pe.setAttribute("height",xt.height.baseVal.valueAsString),pe.setAttribute("viewBox","0 0 "+xt.viewBox.baseVal.width.toString()+" "+xt.viewBox.baseVal.height.toString()),pe.innerHTML=xt.innerHTML,Gt.naturalSize===!0?(pe.width.baseVal.value=wt.naturalWidth,pe.height.baseVal.value=wt.naturalHeight):Gt.width!==void 0&&Gt.height!==void 0&&(pe.width.baseVal.value=Gt.width,pe.height.baseVal.value=Gt.height),Yt.width=pe.width.baseVal.value,Yt.height=pe.height.baseVal.value;var Le=pe.outerHTML,on=Yt.getContext("2d");Gt.markersOnly!==!0&&on.drawImage(wt,0,0,Yt.width,Yt.height);var ve=window.URL,Ae=new Image(Yt.width,Yt.height);Ae.setAttribute("crossOrigin","anonymous");var Ee=new Blob([Le],{type:"image/svg+xml"}),Ge=ve.createObjectURL(Ee);Ae.onload=function(){on.drawImage(Ae,0,0),ve.revokeObjectURL(Ge);var kn=Yt.toDataURL(Gt.imageType,Gt.imageQuality);kt(kn)},Ae.src=Ge})},It}(),ye=function(){},Nt=function(){function It(wt){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+wt+"_"}return Object.defineProperty(It.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(It.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(It.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(It.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(It.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),It.prototype.addClass=function(wt){return this.styleSheet===void 0&&this.addStyleSheet(),wt.name=""+this.classNamePrefix+wt.localName,this.classes.push(wt),this.styleSheet.sheet.insertRule("."+wt.name+" {"+wt.style+"}",this.styleSheet.sheet.cssRules.length),wt},It.prototype.addRule=function(wt){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(wt),this.styleSheet.sheet.insertRule(wt.selector+" {"+wt.style+"}",this.styleSheet.sheet.cssRules.length)},It.prototype.addStyleSheet=function(){var wt;this.styleSheet=document.createElement("style"),((wt=this.styleSheetRoot)!==null&&wt!==void 0?wt:document.head).appendChild(this.styleSheet),this.addRule(new We("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new We("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new We("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new ie("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new ie("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},It.prototype.removeStyleSheet=function(){var wt;this.styleSheet&&(((wt=this.styleSheetRoot)!==null&&wt!==void 0?wt:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},It}(),We=function(It,wt){this.selector=It,this.style=wt},ie=function(It,wt){this.localName=It,this.style=wt},Ne=function(){function It(wt,xt,Ft,Gt,kt){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=wt,this.displayMode=xt,this.markerItems=Ft,this.uiStyleSettings=Gt,this.styles=kt,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return It.prototype.show=function(wt){var xt=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=wt,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Ft=document.createElement("div");Ft.className=this.toolbarBlockStyleClass.name,Ft.style.whiteSpace="nowrap",this.uiContainer.appendChild(Ft),this.addActionButton(Ft,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(Ft,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(Ft,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(Ft,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(Ft,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(Ft,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(Ft,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(Ft,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(kt){var Yt=document.createElement("div");Yt.className=""+xt.toolbarButtonStyleClass.name,Yt.setAttribute("data-type-name",kt.typeName),Yt.innerHTML=kt.icon,Yt.addEventListener("click",function(){xt.markerToolbarButtonClicked(Yt,kt)}),xt.buttons.push(Yt),xt.markerButtons.push(Yt)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var Gt=document.createElement("div");Gt.className=this.toolbarBlockStyleClass.name,Gt.style.whiteSpace="nowrap",Gt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Gt),this.addActionButton(Gt,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(Gt,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},It.prototype.addButtonClickListener=function(wt){this.buttonClickListeners.push(wt)},It.prototype.removeButtonClickListener=function(wt){this.buttonClickListeners.indexOf(wt)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(wt),1)},It.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},It.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var wt=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var xt=0;xt<this.markerButtons.length;xt++)xt<wt||xt===wt&&this.markerButtons.length-1===wt?this.markerButtonBlock.appendChild(this.markerButtons[xt]):(xt===wt&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[xt]))}},It.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},It.prototype.resetButtonStyles=function(){var wt=this;this.buttons.forEach(function(xt){xt.className=xt.className.replace(wt.uiStyleSettings.toolbarButtonStyleColorsClassName?wt.uiStyleSettings.toolbarButtonStyleColorsClassName:wt.toolbarButtonStyleColorsClass.name,"").trim(),xt.className=xt.className.replace(wt.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?wt.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:wt.toolbarActiveButtonStyleColorsClass.name,"").trim(),xt.className+=" "+(wt.uiStyleSettings.toolbarButtonStyleColorsClassName?wt.uiStyleSettings.toolbarButtonStyleColorsClassName:wt.toolbarButtonStyleColorsClass.name)})},It.prototype.addActionButton=function(wt,xt,Ft){var Gt=this,kt=document.createElement("div");switch(kt.className=""+this.toolbarButtonStyleClass.name,kt.innerHTML=xt,kt.setAttribute("data-action",Ft),kt.addEventListener("click",function(){Gt.actionToolbarButtonClicked(kt,Ft)}),Ft){case"select":kt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":kt.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":kt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":kt.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":kt.style.fill=this.uiStyleSettings.closeButtonColor}wt.appendChild(kt),this.buttons.push(kt)},It.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ie("toolbar",`
|
|
width: 100%;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
height: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
box-sizing: content-box;
|
|
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
overflow: hidden;
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new ie("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ie("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ie("toolbar-overflow-block",`
|
|
position: absolute;
|
|
top: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
|
|
z-index: 10;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new ie("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var wt=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ie("toolbar_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.toolbarButtonStyleColorsClass=this.styles.addClass(new ie("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ie("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new We("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new We("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},It.prototype.markerToolbarButtonClicked=function(wt,xt){this.setActiveButton(wt),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ft){return Ft("marker",xt)}),this.markerButtonOverflowBlock.style.display="none"},It.prototype.actionToolbarButtonClicked=function(wt,xt){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ft){return Ft("action",xt)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},It.prototype.setActiveButton=function(wt){this.resetButtonStyles(),wt.className=wt.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),wt.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},It.prototype.setActiveMarkerButton=function(wt){var xt=this.markerButtons.find(function(Ft){return Ft.getAttribute("data-type-name")===wt});xt&&this.setActiveButton(xt)},It.prototype.setCurrentMarker=function(wt){var xt=this;this.currentMarker=wt,this.buttons.filter(function(Ft){return/delete|notes/.test(Ft.getAttribute("data-action"))}).forEach(function(Ft){xt.currentMarker===void 0?(Ft.style.fillOpacity="0.4",Ft.style.pointerEvents="none"):(Ft.style.fillOpacity="1",Ft.style.pointerEvents="all")})},It}(),bt=function(){function It(wt,xt,Ft,Gt){this.panels=[],this.panelButtons=[],this.markerjsContainer=wt,this.displayMode=xt,this.uiStyleSettings=Ft,this.styles=Gt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return It.prototype.addStyles=function(){var wt;this.toolboxStyleClass=this.styles.addClass(new ie("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 ie("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var xt=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ie("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ie("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ie("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 ie("toolbox-panel-row_colors",`
|
|
background-color: `+((wt=this.uiStyleSettings.toolboxBackgroundColor)!==null&&wt!==void 0?wt:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ie("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*xt)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*xt)+`px;
|
|
padding: `+xt+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ie("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ie("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new We("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new We("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},It.prototype.show=function(wt){var xt;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=wt,this.uiContainer.className=this.toolboxStyleClass.name+" "+((xt=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&xt!==void 0?xt:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},It.prototype.setPanelButtons=function(wt){var xt,Ft,Gt=this;this.panels=wt,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((xt=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&xt!==void 0?xt: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 Yt;kt.uiStyleSettings=Gt.uiStyleSettings;var pe=document.createElement("div");pe.className=Gt.toolboxButtonStyleClass.name+" "+((Yt=Gt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Yt!==void 0?Yt:Gt.toolboxButtonStyleColorsClass.name),pe.innerHTML=kt.icon,pe.title=kt.title,pe.addEventListener("click",function(){Gt.panelButtonClick(kt)}),Gt.panelButtons.push(pe),Gt.buttonRow.appendChild(pe)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},It.prototype.panelButtonClick=function(wt){var xt=this,Ft=-1;if(wt!==this.activePanel){Ft=this.panels.indexOf(wt),this.panelRow.innerHTML="";var Gt=wt.getUi();Gt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Gt),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=wt}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){xt.displayMode==="inline"?xt.panelRow.style.display="none":xt.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(kt,Yt){var pe,Le;kt.className=xt.toolboxButtonStyleClass.name+" "+(Yt===Ft?""+((pe=xt.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&pe!==void 0?pe:xt.toolboxActiveButtonStyleColorsClass.name):""+((Le=xt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Le!==void 0?Le:xt.toolboxButtonStyleColorsClass.name))})},It}(),nt=function(It,wt){this.title=It,this.icon=wt},et=function(It){function wt(xt,Ft,Gt,kt){var Yt=It.call(this,xt,kt||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return Yt.colors=[],Yt.addTransparent=!1,Yt.colorBoxes=[],Yt.colors=Ft,Yt.currentColor=Gt,Yt.setCurrentColor=Yt.setCurrentColor.bind(Yt),Yt.getColorBox=Yt.getColorBox.bind(Yt),Yt}return ee(wt,It),wt.prototype.getUi=function(){var xt=this,Ft=document.createElement("div");return Ft.style.overflow="hidden",Ft.style.whiteSpace="nowrap",this.colors.forEach(function(Gt){var kt=xt.getColorBox(Gt);Ft.appendChild(kt),xt.colorBoxes.push(kt)}),Ft},wt.prototype.getColorBox=function(xt){var Ft=this,Gt=this.uiStyleSettings.toolbarHeight/4,kt=this.uiStyleSettings.toolbarHeight-Gt,Yt=document.createElement("div");Yt.style.display="inline-block",Yt.style.boxSizing="content-box",Yt.style.width=kt-2+"px",Yt.style.height=kt-2+"px",Yt.style.padding="1px",Yt.style.marginRight="2px",Yt.style.marginBottom="2px",Yt.style.borderWidth="2px",Yt.style.borderStyle="solid",Yt.style.borderRadius=(kt+2)/2+"px",Yt.style.borderColor=xt===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Yt.addEventListener("click",function(){Ft.setCurrentColor(xt,Yt)});var pe=document.createElement("div");return pe.style.display="inline-block",pe.style.width=kt-2+"px",pe.style.height=kt-2+"px",pe.style.backgroundColor=xt,pe.style.borderRadius=kt/2+"px",xt==="transparent"&&(pe.style.fill=this.uiStyleSettings.toolboxAccentColor,pe.innerHTML=`<svg viewBox="0 0 24 24">
|
|
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
|
|
</svg>`),Yt.appendChild(pe),Yt},wt.prototype.setCurrentColor=function(xt,Ft){var Gt=this;this.currentColor=xt,this.colorBoxes.forEach(function(kt){kt.style.borderColor=kt===Ft?Gt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(xt)},wt}(nt),ct=function(){function It(wt,xt,Ft){this._state="new",this._isSelected=!1,this._container=wt,this._overlayContainer=xt,this.globalSettings=Ft,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(It.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(It.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(It.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(It.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(It.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),It.prototype.ownsTarget=function(wt){return!1},Object.defineProperty(It.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),It.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},It.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},It.prototype.pointerDown=function(wt,xt){},It.prototype.dblClick=function(wt,xt){},It.prototype.manipulate=function(wt){},It.prototype.pointerUp=function(wt){this.stateChanged()},It.prototype.dispose=function(){},It.prototype.addMarkerVisualToContainer=function(wt){this.container.childNodes.length>0?this.container.insertBefore(wt,this.container.childNodes[0]):this.container.appendChild(wt)},It.prototype.getState=function(){return{typeName:It.typeName,state:this.state,notes:this.notes}},It.prototype.restoreState=function(wt){this._state=wt.state,this.notes=wt.notes},It.prototype.scale=function(wt,xt){},It.prototype.colorChanged=function(wt){this.onColorChanged&&this.onColorChanged(wt),this.stateChanged()},It.prototype.fillColorChanged=function(wt){this.onFillColorChanged&&this.onFillColorChanged(wt),this.stateChanged()},It.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var wt=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),wt.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(wt)&&this.onStateChanged(this)}},It.typeName="MarkerBase",It}(),lt=function(){function It(){this.findGripByVisual=this.findGripByVisual.bind(this)}return It.prototype.findGripByVisual=function(wt){return this.topLeft.ownsTarget(wt)?this.topLeft:this.topCenter.ownsTarget(wt)?this.topCenter:this.topRight.ownsTarget(wt)?this.topRight:this.centerLeft.ownsTarget(wt)?this.centerLeft:this.centerRight.ownsTarget(wt)?this.centerRight:this.bottomLeft.ownsTarget(wt)?this.bottomLeft:this.bottomCenter.ownsTarget(wt)?this.bottomCenter:this.bottomRight.ownsTarget(wt)?this.bottomRight:void 0},It}(),gt=function(){function It(){this.GRIP_SIZE=10,this.visual=Wt.createGroup(),this.visual.appendChild(Wt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Wt.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return It.prototype.ownsTarget=function(wt){return wt===this.visual||wt===this.visual.childNodes[0]||wt===this.visual.childNodes[1]},It}(),mt=function(){function It(){}return It.toITransformMatrix=function(wt){return{a:wt.a,b:wt.b,c:wt.c,d:wt.d,e:wt.e,f:wt.f}},It.toSVGMatrix=function(wt,xt){return wt.a=xt.a,wt.b=xt.b,wt.c=xt.c,wt.d=xt.d,wt.e=xt.e,wt.f=xt.f,wt},It}(),St=function(It){function wt(xt,Ft,Gt){var kt=It.call(this,xt,Ft,Gt)||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(Wt.createTransform()),kt.setupControlBox(),kt}return ee(wt,It),Object.defineProperty(wt.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"visual",{get:function(){return this._visual},set:function(xt){this._visual=xt;var Ft=Wt.createTransform();this._visual.transform.baseVal.appendItem(Ft)},enumerable:!1,configurable:!0}),wt.prototype.ownsTarget=function(xt){return!!It.prototype.ownsTarget.call(this,xt)||!!(this.controlGrips.findGripByVisual(xt)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(xt))},wt.prototype.pointerDown=function(xt,Ft){It.prototype.pointerDown.call(this,xt,Ft),this.state==="new"&&(this.left=xt.x,this.top=xt.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Gt=this.unrotatePoint(xt);if(this.manipulationStartX=Gt.x,this.manipulationStartY=Gt.y,this.offsetX=Gt.x-this.left,this.offsetY=Gt.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 Yt=this.container.transform.baseVal.getItem(0);Yt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Yt,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},wt.prototype.pointerUp=function(xt){var Ft=this.state;It.prototype.pointerUp.call(this,xt),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(xt),this._state="select",Ft==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},wt.prototype.moveVisual=function(xt){this.visual.style.transform="translate("+xt.x+"px, "+xt.y+"px)"},wt.prototype.manipulate=function(xt){var Ft=this.unrotatePoint(xt);this.state==="creating"?this.resize(xt):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(xt)},wt.prototype.resize=function(xt){var Ft=this.manipulationStartLeft,Gt=this.manipulationStartWidth,kt=this.manipulationStartTop,Yt=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Ft=this.manipulationStartLeft+xt.x-this.manipulationStartX,Gt=this.manipulationStartWidth+this.manipulationStartLeft-Ft;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Gt=this.manipulationStartWidth+xt.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:kt=this.manipulationStartTop+xt.y-this.manipulationStartY,Yt=this.manipulationStartHeight+this.manipulationStartTop-kt;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Yt=this.manipulationStartHeight+xt.y-this.manipulationStartY}Gt>=0?(this.left=Ft,this.width=Gt):(this.left=Ft+Gt,this.width=-Gt),Yt>=0?(this.top=kt,this.height=Yt):(this.top=kt+Yt,this.height=-Yt),this.setSize()},wt.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},wt.prototype.rotate=function(xt){if(Math.abs(xt.x-this.centerX)>.1){var Ft=Math.sign(xt.x-this.centerX);this.rotationAngle=180*Math.atan((xt.y-this.centerY)/(xt.x-this.centerX))/Math.PI+90*Ft,this.applyRotation()}},wt.prototype.applyRotation=function(){var xt=this.container.transform.baseVal.getItem(0);xt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(xt,0)},wt.prototype.rotatePoint=function(xt){if(this.rotationAngle===0)return xt;var Ft=this.container.getCTM(),Gt=Wt.createPoint(xt.x,xt.y);return{x:(Gt=Gt.matrixTransform(Ft)).x,y:Gt.y}},wt.prototype.unrotatePoint=function(xt){if(this.rotationAngle===0)return xt;var Ft=this.container.getCTM();Ft=Ft.inverse();var Gt=Wt.createPoint(xt.x,xt.y);return{x:(Gt=Gt.matrixTransform(Ft)).x,y:Gt.y}},wt.prototype.select=function(){It.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},wt.prototype.deselect=function(){It.prototype.deselect.call(this),this.controlBox.style.display="none"},wt.prototype.setupControlBox=function(){this.controlBox=Wt.createGroup();var xt=Wt.createTransform();xt.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(xt),this.container.appendChild(this.controlBox),this.controlRect=Wt.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=Wt.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"},wt.prototype.adjustControlBox=function(){var xt=this.controlBox.transform.baseVal.getItem(0);xt.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(xt,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()},wt.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()},wt.prototype.createGrip=function(){var xt=new gt;return xt.visual.transform.baseVal.appendItem(Wt.createTransform()),this.controlBox.appendChild(xt.visual),xt},wt.prototype.positionGrips=function(){var xt=this.controlGrips.topLeft.GRIP_SIZE,Ft=-xt/2,Gt=Ft,kt=(this.width+this.CB_DISTANCE)/2-xt/2,Yt=(this.height+this.CB_DISTANCE)/2-xt/2,pe=this.height+this.CB_DISTANCE-xt/2,Le=this.width+this.CB_DISTANCE-xt/2;this.positionGrip(this.controlGrips.topLeft.visual,Ft,Gt),this.positionGrip(this.controlGrips.topCenter.visual,kt,Gt),this.positionGrip(this.controlGrips.topRight.visual,Le,Gt),this.positionGrip(this.controlGrips.centerLeft.visual,Ft,Yt),this.positionGrip(this.controlGrips.centerRight.visual,Le,Yt),this.positionGrip(this.controlGrips.bottomLeft.visual,Ft,pe),this.positionGrip(this.controlGrips.bottomCenter.visual,kt,pe),this.positionGrip(this.controlGrips.bottomRight.visual,Le,pe),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,kt,Gt-3*this.CB_DISTANCE)},wt.prototype.positionGrip=function(xt,Ft,Gt){var kt=xt.transform.baseVal.getItem(0);kt.setTranslate(Ft,Gt),xt.transform.baseVal.replaceItem(kt,0)},wt.prototype.hideControlBox=function(){this.controlBox.style.display="none"},wt.prototype.showControlBox=function(){this.controlBox.style.display=""},wt.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)},It.prototype.getState.call(this))},wt.prototype.restoreState=function(xt){It.prototype.restoreState.call(this,xt);var Ft=xt;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))},wt.prototype.scale=function(xt,Ft){It.prototype.scale.call(this,xt,Ft);var Gt=this.rotatePoint({x:this.left,y:this.top}),kt=this.unrotatePoint({x:Gt.x*xt,y:Gt.y*Ft});this.left=kt.x,this.top=kt.y,this.width=this.width*xt,this.height=this.height*Ft,this.adjustControlBox()},wt}(ct),Mt=function(It){function wt(xt,Ft,Gt){var kt=It.call(this,xt,Ft,Gt)||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 ee(wt,It),wt.prototype.ownsTarget=function(xt){return!(!It.prototype.ownsTarget.call(this,xt)&&xt!==this.visual)},wt.prototype.createVisual=function(){this.visual=Wt.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)},wt.prototype.pointerDown=function(xt,Ft){It.prototype.pointerDown.call(this,xt,Ft),this.state==="new"&&(this.createVisual(),this.moveVisual(xt),this._state="creating")},wt.prototype.manipulate=function(xt){It.prototype.manipulate.call(this,xt)},wt.prototype.resize=function(xt){It.prototype.resize.call(this,xt),this.setSize()},wt.prototype.setSize=function(){It.prototype.setSize.call(this),Wt.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},wt.prototype.pointerUp=function(xt){It.prototype.pointerUp.call(this,xt),this.setSize()},wt.prototype.setStrokeColor=function(xt){this.strokeColor=xt,this.visual&&Wt.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(xt),this.stateChanged()},wt.prototype.setFillColor=function(xt){this.fillColor=xt,this.visual&&Wt.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},wt.prototype.setStrokeWidth=function(xt){this.strokeWidth=xt,this.visual&&Wt.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},wt.prototype.setStrokeDasharray=function(xt){this.strokeDasharray=xt,this.visual&&Wt.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},wt.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},It.prototype.getState.call(this))},wt.prototype.restoreState=function(xt){var Ft=xt;this.fillColor=Ft.fillColor,this.strokeColor=Ft.strokeColor,this.strokeWidth=Ft.strokeWidth,this.strokeDasharray=Ft.strokeDasharray,this.opacity=Ft.opacity,this.createVisual(),It.prototype.restoreState.call(this,xt),this.setSize()},wt.prototype.scale=function(xt,Ft){It.prototype.scale.call(this,xt,Ft),this.setSize()},wt.title="Rectangle marker",wt}(St),zt=function(It){function wt(xt,Ft,Gt,kt){var Yt=It.call(this,xt,kt||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Yt.widths=[],Yt.widthBoxes=[],Yt.widths=Ft,Yt.currentWidth=Gt,Yt.setCurrentWidth=Yt.setCurrentWidth.bind(Yt),Yt}return ee(wt,It),wt.prototype.getUi=function(){var xt=this,Ft=document.createElement("div");return Ft.style.display="flex",Ft.style.overflow="hidden",Ft.style.flexGrow="2",this.widths.forEach(function(Gt){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=Gt===xt.currentWidth?xt.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){xt.setCurrentWidth(Gt,kt)}),Ft.appendChild(kt);var Yt=document.createElement("div");Yt.innerText=Gt.toString(),Yt.style.marginRight="5px",kt.appendChild(Yt);var pe=document.createElement("div");pe.style.minHeight="20px",pe.style.flexGrow="2",pe.style.display="flex",pe.style.alignItems="center";var Le=document.createElement("hr");Le.style.minWidth="20px",Le.style.border="0px",Le.style.borderTop=Gt+"px solid "+xt.uiStyleSettings.toolboxColor,Le.style.flexGrow="2",pe.appendChild(Le),kt.appendChild(pe),xt.widthBoxes.push(kt)}),Ft},wt.prototype.setCurrentWidth=function(xt,Ft){var Gt=this;this.currentWidth=xt,this.widthBoxes.forEach(function(kt){kt.style.borderColor=kt===Ft?Gt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},wt}(nt),Ht=function(It){function wt(xt,Ft,Gt,kt){var Yt=It.call(this,xt,kt||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return Yt.styles=[],Yt.styleBoxes=[],Yt.styles=Ft,Yt.currentStyle=Gt,Yt.setCurrentStyle=Yt.setCurrentStyle.bind(Yt),Yt}return ee(wt,It),wt.prototype.getUi=function(){var xt=this,Ft=document.createElement("div");return Ft.style.display="flex",Ft.style.overflow="hidden",Ft.style.flexGrow="2",this.styles.forEach(function(Gt){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/xt.styles.length-5+"%",kt.style.borderColor=Gt===xt.currentStyle?xt.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){xt.setCurrentStyle(Gt,kt)}),Ft.appendChild(kt);var Yt=document.createElement("div");Yt.style.minHeight="20px",Yt.style.flexGrow="2",Yt.style.overflow="hidden";var pe=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+xt.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Gt!==""?'stroke-dasharray="'+Gt+'"':"")+` />
|
|
</svg>`;Yt.innerHTML=pe,kt.appendChild(Yt),xt.styleBoxes.push(kt)}),Ft},wt.prototype.setCurrentStyle=function(xt,Ft){var Gt=this;this.currentStyle=xt,this.styleBoxes.forEach(function(kt){kt.style.borderColor=kt===Ft?Gt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},wt}(nt),qt=function(It){function wt(xt,Ft,Gt){var kt=It.call(this,xt,Ft,Gt)||this;return kt.strokeColor=Gt.defaultColor,kt.strokeWidth=Gt.defaultStrokeWidth,kt.strokeDasharray=Gt.defaultStrokeDasharray,kt.strokePanel=new et("Line color",Gt.defaultColorSet,Gt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.strokeWidthPanel=new zt("Line width",Gt.defaultStrokeWidths,Gt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Ht("Line style",Gt.defaultStrokeDasharrays,Gt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt}return ee(wt,It),Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var xt=It.prototype.getState.call(this);return xt.typeName=wt.typeName,xt},wt.typeName="FrameMarker",wt.title="Frame marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',wt}(Mt),jt=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"},Jt=function(It){function wt(xt,Ft,Gt){var kt=It.call(this,xt,Ft,Gt)||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 ee(wt,It),wt.prototype.ownsTarget=function(xt){return!!It.prototype.ownsTarget.call(this,xt)||!(!this.grip1.ownsTarget(xt)&&!this.grip2.ownsTarget(xt))},wt.prototype.pointerDown=function(xt,Ft){It.prototype.pointerDown.call(this,xt,Ft),this.manipulationStartX=xt.x,this.manipulationStartY=xt.y,this.state==="new"&&(this.x1=xt.x,this.y1=xt.y,this.x2=xt.x,this.y2=xt.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")},wt.prototype.pointerUp=function(xt){var Ft=this.state;It.prototype.pointerUp.call(this,xt),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(xt),this._state="select",Ft==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},wt.prototype.adjustVisual=function(){},wt.prototype.manipulate=function(xt){this.state==="creating"?this.resize(xt):this.state==="move"?(this.x1=this.manipulationStartX1+xt.x-this.manipulationStartX,this.y1=this.manipulationStartY1+xt.y-this.manipulationStartY,this.x2=this.manipulationStartX2+xt.x-this.manipulationStartX,this.y2=this.manipulationStartY2+xt.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(xt)},wt.prototype.resize=function(xt){switch(this.activeGrip){case this.grip1:this.x1=xt.x,this.y1=xt.y;break;case this.grip2:case void 0:this.x2=xt.x,this.y2=xt.y}this.adjustVisual(),this.adjustControlBox()},wt.prototype.select=function(){It.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},wt.prototype.deselect=function(){It.prototype.deselect.call(this),this.controlBox.style.display="none"},wt.prototype.setupControlBox=function(){this.controlBox=Wt.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},wt.prototype.adjustControlBox=function(){this.positionGrips()},wt.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},wt.prototype.createGrip=function(){var xt=new gt;return xt.visual.transform.baseVal.appendItem(Wt.createTransform()),this.controlBox.appendChild(xt.visual),xt},wt.prototype.positionGrips=function(){var xt=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-xt/2,this.y1-xt/2),this.positionGrip(this.grip2.visual,this.x2-xt/2,this.y2-xt/2)},wt.prototype.positionGrip=function(xt,Ft,Gt){var kt=xt.transform.baseVal.getItem(0);kt.setTranslate(Ft,Gt),xt.transform.baseVal.replaceItem(kt,0)},wt.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},It.prototype.getState.call(this))},wt.prototype.restoreState=function(xt){It.prototype.restoreState.call(this,xt);var Ft=xt;this.x1=Ft.x1,this.y1=Ft.y1,this.x2=Ft.x2,this.y2=Ft.y2},wt.prototype.scale=function(xt,Ft){It.prototype.scale.call(this,xt,Ft),this.x1=this.x1*xt,this.y1=this.y1*Ft,this.x2=this.x2*xt,this.y2=this.y2*Ft,this.adjustVisual(),this.adjustControlBox()},wt}(ct),ge=function(It){function wt(xt,Ft,Gt){var kt=It.call(this,xt,Ft,Gt)||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=Gt.defaultColor,kt.strokeWidth=Gt.defaultStrokeWidth,kt.strokeDasharray=Gt.defaultStrokeDasharray,kt.strokePanel=new et("Line color",Gt.defaultColorSet,Gt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.strokeWidthPanel=new zt("Line width",Gt.defaultStrokeWidths,Gt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Ht("Line style",Gt.defaultStrokeDasharrays,Gt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt}return ee(wt,It),wt.prototype.ownsTarget=function(xt){return!(!It.prototype.ownsTarget.call(this,xt)&&xt!==this.visual&&xt!==this.selectorLine&&xt!==this.visibleLine)},wt.prototype.createVisual=function(){this.visual=Wt.createGroup(),this.selectorLine=Wt.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Wt.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)},wt.prototype.pointerDown=function(xt,Ft){It.prototype.pointerDown.call(this,xt,Ft),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},wt.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()),Wt.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Wt.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Wt.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},wt.prototype.setStrokeColor=function(xt){this.strokeColor=xt,this.adjustVisual(),this.colorChanged(xt)},wt.prototype.setStrokeWidth=function(xt){this.strokeWidth=xt,this.adjustVisual()},wt.prototype.setStrokeDasharray=function(xt){this.strokeDasharray=xt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var xt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},It.prototype.getState.call(this));return xt.typeName=wt.typeName,xt},wt.prototype.restoreState=function(xt){It.prototype.restoreState.call(this,xt);var Ft=xt;this.strokeColor=Ft.strokeColor,this.strokeWidth=Ft.strokeWidth,this.strokeDasharray=Ft.strokeDasharray,this.createVisual(),this.adjustVisual()},wt.typeName="LineMarker",wt.title="Line marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',wt}(Jt),he=function(It){function wt(xt,Ft,Gt,kt){var Yt=It.call(this,xt,kt||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return Yt.fonts=[],Yt.fontBoxes=[],Yt.fonts=Ft,Yt.currentFont=Gt,Yt.setCurrentFont=Yt.setCurrentFont.bind(Yt),Yt}return ee(wt,It),wt.prototype.getUi=function(){var xt=this,Ft=document.createElement("div");return Ft.style.overflow="hidden",Ft.style.flexGrow="2",this.fonts.forEach(function(Gt){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/xt.fonts.length-5+"%",kt.style.borderColor=Gt===xt.currentFont?xt.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){xt.setCurrentFont(Gt,kt)}),Ft.appendChild(kt);var Yt=document.createElement("div");Yt.style.display="flex",Yt.style.minHeight="20px",Yt.style.flexGrow="2",Yt.style.fontFamily=Gt,Yt.style.overflow="hidden";var pe=document.createElement("div");pe.style.whiteSpace="nowrap",pe.style.overflow="hidden",pe.style.textOverflow="ellipsis",pe.innerHTML="The quick brown fox jumps over the lazy dog",Yt.appendChild(pe),kt.appendChild(Yt),xt.fontBoxes.push(kt)}),Ft},wt.prototype.setCurrentFont=function(xt,Ft){var Gt=this;this.currentFont=xt,this.fontBoxes.forEach(function(kt){kt.style.borderColor=kt===Ft?Gt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},wt}(nt),Fe=function(It){function wt(xt,Ft,Gt){var kt=It.call(this,xt,Ft,Gt)||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=Gt.defaultColor,kt.fontFamily=Gt.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",Gt.defaultColorSet,Gt.defaultColor),kt.colorPanel.onColorChanged=kt.setColor,kt.fontFamilyPanel=new he("Font",Gt.defaultFontFamilies,Gt.defaultFontFamily),kt.fontFamilyPanel.onFontChanged=kt.setFont,kt}return ee(wt,It),wt.prototype.ownsTarget=function(xt){if(It.prototype.ownsTarget.call(this,xt)||xt===this.visual||xt===this.textElement||xt===this.bgRectangle)return!0;var Ft=!1;return this.textElement.childNodes.forEach(function(Gt){Gt===xt&&(Ft=!0)}),Ft},wt.prototype.createVisual=function(){this.visual=Wt.createGroup(),this.bgRectangle=Wt.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Wt.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Wt.createTransform()),this.textElement.transform.baseVal.appendItem(Wt.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},wt.prototype.pointerDown=function(xt,Ft){It.prototype.pointerDown.call(this,xt,Ft),this.isMoved=!1,this.pointerDownPoint=xt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(xt),this._state="creating")},wt.prototype.renderText=function(){var xt=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){xt.textElement.appendChild(Wt.createTSpan(Ft.trim()===""?" ":Ft.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},wt.prototype.getTextScale=function(){var xt=this.textElement.getBBox(),Ft=1;if(xt.width>0&&xt.height>0){var Gt=(1*this.width-this.width*this.padding*2/100)/xt.width,kt=(1*this.height-this.height*this.padding*2/100)/xt.height;Ft=Math.min(Gt,kt)}return Ft},wt.prototype.getTextPosition=function(xt){var Ft=this.textElement.getBBox(),Gt=0,kt=0;return Ft.width>0&&Ft.height>0&&(Gt=(this.width-Ft.width*xt)/2,kt=this.height/2-Ft.height*xt/2),{x:Gt,y:kt}},wt.prototype.sizeText=function(){var xt=this.textElement.getBBox(),Ft=this.getTextScale(),Gt=this.getTextPosition(Ft);Gt.y-=xt.y*Ft,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Gt.x+"px, "+Gt.y+"px) scale("+Ft+", "+Ft+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Gt.x,Gt.y),this.textElement.transform.baseVal.getItem(1).setScale(Ft,Ft))},wt.prototype.manipulate=function(xt){It.prototype.manipulate.call(this,xt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(xt.x-this.pointerDownPoint.x)>5||Math.abs(xt.y-this.pointerDownPoint.y)>5)},wt.prototype.resize=function(xt){It.prototype.resize.call(this,xt),this.isMoved=!0,this.setSize(),this.sizeText()},wt.prototype.setSize=function(){It.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Wt.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Wt.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},wt.prototype.pointerUp=function(xt){var Ft=this.state;Ft==="creating"&&(this._suppressMarkerCreateEvent=!0),It.prototype.pointerUp.call(this,xt),this.setSize(),(Ft==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},wt.prototype.showTextEditor=function(){var xt=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(xt.textEditor.style.fontSize);xt.textEditor.clientWidth>=Number.parseInt(xt.textEditor.style.maxWidth)&&Ft>.9;)Ft-=.1,xt.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 Gt=Ft.clipboardData.getData("text"),kt=window.getSelection();if(!kt.rangeCount)return!1;kt.deleteFromDocument(),kt.getRangeAt(0).insertNode(document.createTextNode(Gt)),Ft.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){xt.textEditDivClicked(xt.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},wt.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var xt=this.getTextScale(),Ft=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Gt=this.textElement.getBBox(),kt={x:Gt.width*xt,y:Gt.height*xt};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*xt,12)+"px",this.textElement.style.display="none"}},wt.prototype.textEditDivClicked=function(xt){this.text=xt.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},wt.prototype.select=function(){It.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},wt.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),It.prototype.deselect.call(this)},wt.prototype.dblClick=function(xt,Ft){It.prototype.dblClick.call(this,xt,Ft),this.showTextEditor()},wt.prototype.setColor=function(xt){this.textElement&&Wt.setAttributes(this.textElement,[["fill",xt]]),this.color=xt,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(xt)},wt.prototype.setFont=function(xt){this.textElement&&Wt.setAttributes(this.textElement,[["font-family",xt]]),this.fontFamily=xt,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},wt.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},wt.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var xt=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},It.prototype.getState.call(this));return xt.typeName=wt.typeName,xt},wt.prototype.restoreState=function(xt){var Ft=xt;this.color=Ft.color,this.fontFamily=Ft.fontFamily,this.padding=Ft.padding,this.text=Ft.text,this.createVisual(),It.prototype.restoreState.call(this,xt),this.setSize()},wt.prototype.scale=function(xt,Ft){It.prototype.scale.call(this,xt,Ft),this.setSize(),this.sizeText(),this.positionTextEditor()},wt.typeName="TextMarker",wt.title="Text marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',wt}(St),Re=function(It){function wt(xt,Ft,Gt){var kt=It.call(this,xt,Ft,Gt)||this;return kt.color="transparent",kt.lineWidth=3,kt.drawing=!1,kt.pixelRatio=1,kt.color=Gt.defaultColor,kt.lineWidth=Gt.defaultStrokeWidth,kt.pixelRatio=Gt.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",Gt.defaultColorSet,Gt.defaultColor),kt.colorPanel.onColorChanged=kt.setColor,kt.lineWidthPanel=new zt("Line width",Gt.defaultStrokeWidths,Gt.defaultStrokeWidth),kt.lineWidthPanel.onWidthChanged=kt.setLineWidth,kt}return ee(wt,It),wt.prototype.ownsTarget=function(xt){return!(!It.prototype.ownsTarget.call(this,xt)&&xt!==this.visual&&xt!==this.drawingImage)},wt.prototype.createVisual=function(){this.visual=Wt.createGroup(),this.drawingImage=Wt.createImage(),this.visual.appendChild(this.drawingImage);var xt=Wt.createTransform();this.visual.transform.baseVal.appendItem(xt),this.addMarkerVisualToContainer(this.visual)},wt.prototype.pointerDown=function(xt,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(xt.x,xt.y),this.drawing=!0):It.prototype.pointerDown.call(this,xt,Ft)},wt.prototype.manipulate=function(xt){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(xt.x,xt.y),this.canvasContext.stroke()):It.prototype.manipulate.call(this,xt)},wt.prototype.resize=function(xt){It.prototype.resize.call(this,xt),Wt.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Wt.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},wt.prototype.pointerUp=function(xt){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):It.prototype.pointerUp.call(this,xt)},wt.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)},wt.prototype.select=function(){this.state==="creating"&&this.finishCreation(),It.prototype.select.call(this)},wt.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),It.prototype.deselect.call(this)},wt.prototype.finishCreation=function(){for(var xt=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Ft=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Gt=Ft[0],kt=Ft[1],Yt=Ft[2],pe=Ft[3],Le=!1,on=0;on<this.canvasElement.height;on++)for(var ve=0;ve<this.canvasElement.width;ve++)xt.data[on*this.canvasElement.width*4+4*ve+3]>0&&(Le=!0,on<kt&&(kt=on),ve<Gt&&(Gt=ve),on>pe&&(pe=on),ve>Yt&&(Yt=ve));if(Le){this.left=Gt/this.pixelRatio,this.top=kt/this.pixelRatio,this.width=(Yt-Gt)/this.pixelRatio,this.height=(pe-kt)/this.pixelRatio;var Ae=document.createElement("canvas");Ae.width=Yt-Gt,Ae.height=pe-kt,Ae.getContext("2d").putImageData(this.canvasContext.getImageData(Gt,kt,Yt-Gt,pe-kt),0,0),this.drawingImgUrl=Ae.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},wt.prototype.setDrawingImage=function(){Wt.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Wt.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},wt.prototype.setColor=function(xt){this.color=xt,this.colorChanged(xt)},wt.prototype.setLineWidth=function(xt){this.lineWidth=xt},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var xt=Object.assign({drawingImgUrl:this.drawingImgUrl},It.prototype.getState.call(this));return xt.typeName=wt.typeName,xt},wt.prototype.restoreState=function(xt){this.createVisual(),It.prototype.restoreState.call(this,xt),this.drawingImgUrl=xt.drawingImgUrl,this.setDrawingImage()},wt.prototype.scale=function(xt,Ft){It.prototype.scale.call(this,xt,Ft),this.setDrawingImage()},wt.typeName="FreehandMarker",wt.title="Freehand marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',wt}(St),Ke=function(It){function wt(xt,Ft,Gt){var kt=It.call(this,xt,Gt||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return kt.typeBoxes=[],kt.currentType=Ft,kt.setCurrentType=kt.setCurrentType.bind(kt),kt}return ee(wt,It),wt.prototype.getUi=function(){var xt=this,Ft=document.createElement("div");Ft.style.display="flex",Ft.style.overflow="hidden",Ft.style.flexGrow="2";for(var Gt=function(pe){var Le="both";switch(pe){case 0:Le="both";break;case 1:Le="start";break;case 2:Le="end";break;case 3:Le="none"}var on=document.createElement("div");if(on.style.display="flex",on.style.flexGrow="2",on.style.alignItems="center",on.style.justifyContent="space-between",on.style.padding="5px",on.style.borderWidth="2px",on.style.borderStyle="solid",on.style.borderColor=Le===kt.currentType?kt.uiStyleSettings.toolboxAccentColor:"transparent",on.addEventListener("click",function(){xt.setCurrentType(Le,on)}),Ft.appendChild(on),Le==="both"||Le==="start"){var ve=document.createElement("div");ve.style.display="flex",ve.style.alignItems="center",ve.style.minHeight="20px",ve.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,5 10,0 10,10" fill="`+(kt.uiStyleSettings!==void 0?kt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,ve.style.marginLeft="5px",on.appendChild(ve)}var Ae=document.createElement("div");Ae.style.display="flex",Ae.style.alignItems="center",Ae.style.minHeight="20px",Ae.style.flexGrow="2";var Ee=document.createElement("hr");if(Ee.style.minWidth="20px",Ee.style.border="0px",Ee.style.borderTop="3px solid "+(kt.uiStyleSettings!==void 0?kt.uiStyleSettings.toolboxColor:"#eeeeee"),Ee.style.flexGrow="2",Ae.appendChild(Ee),on.appendChild(Ae),Le==="both"||Le==="end"){var Ge=document.createElement("div");Ge.style.display="flex",Ge.style.alignItems="center",Ge.style.minHeight="20px",Ge.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,0 10,5 0,10" fill="`+(kt.uiStyleSettings!==void 0?kt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Ge.style.marginRight="5px",on.appendChild(Ge)}kt.typeBoxes.push(on)},kt=this,Yt=0;Yt<4;Yt++)Gt(Yt);return Ft},wt.prototype.setCurrentType=function(xt,Ft){var Gt=this;this.currentType=xt,this.typeBoxes.forEach(function(kt){kt.style.borderColor=kt===Ft?Gt.uiStyleSettings!==void 0?Gt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},wt}(nt),Mn=function(It){function wt(xt,Ft,Gt){var kt=It.call(this,xt,Ft,Gt)||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 Ke("Arrow type","end"),kt.arrowTypePanel.onArrowTypeChanged=kt.setArrowType,kt}return ee(wt,It),wt.prototype.ownsTarget=function(xt){return!(!It.prototype.ownsTarget.call(this,xt)&&xt!==this.arrow1&&xt!==this.arrow2)},wt.prototype.getArrowPoints=function(xt,Ft){var Gt=this.arrowBaseWidth+2*this.strokeWidth,kt=this.arrowBaseHeight+2*this.strokeWidth;return xt-Gt/2+","+(Ft+kt/2)+" "+xt+","+(Ft-kt/2)+" "+(xt+Gt/2)+","+(Ft+kt/2)},wt.prototype.createTips=function(){this.arrow1=Wt.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Wt.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Wt.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Wt.createTransform()),this.visual.appendChild(this.arrow2)},wt.prototype.pointerDown=function(xt,Ft){It.prototype.pointerDown.call(this,xt,Ft),this.state==="creating"&&this.createTips()},wt.prototype.adjustVisual=function(){if(It.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",Wt.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Wt.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var xt=0;Math.abs(this.x1-this.x2)>.1&&(xt=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(xt,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Ft,0);var Gt=this.arrow2.transform.baseVal.getItem(0);Gt.setRotate(xt+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Gt,0)}},wt.prototype.setArrowType=function(xt){this.arrowType=xt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var xt=Object.assign({arrowType:this.arrowType},It.prototype.getState.call(this));return xt.typeName=wt.typeName,xt},wt.prototype.restoreState=function(xt){It.prototype.restoreState.call(this,xt);var Ft=xt;this.arrowType=Ft.arrowType,this.createTips(),this.adjustVisual()},wt.typeName="ArrowMarker",wt.title="Arrow marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',wt}(ge),tn=function(It){function wt(xt,Ft,Gt){var kt=It.call(this,xt,Ft,Gt)||this;return kt.fillColor=Gt.defaultFillColor,kt.strokeWidth=0,kt.fillPanel=new et("Color",Gt.defaultColorSet,Gt.defaultFillColor),kt.fillPanel.onColorChanged=kt.setFillColor,kt}return ee(wt,It),Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var xt=It.prototype.getState.call(this);return xt.typeName=wt.typeName,xt},wt.typeName="CoverMarker",wt.title="Cover marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',wt}(Mt),rn=function(It){function wt(xt,Ft,Gt,kt){var Yt=It.call(this,xt,kt||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return Yt.opacities=[],Yt.opacityBoxes=[],Yt.opacities=Ft,Yt.currentOpacity=Gt,Yt.setCurrentOpacity=Yt.setCurrentOpacity.bind(Yt),Yt}return ee(wt,It),wt.prototype.getUi=function(){var xt=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(Gt){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=Gt===xt.currentOpacity?xt.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){xt.setCurrentOpacity(Gt,kt)}),Ft.appendChild(kt);var Yt=document.createElement("div");Yt.innerText=100*Gt+"%",kt.appendChild(Yt),xt.opacityBoxes.push(kt)}),Ft},wt.prototype.setCurrentOpacity=function(xt,Ft){var Gt=this;this.currentOpacity=xt,this.opacityBoxes.forEach(function(kt){kt.style.borderColor=kt===Ft?Gt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},wt}(nt),nn=function(It){function wt(xt,Ft,Gt){var kt=It.call(this,xt,Ft,Gt)||this;return kt.setOpacity=kt.setOpacity.bind(kt),kt.fillColor=Gt.defaultHighlightColor,kt.strokeWidth=0,kt.opacity=Gt.defaultHighlightOpacity,kt.fillPanel=new et("Color",Gt.defaultColorSet,kt.fillColor),kt.fillPanel.onColorChanged=kt.setFillColor,kt.opacityPanel=new rn("Opacity",Gt.defaultOpacitySteps,kt.opacity),kt.opacityPanel.onOpacityChanged=kt.setOpacity,kt}return ee(wt,It),wt.prototype.setOpacity=function(xt){this.opacity=xt,this.visual&&Wt.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var xt=It.prototype.getState.call(this);return xt.typeName=wt.typeName,xt},wt.typeName="HighlightMarker",wt.title="Highlight marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',wt}(tn),me='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',Xt='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',Ue=function(It){function wt(xt,Ft,Gt){var kt=It.call(this,xt,Ft,Gt)||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=Gt.defaultStrokeColor,kt.bgColor=Gt.defaultFillColor,kt.fontFamily=Gt.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",Gt.defaultColorSet,kt.color,me),kt.colorPanel.onColorChanged=kt.setColor,kt.bgColorPanel=new et("Fill color",Gt.defaultColorSet,kt.bgColor,Xt),kt.bgColorPanel.onColorChanged=kt.setBgColor,kt.fontFamilyPanel=new he("Font",Gt.defaultFontFamilies,Gt.defaultFontFamily),kt.fontFamilyPanel.onFontChanged=kt.setFont,kt.tipGrip=new gt,kt.tipGrip.visual.transform.baseVal.appendItem(Wt.createTransform()),kt.controlBox.appendChild(kt.tipGrip.visual),kt}return ee(wt,It),wt.prototype.ownsTarget=function(xt){return It.prototype.ownsTarget.call(this,xt)||this.tipGrip.ownsTarget(xt)||this.tip===xt},wt.prototype.createTip=function(){Wt.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Wt.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},wt.prototype.pointerDown=function(xt,Ft){this.state==="new"&&It.prototype.pointerDown.call(this,xt,Ft),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Ft)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):It.prototype.pointerDown.call(this,xt,Ft)},wt.prototype.pointerUp=function(xt){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,It.prototype.pointerUp.call(this,xt);else{var Ft=this.state==="creating";It.prototype.pointerUp.call(this,xt),this.setTipPoints(Ft),this.positionTip()}},wt.prototype.manipulate=function(xt){if(this.tipMoving){var Ft=this.unrotatePoint(xt);this.tipPosition={x:Ft.x-this.manipulationStartLeft,y:Ft.y-this.manipulationStartTop},this.positionTip()}else It.prototype.manipulate.call(this,xt)},wt.prototype.setBgColor=function(xt){this.bgRectangle&&this.tip&&(Wt.setAttributes(this.bgRectangle,[["fill",xt]]),Wt.setAttributes(this.tip,[["fill",xt]])),this.bgColor=xt,this.fillColorChanged(xt)},wt.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},wt.prototype.setTipPoints=function(xt){xt===void 0&&(xt=!1);var Ft=Math.min(this.height/2,15),Gt=this.height/5;xt&&(this.tipPosition={x:Ft+Gt/2,y:this.height+20});var kt=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?kt<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Gt=this.width/5,Ft=Math.min(this.width/2,15),this.tipBase1Position={x:Ft,y:0},this.tipBase2Position={x:Ft+Gt,y:0}):(this.tipBase1Position={x:0,y:Ft},this.tipBase2Position={x:0,y:Ft+Gt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?kt<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Gt=this.width/5,Ft=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ft-Gt,y:0},this.tipBase2Position={x:this.width-Ft,y:0}):(this.tipBase1Position={x:this.width,y:Ft},this.tipBase2Position={x:this.width,y:Ft+Gt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?kt<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Gt=this.width/5,Ft=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ft-Gt,y:this.height},this.tipBase2Position={x:this.width-Ft,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Ft-Gt},this.tipBase2Position={x:this.width,y:this.height-Ft}):kt<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Gt=this.width/5,Ft=Math.min(this.width/2,15),this.tipBase1Position={x:Ft,y:this.height},this.tipBase2Position={x:Ft+Gt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Ft},this.tipBase2Position={x:0,y:this.height-Ft-Gt})},wt.prototype.resize=function(xt){It.prototype.resize.call(this,xt),this.positionTip()},wt.prototype.positionTip=function(){Wt.setAttributes(this.tip,[["points",this.getTipPoints()]]);var xt=this.tipGrip.visual.transform.baseVal.getItem(0);xt.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(xt,0)},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),wt.prototype.select=function(){this.positionTip(),It.prototype.select.call(this)},wt.prototype.getState=function(){var xt=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},It.prototype.getState.call(this));return xt.typeName=wt.typeName,xt},wt.prototype.restoreState=function(xt){var Ft=xt;this.bgColor=Ft.bgColor,this.tipPosition=Ft.tipPosition,It.prototype.restoreState.call(this,xt),this.createTip(),this.setTipPoints()},wt.prototype.scale=function(xt,Ft){It.prototype.scale.call(this,xt,Ft),this.tipPosition={x:this.tipPosition.x*xt,y:this.tipPosition.y*Ft},this.positionTip()},wt.typeName="CalloutMarker",wt.title="Callout marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',wt}(Fe),Pn=function(It){function wt(xt,Ft,Gt){var kt=It.call(this,xt,Ft,Gt)||this;return kt.fillColor="transparent",kt.strokeColor="transparent",kt.strokeWidth=0,kt.strokeDasharray="",kt.opacity=1,kt.strokeColor=Gt.defaultColor,kt.strokeWidth=Gt.defaultStrokeWidth,kt.strokeDasharray=Gt.defaultStrokeDasharray,kt.fillColor=Gt.defaultFillColor,kt.setStrokeColor=kt.setStrokeColor.bind(kt),kt.setFillColor=kt.setFillColor.bind(kt),kt.setStrokeWidth=kt.setStrokeWidth.bind(kt),kt.setStrokeDasharray=kt.setStrokeDasharray.bind(kt),kt.setOpacity=kt.setOpacity.bind(kt),kt.createVisual=kt.createVisual.bind(kt),kt.strokePanel=new et("Line color",Se(Gt.defaultColorSet,["transparent"]),Gt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.fillPanel=new et("Fill color",Se(Gt.defaultColorSet,["transparent"]),kt.fillColor,Xt),kt.fillPanel.onColorChanged=kt.setFillColor,kt.strokeWidthPanel=new zt("Line width",Gt.defaultStrokeWidths,Gt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Ht("Line style",Gt.defaultStrokeDasharrays,Gt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt.opacityPanel=new rn("Opacity",Gt.defaultOpacitySteps,kt.opacity),kt.opacityPanel.onOpacityChanged=kt.setOpacity,kt}return ee(wt,It),wt.prototype.ownsTarget=function(xt){return!(!It.prototype.ownsTarget.call(this,xt)&&xt!==this.visual)},wt.prototype.createVisual=function(){this.visual=Wt.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},wt.prototype.pointerDown=function(xt,Ft){It.prototype.pointerDown.call(this,xt,Ft),this.state==="new"&&(this.createVisual(),this.moveVisual(xt),this._state="creating")},wt.prototype.manipulate=function(xt){It.prototype.manipulate.call(this,xt)},wt.prototype.resize=function(xt){It.prototype.resize.call(this,xt),this.setSize()},wt.prototype.setSize=function(){It.prototype.setSize.call(this),Wt.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},wt.prototype.pointerUp=function(xt){It.prototype.pointerUp.call(this,xt),this.setSize()},wt.prototype.setStrokeColor=function(xt){this.strokeColor=xt,this.visual&&Wt.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(xt),this.stateChanged()},wt.prototype.setFillColor=function(xt){this.fillColor=xt,this.visual&&Wt.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(xt),this.stateChanged()},wt.prototype.setStrokeWidth=function(xt){this.strokeWidth=xt,this.visual&&Wt.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},wt.prototype.setStrokeDasharray=function(xt){this.strokeDasharray=xt,this.visual&&Wt.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},wt.prototype.setOpacity=function(xt){this.opacity=xt,this.visual&&Wt.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var xt=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},It.prototype.getState.call(this));return xt.typeName=wt.typeName,xt},wt.prototype.restoreState=function(xt){var Ft=xt;this.fillColor=Ft.fillColor,this.strokeColor=Ft.strokeColor,this.strokeWidth=Ft.strokeWidth,this.strokeDasharray=Ft.strokeDasharray,this.opacity=Ft.opacity,this.createVisual(),It.prototype.restoreState.call(this,xt),this.setSize()},wt.prototype.scale=function(xt,Ft){It.prototype.scale.call(this,xt,Ft),this.setSize()},wt.typeName="EllipseMarker",wt.title="Ellipse marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',wt}(St),Yn=function(It){function wt(xt,Ft,Gt){return It.call(this,xt,Ft,Gt)||this}return ee(wt,It),Object.defineProperty(wt.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),wt.prototype.ownsTarget=function(xt){return!(!It.prototype.ownsTarget.call(this,xt)&&xt!==this.tip1&&xt!==this.tip2)},wt.prototype.createTips=function(){this.tip1=Wt.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(Wt.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Wt.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(Wt.createTransform()),this.visual.appendChild(this.tip2)},wt.prototype.pointerDown=function(xt,Ft){It.prototype.pointerDown.call(this,xt,Ft),this.state==="creating"&&this.createTips()},wt.prototype.adjustVisual=function(){if(It.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Wt.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Wt.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var xt=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(xt,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Ft,0);var Gt=this.tip2.transform.baseVal.getItem(0);Gt.setRotate(xt+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Gt,0)}},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var xt=It.prototype.getState.call(this);return xt.typeName=wt.typeName,xt},wt.prototype.restoreState=function(xt){It.prototype.restoreState.call(this,xt),this.createTips(),this.adjustVisual()},wt.typeName="MeasurementMarker",wt.title="Measurement marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',wt}(ge),Be=function(It){function wt(xt,Ft,Gt){var kt=It.call(this,xt,Ft,Gt)||this;return kt.strokePanel.colors=Gt.defaultColorSet,kt.fillColor="transparent",kt}return ee(wt,It),Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var xt=It.prototype.getState.call(this);return xt.typeName=wt.typeName,xt},wt.typeName="EllipseFrameMarker",wt.title="Ellipse frame marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',wt}(Pn),vn=function(){function It(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(It.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(It.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(It.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(It.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),It.prototype.addUndoStep=function(wt){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(wt)||(this.undoStack.push(wt),JSON.stringify(this.lastRedoStep)!==JSON.stringify(wt)&&this.redoStack.splice(0,this.redoStack.length))},It.prototype.replaceLastUndoStep=function(wt){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=wt)},It.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},It.prototype.undo=function(){if(this.undoStack.length>1){var wt=this.undoStack.pop();return wt!==void 0&&this.redoStack.push(wt),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},It.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},It}(),Je=function(It){function wt(xt,Ft,Gt){var kt=It.call(this,xt,Ft,Gt)||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=Gt.defaultColor,kt.strokeWidth=Gt.defaultStrokeWidth,kt.strokeDasharray=Gt.defaultStrokeDasharray,kt.strokePanel=new et("Line color",Gt.defaultColorSet,Gt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.strokeWidthPanel=new zt("Line width",Gt.defaultStrokeWidths,Gt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Ht("Line style",Gt.defaultStrokeDasharrays,Gt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt}return ee(wt,It),wt.prototype.ownsTarget=function(xt){return!(!It.prototype.ownsTarget.call(this,xt)&&xt!==this.visual&&xt!==this.selectorCurve&&xt!==this.visibleCurve&&!this.curveGrip.ownsTarget(xt))},wt.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},wt.prototype.createVisual=function(){this.visual=Wt.createGroup(),this.selectorCurve=Wt.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Wt.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)},wt.prototype.pointerDown=function(xt,Ft){It.prototype.pointerDown.call(this,xt,Ft),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=xt.x,this.curveY=xt.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Ft)&&(this.activeGrip=this.curveGrip,this._state="resize")},wt.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Wt.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Wt.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Wt.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},wt.prototype.setupControlBox=function(){It.prototype.setupControlBox.call(this),this.curveControlLine1=Wt.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Wt.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)},wt.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,It.prototype.addControlGrips.call(this)},wt.prototype.positionGrips=function(){It.prototype.positionGrips.call(this);var xt=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-xt/2,this.curveY-xt/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()))},wt.prototype.manipulate=function(xt){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+xt.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+xt.y-this.manipulationStartY),It.prototype.manipulate.call(this,xt)},wt.prototype.resize=function(xt){this.activeGrip===this.curveGrip&&(this.curveX=xt.x,this.curveY=xt.y),It.prototype.resize.call(this,xt),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},wt.prototype.setStrokeColor=function(xt){this.strokeColor=xt,this.adjustVisual(),this.colorChanged(xt)},wt.prototype.setStrokeWidth=function(xt){this.strokeWidth=xt,this.adjustVisual()},wt.prototype.setStrokeDasharray=function(xt){this.strokeDasharray=xt,this.adjustVisual()},wt.prototype.scale=function(xt,Ft){this.curveX=this.curveX*xt,this.curveY=this.curveY*Ft,It.prototype.scale.call(this,xt,Ft)},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var xt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},It.prototype.getState.call(this));return xt.typeName=wt.typeName,xt},wt.prototype.restoreState=function(xt){It.prototype.restoreState.call(this,xt);var Ft=xt;this.strokeColor=Ft.strokeColor,this.strokeWidth=Ft.strokeWidth,this.strokeDasharray=Ft.strokeDasharray,this.curveX=Ft.curveX,this.curveY=Ft.curveY,this.createVisual(),this.adjustVisual()},wt.typeName="CurveMarker",wt.title="Curve marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',wt}(Jt),An=function(It){function wt(xt,Ft,Gt){var kt=It.call(this,xt,Ft,Gt)||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=Gt.defaultColor,kt.strokeWidth=Gt.defaultStrokeWidth,kt.strokeDasharray=Gt.defaultStrokeDasharray,kt.fillColor=Gt.defaultFillColor,kt.textColor=Gt.defaultStrokeColor,kt.fontFamily=Gt.defaultFontFamily,kt.fontSize=Gt.defaultCaptionFontSize,kt.captionText=Gt.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",Se(Gt.defaultColorSet,["transparent"]),kt.strokeColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.fillPanel=new et("Fill color",Se(Gt.defaultColorSet,["transparent"]),kt.fillColor,Xt),kt.fillPanel.onColorChanged=kt.setFillColor,kt.strokeWidthPanel=new zt("Line width",Gt.defaultStrokeWidths,Gt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Ht("Line style",Gt.defaultStrokeDasharrays,Gt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt.fontFamilyPanel=new he("Font",Gt.defaultFontFamilies,Gt.defaultFontFamily),kt.fontFamilyPanel.onFontChanged=kt.setFont,kt.textColorPanel=new et("Text color",Gt.defaultColorSet,kt.textColor,me),kt.textColorPanel.onColorChanged=kt.setTextColor,kt}return ee(wt,It),wt.prototype.ownsTarget=function(xt){return!(!It.prototype.ownsTarget.call(this,xt)&&xt!==this.visual&&xt!==this.frame&&xt!==this.captionBg&&xt!==this.captionElement)},wt.prototype.createVisual=function(){this.visual=Wt.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Wt.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Wt.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=Wt.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()},wt.prototype.setCaptionText=function(xt){this.captionText=xt,this.captionElement.textContent=this.captionText,this.sizeCaption()},wt.prototype.pointerDown=function(xt,Ft){It.prototype.pointerDown.call(this,xt,Ft),this.isMoved=!1,this.pointerDownPoint=xt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(xt),this._state="creating")},wt.prototype.manipulate=function(xt){It.prototype.manipulate.call(this,xt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(xt.x-this.pointerDownPoint.x)>5||Math.abs(xt.y-this.pointerDownPoint.y)>5)},wt.prototype.resize=function(xt){It.prototype.resize.call(this,xt),this.setSize()},wt.prototype.sizeCaption=function(){var xt=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=xt.width+2*this.PADDING,this.captionBoxHeight=xt.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),Wt.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')"]]),Wt.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')"]])},wt.prototype.showTextEditor=function(){var xt=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"&&xt.finishTextEditing(xt.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Ft){Ft.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){xt.finishTextEditing(xt.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){xt.finishTextEditing(xt.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},wt.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"))},wt.prototype.finishTextEditing=function(xt){this.setCaptionText(xt.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},wt.prototype.setFont=function(xt){this.captionElement&&Wt.setAttributes(this.captionElement,[["font-family",xt]]),this.fontFamily=xt,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},wt.prototype.setTextColor=function(xt){this.captionElement&&Wt.setAttributes(this.captionElement,[["fill",xt]]),this.textColor=xt,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},wt.prototype.setSize=function(){It.prototype.setSize.call(this),Wt.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},wt.prototype.pointerUp=function(xt){It.prototype.pointerUp.call(this,xt),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},wt.prototype.dblClick=function(xt,Ft){It.prototype.dblClick.call(this,xt,Ft),this.showTextEditor()},wt.prototype.setStrokeColor=function(xt){this.strokeColor=xt,this.frame&&Wt.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(xt),this.stateChanged()},wt.prototype.setFillColor=function(xt){this.fillColor=xt,this.captionBg&&Wt.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(xt),this.stateChanged()},wt.prototype.setStrokeWidth=function(xt){this.strokeWidth=xt,this.frame&&Wt.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},wt.prototype.setStrokeDasharray=function(xt){this.strokeDasharray=xt,this.frame&&Wt.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var xt=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},It.prototype.getState.call(this));return xt.typeName=this.typeName,xt},wt.prototype.restoreState=function(xt){var Ft=xt;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(),It.prototype.restoreState.call(this,xt),this.setSize()},wt.prototype.scale=function(xt,Ft){It.prototype.scale.call(this,xt,Ft),this.setSize()},wt.typeName="CaptionFrameMarker",wt.title="Caption frame marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M5 3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2H5m0 2h14v14H5V5m2 2v2h10V7H7z"/></svg>',wt}(St),we=function(){function It(wt,xt){xt===void 0&&(xt=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=wt,this.cancelable=xt}return Object.defineProperty(It.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),It.prototype.preventDefault=function(){this._defaultPrevented=!0},It}(),sn=function(It){function wt(xt,Ft,Gt){var kt=It.call(this,xt,!1)||this;return kt.dataUrl=Ft,kt.state=Gt,kt}return ee(wt,It),wt}(we),ce=function(It){function wt(xt,Ft,Gt){Gt===void 0&&(Gt=!1);var kt=It.call(this,xt,Gt)||this;return kt.marker=Ft,kt}return ee(wt,It),wt}(we),Nn=function(){function It(){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 It.prototype.addEventListener=function(wt,xt){this[wt].push(xt)},It.prototype.removeEventListener=function(wt,xt){var Ft=this[wt].indexOf(xt);Ft>-1&&this[wt].splice(Ft,1)},It}(),Ci=function(){function It(wt){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new jt,this._isOpen=!1,this.undoRedoManager=new vn,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 Nn,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=It.instanceCounter++,this.styles=new Nt(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=wt,this.targetRoot=document.body,this.width=wt.clientWidth,this.height=wt.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(It.prototype,"ALL_MARKER_TYPES",{get:function(){return[qt,Re,Mn,Fe,Be,Pn,nn,Ue,Yn,tn,ge,Je,An]},enumerable:!1,configurable:!0}),Object.defineProperty(It.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[qt,Re,Mn,Fe,Pn,nn,Ue]},enumerable:!1,configurable:!0}),Object.defineProperty(It.prototype,"BASIC_MARKER_TYPES",{get:function(){return[qt,Re,Mn,Fe,nn]},enumerable:!1,configurable:!0}),Object.defineProperty(It.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(wt){var xt=this;this._availableMarkerTypes.splice(0),wt.forEach(function(Ft){if(typeof Ft=="string"){var Gt=xt.ALL_MARKER_TYPES.find(function(kt){return kt.typeName===Ft});Gt!==void 0&&xt._availableMarkerTypes.push(Gt)}else xt._availableMarkerTypes.push(Ft)})},enumerable:!1,configurable:!0}),Object.defineProperty(It.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(It.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(It.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(It.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(It.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(wt){this._zoomLevel=wt,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(It.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),It.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),se.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},It.prototype.show=function(){var wt=this;this.styles.styleSheetRoot===void 0&&ye.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ye.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(xt){return xt(new we(wt))})},It.prototype.render=function(){return Pe(this,void 0,void 0,function(){var wt;return xe(this,function(xt){switch(xt.label){case 0:return this.setCurrentMarker(),(wt=new ze).naturalSize=this.renderAtNaturalSize,wt.imageType=this.renderImageType,wt.imageQuality=this.renderImageQuality,wt.markersOnly=this.renderMarkersOnly,wt.width=this.renderWidth,wt.height=this.renderHeight,[4,wt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return xt.sent(),[4,wt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,xt.sent()]}})})},It.prototype.close=function(wt){var xt=this;if(wt===void 0&&(wt=!1),this.isOpen){var Ft=!1;wt||this.eventListeners.beforeclose.forEach(function(Gt){var kt=new we(xt,!0);Gt(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(Gt){return Gt(new we(xt))}),this.detachEvents(),this._isOpen=!1)}},It.prototype.addMarkersToToolbar=function(){for(var wt,xt=[],Ft=0;Ft<arguments.length;Ft++)xt[Ft]=arguments[Ft];(wt=this._availableMarkerTypes).push.apply(wt,xt)},It.prototype.addRenderEventListener=function(wt){this.addEventListener("render",function(xt){wt(xt.dataUrl,xt.state)})},It.prototype.removeRenderEventListener=function(wt){},It.prototype.addCloseEventListener=function(wt){this.addEventListener("close",function(){wt()})},It.prototype.removeCloseEventListener=function(wt){},It.prototype.setupResizeObserver=function(){var wt=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){wt.resize(wt.target.clientWidth,wt.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return wt.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},It.prototype.onPopupTargetResize=function(){var wt=1*this.target.clientWidth/this.target.clientHeight,xt=this.editorCanvas.clientWidth/wt>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*wt:this.editorCanvas.clientWidth,Ft=xt<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/wt;this.resize(xt,Ft)},It.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},It.prototype.resize=function(wt,xt){this._isResizing=!0;var Ft=wt/this.imageWidth,Gt=xt/this.imageHeight;this.imageWidth=Math.round(wt),this.imageHeight=Math.round(xt),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(Ft,Gt),this._isResizing=!1},It.prototype.scaleMarkers=function(wt,xt){var Ft,Gt=this;this._currentMarker&&this._currentMarker instanceof Fe?this._currentMarker.scale(wt,xt):(Ft=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(kt){kt!==Gt._currentMarker&&kt.scale(wt,xt)}),Ft!==void 0&&this.setCurrentMarker(Ft)},It.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},It.prototype.setTopLeft=function(){var wt=this.editingTarget.getBoundingClientRect(),xt=this.editorCanvas.getBoundingClientRect();this.left=wt.left-xt.left,this.top=wt.top-xt.top},It.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},It.prototype.addDefs=function(){for(var wt,xt=[],Ft=0;Ft<arguments.length;Ft++)xt[Ft]=arguments[Ft];this.defs=Wt.createDefs(),this.addDefsToImage(),(wt=this.defs).append.apply(wt,xt)},It.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},It.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},It.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},It.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},It.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},It.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},It.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},It.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var wt=document.createElement("a");wt.href="https://markerjs.com/",wt.target="_blank",wt.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',wt.title="Powered by marker.js",wt.style.display="grid",wt.style.alignItems="center",wt.style.justifyItems="center",wt.style.padding="3px",wt.style.width="20px",wt.style.height="20px",this.logoUI.appendChild(wt),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},It.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")},It.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"},It.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},It.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 wt=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=wt+"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 Ne(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.settings.uiOffsetTop===void 0&&this.target.offsetTop<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new bt(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},It.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},It.prototype.removeMarker=function(wt){this.markerImage.removeChild(wt.container),this.markers.indexOf(wt)>-1&&this.markers.splice(this.markers.indexOf(wt),1),wt.dispose()},It.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())},It.prototype.toolbarButtonClicked=function(wt,xt){if(wt==="marker"&&xt!==void 0)this.createNewMarker(xt);else if(wt==="action")switch(xt){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()}},It.prototype.deleteSelectedMarker=function(){var wt=this;if(this._currentMarker!==void 0){var xt=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Gt){var kt=new ce(wt,wt._currentMarker,!0);Gt(kt),kt.defaultPrevented&&(xt=!0)}),!xt){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(Gt){return Gt(new ce(wt,Ft))})}}},It.prototype.clear=function(){var wt=this,xt=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Yt){var pe=new ce(wt,void 0,!0);Yt(pe),pe.defaultPrevented&&(xt=!0)}),!xt)){this.setCurrentMarker();for(var Ft=function(Yt){var pe=Gt.markers[Yt];Gt.setCurrentMarker(Gt.markers[Yt]),Gt._currentMarker.dispose(),Gt.markerImage.removeChild(Gt._currentMarker.container),Gt.markers.splice(Gt.markers.indexOf(Gt._currentMarker),1),Gt.eventListeners.markerdelete.forEach(function(Le){return Le(new ce(wt,pe))})},Gt=this,kt=this.markers.length-1;kt>=0;kt--)Ft(kt);this.addUndoStep()}},Object.defineProperty(It.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),It.prototype.showNotesEditor=function(){var wt;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=(wt=this._currentMarker.notes)!==null&&wt!==void 0?wt:"",this.overlayContainer.appendChild(this.notesArea))},It.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)},It.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},It.prototype.addUndoStep=function(){var wt=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var xt=this.getState(),Ft=this.undoRedoManager.getLastUndoStep();if(!Ft||Ft.width===xt.width&&Ft.height===xt.height){var Gt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(xt),Gt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(kt){return kt(new we(wt))})}else this.undoRedoManager.replaceLastUndoStep(xt),this.eventListeners.statechange.forEach(function(kt){return kt(new we(wt))})}},It.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},It.prototype.undoStep=function(){var wt=this,xt=this.undoRedoManager.undo();xt!==void 0&&(this.restoreState(xt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Ft){return Ft(new we(wt))}))},It.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},It.prototype.redoStep=function(){var wt=this,xt=this.undoRedoManager.redo();xt!==void 0&&(this.restoreState(xt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Ft){return Ft(new we(wt))}))},It.prototype.stepZoom=function(){var wt=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=wt<this.zoomSteps.length-1?this.zoomSteps[wt+1]:this.zoomSteps[0]},It.prototype.panTo=function(wt){this.contentDiv.scrollBy({left:this.prevPanPoint.x-wt.x,top:this.prevPanPoint.y-wt.y}),this.prevPanPoint=wt},It.prototype.startRenderAndClose=function(){return Pe(this,void 0,void 0,function(){var wt,xt,Ft=this;return xe(this,function(Gt){switch(Gt.label){case 0:return[4,this.render()];case 1:return wt=Gt.sent(),xt=this.getState(),this.eventListeners.render.forEach(function(kt){return kt(new sn(Ft,wt,xt))}),this.close(!0),[2]}})})},It.prototype.getState=function(wt){wt===!0&&this.setCurrentMarker();var xt={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Ft){return xt.markers.push(Ft.getState())}),xt},It.prototype.restoreState=function(wt){var xt=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);wt.markers.forEach(function(Ft){var Gt=xt._availableMarkerTypes.find(function(Yt){return Yt.typeName===Ft.typeName});if(Gt!==void 0){var kt=xt.addNewMarker(Gt);kt.restoreState(Ft),xt.markers.push(kt)}}),wt.width&&wt.height&&(wt.width!==this.imageWidth||wt.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/wt.width,this.imageHeight/wt.height),this.eventListeners.restorestate.forEach(function(Ft){return Ft(new we(xt))})},It.prototype.addNewMarker=function(wt){var xt=Wt.createGroup();return this.markerImage.appendChild(xt),new wt(xt,this.overlayContainer,this.settings)},It.prototype.createNewMarker=function(wt){var xt,Ft=this;(xt=typeof wt=="string"?this._availableMarkerTypes.find(function(Gt){return Gt.typeName===wt}):wt)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(xt),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(xt.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Gt){return Gt(new ce(Ft,Ft._currentMarker))}))},It.prototype.markerCreated=function(wt){var xt=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(wt),this.setCurrentMarker(wt),wt instanceof Re&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Re):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Ft){return Ft(new ce(xt,xt._currentMarker))})},It.prototype.colorChanged=function(wt){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=wt,this.settings.defaultStrokeColor=wt)},It.prototype.fillColorChanged=function(wt){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=wt)},It.prototype.markerStateChanged=function(wt){var xt=this;this.eventListeners.markerchange.forEach(function(Ft){return Ft(new ce(xt,wt))})},It.prototype.setCurrentMarker=function(wt){var xt=this;this._currentMarker!==wt&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Ft){return Ft(new ce(xt,xt._currentMarker))})),this._currentMarker=wt,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(Ft){return Ft(new ce(xt,xt._currentMarker))}))},It.prototype.onPointerDown=function(wt){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||wt.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var xt=this.markers.find(function(Ft){return Ft.ownsTarget(wt.target)});xt!==void 0?(this.setCurrentMarker(xt),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(wt.clientX,wt.clientY),wt.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:wt.clientX,y:wt.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(wt.clientX,wt.clientY))},It.prototype.onDblClick=function(wt){if(this._isFocused||this.focus(),this.mode==="select"){var xt=this.markers.find(function(Ft){return Ft.ownsTarget(wt.target)});xt!==void 0&&xt!==this._currentMarker&&this.setCurrentMarker(xt),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(wt.clientX,wt.clientY),wt.target):this.setCurrentMarker()}},It.prototype.onPointerMove=function(wt){this.touchPoints!==1&&wt.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||wt.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(wt.clientX,wt.clientY)):this.zoomLevel>1&&this.panTo({x:wt.clientX,y:wt.clientY}))},It.prototype.onPointerUp=function(wt){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(wt.clientX,wt.clientY)),this.isDragging=!1,this.addUndoStep()},It.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},It.prototype.onKeyUp=function(wt){this._currentMarker===void 0||this.notesArea!==void 0||wt.key!=="Delete"&&wt.key!=="Backspace"||this.deleteSelectedMarker()},It.prototype.clientToLocalCoordinates=function(wt,xt){var Ft=this.markerImage.getBoundingClientRect();return{x:(wt-Ft.left)/this.zoomLevel,y:(xt-Ft.top)/this.zoomLevel}},It.prototype.onWindowResize=function(){this.positionUI()},It.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var wt=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=wt+"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()},It.prototype.addLicenseKey=function(wt){se.addKey(wt)},It.prototype.addEventListener=function(wt,xt){this.eventListeners.addEventListener(wt,xt)},It.prototype.removeEventListener=function(wt,xt){this.eventListeners.removeEventListener(wt,xt)},It.prototype.renderState=function(wt){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(wt),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(It.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),It.prototype.focus=function(){var wt=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(xt){return xt(new we(wt))}))},It.prototype.blur=function(){var wt=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(xt){return xt(new we(wt))}))},It.instanceCounter=0,It}()},23425:function(zn,oi,Ot){"use strict";Ot.d(oi,{Z:function(){return Ht}});var Dt=Ot(49618),ee=Ot(72308),Pe=Ot(62853),xe=Ot(77321),Se=Ot(52487),Wt=Ot(92310),se=Ot.n(Wt),ze=Ot(18929),ye=Ot(10228),Nt=Ot(26112),We=Ot(48736),ie=Ot(59301),Ne=Ot(17119),bt=[10,20,50,100],nt=function(jt){var Jt=jt.pageSizeOptions,ge=Jt===void 0?bt:Jt,he=jt.locale,Fe=jt.changeSize,Re=jt.pageSize,Ke=jt.goButton,Mn=jt.quickGo,tn=jt.rootPrefixCls,rn=jt.disabled,nn=jt.buildOptionText,me=jt.showSizeChanger,Xt=jt.sizeChangerRender,Ue=ie.useState(""),Pn=(0,Se.Z)(Ue,2),Yn=Pn[0],Be=Pn[1],vn=function(){return!Yn||Number.isNaN(Yn)?void 0:Number(Yn)},Je=typeof nn=="function"?nn:function(xt){return"".concat(xt," ").concat(he.items_per_page)},An=function(Ft){Be(Ft.target.value)},we=function(Ft){Ke||Yn===""||(Be(""),!(Ft.relatedTarget&&(Ft.relatedTarget.className.indexOf("".concat(tn,"-item-link"))>=0||Ft.relatedTarget.className.indexOf("".concat(tn,"-item"))>=0))&&(Mn==null||Mn(vn())))},sn=function(Ft){Yn!==""&&(Ft.keyCode===ye.Z.ENTER||Ft.type==="click")&&(Be(""),Mn==null||Mn(vn()))},ce=function(){return ge.some(function(Ft){return Ft.toString()===Re.toString()})?ge:ge.concat([Re]).sort(function(Ft,Gt){var kt=Number.isNaN(Number(Ft))?0:Number(Ft),Yt=Number.isNaN(Number(Gt))?0:Number(Gt);return kt-Yt})},Nn="".concat(tn,"-options");if(!me&&!Mn)return null;var Ci=null,It=null,wt=null;return me&&Xt&&(Ci=Xt({disabled:rn,size:Re,onSizeChange:function(Ft){Fe==null||Fe(Number(Ft))},"aria-label":he.page_size,className:"".concat(Nn,"-size-changer"),options:ce().map(function(xt){return{label:Je(xt),value:xt}})})),Mn&&(Ke&&(wt=typeof Ke=="boolean"?ie.createElement("button",{type:"button",onClick:sn,onKeyUp:sn,disabled:rn,className:"".concat(Nn,"-quick-jumper-button")},he.jump_to_confirm):ie.createElement("span",{onClick:sn,onKeyUp:sn},Ke)),It=ie.createElement("div",{className:"".concat(Nn,"-quick-jumper")},he.jump_to,ie.createElement("input",{disabled:rn,type:"text",value:Yn,onChange:An,onKeyUp:sn,onBlur:we,"aria-label":he.page}),he.page,wt)),ie.createElement("li",{className:Nn},Ci,It)},et=nt,ct=function(jt){var Jt=jt.rootPrefixCls,ge=jt.page,he=jt.active,Fe=jt.className,Re=jt.showTitle,Ke=jt.onClick,Mn=jt.onKeyPress,tn=jt.itemRender,rn="".concat(Jt,"-item"),nn=se()(rn,"".concat(rn,"-").concat(ge),(0,Dt.Z)((0,Dt.Z)({},"".concat(rn,"-active"),he),"".concat(rn,"-disabled"),!ge),Fe),me=function(){Ke(ge)},Xt=function(Yn){Mn(Yn,Ke,ge)},Ue=tn(ge,"page",ie.createElement("a",{rel:"nofollow"},ge));return Ue?ie.createElement("li",{title:Re?String(ge):null,className:nn,onClick:me,onKeyDown:Xt,tabIndex:0},Ue):null},lt=ct,gt=function(jt,Jt,ge){return ge};function mt(){}function St(qt){var jt=Number(qt);return typeof jt=="number"&&!Number.isNaN(jt)&&isFinite(jt)&&Math.floor(jt)===jt}function Mt(qt,jt,Jt){var ge=typeof qt=="undefined"?jt:qt;return Math.floor((Jt-1)/ge)+1}var zt=function(jt){var Jt=jt.prefixCls,ge=Jt===void 0?"rc-pagination":Jt,he=jt.selectPrefixCls,Fe=he===void 0?"rc-select":he,Re=jt.className,Ke=jt.current,Mn=jt.defaultCurrent,tn=Mn===void 0?1:Mn,rn=jt.total,nn=rn===void 0?0:rn,me=jt.pageSize,Xt=jt.defaultPageSize,Ue=Xt===void 0?10:Xt,Pn=jt.onChange,Yn=Pn===void 0?mt:Pn,Be=jt.hideOnSinglePage,vn=jt.align,Je=jt.showPrevNextJumpers,An=Je===void 0?!0:Je,we=jt.showQuickJumper,sn=jt.showLessItems,ce=jt.showTitle,Nn=ce===void 0?!0:ce,Ci=jt.onShowSizeChange,It=Ci===void 0?mt:Ci,wt=jt.locale,xt=wt===void 0?Ne.Z:wt,Ft=jt.style,Gt=jt.totalBoundaryShowSizeChanger,kt=Gt===void 0?50:Gt,Yt=jt.disabled,pe=jt.simple,Le=jt.showTotal,on=jt.showSizeChanger,ve=on===void 0?nn>kt:on,Ae=jt.sizeChangerRender,Ee=jt.pageSizeOptions,Ge=jt.itemRender,kn=Ge===void 0?gt:Ge,In=jt.jumpPrevIcon,gn=jt.jumpNextIcon,ai=jt.prevIcon,xi=jt.nextIcon,Gn=ie.useRef(null),Si=(0,ze.Z)(10,{value:me,defaultValue:Ue}),_n=(0,Se.Z)(Si,2),Ti=_n[0],Di=_n[1],$i=(0,ze.Z)(1,{value:Ke,defaultValue:tn,postState:function(_i){return Math.max(1,Math.min(_i,Mt(void 0,Ti,nn)))}}),Kr=(0,Se.Z)($i,2),Xi=Kr[0],zr=Kr[1],so=ie.useState(Xi),po=(0,Se.Z)(so,2),Jr=po[0],Do=po[1];(0,ie.useEffect)(function(){Do(Xi)},[Xi]);var Bo=Yn!==mt,Ko="current"in jt,bo=Math.max(1,Xi-(sn?3:5)),ko=Math.min(Mt(void 0,Ti,nn),Xi+(sn?3:5));function Ct(Ri,_i){var xr=Ri||ie.createElement("button",{type:"button","aria-label":_i,className:"".concat(ge,"-item-link")});return typeof Ri=="function"&&(xr=ie.createElement(Ri,(0,xe.Z)({},jt))),xr}function Zn(Ri){var _i=Ri.target.value,xr=Mt(void 0,Ti,nn),zo;return _i===""?zo=_i:Number.isNaN(Number(_i))?zo=Jr:_i>=xr?zo=xr:zo=Number(_i),zo}function bn(Ri){return St(Ri)&&Ri!==Xi&&St(nn)&&nn>0}var Pr=nn>Ti?we:!1;function Er(Ri){(Ri.keyCode===ye.Z.UP||Ri.keyCode===ye.Z.DOWN)&&Ri.preventDefault()}function Zi(Ri){var _i=Zn(Ri);switch(_i!==Jr&&Do(_i),Ri.keyCode){case ye.Z.ENTER:br(_i);break;case ye.Z.UP:br(_i-1);break;case ye.Z.DOWN:br(_i+1);break;default:break}}function _r(Ri){br(Zn(Ri))}function ho(Ri){var _i=Mt(Ri,Ti,nn),xr=Xi>_i&&_i!==0?_i:Xi;Di(Ri),Do(xr),It==null||It(Xi,Ri),zr(xr),Yn==null||Yn(xr,Ri)}function br(Ri){if(bn(Ri)&&!Yt){var _i=Mt(void 0,Ti,nn),xr=Ri;return Ri>_i?xr=_i:Ri<1&&(xr=1),xr!==Jr&&Do(xr),zr(xr),Yn==null||Yn(xr,Ti),xr}return Xi}var $e=Xi>1,Oe=Xi<Mt(void 0,Ti,nn);function Me(){$e&&br(Xi-1)}function Pi(){Oe&&br(Xi+1)}function Vi(){br(bo)}function rr(){br(ko)}function Dn(Ri,_i){if(Ri.key==="Enter"||Ri.charCode===ye.Z.ENTER||Ri.keyCode===ye.Z.ENTER){for(var xr=arguments.length,zo=new Array(xr>2?xr-2:0),Mo=2;Mo<xr;Mo++)zo[Mo-2]=arguments[Mo];_i.apply(void 0,zo)}}function pi(Ri){Dn(Ri,Me)}function Ze(Ri){Dn(Ri,Pi)}function je(Ri){Dn(Ri,Vi)}function mi(Ri){Dn(Ri,rr)}function $t(Ri){var _i=kn(Ri,"prev",Ct(ai,"prev page"));return ie.isValidElement(_i)?ie.cloneElement(_i,{disabled:!$e}):_i}function pn(Ri){var _i=kn(Ri,"next",Ct(xi,"next page"));return ie.isValidElement(_i)?ie.cloneElement(_i,{disabled:!Oe}):_i}function ei(Ri){(Ri.type==="click"||Ri.keyCode===ye.Z.ENTER)&&br(Jr)}var Bi=null,_e=(0,Nt.Z)(jt,{aria:!0,data:!0}),un=Le&&ie.createElement("li",{className:"".concat(ge,"-total-text")},Le(nn,[nn===0?0:(Xi-1)*Ti+1,Xi*Ti>nn?nn:Xi*Ti])),$n=null,vi=Mt(void 0,Ti,nn);if(Be&&nn<=Ti)return null;var Oi=[],Ei={rootPrefixCls:ge,onClick:br,onKeyPress:Dn,showTitle:Nn,itemRender:kn,page:-1},ri=Xi-1>0?Xi-1:0,bi=Xi+1<vi?Xi+1:vi,Sr=we&&we.goButton,mr=(0,Pe.Z)(pe)==="object"?pe.readOnly:!pe,wr=Sr,an=null;pe&&(Sr&&(typeof Sr=="boolean"?wr=ie.createElement("button",{type:"button",onClick:ei,onKeyUp:ei},xt.jump_to_confirm):wr=ie.createElement("span",{onClick:ei,onKeyUp:ei},Sr),wr=ie.createElement("li",{title:Nn?"".concat(xt.jump_to).concat(Xi,"/").concat(vi):null,className:"".concat(ge,"-simple-pager")},wr)),an=ie.createElement("li",{title:Nn?"".concat(Xi,"/").concat(vi):null,className:"".concat(ge,"-simple-pager")},mr?Jr:ie.createElement("input",{type:"text","aria-label":xt.jump_to,value:Jr,disabled:Yt,onKeyDown:Er,onKeyUp:Zi,onChange:Zi,onBlur:_r,size:3}),ie.createElement("span",{className:"".concat(ge,"-slash")},"/"),vi));var wo=sn?1:2;if(vi<=3+wo*2){vi||Oi.push(ie.createElement(lt,(0,ee.Z)({},Ei,{key:"noPager",page:1,className:"".concat(ge,"-item-disabled")})));for(var Ar=1;Ar<=vi;Ar+=1)Oi.push(ie.createElement(lt,(0,ee.Z)({},Ei,{key:Ar,page:Ar,active:Xi===Ar})))}else{var mo=sn?xt.prev_3:xt.prev_5,Ve=sn?xt.next_3:xt.next_5,ni=kn(bo,"jump-prev",Ct(In,"prev page")),Ni=kn(ko,"jump-next",Ct(gn,"next page"));An&&(Bi=ni?ie.createElement("li",{title:Nn?mo:null,key:"prev",onClick:Vi,tabIndex:0,onKeyDown:je,className:se()("".concat(ge,"-jump-prev"),(0,Dt.Z)({},"".concat(ge,"-jump-prev-custom-icon"),!!In))},ni):null,$n=Ni?ie.createElement("li",{title:Nn?Ve:null,key:"next",onClick:rr,tabIndex:0,onKeyDown:mi,className:se()("".concat(ge,"-jump-next"),(0,Dt.Z)({},"".concat(ge,"-jump-next-custom-icon"),!!gn))},Ni):null);var Hi=Math.max(1,Xi-wo),Ii=Math.min(Xi+wo,vi);Xi-1<=wo&&(Ii=1+wo*2),vi-Xi<=wo&&(Hi=vi-wo*2);for(var Qi=Hi;Qi<=Ii;Qi+=1)Oi.push(ie.createElement(lt,(0,ee.Z)({},Ei,{key:Qi,page:Qi,active:Xi===Qi})));if(Xi-1>=wo*2&&Xi!==3&&(Oi[0]=ie.cloneElement(Oi[0],{className:se()("".concat(ge,"-item-after-jump-prev"),Oi[0].props.className)}),Oi.unshift(Bi)),vi-Xi>=wo*2&&Xi!==vi-2){var Or=Oi[Oi.length-1];Oi[Oi.length-1]=ie.cloneElement(Or,{className:se()("".concat(ge,"-item-before-jump-next"),Or.props.className)}),Oi.push($n)}Hi!==1&&Oi.unshift(ie.createElement(lt,(0,ee.Z)({},Ei,{key:1,page:1}))),Ii!==vi&&Oi.push(ie.createElement(lt,(0,ee.Z)({},Ei,{key:vi,page:vi})))}var Lr=$t(ri);if(Lr){var Nr=!$e||!vi;Lr=ie.createElement("li",{title:Nn?xt.prev_page:null,onClick:Me,tabIndex:Nr?null:0,onKeyDown:pi,className:se()("".concat(ge,"-prev"),(0,Dt.Z)({},"".concat(ge,"-disabled"),Nr)),"aria-disabled":Nr},Lr)}var Rr=pn(bi);if(Rr){var dn,$r;pe?(dn=!Oe,$r=$e?0:null):(dn=!Oe||!vi,$r=dn?null:0),Rr=ie.createElement("li",{title:Nn?xt.next_page:null,onClick:Pi,tabIndex:$r,onKeyDown:Ze,className:se()("".concat(ge,"-next"),(0,Dt.Z)({},"".concat(ge,"-disabled"),dn)),"aria-disabled":dn},Rr)}var cn=se()(ge,Re,(0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)({},"".concat(ge,"-start"),vn==="start"),"".concat(ge,"-center"),vn==="center"),"".concat(ge,"-end"),vn==="end"),"".concat(ge,"-simple"),pe),"".concat(ge,"-disabled"),Yt));return ie.createElement("ul",(0,ee.Z)({className:cn,style:Ft,ref:Gn},_e),un,Lr,pe?an:Oi,Rr,ie.createElement(et,{locale:xt,rootPrefixCls:ge,disabled:Yt,selectPrefixCls:Fe,changeSize:ho,pageSize:Ti,pageSizeOptions:Ee,quickGo:Pr?br:null,goButton:wr,showSizeChanger:ve,sizeChangerRender:Ae}))},Ht=zt},48365:function(zn,oi,Ot){"use strict";var Dt=Ot(61186),ee=Ot.n(Dt),Pe=Ot(90111),xe=Ot.n(Pe),Se=Ot(58319),Wt=Ot.n(Se),se=Ot(23250),ze=Ot.n(se),ye=Ot(74959),Nt=Ot.n(ye),We=Ot(10238),ie=Ot.n(We),Ne=Ot(33656),bt=Ot.n(Ne);ee().extend(bt()),ee().extend(ie()),ee().extend(xe()),ee().extend(Wt()),ee().extend(ze()),ee().extend(Nt()),ee().extend(function(gt,mt){var St=mt.prototype,Mt=St.format;St.format=function(Ht){var qt=(Ht||"").replace("Wo","wo");return Mt.bind(this)(qt)}});var nt={bn_BD:"bn-bd",by_BY:"be",en_GB:"en-gb",en_US:"en",fr_BE:"fr",fr_CA:"fr-ca",hy_AM:"hy-am",kmr_IQ:"ku",nl_BE:"nl-be",pt_BR:"pt-br",zh_CN:"zh-cn",zh_HK:"zh-hk",zh_TW:"zh-tw"},et=function(mt){var St=nt[mt];return St||mt.split("_")[0]},ct=function(){},lt={getNow:function(){var mt=ee()();return typeof mt.tz=="function"?mt.tz():mt},getFixedDate:function(mt){return ee()(mt,["YYYY-M-DD","YYYY-MM-DD"])},getEndDate:function(mt){return mt.endOf("month")},getWeekDay:function(mt){var St=mt.locale("en");return St.weekday()+St.localeData().firstDayOfWeek()},getYear:function(mt){return mt.year()},getMonth:function(mt){return mt.month()},getDate:function(mt){return mt.date()},getHour:function(mt){return mt.hour()},getMinute:function(mt){return mt.minute()},getSecond:function(mt){return mt.second()},getMillisecond:function(mt){return mt.millisecond()},addYear:function(mt,St){return mt.add(St,"year")},addMonth:function(mt,St){return mt.add(St,"month")},addDate:function(mt,St){return mt.add(St,"day")},setYear:function(mt,St){return mt.year(St)},setMonth:function(mt,St){return mt.month(St)},setDate:function(mt,St){return mt.date(St)},setHour:function(mt,St){return mt.hour(St)},setMinute:function(mt,St){return mt.minute(St)},setSecond:function(mt,St){return mt.second(St)},setMillisecond:function(mt,St){return mt.millisecond(St)},isAfter:function(mt,St){return mt.isAfter(St)},isValidate:function(mt){return mt.isValid()},locale:{getWeekFirstDay:function(mt){return ee()().locale(et(mt)).localeData().firstDayOfWeek()},getWeekFirstDate:function(mt,St){return St.locale(et(mt)).weekday(0)},getWeek:function(mt,St){return St.locale(et(mt)).week()},getShortWeekDays:function(mt){return ee()().locale(et(mt)).localeData().weekdaysMin()},getShortMonths:function(mt){return ee()().locale(et(mt)).localeData().monthsShort()},format:function(mt,St,Mt){return St.locale(et(mt)).format(Mt)},parse:function(mt,St,Mt){for(var zt=et(mt),Ht=0;Ht<Mt.length;Ht+=1){var qt=Mt[Ht],jt=St;if(qt.includes("wo")||qt.includes("Wo")){for(var Jt=jt.split("-")[0],ge=jt.split("-")[1],he=ee()(Jt,"YYYY").startOf("year").locale(zt),Fe=0;Fe<=52;Fe+=1){var Re=he.add(Fe,"week");if(Re.format("Wo")===ge)return Re}return ct(),null}var Ke=ee()(jt,qt,!0).locale(zt);if(Ke.isValid())return Ke}return St&&ct(),null}}};oi.Z=lt},8571:function(zn,oi,Ot){"use strict";Ot.d(oi,{Sq:function(){return Wn},ZP:function(){return Gi}});var Dt=Ot(72308),ee=Ot(80702),Pe=Ot(77321),xe=Ot(52487),Se=Ot(70425),Wt=Ot(34280),se=Ot(2738),ze=Ot(26112),ye=Ot(48736),Nt=Ot(59301),We=Ot(49618),ie=Ot(65352),Ne=Ot(92310),bt=Ot.n(Ne);function nt(At,re){return At!==void 0?At:re?"bottomRight":"bottomLeft"}var et=Nt.createContext(null),ct=et,lt={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}}};function gt(At){var re=At.popupElement,Ut=At.popupStyle,oe=At.popupClassName,fe=At.popupAlign,De=At.transitionName,He=At.getPopupContainer,Ye=At.children,Sn=At.range,xn=At.placement,Qe=At.builtinPlacements,jn=Qe===void 0?lt:Qe,hi=At.direction,ae=At.visible,En=At.onClose,Tn=Nt.useContext(ct),wn=Tn.prefixCls,Bn="".concat(wn,"-dropdown"),Rn=nt(xn,hi==="rtl");return Nt.createElement(ie.Z,{showAction:[],hideAction:["click"],popupPlacement:Rn,builtinPlacements:jn,prefixCls:Bn,popupTransitionName:De,popup:re,popupAlign:fe,popupVisible:ae,popupClassName:bt()(oe,(0,We.Z)((0,We.Z)({},"".concat(Bn,"-range"),Sn),"".concat(Bn,"-rtl"),hi==="rtl")),popupStyle:Ut,stretch:"minWidth",getPopupContainer:He,onPopupVisibleChange:function(qn){qn||En()}},Ye)}var mt=gt;function St(At,re){for(var Ut=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0",oe=String(At);oe.length<re;)oe="".concat(Ut).concat(oe);return oe}function Mt(At){return At==null?[]:Array.isArray(At)?At:[At]}function zt(At,re,Ut){var oe=(0,ee.Z)(At);return oe[re]=Ut,oe}function Ht(At,re){var Ut={},oe=re||Object.keys(At);return oe.forEach(function(fe){At[fe]!==void 0&&(Ut[fe]=At[fe])}),Ut}function qt(At,re,Ut){if(Ut)return Ut;switch(At){case"time":return re.fieldTimeFormat;case"datetime":return re.fieldDateTimeFormat;case"month":return re.fieldMonthFormat;case"year":return re.fieldYearFormat;case"quarter":return re.fieldQuarterFormat;case"week":return re.fieldWeekFormat;default:return re.fieldDateFormat}}function jt(At,re,Ut){var oe=Ut!==void 0?Ut:re[re.length-1],fe=re.find(function(De){return At[De]});return oe!==fe?At[fe]:void 0}function Jt(At){return Ht(At,["placement","builtinPlacements","popupAlign","getPopupContainer","transitionName","direction"])}function ge(At,re,Ut,oe){var fe=Nt.useMemo(function(){return At||function(He,Ye){var Sn=He;return re&&Ye.type==="date"?re(Sn,Ye.today):Ut&&Ye.type==="month"?Ut(Sn,Ye.locale):Ye.originNode}},[At,Ut,re]),De=Nt.useCallback(function(He,Ye){return fe(He,(0,Pe.Z)((0,Pe.Z)({},Ye),{},{range:oe}))},[fe,oe]);return De}function he(At,re){var Ut=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],oe=Nt.useState([!1,!1]),fe=(0,xe.Z)(oe,2),De=fe[0],He=fe[1],Ye=function(Qe,jn){He(function(hi){return zt(hi,jn,Qe)})},Sn=Nt.useMemo(function(){return De.map(function(xn,Qe){if(xn)return!0;var jn=At[Qe];return jn?!!(!Ut[Qe]&&!jn||jn&&re(jn,{activeIndex:Qe})):!1})},[At,De,re,Ut]);return[Sn,Ye]}function Fe(At,re,Ut,oe,fe){var De="",He=[];return At&&He.push(fe?"hh":"HH"),re&&He.push("mm"),Ut&&He.push("ss"),De=He.join(":"),oe&&(De+=".SSS"),fe&&(De+=" A"),De}function Re(At,re,Ut,oe,fe,De){var He=At.fieldDateTimeFormat,Ye=At.fieldDateFormat,Sn=At.fieldTimeFormat,xn=At.fieldMonthFormat,Qe=At.fieldYearFormat,jn=At.fieldWeekFormat,hi=At.fieldQuarterFormat,ae=At.yearFormat,En=At.cellYearFormat,Tn=At.cellQuarterFormat,wn=At.dayFormat,Bn=At.cellDateFormat,Rn=Fe(re,Ut,oe,fe,De);return(0,Pe.Z)((0,Pe.Z)({},At),{},{fieldDateTimeFormat:He||"YYYY-MM-DD ".concat(Rn),fieldDateFormat:Ye||"YYYY-MM-DD",fieldTimeFormat:Sn||Rn,fieldMonthFormat:xn||"YYYY-MM",fieldYearFormat:Qe||"YYYY",fieldWeekFormat:jn||"gggg-wo",fieldQuarterFormat:hi||"YYYY-[Q]Q",yearFormat:ae||"YYYY",cellYearFormat:En||"YYYY",cellQuarterFormat:Tn||"[Q]Q",cellDateFormat:Bn||wn||"D"})}function Ke(At,re){var Ut=re.showHour,oe=re.showMinute,fe=re.showSecond,De=re.showMillisecond,He=re.use12Hours;return Nt.useMemo(function(){return Re(At,Ut,oe,fe,De,He)},[At,Ut,oe,fe,De,He])}var Mn=Ot(62853);function tn(At,re,Ut){return Ut!=null?Ut:re.some(function(oe){return At.includes(oe)})}var rn=["showNow","showHour","showMinute","showSecond","showMillisecond","use12Hours","hourStep","minuteStep","secondStep","millisecondStep","hideDisabledOptions","defaultValue","disabledHours","disabledMinutes","disabledSeconds","disabledMilliseconds","disabledTime","changeOnScroll","defaultOpenValue"];function nn(At){var re=Ht(At,rn),Ut=At.format,oe=At.picker,fe=null;return Ut&&(fe=Ut,Array.isArray(fe)&&(fe=fe[0]),fe=(0,Mn.Z)(fe)==="object"?fe.format:fe),oe==="time"&&(re.format=fe),[re,fe]}function me(At){return At&&typeof At=="string"}function Xt(At,re,Ut,oe){return[At,re,Ut,oe].some(function(fe){return fe!==void 0})}function Ue(At,re,Ut,oe,fe){var De=re,He=Ut,Ye=oe;if(!At&&!De&&!He&&!Ye&&!fe)De=!0,He=!0,Ye=!0;else if(At){var Sn,xn,Qe,jn=[De,He,Ye].some(function(En){return En===!1}),hi=[De,He,Ye].some(function(En){return En===!0}),ae=jn?!0:!hi;De=(Sn=De)!==null&&Sn!==void 0?Sn:ae,He=(xn=He)!==null&&xn!==void 0?xn:ae,Ye=(Qe=Ye)!==null&&Qe!==void 0?Qe:ae}return[De,He,Ye,fe]}function Pn(At){var re=At.showTime,Ut=nn(At),oe=(0,xe.Z)(Ut,2),fe=oe[0],De=oe[1],He=re&&(0,Mn.Z)(re)==="object"?re:{},Ye=(0,Pe.Z)((0,Pe.Z)({defaultOpenValue:He.defaultOpenValue||He.defaultValue},fe),He),Sn=Ye.showMillisecond,xn=Ye.showHour,Qe=Ye.showMinute,jn=Ye.showSecond,hi=Xt(xn,Qe,jn,Sn),ae=Ue(hi,xn,Qe,jn,Sn),En=(0,xe.Z)(ae,3);return xn=En[0],Qe=En[1],jn=En[2],[Ye,(0,Pe.Z)((0,Pe.Z)({},Ye),{},{showHour:xn,showMinute:Qe,showSecond:jn,showMillisecond:Sn}),Ye.format,De]}function Yn(At,re,Ut,oe,fe){var De=At==="time";if(At==="datetime"||De){for(var He=oe,Ye=qt(At,fe,null),Sn=Ye,xn=[re,Ut],Qe=0;Qe<xn.length;Qe+=1){var jn=Mt(xn[Qe])[0];if(me(jn)){Sn=jn;break}}var hi=He.showHour,ae=He.showMinute,En=He.showSecond,Tn=He.showMillisecond,wn=He.use12Hours,Bn=tn(Sn,["a","A","LT","LLL","LTS"],wn),Rn=Xt(hi,ae,En,Tn);Rn||(hi=tn(Sn,["H","h","k","LT","LLL"]),ae=tn(Sn,["m","LT","LLL"]),En=tn(Sn,["s","LTS"]),Tn=tn(Sn,["SSS"]));var di=Ue(Rn,hi,ae,En,Tn),qn=(0,xe.Z)(di,3);hi=qn[0],ae=qn[1],En=qn[2];var ui=re||Fe(hi,ae,En,Tn,Bn);return(0,Pe.Z)((0,Pe.Z)({},He),{},{format:ui,showHour:hi,showMinute:ae,showSecond:En,showMillisecond:Tn,use12Hours:Bn})}return null}function Be(At,re,Ut){if(re===!1)return null;var oe=re&&(0,Mn.Z)(re)==="object"?re:{};return oe.clearIcon||Ut||Nt.createElement("span",{className:"".concat(At,"-clear-btn")})}var vn=7;function Je(At,re,Ut){return!At&&!re||At===re?!0:!At||!re?!1:Ut()}function An(At,re,Ut){return Je(re,Ut,function(){var oe=Math.floor(At.getYear(re)/10),fe=Math.floor(At.getYear(Ut)/10);return oe===fe})}function we(At,re,Ut){return Je(re,Ut,function(){return At.getYear(re)===At.getYear(Ut)})}function sn(At,re){var Ut=Math.floor(At.getMonth(re)/3);return Ut+1}function ce(At,re,Ut){return Je(re,Ut,function(){return we(At,re,Ut)&&sn(At,re)===sn(At,Ut)})}function Nn(At,re,Ut){return Je(re,Ut,function(){return we(At,re,Ut)&&At.getMonth(re)===At.getMonth(Ut)})}function Ci(At,re,Ut){return Je(re,Ut,function(){return we(At,re,Ut)&&Nn(At,re,Ut)&&At.getDate(re)===At.getDate(Ut)})}function It(At,re,Ut){return Je(re,Ut,function(){return At.getHour(re)===At.getHour(Ut)&&At.getMinute(re)===At.getMinute(Ut)&&At.getSecond(re)===At.getSecond(Ut)})}function wt(At,re,Ut){return Je(re,Ut,function(){return Ci(At,re,Ut)&&It(At,re,Ut)&&At.getMillisecond(re)===At.getMillisecond(Ut)})}function xt(At,re,Ut,oe){return Je(Ut,oe,function(){var fe=At.locale.getWeekFirstDate(re,Ut),De=At.locale.getWeekFirstDate(re,oe);return we(At,fe,De)&&At.locale.getWeek(re,Ut)===At.locale.getWeek(re,oe)})}function Ft(At,re,Ut,oe,fe){switch(fe){case"date":return Ci(At,Ut,oe);case"week":return xt(At,re.locale,Ut,oe);case"month":return Nn(At,Ut,oe);case"quarter":return ce(At,Ut,oe);case"year":return we(At,Ut,oe);case"decade":return An(At,Ut,oe);case"time":return It(At,Ut,oe);default:return wt(At,Ut,oe)}}function Gt(At,re,Ut,oe){return!re||!Ut||!oe?!1:At.isAfter(oe,re)&&At.isAfter(Ut,oe)}function kt(At,re,Ut,oe,fe){return Ft(At,re,Ut,oe,fe)?!0:At.isAfter(Ut,oe)}function Yt(At,re,Ut){var oe=re.locale.getWeekFirstDay(At),fe=re.setDate(Ut,1),De=re.getWeekDay(fe),He=re.addDate(fe,oe-De);return re.getMonth(He)===re.getMonth(Ut)&&re.getDate(He)>1&&(He=re.addDate(He,-7)),He}function pe(At,re){var Ut=re.generateConfig,oe=re.locale,fe=re.format;return At?typeof fe=="function"?fe(At):Ut.locale.format(oe.locale,At,fe):""}function Le(At,re,Ut){var oe=re,fe=["getHour","getMinute","getSecond","getMillisecond"],De=["setHour","setMinute","setSecond","setMillisecond"];return De.forEach(function(He,Ye){Ut?oe=At[He](oe,At[fe[Ye]](Ut)):oe=At[He](oe,0)}),oe}function on(At,re,Ut,oe,fe){var De=(0,Se.zX)(function(He,Ye){return!!(Ut&&Ut(He,Ye)||oe&&At.isAfter(oe,He)&&!Ft(At,re,oe,He,Ye.type)||fe&&At.isAfter(He,fe)&&!Ft(At,re,fe,He,Ye.type))});return De}function ve(At,re,Ut){return Nt.useMemo(function(){var oe=qt(At,re,Ut),fe=Mt(oe),De=fe[0],He=(0,Mn.Z)(De)==="object"&&De.type==="mask"?De.format:null;return[fe.map(function(Ye){return typeof Ye=="string"||typeof Ye=="function"?Ye:Ye.format}),He]},[At,re,Ut])}function Ae(At,re,Ut){return typeof At[0]=="function"||Ut?!0:re}function Ee(At,re,Ut,oe){var fe=(0,Se.zX)(function(De,He){var Ye=(0,Pe.Z)({type:re},He);if(delete Ye.activeIndex,!At.isValidate(De)||Ut&&Ut(De,Ye))return!0;if((re==="date"||re==="time")&&oe){var Sn,xn=He&&He.activeIndex===1?"end":"start",Qe=((Sn=oe.disabledTime)===null||Sn===void 0?void 0:Sn.call(oe,De,xn,{from:Ye.from}))||{},jn=Qe.disabledHours,hi=Qe.disabledMinutes,ae=Qe.disabledSeconds,En=Qe.disabledMilliseconds,Tn=oe.disabledHours,wn=oe.disabledMinutes,Bn=oe.disabledSeconds,Rn=jn||Tn,di=hi||wn,qn=ae||Bn,ui=At.getHour(De),ci=At.getMinute(De),zi=At.getSecond(De),lr=At.getMillisecond(De);if(Rn&&Rn().includes(ui)||di&&di(ui).includes(ci)||qn&&qn(ui,ci).includes(zi)||En&&En(ui,ci,zi).includes(lr))return!0}return!1});return fe}function Ge(At){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ut=Nt.useMemo(function(){var oe=At&&Mt(At);return re&&oe&&(oe[1]=oe[1]||oe[0]),oe},[At,re]);return Ut}function kn(At,re){var Ut=At.generateConfig,oe=At.locale,fe=At.picker,De=fe===void 0?"date":fe,He=At.prefixCls,Ye=He===void 0?"rc-picker":He,Sn=At.styles,xn=Sn===void 0?{}:Sn,Qe=At.classNames,jn=Qe===void 0?{}:Qe,hi=At.order,ae=hi===void 0?!0:hi,En=At.components,Tn=En===void 0?{}:En,wn=At.inputRender,Bn=At.allowClear,Rn=At.clearIcon,di=At.needConfirm,qn=At.multiple,ui=At.format,ci=At.inputReadOnly,zi=At.disabledDate,lr=At.minDate,cr=At.maxDate,yr=At.showTime,ii=At.value,Ji=At.defaultValue,qi=At.pickerValue,ur=At.defaultPickerValue,Mi=Ge(ii),Ai=Ge(Ji),Xe=Ge(qi),Li=Ge(ur),Wi=De==="date"&&yr?"datetime":De,ar=Wi==="time"||Wi==="datetime",fr=ar||qn,Yi=di!=null?di:ar,fi=Pn(At),nr=(0,xe.Z)(fi,4),Tr=nr[0],Dr=nr[1],hr=nr[2],Yr=nr[3],Wr=Ke(oe,Dr),Cr=Nt.useMemo(function(){return Yn(Wi,hr,Yr,Tr,Wr)},[Wi,hr,Yr,Tr,Wr]),to=Nt.useMemo(function(){return(0,Pe.Z)((0,Pe.Z)({},At),{},{prefixCls:Ye,locale:Wr,picker:De,styles:xn,classNames:jn,order:ae,components:(0,Pe.Z)({input:wn},Tn),clearIcon:Be(Ye,Bn,Rn),showTime:Cr,value:Mi,defaultValue:Ai,pickerValue:Xe,defaultPickerValue:Li},re==null?void 0:re())},[At]),yo=ve(Wi,Wr,ui),qo=(0,xe.Z)(yo,2),Hr=qo[0],ta=qo[1],So=Ae(Hr,ci,qn),ca=on(Ut,oe,zi,lr,cr),Lo=Ee(Ut,De,ca,Cr),Yo=Nt.useMemo(function(){return(0,Pe.Z)((0,Pe.Z)({},to),{},{needConfirm:Yi,inputReadOnly:So,disabledDate:ca})},[to,Yi,So,ca]);return[Yo,Wi,fr,Hr,ta,Lo]}var In=Ot(16089);function gn(At,re,Ut){var oe=(0,Se.C8)(re,{value:At}),fe=(0,xe.Z)(oe,2),De=fe[0],He=fe[1],Ye=Nt.useRef(At),Sn=Nt.useRef(),xn=function(){In.Z.cancel(Sn.current)},Qe=(0,Se.zX)(function(){He(Ye.current),Ut&&De!==Ye.current&&Ut(Ye.current)}),jn=(0,Se.zX)(function(hi,ae){xn(),Ye.current=hi,hi||ae?Qe():Sn.current=(0,In.Z)(Qe)});return Nt.useEffect(function(){return xn},[]),[De,jn]}function ai(At,re){var Ut=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],oe=arguments.length>3?arguments[3]:void 0,fe=Ut.every(function(Qe){return Qe})?!1:At,De=gn(fe,re||!1,oe),He=(0,xe.Z)(De,2),Ye=He[0],Sn=He[1];function xn(Qe){var jn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!jn.inherit||Ye)&&Sn(Qe,jn.force)}return[Ye,xn]}function xi(At){var re=Nt.useRef();return Nt.useImperativeHandle(At,function(){var Ut;return{nativeElement:(Ut=re.current)===null||Ut===void 0?void 0:Ut.nativeElement,focus:function(fe){var De;(De=re.current)===null||De===void 0||De.focus(fe)},blur:function(){var fe;(fe=re.current)===null||fe===void 0||fe.blur()}}}),re}function Gn(At,re){return Nt.useMemo(function(){return At||(re?((0,ye.ZP)(!1,"`ranges` is deprecated. Please use `presets` instead."),Object.entries(re).map(function(Ut){var oe=(0,xe.Z)(Ut,2),fe=oe[0],De=oe[1];return{label:fe,value:De}})):[])},[At,re])}function Si(At,re){var Ut=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,oe=Nt.useRef(re);oe.current=re,(0,Wt.o)(function(){if(At)oe.current(At);else{var fe=(0,In.Z)(function(){oe.current(At)},Ut);return function(){In.Z.cancel(fe)}}},[At])}function _n(At){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ut=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,oe=Nt.useState(0),fe=(0,xe.Z)(oe,2),De=fe[0],He=fe[1],Ye=Nt.useState(!1),Sn=(0,xe.Z)(Ye,2),xn=Sn[0],Qe=Sn[1],jn=Nt.useRef([]),hi=Nt.useRef(null),ae=Nt.useRef(null),En=function(qn){hi.current=qn},Tn=function(qn){return hi.current===qn},wn=function(qn){Qe(qn)},Bn=function(qn){return qn&&(ae.current=qn),ae.current},Rn=function(qn){var ui=jn.current,ci=new Set(ui.filter(function(lr){return qn[lr]||re[lr]})),zi=ui[ui.length-1]===0?1:0;return ci.size>=2||At[zi]?null:zi};return Si(xn||Ut,function(){xn||(jn.current=[],En(null))}),Nt.useEffect(function(){xn&&jn.current.push(De)},[xn,De]),[xn,wn,Bn,De,He,Rn,jn.current,En,Tn]}function Ti(At,re,Ut,oe,fe,De){var He=Ut[Ut.length-1],Ye=function(xn,Qe){var jn=(0,xe.Z)(At,2),hi=jn[0],ae=jn[1],En=(0,Pe.Z)((0,Pe.Z)({},Qe),{},{from:jt(At,Ut)});return He===1&&re[0]&&hi&&!Ft(oe,fe,hi,xn,En.type)&&oe.isAfter(hi,xn)||He===0&&re[1]&&ae&&!Ft(oe,fe,ae,xn,En.type)&&oe.isAfter(xn,ae)?!0:De==null?void 0:De(xn,En)};return Ye}function Di(At,re,Ut,oe){switch(re){case"date":case"week":return At.addMonth(Ut,oe);case"month":case"quarter":return At.addYear(Ut,oe);case"year":return At.addYear(Ut,oe*10);case"decade":return At.addYear(Ut,oe*100);default:return Ut}}var $i=[];function Kr(At,re,Ut,oe,fe,De,He,Ye){var Sn=arguments.length>8&&arguments[8]!==void 0?arguments[8]:$i,xn=arguments.length>9&&arguments[9]!==void 0?arguments[9]:$i,Qe=arguments.length>10&&arguments[10]!==void 0?arguments[10]:$i,jn=arguments.length>11?arguments[11]:void 0,hi=arguments.length>12?arguments[12]:void 0,ae=arguments.length>13?arguments[13]:void 0,En=He==="time",Tn=De||0,wn=function(Xe){var Li=At.getNow();return En&&(Li=Le(At,Li)),Sn[Xe]||Ut[Xe]||Li},Bn=(0,xe.Z)(xn,2),Rn=Bn[0],di=Bn[1],qn=(0,Se.C8)(function(){return wn(0)},{value:Rn}),ui=(0,xe.Z)(qn,2),ci=ui[0],zi=ui[1],lr=(0,Se.C8)(function(){return wn(1)},{value:di}),cr=(0,xe.Z)(lr,2),yr=cr[0],ii=cr[1],Ji=Nt.useMemo(function(){var Ai=[ci,yr][Tn];return En?Ai:Le(At,Ai,Qe[Tn])},[En,ci,yr,Tn,At,Qe]),qi=function(Xe){var Li=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"panel",Wi=[zi,ii][Tn];Wi(Xe);var ar=[ci,yr];ar[Tn]=Xe,jn&&(!Ft(At,re,ci,ar[0],He)||!Ft(At,re,yr,ar[1],He))&&jn(ar,{source:Li,range:Tn===1?"end":"start",mode:oe})},ur=function(Xe,Li){if(Ye){var Wi={date:"month",week:"month",month:"year",quarter:"year"},ar=Wi[He];if(ar&&!Ft(At,re,Xe,Li,ar))return Di(At,He,Li,-1);if(He==="year"&&Xe){var fr=Math.floor(At.getYear(Xe)/10),Yi=Math.floor(At.getYear(Li)/10);if(fr!==Yi)return Di(At,He,Li,-1)}}return Li},Mi=Nt.useRef(null);return(0,Wt.Z)(function(){if(fe&&!Sn[Tn]){var Ai=En?null:At.getNow();if(Mi.current!==null&&Mi.current!==Tn?Ai=[ci,yr][Tn^1]:Ut[Tn]?Ai=Tn===0?Ut[0]:ur(Ut[0],Ut[1]):Ut[Tn^1]&&(Ai=Ut[Tn^1]),Ai){hi&&At.isAfter(hi,Ai)&&(Ai=hi);var Xe=Ye?Di(At,He,Ai,1):Ai;ae&&At.isAfter(Xe,ae)&&(Ai=Ye?Di(At,He,ae,-1):ae),qi(Ai,"reset")}}},[fe,Tn,Ut[Tn]]),Nt.useEffect(function(){fe?Mi.current=Tn:Mi.current=null},[fe,Tn]),(0,Wt.Z)(function(){fe&&Sn&&Sn[Tn]&&qi(Sn[Tn],"reset")},[fe,Tn]),[Ji,qi]}function Xi(At,re){var Ut=Nt.useRef(At),oe=Nt.useState({}),fe=(0,xe.Z)(oe,2),De=fe[1],He=function(xn){return xn&&re!==void 0?re:Ut.current},Ye=function(xn){Ut.current=xn,De({})};return[He,Ye,He(!0)]}var zr=[];function so(At,re,Ut){var oe=function(He){return He.map(function(Ye){return pe(Ye,{generateConfig:At,locale:re,format:Ut[0]})})},fe=function(He,Ye){for(var Sn=Math.max(He.length,Ye.length),xn=-1,Qe=0;Qe<Sn;Qe+=1){var jn=He[Qe]||null,hi=Ye[Qe]||null;if(jn!==hi&&!wt(At,jn,hi)){xn=Qe;break}}return[xn<0,xn!==0]};return[oe,fe]}function po(At,re){return(0,ee.Z)(At).sort(function(Ut,oe){return re.isAfter(Ut,oe)?1:-1})}function Jr(At){var re=Xi(At),Ut=(0,xe.Z)(re,2),oe=Ut[0],fe=Ut[1],De=(0,Se.zX)(function(){fe(At)});return Nt.useEffect(function(){De()},[At]),[oe,fe]}function Do(At,re,Ut,oe,fe,De,He,Ye,Sn){var xn=(0,Se.C8)(De,{value:He}),Qe=(0,xe.Z)(xn,2),jn=Qe[0],hi=Qe[1],ae=jn||zr,En=Jr(ae),Tn=(0,xe.Z)(En,2),wn=Tn[0],Bn=Tn[1],Rn=so(At,re,Ut),di=(0,xe.Z)(Rn,2),qn=di[0],ui=di[1],ci=(0,Se.zX)(function(lr){var cr=(0,ee.Z)(lr);if(oe)for(var yr=0;yr<2;yr+=1)cr[yr]=cr[yr]||null;else fe&&(cr=po(cr.filter(function(Ai){return Ai}),At));var ii=ui(wn(),cr),Ji=(0,xe.Z)(ii,2),qi=Ji[0],ur=Ji[1];if(!qi&&(Bn(cr),Ye)){var Mi=qn(cr);Ye(cr,Mi,{range:ur?"end":"start"})}}),zi=function(){Sn&&Sn(wn())};return[ae,hi,wn,ci,zi]}function Bo(At,re,Ut,oe,fe,De,He,Ye,Sn,xn){var Qe=At.generateConfig,jn=At.locale,hi=At.picker,ae=At.onChange,En=At.allowEmpty,Tn=At.order,wn=De.some(function(qi){return qi})?!1:Tn,Bn=so(Qe,jn,He),Rn=(0,xe.Z)(Bn,2),di=Rn[0],qn=Rn[1],ui=Xi(re),ci=(0,xe.Z)(ui,2),zi=ci[0],lr=ci[1],cr=(0,Se.zX)(function(){lr(re)});Nt.useEffect(function(){cr()},[re]);var yr=(0,Se.zX)(function(qi){var ur=qi===null,Mi=(0,ee.Z)(qi||zi());if(ur)for(var Ai=Math.max(De.length,Mi.length),Xe=0;Xe<Ai;Xe+=1)De[Xe]||(Mi[Xe]=null);wn&&Mi[0]&&Mi[1]&&(Mi=po(Mi,Qe)),fe(Mi);var Li=Mi,Wi=(0,xe.Z)(Li,2),ar=Wi[0],fr=Wi[1],Yi=!ar,fi=!fr,nr=En?(!Yi||En[0])&&(!fi||En[1]):!0,Tr=!Tn||Yi||fi||Ft(Qe,jn,ar,fr,hi)||Qe.isAfter(fr,ar),Dr=(De[0]||!ar||!xn(ar,{activeIndex:0}))&&(De[1]||!fr||!xn(fr,{from:ar,activeIndex:1})),hr=ur||nr&&Tr&&Dr;if(hr){Ut(Mi);var Yr=qn(Mi,re),Wr=(0,xe.Z)(Yr,1),Cr=Wr[0];ae&&!Cr&&ae(ur&&Mi.every(function(to){return!to})?null:Mi,di(Mi))}return hr}),ii=(0,Se.zX)(function(qi,ur){var Mi=zt(zi(),qi,oe()[qi]);lr(Mi),ur&&yr()}),Ji=!Ye&&!Sn;return Si(!Ji,function(){Ji&&(yr(),fe(re),cr())},2),[ii,yr]}function Ko(At,re,Ut,oe,fe){return re!=="date"&&re!=="time"?!1:Ut!==void 0?Ut:oe!==void 0?oe:!fe&&(At==="date"||At==="time")}var bo=Ot(29301);function ko(At,re,Ut,oe,fe,De){var He=At;function Ye(jn,hi,ae){var En=De[jn](He),Tn=ae.find(function(di){return di.value===En});if(!Tn||Tn.disabled){var wn=ae.filter(function(di){return!di.disabled}),Bn=(0,ee.Z)(wn).reverse(),Rn=Bn.find(function(di){return di.value<=En})||wn[0];Rn&&(En=Rn.value,He=De[hi](He,En))}return En}var Sn=Ye("getHour","setHour",re()),xn=Ye("getMinute","setMinute",Ut(Sn)),Qe=Ye("getSecond","setSecond",oe(Sn,xn));return Ye("getMillisecond","setMillisecond",fe(Sn,xn,Qe)),He}function Ct(){return[]}function Zn(At,re){for(var Ut=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,oe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,fe=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],De=arguments.length>5&&arguments[5]!==void 0?arguments[5]:2,He=[],Ye=Ut>=1?Ut|0:1,Sn=At;Sn<=re;Sn+=Ye){var xn=fe.includes(Sn);(!xn||!oe)&&He.push({label:St(Sn,De),value:Sn,disabled:xn})}return He}function bn(At){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ut=arguments.length>2?arguments[2]:void 0,oe=re||{},fe=oe.use12Hours,De=oe.hourStep,He=De===void 0?1:De,Ye=oe.minuteStep,Sn=Ye===void 0?1:Ye,xn=oe.secondStep,Qe=xn===void 0?1:xn,jn=oe.millisecondStep,hi=jn===void 0?100:jn,ae=oe.hideDisabledOptions,En=oe.disabledTime,Tn=oe.disabledHours,wn=oe.disabledMinutes,Bn=oe.disabledSeconds,Rn=Nt.useMemo(function(){return Ut||At.getNow()},[Ut,At]);if(0)var di,qn,ui;var ci=Nt.useCallback(function(fr){var Yi=(En==null?void 0:En(fr))||{};return[Yi.disabledHours||Tn||Ct,Yi.disabledMinutes||wn||Ct,Yi.disabledSeconds||Bn||Ct,Yi.disabledMilliseconds||Ct]},[En,Tn,wn,Bn]),zi=Nt.useMemo(function(){return ci(Rn)},[Rn,ci]),lr=(0,xe.Z)(zi,4),cr=lr[0],yr=lr[1],ii=lr[2],Ji=lr[3],qi=Nt.useCallback(function(fr,Yi,fi,nr){var Tr=Zn(0,23,He,ae,fr()),Dr=fe?Tr.map(function(Cr){return(0,Pe.Z)((0,Pe.Z)({},Cr),{},{label:St(Cr.value%12||12,2)})}):Tr,hr=function(to){return Zn(0,59,Sn,ae,Yi(to))},Yr=function(to,yo){return Zn(0,59,Qe,ae,fi(to,yo))},Wr=function(to,yo,qo){return Zn(0,999,hi,ae,nr(to,yo,qo),3)};return[Dr,hr,Yr,Wr]},[ae,He,fe,hi,Sn,Qe]),ur=Nt.useMemo(function(){return qi(cr,yr,ii,Ji)},[qi,cr,yr,ii,Ji]),Mi=(0,xe.Z)(ur,4),Ai=Mi[0],Xe=Mi[1],Li=Mi[2],Wi=Mi[3],ar=function(Yi,fi){var nr=function(){return Ai},Tr=Xe,Dr=Li,hr=Wi;if(fi){var Yr=ci(fi),Wr=(0,xe.Z)(Yr,4),Cr=Wr[0],to=Wr[1],yo=Wr[2],qo=Wr[3],Hr=qi(Cr,to,yo,qo),ta=(0,xe.Z)(Hr,4),So=ta[0],ca=ta[1],Lo=ta[2],Yo=ta[3];nr=function(){return So},Tr=ca,Dr=Lo,hr=Yo}var ea=ko(Yi,nr,Tr,Dr,hr,At);return ea};return[ar,Ai,Xe,Li,Wi]}function Pr(At){var re=At.mode,Ut=At.internalMode,oe=At.renderExtraFooter,fe=At.showNow,De=At.showTime,He=At.onSubmit,Ye=At.onNow,Sn=At.invalid,xn=At.needConfirm,Qe=At.generateConfig,jn=At.disabledDate,hi=Nt.useContext(ct),ae=hi.prefixCls,En=hi.locale,Tn=hi.button,wn=Tn===void 0?"button":Tn,Bn=Qe.getNow(),Rn=bn(Qe,De,Bn),di=(0,xe.Z)(Rn,1),qn=di[0],ui=oe==null?void 0:oe(re),ci=jn(Bn,{type:re}),zi=function(){if(!ci){var ur=qn(Bn);Ye(ur)}},lr="".concat(ae,"-now"),cr="".concat(lr,"-btn"),yr=fe&&Nt.createElement("li",{className:lr},Nt.createElement("a",{className:bt()(cr,ci&&"".concat(cr,"-disabled")),"aria-disabled":ci,onClick:zi},Ut==="date"?En.today:En.now)),ii=xn&&Nt.createElement("li",{className:"".concat(ae,"-ok")},Nt.createElement(wn,{disabled:Sn,onClick:He},En.ok)),Ji=(yr||ii)&&Nt.createElement("ul",{className:"".concat(ae,"-ranges")},yr,ii);return!ui&&!Ji?null:Nt.createElement("div",{className:"".concat(ae,"-footer")},ui&&Nt.createElement("div",{className:"".concat(ae,"-footer-extra")},ui),Ji)}function Er(At,re,Ut){function oe(fe,De){var He=fe.findIndex(function(Sn){return Ft(At,re,Sn,De,Ut)});if(He===-1)return[].concat((0,ee.Z)(fe),[De]);var Ye=(0,ee.Z)(fe);return Ye.splice(He,1),Ye}return oe}var Zi=Nt.createContext(null);function _r(){return Nt.useContext(Zi)}function ho(At,re){var Ut=At.prefixCls,oe=At.generateConfig,fe=At.locale,De=At.disabledDate,He=At.minDate,Ye=At.maxDate,Sn=At.cellRender,xn=At.hoverValue,Qe=At.hoverRangeValue,jn=At.onHover,hi=At.values,ae=At.pickerValue,En=At.onSelect,Tn=At.prevIcon,wn=At.nextIcon,Bn=At.superPrevIcon,Rn=At.superNextIcon,di=oe.getNow(),qn={now:di,values:hi,pickerValue:ae,prefixCls:Ut,disabledDate:De,minDate:He,maxDate:Ye,cellRender:Sn,hoverValue:xn,hoverRangeValue:Qe,onHover:jn,locale:fe,generateConfig:oe,onSelect:En,panelType:re,prevIcon:Tn,nextIcon:wn,superPrevIcon:Bn,superNextIcon:Rn};return[qn,di]}var br=Nt.createContext({});function $e(At){for(var re=At.rowNum,Ut=At.colNum,oe=At.baseDate,fe=At.getCellDate,De=At.prefixColumn,He=At.rowClassName,Ye=At.titleFormat,Sn=At.getCellText,xn=At.getCellClassName,Qe=At.headerCells,jn=At.cellSelection,hi=jn===void 0?!0:jn,ae=At.disabledDate,En=_r(),Tn=En.prefixCls,wn=En.panelType,Bn=En.now,Rn=En.disabledDate,di=En.cellRender,qn=En.onHover,ui=En.hoverValue,ci=En.hoverRangeValue,zi=En.generateConfig,lr=En.values,cr=En.locale,yr=En.onSelect,ii=ae||Rn,Ji="".concat(Tn,"-cell"),qi=Nt.useContext(br),ur=qi.onCellDblClick,Mi=function(fi){return lr.some(function(nr){return nr&&Ft(zi,cr,fi,nr,wn)})},Ai=[],Xe=0;Xe<re;Xe+=1){for(var Li=[],Wi=void 0,ar=function(){var fi=Xe*Ut+fr,nr=fe(oe,fi),Tr=ii==null?void 0:ii(nr,{type:wn});fr===0&&(Wi=nr,De&&Li.push(De(Wi)));var Dr=!1,hr=!1,Yr=!1;if(hi&&ci){var Wr=(0,xe.Z)(ci,2),Cr=Wr[0],to=Wr[1];Dr=Gt(zi,Cr,to,nr),hr=Ft(zi,cr,nr,Cr,wn),Yr=Ft(zi,cr,nr,to,wn)}var yo=Ye?pe(nr,{locale:cr,format:Ye,generateConfig:zi}):void 0,qo=Nt.createElement("div",{className:"".concat(Ji,"-inner")},Sn(nr));Li.push(Nt.createElement("td",{key:fr,title:yo,className:bt()(Ji,(0,Pe.Z)((0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)({},"".concat(Ji,"-disabled"),Tr),"".concat(Ji,"-hover"),(ui||[]).some(function(Hr){return Ft(zi,cr,nr,Hr,wn)})),"".concat(Ji,"-in-range"),Dr&&!hr&&!Yr),"".concat(Ji,"-range-start"),hr),"".concat(Ji,"-range-end"),Yr),"".concat(Tn,"-cell-selected"),!ci&&wn!=="week"&&Mi(nr)),xn(nr))),onClick:function(){Tr||yr(nr)},onDoubleClick:function(){!Tr&&ur&&ur()},onMouseEnter:function(){Tr||qn==null||qn(nr)},onMouseLeave:function(){Tr||qn==null||qn(null)}},di?di(nr,{prefixCls:Tn,originNode:qo,today:Bn,type:wn,locale:cr}):qo))},fr=0;fr<Ut;fr+=1)ar();Ai.push(Nt.createElement("tr",{key:Xe,className:He==null?void 0:He(Wi)},Li))}return Nt.createElement("div",{className:"".concat(Tn,"-body")},Nt.createElement("table",{className:"".concat(Tn,"-content")},Qe&&Nt.createElement("thead",null,Nt.createElement("tr",null,Qe)),Nt.createElement("tbody",null,Ai)))}var Oe={visibility:"hidden"};function Me(At){var re=At.offset,Ut=At.superOffset,oe=At.onChange,fe=At.getStart,De=At.getEnd,He=At.children,Ye=_r(),Sn=Ye.prefixCls,xn=Ye.prevIcon,Qe=xn===void 0?"\u2039":xn,jn=Ye.nextIcon,hi=jn===void 0?"\u203A":jn,ae=Ye.superPrevIcon,En=ae===void 0?"\xAB":ae,Tn=Ye.superNextIcon,wn=Tn===void 0?"\xBB":Tn,Bn=Ye.minDate,Rn=Ye.maxDate,di=Ye.generateConfig,qn=Ye.locale,ui=Ye.pickerValue,ci=Ye.panelType,zi="".concat(Sn,"-header"),lr=Nt.useContext(br),cr=lr.hidePrev,yr=lr.hideNext,ii=lr.hideHeader,Ji=Nt.useMemo(function(){if(!Bn||!re||!De)return!1;var Yi=De(re(-1,ui));return!kt(di,qn,Yi,Bn,ci)},[Bn,re,ui,De,di,qn,ci]),qi=Nt.useMemo(function(){if(!Bn||!Ut||!De)return!1;var Yi=De(Ut(-1,ui));return!kt(di,qn,Yi,Bn,ci)},[Bn,Ut,ui,De,di,qn,ci]),ur=Nt.useMemo(function(){if(!Rn||!re||!fe)return!1;var Yi=fe(re(1,ui));return!kt(di,qn,Rn,Yi,ci)},[Rn,re,ui,fe,di,qn,ci]),Mi=Nt.useMemo(function(){if(!Rn||!Ut||!fe)return!1;var Yi=fe(Ut(1,ui));return!kt(di,qn,Rn,Yi,ci)},[Rn,Ut,ui,fe,di,qn,ci]),Ai=function(fi){re&&oe(re(fi,ui))},Xe=function(fi){Ut&&oe(Ut(fi,ui))};if(ii)return null;var Li="".concat(zi,"-prev-btn"),Wi="".concat(zi,"-next-btn"),ar="".concat(zi,"-super-prev-btn"),fr="".concat(zi,"-super-next-btn");return Nt.createElement("div",{className:zi},Ut&&Nt.createElement("button",{type:"button","aria-label":qn.previousYear,onClick:function(){return Xe(-1)},tabIndex:-1,className:bt()(ar,qi&&"".concat(ar,"-disabled")),disabled:qi,style:cr?Oe:{}},En),re&&Nt.createElement("button",{type:"button","aria-label":qn.previousMonth,onClick:function(){return Ai(-1)},tabIndex:-1,className:bt()(Li,Ji&&"".concat(Li,"-disabled")),disabled:Ji,style:cr?Oe:{}},Qe),Nt.createElement("div",{className:"".concat(zi,"-view")},He),re&&Nt.createElement("button",{type:"button","aria-label":qn.nextMonth,onClick:function(){return Ai(1)},tabIndex:-1,className:bt()(Wi,ur&&"".concat(Wi,"-disabled")),disabled:ur,style:yr?Oe:{}},hi),Ut&&Nt.createElement("button",{type:"button","aria-label":qn.nextYear,onClick:function(){return Xe(1)},tabIndex:-1,className:bt()(fr,Mi&&"".concat(fr,"-disabled")),disabled:Mi,style:yr?Oe:{}},wn))}var Pi=Me;function Vi(At){var re=At.prefixCls,Ut=At.panelName,oe=Ut===void 0?"date":Ut,fe=At.locale,De=At.generateConfig,He=At.pickerValue,Ye=At.onPickerValueChange,Sn=At.onModeChange,xn=At.mode,Qe=xn===void 0?"date":xn,jn=At.disabledDate,hi=At.onSelect,ae=At.onHover,En=At.showWeek,Tn="".concat(re,"-").concat(oe,"-panel"),wn="".concat(re,"-cell"),Bn=Qe==="week",Rn=ho(At,Qe),di=(0,xe.Z)(Rn,2),qn=di[0],ui=di[1],ci=De.locale.getWeekFirstDay(fe.locale),zi=De.setDate(He,1),lr=Yt(fe.locale,De,zi),cr=De.getMonth(He),yr=En===void 0?Bn:En,ii=yr?function(Yi){var fi=jn==null?void 0:jn(Yi,{type:"week"});return Nt.createElement("td",{key:"week",className:bt()(wn,"".concat(wn,"-week"),(0,We.Z)({},"".concat(wn,"-disabled"),fi)),onClick:function(){fi||hi(Yi)},onMouseEnter:function(){fi||ae==null||ae(Yi)},onMouseLeave:function(){fi||ae==null||ae(null)}},Nt.createElement("div",{className:"".concat(wn,"-inner")},De.locale.getWeek(fe.locale,Yi)))}:null,Ji=[],qi=fe.shortWeekDays||(De.locale.getShortWeekDays?De.locale.getShortWeekDays(fe.locale):[]);ii&&Ji.push(Nt.createElement("th",{key:"empty"},Nt.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},fe.week)));for(var ur=0;ur<vn;ur+=1)Ji.push(Nt.createElement("th",{key:ur},qi[(ur+ci)%vn]));var Mi=function(fi,nr){return De.addDate(fi,nr)},Ai=function(fi){return pe(fi,{locale:fe,format:fe.cellDateFormat,generateConfig:De})},Xe=function(fi){var nr=(0,We.Z)((0,We.Z)({},"".concat(re,"-cell-in-view"),Nn(De,fi,He)),"".concat(re,"-cell-today"),Ci(De,fi,ui));return nr},Li=fe.shortMonths||(De.locale.getShortMonths?De.locale.getShortMonths(fe.locale):[]),Wi=Nt.createElement("button",{type:"button","aria-label":fe.yearSelect,key:"year",onClick:function(){Sn("year",He)},tabIndex:-1,className:"".concat(re,"-year-btn")},pe(He,{locale:fe,format:fe.yearFormat,generateConfig:De})),ar=Nt.createElement("button",{type:"button","aria-label":fe.monthSelect,key:"month",onClick:function(){Sn("month",He)},tabIndex:-1,className:"".concat(re,"-month-btn")},fe.monthFormat?pe(He,{locale:fe,format:fe.monthFormat,generateConfig:De}):Li[cr]),fr=fe.monthBeforeYear?[ar,Wi]:[Wi,ar];return Nt.createElement(Zi.Provider,{value:qn},Nt.createElement("div",{className:bt()(Tn,En&&"".concat(Tn,"-show-week"))},Nt.createElement(Pi,{offset:function(fi){return De.addMonth(He,fi)},superOffset:function(fi){return De.addYear(He,fi)},onChange:Ye,getStart:function(fi){return De.setDate(fi,1)},getEnd:function(fi){var nr=De.setDate(fi,1);return nr=De.addMonth(nr,1),De.addDate(nr,-1)}},fr),Nt.createElement($e,(0,Dt.Z)({titleFormat:fe.fieldDateFormat},At,{colNum:vn,rowNum:6,baseDate:lr,headerCells:Ji,getCellDate:Mi,getCellText:Ai,getCellClassName:Xe,prefixColumn:ii,cellSelection:!Bn}))))}var rr=Ot(29194),Dn=1/3;function pi(At,re){var Ut=Nt.useRef(!1),oe=Nt.useRef(null),fe=Nt.useRef(null),De=function(){return Ut.current},He=function(){In.Z.cancel(oe.current),Ut.current=!1},Ye=Nt.useRef(),Sn=function(){var jn=At.current;if(fe.current=null,Ye.current=0,jn){var hi=jn.querySelector('[data-value="'.concat(re,'"]')),ae=jn.querySelector("li"),En=function Tn(){He(),Ut.current=!0,Ye.current+=1;var wn=jn.scrollTop,Bn=ae.offsetTop,Rn=hi.offsetTop,di=Rn-Bn;if(Rn===0&&hi!==ae||!(0,rr.Z)(jn)){Ye.current<=5&&(oe.current=(0,In.Z)(Tn));return}var qn=wn+(di-wn)*Dn,ui=Math.abs(di-qn);if(fe.current!==null&&fe.current<ui){He();return}if(fe.current=ui,ui<=1){jn.scrollTop=di,He();return}jn.scrollTop=qn,oe.current=(0,In.Z)(Tn)};hi&&ae&&En()}},xn=(0,Se.zX)(Sn);return[xn,He,De]}var Ze=300;function je(At){return At.map(function(re){var Ut=re.value,oe=re.label,fe=re.disabled;return[Ut,oe,fe].join(",")}).join(";")}function mi(At){var re=At.units,Ut=At.value,oe=At.optionalValue,fe=At.type,De=At.onChange,He=At.onHover,Ye=At.onDblClick,Sn=At.changeOnScroll,xn=_r(),Qe=xn.prefixCls,jn=xn.cellRender,hi=xn.now,ae=xn.locale,En="".concat(Qe,"-time-panel"),Tn="".concat(Qe,"-time-panel-cell"),wn=Nt.useRef(null),Bn=Nt.useRef(),Rn=function(){clearTimeout(Bn.current)},di=pi(wn,Ut!=null?Ut:oe),qn=(0,xe.Z)(di,3),ui=qn[0],ci=qn[1],zi=qn[2];(0,Wt.Z)(function(){return ui(),Rn(),function(){ci(),Rn()}},[Ut,oe,je(re)]);var lr=function(ii){Rn();var Ji=ii.target;!zi()&&Sn&&(Bn.current=setTimeout(function(){var qi=wn.current,ur=qi.querySelector("li").offsetTop,Mi=Array.from(qi.querySelectorAll("li")),Ai=Mi.map(function(fr){return fr.offsetTop-ur}),Xe=Ai.map(function(fr,Yi){return re[Yi].disabled?Number.MAX_SAFE_INTEGER:Math.abs(fr-Ji.scrollTop)}),Li=Math.min.apply(Math,(0,ee.Z)(Xe)),Wi=Xe.findIndex(function(fr){return fr===Li}),ar=re[Wi];ar&&!ar.disabled&&De(ar.value)},Ze))},cr="".concat(En,"-column");return Nt.createElement("ul",{className:cr,ref:wn,"data-type":fe,onScroll:lr},re.map(function(yr){var ii=yr.label,Ji=yr.value,qi=yr.disabled,ur=Nt.createElement("div",{className:"".concat(Tn,"-inner")},ii);return Nt.createElement("li",{key:Ji,className:bt()(Tn,(0,We.Z)((0,We.Z)({},"".concat(Tn,"-selected"),Ut===Ji),"".concat(Tn,"-disabled"),qi)),onClick:function(){qi||De(Ji)},onDoubleClick:function(){!qi&&Ye&&Ye()},onMouseEnter:function(){He(Ji)},onMouseLeave:function(){He(null)},"data-value":Ji},jn?jn(Ji,{prefixCls:Qe,originNode:ur,today:hi,type:"time",subType:fe,locale:ae}):ur)}))}function $t(At){return At<12}function pn(At){var re=At.showHour,Ut=At.showMinute,oe=At.showSecond,fe=At.showMillisecond,De=At.use12Hours,He=At.changeOnScroll,Ye=_r(),Sn=Ye.prefixCls,xn=Ye.values,Qe=Ye.generateConfig,jn=Ye.locale,hi=Ye.onSelect,ae=Ye.onHover,En=ae===void 0?function(){}:ae,Tn=Ye.pickerValue,wn=(xn==null?void 0:xn[0])||null,Bn=Nt.useContext(br),Rn=Bn.onCellDblClick,di=bn(Qe,At,wn),qn=(0,xe.Z)(di,5),ui=qn[0],ci=qn[1],zi=qn[2],lr=qn[3],cr=qn[4],yr=function(Un){var ia=wn&&Qe[Un](wn),le=Tn&&Qe[Un](Tn);return[ia,le]},ii=yr("getHour"),Ji=(0,xe.Z)(ii,2),qi=Ji[0],ur=Ji[1],Mi=yr("getMinute"),Ai=(0,xe.Z)(Mi,2),Xe=Ai[0],Li=Ai[1],Wi=yr("getSecond"),ar=(0,xe.Z)(Wi,2),fr=ar[0],Yi=ar[1],fi=yr("getMillisecond"),nr=(0,xe.Z)(fi,2),Tr=nr[0],Dr=nr[1],hr=qi===null?null:$t(qi)?"am":"pm",Yr=Nt.useMemo(function(){return De?$t(qi)?ci.filter(function(tr){return $t(tr.value)}):ci.filter(function(tr){return!$t(tr.value)}):ci},[qi,ci,De]),Wr=function(Un,ia){var le,ln=Un.filter(function(Ja){return!Ja.disabled});return ia!=null?ia:ln==null||(le=ln[0])===null||le===void 0?void 0:le.value},Cr=Wr(ci,qi),to=Nt.useMemo(function(){return zi(Cr)},[zi,Cr]),yo=Wr(to,Xe),qo=Nt.useMemo(function(){return lr(Cr,yo)},[lr,Cr,yo]),Hr=Wr(qo,fr),ta=Nt.useMemo(function(){return cr(Cr,yo,Hr)},[cr,Cr,yo,Hr]),So=Wr(ta,Tr),ca=Nt.useMemo(function(){if(!De)return[];var tr=Qe.getNow(),Un=Qe.setHour(tr,6),ia=Qe.setHour(tr,18),le=function(Ja,Qa){var pa=jn.cellMeridiemFormat;return pa?pe(Ja,{generateConfig:Qe,locale:jn,format:pa}):Qa};return[{label:le(Un,"AM"),value:"am",disabled:ci.every(function(ln){return ln.disabled||!$t(ln.value)})},{label:le(ia,"PM"),value:"pm",disabled:ci.every(function(ln){return ln.disabled||$t(ln.value)})}]},[ci,De,Qe,jn]),Lo=function(Un){var ia=ui(Un);hi(ia)},Yo=Nt.useMemo(function(){var tr=wn||Tn||Qe.getNow(),Un=function(le){return le!=null};return Un(qi)?(tr=Qe.setHour(tr,qi),tr=Qe.setMinute(tr,Xe),tr=Qe.setSecond(tr,fr),tr=Qe.setMillisecond(tr,Tr)):Un(ur)?(tr=Qe.setHour(tr,ur),tr=Qe.setMinute(tr,Li),tr=Qe.setSecond(tr,Yi),tr=Qe.setMillisecond(tr,Dr)):Un(Cr)&&(tr=Qe.setHour(tr,Cr),tr=Qe.setMinute(tr,yo),tr=Qe.setSecond(tr,Hr),tr=Qe.setMillisecond(tr,So)),tr},[wn,Tn,qi,Xe,fr,Tr,Cr,yo,Hr,So,ur,Li,Yi,Dr,Qe]),ea=function(Un,ia){return Un===null?null:Qe[ia](Yo,Un)},Qo=function(Un){return ea(Un,"setHour")},Oo=function(Un){return ea(Un,"setMinute")},xo=function(Un){return ea(Un,"setSecond")},oa=function(Un){return ea(Un,"setMillisecond")},Ca=function(Un){return Un===null?null:Un==="am"&&!$t(qi)?Qe.setHour(Yo,qi-12):Un==="pm"&&$t(qi)?Qe.setHour(Yo,qi+12):Yo},Wo=function(Un){Lo(Qo(Un))},Ia=function(Un){Lo(Oo(Un))},Co=function(Un){Lo(xo(Un))},lo=function(Un){Lo(oa(Un))},eo=function(Un){Lo(Ca(Un))},Uo=function(Un){En(Qo(Un))},gr=function(Un){En(Oo(Un))},Vr=function(Un){En(xo(Un))},Ki=function(Un){En(oa(Un))},sr=function(Un){En(Ca(Un))},Xr={onDblClick:Rn,changeOnScroll:He};return Nt.createElement("div",{className:"".concat(Sn,"-content")},re&&Nt.createElement(mi,(0,Dt.Z)({units:Yr,value:qi,optionalValue:ur,type:"hour",onChange:Wo,onHover:Uo},Xr)),Ut&&Nt.createElement(mi,(0,Dt.Z)({units:to,value:Xe,optionalValue:Li,type:"minute",onChange:Ia,onHover:gr},Xr)),oe&&Nt.createElement(mi,(0,Dt.Z)({units:qo,value:fr,optionalValue:Yi,type:"second",onChange:Co,onHover:Vr},Xr)),fe&&Nt.createElement(mi,(0,Dt.Z)({units:ta,value:Tr,optionalValue:Dr,type:"millisecond",onChange:lo,onHover:Ki},Xr)),De&&Nt.createElement(mi,(0,Dt.Z)({units:ca,value:hr,type:"meridiem",onChange:eo,onHover:sr},Xr)))}function ei(At){var re=At.prefixCls,Ut=At.value,oe=At.locale,fe=At.generateConfig,De=At.showTime,He=De||{},Ye=He.format,Sn="".concat(re,"-time-panel"),xn=ho(At,"time"),Qe=(0,xe.Z)(xn,1),jn=Qe[0];return Nt.createElement(Zi.Provider,{value:jn},Nt.createElement("div",{className:bt()(Sn)},Nt.createElement(Pi,null,Ut?pe(Ut,{locale:oe,format:Ye,generateConfig:fe}):"\xA0"),Nt.createElement(pn,De)))}function Bi(At){var re=At.prefixCls,Ut=At.generateConfig,oe=At.showTime,fe=At.onSelect,De=At.value,He=At.pickerValue,Ye=At.onHover,Sn="".concat(re,"-datetime-panel"),xn=bn(Ut,oe),Qe=(0,xe.Z)(xn,1),jn=Qe[0],hi=function(wn){return De?Le(Ut,wn,De):Le(Ut,wn,He)},ae=function(wn){Ye==null||Ye(wn&&hi(wn))},En=function(wn){var Bn=hi(wn);fe(jn(Bn,Bn))};return Nt.createElement("div",{className:Sn},Nt.createElement(Vi,(0,Dt.Z)({},At,{onSelect:En,onHover:ae})),Nt.createElement(ei,At))}function _e(At){var re=At.prefixCls,Ut=At.locale,oe=At.generateConfig,fe=At.pickerValue,De=At.disabledDate,He=At.onPickerValueChange,Ye="".concat(re,"-decade-panel"),Sn=ho(At,"decade"),xn=(0,xe.Z)(Sn,1),Qe=xn[0],jn=function(ci){var zi=Math.floor(oe.getYear(ci)/100)*100;return oe.setYear(ci,zi)},hi=function(ci){var zi=jn(ci);return oe.addYear(zi,99)},ae=jn(fe),En=hi(fe),Tn=oe.addYear(ae,-10),wn=function(ci,zi){return oe.addYear(ci,zi*10)},Bn=function(ci){var zi=Ut.cellYearFormat,lr=pe(ci,{locale:Ut,format:zi,generateConfig:oe}),cr=pe(oe.addYear(ci,9),{locale:Ut,format:zi,generateConfig:oe});return"".concat(lr,"-").concat(cr)},Rn=function(ci){return(0,We.Z)({},"".concat(re,"-cell-in-view"),An(oe,ci,ae)||An(oe,ci,En)||Gt(oe,ae,En,ci))},di=De?function(ui,ci){var zi=oe.setDate(ui,1),lr=oe.setMonth(zi,0),cr=oe.setYear(lr,Math.floor(oe.getYear(lr)/10)*10),yr=oe.addYear(cr,10),ii=oe.addDate(yr,-1);return De(cr,ci)&&De(ii,ci)}:null,qn="".concat(pe(ae,{locale:Ut,format:Ut.yearFormat,generateConfig:oe}),"-").concat(pe(En,{locale:Ut,format:Ut.yearFormat,generateConfig:oe}));return Nt.createElement(Zi.Provider,{value:Qe},Nt.createElement("div",{className:Ye},Nt.createElement(Pi,{superOffset:function(ci){return oe.addYear(fe,ci*100)},onChange:He,getStart:jn,getEnd:hi},qn),Nt.createElement($e,(0,Dt.Z)({},At,{disabledDate:di,colNum:3,rowNum:4,baseDate:Tn,getCellDate:wn,getCellText:Bn,getCellClassName:Rn}))))}function un(At){var re=At.prefixCls,Ut=At.locale,oe=At.generateConfig,fe=At.pickerValue,De=At.disabledDate,He=At.onPickerValueChange,Ye=At.onModeChange,Sn="".concat(re,"-month-panel"),xn=ho(At,"month"),Qe=(0,xe.Z)(xn,1),jn=Qe[0],hi=oe.setMonth(fe,0),ae=Ut.shortMonths||(oe.locale.getShortMonths?oe.locale.getShortMonths(Ut.locale):[]),En=function(qn,ui){return oe.addMonth(qn,ui)},Tn=function(qn){var ui=oe.getMonth(qn);return Ut.monthFormat?pe(qn,{locale:Ut,format:Ut.monthFormat,generateConfig:oe}):ae[ui]},wn=function(){return(0,We.Z)({},"".concat(re,"-cell-in-view"),!0)},Bn=De?function(di,qn){var ui=oe.setDate(di,1),ci=oe.setMonth(ui,oe.getMonth(ui)+1),zi=oe.addDate(ci,-1);return De(ui,qn)&&De(zi,qn)}:null,Rn=Nt.createElement("button",{type:"button",key:"year","aria-label":Ut.yearSelect,onClick:function(){Ye("year")},tabIndex:-1,className:"".concat(re,"-year-btn")},pe(fe,{locale:Ut,format:Ut.yearFormat,generateConfig:oe}));return Nt.createElement(Zi.Provider,{value:jn},Nt.createElement("div",{className:Sn},Nt.createElement(Pi,{superOffset:function(qn){return oe.addYear(fe,qn)},onChange:He,getStart:function(qn){return oe.setMonth(qn,0)},getEnd:function(qn){return oe.setMonth(qn,11)}},Rn),Nt.createElement($e,(0,Dt.Z)({},At,{disabledDate:Bn,titleFormat:Ut.fieldMonthFormat,colNum:3,rowNum:4,baseDate:hi,getCellDate:En,getCellText:Tn,getCellClassName:wn}))))}function $n(At){var re=At.prefixCls,Ut=At.locale,oe=At.generateConfig,fe=At.pickerValue,De=At.onPickerValueChange,He=At.onModeChange,Ye="".concat(re,"-quarter-panel"),Sn=ho(At,"quarter"),xn=(0,xe.Z)(Sn,1),Qe=xn[0],jn=oe.setMonth(fe,0),hi=function(Bn,Rn){return oe.addMonth(Bn,Rn*3)},ae=function(Bn){return pe(Bn,{locale:Ut,format:Ut.cellQuarterFormat,generateConfig:oe})},En=function(){return(0,We.Z)({},"".concat(re,"-cell-in-view"),!0)},Tn=Nt.createElement("button",{type:"button",key:"year","aria-label":Ut.yearSelect,onClick:function(){He("year")},tabIndex:-1,className:"".concat(re,"-year-btn")},pe(fe,{locale:Ut,format:Ut.yearFormat,generateConfig:oe}));return Nt.createElement(Zi.Provider,{value:Qe},Nt.createElement("div",{className:Ye},Nt.createElement(Pi,{superOffset:function(Bn){return oe.addYear(fe,Bn)},onChange:De,getStart:function(Bn){return oe.setMonth(Bn,0)},getEnd:function(Bn){return oe.setMonth(Bn,11)}},Tn),Nt.createElement($e,(0,Dt.Z)({},At,{titleFormat:Ut.fieldQuarterFormat,colNum:4,rowNum:1,baseDate:jn,getCellDate:hi,getCellText:ae,getCellClassName:En}))))}function vi(At){var re=At.prefixCls,Ut=At.generateConfig,oe=At.locale,fe=At.value,De=At.hoverValue,He=At.hoverRangeValue,Ye=oe.locale,Sn="".concat(re,"-week-panel-row"),xn=function(jn){var hi={};if(He){var ae=(0,xe.Z)(He,2),En=ae[0],Tn=ae[1],wn=xt(Ut,Ye,En,jn),Bn=xt(Ut,Ye,Tn,jn);hi["".concat(Sn,"-range-start")]=wn,hi["".concat(Sn,"-range-end")]=Bn,hi["".concat(Sn,"-range-hover")]=!wn&&!Bn&&Gt(Ut,En,Tn,jn)}return De&&(hi["".concat(Sn,"-hover")]=De.some(function(Rn){return xt(Ut,Ye,jn,Rn)})),bt()(Sn,(0,We.Z)({},"".concat(Sn,"-selected"),!He&&xt(Ut,Ye,fe,jn)),hi)};return Nt.createElement(Vi,(0,Dt.Z)({},At,{mode:"week",panelName:"week",rowClassName:xn}))}function Oi(At){var re=At.prefixCls,Ut=At.locale,oe=At.generateConfig,fe=At.pickerValue,De=At.disabledDate,He=At.onPickerValueChange,Ye=At.onModeChange,Sn="".concat(re,"-year-panel"),xn=ho(At,"year"),Qe=(0,xe.Z)(xn,1),jn=Qe[0],hi=function(zi){var lr=Math.floor(oe.getYear(zi)/10)*10;return oe.setYear(zi,lr)},ae=function(zi){var lr=hi(zi);return oe.addYear(lr,9)},En=hi(fe),Tn=ae(fe),wn=oe.addYear(En,-1),Bn=function(zi,lr){return oe.addYear(zi,lr)},Rn=function(zi){return pe(zi,{locale:Ut,format:Ut.cellYearFormat,generateConfig:oe})},di=function(zi){return(0,We.Z)({},"".concat(re,"-cell-in-view"),we(oe,zi,En)||we(oe,zi,Tn)||Gt(oe,En,Tn,zi))},qn=De?function(ci,zi){var lr=oe.setMonth(ci,0),cr=oe.setDate(lr,1),yr=oe.addYear(cr,1),ii=oe.addDate(yr,-1);return De(cr,zi)&&De(ii,zi)}:null,ui=Nt.createElement("button",{type:"button",key:"decade","aria-label":Ut.decadeSelect,onClick:function(){Ye("decade")},tabIndex:-1,className:"".concat(re,"-decade-btn")},pe(En,{locale:Ut,format:Ut.yearFormat,generateConfig:oe}),"-",pe(Tn,{locale:Ut,format:Ut.yearFormat,generateConfig:oe}));return Nt.createElement(Zi.Provider,{value:jn},Nt.createElement("div",{className:Sn},Nt.createElement(Pi,{superOffset:function(zi){return oe.addYear(fe,zi*10)},onChange:He,getStart:hi,getEnd:ae},ui),Nt.createElement($e,(0,Dt.Z)({},At,{disabledDate:qn,titleFormat:Ut.fieldYearFormat,colNum:3,rowNum:4,baseDate:wn,getCellDate:Bn,getCellText:Rn,getCellClassName:di}))))}var Ei={date:Vi,datetime:Bi,week:vi,month:un,quarter:$n,year:Oi,decade:_e,time:ei};function ri(At,re){var Ut,oe=At.locale,fe=At.generateConfig,De=At.direction,He=At.prefixCls,Ye=At.tabIndex,Sn=Ye===void 0?0:Ye,xn=At.multiple,Qe=At.defaultValue,jn=At.value,hi=At.onChange,ae=At.onSelect,En=At.defaultPickerValue,Tn=At.pickerValue,wn=At.onPickerValueChange,Bn=At.mode,Rn=At.onPanelChange,di=At.picker,qn=di===void 0?"date":di,ui=At.showTime,ci=At.hoverValue,zi=At.hoverRangeValue,lr=At.cellRender,cr=At.dateRender,yr=At.monthCellRender,ii=At.components,Ji=ii===void 0?{}:ii,qi=At.hideHeader,ur=((Ut=Nt.useContext(ct))===null||Ut===void 0?void 0:Ut.prefixCls)||He||"rc-picker",Mi=Nt.useRef();Nt.useImperativeHandle(re,function(){return{nativeElement:Mi.current}});var Ai=Pn(At),Xe=(0,xe.Z)(Ai,4),Li=Xe[0],Wi=Xe[1],ar=Xe[2],fr=Xe[3],Yi=Ke(oe,Wi),fi=qn==="date"&&ui?"datetime":qn,nr=Nt.useMemo(function(){return Yn(fi,ar,fr,Li,Yi)},[fi,ar,fr,Li,Yi]),Tr=fe.getNow(),Dr=(0,Se.C8)(qn,{value:Bn,postState:function(sr){return sr||"date"}}),hr=(0,xe.Z)(Dr,2),Yr=hr[0],Wr=hr[1],Cr=Yr==="date"&&nr?"datetime":Yr,to=Er(fe,oe,fi),yo=(0,Se.C8)(Qe,{value:jn}),qo=(0,xe.Z)(yo,2),Hr=qo[0],ta=qo[1],So=Nt.useMemo(function(){var Ki=Mt(Hr).filter(function(sr){return sr});return xn?Ki:Ki.slice(0,1)},[Hr,xn]),ca=(0,Se.zX)(function(Ki){ta(Ki),hi&&(Ki===null||So.length!==Ki.length||So.some(function(sr,Xr){return!Ft(fe,oe,sr,Ki[Xr],fi)}))&&(hi==null||hi(xn?Ki:Ki[0]))}),Lo=(0,Se.zX)(function(Ki){if(ae==null||ae(Ki),Yr===qn){var sr=xn?to(So,Ki):[Ki];ca(sr)}}),Yo=(0,Se.C8)(En||So[0]||Tr,{value:Tn}),ea=(0,xe.Z)(Yo,2),Qo=ea[0],Oo=ea[1];Nt.useEffect(function(){So[0]&&!Tn&&Oo(So[0])},[So[0]]);var xo=function(sr,Xr){Rn==null||Rn(sr||Tn,Xr||Yr)},oa=function(sr){var Xr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Oo(sr),wn==null||wn(sr),Xr&&xo(sr)},Ca=function(sr,Xr){Wr(sr),Xr&&oa(Xr),xo(Xr,sr)},Wo=function(sr){if(Lo(sr),oa(sr),Yr!==qn){var Xr=["decade","year"],tr=[].concat(Xr,["month"]),Un={quarter:[].concat(Xr,["quarter"]),week:[].concat((0,ee.Z)(tr),["week"]),date:[].concat((0,ee.Z)(tr),["date"])},ia=Un[qn]||tr,le=ia.indexOf(Yr),ln=ia[le+1];ln&&Ca(ln,sr)}},Ia=Nt.useMemo(function(){var Ki,sr;if(Array.isArray(zi)){var Xr=(0,xe.Z)(zi,2);Ki=Xr[0],sr=Xr[1]}else Ki=zi;return!Ki&&!sr?null:(Ki=Ki||sr,sr=sr||Ki,fe.isAfter(Ki,sr)?[sr,Ki]:[Ki,sr])},[zi,fe]),Co=ge(lr,cr,yr),lo=Ji[Cr]||Ei[Cr]||Vi,eo=Nt.useContext(br),Uo=Nt.useMemo(function(){return(0,Pe.Z)((0,Pe.Z)({},eo),{},{hideHeader:qi})},[eo,qi]),gr="".concat(ur,"-panel"),Vr=Ht(At,["showWeek","prevIcon","nextIcon","superPrevIcon","superNextIcon","disabledDate","minDate","maxDate","onHover"]);return Nt.createElement(br.Provider,{value:Uo},Nt.createElement("div",{ref:Mi,tabIndex:Sn,className:bt()(gr,(0,We.Z)({},"".concat(gr,"-rtl"),De==="rtl"))},Nt.createElement(lo,(0,Dt.Z)({},Vr,{showTime:nr,prefixCls:ur,locale:Yi,generateConfig:fe,onModeChange:Ca,pickerValue:Qo,onPickerValueChange:function(sr){oa(sr,!0)},value:So[0],onSelect:Wo,values:So,cellRender:Co,hoverRangeValue:Ia,hoverValue:ci}))))}var bi=Nt.memo(Nt.forwardRef(ri)),Sr=bi;function mr(At){var re=At.picker,Ut=At.multiplePanel,oe=At.pickerValue,fe=At.onPickerValueChange,De=At.needConfirm,He=At.onSubmit,Ye=At.range,Sn=At.hoverValue,xn=Nt.useContext(ct),Qe=xn.prefixCls,jn=xn.generateConfig,hi=Nt.useCallback(function(Rn,di){return Di(jn,re,Rn,di)},[jn,re]),ae=Nt.useMemo(function(){return hi(oe,1)},[oe,hi]),En=function(di){fe(hi(di,-1))},Tn={onCellDblClick:function(){De&&He()}},wn=re==="time",Bn=(0,Pe.Z)((0,Pe.Z)({},At),{},{hoverValue:null,hoverRangeValue:null,hideHeader:wn});return Ye?Bn.hoverRangeValue=Sn:Bn.hoverValue=Sn,Ut?Nt.createElement("div",{className:"".concat(Qe,"-panels")},Nt.createElement(br.Provider,{value:(0,Pe.Z)((0,Pe.Z)({},Tn),{},{hideNext:!0})},Nt.createElement(Sr,Bn)),Nt.createElement(br.Provider,{value:(0,Pe.Z)((0,Pe.Z)({},Tn),{},{hidePrev:!0})},Nt.createElement(Sr,(0,Dt.Z)({},Bn,{pickerValue:ae,onPickerValueChange:En})))):Nt.createElement(br.Provider,{value:(0,Pe.Z)({},Tn)},Nt.createElement(Sr,Bn))}function wr(At){return typeof At=="function"?At():At}function an(At){var re=At.prefixCls,Ut=At.presets,oe=At.onClick,fe=At.onHover;return Ut.length?Nt.createElement("div",{className:"".concat(re,"-presets")},Nt.createElement("ul",null,Ut.map(function(De,He){var Ye=De.label,Sn=De.value;return Nt.createElement("li",{key:He,onClick:function(){oe(wr(Sn))},onMouseEnter:function(){fe(wr(Sn))},onMouseLeave:function(){fe(null)}},Ye)}))):null}function wo(At){var re=At.panelRender,Ut=At.internalMode,oe=At.picker,fe=At.showNow,De=At.range,He=At.multiple,Ye=At.activeInfo,Sn=Ye===void 0?[0,0,0]:Ye,xn=At.presets,Qe=At.onPresetHover,jn=At.onPresetSubmit,hi=At.onFocus,ae=At.onBlur,En=At.onPanelMouseDown,Tn=At.direction,wn=At.value,Bn=At.onSelect,Rn=At.isInvalid,di=At.defaultOpenValue,qn=At.onOk,ui=At.onSubmit,ci=Nt.useContext(ct),zi=ci.prefixCls,lr="".concat(zi,"-panel"),cr=Tn==="rtl",yr=Nt.useRef(null),ii=Nt.useRef(null),Ji=Nt.useState(0),qi=(0,xe.Z)(Ji,2),ur=qi[0],Mi=qi[1],Ai=Nt.useState(0),Xe=(0,xe.Z)(Ai,2),Li=Xe[0],Wi=Xe[1],ar=Nt.useState(0),fr=(0,xe.Z)(ar,2),Yi=fr[0],fi=fr[1],nr=function(Wo){Wo.width&&Mi(Wo.width)},Tr=(0,xe.Z)(Sn,3),Dr=Tr[0],hr=Tr[1],Yr=Tr[2],Wr=Nt.useState(0),Cr=(0,xe.Z)(Wr,2),to=Cr[0],yo=Cr[1];Nt.useEffect(function(){yo(10)},[Dr]),Nt.useEffect(function(){if(De&&ii.current){var Ca,Wo=((Ca=yr.current)===null||Ca===void 0?void 0:Ca.offsetWidth)||0,Ia=ii.current.getBoundingClientRect();if(!Ia.height||Ia.right<0){yo(function(Uo){return Math.max(0,Uo-1)});return}var Co=(cr?hr-Wo:Dr)-Ia.left;if(fi(Co),ur&&ur<Yr){var lo=cr?Ia.right-(hr-Wo+ur):Dr+Wo-Ia.left-ur,eo=Math.max(0,lo);Wi(eo)}else Wi(0)}},[to,cr,ur,Dr,hr,Yr,De]);function qo(Ca){return Ca.filter(function(Wo){return Wo})}var Hr=Nt.useMemo(function(){return qo(Mt(wn))},[wn]),ta=oe==="time"&&!Hr.length,So=Nt.useMemo(function(){return ta?qo([di]):Hr},[ta,Hr,di]),ca=ta?di:Hr,Lo=Nt.useMemo(function(){return So.length?So.some(function(Ca){return Rn(Ca)}):!0},[So,Rn]),Yo=function(){ta&&Bn(di),qn(),ui()},ea=Nt.createElement("div",{className:"".concat(zi,"-panel-layout")},Nt.createElement(an,{prefixCls:zi,presets:xn,onClick:jn,onHover:Qe}),Nt.createElement("div",null,Nt.createElement(mr,(0,Dt.Z)({},At,{value:ca})),Nt.createElement(Pr,(0,Dt.Z)({},At,{showNow:He?!1:fe,invalid:Lo,onSubmit:Yo}))));re&&(ea=re(ea));var Qo="".concat(lr,"-container"),Oo="marginLeft",xo="marginRight",oa=Nt.createElement("div",{onMouseDown:En,tabIndex:-1,className:bt()(Qo,"".concat(zi,"-").concat(Ut,"-panel-container")),style:(0,We.Z)((0,We.Z)({},cr?xo:Oo,Li),cr?Oo:xo,"auto"),onFocus:hi,onBlur:ae},ea);return De&&(oa=Nt.createElement("div",{onMouseDown:En,ref:ii,className:bt()("".concat(zi,"-range-wrapper"),"".concat(zi,"-").concat(oe,"-range-wrapper"))},Nt.createElement("div",{ref:yr,className:"".concat(zi,"-range-arrow"),style:{left:Yi}}),Nt.createElement(bo.Z,{onResize:nr},oa))),oa}var Ar=Ot(74416);function mo(At,re){var Ut=At.format,oe=At.maskFormat,fe=At.generateConfig,De=At.locale,He=At.preserveInvalidOnBlur,Ye=At.inputReadOnly,Sn=At.required,xn=At["aria-required"],Qe=At.onSubmit,jn=At.onFocus,hi=At.onBlur,ae=At.onInputChange,En=At.onInvalid,Tn=At.open,wn=At.onOpenChange,Bn=At.onKeyDown,Rn=At.onChange,di=At.activeHelp,qn=At.name,ui=At.autoComplete,ci=At.id,zi=At.value,lr=At.invalid,cr=At.placeholder,yr=At.disabled,ii=At.activeIndex,Ji=At.allHelp,qi=At.picker,ur=function(Yi,fi){var nr=fe.locale.parse(De.locale,Yi,[fi]);return nr&&fe.isValidate(nr)?nr:null},Mi=Ut[0],Ai=Nt.useCallback(function(fr){return pe(fr,{locale:De,format:Mi,generateConfig:fe})},[De,fe,Mi]),Xe=Nt.useMemo(function(){return zi.map(Ai)},[zi,Ai]),Li=Nt.useMemo(function(){var fr=qi==="time"?8:10,Yi=typeof Mi=="function"?Mi(fe.getNow()).length:Mi.length;return Math.max(fr,Yi)+2},[Mi,qi,fe]),Wi=function(Yi){for(var fi=0;fi<Ut.length;fi+=1){var nr=Ut[fi];if(typeof nr=="string"){var Tr=ur(Yi,nr);if(Tr)return Tr}}return!1},ar=function(Yi){function fi(Dr){return Yi!==void 0?Dr[Yi]:Dr}var nr=(0,ze.Z)(At,{aria:!0,data:!0}),Tr=(0,Pe.Z)((0,Pe.Z)({},nr),{},{format:oe,validateFormat:function(hr){return!!Wi(hr)},preserveInvalidOnBlur:He,readOnly:Ye,required:Sn,"aria-required":xn,name:qn,autoComplete:ui,size:Li,id:fi(ci),value:fi(Xe)||"",invalid:fi(lr),placeholder:fi(cr),active:ii===Yi,helped:Ji||di&&ii===Yi,disabled:fi(yr),onFocus:function(hr){jn(hr,Yi)},onBlur:function(hr){hi(hr,Yi)},onSubmit:Qe,onChange:function(hr){ae();var Yr=Wi(hr);if(Yr){En(!1,Yi),Rn(Yr,Yi);return}En(!!hr,Yi)},onHelp:function(){wn(!0,{index:Yi})},onKeyDown:function(hr){var Yr=!1;if(Bn==null||Bn(hr,function(){Yr=!0}),!hr.defaultPrevented&&!Yr)switch(hr.key){case"Escape":wn(!1,{index:Yi});break;case"Enter":Tn||wn(!0);break}}},re==null?void 0:re({valueTexts:Xe}));return Object.keys(Tr).forEach(function(Dr){Tr[Dr]===void 0&&delete Tr[Dr]}),Tr};return[ar,Ai]}var Ve=["onMouseEnter","onMouseLeave"];function ni(At){return Nt.useMemo(function(){return Ht(At,Ve)},[At])}var Ni=["icon","type"],Hi=["onClear"];function Ii(At){var re=At.icon,Ut=At.type,oe=(0,Ar.Z)(At,Ni),fe=Nt.useContext(ct),De=fe.prefixCls;return re?Nt.createElement("span",(0,Dt.Z)({className:"".concat(De,"-").concat(Ut)},oe),re):null}function Qi(At){var re=At.onClear,Ut=(0,Ar.Z)(At,Hi);return Nt.createElement(Ii,(0,Dt.Z)({},Ut,{type:"clear",role:"button",onMouseDown:function(fe){fe.preventDefault()},onClick:function(fe){fe.stopPropagation(),re()}}))}var Or=Ot(96949),Lr=Ot(55090),Nr=["YYYY","MM","DD","HH","mm","ss","SSS"],Rr="\u9867",dn=function(){function At(re){(0,Or.Z)(this,At),(0,We.Z)(this,"format",void 0),(0,We.Z)(this,"maskFormat",void 0),(0,We.Z)(this,"cells",void 0),(0,We.Z)(this,"maskCells",void 0),this.format=re;var Ut=Nr.map(function(Ye){return"(".concat(Ye,")")}).join("|"),oe=new RegExp(Ut,"g");this.maskFormat=re.replace(oe,function(Ye){return Rr.repeat(Ye.length)});var fe=new RegExp("(".concat(Nr.join("|"),")")),De=(re.split(fe)||[]).filter(function(Ye){return Ye}),He=0;this.cells=De.map(function(Ye){var Sn=Nr.includes(Ye),xn=He,Qe=He+Ye.length;return He=Qe,{text:Ye,mask:Sn,start:xn,end:Qe}}),this.maskCells=this.cells.filter(function(Ye){return Ye.mask})}return(0,Lr.Z)(At,[{key:"getSelection",value:function(Ut){var oe=this.maskCells[Ut]||{},fe=oe.start,De=oe.end;return[fe||0,De||0]}},{key:"match",value:function(Ut){for(var oe=0;oe<this.maskFormat.length;oe+=1){var fe=this.maskFormat[oe],De=Ut[oe];if(!De||fe!==Rr&&fe!==De)return!1}return!0}},{key:"size",value:function(){return this.maskCells.length}},{key:"getMaskCellIndex",value:function(Ut){for(var oe=Number.MAX_SAFE_INTEGER,fe=0,De=0;De<this.maskCells.length;De+=1){var He=this.maskCells[De],Ye=He.start,Sn=He.end;if(Ut>=Ye&&Ut<=Sn)return De;var xn=Math.min(Math.abs(Ut-Ye),Math.abs(Ut-Sn));xn<oe&&(oe=xn,fe=De)}return fe}}]),At}();function $r(At){var re={YYYY:[0,9999,new Date().getFullYear()],MM:[1,12],DD:[1,31],HH:[0,23],mm:[0,59],ss:[0,59],SSS:[0,999]};return re[At]}var cn=["active","showActiveCls","suffixIcon","format","validateFormat","onChange","onInput","helped","onHelp","onSubmit","onKeyDown","preserveInvalidOnBlur","invalid","clearIcon"],Ri=Nt.forwardRef(function(At,re){var Ut=At.active,oe=At.showActiveCls,fe=oe===void 0?!0:oe,De=At.suffixIcon,He=At.format,Ye=At.validateFormat,Sn=At.onChange,xn=At.onInput,Qe=At.helped,jn=At.onHelp,hi=At.onSubmit,ae=At.onKeyDown,En=At.preserveInvalidOnBlur,Tn=En===void 0?!1:En,wn=At.invalid,Bn=At.clearIcon,Rn=(0,Ar.Z)(At,cn),di=At.value,qn=At.onFocus,ui=At.onBlur,ci=At.onMouseUp,zi=Nt.useContext(ct),lr=zi.prefixCls,cr=zi.input,yr=cr===void 0?"input":cr,ii="".concat(lr,"-input"),Ji=Nt.useState(!1),qi=(0,xe.Z)(Ji,2),ur=qi[0],Mi=qi[1],Ai=Nt.useState(di),Xe=(0,xe.Z)(Ai,2),Li=Xe[0],Wi=Xe[1],ar=Nt.useState(""),fr=(0,xe.Z)(ar,2),Yi=fr[0],fi=fr[1],nr=Nt.useState(null),Tr=(0,xe.Z)(nr,2),Dr=Tr[0],hr=Tr[1],Yr=Nt.useState(null),Wr=(0,xe.Z)(Yr,2),Cr=Wr[0],to=Wr[1],yo=Li||"";Nt.useEffect(function(){Wi(di)},[di]);var qo=Nt.useRef(),Hr=Nt.useRef();Nt.useImperativeHandle(re,function(){return{nativeElement:qo.current,inputElement:Hr.current,focus:function(sr){Hr.current.focus(sr)},blur:function(){Hr.current.blur()}}});var ta=Nt.useMemo(function(){return new dn(He||"")},[He]),So=Nt.useMemo(function(){return Qe?[0,0]:ta.getSelection(Dr)},[ta,Dr,Qe]),ca=(0,xe.Z)(So,2),Lo=ca[0],Yo=ca[1],ea=function(sr){sr&&sr!==He&&sr!==di&&jn()},Qo=(0,Se.zX)(function(Ki){Ye(Ki)&&Sn(Ki),Wi(Ki),ea(Ki)}),Oo=function(sr){if(!He){var Xr=sr.target.value;ea(Xr),Wi(Xr),Sn(Xr)}},xo=function(sr){var Xr=sr.clipboardData.getData("text");Ye(Xr)&&Qo(Xr)},oa=Nt.useRef(!1),Ca=function(){oa.current=!0},Wo=function(sr){var Xr=sr.target,tr=Xr.selectionStart,Un=ta.getMaskCellIndex(tr);hr(Un),to({}),ci==null||ci(sr),oa.current=!1},Ia=function(sr){Mi(!0),hr(0),fi(""),qn(sr)},Co=function(sr){ui(sr)},lo=function(sr){Mi(!1),Co(sr)};Si(Ut,function(){!Ut&&!Tn&&Wi(di)});var eo=function(sr){sr.key==="Enter"&&Ye(yo)&&hi(),ae==null||ae(sr)},Uo=function(sr){eo(sr);var Xr=sr.key,tr=null,Un=null,ia=Yo-Lo,le=He.slice(Lo,Yo),ln=function(Na){hr(function(ss){var ts=ss+Na;return ts=Math.max(ts,0),ts=Math.min(ts,ta.size()-1),ts})},Ja=function(Na){var ss=$r(le),ts=(0,xe.Z)(ss,3),Ws=ts[0],aa=ts[1],Mr=ts[2],Wa=yo.slice(Lo,Yo),_a=Number(Wa);if(isNaN(_a))return String(Mr||(Na>0?Ws:aa));var sa=_a+Na,no=aa-Ws+1;return String(Ws+(no+sa-Ws)%no)};switch(Xr){case"Backspace":case"Delete":tr="",Un=le;break;case"ArrowLeft":tr="",ln(-1);break;case"ArrowRight":tr="",ln(1);break;case"ArrowUp":tr="",Un=Ja(1);break;case"ArrowDown":tr="",Un=Ja(-1);break;default:isNaN(Number(Xr))||(tr=Yi+Xr,Un=tr);break}if(tr!==null&&(fi(tr),tr.length>=ia&&(ln(1),fi(""))),Un!==null){var Qa=yo.slice(0,Lo)+St(Un,ia)+yo.slice(Yo);Qo(Qa.slice(0,He.length))}to({})},gr=Nt.useRef();(0,Wt.Z)(function(){if(!(!ur||!He||oa.current)){if(!ta.match(yo)){Qo(He);return}return Hr.current.setSelectionRange(Lo,Yo),gr.current=(0,In.Z)(function(){Hr.current.setSelectionRange(Lo,Yo)}),function(){In.Z.cancel(gr.current)}}},[ta,He,ur,yo,Dr,Lo,Yo,Cr,Qo]);var Vr=He?{onFocus:Ia,onBlur:lo,onKeyDown:Uo,onMouseDown:Ca,onMouseUp:Wo,onPaste:xo}:{};return Nt.createElement("div",{ref:qo,className:bt()(ii,(0,We.Z)((0,We.Z)({},"".concat(ii,"-active"),Ut&&fe),"".concat(ii,"-placeholder"),Qe))},Nt.createElement(yr,(0,Dt.Z)({ref:Hr,"aria-invalid":wn,autoComplete:"off"},Rn,{onKeyDown:eo,onBlur:Co},Vr,{value:yo,onChange:Oo})),Nt.createElement(Ii,{type:"suffix",icon:De}),Bn)}),_i=Ri,xr=["id","prefix","clearIcon","suffixIcon","separator","activeIndex","activeHelp","allHelp","focused","onFocus","onBlur","onKeyDown","locale","generateConfig","placeholder","className","style","onClick","onClear","value","onChange","onSubmit","onInputChange","format","maskFormat","preserveInvalidOnBlur","onInvalid","disabled","invalid","inputReadOnly","direction","onOpenChange","onActiveInfo","placement","onMouseDown","required","aria-required","autoFocus","tabIndex"],zo=["index"];function Mo(At,re){var Ut=At.id,oe=At.prefix,fe=At.clearIcon,De=At.suffixIcon,He=At.separator,Ye=He===void 0?"~":He,Sn=At.activeIndex,xn=At.activeHelp,Qe=At.allHelp,jn=At.focused,hi=At.onFocus,ae=At.onBlur,En=At.onKeyDown,Tn=At.locale,wn=At.generateConfig,Bn=At.placeholder,Rn=At.className,di=At.style,qn=At.onClick,ui=At.onClear,ci=At.value,zi=At.onChange,lr=At.onSubmit,cr=At.onInputChange,yr=At.format,ii=At.maskFormat,Ji=At.preserveInvalidOnBlur,qi=At.onInvalid,ur=At.disabled,Mi=At.invalid,Ai=At.inputReadOnly,Xe=At.direction,Li=At.onOpenChange,Wi=At.onActiveInfo,ar=At.placement,fr=At.onMouseDown,Yi=At.required,fi=At["aria-required"],nr=At.autoFocus,Tr=At.tabIndex,Dr=(0,Ar.Z)(At,xr),hr=Xe==="rtl",Yr=Nt.useContext(ct),Wr=Yr.prefixCls,Cr=Nt.useMemo(function(){if(typeof Ut=="string")return[Ut];var Co=Ut||{};return[Co.start,Co.end]},[Ut]),to=Nt.useRef(),yo=Nt.useRef(),qo=Nt.useRef(),Hr=function(lo){var eo;return(eo=[yo,qo][lo])===null||eo===void 0?void 0:eo.current};Nt.useImperativeHandle(re,function(){return{nativeElement:to.current,focus:function(lo){if((0,Mn.Z)(lo)==="object"){var eo,Uo=lo||{},gr=Uo.index,Vr=gr===void 0?0:gr,Ki=(0,Ar.Z)(Uo,zo);(eo=Hr(Vr))===null||eo===void 0||eo.focus(Ki)}else{var sr;(sr=Hr(lo!=null?lo:0))===null||sr===void 0||sr.focus()}},blur:function(){var lo,eo;(lo=Hr(0))===null||lo===void 0||lo.blur(),(eo=Hr(1))===null||eo===void 0||eo.blur()}}});var ta=ni(Dr),So=Nt.useMemo(function(){return Array.isArray(Bn)?Bn:[Bn,Bn]},[Bn]),ca=mo((0,Pe.Z)((0,Pe.Z)({},At),{},{id:Cr,placeholder:So})),Lo=(0,xe.Z)(ca,1),Yo=Lo[0],ea=Nt.useState({position:"absolute",width:0}),Qo=(0,xe.Z)(ea,2),Oo=Qo[0],xo=Qo[1],oa=(0,Se.zX)(function(){var Co=Hr(Sn);if(Co){var lo=Co.nativeElement.getBoundingClientRect(),eo=to.current.getBoundingClientRect(),Uo=lo.left-eo.left;xo(function(gr){return(0,Pe.Z)((0,Pe.Z)({},gr),{},{width:lo.width,left:Uo})}),Wi([lo.left,lo.right,eo.width])}});Nt.useEffect(function(){oa()},[Sn]);var Ca=fe&&(ci[0]&&!ur[0]||ci[1]&&!ur[1]),Wo=nr&&!ur[0],Ia=nr&&!Wo&&!ur[1];return Nt.createElement(bo.Z,{onResize:oa},Nt.createElement("div",(0,Dt.Z)({},ta,{className:bt()(Wr,"".concat(Wr,"-range"),(0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)({},"".concat(Wr,"-focused"),jn),"".concat(Wr,"-disabled"),ur.every(function(Co){return Co})),"".concat(Wr,"-invalid"),Mi.some(function(Co){return Co})),"".concat(Wr,"-rtl"),hr),Rn),style:di,ref:to,onClick:qn,onMouseDown:function(lo){var eo=lo.target;eo!==yo.current.inputElement&&eo!==qo.current.inputElement&&lo.preventDefault(),fr==null||fr(lo)}}),oe&&Nt.createElement("div",{className:"".concat(Wr,"-prefix")},oe),Nt.createElement(_i,(0,Dt.Z)({ref:yo},Yo(0),{autoFocus:Wo,tabIndex:Tr,"date-range":"start"})),Nt.createElement("div",{className:"".concat(Wr,"-range-separator")},Ye),Nt.createElement(_i,(0,Dt.Z)({ref:qo},Yo(1),{autoFocus:Ia,tabIndex:Tr,"date-range":"end"})),Nt.createElement("div",{className:"".concat(Wr,"-active-bar"),style:Oo}),Nt.createElement(Ii,{type:"suffix",icon:De}),Ca&&Nt.createElement(Qi,{icon:fe,onClear:ui})))}var qr=Nt.forwardRef(Mo),vo=qr;function Te(At,re){var Ut=At!=null?At:re;return Array.isArray(Ut)?Ut:[Ut,Ut]}function hn(At){return At===1?"end":"start"}function be(At,re){var Ut=kn(At,function(){var Gr=At.disabled,Qr=At.allowEmpty,co=Te(Gr,!1),$o=Te(Qr,!1);return{disabled:co,allowEmpty:$o}}),oe=(0,xe.Z)(Ut,6),fe=oe[0],De=oe[1],He=oe[2],Ye=oe[3],Sn=oe[4],xn=oe[5],Qe=fe.prefixCls,jn=fe.styles,hi=fe.classNames,ae=fe.defaultValue,En=fe.value,Tn=fe.needConfirm,wn=fe.onKeyDown,Bn=fe.disabled,Rn=fe.allowEmpty,di=fe.disabledDate,qn=fe.minDate,ui=fe.maxDate,ci=fe.defaultOpen,zi=fe.open,lr=fe.onOpenChange,cr=fe.locale,yr=fe.generateConfig,ii=fe.picker,Ji=fe.showNow,qi=fe.showToday,ur=fe.showTime,Mi=fe.mode,Ai=fe.onPanelChange,Xe=fe.onCalendarChange,Li=fe.onOk,Wi=fe.defaultPickerValue,ar=fe.pickerValue,fr=fe.onPickerValueChange,Yi=fe.inputReadOnly,fi=fe.suffixIcon,nr=fe.onFocus,Tr=fe.onBlur,Dr=fe.presets,hr=fe.ranges,Yr=fe.components,Wr=fe.cellRender,Cr=fe.dateRender,to=fe.monthCellRender,yo=fe.onClick,qo=xi(re),Hr=ai(zi,ci,Bn,lr),ta=(0,xe.Z)(Hr,2),So=ta[0],ca=ta[1],Lo=function(Qr,co){(Bn.some(function($o){return!$o})||!Qr)&&ca(Qr,co)},Yo=Do(yr,cr,Ye,!0,!1,ae,En,Xe,Li),ea=(0,xe.Z)(Yo,5),Qo=ea[0],Oo=ea[1],xo=ea[2],oa=ea[3],Ca=ea[4],Wo=xo(),Ia=_n(Bn,Rn,So),Co=(0,xe.Z)(Ia,9),lo=Co[0],eo=Co[1],Uo=Co[2],gr=Co[3],Vr=Co[4],Ki=Co[5],sr=Co[6],Xr=Co[7],tr=Co[8],Un=function(Qr,co){eo(!0),nr==null||nr(Qr,{range:hn(co!=null?co:gr)})},ia=function(Qr,co){eo(!1),Tr==null||Tr(Qr,{range:hn(co!=null?co:gr)})},le=Nt.useMemo(function(){if(!ur)return null;var Gr=ur.disabledTime,Qr=Gr?function(co){var $o=hn(gr),es=jt(Wo,sr,gr);return Gr(co,$o,{from:es})}:void 0;return(0,Pe.Z)((0,Pe.Z)({},ur),{},{disabledTime:Qr})},[ur,gr,Wo,sr]),ln=(0,Se.C8)([ii,ii],{value:Mi}),Ja=(0,xe.Z)(ln,2),Qa=Ja[0],pa=Ja[1],Na=Qa[gr]||ii,ss=Na==="date"&&le?"datetime":Na,ts=ss===ii&&ss!=="time",Ws=Ko(ii,Na,Ji,qi,!0),aa=Bo(fe,Qo,Oo,xo,oa,Bn,Ye,lo,So,xn),Mr=(0,xe.Z)(aa,2),Wa=Mr[0],_a=Mr[1],sa=Ti(Wo,Bn,sr,yr,cr,di),no=he(Wo,xn,Rn),fa=(0,xe.Z)(no,2),ls=fa[0],ra=fa[1],us=Kr(yr,cr,Wo,Qa,So,gr,De,ts,Wi,ar,le==null?void 0:le.defaultOpenValue,fr,qn,ui),Ta=(0,xe.Z)(us,2),Fl=Ta[0],Io=Ta[1],La=(0,Se.zX)(function(Gr,Qr,co){var $o=zt(Qa,gr,Qr);if(($o[0]!==Qa[0]||$o[1]!==Qa[1])&&pa($o),Ai&&co!==!1){var es=(0,ee.Z)(Wo);Gr&&(es[gr]=Gr),Ai(es,$o)}}),Eo=function(Qr,co){return zt(Wo,co,Qr)},Xo=function(Qr,co){var $o=Wo;Qr&&($o=Eo(Qr,gr)),Xr(gr);var es=Ki($o);oa($o),Wa(gr,es===null),es===null?Lo(!1,{force:!0}):co||qo.current.focus({index:es})},ua=function(Qr){var co,$o=Qr.target.getRootNode();if(!qo.current.nativeElement.contains((co=$o.activeElement)!==null&&co!==void 0?co:document.activeElement)){var es=Bn.findIndex(function(hs){return!hs});es>=0&&qo.current.focus({index:es})}Lo(!0),yo==null||yo(Qr)},ga=function(){_a(null),Lo(!1,{force:!0})},Vo=Nt.useState(null),fl=(0,xe.Z)(Vo,2),Br=fl[0],pu=fl[1],uo=Nt.useState(null),Zl=(0,xe.Z)(uo,2),Qs=Zl[0],bl=Zl[1],mu=Nt.useMemo(function(){return Qs||Wo},[Wo,Qs]);Nt.useEffect(function(){So||bl(null)},[So]);var vu=Nt.useState([0,0,0]),Hs=(0,xe.Z)(vu,2),Vl=Hs[0],Ho=Hs[1],Gs=Gn(Dr,hr),yu=function(Qr){bl(Qr),pu("preset")},gl=function(Qr){var co=_a(Qr);co&&Lo(!1,{force:!0})},bu=function(Qr){Xo(Qr)},pl=function(Qr){bl(Qr?Eo(Qr,gr):null),pu("cell")},Po=function(Qr){Lo(!0),Un(Qr)},jo=function(){Uo("panel")},wa=function(Qr){var co=zt(Wo,gr,Qr);oa(co),!Tn&&!He&&De===ss&&Xo(Qr)},qa=function(){Lo(!1)},Ka=ge(Wr,Cr,to,hn(gr)),Nl=Wo[gr]||null,ml=(0,Se.zX)(function(Gr){return xn(Gr,{activeIndex:gr})}),Ao=Nt.useMemo(function(){var Gr=(0,ze.Z)(fe,!1),Qr=(0,se.Z)(fe,[].concat((0,ee.Z)(Object.keys(Gr)),["onChange","onCalendarChange","style","className","onPanelChange","disabledTime"]));return Qr},[fe]),io=Nt.createElement(wo,(0,Dt.Z)({},Ao,{showNow:Ws,showTime:le,range:!0,multiplePanel:ts,activeInfo:Vl,disabledDate:sa,onFocus:Po,onBlur:ia,onPanelMouseDown:jo,picker:ii,mode:Na,internalMode:ss,onPanelChange:La,format:Sn,value:Nl,isInvalid:ml,onChange:null,onSelect:wa,pickerValue:Fl,defaultOpenValue:Mt(ur==null?void 0:ur.defaultOpenValue)[gr],onPickerValueChange:Io,hoverValue:mu,onHover:pl,needConfirm:Tn,onSubmit:Xo,onOk:Ca,presets:Gs,onPresetHover:yu,onPresetSubmit:gl,onNow:bu,cellRender:Ka})),Ha=function(Qr,co){var $o=Eo(Qr,co);oa($o)},iu=function(){Uo("input")},Fd=function(Qr,co){var $o=sr.length,es=sr[$o-1];if($o&&es!==co&&Tn&&!Rn[es]&&!tr(es)&&Wo[es]){qo.current.focus({index:es});return}Uo("input"),Lo(!0,{inherit:!0}),gr!==co&&So&&!Tn&&He&&Xo(null,!0),Vr(co),Un(Qr,co)},hg=function(Qr,co){if(Lo(!1),!Tn&&Uo()==="input"){var $o=Ki(Wo);Wa(gr,$o===null)}ia(Qr,co)},tf=function(Qr,co){Qr.key==="Tab"&&Xo(null,!0),wn==null||wn(Qr,co)},Ra=Nt.useMemo(function(){return{prefixCls:Qe,locale:cr,generateConfig:yr,button:Yr.button,input:Yr.input}},[Qe,cr,yr,Yr.button,Yr.input]);if((0,Wt.Z)(function(){So&&gr!==void 0&&La(null,ii,!1)},[So,gr,ii]),(0,Wt.Z)(function(){var Gr=Uo();!So&&Gr==="input"&&(Lo(!1),Xo(null,!0)),!So&&He&&!Tn&&Gr==="panel"&&(Lo(!0),Xo())},[So]),0)var Ju;return Nt.createElement(ct.Provider,{value:Ra},Nt.createElement(mt,(0,Dt.Z)({},Jt(fe),{popupElement:io,popupStyle:jn.popup,popupClassName:hi.popup,visible:So,onClose:qa,range:!0}),Nt.createElement(vo,(0,Dt.Z)({},fe,{ref:qo,suffixIcon:fi,activeIndex:lo||So?gr:null,activeHelp:!!Qs,allHelp:!!Qs&&Br==="preset",focused:lo,onFocus:Fd,onBlur:hg,onKeyDown:tf,onSubmit:Xo,value:mu,maskFormat:Sn,onChange:Ha,onInputChange:iu,format:Ye,inputReadOnly:Yi,disabled:Bn,open:So,onOpenChange:Lo,onClick:ua,onClear:ga,invalid:ls,onInvalid:ra,onActiveInfo:Ho}))))}var Tt=Nt.forwardRef(be),Wn=Tt,Fn=Ot(11780);function Xn(At){var re=At.prefixCls,Ut=At.value,oe=At.onRemove,fe=At.removeIcon,De=fe===void 0?"\xD7":fe,He=At.formatDate,Ye=At.disabled,Sn=At.maxTagCount,xn=At.placeholder,Qe="".concat(re,"-selector"),jn="".concat(re,"-selection"),hi="".concat(jn,"-overflow");function ae(wn,Bn){return Nt.createElement("span",{className:bt()("".concat(jn,"-item")),title:typeof wn=="string"?wn:null},Nt.createElement("span",{className:"".concat(jn,"-item-content")},wn),!Ye&&Bn&&Nt.createElement("span",{onMouseDown:function(di){di.preventDefault()},onClick:Bn,className:"".concat(jn,"-item-remove")},De))}function En(wn){var Bn=He(wn),Rn=function(qn){qn&&qn.stopPropagation(),oe(wn)};return ae(Bn,Rn)}function Tn(wn){var Bn="+ ".concat(wn.length," ...");return ae(Bn)}return Nt.createElement("div",{className:Qe},Nt.createElement(Fn.Z,{prefixCls:hi,data:Ut,renderItem:En,renderRest:Tn,itemKey:function(Bn){return He(Bn)},maxCount:Sn}),!Ut.length&&Nt.createElement("span",{className:"".concat(re,"-selection-placeholder")},xn))}var si=["id","open","prefix","clearIcon","suffixIcon","activeHelp","allHelp","focused","onFocus","onBlur","onKeyDown","locale","generateConfig","placeholder","className","style","onClick","onClear","internalPicker","value","onChange","onSubmit","onInputChange","multiple","maxTagCount","format","maskFormat","preserveInvalidOnBlur","onInvalid","disabled","invalid","inputReadOnly","direction","onOpenChange","onMouseDown","required","aria-required","autoFocus","tabIndex","removeIcon"];function wi(At,re){var Ut=At.id,oe=At.open,fe=At.prefix,De=At.clearIcon,He=At.suffixIcon,Ye=At.activeHelp,Sn=At.allHelp,xn=At.focused,Qe=At.onFocus,jn=At.onBlur,hi=At.onKeyDown,ae=At.locale,En=At.generateConfig,Tn=At.placeholder,wn=At.className,Bn=At.style,Rn=At.onClick,di=At.onClear,qn=At.internalPicker,ui=At.value,ci=At.onChange,zi=At.onSubmit,lr=At.onInputChange,cr=At.multiple,yr=At.maxTagCount,ii=At.format,Ji=At.maskFormat,qi=At.preserveInvalidOnBlur,ur=At.onInvalid,Mi=At.disabled,Ai=At.invalid,Xe=At.inputReadOnly,Li=At.direction,Wi=At.onOpenChange,ar=At.onMouseDown,fr=At.required,Yi=At["aria-required"],fi=At.autoFocus,nr=At.tabIndex,Tr=At.removeIcon,Dr=(0,Ar.Z)(At,si),hr=Li==="rtl",Yr=Nt.useContext(ct),Wr=Yr.prefixCls,Cr=Nt.useRef(),to=Nt.useRef();Nt.useImperativeHandle(re,function(){return{nativeElement:Cr.current,focus:function(Oo){var xo;(xo=to.current)===null||xo===void 0||xo.focus(Oo)},blur:function(){var Oo;(Oo=to.current)===null||Oo===void 0||Oo.blur()}}});var yo=ni(Dr),qo=function(Oo){ci([Oo])},Hr=function(Oo){var xo=ui.filter(function(oa){return oa&&!Ft(En,ae,oa,Oo,qn)});ci(xo),oe||zi()},ta=mo((0,Pe.Z)((0,Pe.Z)({},At),{},{onChange:qo}),function(Qo){var Oo=Qo.valueTexts;return{value:Oo[0]||"",active:xn}}),So=(0,xe.Z)(ta,2),ca=So[0],Lo=So[1],Yo=!!(De&&ui.length&&!Mi),ea=cr?Nt.createElement(Nt.Fragment,null,Nt.createElement(Xn,{prefixCls:Wr,value:ui,onRemove:Hr,formatDate:Lo,maxTagCount:yr,disabled:Mi,removeIcon:Tr,placeholder:Tn}),Nt.createElement("input",{className:"".concat(Wr,"-multiple-input"),value:ui.map(Lo).join(","),ref:to,readOnly:!0,autoFocus:fi,tabIndex:nr}),Nt.createElement(Ii,{type:"suffix",icon:He}),Yo&&Nt.createElement(Qi,{icon:De,onClear:di})):Nt.createElement(_i,(0,Dt.Z)({ref:to},ca(),{autoFocus:fi,tabIndex:nr,suffixIcon:He,clearIcon:Yo&&Nt.createElement(Qi,{icon:De,onClear:di}),showActiveCls:!1}));return Nt.createElement("div",(0,Dt.Z)({},yo,{className:bt()(Wr,(0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)({},"".concat(Wr,"-multiple"),cr),"".concat(Wr,"-focused"),xn),"".concat(Wr,"-disabled"),Mi),"".concat(Wr,"-invalid"),Ai),"".concat(Wr,"-rtl"),hr),wn),style:Bn,ref:Cr,onClick:Rn,onMouseDown:function(Oo){var xo,oa=Oo.target;oa!==((xo=to.current)===null||xo===void 0?void 0:xo.inputElement)&&Oo.preventDefault(),ar==null||ar(Oo)}}),fe&&Nt.createElement("div",{className:"".concat(Wr,"-prefix")},fe),ea)}var yn=Nt.forwardRef(wi),Vn=yn;function Kn(At,re){var Ut=kn(At),oe=(0,xe.Z)(Ut,6),fe=oe[0],De=oe[1],He=oe[2],Ye=oe[3],Sn=oe[4],xn=oe[5],Qe=fe,jn=Qe.prefixCls,hi=Qe.styles,ae=Qe.classNames,En=Qe.order,Tn=Qe.defaultValue,wn=Qe.value,Bn=Qe.needConfirm,Rn=Qe.onChange,di=Qe.onKeyDown,qn=Qe.disabled,ui=Qe.disabledDate,ci=Qe.minDate,zi=Qe.maxDate,lr=Qe.defaultOpen,cr=Qe.open,yr=Qe.onOpenChange,ii=Qe.locale,Ji=Qe.generateConfig,qi=Qe.picker,ur=Qe.showNow,Mi=Qe.showToday,Ai=Qe.showTime,Xe=Qe.mode,Li=Qe.onPanelChange,Wi=Qe.onCalendarChange,ar=Qe.onOk,fr=Qe.multiple,Yi=Qe.defaultPickerValue,fi=Qe.pickerValue,nr=Qe.onPickerValueChange,Tr=Qe.inputReadOnly,Dr=Qe.suffixIcon,hr=Qe.removeIcon,Yr=Qe.onFocus,Wr=Qe.onBlur,Cr=Qe.presets,to=Qe.components,yo=Qe.cellRender,qo=Qe.dateRender,Hr=Qe.monthCellRender,ta=Qe.onClick,So=xi(re);function ca(Ao){return Ao===null?null:fr?Ao:Ao[0]}var Lo=Er(Ji,ii,De),Yo=ai(cr,lr,[qn],yr),ea=(0,xe.Z)(Yo,2),Qo=ea[0],Oo=ea[1],xo=function(io,Ha,iu){if(Wi){var Fd=(0,Pe.Z)({},iu);delete Fd.range,Wi(ca(io),ca(Ha),Fd)}},oa=function(io){ar==null||ar(ca(io))},Ca=Do(Ji,ii,Ye,!1,En,Tn,wn,xo,oa),Wo=(0,xe.Z)(Ca,5),Ia=Wo[0],Co=Wo[1],lo=Wo[2],eo=Wo[3],Uo=Wo[4],gr=lo(),Vr=_n([qn]),Ki=(0,xe.Z)(Vr,4),sr=Ki[0],Xr=Ki[1],tr=Ki[2],Un=Ki[3],ia=function(io){Xr(!0),Yr==null||Yr(io,{})},le=function(io){Xr(!1),Wr==null||Wr(io,{})},ln=(0,Se.C8)(qi,{value:Xe}),Ja=(0,xe.Z)(ln,2),Qa=Ja[0],pa=Ja[1],Na=Qa==="date"&&Ai?"datetime":Qa,ss=Ko(qi,Qa,ur,Mi),ts=Rn&&function(Ao,io){Rn(ca(Ao),ca(io))},Ws=Bo((0,Pe.Z)((0,Pe.Z)({},fe),{},{onChange:ts}),Ia,Co,lo,eo,[],Ye,sr,Qo,xn),aa=(0,xe.Z)(Ws,2),Mr=aa[1],Wa=he(gr,xn),_a=(0,xe.Z)(Wa,2),sa=_a[0],no=_a[1],fa=Nt.useMemo(function(){return sa.some(function(Ao){return Ao})},[sa]),ls=function(io,Ha){if(nr){var iu=(0,Pe.Z)((0,Pe.Z)({},Ha),{},{mode:Ha.mode[0]});delete iu.range,nr(io[0],iu)}},ra=Kr(Ji,ii,gr,[Qa],Qo,Un,De,!1,Yi,fi,Mt(Ai==null?void 0:Ai.defaultOpenValue),ls,ci,zi),us=(0,xe.Z)(ra,2),Ta=us[0],Fl=us[1],Io=(0,Se.zX)(function(Ao,io,Ha){if(pa(io),Li&&Ha!==!1){var iu=Ao||gr[gr.length-1];Li(iu,io)}}),La=function(){Mr(lo()),Oo(!1,{force:!0})},Eo=function(io){!qn&&!So.current.nativeElement.contains(document.activeElement)&&So.current.focus(),Oo(!0),ta==null||ta(io)},Xo=function(){Mr(null),Oo(!1,{force:!0})},ua=Nt.useState(null),ga=(0,xe.Z)(ua,2),Vo=ga[0],fl=ga[1],Br=Nt.useState(null),pu=(0,xe.Z)(Br,2),uo=pu[0],Zl=pu[1],Qs=Nt.useMemo(function(){var Ao=[uo].concat((0,ee.Z)(gr)).filter(function(io){return io});return fr?Ao:Ao.slice(0,1)},[gr,uo,fr]),bl=Nt.useMemo(function(){return!fr&&uo?[uo]:gr.filter(function(Ao){return Ao})},[gr,uo,fr]);Nt.useEffect(function(){Qo||Zl(null)},[Qo]);var mu=Gn(Cr),vu=function(io){Zl(io),fl("preset")},Hs=function(io){var Ha=fr?Lo(lo(),io):[io],iu=Mr(Ha);iu&&!fr&&Oo(!1,{force:!0})},Vl=function(io){Hs(io)},Ho=function(io){Zl(io),fl("cell")},Gs=function(io){Oo(!0),ia(io)},yu=function(io){if(tr("panel"),!(fr&&Na!==qi)){var Ha=fr?Lo(lo(),io):[io];eo(Ha),!Bn&&!He&&De===Na&&La()}},gl=function(){Oo(!1)},bu=ge(yo,qo,Hr),pl=Nt.useMemo(function(){var Ao=(0,ze.Z)(fe,!1),io=(0,se.Z)(fe,[].concat((0,ee.Z)(Object.keys(Ao)),["onChange","onCalendarChange","style","className","onPanelChange"]));return(0,Pe.Z)((0,Pe.Z)({},io),{},{multiple:fe.multiple})},[fe]),Po=Nt.createElement(wo,(0,Dt.Z)({},pl,{showNow:ss,showTime:Ai,disabledDate:ui,onFocus:Gs,onBlur:le,picker:qi,mode:Qa,internalMode:Na,onPanelChange:Io,format:Sn,value:gr,isInvalid:xn,onChange:null,onSelect:yu,pickerValue:Ta,defaultOpenValue:Ai==null?void 0:Ai.defaultOpenValue,onPickerValueChange:Fl,hoverValue:Qs,onHover:Ho,needConfirm:Bn,onSubmit:La,onOk:Uo,presets:mu,onPresetHover:vu,onPresetSubmit:Hs,onNow:Vl,cellRender:bu})),jo=function(io){eo(io)},wa=function(){tr("input")},qa=function(io){tr("input"),Oo(!0,{inherit:!0}),ia(io)},Ka=function(io){Oo(!1),le(io)},Nl=function(io,Ha){io.key==="Tab"&&La(),di==null||di(io,Ha)},ml=Nt.useMemo(function(){return{prefixCls:jn,locale:ii,generateConfig:Ji,button:to.button,input:to.input}},[jn,ii,Ji,to.button,to.input]);return(0,Wt.Z)(function(){Qo&&Un!==void 0&&Io(null,qi,!1)},[Qo,Un,qi]),(0,Wt.Z)(function(){var Ao=tr();!Qo&&Ao==="input"&&(Oo(!1),La()),!Qo&&He&&!Bn&&Ao==="panel"&&La()},[Qo]),Nt.createElement(ct.Provider,{value:ml},Nt.createElement(mt,(0,Dt.Z)({},Jt(fe),{popupElement:Po,popupStyle:hi.popup,popupClassName:ae.popup,visible:Qo,onClose:gl}),Nt.createElement(Vn,(0,Dt.Z)({},fe,{ref:So,suffixIcon:Dr,removeIcon:hr,activeHelp:!!uo,allHelp:!!uo&&Vo==="preset",focused:sr,onFocus:qa,onBlur:Ka,onKeyDown:Nl,onSubmit:La,value:bl,maskFormat:Sn,onChange:jo,onInputChange:wa,internalPicker:De,format:Ye,inputReadOnly:Tr,disabled:qn,open:Qo,onOpenChange:Oo,onClick:Eo,onClear:Xo,invalid:fa,onInvalid:function(io){no(io,0)}}))))}var Jn=Nt.forwardRef(Kn),Qn=Jn,Gi=Qn},25930:function(zn,oi,Ot){"use strict";Ot.d(oi,{Cd:function(){return ge}});var Dt=Ot(72308),ee=Ot(77321),Pe=Ot(74416),xe=Ot(59301),Se=Ot(92310),Wt=Ot.n(Se),se={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},ze=function(){var Re=(0,xe.useRef)([]),Ke=(0,xe.useRef)(null);return(0,xe.useEffect)(function(){var Mn=Date.now(),tn=!1;Re.current.forEach(function(rn){if(rn){tn=!0;var nn=rn.style;nn.transitionDuration=".3s, .3s, .3s, .06s",Ke.current&&Mn-Ke.current<100&&(nn.transitionDuration="0s, 0s")}}),tn&&(Ke.current=Date.now())}),Re.current},ye=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],Nt=function(Re){var Ke=(0,ee.Z)((0,ee.Z)({},se),Re),Mn=Ke.className,tn=Ke.percent,rn=Ke.prefixCls,nn=Ke.strokeColor,me=Ke.strokeLinecap,Xt=Ke.strokeWidth,Ue=Ke.style,Pn=Ke.trailColor,Yn=Ke.trailWidth,Be=Ke.transition,vn=(0,Pe.Z)(Ke,ye);delete vn.gapPosition;var Je=Array.isArray(tn)?tn:[tn],An=Array.isArray(nn)?nn:[nn],we=ze(),sn=Xt/2,ce=100-Xt/2,Nn="M ".concat(me==="round"?sn:0,",").concat(sn,`
|
|
L `).concat(me==="round"?ce:100,",").concat(sn),Ci="0 0 100 ".concat(Xt),It=0;return xe.createElement("svg",(0,Dt.Z)({className:Wt()("".concat(rn,"-line"),Mn),viewBox:Ci,preserveAspectRatio:"none",style:Ue},vn),xe.createElement("path",{className:"".concat(rn,"-line-trail"),d:Nn,strokeLinecap:me,stroke:Pn,strokeWidth:Yn||Xt,fillOpacity:"0"}),Je.map(function(wt,xt){var Ft=1;switch(me){case"round":Ft=1-Xt/100;break;case"square":Ft=1-Xt/2/100;break;default:Ft=1;break}var Gt={strokeDasharray:"".concat(wt*Ft,"px, 100px"),strokeDashoffset:"-".concat(It,"px"),transition:Be||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},kt=An[xt]||An[An.length-1];return It+=wt,xe.createElement("path",{key:xt,className:"".concat(rn,"-line-path"),d:Nn,strokeLinecap:me,stroke:kt,strokeWidth:Xt,fillOpacity:"0",ref:function(pe){we[xt]=pe},style:Gt})}))},We=Nt,ie=Ot(62853),Ne=Ot(52487),bt=Ot(47273),nt=0,et=(0,bt.Z)();function ct(){var Fe;return et?(Fe=nt,nt+=1):Fe="TEST_OR_SSR",Fe}var lt=function(Fe){var Re=xe.useState(),Ke=(0,Ne.Z)(Re,2),Mn=Ke[0],tn=Ke[1];return xe.useEffect(function(){tn("rc_progress_".concat(ct()))},[]),Fe||Mn},gt=function(Re){var Ke=Re.bg,Mn=Re.children;return xe.createElement("div",{style:{width:"100%",height:"100%",background:Ke}},Mn)};function mt(Fe,Re){return Object.keys(Fe).map(function(Ke){var Mn=parseFloat(Ke),tn="".concat(Math.floor(Mn*Re),"%");return"".concat(Fe[Ke]," ").concat(tn)})}var St=xe.forwardRef(function(Fe,Re){var Ke=Fe.prefixCls,Mn=Fe.color,tn=Fe.gradientId,rn=Fe.radius,nn=Fe.style,me=Fe.ptg,Xt=Fe.strokeLinecap,Ue=Fe.strokeWidth,Pn=Fe.size,Yn=Fe.gapDegree,Be=Mn&&(0,ie.Z)(Mn)==="object",vn=Be?"#FFF":void 0,Je=Pn/2,An=xe.createElement("circle",{className:"".concat(Ke,"-circle-path"),r:rn,cx:Je,cy:Je,stroke:vn,strokeLinecap:Xt,strokeWidth:Ue,opacity:me===0?0:1,style:nn,ref:Re});if(!Be)return An;var we="".concat(tn,"-conic"),sn=Yn?"".concat(180+Yn/2,"deg"):"0deg",ce=mt(Mn,(360-Yn)/360),Nn=mt(Mn,1),Ci="conic-gradient(from ".concat(sn,", ").concat(ce.join(", "),")"),It="linear-gradient(to ".concat(Yn?"bottom":"top",", ").concat(Nn.join(", "),")");return xe.createElement(xe.Fragment,null,xe.createElement("mask",{id:we},An),xe.createElement("foreignObject",{x:0,y:0,width:Pn,height:Pn,mask:"url(#".concat(we,")")},xe.createElement(gt,{bg:It},xe.createElement(gt,{bg:Ci}))))}),Mt=St,zt=100,Ht=function(Re,Ke,Mn,tn,rn,nn,me,Xt,Ue,Pn){var Yn=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,Be=Mn/100*360*((360-nn)/360),vn=nn===0?0:{bottom:0,top:180,left:90,right:-90}[me],Je=(100-tn)/100*Ke;Ue==="round"&&tn!==100&&(Je+=Pn/2,Je>=Ke&&(Je=Ke-.01));var An=zt/2;return{stroke:typeof Xt=="string"?Xt:void 0,strokeDasharray:"".concat(Ke,"px ").concat(Re),strokeDashoffset:Je+Yn,transform:"rotate(".concat(rn+Be+vn,"deg)"),transformOrigin:"".concat(An,"px ").concat(An,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},qt=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function jt(Fe){var Re=Fe!=null?Fe:[];return Array.isArray(Re)?Re:[Re]}var Jt=function(Re){var Ke=(0,ee.Z)((0,ee.Z)({},se),Re),Mn=Ke.id,tn=Ke.prefixCls,rn=Ke.steps,nn=Ke.strokeWidth,me=Ke.trailWidth,Xt=Ke.gapDegree,Ue=Xt===void 0?0:Xt,Pn=Ke.gapPosition,Yn=Ke.trailColor,Be=Ke.strokeLinecap,vn=Ke.style,Je=Ke.className,An=Ke.strokeColor,we=Ke.percent,sn=(0,Pe.Z)(Ke,qt),ce=zt/2,Nn=lt(Mn),Ci="".concat(Nn,"-gradient"),It=ce-nn/2,wt=Math.PI*2*It,xt=Ue>0?90+Ue/2:-90,Ft=wt*((360-Ue)/360),Gt=(0,ie.Z)(rn)==="object"?rn:{count:rn,gap:2},kt=Gt.count,Yt=Gt.gap,pe=jt(we),Le=jt(An),on=Le.find(function(gn){return gn&&(0,ie.Z)(gn)==="object"}),ve=on&&(0,ie.Z)(on)==="object",Ae=ve?"butt":Be,Ee=Ht(wt,Ft,0,100,xt,Ue,Pn,Yn,Ae,nn),Ge=ze(),kn=function(){var ai=0;return pe.map(function(xi,Gn){var Si=Le[Gn]||Le[Le.length-1],_n=Ht(wt,Ft,ai,xi,xt,Ue,Pn,Si,Ae,nn);return ai+=xi,xe.createElement(Mt,{key:Gn,color:Si,ptg:xi,radius:It,prefixCls:tn,gradientId:Ci,style:_n,strokeLinecap:Ae,strokeWidth:nn,gapDegree:Ue,ref:function(Di){Ge[Gn]=Di},size:zt})}).reverse()},In=function(){var ai=Math.round(kt*(pe[0]/100)),xi=100/kt,Gn=0;return new Array(kt).fill(null).map(function(Si,_n){var Ti=_n<=ai-1?Le[0]:Yn,Di=Ti&&(0,ie.Z)(Ti)==="object"?"url(#".concat(Ci,")"):void 0,$i=Ht(wt,Ft,Gn,xi,xt,Ue,Pn,Ti,"butt",nn,Yt);return Gn+=(Ft-$i.strokeDashoffset+Yt)*100/Ft,xe.createElement("circle",{key:_n,className:"".concat(tn,"-circle-path"),r:It,cx:ce,cy:ce,stroke:Di,strokeWidth:nn,opacity:1,style:$i,ref:function(Xi){Ge[_n]=Xi}})})};return xe.createElement("svg",(0,Dt.Z)({className:Wt()("".concat(tn,"-circle"),Je),viewBox:"0 0 ".concat(zt," ").concat(zt),style:vn,id:Mn,role:"presentation"},sn),!kt&&xe.createElement("circle",{className:"".concat(tn,"-circle-trail"),r:It,cx:ce,cy:ce,stroke:Yn,strokeLinecap:Ae,strokeWidth:me||nn,style:Ee}),kt?In():kn())},ge=Jt,he={Line:We,Circle:ge}},69582:function(zn,oi,Ot){"use strict";Ot.d(oi,{ZP:function(){return se}});var Dt=Ot(52487),ee=Ot(59301),Pe=Ot(47273),xe=0,Se=(0,Pe.Z)();function Wt(){var ze;return Se?(ze=xe,xe+=1):ze="TEST_OR_SSR",ze}function se(ze){var ye=ee.useState(),Nt=(0,Dt.Z)(ye,2),We=Nt[0],ie=Nt[1];return ee.useEffect(function(){ie("rc_select_".concat(Wt()))},[]),ze||We}},45560:function(zn,oi,Ot){"use strict";Ot.d(oi,{Ac:function(){return ai},Xo:function(){return Gn},Wx:function(){return _n},ZP:function(){return pi},lk:function(){return mt}});var Dt=Ot(72308),ee=Ot(80702),Pe=Ot(49618),xe=Ot(77321),Se=Ot(52487),Wt=Ot(74416),se=Ot(62853),ze=Ot(18929),ye=Ot(48736),Nt=Ot(59301),We=Ot(92310),ie=Ot.n(We),Ne=Ot(34280),bt=Ot(49658),nt=Ot(8654),et=function(je){var mi=je.className,$t=je.customizeIcon,pn=je.customizeIconProps,ei=je.children,Bi=je.onMouseDown,_e=je.onClick,un=typeof $t=="function"?$t(pn):$t;return Nt.createElement("span",{className:mi,onMouseDown:function(vi){vi.preventDefault(),Bi==null||Bi(vi)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:_e,"aria-hidden":!0},un!==void 0?un:Nt.createElement("span",{className:ie()(mi.split(/\s+/).map(function($n){return"".concat($n,"-icon")}))},ei))},ct=et,lt=function(je,mi,$t,pn,ei){var Bi=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,_e=arguments.length>6?arguments[6]:void 0,un=arguments.length>7?arguments[7]:void 0,$n=Nt.useMemo(function(){if((0,se.Z)(pn)==="object")return pn.clearIcon;if(ei)return ei},[pn,ei]),vi=Nt.useMemo(function(){return!!(!Bi&&pn&&($t.length||_e)&&!(un==="combobox"&&_e===""))},[pn,Bi,$t.length,_e,un]);return{allowClear:vi,clearIcon:Nt.createElement(ct,{className:"".concat(je,"-clear"),onMouseDown:mi,customizeIcon:$n},"\xD7")}},gt=Nt.createContext(null);function mt(){return Nt.useContext(gt)}function St(){var Ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,je=Nt.useState(!1),mi=(0,Se.Z)(je,2),$t=mi[0],pn=mi[1],ei=Nt.useRef(null),Bi=function(){window.clearTimeout(ei.current)};Nt.useEffect(function(){return Bi},[]);var _e=function($n,vi){Bi(),ei.current=window.setTimeout(function(){pn($n),vi&&vi()},Ze)};return[$t,_e,Bi]}function Mt(){var Ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,je=Nt.useRef(null),mi=Nt.useRef(null);Nt.useEffect(function(){return function(){window.clearTimeout(mi.current)}},[]);function $t(pn){(pn||je.current===null)&&(je.current=pn),window.clearTimeout(mi.current),mi.current=window.setTimeout(function(){je.current=null},Ze)}return[function(){return je.current},$t]}function zt(Ze,je,mi,$t){var pn=Nt.useRef(null);pn.current={open:je,triggerOpen:mi,customizedTrigger:$t},Nt.useEffect(function(){function ei(Bi){var _e;if(!((_e=pn.current)!==null&&_e!==void 0&&_e.customizedTrigger)){var un=Bi.target;un.shadowRoot&&Bi.composed&&(un=Bi.composedPath()[0]||un),pn.current.open&&Ze().filter(function($n){return $n}).every(function($n){return!$n.contains(un)&&$n!==un})&&pn.current.triggerOpen(!1)}}return window.addEventListener("mousedown",ei),function(){return window.removeEventListener("mousedown",ei)}},[])}var Ht=Ot(10228);function qt(Ze){return Ze&&![Ht.Z.ESC,Ht.Z.SHIFT,Ht.Z.BACKSPACE,Ht.Z.TAB,Ht.Z.WIN_KEY,Ht.Z.ALT,Ht.Z.META,Ht.Z.WIN_KEY_RIGHT,Ht.Z.CTRL,Ht.Z.SEMICOLON,Ht.Z.EQUALS,Ht.Z.CAPS_LOCK,Ht.Z.CONTEXT_MENU,Ht.Z.F1,Ht.Z.F2,Ht.Z.F3,Ht.Z.F4,Ht.Z.F5,Ht.Z.F6,Ht.Z.F7,Ht.Z.F8,Ht.Z.F9,Ht.Z.F10,Ht.Z.F11,Ht.Z.F12].includes(Ze)}var jt=Ot(26112),Jt=Ot(11780),ge=function(je,mi){var $t,pn=je.prefixCls,ei=je.id,Bi=je.inputElement,_e=je.disabled,un=je.tabIndex,$n=je.autoFocus,vi=je.autoComplete,Oi=je.editable,Ei=je.activeDescendantId,ri=je.value,bi=je.maxLength,Sr=je.onKeyDown,mr=je.onMouseDown,wr=je.onChange,an=je.onPaste,wo=je.onCompositionStart,Ar=je.onCompositionEnd,mo=je.onBlur,Ve=je.open,ni=je.attrs,Ni=Bi||Nt.createElement("input",null),Hi=Ni,Ii=Hi.ref,Qi=Hi.props,Or=Qi.onKeyDown,Lr=Qi.onChange,Nr=Qi.onMouseDown,Rr=Qi.onCompositionStart,dn=Qi.onCompositionEnd,$r=Qi.onBlur,cn=Qi.style;return(0,ye.Kp)(!("maxLength"in Ni.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Ni=Nt.cloneElement(Ni,(0,xe.Z)((0,xe.Z)((0,xe.Z)({type:"search"},Qi),{},{id:ei,ref:(0,nt.sQ)(mi,Ii),disabled:_e,tabIndex:un,autoComplete:vi||"off",autoFocus:$n,className:ie()("".concat(pn,"-selection-search-input"),($t=Ni)===null||$t===void 0||($t=$t.props)===null||$t===void 0?void 0:$t.className),role:"combobox","aria-expanded":Ve||!1,"aria-haspopup":"listbox","aria-owns":"".concat(ei,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(ei,"_list"),"aria-activedescendant":Ve?Ei:void 0},ni),{},{value:Oi?ri:"",maxLength:bi,readOnly:!Oi,unselectable:Oi?null:"on",style:(0,xe.Z)((0,xe.Z)({},cn),{},{opacity:Oi?null:0}),onKeyDown:function(_i){Sr(_i),Or&&Or(_i)},onMouseDown:function(_i){mr(_i),Nr&&Nr(_i)},onChange:function(_i){wr(_i),Lr&&Lr(_i)},onCompositionStart:function(_i){wo(_i),Rr&&Rr(_i)},onCompositionEnd:function(_i){Ar(_i),dn&&dn(_i)},onPaste:an,onBlur:function(_i){mo(_i),$r&&$r(_i)}})),Ni},he=Nt.forwardRef(ge),Fe=he;function Re(Ze){return Array.isArray(Ze)?Ze:Ze!==void 0?[Ze]:[]}var Ke=typeof window!="undefined"&&window.document&&window.document.documentElement,Mn=Ke;function tn(Ze){return Ze!=null}function rn(Ze){return!Ze&&Ze!==0}function nn(Ze){return["string","number"].includes((0,se.Z)(Ze))}function me(Ze){var je=void 0;return Ze&&(nn(Ze.title)?je=Ze.title.toString():nn(Ze.label)&&(je=Ze.label.toString())),je}function Xt(Ze,je){Mn?Nt.useLayoutEffect(Ze,je):Nt.useEffect(Ze,je)}function Ue(Ze){var je;return(je=Ze.key)!==null&&je!==void 0?je:Ze.value}var Pn=function(je){je.preventDefault(),je.stopPropagation()},Yn=function(je){var mi=je.id,$t=je.prefixCls,pn=je.values,ei=je.open,Bi=je.searchValue,_e=je.autoClearSearchValue,un=je.inputRef,$n=je.placeholder,vi=je.disabled,Oi=je.mode,Ei=je.showSearch,ri=je.autoFocus,bi=je.autoComplete,Sr=je.activeDescendantId,mr=je.tabIndex,wr=je.removeIcon,an=je.maxTagCount,wo=je.maxTagTextLength,Ar=je.maxTagPlaceholder,mo=Ar===void 0?function(wi){return"+ ".concat(wi.length," ...")}:Ar,Ve=je.tagRender,ni=je.onToggleOpen,Ni=je.onRemove,Hi=je.onInputChange,Ii=je.onInputPaste,Qi=je.onInputKeyDown,Or=je.onInputMouseDown,Lr=je.onInputCompositionStart,Nr=je.onInputCompositionEnd,Rr=je.onInputBlur,dn=Nt.useRef(null),$r=(0,Nt.useState)(0),cn=(0,Se.Z)($r,2),Ri=cn[0],_i=cn[1],xr=(0,Nt.useState)(!1),zo=(0,Se.Z)(xr,2),Mo=zo[0],qr=zo[1],vo="".concat($t,"-selection"),Te=ei||Oi==="multiple"&&_e===!1||Oi==="tags"?Bi:"",hn=Oi==="tags"||Oi==="multiple"&&_e===!1||Ei&&(ei||Mo);Xt(function(){_i(dn.current.scrollWidth)},[Te]);var be=function(yn,Vn,Kn,Jn,Qn){return Nt.createElement("span",{title:me(yn),className:ie()("".concat(vo,"-item"),(0,Pe.Z)({},"".concat(vo,"-item-disabled"),Kn))},Nt.createElement("span",{className:"".concat(vo,"-item-content")},Vn),Jn&&Nt.createElement(ct,{className:"".concat(vo,"-item-remove"),onMouseDown:Pn,onClick:Qn,customizeIcon:wr},"\xD7"))},Tt=function(yn,Vn,Kn,Jn,Qn,Gi){var At=function(Ut){Pn(Ut),ni(!ei)};return Nt.createElement("span",{onMouseDown:At},Ve({label:Vn,value:yn,disabled:Kn,closable:Jn,onClose:Qn,isMaxTag:!!Gi}))},Wn=function(yn){var Vn=yn.disabled,Kn=yn.label,Jn=yn.value,Qn=!vi&&!Vn,Gi=Kn;if(typeof wo=="number"&&(typeof Kn=="string"||typeof Kn=="number")){var At=String(Gi);At.length>wo&&(Gi="".concat(At.slice(0,wo),"..."))}var re=function(oe){oe&&oe.stopPropagation(),Ni(yn)};return typeof Ve=="function"?Tt(Jn,Gi,Vn,Qn,re):be(yn,Gi,Vn,Qn,re)},Fn=function(yn){if(!pn.length)return null;var Vn=typeof mo=="function"?mo(yn):mo;return typeof Ve=="function"?Tt(void 0,Vn,!1,!1,void 0,!0):be({title:Vn},Vn,!1)},Xn=Nt.createElement("div",{className:"".concat(vo,"-search"),style:{width:Ri},onFocus:function(){qr(!0)},onBlur:function(){qr(!1)}},Nt.createElement(Fe,{ref:un,open:ei,prefixCls:$t,id:mi,inputElement:null,disabled:vi,autoFocus:ri,autoComplete:bi,editable:hn,activeDescendantId:Sr,value:Te,onKeyDown:Qi,onMouseDown:Or,onChange:Hi,onPaste:Ii,onCompositionStart:Lr,onCompositionEnd:Nr,onBlur:Rr,tabIndex:mr,attrs:(0,jt.Z)(je,!0)}),Nt.createElement("span",{ref:dn,className:"".concat(vo,"-search-mirror"),"aria-hidden":!0},Te,"\xA0")),si=Nt.createElement(Jt.Z,{prefixCls:"".concat(vo,"-overflow"),data:pn,renderItem:Wn,renderRest:Fn,suffix:Xn,itemKey:Ue,maxCount:an});return Nt.createElement("span",{className:"".concat(vo,"-wrap")},si,!pn.length&&!Te&&Nt.createElement("span",{className:"".concat(vo,"-placeholder")},$n))},Be=Yn,vn=function(je){var mi=je.inputElement,$t=je.prefixCls,pn=je.id,ei=je.inputRef,Bi=je.disabled,_e=je.autoFocus,un=je.autoComplete,$n=je.activeDescendantId,vi=je.mode,Oi=je.open,Ei=je.values,ri=je.placeholder,bi=je.tabIndex,Sr=je.showSearch,mr=je.searchValue,wr=je.activeValue,an=je.maxLength,wo=je.onInputKeyDown,Ar=je.onInputMouseDown,mo=je.onInputChange,Ve=je.onInputPaste,ni=je.onInputCompositionStart,Ni=je.onInputCompositionEnd,Hi=je.onInputBlur,Ii=je.title,Qi=Nt.useState(!1),Or=(0,Se.Z)(Qi,2),Lr=Or[0],Nr=Or[1],Rr=vi==="combobox",dn=Rr||Sr,$r=Ei[0],cn=mr||"";Rr&&wr&&!Lr&&(cn=wr),Nt.useEffect(function(){Rr&&Nr(!1)},[Rr,wr]);var Ri=vi!=="combobox"&&!Oi&&!Sr?!1:!!cn,_i=Ii===void 0?me($r):Ii,xr=Nt.useMemo(function(){return $r?null:Nt.createElement("span",{className:"".concat($t,"-selection-placeholder"),style:Ri?{visibility:"hidden"}:void 0},ri)},[$r,Ri,ri,$t]);return Nt.createElement("span",{className:"".concat($t,"-selection-wrap")},Nt.createElement("span",{className:"".concat($t,"-selection-search")},Nt.createElement(Fe,{ref:ei,prefixCls:$t,id:pn,open:Oi,inputElement:mi,disabled:Bi,autoFocus:_e,autoComplete:un,editable:dn,activeDescendantId:$n,value:cn,onKeyDown:wo,onMouseDown:Ar,onChange:function(Mo){Nr(!0),mo(Mo)},onPaste:Ve,onCompositionStart:ni,onCompositionEnd:Ni,onBlur:Hi,tabIndex:bi,attrs:(0,jt.Z)(je,!0),maxLength:Rr?an:void 0})),!Rr&&$r?Nt.createElement("span",{className:"".concat($t,"-selection-item"),title:_i,style:Ri?{visibility:"hidden"}:void 0},$r.label):null,xr)},Je=vn,An=function(je,mi){var $t=(0,Nt.useRef)(null),pn=(0,Nt.useRef)(!1),ei=je.prefixCls,Bi=je.open,_e=je.mode,un=je.showSearch,$n=je.tokenWithEnter,vi=je.disabled,Oi=je.prefix,Ei=je.autoClearSearchValue,ri=je.onSearch,bi=je.onSearchSubmit,Sr=je.onToggleOpen,mr=je.onInputKeyDown,wr=je.onInputBlur,an=je.domRef;Nt.useImperativeHandle(mi,function(){return{focus:function(_i){$t.current.focus(_i)},blur:function(){$t.current.blur()}}});var wo=Mt(0),Ar=(0,Se.Z)(wo,2),mo=Ar[0],Ve=Ar[1],ni=function(_i){var xr=_i.which,zo=$t.current instanceof HTMLTextAreaElement;!zo&&Bi&&(xr===Ht.Z.UP||xr===Ht.Z.DOWN)&&_i.preventDefault(),mr&&mr(_i),xr===Ht.Z.ENTER&&_e==="tags"&&!pn.current&&!Bi&&(bi==null||bi(_i.target.value)),!(zo&&!Bi&&~[Ht.Z.UP,Ht.Z.DOWN,Ht.Z.LEFT,Ht.Z.RIGHT].indexOf(xr))&&qt(xr)&&Sr(!0)},Ni=function(){Ve(!0)},Hi=(0,Nt.useRef)(null),Ii=function(_i){ri(_i,!0,pn.current)!==!1&&Sr(!0)},Qi=function(){pn.current=!0},Or=function(_i){pn.current=!1,_e!=="combobox"&&Ii(_i.target.value)},Lr=function(_i){var xr=_i.target.value;if($n&&Hi.current&&/[\r\n]/.test(Hi.current)){var zo=Hi.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");xr=xr.replace(zo,Hi.current)}Hi.current=null,Ii(xr)},Nr=function(_i){var xr=_i.clipboardData,zo=xr==null?void 0:xr.getData("text");Hi.current=zo||""},Rr=function(_i){var xr=_i.target;if(xr!==$t.current){var zo=document.body.style.msTouchAction!==void 0;zo?setTimeout(function(){$t.current.focus()}):$t.current.focus()}},dn=function(_i){var xr=mo();_i.target!==$t.current&&!xr&&!(_e==="combobox"&&vi)&&_i.preventDefault(),(_e!=="combobox"&&(!un||!xr)||!Bi)&&(Bi&&Ei!==!1&&ri("",!0,!1),Sr())},$r={inputRef:$t,onInputKeyDown:ni,onInputMouseDown:Ni,onInputChange:Lr,onInputPaste:Nr,onInputCompositionStart:Qi,onInputCompositionEnd:Or,onInputBlur:wr},cn=_e==="multiple"||_e==="tags"?Nt.createElement(Be,(0,Dt.Z)({},je,$r)):Nt.createElement(Je,(0,Dt.Z)({},je,$r));return Nt.createElement("div",{ref:an,className:"".concat(ei,"-selector"),onClick:Rr,onMouseDown:dn},Oi&&Nt.createElement("div",{className:"".concat(ei,"-prefix")},Oi),cn)},we=Nt.forwardRef(An),sn=we,ce=Ot(65352),Nn=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Ci=function(je){var mi=je===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:mi,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:mi,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:mi,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:mi,adjustY:1},htmlRegion:"scroll"}}},It=function(je,mi){var $t=je.prefixCls,pn=je.disabled,ei=je.visible,Bi=je.children,_e=je.popupElement,un=je.animation,$n=je.transitionName,vi=je.dropdownStyle,Oi=je.dropdownClassName,Ei=je.direction,ri=Ei===void 0?"ltr":Ei,bi=je.placement,Sr=je.builtinPlacements,mr=je.dropdownMatchSelectWidth,wr=je.dropdownRender,an=je.dropdownAlign,wo=je.getPopupContainer,Ar=je.empty,mo=je.getTriggerDOMNode,Ve=je.onPopupVisibleChange,ni=je.onPopupMouseEnter,Ni=(0,Wt.Z)(je,Nn),Hi="".concat($t,"-dropdown"),Ii=_e;wr&&(Ii=wr(_e));var Qi=Nt.useMemo(function(){return Sr||Ci(mr)},[Sr,mr]),Or=un?"".concat(Hi,"-").concat(un):$n,Lr=typeof mr=="number",Nr=Nt.useMemo(function(){return Lr?null:mr===!1?"minWidth":"width"},[mr,Lr]),Rr=vi;Lr&&(Rr=(0,xe.Z)((0,xe.Z)({},Rr),{},{width:mr}));var dn=Nt.useRef(null);return Nt.useImperativeHandle(mi,function(){return{getPopupElement:function(){var cn;return(cn=dn.current)===null||cn===void 0?void 0:cn.popupElement}}}),Nt.createElement(ce.Z,(0,Dt.Z)({},Ni,{showAction:Ve?["click"]:[],hideAction:Ve?["click"]:[],popupPlacement:bi||(ri==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Qi,prefixCls:Hi,popupTransitionName:Or,popup:Nt.createElement("div",{onMouseEnter:ni},Ii),ref:dn,stretch:Nr,popupAlign:an,popupVisible:ei,getPopupContainer:wo,popupClassName:ie()(Oi,(0,Pe.Z)({},"".concat(Hi,"-empty"),Ar)),popupStyle:Rr,getTriggerDOMNode:mo,onPopupVisibleChange:Ve}),Bi)},wt=Nt.forwardRef(It),xt=wt,Ft=Ot(68413);function Gt(Ze,je){var mi=Ze.key,$t;return"value"in Ze&&($t=Ze.value),mi!=null?mi:$t!==void 0?$t:"rc-index-key-".concat(je)}function kt(Ze){return typeof Ze!="undefined"&&!Number.isNaN(Ze)}function Yt(Ze,je){var mi=Ze||{},$t=mi.label,pn=mi.value,ei=mi.options,Bi=mi.groupLabel,_e=$t||(je?"children":"label");return{label:_e,value:pn||"value",options:ei||"options",groupLabel:Bi||_e}}function pe(Ze){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},mi=je.fieldNames,$t=je.childrenAsData,pn=[],ei=Yt(mi,!1),Bi=ei.label,_e=ei.value,un=ei.options,$n=ei.groupLabel;function vi(Oi,Ei){Array.isArray(Oi)&&Oi.forEach(function(ri){if(Ei||!(un in ri)){var bi=ri[_e];pn.push({key:Gt(ri,pn.length),groupOption:Ei,data:ri,label:ri[Bi],value:bi})}else{var Sr=ri[$n];Sr===void 0&&$t&&(Sr=ri.label),pn.push({key:Gt(ri,pn.length),group:!0,data:ri,label:Sr}),vi(ri[un],!0)}})}return vi(Ze,!1),pn}function Le(Ze){var je=(0,xe.Z)({},Ze);return"props"in je||Object.defineProperty(je,"props",{get:function(){return(0,ye.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),je}}),je}var on=function(je,mi,$t){if(!mi||!mi.length)return null;var pn=!1,ei=function _e(un,$n){var vi=(0,Ft.Z)($n),Oi=vi[0],Ei=vi.slice(1);if(!Oi)return[un];var ri=un.split(Oi);return pn=pn||ri.length>1,ri.reduce(function(bi,Sr){return[].concat((0,ee.Z)(bi),(0,ee.Z)(_e(Sr,Ei)))},[]).filter(Boolean)},Bi=ei(je,mi);return pn?typeof $t!="undefined"?Bi.slice(0,$t):Bi:null},ve=Nt.createContext(null),Ae=ve;function Ee(Ze){var je=Ze.visible,mi=Ze.values;if(!je)return null;var $t=50;return Nt.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(mi.slice(0,$t).map(function(pn){var ei=pn.label,Bi=pn.value;return["number","string"].includes((0,se.Z)(ei))?ei:Bi}).join(", ")),mi.length>$t?", ...":null)}var Ge=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],kn=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],In=function(je){return je==="tags"||je==="multiple"},gn=Nt.forwardRef(function(Ze,je){var mi,$t=Ze.id,pn=Ze.prefixCls,ei=Ze.className,Bi=Ze.showSearch,_e=Ze.tagRender,un=Ze.direction,$n=Ze.omitDomProps,vi=Ze.displayValues,Oi=Ze.onDisplayValuesChange,Ei=Ze.emptyOptions,ri=Ze.notFoundContent,bi=ri===void 0?"Not Found":ri,Sr=Ze.onClear,mr=Ze.mode,wr=Ze.disabled,an=Ze.loading,wo=Ze.getInputElement,Ar=Ze.getRawInputElement,mo=Ze.open,Ve=Ze.defaultOpen,ni=Ze.onDropdownVisibleChange,Ni=Ze.activeValue,Hi=Ze.onActiveValueChange,Ii=Ze.activeDescendantId,Qi=Ze.searchValue,Or=Ze.autoClearSearchValue,Lr=Ze.onSearch,Nr=Ze.onSearchSplit,Rr=Ze.tokenSeparators,dn=Ze.allowClear,$r=Ze.prefix,cn=Ze.suffixIcon,Ri=Ze.clearIcon,_i=Ze.OptionList,xr=Ze.animation,zo=Ze.transitionName,Mo=Ze.dropdownStyle,qr=Ze.dropdownClassName,vo=Ze.dropdownMatchSelectWidth,Te=Ze.dropdownRender,hn=Ze.dropdownAlign,be=Ze.placement,Tt=Ze.builtinPlacements,Wn=Ze.getPopupContainer,Fn=Ze.showAction,Xn=Fn===void 0?[]:Fn,si=Ze.onFocus,wi=Ze.onBlur,yn=Ze.onKeyUp,Vn=Ze.onKeyDown,Kn=Ze.onMouseDown,Jn=(0,Wt.Z)(Ze,Ge),Qn=In(mr),Gi=(Bi!==void 0?Bi:Qn)||mr==="combobox",At=(0,xe.Z)({},Jn);kn.forEach(function(gr){delete At[gr]}),$n==null||$n.forEach(function(gr){delete At[gr]});var re=Nt.useState(!1),Ut=(0,Se.Z)(re,2),oe=Ut[0],fe=Ut[1];Nt.useEffect(function(){fe((0,bt.Z)())},[]);var De=Nt.useRef(null),He=Nt.useRef(null),Ye=Nt.useRef(null),Sn=Nt.useRef(null),xn=Nt.useRef(null),Qe=Nt.useRef(!1),jn=St(),hi=(0,Se.Z)(jn,3),ae=hi[0],En=hi[1],Tn=hi[2];Nt.useImperativeHandle(je,function(){var gr,Vr;return{focus:(gr=Sn.current)===null||gr===void 0?void 0:gr.focus,blur:(Vr=Sn.current)===null||Vr===void 0?void 0:Vr.blur,scrollTo:function(sr){var Xr;return(Xr=xn.current)===null||Xr===void 0?void 0:Xr.scrollTo(sr)},nativeElement:De.current||He.current}});var wn=Nt.useMemo(function(){var gr;if(mr!=="combobox")return Qi;var Vr=(gr=vi[0])===null||gr===void 0?void 0:gr.value;return typeof Vr=="string"||typeof Vr=="number"?String(Vr):""},[Qi,mr,vi]),Bn=mr==="combobox"&&typeof wo=="function"&&wo()||null,Rn=typeof Ar=="function"&&Ar(),di=(0,nt.x1)(He,Rn==null||(mi=Rn.props)===null||mi===void 0?void 0:mi.ref),qn=Nt.useState(!1),ui=(0,Se.Z)(qn,2),ci=ui[0],zi=ui[1];(0,Ne.Z)(function(){zi(!0)},[]);var lr=(0,ze.Z)(!1,{defaultValue:Ve,value:mo}),cr=(0,Se.Z)(lr,2),yr=cr[0],ii=cr[1],Ji=ci?yr:!1,qi=!bi&&Ei;(wr||qi&&Ji&&mr==="combobox")&&(Ji=!1);var ur=qi?!1:Ji,Mi=Nt.useCallback(function(gr){var Vr=gr!==void 0?gr:!Ji;wr||(ii(Vr),Ji!==Vr&&(ni==null||ni(Vr)))},[wr,Ji,ii,ni]),Ai=Nt.useMemo(function(){return(Rr||[]).some(function(gr){return[`
|
|
`,`\r
|
|
`].includes(gr)})},[Rr]),Xe=Nt.useContext(Ae)||{},Li=Xe.maxCount,Wi=Xe.rawValues,ar=function(Vr,Ki,sr){if(!(Qn&&kt(Li)&&(Wi==null?void 0:Wi.size)>=Li)){var Xr=!0,tr=Vr;Hi==null||Hi(null);var Un=on(Vr,Rr,kt(Li)?Li-Wi.size:void 0),ia=sr?null:Un;return mr!=="combobox"&&ia&&(tr="",Nr==null||Nr(ia),Mi(!1),Xr=!1),Lr&&wn!==tr&&Lr(tr,{source:Ki?"typing":"effect"}),Xr}},fr=function(Vr){!Vr||!Vr.trim()||Lr(Vr,{source:"submit"})};Nt.useEffect(function(){!Ji&&!Qn&&mr!=="combobox"&&ar("",!1,!1)},[Ji]),Nt.useEffect(function(){yr&&wr&&ii(!1),wr&&!Qe.current&&En(!1)},[wr]);var Yi=Mt(),fi=(0,Se.Z)(Yi,2),nr=fi[0],Tr=fi[1],Dr=Nt.useRef(!1),hr=function(Vr){var Ki=nr(),sr=Vr.key,Xr=sr==="Enter";if(Xr&&(mr!=="combobox"&&Vr.preventDefault(),Ji||Mi(!0)),Tr(!!wn),sr==="Backspace"&&!Ki&&Qn&&!wn&&vi.length){for(var tr=(0,ee.Z)(vi),Un=null,ia=tr.length-1;ia>=0;ia-=1){var le=tr[ia];if(!le.disabled){tr.splice(ia,1),Un=le;break}}Un&&Oi(tr,{type:"remove",values:[Un]})}for(var ln=arguments.length,Ja=new Array(ln>1?ln-1:0),Qa=1;Qa<ln;Qa++)Ja[Qa-1]=arguments[Qa];if(Ji&&(!Xr||!Dr.current)){var pa;Xr&&(Dr.current=!0),(pa=xn.current)===null||pa===void 0||pa.onKeyDown.apply(pa,[Vr].concat(Ja))}Vn==null||Vn.apply(void 0,[Vr].concat(Ja))},Yr=function(Vr){for(var Ki=arguments.length,sr=new Array(Ki>1?Ki-1:0),Xr=1;Xr<Ki;Xr++)sr[Xr-1]=arguments[Xr];if(Ji){var tr;(tr=xn.current)===null||tr===void 0||tr.onKeyUp.apply(tr,[Vr].concat(sr))}Vr.key==="Enter"&&(Dr.current=!1),yn==null||yn.apply(void 0,[Vr].concat(sr))},Wr=function(Vr){var Ki=vi.filter(function(sr){return sr!==Vr});Oi(Ki,{type:"remove",values:[Vr]})},Cr=function(){Dr.current=!1},to=Nt.useRef(!1),yo=function(){En(!0),wr||(si&&!to.current&&si.apply(void 0,arguments),Xn.includes("focus")&&Mi(!0)),to.current=!0},qo=function(){Qe.current=!0,En(!1,function(){to.current=!1,Qe.current=!1,Mi(!1)}),!wr&&(wn&&(mr==="tags"?Lr(wn,{source:"submit"}):mr==="multiple"&&Lr("",{source:"blur"})),wi&&wi.apply(void 0,arguments))},Hr=[];Nt.useEffect(function(){return function(){Hr.forEach(function(gr){return clearTimeout(gr)}),Hr.splice(0,Hr.length)}},[]);var ta=function(Vr){var Ki,sr=Vr.target,Xr=(Ki=Ye.current)===null||Ki===void 0?void 0:Ki.getPopupElement();if(Xr&&Xr.contains(sr)){var tr=setTimeout(function(){var ln=Hr.indexOf(tr);if(ln!==-1&&Hr.splice(ln,1),Tn(),!oe&&!Xr.contains(document.activeElement)){var Ja;(Ja=Sn.current)===null||Ja===void 0||Ja.focus()}});Hr.push(tr)}for(var Un=arguments.length,ia=new Array(Un>1?Un-1:0),le=1;le<Un;le++)ia[le-1]=arguments[le];Kn==null||Kn.apply(void 0,[Vr].concat(ia))},So=Nt.useState({}),ca=(0,Se.Z)(So,2),Lo=ca[1];function Yo(){Lo({})}var ea;Rn&&(ea=function(Vr){Mi(Vr)}),zt(function(){var gr;return[De.current,(gr=Ye.current)===null||gr===void 0?void 0:gr.getPopupElement()]},ur,Mi,!!Rn);var Qo=Nt.useMemo(function(){return(0,xe.Z)((0,xe.Z)({},Ze),{},{notFoundContent:bi,open:Ji,triggerOpen:ur,id:$t,showSearch:Gi,multiple:Qn,toggleOpen:Mi})},[Ze,bi,ur,Ji,$t,Gi,Qn,Mi]),Oo=!!cn||an,xo;Oo&&(xo=Nt.createElement(ct,{className:ie()("".concat(pn,"-arrow"),(0,Pe.Z)({},"".concat(pn,"-arrow-loading"),an)),customizeIcon:cn,customizeIconProps:{loading:an,searchValue:wn,open:Ji,focused:ae,showSearch:Gi}}));var oa=function(){var Vr;Sr==null||Sr(),(Vr=Sn.current)===null||Vr===void 0||Vr.focus(),Oi([],{type:"clear",values:vi}),ar("",!1,!1)},Ca=lt(pn,oa,vi,dn,Ri,wr,wn,mr),Wo=Ca.allowClear,Ia=Ca.clearIcon,Co=Nt.createElement(_i,{ref:xn}),lo=ie()(pn,ei,(0,Pe.Z)((0,Pe.Z)((0,Pe.Z)((0,Pe.Z)((0,Pe.Z)((0,Pe.Z)((0,Pe.Z)((0,Pe.Z)((0,Pe.Z)((0,Pe.Z)({},"".concat(pn,"-focused"),ae),"".concat(pn,"-multiple"),Qn),"".concat(pn,"-single"),!Qn),"".concat(pn,"-allow-clear"),dn),"".concat(pn,"-show-arrow"),Oo),"".concat(pn,"-disabled"),wr),"".concat(pn,"-loading"),an),"".concat(pn,"-open"),Ji),"".concat(pn,"-customize-input"),Bn),"".concat(pn,"-show-search"),Gi)),eo=Nt.createElement(xt,{ref:Ye,disabled:wr,prefixCls:pn,visible:ur,popupElement:Co,animation:xr,transitionName:zo,dropdownStyle:Mo,dropdownClassName:qr,direction:un,dropdownMatchSelectWidth:vo,dropdownRender:Te,dropdownAlign:hn,placement:be,builtinPlacements:Tt,getPopupContainer:Wn,empty:Ei,getTriggerDOMNode:function(Vr){return He.current||Vr},onPopupVisibleChange:ea,onPopupMouseEnter:Yo},Rn?Nt.cloneElement(Rn,{ref:di}):Nt.createElement(sn,(0,Dt.Z)({},Ze,{domRef:He,prefixCls:pn,inputElement:Bn,ref:Sn,id:$t,prefix:$r,showSearch:Gi,autoClearSearchValue:Or,mode:mr,activeDescendantId:Ii,tagRender:_e,values:vi,open:Ji,onToggleOpen:Mi,activeValue:Ni,searchValue:wn,onSearch:ar,onSearchSubmit:fr,onRemove:Wr,tokenWithEnter:Ai,onInputBlur:Cr}))),Uo;return Rn?Uo=eo:Uo=Nt.createElement("div",(0,Dt.Z)({className:lo},At,{ref:De,onMouseDown:ta,onKeyDown:hr,onKeyUp:Yr,onFocus:yo,onBlur:qo}),Nt.createElement(Ee,{visible:ae&&!Ji,values:vi}),eo,xo,Wo&&Ia),Nt.createElement(gt.Provider,{value:Qo},Uo)}),ai=gn,xi=function(){return null};xi.isSelectOptGroup=!0;var Gn=xi,Si=function(){return null};Si.isSelectOption=!0;var _n=Si,Ti=Ot(80547),Di=Ot(2738),$i=Ot(45680);function Kr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Xi=["disabled","title","children","style","className"];function zr(Ze){return typeof Ze=="string"||typeof Ze=="number"}var so=function(je,mi){var $t=mt(),pn=$t.prefixCls,ei=$t.id,Bi=$t.open,_e=$t.multiple,un=$t.mode,$n=$t.searchValue,vi=$t.toggleOpen,Oi=$t.notFoundContent,Ei=$t.onPopupScroll,ri=Nt.useContext(Ae),bi=ri.maxCount,Sr=ri.flattenOptions,mr=ri.onActiveValue,wr=ri.defaultActiveFirstOption,an=ri.onSelect,wo=ri.menuItemSelectedIcon,Ar=ri.rawValues,mo=ri.fieldNames,Ve=ri.virtual,ni=ri.direction,Ni=ri.listHeight,Hi=ri.listItemHeight,Ii=ri.optionRender,Qi="".concat(pn,"-item"),Or=(0,Ti.Z)(function(){return Sr},[Bi,Sr],function(Fn,Xn){return Xn[0]&&Fn[1]!==Xn[1]}),Lr=Nt.useRef(null),Nr=Nt.useMemo(function(){return _e&&kt(bi)&&(Ar==null?void 0:Ar.size)>=bi},[_e,bi,Ar==null?void 0:Ar.size]),Rr=function(Xn){Xn.preventDefault()},dn=function(Xn){var si;(si=Lr.current)===null||si===void 0||si.scrollTo(typeof Xn=="number"?{index:Xn}:Xn)},$r=Nt.useCallback(function(Fn){return un==="combobox"?!1:Ar.has(Fn)},[un,(0,ee.Z)(Ar).toString(),Ar.size]),cn=function(Xn){for(var si=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,wi=Or.length,yn=0;yn<wi;yn+=1){var Vn=(Xn+yn*si+wi)%wi,Kn=Or[Vn]||{},Jn=Kn.group,Qn=Kn.data;if(!Jn&&!(Qn!=null&&Qn.disabled)&&($r(Qn.value)||!Nr))return Vn}return-1},Ri=Nt.useState(function(){return cn(0)}),_i=(0,Se.Z)(Ri,2),xr=_i[0],zo=_i[1],Mo=function(Xn){var si=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;zo(Xn);var wi={source:si?"keyboard":"mouse"},yn=Or[Xn];if(!yn){mr(null,-1,wi);return}mr(yn.value,Xn,wi)};(0,Nt.useEffect)(function(){Mo(wr!==!1?cn(0):-1)},[Or.length,$n]);var qr=Nt.useCallback(function(Fn){return un==="combobox"?String(Fn).toLowerCase()===$n.toLowerCase():Ar.has(Fn)},[un,$n,(0,ee.Z)(Ar).toString(),Ar.size]);(0,Nt.useEffect)(function(){var Fn=setTimeout(function(){if(!_e&&Bi&&Ar.size===1){var si=Array.from(Ar)[0],wi=Or.findIndex(function(yn){var Vn=yn.data;return Vn.value===si});wi!==-1&&(Mo(wi),dn(wi))}});if(Bi){var Xn;(Xn=Lr.current)===null||Xn===void 0||Xn.scrollTo(void 0)}return function(){return clearTimeout(Fn)}},[Bi,$n]);var vo=function(Xn){Xn!==void 0&&an(Xn,{selected:!Ar.has(Xn)}),_e||vi(!1)};if(Nt.useImperativeHandle(mi,function(){return{onKeyDown:function(Xn){var si=Xn.which,wi=Xn.ctrlKey;switch(si){case Ht.Z.N:case Ht.Z.P:case Ht.Z.UP:case Ht.Z.DOWN:{var yn=0;if(si===Ht.Z.UP?yn=-1:si===Ht.Z.DOWN?yn=1:Kr()&&wi&&(si===Ht.Z.N?yn=1:si===Ht.Z.P&&(yn=-1)),yn!==0){var Vn=cn(xr+yn,yn);dn(Vn),Mo(Vn,!0)}break}case Ht.Z.TAB:case Ht.Z.ENTER:{var Kn,Jn=Or[xr];Jn&&!(Jn!=null&&(Kn=Jn.data)!==null&&Kn!==void 0&&Kn.disabled)&&!Nr?vo(Jn.value):vo(void 0),Bi&&Xn.preventDefault();break}case Ht.Z.ESC:vi(!1),Bi&&Xn.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Xn){dn(Xn)}}}),Or.length===0)return Nt.createElement("div",{role:"listbox",id:"".concat(ei,"_list"),className:"".concat(Qi,"-empty"),onMouseDown:Rr},Oi);var Te=Object.keys(mo).map(function(Fn){return mo[Fn]}),hn=function(Xn){return Xn.label};function be(Fn,Xn){var si=Fn.group;return{role:si?"presentation":"option",id:"".concat(ei,"_list_").concat(Xn)}}var Tt=function(Xn){var si=Or[Xn];if(!si)return null;var wi=si.data||{},yn=wi.value,Vn=si.group,Kn=(0,jt.Z)(wi,!0),Jn=hn(si);return si?Nt.createElement("div",(0,Dt.Z)({"aria-label":typeof Jn=="string"&&!Vn?Jn:null},Kn,{key:Xn},be(si,Xn),{"aria-selected":qr(yn)}),yn):null},Wn={role:"listbox",id:"".concat(ei,"_list")};return Nt.createElement(Nt.Fragment,null,Ve&&Nt.createElement("div",(0,Dt.Z)({},Wn,{style:{height:0,width:0,overflow:"hidden"}}),Tt(xr-1),Tt(xr),Tt(xr+1)),Nt.createElement($i.Z,{itemKey:"key",ref:Lr,data:Or,height:Ni,itemHeight:Hi,fullHeight:!1,onMouseDown:Rr,onScroll:Ei,virtual:Ve,direction:ni,innerProps:Ve?null:Wn},function(Fn,Xn){var si=Fn.group,wi=Fn.groupOption,yn=Fn.data,Vn=Fn.label,Kn=Fn.value,Jn=yn.key;if(si){var Qn,Gi=(Qn=yn.title)!==null&&Qn!==void 0?Qn:zr(Vn)?Vn.toString():void 0;return Nt.createElement("div",{className:ie()(Qi,"".concat(Qi,"-group"),yn.className),title:Gi},Vn!==void 0?Vn:Jn)}var At=yn.disabled,re=yn.title,Ut=yn.children,oe=yn.style,fe=yn.className,De=(0,Wt.Z)(yn,Xi),He=(0,Di.Z)(De,Te),Ye=$r(Kn),Sn=At||!Ye&&Nr,xn="".concat(Qi,"-option"),Qe=ie()(Qi,xn,fe,(0,Pe.Z)((0,Pe.Z)((0,Pe.Z)((0,Pe.Z)({},"".concat(xn,"-grouped"),wi),"".concat(xn,"-active"),xr===Xn&&!Sn),"".concat(xn,"-disabled"),Sn),"".concat(xn,"-selected"),Ye)),jn=hn(Fn),hi=!wo||typeof wo=="function"||Ye,ae=typeof jn=="number"?jn:jn||Kn,En=zr(ae)?ae.toString():void 0;return re!==void 0&&(En=re),Nt.createElement("div",(0,Dt.Z)({},(0,jt.Z)(He),Ve?{}:be(Fn,Xn),{"aria-selected":qr(Kn),className:Qe,title:En,onMouseMove:function(){xr===Xn||Sn||Mo(Xn)},onClick:function(){Sn||vo(Kn)},style:oe}),Nt.createElement("div",{className:"".concat(xn,"-content")},typeof Ii=="function"?Ii(Fn,{index:Xn}):ae),Nt.isValidElement(wo)||Ye,hi&&Nt.createElement(ct,{className:"".concat(Qi,"-option-state"),customizeIcon:wo,customizeIconProps:{value:Kn,disabled:Sn,isSelected:Ye}},Ye?"\u2713":null))}))},po=Nt.forwardRef(so),Jr=po,Do=function(Ze,je){var mi=Nt.useRef({values:new Map,options:new Map}),$t=Nt.useMemo(function(){var ei=mi.current,Bi=ei.values,_e=ei.options,un=Ze.map(function(Oi){if(Oi.label===void 0){var Ei;return(0,xe.Z)((0,xe.Z)({},Oi),{},{label:(Ei=Bi.get(Oi.value))===null||Ei===void 0?void 0:Ei.label})}return Oi}),$n=new Map,vi=new Map;return un.forEach(function(Oi){$n.set(Oi.value,Oi),vi.set(Oi.value,je.get(Oi.value)||_e.get(Oi.value))}),mi.current.values=$n,mi.current.options=vi,un},[Ze,je]),pn=Nt.useCallback(function(ei){return je.get(ei)||mi.current.options.get(ei)},[je]);return[$t,pn]};function Bo(Ze,je){return Re(Ze).join("").toUpperCase().includes(je)}var Ko=function(Ze,je,mi,$t,pn){return Nt.useMemo(function(){if(!mi||$t===!1)return Ze;var ei=je.options,Bi=je.label,_e=je.value,un=[],$n=typeof $t=="function",vi=mi.toUpperCase(),Oi=$n?$t:function(ri,bi){return pn?Bo(bi[pn],vi):bi[ei]?Bo(bi[Bi!=="children"?Bi:"label"],vi):Bo(bi[_e],vi)},Ei=$n?function(ri){return Le(ri)}:function(ri){return ri};return Ze.forEach(function(ri){if(ri[ei]){var bi=Oi(mi,Ei(ri));if(bi)un.push(ri);else{var Sr=ri[ei].filter(function(mr){return Oi(mi,Ei(mr))});Sr.length&&un.push((0,xe.Z)((0,xe.Z)({},ri),{},(0,Pe.Z)({},ei,Sr)))}return}Oi(mi,Ei(ri))&&un.push(ri)}),un},[Ze,$t,pn,mi,je])},bo=Ot(69582),ko=Ot(11592),Ct=["children","value"],Zn=["children"];function bn(Ze){var je=Ze,mi=je.key,$t=je.props,pn=$t.children,ei=$t.value,Bi=(0,Wt.Z)($t,Ct);return(0,xe.Z)({key:mi,value:ei!==void 0?ei:mi,children:pn},Bi)}function Pr(Ze){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,ko.Z)(Ze).map(function(mi,$t){if(!Nt.isValidElement(mi)||!mi.type)return null;var pn=mi,ei=pn.type.isSelectOptGroup,Bi=pn.key,_e=pn.props,un=_e.children,$n=(0,Wt.Z)(_e,Zn);return je||!ei?bn(mi):(0,xe.Z)((0,xe.Z)({key:"__RC_SELECT_GRP__".concat(Bi===null?$t:Bi,"__"),label:Bi},$n),{},{options:Pr(un)})}).filter(function(mi){return mi})}var Er=function(je,mi,$t,pn,ei){return Nt.useMemo(function(){var Bi=je,_e=!je;_e&&(Bi=Pr(mi));var un=new Map,$n=new Map,vi=function(ri,bi,Sr){Sr&&typeof Sr=="string"&&ri.set(bi[Sr],bi)},Oi=function Ei(ri){for(var bi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Sr=0;Sr<ri.length;Sr+=1){var mr=ri[Sr];!mr[$t.options]||bi?(un.set(mr[$t.value],mr),vi($n,mr,$t.label),vi($n,mr,pn),vi($n,mr,ei)):Ei(mr[$t.options],!0)}};return Oi(Bi),{options:Bi,valueOptions:un,labelOptions:$n}},[je,mi,$t,pn,ei])},Zi=Er;function _r(Ze){var je=Nt.useRef();je.current=Ze;var mi=Nt.useCallback(function(){return je.current.apply(je,arguments)},[]);return mi}function ho(Ze){var je=Ze.mode,mi=Ze.options,$t=Ze.children,pn=Ze.backfill,ei=Ze.allowClear,Bi=Ze.placeholder,_e=Ze.getInputElement,un=Ze.showSearch,$n=Ze.onSearch,vi=Ze.defaultOpen,Oi=Ze.autoFocus,Ei=Ze.labelInValue,ri=Ze.value,bi=Ze.inputValue,Sr=Ze.optionLabelProp,mr=isMultiple(je),wr=un!==void 0?un:mr||je==="combobox",an=mi||convertChildrenToData($t);if(warning(je!=="tags"||an.every(function(Ve){return!Ve.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),je==="tags"||je==="combobox"){var wo=an.some(function(Ve){return Ve.options?Ve.options.some(function(ni){return typeof("value"in ni?ni.value:ni.key)=="number"}):typeof("value"in Ve?Ve.value:Ve.key)=="number"});warning(!wo,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(je!=="combobox"||!Sr,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(je==="combobox"||!pn,"`backfill` only works with `combobox` mode."),warning(je==="combobox"||!_e,"`getInputElement` only work with `combobox` mode."),noteOnce(je!=="combobox"||!_e||!ei||!Bi,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),$n&&!wr&&je!=="combobox"&&je!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!vi||Oi,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),ri!=null){var Ar=toArray(ri);warning(!Ei||Ar.every(function(Ve){return _typeof(Ve)==="object"&&("key"in Ve||"value"in Ve)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!mr||Array.isArray(ri),"`value` should be array when `mode` is `multiple` or `tags`")}if($t){var mo=null;toNodeArray($t).some(function(Ve){if(!React.isValidElement(Ve)||!Ve.type)return!1;var ni=Ve,Ni=ni.type;if(Ni.isSelectOption)return!1;if(Ni.isSelectOptGroup){var Hi=toNodeArray(Ve.props.children).every(function(Ii){return!React.isValidElement(Ii)||!Ve.type||Ii.type.isSelectOption?!0:(mo=Ii.type,!1)});return!Hi}return mo=Ni,!0}),mo&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(mo.displayName||mo.name||mo,"`.")),warning(bi===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function br(Ze,je){if(Ze){var mi=function $t(pn){for(var ei=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Bi=0;Bi<pn.length;Bi++){var _e=pn[Bi];if(_e[je==null?void 0:je.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!ei&&Array.isArray(_e[je==null?void 0:je.options])&&$t(_e[je==null?void 0:je.options],!0))break}};mi(Ze)}}var $e=null,Oe=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],Me=["inputValue"];function Pi(Ze){return!Ze||(0,se.Z)(Ze)!=="object"}var Vi=Nt.forwardRef(function(Ze,je){var mi=Ze.id,$t=Ze.mode,pn=Ze.prefixCls,ei=pn===void 0?"rc-select":pn,Bi=Ze.backfill,_e=Ze.fieldNames,un=Ze.inputValue,$n=Ze.searchValue,vi=Ze.onSearch,Oi=Ze.autoClearSearchValue,Ei=Oi===void 0?!0:Oi,ri=Ze.onSelect,bi=Ze.onDeselect,Sr=Ze.dropdownMatchSelectWidth,mr=Sr===void 0?!0:Sr,wr=Ze.filterOption,an=Ze.filterSort,wo=Ze.optionFilterProp,Ar=Ze.optionLabelProp,mo=Ze.options,Ve=Ze.optionRender,ni=Ze.children,Ni=Ze.defaultActiveFirstOption,Hi=Ze.menuItemSelectedIcon,Ii=Ze.virtual,Qi=Ze.direction,Or=Ze.listHeight,Lr=Or===void 0?200:Or,Nr=Ze.listItemHeight,Rr=Nr===void 0?20:Nr,dn=Ze.labelRender,$r=Ze.value,cn=Ze.defaultValue,Ri=Ze.labelInValue,_i=Ze.onChange,xr=Ze.maxCount,zo=(0,Wt.Z)(Ze,Oe),Mo=(0,bo.ZP)(mi),qr=In($t),vo=!!(!mo&&ni),Te=Nt.useMemo(function(){return wr===void 0&&$t==="combobox"?!1:wr},[wr,$t]),hn=Nt.useMemo(function(){return Yt(_e,vo)},[JSON.stringify(_e),vo]),be=(0,ze.Z)("",{value:$n!==void 0?$n:un,postState:function(Ai){return Ai||""}}),Tt=(0,Se.Z)(be,2),Wn=Tt[0],Fn=Tt[1],Xn=Zi(mo,ni,hn,wo,Ar),si=Xn.valueOptions,wi=Xn.labelOptions,yn=Xn.options,Vn=Nt.useCallback(function(Mi){var Ai=Re(Mi);return Ai.map(function(Xe){var Li,Wi,ar,fr,Yi;if(Pi(Xe))Li=Xe;else{var fi;ar=Xe.key,Wi=Xe.label,Li=(fi=Xe.value)!==null&&fi!==void 0?fi:ar}var nr=si.get(Li);if(nr){var Tr;if(Wi===void 0&&(Wi=nr==null?void 0:nr[Ar||hn.label]),ar===void 0&&(ar=(Tr=nr==null?void 0:nr.key)!==null&&Tr!==void 0?Tr:Li),fr=nr==null?void 0:nr.disabled,Yi=nr==null?void 0:nr.title,0)var Dr}return{label:Wi,value:Li,key:ar,disabled:fr,title:Yi}})},[hn,Ar,si]),Kn=(0,ze.Z)(cn,{value:$r}),Jn=(0,Se.Z)(Kn,2),Qn=Jn[0],Gi=Jn[1],At=Nt.useMemo(function(){var Mi,Ai=qr&&Qn===null?[]:Qn,Xe=Vn(Ai);return $t==="combobox"&&rn((Mi=Xe[0])===null||Mi===void 0?void 0:Mi.value)?[]:Xe},[Qn,Vn,$t,qr]),re=Do(At,si),Ut=(0,Se.Z)(re,2),oe=Ut[0],fe=Ut[1],De=Nt.useMemo(function(){if(!$t&&oe.length===1){var Mi=oe[0];if(Mi.value===null&&(Mi.label===null||Mi.label===void 0))return[]}return oe.map(function(Ai){var Xe;return(0,xe.Z)((0,xe.Z)({},Ai),{},{label:(Xe=typeof dn=="function"?dn(Ai):Ai.label)!==null&&Xe!==void 0?Xe:Ai.value})})},[$t,oe,dn]),He=Nt.useMemo(function(){return new Set(oe.map(function(Mi){return Mi.value}))},[oe]);Nt.useEffect(function(){if($t==="combobox"){var Mi,Ai=(Mi=oe[0])===null||Mi===void 0?void 0:Mi.value;Fn(tn(Ai)?String(Ai):"")}},[oe]);var Ye=_r(function(Mi,Ai){var Xe=Ai!=null?Ai:Mi;return(0,Pe.Z)((0,Pe.Z)({},hn.value,Mi),hn.label,Xe)}),Sn=Nt.useMemo(function(){if($t!=="tags")return yn;var Mi=(0,ee.Z)(yn),Ai=function(Li){return si.has(Li)};return(0,ee.Z)(oe).sort(function(Xe,Li){return Xe.value<Li.value?-1:1}).forEach(function(Xe){var Li=Xe.value;Ai(Li)||Mi.push(Ye(Li,Xe.label))}),Mi},[Ye,yn,si,oe,$t]),xn=Ko(Sn,hn,Wn,Te,wo),Qe=Nt.useMemo(function(){return $t!=="tags"||!Wn||xn.some(function(Mi){return Mi[wo||"value"]===Wn})||xn.some(function(Mi){return Mi[hn.value]===Wn})?xn:[Ye(Wn)].concat((0,ee.Z)(xn))},[Ye,wo,$t,xn,Wn,hn]),jn=function Mi(Ai){var Xe=(0,ee.Z)(Ai).sort(function(Li,Wi){return an(Li,Wi,{searchValue:Wn})});return Xe.map(function(Li){return Array.isArray(Li.options)?(0,xe.Z)((0,xe.Z)({},Li),{},{options:Li.options.length>0?Mi(Li.options):Li.options}):Li})},hi=Nt.useMemo(function(){return an?jn(Qe):Qe},[Qe,an,Wn]),ae=Nt.useMemo(function(){return pe(hi,{fieldNames:hn,childrenAsData:vo})},[hi,hn,vo]),En=function(Ai){var Xe=Vn(Ai);if(Gi(Xe),_i&&(Xe.length!==oe.length||Xe.some(function(ar,fr){var Yi;return((Yi=oe[fr])===null||Yi===void 0?void 0:Yi.value)!==(ar==null?void 0:ar.value)}))){var Li=Ri?Xe:Xe.map(function(ar){return ar.value}),Wi=Xe.map(function(ar){return Le(fe(ar.value))});_i(qr?Li:Li[0],qr?Wi:Wi[0])}},Tn=Nt.useState(null),wn=(0,Se.Z)(Tn,2),Bn=wn[0],Rn=wn[1],di=Nt.useState(0),qn=(0,Se.Z)(di,2),ui=qn[0],ci=qn[1],zi=Ni!==void 0?Ni:$t!=="combobox",lr=Nt.useCallback(function(Mi,Ai){var Xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Li=Xe.source,Wi=Li===void 0?"keyboard":Li;ci(Ai),Bi&&$t==="combobox"&&Mi!==null&&Wi==="keyboard"&&Rn(String(Mi))},[Bi,$t]),cr=function(Ai,Xe,Li){var Wi=function(){var Wr,Cr=fe(Ai);return[Ri?{label:Cr==null?void 0:Cr[hn.label],value:Ai,key:(Wr=Cr==null?void 0:Cr.key)!==null&&Wr!==void 0?Wr:Ai}:Ai,Le(Cr)]};if(Xe&&ri){var ar=Wi(),fr=(0,Se.Z)(ar,2),Yi=fr[0],fi=fr[1];ri(Yi,fi)}else if(!Xe&&bi&&Li!=="clear"){var nr=Wi(),Tr=(0,Se.Z)(nr,2),Dr=Tr[0],hr=Tr[1];bi(Dr,hr)}},yr=_r(function(Mi,Ai){var Xe,Li=qr?Ai.selected:!0;Li?Xe=qr?[].concat((0,ee.Z)(oe),[Mi]):[Mi]:Xe=oe.filter(function(Wi){return Wi.value!==Mi}),En(Xe),cr(Mi,Li),$t==="combobox"?Rn(""):(!In||Ei)&&(Fn(""),Rn(""))}),ii=function(Ai,Xe){En(Ai);var Li=Xe.type,Wi=Xe.values;(Li==="remove"||Li==="clear")&&Wi.forEach(function(ar){cr(ar.value,!1,Li)})},Ji=function(Ai,Xe){if(Fn(Ai),Rn(null),Xe.source==="submit"){var Li=(Ai||"").trim();if(Li){var Wi=Array.from(new Set([].concat((0,ee.Z)(He),[Li])));En(Wi),cr(Li,!0),Fn("")}return}Xe.source!=="blur"&&($t==="combobox"&&En(Ai),vi==null||vi(Ai))},qi=function(Ai){var Xe=Ai;$t!=="tags"&&(Xe=Ai.map(function(Wi){var ar=wi.get(Wi);return ar==null?void 0:ar.value}).filter(function(Wi){return Wi!==void 0}));var Li=Array.from(new Set([].concat((0,ee.Z)(He),(0,ee.Z)(Xe))));En(Li),Li.forEach(function(Wi){cr(Wi,!0)})},ur=Nt.useMemo(function(){var Mi=Ii!==!1&&mr!==!1;return(0,xe.Z)((0,xe.Z)({},Xn),{},{flattenOptions:ae,onActiveValue:lr,defaultActiveFirstOption:zi,onSelect:yr,menuItemSelectedIcon:Hi,rawValues:He,fieldNames:hn,virtual:Mi,direction:Qi,listHeight:Lr,listItemHeight:Rr,childrenAsData:vo,maxCount:xr,optionRender:Ve})},[xr,Xn,ae,lr,zi,yr,Hi,He,hn,Ii,mr,Qi,Lr,Rr,vo,Ve]);return Nt.createElement(Ae.Provider,{value:ur},Nt.createElement(ai,(0,Dt.Z)({},zo,{id:Mo,prefixCls:ei,ref:je,omitDomProps:Me,mode:$t,displayValues:De,onDisplayValuesChange:ii,direction:Qi,searchValue:Wn,onSearch:Ji,autoClearSearchValue:Ei,onSearchSplit:qi,dropdownMatchSelectWidth:mr,OptionList:Jr,emptyOptions:!ae.length,activeValue:Bn,activeDescendantId:"".concat(Mo,"_list_").concat(ui)})))}),rr=Vi;rr.Option=_n,rr.OptGroup=Gn;var Dn=rr,pi=Dn},63158:function(zn,oi,Ot){"use strict";var Dt=Ot(72308),ee=Ot(49618),Pe=Ot(52487),xe=Ot(74416),Se=Ot(59301),Wt=Ot(92310),se=Ot.n(Wt),ze=Ot(18929),ye=Ot(10228),Nt=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],We=Se.forwardRef(function(ie,Ne){var bt,nt=ie.prefixCls,et=nt===void 0?"rc-switch":nt,ct=ie.className,lt=ie.checked,gt=ie.defaultChecked,mt=ie.disabled,St=ie.loadingIcon,Mt=ie.checkedChildren,zt=ie.unCheckedChildren,Ht=ie.onClick,qt=ie.onChange,jt=ie.onKeyDown,Jt=(0,xe.Z)(ie,Nt),ge=(0,ze.Z)(!1,{value:lt,defaultValue:gt}),he=(0,Pe.Z)(ge,2),Fe=he[0],Re=he[1];function Ke(nn,me){var Xt=Fe;return mt||(Xt=nn,Re(Xt),qt==null||qt(Xt,me)),Xt}function Mn(nn){nn.which===ye.Z.LEFT?Ke(!1,nn):nn.which===ye.Z.RIGHT&&Ke(!0,nn),jt==null||jt(nn)}function tn(nn){var me=Ke(!Fe,nn);Ht==null||Ht(me,nn)}var rn=se()(et,ct,(bt={},(0,ee.Z)(bt,"".concat(et,"-checked"),Fe),(0,ee.Z)(bt,"".concat(et,"-disabled"),mt),bt));return Se.createElement("button",(0,Dt.Z)({},Jt,{type:"button",role:"switch","aria-checked":Fe,disabled:mt,className:rn,ref:Ne,onKeyDown:Mn,onClick:tn}),St,Se.createElement("span",{className:"".concat(et,"-inner")},Se.createElement("span",{className:"".concat(et,"-inner-checked")},Mt),Se.createElement("span",{className:"".concat(et,"-inner-unchecked")},zt)))});We.displayName="Switch",oi.Z=We},67204:function(zn,oi,Ot){"use strict";Ot.d(oi,{R:function(){return ee},w:function(){return Dt}});var Dt={},ee="rc-table-internal-hook"},78612:function(zn,oi,Ot){"use strict";Ot.d(oi,{L:function(){return et},Z:function(){return St}});var Dt=Ot(52487),ee=Ot(49618),Pe=Ot(80702),xe=Ot(62853),Se=Ot(77321),Wt=Ot(74416),se=Ot(11592),ze=Ot(48736),ye=Ot(59301),Nt=Ot(67204),We=Ot(90494);function ie(Mt){var zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof zt=="number"?zt:zt.endsWith("%")?Mt*parseFloat(zt)/100:null}function Ne(Mt,zt,Ht){return ye.useMemo(function(){if(zt&&zt>0){var qt=0,jt=0;Mt.forEach(function(tn){var rn=ie(zt,tn.width);rn?qt+=rn:jt+=1});var Jt=Math.max(zt,Ht),ge=Math.max(Jt-qt,jt),he=jt,Fe=ge/jt,Re=0,Ke=Mt.map(function(tn){var rn=(0,Se.Z)({},tn),nn=ie(zt,rn.width);if(nn)rn.width=nn;else{var me=Math.floor(Fe);rn.width=he===1?ge:me,ge-=me,he-=1}return Re+=rn.width,rn});if(Re<Jt){var Mn=Jt/Re;ge=Jt,Ke.forEach(function(tn,rn){var nn=Math.floor(tn.width*Mn);tn.width=rn===Ke.length-1?ge:nn,ge-=nn})}return[Ke,Math.max(Re,Jt)]}return[Mt,zt]},[Mt,zt,Ht])}var bt=["children"],nt=["fixed"];function et(Mt){return(0,se.Z)(Mt).filter(function(zt){return ye.isValidElement(zt)}).map(function(zt){var Ht=zt.key,qt=zt.props,jt=qt.children,Jt=(0,Wt.Z)(qt,bt),ge=(0,Se.Z)({key:Ht},Jt);return jt&&(ge.children=et(jt)),ge})}function ct(Mt){return Mt.filter(function(zt){return zt&&(0,xe.Z)(zt)==="object"&&!zt.hidden}).map(function(zt){var Ht=zt.children;return Ht&&Ht.length>0?(0,Se.Z)((0,Se.Z)({},zt),{},{children:ct(Ht)}):zt})}function lt(Mt){var zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return Mt.filter(function(Ht){return Ht&&(0,xe.Z)(Ht)==="object"}).reduce(function(Ht,qt,jt){var Jt=qt.fixed,ge=Jt===!0?"left":Jt,he="".concat(zt,"-").concat(jt),Fe=qt.children;return Fe&&Fe.length>0?[].concat((0,Pe.Z)(Ht),(0,Pe.Z)(lt(Fe,he).map(function(Re){return(0,Se.Z)({fixed:ge},Re)}))):[].concat((0,Pe.Z)(Ht),[(0,Se.Z)((0,Se.Z)({key:he},qt),{},{fixed:ge})])},[])}function gt(Mt){return Mt.map(function(zt){var Ht=zt.fixed,qt=(0,Wt.Z)(zt,nt),jt=Ht;return Ht==="left"?jt="right":Ht==="right"&&(jt="left"),(0,Se.Z)({fixed:jt},qt)})}function mt(Mt,zt){var Ht=Mt.prefixCls,qt=Mt.columns,jt=Mt.children,Jt=Mt.expandable,ge=Mt.expandedKeys,he=Mt.columnTitle,Fe=Mt.getRowKey,Re=Mt.onTriggerExpand,Ke=Mt.expandIcon,Mn=Mt.rowExpandable,tn=Mt.expandIconColumnIndex,rn=Mt.direction,nn=Mt.expandRowByClick,me=Mt.columnWidth,Xt=Mt.fixed,Ue=Mt.scrollWidth,Pn=Mt.clientWidth,Yn=ye.useMemo(function(){var Ci=qt||et(jt)||[];return ct(Ci.slice())},[qt,jt]),Be=ye.useMemo(function(){if(Jt){var Ci=Yn.slice();if(!Ci.includes(Nt.w)){var It=tn||0;It>=0&&(It||Xt==="left"||!Xt)&&Ci.splice(It,0,Nt.w),Xt==="right"&&Ci.splice(Yn.length,0,Nt.w)}var wt=Ci.indexOf(Nt.w);Ci=Ci.filter(function(kt,Yt){return kt!==Nt.w||Yt===wt});var xt=Yn[wt],Ft;Xt?Ft=Xt:Ft=xt?xt.fixed:null;var Gt=(0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)({},We.v,{className:"".concat(Ht,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",he),"fixed",Ft),"className","".concat(Ht,"-row-expand-icon-cell")),"width",me),"render",function(Yt,pe,Le){var on=Fe(pe,Le),ve=ge.has(on),Ae=Mn?Mn(pe):!0,Ee=Ke({prefixCls:Ht,expanded:ve,expandable:Ae,record:pe,onExpand:Re});return nn?ye.createElement("span",{onClick:function(kn){return kn.stopPropagation()}},Ee):Ee});return Ci.map(function(kt){return kt===Nt.w?Gt:kt})}return Yn.filter(function(kt){return kt!==Nt.w})},[Jt,Yn,Fe,ge,Ke,rn]),vn=ye.useMemo(function(){var Ci=Be;return zt&&(Ci=zt(Ci)),Ci.length||(Ci=[{render:function(){return null}}]),Ci},[zt,Be,rn]),Je=ye.useMemo(function(){return rn==="rtl"?gt(lt(vn)):lt(vn)},[vn,rn,Ue]),An=ye.useMemo(function(){for(var Ci=-1,It=Je.length-1;It>=0;It-=1){var wt=Je[It].fixed;if(wt==="left"||wt===!0){Ci=It;break}}if(Ci>=0)for(var xt=0;xt<=Ci;xt+=1){var Ft=Je[xt].fixed;if(Ft!=="left"&&Ft!==!0)return!0}var Gt=Je.findIndex(function(pe){var Le=pe.fixed;return Le==="right"});if(Gt>=0)for(var kt=Gt;kt<Je.length;kt+=1){var Yt=Je[kt].fixed;if(Yt!=="right")return!0}return!1},[Je]),we=Ne(Je,Ue,Pn),sn=(0,Dt.Z)(we,2),ce=sn[0],Nn=sn[1];return[vn,ce,Nn,An]}var St=mt},16596:function(zn,oi,Ot){"use strict";Ot.d(oi,{w2:function(){return Dt.w},vP:function(){return Jr.v},RQ:function(){return Dt.R},ER:function(){return on},Q$:function(){return Ar},TN:function(){return Mo}});var Dt=Ot(67204),ee=Ot(52487),Pe=Ot(6089),xe=Ot(34280),Se=Ot(13697),Wt=Ot(59301),se=Ot(4676);function ze(Te){var hn=Wt.createContext(void 0),be=function(Wn){var Fn=Wn.value,Xn=Wn.children,si=Wt.useRef(Fn);si.current=Fn;var wi=Wt.useState(function(){return{getValue:function(){return si.current},listeners:new Set}}),yn=(0,ee.Z)(wi,1),Vn=yn[0];return(0,xe.Z)(function(){(0,se.unstable_batchedUpdates)(function(){Vn.listeners.forEach(function(Kn){Kn(Fn)})})},[Fn]),Wt.createElement(hn.Provider,{value:Vn},Xn)};return{Context:hn,Provider:be,defaultValue:Te}}function ye(Te,hn){var be=(0,Pe.Z)(typeof hn=="function"?hn:function(Kn){if(hn===void 0)return Kn;if(!Array.isArray(hn))return Kn[hn];var Jn={};return hn.forEach(function(Qn){Jn[Qn]=Kn[Qn]}),Jn}),Tt=Wt.useContext(Te==null?void 0:Te.Context),Wn=Tt||{},Fn=Wn.listeners,Xn=Wn.getValue,si=Wt.useRef();si.current=be(Tt?Xn():Te==null?void 0:Te.defaultValue);var wi=Wt.useState({}),yn=(0,ee.Z)(wi,2),Vn=yn[1];return(0,xe.Z)(function(){if(!Tt)return;function Kn(Jn){var Qn=be(Jn);(0,Se.Z)(si.current,Qn,!0)||Vn({})}return Fn.add(Kn),function(){Fn.delete(Kn)}},[Tt]),si.current}var Nt=Ot(72308),We=Ot(8654);function ie(){var Te=Wt.createContext(null);function hn(){return Wt.useContext(Te)}function be(Wn,Fn){var Xn=(0,We.Yr)(Wn),si=function(yn,Vn){var Kn=Xn?{ref:Vn}:{},Jn=Wt.useRef(0),Qn=Wt.useRef(yn),Gi=hn();return Gi!==null?Wt.createElement(Wn,(0,Nt.Z)({},yn,Kn)):((!Fn||Fn(Qn.current,yn))&&(Jn.current+=1),Qn.current=yn,Wt.createElement(Te.Provider,{value:Jn.current},Wt.createElement(Wn,(0,Nt.Z)({},yn,Kn))))};return Xn?Wt.forwardRef(si):si}function Tt(Wn,Fn){var Xn=(0,We.Yr)(Wn),si=function(yn,Vn){var Kn=Xn?{ref:Vn}:{};return hn(),Wt.createElement(Wn,(0,Nt.Z)({},yn,Kn))};return Xn?Wt.memo(Wt.forwardRef(si),Fn):Wt.memo(si,Fn)}return{makeImmutable:be,responseImmutable:Tt,useImmutableMark:hn}}var Ne=ie(),bt=Ne.makeImmutable,nt=Ne.responseImmutable,et=Ne.useImmutableMark,ct=ie(),lt=ct.makeImmutable,gt=ct.responseImmutable,mt=ct.useImmutableMark,St=ze(),Mt=St;function zt(Te,hn){var be=React.useRef(0);be.current+=1;var Tt=React.useRef(Te),Wn=[];Object.keys(Te||{}).map(function(Xn){var si;(Te==null?void 0:Te[Xn])!==((si=Tt.current)===null||si===void 0?void 0:si[Xn])&&Wn.push(Xn)}),Tt.current=Te;var Fn=React.useRef([]);return Wn.length&&(Fn.current=Wn),React.useDebugValue(be.current),React.useDebugValue(Fn.current.join(", ")),hn&&console.log("".concat(hn,":"),be.current,Fn.current),be.current}var Ht=null,qt=null,jt=Ot(62853),Jt=Ot(77321),ge=Ot(49618),he=Ot(92310),Fe=Ot.n(he),Re=Ot(80547),Ke=Ot(97938),Mn=Ot(48736),tn=Wt.createContext({renderWithProps:!1}),rn=tn,nn="RC_TABLE_KEY";function me(Te){return Te==null?[]:Array.isArray(Te)?Te:[Te]}function Xt(Te){var hn=[],be={};return Te.forEach(function(Tt){for(var Wn=Tt||{},Fn=Wn.key,Xn=Wn.dataIndex,si=Fn||me(Xn).join("-")||nn;be[si];)si="".concat(si,"_next");be[si]=!0,hn.push(si)}),hn}function Ue(Te){return Te!=null}function Pn(Te){return typeof Te=="number"&&!Number.isNaN(Te)}function Yn(Te){return Te&&(0,jt.Z)(Te)==="object"&&!Array.isArray(Te)&&!Wt.isValidElement(Te)}function Be(Te,hn,be,Tt,Wn,Fn){var Xn=Wt.useContext(rn),si=mt(),wi=(0,Re.Z)(function(){if(Ue(Tt))return[Tt];var yn=hn==null||hn===""?[]:Array.isArray(hn)?hn:[hn],Vn=(0,Ke.Z)(Te,yn),Kn=Vn,Jn=void 0;if(Wn){var Qn=Wn(Vn,Te,be);Yn(Qn)?(Kn=Qn.children,Jn=Qn.props,Xn.renderWithProps=!0):Kn=Qn}return[Kn,Jn]},[si,Te,Tt,hn,Wn,be],function(yn,Vn){if(Fn){var Kn=(0,ee.Z)(yn,2),Jn=Kn[1],Qn=(0,ee.Z)(Vn,2),Gi=Qn[1];return Fn(Gi,Jn)}return Xn.renderWithProps?!0:!(0,Se.Z)(yn,Vn,!0)});return wi}function vn(Te,hn,be,Tt){var Wn=Te+hn-1;return Te<=Tt&&Wn>=be}function Je(Te,hn){return ye(Mt,function(be){var Tt=vn(Te,hn||1,be.hoverStartRow,be.hoverEndRow);return[Tt,be.onHover]})}var An=Ot(70425),we=function(hn){var be=hn.ellipsis,Tt=hn.rowType,Wn=hn.children,Fn,Xn=be===!0?{showTitle:!0}:be;return Xn&&(Xn.showTitle||Tt==="header")&&(typeof Wn=="string"||typeof Wn=="number"?Fn=Wn.toString():Wt.isValidElement(Wn)&&typeof Wn.props.children=="string"&&(Fn=Wn.props.children)),Fn};function sn(Te){var hn,be,Tt,Wn,Fn,Xn,si,wi,yn=Te.component,Vn=Te.children,Kn=Te.ellipsis,Jn=Te.scope,Qn=Te.prefixCls,Gi=Te.className,At=Te.align,re=Te.record,Ut=Te.render,oe=Te.dataIndex,fe=Te.renderIndex,De=Te.shouldCellUpdate,He=Te.index,Ye=Te.rowType,Sn=Te.colSpan,xn=Te.rowSpan,Qe=Te.fixLeft,jn=Te.fixRight,hi=Te.firstFixLeft,ae=Te.lastFixLeft,En=Te.firstFixRight,Tn=Te.lastFixRight,wn=Te.appendNode,Bn=Te.additionalProps,Rn=Bn===void 0?{}:Bn,di=Te.isSticky,qn="".concat(Qn,"-cell"),ui=ye(Mt,["supportSticky","allColumnsFixedLeft","rowHoverable"]),ci=ui.supportSticky,zi=ui.allColumnsFixedLeft,lr=ui.rowHoverable,cr=Be(re,oe,fe,Vn,Ut,De),yr=(0,ee.Z)(cr,2),ii=yr[0],Ji=yr[1],qi={},ur=typeof Qe=="number"&&ci,Mi=typeof jn=="number"&&ci;ur&&(qi.position="sticky",qi.left=Qe),Mi&&(qi.position="sticky",qi.right=jn);var Ai=(hn=(be=(Tt=Ji==null?void 0:Ji.colSpan)!==null&&Tt!==void 0?Tt:Rn.colSpan)!==null&&be!==void 0?be:Sn)!==null&&hn!==void 0?hn:1,Xe=(Wn=(Fn=(Xn=Ji==null?void 0:Ji.rowSpan)!==null&&Xn!==void 0?Xn:Rn.rowSpan)!==null&&Fn!==void 0?Fn:xn)!==null&&Wn!==void 0?Wn:1,Li=Je(He,Xe),Wi=(0,ee.Z)(Li,2),ar=Wi[0],fr=Wi[1],Yi=(0,An.zX)(function(Wr){var Cr;re&&fr(He,He+Xe-1),Rn==null||(Cr=Rn.onMouseEnter)===null||Cr===void 0||Cr.call(Rn,Wr)}),fi=(0,An.zX)(function(Wr){var Cr;re&&fr(-1,-1),Rn==null||(Cr=Rn.onMouseLeave)===null||Cr===void 0||Cr.call(Rn,Wr)});if(Ai===0||Xe===0)return null;var nr=(si=Rn.title)!==null&&si!==void 0?si:we({rowType:Ye,ellipsis:Kn,children:ii}),Tr=Fe()(qn,Gi,(wi={},(0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)(wi,"".concat(qn,"-fix-left"),ur&&ci),"".concat(qn,"-fix-left-first"),hi&&ci),"".concat(qn,"-fix-left-last"),ae&&ci),"".concat(qn,"-fix-left-all"),ae&&zi&&ci),"".concat(qn,"-fix-right"),Mi&&ci),"".concat(qn,"-fix-right-first"),En&&ci),"".concat(qn,"-fix-right-last"),Tn&&ci),"".concat(qn,"-ellipsis"),Kn),"".concat(qn,"-with-append"),wn),"".concat(qn,"-fix-sticky"),(ur||Mi)&&di&&ci),(0,ge.Z)(wi,"".concat(qn,"-row-hover"),!Ji&&ar)),Rn.className,Ji==null?void 0:Ji.className),Dr={};At&&(Dr.textAlign=At);var hr=(0,Jt.Z)((0,Jt.Z)((0,Jt.Z)((0,Jt.Z)({},Ji==null?void 0:Ji.style),qi),Dr),Rn.style),Yr=ii;return(0,jt.Z)(Yr)==="object"&&!Array.isArray(Yr)&&!Wt.isValidElement(Yr)&&(Yr=null),Kn&&(ae||En)&&(Yr=Wt.createElement("span",{className:"".concat(qn,"-content")},Yr)),Wt.createElement(yn,(0,Nt.Z)({},Ji,Rn,{className:Tr,style:hr,title:nr,scope:Jn,onMouseEnter:lr?Yi:void 0,onMouseLeave:lr?fi:void 0,colSpan:Ai!==1?Ai:null,rowSpan:Xe!==1?Xe:null}),wn,Yr)}var ce=Wt.memo(sn);function Nn(Te,hn,be,Tt,Wn){var Fn=be[Te]||{},Xn=be[hn]||{},si,wi;Fn.fixed==="left"?si=Tt.left[Wn==="rtl"?hn:Te]:Xn.fixed==="right"&&(wi=Tt.right[Wn==="rtl"?Te:hn]);var yn=!1,Vn=!1,Kn=!1,Jn=!1,Qn=be[hn+1],Gi=be[Te-1],At=Qn&&!Qn.fixed||Gi&&!Gi.fixed||be.every(function(De){return De.fixed==="left"});if(Wn==="rtl"){if(si!==void 0){var re=Gi&&Gi.fixed==="left";Jn=!re&&At}else if(wi!==void 0){var Ut=Qn&&Qn.fixed==="right";Kn=!Ut&&At}}else if(si!==void 0){var oe=Qn&&Qn.fixed==="left";yn=!oe&&At}else if(wi!==void 0){var fe=Gi&&Gi.fixed==="right";Vn=!fe&&At}return{fixLeft:si,fixRight:wi,lastFixLeft:yn,firstFixRight:Vn,lastFixRight:Kn,firstFixLeft:Jn,isSticky:Tt.isSticky}}var Ci=Wt.createContext({}),It=Ci;function wt(Te){var hn=Te.className,be=Te.index,Tt=Te.children,Wn=Te.colSpan,Fn=Wn===void 0?1:Wn,Xn=Te.rowSpan,si=Te.align,wi=ye(Mt,["prefixCls","direction"]),yn=wi.prefixCls,Vn=wi.direction,Kn=Wt.useContext(It),Jn=Kn.scrollColumnIndex,Qn=Kn.stickyOffsets,Gi=Kn.flattenColumns,At=be+Fn-1,re=At+1===Jn?Fn+1:Fn,Ut=Nn(be,be+re-1,Gi,Qn,Vn);return Wt.createElement(ce,(0,Nt.Z)({className:hn,index:be,component:"td",prefixCls:yn,record:null,dataIndex:null,align:si,colSpan:re,rowSpan:Xn,render:function(){return Tt}},Ut))}var xt=Ot(74416),Ft=["children"];function Gt(Te){var hn=Te.children,be=(0,xt.Z)(Te,Ft);return Wt.createElement("tr",be,hn)}function kt(Te){var hn=Te.children;return hn}kt.Row=Gt,kt.Cell=wt;var Yt=kt;function pe(Te){var hn=Te.children,be=Te.stickyOffsets,Tt=Te.flattenColumns,Wn=ye(Mt,"prefixCls"),Fn=Tt.length-1,Xn=Tt[Fn],si=Wt.useMemo(function(){return{stickyOffsets:be,flattenColumns:Tt,scrollColumnIndex:Xn!=null&&Xn.scrollbar?Fn:null}},[Xn,Tt,Fn,be]);return Wt.createElement(It.Provider,{value:si},Wt.createElement("tfoot",{className:"".concat(Wn,"-summary")},hn))}var Le=gt(pe),on=Yt,ve=Ot(29301),Ae=Ot(29194),Ee=Ot(24514),Ge=Ot(75152),kn=Ot(26112);function In(Te,hn,be,Tt,Wn,Fn,Xn){Te.push({record:hn,indent:be,index:Xn});var si=Fn(hn),wi=Wn==null?void 0:Wn.has(si);if(hn&&Array.isArray(hn[Tt])&&wi)for(var yn=0;yn<hn[Tt].length;yn+=1)In(Te,hn[Tt][yn],be+1,Tt,Wn,Fn,yn)}function gn(Te,hn,be,Tt){var Wn=Wt.useMemo(function(){if(be!=null&&be.size){for(var Fn=[],Xn=0;Xn<(Te==null?void 0:Te.length);Xn+=1){var si=Te[Xn];In(Fn,si,0,hn,be,Tt,Xn)}return Fn}return Te==null?void 0:Te.map(function(wi,yn){return{record:wi,indent:0,index:yn}})},[Te,hn,be,Tt]);return Wn}function ai(Te,hn,be,Tt){var Wn=ye(Mt,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Fn=Wn.flattenColumns,Xn=Wn.expandableType,si=Wn.expandedKeys,wi=Wn.childrenColumnName,yn=Wn.onTriggerExpand,Vn=Wn.rowExpandable,Kn=Wn.onRow,Jn=Wn.expandRowByClick,Qn=Wn.rowClassName,Gi=Xn==="nest",At=Xn==="row"&&(!Vn||Vn(Te)),re=At||Gi,Ut=si&&si.has(hn),oe=wi&&Te&&Te[wi],fe=(0,An.zX)(yn),De=Kn==null?void 0:Kn(Te,be),He=De==null?void 0:De.onClick,Ye=function(jn){Jn&&re&&yn(Te,jn);for(var hi=arguments.length,ae=new Array(hi>1?hi-1:0),En=1;En<hi;En++)ae[En-1]=arguments[En];He==null||He.apply(void 0,[jn].concat(ae))},Sn;typeof Qn=="string"?Sn=Qn:typeof Qn=="function"&&(Sn=Qn(Te,be,Tt));var xn=Xt(Fn);return(0,Jt.Z)((0,Jt.Z)({},Wn),{},{columnsKey:xn,nestExpandable:Gi,expanded:Ut,hasNestChildren:oe,record:Te,onTriggerExpand:fe,rowSupportExpand:At,expandable:re,rowProps:(0,Jt.Z)((0,Jt.Z)({},De),{},{className:Fe()(Sn,De==null?void 0:De.className),onClick:Ye})})}function xi(Te){var hn=Te.prefixCls,be=Te.children,Tt=Te.component,Wn=Te.cellComponent,Fn=Te.className,Xn=Te.expanded,si=Te.colSpan,wi=Te.isEmpty,yn=ye(Mt,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),Vn=yn.scrollbarSize,Kn=yn.fixHeader,Jn=yn.fixColumn,Qn=yn.componentWidth,Gi=yn.horizonScroll,At=be;return(wi?Gi&&Qn:Jn)&&(At=Wt.createElement("div",{style:{width:Qn-(Kn&&!wi?Vn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(hn,"-expanded-row-fixed")},At)),Wt.createElement(Tt,{className:Fn,style:{display:Xn?null:"none"}},Wt.createElement(ce,{component:Wn,prefixCls:hn,colSpan:si},At))}var Gn=xi;function Si(Te){var hn=Te.prefixCls,be=Te.record,Tt=Te.onExpand,Wn=Te.expanded,Fn=Te.expandable,Xn="".concat(hn,"-row-expand-icon");if(!Fn)return Wt.createElement("span",{className:Fe()(Xn,"".concat(hn,"-row-spaced"))});var si=function(yn){Tt(be,yn),yn.stopPropagation()};return Wt.createElement("span",{className:Fe()(Xn,(0,ge.Z)((0,ge.Z)({},"".concat(hn,"-row-expanded"),Wn),"".concat(hn,"-row-collapsed"),!Wn)),onClick:si})}function _n(Te,hn,be){var Tt=[];function Wn(Fn){(Fn||[]).forEach(function(Xn,si){Tt.push(hn(Xn,si)),Wn(Xn[be])})}return Wn(Te),Tt}function Ti(Te,hn,be,Tt){return typeof Te=="string"?Te:typeof Te=="function"?Te(hn,be,Tt):""}function Di(Te,hn,be,Tt,Wn){var Fn=Te.record,Xn=Te.prefixCls,si=Te.columnsKey,wi=Te.fixedInfoList,yn=Te.expandIconColumnIndex,Vn=Te.nestExpandable,Kn=Te.indentSize,Jn=Te.expandIcon,Qn=Te.expanded,Gi=Te.hasNestChildren,At=Te.onTriggerExpand,re=si[be],Ut=wi[be],oe;be===(yn||0)&&Vn&&(oe=Wt.createElement(Wt.Fragment,null,Wt.createElement("span",{style:{paddingLeft:"".concat(Kn*Tt,"px")},className:"".concat(Xn,"-row-indent indent-level-").concat(Tt)}),Jn({prefixCls:Xn,expanded:Qn,expandable:Gi,record:Fn,onExpand:At})));var fe;return hn.onCell&&(fe=hn.onCell(Fn,Wn)),{key:re,fixedInfo:Ut,appendCellNode:oe,additionalCellProps:fe||{}}}function $i(Te){var hn=Te.className,be=Te.style,Tt=Te.record,Wn=Te.index,Fn=Te.renderIndex,Xn=Te.rowKey,si=Te.indent,wi=si===void 0?0:si,yn=Te.rowComponent,Vn=Te.cellComponent,Kn=Te.scopeCellComponent,Jn=ai(Tt,Xn,Wn,wi),Qn=Jn.prefixCls,Gi=Jn.flattenColumns,At=Jn.expandedRowClassName,re=Jn.expandedRowRender,Ut=Jn.rowProps,oe=Jn.expanded,fe=Jn.rowSupportExpand,De=Wt.useRef(!1);De.current||(De.current=oe);var He=Ti(At,Tt,Wn,wi),Ye=Wt.createElement(yn,(0,Nt.Z)({},Ut,{"data-row-key":Xn,className:Fe()(hn,"".concat(Qn,"-row"),"".concat(Qn,"-row-level-").concat(wi),Ut==null?void 0:Ut.className,(0,ge.Z)({},He,wi>=1)),style:(0,Jt.Z)((0,Jt.Z)({},be),Ut==null?void 0:Ut.style)}),Gi.map(function(Qe,jn){var hi=Qe.render,ae=Qe.dataIndex,En=Qe.className,Tn=Di(Jn,Qe,jn,wi,Wn),wn=Tn.key,Bn=Tn.fixedInfo,Rn=Tn.appendCellNode,di=Tn.additionalCellProps;return Wt.createElement(ce,(0,Nt.Z)({className:En,ellipsis:Qe.ellipsis,align:Qe.align,scope:Qe.rowScope,component:Qe.rowScope?Kn:Vn,prefixCls:Qn,key:wn,record:Tt,index:Wn,renderIndex:Fn,dataIndex:ae,render:hi,shouldCellUpdate:Qe.shouldCellUpdate},Bn,{appendNode:Rn,additionalProps:di}))})),Sn;if(fe&&(De.current||oe)){var xn=re(Tt,Wn,wi+1,oe);Sn=Wt.createElement(Gn,{expanded:oe,className:Fe()("".concat(Qn,"-expanded-row"),"".concat(Qn,"-expanded-row-level-").concat(wi+1),He),prefixCls:Qn,component:yn,cellComponent:Vn,colSpan:Gi.length,isEmpty:!1},xn)}return Wt.createElement(Wt.Fragment,null,Ye,Sn)}var Kr=gt($i);function Xi(Te){var hn=Te.columnKey,be=Te.onColumnResize,Tt=Wt.useRef();return Wt.useEffect(function(){Tt.current&&be(hn,Tt.current.offsetWidth)},[]),Wt.createElement(ve.Z,{data:hn},Wt.createElement("td",{ref:Tt,style:{padding:0,border:0,height:0}},Wt.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function zr(Te){var hn=Te.prefixCls,be=Te.columnsKey,Tt=Te.onColumnResize;return Wt.createElement("tr",{"aria-hidden":"true",className:"".concat(hn,"-measure-row"),style:{height:0,fontSize:0}},Wt.createElement(ve.Z.Collection,{onBatchResize:function(Fn){Fn.forEach(function(Xn){var si=Xn.data,wi=Xn.size;Tt(si,wi.offsetWidth)})}},be.map(function(Wn){return Wt.createElement(Xi,{key:Wn,columnKey:Wn,onColumnResize:Tt})})))}function so(Te){var hn=Te.data,be=Te.measureColumnWidth,Tt=ye(Mt,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),Wn=Tt.prefixCls,Fn=Tt.getComponent,Xn=Tt.onColumnResize,si=Tt.flattenColumns,wi=Tt.getRowKey,yn=Tt.expandedKeys,Vn=Tt.childrenColumnName,Kn=Tt.emptyNode,Jn=gn(hn,Vn,yn,wi),Qn=Wt.useRef({renderWithProps:!1}),Gi=Fn(["body","wrapper"],"tbody"),At=Fn(["body","row"],"tr"),re=Fn(["body","cell"],"td"),Ut=Fn(["body","cell"],"th"),oe;hn.length?oe=Jn.map(function(De,He){var Ye=De.record,Sn=De.indent,xn=De.index,Qe=wi(Ye,He);return Wt.createElement(Kr,{key:Qe,rowKey:Qe,record:Ye,index:He,renderIndex:xn,rowComponent:At,cellComponent:re,scopeCellComponent:Ut,indent:Sn})}):oe=Wt.createElement(Gn,{expanded:!0,className:"".concat(Wn,"-placeholder"),prefixCls:Wn,component:At,cellComponent:re,colSpan:si.length,isEmpty:!0},Kn);var fe=Xt(si);return Wt.createElement(rn.Provider,{value:Qn.current},Wt.createElement(Gi,{className:"".concat(Wn,"-tbody")},be&&Wt.createElement(zr,{prefixCls:Wn,columnsKey:fe,onColumnResize:Xn}),oe))}var po=gt(so),Jr=Ot(90494),Do=["columnType"];function Bo(Te){for(var hn=Te.colWidths,be=Te.columns,Tt=Te.columCount,Wn=ye(Mt,["tableLayout"]),Fn=Wn.tableLayout,Xn=[],si=Tt||be.length,wi=!1,yn=si-1;yn>=0;yn-=1){var Vn=hn[yn],Kn=be&&be[yn],Jn=void 0,Qn=void 0;if(Kn&&(Jn=Kn[Jr.v],Fn==="auto"&&(Qn=Kn.minWidth)),Vn||Qn||Jn||wi){var Gi=Jn||{},At=Gi.columnType,re=(0,xt.Z)(Gi,Do);Xn.unshift(Wt.createElement("col",(0,Nt.Z)({key:yn,style:{width:Vn,minWidth:Qn}},re))),wi=!0}}return Wt.createElement("colgroup",null,Xn)}var Ko=Bo,bo=Ot(80702),ko=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Ct(Te,hn){return(0,Wt.useMemo)(function(){for(var be=[],Tt=0;Tt<hn;Tt+=1){var Wn=Te[Tt];if(Wn!==void 0)be[Tt]=Wn;else return null}return be},[Te.join("_"),hn])}var Zn=Wt.forwardRef(function(Te,hn){var be=Te.className,Tt=Te.noData,Wn=Te.columns,Fn=Te.flattenColumns,Xn=Te.colWidths,si=Te.columCount,wi=Te.stickyOffsets,yn=Te.direction,Vn=Te.fixHeader,Kn=Te.stickyTopOffset,Jn=Te.stickyBottomOffset,Qn=Te.stickyClassName,Gi=Te.onScroll,At=Te.maxContentScroll,re=Te.children,Ut=(0,xt.Z)(Te,ko),oe=ye(Mt,["prefixCls","scrollbarSize","isSticky","getComponent"]),fe=oe.prefixCls,De=oe.scrollbarSize,He=oe.isSticky,Ye=oe.getComponent,Sn=Ye(["header","table"],"table"),xn=He&&!Vn?0:De,Qe=Wt.useRef(null),jn=Wt.useCallback(function(di){(0,We.mH)(hn,di),(0,We.mH)(Qe,di)},[]);Wt.useEffect(function(){var di;function qn(ui){var ci=ui,zi=ci.currentTarget,lr=ci.deltaX;lr&&(Gi({currentTarget:zi,scrollLeft:zi.scrollLeft+lr}),ui.preventDefault())}return(di=Qe.current)===null||di===void 0||di.addEventListener("wheel",qn,{passive:!1}),function(){var ui;(ui=Qe.current)===null||ui===void 0||ui.removeEventListener("wheel",qn)}},[]);var hi=Wt.useMemo(function(){return Fn.every(function(di){return di.width})},[Fn]),ae=Fn[Fn.length-1],En={fixed:ae?ae.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(fe,"-cell-scrollbar")}}},Tn=(0,Wt.useMemo)(function(){return xn?[].concat((0,bo.Z)(Wn),[En]):Wn},[xn,Wn]),wn=(0,Wt.useMemo)(function(){return xn?[].concat((0,bo.Z)(Fn),[En]):Fn},[xn,Fn]),Bn=(0,Wt.useMemo)(function(){var di=wi.right,qn=wi.left;return(0,Jt.Z)((0,Jt.Z)({},wi),{},{left:yn==="rtl"?[].concat((0,bo.Z)(qn.map(function(ui){return ui+xn})),[0]):qn,right:yn==="rtl"?di:[].concat((0,bo.Z)(di.map(function(ui){return ui+xn})),[0]),isSticky:He})},[xn,wi,He]),Rn=Ct(Xn,si);return Wt.createElement("div",{style:(0,Jt.Z)({overflow:"hidden"},He?{top:Kn,bottom:Jn}:{}),ref:jn,className:Fe()(be,(0,ge.Z)({},Qn,!!Qn))},Wt.createElement(Sn,{style:{tableLayout:"fixed",visibility:Tt||Rn?null:"hidden"}},(!Tt||!At||hi)&&Wt.createElement(Ko,{colWidths:Rn?[].concat((0,bo.Z)(Rn),[xn]):[],columCount:si+1,columns:wn}),re((0,Jt.Z)((0,Jt.Z)({},Ut),{},{stickyOffsets:Bn,columns:Tn,flattenColumns:wn}))))}),bn=Wt.memo(Zn),Pr=function(hn){var be=hn.cells,Tt=hn.stickyOffsets,Wn=hn.flattenColumns,Fn=hn.rowComponent,Xn=hn.cellComponent,si=hn.onHeaderRow,wi=hn.index,yn=ye(Mt,["prefixCls","direction"]),Vn=yn.prefixCls,Kn=yn.direction,Jn;si&&(Jn=si(be.map(function(Gi){return Gi.column}),wi));var Qn=Xt(be.map(function(Gi){return Gi.column}));return Wt.createElement(Fn,Jn,be.map(function(Gi,At){var re=Gi.column,Ut=Nn(Gi.colStart,Gi.colEnd,Wn,Tt,Kn),oe;return re&&re.onHeaderCell&&(oe=Gi.column.onHeaderCell(re)),Wt.createElement(ce,(0,Nt.Z)({},Gi,{scope:re.title?Gi.colSpan>1?"colgroup":"col":null,ellipsis:re.ellipsis,align:re.align,component:Xn,prefixCls:Vn,key:Qn[At]},Ut,{additionalProps:oe,rowType:"header"}))}))},Er=Pr;function Zi(Te){var hn=[];function be(Xn,si){var wi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;hn[wi]=hn[wi]||[];var yn=si,Vn=Xn.filter(Boolean).map(function(Kn){var Jn={key:Kn.key,className:Kn.className||"",children:Kn.title,column:Kn,colStart:yn},Qn=1,Gi=Kn.children;return Gi&&Gi.length>0&&(Qn=be(Gi,yn,wi+1).reduce(function(At,re){return At+re},0),Jn.hasSubColumns=!0),"colSpan"in Kn&&(Qn=Kn.colSpan),"rowSpan"in Kn&&(Jn.rowSpan=Kn.rowSpan),Jn.colSpan=Qn,Jn.colEnd=Jn.colStart+Qn-1,hn[wi].push(Jn),yn+=Qn,Qn});return Vn}be(Te,0);for(var Tt=hn.length,Wn=function(si){hn[si].forEach(function(wi){!("rowSpan"in wi)&&!wi.hasSubColumns&&(wi.rowSpan=Tt-si)})},Fn=0;Fn<Tt;Fn+=1)Wn(Fn);return hn}var _r=function(hn){var be=hn.stickyOffsets,Tt=hn.columns,Wn=hn.flattenColumns,Fn=hn.onHeaderRow,Xn=ye(Mt,["prefixCls","getComponent"]),si=Xn.prefixCls,wi=Xn.getComponent,yn=Wt.useMemo(function(){return Zi(Tt)},[Tt]),Vn=wi(["header","wrapper"],"thead"),Kn=wi(["header","row"],"tr"),Jn=wi(["header","cell"],"th");return Wt.createElement(Vn,{className:"".concat(si,"-thead")},yn.map(function(Qn,Gi){var At=Wt.createElement(Er,{key:Gi,flattenColumns:Wn,cells:Qn,stickyOffsets:be,rowComponent:Kn,cellComponent:Jn,onHeaderRow:Fn,index:Gi});return At}))},ho=gt(_r),br=Ot(78612);function $e(Te,hn,be){var Tt=(0,Jr.g)(Te),Wn=Tt.expandIcon,Fn=Tt.expandedRowKeys,Xn=Tt.defaultExpandedRowKeys,si=Tt.defaultExpandAllRows,wi=Tt.expandedRowRender,yn=Tt.onExpand,Vn=Tt.onExpandedRowsChange,Kn=Tt.childrenColumnName,Jn=Wn||Si,Qn=Kn||"children",Gi=Wt.useMemo(function(){return wi?"row":Te.expandable&&Te.internalHooks===Dt.R&&Te.expandable.__PARENT_RENDER_ICON__||hn.some(function(He){return He&&(0,jt.Z)(He)==="object"&&He[Qn]})?"nest":!1},[!!wi,hn]),At=Wt.useState(function(){return Xn||(si?_n(hn,be,Qn):[])}),re=(0,ee.Z)(At,2),Ut=re[0],oe=re[1],fe=Wt.useMemo(function(){return new Set(Fn||Ut||[])},[Fn,Ut]),De=Wt.useCallback(function(He){var Ye=be(He,hn.indexOf(He)),Sn,xn=fe.has(Ye);xn?(fe.delete(Ye),Sn=(0,bo.Z)(fe)):Sn=[].concat((0,bo.Z)(fe),[Ye]),oe(Sn),yn&&yn(!xn,He),Vn&&Vn(Sn)},[be,fe,hn,yn,Vn]);return[Tt,Gi,fe,Jn,Qn,De]}function Oe(Te,hn,be){var Tt=Te.map(function(Wn,Fn){return Nn(Fn,Fn,Te,hn,be)});return(0,Re.Z)(function(){return Tt},[Tt],function(Wn,Fn){return!(0,Se.Z)(Wn,Fn)})}function Me(Te){var hn=(0,Wt.useRef)(Te),be=(0,Wt.useState)({}),Tt=(0,ee.Z)(be,2),Wn=Tt[1],Fn=(0,Wt.useRef)(null),Xn=(0,Wt.useRef)([]);function si(wi){Xn.current.push(wi);var yn=Promise.resolve();Fn.current=yn,yn.then(function(){if(Fn.current===yn){var Vn=Xn.current,Kn=hn.current;Xn.current=[],Vn.forEach(function(Jn){hn.current=Jn(hn.current)}),Fn.current=null,Kn!==hn.current&&Wn({})}})}return(0,Wt.useEffect)(function(){return function(){Fn.current=null}},[]),[hn.current,si]}function Pi(Te){var hn=(0,Wt.useRef)(Te||null),be=(0,Wt.useRef)();function Tt(){window.clearTimeout(be.current)}function Wn(Xn){hn.current=Xn,Tt(),be.current=window.setTimeout(function(){hn.current=null,be.current=void 0},100)}function Fn(){return hn.current}return(0,Wt.useEffect)(function(){return Tt},[]),[Wn,Fn]}function Vi(){var Te=Wt.useState(-1),hn=(0,ee.Z)(Te,2),be=hn[0],Tt=hn[1],Wn=Wt.useState(-1),Fn=(0,ee.Z)(Wn,2),Xn=Fn[0],si=Fn[1],wi=Wt.useCallback(function(yn,Vn){Tt(yn),si(Vn)},[]);return[be,Xn,wi]}var rr=Ot(47273),Dn=(0,rr.Z)()?window:null;function pi(Te,hn){var be=(0,jt.Z)(Te)==="object"?Te:{},Tt=be.offsetHeader,Wn=Tt===void 0?0:Tt,Fn=be.offsetSummary,Xn=Fn===void 0?0:Fn,si=be.offsetScroll,wi=si===void 0?0:si,yn=be.getContainer,Vn=yn===void 0?function(){return Dn}:yn,Kn=Vn()||Dn,Jn=!!Te;return Wt.useMemo(function(){return{isSticky:Jn,stickyClassName:Jn?"".concat(hn,"-sticky-holder"):"",offsetHeader:Wn,offsetSummary:Xn,offsetScroll:wi,container:Kn}},[Jn,wi,Wn,Xn,hn,Kn])}function Ze(Te,hn,be){var Tt=(0,Wt.useMemo)(function(){var Wn=hn.length,Fn=function(yn,Vn,Kn){for(var Jn=[],Qn=0,Gi=yn;Gi!==Vn;Gi+=Kn)Jn.push(Qn),hn[Gi].fixed&&(Qn+=Te[Gi]||0);return Jn},Xn=Fn(0,Wn,1),si=Fn(Wn-1,-1,-1).reverse();return be==="rtl"?{left:si,right:Xn}:{left:Xn,right:si}},[Te,hn,be]);return Tt}var je=Ze;function mi(Te){var hn=Te.className,be=Te.children;return Wt.createElement("div",{className:hn},be)}var $t=mi,pn=Ot(8224),ei=Ot(16089),Bi=Ot(76846);function _e(Te){var hn=(0,Bi.bn)(Te),be=hn.getBoundingClientRect(),Tt=document.documentElement;return{left:be.left+(window.pageXOffset||Tt.scrollLeft)-(Tt.clientLeft||document.body.clientLeft||0),top:be.top+(window.pageYOffset||Tt.scrollTop)-(Tt.clientTop||document.body.clientTop||0)}}var un=function(hn,be){var Tt,Wn,Fn=hn.scrollBodyRef,Xn=hn.onScroll,si=hn.offsetScroll,wi=hn.container,yn=hn.direction,Vn=ye(Mt,"prefixCls"),Kn=((Tt=Fn.current)===null||Tt===void 0?void 0:Tt.scrollWidth)||0,Jn=((Wn=Fn.current)===null||Wn===void 0?void 0:Wn.clientWidth)||0,Qn=Kn&&Jn*(Jn/Kn),Gi=Wt.useRef(),At=Me({scrollLeft:0,isHiddenScrollBar:!0}),re=(0,ee.Z)(At,2),Ut=re[0],oe=re[1],fe=Wt.useRef({delta:0,x:0}),De=Wt.useState(!1),He=(0,ee.Z)(De,2),Ye=He[0],Sn=He[1],xn=Wt.useRef(null);Wt.useEffect(function(){return function(){ei.Z.cancel(xn.current)}},[]);var Qe=function(){Sn(!1)},jn=function(wn){wn.persist(),fe.current.delta=wn.pageX-Ut.scrollLeft,fe.current.x=0,Sn(!0),wn.preventDefault()},hi=function(wn){var Bn,Rn=wn||((Bn=window)===null||Bn===void 0?void 0:Bn.event),di=Rn.buttons;if(!Ye||di===0){Ye&&Sn(!1);return}var qn=fe.current.x+wn.pageX-fe.current.x-fe.current.delta,ui=yn==="rtl";qn=Math.max(ui?Qn-Jn:0,Math.min(ui?0:Jn-Qn,qn));var ci=!ui||Math.abs(qn)+Math.abs(Qn)<Jn;ci&&(Xn({scrollLeft:qn/Jn*(Kn+2)}),fe.current.x=wn.pageX)},ae=function(){ei.Z.cancel(xn.current),xn.current=(0,ei.Z)(function(){if(Fn.current){var wn=_e(Fn.current).top,Bn=wn+Fn.current.offsetHeight,Rn=wi===window?document.documentElement.scrollTop+window.innerHeight:_e(wi).top+wi.clientHeight;Bn-(0,Ge.Z)()<=Rn||wn>=Rn-si?oe(function(di){return(0,Jt.Z)((0,Jt.Z)({},di),{},{isHiddenScrollBar:!0})}):oe(function(di){return(0,Jt.Z)((0,Jt.Z)({},di),{},{isHiddenScrollBar:!1})})}})},En=function(wn){oe(function(Bn){return(0,Jt.Z)((0,Jt.Z)({},Bn),{},{scrollLeft:wn/Kn*Jn||0})})};return Wt.useImperativeHandle(be,function(){return{setScrollLeft:En,checkScrollBarVisible:ae}}),Wt.useEffect(function(){var Tn=(0,pn.Z)(document.body,"mouseup",Qe,!1),wn=(0,pn.Z)(document.body,"mousemove",hi,!1);return ae(),function(){Tn.remove(),wn.remove()}},[Qn,Ye]),Wt.useEffect(function(){if(Fn.current){for(var Tn=[],wn=(0,Bi.bn)(Fn.current);wn;)Tn.push(wn),wn=wn.parentElement;return Tn.forEach(function(Bn){return Bn.addEventListener("scroll",ae,!1)}),window.addEventListener("resize",ae,!1),window.addEventListener("scroll",ae,!1),wi.addEventListener("scroll",ae,!1),function(){Tn.forEach(function(Bn){return Bn.removeEventListener("scroll",ae)}),window.removeEventListener("resize",ae),window.removeEventListener("scroll",ae),wi.removeEventListener("scroll",ae)}}},[wi]),Wt.useEffect(function(){Ut.isHiddenScrollBar||oe(function(Tn){var wn=Fn.current;return wn?(0,Jt.Z)((0,Jt.Z)({},Tn),{},{scrollLeft:wn.scrollLeft/wn.scrollWidth*wn.clientWidth}):Tn})},[Ut.isHiddenScrollBar]),Kn<=Jn||!Qn||Ut.isHiddenScrollBar?null:Wt.createElement("div",{style:{height:(0,Ge.Z)(),width:Jn,bottom:si},className:"".concat(Vn,"-sticky-scroll")},Wt.createElement("div",{onMouseDown:jn,ref:Gi,className:Fe()("".concat(Vn,"-sticky-scroll-bar"),(0,ge.Z)({},"".concat(Vn,"-sticky-scroll-bar-active"),Ye)),style:{width:"".concat(Qn,"px"),transform:"translate3d(".concat(Ut.scrollLeft,"px, 0, 0)")}}))},$n=Wt.forwardRef(un);function vi(Te){return null}var Oi=vi;function Ei(Te){return null}var ri=Ei,bi="rc-table",Sr=[],mr={};function wr(){return"No Data"}function an(Te,hn){var be=(0,Jt.Z)({rowKey:"key",prefixCls:bi,emptyText:wr},Te),Tt=be.prefixCls,Wn=be.className,Fn=be.rowClassName,Xn=be.style,si=be.data,wi=be.rowKey,yn=be.scroll,Vn=be.tableLayout,Kn=be.direction,Jn=be.title,Qn=be.footer,Gi=be.summary,At=be.caption,re=be.id,Ut=be.showHeader,oe=be.components,fe=be.emptyText,De=be.onRow,He=be.onHeaderRow,Ye=be.onScroll,Sn=be.internalHooks,xn=be.transformColumns,Qe=be.internalRefs,jn=be.tailor,hi=be.getContainerWidth,ae=be.sticky,En=be.rowHoverable,Tn=En===void 0?!0:En,wn=si||Sr,Bn=!!wn.length,Rn=Sn===Dt.R,di=Wt.useCallback(function(Po,jo){return(0,Ke.Z)(oe,Po)||jo},[oe]),qn=Wt.useMemo(function(){return typeof wi=="function"?wi:function(Po){var jo=Po&&Po[wi];return jo}},[wi]),ui=di(["body"]),ci=Vi(),zi=(0,ee.Z)(ci,3),lr=zi[0],cr=zi[1],yr=zi[2],ii=$e(be,wn,qn),Ji=(0,ee.Z)(ii,6),qi=Ji[0],ur=Ji[1],Mi=Ji[2],Ai=Ji[3],Xe=Ji[4],Li=Ji[5],Wi=yn==null?void 0:yn.x,ar=Wt.useState(0),fr=(0,ee.Z)(ar,2),Yi=fr[0],fi=fr[1],nr=(0,br.Z)((0,Jt.Z)((0,Jt.Z)((0,Jt.Z)({},be),qi),{},{expandable:!!qi.expandedRowRender,columnTitle:qi.columnTitle,expandedKeys:Mi,getRowKey:qn,onTriggerExpand:Li,expandIcon:Ai,expandIconColumnIndex:qi.expandIconColumnIndex,direction:Kn,scrollWidth:Rn&&jn&&typeof Wi=="number"?Wi:null,clientWidth:Yi}),Rn?xn:null),Tr=(0,ee.Z)(nr,4),Dr=Tr[0],hr=Tr[1],Yr=Tr[2],Wr=Tr[3],Cr=Yr!=null?Yr:Wi,to=Wt.useMemo(function(){return{columns:Dr,flattenColumns:hr}},[Dr,hr]),yo=Wt.useRef(),qo=Wt.useRef(),Hr=Wt.useRef(),ta=Wt.useRef();Wt.useImperativeHandle(hn,function(){return{nativeElement:yo.current,scrollTo:function(jo){var wa;if(Hr.current instanceof HTMLElement){var qa=jo.index,Ka=jo.top,Nl=jo.key;if(Pn(Ka)){var ml;(ml=Hr.current)===null||ml===void 0||ml.scrollTo({top:Ka})}else{var Ao,io=Nl!=null?Nl:qn(wn[qa]);(Ao=Hr.current.querySelector('[data-row-key="'.concat(io,'"]')))===null||Ao===void 0||Ao.scrollIntoView()}}else(wa=Hr.current)!==null&&wa!==void 0&&wa.scrollTo&&Hr.current.scrollTo(jo)}}});var So=Wt.useRef(),ca=Wt.useState(!1),Lo=(0,ee.Z)(ca,2),Yo=Lo[0],ea=Lo[1],Qo=Wt.useState(!1),Oo=(0,ee.Z)(Qo,2),xo=Oo[0],oa=Oo[1],Ca=Me(new Map),Wo=(0,ee.Z)(Ca,2),Ia=Wo[0],Co=Wo[1],lo=Xt(hr),eo=lo.map(function(Po){return Ia.get(Po)}),Uo=Wt.useMemo(function(){return eo},[eo.join("_")]),gr=je(Uo,hr,Kn),Vr=yn&&Ue(yn.y),Ki=yn&&Ue(Cr)||!!qi.fixed,sr=Ki&&hr.some(function(Po){var jo=Po.fixed;return jo}),Xr=Wt.useRef(),tr=pi(ae,Tt),Un=tr.isSticky,ia=tr.offsetHeader,le=tr.offsetSummary,ln=tr.offsetScroll,Ja=tr.stickyClassName,Qa=tr.container,pa=Wt.useMemo(function(){return Gi==null?void 0:Gi(wn)},[Gi,wn]),Na=(Vr||Un)&&Wt.isValidElement(pa)&&pa.type===Yt&&pa.props.fixed,ss,ts,Ws;Vr&&(ts={overflowY:Bn?"scroll":"auto",maxHeight:yn.y}),Ki&&(ss={overflowX:"auto"},Vr||(ts={overflowY:"hidden"}),Ws={width:Cr===!0?"auto":Cr,minWidth:"100%"});var aa=Wt.useCallback(function(Po,jo){(0,Ae.Z)(yo.current)&&Co(function(wa){if(wa.get(Po)!==jo){var qa=new Map(wa);return qa.set(Po,jo),qa}return wa})},[]),Mr=Pi(null),Wa=(0,ee.Z)(Mr,2),_a=Wa[0],sa=Wa[1];function no(Po,jo){jo&&(typeof jo=="function"?jo(Po):jo.scrollLeft!==Po&&(jo.scrollLeft=Po,jo.scrollLeft!==Po&&setTimeout(function(){jo.scrollLeft=Po},0)))}var fa=(0,Pe.Z)(function(Po){var jo=Po.currentTarget,wa=Po.scrollLeft,qa=Kn==="rtl",Ka=typeof wa=="number"?wa:jo.scrollLeft,Nl=jo||mr;if(!sa()||sa()===Nl){var ml;_a(Nl),no(Ka,qo.current),no(Ka,Hr.current),no(Ka,So.current),no(Ka,(ml=Xr.current)===null||ml===void 0?void 0:ml.setScrollLeft)}var Ao=jo||qo.current;if(Ao){var io=Rn&&jn&&typeof Cr=="number"?Cr:Ao.scrollWidth,Ha=Ao.clientWidth;if(io===Ha){ea(!1),oa(!1);return}qa?(ea(-Ka<io-Ha),oa(-Ka>0)):(ea(Ka>0),oa(Ka<io-Ha))}}),ls=(0,Pe.Z)(function(Po){fa(Po),Ye==null||Ye(Po)}),ra=function(){if(Ki&&Hr.current){var jo;fa({currentTarget:(0,Bi.bn)(Hr.current),scrollLeft:(jo=Hr.current)===null||jo===void 0?void 0:jo.scrollLeft})}else ea(!1),oa(!1)},us=function(jo){var wa,qa=jo.width;(wa=Xr.current)===null||wa===void 0||wa.checkScrollBarVisible();var Ka=yo.current?yo.current.offsetWidth:qa;Rn&&hi&&yo.current&&(Ka=hi(yo.current,Ka)||Ka),Ka!==Yi&&(ra(),fi(Ka))},Ta=Wt.useRef(!1);Wt.useEffect(function(){Ta.current&&ra()},[Ki,si,Dr.length]),Wt.useEffect(function(){Ta.current=!0},[]);var Fl=Wt.useState(0),Io=(0,ee.Z)(Fl,2),La=Io[0],Eo=Io[1],Xo=Wt.useState(!0),ua=(0,ee.Z)(Xo,2),ga=ua[0],Vo=ua[1];Wt.useEffect(function(){(!jn||!Rn)&&(Hr.current instanceof Element?Eo((0,Ge.o)(Hr.current).width):Eo((0,Ge.o)(ta.current).width)),Vo((0,Ee.G)("position","sticky"))},[]),Wt.useEffect(function(){Rn&&Qe&&(Qe.body.current=Hr.current)});var fl=Wt.useCallback(function(Po){return Wt.createElement(Wt.Fragment,null,Wt.createElement(ho,Po),Na==="top"&&Wt.createElement(Le,Po,pa))},[Na,pa]),Br=Wt.useCallback(function(Po){return Wt.createElement(Le,Po,pa)},[pa]),pu=di(["table"],"table"),uo=Wt.useMemo(function(){return Vn||(sr?Cr==="max-content"?"auto":"fixed":Vr||Un||hr.some(function(Po){var jo=Po.ellipsis;return jo})?"fixed":"auto")},[Vr,sr,hr,Vn,Un]),Zl,Qs={colWidths:Uo,columCount:hr.length,stickyOffsets:gr,onHeaderRow:He,fixHeader:Vr,scroll:yn},bl=Wt.useMemo(function(){return Bn?null:typeof fe=="function"?fe():fe},[Bn,fe]),mu=Wt.createElement(po,{data:wn,measureColumnWidth:Vr||Ki||Un}),vu=Wt.createElement(Ko,{colWidths:hr.map(function(Po){var jo=Po.width;return jo}),columns:hr}),Hs=At!=null?Wt.createElement("caption",{className:"".concat(Tt,"-caption")},At):void 0,Vl=(0,kn.Z)(be,{data:!0}),Ho=(0,kn.Z)(be,{aria:!0});if(Vr||Un){var Gs;typeof ui=="function"?(Gs=ui(wn,{scrollbarSize:La,ref:Hr,onScroll:fa}),Qs.colWidths=hr.map(function(Po,jo){var wa=Po.width,qa=jo===hr.length-1?wa-La:wa;return typeof qa=="number"&&!Number.isNaN(qa)?qa:0})):Gs=Wt.createElement("div",{style:(0,Jt.Z)((0,Jt.Z)({},ss),ts),onScroll:ls,ref:Hr,className:Fe()("".concat(Tt,"-body"))},Wt.createElement(pu,(0,Nt.Z)({style:(0,Jt.Z)((0,Jt.Z)({},Ws),{},{tableLayout:uo})},Ho),Hs,vu,mu,!Na&&pa&&Wt.createElement(Le,{stickyOffsets:gr,flattenColumns:hr},pa)));var yu=(0,Jt.Z)((0,Jt.Z)((0,Jt.Z)({noData:!wn.length,maxContentScroll:Ki&&Cr==="max-content"},Qs),to),{},{direction:Kn,stickyClassName:Ja,onScroll:fa});Zl=Wt.createElement(Wt.Fragment,null,Ut!==!1&&Wt.createElement(bn,(0,Nt.Z)({},yu,{stickyTopOffset:ia,className:"".concat(Tt,"-header"),ref:qo}),fl),Gs,Na&&Na!=="top"&&Wt.createElement(bn,(0,Nt.Z)({},yu,{stickyBottomOffset:le,className:"".concat(Tt,"-summary"),ref:So}),Br),Un&&Hr.current&&Hr.current instanceof Element&&Wt.createElement($n,{ref:Xr,offsetScroll:ln,scrollBodyRef:Hr,onScroll:fa,container:Qa,direction:Kn}))}else Zl=Wt.createElement("div",{style:(0,Jt.Z)((0,Jt.Z)({},ss),ts),className:Fe()("".concat(Tt,"-content")),onScroll:fa,ref:Hr},Wt.createElement(pu,(0,Nt.Z)({style:(0,Jt.Z)((0,Jt.Z)({},Ws),{},{tableLayout:uo})},Ho),Hs,vu,Ut!==!1&&Wt.createElement(ho,(0,Nt.Z)({},Qs,to)),mu,pa&&Wt.createElement(Le,{stickyOffsets:gr,flattenColumns:hr},pa)));var gl=Wt.createElement("div",(0,Nt.Z)({className:Fe()(Tt,Wn,(0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)({},"".concat(Tt,"-rtl"),Kn==="rtl"),"".concat(Tt,"-ping-left"),Yo),"".concat(Tt,"-ping-right"),xo),"".concat(Tt,"-layout-fixed"),Vn==="fixed"),"".concat(Tt,"-fixed-header"),Vr),"".concat(Tt,"-fixed-column"),sr),"".concat(Tt,"-fixed-column-gapped"),sr&&Wr),"".concat(Tt,"-scroll-horizontal"),Ki),"".concat(Tt,"-has-fix-left"),hr[0]&&hr[0].fixed),"".concat(Tt,"-has-fix-right"),hr[hr.length-1]&&hr[hr.length-1].fixed==="right")),style:Xn,id:re,ref:yo},Vl),Jn&&Wt.createElement($t,{className:"".concat(Tt,"-title")},Jn(wn)),Wt.createElement("div",{ref:ta,className:"".concat(Tt,"-container")},Zl),Qn&&Wt.createElement($t,{className:"".concat(Tt,"-footer")},Qn(wn)));Ki&&(gl=Wt.createElement(ve.Z,{onResize:us},gl));var bu=Oe(hr,gr,Kn),pl=Wt.useMemo(function(){return{scrollX:Cr,prefixCls:Tt,getComponent:di,scrollbarSize:La,direction:Kn,fixedInfoList:bu,isSticky:Un,supportSticky:ga,componentWidth:Yi,fixHeader:Vr,fixColumn:sr,horizonScroll:Ki,tableLayout:uo,rowClassName:Fn,expandedRowClassName:qi.expandedRowClassName,expandIcon:Ai,expandableType:ur,expandRowByClick:qi.expandRowByClick,expandedRowRender:qi.expandedRowRender,onTriggerExpand:Li,expandIconColumnIndex:qi.expandIconColumnIndex,indentSize:qi.indentSize,allColumnsFixedLeft:hr.every(function(Po){return Po.fixed==="left"}),emptyNode:bl,columns:Dr,flattenColumns:hr,onColumnResize:aa,hoverStartRow:lr,hoverEndRow:cr,onHover:yr,rowExpandable:qi.rowExpandable,onRow:De,getRowKey:qn,expandedKeys:Mi,childrenColumnName:Xe,rowHoverable:Tn}},[Cr,Tt,di,La,Kn,bu,Un,ga,Yi,Vr,sr,Ki,uo,Fn,qi.expandedRowClassName,Ai,ur,qi.expandRowByClick,qi.expandedRowRender,Li,qi.expandIconColumnIndex,qi.indentSize,bl,Dr,hr,aa,lr,cr,yr,qi.rowExpandable,De,qn,Mi,Xe,Tn]);return Wt.createElement(Mt.Provider,{value:pl},gl)}var wo=Wt.forwardRef(an);function Ar(Te){return lt(wo,Te)}var mo=Ar();mo.EXPAND_COLUMN=Dt.w,mo.INTERNAL_HOOKS=Dt.R,mo.Column=Oi,mo.ColumnGroup=ri,mo.Summary=on;var Ve=mo,ni=Ot(45680),Ni=ze(null),Hi=ze(null);function Ii(Te,hn,be){var Tt=hn||1;return be[Te+Tt]-(be[Te]||0)}function Qi(Te){var hn=Te.rowInfo,be=Te.column,Tt=Te.colIndex,Wn=Te.indent,Fn=Te.index,Xn=Te.component,si=Te.renderIndex,wi=Te.record,yn=Te.style,Vn=Te.className,Kn=Te.inverse,Jn=Te.getHeight,Qn=be.render,Gi=be.dataIndex,At=be.className,re=be.width,Ut=ye(Hi,["columnsOffset"]),oe=Ut.columnsOffset,fe=Di(hn,be,Tt,Wn,Fn),De=fe.key,He=fe.fixedInfo,Ye=fe.appendCellNode,Sn=fe.additionalCellProps,xn=Sn.style,Qe=Sn.colSpan,jn=Qe===void 0?1:Qe,hi=Sn.rowSpan,ae=hi===void 0?1:hi,En=Tt-1,Tn=Ii(En,jn,oe),wn=jn>1?re-Tn:0,Bn=(0,Jt.Z)((0,Jt.Z)((0,Jt.Z)({},xn),yn),{},{flex:"0 0 ".concat(Tn,"px"),width:"".concat(Tn,"px"),marginRight:wn,pointerEvents:"auto"}),Rn=Wt.useMemo(function(){return Kn?ae<=1:jn===0||ae===0||ae>1},[ae,jn,Kn]);Rn?Bn.visibility="hidden":Kn&&(Bn.height=Jn==null?void 0:Jn(ae));var di=Rn?function(){return null}:Qn,qn={};return(ae===0||jn===0)&&(qn.rowSpan=1,qn.colSpan=1),Wt.createElement(ce,(0,Nt.Z)({className:Fe()(At,Vn),ellipsis:be.ellipsis,align:be.align,scope:be.rowScope,component:Xn,prefixCls:hn.prefixCls,key:De,record:wi,index:Fn,renderIndex:si,dataIndex:Gi,render:di,shouldCellUpdate:be.shouldCellUpdate},He,{appendNode:Ye,additionalProps:(0,Jt.Z)((0,Jt.Z)({},Sn),{},{style:Bn},qn)}))}var Or=Qi,Lr=["data","index","className","rowKey","style","extra","getHeight"],Nr=Wt.forwardRef(function(Te,hn){var be=Te.data,Tt=Te.index,Wn=Te.className,Fn=Te.rowKey,Xn=Te.style,si=Te.extra,wi=Te.getHeight,yn=(0,xt.Z)(Te,Lr),Vn=be.record,Kn=be.indent,Jn=be.index,Qn=ye(Mt,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Gi=Qn.scrollX,At=Qn.flattenColumns,re=Qn.prefixCls,Ut=Qn.fixColumn,oe=Qn.componentWidth,fe=ye(Ni,["getComponent"]),De=fe.getComponent,He=ai(Vn,Fn,Tt,Kn),Ye=De(["body","row"],"div"),Sn=De(["body","cell"],"div"),xn=He.rowSupportExpand,Qe=He.expanded,jn=He.rowProps,hi=He.expandedRowRender,ae=He.expandedRowClassName,En;if(xn&&Qe){var Tn=hi(Vn,Tt,Kn+1,Qe),wn=Ti(ae,Vn,Tt,Kn),Bn={};Ut&&(Bn={style:(0,ge.Z)({},"--virtual-width","".concat(oe,"px"))});var Rn="".concat(re,"-expanded-row-cell");En=Wt.createElement(Ye,{className:Fe()("".concat(re,"-expanded-row"),"".concat(re,"-expanded-row-level-").concat(Kn+1),wn)},Wt.createElement(ce,{component:Sn,prefixCls:re,className:Fe()(Rn,(0,ge.Z)({},"".concat(Rn,"-fixed"),Ut)),additionalProps:Bn},Tn))}var di=(0,Jt.Z)((0,Jt.Z)({},Xn),{},{width:Gi});si&&(di.position="absolute",di.pointerEvents="none");var qn=Wt.createElement(Ye,(0,Nt.Z)({},jn,yn,{"data-row-key":Fn,ref:xn?null:hn,className:Fe()(Wn,"".concat(re,"-row"),jn==null?void 0:jn.className,(0,ge.Z)({},"".concat(re,"-row-extra"),si)),style:(0,Jt.Z)((0,Jt.Z)({},di),jn==null?void 0:jn.style)}),At.map(function(ui,ci){return Wt.createElement(Or,{key:ci,component:Sn,rowInfo:He,column:ui,colIndex:ci,indent:Kn,index:Tt,renderIndex:Jn,record:Vn,inverse:si,getHeight:wi})}));return xn?Wt.createElement("div",{ref:hn},qn,En):qn}),Rr=gt(Nr),dn=Rr,$r=Wt.forwardRef(function(Te,hn){var be=Te.data,Tt=Te.onScroll,Wn=ye(Mt,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),Fn=Wn.flattenColumns,Xn=Wn.onColumnResize,si=Wn.getRowKey,wi=Wn.expandedKeys,yn=Wn.prefixCls,Vn=Wn.childrenColumnName,Kn=Wn.scrollX,Jn=Wn.direction,Qn=ye(Ni),Gi=Qn.sticky,At=Qn.scrollY,re=Qn.listItemHeight,Ut=Qn.getComponent,oe=Qn.onScroll,fe=Wt.useRef(),De=gn(be,Vn,wi,si),He=Wt.useMemo(function(){var En=0;return Fn.map(function(Tn){var wn=Tn.width,Bn=Tn.key;return En+=wn,[Bn,wn,En]})},[Fn]),Ye=Wt.useMemo(function(){return He.map(function(En){return En[2]})},[He]);Wt.useEffect(function(){He.forEach(function(En){var Tn=(0,ee.Z)(En,2),wn=Tn[0],Bn=Tn[1];Xn(wn,Bn)})},[He]),Wt.useImperativeHandle(hn,function(){var En,Tn={scrollTo:function(Bn){var Rn;(Rn=fe.current)===null||Rn===void 0||Rn.scrollTo(Bn)},nativeElement:(En=fe.current)===null||En===void 0?void 0:En.nativeElement};return Object.defineProperty(Tn,"scrollLeft",{get:function(){var Bn;return((Bn=fe.current)===null||Bn===void 0?void 0:Bn.getScrollInfo().x)||0},set:function(Bn){var Rn;(Rn=fe.current)===null||Rn===void 0||Rn.scrollTo({left:Bn})}}),Tn});var Sn=function(Tn,wn){var Bn,Rn=(Bn=De[wn])===null||Bn===void 0?void 0:Bn.record,di=Tn.onCell;if(di){var qn,ui=di(Rn,wn);return(qn=ui==null?void 0:ui.rowSpan)!==null&&qn!==void 0?qn:1}return 1},xn=function(Tn){var wn=Tn.start,Bn=Tn.end,Rn=Tn.getSize,di=Tn.offsetY;if(Bn<0)return null;for(var qn=Fn.filter(function(Ai){return Sn(Ai,wn)===0}),ui=wn,ci=function(Xe){if(qn=qn.filter(function(Li){return Sn(Li,Xe)===0}),!qn.length)return ui=Xe,1},zi=wn;zi>=0&&!ci(zi);zi-=1);for(var lr=Fn.filter(function(Ai){return Sn(Ai,Bn)!==1}),cr=Bn,yr=function(Xe){if(lr=lr.filter(function(Li){return Sn(Li,Xe)!==1}),!lr.length)return cr=Math.max(Xe-1,Bn),1},ii=Bn;ii<De.length&&!yr(ii);ii+=1);for(var Ji=[],qi=function(Xe){var Li=De[Xe];if(!Li)return 1;Fn.some(function(Wi){return Sn(Wi,Xe)>1})&&Ji.push(Xe)},ur=ui;ur<=cr;ur+=1)qi(ur);var Mi=Ji.map(function(Ai){var Xe=De[Ai],Li=si(Xe.record,Ai),Wi=function(Yi){var fi=Ai+Yi-1,nr=si(De[fi].record,fi),Tr=Rn(Li,nr);return Tr.bottom-Tr.top},ar=Rn(Li);return Wt.createElement(dn,{key:Ai,data:Xe,rowKey:Li,index:Ai,style:{top:-di+ar.top},extra:!0,getHeight:Wi})});return Mi},Qe=Wt.useMemo(function(){return{columnsOffset:Ye}},[Ye]),jn="".concat(yn,"-tbody"),hi=Ut(["body","wrapper"]),ae={};return Gi&&(ae.position="sticky",ae.bottom=0,(0,jt.Z)(Gi)==="object"&&Gi.offsetScroll&&(ae.bottom=Gi.offsetScroll)),Wt.createElement(Hi.Provider,{value:Qe},Wt.createElement(ni.Z,{fullHeight:!1,ref:fe,prefixCls:"".concat(jn,"-virtual"),styles:{horizontalScrollBar:ae},className:jn,height:At,itemHeight:re||24,data:De,itemKey:function(Tn){return si(Tn.record)},component:hi,scrollWidth:Kn,direction:Jn,onVirtualScroll:function(Tn){var wn,Bn=Tn.x;Tt({currentTarget:(wn=fe.current)===null||wn===void 0?void 0:wn.nativeElement,scrollLeft:Bn})},onScroll:oe,extraRender:xn},function(En,Tn,wn){var Bn=si(En.record,Tn);return Wt.createElement(dn,{data:En,rowKey:Bn,index:Tn,style:wn.style})}))}),cn=gt($r),Ri=cn,_i=function(hn,be){var Tt=be.ref,Wn=be.onScroll;return Wt.createElement(Ri,{ref:Tt,data:hn,onScroll:Wn})};function xr(Te,hn){var be=Te.data,Tt=Te.columns,Wn=Te.scroll,Fn=Te.sticky,Xn=Te.prefixCls,si=Xn===void 0?bi:Xn,wi=Te.className,yn=Te.listItemHeight,Vn=Te.components,Kn=Te.onScroll,Jn=Wn||{},Qn=Jn.x,Gi=Jn.y;typeof Qn!="number"&&(Qn=1),typeof Gi!="number"&&(Gi=500);var At=(0,An.zX)(function(oe,fe){return(0,Ke.Z)(Vn,oe)||fe}),re=(0,An.zX)(Kn),Ut=Wt.useMemo(function(){return{sticky:Fn,scrollY:Gi,listItemHeight:yn,getComponent:At,onScroll:re}},[Fn,Gi,yn,At,re]);return Wt.createElement(Ni.Provider,{value:Ut},Wt.createElement(Ve,(0,Nt.Z)({},Te,{className:Fe()(wi,"".concat(si,"-virtual")),scroll:(0,Jt.Z)((0,Jt.Z)({},Wn),{},{x:Qn}),components:(0,Jt.Z)((0,Jt.Z)({},Vn),{},{body:be!=null&&be.length?_i:void 0}),columns:Tt,internalHooks:Dt.R,tailor:!0,ref:hn})))}var zo=Wt.forwardRef(xr);function Mo(Te){return lt(zo,Te)}var qr=Mo(),vo=null},90494:function(zn,oi,Ot){"use strict";Ot.d(oi,{g:function(){return Wt},v:function(){return Se}});var Dt=Ot(77321),ee=Ot(74416),Pe=Ot(48736),xe=["expandable"],Se="RC_TABLE_INTERNAL_COL_DEFINE";function Wt(se){var ze=se.expandable,ye=(0,ee.Z)(se,xe),Nt;return"expandable"in se?Nt=(0,Dt.Z)((0,Dt.Z)({},ye),ze):Nt=ye,Nt.showExpandColumn===!1&&(Nt.expandIconColumnIndex=-1),Nt}},22711:function(zn,oi,Ot){"use strict";Ot.r(oi),Ot.d(oi,{ResizableTextArea:function(){return he},default:function(){return Mn}});var Dt=Ot(72308),ee=Ot(49618),Pe=Ot(77321),xe=Ot(80702),Se=Ot(52487),Wt=Ot(74416),se=Ot(92310),ze=Ot.n(se),ye=Ot(36901),Nt=Ot(66003),We=Ot(30292),ie=Ot(18929),Ne=Ot(59301),bt=Ot(62853),nt=Ot(29301),et=Ot(34280),ct=Ot(16089),lt=`
|
|
min-height:0 !important;
|
|
max-height:none !important;
|
|
height:0 !important;
|
|
visibility:hidden !important;
|
|
overflow:hidden !important;
|
|
position:absolute !important;
|
|
z-index:-1000 !important;
|
|
top:0 !important;
|
|
right:0 !important;
|
|
pointer-events: none !important;
|
|
`,gt=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],mt={},St;function Mt(tn){var rn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,nn=tn.getAttribute("id")||tn.getAttribute("data-reactid")||tn.getAttribute("name");if(rn&&mt[nn])return mt[nn];var me=window.getComputedStyle(tn),Xt=me.getPropertyValue("box-sizing")||me.getPropertyValue("-moz-box-sizing")||me.getPropertyValue("-webkit-box-sizing"),Ue=parseFloat(me.getPropertyValue("padding-bottom"))+parseFloat(me.getPropertyValue("padding-top")),Pn=parseFloat(me.getPropertyValue("border-bottom-width"))+parseFloat(me.getPropertyValue("border-top-width")),Yn=gt.map(function(vn){return"".concat(vn,":").concat(me.getPropertyValue(vn))}).join(";"),Be={sizingStyle:Yn,paddingSize:Ue,borderSize:Pn,boxSizing:Xt};return rn&&nn&&(mt[nn]=Be),Be}function zt(tn){var rn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,nn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,me=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;St||(St=document.createElement("textarea"),St.setAttribute("tab-index","-1"),St.setAttribute("aria-hidden","true"),St.setAttribute("name","hiddenTextarea"),document.body.appendChild(St)),tn.getAttribute("wrap")?St.setAttribute("wrap",tn.getAttribute("wrap")):St.removeAttribute("wrap");var Xt=Mt(tn,rn),Ue=Xt.paddingSize,Pn=Xt.borderSize,Yn=Xt.boxSizing,Be=Xt.sizingStyle;St.setAttribute("style","".concat(Be,";").concat(lt)),St.value=tn.value||tn.placeholder||"";var vn=void 0,Je=void 0,An,we=St.scrollHeight;if(Yn==="border-box"?we+=Pn:Yn==="content-box"&&(we-=Ue),nn!==null||me!==null){St.value=" ";var sn=St.scrollHeight-Ue;nn!==null&&(vn=sn*nn,Yn==="border-box"&&(vn=vn+Ue+Pn),we=Math.max(vn,we)),me!==null&&(Je=sn*me,Yn==="border-box"&&(Je=Je+Ue+Pn),An=we>Je?"":"hidden",we=Math.min(Je,we))}var ce={height:we,overflowY:An,resize:"none"};return vn&&(ce.minHeight=vn),Je&&(ce.maxHeight=Je),ce}var Ht=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],qt=0,jt=1,Jt=2,ge=Ne.forwardRef(function(tn,rn){var nn=tn,me=nn.prefixCls,Xt=nn.defaultValue,Ue=nn.value,Pn=nn.autoSize,Yn=nn.onResize,Be=nn.className,vn=nn.style,Je=nn.disabled,An=nn.onChange,we=nn.onInternalAutoSize,sn=(0,Wt.Z)(nn,Ht),ce=(0,ie.Z)(Xt,{value:Ue,postState:function($i){return $i!=null?$i:""}}),Nn=(0,Se.Z)(ce,2),Ci=Nn[0],It=Nn[1],wt=function($i){It($i.target.value),An==null||An($i)},xt=Ne.useRef();Ne.useImperativeHandle(rn,function(){return{textArea:xt.current}});var Ft=Ne.useMemo(function(){return Pn&&(0,bt.Z)(Pn)==="object"?[Pn.minRows,Pn.maxRows]:[]},[Pn]),Gt=(0,Se.Z)(Ft,2),kt=Gt[0],Yt=Gt[1],pe=!!Pn,Le=function(){try{if(document.activeElement===xt.current){var $i=xt.current,Kr=$i.selectionStart,Xi=$i.selectionEnd,zr=$i.scrollTop;xt.current.setSelectionRange(Kr,Xi),xt.current.scrollTop=zr}}catch(so){}},on=Ne.useState(Jt),ve=(0,Se.Z)(on,2),Ae=ve[0],Ee=ve[1],Ge=Ne.useState(),kn=(0,Se.Z)(Ge,2),In=kn[0],gn=kn[1],ai=function(){Ee(qt)};(0,et.Z)(function(){pe&&ai()},[Ue,kt,Yt,pe]),(0,et.Z)(function(){if(Ae===qt)Ee(jt);else if(Ae===jt){var Di=zt(xt.current,!1,kt,Yt);Ee(Jt),gn(Di)}else Le()},[Ae]);var xi=Ne.useRef(),Gn=function(){ct.Z.cancel(xi.current)},Si=function($i){Ae===Jt&&(Yn==null||Yn($i),Pn&&(Gn(),xi.current=(0,ct.Z)(function(){ai()})))};Ne.useEffect(function(){return Gn},[]);var _n=pe?In:null,Ti=(0,Pe.Z)((0,Pe.Z)({},vn),_n);return(Ae===qt||Ae===jt)&&(Ti.overflowY="hidden",Ti.overflowX="hidden"),Ne.createElement(nt.Z,{onResize:Si,disabled:!(Pn||Yn)},Ne.createElement("textarea",(0,Dt.Z)({},sn,{ref:xt,style:Ti,className:ze()(me,Be,(0,ee.Z)({},"".concat(me,"-disabled"),Je)),disabled:Je,value:Ci,onChange:wt})))}),he=ge,Fe=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],Re=Ne.forwardRef(function(tn,rn){var nn,me=tn.defaultValue,Xt=tn.value,Ue=tn.onFocus,Pn=tn.onBlur,Yn=tn.onChange,Be=tn.allowClear,vn=tn.maxLength,Je=tn.onCompositionStart,An=tn.onCompositionEnd,we=tn.suffix,sn=tn.prefixCls,ce=sn===void 0?"rc-textarea":sn,Nn=tn.showCount,Ci=tn.count,It=tn.className,wt=tn.style,xt=tn.disabled,Ft=tn.hidden,Gt=tn.classNames,kt=tn.styles,Yt=tn.onResize,pe=tn.onClear,Le=tn.onPressEnter,on=tn.readOnly,ve=tn.autoSize,Ae=tn.onKeyDown,Ee=(0,Wt.Z)(tn,Fe),Ge=(0,ie.Z)(me,{value:Xt,defaultValue:me}),kn=(0,Se.Z)(Ge,2),In=kn[0],gn=kn[1],ai=In==null?"":String(In),xi=Ne.useState(!1),Gn=(0,Se.Z)(xi,2),Si=Gn[0],_n=Gn[1],Ti=Ne.useRef(!1),Di=Ne.useState(null),$i=(0,Se.Z)(Di,2),Kr=$i[0],Xi=$i[1],zr=(0,Ne.useRef)(null),so=(0,Ne.useRef)(null),po=function(){var Ze;return(Ze=so.current)===null||Ze===void 0?void 0:Ze.textArea},Jr=function(){po().focus()};(0,Ne.useImperativeHandle)(rn,function(){var pi;return{resizableTextArea:so.current,focus:Jr,blur:function(){po().blur()},nativeElement:((pi=zr.current)===null||pi===void 0?void 0:pi.nativeElement)||po()}}),(0,Ne.useEffect)(function(){_n(function(pi){return!xt&&pi})},[xt]);var Do=Ne.useState(null),Bo=(0,Se.Z)(Do,2),Ko=Bo[0],bo=Bo[1];Ne.useEffect(function(){if(Ko){var pi;(pi=po()).setSelectionRange.apply(pi,(0,xe.Z)(Ko))}},[Ko]);var ko=(0,Nt.Z)(Ci,Nn),Ct=(nn=ko.max)!==null&&nn!==void 0?nn:vn,Zn=Number(Ct)>0,bn=ko.strategy(ai),Pr=!!Ct&&bn>Ct,Er=function(Ze,je){var mi=je;!Ti.current&&ko.exceedFormatter&&ko.max&&ko.strategy(je)>ko.max&&(mi=ko.exceedFormatter(je,{max:ko.max}),je!==mi&&bo([po().selectionStart||0,po().selectionEnd||0])),gn(mi),(0,We.rJ)(Ze.currentTarget,Ze,Yn,mi)},Zi=function(Ze){Ti.current=!0,Je==null||Je(Ze)},_r=function(Ze){Ti.current=!1,Er(Ze,Ze.currentTarget.value),An==null||An(Ze)},ho=function(Ze){Er(Ze,Ze.target.value)},br=function(Ze){Ze.key==="Enter"&&Le&&Le(Ze),Ae==null||Ae(Ze)},$e=function(Ze){_n(!0),Ue==null||Ue(Ze)},Oe=function(Ze){_n(!1),Pn==null||Pn(Ze)},Me=function(Ze){gn(""),Jr(),(0,We.rJ)(po(),Ze,Yn)},Pi=we,Vi;ko.show&&(ko.showFormatter?Vi=ko.showFormatter({value:ai,count:bn,maxLength:Ct}):Vi="".concat(bn).concat(Zn?" / ".concat(Ct):""),Pi=Ne.createElement(Ne.Fragment,null,Pi,Ne.createElement("span",{className:ze()("".concat(ce,"-data-count"),Gt==null?void 0:Gt.count),style:kt==null?void 0:kt.count},Vi)));var rr=function(Ze){var je;Yt==null||Yt(Ze),(je=po())!==null&&je!==void 0&&je.style.height&&Xi(!0)},Dn=!ve&&!Nn&&!Be;return Ne.createElement(ye.BaseInput,{ref:zr,value:ai,allowClear:Be,handleReset:Me,suffix:Pi,prefixCls:ce,classNames:(0,Pe.Z)((0,Pe.Z)({},Gt),{},{affixWrapper:ze()(Gt==null?void 0:Gt.affixWrapper,(0,ee.Z)((0,ee.Z)({},"".concat(ce,"-show-count"),Nn),"".concat(ce,"-textarea-allow-clear"),Be))}),disabled:xt,focused:Si,className:ze()(It,Pr&&"".concat(ce,"-out-of-range")),style:(0,Pe.Z)((0,Pe.Z)({},wt),Kr&&!Dn?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Vi=="string"?Vi:void 0}},hidden:Ft,readOnly:on,onClear:pe},Ne.createElement(he,(0,Dt.Z)({},Ee,{autoSize:ve,maxLength:vn,onKeyDown:br,onChange:ho,onFocus:$e,onBlur:Oe,onCompositionStart:Zi,onCompositionEnd:_r,className:ze()(Gt==null?void 0:Gt.textarea),style:(0,Pe.Z)((0,Pe.Z)({},kt==null?void 0:kt.textarea),{},{resize:wt==null?void 0:wt.resize}),disabled:xt,prefixCls:ce,onResize:rr,ref:so,readOnly:on})))}),Ke=Re,Mn=Ke},639:function(zn,oi,Ot){"use strict";Ot.d(oi,{Z:function(){return mt}});var Dt=Ot(72308),ee=Ot(49618),Pe=Ot(77321),xe=Ot(52487),Se=Ot(74416),Wt=Ot(59301),se=Ot(92310),ze=Ot.n(se),ye=Ot(26112),Nt=Ot(30699),We=function(Mt){for(var zt=Mt.prefixCls,Ht=Mt.level,qt=Mt.isStart,jt=Mt.isEnd,Jt="".concat(zt,"-indent-unit"),ge=[],he=0;he<Ht;he+=1)ge.push(Wt.createElement("span",{key:he,className:ze()(Jt,(0,ee.Z)((0,ee.Z)({},"".concat(Jt,"-start"),qt[he]),"".concat(Jt,"-end"),jt[he]))}));return Wt.createElement("span",{"aria-hidden":"true",className:"".concat(zt,"-indent")},ge)},ie=Wt.memo(We),Ne=Ot(65065),bt=Ot(34061),nt=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],et="open",ct="close",lt="---",gt=function(Mt){var zt,Ht,qt,jt=Mt.eventKey,Jt=Mt.className,ge=Mt.style,he=Mt.dragOver,Fe=Mt.dragOverGapTop,Re=Mt.dragOverGapBottom,Ke=Mt.isLeaf,Mn=Mt.isStart,tn=Mt.isEnd,rn=Mt.expanded,nn=Mt.selected,me=Mt.checked,Xt=Mt.halfChecked,Ue=Mt.loading,Pn=Mt.domRef,Yn=Mt.active,Be=Mt.data,vn=Mt.onMouseMove,Je=Mt.selectable,An=(0,Se.Z)(Mt,nt),we=Wt.useContext(Nt.k),sn=Wt.useContext(Nt.y),ce=Wt.useRef(null),Nn=Wt.useState(!1),Ci=(0,xe.Z)(Nn,2),It=Ci[0],wt=Ci[1],xt=!!(we.disabled||Mt.disabled||(zt=sn.nodeDisabled)!==null&&zt!==void 0&&zt.call(sn,Be)),Ft=Wt.useMemo(function(){return!we.checkable||Mt.checkable===!1?!1:we.checkable},[we.checkable,Mt.checkable]),Gt=function(bn){xt||we.onNodeSelect(bn,(0,bt.F)(Mt))},kt=function(bn){xt||!Ft||Mt.disableCheckbox||we.onNodeCheck(bn,(0,bt.F)(Mt),!me)},Yt=Wt.useMemo(function(){return typeof Je=="boolean"?Je:we.selectable},[Je,we.selectable]),pe=function(bn){we.onNodeClick(bn,(0,bt.F)(Mt)),Yt?Gt(bn):kt(bn)},Le=function(bn){we.onNodeDoubleClick(bn,(0,bt.F)(Mt))},on=function(bn){we.onNodeMouseEnter(bn,(0,bt.F)(Mt))},ve=function(bn){we.onNodeMouseLeave(bn,(0,bt.F)(Mt))},Ae=function(bn){we.onNodeContextMenu(bn,(0,bt.F)(Mt))},Ee=Wt.useMemo(function(){return!!(we.draggable&&(!we.draggable.nodeDraggable||we.draggable.nodeDraggable(Be)))},[we.draggable,Be]),Ge=function(bn){bn.stopPropagation(),wt(!0),we.onNodeDragStart(bn,Mt);try{bn.dataTransfer.setData("text/plain","")}catch(Pr){}},kn=function(bn){bn.preventDefault(),bn.stopPropagation(),we.onNodeDragEnter(bn,Mt)},In=function(bn){bn.preventDefault(),bn.stopPropagation(),we.onNodeDragOver(bn,Mt)},gn=function(bn){bn.stopPropagation(),we.onNodeDragLeave(bn,Mt)},ai=function(bn){bn.stopPropagation(),wt(!1),we.onNodeDragEnd(bn,Mt)},xi=function(bn){bn.preventDefault(),bn.stopPropagation(),wt(!1),we.onNodeDrop(bn,Mt)},Gn=function(bn){Ue||we.onNodeExpand(bn,(0,bt.F)(Mt))},Si=Wt.useMemo(function(){var Zn=(0,Ne.Z)(we.keyEntities,jt)||{},bn=Zn.children;return!!(bn||[]).length},[we.keyEntities,jt]),_n=Wt.useMemo(function(){return Ke===!1?!1:Ke||!we.loadData&&!Si||we.loadData&&Mt.loaded&&!Si},[Ke,we.loadData,Si,Mt.loaded]);Wt.useEffect(function(){Ue||typeof we.loadData=="function"&&rn&&!_n&&!Mt.loaded&&we.onNodeLoad((0,bt.F)(Mt))},[Ue,we.loadData,we.onNodeLoad,rn,_n,Mt]);var Ti=Wt.useMemo(function(){var Zn;return(Zn=we.draggable)!==null&&Zn!==void 0&&Zn.icon?Wt.createElement("span",{className:"".concat(we.prefixCls,"-draggable-icon")},we.draggable.icon):null},[we.draggable]),Di=function(bn){var Pr=Mt.switcherIcon||we.switcherIcon;return typeof Pr=="function"?Pr((0,Pe.Z)((0,Pe.Z)({},Mt),{},{isLeaf:bn})):Pr},$i=function(){if(_n){var bn=Di(!0);return bn!==!1?Wt.createElement("span",{className:ze()("".concat(we.prefixCls,"-switcher"),"".concat(we.prefixCls,"-switcher-noop"))},bn):null}var Pr=Di(!1);return Pr!==!1?Wt.createElement("span",{onClick:Gn,className:ze()("".concat(we.prefixCls,"-switcher"),"".concat(we.prefixCls,"-switcher_").concat(rn?et:ct))},Pr):null},Kr=Wt.useMemo(function(){if(!Ft)return null;var Zn=typeof Ft!="boolean"?Ft:null;return Wt.createElement("span",{className:ze()("".concat(we.prefixCls,"-checkbox"),(0,ee.Z)((0,ee.Z)((0,ee.Z)({},"".concat(we.prefixCls,"-checkbox-checked"),me),"".concat(we.prefixCls,"-checkbox-indeterminate"),!me&&Xt),"".concat(we.prefixCls,"-checkbox-disabled"),xt||Mt.disableCheckbox)),onClick:kt,role:"checkbox","aria-checked":Xt?"mixed":me,"aria-disabled":xt||Mt.disableCheckbox,"aria-label":"Select ".concat(typeof Mt.title=="string"?Mt.title:"tree node")},Zn)},[Ft,me,Xt,xt,Mt.disableCheckbox,Mt.title]),Xi=Wt.useMemo(function(){return _n?null:rn?et:ct},[_n,rn]),zr=Wt.useMemo(function(){return Wt.createElement("span",{className:ze()("".concat(we.prefixCls,"-iconEle"),"".concat(we.prefixCls,"-icon__").concat(Xi||"docu"),(0,ee.Z)({},"".concat(we.prefixCls,"-icon_loading"),Ue))})},[we.prefixCls,Xi,Ue]),so=Wt.useMemo(function(){var Zn=!!we.draggable,bn=!Mt.disabled&&Zn&&we.dragOverNodeKey===jt;return bn?we.dropIndicatorRender({dropPosition:we.dropPosition,dropLevelOffset:we.dropLevelOffset,indent:we.indent,prefixCls:we.prefixCls,direction:we.direction}):null},[we.dropPosition,we.dropLevelOffset,we.indent,we.prefixCls,we.direction,we.draggable,we.dragOverNodeKey,we.dropIndicatorRender]),po=Wt.useMemo(function(){var Zn=Mt.title,bn=Zn===void 0?lt:Zn,Pr="".concat(we.prefixCls,"-node-content-wrapper"),Er;if(we.showIcon){var Zi=Mt.icon||we.icon;Er=Zi?Wt.createElement("span",{className:ze()("".concat(we.prefixCls,"-iconEle"),"".concat(we.prefixCls,"-icon__customize"))},typeof Zi=="function"?Zi(Mt):Zi):zr}else we.loadData&&Ue&&(Er=zr);var _r;return typeof bn=="function"?_r=bn(Be):we.titleRender?_r=we.titleRender(Be):_r=bn,Wt.createElement("span",{ref:ce,title:typeof bn=="string"?bn:"",className:ze()(Pr,"".concat(Pr,"-").concat(Xi||"normal"),(0,ee.Z)({},"".concat(we.prefixCls,"-node-selected"),!xt&&(nn||It))),onMouseEnter:on,onMouseLeave:ve,onContextMenu:Ae,onClick:pe,onDoubleClick:Le},Er,Wt.createElement("span",{className:"".concat(we.prefixCls,"-title")},_r),so)},[we.prefixCls,we.showIcon,Mt,we.icon,zr,we.titleRender,Be,Xi,on,ve,Ae,pe,Le]),Jr=(0,ye.Z)(An,{aria:!0,data:!0}),Do=(0,Ne.Z)(we.keyEntities,jt)||{},Bo=Do.level,Ko=tn[tn.length-1],bo=!xt&&Ee,ko=we.draggingNodeKey===jt,Ct=Je!==void 0?{"aria-selected":!!Je}:void 0;return Wt.createElement("div",(0,Dt.Z)({ref:Pn,role:"treeitem","aria-expanded":Ke?void 0:rn,className:ze()(Jt,"".concat(we.prefixCls,"-treenode"),(qt={},(0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)(qt,"".concat(we.prefixCls,"-treenode-disabled"),xt),"".concat(we.prefixCls,"-treenode-switcher-").concat(rn?"open":"close"),!Ke),"".concat(we.prefixCls,"-treenode-checkbox-checked"),me),"".concat(we.prefixCls,"-treenode-checkbox-indeterminate"),Xt),"".concat(we.prefixCls,"-treenode-selected"),nn),"".concat(we.prefixCls,"-treenode-loading"),Ue),"".concat(we.prefixCls,"-treenode-active"),Yn),"".concat(we.prefixCls,"-treenode-leaf-last"),Ko),"".concat(we.prefixCls,"-treenode-draggable"),Ee),"dragging",ko),(0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)(qt,"drop-target",we.dropTargetKey===jt),"drop-container",we.dropContainerKey===jt),"drag-over",!xt&&he),"drag-over-gap-top",!xt&&Fe),"drag-over-gap-bottom",!xt&&Re),"filter-node",(Ht=we.filterTreeNode)===null||Ht===void 0?void 0:Ht.call(we,(0,bt.F)(Mt))),"".concat(we.prefixCls,"-treenode-leaf"),_n))),style:ge,draggable:bo,onDragStart:bo?Ge:void 0,onDragEnter:Ee?kn:void 0,onDragOver:Ee?In:void 0,onDragLeave:Ee?gn:void 0,onDrop:Ee?xi:void 0,onDragEnd:Ee?ai:void 0,onMouseMove:vn},Ct,Jr),Wt.createElement(ie,{prefixCls:we.prefixCls,level:Bo,isStart:Mn,isEnd:tn}),Ti,$i(),Kr,po)};gt.isTreeNode=1;var mt=gt},30699:function(zn,oi,Ot){"use strict";Ot.d(oi,{k:function(){return ee},y:function(){return Pe}});var Dt=Ot(59301),ee=Dt.createContext(null),Pe=Dt.createContext({})},15018:function(zn,oi,Ot){"use strict";Ot.d(oi,{OF:function(){return jt.Z},y6:function(){return ct.y},ZP:function(){return xt}});var Dt=Ot(72308),ee=Ot(62853),Pe=Ot(77321),xe=Ot(80702),Se=Ot(96949),Wt=Ot(55090),se=Ot(80237),ze=Ot(77205),ye=Ot(38793),Nt=Ot(49618),We=Ot(92310),ie=Ot.n(We),Ne=Ot(10228),bt=Ot(26112),nt=Ot(48736),et=Ot(59301),ct=Ot(30699),lt=function(Gt){var kt=Gt.dropPosition,Yt=Gt.dropLevelOffset,pe=Gt.indent,Le={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(kt){case-1:Le.top=0,Le.left=-Yt*pe;break;case 1:Le.bottom=0,Le.left=-Yt*pe;break;case 0:Le.bottom=0,Le.left=pe;break}return et.createElement("div",{style:Le})},gt=lt;function mt(Ft){if(Ft==null)throw new TypeError("Cannot destructure "+Ft)}var St=Ot(52487),Mt=Ot(74416),zt=Ot(34280),Ht=Ot(45680),qt=Ot(77900),jt=Ot(639);function Jt(Ft,Gt){var kt=et.useState(!1),Yt=(0,St.Z)(kt,2),pe=Yt[0],Le=Yt[1];(0,zt.Z)(function(){if(pe)return Ft(),function(){Gt()}},[pe]),(0,zt.Z)(function(){return Le(!0),function(){Le(!1)}},[])}var ge=Jt,he=Ot(34061),Fe=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Re=et.forwardRef(function(Ft,Gt){var kt=Ft.className,Yt=Ft.style,pe=Ft.motion,Le=Ft.motionNodes,on=Ft.motionType,ve=Ft.onMotionStart,Ae=Ft.onMotionEnd,Ee=Ft.active,Ge=Ft.treeNodeRequiredProps,kn=(0,Mt.Z)(Ft,Fe),In=et.useState(!0),gn=(0,St.Z)(In,2),ai=gn[0],xi=gn[1],Gn=et.useContext(ct.k),Si=Gn.prefixCls,_n=Le&&on!=="hide";(0,zt.Z)(function(){Le&&_n!==ai&&xi(_n)},[Le]);var Ti=function(){Le&&ve()},Di=et.useRef(!1),$i=function(){Le&&!Di.current&&(Di.current=!0,Ae())};ge(Ti,$i);var Kr=function(zr){_n===zr&&$i()};return Le?et.createElement(qt.default,(0,Dt.Z)({ref:Gt,visible:ai},pe,{motionAppear:on==="show",onVisibleChanged:Kr}),function(Xi,zr){var so=Xi.className,po=Xi.style;return et.createElement("div",{ref:zr,className:ie()("".concat(Si,"-treenode-motion"),so),style:po},Le.map(function(Jr){var Do=Object.assign({},(mt(Jr.data),Jr.data)),Bo=Jr.title,Ko=Jr.key,bo=Jr.isStart,ko=Jr.isEnd;delete Do.children;var Ct=(0,he.H8)(Ko,Ge);return et.createElement(jt.Z,(0,Dt.Z)({},Do,Ct,{title:Bo,active:Ee,data:Jr.data,key:Ko,isStart:bo,isEnd:ko}))}))}):et.createElement(jt.Z,(0,Dt.Z)({domRef:Gt,className:kt,style:Yt},kn,{active:Ee}))}),Ke=Re;function Mn(){var Ft=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],kt=Ft.length,Yt=Gt.length;if(Math.abs(kt-Yt)!==1)return{add:!1,key:null};function pe(Le,on){var ve=new Map;Le.forEach(function(Ee){ve.set(Ee,!0)});var Ae=on.filter(function(Ee){return!ve.has(Ee)});return Ae.length===1?Ae[0]:null}return kt<Yt?{add:!0,key:pe(Ft,Gt)}:{add:!1,key:pe(Gt,Ft)}}function tn(Ft,Gt,kt){var Yt=Ft.findIndex(function(ve){return ve.key===kt}),pe=Ft[Yt+1],Le=Gt.findIndex(function(ve){return ve.key===kt});if(pe){var on=Gt.findIndex(function(ve){return ve.key===pe.key});return Gt.slice(Le+1,on)}return Gt.slice(Le+1)}var rn=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],nn={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},me=function(){},Xt="RC_TREE_MOTION_".concat(Math.random()),Ue={key:Xt},Pn={key:Xt,level:0,index:0,pos:"0",node:Ue,nodes:[Ue]},Yn={parent:null,children:[],pos:Pn.pos,data:Ue,title:null,key:Xt,isStart:[],isEnd:[]};function Be(Ft,Gt,kt,Yt){return Gt===!1||!kt?Ft:Ft.slice(0,Math.ceil(kt/Yt)+1)}function vn(Ft){var Gt=Ft.key,kt=Ft.pos;return(0,he.km)(Gt,kt)}function Je(Ft){for(var Gt=String(Ft.data.key),kt=Ft;kt.parent;)kt=kt.parent,Gt="".concat(kt.data.key," > ").concat(Gt);return Gt}var An=et.forwardRef(function(Ft,Gt){var kt=Ft.prefixCls,Yt=Ft.data,pe=Ft.selectable,Le=Ft.checkable,on=Ft.expandedKeys,ve=Ft.selectedKeys,Ae=Ft.checkedKeys,Ee=Ft.loadedKeys,Ge=Ft.loadingKeys,kn=Ft.halfCheckedKeys,In=Ft.keyEntities,gn=Ft.disabled,ai=Ft.dragging,xi=Ft.dragOverNodeKey,Gn=Ft.dropPosition,Si=Ft.motion,_n=Ft.height,Ti=Ft.itemHeight,Di=Ft.virtual,$i=Ft.scrollWidth,Kr=Ft.focusable,Xi=Ft.activeItem,zr=Ft.focused,so=Ft.tabIndex,po=Ft.onKeyDown,Jr=Ft.onFocus,Do=Ft.onBlur,Bo=Ft.onActiveChange,Ko=Ft.onListChangeStart,bo=Ft.onListChangeEnd,ko=(0,Mt.Z)(Ft,rn),Ct=et.useRef(null),Zn=et.useRef(null);et.useImperativeHandle(Gt,function(){return{scrollTo:function(vi){Ct.current.scrollTo(vi)},getIndentWidth:function(){return Zn.current.offsetWidth}}});var bn=et.useState(on),Pr=(0,St.Z)(bn,2),Er=Pr[0],Zi=Pr[1],_r=et.useState(Yt),ho=(0,St.Z)(_r,2),br=ho[0],$e=ho[1],Oe=et.useState(Yt),Me=(0,St.Z)(Oe,2),Pi=Me[0],Vi=Me[1],rr=et.useState([]),Dn=(0,St.Z)(rr,2),pi=Dn[0],Ze=Dn[1],je=et.useState(null),mi=(0,St.Z)(je,2),$t=mi[0],pn=mi[1],ei=et.useRef(Yt);ei.current=Yt;function Bi(){var $n=ei.current;$e($n),Vi($n),Ze([]),pn(null),bo()}(0,zt.Z)(function(){Zi(on);var $n=Mn(Er,on);if($n.key!==null)if($n.add){var vi=br.findIndex(function(mr){var wr=mr.key;return wr===$n.key}),Oi=Be(tn(br,Yt,$n.key),Di,_n,Ti),Ei=br.slice();Ei.splice(vi+1,0,Yn),Vi(Ei),Ze(Oi),pn("show")}else{var ri=Yt.findIndex(function(mr){var wr=mr.key;return wr===$n.key}),bi=Be(tn(Yt,br,$n.key),Di,_n,Ti),Sr=Yt.slice();Sr.splice(ri+1,0,Yn),Vi(Sr),Ze(bi),pn("hide")}else br!==Yt&&($e(Yt),Vi(Yt))},[on,Yt]),et.useEffect(function(){ai||Bi()},[ai]);var _e=Si?Pi:Yt,un={expandedKeys:on,selectedKeys:ve,loadedKeys:Ee,loadingKeys:Ge,checkedKeys:Ae,halfCheckedKeys:kn,dragOverNodeKey:xi,dropPosition:Gn,keyEntities:In};return et.createElement(et.Fragment,null,zr&&Xi&&et.createElement("span",{style:nn,"aria-live":"assertive"},Je(Xi)),et.createElement("div",null,et.createElement("input",{style:nn,disabled:Kr===!1||gn,tabIndex:Kr!==!1?so:null,onKeyDown:po,onFocus:Jr,onBlur:Do,value:"",onChange:me,"aria-label":"for screen reader"})),et.createElement("div",{className:"".concat(kt,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},et.createElement("div",{className:"".concat(kt,"-indent")},et.createElement("div",{ref:Zn,className:"".concat(kt,"-indent-unit")}))),et.createElement(Ht.Z,(0,Dt.Z)({},ko,{data:_e,itemKey:vn,height:_n,fullHeight:!1,virtual:Di,itemHeight:Ti,scrollWidth:$i,prefixCls:"".concat(kt,"-list"),ref:Ct,role:"tree",onVisibleChange:function(vi){vi.every(function(Oi){return vn(Oi)!==Xt})&&Bi()}}),function($n){var vi=$n.pos,Oi=Object.assign({},(mt($n.data),$n.data)),Ei=$n.title,ri=$n.key,bi=$n.isStart,Sr=$n.isEnd,mr=(0,he.km)(ri,vi);delete Oi.key,delete Oi.children;var wr=(0,he.H8)(mr,un);return et.createElement(Ke,(0,Dt.Z)({},Oi,wr,{title:Ei,active:!!Xi&&ri===Xi.key,pos:vi,data:$n.data,isStart:bi,isEnd:Sr,motion:Si,motionNodes:ri===Xt?pi:null,motionType:$t,onMotionStart:Ko,onMotionEnd:Bi,treeNodeRequiredProps:un,onMouseMove:function(){Bo(null)}}))}))}),we=An,sn=Ot(82661),ce=Ot(34643),Nn=Ot(65065),Ci=10,It=function(Ft){(0,ze.Z)(kt,Ft);var Gt=(0,ye.Z)(kt);function kt(){var Yt;(0,Se.Z)(this,kt);for(var pe=arguments.length,Le=new Array(pe),on=0;on<pe;on++)Le[on]=arguments[on];return Yt=Gt.call.apply(Gt,[this].concat(Le)),(0,Nt.Z)((0,se.Z)(Yt),"destroyed",!1),(0,Nt.Z)((0,se.Z)(Yt),"delayedDragEnterLogic",void 0),(0,Nt.Z)((0,se.Z)(Yt),"loadingRetryTimes",{}),(0,Nt.Z)((0,se.Z)(Yt),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:(0,he.w$)()}),(0,Nt.Z)((0,se.Z)(Yt),"dragStartMousePosition",null),(0,Nt.Z)((0,se.Z)(Yt),"dragNodeProps",null),(0,Nt.Z)((0,se.Z)(Yt),"currentMouseOverDroppableNodeKey",null),(0,Nt.Z)((0,se.Z)(Yt),"listRef",et.createRef()),(0,Nt.Z)((0,se.Z)(Yt),"onNodeDragStart",function(ve,Ae){var Ee=Yt.state,Ge=Ee.expandedKeys,kn=Ee.keyEntities,In=Yt.props.onDragStart,gn=Ae.eventKey;Yt.dragNodeProps=Ae,Yt.dragStartMousePosition={x:ve.clientX,y:ve.clientY};var ai=(0,sn._5)(Ge,gn);Yt.setState({draggingNodeKey:gn,dragChildrenKeys:(0,sn.wA)(gn,kn),indent:Yt.listRef.current.getIndentWidth()}),Yt.setExpandedKeys(ai),window.addEventListener("dragend",Yt.onWindowDragEnd),In==null||In({event:ve,node:(0,he.F)(Ae)})}),(0,Nt.Z)((0,se.Z)(Yt),"onNodeDragEnter",function(ve,Ae){var Ee=Yt.state,Ge=Ee.expandedKeys,kn=Ee.keyEntities,In=Ee.dragChildrenKeys,gn=Ee.flattenNodes,ai=Ee.indent,xi=Yt.props,Gn=xi.onDragEnter,Si=xi.onExpand,_n=xi.allowDrop,Ti=xi.direction,Di=Ae.pos,$i=Ae.eventKey;if(Yt.currentMouseOverDroppableNodeKey!==$i&&(Yt.currentMouseOverDroppableNodeKey=$i),!Yt.dragNodeProps){Yt.resetDragState();return}var Kr=(0,sn.OM)(ve,Yt.dragNodeProps,Ae,ai,Yt.dragStartMousePosition,_n,gn,kn,Ge,Ti),Xi=Kr.dropPosition,zr=Kr.dropLevelOffset,so=Kr.dropTargetKey,po=Kr.dropContainerKey,Jr=Kr.dropTargetPos,Do=Kr.dropAllowed,Bo=Kr.dragOverNodeKey;if(In.includes(so)||!Do){Yt.resetDragState();return}if(Yt.delayedDragEnterLogic||(Yt.delayedDragEnterLogic={}),Object.keys(Yt.delayedDragEnterLogic).forEach(function(Ko){clearTimeout(Yt.delayedDragEnterLogic[Ko])}),Yt.dragNodeProps.eventKey!==Ae.eventKey&&(ve.persist(),Yt.delayedDragEnterLogic[Di]=window.setTimeout(function(){if(Yt.state.draggingNodeKey!==null){var Ko=(0,xe.Z)(Ge),bo=(0,Nn.Z)(kn,Ae.eventKey);bo&&(bo.children||[]).length&&(Ko=(0,sn.L0)(Ge,Ae.eventKey)),Yt.props.hasOwnProperty("expandedKeys")||Yt.setExpandedKeys(Ko),Si==null||Si(Ko,{node:(0,he.F)(Ae),expanded:!0,nativeEvent:ve.nativeEvent})}},800)),Yt.dragNodeProps.eventKey===so&&zr===0){Yt.resetDragState();return}Yt.setState({dragOverNodeKey:Bo,dropPosition:Xi,dropLevelOffset:zr,dropTargetKey:so,dropContainerKey:po,dropTargetPos:Jr,dropAllowed:Do}),Gn==null||Gn({event:ve,node:(0,he.F)(Ae),expandedKeys:Ge})}),(0,Nt.Z)((0,se.Z)(Yt),"onNodeDragOver",function(ve,Ae){var Ee=Yt.state,Ge=Ee.dragChildrenKeys,kn=Ee.flattenNodes,In=Ee.keyEntities,gn=Ee.expandedKeys,ai=Ee.indent,xi=Yt.props,Gn=xi.onDragOver,Si=xi.allowDrop,_n=xi.direction;if(Yt.dragNodeProps){var Ti=(0,sn.OM)(ve,Yt.dragNodeProps,Ae,ai,Yt.dragStartMousePosition,Si,kn,In,gn,_n),Di=Ti.dropPosition,$i=Ti.dropLevelOffset,Kr=Ti.dropTargetKey,Xi=Ti.dropContainerKey,zr=Ti.dropTargetPos,so=Ti.dropAllowed,po=Ti.dragOverNodeKey;Ge.includes(Kr)||!so||(Yt.dragNodeProps.eventKey===Kr&&$i===0?Yt.state.dropPosition===null&&Yt.state.dropLevelOffset===null&&Yt.state.dropTargetKey===null&&Yt.state.dropContainerKey===null&&Yt.state.dropTargetPos===null&&Yt.state.dropAllowed===!1&&Yt.state.dragOverNodeKey===null||Yt.resetDragState():Di===Yt.state.dropPosition&&$i===Yt.state.dropLevelOffset&&Kr===Yt.state.dropTargetKey&&Xi===Yt.state.dropContainerKey&&zr===Yt.state.dropTargetPos&&so===Yt.state.dropAllowed&&po===Yt.state.dragOverNodeKey||Yt.setState({dropPosition:Di,dropLevelOffset:$i,dropTargetKey:Kr,dropContainerKey:Xi,dropTargetPos:zr,dropAllowed:so,dragOverNodeKey:po}),Gn==null||Gn({event:ve,node:(0,he.F)(Ae)}))}}),(0,Nt.Z)((0,se.Z)(Yt),"onNodeDragLeave",function(ve,Ae){Yt.currentMouseOverDroppableNodeKey===Ae.eventKey&&!ve.currentTarget.contains(ve.relatedTarget)&&(Yt.resetDragState(),Yt.currentMouseOverDroppableNodeKey=null);var Ee=Yt.props.onDragLeave;Ee==null||Ee({event:ve,node:(0,he.F)(Ae)})}),(0,Nt.Z)((0,se.Z)(Yt),"onWindowDragEnd",function(ve){Yt.onNodeDragEnd(ve,null,!0),window.removeEventListener("dragend",Yt.onWindowDragEnd)}),(0,Nt.Z)((0,se.Z)(Yt),"onNodeDragEnd",function(ve,Ae){var Ee=Yt.props.onDragEnd;Yt.setState({dragOverNodeKey:null}),Yt.cleanDragState(),Ee==null||Ee({event:ve,node:(0,he.F)(Ae)}),Yt.dragNodeProps=null,window.removeEventListener("dragend",Yt.onWindowDragEnd)}),(0,Nt.Z)((0,se.Z)(Yt),"onNodeDrop",function(ve,Ae){var Ee,Ge=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,kn=Yt.state,In=kn.dragChildrenKeys,gn=kn.dropPosition,ai=kn.dropTargetKey,xi=kn.dropTargetPos,Gn=kn.dropAllowed;if(Gn){var Si=Yt.props.onDrop;if(Yt.setState({dragOverNodeKey:null}),Yt.cleanDragState(),ai!==null){var _n=(0,Pe.Z)((0,Pe.Z)({},(0,he.H8)(ai,Yt.getTreeNodeRequiredProps())),{},{active:((Ee=Yt.getActiveItem())===null||Ee===void 0?void 0:Ee.key)===ai,data:(0,Nn.Z)(Yt.state.keyEntities,ai).node}),Ti=In.includes(ai);(0,nt.ZP)(!Ti,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Di=(0,sn.yx)(xi),$i={event:ve,node:(0,he.F)(_n),dragNode:Yt.dragNodeProps?(0,he.F)(Yt.dragNodeProps):null,dragNodesKeys:[Yt.dragNodeProps.eventKey].concat(In),dropToGap:gn!==0,dropPosition:gn+Number(Di[Di.length-1])};Ge||Si==null||Si($i),Yt.dragNodeProps=null}}}),(0,Nt.Z)((0,se.Z)(Yt),"cleanDragState",function(){var ve=Yt.state.draggingNodeKey;ve!==null&&Yt.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),Yt.dragStartMousePosition=null,Yt.currentMouseOverDroppableNodeKey=null}),(0,Nt.Z)((0,se.Z)(Yt),"triggerExpandActionExpand",function(ve,Ae){var Ee=Yt.state,Ge=Ee.expandedKeys,kn=Ee.flattenNodes,In=Ae.expanded,gn=Ae.key,ai=Ae.isLeaf;if(!(ai||ve.shiftKey||ve.metaKey||ve.ctrlKey)){var xi=kn.filter(function(Si){return Si.key===gn})[0],Gn=(0,he.F)((0,Pe.Z)((0,Pe.Z)({},(0,he.H8)(gn,Yt.getTreeNodeRequiredProps())),{},{data:xi.data}));Yt.setExpandedKeys(In?(0,sn._5)(Ge,gn):(0,sn.L0)(Ge,gn)),Yt.onNodeExpand(ve,Gn)}}),(0,Nt.Z)((0,se.Z)(Yt),"onNodeClick",function(ve,Ae){var Ee=Yt.props,Ge=Ee.onClick,kn=Ee.expandAction;kn==="click"&&Yt.triggerExpandActionExpand(ve,Ae),Ge==null||Ge(ve,Ae)}),(0,Nt.Z)((0,se.Z)(Yt),"onNodeDoubleClick",function(ve,Ae){var Ee=Yt.props,Ge=Ee.onDoubleClick,kn=Ee.expandAction;kn==="doubleClick"&&Yt.triggerExpandActionExpand(ve,Ae),Ge==null||Ge(ve,Ae)}),(0,Nt.Z)((0,se.Z)(Yt),"onNodeSelect",function(ve,Ae){var Ee=Yt.state.selectedKeys,Ge=Yt.state,kn=Ge.keyEntities,In=Ge.fieldNames,gn=Yt.props,ai=gn.onSelect,xi=gn.multiple,Gn=Ae.selected,Si=Ae[In.key],_n=!Gn;_n?xi?Ee=(0,sn.L0)(Ee,Si):Ee=[Si]:Ee=(0,sn._5)(Ee,Si);var Ti=Ee.map(function(Di){var $i=(0,Nn.Z)(kn,Di);return $i?$i.node:null}).filter(Boolean);Yt.setUncontrolledState({selectedKeys:Ee}),ai==null||ai(Ee,{event:"select",selected:_n,node:Ae,selectedNodes:Ti,nativeEvent:ve.nativeEvent})}),(0,Nt.Z)((0,se.Z)(Yt),"onNodeCheck",function(ve,Ae,Ee){var Ge=Yt.state,kn=Ge.keyEntities,In=Ge.checkedKeys,gn=Ge.halfCheckedKeys,ai=Yt.props,xi=ai.checkStrictly,Gn=ai.onCheck,Si=Ae.key,_n,Ti={event:"check",node:Ae,checked:Ee,nativeEvent:ve.nativeEvent};if(xi){var Di=Ee?(0,sn.L0)(In,Si):(0,sn._5)(In,Si),$i=(0,sn._5)(gn,Si);_n={checked:Di,halfChecked:$i},Ti.checkedNodes=Di.map(function(Jr){return(0,Nn.Z)(kn,Jr)}).filter(Boolean).map(function(Jr){return Jr.node}),Yt.setUncontrolledState({checkedKeys:Di})}else{var Kr=(0,ce.S)([].concat((0,xe.Z)(In),[Si]),!0,kn),Xi=Kr.checkedKeys,zr=Kr.halfCheckedKeys;if(!Ee){var so=new Set(Xi);so.delete(Si);var po=(0,ce.S)(Array.from(so),{checked:!1,halfCheckedKeys:zr},kn);Xi=po.checkedKeys,zr=po.halfCheckedKeys}_n=Xi,Ti.checkedNodes=[],Ti.checkedNodesPositions=[],Ti.halfCheckedKeys=zr,Xi.forEach(function(Jr){var Do=(0,Nn.Z)(kn,Jr);if(Do){var Bo=Do.node,Ko=Do.pos;Ti.checkedNodes.push(Bo),Ti.checkedNodesPositions.push({node:Bo,pos:Ko})}}),Yt.setUncontrolledState({checkedKeys:Xi},!1,{halfCheckedKeys:zr})}Gn==null||Gn(_n,Ti)}),(0,Nt.Z)((0,se.Z)(Yt),"onNodeLoad",function(ve){var Ae,Ee=ve.key,Ge=Yt.state.keyEntities,kn=(0,Nn.Z)(Ge,Ee);if(!(kn!=null&&(Ae=kn.children)!==null&&Ae!==void 0&&Ae.length)){var In=new Promise(function(gn,ai){Yt.setState(function(xi){var Gn=xi.loadedKeys,Si=Gn===void 0?[]:Gn,_n=xi.loadingKeys,Ti=_n===void 0?[]:_n,Di=Yt.props,$i=Di.loadData,Kr=Di.onLoad;if(!$i||Si.includes(Ee)||Ti.includes(Ee))return null;var Xi=$i(ve);return Xi.then(function(){var zr=Yt.state.loadedKeys,so=(0,sn.L0)(zr,Ee);Kr==null||Kr(so,{event:"load",node:ve}),Yt.setUncontrolledState({loadedKeys:so}),Yt.setState(function(po){return{loadingKeys:(0,sn._5)(po.loadingKeys,Ee)}}),gn()}).catch(function(zr){if(Yt.setState(function(po){return{loadingKeys:(0,sn._5)(po.loadingKeys,Ee)}}),Yt.loadingRetryTimes[Ee]=(Yt.loadingRetryTimes[Ee]||0)+1,Yt.loadingRetryTimes[Ee]>=Ci){var so=Yt.state.loadedKeys;(0,nt.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),Yt.setUncontrolledState({loadedKeys:(0,sn.L0)(so,Ee)}),gn()}ai(zr)}),{loadingKeys:(0,sn.L0)(Ti,Ee)}})});return In.catch(function(){}),In}}),(0,Nt.Z)((0,se.Z)(Yt),"onNodeMouseEnter",function(ve,Ae){var Ee=Yt.props.onMouseEnter;Ee==null||Ee({event:ve,node:Ae})}),(0,Nt.Z)((0,se.Z)(Yt),"onNodeMouseLeave",function(ve,Ae){var Ee=Yt.props.onMouseLeave;Ee==null||Ee({event:ve,node:Ae})}),(0,Nt.Z)((0,se.Z)(Yt),"onNodeContextMenu",function(ve,Ae){var Ee=Yt.props.onRightClick;Ee&&(ve.preventDefault(),Ee({event:ve,node:Ae}))}),(0,Nt.Z)((0,se.Z)(Yt),"onFocus",function(){var ve=Yt.props.onFocus;Yt.setState({focused:!0});for(var Ae=arguments.length,Ee=new Array(Ae),Ge=0;Ge<Ae;Ge++)Ee[Ge]=arguments[Ge];ve==null||ve.apply(void 0,Ee)}),(0,Nt.Z)((0,se.Z)(Yt),"onBlur",function(){var ve=Yt.props.onBlur;Yt.setState({focused:!1}),Yt.onActiveChange(null);for(var Ae=arguments.length,Ee=new Array(Ae),Ge=0;Ge<Ae;Ge++)Ee[Ge]=arguments[Ge];ve==null||ve.apply(void 0,Ee)}),(0,Nt.Z)((0,se.Z)(Yt),"getTreeNodeRequiredProps",function(){var ve=Yt.state,Ae=ve.expandedKeys,Ee=ve.selectedKeys,Ge=ve.loadedKeys,kn=ve.loadingKeys,In=ve.checkedKeys,gn=ve.halfCheckedKeys,ai=ve.dragOverNodeKey,xi=ve.dropPosition,Gn=ve.keyEntities;return{expandedKeys:Ae||[],selectedKeys:Ee||[],loadedKeys:Ge||[],loadingKeys:kn||[],checkedKeys:In||[],halfCheckedKeys:gn||[],dragOverNodeKey:ai,dropPosition:xi,keyEntities:Gn}}),(0,Nt.Z)((0,se.Z)(Yt),"setExpandedKeys",function(ve){var Ae=Yt.state,Ee=Ae.treeData,Ge=Ae.fieldNames,kn=(0,he.oH)(Ee,ve,Ge);Yt.setUncontrolledState({expandedKeys:ve,flattenNodes:kn},!0)}),(0,Nt.Z)((0,se.Z)(Yt),"onNodeExpand",function(ve,Ae){var Ee=Yt.state.expandedKeys,Ge=Yt.state,kn=Ge.listChanging,In=Ge.fieldNames,gn=Yt.props,ai=gn.onExpand,xi=gn.loadData,Gn=Ae.expanded,Si=Ae[In.key];if(!kn){var _n=Ee.includes(Si),Ti=!Gn;if((0,nt.ZP)(Gn&&_n||!Gn&&!_n,"Expand state not sync with index check"),Ee=Ti?(0,sn.L0)(Ee,Si):(0,sn._5)(Ee,Si),Yt.setExpandedKeys(Ee),ai==null||ai(Ee,{node:Ae,expanded:Ti,nativeEvent:ve.nativeEvent}),Ti&&xi){var Di=Yt.onNodeLoad(Ae);Di&&Di.then(function(){var $i=(0,he.oH)(Yt.state.treeData,Ee,In);Yt.setUncontrolledState({flattenNodes:$i})}).catch(function(){var $i=Yt.state.expandedKeys,Kr=(0,sn._5)($i,Si);Yt.setExpandedKeys(Kr)})}}}),(0,Nt.Z)((0,se.Z)(Yt),"onListChangeStart",function(){Yt.setUncontrolledState({listChanging:!0})}),(0,Nt.Z)((0,se.Z)(Yt),"onListChangeEnd",function(){setTimeout(function(){Yt.setUncontrolledState({listChanging:!1})})}),(0,Nt.Z)((0,se.Z)(Yt),"onActiveChange",function(ve){var Ae=Yt.state.activeKey,Ee=Yt.props,Ge=Ee.onActiveChange,kn=Ee.itemScrollOffset,In=kn===void 0?0:kn;Ae!==ve&&(Yt.setState({activeKey:ve}),ve!==null&&Yt.scrollTo({key:ve,offset:In}),Ge==null||Ge(ve))}),(0,Nt.Z)((0,se.Z)(Yt),"getActiveItem",function(){var ve=Yt.state,Ae=ve.activeKey,Ee=ve.flattenNodes;return Ae===null?null:Ee.find(function(Ge){var kn=Ge.key;return kn===Ae})||null}),(0,Nt.Z)((0,se.Z)(Yt),"offsetActiveKey",function(ve){var Ae=Yt.state,Ee=Ae.flattenNodes,Ge=Ae.activeKey,kn=Ee.findIndex(function(ai){var xi=ai.key;return xi===Ge});kn===-1&&ve<0&&(kn=Ee.length),kn=(kn+ve+Ee.length)%Ee.length;var In=Ee[kn];if(In){var gn=In.key;Yt.onActiveChange(gn)}else Yt.onActiveChange(null)}),(0,Nt.Z)((0,se.Z)(Yt),"onKeyDown",function(ve){var Ae=Yt.state,Ee=Ae.activeKey,Ge=Ae.expandedKeys,kn=Ae.checkedKeys,In=Ae.fieldNames,gn=Yt.props,ai=gn.onKeyDown,xi=gn.checkable,Gn=gn.selectable;switch(ve.which){case Ne.Z.UP:{Yt.offsetActiveKey(-1),ve.preventDefault();break}case Ne.Z.DOWN:{Yt.offsetActiveKey(1),ve.preventDefault();break}}var Si=Yt.getActiveItem();if(Si&&Si.data){var _n=Yt.getTreeNodeRequiredProps(),Ti=Si.data.isLeaf===!1||!!(Si.data[In.children]||[]).length,Di=(0,he.F)((0,Pe.Z)((0,Pe.Z)({},(0,he.H8)(Ee,_n)),{},{data:Si.data,active:!0}));switch(ve.which){case Ne.Z.LEFT:{Ti&&Ge.includes(Ee)?Yt.onNodeExpand({},Di):Si.parent&&Yt.onActiveChange(Si.parent.key),ve.preventDefault();break}case Ne.Z.RIGHT:{Ti&&!Ge.includes(Ee)?Yt.onNodeExpand({},Di):Si.children&&Si.children.length&&Yt.onActiveChange(Si.children[0].key),ve.preventDefault();break}case Ne.Z.ENTER:case Ne.Z.SPACE:{xi&&!Di.disabled&&Di.checkable!==!1&&!Di.disableCheckbox?Yt.onNodeCheck({},Di,!kn.includes(Ee)):!xi&&Gn&&!Di.disabled&&Di.selectable!==!1&&Yt.onNodeSelect({},Di);break}}}ai==null||ai(ve)}),(0,Nt.Z)((0,se.Z)(Yt),"setUncontrolledState",function(ve){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Yt.destroyed){var Ge=!1,kn=!0,In={};Object.keys(ve).forEach(function(gn){if(Yt.props.hasOwnProperty(gn)){kn=!1;return}Ge=!0,In[gn]=ve[gn]}),Ge&&(!Ae||kn)&&Yt.setState((0,Pe.Z)((0,Pe.Z)({},In),Ee))}}),(0,Nt.Z)((0,se.Z)(Yt),"scrollTo",function(ve){Yt.listRef.current.scrollTo(ve)}),Yt}return(0,Wt.Z)(kt,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var pe=this.props,Le=pe.activeKey,on=pe.itemScrollOffset,ve=on===void 0?0:on;Le!==void 0&&Le!==this.state.activeKey&&(this.setState({activeKey:Le}),Le!==null&&this.scrollTo({key:Le,offset:ve}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var pe=this.state,Le=pe.focused,on=pe.flattenNodes,ve=pe.keyEntities,Ae=pe.draggingNodeKey,Ee=pe.activeKey,Ge=pe.dropLevelOffset,kn=pe.dropContainerKey,In=pe.dropTargetKey,gn=pe.dropPosition,ai=pe.dragOverNodeKey,xi=pe.indent,Gn=this.props,Si=Gn.prefixCls,_n=Gn.className,Ti=Gn.style,Di=Gn.showLine,$i=Gn.focusable,Kr=Gn.tabIndex,Xi=Kr===void 0?0:Kr,zr=Gn.selectable,so=Gn.showIcon,po=Gn.icon,Jr=Gn.switcherIcon,Do=Gn.draggable,Bo=Gn.checkable,Ko=Gn.checkStrictly,bo=Gn.disabled,ko=Gn.motion,Ct=Gn.loadData,Zn=Gn.filterTreeNode,bn=Gn.height,Pr=Gn.itemHeight,Er=Gn.scrollWidth,Zi=Gn.virtual,_r=Gn.titleRender,ho=Gn.dropIndicatorRender,br=Gn.onContextMenu,$e=Gn.onScroll,Oe=Gn.direction,Me=Gn.rootClassName,Pi=Gn.rootStyle,Vi=(0,bt.Z)(this.props,{aria:!0,data:!0}),rr;Do&&((0,ee.Z)(Do)==="object"?rr=Do:typeof Do=="function"?rr={nodeDraggable:Do}:rr={});var Dn={prefixCls:Si,selectable:zr,showIcon:so,icon:po,switcherIcon:Jr,draggable:rr,draggingNodeKey:Ae,checkable:Bo,checkStrictly:Ko,disabled:bo,keyEntities:ve,dropLevelOffset:Ge,dropContainerKey:kn,dropTargetKey:In,dropPosition:gn,dragOverNodeKey:ai,indent:xi,direction:Oe,dropIndicatorRender:ho,loadData:Ct,filterTreeNode:Zn,titleRender:_r,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return et.createElement(ct.k.Provider,{value:Dn},et.createElement("div",{className:ie()(Si,_n,Me,(0,Nt.Z)((0,Nt.Z)((0,Nt.Z)({},"".concat(Si,"-show-line"),Di),"".concat(Si,"-focused"),Le),"".concat(Si,"-active-focused"),Ee!==null)),style:Pi},et.createElement(we,(0,Dt.Z)({ref:this.listRef,prefixCls:Si,style:Ti,data:on,disabled:bo,selectable:zr,checkable:!!Bo,motion:ko,dragging:Ae!==null,height:bn,itemHeight:Pr,virtual:Zi,focusable:$i,focused:Le,tabIndex:Xi,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:br,onScroll:$e,scrollWidth:Er},this.getTreeNodeRequiredProps(),Vi))))}}],[{key:"getDerivedStateFromProps",value:function(pe,Le){var on=Le.prevProps,ve={prevProps:pe};function Ae(Xi){return!on&&pe.hasOwnProperty(Xi)||on&&on[Xi]!==pe[Xi]}var Ee,Ge=Le.fieldNames;if(Ae("fieldNames")&&(Ge=(0,he.w$)(pe.fieldNames),ve.fieldNames=Ge),Ae("treeData")?Ee=pe.treeData:Ae("children")&&((0,nt.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Ee=(0,he.zn)(pe.children)),Ee){ve.treeData=Ee;var kn=(0,he.I8)(Ee,{fieldNames:Ge});ve.keyEntities=(0,Pe.Z)((0,Nt.Z)({},Xt,Pn),kn.keyEntities)}var In=ve.keyEntities||Le.keyEntities;if(Ae("expandedKeys")||on&&Ae("autoExpandParent"))ve.expandedKeys=pe.autoExpandParent||!on&&pe.defaultExpandParent?(0,sn.r7)(pe.expandedKeys,In):pe.expandedKeys;else if(!on&&pe.defaultExpandAll){var gn=(0,Pe.Z)({},In);delete gn[Xt];var ai=[];Object.keys(gn).forEach(function(Xi){var zr=gn[Xi];zr.children&&zr.children.length&&ai.push(zr.key)}),ve.expandedKeys=ai}else!on&&pe.defaultExpandedKeys&&(ve.expandedKeys=pe.autoExpandParent||pe.defaultExpandParent?(0,sn.r7)(pe.defaultExpandedKeys,In):pe.defaultExpandedKeys);if(ve.expandedKeys||delete ve.expandedKeys,Ee||ve.expandedKeys){var xi=(0,he.oH)(Ee||Le.treeData,ve.expandedKeys||Le.expandedKeys,Ge);ve.flattenNodes=xi}if(pe.selectable&&(Ae("selectedKeys")?ve.selectedKeys=(0,sn.BT)(pe.selectedKeys,pe):!on&&pe.defaultSelectedKeys&&(ve.selectedKeys=(0,sn.BT)(pe.defaultSelectedKeys,pe))),pe.checkable){var Gn;if(Ae("checkedKeys")?Gn=(0,sn.E6)(pe.checkedKeys)||{}:!on&&pe.defaultCheckedKeys?Gn=(0,sn.E6)(pe.defaultCheckedKeys)||{}:Ee&&(Gn=(0,sn.E6)(pe.checkedKeys)||{checkedKeys:Le.checkedKeys,halfCheckedKeys:Le.halfCheckedKeys}),Gn){var Si=Gn,_n=Si.checkedKeys,Ti=_n===void 0?[]:_n,Di=Si.halfCheckedKeys,$i=Di===void 0?[]:Di;if(!pe.checkStrictly){var Kr=(0,ce.S)(Ti,!0,In);Ti=Kr.checkedKeys,$i=Kr.halfCheckedKeys}ve.checkedKeys=Ti,ve.halfCheckedKeys=$i}}return Ae("loadedKeys")&&(ve.loadedKeys=pe.loadedKeys),ve}}]),kt}(et.Component);(0,Nt.Z)(It,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:gt,allowDrop:function(){return!0},expandAction:!1}),(0,Nt.Z)(It,"TreeNode",jt.Z);var wt=It,xt=wt},82661:function(zn,oi,Ot){"use strict";Ot.d(oi,{BT:function(){return et},E6:function(){return gt},L0:function(){return Nt},OM:function(){return nt},_5:function(){return ye},r7:function(){return mt},wA:function(){return ie},yx:function(){return We}});var Dt=Ot(80702),ee=Ot(62853),Pe=Ot(48736),xe=Ot(59301),Se=Ot(639),Wt=Ot(65065),se=Ot(34061),ze=null;function ye(St,Mt){if(!St)return[];var zt=St.slice(),Ht=zt.indexOf(Mt);return Ht>=0&&zt.splice(Ht,1),zt}function Nt(St,Mt){var zt=(St||[]).slice();return zt.indexOf(Mt)===-1&&zt.push(Mt),zt}function We(St){return St.split("-")}function ie(St,Mt){var zt=[],Ht=(0,Wt.Z)(Mt,St);function qt(){var jt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];jt.forEach(function(Jt){var ge=Jt.key,he=Jt.children;zt.push(ge),qt(he)})}return qt(Ht.children),zt}function Ne(St){if(St.parent){var Mt=We(St.pos);return Number(Mt[Mt.length-1])===St.parent.children.length-1}return!1}function bt(St){var Mt=We(St.pos);return Number(Mt[Mt.length-1])===0}function nt(St,Mt,zt,Ht,qt,jt,Jt,ge,he,Fe){var Re,Ke=St.clientX,Mn=St.clientY,tn=St.target.getBoundingClientRect(),rn=tn.top,nn=tn.height,me=(Fe==="rtl"?-1:1)*(((qt==null?void 0:qt.x)||0)-Ke),Xt=(me-12)/Ht,Ue=he.filter(function(xt){var Ft;return(Ft=ge[xt])===null||Ft===void 0||(Ft=Ft.children)===null||Ft===void 0?void 0:Ft.length}),Pn=(0,Wt.Z)(ge,zt.eventKey);if(Mn<rn+nn/2){var Yn=Jt.findIndex(function(xt){return xt.key===Pn.key}),Be=Yn<=0?0:Yn-1,vn=Jt[Be].key;Pn=(0,Wt.Z)(ge,vn)}var Je=Pn.key,An=Pn,we=Pn.key,sn=0,ce=0;if(!Ue.includes(Je))for(var Nn=0;Nn<Xt&&Ne(Pn);Nn+=1)Pn=Pn.parent,ce+=1;var Ci=Mt.data,It=Pn.node,wt=!0;return bt(Pn)&&Pn.level===0&&Mn<rn+nn/2&&jt({dragNode:Ci,dropNode:It,dropPosition:-1})&&Pn.key===zt.eventKey?sn=-1:(An.children||[]).length&&Ue.includes(we)?jt({dragNode:Ci,dropNode:It,dropPosition:0})?sn=0:wt=!1:ce===0?Xt>-1.5?jt({dragNode:Ci,dropNode:It,dropPosition:1})?sn=1:wt=!1:jt({dragNode:Ci,dropNode:It,dropPosition:0})?sn=0:jt({dragNode:Ci,dropNode:It,dropPosition:1})?sn=1:wt=!1:jt({dragNode:Ci,dropNode:It,dropPosition:1})?sn=1:wt=!1,{dropPosition:sn,dropLevelOffset:ce,dropTargetKey:Pn.key,dropTargetPos:Pn.pos,dragOverNodeKey:we,dropContainerKey:sn===0?null:((Re=Pn.parent)===null||Re===void 0?void 0:Re.key)||null,dropAllowed:wt}}function et(St,Mt){if(St){var zt=Mt.multiple;return zt?St.slice():St.length?[St[0]]:St}}var ct=function(Mt){return Mt};function lt(St,Mt){if(!St)return[];var zt=Mt||{},Ht=zt.processProps,qt=Ht===void 0?ct:Ht,jt=Array.isArray(St)?St:[St];return jt.map(function(Jt){var ge=Jt.children,he=_objectWithoutProperties(Jt,ze),Fe=lt(ge,Mt);return React.createElement(TreeNode,_extends({key:he.key},qt(he)),Fe)})}function gt(St){if(!St)return null;var Mt;if(Array.isArray(St))Mt={checkedKeys:St,halfCheckedKeys:void 0};else if((0,ee.Z)(St)==="object")Mt={checkedKeys:St.checked||void 0,halfCheckedKeys:St.halfChecked||void 0};else return(0,Pe.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return Mt}function mt(St,Mt){var zt=new Set;function Ht(qt){if(!zt.has(qt)){var jt=(0,Wt.Z)(Mt,qt);if(jt){zt.add(qt);var Jt=jt.parent,ge=jt.node;ge.disabled||Jt&&Ht(Jt.key)}}}return(St||[]).forEach(function(qt){Ht(qt)}),(0,Dt.Z)(zt)}},34643:function(zn,oi,Ot){"use strict";Ot.d(oi,{S:function(){return se}});var Dt=Ot(48736),ee=Ot(65065);function Pe(ze,ye){var Nt=new Set;return ze.forEach(function(We){ye.has(We)||Nt.add(We)}),Nt}function xe(ze){var ye=ze||{},Nt=ye.disabled,We=ye.disableCheckbox,ie=ye.checkable;return!!(Nt||We)||ie===!1}function Se(ze,ye,Nt,We){for(var ie=new Set(ze),Ne=new Set,bt=0;bt<=Nt;bt+=1){var nt=ye.get(bt)||new Set;nt.forEach(function(gt){var mt=gt.key,St=gt.node,Mt=gt.children,zt=Mt===void 0?[]:Mt;ie.has(mt)&&!We(St)&&zt.filter(function(Ht){return!We(Ht.node)}).forEach(function(Ht){ie.add(Ht.key)})})}for(var et=new Set,ct=Nt;ct>=0;ct-=1){var lt=ye.get(ct)||new Set;lt.forEach(function(gt){var mt=gt.parent,St=gt.node;if(!(We(St)||!gt.parent||et.has(gt.parent.key))){if(We(gt.parent.node)){et.add(mt.key);return}var Mt=!0,zt=!1;(mt.children||[]).filter(function(Ht){return!We(Ht.node)}).forEach(function(Ht){var qt=Ht.key,jt=ie.has(qt);Mt&&!jt&&(Mt=!1),!zt&&(jt||Ne.has(qt))&&(zt=!0)}),Mt&&ie.add(mt.key),zt&&Ne.add(mt.key),et.add(mt.key)}})}return{checkedKeys:Array.from(ie),halfCheckedKeys:Array.from(Pe(Ne,ie))}}function Wt(ze,ye,Nt,We,ie){for(var Ne=new Set(ze),bt=new Set(ye),nt=0;nt<=We;nt+=1){var et=Nt.get(nt)||new Set;et.forEach(function(mt){var St=mt.key,Mt=mt.node,zt=mt.children,Ht=zt===void 0?[]:zt;!Ne.has(St)&&!bt.has(St)&&!ie(Mt)&&Ht.filter(function(qt){return!ie(qt.node)}).forEach(function(qt){Ne.delete(qt.key)})})}bt=new Set;for(var ct=new Set,lt=We;lt>=0;lt-=1){var gt=Nt.get(lt)||new Set;gt.forEach(function(mt){var St=mt.parent,Mt=mt.node;if(!(ie(Mt)||!mt.parent||ct.has(mt.parent.key))){if(ie(mt.parent.node)){ct.add(St.key);return}var zt=!0,Ht=!1;(St.children||[]).filter(function(qt){return!ie(qt.node)}).forEach(function(qt){var jt=qt.key,Jt=Ne.has(jt);zt&&!Jt&&(zt=!1),!Ht&&(Jt||bt.has(jt))&&(Ht=!0)}),zt||Ne.delete(St.key),Ht&&bt.add(St.key),ct.add(St.key)}})}return{checkedKeys:Array.from(Ne),halfCheckedKeys:Array.from(Pe(bt,Ne))}}function se(ze,ye,Nt,We){var ie=[],Ne;We?Ne=We:Ne=xe;var bt=new Set(ze.filter(function(lt){var gt=!!(0,ee.Z)(Nt,lt);return gt||ie.push(lt),gt})),nt=new Map,et=0;Object.keys(Nt).forEach(function(lt){var gt=Nt[lt],mt=gt.level,St=nt.get(mt);St||(St=new Set,nt.set(mt,St)),St.add(gt),et=Math.max(et,mt)}),(0,Dt.ZP)(!ie.length,"Tree missing follow keys: ".concat(ie.slice(0,100).map(function(lt){return"'".concat(lt,"'")}).join(", ")));var ct;return ye===!0?ct=Se(bt,nt,et,Ne):ct=Wt(bt,ye.halfCheckedKeys,nt,et,Ne),ct}},65065:function(zn,oi,Ot){"use strict";Ot.d(oi,{Z:function(){return Dt}});function Dt(ee,Pe){return ee[Pe]}},34061:function(zn,oi,Ot){"use strict";Ot.d(oi,{F:function(){return mt},H8:function(){return gt},I8:function(){return lt},km:function(){return ie},oH:function(){return et},w$:function(){return Ne},zn:function(){return nt}});var Dt=Ot(62853),ee=Ot(80702),Pe=Ot(77321),xe=Ot(74416),Se=Ot(11592),Wt=Ot(2738),se=Ot(48736),ze=Ot(65065),ye=["children"];function Nt(St,Mt){return"".concat(St,"-").concat(Mt)}function We(St){return St&&St.type&&St.type.isTreeNode}function ie(St,Mt){return St!=null?St:Mt}function Ne(St){var Mt=St||{},zt=Mt.title,Ht=Mt._title,qt=Mt.key,jt=Mt.children,Jt=zt||"title";return{title:Jt,_title:Ht||[Jt],key:qt||"key",children:jt||"children"}}function bt(St,Mt){var zt=new Map;function Ht(qt){var jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(qt||[]).forEach(function(Jt){var ge=Jt[Mt.key],he=Jt[Mt.children];warning(ge!=null,"Tree node must have a certain key: [".concat(jt).concat(ge,"]"));var Fe=String(ge);warning(!zt.has(Fe)||ge===null||ge===void 0,"Same 'key' exist in the Tree: ".concat(Fe)),zt.set(Fe,!0),Ht(he,"".concat(jt).concat(Fe," > "))})}Ht(St)}function nt(St){function Mt(zt){var Ht=(0,Se.Z)(zt);return Ht.map(function(qt){if(!We(qt))return(0,se.ZP)(!qt,"Tree/TreeNode can only accept TreeNode as children."),null;var jt=qt.key,Jt=qt.props,ge=Jt.children,he=(0,xe.Z)(Jt,ye),Fe=(0,Pe.Z)({key:jt},he),Re=Mt(ge);return Re.length&&(Fe.children=Re),Fe}).filter(function(qt){return qt})}return Mt(St)}function et(St,Mt,zt){var Ht=Ne(zt),qt=Ht._title,jt=Ht.key,Jt=Ht.children,ge=new Set(Mt===!0?[]:Mt),he=[];function Fe(Re){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Re.map(function(Mn,tn){for(var rn=Nt(Ke?Ke.pos:"0",tn),nn=ie(Mn[jt],rn),me,Xt=0;Xt<qt.length;Xt+=1){var Ue=qt[Xt];if(Mn[Ue]!==void 0){me=Mn[Ue];break}}var Pn=Object.assign((0,Wt.Z)(Mn,[].concat((0,ee.Z)(qt),[jt,Jt])),{title:me,key:nn,parent:Ke,pos:rn,children:null,data:Mn,isStart:[].concat((0,ee.Z)(Ke?Ke.isStart:[]),[tn===0]),isEnd:[].concat((0,ee.Z)(Ke?Ke.isEnd:[]),[tn===Re.length-1])});return he.push(Pn),Mt===!0||ge.has(nn)?Pn.children=Fe(Mn[Jt]||[],Pn):Pn.children=[],Pn})}return Fe(St),he}function ct(St,Mt,zt){var Ht={};(0,Dt.Z)(zt)==="object"?Ht=zt:Ht={externalGetKey:zt},Ht=Ht||{};var qt=Ht,jt=qt.childrenPropName,Jt=qt.externalGetKey,ge=qt.fieldNames,he=Ne(ge),Fe=he.key,Re=he.children,Ke=jt||Re,Mn;Jt?typeof Jt=="string"?Mn=function(nn){return nn[Jt]}:typeof Jt=="function"&&(Mn=function(nn){return Jt(nn)}):Mn=function(nn,me){return ie(nn[Fe],me)};function tn(rn,nn,me,Xt){var Ue=rn?rn[Ke]:St,Pn=rn?Nt(me.pos,nn):"0",Yn=rn?[].concat((0,ee.Z)(Xt),[rn]):[];if(rn){var Be=Mn(rn,Pn),vn={node:rn,index:nn,pos:Pn,key:Be,parentPos:me.node?me.pos:null,level:me.level+1,nodes:Yn};Mt(vn)}Ue&&Ue.forEach(function(Je,An){tn(Je,An,{node:rn,pos:Pn,level:me?me.level+1:-1},Yn)})}tn(null)}function lt(St){var Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},zt=Mt.initWrapper,Ht=Mt.processEntity,qt=Mt.onProcessFinished,jt=Mt.externalGetKey,Jt=Mt.childrenPropName,ge=Mt.fieldNames,he=arguments.length>2?arguments[2]:void 0,Fe=jt||he,Re={},Ke={},Mn={posEntities:Re,keyEntities:Ke};return zt&&(Mn=zt(Mn)||Mn),ct(St,function(tn){var rn=tn.node,nn=tn.index,me=tn.pos,Xt=tn.key,Ue=tn.parentPos,Pn=tn.level,Yn=tn.nodes,Be={node:rn,nodes:Yn,index:nn,key:Xt,pos:me,level:Pn},vn=ie(Xt,me);Re[me]=Be,Ke[vn]=Be,Be.parent=Re[Ue],Be.parent&&(Be.parent.children=Be.parent.children||[],Be.parent.children.push(Be)),Ht&&Ht(Be,Mn)},{externalGetKey:Fe,childrenPropName:Jt,fieldNames:ge}),qt&&qt(Mn),Mn}function gt(St,Mt){var zt=Mt.expandedKeys,Ht=Mt.selectedKeys,qt=Mt.loadedKeys,jt=Mt.loadingKeys,Jt=Mt.checkedKeys,ge=Mt.halfCheckedKeys,he=Mt.dragOverNodeKey,Fe=Mt.dropPosition,Re=Mt.keyEntities,Ke=(0,ze.Z)(Re,St),Mn={eventKey:St,expanded:zt.indexOf(St)!==-1,selected:Ht.indexOf(St)!==-1,loaded:qt.indexOf(St)!==-1,loading:jt.indexOf(St)!==-1,checked:Jt.indexOf(St)!==-1,halfChecked:ge.indexOf(St)!==-1,pos:String(Ke?Ke.pos:""),dragOver:he===St&&Fe===0,dragOverGapTop:he===St&&Fe===-1,dragOverGapBottom:he===St&&Fe===1};return Mn}function mt(St){var Mt=St.data,zt=St.expanded,Ht=St.selected,qt=St.checked,jt=St.loaded,Jt=St.loading,ge=St.halfChecked,he=St.dragOver,Fe=St.dragOverGapTop,Re=St.dragOverGapBottom,Ke=St.pos,Mn=St.active,tn=St.eventKey,rn=(0,Pe.Z)((0,Pe.Z)({},Mt),{},{expanded:zt,selected:Ht,checked:qt,loaded:jt,loading:Jt,halfChecked:ge,dragOver:he,dragOverGapTop:Fe,dragOverGapBottom:Re,pos:Ke,active:Mn,key:tn});return"props"in rn||Object.defineProperty(rn,"props",{get:function(){return(0,se.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),St}}),rn}},90472:function(zn,oi,Ot){"use strict";Ot.d(oi,{Z:function(){return tn}});var Dt=Ot(72308),ee=Ot(96949),Pe=Ot(55090),xe=Ot(80237),Se=Ot(77205),Wt=Ot(38793),se=Ot(49618),ze=Ot(59301),ye=Ot(77321),Nt=Ot(74416),We=Ot(62853),ie=Ot(65736),Ne=Ot(72633),bt=Ot(80702),nt=Ot(92310),et=Ot.n(nt),ct=Ot(26112),lt=Ot(48736),gt=function(rn,nn){if(rn&&nn){var me=Array.isArray(nn)?nn:nn.split(","),Xt=rn.name||"",Ue=rn.type||"",Pn=Ue.replace(/\/.*$/,"");return me.some(function(Yn){var Be=Yn.trim();if(/^\*(\/\*)?$/.test(Yn))return!0;if(Be.charAt(0)==="."){var vn=Xt.toLowerCase(),Je=Be.toLowerCase(),An=[Je];return(Je===".jpg"||Je===".jpeg")&&(An=[".jpg",".jpeg"]),An.some(function(we){return vn.endsWith(we)})}return/\/\*$/.test(Be)?Pn===Be.replace(/\/.*$/,""):Ue===Be?!0:/^\w+$/.test(Be)?((0,lt.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(Be,"'.Skip for check.")),!0):!1})}return!0};function mt(rn,nn){var me="cannot ".concat(rn.method," ").concat(rn.action," ").concat(nn.status,"'"),Xt=new Error(me);return Xt.status=nn.status,Xt.method=rn.method,Xt.url=rn.action,Xt}function St(rn){var nn=rn.responseText||rn.response;if(!nn)return nn;try{return JSON.parse(nn)}catch(me){return nn}}function Mt(rn){var nn=new XMLHttpRequest;rn.onProgress&&nn.upload&&(nn.upload.onprogress=function(Pn){Pn.total>0&&(Pn.percent=Pn.loaded/Pn.total*100),rn.onProgress(Pn)});var me=new FormData;rn.data&&Object.keys(rn.data).forEach(function(Ue){var Pn=rn.data[Ue];if(Array.isArray(Pn)){Pn.forEach(function(Yn){me.append("".concat(Ue,"[]"),Yn)});return}me.append(Ue,Pn)}),rn.file instanceof Blob?me.append(rn.filename,rn.file,rn.file.name):me.append(rn.filename,rn.file),nn.onerror=function(Pn){rn.onError(Pn)},nn.onload=function(){return nn.status<200||nn.status>=300?rn.onError(mt(rn,nn),St(nn)):rn.onSuccess(St(nn),nn)},nn.open(rn.method,rn.action,!0),rn.withCredentials&&"withCredentials"in nn&&(nn.withCredentials=!0);var Xt=rn.headers||{};return Xt["X-Requested-With"]!==null&&nn.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(Xt).forEach(function(Ue){Xt[Ue]!==null&&nn.setRequestHeader(Ue,Xt[Ue])}),nn.send(me),{abort:function(){nn.abort()}}}var zt=function(){var rn=(0,Ne.Z)((0,ie.Z)().mark(function nn(me,Xt){var Ue,Pn,Yn,Be,vn,Je,An,we;return(0,ie.Z)().wrap(function(ce){for(;;)switch(ce.prev=ce.next){case 0:Je=function(){return Je=(0,Ne.Z)((0,ie.Z)().mark(function Ci(It){return(0,ie.Z)().wrap(function(xt){for(;;)switch(xt.prev=xt.next){case 0:return xt.abrupt("return",new Promise(function(Ft){It.file(function(Gt){Xt(Gt)?(It.fullPath&&!Gt.webkitRelativePath&&(Object.defineProperties(Gt,{webkitRelativePath:{writable:!0}}),Gt.webkitRelativePath=It.fullPath.replace(/^\//,""),Object.defineProperties(Gt,{webkitRelativePath:{writable:!1}})),Ft(Gt)):Ft(null)})}));case 1:case"end":return xt.stop()}},Ci)})),Je.apply(this,arguments)},vn=function(Ci){return Je.apply(this,arguments)},Be=function(){return Be=(0,Ne.Z)((0,ie.Z)().mark(function Ci(It){var wt,xt,Ft,Gt,kt;return(0,ie.Z)().wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:wt=It.createReader(),xt=[];case 2:return pe.next=5,new Promise(function(Le){wt.readEntries(Le,function(){return Le([])})});case 5:if(Ft=pe.sent,Gt=Ft.length,Gt){pe.next=9;break}return pe.abrupt("break",12);case 9:for(kt=0;kt<Gt;kt++)xt.push(Ft[kt]);pe.next=2;break;case 12:return pe.abrupt("return",xt);case 13:case"end":return pe.stop()}},Ci)})),Be.apply(this,arguments)},Yn=function(Ci){return Be.apply(this,arguments)},Ue=[],Pn=[],me.forEach(function(Nn){return Pn.push(Nn.webkitGetAsEntry())}),An=function(){var Nn=(0,Ne.Z)((0,ie.Z)().mark(function Ci(It,wt){var xt,Ft;return(0,ie.Z)().wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:if(It){kt.next=2;break}return kt.abrupt("return");case 2:if(It.path=wt||"",!It.isFile){kt.next=10;break}return kt.next=6,vn(It);case 6:xt=kt.sent,xt&&Ue.push(xt),kt.next=15;break;case 10:if(!It.isDirectory){kt.next=15;break}return kt.next=13,Yn(It);case 13:Ft=kt.sent,Pn.push.apply(Pn,(0,bt.Z)(Ft));case 15:case"end":return kt.stop()}},Ci)}));return function(It,wt){return Nn.apply(this,arguments)}}(),we=0;case 9:if(!(we<Pn.length)){ce.next=15;break}return ce.next=12,An(Pn[we]);case 12:we++,ce.next=9;break;case 15:return ce.abrupt("return",Ue);case 16:case"end":return ce.stop()}},nn)}));return function(me,Xt){return rn.apply(this,arguments)}}(),Ht=zt,qt=+new Date,jt=0;function Jt(){return"rc-upload-".concat(qt,"-").concat(++jt)}var ge=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],he=function(rn){(0,Se.Z)(me,rn);var nn=(0,Wt.Z)(me);function me(){var Xt;(0,ee.Z)(this,me);for(var Ue=arguments.length,Pn=new Array(Ue),Yn=0;Yn<Ue;Yn++)Pn[Yn]=arguments[Yn];return Xt=nn.call.apply(nn,[this].concat(Pn)),(0,se.Z)((0,xe.Z)(Xt),"state",{uid:Jt()}),(0,se.Z)((0,xe.Z)(Xt),"reqs",{}),(0,se.Z)((0,xe.Z)(Xt),"fileInput",void 0),(0,se.Z)((0,xe.Z)(Xt),"_isMounted",void 0),(0,se.Z)((0,xe.Z)(Xt),"onChange",function(Be){var vn=Xt.props,Je=vn.accept,An=vn.directory,we=Be.target.files,sn=(0,bt.Z)(we).filter(function(ce){return!An||gt(ce,Je)});Xt.uploadFiles(sn),Xt.reset()}),(0,se.Z)((0,xe.Z)(Xt),"onClick",function(Be){var vn=Xt.fileInput;if(vn){var Je=Be.target,An=Xt.props.onClick;if(Je&&Je.tagName==="BUTTON"){var we=vn.parentNode;we.focus(),Je.blur()}vn.click(),An&&An(Be)}}),(0,se.Z)((0,xe.Z)(Xt),"onKeyDown",function(Be){Be.key==="Enter"&&Xt.onClick(Be)}),(0,se.Z)((0,xe.Z)(Xt),"onFileDrop",function(){var Be=(0,Ne.Z)((0,ie.Z)().mark(function vn(Je){var An,we,sn;return(0,ie.Z)().wrap(function(Nn){for(;;)switch(Nn.prev=Nn.next){case 0:if(An=Xt.props.multiple,Je.preventDefault(),Je.type!=="dragover"){Nn.next=4;break}return Nn.abrupt("return");case 4:if(!Xt.props.directory){Nn.next=11;break}return Nn.next=7,Ht(Array.prototype.slice.call(Je.dataTransfer.items),function(Ci){return gt(Ci,Xt.props.accept)});case 7:we=Nn.sent,Xt.uploadFiles(we),Nn.next=14;break;case 11:sn=(0,bt.Z)(Je.dataTransfer.files).filter(function(Ci){return gt(Ci,Xt.props.accept)}),An===!1&&(sn=sn.slice(0,1)),Xt.uploadFiles(sn);case 14:case"end":return Nn.stop()}},vn)}));return function(vn){return Be.apply(this,arguments)}}()),(0,se.Z)((0,xe.Z)(Xt),"uploadFiles",function(Be){var vn=(0,bt.Z)(Be),Je=vn.map(function(An){return An.uid=Jt(),Xt.processFile(An,vn)});Promise.all(Je).then(function(An){var we=Xt.props.onBatchStart;we==null||we(An.map(function(sn){var ce=sn.origin,Nn=sn.parsedFile;return{file:ce,parsedFile:Nn}})),An.filter(function(sn){return sn.parsedFile!==null}).forEach(function(sn){Xt.post(sn)})})}),(0,se.Z)((0,xe.Z)(Xt),"processFile",function(){var Be=(0,Ne.Z)((0,ie.Z)().mark(function vn(Je,An){var we,sn,ce,Nn,Ci,It,wt,xt,Ft;return(0,ie.Z)().wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:if(we=Xt.props.beforeUpload,sn=Je,!we){kt.next=14;break}return kt.prev=3,kt.next=6,we(Je,An);case 6:sn=kt.sent,kt.next=12;break;case 9:kt.prev=9,kt.t0=kt.catch(3),sn=!1;case 12:if(sn!==!1){kt.next=14;break}return kt.abrupt("return",{origin:Je,parsedFile:null,action:null,data:null});case 14:if(ce=Xt.props.action,typeof ce!="function"){kt.next=21;break}return kt.next=18,ce(Je);case 18:Nn=kt.sent,kt.next=22;break;case 21:Nn=ce;case 22:if(Ci=Xt.props.data,typeof Ci!="function"){kt.next=29;break}return kt.next=26,Ci(Je);case 26:It=kt.sent,kt.next=30;break;case 29:It=Ci;case 30:return wt=((0,We.Z)(sn)==="object"||typeof sn=="string")&&sn?sn:Je,wt instanceof File?xt=wt:xt=new File([wt],Je.name,{type:Je.type}),Ft=xt,Ft.uid=Je.uid,kt.abrupt("return",{origin:Je,data:It,parsedFile:Ft,action:Nn});case 35:case"end":return kt.stop()}},vn,null,[[3,9]])}));return function(vn,Je){return Be.apply(this,arguments)}}()),(0,se.Z)((0,xe.Z)(Xt),"saveFileInput",function(Be){Xt.fileInput=Be}),Xt}return(0,Pe.Z)(me,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(Ue){var Pn=this,Yn=Ue.data,Be=Ue.origin,vn=Ue.action,Je=Ue.parsedFile;if(this._isMounted){var An=this.props,we=An.onStart,sn=An.customRequest,ce=An.name,Nn=An.headers,Ci=An.withCredentials,It=An.method,wt=Be.uid,xt=sn||Mt,Ft={action:vn,filename:ce,data:Yn,file:Je,headers:Nn,withCredentials:Ci,method:It||"post",onProgress:function(kt){var Yt=Pn.props.onProgress;Yt==null||Yt(kt,Je)},onSuccess:function(kt,Yt){var pe=Pn.props.onSuccess;pe==null||pe(kt,Je,Yt),delete Pn.reqs[wt]},onError:function(kt,Yt){var pe=Pn.props.onError;pe==null||pe(kt,Yt,Je),delete Pn.reqs[wt]}};we(Be),this.reqs[wt]=xt(Ft)}}},{key:"reset",value:function(){this.setState({uid:Jt()})}},{key:"abort",value:function(Ue){var Pn=this.reqs;if(Ue){var Yn=Ue.uid?Ue.uid:Ue;Pn[Yn]&&Pn[Yn].abort&&Pn[Yn].abort(),delete Pn[Yn]}else Object.keys(Pn).forEach(function(Be){Pn[Be]&&Pn[Be].abort&&Pn[Be].abort(),delete Pn[Be]})}},{key:"render",value:function(){var Ue=this.props,Pn=Ue.component,Yn=Ue.prefixCls,Be=Ue.className,vn=Ue.classNames,Je=vn===void 0?{}:vn,An=Ue.disabled,we=Ue.id,sn=Ue.name,ce=Ue.style,Nn=Ue.styles,Ci=Nn===void 0?{}:Nn,It=Ue.multiple,wt=Ue.accept,xt=Ue.capture,Ft=Ue.children,Gt=Ue.directory,kt=Ue.openFileDialogOnClick,Yt=Ue.onMouseEnter,pe=Ue.onMouseLeave,Le=Ue.hasControlInside,on=(0,Nt.Z)(Ue,ge),ve=et()((0,se.Z)((0,se.Z)((0,se.Z)({},Yn,!0),"".concat(Yn,"-disabled"),An),Be,Be)),Ae=Gt?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},Ee=An?{}:{onClick:kt?this.onClick:function(){},onKeyDown:kt?this.onKeyDown:function(){},onMouseEnter:Yt,onMouseLeave:pe,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:Le?void 0:"0"};return ze.createElement(Pn,(0,Dt.Z)({},Ee,{className:ve,role:Le?void 0:"button",style:ce}),ze.createElement("input",(0,Dt.Z)({},(0,ct.Z)(on,{aria:!0,data:!0}),{id:we,name:sn,disabled:An,type:"file",ref:this.saveFileInput,onClick:function(kn){return kn.stopPropagation()},key:this.state.uid,style:(0,ye.Z)({display:"none"},Ci.input),className:Je.input,accept:wt},Ae,{multiple:It,onChange:this.onChange},xt!=null?{capture:xt}:{})),Ft)}}]),me}(ze.Component),Fe=he;function Re(){}var Ke=function(rn){(0,Se.Z)(me,rn);var nn=(0,Wt.Z)(me);function me(){var Xt;(0,ee.Z)(this,me);for(var Ue=arguments.length,Pn=new Array(Ue),Yn=0;Yn<Ue;Yn++)Pn[Yn]=arguments[Yn];return Xt=nn.call.apply(nn,[this].concat(Pn)),(0,se.Z)((0,xe.Z)(Xt),"uploader",void 0),(0,se.Z)((0,xe.Z)(Xt),"saveUploader",function(Be){Xt.uploader=Be}),Xt}return(0,Pe.Z)(me,[{key:"abort",value:function(Ue){this.uploader.abort(Ue)}},{key:"render",value:function(){return ze.createElement(Fe,(0,Dt.Z)({},this.props,{ref:this.saveUploader}))}}]),me}(ze.Component);(0,se.Z)(Ke,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Re,onError:Re,onSuccess:Re,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var Mn=Ke,tn=Mn},8224:function(zn,oi,Ot){"use strict";Ot.d(oi,{Z:function(){return ee}});var Dt=Ot(4676);function ee(Pe,xe,Se,Wt){var se=Dt.unstable_batchedUpdates?function(ye){Dt.unstable_batchedUpdates(Se,ye)}:Se;return Pe!=null&&Pe.addEventListener&&Pe.addEventListener(xe,se,Wt),{remove:function(){Pe!=null&&Pe.removeEventListener&&Pe.removeEventListener(xe,se,Wt)}}}},24514:function(zn,oi,Ot){"use strict";Ot.d(oi,{G:function(){return xe}});var Dt=Ot(47273),ee=function(Wt){if((0,Dt.Z)()&&window.document.documentElement){var se=Array.isArray(Wt)?Wt:[Wt],ze=window.document.documentElement;return se.some(function(ye){return ye in ze.style})}return!1},Pe=function(Wt,se){if(!ee(Wt))return!1;var ze=document.createElement("div"),ye=ze.style[Wt];return ze.style[Wt]=se,ze.style[Wt]!==ye};function xe(Se,Wt){return!Array.isArray(Se)&&Wt!==void 0?Pe(Se,Wt):ee(Se)}},45680:function(zn,oi,Ot){"use strict";Ot.d(oi,{Z:function(){return Ci}});var Dt=Ot(72308),ee=Ot(62853),Pe=Ot(77321),xe=Ot(49618),Se=Ot(52487),Wt=Ot(74416),se=Ot(92310),ze=Ot.n(se),ye=Ot(29301),Nt=Ot(70425),We=Ot(34280),ie=Ot(59301),Ne=Ot(4676),bt=ie.forwardRef(function(It,wt){var xt=It.height,Ft=It.offsetY,Gt=It.offsetX,kt=It.children,Yt=It.prefixCls,pe=It.onInnerResize,Le=It.innerProps,on=It.rtl,ve=It.extra,Ae={},Ee={display:"flex",flexDirection:"column"};return Ft!==void 0&&(Ae={height:xt,position:"relative",overflow:"hidden"},Ee=(0,Pe.Z)((0,Pe.Z)({},Ee),{},(0,xe.Z)((0,xe.Z)((0,xe.Z)((0,xe.Z)((0,xe.Z)({transform:"translateY(".concat(Ft,"px)")},on?"marginRight":"marginLeft",-Gt),"position","absolute"),"left",0),"right",0),"top",0))),ie.createElement("div",{style:Ae},ie.createElement(ye.Z,{onResize:function(kn){var In=kn.offsetHeight;In&&pe&&pe()}},ie.createElement("div",(0,Dt.Z)({style:Ee,className:ze()((0,xe.Z)({},"".concat(Yt,"-holder-inner"),Yt)),ref:wt},Le),kt,ve)))});bt.displayName="Filler";var nt=bt;function et(It){var wt=It.children,xt=It.setRef,Ft=ie.useCallback(function(Gt){xt(Gt)},[]);return ie.cloneElement(wt,{ref:Ft})}function ct(It,wt,xt,Ft,Gt,kt,Yt,pe){var Le=pe.getKey;return It.slice(wt,xt+1).map(function(on,ve){var Ae=wt+ve,Ee=Yt(on,Ae,{style:{width:Ft},offsetX:Gt}),Ge=Le(on);return ie.createElement(et,{key:Ge,setRef:function(In){return kt(on,In)}},Ee)})}function lt(It,wt,xt,Ft){var Gt=xt-It,kt=wt-xt,Yt=Math.min(Gt,kt)*2;if(Ft<=Yt){var pe=Math.floor(Ft/2);return Ft%2?xt+pe+1:xt-pe}return Gt>kt?xt-(Ft-kt):xt+(Ft-Gt)}function gt(It,wt,xt){var Ft=It.length,Gt=wt.length,kt,Yt;if(Ft===0&&Gt===0)return null;Ft<Gt?(kt=It,Yt=wt):(kt=wt,Yt=It);var pe={__EMPTY_ITEM__:!0};function Le(kn){return kn!==void 0?xt(kn):pe}for(var on=null,ve=Math.abs(Ft-Gt)!==1,Ae=0;Ae<Yt.length;Ae+=1){var Ee=Le(kt[Ae]),Ge=Le(Yt[Ae]);if(Ee!==Ge){on=Ae,ve=ve||Ee!==Le(Yt[Ae+1]);break}}return on===null?null:{index:on,multiple:ve}}function mt(It,wt,xt){var Ft=ie.useState(It),Gt=(0,Se.Z)(Ft,2),kt=Gt[0],Yt=Gt[1],pe=ie.useState(null),Le=(0,Se.Z)(pe,2),on=Le[0],ve=Le[1];return ie.useEffect(function(){var Ae=gt(kt||[],It||[],wt);(Ae==null?void 0:Ae.index)!==void 0&&(xt==null||xt(Ae.index),ve(It[Ae.index])),Yt(It)},[It]),[on]}var St=Ot(16089),Mt=(typeof navigator=="undefined"?"undefined":(0,ee.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),zt=Mt,Ht=function(It,wt,xt,Ft){var Gt=(0,ie.useRef)(!1),kt=(0,ie.useRef)(null);function Yt(){clearTimeout(kt.current),Gt.current=!0,kt.current=setTimeout(function(){Gt.current=!1},50)}var pe=(0,ie.useRef)({top:It,bottom:wt,left:xt,right:Ft});return pe.current.top=It,pe.current.bottom=wt,pe.current.left=xt,pe.current.right=Ft,function(Le,on){var ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Ae=Le?on<0&&pe.current.left||on>0&&pe.current.right:on<0&&pe.current.top||on>0&&pe.current.bottom;return ve&&Ae?(clearTimeout(kt.current),Gt.current=!1):(!Ae||Gt.current)&&Yt(),!Gt.current&&Ae}};function qt(It,wt,xt,Ft,Gt,kt,Yt){var pe=(0,ie.useRef)(0),Le=(0,ie.useRef)(null),on=(0,ie.useRef)(null),ve=(0,ie.useRef)(!1),Ae=Ht(wt,xt,Ft,Gt);function Ee(xi,Gn){if(St.Z.cancel(Le.current),!Ae(!1,Gn)){var Si=xi;if(!Si._virtualHandled)Si._virtualHandled=!0;else return;pe.current+=Gn,on.current=Gn,zt||Si.preventDefault(),Le.current=(0,St.Z)(function(){var _n=ve.current?10:1;Yt(pe.current*_n,!1),pe.current=0})}}function Ge(xi,Gn){Yt(Gn,!0),zt||xi.preventDefault()}var kn=(0,ie.useRef)(null),In=(0,ie.useRef)(null);function gn(xi){if(It){St.Z.cancel(In.current),In.current=(0,St.Z)(function(){kn.current=null},2);var Gn=xi.deltaX,Si=xi.deltaY,_n=xi.shiftKey,Ti=Gn,Di=Si;(kn.current==="sx"||!kn.current&&_n&&Si&&!Gn)&&(Ti=Si,Di=0,kn.current="sx");var $i=Math.abs(Ti),Kr=Math.abs(Di);kn.current===null&&(kn.current=kt&&$i>Kr?"x":"y"),kn.current==="y"?Ee(xi,Di):Ge(xi,Ti)}}function ai(xi){It&&(ve.current=xi.detail===on.current)}return[gn,ai]}function jt(It,wt,xt,Ft){var Gt=ie.useMemo(function(){return[new Map,[]]},[It,xt.id,Ft]),kt=(0,Se.Z)(Gt,2),Yt=kt[0],pe=kt[1],Le=function(ve){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ve,Ee=Yt.get(ve),Ge=Yt.get(Ae);if(Ee===void 0||Ge===void 0)for(var kn=It.length,In=pe.length;In<kn;In+=1){var gn,ai=It[In],xi=wt(ai);Yt.set(xi,In);var Gn=(gn=xt.get(xi))!==null&&gn!==void 0?gn:Ft;if(pe[In]=(pe[In-1]||0)+Gn,xi===ve&&(Ee=In),xi===Ae&&(Ge=In),Ee!==void 0&&Ge!==void 0)break}return{top:pe[Ee-1]||0,bottom:pe[Ge]}};return Le}var Jt=Ot(96949),ge=Ot(55090),he=function(){function It(){(0,Jt.Z)(this,It),(0,xe.Z)(this,"maps",void 0),(0,xe.Z)(this,"id",0),(0,xe.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,ge.Z)(It,[{key:"set",value:function(xt,Ft){this.maps[xt]=Ft,this.id+=1,this.diffKeys.add(xt)}},{key:"get",value:function(xt){return this.maps[xt]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),It}(),Fe=he;function Re(It){var wt=parseFloat(It);return isNaN(wt)?0:wt}function Ke(It,wt,xt){var Ft=ie.useState(0),Gt=(0,Se.Z)(Ft,2),kt=Gt[0],Yt=Gt[1],pe=(0,ie.useRef)(new Map),Le=(0,ie.useRef)(new Fe),on=(0,ie.useRef)(0);function ve(){on.current+=1}function Ae(){var Ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;ve();var kn=function(){var ai=!1;pe.current.forEach(function(xi,Gn){if(xi&&xi.offsetParent){var Si=xi.offsetHeight,_n=getComputedStyle(xi),Ti=_n.marginTop,Di=_n.marginBottom,$i=Re(Ti),Kr=Re(Di),Xi=Si+$i+Kr;Le.current.get(Gn)!==Xi&&(Le.current.set(Gn,Xi),ai=!0)}}),ai&&Yt(function(xi){return xi+1})};if(Ge)kn();else{on.current+=1;var In=on.current;Promise.resolve().then(function(){In===on.current&&kn()})}}function Ee(Ge,kn){var In=It(Ge),gn=pe.current.get(In);kn?(pe.current.set(In,kn),Ae()):pe.current.delete(In),!gn!=!kn&&(kn?wt==null||wt(Ge):xt==null||xt(Ge))}return(0,ie.useEffect)(function(){return ve},[]),[Ee,Ae,Le.current,kt]}var Mn=14/15;function tn(It,wt,xt){var Ft=(0,ie.useRef)(!1),Gt=(0,ie.useRef)(0),kt=(0,ie.useRef)(0),Yt=(0,ie.useRef)(null),pe=(0,ie.useRef)(null),Le,on=function(Ge){if(Ft.current){var kn=Math.ceil(Ge.touches[0].pageX),In=Math.ceil(Ge.touches[0].pageY),gn=Gt.current-kn,ai=kt.current-In,xi=Math.abs(gn)>Math.abs(ai);xi?Gt.current=kn:kt.current=In;var Gn=xt(xi,xi?gn:ai,!1,Ge);Gn&&Ge.preventDefault(),clearInterval(pe.current),Gn&&(pe.current=setInterval(function(){xi?gn*=Mn:ai*=Mn;var Si=Math.floor(xi?gn:ai);(!xt(xi,Si,!0)||Math.abs(Si)<=.1)&&clearInterval(pe.current)},16))}},ve=function(){Ft.current=!1,Le()},Ae=function(Ge){Le(),Ge.touches.length===1&&!Ft.current&&(Ft.current=!0,Gt.current=Math.ceil(Ge.touches[0].pageX),kt.current=Math.ceil(Ge.touches[0].pageY),Yt.current=Ge.target,Yt.current.addEventListener("touchmove",on,{passive:!1}),Yt.current.addEventListener("touchend",ve,{passive:!0}))};Le=function(){Yt.current&&(Yt.current.removeEventListener("touchmove",on),Yt.current.removeEventListener("touchend",ve))},(0,We.Z)(function(){return It&&wt.current.addEventListener("touchstart",Ae,{passive:!0}),function(){var Ee;(Ee=wt.current)===null||Ee===void 0||Ee.removeEventListener("touchstart",Ae),Le(),clearInterval(pe.current)}},[It])}function rn(It){return Math.floor(Math.pow(It,.5))}function nn(It,wt){var xt="touches"in It?It.touches[0]:It;return xt[wt?"pageX":"pageY"]-window[wt?"scrollX":"scrollY"]}function me(It,wt,xt){ie.useEffect(function(){var Ft=wt.current;if(It&&Ft){var Gt=!1,kt,Yt,pe=function(){St.Z.cancel(kt)},Le=function Ee(){pe(),kt=(0,St.Z)(function(){xt(Yt),Ee()})},on=function(Ge){if(!(Ge.target.draggable||Ge.button!==0)){var kn=Ge;kn._virtualHandled||(kn._virtualHandled=!0,Gt=!0)}},ve=function(){Gt=!1,pe()},Ae=function(Ge){if(Gt){var kn=nn(Ge,!1),In=Ft.getBoundingClientRect(),gn=In.top,ai=In.bottom;if(kn<=gn){var xi=gn-kn;Yt=-rn(xi),Le()}else if(kn>=ai){var Gn=kn-ai;Yt=rn(Gn),Le()}else pe()}};return Ft.addEventListener("mousedown",on),Ft.ownerDocument.addEventListener("mouseup",ve),Ft.ownerDocument.addEventListener("mousemove",Ae),function(){Ft.removeEventListener("mousedown",on),Ft.ownerDocument.removeEventListener("mouseup",ve),Ft.ownerDocument.removeEventListener("mousemove",Ae),pe()}}},[It])}var Xt=10;function Ue(It,wt,xt,Ft,Gt,kt,Yt,pe){var Le=ie.useRef(),on=ie.useState(null),ve=(0,Se.Z)(on,2),Ae=ve[0],Ee=ve[1];return(0,We.Z)(function(){if(Ae&&Ae.times<Xt){if(!It.current){Ee(function(ko){return(0,Pe.Z)({},ko)});return}kt();var Ge=Ae.targetAlign,kn=Ae.originAlign,In=Ae.index,gn=Ae.offset,ai=It.current.clientHeight,xi=!1,Gn=Ge,Si=null;if(ai){for(var _n=Ge||kn,Ti=0,Di=0,$i=0,Kr=Math.min(wt.length-1,In),Xi=0;Xi<=Kr;Xi+=1){var zr=Gt(wt[Xi]);Di=Ti;var so=xt.get(zr);$i=Di+(so===void 0?Ft:so),Ti=$i}for(var po=_n==="top"?gn:ai-gn,Jr=Kr;Jr>=0;Jr-=1){var Do=Gt(wt[Jr]),Bo=xt.get(Do);if(Bo===void 0){xi=!0;break}if(po-=Bo,po<=0)break}switch(_n){case"top":Si=Di-gn;break;case"bottom":Si=$i-ai+gn;break;default:{var Ko=It.current.scrollTop,bo=Ko+ai;Di<Ko?Gn="top":$i>bo&&(Gn="bottom")}}Si!==null&&Yt(Si),Si!==Ae.lastTop&&(xi=!0)}xi&&Ee((0,Pe.Z)((0,Pe.Z)({},Ae),{},{times:Ae.times+1,targetAlign:Gn,lastTop:Si}))}},[Ae,It.current]),function(Ge){if(Ge==null){pe();return}if(St.Z.cancel(Le.current),typeof Ge=="number")Yt(Ge);else if(Ge&&(0,ee.Z)(Ge)==="object"){var kn,In=Ge.align;"index"in Ge?kn=Ge.index:kn=wt.findIndex(function(xi){return Gt(xi)===Ge.key});var gn=Ge.offset,ai=gn===void 0?0:gn;Ee({times:0,index:kn,offset:ai,originAlign:In})}}}var Pn=ie.forwardRef(function(It,wt){var xt=It.prefixCls,Ft=It.rtl,Gt=It.scrollOffset,kt=It.scrollRange,Yt=It.onStartMove,pe=It.onStopMove,Le=It.onScroll,on=It.horizontal,ve=It.spinSize,Ae=It.containerSize,Ee=It.style,Ge=It.thumbStyle,kn=It.showScrollBar,In=ie.useState(!1),gn=(0,Se.Z)(In,2),ai=gn[0],xi=gn[1],Gn=ie.useState(null),Si=(0,Se.Z)(Gn,2),_n=Si[0],Ti=Si[1],Di=ie.useState(null),$i=(0,Se.Z)(Di,2),Kr=$i[0],Xi=$i[1],zr=!Ft,so=ie.useRef(),po=ie.useRef(),Jr=ie.useState(kn),Do=(0,Se.Z)(Jr,2),Bo=Do[0],Ko=Do[1],bo=ie.useRef(),ko=function(){kn===!0||kn===!1||(clearTimeout(bo.current),Ko(!0),bo.current=setTimeout(function(){Ko(!1)},3e3))},Ct=kt-Ae||0,Zn=Ae-ve||0,bn=ie.useMemo(function(){if(Gt===0||Ct===0)return 0;var Me=Gt/Ct;return Me*Zn},[Gt,Ct,Zn]),Pr=function(Pi){Pi.stopPropagation(),Pi.preventDefault()},Er=ie.useRef({top:bn,dragging:ai,pageY:_n,startTop:Kr});Er.current={top:bn,dragging:ai,pageY:_n,startTop:Kr};var Zi=function(Pi){xi(!0),Ti(nn(Pi,on)),Xi(Er.current.top),Yt(),Pi.stopPropagation(),Pi.preventDefault()};ie.useEffect(function(){var Me=function(Dn){Dn.preventDefault()},Pi=so.current,Vi=po.current;return Pi.addEventListener("touchstart",Me,{passive:!1}),Vi.addEventListener("touchstart",Zi,{passive:!1}),function(){Pi.removeEventListener("touchstart",Me),Vi.removeEventListener("touchstart",Zi)}},[]);var _r=ie.useRef();_r.current=Ct;var ho=ie.useRef();ho.current=Zn,ie.useEffect(function(){if(ai){var Me,Pi=function(Dn){var pi=Er.current,Ze=pi.dragging,je=pi.pageY,mi=pi.startTop;St.Z.cancel(Me);var $t=so.current.getBoundingClientRect(),pn=Ae/(on?$t.width:$t.height);if(Ze){var ei=(nn(Dn,on)-je)*pn,Bi=mi;!zr&&on?Bi-=ei:Bi+=ei;var _e=_r.current,un=ho.current,$n=un?Bi/un:0,vi=Math.ceil($n*_e);vi=Math.max(vi,0),vi=Math.min(vi,_e),Me=(0,St.Z)(function(){Le(vi,on)})}},Vi=function(){xi(!1),pe()};return window.addEventListener("mousemove",Pi,{passive:!0}),window.addEventListener("touchmove",Pi,{passive:!0}),window.addEventListener("mouseup",Vi,{passive:!0}),window.addEventListener("touchend",Vi,{passive:!0}),function(){window.removeEventListener("mousemove",Pi),window.removeEventListener("touchmove",Pi),window.removeEventListener("mouseup",Vi),window.removeEventListener("touchend",Vi),St.Z.cancel(Me)}}},[ai]),ie.useEffect(function(){return ko(),function(){clearTimeout(bo.current)}},[Gt]),ie.useImperativeHandle(wt,function(){return{delayHidden:ko}});var br="".concat(xt,"-scrollbar"),$e={position:"absolute",visibility:Bo?null:"hidden"},Oe={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return on?($e.height=8,$e.left=0,$e.right=0,$e.bottom=0,Oe.height="100%",Oe.width=ve,zr?Oe.left=bn:Oe.right=bn):($e.width=8,$e.top=0,$e.bottom=0,zr?$e.right=0:$e.left=0,Oe.width="100%",Oe.height=ve,Oe.top=bn),ie.createElement("div",{ref:so,className:ze()(br,(0,xe.Z)((0,xe.Z)((0,xe.Z)({},"".concat(br,"-horizontal"),on),"".concat(br,"-vertical"),!on),"".concat(br,"-visible"),Bo)),style:(0,Pe.Z)((0,Pe.Z)({},$e),Ee),onMouseDown:Pr,onMouseMove:ko},ie.createElement("div",{ref:po,className:ze()("".concat(br,"-thumb"),(0,xe.Z)({},"".concat(br,"-thumb-moving"),ai)),style:(0,Pe.Z)((0,Pe.Z)({},Oe),Ge),onMouseDown:Zi}))}),Yn=Pn,Be=20;function vn(){var It=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,xt=It/wt*It;return isNaN(xt)&&(xt=0),xt=Math.max(xt,Be),Math.floor(xt)}var Je=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],An=[],we={overflowY:"auto",overflowAnchor:"none"};function sn(It,wt){var xt=It.prefixCls,Ft=xt===void 0?"rc-virtual-list":xt,Gt=It.className,kt=It.height,Yt=It.itemHeight,pe=It.fullHeight,Le=pe===void 0?!0:pe,on=It.style,ve=It.data,Ae=It.children,Ee=It.itemKey,Ge=It.virtual,kn=It.direction,In=It.scrollWidth,gn=It.component,ai=gn===void 0?"div":gn,xi=It.onScroll,Gn=It.onVirtualScroll,Si=It.onVisibleChange,_n=It.innerProps,Ti=It.extraRender,Di=It.styles,$i=It.showScrollBar,Kr=$i===void 0?"optional":$i,Xi=(0,Wt.Z)(It,Je),zr=ie.useCallback(function(yn){return typeof Ee=="function"?Ee(yn):yn==null?void 0:yn[Ee]},[Ee]),so=Ke(zr,null,null),po=(0,Se.Z)(so,4),Jr=po[0],Do=po[1],Bo=po[2],Ko=po[3],bo=!!(Ge!==!1&&kt&&Yt),ko=ie.useMemo(function(){return Object.values(Bo.maps).reduce(function(yn,Vn){return yn+Vn},0)},[Bo.id,Bo.maps]),Ct=bo&&ve&&(Math.max(Yt*ve.length,ko)>kt||!!In),Zn=kn==="rtl",bn=ze()(Ft,(0,xe.Z)({},"".concat(Ft,"-rtl"),Zn),Gt),Pr=ve||An,Er=(0,ie.useRef)(),Zi=(0,ie.useRef)(),_r=(0,ie.useRef)(),ho=(0,ie.useState)(0),br=(0,Se.Z)(ho,2),$e=br[0],Oe=br[1],Me=(0,ie.useState)(0),Pi=(0,Se.Z)(Me,2),Vi=Pi[0],rr=Pi[1],Dn=(0,ie.useState)(!1),pi=(0,Se.Z)(Dn,2),Ze=pi[0],je=pi[1],mi=function(){je(!0)},$t=function(){je(!1)},pn={getKey:zr};function ei(yn){Oe(function(Vn){var Kn;typeof yn=="function"?Kn=yn(Vn):Kn=yn;var Jn=Qi(Kn);return Er.current.scrollTop=Jn,Jn})}var Bi=(0,ie.useRef)({start:0,end:Pr.length}),_e=(0,ie.useRef)(),un=mt(Pr,zr),$n=(0,Se.Z)(un,1),vi=$n[0];_e.current=vi;var Oi=ie.useMemo(function(){if(!bo)return{scrollHeight:void 0,start:0,end:Pr.length-1,offset:void 0};if(!Ct){var yn;return{scrollHeight:((yn=Zi.current)===null||yn===void 0?void 0:yn.offsetHeight)||0,start:0,end:Pr.length-1,offset:void 0}}for(var Vn=0,Kn,Jn,Qn,Gi=Pr.length,At=0;At<Gi;At+=1){var re=Pr[At],Ut=zr(re),oe=Bo.get(Ut),fe=Vn+(oe===void 0?Yt:oe);fe>=$e&&Kn===void 0&&(Kn=At,Jn=Vn),fe>$e+kt&&Qn===void 0&&(Qn=At),Vn=fe}return Kn===void 0&&(Kn=0,Jn=0,Qn=Math.ceil(kt/Yt)),Qn===void 0&&(Qn=Pr.length-1),Qn=Math.min(Qn+1,Pr.length-1),{scrollHeight:Vn,start:Kn,end:Qn,offset:Jn}},[Ct,bo,$e,Pr,Ko,kt]),Ei=Oi.scrollHeight,ri=Oi.start,bi=Oi.end,Sr=Oi.offset;Bi.current.start=ri,Bi.current.end=bi,ie.useLayoutEffect(function(){var yn=Bo.getRecord();if(yn.size===1){var Vn=Array.from(yn)[0],Kn=Pr[ri];if(Kn){var Jn=zr(Kn);if(Jn===Vn){var Qn=Bo.get(Vn),Gi=Qn-Yt;ei(function(At){return At+Gi})}}}Bo.resetRecord()},[Ei]);var mr=ie.useState({width:0,height:kt}),wr=(0,Se.Z)(mr,2),an=wr[0],wo=wr[1],Ar=function(Vn){wo({width:Vn.offsetWidth,height:Vn.offsetHeight})},mo=(0,ie.useRef)(),Ve=(0,ie.useRef)(),ni=ie.useMemo(function(){return vn(an.width,In)},[an.width,In]),Ni=ie.useMemo(function(){return vn(an.height,Ei)},[an.height,Ei]),Hi=Ei-kt,Ii=(0,ie.useRef)(Hi);Ii.current=Hi;function Qi(yn){var Vn=yn;return Number.isNaN(Ii.current)||(Vn=Math.min(Vn,Ii.current)),Vn=Math.max(Vn,0),Vn}var Or=$e<=0,Lr=$e>=Hi,Nr=Vi<=0,Rr=Vi>=In,dn=Ht(Or,Lr,Nr,Rr),$r=function(){return{x:Zn?-Vi:Vi,y:$e}},cn=(0,ie.useRef)($r()),Ri=(0,Nt.zX)(function(yn){if(Gn){var Vn=(0,Pe.Z)((0,Pe.Z)({},$r()),yn);(cn.current.x!==Vn.x||cn.current.y!==Vn.y)&&(Gn(Vn),cn.current=Vn)}});function _i(yn,Vn){var Kn=yn;Vn?((0,Ne.flushSync)(function(){rr(Kn)}),Ri()):ei(Kn)}function xr(yn){var Vn=yn.currentTarget.scrollTop;Vn!==$e&&ei(Vn),xi==null||xi(yn),Ri()}var zo=function(Vn){var Kn=Vn,Jn=In?In-an.width:0;return Kn=Math.max(Kn,0),Kn=Math.min(Kn,Jn),Kn},Mo=(0,Nt.zX)(function(yn,Vn){Vn?((0,Ne.flushSync)(function(){rr(function(Kn){var Jn=Kn+(Zn?-yn:yn);return zo(Jn)})}),Ri()):ei(function(Kn){var Jn=Kn+yn;return Jn})}),qr=qt(bo,Or,Lr,Nr,Rr,!!In,Mo),vo=(0,Se.Z)(qr,2),Te=vo[0],hn=vo[1];tn(bo,Er,function(yn,Vn,Kn,Jn){var Qn=Jn;return dn(yn,Vn,Kn)?!1:!Qn||!Qn._virtualHandled?(Qn&&(Qn._virtualHandled=!0),Te({preventDefault:function(){},deltaX:yn?Vn:0,deltaY:yn?0:Vn}),!0):!1}),me(Ct,Er,function(yn){ei(function(Vn){return Vn+yn})}),(0,We.Z)(function(){function yn(Kn){var Jn=Or&&Kn.detail<0,Qn=Lr&&Kn.detail>0;bo&&!Jn&&!Qn&&Kn.preventDefault()}var Vn=Er.current;return Vn.addEventListener("wheel",Te,{passive:!1}),Vn.addEventListener("DOMMouseScroll",hn,{passive:!0}),Vn.addEventListener("MozMousePixelScroll",yn,{passive:!1}),function(){Vn.removeEventListener("wheel",Te),Vn.removeEventListener("DOMMouseScroll",hn),Vn.removeEventListener("MozMousePixelScroll",yn)}},[bo,Or,Lr]),(0,We.Z)(function(){if(In){var yn=zo(Vi);rr(yn),Ri({x:yn})}},[an.width,In]);var be=function(){var Vn,Kn;(Vn=mo.current)===null||Vn===void 0||Vn.delayHidden(),(Kn=Ve.current)===null||Kn===void 0||Kn.delayHidden()},Tt=Ue(Er,Pr,Bo,Yt,zr,function(){return Do(!0)},ei,be);ie.useImperativeHandle(wt,function(){return{nativeElement:_r.current,getScrollInfo:$r,scrollTo:function(Vn){function Kn(Jn){return Jn&&(0,ee.Z)(Jn)==="object"&&("left"in Jn||"top"in Jn)}Kn(Vn)?(Vn.left!==void 0&&rr(zo(Vn.left)),Tt(Vn.top)):Tt(Vn)}}}),(0,We.Z)(function(){if(Si){var yn=Pr.slice(ri,bi+1);Si(yn,Pr)}},[ri,bi,Pr]);var Wn=jt(Pr,zr,Bo,Yt),Fn=Ti==null?void 0:Ti({start:ri,end:bi,virtual:Ct,offsetX:Vi,offsetY:Sr,rtl:Zn,getSize:Wn}),Xn=ct(Pr,ri,bi,In,Vi,Jr,Ae,pn),si=null;kt&&(si=(0,Pe.Z)((0,xe.Z)({},Le?"height":"maxHeight",kt),we),bo&&(si.overflowY="hidden",In&&(si.overflowX="hidden"),Ze&&(si.pointerEvents="none")));var wi={};return Zn&&(wi.dir="rtl"),ie.createElement("div",(0,Dt.Z)({ref:_r,style:(0,Pe.Z)((0,Pe.Z)({},on),{},{position:"relative"}),className:bn},wi,Xi),ie.createElement(ye.Z,{onResize:Ar},ie.createElement(ai,{className:"".concat(Ft,"-holder"),style:si,ref:Er,onScroll:xr,onMouseEnter:be},ie.createElement(nt,{prefixCls:Ft,height:Ei,offsetX:Vi,offsetY:Sr,scrollWidth:In,onInnerResize:Do,ref:Zi,innerProps:_n,rtl:Zn,extra:Fn},Xn))),Ct&&Ei>kt&&ie.createElement(Yn,{ref:mo,prefixCls:Ft,scrollOffset:$e,scrollRange:Ei,rtl:Zn,onScroll:_i,onStartMove:mi,onStopMove:$t,spinSize:Ni,containerSize:an.height,style:Di==null?void 0:Di.verticalScrollBar,thumbStyle:Di==null?void 0:Di.verticalScrollBarThumb,showScrollBar:Kr}),Ct&&In>an.width&&ie.createElement(Yn,{ref:Ve,prefixCls:Ft,scrollOffset:Vi,scrollRange:In,rtl:Zn,onScroll:_i,onStartMove:mi,onStopMove:$t,spinSize:ni,containerSize:an.width,horizontal:!0,style:Di==null?void 0:Di.horizontalScrollBar,thumbStyle:Di==null?void 0:Di.horizontalScrollBarThumb,showScrollBar:Kr}))}var ce=ie.forwardRef(sn);ce.displayName="List";var Nn=ce,Ci=Nn},25510:function(zn){"use strict";zn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAiwAAAIsCAYAAADRd/LpAAAgAElEQVR4Xuyda5BtVXXvV3efc+CAYBQRjaJBeWjiVVKVB0mMUV6GKv0cvVVG/XTrViUlSd0bqUoQg4KapKJW8j3mWinNx1SRSgkciKARYiqi1ycvFZSggHgFDofz6L71m3v/9xk9eq695ty91t67u8eimu6z91zzMcaYY/znGGPOudLEExQICgQFggJBgaBAUGDJKbBC/26+98jGkvczuhcUCAoEBYICQYGgwB6lwJUXnroSgGWPMj+GHRQICgQFggJBgZ1CgS2A5YoLTtkpfY9+BgWCAkGBoEBQICiwyylwy33PpREGYNnljI7hBQWCAkGBoEBQYCdTIADLTuZe9D0oEBQICgQFggJ7hAIBWPYIo2OYQYGgQFAgKBAU2MkUCMCyk7kXfQ8KBAWCAkGBoMAeoUAAlj3C6BhmUCAoEBQICgQFdjIFArDsZO5F34MCQYGgQFAgKLBHKBCAZY8wOoYZFAgKBAWCAkGBnUyBACw7mXvR96BAUCAoEBQICuwRCgRg2SOMjmEGBYICQYGgQFBgJ1MgAMtO5l70PSgQFAgKBAWCAnuEAgFY9gijY5hBgaBAUCAoEBTYyRQIwLKTuRd9DwoEBYICQYGgwB6hQACWPcLoGGZQICgQFAgKBAV2MgUCsOxk7kXfgwJBgaBAUCAosEcoEIBljzA6hhkUCAoEBYICQYGdTIEALDuZe9H3oEBQICgQFAgK7BEKBGDZI4yOYQYFggJBgaBAUGAnUyAAy07mXvQ9KBAUCAoEBYICe4QCAVj2CKNjmEGBoEBQICgQFNjJFAjAspO5F30PCgQFggJBgaDAHqFAAJY9wugYZlAgKBAUCAoEBXYyBQKw7GT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EAWMAQV15xhZ177tn27e98x16byyF0fUBiNhaCvo3IQUksMXWqHfutb9huu32gPwHcaA6sm79l56UXX7a777orrLjGTxhnv/7VGbbFVlva6EVG2+tz2J3TFwvCh/iYESPGBBdReHzWXFtkLOf99OlsgNTzzzxvvzj3ZPvhKT+y+/5yv7340qthN82c2XNtypQlgmVz3333s8023sQmLDJ6vqWC+vtTwPThIawrI4m7mWcjidEJATEAlTEhcV24yBsT0MbscAbSAw89YHt9aC+774H77JBDDw2ZgjdYfwObM3den0to1CgbiYUIT1Kf4aTPUjTidZsza7aNCX6qPuCFKWXeq6/ZSE6dDtmC2SreF4ATvHHBtTQ/cGb+VmwF6DRZWIhh8S4hv02WMcPyx0o+9eoWYPHvZ14Qk0dekbqLBZqP/ZgyZYrdcccdwWKUeg01YEGO01dZvflbC0pZl3MColP7rXIFsORSzKwAlgqaEXDLqsgrvthtkkrqqq1mPLvSSiv1r2BS6+o2YEltRyfKdRuwpLSx5wHL/Lwol112qZ155pn23f/9no0ZOzakrw8wJYCJ123U6FE2b+48W3yxxe3444+xf/rHXWxsiGWZf7AzlobZs23mK6/ajHvvs03evolNHD/Rfnveb22rrbYMW4+DFXN4rTMAACAASURBVGqRMcGFQsI3EA8Wjr4wWdwrCPYxfUBontkzTz9rl156mf3Xf33K/vbc88GSM/ktb7GJEybZE089Hd6FW2qddabZGWf8ypYKro++bcGLLDLGZs0iXgaghWtrtM187dWgvIlF6XvfPBs1t89yFLqLJYQAyZFgmNfswYcetD332sse+uv9dsghX7OtttzK1pu23vw525fuf97IEfbqrFk2iXqJlyH/zJxZ4cykMLfDP9xf7Djq6zvXmDEjbebM2TZuHGCvT6nR6b44tL48LKOw/pjZtddea8suu2z/2WM+WPXFF18Mhx/GpzV73sxdEAwWYFlllVVq5VPV7iCse7kW06EGLCkyoptlCmDJp24BLAWw5HNNB54ogKUvrqQuNX/YWcaJxrPn2LXXXWfnn3+eff3rX7fttt/e9tvv87baqqv1xUVguZvdl+skxOssvphNmjzBxu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ZT37ykwBifnDiD0KW1n9+3wfsC1/6oq215po2ZpGxfUGsNrtvU01I+DbK5r4+x8aMGGUv/O0Fm3H3Pfbv/7a3PXD/X23XXXe19ddfzzbb5G12wcUX2+k//6W99tosW3+99e1XZ54Z3DCf+PQn7eprrrannn/aPvjB3e0D73+/PfPUU3brLX+y478JPSbaN75xtG280UZhq/deH/mwzXx1pu20y062yz/ubBPfsqjtt+8X7MmHH7X11p5m//Otb9vqq69tN15/rZ140g/sxz/7ic0dO9Le99732YYbTLcVll/epq21tm20ySbzdzD17S9iy7cy7gZXyPw5UABLASztisMCWPIpVwBLASz5XNOBJwpg6QMs7CB59NFHbcsttwxU1Xb4kOhtvmK84vLf2zlnnWXHH3ucTZo4ySZNmmSjx4wOwbFYENiGO2nRybbKaqvaMccdazded4Mdeeih9tijj4Wg2lN/9rOwK2jG7XfY1b//vX3xC1+28YtOsF+feaZtseWWNmvOHLvplpsDYGG30Lrrrms//elPQ06Na66+OgCWww873LbeZhs76Yc/tD/84UY78cQT7cKLLrL37/FB+++v7G9rrLGmjSADLwnm5r7WlzyMlLbs+QnpS14P7bn5pltt749+xJZdehk78sgjbOONN7IllphiL738ou237352+SWX29hRY+17J37fVnjrCvbxT37C/vDHP9riUxcPcSwrLLO8vfDC32zGXXfZx/b+t5Cw8dvHn2Brr72O3XvfvfbZfT9jq6y+in1or73sA8ThjFvEDjn8SDvzF7+2xSZOtgM//2V7/7+83/508y32fz/8vp38s1Ns1PhF7Mprr7ZVlls+ZLcdM2qMjRnLoZEcc9C3zbtvbxCRyH1gZX4aluISKjEsbUvDAljySVcASwEs+VzTgScKYGkGLH0JZV+3q6+6yn7323PtW0cfbWuvsaZt+45t+/JdjCThGnlMRtioMWNssSmL2ft2+4Cdecav7bhvHWcv/O1vtsvOO9uJP/iBjRk5xh595CG76Y832gfe///sLYsvZr88/XTbfMstQv6Tm2+91fbYfY/g/thg/fUDYFl08mS7WoDl8CNtm222thN/eJLdfPNNAbj87ne/tX9833vtawd9LcT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BEwAtUgYMJSTVNaECNgBIyAETAC9SJgwlJv21oyI2AEjIARMALVIGDCUk1TWhAjYASMgBEwAvUiYMJSb9taMiNgBIyAETAC1SBgwlJNU1oQI2AEjIARMAL1ImDCUm/bWjIjYASMgBEwAtUgYMJSTVNaECNgBIyAETAC9SJgwlJv21oyI2AEjIARMALVIGDCUk1TWhAjYASMgBEwAvUiYMJSb9taMiNgBIyAETAC1SBgwlJNU1oQI2AEjIARMAL1ImDCUm/bWjIjYASMgBEwAtUgYMJSTVNaECNgBIyAETAC9SJgwlJv21oyI2AEjIARMALVIGDCUk1TWhAjYASMgBEwAvUiYMJSb9taMiNgBIyAETAC1SBgwlJNU1oQI2AEjIARMAL1ImDCUm/bWjIjYASMgBEwAtUgYMJSTVNaECNgBIyAETAC9SJgwlJv21oyI2AEjIARMALVIGDCUk1TWhAjYASMgBEwAvUiYMJSb9taMiNgBIyAETAC1SBgwlJNU1oQI2AEjIARMAL1ImDCUm/bWjIjYASMgBEwAtUgYMJSTVNaECNgBIyAETAC9SLQSFjqFdmSGQEjYASMgBEwAqsVge1b1x12GCr/8p6D/12tQrjeRsAIGAEjYASMQN0ITAhL3WJaOiNgBIyAETACRmC1I/C/+Ryxj68oilIAAAAASUVORK5CYII="},32637:function(zn,oi,Ot){"use strict";zn.exports=Ot.p+"static/AssistantCode3.a8740efb.jpeg"},93314:function(zn){"use strict";zn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S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SREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},16722:function(zn,oi,Ot){"use strict";Ot.d(oi,{Z:function(){return ze}});const Dt=ye=>typeof ye=="object"&&ye!=null&&ye.nodeType===1,ee=(ye,Nt)=>(!Nt||ye!=="hidden")&&ye!=="visible"&&ye!=="clip",Pe=(ye,Nt)=>{if(ye.clientHeight<ye.scrollHeight||ye.clientWidth<ye.scrollWidth){const We=getComputedStyle(ye,null);return ee(We.overflowY,Nt)||ee(We.overflowX,Nt)||(ie=>{const Ne=(bt=>{if(!bt.ownerDocument||!bt.ownerDocument.defaultView)return null;try{return bt.ownerDocument.defaultView.frameElement}catch(nt){return null}})(ie);return!!Ne&&(Ne.clientHeight<ie.scrollHeight||Ne.clientWidth<ie.scrollWidth)})(ye)}return!1},xe=(ye,Nt,We,ie,Ne,bt,nt,et)=>bt<ye&&nt>Nt||bt>ye&&nt<Nt?0:bt<=ye&&et<=We||nt>=Nt&&et>=We?bt-ye-ie:nt>Nt&&et<We||bt<ye&&et>We?nt-Nt+Ne:0,Se=ye=>{const Nt=ye.parentElement;return Nt==null?ye.getRootNode().host||null:Nt},Wt=(ye,Nt)=>{var We,ie,Ne,bt;if(typeof document=="undefined")return[];const{scrollMode:nt,block:et,inline:ct,boundary:lt,skipOverflowHiddenElements:gt}=Nt,mt=typeof lt=="function"?lt:Yn=>Yn!==lt;if(!Dt(ye))throw new TypeError("Invalid target");const St=document.scrollingElement||document.documentElement,Mt=[];let zt=ye;for(;Dt(zt)&&mt(zt);){if(zt=Se(zt),zt===St){Mt.push(zt);break}zt!=null&&zt===document.body&&Pe(zt)&&!Pe(document.documentElement)||zt!=null&&Pe(zt,gt)&&Mt.push(zt)}const Ht=(ie=(We=window.visualViewport)==null?void 0:We.width)!=null?ie:innerWidth,qt=(bt=(Ne=window.visualViewport)==null?void 0:Ne.height)!=null?bt:innerHeight,{scrollX:jt,scrollY:Jt}=window,{height:ge,width:he,top:Fe,right:Re,bottom:Ke,left:Mn}=ye.getBoundingClientRect(),{top:tn,right:rn,bottom:nn,left:me}=(Yn=>{const Be=window.getComputedStyle(Yn);return{top:parseFloat(Be.scrollMarginTop)||0,right:parseFloat(Be.scrollMarginRight)||0,bottom:parseFloat(Be.scrollMarginBottom)||0,left:parseFloat(Be.scrollMarginLeft)||0}})(ye);let Xt=et==="start"||et==="nearest"?Fe-tn:et==="end"?Ke+nn:Fe+ge/2-tn+nn,Ue=ct==="center"?Mn+he/2-me+rn:ct==="end"?Re+rn:Mn-me;const Pn=[];for(let Yn=0;Yn<Mt.length;Yn++){const Be=Mt[Yn],{height:vn,width:Je,top:An,right:we,bottom:sn,left:ce}=Be.getBoundingClientRect();if(nt==="if-needed"&&Fe>=0&&Mn>=0&&Ke<=qt&&Re<=Ht&&(Be===St&&!Pe(Be)||Fe>=An&&Ke<=sn&&Mn>=ce&&Re<=we))return Pn;const Nn=getComputedStyle(Be),Ci=parseInt(Nn.borderLeftWidth,10),It=parseInt(Nn.borderTopWidth,10),wt=parseInt(Nn.borderRightWidth,10),xt=parseInt(Nn.borderBottomWidth,10);let Ft=0,Gt=0;const kt="offsetWidth"in Be?Be.offsetWidth-Be.clientWidth-Ci-wt:0,Yt="offsetHeight"in Be?Be.offsetHeight-Be.clientHeight-It-xt:0,pe="offsetWidth"in Be?Be.offsetWidth===0?0:Je/Be.offsetWidth:0,Le="offsetHeight"in Be?Be.offsetHeight===0?0:vn/Be.offsetHeight:0;if(St===Be)Ft=et==="start"?Xt:et==="end"?Xt-qt:et==="nearest"?xe(Jt,Jt+qt,qt,It,xt,Jt+Xt,Jt+Xt+ge,ge):Xt-qt/2,Gt=ct==="start"?Ue:ct==="center"?Ue-Ht/2:ct==="end"?Ue-Ht:xe(jt,jt+Ht,Ht,Ci,wt,jt+Ue,jt+Ue+he,he),Ft=Math.max(0,Ft+Jt),Gt=Math.max(0,Gt+jt);else{Ft=et==="start"?Xt-An-It:et==="end"?Xt-sn+xt+Yt:et==="nearest"?xe(An,sn,vn,It,xt+Yt,Xt,Xt+ge,ge):Xt-(An+vn/2)+Yt/2,Gt=ct==="start"?Ue-ce-Ci:ct==="center"?Ue-(ce+Je/2)+kt/2:ct==="end"?Ue-we+wt+kt:xe(ce,we,Je,Ci,wt+kt,Ue,Ue+he,he);const{scrollLeft:on,scrollTop:ve}=Be;Ft=Le===0?0:Math.max(0,Math.min(ve+Ft/Le,Be.scrollHeight-vn/Le+Yt)),Gt=pe===0?0:Math.max(0,Math.min(on+Gt/pe,Be.scrollWidth-Je/pe+kt)),Xt+=ve-Ft,Ue+=on-Gt}Pn.push({el:Be,top:Ft,left:Gt})}return Pn},se=ye=>ye===!1?{block:"end",inline:"nearest"}:(Nt=>Nt===Object(Nt)&&Object.keys(Nt).length!==0)(ye)?ye:{block:"start",inline:"nearest"};function ze(ye,Nt){if(!ye.isConnected||!(Ne=>{let bt=Ne;for(;bt&&bt.parentNode;){if(bt.parentNode===document)return!0;bt=bt.parentNode instanceof ShadowRoot?bt.parentNode.host:bt.parentNode}return!1})(ye))return;const We=(Ne=>{const bt=window.getComputedStyle(Ne);return{top:parseFloat(bt.scrollMarginTop)||0,right:parseFloat(bt.scrollMarginRight)||0,bottom:parseFloat(bt.scrollMarginBottom)||0,left:parseFloat(bt.scrollMarginLeft)||0}})(ye);if((Ne=>typeof Ne=="object"&&typeof Ne.behavior=="function")(Nt))return Nt.behavior(Wt(ye,Nt));const ie=typeof Nt=="boolean"||Nt==null?void 0:Nt.behavior;for(const{el:Ne,top:bt,left:nt}of Wt(ye,se(Nt))){const et=bt-We.top+We.bottom,ct=nt-We.left+We.right;Ne.scroll({top:et,left:ct,behavior:ie})}}}}]);
|